2
0
mirror of git://git.sv.gnu.org/autoconf synced 2025-02-17 14:01:27 +08:00

rework test results printing

This commit is contained in:
David MacKenzie 1994-08-10 16:47:42 +00:00
parent 07cd8b52a8
commit 53b55a54e2
11 changed files with 493 additions and 319 deletions

6
NEWS
View File

@ -16,6 +16,9 @@ Major changes in release 2.0:
* AC_CONFIG_SUBDIRS to recursively configure a source tree. * AC_CONFIG_SUBDIRS to recursively configure a source tree.
* AC_CHECK_TYPE, which checks whether sys/types.h defines a given type. * AC_CHECK_TYPE, which checks whether sys/types.h defines a given type.
* AC_TRY_LINK, which obsoletes AC_COMPILE_CHECK. * AC_TRY_LINK, which obsoletes AC_COMPILE_CHECK.
* AC_MSG_CHECKING and AC_MSG_RESULT to print test results, on a single line,
whether or not the test succeeds. They obsolete AC_CHECKING and AC_VERBOSE.
configure --verbose no longer has any effect.
* AC_PREFIX_PROGRAM, which obsoletes AC_PREFIX. * AC_PREFIX_PROGRAM, which obsoletes AC_PREFIX.
* AC_HEADER_DIRENT, which obsoletes AC_DIR_HEADER. * AC_HEADER_DIRENT, which obsoletes AC_DIR_HEADER.
* AC_ARG_ENABLE and AC_ARG_WITH, which obsolete AC_ENABLE and AC_WITH. * AC_ARG_ENABLE and AC_ARG_WITH, which obsolete AC_ENABLE and AC_WITH.
@ -32,6 +35,9 @@ Major changes in release 2.0:
* AC_OUTPUT and AC_CONFIG_HEADER allow you to override the input-file names. * AC_OUTPUT and AC_CONFIG_HEADER allow you to override the input-file names.
* AC_PROG_INSTALL looks for install.sh in the directory specified by * AC_PROG_INSTALL looks for install.sh in the directory specified by
AC_CONFIG_AUXDIR, or srcdir or srcdir/.. or srcdir/../.. by default. AC_CONFIG_AUXDIR, or srcdir or srcdir/.. or srcdir/../.. by default.
* AC_DEFINE no longer prints anything, because of the new result reporting
mechanism (AC_MSG_CHECKING and AC_MSG_RESULT).
* AC_VERBOSE pays attention to --quiet/--silent, not --verbose.
** New utilities: ** New utilities:
* autoscan to generate a preliminary configure.in for a package by * autoscan to generate a preliminary configure.in for a package by

6
TODO
View File

@ -18,7 +18,7 @@ Required for 2.0:
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
* Fix AC_ARG_{ENABLE,WITH}. * Fix AC_ARG_{ENABLE,WITH} and AC_PATH_X*.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@ -94,7 +94,3 @@ in a dnl comment. (Seems to be hard.)
(CC or PATH) differs. (CC or PATH) differs.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
* Print verbose messages in all cases, whether or not things are found.
------------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@ Install it before installing Autoconf or set the
M4 environment variable to its path name. M4 environment variable to its path name.
)m4exit(2)])dnl )m4exit(2)])dnl
dnl dnl
define(AC_ACVERSION, 1.97)dnl define(AC_ACVERSION, 1.98)dnl
dnl This is defined by the --version option of the autoconf script. dnl This is defined by the --version option of the autoconf script.
ifdef([AC_PRINT_VERSION], [Autoconf version AC_ACVERSION ifdef([AC_PRINT_VERSION], [Autoconf version AC_ACVERSION
m4exit(0)])dnl m4exit(0)])dnl
@ -87,8 +87,7 @@ Configuration:
--cache-file=FILE cache test results in FILE --cache-file=FILE cache test results in FILE
--help print this message --help print this message
--no-create do not create output files --no-create do not create output files
--quiet, --silent do not print \`checking for...' messages --quiet, --silent do not print \`checking...' messages
--verbose print results of checks
--version print the version of autoconf that created configure --version print the version of autoconf that created configure
Directories: Directories:
--exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local]
@ -386,25 +385,19 @@ trap 'rm -fr confdefs* $ac_clean_files' 0
# 1 file creation # 1 file creation
# 2 errors and warnings # 2 errors and warnings
# 3 unused; some systems may open it to /dev/tty # 3 unused; some systems may open it to /dev/tty
# 4 checking for... messages # 4 checking for... messages and results
# 5 test results # 5 compiler messages
# 6 compiler messages
if test "$silent" = yes; then if test "$silent" = yes; then
exec 4>/dev/null exec 4>/dev/null
else else
exec 4>&1 exec 4>&1
fi fi
if test "$verbose" = yes; then exec 5>./config.log
exec 5>&1
else
exec 5>/dev/null
fi
exec 6>./config.log
echo "\ echo "\
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
" 1>&6 " 1>&5
# Save the original args if we used an alternate arg parser. # Save the original args if we used an alternate arg parser.
ac_configure_temp="${configure_args-[$]@}" ac_configure_temp="${configure_args-[$]@}"
@ -585,8 +578,6 @@ changequote(<<, >>)dnl
if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'` prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'`
changequote([, ])dnl changequote([, ])dnl
dnl test -z "$prefix" && prefix=/
AC_MSG_RESULT(setting installation directory prefix to ${prefix})
fi fi
fi fi
undefine(AC_VAR_NAME)dnl undefine(AC_VAR_NAME)dnl
@ -673,7 +664,7 @@ dnl
dnl Subroutines of AC_CANONICAL_SYSTEM. dnl Subroutines of AC_CANONICAL_SYSTEM.
dnl dnl
define(AC_CANONICAL_HOST, define(AC_CANONICAL_HOST,
[AC_MSG_CHECKING(host type) [AC_MSG_CHECKING(host system type)
case "${host_alias}" in case "${host_alias}" in
NONE) NONE)
@ -690,7 +681,7 @@ host=`${ac_config_sub} ${host_alias}`
host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
test -n "$host" && AC_MSG_RESULT(setting host to $host) AC_MSG_RESULT($host)
AC_SUBST(host)dnl AC_SUBST(host)dnl
AC_SUBST(host_alias)dnl AC_SUBST(host_alias)dnl
AC_SUBST(host_cpu)dnl AC_SUBST(host_cpu)dnl
@ -699,7 +690,7 @@ AC_SUBST(host_os)dnl
])dnl ])dnl
dnl dnl
define(AC_CANONICAL_TARGET, define(AC_CANONICAL_TARGET,
[AC_MSG_CHECKING(target type) [AC_MSG_CHECKING(target system type)
case "${target_alias}" in case "${target_alias}" in
NONE) NONE)
@ -713,7 +704,7 @@ target=`${ac_config_sub} ${target_alias}`
target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
test -n "$target" && AC_MSG_RESULT(setting target to $target) AC_MSG_RESULT($target)
AC_SUBST(target)dnl AC_SUBST(target)dnl
AC_SUBST(target_alias)dnl AC_SUBST(target_alias)dnl
AC_SUBST(target_cpu)dnl AC_SUBST(target_cpu)dnl
@ -722,7 +713,7 @@ AC_SUBST(target_os)dnl
])dnl ])dnl
dnl dnl
define(AC_CANONICAL_BUILD, define(AC_CANONICAL_BUILD,
[AC_MSG_CHECKING(build type) [AC_MSG_CHECKING(build system type)
case "${build_alias}" in case "${build_alias}" in
NONE) build= build_alias= ;; NONE) build= build_alias= ;;
@ -733,7 +724,7 @@ build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
;; ;;
esac esac
test -n "$build" && AC_MSG_RESULT(setting build to $build) AC_MSG_RESULT($build)
AC_SUBST(build)dnl AC_SUBST(build)dnl
AC_SUBST(build_alias)dnl AC_SUBST(build_alias)dnl
AC_SUBST(build_cpu)dnl AC_SUBST(build_cpu)dnl
@ -807,13 +798,12 @@ dnl
dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved. dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
define(AC_CACHE_VAL, define(AC_CACHE_VAL,
[dnl We used to use the below line, but it fails if the 1st arg is a [AC_REQUIRE([AC_MSG_ECHO_N])dnl
dnl We used to use the below line, but it fails if the 1st arg is a
dnl shell variable, so we need the eval. dnl shell variable, so we need the eval.
dnl if test "${$1+set}" = set; then dnl if test "${$1+set}" = set; then
if eval "test \"`echo '${'$1'+set}'`\" = set"; then if eval "test \"`echo '${'$1'+set}'`\" = set"; then
dnl This verbose message is just for testing the caching code. echo $ac_n "(cached) $ac_c" 1>&4
dnl AC_MSG_RESULT(using cached value for $1)
AC_MSG_RESULT(using cached value)
else else
$2 $2
fi fi
@ -872,10 +862,8 @@ define(AC_DEFINE, [
dnl Uniformly use AC_DEFINE_[SED]QUOTE, so callers of AC_DEFINE_UNQUOTED dnl Uniformly use AC_DEFINE_[SED]QUOTE, so callers of AC_DEFINE_UNQUOTED
dnl can use AC_QUOTE_* manually if they want to. dnl can use AC_QUOTE_* manually if they want to.
ifelse($#, 2, ifelse($#, 2,
[define([AC_VAL], $2)dnl [define([AC_VAL], $2)dnl],
echo 1>&5 " defining" $1 to be ifelse(AC_VAL, , empty, "AC_QUOTE_SQUOTE(AC_VAL)")], [define([AC_VAL], 1)dnl])
[define([AC_VAL], 1)dnl
echo 1>&5 " defining $1"])
dnl dnl
echo "[#][define]" $1 "AC_QUOTE_SQUOTE(AC_VAL)" >> confdefs.h echo "[#][define]" $1 "AC_QUOTE_SQUOTE(AC_VAL)" >> confdefs.h
dnl Define DEFS even if AC_LIST_HEADERS for use in user case statements. dnl Define DEFS even if AC_LIST_HEADERS for use in user case statements.
@ -922,10 +910,10 @@ dnl
dnl AC_SUBST_FILE(VARIABLE, FILE) dnl AC_SUBST_FILE(VARIABLE, FILE)
define(AC_SUBST_FILE, define(AC_SUBST_FILE,
[if test -f $2; then [if test -f $2; then
AC_MSG_RESULT(using $2 for $1) echo using $2 for $1)
AC_INSERT_FILE($1, $2) AC_INSERT_FILE($1, $2)
elif test -f ${srcdir}/$2; then elif test -f ${srcdir}/$2; then
AC_MSG_RESULT(using ${srcdir}/$2 for $1) echo using ${srcdir}/$2 for $1)
AC_INSERT_FILE($1, ${srcdir}/$2) AC_INSERT_FILE($1, ${srcdir}/$2)
fi fi
])dnl ])dnl
@ -944,13 +932,40 @@ dnl
dnl ### Printing messages dnl ### Printing messages
dnl dnl
dnl dnl
dnl Check whether to use -n, \c, or newline-tab to separate
dnl checking messages from result messages.
define(AC_MSG_ECHO_N,
[AC_PROVIDE([$0])dnl
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
if (echo -n testing; echo 1,2,3) | grep -e -n > /dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi])dnl
dnl
dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION) dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
define(AC_MSG_CHECKING, define(AC_MSG_CHECKING,
[echo "checking $1" 1>&4])dnl [AC_REQUIRE([AC_MSG_ECHO_N])dnl
echo $ac_n "checking $1""...$ac_c" 1>&4])dnl
dnl
dnl Obsolete version.
define(AC_CHECKING,
[AC_OBSOLETE([$0], [; instead use AC_MSG_CHECKING])dnl
echo "checking $1" 1>&4])dnl
dnl dnl
dnl AC_MSG_RESULT(RESULT-DESCRIPTION) dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
define(AC_MSG_RESULT, define(AC_MSG_RESULT,
[echo " $1" 1>&5])dnl [AC_REQUIRE([AC_MSG_ECHO_N])dnl
echo "$ac_t""$1" 1>&4])dnl
dnl
dnl Obsolete version.
define(AC_VERBOSE,
[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
echo " $1" 1>&4])dnl
dnl dnl
dnl AC_MSG_WARN(PROBLEM-DESCRIPTION) dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
define(AC_MSG_WARN, define(AC_MSG_WARN,
@ -970,7 +985,7 @@ AC_PROVIDE([$0])dnl
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='${CPP}' ac_cpp='${CPP}'
ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&6 2>&6' ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&5 2>&5'
])dnl ])dnl
dnl dnl
define(AC_LANG_CPLUSPLUS, define(AC_LANG_CPLUSPLUS,
@ -979,7 +994,7 @@ AC_PROVIDE([$0])dnl
ac_ext=C ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='${CXXCPP}' ac_cpp='${CXXCPP}'
ac_compile='${CXX-gcc} $CXXFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&6 2>&6' ac_compile='${CXX-gcc} $CXXFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&5 2>&5'
])dnl ])dnl
dnl dnl
dnl Push the current language on a stack. dnl Push the current language on a stack.
@ -1041,7 +1056,7 @@ ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
])dnl ])dnl
fi])dnl fi])dnl
$1="$ac_cv_prog_$1" $1="$ac_cv_prog_$1"
test -n "[$]$1" && AC_MSG_RESULT(setting $1 to [$]$1) test -n "[$]$1" && AC_MSG_RESULT([$]$1)
AC_SUBST($1)dnl AC_SUBST($1)dnl
])dnl ])dnl
dnl dnl
@ -1072,7 +1087,7 @@ ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
;; ;;
esac])dnl esac])dnl
$1="$ac_cv_path_$1" $1="$ac_cv_path_$1"
test -n "[$]$1" && AC_MSG_RESULT(setting $1 to [$]$1) test -n "[$]$1" && AC_MSG_RESULT([$]$1)
AC_SUBST($1)dnl AC_SUBST($1)dnl
])dnl ])dnl
dnl dnl
@ -1115,6 +1130,7 @@ LIBS="${LIBS} -l[]AC_LIB_NAME[] $4"
AC_TRY_LINK( , [main();], AC_CV_NAME=yes, AC_CV_NAME=no)dnl AC_TRY_LINK( , [main();], AC_CV_NAME=yes, AC_CV_NAME=no)dnl
LIBS="${ac_save_LIBS}" LIBS="${ac_save_LIBS}"
])dnl ])dnl
AC_MSG_RESULT($AC_CV_NAME)
if test "${AC_CV_NAME}" = yes; then if test "${AC_CV_NAME}" = yes; then
ifelse([$2], , ifelse([$2], ,
[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z])) [AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
@ -1167,7 +1183,7 @@ define(AC_COMPILE_CHECK,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
dnl It's actually ok to use this, if you don't care about caching. dnl It's actually ok to use this, if you don't care about caching.
dnl AC_OBSOLETE([$0], [; instead use AC_TRY_LINK])dnl dnl AC_OBSOLETE([$0], [; instead use AC_TRY_LINK])dnl
ifelse([$1], , , [AC_MSG_CHECKING([for $1]) ifelse([$1], , , [AC_CHECKING([for $1])
])dnl ])dnl
AC_TRY_LINK([$2], [$3], [$4], [$5])dnl AC_TRY_LINK([$2], [$3], [$4], [$5])dnl
])dnl ])dnl
@ -1200,10 +1216,10 @@ dnl AC_TRY_RUN(PROGRAM, ACTION-IF-TRUE [, ACTION-IF-FALSE
dnl [, ACTION-IF-CROSS-COMPILING]]) dnl [, ACTION-IF-CROSS-COMPILING]])
define(AC_TRY_RUN, define(AC_TRY_RUN,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
AC_REQUIRE([AC_TRY_CROSS])dnl AC_REQUIRE([AC_C_CROSS])dnl
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
ifelse([$4], , AC_MSG_ERROR(can not run test program while cross compiling), ifelse([$4], , AC_MSG_ERROR(can not run test program while cross compiling),
[AC_MSG_RESULT(using default for cross-compiling) [AC_MSG_WARN(using default for cross-compiling)
$4 $4
]) ])
else else
@ -1254,9 +1270,11 @@ AC_CACHE_VAL(ac_cv_header_$ac_var,
[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_var=yes", [AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_var=yes",
eval "ac_cv_header_$ac_var=no")])dnl eval "ac_cv_header_$ac_var=no")])dnl
if eval "test \"`echo '$ac_cv_header_'$ac_var`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_var`\" = yes"; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2]) ifelse([$2], , :, [$2])
ifelse([$3], , , [else else
$3 AC_MSG_RESULT(no)
ifelse([$3], , , [$3
])dnl ])dnl
fi fi
])dnl ])dnl
@ -1278,9 +1296,11 @@ extern char $1(); $1();
#endif #endif
], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])dnl ], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])dnl
if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2]) ifelse([$2], , :, [$2])
ifelse([$3], , , [else else
$3 AC_MSG_RESULT(no)
ifelse([$3], , , [$3
])dnl ])dnl
fi fi
])dnl ])dnl
@ -1312,10 +1332,7 @@ dnl AC_REPLACE_FUNCS(FUNCTION-NAME...)
define(AC_REPLACE_FUNCS, define(AC_REPLACE_FUNCS,
[for ac_func in $1 [for ac_func in $1
do do
AC_CHECK_FUNC(${ac_func}, , AC_CHECK_FUNC(${ac_func}, , [LIBOBJS="$LIBOBJS ${ac_func}.o"])
[LIBOBJS="$LIBOBJS ${ac_func}.o"
AC_MSG_RESULT(using ${ac_func}.o instead)
])dnl
done done
AC_SUBST(LIBOBJS)dnl AC_SUBST(LIBOBJS)dnl
])dnl ])dnl
@ -1338,6 +1355,7 @@ main()
fprintf(f, "%d\n", sizeof($1)); fprintf(f, "%d\n", sizeof($1));
exit(0); exit(0);
}], AC_CV_NAME=`cat conftestval`)])dnl }], AC_CV_NAME=`cat conftestval`)])dnl
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
undefine(AC_TYPE_NAME)dnl undefine(AC_TYPE_NAME)dnl
undefine(AC_CV_NAME)dnl undefine(AC_CV_NAME)dnl
@ -1348,6 +1366,7 @@ define(AC_CHECK_TYPE,
[AC_MSG_CHECKING(for $1 in sys/types.h) [AC_MSG_CHECKING(for $1 in sys/types.h)
AC_CACHE_VAL(ac_cv_type_$1, AC_CACHE_VAL(ac_cv_type_$1,
[AC_EGREP_HEADER($1, sys/types.h, ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl [AC_EGREP_HEADER($1, sys/types.h, ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
AC_MSG_RESULT($ac_cv_type_$1)
if test $ac_cv_type_$1 = no; then if test $ac_cv_type_$1 = no; then
AC_DEFINE($1, $2) AC_DEFINE($1, $2)
fi fi
@ -1417,6 +1436,9 @@ dnl so uname gets run too.
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# #
[#] [$]0 [$]configure_args [#] [$]0 [$]configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
changequote(, )dnl changequote(, )dnl
ac_cs_usage="Usage: ${CONFIG_STATUS} [--recheck] [--version] [--help]" ac_cs_usage="Usage: ${CONFIG_STATUS} [--recheck] [--version] [--help]"
@ -1755,7 +1777,7 @@ changequote([, ])dnl
# The recursion is here. # The recursion is here.
if test -n "${ac_sub_configure}"; then if test -n "${ac_sub_configure}"; then
AC_MSG_RESULT([running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file] --srcdir=${ac_sub_srcdir}) echo "[running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file] --srcdir=${ac_sub_srcdir}"
if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir} if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}
then : then :
else else

View File

@ -29,18 +29,19 @@ define(AC_PROG_CC,
AC_PROVIDE([$0])dnl AC_PROVIDE([$0])dnl
AC_CHECK_PROG(CC, gcc, gcc, cc) AC_CHECK_PROG(CC, gcc, gcc, cc)
# Find out if we are using GNU C, under whatever name. AC_MSG_CHECKING(whether we are using GNU C)
AC_CACHE_VAL(ac_cv_prog_gcc, AC_CACHE_VAL(ac_cv_prog_gcc,
[cat > conftest.c <<EOF [cat > conftest.c <<EOF
#ifdef __GNUC__ #ifdef __GNUC__
yes yes
#endif #endif
EOF EOF
if ${CC-cc} -E conftest.c 2>&6 | egrep yes >/dev/null 2>&1; then if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_prog_gcc)
if test $ac_cv_prog_gcc = yes; then GCC=yes; else GCC= ; fi if test $ac_cv_prog_gcc = yes; then GCC=yes; else GCC= ; fi
])dnl ])dnl
dnl dnl
@ -56,7 +57,7 @@ AC_CACHE_VAL(ac_cv_prog_gxx,
yes yes
#endif #endif
EOF EOF
if ${CXX-gcc} -E conftest.C 2>&6 | egrep yes >/dev/null 2>&1; then if ${CXX-gcc} -E conftest.C 2>&5 | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes ac_cv_prog_gxx=yes
else else
ac_cv_prog_gxx=no ac_cv_prog_gxx=no
@ -81,9 +82,9 @@ Autoconf TIOCGETP'
Autoconf TCGETA' Autoconf TCGETA'
AC_EGREP_CPP($ac_pattern, $ac_prog, ac_cv_prog_gcc_traditional=yes) AC_EGREP_CPP($ac_pattern, $ac_prog, ac_cv_prog_gcc_traditional=yes)
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_prog_gcc_traditional)
if test $ac_cv_prog_gcc_traditional = yes; then if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional" CC="$CC -traditional"
AC_MSG_RESULT(setting CC to $CC)
fi fi
fi fi
])dnl ])dnl
@ -101,15 +102,15 @@ echo 'foo(){}' > conftest.c
# Make sure it works both with $CC and with simple cc. # Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an # We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one. # existing .o file with -o, though they will create one.
if ${CC-cc} -c conftest.c -o conftest.o 1>&6 2>&6 && if ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5 &&
test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o 1>&6 2>&6 test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5
then then
if test "x$CC" != xcc; then if test "x$CC" != xcc; then
# Test first that cc exists at all. # Test first that cc exists at all.
if cc -c conftest.c 1>&6 2>&6 if cc -c conftest.c 1>&5 2>&5
then then
if cc -c conftest.c -o conftest2.o 1>&6 2>&6 && if cc -c conftest.c -o conftest2.o 1>&5 2>&5 &&
test -f conftest2.o && cc -c conftest.c -o conftest2.o 1>&6 2>&6 test -f conftest2.o && cc -c conftest.c -o conftest2.o 1>&5 2>&5
then then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes eval ac_cv_prog_cc_${ac_cc}_c_o=yes
fi fi
@ -118,7 +119,10 @@ then
fi fi
rm -f conftest* rm -f conftest*
])dnl ])dnl
if test $ac_cv_prog_cc_${ac_cc}_c_o = no; then if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_DEFINE(NO_MINUS_C_MINUS_O) AC_DEFINE(NO_MINUS_C_MINUS_O)
fi fi
])dnl ])dnl
@ -128,7 +132,7 @@ define(AC_PROG_MAKE_SET,
[AC_MSG_CHECKING(whether ${MAKE-make} sets \$MAKE) [AC_MSG_CHECKING(whether ${MAKE-make} sets \$MAKE)
set dummy ${MAKE-make}; ac_make=[$]2 set dummy ${MAKE-make}; ac_make=[$]2
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
[cat > conftestmake <<'EOF' [cat > conftestmake <<\EOF
all: all:
@echo 'ac_maketemp="${MAKE}"' @echo 'ac_maketemp="${MAKE}"'
EOF EOF
@ -142,11 +146,12 @@ else
eval ac_cv_prog_make_${ac_make}_set=no eval ac_cv_prog_make_${ac_make}_set=no
fi fi
rm -f conftestmake])dnl rm -f conftestmake])dnl
if test $ac_cv_prog_make_${ac_make}_set = yes; then if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
AC_MSG_RESULT(yes)
SET_MAKE= SET_MAKE=
else else
AC_MSG_RESULT(no)
SET_MAKE="MAKE=${MAKE-make}" SET_MAKE="MAKE=${MAKE-make}"
AC_MSG_RESULT(setting MAKE to ${MAKE-make} in Makefiles)
fi fi
AC_SUBST([SET_MAKE])dnl AC_SUBST([SET_MAKE])dnl
])dnl ])dnl
@ -175,7 +180,7 @@ Syntax Error], , CPP=/lib/cpp))
ac_cv_prog_CPP="$CPP"])dnl ac_cv_prog_CPP="$CPP"])dnl
fi fi
CPP="$ac_cv_prog_CPP" CPP="$ac_cv_prog_CPP"
AC_MSG_RESULT(setting CPP to $CPP) AC_MSG_RESULT($CPP)
AC_SUBST(CPP)dnl AC_SUBST(CPP)dnl
])dnl ])dnl
dnl dnl
@ -192,7 +197,7 @@ AC_LANG_CPLUSPLUS[]dnl
AC_LANG_RESTORE[]dnl AC_LANG_RESTORE[]dnl
fi])dnl fi])dnl
CXXCPP="$ac_cv_prog_CXXCPP" CXXCPP="$ac_cv_prog_CXXCPP"
AC_MSG_RESULT(setting CXXCPP to $CXXCPP) AC_MSG_RESULT($CXXCPP)
AC_SUBST(CXXCPP)dnl AC_SUBST(CXXCPP)dnl
])dnl ])dnl
dnl dnl
@ -204,6 +209,7 @@ dnl
define(AC_PROG_LEX, define(AC_PROG_LEX,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
AC_CHECK_PROG(LEX, flex, flex, lex) AC_CHECK_PROG(LEX, flex, flex, lex)
AC_MSG_CHECKING(for $LEX library)
if test -z "$LEXLIB" if test -z "$LEXLIB"
then then
case "$LEX" in case "$LEX" in
@ -211,7 +217,7 @@ then
*) LEXLIB="-ll" ;; *) LEXLIB="-ll" ;;
esac esac
fi fi
AC_MSG_RESULT(setting LEXLIB to $LEXLIB) AC_MSG_RESULT($LEXLIB)
AC_SUBST(LEXLIB)])dnl AC_SUBST(LEXLIB)])dnl
dnl dnl
define(AC_DECL_YYTEXT, define(AC_DECL_YYTEXT,
@ -241,6 +247,7 @@ LIBS="$LIBS $LEXLIB"
AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, ac_cv_prog_lex_yytext_pointer=yes) AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, ac_cv_prog_lex_yytext_pointer=yes)
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
rm -f "${LEX_OUTPUT_ROOT}.c"])dnl rm -f "${LEX_OUTPUT_ROOT}.c"])dnl
AC_MSG_RESULT($ac_cv_prog_lex_yytext_pointer)
if test $ac_cv_prog_lex_yytext_pointer = yes; then if test $ac_cv_prog_lex_yytext_pointer = yes; then
AC_DEFINE(YYTEXT_POINTER) AC_DEFINE(YYTEXT_POINTER)
fi fi
@ -295,18 +302,16 @@ AC_CACHE_VAL(ac_cv_path_install,
test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"])dnl test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"])dnl
INSTALL="$ac_cv_path_install" INSTALL="$ac_cv_path_install"
fi fi
AC_MSG_RESULT($INSTALL)
AC_SUBST(INSTALL)dnl AC_SUBST(INSTALL)dnl
AC_MSG_RESULT(setting INSTALL to $INSTALL)
# Use test -z because SunOS4 sh mishandles braces in ${var-val}. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution. # It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
AC_SUBST(INSTALL_PROGRAM)dnl AC_SUBST(INSTALL_PROGRAM)dnl
AC_MSG_RESULT(setting INSTALL_PROGRAM to $INSTALL_PROGRAM)
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
AC_SUBST(INSTALL_DATA)dnl AC_SUBST(INSTALL_DATA)dnl
AC_MSG_RESULT(setting INSTALL_DATA to $INSTALL_DATA)
])dnl ])dnl
dnl dnl
define(AC_PROG_LN_S, define(AC_PROG_LN_S,
@ -322,9 +327,9 @@ else
fi])dnl fi])dnl
LN_S="$ac_cv_prog_LN_S" LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then if test "$ac_cv_prog_LN_S" = "ln -s"; then
AC_MSG_RESULT(ln -s is supported) AC_MSG_RESULT(yes)
else else
AC_MSG_RESULT(ln -s is not supported) AC_MSG_RESULT(no)
fi fi
AC_SUBST(LN_S)dnl AC_SUBST(LN_S)dnl
])dnl ])dnl
@ -332,7 +337,7 @@ dnl
define(AC_PROG_RSH, define(AC_PROG_RSH,
[AC_MSG_CHECKING(for remote shell) [AC_MSG_CHECKING(for remote shell)
AC_CACHE_VAL(ac_cv_path_RSH, AC_CACHE_VAL(ac_cv_path_RSH,
[ac_cv_path_RSH=true [ac_cv_path_RSH=no
for ac_file in \ for ac_file in \
/usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh /usr/bin/nsh /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh /usr/bin/nsh
do do
@ -342,11 +347,10 @@ do
fi fi
done])dnl done])dnl
RSH="$ac_cv_path_RSH" RSH="$ac_cv_path_RSH"
AC_MSG_RESULT($RSH)
if test $RSH != true; then if test $RSH != true; then
AC_MSG_RESULT(found remote shell $RSH)
RTAPELIB=rtapelib.o RTAPELIB=rtapelib.o
else else
AC_MSG_RESULT(found no remote shell)
AC_CHECK_HEADER(netdb.h, [RTAPELIB=rtapelib.o AC_DEFINE(HAVE_NETDB_H)], AC_CHECK_HEADER(netdb.h, [RTAPELIB=rtapelib.o AC_DEFINE(HAVE_NETDB_H)],
[RTAPELIB= AC_DEFINE(NO_REMOTE)]) [RTAPELIB= AC_DEFINE(NO_REMOTE)])
fi fi
@ -388,6 +392,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
], , ac_stdc_headers=no) ], , ac_stdc_headers=no)
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_header_stdc)
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
AC_DEFINE(STDC_HEADERS) AC_DEFINE(STDC_HEADERS)
fi])dnl fi])dnl
@ -401,16 +406,19 @@ define(AC_USG,
[; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl
AC_MSG_CHECKING([for BSD string and memory functions]) AC_MSG_CHECKING([for BSD string and memory functions])
AC_TRY_LINK([#include <strings.h>], [rindex(0, 0); bzero(0, 0);], , AC_TRY_LINK([#include <strings.h>], [rindex(0, 0); bzero(0, 0);], ,
AC_DEFINE(USG))])dnl [AC_MSG_RESULT(yes); AC_DEFINE(USG)], [AC_MSG_RESULT(no)])])dnl
dnl dnl
dnl dnl
dnl If memchr and the like aren't declared in <string.h>, include <memory.h>. dnl If memchr and the like aren't declared in <string.h>, include <memory.h>.
dnl To avoid problems, don't check for gcc2 built-ins. dnl To avoid problems, don't check for gcc2 built-ins.
define(AC_MEMORY_H, define(AC_MEMORY_H,
[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])AC_MSG_CHECKING(whether string.h declares mem functions) [AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])dnl
AC_EGREP_HEADER(memchr, string.h, , AC_MSG_CHECKING(whether string.h declares mem functions)
[AC_CHECK_HEADER(memory.h, AC_DEFINE(NEED_MEMORY_H))])] AC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no)
)dnl AC_MSG_RESULT($ac_found)
if test $ac_found = no; then
AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)])
fi])dnl
dnl dnl
define(AC_HEADER_MAJOR, define(AC_HEADER_MAJOR,
[AC_MSG_CHECKING([for major, minor and makedev header]) [AC_MSG_CHECKING([for major, minor and makedev header])
@ -423,6 +431,7 @@ fi
if test $ac_cv_header_major = no; then if test $ac_cv_header_major = no; then
AC_CHECK_HEADER(sys/sysmacros.h, ac_cv_header_major=sys/sysmacros.h) AC_CHECK_HEADER(sys/sysmacros.h, ac_cv_header_major=sys/sysmacros.h)
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_header_major)
case "$ac_cv_header_major" in case "$ac_cv_header_major" in
sys/mkdev.h) AC_DEFINE(MAJOR_IN_MKDEV) ;; sys/mkdev.h) AC_DEFINE(MAJOR_IN_MKDEV) ;;
sys/sysmacros.h) AC_DEFINE(MAJOR_IN_SYSMACROS) ;; sys/sysmacros.h) AC_DEFINE(MAJOR_IN_SYSMACROS) ;;
@ -441,6 +450,7 @@ AC_TRY_LINK([#include <sys/types.h>
#include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break) #include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break)
done])dnl done])dnl
AC_MSG_RESULT($ac_cv_header_dir)
case "$ac_cv_header_dir" in case "$ac_cv_header_dir" in
dirent.h) AC_DEFINE(HAVE_DIRENT_H) ;; dirent.h) AC_DEFINE(HAVE_DIRENT_H) ;;
sys/ndir.h) AC_DEFINE(HAVE_SYS_NDIR_H) ;; sys/ndir.h) AC_DEFINE(HAVE_SYS_NDIR_H) ;;
@ -448,12 +458,13 @@ sys/dir.h) AC_DEFINE(HAVE_SYS_DIR_H) ;;
ndir.h) AC_DEFINE(HAVE_NDIR_H) ;; ndir.h) AC_DEFINE(HAVE_NDIR_H) ;;
esac esac
AC_MSG_CHECKING(for closedir return value) AC_MSG_CHECKING(whether closedir returns void)
AC_CACHE_VAL(ac_cv_func_closedir_void, AC_CACHE_VAL(ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h> [AC_TRY_RUN([#include <sys/types.h>
#include <$ac_cv_header_dir> #include <$ac_cv_header_dir>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }], int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl
AC_MSG_RESULT($ac_cv_func_closedir_void)
if test $ac_cv_func_closedir_void = yes; then if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(CLOSEDIR_VOID) AC_DEFINE(CLOSEDIR_VOID)
fi fi
@ -471,6 +482,7 @@ AC_TRY_LINK([#include <sys/types.h>
#include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break) #include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break)
done])dnl done])dnl
AC_MSG_RESULT($ac_cv_header_dir)
case "$ac_cv_header_dir" in case "$ac_cv_header_dir" in
dirent.h) AC_DEFINE(DIRENT) ;; dirent.h) AC_DEFINE(DIRENT) ;;
sys/ndir.h) AC_DEFINE(SYSNDIR) ;; sys/ndir.h) AC_DEFINE(SYSNDIR) ;;
@ -478,12 +490,13 @@ sys/dir.h) AC_DEFINE(SYSDIR) ;;
ndir.h) AC_DEFINE(NDIR) ;; ndir.h) AC_DEFINE(NDIR) ;;
esac esac
AC_MSG_CHECKING(for closedir return value) AC_MSG_CHECKING(whether closedir returns void)
AC_CACHE_VAL(ac_cv_func_closedir_void, AC_CACHE_VAL(ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h> [AC_TRY_RUN([#include <sys/types.h>
#include <$ac_cv_header_dir> #include <$ac_cv_header_dir>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }], int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl
AC_MSG_RESULT($ac_cv_func_closedir_void)
if test $ac_cv_func_closedir_void = yes; then if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(VOID_CLOSEDIR) AC_DEFINE(VOID_CLOSEDIR)
fi fi
@ -515,6 +528,7 @@ You lose.
#endif #endif
#endif /* S_ISSOCK */ #endif /* S_ISSOCK */
], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])dnl ], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])dnl
AC_MSG_RESULT($ac_cv_header_stat_broken)
if test $ac_cv_header_stat_broken = yes; then if test $ac_cv_header_stat_broken = yes; then
AC_DEFINE(STAT_MACROS_BROKEN) AC_DEFINE(STAT_MACROS_BROKEN)
fi fi
@ -530,6 +544,7 @@ AC_CACHE_VAL(ac_cv_decl_sys_siglist,
#include <unistd.h> #include <unistd.h>
#endif], [char *msg = *(sys_siglist + 1);], #endif], [char *msg = *(sys_siglist + 1);],
ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])dnl ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])dnl
AC_MSG_RESULT($ac_cv_decl_sys_siglist)
if test $ac_cv_decl_sys_siglist = yes; then if test $ac_cv_decl_sys_siglist = yes; then
AC_DEFINE(SYS_SIGLIST_DECLARED) AC_DEFINE(SYS_SIGLIST_DECLARED)
fi fi
@ -541,7 +556,7 @@ dnl
dnl dnl
define(AC_TYPE_GETGROUPS, define(AC_TYPE_GETGROUPS,
[AC_REQUIRE([AC_TYPE_UID_T])dnl [AC_REQUIRE([AC_TYPE_UID_T])dnl
AC_MSG_CHECKING(for type of array argument to getgroups) AC_MSG_CHECKING(type of array argument to getgroups)
AC_CACHE_VAL(ac_cv_type_getgroups, AC_CACHE_VAL(ac_cv_type_getgroups,
[changequote(, )dnl [changequote(, )dnl
dnl Do not put single quotes in the C program text! dnl Do not put single quotes in the C program text!
@ -568,6 +583,7 @@ main()
changequote([, ])dnl changequote([, ])dnl
AC_TRY_RUN([$ac_prog], AC_TRY_RUN([$ac_prog],
ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)])dnl ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)])dnl
AC_MSG_RESULT($ac_cv_type_getgroups)
AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups) AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
])dnl ])dnl
dnl dnl
@ -577,6 +593,7 @@ AC_MSG_CHECKING(for uid_t in sys/types.h)
AC_CACHE_VAL(ac_cv_type_uid_t, AC_CACHE_VAL(ac_cv_type_uid_t,
[AC_EGREP_HEADER(uid_t, sys/types.h, [AC_EGREP_HEADER(uid_t, sys/types.h,
ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])dnl ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])dnl
AC_MSG_RESULT($ac_cv_type_uid_t)
if test $ac_cv_type_uid_t = no; then if test $ac_cv_type_uid_t = no; then
AC_DEFINE(uid_t, int) AC_DEFINE(uid_t, int)
AC_DEFINE(gid_t, int) AC_DEFINE(gid_t, int)
@ -605,6 +622,7 @@ AC_CACHE_VAL(ac_cv_type_signal,
#endif #endif
extern void (*signal ()) ();], extern void (*signal ()) ();],
[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])dnl [int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])dnl
AC_MSG_RESULT($ac_cv_type_signal)
AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal) AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal)
])dnl ])dnl
dnl dnl
@ -682,6 +700,7 @@ main()
exit(0); exit(0);
} }
], ac_cv_func_mmap=yes, ac_cv_func_mmap=no)])dnl ], ac_cv_func_mmap=yes, ac_cv_func_mmap=no)])dnl
AC_MSG_RESULT($ac_cv_func_mmap)
if test $ac_cv_func_mmap = yes; then if test $ac_cv_func_mmap = yes; then
AC_DEFINE(HAVE_MMAP) AC_DEFINE(HAVE_MMAP)
fi fi
@ -800,6 +819,7 @@ main() {
); );
} }
}], ac_cv_func_vfork=yes, ac_cv_func_vfork=no)])dnl }], ac_cv_func_vfork=yes, ac_cv_func_vfork=no)])dnl
AC_MSG_RESULT($ac_cv_func_vfork)
if test $ac_cv_func_vfork = no; then if test $ac_cv_func_vfork = no; then
AC_DEFINE(vfork, fork) AC_DEFINE(vfork, fork)
fi fi
@ -835,6 +855,7 @@ main() {
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
} }
}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no)])dnl }], ac_cv_func_wait3=yes, ac_cv_func_wait3=no)])dnl
AC_MSG_RESULT($ac_cv_func_wait3)
if test $ac_cv_func_wait3 = yes; then if test $ac_cv_func_wait3 = yes; then
AC_DEFINE(HAVE_WAIT3) AC_DEFINE(HAVE_WAIT3)
fi fi
@ -847,6 +868,7 @@ AC_MSG_CHECKING([for working alloca.h])
AC_CACHE_VAL(ac_cv_header_alloca_h, AC_CACHE_VAL(ac_cv_header_alloca_h,
[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));], [AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])dnl ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])dnl
AC_MSG_RESULT($ac_cv_header_alloca_h)
if test $ac_cv_header_alloca_h = yes; then if test $ac_cv_header_alloca_h = yes; then
AC_DEFINE(HAVE_ALLOCA_H) AC_DEFINE(HAVE_ALLOCA_H)
fi fi
@ -870,6 +892,7 @@ char *alloca ();
#endif #endif
], [char *p = (char *) alloca(1);], ], [char *p = (char *) alloca(1);],
ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])dnl ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])dnl
AC_MSG_RESULT($ac_cv_func_alloca)
if test $ac_cv_func_alloca = yes; then if test $ac_cv_func_alloca = yes; then
AC_DEFINE(HAVE_ALLOCA) AC_DEFINE(HAVE_ALLOCA)
fi fi
@ -882,17 +905,21 @@ if test $ac_cv_func_alloca = no; then
ALLOCA=alloca.o ALLOCA=alloca.o
AC_DEFINE(C_ALLOCA) AC_DEFINE(C_ALLOCA)
AC_MSG_CHECKING(whether Cray hooks are needed for C alloca) AC_MSG_CHECKING(whether alloca needs Cray hooks)
AC_EGREP_CPP(webecray, AC_CACHE_VAL(ac_cv_os_cray,
[AC_EGREP_CPP(webecray,
[#if defined(CRAY) && ! defined(CRAY2) [#if defined(CRAY) && ! defined(CRAY2)
webecray webecray
#else #else
wenotbecray wenotbecray
#endif #endif
], ], ac_cv_os_cray=yes, ac_cv_os_cray=no)])dnl
AC_MSG_RESULT($ac_cv_os_cray)
if test $ac_cv_os_cray = yes; then
AC_CHECK_FUNC([_getb67], AC_DEFINE(CRAY_STACKSEG_END, _getb67), AC_CHECK_FUNC([_getb67], AC_DEFINE(CRAY_STACKSEG_END, _getb67),
AC_CHECK_FUNC([GETB67], AC_DEFINE(CRAY_STACKSEG_END, GETB67), AC_CHECK_FUNC([GETB67], AC_DEFINE(CRAY_STACKSEG_END, GETB67),
AC_CHECK_FUNC([getb67], AC_DEFINE(CRAY_STACKSEG_END, getb67))))) AC_CHECK_FUNC([getb67], AC_DEFINE(CRAY_STACKSEG_END, getb67))))
fi
AC_MSG_CHECKING(stack direction for C alloca) AC_MSG_CHECKING(stack direction for C alloca)
AC_CACHE_VAL(ac_cv_c_stack_direction, AC_CACHE_VAL(ac_cv_c_stack_direction,
@ -913,6 +940,7 @@ main ()
exit (find_stack_direction() < 0); exit (find_stack_direction() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
ac_cv_c_stack_direction=0)])dnl ac_cv_c_stack_direction=0)])dnl
AC_MSG_RESULT($ac_cv_c_stack_direction)
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
fi fi
AC_SUBST(ALLOCA)dnl AC_SUBST(ALLOCA)dnl
@ -974,6 +1002,7 @@ AC_CACHE_VAL(ac_cv_struct_nlist_n_un,
[AC_TRY_LINK([#include <nlist.h>], [AC_TRY_LINK([#include <nlist.h>],
[struct nlist n; n.n_un.n_name = 0;], [struct nlist n; n.n_un.n_name = 0;],
ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl
AC_MSG_RESULT($ac_cv_struct_nlist_n_un)
if test $ac_cv_struct_nlist_n_un = yes; then if test $ac_cv_struct_nlist_n_un = yes; then
AC_DEFINE(NLIST_NAME_UNION) AC_DEFINE(NLIST_NAME_UNION)
fi fi
@ -987,6 +1016,7 @@ AC_CACHE_VAL(ac_cv_func_getloadavg_setgid,
Yowza Am I SETGID yet Yowza Am I SETGID yet
#endif], #endif],
ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])dnl ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])dnl
AC_MSG_RESULT($ac_cv_func_getloadavg_setgid)
if test $ac_cv_func_getloadavg_setgid = yes; then if test $ac_cv_func_getloadavg_setgid = yes; then
NEED_SETGID=true AC_DEFINE(GETLOADAVG_PRIVILEGED) NEED_SETGID=true AC_DEFINE(GETLOADAVG_PRIVILEGED)
fi fi
@ -1008,13 +1038,13 @@ AC_CACHE_VAL(ac_cv_group_kmem,
changequote([, ])dnl changequote([, ])dnl
])dnl ])dnl
KMEM_GROUP=$ac_cv_group_kmem KMEM_GROUP=$ac_cv_group_kmem
AC_MSG_RESULT(/dev/kmem is owned by $KMEM_GROUP) AC_MSG_RESULT($KMEM_GROUP)
fi fi
AC_SUBST(KMEM_GROUP)dnl AC_SUBST(KMEM_GROUP)dnl
])dnl ])dnl
dnl dnl
define(AC_FUNC_UTIME_NULL, define(AC_FUNC_UTIME_NULL,
[AC_MSG_CHECKING(utime with null argument) [AC_MSG_CHECKING(whether utime accepts a null argument)
AC_CACHE_VAL(ac_cv_func_utime_null, AC_CACHE_VAL(ac_cv_func_utime_null,
[rm -f conftestdata; > conftestdata [rm -f conftestdata; > conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
@ -1027,6 +1057,7 @@ exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
&& t.st_mtime - s.st_mtime < 120)); && t.st_mtime - s.st_mtime < 120));
}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no) }], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no)
rm -f core])dnl rm -f core])dnl
AC_MSG_RESULT($ac_cv_func_utime_null)
if test $ac_cv_func_utime_null = yes; then if test $ac_cv_func_utime_null = yes; then
AC_DEFINE(HAVE_UTIME_NULL) AC_DEFINE(HAVE_UTIME_NULL)
fi fi
@ -1042,6 +1073,7 @@ main ()
strcoll ("ABC", "DEF") >= 0 || strcoll ("ABC", "DEF") >= 0 ||
strcoll ("123", "456") >= 0); strcoll ("123", "456") >= 0);
}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no)])dnl }], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no)])dnl
AC_MSG_RESULT($ac_cv_func_strcoll)
if test $ac_cv_func_strcoll = yes; then if test $ac_cv_func_strcoll = yes; then
AC_DEFINE(HAVE_STRCOLL) AC_DEFINE(HAVE_STRCOLL)
fi fi
@ -1062,6 +1094,7 @@ main () {
exit(0); /* Non-reversed systems segv here. */ exit(0); /* Non-reversed systems segv here. */
}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no) }], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no)
rm -f core])dnl rm -f core])dnl
AC_MSG_RESULT($ac_cv_func_setvbuf_reversed)
if test $ac_cv_func_setvbuf_reversed = yes; then if test $ac_cv_func_setvbuf_reversed = yes; then
AC_DEFINE(SETVBUF_REVERSED) AC_DEFINE(SETVBUF_REVERSED)
fi fi
@ -1073,12 +1106,13 @@ dnl
dnl dnl
define(AC_STRUCT_TM, define(AC_STRUCT_TM,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
AC_MSG_CHECKING([for struct tm in sys/time.h instead of time.h]) AC_MSG_CHECKING([whether struct tm is in sys/time.h or time.h])
AC_CACHE_VAL(ac_cv_struct_tm, AC_CACHE_VAL(ac_cv_struct_tm,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <time.h>], #include <time.h>],
[struct tm *tp; tp->tm_sec;], [struct tm *tp; tp->tm_sec;],
ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])dnl ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])dnl
AC_MSG_RESULT($ac_cv_struct_tm)
if test $ac_cv_struct_tm = sys/time.h; then if test $ac_cv_struct_tm = sys/time.h; then
AC_DEFINE(TM_IN_SYS_TIME) AC_DEFINE(TM_IN_SYS_TIME)
fi fi
@ -1091,6 +1125,7 @@ AC_CACHE_VAL(ac_cv_header_time,
#include <sys/time.h> #include <sys/time.h>
#include <time.h>], #include <time.h>],
[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])dnl [struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])dnl
AC_MSG_RESULT($ac_cv_header_time)
if test $ac_cv_header_time = yes; then if test $ac_cv_header_time = yes; then
AC_DEFINE(TIME_WITH_SYS_TIME) AC_DEFINE(TIME_WITH_SYS_TIME)
fi fi
@ -1103,6 +1138,7 @@ AC_CACHE_VAL(ac_cv_struct_tm_zone,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;], #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])dnl ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])dnl
AC_MSG_RESULT($ac_cv_struct_tm_zone)
if test "$ac_cv_struct_tm_zone" = yes; then if test "$ac_cv_struct_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE) AC_DEFINE(HAVE_TM_ZONE)
else else
@ -1114,6 +1150,7 @@ AC_CACHE_VAL(ac_cv_var_tzname,
extern char *tzname[]; /* RS6000 and others reject char **tzname. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif>>, changequote([, ])dnl #endif>>, changequote([, ])dnl
[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])dnl [atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])dnl
AC_MSG_RESULT($ac_cv_var_tzname)
if test $ac_cv_var_tzname = yes; then if test $ac_cv_var_tzname = yes; then
AC_DEFINE(HAVE_TZNAME) AC_DEFINE(HAVE_TZNAME)
fi fi
@ -1126,6 +1163,7 @@ AC_CACHE_VAL(ac_cv_struct_st_blocks,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_blocks;], #include <sys/stat.h>], [struct stat s; s.st_blocks;],
ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])dnl ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])dnl
AC_MSG_RESULT($ac_cv_struct_st_blocks)
if test $ac_cv_struct_st_blocks = yes; then if test $ac_cv_struct_st_blocks = yes; then
AC_DEFINE(HAVE_ST_BLOCKS) AC_DEFINE(HAVE_ST_BLOCKS)
else else
@ -1140,6 +1178,7 @@ AC_CACHE_VAL(ac_cv_struct_st_blksize,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_blksize;], #include <sys/stat.h>], [struct stat s; s.st_blksize;],
ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])dnl ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])dnl
AC_MSG_RESULT($ac_cv_struct_st_blksize)
if test $ac_cv_struct_st_blksize = yes; then if test $ac_cv_struct_st_blksize = yes; then
AC_DEFINE(HAVE_ST_BLKSIZE) AC_DEFINE(HAVE_ST_BLKSIZE)
fi fi
@ -1151,6 +1190,7 @@ AC_CACHE_VAL(ac_cv_struct_st_rdev,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_rdev;], #include <sys/stat.h>], [struct stat s; s.st_rdev;],
ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])dnl ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])dnl
AC_MSG_RESULT($ac_cv_struct_st_rdev)
if test $ac_cv_struct_st_rdev = yes; then if test $ac_cv_struct_st_rdev = yes; then
AC_DEFINE(HAVE_ST_RDEV) AC_DEFINE(HAVE_ST_RDEV)
fi fi
@ -1160,21 +1200,18 @@ dnl
dnl ### Checks for compiler characteristics dnl ### Checks for compiler characteristics
dnl dnl
dnl dnl
define(AC_TRY_CROSS, define(AC_C_CROSS,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
# If we cannot run a trivial program, we must be cross compiling. # If we cannot run a trivial program, we must be cross compiling.
AC_MSG_CHECKING(whether cross-compiling) AC_MSG_CHECKING(whether cross-compiling)
AC_CACHE_VAL(ac_cv_c_cross, AC_CACHE_VAL(ac_cv_c_cross,
[AC_TRY_RUN([main(){exit(0);}], ac_cv_c_cross=no, ac_cv_c_cross=yes)])dnl [AC_TRY_RUN([main(){exit(0);}], ac_cv_c_cross=no, ac_cv_c_cross=yes)])dnl
cross_compiling=$ac_cv_c_cross cross_compiling=$ac_cv_c_cross
if test $ac_cv_c_cross = yes; then AC_MSG_RESULT($ac_cv_c_cross)
AC_MSG_RESULT(we are cross-compiling) ])dnl
else
AC_MSG_RESULT(we are not cross-compiling)
fi])dnl
dnl dnl
define(AC_C_CHAR_UNSIGNED, define(AC_C_CHAR_UNSIGNED,
[AC_MSG_CHECKING(for unsigned characters) [AC_MSG_CHECKING(whether char is unsigned)
AC_CACHE_VAL(ac_cv_c_char_unsigned, AC_CACHE_VAL(ac_cv_c_char_unsigned,
[AC_TRY_RUN( [AC_TRY_RUN(
[/* volatile prevents gcc2 from optimizing the test away on sparcs. */ [/* volatile prevents gcc2 from optimizing the test away on sparcs. */
@ -1188,6 +1225,7 @@ main() {
volatile char c = 255; exit(c < 0); volatile char c = 255; exit(c < 0);
#endif #endif
}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)])dnl }], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)])dnl
AC_MSG_RESULT($ac_cv_c_char_unsigned)
if test $ac_cv_c_char_unsigned = yes; then if test $ac_cv_c_char_unsigned = yes; then
AC_DEFINE(__CHAR_UNSIGNED__) AC_DEFINE(__CHAR_UNSIGNED__)
fi fi
@ -1207,6 +1245,7 @@ long double foo = 0.0;
exit(sizeof(long double) < sizeof(double)); }], exit(sizeof(long double) < sizeof(double)); }],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no) ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_c_long_double)
if test $ac_cv_c_long_double = yes; then if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE) AC_DEFINE(HAVE_LONG_DOUBLE)
fi fi
@ -1216,18 +1255,20 @@ define(AC_INT_16_BITS,
[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)]) [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])
AC_MSG_CHECKING(integer size) AC_MSG_CHECKING(integer size)
AC_TRY_RUN([main() { exit(sizeof(int) != 2); }], AC_TRY_RUN([main() { exit(sizeof(int) != 2); }],
AC_DEFINE(INT_16_BITS)) [AC_MSG_RESULT(16 bits)
AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(not 16 bits))
])dnl ])dnl
dnl dnl
define(AC_LONG_64_BITS, define(AC_LONG_64_BITS,
[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)]) [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])
AC_MSG_CHECKING(for 64-bit long ints) AC_MSG_CHECKING(for 64-bit long ints)
AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }], AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }],
AC_DEFINE(LONG_64_BITS)) [AC_MSG_RESULT(64 bits)
AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(not 64 bits))
])dnl ])dnl
dnl dnl
define(AC_C_BIGENDIAN, define(AC_C_BIGENDIAN,
[AC_MSG_CHECKING(byte ordering) [AC_MSG_CHECKING(whether byte ordering is bigendian)
AC_CACHE_VAL(ac_cv_c_bigendian, AC_CACHE_VAL(ac_cv_c_bigendian,
[AC_TRY_RUN([main () { [AC_TRY_RUN([main () {
/* Are we little or big endian? From Harbison&Steele. */ /* Are we little or big endian? From Harbison&Steele. */
@ -1239,6 +1280,7 @@ AC_CACHE_VAL(ac_cv_c_bigendian,
u.l = 1; u.l = 1;
exit (u.c[sizeof (long) - 1] == 1); exit (u.c[sizeof (long) - 1] == 1);
}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)])dnl }], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)])dnl
AC_MSG_RESULT($ac_cv_c_bigendian)
if test $ac_cv_c_bigendian = yes; then if test $ac_cv_c_bigendian = yes; then
AC_DEFINE(WORDS_BIGENDIAN) AC_DEFINE(WORDS_BIGENDIAN)
fi fi
@ -1259,6 +1301,7 @@ y(a, b) int *b; {
return a == 1 && b[0] == 2 && b[1] == 3 && b[2] == 4; return a == 1 && b[0] == 2 && b[1] == 3 && b[2] == 4;
}], ac_cv_c_arg_array=no, ac_cv_c_arg_array=yes) }], ac_cv_c_arg_array=no, ac_cv_c_arg_array=yes)
rm -f core])dnl rm -f core])dnl
AC_MSG_RESULT($ac_cv_c_arg_array)
if test $ac_cv_c_arg_array = no; then if test $ac_cv_c_arg_array = no; then
AC_DEFINE(NO_ARG_ARRAY) AC_DEFINE(NO_ARG_ARRAY)
fi fi
@ -1273,13 +1316,15 @@ AC_TRY_LINK(, [} inline foo() {], ac_cv_c_inline=yes, ac_cv_c_inline=no)
else else
ac_cv_c_inline=no ac_cv_c_inline=no
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_c_inline)
if test $ac_cv_c_inline = no; then if test $ac_cv_c_inline = no; then
AC_DEFINE(inline, __inline) AC_DEFINE(inline, __inline)
fi fi
])dnl ])dnl
define(AC_C_CONST, define(AC_C_CONST,
[dnl Do not "break" this again. [dnl This message is consistent in form with the other checking messages,
AC_MSG_CHECKING([for lack of working const]) dnl and with the result message.
AC_MSG_CHECKING([for working const])
AC_CACHE_VAL(ac_cv_c_const, AC_CACHE_VAL(ac_cv_c_const,
[changequote(, )dnl [changequote(, )dnl
dnl Do not put single quotes in the C program text! dnl Do not put single quotes in the C program text!
@ -1323,6 +1368,7 @@ ccp = (char const *const *) p;
}' }'
changequote([, ])dnl changequote([, ])dnl
AC_TRY_LINK(, [$ac_prog], ac_cv_c_const=yes, ac_cv_c_const=no)])dnl AC_TRY_LINK(, [$ac_prog], ac_cv_c_const=yes, ac_cv_c_const=no)])dnl
AC_MSG_RESULT($ac_cv_c_const)
if test $ac_cv_c_const = no; then if test $ac_cv_c_const = no; then
AC_DEFINE(const, ) AC_DEFINE(const, )
fi fi
@ -1346,6 +1392,7 @@ else
ac_cv_sys_interpreter=no ac_cv_sys_interpreter=no
fi fi
rm -f conftest])dnl rm -f conftest])dnl
AC_MSG_RESULT($ac_cv_sys_interpreter)
if test $ac_cv_sys_interpreter = yes; then if test $ac_cv_sys_interpreter = yes; then
ifelse([$1], , :, [$1]) ifelse([$1], , :, [$1])
ifelse([$2], , , [else ifelse([$2], , , [else
@ -1354,13 +1401,14 @@ ifelse([$2], , , [else
fi fi
])dnl ])dnl
define(AC_SYS_REMOTE_TAPE, define(AC_SYS_REMOTE_TAPE,
[AC_MSG_CHECKING(for remote tape and socket header files) [AC_CHECK_HEADER(sys/mtio.h, AC_DEFINE(HAVE_SYS_MTIO_H))
AC_CHECK_HEADER(sys/mtio.h, AC_DEFINE(HAVE_SYS_MTIO_H))
if test "$ac_cv_header_mtio_h" = yes; then if test "$ac_cv_header_mtio_h" = yes; then
AC_MSG_CHECKING(for remote tape header files)
AC_CACHE_VAL(ac_cv_header_rmt, AC_CACHE_VAL(ac_cv_header_rmt,
[AC_TRY_CPP([#include <sgtty.h> [AC_TRY_CPP([#include <sgtty.h>
#include <sys/socket.h>], ac_cv_header_rmt=yes, ac_cv_header_rmt=no)])dnl #include <sys/socket.h>], ac_cv_header_rmt=yes, ac_cv_header_rmt=no)])dnl
AC_MSG_RESULT($ac_cv_header_rmt)
if test $ac_cv_header_rmt = yes; then if test $ac_cv_header_rmt = yes; then
PROGS="$PROGS rmt" PROGS="$PROGS rmt"
fi fi
@ -1393,6 +1441,7 @@ for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib`
fi fi
rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2> /dev/null rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2> /dev/null
done])dnl done])dnl
AC_MSG_RESULT($ac_cv_sys_long_file_names)
if test $ac_cv_sys_long_file_names = yes; then if test $ac_cv_sys_long_file_names = yes; then
AC_DEFINE(HAVE_LONG_FILE_NAMES) AC_DEFINE(HAVE_LONG_FILE_NAMES)
fi fi
@ -1417,6 +1466,7 @@ main () {
exit (status == -1); exit (status == -1);
} }
], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])dnl ], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])dnl
AC_MSG_RESULT($ac_cv_sys_restartable_syscalls)
if test $ac_cv_sys_restartable_syscalls = yes; then if test $ac_cv_sys_restartable_syscalls = yes; then
AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS) AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
fi fi
@ -1435,7 +1485,7 @@ test -n "$x_includes" && ac_cv_x_includes="$x_includes"
test -n "$x_libraries" && ac_cv_x_includes="$x_libraries" test -n "$x_libraries" && ac_cv_x_includes="$x_libraries"
if test "${ac_cv_x_includes+set}" = set && if test "${ac_cv_x_includes+set}" = set &&
test "${ac_cv_x_libraries+set}" = set; then test "${ac_cv_x_libraries+set}" = set; then
AC_MSG_RESULT(using cached values for ac_cv_x_includes and ac_cv_x_libraries) AC_VERBOSE(using cached values for ac_cv_x_includes and ac_cv_x_libraries)
else else
AC_PATH_X_XMKMF AC_PATH_X_XMKMF
fi fi
@ -1455,14 +1505,14 @@ if test -z "$x_libraries" && test "$ac_cv_x_libraries" != NONE; then
x_libraries="$ac_cv_x_libraries" x_libraries="$ac_cv_x_libraries"
fi fi
test -n "$x_includes" && AC_MSG_RESULT(X11 headers are in $x_includes) test -n "$x_includes" && AC_VERBOSE(X11 headers are in $x_includes)
test -n "$x_libraries" && AC_MSG_RESULT(X11 libraries are in $x_libraries) test -n "$x_libraries" && AC_VERBOSE(X11 libraries are in $x_libraries)
fi # No --with-x=no. fi # No --with-x=no.
])dnl ])dnl
dnl dnl
dnl Internal subroutine of AC_PATH_X. dnl Internal subroutine of AC_PATH_X.
define(AC_PATH_X_XMKMF, define(AC_PATH_X_XMKMF,
[AC_MSG_CHECKING(for X include and library files with xmkmf) [AC_CHECKING(for X include and library files with xmkmf)
rm -fr conftestdir rm -fr conftestdir
if mkdir conftestdir; then if mkdir conftestdir; then
cd conftestdir cd conftestdir
@ -1496,7 +1546,7 @@ fi
dnl dnl
dnl Internal subroutine of AC_PATH_X. dnl Internal subroutine of AC_PATH_X.
define(AC_PATH_X_DIRECT, define(AC_PATH_X_DIRECT,
[AC_MSG_CHECKING(for X include and library files directly) [AC_CHECKING(for X include and library files directly)
test -z "$x_direct_TRY_library" && x_direct_TRY_library=Xt test -z "$x_direct_TRY_library" && x_direct_TRY_library=Xt
test -z "$x_direct_TRY_include" && x_direct_TRY_include=X11/Intrinsic.h test -z "$x_direct_TRY_include" && x_direct_TRY_include=X11/Intrinsic.h
AC_TRY_CPP([#include <$x_direct_TRY_include>], no_x=, AC_TRY_CPP([#include <$x_direct_TRY_include>], no_x=,
@ -1597,7 +1647,7 @@ dnl Find additional X libraries, magic flags, etc.
define(AC_PATH_XTRA, define(AC_PATH_XTRA,
[AC_REQUIRE([AC_OS_ISC])dnl [AC_REQUIRE([AC_OS_ISC])dnl
AC_REQUIRE([AC_PATH_X])dnl AC_REQUIRE([AC_PATH_X])dnl
AC_MSG_CHECKING(for additional X libraries and flags) AC_CHECKING(for additional X libraries and flags)
if test -n "$x_includes"; then if test -n "$x_includes"; then
X_CFLAGS="$X_CFLAGS -I$x_includes" X_CFLAGS="$X_CFLAGS -I$x_includes"
elif test "$no_x" = yes; then elif test "$no_x" = yes; then
@ -1637,9 +1687,9 @@ else
fi fi
fi fi
# #
AC_MSG_RESULT(X compiler flags: $X_CFLAGS) AC_VERBOSE(X compiler flags: $X_CFLAGS)
AC_MSG_RESULT(X library flags: $X_LIBS) AC_VERBOSE(X library flags: $X_LIBS)
AC_MSG_RESULT(extra X libraries: $X_EXTRA_LIBS) AC_VERBOSE(extra X libraries: $X_EXTRA_LIBS)
AC_SUBST(X_CFLAGS)dnl AC_SUBST(X_CFLAGS)dnl
AC_SUBST(X_LIBS)dnl AC_SUBST(X_LIBS)dnl
AC_SUBST(X_EXTRA_LIBS)dnl AC_SUBST(X_EXTRA_LIBS)dnl
@ -1651,15 +1701,15 @@ dnl These are kludges; we need a more systematic approach.
dnl dnl
dnl dnl
define(AC_OS_AIX, define(AC_OS_AIX,
[AC_MSG_CHECKING(for AIX) [AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_BEFORE([$0], [AC_TRY_CPP])dnl AC_BEFORE([$0], [AC_TRY_CPP])dnl
AC_MSG_CHECKING(for AIX)
AC_EGREP_CPP(yes, AC_EGREP_CPP(yes,
[#ifdef _AIX [#ifdef _AIX
yes yes
#endif #endif
], AC_DEFINE(_ALL_SOURCE)) ], [AC_MSG_RESULT(yes); AC_DEFINE(_ALL_SOURCE)], AC_MSG_RESULT(no))
])dnl ])dnl
dnl dnl
define(AC_OS_MINIX, define(AC_OS_MINIX,
@ -1667,7 +1717,7 @@ define(AC_OS_MINIX,
AC_BEFORE([$0], [AC_TRY_RUN])dnl AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_BEFORE([$0], [AC_TRY_CPP])dnl AC_BEFORE([$0], [AC_TRY_CPP])dnl
AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=)
# The Minix shell ca not assign to the same variable on the same line! # The Minix shell can not assign to the same variable on the same line!
if test "$MINIX" = yes; then if test "$MINIX" = yes; then
AC_DEFINE(_POSIX_SOURCE) AC_DEFINE(_POSIX_SOURCE)
AC_DEFINE(_POSIX_1_SOURCE, 2) AC_DEFINE(_POSIX_1_SOURCE, 2)
@ -1684,6 +1734,7 @@ AC_MSG_CHECKING(for POSIXized ISC)
if test -d /etc/conf/kconfig.d && if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1 grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1
then then
AC_MSG_RESULT(yes)
ISC=yes # If later tests want to check for ISC. ISC=yes # If later tests want to check for ISC.
AC_DEFINE(_POSIX_SOURCE) AC_DEFINE(_POSIX_SOURCE)
if test "$GCC" = yes; then if test "$GCC" = yes; then
@ -1692,6 +1743,7 @@ then
CC="$CC -Xp" CC="$CC -Xp"
fi fi
else else
AC_MSG_RESULT(no)
ISC= ISC=
fi fi
])dnl ])dnl
@ -1703,7 +1755,7 @@ AC_EGREP_CPP(yes,
[#if defined(M_XENIX) && !defined(M_UNIX) [#if defined(M_XENIX) && !defined(M_UNIX)
yes yes
#endif #endif
], XENIX=yes, XENIX=) ], [XENIX=yes AC_MSG_RESULT(yes)], [XENIX= AC_MSG_RESULT(no)])
if test "$XENIX" = yes; then if test "$XENIX" = yes; then
LIBS="$LIBS -lx" LIBS="$LIBS -lx"
case "$DEFS" in case "$DEFS" in

View File

@ -6,8 +6,8 @@
@c @setchapternewpage odd @c @setchapternewpage odd
@c %**end of header @c %**end of header
@set EDITION 1.97 @set EDITION 1.98
@set VERSION 1.97 @set VERSION 1.98
@set UPDATED August 1994 @set UPDATED August 1994
@iftex @iftex
@ -1472,8 +1472,8 @@ a sequence of arguments with the same type to be accessed as if they
were an array of values. were an array of values.
@end defmac @end defmac
@defmac AC_TRY_CROSS @defmac AC_C_CROSS
@maindex TRY_CROSS @maindex C_CROSS
If the C compiler being used does not produce executables that can run If the C compiler being used does not produce executables that can run
on the system where @code{configure} is being run, set the shell on the system where @code{configure} is being run, set the shell
variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}. variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}.
@ -2111,7 +2111,7 @@ If the optional argument @var{action-if-cross-compiling} is given and
the C compiler being used does not produce executables that run on the the C compiler being used does not produce executables that run on the
system where @code{configure} is being run, then the test program is not system where @code{configure} is being run, then the test program is not
run. Instead, the shell commands @var{action-if-cross-compiling} are run. Instead, the shell commands @var{action-if-cross-compiling} are
run. If that argument is given, this macro calls @code{AC_TRY_CROSS} run. If that argument is given, this macro calls @code{AC_C_CROSS}
if it has not already been called (@pxref{Compiler Characteristics}). if it has not already been called (@pxref{Compiler Characteristics}).
@end defmac @end defmac
@ -2339,14 +2339,24 @@ easy to change how and when each kind of message is printed; such
changes need only be made to the macro definitions, and all of the changes need only be made to the macro definitions, and all of the
callers change automatically. callers change automatically.
@defmac AC_CHECKING (@var{feature-description})
@maindex CHECKING
This macro is similar to @code{AC_MSG_CHECKING}, except that it prints a
newline after the @var{feature-description}. It is considered obsolete.
@end defmac
@defmac AC_MSG_CHECKING (@var{feature-description}) @defmac AC_MSG_CHECKING (@var{feature-description})
@maindex MSG_CHECKING @maindex MSG_CHECKING
Notify the user that @code{configure} is checking for a particular Notify the user that @code{configure} is checking for a particular
feature. This macro prints a message that starts with @samp{checking }. feature. This macro prints a message that starts with @samp{checking }
It prints nothing if @code{configure} is run with the @samp{--silent} or and ends with @samp{...} and no newline. It must be followed by a call
@samp{--quiet} option. The @var{feature-description} should be to @code{AC_MSG_RESULT} to print the result of the check and the
something like @samp{whether the Fortran compiler accepts C++ comments} newline. The @var{feature-description} should be something like
or @samp{for c89}. @samp{whether the Fortran compiler accepts C++ comments} or @samp{for
c89}.
This macro prints nothing if @code{configure} is run with the
@samp{--quiet} or @samp{--silent} option.
@end defmac @end defmac
@defmac AC_MSG_ERROR (@var{error-description}) @defmac AC_MSG_ERROR (@var{error-description})
@ -2360,10 +2370,15 @@ $HOME for \$HOME}.
@defmac AC_MSG_RESULT (@var{result-description}) @defmac AC_MSG_RESULT (@var{result-description})
@maindex MSG_RESULT @maindex MSG_RESULT
Notify the user of the results of a check. This information is Notify the user of the results of a check. @var{result-description} is
only printed if @code{configure} is run with the @samp{--verbose} almost always the value of the cache variable for the check, typically
option. @var{result-description} should be something like @samp{setting @samp{yes}, @samp{no}, or a file name. This macro should follow a call
ADA to $ADA}. to @code{AC_MSG_CHECKING}, and the @var{result-description} should be
the completion of the message printed by the call to
@code{AC_MSG_CHECKING}.
This macro prints nothing if @code{configure} is run with the
@samp{--quiet} or @samp{--silent} option.
@end defmac @end defmac
@defmac AC_MSG_WARN (@var{problem-description}) @defmac AC_MSG_WARN (@var{problem-description})
@ -2376,6 +2391,13 @@ provide a default (back-up) behavior for the situations they warn about.
make hard links}. make hard links}.
@end defmac @end defmac
@defmac AC_VERBOSE (@var{result-description})
@maindex VERBOSE
This macro is similar to @code{AC_MSG_RESULT}, except that it is meant to
follow a call to @code{AC_CHECKING} instead of @code{AC_MSG_CHECKING}.
It is considered obsolete.
@end defmac
@node Language Choice, Macro Ordering, Printing Messages, General Purpose Macros @node Language Choice, Macro Ordering, Printing Messages, General Purpose Macros
@section Language Choice @section Language Choice
@ -3031,17 +3053,19 @@ it had to perform all of the checks every time.
@maindex CACHE_VAL @maindex CACHE_VAL
Ensure that the results of the check identified by @var{cache-id} are Ensure that the results of the check identified by @var{cache-id} are
available. If the results of the check were in the cache file that was available. If the results of the check were in the cache file that was
read, print a verbose message saying so; otherwise, run the shell read, and @code{configure} was not given the @samp{--quiet} or
commands @var{commands-to-set-it}. Those commands should have no side @samp{--silent} option, print a message saying so; otherwise, run the
effects except for setting the variable @var{cache-id}. In particular, shell commands @var{commands-to-set-it}. Those commands should have no
they should not call @code{AC_DEFINE}; the code that follows the call to side effects except for setting the variable @var{cache-id}. In
@code{AC_CACHE_VAL} should do that, based on the cached value. Also, particular, they should not call @code{AC_DEFINE}; the code that follows
they should not print any messages, for example with @code{AC_MSG_CHECKING}; the call to @code{AC_CACHE_VAL} should do that, based on the cached
do that before calling @code{AC_CACHE_VAL}, so the messages are printed value. Also, they should not print any messages, for example with
regardless of whether the results of the check are retrieved from the @code{AC_MSG_CHECKING}; do that before calling @code{AC_CACHE_VAL}, so
cache or determined by running the shell commands. If the shell the messages are printed regardless of whether the results of the check
commands are run to determine the value, the value will be saved in the are retrieved from the cache or determined by running the shell
cache file just before @code{configure} creates its output files. commands. If the shell commands are run to determine the value, the
value will be saved in the cache file just before @code{configure}
creates its output files.
@end defmac @end defmac
@menu @menu
@ -3134,7 +3158,7 @@ the base names of programs
C structures C structures
@item sys @item sys
operating systems operating system features
@item type @item type
C types C types
@ -3491,14 +3515,6 @@ for backward compatibility, the old names are considered obsolete.
@vindex PREPARE @vindex PREPARE
@vindex INIT_PREPARE @vindex INIT_PREPARE
@code{AC_INIT_PREPARE} @code{AC_INIT_PREPARE}
@item AC_CHECKING
@vindex CHECKING
@vindex MSG_CHECKING
@code{AC_MSG_CHECKING}
@item AC_VERBOSE
@vindex VERBOSE
@vindex MSG_RESULT
@code{AC_MSG_RESULT}
@item AC_WARN @item AC_WARN
@vindex WARN @vindex WARN
@vindex MSG_WARN @vindex MSG_WARN
@ -3689,8 +3705,8 @@ for backward compatibility, the old names are considered obsolete.
@code{AC_STRUCT_ST_RDEV} @code{AC_STRUCT_ST_RDEV}
@item AC_CROSS_CHECK @item AC_CROSS_CHECK
@vindex CROSS_CHECK @vindex CROSS_CHECK
@vindex TRY_CROSS @vindex C_CROSS
@code{AC_TRY_CROSS} @code{AC_C_CROSS}
@item AC_CHAR_UNSIGNED @item AC_CHAR_UNSIGNED
@vindex CHAR_UNSIGNED @vindex CHAR_UNSIGNED
@vindex C_CHAR_UNSIGNED @vindex C_CHAR_UNSIGNED

View File

@ -14,14 +14,14 @@ AC_SUBST(PROGS)dnl
if test "$PERL" != no-perl; then if test "$PERL" != no-perl; then
PROGS=autoscan PROGS=autoscan
else else
AC_VERBOSE(autoscan will not be built since perl is not found) AC_WARN(autoscan will not be built since perl is not found)
fi fi
AC_PROGRAM_CHECK(BASH, bash, no-bash) AC_PROGRAM_CHECK(BASH, bash, no-bash)
if test "$BASH" != no-bash; then if test "$BASH" != no-bash; then
PROGS="$PROGS shindent" PROGS="$PROGS shindent"
else else
AC_VERBOSE(shindent will not be built since bash is not found) AC_WARN(shindent will not be built since bash is not found)
fi fi
AC_PROG_INSTALL AC_PROG_INSTALL

View File

@ -6,8 +6,8 @@
@c @setchapternewpage odd @c @setchapternewpage odd
@c %**end of header @c %**end of header
@set EDITION 1.97 @set EDITION 1.98
@set VERSION 1.97 @set VERSION 1.98
@set UPDATED August 1994 @set UPDATED August 1994
@iftex @iftex
@ -1472,8 +1472,8 @@ a sequence of arguments with the same type to be accessed as if they
were an array of values. were an array of values.
@end defmac @end defmac
@defmac AC_TRY_CROSS @defmac AC_C_CROSS
@maindex TRY_CROSS @maindex C_CROSS
If the C compiler being used does not produce executables that can run If the C compiler being used does not produce executables that can run
on the system where @code{configure} is being run, set the shell on the system where @code{configure} is being run, set the shell
variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}. variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}.
@ -2111,7 +2111,7 @@ If the optional argument @var{action-if-cross-compiling} is given and
the C compiler being used does not produce executables that run on the the C compiler being used does not produce executables that run on the
system where @code{configure} is being run, then the test program is not system where @code{configure} is being run, then the test program is not
run. Instead, the shell commands @var{action-if-cross-compiling} are run. Instead, the shell commands @var{action-if-cross-compiling} are
run. If that argument is given, this macro calls @code{AC_TRY_CROSS} run. If that argument is given, this macro calls @code{AC_C_CROSS}
if it has not already been called (@pxref{Compiler Characteristics}). if it has not already been called (@pxref{Compiler Characteristics}).
@end defmac @end defmac
@ -2339,14 +2339,24 @@ easy to change how and when each kind of message is printed; such
changes need only be made to the macro definitions, and all of the changes need only be made to the macro definitions, and all of the
callers change automatically. callers change automatically.
@defmac AC_CHECKING (@var{feature-description})
@maindex CHECKING
This macro is similar to @code{AC_MSG_CHECKING}, except that it prints a
newline after the @var{feature-description}. It is considered obsolete.
@end defmac
@defmac AC_MSG_CHECKING (@var{feature-description}) @defmac AC_MSG_CHECKING (@var{feature-description})
@maindex MSG_CHECKING @maindex MSG_CHECKING
Notify the user that @code{configure} is checking for a particular Notify the user that @code{configure} is checking for a particular
feature. This macro prints a message that starts with @samp{checking }. feature. This macro prints a message that starts with @samp{checking }
It prints nothing if @code{configure} is run with the @samp{--silent} or and ends with @samp{...} and no newline. It must be followed by a call
@samp{--quiet} option. The @var{feature-description} should be to @code{AC_MSG_RESULT} to print the result of the check and the
something like @samp{whether the Fortran compiler accepts C++ comments} newline. The @var{feature-description} should be something like
or @samp{for c89}. @samp{whether the Fortran compiler accepts C++ comments} or @samp{for
c89}.
This macro prints nothing if @code{configure} is run with the
@samp{--quiet} or @samp{--silent} option.
@end defmac @end defmac
@defmac AC_MSG_ERROR (@var{error-description}) @defmac AC_MSG_ERROR (@var{error-description})
@ -2360,10 +2370,15 @@ $HOME for \$HOME}.
@defmac AC_MSG_RESULT (@var{result-description}) @defmac AC_MSG_RESULT (@var{result-description})
@maindex MSG_RESULT @maindex MSG_RESULT
Notify the user of the results of a check. This information is Notify the user of the results of a check. @var{result-description} is
only printed if @code{configure} is run with the @samp{--verbose} almost always the value of the cache variable for the check, typically
option. @var{result-description} should be something like @samp{setting @samp{yes}, @samp{no}, or a file name. This macro should follow a call
ADA to $ADA}. to @code{AC_MSG_CHECKING}, and the @var{result-description} should be
the completion of the message printed by the call to
@code{AC_MSG_CHECKING}.
This macro prints nothing if @code{configure} is run with the
@samp{--quiet} or @samp{--silent} option.
@end defmac @end defmac
@defmac AC_MSG_WARN (@var{problem-description}) @defmac AC_MSG_WARN (@var{problem-description})
@ -2376,6 +2391,13 @@ provide a default (back-up) behavior for the situations they warn about.
make hard links}. make hard links}.
@end defmac @end defmac
@defmac AC_VERBOSE (@var{result-description})
@maindex VERBOSE
This macro is similar to @code{AC_MSG_RESULT}, except that it is meant to
follow a call to @code{AC_CHECKING} instead of @code{AC_MSG_CHECKING}.
It is considered obsolete.
@end defmac
@node Language Choice, Macro Ordering, Printing Messages, General Purpose Macros @node Language Choice, Macro Ordering, Printing Messages, General Purpose Macros
@section Language Choice @section Language Choice
@ -3031,17 +3053,19 @@ it had to perform all of the checks every time.
@maindex CACHE_VAL @maindex CACHE_VAL
Ensure that the results of the check identified by @var{cache-id} are Ensure that the results of the check identified by @var{cache-id} are
available. If the results of the check were in the cache file that was available. If the results of the check were in the cache file that was
read, print a verbose message saying so; otherwise, run the shell read, and @code{configure} was not given the @samp{--quiet} or
commands @var{commands-to-set-it}. Those commands should have no side @samp{--silent} option, print a message saying so; otherwise, run the
effects except for setting the variable @var{cache-id}. In particular, shell commands @var{commands-to-set-it}. Those commands should have no
they should not call @code{AC_DEFINE}; the code that follows the call to side effects except for setting the variable @var{cache-id}. In
@code{AC_CACHE_VAL} should do that, based on the cached value. Also, particular, they should not call @code{AC_DEFINE}; the code that follows
they should not print any messages, for example with @code{AC_MSG_CHECKING}; the call to @code{AC_CACHE_VAL} should do that, based on the cached
do that before calling @code{AC_CACHE_VAL}, so the messages are printed value. Also, they should not print any messages, for example with
regardless of whether the results of the check are retrieved from the @code{AC_MSG_CHECKING}; do that before calling @code{AC_CACHE_VAL}, so
cache or determined by running the shell commands. If the shell the messages are printed regardless of whether the results of the check
commands are run to determine the value, the value will be saved in the are retrieved from the cache or determined by running the shell
cache file just before @code{configure} creates its output files. commands. If the shell commands are run to determine the value, the
value will be saved in the cache file just before @code{configure}
creates its output files.
@end defmac @end defmac
@menu @menu
@ -3134,7 +3158,7 @@ the base names of programs
C structures C structures
@item sys @item sys
operating systems operating system features
@item type @item type
C types C types
@ -3491,14 +3515,6 @@ for backward compatibility, the old names are considered obsolete.
@vindex PREPARE @vindex PREPARE
@vindex INIT_PREPARE @vindex INIT_PREPARE
@code{AC_INIT_PREPARE} @code{AC_INIT_PREPARE}
@item AC_CHECKING
@vindex CHECKING
@vindex MSG_CHECKING
@code{AC_MSG_CHECKING}
@item AC_VERBOSE
@vindex VERBOSE
@vindex MSG_RESULT
@code{AC_MSG_RESULT}
@item AC_WARN @item AC_WARN
@vindex WARN @vindex WARN
@vindex MSG_WARN @vindex MSG_WARN
@ -3689,8 +3705,8 @@ for backward compatibility, the old names are considered obsolete.
@code{AC_STRUCT_ST_RDEV} @code{AC_STRUCT_ST_RDEV}
@item AC_CROSS_CHECK @item AC_CROSS_CHECK
@vindex CROSS_CHECK @vindex CROSS_CHECK
@vindex TRY_CROSS @vindex C_CROSS
@code{AC_TRY_CROSS} @code{AC_C_CROSS}
@item AC_CHAR_UNSIGNED @item AC_CHAR_UNSIGNED
@vindex CHAR_UNSIGNED @vindex CHAR_UNSIGNED
@vindex C_CHAR_UNSIGNED @vindex C_CHAR_UNSIGNED

View File

@ -174,10 +174,6 @@ Do not print messages saying which checks are being made.
Look for the package's source code in directory @var{dir}. Usually Look for the package's source code in directory @var{dir}. Usually
@code{configure} can determine that directory automatically. @code{configure} can determine that directory automatically.
@item --verbose
@itemx -v
Print the results of the checks.
@item --version @item --version
Print the version of Autoconf used to generate the @code{configure} Print the version of Autoconf used to generate the @code{configure}
script, and exit. script, and exit.

View File

@ -174,10 +174,6 @@ Do not print messages saying which checks are being made.
Look for the package's source code in directory @var{dir}. Usually Look for the package's source code in directory @var{dir}. Usually
@code{configure} can determine that directory automatically. @code{configure} can determine that directory automatically.
@item --verbose
@itemx -v
Print the results of the checks.
@item --version @item --version
Print the version of Autoconf used to generate the @code{configure} Print the version of Autoconf used to generate the @code{configure}
script, and exit. script, and exit.

View File

@ -34,7 +34,7 @@ Install it before installing Autoconf or set the
M4 environment variable to its path name. M4 environment variable to its path name.
)m4exit(2)])dnl )m4exit(2)])dnl
dnl dnl
define(AC_ACVERSION, 1.97)dnl define(AC_ACVERSION, 1.98)dnl
dnl This is defined by the --version option of the autoconf script. dnl This is defined by the --version option of the autoconf script.
ifdef([AC_PRINT_VERSION], [Autoconf version AC_ACVERSION ifdef([AC_PRINT_VERSION], [Autoconf version AC_ACVERSION
m4exit(0)])dnl m4exit(0)])dnl
@ -87,8 +87,7 @@ Configuration:
--cache-file=FILE cache test results in FILE --cache-file=FILE cache test results in FILE
--help print this message --help print this message
--no-create do not create output files --no-create do not create output files
--quiet, --silent do not print \`checking for...' messages --quiet, --silent do not print \`checking...' messages
--verbose print results of checks
--version print the version of autoconf that created configure --version print the version of autoconf that created configure
Directories: Directories:
--exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local]
@ -386,25 +385,19 @@ trap 'rm -fr confdefs* $ac_clean_files' 0
# 1 file creation # 1 file creation
# 2 errors and warnings # 2 errors and warnings
# 3 unused; some systems may open it to /dev/tty # 3 unused; some systems may open it to /dev/tty
# 4 checking for... messages # 4 checking for... messages and results
# 5 test results # 5 compiler messages
# 6 compiler messages
if test "$silent" = yes; then if test "$silent" = yes; then
exec 4>/dev/null exec 4>/dev/null
else else
exec 4>&1 exec 4>&1
fi fi
if test "$verbose" = yes; then exec 5>./config.log
exec 5>&1
else
exec 5>/dev/null
fi
exec 6>./config.log
echo "\ echo "\
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
" 1>&6 " 1>&5
# Save the original args if we used an alternate arg parser. # Save the original args if we used an alternate arg parser.
ac_configure_temp="${configure_args-[$]@}" ac_configure_temp="${configure_args-[$]@}"
@ -585,8 +578,6 @@ changequote(<<, >>)dnl
if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'` prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'`
changequote([, ])dnl changequote([, ])dnl
dnl test -z "$prefix" && prefix=/
AC_MSG_RESULT(setting installation directory prefix to ${prefix})
fi fi
fi fi
undefine(AC_VAR_NAME)dnl undefine(AC_VAR_NAME)dnl
@ -673,7 +664,7 @@ dnl
dnl Subroutines of AC_CANONICAL_SYSTEM. dnl Subroutines of AC_CANONICAL_SYSTEM.
dnl dnl
define(AC_CANONICAL_HOST, define(AC_CANONICAL_HOST,
[AC_MSG_CHECKING(host type) [AC_MSG_CHECKING(host system type)
case "${host_alias}" in case "${host_alias}" in
NONE) NONE)
@ -690,7 +681,7 @@ host=`${ac_config_sub} ${host_alias}`
host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
test -n "$host" && AC_MSG_RESULT(setting host to $host) AC_MSG_RESULT($host)
AC_SUBST(host)dnl AC_SUBST(host)dnl
AC_SUBST(host_alias)dnl AC_SUBST(host_alias)dnl
AC_SUBST(host_cpu)dnl AC_SUBST(host_cpu)dnl
@ -699,7 +690,7 @@ AC_SUBST(host_os)dnl
])dnl ])dnl
dnl dnl
define(AC_CANONICAL_TARGET, define(AC_CANONICAL_TARGET,
[AC_MSG_CHECKING(target type) [AC_MSG_CHECKING(target system type)
case "${target_alias}" in case "${target_alias}" in
NONE) NONE)
@ -713,7 +704,7 @@ target=`${ac_config_sub} ${target_alias}`
target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
test -n "$target" && AC_MSG_RESULT(setting target to $target) AC_MSG_RESULT($target)
AC_SUBST(target)dnl AC_SUBST(target)dnl
AC_SUBST(target_alias)dnl AC_SUBST(target_alias)dnl
AC_SUBST(target_cpu)dnl AC_SUBST(target_cpu)dnl
@ -722,7 +713,7 @@ AC_SUBST(target_os)dnl
])dnl ])dnl
dnl dnl
define(AC_CANONICAL_BUILD, define(AC_CANONICAL_BUILD,
[AC_MSG_CHECKING(build type) [AC_MSG_CHECKING(build system type)
case "${build_alias}" in case "${build_alias}" in
NONE) build= build_alias= ;; NONE) build= build_alias= ;;
@ -733,7 +724,7 @@ build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
;; ;;
esac esac
test -n "$build" && AC_MSG_RESULT(setting build to $build) AC_MSG_RESULT($build)
AC_SUBST(build)dnl AC_SUBST(build)dnl
AC_SUBST(build_alias)dnl AC_SUBST(build_alias)dnl
AC_SUBST(build_cpu)dnl AC_SUBST(build_cpu)dnl
@ -807,13 +798,12 @@ dnl
dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved. dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
define(AC_CACHE_VAL, define(AC_CACHE_VAL,
[dnl We used to use the below line, but it fails if the 1st arg is a [AC_REQUIRE([AC_MSG_ECHO_N])dnl
dnl We used to use the below line, but it fails if the 1st arg is a
dnl shell variable, so we need the eval. dnl shell variable, so we need the eval.
dnl if test "${$1+set}" = set; then dnl if test "${$1+set}" = set; then
if eval "test \"`echo '${'$1'+set}'`\" = set"; then if eval "test \"`echo '${'$1'+set}'`\" = set"; then
dnl This verbose message is just for testing the caching code. echo $ac_n "(cached) $ac_c" 1>&4
dnl AC_MSG_RESULT(using cached value for $1)
AC_MSG_RESULT(using cached value)
else else
$2 $2
fi fi
@ -872,10 +862,8 @@ define(AC_DEFINE, [
dnl Uniformly use AC_DEFINE_[SED]QUOTE, so callers of AC_DEFINE_UNQUOTED dnl Uniformly use AC_DEFINE_[SED]QUOTE, so callers of AC_DEFINE_UNQUOTED
dnl can use AC_QUOTE_* manually if they want to. dnl can use AC_QUOTE_* manually if they want to.
ifelse($#, 2, ifelse($#, 2,
[define([AC_VAL], $2)dnl [define([AC_VAL], $2)dnl],
echo 1>&5 " defining" $1 to be ifelse(AC_VAL, , empty, "AC_QUOTE_SQUOTE(AC_VAL)")], [define([AC_VAL], 1)dnl])
[define([AC_VAL], 1)dnl
echo 1>&5 " defining $1"])
dnl dnl
echo "[#][define]" $1 "AC_QUOTE_SQUOTE(AC_VAL)" >> confdefs.h echo "[#][define]" $1 "AC_QUOTE_SQUOTE(AC_VAL)" >> confdefs.h
dnl Define DEFS even if AC_LIST_HEADERS for use in user case statements. dnl Define DEFS even if AC_LIST_HEADERS for use in user case statements.
@ -922,10 +910,10 @@ dnl
dnl AC_SUBST_FILE(VARIABLE, FILE) dnl AC_SUBST_FILE(VARIABLE, FILE)
define(AC_SUBST_FILE, define(AC_SUBST_FILE,
[if test -f $2; then [if test -f $2; then
AC_MSG_RESULT(using $2 for $1) echo using $2 for $1)
AC_INSERT_FILE($1, $2) AC_INSERT_FILE($1, $2)
elif test -f ${srcdir}/$2; then elif test -f ${srcdir}/$2; then
AC_MSG_RESULT(using ${srcdir}/$2 for $1) echo using ${srcdir}/$2 for $1)
AC_INSERT_FILE($1, ${srcdir}/$2) AC_INSERT_FILE($1, ${srcdir}/$2)
fi fi
])dnl ])dnl
@ -944,13 +932,40 @@ dnl
dnl ### Printing messages dnl ### Printing messages
dnl dnl
dnl dnl
dnl Check whether to use -n, \c, or newline-tab to separate
dnl checking messages from result messages.
define(AC_MSG_ECHO_N,
[AC_PROVIDE([$0])dnl
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
if (echo -n testing; echo 1,2,3) | grep -e -n > /dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi])dnl
dnl
dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION) dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
define(AC_MSG_CHECKING, define(AC_MSG_CHECKING,
[echo "checking $1" 1>&4])dnl [AC_REQUIRE([AC_MSG_ECHO_N])dnl
echo $ac_n "checking $1""...$ac_c" 1>&4])dnl
dnl
dnl Obsolete version.
define(AC_CHECKING,
[AC_OBSOLETE([$0], [; instead use AC_MSG_CHECKING])dnl
echo "checking $1" 1>&4])dnl
dnl dnl
dnl AC_MSG_RESULT(RESULT-DESCRIPTION) dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
define(AC_MSG_RESULT, define(AC_MSG_RESULT,
[echo " $1" 1>&5])dnl [AC_REQUIRE([AC_MSG_ECHO_N])dnl
echo "$ac_t""$1" 1>&4])dnl
dnl
dnl Obsolete version.
define(AC_VERBOSE,
[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
echo " $1" 1>&4])dnl
dnl dnl
dnl AC_MSG_WARN(PROBLEM-DESCRIPTION) dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
define(AC_MSG_WARN, define(AC_MSG_WARN,
@ -970,7 +985,7 @@ AC_PROVIDE([$0])dnl
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='${CPP}' ac_cpp='${CPP}'
ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&6 2>&6' ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&5 2>&5'
])dnl ])dnl
dnl dnl
define(AC_LANG_CPLUSPLUS, define(AC_LANG_CPLUSPLUS,
@ -979,7 +994,7 @@ AC_PROVIDE([$0])dnl
ac_ext=C ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='${CXXCPP}' ac_cpp='${CXXCPP}'
ac_compile='${CXX-gcc} $CXXFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&6 2>&6' ac_compile='${CXX-gcc} $CXXFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&5 2>&5'
])dnl ])dnl
dnl dnl
dnl Push the current language on a stack. dnl Push the current language on a stack.
@ -1041,7 +1056,7 @@ ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
])dnl ])dnl
fi])dnl fi])dnl
$1="$ac_cv_prog_$1" $1="$ac_cv_prog_$1"
test -n "[$]$1" && AC_MSG_RESULT(setting $1 to [$]$1) test -n "[$]$1" && AC_MSG_RESULT([$]$1)
AC_SUBST($1)dnl AC_SUBST($1)dnl
])dnl ])dnl
dnl dnl
@ -1072,7 +1087,7 @@ ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
;; ;;
esac])dnl esac])dnl
$1="$ac_cv_path_$1" $1="$ac_cv_path_$1"
test -n "[$]$1" && AC_MSG_RESULT(setting $1 to [$]$1) test -n "[$]$1" && AC_MSG_RESULT([$]$1)
AC_SUBST($1)dnl AC_SUBST($1)dnl
])dnl ])dnl
dnl dnl
@ -1115,6 +1130,7 @@ LIBS="${LIBS} -l[]AC_LIB_NAME[] $4"
AC_TRY_LINK( , [main();], AC_CV_NAME=yes, AC_CV_NAME=no)dnl AC_TRY_LINK( , [main();], AC_CV_NAME=yes, AC_CV_NAME=no)dnl
LIBS="${ac_save_LIBS}" LIBS="${ac_save_LIBS}"
])dnl ])dnl
AC_MSG_RESULT($AC_CV_NAME)
if test "${AC_CV_NAME}" = yes; then if test "${AC_CV_NAME}" = yes; then
ifelse([$2], , ifelse([$2], ,
[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z])) [AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
@ -1167,7 +1183,7 @@ define(AC_COMPILE_CHECK,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
dnl It's actually ok to use this, if you don't care about caching. dnl It's actually ok to use this, if you don't care about caching.
dnl AC_OBSOLETE([$0], [; instead use AC_TRY_LINK])dnl dnl AC_OBSOLETE([$0], [; instead use AC_TRY_LINK])dnl
ifelse([$1], , , [AC_MSG_CHECKING([for $1]) ifelse([$1], , , [AC_CHECKING([for $1])
])dnl ])dnl
AC_TRY_LINK([$2], [$3], [$4], [$5])dnl AC_TRY_LINK([$2], [$3], [$4], [$5])dnl
])dnl ])dnl
@ -1200,10 +1216,10 @@ dnl AC_TRY_RUN(PROGRAM, ACTION-IF-TRUE [, ACTION-IF-FALSE
dnl [, ACTION-IF-CROSS-COMPILING]]) dnl [, ACTION-IF-CROSS-COMPILING]])
define(AC_TRY_RUN, define(AC_TRY_RUN,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
AC_REQUIRE([AC_TRY_CROSS])dnl AC_REQUIRE([AC_C_CROSS])dnl
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
ifelse([$4], , AC_MSG_ERROR(can not run test program while cross compiling), ifelse([$4], , AC_MSG_ERROR(can not run test program while cross compiling),
[AC_MSG_RESULT(using default for cross-compiling) [AC_MSG_WARN(using default for cross-compiling)
$4 $4
]) ])
else else
@ -1254,9 +1270,11 @@ AC_CACHE_VAL(ac_cv_header_$ac_var,
[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_var=yes", [AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_var=yes",
eval "ac_cv_header_$ac_var=no")])dnl eval "ac_cv_header_$ac_var=no")])dnl
if eval "test \"`echo '$ac_cv_header_'$ac_var`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_var`\" = yes"; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2]) ifelse([$2], , :, [$2])
ifelse([$3], , , [else else
$3 AC_MSG_RESULT(no)
ifelse([$3], , , [$3
])dnl ])dnl
fi fi
])dnl ])dnl
@ -1278,9 +1296,11 @@ extern char $1(); $1();
#endif #endif
], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])dnl ], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])dnl
if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2]) ifelse([$2], , :, [$2])
ifelse([$3], , , [else else
$3 AC_MSG_RESULT(no)
ifelse([$3], , , [$3
])dnl ])dnl
fi fi
])dnl ])dnl
@ -1312,10 +1332,7 @@ dnl AC_REPLACE_FUNCS(FUNCTION-NAME...)
define(AC_REPLACE_FUNCS, define(AC_REPLACE_FUNCS,
[for ac_func in $1 [for ac_func in $1
do do
AC_CHECK_FUNC(${ac_func}, , AC_CHECK_FUNC(${ac_func}, , [LIBOBJS="$LIBOBJS ${ac_func}.o"])
[LIBOBJS="$LIBOBJS ${ac_func}.o"
AC_MSG_RESULT(using ${ac_func}.o instead)
])dnl
done done
AC_SUBST(LIBOBJS)dnl AC_SUBST(LIBOBJS)dnl
])dnl ])dnl
@ -1338,6 +1355,7 @@ main()
fprintf(f, "%d\n", sizeof($1)); fprintf(f, "%d\n", sizeof($1));
exit(0); exit(0);
}], AC_CV_NAME=`cat conftestval`)])dnl }], AC_CV_NAME=`cat conftestval`)])dnl
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
undefine(AC_TYPE_NAME)dnl undefine(AC_TYPE_NAME)dnl
undefine(AC_CV_NAME)dnl undefine(AC_CV_NAME)dnl
@ -1348,6 +1366,7 @@ define(AC_CHECK_TYPE,
[AC_MSG_CHECKING(for $1 in sys/types.h) [AC_MSG_CHECKING(for $1 in sys/types.h)
AC_CACHE_VAL(ac_cv_type_$1, AC_CACHE_VAL(ac_cv_type_$1,
[AC_EGREP_HEADER($1, sys/types.h, ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl [AC_EGREP_HEADER($1, sys/types.h, ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
AC_MSG_RESULT($ac_cv_type_$1)
if test $ac_cv_type_$1 = no; then if test $ac_cv_type_$1 = no; then
AC_DEFINE($1, $2) AC_DEFINE($1, $2)
fi fi
@ -1417,6 +1436,9 @@ dnl so uname gets run too.
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# #
[#] [$]0 [$]configure_args [#] [$]0 [$]configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
changequote(, )dnl changequote(, )dnl
ac_cs_usage="Usage: ${CONFIG_STATUS} [--recheck] [--version] [--help]" ac_cs_usage="Usage: ${CONFIG_STATUS} [--recheck] [--version] [--help]"
@ -1755,7 +1777,7 @@ changequote([, ])dnl
# The recursion is here. # The recursion is here.
if test -n "${ac_sub_configure}"; then if test -n "${ac_sub_configure}"; then
AC_MSG_RESULT([running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file] --srcdir=${ac_sub_srcdir}) echo "[running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file] --srcdir=${ac_sub_srcdir}"
if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir} if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}
then : then :
else else

View File

@ -29,18 +29,19 @@ define(AC_PROG_CC,
AC_PROVIDE([$0])dnl AC_PROVIDE([$0])dnl
AC_CHECK_PROG(CC, gcc, gcc, cc) AC_CHECK_PROG(CC, gcc, gcc, cc)
# Find out if we are using GNU C, under whatever name. AC_MSG_CHECKING(whether we are using GNU C)
AC_CACHE_VAL(ac_cv_prog_gcc, AC_CACHE_VAL(ac_cv_prog_gcc,
[cat > conftest.c <<EOF [cat > conftest.c <<EOF
#ifdef __GNUC__ #ifdef __GNUC__
yes yes
#endif #endif
EOF EOF
if ${CC-cc} -E conftest.c 2>&6 | egrep yes >/dev/null 2>&1; then if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_prog_gcc)
if test $ac_cv_prog_gcc = yes; then GCC=yes; else GCC= ; fi if test $ac_cv_prog_gcc = yes; then GCC=yes; else GCC= ; fi
])dnl ])dnl
dnl dnl
@ -56,7 +57,7 @@ AC_CACHE_VAL(ac_cv_prog_gxx,
yes yes
#endif #endif
EOF EOF
if ${CXX-gcc} -E conftest.C 2>&6 | egrep yes >/dev/null 2>&1; then if ${CXX-gcc} -E conftest.C 2>&5 | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes ac_cv_prog_gxx=yes
else else
ac_cv_prog_gxx=no ac_cv_prog_gxx=no
@ -81,9 +82,9 @@ Autoconf TIOCGETP'
Autoconf TCGETA' Autoconf TCGETA'
AC_EGREP_CPP($ac_pattern, $ac_prog, ac_cv_prog_gcc_traditional=yes) AC_EGREP_CPP($ac_pattern, $ac_prog, ac_cv_prog_gcc_traditional=yes)
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_prog_gcc_traditional)
if test $ac_cv_prog_gcc_traditional = yes; then if test $ac_cv_prog_gcc_traditional = yes; then
CC="$CC -traditional" CC="$CC -traditional"
AC_MSG_RESULT(setting CC to $CC)
fi fi
fi fi
])dnl ])dnl
@ -101,15 +102,15 @@ echo 'foo(){}' > conftest.c
# Make sure it works both with $CC and with simple cc. # Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an # We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one. # existing .o file with -o, though they will create one.
if ${CC-cc} -c conftest.c -o conftest.o 1>&6 2>&6 && if ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5 &&
test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o 1>&6 2>&6 test -f conftest.o && ${CC-cc} -c conftest.c -o conftest.o 1>&5 2>&5
then then
if test "x$CC" != xcc; then if test "x$CC" != xcc; then
# Test first that cc exists at all. # Test first that cc exists at all.
if cc -c conftest.c 1>&6 2>&6 if cc -c conftest.c 1>&5 2>&5
then then
if cc -c conftest.c -o conftest2.o 1>&6 2>&6 && if cc -c conftest.c -o conftest2.o 1>&5 2>&5 &&
test -f conftest2.o && cc -c conftest.c -o conftest2.o 1>&6 2>&6 test -f conftest2.o && cc -c conftest.c -o conftest2.o 1>&5 2>&5
then then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes eval ac_cv_prog_cc_${ac_cc}_c_o=yes
fi fi
@ -118,7 +119,10 @@ then
fi fi
rm -f conftest* rm -f conftest*
])dnl ])dnl
if test $ac_cv_prog_cc_${ac_cc}_c_o = no; then if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_DEFINE(NO_MINUS_C_MINUS_O) AC_DEFINE(NO_MINUS_C_MINUS_O)
fi fi
])dnl ])dnl
@ -128,7 +132,7 @@ define(AC_PROG_MAKE_SET,
[AC_MSG_CHECKING(whether ${MAKE-make} sets \$MAKE) [AC_MSG_CHECKING(whether ${MAKE-make} sets \$MAKE)
set dummy ${MAKE-make}; ac_make=[$]2 set dummy ${MAKE-make}; ac_make=[$]2
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
[cat > conftestmake <<'EOF' [cat > conftestmake <<\EOF
all: all:
@echo 'ac_maketemp="${MAKE}"' @echo 'ac_maketemp="${MAKE}"'
EOF EOF
@ -142,11 +146,12 @@ else
eval ac_cv_prog_make_${ac_make}_set=no eval ac_cv_prog_make_${ac_make}_set=no
fi fi
rm -f conftestmake])dnl rm -f conftestmake])dnl
if test $ac_cv_prog_make_${ac_make}_set = yes; then if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
AC_MSG_RESULT(yes)
SET_MAKE= SET_MAKE=
else else
AC_MSG_RESULT(no)
SET_MAKE="MAKE=${MAKE-make}" SET_MAKE="MAKE=${MAKE-make}"
AC_MSG_RESULT(setting MAKE to ${MAKE-make} in Makefiles)
fi fi
AC_SUBST([SET_MAKE])dnl AC_SUBST([SET_MAKE])dnl
])dnl ])dnl
@ -175,7 +180,7 @@ Syntax Error], , CPP=/lib/cpp))
ac_cv_prog_CPP="$CPP"])dnl ac_cv_prog_CPP="$CPP"])dnl
fi fi
CPP="$ac_cv_prog_CPP" CPP="$ac_cv_prog_CPP"
AC_MSG_RESULT(setting CPP to $CPP) AC_MSG_RESULT($CPP)
AC_SUBST(CPP)dnl AC_SUBST(CPP)dnl
])dnl ])dnl
dnl dnl
@ -192,7 +197,7 @@ AC_LANG_CPLUSPLUS[]dnl
AC_LANG_RESTORE[]dnl AC_LANG_RESTORE[]dnl
fi])dnl fi])dnl
CXXCPP="$ac_cv_prog_CXXCPP" CXXCPP="$ac_cv_prog_CXXCPP"
AC_MSG_RESULT(setting CXXCPP to $CXXCPP) AC_MSG_RESULT($CXXCPP)
AC_SUBST(CXXCPP)dnl AC_SUBST(CXXCPP)dnl
])dnl ])dnl
dnl dnl
@ -204,6 +209,7 @@ dnl
define(AC_PROG_LEX, define(AC_PROG_LEX,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
AC_CHECK_PROG(LEX, flex, flex, lex) AC_CHECK_PROG(LEX, flex, flex, lex)
AC_MSG_CHECKING(for $LEX library)
if test -z "$LEXLIB" if test -z "$LEXLIB"
then then
case "$LEX" in case "$LEX" in
@ -211,7 +217,7 @@ then
*) LEXLIB="-ll" ;; *) LEXLIB="-ll" ;;
esac esac
fi fi
AC_MSG_RESULT(setting LEXLIB to $LEXLIB) AC_MSG_RESULT($LEXLIB)
AC_SUBST(LEXLIB)])dnl AC_SUBST(LEXLIB)])dnl
dnl dnl
define(AC_DECL_YYTEXT, define(AC_DECL_YYTEXT,
@ -241,6 +247,7 @@ LIBS="$LIBS $LEXLIB"
AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, ac_cv_prog_lex_yytext_pointer=yes) AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, ac_cv_prog_lex_yytext_pointer=yes)
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
rm -f "${LEX_OUTPUT_ROOT}.c"])dnl rm -f "${LEX_OUTPUT_ROOT}.c"])dnl
AC_MSG_RESULT($ac_cv_prog_lex_yytext_pointer)
if test $ac_cv_prog_lex_yytext_pointer = yes; then if test $ac_cv_prog_lex_yytext_pointer = yes; then
AC_DEFINE(YYTEXT_POINTER) AC_DEFINE(YYTEXT_POINTER)
fi fi
@ -295,18 +302,16 @@ AC_CACHE_VAL(ac_cv_path_install,
test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"])dnl test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"])dnl
INSTALL="$ac_cv_path_install" INSTALL="$ac_cv_path_install"
fi fi
AC_MSG_RESULT($INSTALL)
AC_SUBST(INSTALL)dnl AC_SUBST(INSTALL)dnl
AC_MSG_RESULT(setting INSTALL to $INSTALL)
# Use test -z because SunOS4 sh mishandles braces in ${var-val}. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution. # It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
AC_SUBST(INSTALL_PROGRAM)dnl AC_SUBST(INSTALL_PROGRAM)dnl
AC_MSG_RESULT(setting INSTALL_PROGRAM to $INSTALL_PROGRAM)
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
AC_SUBST(INSTALL_DATA)dnl AC_SUBST(INSTALL_DATA)dnl
AC_MSG_RESULT(setting INSTALL_DATA to $INSTALL_DATA)
])dnl ])dnl
dnl dnl
define(AC_PROG_LN_S, define(AC_PROG_LN_S,
@ -322,9 +327,9 @@ else
fi])dnl fi])dnl
LN_S="$ac_cv_prog_LN_S" LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then if test "$ac_cv_prog_LN_S" = "ln -s"; then
AC_MSG_RESULT(ln -s is supported) AC_MSG_RESULT(yes)
else else
AC_MSG_RESULT(ln -s is not supported) AC_MSG_RESULT(no)
fi fi
AC_SUBST(LN_S)dnl AC_SUBST(LN_S)dnl
])dnl ])dnl
@ -332,7 +337,7 @@ dnl
define(AC_PROG_RSH, define(AC_PROG_RSH,
[AC_MSG_CHECKING(for remote shell) [AC_MSG_CHECKING(for remote shell)
AC_CACHE_VAL(ac_cv_path_RSH, AC_CACHE_VAL(ac_cv_path_RSH,
[ac_cv_path_RSH=true [ac_cv_path_RSH=no
for ac_file in \ for ac_file in \
/usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh /usr/bin/nsh /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh /usr/bin/nsh
do do
@ -342,11 +347,10 @@ do
fi fi
done])dnl done])dnl
RSH="$ac_cv_path_RSH" RSH="$ac_cv_path_RSH"
AC_MSG_RESULT($RSH)
if test $RSH != true; then if test $RSH != true; then
AC_MSG_RESULT(found remote shell $RSH)
RTAPELIB=rtapelib.o RTAPELIB=rtapelib.o
else else
AC_MSG_RESULT(found no remote shell)
AC_CHECK_HEADER(netdb.h, [RTAPELIB=rtapelib.o AC_DEFINE(HAVE_NETDB_H)], AC_CHECK_HEADER(netdb.h, [RTAPELIB=rtapelib.o AC_DEFINE(HAVE_NETDB_H)],
[RTAPELIB= AC_DEFINE(NO_REMOTE)]) [RTAPELIB= AC_DEFINE(NO_REMOTE)])
fi fi
@ -388,6 +392,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
], , ac_stdc_headers=no) ], , ac_stdc_headers=no)
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_header_stdc)
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
AC_DEFINE(STDC_HEADERS) AC_DEFINE(STDC_HEADERS)
fi])dnl fi])dnl
@ -401,16 +406,19 @@ define(AC_USG,
[; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl
AC_MSG_CHECKING([for BSD string and memory functions]) AC_MSG_CHECKING([for BSD string and memory functions])
AC_TRY_LINK([#include <strings.h>], [rindex(0, 0); bzero(0, 0);], , AC_TRY_LINK([#include <strings.h>], [rindex(0, 0); bzero(0, 0);], ,
AC_DEFINE(USG))])dnl [AC_MSG_RESULT(yes); AC_DEFINE(USG)], [AC_MSG_RESULT(no)])])dnl
dnl dnl
dnl dnl
dnl If memchr and the like aren't declared in <string.h>, include <memory.h>. dnl If memchr and the like aren't declared in <string.h>, include <memory.h>.
dnl To avoid problems, don't check for gcc2 built-ins. dnl To avoid problems, don't check for gcc2 built-ins.
define(AC_MEMORY_H, define(AC_MEMORY_H,
[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])AC_MSG_CHECKING(whether string.h declares mem functions) [AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])dnl
AC_EGREP_HEADER(memchr, string.h, , AC_MSG_CHECKING(whether string.h declares mem functions)
[AC_CHECK_HEADER(memory.h, AC_DEFINE(NEED_MEMORY_H))])] AC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no)
)dnl AC_MSG_RESULT($ac_found)
if test $ac_found = no; then
AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)])
fi])dnl
dnl dnl
define(AC_HEADER_MAJOR, define(AC_HEADER_MAJOR,
[AC_MSG_CHECKING([for major, minor and makedev header]) [AC_MSG_CHECKING([for major, minor and makedev header])
@ -423,6 +431,7 @@ fi
if test $ac_cv_header_major = no; then if test $ac_cv_header_major = no; then
AC_CHECK_HEADER(sys/sysmacros.h, ac_cv_header_major=sys/sysmacros.h) AC_CHECK_HEADER(sys/sysmacros.h, ac_cv_header_major=sys/sysmacros.h)
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_header_major)
case "$ac_cv_header_major" in case "$ac_cv_header_major" in
sys/mkdev.h) AC_DEFINE(MAJOR_IN_MKDEV) ;; sys/mkdev.h) AC_DEFINE(MAJOR_IN_MKDEV) ;;
sys/sysmacros.h) AC_DEFINE(MAJOR_IN_SYSMACROS) ;; sys/sysmacros.h) AC_DEFINE(MAJOR_IN_SYSMACROS) ;;
@ -441,6 +450,7 @@ AC_TRY_LINK([#include <sys/types.h>
#include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break) #include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break)
done])dnl done])dnl
AC_MSG_RESULT($ac_cv_header_dir)
case "$ac_cv_header_dir" in case "$ac_cv_header_dir" in
dirent.h) AC_DEFINE(HAVE_DIRENT_H) ;; dirent.h) AC_DEFINE(HAVE_DIRENT_H) ;;
sys/ndir.h) AC_DEFINE(HAVE_SYS_NDIR_H) ;; sys/ndir.h) AC_DEFINE(HAVE_SYS_NDIR_H) ;;
@ -448,12 +458,13 @@ sys/dir.h) AC_DEFINE(HAVE_SYS_DIR_H) ;;
ndir.h) AC_DEFINE(HAVE_NDIR_H) ;; ndir.h) AC_DEFINE(HAVE_NDIR_H) ;;
esac esac
AC_MSG_CHECKING(for closedir return value) AC_MSG_CHECKING(whether closedir returns void)
AC_CACHE_VAL(ac_cv_func_closedir_void, AC_CACHE_VAL(ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h> [AC_TRY_RUN([#include <sys/types.h>
#include <$ac_cv_header_dir> #include <$ac_cv_header_dir>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }], int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl
AC_MSG_RESULT($ac_cv_func_closedir_void)
if test $ac_cv_func_closedir_void = yes; then if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(CLOSEDIR_VOID) AC_DEFINE(CLOSEDIR_VOID)
fi fi
@ -471,6 +482,7 @@ AC_TRY_LINK([#include <sys/types.h>
#include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break) #include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break)
done])dnl done])dnl
AC_MSG_RESULT($ac_cv_header_dir)
case "$ac_cv_header_dir" in case "$ac_cv_header_dir" in
dirent.h) AC_DEFINE(DIRENT) ;; dirent.h) AC_DEFINE(DIRENT) ;;
sys/ndir.h) AC_DEFINE(SYSNDIR) ;; sys/ndir.h) AC_DEFINE(SYSNDIR) ;;
@ -478,12 +490,13 @@ sys/dir.h) AC_DEFINE(SYSDIR) ;;
ndir.h) AC_DEFINE(NDIR) ;; ndir.h) AC_DEFINE(NDIR) ;;
esac esac
AC_MSG_CHECKING(for closedir return value) AC_MSG_CHECKING(whether closedir returns void)
AC_CACHE_VAL(ac_cv_func_closedir_void, AC_CACHE_VAL(ac_cv_func_closedir_void,
[AC_TRY_RUN([#include <sys/types.h> [AC_TRY_RUN([#include <sys/types.h>
#include <$ac_cv_header_dir> #include <$ac_cv_header_dir>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }], int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl
AC_MSG_RESULT($ac_cv_func_closedir_void)
if test $ac_cv_func_closedir_void = yes; then if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(VOID_CLOSEDIR) AC_DEFINE(VOID_CLOSEDIR)
fi fi
@ -515,6 +528,7 @@ You lose.
#endif #endif
#endif /* S_ISSOCK */ #endif /* S_ISSOCK */
], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])dnl ], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)])dnl
AC_MSG_RESULT($ac_cv_header_stat_broken)
if test $ac_cv_header_stat_broken = yes; then if test $ac_cv_header_stat_broken = yes; then
AC_DEFINE(STAT_MACROS_BROKEN) AC_DEFINE(STAT_MACROS_BROKEN)
fi fi
@ -530,6 +544,7 @@ AC_CACHE_VAL(ac_cv_decl_sys_siglist,
#include <unistd.h> #include <unistd.h>
#endif], [char *msg = *(sys_siglist + 1);], #endif], [char *msg = *(sys_siglist + 1);],
ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])dnl ac_cv_decl_sys_siglist=yes, ac_cv_decl_sys_siglist=no)])dnl
AC_MSG_RESULT($ac_cv_decl_sys_siglist)
if test $ac_cv_decl_sys_siglist = yes; then if test $ac_cv_decl_sys_siglist = yes; then
AC_DEFINE(SYS_SIGLIST_DECLARED) AC_DEFINE(SYS_SIGLIST_DECLARED)
fi fi
@ -541,7 +556,7 @@ dnl
dnl dnl
define(AC_TYPE_GETGROUPS, define(AC_TYPE_GETGROUPS,
[AC_REQUIRE([AC_TYPE_UID_T])dnl [AC_REQUIRE([AC_TYPE_UID_T])dnl
AC_MSG_CHECKING(for type of array argument to getgroups) AC_MSG_CHECKING(type of array argument to getgroups)
AC_CACHE_VAL(ac_cv_type_getgroups, AC_CACHE_VAL(ac_cv_type_getgroups,
[changequote(, )dnl [changequote(, )dnl
dnl Do not put single quotes in the C program text! dnl Do not put single quotes in the C program text!
@ -568,6 +583,7 @@ main()
changequote([, ])dnl changequote([, ])dnl
AC_TRY_RUN([$ac_prog], AC_TRY_RUN([$ac_prog],
ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)])dnl ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)])dnl
AC_MSG_RESULT($ac_cv_type_getgroups)
AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups) AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
])dnl ])dnl
dnl dnl
@ -577,6 +593,7 @@ AC_MSG_CHECKING(for uid_t in sys/types.h)
AC_CACHE_VAL(ac_cv_type_uid_t, AC_CACHE_VAL(ac_cv_type_uid_t,
[AC_EGREP_HEADER(uid_t, sys/types.h, [AC_EGREP_HEADER(uid_t, sys/types.h,
ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])dnl ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)])dnl
AC_MSG_RESULT($ac_cv_type_uid_t)
if test $ac_cv_type_uid_t = no; then if test $ac_cv_type_uid_t = no; then
AC_DEFINE(uid_t, int) AC_DEFINE(uid_t, int)
AC_DEFINE(gid_t, int) AC_DEFINE(gid_t, int)
@ -605,6 +622,7 @@ AC_CACHE_VAL(ac_cv_type_signal,
#endif #endif
extern void (*signal ()) ();], extern void (*signal ()) ();],
[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])dnl [int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])dnl
AC_MSG_RESULT($ac_cv_type_signal)
AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal) AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal)
])dnl ])dnl
dnl dnl
@ -682,6 +700,7 @@ main()
exit(0); exit(0);
} }
], ac_cv_func_mmap=yes, ac_cv_func_mmap=no)])dnl ], ac_cv_func_mmap=yes, ac_cv_func_mmap=no)])dnl
AC_MSG_RESULT($ac_cv_func_mmap)
if test $ac_cv_func_mmap = yes; then if test $ac_cv_func_mmap = yes; then
AC_DEFINE(HAVE_MMAP) AC_DEFINE(HAVE_MMAP)
fi fi
@ -800,6 +819,7 @@ main() {
); );
} }
}], ac_cv_func_vfork=yes, ac_cv_func_vfork=no)])dnl }], ac_cv_func_vfork=yes, ac_cv_func_vfork=no)])dnl
AC_MSG_RESULT($ac_cv_func_vfork)
if test $ac_cv_func_vfork = no; then if test $ac_cv_func_vfork = no; then
AC_DEFINE(vfork, fork) AC_DEFINE(vfork, fork)
fi fi
@ -835,6 +855,7 @@ main() {
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
} }
}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no)])dnl }], ac_cv_func_wait3=yes, ac_cv_func_wait3=no)])dnl
AC_MSG_RESULT($ac_cv_func_wait3)
if test $ac_cv_func_wait3 = yes; then if test $ac_cv_func_wait3 = yes; then
AC_DEFINE(HAVE_WAIT3) AC_DEFINE(HAVE_WAIT3)
fi fi
@ -847,6 +868,7 @@ AC_MSG_CHECKING([for working alloca.h])
AC_CACHE_VAL(ac_cv_header_alloca_h, AC_CACHE_VAL(ac_cv_header_alloca_h,
[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));], [AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])dnl ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])dnl
AC_MSG_RESULT($ac_cv_header_alloca_h)
if test $ac_cv_header_alloca_h = yes; then if test $ac_cv_header_alloca_h = yes; then
AC_DEFINE(HAVE_ALLOCA_H) AC_DEFINE(HAVE_ALLOCA_H)
fi fi
@ -870,6 +892,7 @@ char *alloca ();
#endif #endif
], [char *p = (char *) alloca(1);], ], [char *p = (char *) alloca(1);],
ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])dnl ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])dnl
AC_MSG_RESULT($ac_cv_func_alloca)
if test $ac_cv_func_alloca = yes; then if test $ac_cv_func_alloca = yes; then
AC_DEFINE(HAVE_ALLOCA) AC_DEFINE(HAVE_ALLOCA)
fi fi
@ -882,17 +905,21 @@ if test $ac_cv_func_alloca = no; then
ALLOCA=alloca.o ALLOCA=alloca.o
AC_DEFINE(C_ALLOCA) AC_DEFINE(C_ALLOCA)
AC_MSG_CHECKING(whether Cray hooks are needed for C alloca) AC_MSG_CHECKING(whether alloca needs Cray hooks)
AC_EGREP_CPP(webecray, AC_CACHE_VAL(ac_cv_os_cray,
[AC_EGREP_CPP(webecray,
[#if defined(CRAY) && ! defined(CRAY2) [#if defined(CRAY) && ! defined(CRAY2)
webecray webecray
#else #else
wenotbecray wenotbecray
#endif #endif
], ], ac_cv_os_cray=yes, ac_cv_os_cray=no)])dnl
AC_MSG_RESULT($ac_cv_os_cray)
if test $ac_cv_os_cray = yes; then
AC_CHECK_FUNC([_getb67], AC_DEFINE(CRAY_STACKSEG_END, _getb67), AC_CHECK_FUNC([_getb67], AC_DEFINE(CRAY_STACKSEG_END, _getb67),
AC_CHECK_FUNC([GETB67], AC_DEFINE(CRAY_STACKSEG_END, GETB67), AC_CHECK_FUNC([GETB67], AC_DEFINE(CRAY_STACKSEG_END, GETB67),
AC_CHECK_FUNC([getb67], AC_DEFINE(CRAY_STACKSEG_END, getb67))))) AC_CHECK_FUNC([getb67], AC_DEFINE(CRAY_STACKSEG_END, getb67))))
fi
AC_MSG_CHECKING(stack direction for C alloca) AC_MSG_CHECKING(stack direction for C alloca)
AC_CACHE_VAL(ac_cv_c_stack_direction, AC_CACHE_VAL(ac_cv_c_stack_direction,
@ -913,6 +940,7 @@ main ()
exit (find_stack_direction() < 0); exit (find_stack_direction() < 0);
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, }], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
ac_cv_c_stack_direction=0)])dnl ac_cv_c_stack_direction=0)])dnl
AC_MSG_RESULT($ac_cv_c_stack_direction)
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
fi fi
AC_SUBST(ALLOCA)dnl AC_SUBST(ALLOCA)dnl
@ -974,6 +1002,7 @@ AC_CACHE_VAL(ac_cv_struct_nlist_n_un,
[AC_TRY_LINK([#include <nlist.h>], [AC_TRY_LINK([#include <nlist.h>],
[struct nlist n; n.n_un.n_name = 0;], [struct nlist n; n.n_un.n_name = 0;],
ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl
AC_MSG_RESULT($ac_cv_struct_nlist_n_un)
if test $ac_cv_struct_nlist_n_un = yes; then if test $ac_cv_struct_nlist_n_un = yes; then
AC_DEFINE(NLIST_NAME_UNION) AC_DEFINE(NLIST_NAME_UNION)
fi fi
@ -987,6 +1016,7 @@ AC_CACHE_VAL(ac_cv_func_getloadavg_setgid,
Yowza Am I SETGID yet Yowza Am I SETGID yet
#endif], #endif],
ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])dnl ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])dnl
AC_MSG_RESULT($ac_cv_func_getloadavg_setgid)
if test $ac_cv_func_getloadavg_setgid = yes; then if test $ac_cv_func_getloadavg_setgid = yes; then
NEED_SETGID=true AC_DEFINE(GETLOADAVG_PRIVILEGED) NEED_SETGID=true AC_DEFINE(GETLOADAVG_PRIVILEGED)
fi fi
@ -1008,13 +1038,13 @@ AC_CACHE_VAL(ac_cv_group_kmem,
changequote([, ])dnl changequote([, ])dnl
])dnl ])dnl
KMEM_GROUP=$ac_cv_group_kmem KMEM_GROUP=$ac_cv_group_kmem
AC_MSG_RESULT(/dev/kmem is owned by $KMEM_GROUP) AC_MSG_RESULT($KMEM_GROUP)
fi fi
AC_SUBST(KMEM_GROUP)dnl AC_SUBST(KMEM_GROUP)dnl
])dnl ])dnl
dnl dnl
define(AC_FUNC_UTIME_NULL, define(AC_FUNC_UTIME_NULL,
[AC_MSG_CHECKING(utime with null argument) [AC_MSG_CHECKING(whether utime accepts a null argument)
AC_CACHE_VAL(ac_cv_func_utime_null, AC_CACHE_VAL(ac_cv_func_utime_null,
[rm -f conftestdata; > conftestdata [rm -f conftestdata; > conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
@ -1027,6 +1057,7 @@ exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
&& t.st_mtime - s.st_mtime < 120)); && t.st_mtime - s.st_mtime < 120));
}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no) }], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no)
rm -f core])dnl rm -f core])dnl
AC_MSG_RESULT($ac_cv_func_utime_null)
if test $ac_cv_func_utime_null = yes; then if test $ac_cv_func_utime_null = yes; then
AC_DEFINE(HAVE_UTIME_NULL) AC_DEFINE(HAVE_UTIME_NULL)
fi fi
@ -1042,6 +1073,7 @@ main ()
strcoll ("ABC", "DEF") >= 0 || strcoll ("ABC", "DEF") >= 0 ||
strcoll ("123", "456") >= 0); strcoll ("123", "456") >= 0);
}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no)])dnl }], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no)])dnl
AC_MSG_RESULT($ac_cv_func_strcoll)
if test $ac_cv_func_strcoll = yes; then if test $ac_cv_func_strcoll = yes; then
AC_DEFINE(HAVE_STRCOLL) AC_DEFINE(HAVE_STRCOLL)
fi fi
@ -1062,6 +1094,7 @@ main () {
exit(0); /* Non-reversed systems segv here. */ exit(0); /* Non-reversed systems segv here. */
}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no) }], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no)
rm -f core])dnl rm -f core])dnl
AC_MSG_RESULT($ac_cv_func_setvbuf_reversed)
if test $ac_cv_func_setvbuf_reversed = yes; then if test $ac_cv_func_setvbuf_reversed = yes; then
AC_DEFINE(SETVBUF_REVERSED) AC_DEFINE(SETVBUF_REVERSED)
fi fi
@ -1073,12 +1106,13 @@ dnl
dnl dnl
define(AC_STRUCT_TM, define(AC_STRUCT_TM,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
AC_MSG_CHECKING([for struct tm in sys/time.h instead of time.h]) AC_MSG_CHECKING([whether struct tm is in sys/time.h or time.h])
AC_CACHE_VAL(ac_cv_struct_tm, AC_CACHE_VAL(ac_cv_struct_tm,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <time.h>], #include <time.h>],
[struct tm *tp; tp->tm_sec;], [struct tm *tp; tp->tm_sec;],
ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])dnl ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])dnl
AC_MSG_RESULT($ac_cv_struct_tm)
if test $ac_cv_struct_tm = sys/time.h; then if test $ac_cv_struct_tm = sys/time.h; then
AC_DEFINE(TM_IN_SYS_TIME) AC_DEFINE(TM_IN_SYS_TIME)
fi fi
@ -1091,6 +1125,7 @@ AC_CACHE_VAL(ac_cv_header_time,
#include <sys/time.h> #include <sys/time.h>
#include <time.h>], #include <time.h>],
[struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])dnl [struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])dnl
AC_MSG_RESULT($ac_cv_header_time)
if test $ac_cv_header_time = yes; then if test $ac_cv_header_time = yes; then
AC_DEFINE(TIME_WITH_SYS_TIME) AC_DEFINE(TIME_WITH_SYS_TIME)
fi fi
@ -1103,6 +1138,7 @@ AC_CACHE_VAL(ac_cv_struct_tm_zone,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;], #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])dnl ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])dnl
AC_MSG_RESULT($ac_cv_struct_tm_zone)
if test "$ac_cv_struct_tm_zone" = yes; then if test "$ac_cv_struct_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE) AC_DEFINE(HAVE_TM_ZONE)
else else
@ -1114,6 +1150,7 @@ AC_CACHE_VAL(ac_cv_var_tzname,
extern char *tzname[]; /* RS6000 and others reject char **tzname. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif>>, changequote([, ])dnl #endif>>, changequote([, ])dnl
[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])dnl [atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])dnl
AC_MSG_RESULT($ac_cv_var_tzname)
if test $ac_cv_var_tzname = yes; then if test $ac_cv_var_tzname = yes; then
AC_DEFINE(HAVE_TZNAME) AC_DEFINE(HAVE_TZNAME)
fi fi
@ -1126,6 +1163,7 @@ AC_CACHE_VAL(ac_cv_struct_st_blocks,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_blocks;], #include <sys/stat.h>], [struct stat s; s.st_blocks;],
ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])dnl ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])dnl
AC_MSG_RESULT($ac_cv_struct_st_blocks)
if test $ac_cv_struct_st_blocks = yes; then if test $ac_cv_struct_st_blocks = yes; then
AC_DEFINE(HAVE_ST_BLOCKS) AC_DEFINE(HAVE_ST_BLOCKS)
else else
@ -1140,6 +1178,7 @@ AC_CACHE_VAL(ac_cv_struct_st_blksize,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_blksize;], #include <sys/stat.h>], [struct stat s; s.st_blksize;],
ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])dnl ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])dnl
AC_MSG_RESULT($ac_cv_struct_st_blksize)
if test $ac_cv_struct_st_blksize = yes; then if test $ac_cv_struct_st_blksize = yes; then
AC_DEFINE(HAVE_ST_BLKSIZE) AC_DEFINE(HAVE_ST_BLKSIZE)
fi fi
@ -1151,6 +1190,7 @@ AC_CACHE_VAL(ac_cv_struct_st_rdev,
[AC_TRY_LINK([#include <sys/types.h> [AC_TRY_LINK([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_rdev;], #include <sys/stat.h>], [struct stat s; s.st_rdev;],
ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])dnl ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])dnl
AC_MSG_RESULT($ac_cv_struct_st_rdev)
if test $ac_cv_struct_st_rdev = yes; then if test $ac_cv_struct_st_rdev = yes; then
AC_DEFINE(HAVE_ST_RDEV) AC_DEFINE(HAVE_ST_RDEV)
fi fi
@ -1160,21 +1200,18 @@ dnl
dnl ### Checks for compiler characteristics dnl ### Checks for compiler characteristics
dnl dnl
dnl dnl
define(AC_TRY_CROSS, define(AC_C_CROSS,
[AC_PROVIDE([$0])dnl [AC_PROVIDE([$0])dnl
# If we cannot run a trivial program, we must be cross compiling. # If we cannot run a trivial program, we must be cross compiling.
AC_MSG_CHECKING(whether cross-compiling) AC_MSG_CHECKING(whether cross-compiling)
AC_CACHE_VAL(ac_cv_c_cross, AC_CACHE_VAL(ac_cv_c_cross,
[AC_TRY_RUN([main(){exit(0);}], ac_cv_c_cross=no, ac_cv_c_cross=yes)])dnl [AC_TRY_RUN([main(){exit(0);}], ac_cv_c_cross=no, ac_cv_c_cross=yes)])dnl
cross_compiling=$ac_cv_c_cross cross_compiling=$ac_cv_c_cross
if test $ac_cv_c_cross = yes; then AC_MSG_RESULT($ac_cv_c_cross)
AC_MSG_RESULT(we are cross-compiling) ])dnl
else
AC_MSG_RESULT(we are not cross-compiling)
fi])dnl
dnl dnl
define(AC_C_CHAR_UNSIGNED, define(AC_C_CHAR_UNSIGNED,
[AC_MSG_CHECKING(for unsigned characters) [AC_MSG_CHECKING(whether char is unsigned)
AC_CACHE_VAL(ac_cv_c_char_unsigned, AC_CACHE_VAL(ac_cv_c_char_unsigned,
[AC_TRY_RUN( [AC_TRY_RUN(
[/* volatile prevents gcc2 from optimizing the test away on sparcs. */ [/* volatile prevents gcc2 from optimizing the test away on sparcs. */
@ -1188,6 +1225,7 @@ main() {
volatile char c = 255; exit(c < 0); volatile char c = 255; exit(c < 0);
#endif #endif
}], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)])dnl }], ac_cv_c_char_unsigned=yes, ac_cv_c_char_unsigned=no)])dnl
AC_MSG_RESULT($ac_cv_c_char_unsigned)
if test $ac_cv_c_char_unsigned = yes; then if test $ac_cv_c_char_unsigned = yes; then
AC_DEFINE(__CHAR_UNSIGNED__) AC_DEFINE(__CHAR_UNSIGNED__)
fi fi
@ -1207,6 +1245,7 @@ long double foo = 0.0;
exit(sizeof(long double) < sizeof(double)); }], exit(sizeof(long double) < sizeof(double)); }],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no) ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_c_long_double)
if test $ac_cv_c_long_double = yes; then if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE) AC_DEFINE(HAVE_LONG_DOUBLE)
fi fi
@ -1216,18 +1255,20 @@ define(AC_INT_16_BITS,
[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)]) [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)])
AC_MSG_CHECKING(integer size) AC_MSG_CHECKING(integer size)
AC_TRY_RUN([main() { exit(sizeof(int) != 2); }], AC_TRY_RUN([main() { exit(sizeof(int) != 2); }],
AC_DEFINE(INT_16_BITS)) [AC_MSG_RESULT(16 bits)
AC_DEFINE(INT_16_BITS)], AC_MSG_RESULT(not 16 bits))
])dnl ])dnl
dnl dnl
define(AC_LONG_64_BITS, define(AC_LONG_64_BITS,
[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)]) [AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)])
AC_MSG_CHECKING(for 64-bit long ints) AC_MSG_CHECKING(for 64-bit long ints)
AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }], AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }],
AC_DEFINE(LONG_64_BITS)) [AC_MSG_RESULT(64 bits)
AC_DEFINE(LONG_64_BITS)], AC_MSG_RESULT(not 64 bits))
])dnl ])dnl
dnl dnl
define(AC_C_BIGENDIAN, define(AC_C_BIGENDIAN,
[AC_MSG_CHECKING(byte ordering) [AC_MSG_CHECKING(whether byte ordering is bigendian)
AC_CACHE_VAL(ac_cv_c_bigendian, AC_CACHE_VAL(ac_cv_c_bigendian,
[AC_TRY_RUN([main () { [AC_TRY_RUN([main () {
/* Are we little or big endian? From Harbison&Steele. */ /* Are we little or big endian? From Harbison&Steele. */
@ -1239,6 +1280,7 @@ AC_CACHE_VAL(ac_cv_c_bigendian,
u.l = 1; u.l = 1;
exit (u.c[sizeof (long) - 1] == 1); exit (u.c[sizeof (long) - 1] == 1);
}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)])dnl }], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)])dnl
AC_MSG_RESULT($ac_cv_c_bigendian)
if test $ac_cv_c_bigendian = yes; then if test $ac_cv_c_bigendian = yes; then
AC_DEFINE(WORDS_BIGENDIAN) AC_DEFINE(WORDS_BIGENDIAN)
fi fi
@ -1259,6 +1301,7 @@ y(a, b) int *b; {
return a == 1 && b[0] == 2 && b[1] == 3 && b[2] == 4; return a == 1 && b[0] == 2 && b[1] == 3 && b[2] == 4;
}], ac_cv_c_arg_array=no, ac_cv_c_arg_array=yes) }], ac_cv_c_arg_array=no, ac_cv_c_arg_array=yes)
rm -f core])dnl rm -f core])dnl
AC_MSG_RESULT($ac_cv_c_arg_array)
if test $ac_cv_c_arg_array = no; then if test $ac_cv_c_arg_array = no; then
AC_DEFINE(NO_ARG_ARRAY) AC_DEFINE(NO_ARG_ARRAY)
fi fi
@ -1273,13 +1316,15 @@ AC_TRY_LINK(, [} inline foo() {], ac_cv_c_inline=yes, ac_cv_c_inline=no)
else else
ac_cv_c_inline=no ac_cv_c_inline=no
fi])dnl fi])dnl
AC_MSG_RESULT($ac_cv_c_inline)
if test $ac_cv_c_inline = no; then if test $ac_cv_c_inline = no; then
AC_DEFINE(inline, __inline) AC_DEFINE(inline, __inline)
fi fi
])dnl ])dnl
define(AC_C_CONST, define(AC_C_CONST,
[dnl Do not "break" this again. [dnl This message is consistent in form with the other checking messages,
AC_MSG_CHECKING([for lack of working const]) dnl and with the result message.
AC_MSG_CHECKING([for working const])
AC_CACHE_VAL(ac_cv_c_const, AC_CACHE_VAL(ac_cv_c_const,
[changequote(, )dnl [changequote(, )dnl
dnl Do not put single quotes in the C program text! dnl Do not put single quotes in the C program text!
@ -1323,6 +1368,7 @@ ccp = (char const *const *) p;
}' }'
changequote([, ])dnl changequote([, ])dnl
AC_TRY_LINK(, [$ac_prog], ac_cv_c_const=yes, ac_cv_c_const=no)])dnl AC_TRY_LINK(, [$ac_prog], ac_cv_c_const=yes, ac_cv_c_const=no)])dnl
AC_MSG_RESULT($ac_cv_c_const)
if test $ac_cv_c_const = no; then if test $ac_cv_c_const = no; then
AC_DEFINE(const, ) AC_DEFINE(const, )
fi fi
@ -1346,6 +1392,7 @@ else
ac_cv_sys_interpreter=no ac_cv_sys_interpreter=no
fi fi
rm -f conftest])dnl rm -f conftest])dnl
AC_MSG_RESULT($ac_cv_sys_interpreter)
if test $ac_cv_sys_interpreter = yes; then if test $ac_cv_sys_interpreter = yes; then
ifelse([$1], , :, [$1]) ifelse([$1], , :, [$1])
ifelse([$2], , , [else ifelse([$2], , , [else
@ -1354,13 +1401,14 @@ ifelse([$2], , , [else
fi fi
])dnl ])dnl
define(AC_SYS_REMOTE_TAPE, define(AC_SYS_REMOTE_TAPE,
[AC_MSG_CHECKING(for remote tape and socket header files) [AC_CHECK_HEADER(sys/mtio.h, AC_DEFINE(HAVE_SYS_MTIO_H))
AC_CHECK_HEADER(sys/mtio.h, AC_DEFINE(HAVE_SYS_MTIO_H))
if test "$ac_cv_header_mtio_h" = yes; then if test "$ac_cv_header_mtio_h" = yes; then
AC_MSG_CHECKING(for remote tape header files)
AC_CACHE_VAL(ac_cv_header_rmt, AC_CACHE_VAL(ac_cv_header_rmt,
[AC_TRY_CPP([#include <sgtty.h> [AC_TRY_CPP([#include <sgtty.h>
#include <sys/socket.h>], ac_cv_header_rmt=yes, ac_cv_header_rmt=no)])dnl #include <sys/socket.h>], ac_cv_header_rmt=yes, ac_cv_header_rmt=no)])dnl
AC_MSG_RESULT($ac_cv_header_rmt)
if test $ac_cv_header_rmt = yes; then if test $ac_cv_header_rmt = yes; then
PROGS="$PROGS rmt" PROGS="$PROGS rmt"
fi fi
@ -1393,6 +1441,7 @@ for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib`
fi fi
rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2> /dev/null rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2> /dev/null
done])dnl done])dnl
AC_MSG_RESULT($ac_cv_sys_long_file_names)
if test $ac_cv_sys_long_file_names = yes; then if test $ac_cv_sys_long_file_names = yes; then
AC_DEFINE(HAVE_LONG_FILE_NAMES) AC_DEFINE(HAVE_LONG_FILE_NAMES)
fi fi
@ -1417,6 +1466,7 @@ main () {
exit (status == -1); exit (status == -1);
} }
], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])dnl ], ac_cv_sys_restartable_syscalls=yes, ac_cv_sys_restartable_syscalls=no)])dnl
AC_MSG_RESULT($ac_cv_sys_restartable_syscalls)
if test $ac_cv_sys_restartable_syscalls = yes; then if test $ac_cv_sys_restartable_syscalls = yes; then
AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS) AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS)
fi fi
@ -1435,7 +1485,7 @@ test -n "$x_includes" && ac_cv_x_includes="$x_includes"
test -n "$x_libraries" && ac_cv_x_includes="$x_libraries" test -n "$x_libraries" && ac_cv_x_includes="$x_libraries"
if test "${ac_cv_x_includes+set}" = set && if test "${ac_cv_x_includes+set}" = set &&
test "${ac_cv_x_libraries+set}" = set; then test "${ac_cv_x_libraries+set}" = set; then
AC_MSG_RESULT(using cached values for ac_cv_x_includes and ac_cv_x_libraries) AC_VERBOSE(using cached values for ac_cv_x_includes and ac_cv_x_libraries)
else else
AC_PATH_X_XMKMF AC_PATH_X_XMKMF
fi fi
@ -1455,14 +1505,14 @@ if test -z "$x_libraries" && test "$ac_cv_x_libraries" != NONE; then
x_libraries="$ac_cv_x_libraries" x_libraries="$ac_cv_x_libraries"
fi fi
test -n "$x_includes" && AC_MSG_RESULT(X11 headers are in $x_includes) test -n "$x_includes" && AC_VERBOSE(X11 headers are in $x_includes)
test -n "$x_libraries" && AC_MSG_RESULT(X11 libraries are in $x_libraries) test -n "$x_libraries" && AC_VERBOSE(X11 libraries are in $x_libraries)
fi # No --with-x=no. fi # No --with-x=no.
])dnl ])dnl
dnl dnl
dnl Internal subroutine of AC_PATH_X. dnl Internal subroutine of AC_PATH_X.
define(AC_PATH_X_XMKMF, define(AC_PATH_X_XMKMF,
[AC_MSG_CHECKING(for X include and library files with xmkmf) [AC_CHECKING(for X include and library files with xmkmf)
rm -fr conftestdir rm -fr conftestdir
if mkdir conftestdir; then if mkdir conftestdir; then
cd conftestdir cd conftestdir
@ -1496,7 +1546,7 @@ fi
dnl dnl
dnl Internal subroutine of AC_PATH_X. dnl Internal subroutine of AC_PATH_X.
define(AC_PATH_X_DIRECT, define(AC_PATH_X_DIRECT,
[AC_MSG_CHECKING(for X include and library files directly) [AC_CHECKING(for X include and library files directly)
test -z "$x_direct_TRY_library" && x_direct_TRY_library=Xt test -z "$x_direct_TRY_library" && x_direct_TRY_library=Xt
test -z "$x_direct_TRY_include" && x_direct_TRY_include=X11/Intrinsic.h test -z "$x_direct_TRY_include" && x_direct_TRY_include=X11/Intrinsic.h
AC_TRY_CPP([#include <$x_direct_TRY_include>], no_x=, AC_TRY_CPP([#include <$x_direct_TRY_include>], no_x=,
@ -1597,7 +1647,7 @@ dnl Find additional X libraries, magic flags, etc.
define(AC_PATH_XTRA, define(AC_PATH_XTRA,
[AC_REQUIRE([AC_OS_ISC])dnl [AC_REQUIRE([AC_OS_ISC])dnl
AC_REQUIRE([AC_PATH_X])dnl AC_REQUIRE([AC_PATH_X])dnl
AC_MSG_CHECKING(for additional X libraries and flags) AC_CHECKING(for additional X libraries and flags)
if test -n "$x_includes"; then if test -n "$x_includes"; then
X_CFLAGS="$X_CFLAGS -I$x_includes" X_CFLAGS="$X_CFLAGS -I$x_includes"
elif test "$no_x" = yes; then elif test "$no_x" = yes; then
@ -1637,9 +1687,9 @@ else
fi fi
fi fi
# #
AC_MSG_RESULT(X compiler flags: $X_CFLAGS) AC_VERBOSE(X compiler flags: $X_CFLAGS)
AC_MSG_RESULT(X library flags: $X_LIBS) AC_VERBOSE(X library flags: $X_LIBS)
AC_MSG_RESULT(extra X libraries: $X_EXTRA_LIBS) AC_VERBOSE(extra X libraries: $X_EXTRA_LIBS)
AC_SUBST(X_CFLAGS)dnl AC_SUBST(X_CFLAGS)dnl
AC_SUBST(X_LIBS)dnl AC_SUBST(X_LIBS)dnl
AC_SUBST(X_EXTRA_LIBS)dnl AC_SUBST(X_EXTRA_LIBS)dnl
@ -1651,15 +1701,15 @@ dnl These are kludges; we need a more systematic approach.
dnl dnl
dnl dnl
define(AC_OS_AIX, define(AC_OS_AIX,
[AC_MSG_CHECKING(for AIX) [AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_BEFORE([$0], [AC_TRY_CPP])dnl AC_BEFORE([$0], [AC_TRY_CPP])dnl
AC_MSG_CHECKING(for AIX)
AC_EGREP_CPP(yes, AC_EGREP_CPP(yes,
[#ifdef _AIX [#ifdef _AIX
yes yes
#endif #endif
], AC_DEFINE(_ALL_SOURCE)) ], [AC_MSG_RESULT(yes); AC_DEFINE(_ALL_SOURCE)], AC_MSG_RESULT(no))
])dnl ])dnl
dnl dnl
define(AC_OS_MINIX, define(AC_OS_MINIX,
@ -1667,7 +1717,7 @@ define(AC_OS_MINIX,
AC_BEFORE([$0], [AC_TRY_RUN])dnl AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_BEFORE([$0], [AC_TRY_CPP])dnl AC_BEFORE([$0], [AC_TRY_CPP])dnl
AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=)
# The Minix shell ca not assign to the same variable on the same line! # The Minix shell can not assign to the same variable on the same line!
if test "$MINIX" = yes; then if test "$MINIX" = yes; then
AC_DEFINE(_POSIX_SOURCE) AC_DEFINE(_POSIX_SOURCE)
AC_DEFINE(_POSIX_1_SOURCE, 2) AC_DEFINE(_POSIX_1_SOURCE, 2)
@ -1684,6 +1734,7 @@ AC_MSG_CHECKING(for POSIXized ISC)
if test -d /etc/conf/kconfig.d && if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1 grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1
then then
AC_MSG_RESULT(yes)
ISC=yes # If later tests want to check for ISC. ISC=yes # If later tests want to check for ISC.
AC_DEFINE(_POSIX_SOURCE) AC_DEFINE(_POSIX_SOURCE)
if test "$GCC" = yes; then if test "$GCC" = yes; then
@ -1692,6 +1743,7 @@ then
CC="$CC -Xp" CC="$CC -Xp"
fi fi
else else
AC_MSG_RESULT(no)
ISC= ISC=
fi fi
])dnl ])dnl
@ -1703,7 +1755,7 @@ AC_EGREP_CPP(yes,
[#if defined(M_XENIX) && !defined(M_UNIX) [#if defined(M_XENIX) && !defined(M_UNIX)
yes yes
#endif #endif
], XENIX=yes, XENIX=) ], [XENIX=yes AC_MSG_RESULT(yes)], [XENIX= AC_MSG_RESULT(no)])
if test "$XENIX" = yes; then if test "$XENIX" = yes; then
LIBS="$LIBS -lx" LIBS="$LIBS -lx"
case "$DEFS" in case "$DEFS" in