diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 481 |
1 files changed, 427 insertions, 54 deletions
diff --git a/configure b/configure index 6dbf5ad31a00..42295d1db3e3 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for bmake 20210201. +# Generated by GNU Autoconf 2.69 for bmake 20211020. # # Report bugs to <sjg@NetBSD.org>. # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='bmake' PACKAGE_TARNAME='bmake' -PACKAGE_VERSION='20210201' -PACKAGE_STRING='bmake 20210201' +PACKAGE_VERSION='20211020' +PACKAGE_STRING='bmake 20211020' PACKAGE_BUGREPORT='sjg@NetBSD.org' PACKAGE_URL='' @@ -622,11 +622,13 @@ ac_includes_default="\ #endif" ac_subst_vars='LTLIBOBJS +UTC_1 _MAKE_VERSION filemon_h use_filemon use_meta diff_u +diff GCC INSTALL default_sys_path @@ -1255,7 +1257,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bmake 20210201 to adapt to many kinds of systems. +\`configure' configures bmake 20211020 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1316,7 +1318,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bmake 20210201:";; + short | recursive ) echo "Configuration of bmake 20211020:";; esac cat <<\_ACEOF @@ -1422,7 +1424,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bmake configure 20210201 +bmake configure 20211020 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1721,6 +1723,82 @@ fi } # ac_fn_c_try_link +# ac_fn_c_find_intX_t LINENO BITS VAR +# ----------------------------------- +# Finds a signed integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_intX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 +$as_echo_n "checking for int$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in int$2_t 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + enum { N = $2 / 2 - 1 }; +int +main () +{ +static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + enum { N = $2 / 2 - 1 }; +int +main () +{ +static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) + < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + case $ac_type in #( + int$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : + +else + break +fi + done +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_find_intX_t + # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -2002,7 +2080,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bmake $as_me 20210201, which was +It was created by bmake $as_me 20211020, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2355,26 +2433,41 @@ ac_config_headers="$ac_config_headers config.h" case "$srcdir" in /*) ;; -*) srcdir=`cd $srcdir && pwd`;; +*) srcdir=`cd $srcdir && 'pwd'`;; esac . $srcdir/VERSION OS=`uname -s` +use_defshell() { + case "$defshell_path$DEFSHELL_INDEX" in + "") ;; + *) return 0;; + esac + case "$1" in + *csh) # we must be desperate + DEFSHELL_INDEX=DEFSHELL_INDEX_CSH;; + *ksh) + DEFSHELL_INDEX=DEFSHELL_INDEX_KSH;; + sh|/bin/sh) + DEFSHELL_INDEX=DEFSHELL_INDEX_SH;; + *) DEFSHELL_INDEX=DEFSHELL_INDEX_CUSTOM + defshell_path=$1 + ;; + esac + case "$1" in + /bin/*) ;; + */*) defshell_path=$1;; + esac +} # Check whether --with-defshell was given. if test "${with_defshell+set}" = set; then : withval=$with_defshell; case "${withval}" in yes) as_fn_error $? "bad value ${withval} given for bmake DEFSHELL" "$LINENO" 5 ;; no) ;; -*) case "$with_defshell" in - sh) DEFSHELL_INDEX=DEFSHELL_INDEX_SH;; # it's the default anyway - ksh) DEFSHELL_INDEX=DEFSHELL_INDEX_KSH;; - csh) DEFSHELL_INDEX=DEFSHELL_INDEX_CSH;; # kidding right? - *) defshell_path=$with_defshell;; # better be sh compatible! - esac - ;; - esac +*) use_defshell $with_defshell;; +esac fi case "$OS" in @@ -2446,6 +2539,37 @@ yes) esac ;; esac +case "$OS" in +Minix) CPPFLAGS="${CPPFLAGS} -D_NETBSD_SOURCE" + test -x /usr/pkg/bin/clang && CC=${CC:-clang} + ;; +SCO_SV) # /bin/sh is not usable + ALT_DEF_SHELLS="/bin/lsh /usr/bin/bash /bin/ksh" + CPPFLAGS="${CPPFLAGS} -DFORCE_USE_SHELL" + ;; +esac +echo $ECHO_N "checking whether system has timezone Europe/Berlin... $ECHO_C" >&6 +if test -f /usr/share/zoneinfo/Europe/Berlin; then + echo yes >&6 + # seems a safe bet + UTC_1=Europe/Berlin +else + utcH=`TZ=UTC date +%H 2> /dev/null` + utc_1H=`TZ=UTC-1 date +%H 2> /dev/null` + if test ${utcH-0} -lt ${utc_1H-0}; then + UTC_1=UTC-1 + echo no, using UTC-1 >&6 + else + echo no >&6 + fi +fi +oldPATH=$PATH +for d in /usr/gnu/bin +do + test -d $d || continue + PATH=$PATH:$d +done +export PATH ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4543,7 +4667,29 @@ if test $bmake_path_max -gt 1024; then bmake_path_max=1024 fi echo "Using: BMAKE_PATH_MAX=$bmake_path_max" >&6 - +if (type cat) > /dev/null 2>&1; then +: which +which() { + type "$@" | sed 's,[()],,g;s,^[^/][^/]*,,;q' +} +fi +case "$CC" in +/*) ;; +*) + for x in $CC + do + _cc=`which $x` + break + done + if test -x ${_cc:-/dev/null}; then + _cc_dir=`dirname $_cc` + case ":$oldPATH:" in + *:$_cc_dir:*) ;; + *) CC=$_cc_dir/$CC;; + esac + fi + ;; +esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : @@ -4803,22 +4949,6 @@ done ac_fn_c_check_header_mongrel "$LINENO" "sys/cdefs.h" "ac_cv_header_sys_cdefs_h" "$ac_includes_default" if test "x$ac_cv_header_sys_cdefs_h" = xyes; then : - echo $ECHO_N "checking whether sys/cdefs.h is compatible... $ECHO_C" >&6 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/cdefs.h> -#ifdef __RCSID -yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - echo yes >&6 -else - echo no >&6; CPPFLAGS="${CPPFLAGS} -I`cd ${srcdir}/missing && pwd` -DNEED_HOST_CDEFS_H" -fi -rm -f conftest* else CPPFLAGS="${CPPFLAGS} -I`cd ${srcdir}/missing && pwd`" @@ -5175,6 +5305,176 @@ $as_echo "#define const /**/" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" +case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF +;; +esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if ${ac_cv_type_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <limits.h> + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif +int +main () +{ +long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_type_long_long_int=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 +$as_echo "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : @@ -5332,9 +5632,9 @@ ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" " " if test "x$ac_cv_type_sig_atomic_t" = xyes; then : -else - -$as_echo "#define sig_atomic_t int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_SIG_ATOMIC_T 1 +_ACEOF fi @@ -5674,7 +5974,6 @@ for ac_func in \ errx \ getcwd \ getenv \ - getopt \ getwd \ killpg \ mmap \ @@ -5682,15 +5981,23 @@ for ac_func in \ select \ setenv \ setpgid \ + setrlimit \ setsid \ - sigaction \ + sigaddset \ + sigpending \ + sigprocmask \ + sigsetmask \ + sigsuspend \ sigvec \ snprintf \ strerror \ + stresep \ strftime \ strsep \ strtod \ strtol \ + strtoll \ + strtoul \ sysctl \ unsetenv \ vsnprintf \ @@ -5712,6 +6019,19 @@ fi done +ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" +if test "x$ac_cv_func_getopt" = xyes; then : + $as_echo "#define HAVE_GETOPT 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" getopt.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getopt.$ac_objext" + ;; +esac + +fi + ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath" if test "x$ac_cv_func_realpath" = xyes; then : $as_echo "#define HAVE_REALPATH 1" >>confdefs.h @@ -5738,6 +6058,19 @@ esac fi +ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" +if test "x$ac_cv_func_sigaction" = xyes; then : + $as_echo "#define HAVE_SIGACTION 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" sigaction.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS sigaction.$ac_objext" + ;; +esac + +fi + ac_fn_c_check_func "$LINENO" "stresep" "ac_cv_func_stresep" if test "x$ac_cv_func_stresep" = xyes; then : $as_echo "#define HAVE_STRESEP 1" >>confdefs.h @@ -6006,13 +6339,19 @@ $as_echo "#define __func__ __FUNCTION__" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo $ECHO_N "checking if diff -u works... $ECHO_C" >&6 -if diff -u /dev/null /dev/null > /dev/null 2>&1; then - diff_u=-u - echo yes >&6 -else - diff_u= - echo no >&6 +if test -x /usr/gnu/bin/diff; then + diff=/usr/gnu/bin/diff + diff_u=-u +else + diff=${diff:-diff} + echo $ECHO_N "checking if $diff -u works... $ECHO_C" >&6 + if $diff -u /dev/null /dev/null > /dev/null 2>&1; then + diff_u=-u + echo yes >&6 + else + diff_u= + echo no >&6 + fi fi echo "checking for MACHINE & MACHINE_ARCH..." >&6 cat > conftest.$ac_ext <<EOF @@ -6140,24 +6479,46 @@ do done mksrc=`echo $mksrc | sed "s,$srcdir,\\\${srcdir},"` echo "Using: MKSRC=$mksrc" 1>&6 -if test -x /usr/xpg4/bin/sh; then - defshell_path=${defshell_path:-/usr/xpg4/bin/sh} -fi -if test -n "$defshell_path"; then +for sh in /usr/xpg4/bin/sh $ALT_DEF_SHELLS +do + test -x $sh || continue + use_defshell $sh + break +done +case "$defshell_path$DEFSHELL_INDEX" in +"") ;; +*DEFSHELL_INDEX_CUSTOM) echo "Using: SHELL=$defshell_path" >&6 cat >>confdefs.h <<_ACEOF #define DEFSHELL_CUSTOM "$defshell_path" _ACEOF -fi -if test -n "$DEFSHELL_INDEX"; then + ;; +/*INDEX*) + echo "Using: SHELL=$DEFSHELL_INDEX ($defshell_path)" | sed 's,DEFSHELL_INDEX_,,' >&6 cat >>confdefs.h <<_ACEOF #define DEFSHELL_INDEX $DEFSHELL_INDEX _ACEOF -fi + +cat >>confdefs.h <<_ACEOF +#define DEFSHELL_PATH "$defshell_path" +_ACEOF + + ;; +*) + echo "Using: SHELL=$DEFSHELL_INDEX" | sed 's,DEFSHELL_INDEX_,,' >&6 + +cat >>confdefs.h <<_ACEOF +#define DEFSHELL_INDEX $DEFSHELL_INDEX +_ACEOF + + ;; +esac + + @@ -6175,6 +6536,18 @@ bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh" if test $use_makefile = yes; then bm_outfiles="makefile $bm_outfiles" fi + +here=`'pwd'` +: srcdir=$srcdir +: here= $here +case "$here" in +$srcdir/obj*) # make sure we put unit-tests/Makefile.config in the right place + obj=`basename $here` + mkdir -p $srcdir/unit-tests/$obj + test -d unit-tests || ln -s ../unit-tests/$obj unit-tests + ;; +esac + ac_config_files="$ac_config_files $bm_outfiles" cat >confcache <<\_ACEOF @@ -6684,7 +7057,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bmake $as_me 20210201, which was +This file was extended by bmake $as_me 20211020, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6746,7 +7119,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -bmake config.status 20210201 +bmake config.status 20211020 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" |