clean up clock_gettime detection

SVN revision: 52864
This commit is contained in:
Vincent Torri 2010-09-28 21:24:16 +00:00
parent 61a510d387
commit 2e11e01f56
1 changed files with 6 additions and 8 deletions

View File

@ -404,26 +404,24 @@ case "$host_os" in
mingw32ce* | cegcc*)
WIN32_LIBS="-lws2"
dlopen_libs="-ldl"
rt_libs="-lrt"
;;
mingw*)
WIN32_LIBS="-lws2_32"
dlopen_libs="-ldl"
rt_libs="-lrt"
;;
*)
AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
AC_CHECK_LIB(rt, clock_gettime, rt_libs=-lrt)
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()])
])
;;
esac
AC_SUBST(WIN32_LIBS)
AC_SUBST(dlopen_libs)
AC_SUBST(rt_libs)
if test -n "$rt_libs"; then
AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [Have clock_gettime()])
fi
# Eina library
PKG_CHECK_MODULES(EINA, [eina >= 1.0.0])