Add in appropriate checks for inet_aton, and modifications to backend/port/Makefile
to include inet_aton.c if required
This commit is contained in:
parent
50b618a049
commit
4506116db8
|
@ -2925,14 +2925,67 @@ else
|
|||
fi
|
||||
done
|
||||
|
||||
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
|
||||
echo "configure:2930: checking for cbrt" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
|
||||
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
|
||||
echo "configure:2930: checking for inet_aton" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2935 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char inet_aton(); below. */
|
||||
#include <assert.h>
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char inet_aton();
|
||||
|
||||
int main() {
|
||||
|
||||
/* The GNU C library defines this for functions which it implements
|
||||
to always fail with ENOSYS. Some functions are actually named
|
||||
something starting with __ and the normal name is an alias. */
|
||||
#if defined (__stub_inet_aton) || defined (__stub___inet_aton)
|
||||
choke me
|
||||
#else
|
||||
inet_aton();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_inet_aton=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_inet_aton=no"
|
||||
fi
|
||||
rm -f conftest*
|
||||
fi
|
||||
|
||||
if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
|
||||
echo "$ac_t""yes" 1>&6
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define HAVE_INET_ATON 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
INET_ATON='inet_aton.o'
|
||||
fi
|
||||
|
||||
|
||||
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
|
||||
echo "configure:2983: checking for cbrt" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2988 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char cbrt(); below. */
|
||||
#include <assert.h>
|
||||
|
@ -2954,7 +3007,7 @@ cbrt();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_cbrt=yes"
|
||||
else
|
||||
|
@ -2975,7 +3028,7 @@ EOF
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
|
||||
echo "configure:2979: checking for cbrt in -lm" >&5
|
||||
echo "configure:3032: checking for cbrt in -lm" >&5
|
||||
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -2983,7 +3036,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lm $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2987 "configure"
|
||||
#line 3040 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -2994,7 +3047,7 @@ int main() {
|
|||
cbrt()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:3051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -3020,12 +3073,12 @@ fi
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for rint""... $ac_c" 1>&6
|
||||
echo "configure:3024: checking for rint" >&5
|
||||
echo "configure:3077: checking for rint" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3029 "configure"
|
||||
#line 3082 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char rint(); below. */
|
||||
|
@ -3048,7 +3101,7 @@ rint();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_rint=yes"
|
||||
else
|
||||
|
@ -3069,7 +3122,7 @@ EOF
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
|
||||
echo "configure:3073: checking for rint in -lm" >&5
|
||||
echo "configure:3126: checking for rint in -lm" >&5
|
||||
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -3077,7 +3130,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lm $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3081 "configure"
|
||||
#line 3134 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -3088,7 +3141,7 @@ int main() {
|
|||
rint()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
|
@ -3214,7 +3267,7 @@ done
|
|||
|
||||
ac_given_srcdir=$srcdir
|
||||
|
||||
trap 'rm -fr `echo "GNUmakefile Makefile.global include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
|
@ -3273,6 +3326,7 @@ s%@xargs@%$xargs%g
|
|||
s%@ipcs@%$ipcs%g
|
||||
s%@ipcrm@%$ipcrm%g
|
||||
s%@LIBOBJS@%$LIBOBJS%g
|
||||
s%@INET_ATON@%$INET_ATON%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
@ -3314,7 +3368,7 @@ EOF
|
|||
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
|
||||
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global"}
|
||||
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile"}
|
||||
EOF
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||
|
|
|
@ -149,7 +149,9 @@ AC_FUNC_MEMCMP
|
|||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
|
||||
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
|
||||
AC_SUBST(INET_ATON)
|
||||
AC_CHECK_FUNC(cbrt, AC_DEFINE(HAVE_CBRT), AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT)))
|
||||
AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT)))
|
||||
|
||||
AC_OUTPUT(GNUmakefile Makefile.global)
|
||||
AC_OUTPUT(GNUmakefile Makefile.global backend/port/Makefile)
|
||||
|
|
|
@ -44,6 +44,9 @@
|
|||
/* Set to 1 if you have cbrt() */
|
||||
#undef HAVE_CBRT
|
||||
|
||||
/* Set to 1 if you have cbrt() */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Set to 1 if you have rint() */
|
||||
#undef HAVE_RINT
|
||||
|
||||
|
|
Loading…
Reference in New Issue