Skip to content

Commit 65898e0

Browse files
committed
Add configure-time checks for gamma and error functions.
1 parent 609910c commit 65898e0

3 files changed

Lines changed: 117 additions & 3 deletions

File tree

configure

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 74072 .
2+
# From configure.in Revision: 74644 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.61 for python 2.7.
55
#
@@ -23366,7 +23366,105 @@ fi
2336623366

2336723367

2336823368

23369-
for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
23369+
for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23370+
do
23371+
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23372+
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23373+
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23374+
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23375+
echo $ECHO_N "(cached) $ECHO_C" >&6
23376+
else
23377+
cat >conftest.$ac_ext <<_ACEOF
23378+
/* confdefs.h. */
23379+
_ACEOF
23380+
cat confdefs.h >>conftest.$ac_ext
23381+
cat >>conftest.$ac_ext <<_ACEOF
23382+
/* end confdefs.h. */
23383+
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23384+
For example, HP-UX 11i <limits.h> declares gettimeofday. */
23385+
#define $ac_func innocuous_$ac_func
23386+
23387+
/* System header to define __stub macros and hopefully few prototypes,
23388+
which can conflict with char $ac_func (); below.
23389+
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23390+
<limits.h> exists even on freestanding compilers. */
23391+
23392+
#ifdef __STDC__
23393+
# include <limits.h>
23394+
#else
23395+
# include <assert.h>
23396+
#endif
23397+
23398+
#undef $ac_func
23399+
23400+
/* Override any GCC internal prototype to avoid an error.
23401+
Use char because int might match the return type of a GCC
23402+
builtin and then its argument prototype would still apply. */
23403+
#ifdef __cplusplus
23404+
extern "C"
23405+
#endif
23406+
char $ac_func ();
23407+
/* The GNU C library defines this for functions which it implements
23408+
to always fail with ENOSYS. Some functions are actually named
23409+
something starting with __ and the normal name is an alias. */
23410+
#if defined __stub_$ac_func || defined __stub___$ac_func
23411+
choke me
23412+
#endif
23413+
23414+
int
23415+
main ()
23416+
{
23417+
return $ac_func ();
23418+
;
23419+
return 0;
23420+
}
23421+
_ACEOF
23422+
rm -f conftest.$ac_objext conftest$ac_exeext
23423+
if { (ac_try="$ac_link"
23424+
case "(($ac_try" in
23425+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23426+
*) ac_try_echo=$ac_try;;
23427+
esac
23428+
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23429+
(eval "$ac_link") 2>conftest.er1
23430+
ac_status=$?
23431+
grep -v '^ *+' conftest.er1 >conftest.err
23432+
rm -f conftest.er1
23433+
cat conftest.err >&5
23434+
echo "$as_me:$LINENO: \$? = $ac_status" >&5
23435+
(exit $ac_status); } && {
23436+
test -z "$ac_c_werror_flag" ||
23437+
test ! -s conftest.err
23438+
} && test -s conftest$ac_exeext &&
23439+
$as_test_x conftest$ac_exeext; then
23440+
eval "$as_ac_var=yes"
23441+
else
23442+
echo "$as_me: failed program was:" >&5
23443+
sed 's/^/| /' conftest.$ac_ext >&5
23444+
23445+
eval "$as_ac_var=no"
23446+
fi
23447+
23448+
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23449+
conftest$ac_exeext conftest.$ac_ext
23450+
fi
23451+
ac_res=`eval echo '${'$as_ac_var'}'`
23452+
{ echo "$as_me:$LINENO: result: $ac_res" >&5
23453+
echo "${ECHO_T}$ac_res" >&6; }
23454+
if test `eval echo '${'$as_ac_var'}'` = yes; then
23455+
cat >>confdefs.h <<_ACEOF
23456+
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23457+
_ACEOF
23458+
23459+
fi
23460+
done
23461+
23462+
23463+
23464+
23465+
23466+
23467+
for ac_func in hypot lgamma log1p round tgamma
2337023468
do
2337123469
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
2337223470
{ echo "$as_me:$LINENO: checking for $ac_func" >&5

configure.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3263,7 +3263,8 @@ then
32633263
[Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
32643264
fi
32653265

3266-
AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p round])
3266+
AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
3267+
AC_CHECK_FUNCS([hypot lgamma log1p round tgamma])
32673268
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
32683269

32693270
LIBS=$LIBS_SAVE

pyconfig.h.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@
165165
/* Define if you have the 'epoll' functions. */
166166
#undef HAVE_EPOLL
167167

168+
/* Define to 1 if you have the `erf' function. */
169+
#undef HAVE_ERF
170+
171+
/* Define to 1 if you have the `erfc' function. */
172+
#undef HAVE_ERFC
173+
168174
/* Define to 1 if you have the <errno.h> header file. */
169175
#undef HAVE_ERRNO_H
170176

@@ -231,6 +237,9 @@
231237
/* Define to 1 if you have the `gai_strerror' function. */
232238
#undef HAVE_GAI_STRERROR
233239

240+
/* Define to 1 if you have the `gamma' function. */
241+
#undef HAVE_GAMMA
242+
234243
/* Define if you have the getaddrinfo function. */
235244
#undef HAVE_GETADDRINFO
236245

@@ -357,6 +366,9 @@
357366
/* Define to 1 if you have the `lchown' function. */
358367
#undef HAVE_LCHOWN
359368

369+
/* Define to 1 if you have the `lgamma' function. */
370+
#undef HAVE_LGAMMA
371+
360372
/* Define to 1 if you have the `dl' library (-ldl). */
361373
#undef HAVE_LIBDL
362374

@@ -751,6 +763,9 @@
751763
/* Define to 1 if you have the <term.h> header file. */
752764
#undef HAVE_TERM_H
753765

766+
/* Define to 1 if you have the `tgamma' function. */
767+
#undef HAVE_TGAMMA
768+
754769
/* Define to 1 if you have the <thread.h> header file. */
755770
#undef HAVE_THREAD_H
756771

0 commit comments

Comments
 (0)