mirror of https://github.com/python/cpython
gh-115765: Don't use deprecated AC_EGREP_* macros in configure.ac (#116016)
Rewrite using AX_CHECK_DEFINE and AC_CHECK_TYPES.
This commit is contained in:
parent
a71e32ce8e
commit
449c6da2bd
|
@ -150,6 +150,80 @@ AS_VAR_IF(CACHEVAR,yes,
|
||||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
AS_VAR_POPDEF([CACHEVAR])dnl
|
||||||
])dnl AX_CHECK_COMPILE_FLAGS
|
])dnl AX_CHECK_COMPILE_FLAGS
|
||||||
|
|
||||||
|
# ===========================================================================
|
||||||
|
# https://www.gnu.org/software/autoconf-archive/ax_check_define.html
|
||||||
|
# ===========================================================================
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
#
|
||||||
|
# AC_CHECK_DEFINE([symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
|
||||||
|
# AX_CHECK_DEFINE([includes],[symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
#
|
||||||
|
# Complements AC_CHECK_FUNC but it does not check for a function but for a
|
||||||
|
# define to exist. Consider a usage like:
|
||||||
|
#
|
||||||
|
# AC_CHECK_DEFINE(__STRICT_ANSI__, CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500")
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||||
|
#
|
||||||
|
# Copying and distribution of this file, with or without modification, are
|
||||||
|
# permitted in any medium without royalty provided the copyright notice
|
||||||
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
|
# warranty.
|
||||||
|
|
||||||
|
#serial 11
|
||||||
|
|
||||||
|
AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE])
|
||||||
|
AC_DEFUN([AC_CHECK_DEFINE],[
|
||||||
|
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl
|
||||||
|
AC_CACHE_CHECK([for $1 defined], ac_var,
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||||
|
#ifdef $1
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
|
||||||
|
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$2], [$3])dnl
|
||||||
|
AS_VAR_POPDEF([ac_var])dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
AU_ALIAS([AX_CHECK_DEFINED], [AX_CHECK_DEFINE])
|
||||||
|
AC_DEFUN([AX_CHECK_DEFINE],[
|
||||||
|
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$2_$1])dnl
|
||||||
|
AC_CACHE_CHECK([for $2 defined in $1], ac_var,
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$1>]], [[
|
||||||
|
#ifdef $2
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
|
||||||
|
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
|
||||||
|
AS_VAR_POPDEF([ac_var])dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_CHECK_FUNC],
|
||||||
|
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$2])dnl
|
||||||
|
AC_CACHE_CHECK([for $2], ac_var,
|
||||||
|
dnl AC_LANG_FUNC_LINK_TRY
|
||||||
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([$1
|
||||||
|
#undef $2
|
||||||
|
char $2 ();],[
|
||||||
|
char (*f) () = $2;
|
||||||
|
return f != $2; ])],
|
||||||
|
[AS_VAR_SET(ac_var, yes)],
|
||||||
|
[AS_VAR_SET(ac_var, no)])])
|
||||||
|
AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
|
||||||
|
AS_VAR_POPDEF([ac_var])dnl
|
||||||
|
])# AC_CHECK_FUNC
|
||||||
|
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
|
# https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
|
|
|
@ -11297,42 +11297,22 @@ then :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# checks for typedefs
|
# Check for clock_t in time.h.
|
||||||
|
ac_fn_c_check_type "$LINENO" "clock_t" "ac_cv_type_clock_t" "#include <time.h>
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
|
"
|
||||||
printf %s "checking for clock_t in time.h... " >&6; }
|
if test "x$ac_cv_type_clock_t" = xyes
|
||||||
if test ${ac_cv_clock_t_time_h+y}
|
|
||||||
then :
|
then :
|
||||||
printf %s "(cached) " >&6
|
|
||||||
|
printf "%s\n" "#define HAVE_CLOCK_T 1" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
else $as_nop
|
else $as_nop
|
||||||
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
_ACEOF
|
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|
||||||
$EGREP "clock_t" >/dev/null 2>&1
|
|
||||||
then :
|
|
||||||
ac_cv_clock_t_time_h=yes
|
|
||||||
else $as_nop
|
|
||||||
ac_cv_clock_t_time_h=no
|
|
||||||
fi
|
|
||||||
rm -rf conftest*
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_clock_t_time_h" >&5
|
|
||||||
printf "%s\n" "$ac_cv_clock_t_time_h" >&6; }
|
|
||||||
if test "x$ac_cv_clock_t_time_h" = xno
|
|
||||||
then :
|
|
||||||
|
|
||||||
|
|
||||||
printf "%s\n" "#define clock_t long" >>confdefs.h
|
printf "%s\n" "#define clock_t long" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
|
||||||
printf %s "checking for makedev... " >&6; }
|
printf %s "checking for makedev... " >&6; }
|
||||||
if test ${ac_cv_func_makedev+y}
|
if test ${ac_cv_func_makedev+y}
|
||||||
|
@ -11534,6 +11514,7 @@ printf "%s\n" "#define size_t unsigned int" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
|
||||||
printf %s "checking for uid_t in sys/types.h... " >&6; }
|
printf %s "checking for uid_t in sys/types.h... " >&6; }
|
||||||
if test ${ac_cv_type_uid_t+y}
|
if test ${ac_cv_type_uid_t+y}
|
||||||
|
@ -16184,24 +16165,47 @@ else
|
||||||
# (e.g. gnu pth with pthread emulation)
|
# (e.g. gnu pth with pthread emulation)
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
|
||||||
printf %s "checking for _POSIX_THREADS in unistd.h... " >&6; }
|
printf %s "checking for _POSIX_THREADS in unistd.h... " >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS defined in unistd.h" >&5
|
||||||
|
printf %s "checking for _POSIX_THREADS defined in unistd.h... " >&6; }
|
||||||
|
if test ${ac_cv_defined__POSIX_THREADS_unistd_h+y}
|
||||||
|
then :
|
||||||
|
printf %s "(cached) " >&6
|
||||||
|
else $as_nop
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#ifdef _POSIX_THREADS
|
int
|
||||||
yes
|
main (void)
|
||||||
#endif
|
{
|
||||||
|
|
||||||
|
#ifdef _POSIX_THREADS
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
if ac_fn_c_try_compile "$LINENO"
|
||||||
$EGREP "yes" >/dev/null 2>&1
|
then :
|
||||||
|
ac_cv_defined__POSIX_THREADS_unistd_h=yes
|
||||||
|
else $as_nop
|
||||||
|
ac_cv_defined__POSIX_THREADS_unistd_h=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined__POSIX_THREADS_unistd_h" >&5
|
||||||
|
printf "%s\n" "$ac_cv_defined__POSIX_THREADS_unistd_h" >&6; }
|
||||||
|
if test $ac_cv_defined__POSIX_THREADS_unistd_h != "no"
|
||||||
then :
|
then :
|
||||||
unistd_defines_pthreads=yes
|
unistd_defines_pthreads=yes
|
||||||
else $as_nop
|
else $as_nop
|
||||||
unistd_defines_pthreads=no
|
unistd_defines_pthreads=no
|
||||||
fi
|
fi
|
||||||
rm -rf conftest*
|
|
||||||
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
|
||||||
printf "%s\n" "$unistd_defines_pthreads" >&6; }
|
printf "%s\n" "$unistd_defines_pthreads" >&6; }
|
||||||
|
|
||||||
|
@ -16708,59 +16712,131 @@ printf %s "checking ipv6 stack type... " >&6; }
|
||||||
do
|
do
|
||||||
case $i in
|
case $i in
|
||||||
inria)
|
inria)
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPV6_INRIA_VERSION defined in netinet/in.h" >&5
|
||||||
|
printf %s "checking for IPV6_INRIA_VERSION defined in netinet/in.h... " >&6; }
|
||||||
|
if test ${ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h+y}
|
||||||
|
then :
|
||||||
|
printf %s "(cached) " >&6
|
||||||
|
else $as_nop
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#ifdef IPV6_INRIA_VERSION
|
int
|
||||||
yes
|
main (void)
|
||||||
#endif
|
{
|
||||||
|
|
||||||
|
#ifdef IPV6_INRIA_VERSION
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
if ac_fn_c_try_compile "$LINENO"
|
||||||
$EGREP "yes" >/dev/null 2>&1
|
then :
|
||||||
|
ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h=yes
|
||||||
|
else $as_nop
|
||||||
|
ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h" >&5
|
||||||
|
printf "%s\n" "$ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h" >&6; }
|
||||||
|
if test $ac_cv_defined_IPV6_INRIA_VERSION_netinet_in_h != "no"
|
||||||
then :
|
then :
|
||||||
ipv6type=$i
|
ipv6type=$i
|
||||||
fi
|
fi
|
||||||
rm -rf conftest*
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
kame)
|
kame)
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
#include <netinet/in.h>
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __KAME__ defined in netinet/in.h" >&5
|
||||||
#ifdef __KAME__
|
printf %s "checking for __KAME__ defined in netinet/in.h... " >&6; }
|
||||||
yes
|
if test ${ac_cv_defined___KAME___netinet_in_h+y}
|
||||||
#endif
|
|
||||||
_ACEOF
|
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|
||||||
$EGREP "yes" >/dev/null 2>&1
|
|
||||||
then :
|
then :
|
||||||
ipv6type=$i;
|
printf %s "(cached) " >&6
|
||||||
ipv6lib=inet6
|
else $as_nop
|
||||||
ipv6libdir=/usr/local/v6/lib
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
ipv6trylibc=yes
|
/* end confdefs.h. */
|
||||||
fi
|
#include <netinet/in.h>
|
||||||
rm -rf conftest*
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef __KAME__
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"
|
||||||
|
then :
|
||||||
|
ac_cv_defined___KAME___netinet_in_h=yes
|
||||||
|
else $as_nop
|
||||||
|
ac_cv_defined___KAME___netinet_in_h=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined___KAME___netinet_in_h" >&5
|
||||||
|
printf "%s\n" "$ac_cv_defined___KAME___netinet_in_h" >&6; }
|
||||||
|
if test $ac_cv_defined___KAME___netinet_in_h != "no"
|
||||||
|
then :
|
||||||
|
ipv6type=$i
|
||||||
|
ipv6lib=inet6
|
||||||
|
ipv6libdir=/usr/local/v6/lib
|
||||||
|
ipv6trylibc=yes
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
linux-glibc)
|
linux-glibc)
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
#include <features.h>
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __GLIBC__ defined in features.h" >&5
|
||||||
#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
|
printf %s "checking for __GLIBC__ defined in features.h... " >&6; }
|
||||||
yes
|
if test ${ac_cv_defined___GLIBC___features_h+y}
|
||||||
#endif
|
|
||||||
_ACEOF
|
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|
||||||
$EGREP "yes" >/dev/null 2>&1
|
|
||||||
then :
|
then :
|
||||||
ipv6type=$i;
|
printf %s "(cached) " >&6
|
||||||
ipv6trylibc=yes
|
else $as_nop
|
||||||
fi
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
rm -rf conftest*
|
/* end confdefs.h. */
|
||||||
|
#include <features.h>
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef __GLIBC__
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"
|
||||||
|
then :
|
||||||
|
ac_cv_defined___GLIBC___features_h=yes
|
||||||
|
else $as_nop
|
||||||
|
ac_cv_defined___GLIBC___features_h=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined___GLIBC___features_h" >&5
|
||||||
|
printf "%s\n" "$ac_cv_defined___GLIBC___features_h" >&6; }
|
||||||
|
if test $ac_cv_defined___GLIBC___features_h != "no"
|
||||||
|
then :
|
||||||
|
ipv6type=$i
|
||||||
|
ipv6trylibc=yes
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
linux-inet6)
|
linux-inet6)
|
||||||
if test -d /usr/inet6; then
|
if test -d /usr/inet6; then
|
||||||
|
@ -16779,62 +16855,134 @@ rm -rf conftest*
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
toshiba)
|
toshiba)
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
#include <sys/param.h>
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _TOSHIBA_INET6 defined in sys/param.h" >&5
|
||||||
#ifdef _TOSHIBA_INET6
|
printf %s "checking for _TOSHIBA_INET6 defined in sys/param.h... " >&6; }
|
||||||
yes
|
if test ${ac_cv_defined__TOSHIBA_INET6_sys_param_h+y}
|
||||||
#endif
|
|
||||||
_ACEOF
|
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|
||||||
$EGREP "yes" >/dev/null 2>&1
|
|
||||||
then :
|
then :
|
||||||
ipv6type=$i;
|
printf %s "(cached) " >&6
|
||||||
ipv6lib=inet6;
|
else $as_nop
|
||||||
ipv6libdir=/usr/local/v6/lib
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
fi
|
/* end confdefs.h. */
|
||||||
rm -rf conftest*
|
#include <sys/param.h>
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef _TOSHIBA_INET6
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"
|
||||||
|
then :
|
||||||
|
ac_cv_defined__TOSHIBA_INET6_sys_param_h=yes
|
||||||
|
else $as_nop
|
||||||
|
ac_cv_defined__TOSHIBA_INET6_sys_param_h=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined__TOSHIBA_INET6_sys_param_h" >&5
|
||||||
|
printf "%s\n" "$ac_cv_defined__TOSHIBA_INET6_sys_param_h" >&6; }
|
||||||
|
if test $ac_cv_defined__TOSHIBA_INET6_sys_param_h != "no"
|
||||||
|
then :
|
||||||
|
ipv6type=$i
|
||||||
|
ipv6lib=inet6
|
||||||
|
ipv6libdir=/usr/local/v6/lib
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
v6d)
|
v6d)
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
#include </usr/local/v6/include/sys/v6config.h>
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __V6D__ defined in /usr/local/v6/include/sys/v6config.h" >&5
|
||||||
#ifdef __V6D__
|
printf %s "checking for __V6D__ defined in /usr/local/v6/include/sys/v6config.h... " >&6; }
|
||||||
yes
|
if test ${ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h+y}
|
||||||
#endif
|
|
||||||
_ACEOF
|
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|
||||||
$EGREP "yes" >/dev/null 2>&1
|
|
||||||
then :
|
then :
|
||||||
ipv6type=$i;
|
printf %s "(cached) " >&6
|
||||||
ipv6lib=v6;
|
else $as_nop
|
||||||
ipv6libdir=/usr/local/v6/lib;
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
|
/* end confdefs.h. */
|
||||||
fi
|
#include </usr/local/v6/include/sys/v6config.h>
|
||||||
rm -rf conftest*
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef __V6D__
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"
|
||||||
|
then :
|
||||||
|
ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h=yes
|
||||||
|
else $as_nop
|
||||||
|
ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h" >&5
|
||||||
|
printf "%s\n" "$ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h" >&6; }
|
||||||
|
if test $ac_cv_defined___V6D____usr_local_v6_include_sys_v6config_h != "no"
|
||||||
|
then :
|
||||||
|
ipv6type=$i
|
||||||
|
ipv6lib=v6
|
||||||
|
ipv6libdir=/usr/local/v6/lib
|
||||||
|
BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
zeta)
|
zeta)
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
#include <sys/param.h>
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _ZETA_MINAMI_INET6 defined in sys/param.h" >&5
|
||||||
#ifdef _ZETA_MINAMI_INET6
|
printf %s "checking for _ZETA_MINAMI_INET6 defined in sys/param.h... " >&6; }
|
||||||
yes
|
if test ${ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h+y}
|
||||||
#endif
|
|
||||||
_ACEOF
|
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|
||||||
$EGREP "yes" >/dev/null 2>&1
|
|
||||||
then :
|
then :
|
||||||
ipv6type=$i;
|
printf %s "(cached) " >&6
|
||||||
ipv6lib=inet6;
|
else $as_nop
|
||||||
ipv6libdir=/usr/local/v6/lib
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
fi
|
/* end confdefs.h. */
|
||||||
rm -rf conftest*
|
#include <sys/param.h>
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
|
||||||
|
#ifdef _ZETA_MINAMI_INET6
|
||||||
|
int ok;
|
||||||
|
(void)ok;
|
||||||
|
#else
|
||||||
|
choke me
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"
|
||||||
|
then :
|
||||||
|
ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h=yes
|
||||||
|
else $as_nop
|
||||||
|
ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h" >&5
|
||||||
|
printf "%s\n" "$ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h" >&6; }
|
||||||
|
if test $ac_cv_defined__ZETA_MINAMI_INET6_sys_param_h != "no"
|
||||||
|
then :
|
||||||
|
ipv6type=$i
|
||||||
|
ipv6lib=inet6
|
||||||
|
ipv6libdir=/usr/local/v6/lib
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if test "$ipv6type" != "unknown"; then
|
if test "$ipv6type" != "unknown"; then
|
||||||
|
|
95
configure.ac
95
configure.ac
|
@ -2895,15 +2895,11 @@ AC_CHECK_HEADERS(
|
||||||
#endif
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
# checks for typedefs
|
# Check for clock_t in time.h.
|
||||||
AC_CACHE_CHECK([for clock_t in time.h], [ac_cv_clock_t_time_h], [
|
AC_CHECK_TYPES([clock_t], [],
|
||||||
AC_EGREP_HEADER([clock_t], [time.h], [ac_cv_clock_t_time_h=yes], [ac_cv_clock_t_time_h=no])
|
[AC_DEFINE([clock_t], [long],
|
||||||
])
|
[Define to 'long' if <time.h> does not define clock_t.])],
|
||||||
dnl checks for "no"
|
[@%:@include <time.h>])
|
||||||
AS_VAR_IF([ac_cv_clock_t_time_h], [no], [
|
|
||||||
AC_DEFINE([clock_t], [long],
|
|
||||||
[Define to 'long' if <time.h> doesn't define.])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for makedev], [ac_cv_func_makedev], [
|
AC_CACHE_CHECK([for makedev], [ac_cv_func_makedev], [
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||||
|
@ -4331,13 +4327,9 @@ else
|
||||||
# define _POSIX_THREADS in unistd.h. Some apparently don't
|
# define _POSIX_THREADS in unistd.h. Some apparently don't
|
||||||
# (e.g. gnu pth with pthread emulation)
|
# (e.g. gnu pth with pthread emulation)
|
||||||
AC_MSG_CHECKING([for _POSIX_THREADS in unistd.h])
|
AC_MSG_CHECKING([for _POSIX_THREADS in unistd.h])
|
||||||
AC_EGREP_CPP([yes],
|
AX_CHECK_DEFINE([unistd.h], [_POSIX_THREADS],
|
||||||
[
|
[unistd_defines_pthreads=yes],
|
||||||
#include <unistd.h>
|
[unistd_defines_pthreads=no])
|
||||||
#ifdef _POSIX_THREADS
|
|
||||||
yes
|
|
||||||
#endif
|
|
||||||
], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
|
|
||||||
AC_MSG_RESULT([$unistd_defines_pthreads])
|
AC_MSG_RESULT([$unistd_defines_pthreads])
|
||||||
|
|
||||||
AC_DEFINE([_REENTRANT])
|
AC_DEFINE([_REENTRANT])
|
||||||
|
@ -4517,34 +4509,21 @@ if test "$ipv6" = yes -a "$cross_compiling" = no; then
|
||||||
case $i in
|
case $i in
|
||||||
inria)
|
inria)
|
||||||
dnl http://www.kame.net/
|
dnl http://www.kame.net/
|
||||||
AC_EGREP_CPP([yes], [
|
AX_CHECK_DEFINE([netinet/in.h], [IPV6_INRIA_VERSION], [ipv6type=$i])
|
||||||
#include <netinet/in.h>
|
|
||||||
#ifdef IPV6_INRIA_VERSION
|
|
||||||
yes
|
|
||||||
@%:@endif],
|
|
||||||
[ipv6type=$i])
|
|
||||||
;;
|
;;
|
||||||
kame)
|
kame)
|
||||||
dnl http://www.kame.net/
|
dnl http://www.kame.net/
|
||||||
AC_EGREP_CPP([yes], [
|
AX_CHECK_DEFINE([netinet/in.h], [__KAME__],
|
||||||
#include <netinet/in.h>
|
[ipv6type=$i
|
||||||
#ifdef __KAME__
|
ipv6lib=inet6
|
||||||
yes
|
ipv6libdir=/usr/local/v6/lib
|
||||||
@%:@endif],
|
ipv6trylibc=yes])
|
||||||
[ipv6type=$i;
|
|
||||||
ipv6lib=inet6
|
|
||||||
ipv6libdir=/usr/local/v6/lib
|
|
||||||
ipv6trylibc=yes])
|
|
||||||
;;
|
;;
|
||||||
linux-glibc)
|
linux-glibc)
|
||||||
dnl http://www.v6.linux.or.jp/
|
dnl Advanced IPv6 support was added to glibc 2.1 in 1999.
|
||||||
AC_EGREP_CPP([yes], [
|
AX_CHECK_DEFINE([features.h], [__GLIBC__],
|
||||||
#include <features.h>
|
[ipv6type=$i
|
||||||
#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
|
ipv6trylibc=yes])
|
||||||
yes
|
|
||||||
@%:@endif],
|
|
||||||
[ipv6type=$i;
|
|
||||||
ipv6trylibc=yes])
|
|
||||||
;;
|
;;
|
||||||
linux-inet6)
|
linux-inet6)
|
||||||
dnl http://www.v6.linux.or.jp/
|
dnl http://www.v6.linux.or.jp/
|
||||||
|
@ -4564,35 +4543,23 @@ yes
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
toshiba)
|
toshiba)
|
||||||
AC_EGREP_CPP([yes], [
|
AX_CHECK_DEFINE([sys/param.h], [_TOSHIBA_INET6],
|
||||||
#include <sys/param.h>
|
[ipv6type=$i
|
||||||
#ifdef _TOSHIBA_INET6
|
ipv6lib=inet6
|
||||||
yes
|
ipv6libdir=/usr/local/v6/lib])
|
||||||
@%:@endif],
|
|
||||||
[ipv6type=$i;
|
|
||||||
ipv6lib=inet6;
|
|
||||||
ipv6libdir=/usr/local/v6/lib])
|
|
||||||
;;
|
;;
|
||||||
v6d)
|
v6d)
|
||||||
AC_EGREP_CPP([yes], [
|
AX_CHECK_DEFINE([/usr/local/v6/include/sys/v6config.h], [__V6D__],
|
||||||
#include </usr/local/v6/include/sys/v6config.h>
|
[ipv6type=$i
|
||||||
#ifdef __V6D__
|
ipv6lib=v6
|
||||||
yes
|
ipv6libdir=/usr/local/v6/lib
|
||||||
@%:@endif],
|
BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
|
||||||
[ipv6type=$i;
|
|
||||||
ipv6lib=v6;
|
|
||||||
ipv6libdir=/usr/local/v6/lib;
|
|
||||||
BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
|
|
||||||
;;
|
;;
|
||||||
zeta)
|
zeta)
|
||||||
AC_EGREP_CPP([yes], [
|
AX_CHECK_DEFINE([sys/param.h], [_ZETA_MINAMI_INET6],
|
||||||
#include <sys/param.h>
|
[ipv6type=$i
|
||||||
#ifdef _ZETA_MINAMI_INET6
|
ipv6lib=inet6
|
||||||
yes
|
ipv6libdir=/usr/local/v6/lib])
|
||||||
@%:@endif],
|
|
||||||
[ipv6type=$i;
|
|
||||||
ipv6lib=inet6;
|
|
||||||
ipv6libdir=/usr/local/v6/lib])
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if test "$ipv6type" != "unknown"; then
|
if test "$ipv6type" != "unknown"; then
|
||||||
|
|
|
@ -157,6 +157,9 @@
|
||||||
/* Define to 1 if you have the `clock_settime' function. */
|
/* Define to 1 if you have the `clock_settime' function. */
|
||||||
#undef HAVE_CLOCK_SETTIME
|
#undef HAVE_CLOCK_SETTIME
|
||||||
|
|
||||||
|
/* Define to 1 if the system has the type `clock_t'. */
|
||||||
|
#undef HAVE_CLOCK_T
|
||||||
|
|
||||||
/* Define to 1 if you have the `closefrom' function. */
|
/* Define to 1 if you have the `closefrom' function. */
|
||||||
#undef HAVE_CLOSEFROM
|
#undef HAVE_CLOSEFROM
|
||||||
|
|
||||||
|
@ -1941,7 +1944,7 @@
|
||||||
/* Define on FreeBSD to activate all library features */
|
/* Define on FreeBSD to activate all library features */
|
||||||
#undef __BSD_VISIBLE
|
#undef __BSD_VISIBLE
|
||||||
|
|
||||||
/* Define to 'long' if <time.h> doesn't define. */
|
/* Define to 'long' if <time.h> does not define clock_t. */
|
||||||
#undef clock_t
|
#undef clock_t
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
|
Loading…
Reference in New Issue