Multiprocessing configure checks don't need LIBM

This commit is contained in:
Mark Dickinson 2009-11-28 13:13:13 +00:00
parent 31f0cfef0e
commit c63392c152
2 changed files with 201 additions and 203 deletions

339
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Revision: 76550 .
# From configure.in Revision: 76558 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.7.
#
@ -23797,175 +23797,6 @@ fi
LIBS_SAVE=$LIBS
LIBS="$LIBS $LIBM"
# For multiprocessing module, check that sem_open
# actually works. For FreeBSD versions <= 7.2,
# the kernel module that provides POSIX semaphores
# isn't loaded by default, so an attempt to call
# sem_open results in a 'Signal 12' error.
{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_posix_semaphores_enabled=yes
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <semaphore.h>
#include <sys/stat.h>
int main(void) {
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
if (a == SEM_FAILED) {
perror("sem_open");
return 1;
}
sem_close(a);
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_posix_semaphores_enabled=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_posix_semaphores_enabled=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
if test $ac_cv_posix_semaphores_enabled = no
then
cat >>confdefs.h <<\_ACEOF
#define POSIX_SEMAPHORES_NOT_ENABLED 1
_ACEOF
fi
# Multiprocessing check for broken sem_getvalue
{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
if test "${ac_cv_broken_sem_getvalue+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_broken_sem_getvalue=yes
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <semaphore.h>
#include <sys/stat.h>
int main(void){
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
int count;
int res;
if(a==SEM_FAILED){
perror("sem_open");
return 1;
}
res = sem_getvalue(a, &count);
sem_close(a);
return res==-1 ? 1 : 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_broken_sem_getvalue=no
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_broken_sem_getvalue=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
if test $ac_cv_broken_sem_getvalue = yes
then
cat >>confdefs.h <<\_ACEOF
#define HAVE_BROKEN_SEM_GETVALUE 1
_ACEOF
fi
# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.
{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
@ -24448,6 +24279,174 @@ fi
LIBS=$LIBS_SAVE
# For multiprocessing module, check that sem_open
# actually works. For FreeBSD versions <= 7.2,
# the kernel module that provides POSIX semaphores
# isn't loaded by default, so an attempt to call
# sem_open results in a 'Signal 12' error.
{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_posix_semaphores_enabled=yes
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <semaphore.h>
#include <sys/stat.h>
int main(void) {
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
if (a == SEM_FAILED) {
perror("sem_open");
return 1;
}
sem_close(a);
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_posix_semaphores_enabled=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_posix_semaphores_enabled=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
if test $ac_cv_posix_semaphores_enabled = no
then
cat >>confdefs.h <<\_ACEOF
#define POSIX_SEMAPHORES_NOT_ENABLED 1
_ACEOF
fi
# Multiprocessing check for broken sem_getvalue
{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
if test "${ac_cv_broken_sem_getvalue+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
ac_cv_broken_sem_getvalue=yes
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <semaphore.h>
#include <sys/stat.h>
int main(void){
sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
int count;
int res;
if(a==SEM_FAILED){
perror("sem_open");
return 1;
}
res = sem_getvalue(a, &count);
sem_close(a);
return res==-1 ? 1 : 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_broken_sem_getvalue=no
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_broken_sem_getvalue=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
if test $ac_cv_broken_sem_getvalue = yes
then
cat >>confdefs.h <<\_ACEOF
#define HAVE_BROKEN_SEM_GETVALUE 1
_ACEOF
fi
# determine what size digit to use for Python's longs
{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }

View File

@ -3389,6 +3389,38 @@ fi
LIBS_SAVE=$LIBS
LIBS="$LIBS $LIBM"
# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.
AC_MSG_CHECKING(whether tanh preserves the sign of zero)
AC_CACHE_VAL(ac_cv_tanh_preserves_zero_sign, [
AC_TRY_RUN([
#include <math.h>
#include <stdlib.h>
int main() {
/* return 0 if either negative zeros don't exist
on this platform or if negative zeros exist
and tanh(-0.) == -0. */
if (atan2(0., -1.) == atan2(-0., -1.) ||
atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
else exit(1);
}
],
ac_cv_tanh_preserves_zero_sign=yes,
ac_cv_tanh_preserves_zero_sign=no,
ac_cv_tanh_preserves_zero_sign=no)])
AC_MSG_RESULT($ac_cv_tanh_preserves_zero_sign)
if test "$ac_cv_tanh_preserves_zero_sign" = yes
then
AC_DEFINE(TANH_PRESERVES_ZERO_SIGN, 1,
[Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
fi
AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
AC_CHECK_FUNCS([hypot lgamma log1p round tgamma])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
LIBS=$LIBS_SAVE
# For multiprocessing module, check that sem_open
# actually works. For FreeBSD versions <= 7.2,
# the kernel module that provides POSIX semaphores
@ -3423,7 +3455,6 @@ then
[Define if POSIX semaphores aren't enabled on your system])
fi
# Multiprocessing check for broken sem_getvalue
AC_MSG_CHECKING(for broken sem_getvalue)
AC_CACHE_VAL(ac_cv_broken_sem_getvalue,
@ -3458,38 +3489,6 @@ then
[define to 1 if your sem_getvalue is broken.])
fi
# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.
AC_MSG_CHECKING(whether tanh preserves the sign of zero)
AC_CACHE_VAL(ac_cv_tanh_preserves_zero_sign, [
AC_TRY_RUN([
#include <math.h>
#include <stdlib.h>
int main() {
/* return 0 if either negative zeros don't exist
on this platform or if negative zeros exist
and tanh(-0.) == -0. */
if (atan2(0., -1.) == atan2(-0., -1.) ||
atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
else exit(1);
}
],
ac_cv_tanh_preserves_zero_sign=yes,
ac_cv_tanh_preserves_zero_sign=no,
ac_cv_tanh_preserves_zero_sign=no)])
AC_MSG_RESULT($ac_cv_tanh_preserves_zero_sign)
if test "$ac_cv_tanh_preserves_zero_sign" = yes
then
AC_DEFINE(TANH_PRESERVES_ZERO_SIGN, 1,
[Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
fi
AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
AC_CHECK_FUNCS([hypot lgamma log1p round tgamma])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
LIBS=$LIBS_SAVE
# determine what size digit to use for Python's longs
AC_MSG_CHECKING([digit size for Python's longs])
AC_ARG_ENABLE(big-digits,