summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-12 08:40:35 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-12 08:40:35 +0000
commita79cccb5c6797437a319a8834a8b68243d63fe86 (patch)
tree92242a0d7d9f50308f7fb159fef17d2e990f9943 /configure.in
parent7776ca930b0b72a95d453481d942c4069d088dc6 (diff)
* 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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 10 insertions, 9 deletions
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 <setjmp.h>