* check if dlopen() is in libc first, then in libdl
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 3 Jan 2011 08:16:55 +0000 (08:16 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 3 Jan 2011 08:16:55 +0000 (08:16 +0000)
 * check if clock_gettime() is in libc first, then in librt

some systems have these functions in libc, or in a specific lib.
This allows to correctly set dlopen_libs and rt_libs variables.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@55821 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac

index cce3d05..01deb74 100644 (file)
@@ -405,11 +405,18 @@ case "$host_os" in
       dlopen_libs="-ldl"
       ;;
    *)
-      AC_CHECK_LIB([dl], [dlopen], [dlopen_libs=-ldl])
-      AC_SEARCH_LIBS([clock_gettime], [rt],
-         [
-          rt_libs=-lrt
-          AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [Have clock_gettime()])
+      AC_CHECK_LIB([c], [dlopen],
+         [],
+         [AC_CHECK_LIB([dl], [dlopen],
+             [dlopen_libs=-ldl])
+         ])
+      AC_CHECK_LIB([c], [clock_gettime],
+         [AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [Have clock_gettime()])],
+         [AC_CHECK_LIB([rt], [clock_gettime],
+             [
+              rt_libs=-lrt
+              AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [Have clock_gettime()])
+             ])
          ])
       ;;
 esac