Mesa (master): automake/gallium: attempt to fix -lrt
Dave Airlie
airlied at kemper.freedesktop.org
Tue Dec 4 08:02:55 UTC 2012
Module: Mesa
Branch: master
Commit: ec83535c83c748b067ecf4548e5396fef8719725
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec83535c83c748b067ecf4548e5396fef8719725
Author: Dave Airlie <airlied at redhat.com>
Date: Tue Dec 4 09:25:13 2012 +1000
automake/gallium: attempt to fix -lrt
fix non-automake bits in pipe-load to.
Should fix:
http://bugs.freedesktop.org/57852
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
configs/current.in | 1 +
configure.ac | 9 +++++++--
src/gallium/targets/pipe-loader/Makefile | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/configs/current.in b/configs/current.in
index 62edfa5..dc8e63f 100644
--- a/configs/current.in
+++ b/configs/current.in
@@ -41,6 +41,7 @@ GLX_TLS = @GLX_TLS@
# dlopen
DLOPEN_LIBS = @DLOPEN_LIBS@
+CLOCK_LIB = @CLOCK_LIB@
# Source selection
MESA_ASM_FILES = @MESA_ASM_FILES@
diff --git a/configure.ac b/configure.ac
index 803c256..a133902 100644
--- a/configure.ac
+++ b/configure.ac
@@ -535,6 +535,11 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
[DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
AC_SUBST([DLOPEN_LIBS])
+AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],
+ [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt],
+ [AC_MSG_ERROR([Couldn't find clock_gettime])])])
+AC_SUBST([CLOCK_LIB])
+
dnl See if posix_memalign is available
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
@@ -1121,7 +1126,7 @@ if test "x$enable_dri" = xyes; then
# put all the necessary libs together
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
- GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $PTHREAD_LIBS $DLOPEN_LIBS"
+ GALLIUM_DRI_LIB_DEPS="$GALLIUM_DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
fi
AM_CONDITIONAL(NEED_LIBDRICORE, test -n "$DRI_DIRS")
AC_SUBST([DRI_DIRS])
@@ -1390,7 +1395,7 @@ if test "x$enable_openvg" = xyes; then
CORE_DIRS="$CORE_DIRS mapi/vgapi"
GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS"
HAVE_ST_VEGA=yes
- VG_PC_LIB_PRIV="-lm $PTHREAD_LIBS $DLOPEN_LIBS"
+ VG_PC_LIB_PRIV="-lm $CLOCK_LIB $PTHREAD_LIBS $DLOPEN_LIBS"
AC_SUBST([VG_PC_LIB_PRIV])
fi
diff --git a/src/gallium/targets/pipe-loader/Makefile b/src/gallium/targets/pipe-loader/Makefile
index f15cd25..b8688ed 100644
--- a/src/gallium/targets/pipe-loader/Makefile
+++ b/src/gallium/targets/pipe-loader/Makefile
@@ -24,7 +24,7 @@ PIPE_LIBS = \
$(TOP)/src/gallium/drivers/rbug/librbug.a \
$(GALLIUM_AUXILIARIES)
-PIPE_SYS = $(LIBDRM_LIBS) -lm -lpthread $(DLOPEN_LIBS)
+PIPE_SYS = $(LIBDRM_LIBS) -lm -lpthread $(CLOCK_LIB) $(DLOPEN_LIBS)
PIPE_CFLAGS = $(LIBDRM_CFLAGS)
More information about the mesa-commit
mailing list