From: caro Date: Mon, 3 Jan 2011 08:16:55 +0000 (+0000) Subject: * check if dlopen() is in libc first, then in libdl X-Git-Tag: accepted/2.0/20130306.224007~195^2~305 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60f2ca154c913b8e99a617321e7e6ca2b50f844a;p=profile%2Fivi%2Fecore.git * 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 --- 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