summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@ginger.bigkitten.com>2007-11-15 22:31:14 -0800
committerDavid Schleef <ds@ginger.bigkitten.com>2007-11-15 22:31:14 -0800
commit8db0314b67547998af7c0dc33e2800c9c0edd8c6 (patch)
treef1515a691a3d8c13eb5513b26c49dc27eac40ef4
parent1f6fd2de2e6d123c54f2dc2b1190853aef3ca8c3 (diff)
Fix librt detection.
-rw-r--r--configure.ac9
-rw-r--r--liboil-uninstalled.pc.in2
2 files changed, 5 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 240cef4..b211269 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,12 +141,11 @@ AC_CHECK_FUNCS([sigaction])
AC_CHECK_LIBM
AC_SUBST(LIBM)
-save_libs="$LIBS"
AC_CHECK_LIB(rt, clock_gettime,
- AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Defined if we have clock_gettime()]))
-LIBRT=$LIBS
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Defined if we have clock_gettime()])
+ LIBRT=-lrt
+ )
AC_SUBST(LIBRT)
-LIBS="$save_libs"
AS_COMPILER_FLAG(-Wall, LIBOIL_CFLAGS="$LIBOIL_CFLAGS -Wall")
if test "x$LIBOIL_CVS" = "xyes"
@@ -219,7 +218,7 @@ AC_SUBST(ALTIVEC_CFLAGS)
LIBOIL_CFLAGS="$LIBOIL_CFLAGS -D_BSD_SOURCE -D_GNU_SOURCE -I\$(top_srcdir) -DOIL_ENABLE_UNSTABLE_API"
AC_SUBST(LIBOIL_CFLAGS)
-LIBOIL_LIBS="\$(top_builddir)/liboil/liboil-$LIBOIL_MAJORMINOR.la -lm -lrt"
+LIBOIL_LIBS="\$(top_builddir)/liboil/liboil-$LIBOIL_MAJORMINOR.la $LIBM $LIBRT"
AC_SUBST(LIBOIL_LIBS)
pkgconfigdir="\$(libdir)/pkgconfig"
diff --git a/liboil-uninstalled.pc.in b/liboil-uninstalled.pc.in
index 2bdb214..13fb81d 100644
--- a/liboil-uninstalled.pc.in
+++ b/liboil-uninstalled.pc.in
@@ -6,5 +6,5 @@ includedir=${pcfiledir}/
Name: liboil-@LIBOIL_MAJORMINOR@ uninstalled
Description: Library of Optimized Inner Loops
Version: @VERSION@
-Libs: -L${libdir} -loil-@LIBOIL_MAJORMINOR@ -lm
+Libs: -L${libdir} -loil-@LIBOIL_MAJORMINOR@ @LIBM@ @LIBRT@
Cflags: -I${includedir}