From 60f2ca154c913b8e99a617321e7e6ca2b50f844a Mon Sep 17 00:00:00 2001 From: caro Date: Mon, 3 Jan 2011 08:16:55 +0000 Subject: [PATCH] * check if dlopen() is in libc first, then in libdl * 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: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@55821 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- configure.ac | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index cce3d05..01deb74 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.7.4