diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-10 03:01:51 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-10 03:01:51 +0000 |
commit | 093beeda90631de7c1d82abb1be4ef0f7bde06c2 (patch) | |
tree | 4ad663f94f42901b2d487f09ceda11ff51eca35d /configure.in | |
parent | 14c9944e88d8c03aeb26f450c72c4d9a6e6632e1 (diff) | |
download | ruby-093beeda90631de7c1d82abb1be4ef0f7bde06c2.tar.gz |
* configure.in: Don't link librt if clock_gettime is available in
the main C library.
glibc 2.17 moves clock_* from librt to the main C library.
http://sourceware.org/ml/libc-announce/2012/msg00001.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 36d31331ce..355d2cf748 100644 --- a/configure.in +++ b/configure.in @@ -1432,7 +1432,6 @@ AC_CHECK_LIB(crypt, crypt) # glibc (GNU/Linux, GNU/Hurd, GNU/kFreeBSD) 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_LIB(rt, clock_gettime) # GNU/Linux AS_CASE(["$target_cpu"], [alpha*|sh4|sh4el|sh4eb], [AS_CASE(["$target_os"::"$GCC"], @@ -1693,6 +1692,16 @@ if test "$rb_cv_have_signbit" = yes; then else AC_LIBOBJ([signbit]) fi + +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 + AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall __syscall chroot getcwd eaccess\ truncate ftruncate ftello chsize times utimes utimensat fcntl lockf lstat\ truncate64 ftruncate64 ftello64 fseeko fseeko64 \ @@ -1705,7 +1714,7 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall __syscall chroot ge dlopen sigprocmask sigaction _setjmp _longjmp\ getsid setsid telldir seekdir fchmod cosh sinh tanh log2 round llabs\ setuid setgid daemon select_large_fdset setenv unsetenv\ - mktime timegm gmtime_r clock_gettime gettimeofday poll ppoll\ + mktime timegm gmtime_r gettimeofday poll ppoll\ pread sendfile shutdown sigaltstack dl_iterate_phdr\ dup dup3 pipe2 posix_memalign memalign ioctl mblen) |