* configure.in: Turn on --enable-pthread by default for FreeBSD
5.2.1-RELEASE and later, and remove pthread support for older versions which has never worked perfectly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f3e7ae5696
commit
4005af4520
@ -1,3 +1,9 @@
|
|||||||
|
Fri Oct 5 16:15:52 2007 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* configure.in: Turn on --enable-pthread by default for FreeBSD
|
||||||
|
5.2.1-RELEASE and later, and remove pthread support for older
|
||||||
|
versions which has never worked perfectly.
|
||||||
|
|
||||||
Fri Oct 5 16:11:50 2007 Akinori MUSHA <knu@iDaemons.org>
|
Fri Oct 5 16:11:50 2007 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* time.c (time_to_s): Fix documentation. Time format changed.
|
* time.c (time_to_s): Fix documentation. Time format changed.
|
||||||
|
47
configure.in
47
configure.in
@ -392,17 +392,31 @@ dnl Check whether we need to define sys_nerr locally
|
|||||||
AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default
|
AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default
|
||||||
#include <errno.h>])
|
#include <errno.h>])
|
||||||
|
|
||||||
dnl whether link libc_r or not
|
case "$target_os" in
|
||||||
AC_ARG_WITH(libc_r,
|
freebsd*)
|
||||||
[ --with-libc_r link libc_r if possible (FreeBSD only)], [
|
AC_CACHE_CHECK([whether pthread should be enabled by default],
|
||||||
case $withval in
|
rb_cv_enable_pthread_default,
|
||||||
yes) with_libc_r=yes;;
|
[AC_TRY_CPP([
|
||||||
*) with_libc_r=no;;
|
#include <osreldate.h>
|
||||||
esac], [with_libc_r=no])
|
#if __FreeBSD_version < 502102
|
||||||
|
#error pthread should be disabled on this platform
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
rb_cv_enable_pthread_default=yes,
|
||||||
|
rb_cv_enable_pthread_default=no)])
|
||||||
|
enable_pthread_default=$rb_cv_enable_pthread_default
|
||||||
|
;;
|
||||||
|
mingw*)
|
||||||
|
enable_pthread_default=no
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
enable_pthread_default=yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
AC_ARG_ENABLE(pthread,
|
AC_ARG_ENABLE(pthread,
|
||||||
[ --enable-pthread use pthread library.],
|
[ --enable-pthread use pthread library.],
|
||||||
[enable_pthread=$enableval], [enable_pthread=yes])
|
[enable_pthread=$enableval], [enable_pthread=$enable_pthread_default])
|
||||||
|
|
||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
case "$target_os" in
|
case "$target_os" in
|
||||||
@ -452,7 +466,6 @@ mingw*) LIBS="-lshell32 -lws2_32 $LIBS"
|
|||||||
ac_cv_lib_dl_dlopen=no
|
ac_cv_lib_dl_dlopen=no
|
||||||
rb_cv_binary_elf=no
|
rb_cv_binary_elf=no
|
||||||
rb_cv_negative_time_t=no
|
rb_cv_negative_time_t=no
|
||||||
enable_pthread=no
|
|
||||||
ac_cv_func_fcntl=yes
|
ac_cv_func_fcntl=yes
|
||||||
;;
|
;;
|
||||||
os2-emx*) LIBS="-lm $LIBS"
|
os2-emx*) LIBS="-lm $LIBS"
|
||||||
@ -482,22 +495,6 @@ freebsd*) LIBS="-lm $LIBS"
|
|||||||
if test "$rb_cv_lib_xpg4_needed" = yes; then
|
if test "$rb_cv_lib_xpg4_needed" = yes; then
|
||||||
AC_CHECK_LIB(xpg4, setlocale)
|
AC_CHECK_LIB(xpg4, setlocale)
|
||||||
fi
|
fi
|
||||||
if test "$with_libc_r" = yes; then
|
|
||||||
AC_CACHE_CHECK([whether libc_r is supplementary to libc],
|
|
||||||
rb_cv_supplementary_lib_c_r,
|
|
||||||
[AC_TRY_CPP([
|
|
||||||
#include <osreldate.h>
|
|
||||||
#if 500016 <= __FreeBSD_version
|
|
||||||
#error libc_r is supplementary to libc
|
|
||||||
#endif
|
|
||||||
],
|
|
||||||
rb_cv_supplementary_lib_c_r=no,
|
|
||||||
rb_cv_supplementary_lib_c_r=yes,
|
|
||||||
rb_cv_supplementary_lib_c_r=yes)])
|
|
||||||
if test "$rb_cv_supplementary_lib_c_r" = yes; then
|
|
||||||
MAINLIBS="-lc_r $MAINLIBS"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
dragonfly*) LIBS="-lm $LIBS"
|
dragonfly*) LIBS="-lm $LIBS"
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user