From a79cccb5c6797437a319a8834a8b68243d63fe86 Mon Sep 17 00:00:00 2001 From: kosaki Date: Sun, 12 May 2013 08:40:35 +0000 Subject: [PATCH] * configure.in: move clock_gettime() check into regular place. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ configure.in | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 026efa944b..8fd3ed7e44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun May 12 15:38:09 2013 KOSAKI Motohiro + + * configure.in: move clock_gettime() check into regular place. + Wed May 8 13:45:53 2013 KOSAKI Motohiro * configure.in: add getenv() declaration check. diff --git a/configure.in b/configure.in index 3a00250748..8cb98baf35 100644 --- a/configure.in +++ b/configure.in @@ -994,15 +994,6 @@ AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX AC_CHECK_LIB(socket, shutdown) # SunOS/Solaris -AC_CHECK_FUNCS(clock_gettime) -if test x"$ac_cv_func_clock_gettime" != xyes; then - # glibc 2.17 moves clock_* functions from librt to the main C library. - # http://sourceware.org/ml/libc-announce/2012/msg00001.html - AC_CHECK_LIB(rt, clock_gettime) - unset ac_cv_func_clock_gettime - AC_CHECK_FUNCS(clock_gettime) -fi - dnl Checks for header files. AC_HEADER_DIRENT dnl AC_HEADER_STDC has been checked in AC_USE_SYSTEM_EXTENSIONS @@ -1737,6 +1728,7 @@ AC_CHECK_FUNCS(_longjmp) AC_CHECK_FUNCS(_setjmp) AC_CHECK_FUNCS(chroot) AC_CHECK_FUNCS(chsize) +AC_CHECK_FUNCS(clock_gettime) AC_CHECK_FUNCS(close) AC_CHECK_FUNCS(cosh) AC_CHECK_FUNCS(daemon) @@ -1835,6 +1827,15 @@ AC_CHECK_FUNCS(utimes) AC_CHECK_FUNCS(wait4) AC_CHECK_FUNCS(waitpid) +# Some platform neet -lrt for clock_gettime, but the other don't. +if test x"$ac_cv_func_clock_gettime" != xyes; then + # glibc 2.17 moves clock_* functions from librt to the main C library. + # http://sourceware.org/ml/libc-announce/2012/msg00001.html + AC_CHECK_LIB(rt, clock_gettime) + unset ac_cv_func_clock_gettime + AC_CHECK_FUNCS(clock_gettime) +fi + AC_CACHE_CHECK(for sigsetjmp as a macro or function, ac_cv_func_sigsetjmp, [AC_TRY_COMPILE([ #include