diff --git a/Makefile.in b/Makefile.in index 0bc04330..828a8444 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,7 +27,7 @@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi M4 = @M4@ -PROGS = autoconf autoheader autoreconf ifnames @PROGS@ +PROGS = autoconf autoheader autoreconf autoupdate ifnames @PROGS@ # Path of the perl interpreter. PERL = @PERL@ @@ -54,9 +54,10 @@ DISTDEP = info Makefile # Files to distribute. DISTFILES = COPYING ChangeLog INSTALL Makefile.in NEWS README \ acconfig.h acfunctions acgeneral.m4 acheaders acidentifiers \ - acmakevars acprograms acspecific.m4 autoconf.info* \ + acmakevars acoldnames.m4 acprograms acspecific.m4 autoconf.info* \ autoconf.sh autoconf.texi install.texi \ - autoheader.sh autoreconf.sh autoscan.pl shindent.sh ifnames.sh \ + autoheader.sh autoreconf.sh autoscan.pl autoupdate.sh \ + shindent.sh ifnames.sh \ config.guess config.sub configure configure.in \ install.sh mkinstalldirs texinfo.tex \ testsuite/Makefile.in testsuite/config/*.exp \ @@ -80,6 +81,10 @@ autoreconf: autoreconf.sh rm -f $@ $@.tmp $(editsh) $(srcdir)/autoreconf.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@ +autoupdate: autoupdate.sh + rm -f $@ $@.tmp + $(editsh) $(srcdir)/autoupdate.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@ + shindent: shindent.sh rm -f $@ $@.tmp $(editsh) $(srcdir)/shindent.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@ @@ -122,12 +127,15 @@ installdirs: $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir) # References to install-info have been removed until it's released. -install: all acgeneral.m4 acspecific.m4 acconfig.h installdirs install-info +install: all acgeneral.m4 acoldnames.m4 acspecific.m4 acconfig.h \ + installdirs install-info $(INSTALL_PROGRAM) autoconf $(bindir)/autoconf $(INSTALL_PROGRAM) autoheader $(bindir)/autoheader $(INSTALL_PROGRAM) autoreconf $(bindir)/autoreconf + $(INSTALL_PROGRAM) autoupdate $(bindir)/autoupdate $(INSTALL_PROGRAM) ifnames $(bindir)/ifnames $(INSTALL_DATA) $(srcdir)/acgeneral.m4 $(acdatadir)/acgeneral.m4 + $(INSTALL_DATA) $(srcdir)/acoldnames.m4 $(acdatadir)/acoldnames.m4 $(INSTALL_DATA) $(srcdir)/acspecific.m4 $(acdatadir)/acspecific.m4 $(INSTALL_DATA) $(srcdir)/acconfig.h $(acdatadir)/acconfig.h -if test -f autoscan; then \ @@ -154,16 +162,17 @@ install-info: info installdirs uninstall: rm -f $(bindir)/autoconf $(bindir)/autoheader $(bindir)/autoscan - rm -f $(bindir)/autoreconf $(bindir)/shindent $(bindir)/ifnames + rm -f $(bindir)/autoreconf $(bindir)/autoupdate + rm -f $(bindir)/shindent $(bindir)/ifnames rm -fr $(acdatadir) cd $(infodir); rm -f autoconf.info* if test -f standards.info || test -f $(srcdir)/standards.info; \ then cd $(infodir); rm -f standards.info*; fi -configure: configure.in acgeneral.m4 acspecific.m4 +configure: configure.in acgeneral.m4 acspecific.m4 acoldnames.m4 cd $(srcdir); \ rm -f $@ $@.tmp; \ - $(M4) acgeneral.m4 acspecific.m4 configure.in > $@.tmp && \ + $(M4) acgeneral.m4 acspecific.m4 acoldnames.m4 configure.in > $@.tmp && \ mv $@.tmp $@ && \ chmod +x $@ Makefile: Makefile.in config.status @@ -178,7 +187,8 @@ clean mostlyclean distclean realclean:: done clean:: - rm -f autoconf autoheader autoscan autoreconf shindent ifnames *.tmp + rm -f autoconf autoheader autoscan autoreconf autoupdate + rm -f shindent ifnames *.tmp rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.ma *.mas diff --git a/NEWS b/NEWS index e84006ea..2eec4333 100644 --- a/NEWS +++ b/NEWS @@ -15,13 +15,13 @@ Major changes in release 2.0: support deciding unguessable features based on the host and target types. * AC_CONFIG_SUBDIRS to recursively configure a source tree. * AC_CHECK_TYPE, which checks whether sys/types.h defines a given type. -* AC_TEST_LINK, which obsoletes AC_COMPILE_CHECK. -* AC_TEST_RUN, which obsoletes AC_TEST_PROGRAM. +* AC_TRY_LINK, which obsoletes AC_COMPILE_CHECK. * AC_PREFIX_PROGRAM, which obsoletes AC_PREFIX. * AC_ARG_ENABLE and AC_ARG_WITH, which obsolete AC_ENABLE and AC_WITH. * AC_SUBST_FILE, to insert one file into another. ** Changed macros: +* Many macros renamed, but old names are accepted for backward compatibility. * AC_OUTPUT adds the "automatically generated" comment after "#!" lines, not before them. * AC_OUTPUT does not replace "prefix" and "exec_prefix" in generated @@ -30,6 +30,8 @@ Major changes in release 2.0: override the file name "config.status". * AC_PROG_INSTALL looks for install.sh in the directory specified by AC_CONFIG_AUXDIR, or srcdir or srcdir/.. or srcdir/../.. by default. +* AC_HEADER_DIRENT (formerly AC_DIR_HEADER) defines standard macro + names as well as the old ones, e.g. HAVE_DIRENT_H as well as DIRENT. ** New utilities: * autoscan to generate a preliminary configure.in for a package by @@ -37,6 +39,7 @@ Major changes in release 2.0: programs, and header files. * autoreconf to recursively remake configure and configuration header files in a source tree. +* autoupdate to update a configure.in to use the new macro names. * shindent to produce consistent indentation in shell scripts, such as configure. * ifnames to list the symbols used in #if and #ifdef directives in a diff --git a/acgeneral.m4 b/acgeneral.m4 index 3f45e9e6..42062e5b 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -20,7 +20,7 @@ dnl Written by David MacKenzie, with help from dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, dnl Roland McGrath, Noah Friedman, and david d zuhn. dnl -changequote([,])dnl +changequote([, ])dnl undefine([eval])dnl undefine([include])dnl undefine([shift])dnl @@ -29,7 +29,7 @@ dnl ifdef([__gnu__], , [errprint(Autoconf requires GNU m4 )m4exit(2)])dnl dnl -define(AC_ACVERSION, 1.95)dnl +define(AC_ACVERSION, 1.96)dnl dnl This is defined by the --version option of the autoconf script. ifdef([AC_PRINT_VERSION], [Autoconf version AC_ACVERSION m4exit(0)])dnl @@ -47,7 +47,7 @@ define(AC_DIVERSION_ARG_ENABLE, 4)dnl --enable/--disable actions define(AC_DIVERSION_HELP_WITH, 5)dnl --with/--without help strings define(AC_DIVERSION_ARG_WITH, 6)dnl --with/--without actions dnl -define(AC_NOTICE, +define(AC_INIT_NOTICE, [# Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version] AC_ACVERSION [ # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. @@ -67,7 +67,7 @@ define(AC_NOTICE, # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ])dnl dnl -define(AC_PARSEARGS, +define(AC_INIT_PARSEARGS, [AC_BEFORE([$0], [AC_ARG_ENABLE])dnl AC_BEFORE([$0], [AC_ARG_WITH])dnl # Save the original args to write them into config.status later. @@ -75,7 +75,7 @@ configure_args="[$]@" # Omit some internal, obsolete, or unimplemented options to make the # list less imposing. -changequote(,)dnl +changequote(, )dnl ac_usage="Usage: configure [options] [host] Options: [defaults in brackets after descriptions] --build=BUILD configure for building on BUILD [BUILD=HOST] @@ -101,7 +101,7 @@ Options: [defaults in brackets after descriptions] undivert(AC_DIVERSION_HELP_ENABLE)dnl --with/--without options recognized: undivert(AC_DIVERSION_HELP_WITH)"dnl -changequote([,])dnl +changequote([, ])dnl # Initialize some variables set by options. # The variables have the same names as the options, with @@ -139,9 +139,9 @@ do fi case "$ac_option" in -changequote(,)dnl +changequote(, )dnl -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; -changequote([,])dnl +changequote([, ])dnl *) ac_optarg= ;; esac @@ -165,10 +165,10 @@ changequote([,])dnl -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then -changequote([,])dnl - AC_ERROR($ac_feature: invalid feature name) +changequote([, ])dnl + AC_MSG_ERROR($ac_feature: invalid feature name) fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; @@ -176,10 +176,10 @@ changequote([,])dnl -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then -changequote([,])dnl - AC_ERROR($ac_feature: invalid feature name) +changequote([, ])dnl + AC_MSG_ERROR($ac_feature: invalid feature name) fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in @@ -284,10 +284,10 @@ EOF -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then -changequote([,])dnl - AC_ERROR($ac_package: invalid package name) +changequote([, ])dnl + AC_MSG_ERROR($ac_package: invalid package name) fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in @@ -299,10 +299,10 @@ changequote([,])dnl -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then -changequote([,])dnl - AC_ERROR($ac_package: invalid package name) +changequote([, ])dnl + AC_MSG_ERROR($ac_package: invalid package name) fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; @@ -325,17 +325,17 @@ changequote([,])dnl | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; - -*) AC_ERROR([$ac_option: invalid option; use --help to show usage]) + -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage]) ;; *) -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -changequote([,])dnl - AC_WARN($ac_option: invalid host type) +changequote([, ])dnl + AC_MSG_WARN($ac_option: invalid host type) fi if test "x$nonopt" != xNONE; then - AC_ERROR(can only configure for one host and one target at a time) + AC_MSG_ERROR(can only configure for one host and one target at a time) fi nonopt="$ac_option" ;; @@ -344,7 +344,7 @@ changequote([,])dnl done if test -n "$ac_prev"; then - AC_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) + AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) fi ])dnl dnl @@ -357,12 +357,12 @@ dnl AC_REQUIRE inserts a newline after this. dnl define(AC_INIT, [AC_REQUIRE([AC_BINSH])dnl -AC_NOTICE -AC_PARSEARGS -AC_PREPARE($1)])dnl +AC_INIT_NOTICE +AC_INIT_PARSEARGS +AC_INIT_PREPARE($1)])dnl dnl -dnl AC_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) -define(AC_PREPARE, +dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) +define(AC_INIT_PREPARE, [AC_BEFORE([$0], [AC_ARG_ENABLE])dnl AC_BEFORE([$0], [AC_ARG_WITH])dnl AC_BEFORE([$0], [AC_CONFIG_HEADER])dnl @@ -408,9 +408,9 @@ for ac_arg in $ac_configure_temp; do | --no-cr | --no-c) ;; -norecursion | --norecursion | --norecursio | --norecursi \ | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;; -changequote(,)dnl +changequote(, )dnl *[" "]*) configure_args="$configure_args '$ac_arg'" ;; -changequote([,])dnl +changequote([, ])dnl *) configure_args="$configure_args $ac_arg" ;; esac done @@ -436,9 +436,9 @@ if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=[$]0 -changequote(,)dnl +changequote(, )dnl ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` -changequote([,])dnl +changequote([, ])dnl test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then @@ -449,13 +449,13 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - AC_ERROR(can not find sources in ${ac_confdir} or ..) + AC_MSG_ERROR(can not find sources in ${ac_confdir} or ..) else - AC_ERROR(can not find sources in ${srcdir}) + AC_MSG_ERROR(can not find sources in ${srcdir}) fi fi -ifdef([AC_LIST_SUBDIRS],[subdirs="AC_LIST_SUBDIRS" +ifdef([AC_LIST_SUBDIRS], [subdirs="AC_LIST_SUBDIRS" AC_SUBST(subdirs)])dnl ifdef([AC_LIST_PREFIX_PROGRAM], [AC_PREFIX(AC_LIST_PREFIX_PROGRAM)])dnl dnl Let the site file select an alternate cache file if it wants to. @@ -485,7 +485,7 @@ dnl dnl AC_ENABLE_INTERNAL(FEATURE, ACTION-IF-TRUE [, ACTION-IF-FALSE]) define(AC_ENABLE_INTERNAL, [[#] Check whether --enable-$1 or --disable-$1 was given. -enableval="[$enable_]patsubst($1,-,_)" +enableval="[$enable_]patsubst($1, -, _)" if test -n "$enableval"; then ifelse([$2], , :, [$2]) ifelse([$3], , , [else @@ -512,7 +512,7 @@ dnl dnl AC_WITH_INTERNAL(PACKAGE, ACTION-IF-TRUE [, ACTION-IF-FALSE]) define(AC_WITH_INTERNAL, [[#] Check whether --with-$1 or --without-$1 was given. -withval="[$with_]patsubst($1,-,_)" +withval="[$with_]patsubst($1, -, _)" if test -n "$withval"; then ifelse([$2], , :, [$2]) ifelse([$3], , , [else @@ -526,22 +526,22 @@ define(AC_CONFIG_HEADER, [AC_PROVIDE([$0])define(AC_LIST_HEADERS, $1)])dnl dnl dnl AC_REVISION(REVISION-INFO) define(AC_REVISION, [AC_PROVIDE([$0])AC_REQUIRE([AC_BINSH])dnl -[# From configure.in] translit([$1],$")])dnl +[# From configure.in] translit([$1], $")])dnl dnl dnl Subroutines of AC_PREREQ. dnl dnl Change the dots in version number $1 into commas. -define(AC_PREREQ_SPLIT, [translit($1,.,[,])])dnl +define(AC_PREREQ_SPLIT, [translit($1, ., [, ])])dnl dnl -dnl Default the ternary version number to 0 (e.g., 1,7 -> 1,7,0). -define(AC_PREREQ_CANON, [$1,$2,ifelse([$3],,0,[$3])])dnl +dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0). +define(AC_PREREQ_CANON, [$1, $2, ifelse([$3], , 0, [$3])])dnl dnl dnl Complain and exit if the version number in $1 through $3 is less than dnl the version number in $4 through $6. dnl $7 is the printable version of the second version number. define(AC_PREREQ_COMPARE, [ifelse(builtin([eval], -[$3 + $2 * 100 + $1 * 10000 < $6 + $5 * 100 + $4 * 10000]),1, +[$3 + $2 * 100 + $1 * 10000 < $6 + $5 * 100 + $4 * 10000]), 1, [errprint(Autoconf version $7 or higher is required )m4exit(3)])])dnl dnl @@ -550,7 +550,7 @@ dnl AC_PREREQ(VERSION) define(AC_PREREQ, [AC_PROVIDE([$0])dnl AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), -AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),[$1])])dnl +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])dnl dnl dnl Run configure in subdirectories $1. dnl Not actually done until AC_OUTPUT_SUBDIRS. @@ -558,26 +558,26 @@ dnl AC_CONFIG_SUBDIRS(DIR ...) define(AC_CONFIG_SUBDIRS, [AC_PROVIDE([$0])dnl AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -define([AC_LIST_SUBDIRS],[$1])])dnl +define([AC_LIST_SUBDIRS], [$1])])dnl dnl dnl Guess the value for the `prefix' variable by looking for dnl the argument program along PATH and taking its parent. dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc, dnl set `prefix' to /usr/local/gnu. dnl AC_PREFIX_PROGRAM(PROGRAM) -define(AC_PREFIX_PROGRAM, [define([AC_LIST_PREFIX_PROGRAM],[$1])])dnl +define(AC_PREFIX_PROGRAM, [define([AC_LIST_PREFIX_PROGRAM], [$1])])dnl define(AC_PREFIX_INTERNAL, [if test "x$prefix" = xNONE; then -changequote(<<,>>)dnl +changequote(<<, >>)dnl define(<>, translit($1, [a-z], [A-Z]))dnl -changequote([,])dnl -AC_PROGRAM_PATH(AC_VAR_NAME, $1) -changequote(<<,>>)dnl +changequote([, ])dnl +AC_PATH_PROG(AC_VAR_NAME, $1) +changequote(<<, >>)dnl if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'` -changequote([,])dnl +changequote([, ])dnl dnl test -z "$prefix" && prefix=/ - AC_VERBOSE(setting installation directory prefix to ${prefix}) + AC_MSG_RESULT(setting installation directory prefix to ${prefix}) fi fi undefine(AC_VAR_NAME)dnl @@ -615,7 +615,7 @@ for ac_dir in $1; do fi done if test -z "$ac_aux_dir"; then - AC_ERROR([can not find install.sh in $1]) + AC_MSG_ERROR([can not find install.sh in $1]) fi ac_config_guess=${ac_aux_dir}/config.guess ac_config_sub=${ac_aux_dir}/config.sub @@ -648,12 +648,12 @@ host_alias=$host target_alias=$target case $host_alias---$target_alias---$nonopt in NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) AC_ERROR(can only configure for one host and one target at a time) ;; +*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;; esac # Make sure we can run config.sub. if ${ac_config_sub} sun4 >/dev/null 2>&1; then : -else AC_ERROR(can not run ${ac_config_sub}) +else AC_MSG_ERROR(can not run ${ac_config_sub}) fi AC_CANONICAL_HOST @@ -664,14 +664,14 @@ dnl dnl Subroutines of AC_CANONICAL_SYSTEM. dnl define(AC_CANONICAL_HOST, -[AC_CHECKING(host type) +[AC_MSG_CHECKING(host type) case "${host_alias}" in NONE) case $nonopt in NONE) if host_alias=`${ac_config_guess}`; then : - else AC_ERROR(can not guess host type; you must specify one) + else AC_MSG_ERROR(can not guess host type; you must specify one) fi ;; *) host_alias=$nonopt ;; esac ;; @@ -681,7 +681,7 @@ host=`${ac_config_sub} ${host_alias}` host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` -test -n "$host" && AC_VERBOSE(setting host to $host) +test -n "$host" && AC_MSG_RESULT(setting host to $host) AC_SUBST(host)dnl AC_SUBST(host_alias)dnl AC_SUBST(host_cpu)dnl @@ -690,7 +690,7 @@ AC_SUBST(host_os)dnl ])dnl dnl define(AC_CANONICAL_TARGET, -[AC_CHECKING(target type) +[AC_MSG_CHECKING(target type) case "${target_alias}" in NONE) @@ -704,7 +704,7 @@ target=`${ac_config_sub} ${target_alias}` target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` -test -n "$target" && AC_VERBOSE(setting target to $target) +test -n "$target" && AC_MSG_RESULT(setting target to $target) AC_SUBST(target)dnl AC_SUBST(target_alias)dnl AC_SUBST(target_cpu)dnl @@ -713,7 +713,7 @@ AC_SUBST(target_os)dnl ])dnl dnl define(AC_CANONICAL_BUILD, -[AC_CHECKING(build type) +[AC_MSG_CHECKING(build type) case "${build_alias}" in NONE) build= build_alias= ;; @@ -724,7 +724,7 @@ build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` ;; esac -test -n "$build" && AC_VERBOSE(setting build to $build) +test -n "$build" && AC_MSG_RESULT(setting build to $build) AC_SUBST(build)dnl AC_SUBST(build_alias)dnl AC_SUBST(build_cpu)dnl @@ -737,7 +737,7 @@ dnl link name in $1. dnl Not actually done until AC_OUTPUT_LINKS. dnl AC_LINK_FILES(LINK ..., FILE ...) define(AC_LINK_FILES, -[define([AC_LIST_LINKS],[$1])define([AC_LIST_FILES],[$2])])dnl +[define([AC_LIST_LINKS], [$1])define([AC_LIST_FILES], [$2])])dnl dnl dnl dnl ### Caching test results @@ -756,7 +756,7 @@ fi for ac_site_dir in $ac_site_dirs; do ac_site_file=$ac_site_dir/lib/config.site if test -r "$ac_site_file"; then - AC_VERBOSE(loading site initialization script $ac_site_file) + AC_MSG_RESULT(loading site initialization script $ac_site_file) . $ac_site_file fi done @@ -764,16 +764,16 @@ done dnl define(AC_CACHE_LOAD, [if test -r "$cache_file"; then - AC_VERBOSE(loading test results from cache file $cache_file) + AC_MSG_RESULT(loading test results from cache file $cache_file) . $cache_file else - AC_VERBOSE(creating new cache file $cache_file) + AC_MSG_RESULT(creating new cache file $cache_file) > $cache_file fi])dnl dnl define(AC_CACHE_SAVE, [if test -w $cache_file; then -AC_VERBOSE(saving test results in cache file $cache_file) +AC_MSG_RESULT(saving test results in cache file $cache_file) cat > $cache_file <<\CEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -788,11 +788,11 @@ cat > $cache_file <<\CEOF # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. CEOF -changequote(,)dnl +changequote(, )dnl dnl Allow a site initialization script to override cache values. # Ultrix sh set writes to stderr and can't be redirected directly. (set) 2>&1 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1-'\2'}/p" >> $cache_file -changequote([,])dnl +changequote([, ])dnl fi])dnl dnl dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) @@ -803,7 +803,7 @@ dnl shell variable, so we need the eval. dnl if test "${$1+set}" = set; then if eval "test \"`echo '${'$1'+set}'`\" = set"; then dnl This verbose message is just for testing the caching code. - AC_VERBOSE(using cached value for $1) + AC_MSG_RESULT(using cached value for $1) else $2 fi @@ -817,28 +817,28 @@ dnl Several simple subroutines to do various flavors of quoting. dnl dnl Quote $1 against shell "s. define(AC_QUOTE_DQUOTE, [dnl We use \1 instead of \& to avoid an m4 1.0.3 bug. -patsubst($1, changequote(,)\([$"`\\]\)changequote([,]), \\\1)])dnl +patsubst($1, changequote(, )\([$"`\\]\)changequote([, ]), \\\1)])dnl dnl dnl Quote $1 against shell 's. define(AC_QUOTE_SQUOTE, [patsubst($1, ', '\\'')])dnl dnl dnl Quote $1 against shell here documents (<&5 " defining" $1 to be ifelse(AC_VAL,, empty, "AC_QUOTE_SQUOTE(AC_VAL)")], +echo 1>&5 " defining" $1 to be ifelse(AC_VAL, , empty, "AC_QUOTE_SQUOTE(AC_VAL)")], [define([AC_VAL], 1)dnl echo 1>&5 " defining $1"]) dnl @@ -887,11 +887,11 @@ dnl the top level, because m4 doesn't really support nested functions; dnl it doesn't distinguish between the arguments to the outer dnl function, which should be expanded, and the arguments to the inner dnl function, which shouldn't yet. -define(AC_QUOTE_IDENTITY,$1)dnl -define(AC_DEFINE_UNQUOTED,[dnl -pushdef([AC_QUOTE_SQUOTE],defn([AC_QUOTE_IDENTITY]))dnl -pushdef([AC_DEFINE_SEDQUOTE],defn([AC_QUOTE_IDENTITY]))dnl -AC_DEFINE($1,$2)dnl +define(AC_QUOTE_IDENTITY, $1)dnl +define(AC_DEFINE_UNQUOTED, [dnl +pushdef([AC_QUOTE_SQUOTE], defn([AC_QUOTE_IDENTITY]))dnl +pushdef([AC_DEFINE_SEDQUOTE], defn([AC_QUOTE_IDENTITY]))dnl +AC_DEFINE($1, $2)dnl popdef([AC_DEFINE_SEDQUOTE])dnl popdef([AC_QUOTE_SQUOTE])dnl ])dnl @@ -912,10 +912,10 @@ dnl dnl AC_SUBST_FILE(VARIABLE, FILE) define(AC_SUBST_FILE, [if test -f $2; then - AC_VERBOSE(using $2 for $1) + AC_MSG_RESULT(using $2 for $1) AC_INSERT_FILE($1, $2) elif test -f ${srcdir}/$2; then - AC_VERBOSE(using ${srcdir}/$2 for $1) + AC_MSG_RESULT(using ${srcdir}/$2 for $1) AC_INSERT_FILE($1, ${srcdir}/$2) fi ])dnl @@ -934,20 +934,20 @@ dnl dnl ### Printing messages dnl dnl -dnl AC_CHECKING(FEATURE-DESCRIPTION) -define(AC_CHECKING, +dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION) +define(AC_MSG_CHECKING, [echo "checking $1" 1>&4])dnl dnl -dnl AC_VERBOSE(RESULT-DESCRIPTION) -define(AC_VERBOSE, +dnl AC_MSG_RESULT(RESULT-DESCRIPTION) +define(AC_MSG_RESULT, [echo " $1" 1>&5])dnl dnl -dnl AC_WARN(PROBLEM-DESCRIPTION) -define(AC_WARN, +dnl AC_MSG_WARN(PROBLEM-DESCRIPTION) +define(AC_MSG_WARN, [echo "configure: warning: $1" 1>&2])dnl dnl -dnl AC_ERROR(ERROR-DESCRIPTION) -define(AC_ERROR, +dnl AC_MSG_ERROR(ERROR-DESCRIPTION) +define(AC_MSG_ERROR, [echo "configure: $1" 1>&2; exit 1])dnl dnl dnl @@ -955,7 +955,7 @@ dnl ### Selecting which language to use for testing dnl dnl define(AC_LANG_C, -[define([AC_LANG],[C])dnl +[define([AC_LANG], [C])dnl AC_PROVIDE([$0])dnl ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -964,7 +964,7 @@ ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&6 ])dnl dnl define(AC_LANG_CPLUSPLUS, -[define([AC_LANG],[CPLUSPLUS])dnl +[define([AC_LANG], [CPLUSPLUS])dnl AC_PROVIDE([$0])dnl ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -977,7 +977,7 @@ define(AC_LANG_SAVE, [pushdef([AC_LANG_STACK], AC_LANG)])dnl dnl dnl Restore the current language from the stack. define(AC_LANG_RESTORE, -[ifelse(AC_LANG_STACK,C,[ifelse(AC_LANG,C,,[AC_LANG_C])],[ifelse(AC_LANG,CPLUSPLUS,,[AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])dnl +[ifelse(AC_LANG_STACK, C, [ifelse(AC_LANG, C, , [AC_LANG_C])], [ifelse(AC_LANG, CPLUSPLUS, , [AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])dnl dnl dnl dnl ### Enforcing ordering constraints @@ -990,12 +990,12 @@ define(AC_BEFORE, dnl dnl AC_REQUIRE(MACRO-NAME) define(AC_REQUIRE, -[ifdef([AC_PROVIDE_$1],,[indir([$1]) +[ifdef([AC_PROVIDE_$1], , [indir([$1]) ])])dnl dnl dnl AC_PROVIDE(MACRO-NAME) define(AC_PROVIDE, -[define([AC_PROVIDE_$1],)])dnl +[define([AC_PROVIDE_$1], )])dnl dnl dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION]) define(AC_OBSOLETE, @@ -1006,12 +1006,12 @@ dnl dnl ### Checking for files - fundamental (caching) dnl dnl -dnl AC_PROGRAM_CHECK(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND +dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND dnl [, VALUE-IF-NOT-FOUND]) -define(AC_PROGRAM_CHECK, +define(AC_CHECK_PROG, [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 -AC_CHECKING([for $ac_word]) +AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_prog_$1, [if test -n "[$]$1"; then ac_cv_prog_$1="[$]$1" # Let the user override the test. @@ -1026,20 +1026,20 @@ else done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PROGRAMS_CHECK will keep looking. -ifelse([$4],,, [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4" +dnl so AC_CHECK_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4" ])dnl fi])dnl $1="$ac_cv_prog_$1" -test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1) +test -n "[$]$1" && AC_MSG_RESULT(setting $1 to [$]$1) AC_SUBST($1)dnl ])dnl dnl -dnl AC_PROGRAM_PATH(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) -define(AC_PROGRAM_PATH, +dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) +define(AC_PATH_PROG, [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 -AC_CHECKING([for $ac_word]) +AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) @@ -1056,13 +1056,13 @@ AC_CACHE_VAL(ac_cv_path_$1, done IFS="$ac_save_ifs" dnl If no 3rd arg is given, leave the cache variable unset, -dnl so AC_PROGRAMS_PATH will keep looking. -ifelse([$3],,, [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3" +dnl so AC_PATH_PROGS will keep looking. +ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" -test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1) +test -n "[$]$1" && AC_MSG_RESULT(setting $1 to [$]$1) AC_SUBST($1)dnl ])dnl dnl @@ -1070,39 +1070,39 @@ dnl dnl ### Checking for files - derived (caching) dnl dnl -dnl AC_PROGRAMS_CHECK(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) -define(AC_PROGRAMS_CHECK, +dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) +define(AC_CHECK_PROGS, [for ac_prog in $2 do -AC_PROGRAM_CHECK($1, [$]ac_prog, [$]ac_prog, ) +AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, ) test -n "[$]$1" && break done -ifelse([$3],,, [test -n "[$]$1" || $1="$3" +ifelse([$3], , , [test -n "[$]$1" || $1="$3" ])])dnl dnl -dnl AC_PROGRAMS_PATH(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) -define(AC_PROGRAMS_PATH, +dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) +define(AC_PATH_PROGS, [for ac_prog in $2 do -AC_PROGRAM_PATH($1, [$]ac_prog) +AC_PATH_PROG($1, [$]ac_prog) test -n "[$]$1" && break done -ifelse([$3],,, [test -n "[$]$1" || $1="$3" +ifelse([$3], , , [test -n "[$]$1" || $1="$3" ])])dnl dnl -dnl AC_HAVE_LIBRARY(LIBRARY [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl AC_CHECK_LIB(LIBRARY [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND dnl [, OTHER-LIBRARIES]]]) -define(AC_HAVE_LIBRARY, [dnl -changequote(/,/)dnl +define(AC_CHECK_LIB, [dnl +changequote(/, /)dnl define(/AC_LIB_NAME/, dnl patsubst(patsubst($1, /lib\([^\.]*\)\.a/, /\1/), /-l/, //))dnl define(/AC_CV_NAME/, ac_cv_lib_//AC_LIB_NAME)dnl -changequote([,])dnl -AC_CHECKING([for -l[]AC_LIB_NAME]) +changequote([, ])dnl +AC_MSG_CHECKING([for -l[]AC_LIB_NAME]) AC_CACHE_VAL(AC_CV_NAME, [ac_save_LIBS="${LIBS}" LIBS="${LIBS} -l[]AC_LIB_NAME[] $4" -AC_TEST_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}" ])dnl if test "${AC_CV_NAME}" = yes; then @@ -1122,17 +1122,17 @@ dnl dnl ### Checking for C features - fundamental (no caching) dnl dnl -dnl AC_HEADER_EGREP(PATTERN, HEADER-FILE, ACTION-IF-FOUND [, +dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [, dnl ACTION-IF-NOT-FOUND]) -define(AC_HEADER_EGREP, +define(AC_EGREP_HEADER, [AC_PROVIDE([$0])dnl -AC_PROGRAM_EGREP([$1], [#include <$2>], [$3], [$4])])dnl +AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])dnl dnl -dnl Because this macro is used by AC_GCC_TRADITIONAL, which must come early, +dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must come early, dnl it is not included in AC_BEFORE checks. -dnl AC_PROGRAM_EGREP(PATTERN, PROGRAM, ACTION-IF-FOUND [, +dnl AC_EGREP_CPP(PATTERN, PROGRAM, ACTION-IF-FOUND [, dnl ACTION-IF-NOT-FOUND]) -define(AC_PROGRAM_EGREP, +define(AC_EGREP_CPP, [AC_REQUIRE_CPP()dnl AC_PROVIDE([$0])dnl cat > conftest.${ac_ext} < conftest.${ac_ext} < conftest.${ac_ext} <], 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 if eval "test \"`echo '$ac_cv_header_'$ac_var`\" = yes"; then ifelse([$2], , :, [$2]) @@ -1254,11 +1251,11 @@ ifelse([$3], , , [else fi ])dnl dnl -dnl AC_FUNC_CHECK(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) -define(AC_FUNC_CHECK, -[AC_CHECKING([for $1]) +dnl AC_CHECK_FUNC(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) +define(AC_CHECK_FUNC, +[AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_func_$1, -[AC_TEST_LINK( +[AC_TRY_LINK( [#include /* Arbitrary system header to define __stub macros. */], [ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -1278,26 +1275,26 @@ ifelse([$3], , , [else fi ])dnl dnl -dnl AC_HAVE_FUNCS(FUNCTION...) -define(AC_HAVE_FUNCS, +dnl AC_CHECK_FUNCS(FUNCTION...) +define(AC_CHECK_FUNCS, [for ac_func in $1 do -changequote(,)dnl +changequote(, )dnl ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` -changequote([,])dnl -AC_FUNC_CHECK(${ac_func}, AC_DEFINE(${ac_tr_func}))dnl +changequote([, ])dnl +AC_CHECK_FUNC(${ac_func}, AC_DEFINE(${ac_tr_func}))dnl done ])dnl dnl -dnl AC_HAVE_HEADERS(HEADER-FILE...) -define(AC_HAVE_HEADERS, +dnl AC_CHECK_HEADERS(HEADER-FILE...) +define(AC_CHECK_HEADERS, [AC_REQUIRE_CPP()dnl Make sure the cpp check happens outside the loop. for ac_hdr in $1 do -changequote(,)dnl +changequote(, )dnl ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` -changequote([,])dnl -AC_HEADER_CHECK(${ac_hdr}, AC_DEFINE(${ac_tr_hdr}))dnl +changequote([, ])dnl +AC_CHECK_HEADER(${ac_hdr}, AC_DEFINE(${ac_tr_hdr}))dnl done ])dnl dnl @@ -1305,25 +1302,25 @@ dnl AC_REPLACE_FUNCS(FUNCTION-NAME...) define(AC_REPLACE_FUNCS, [for ac_func in $1 do -AC_FUNC_CHECK(${ac_func}, , +AC_CHECK_FUNC(${ac_func}, , [LIBOBJS="$LIBOBJS ${ac_func}.o" -AC_VERBOSE(using ${ac_func}.o instead) +AC_MSG_RESULT(using ${ac_func}.o instead) ])dnl done AC_SUBST(LIBOBJS)dnl ])dnl dnl -dnl AC_SIZEOF_TYPE(TYPE) -define(AC_SIZEOF_TYPE, -[changequote(<<,>>)dnl +dnl AC_CHECK_SIZEOF(TYPE) +define(AC_CHECK_SIZEOF, +[changequote(<<, >>)dnl dnl The name to #define. define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl dnl The cache variable name. define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl -changequote([,])dnl -AC_CHECKING(size of $1) +changequote([, ])dnl +AC_MSG_CHECKING(size of $1) AC_CACHE_VAL(AC_CV_NAME, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include main() { FILE *f=fopen("conftestval", "w"); @@ -1338,9 +1335,9 @@ undefine(AC_CV_NAME)dnl dnl dnl AC_CHECK_TYPE(TYPE, DEFAULT) define(AC_CHECK_TYPE, -[AC_CHECKING(for $1 in sys/types.h) +[AC_MSG_CHECKING(for $1 in sys/types.h) AC_CACHE_VAL(ac_cv_type_$1, -[AC_HEADER_EGREP($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 if test $ac_cv_type_$1 = no; then AC_DEFINE($1, $2) fi @@ -1350,7 +1347,7 @@ dnl dnl ### The big finish dnl dnl -dnl AC_OUTPUT([FILE...] [,EXTRA-CMDS]) +dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS]) define(AC_OUTPUT, [AC_CACHE_SAVE @@ -1361,7 +1358,7 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. -changequote(,)dnl +changequote(, )dnl if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi @@ -1374,7 +1371,7 @@ ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g' DEFS=`sed "$ac_escape_ampersand_and_backslash" $ac_file fi; done -ifdef([AC_LIST_HEADERS],[AC_OUTPUT_HEADER(AC_LIST_HEADERS)])dnl -ifdef([AC_LIST_LINKS],[AC_OUTPUT_LINKS(AC_LIST_LINKS,AC_LIST_FILES)])dnl +ifdef([AC_LIST_HEADERS], [AC_OUTPUT_HEADER(AC_LIST_HEADERS)])dnl +ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_LINKS, AC_LIST_FILES)])dnl $2 exit 0 EOF chmod +x ${CONFIG_STATUS} test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} ${CONFIG_STATUS} dnl config.status should never do recursion. -ifdef([AC_LIST_SUBDIRS],[AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl +ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl ])dnl dnl dnl Create the header files listed in $1. dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted dnl here document whose contents are going into config.status. define(AC_OUTPUT_HEADER, -[changequote(<<,>>)dnl +[changequote(<<, >>)dnl # These sed commands are put into ac_sed_defs when defining a macro. # They are broken into pieces to make the sed script easier to manage. @@ -1538,7 +1535,7 @@ ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='<<$>>!\1#\2define\3' ac_eC=' ' ac_eD='!g' -changequote([,])dnl +changequote([, ])dnl rm -f conftest.sed EOF # Turn off quoting long enough to insert the sed commands. @@ -1577,9 +1574,9 @@ cat >> ${CONFIG_STATUS} <<\EOF # on some systems where configure will not decide to define it in [#] $1. cat >> conftest.sed <<\CONFEOF -changequote(,)dnl +changequote(, )dnl s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -changequote([,])dnl +changequote([, ])dnl CONFEOF rm -f conftest.h # Break up the sed commands because old seds have small limits. @@ -1630,14 +1627,14 @@ while test -n "${ac_files}"; do echo "linking ${ac_link} to ${srcdir}/${ac_file}" if test ! -r ${srcdir}/${ac_file}; then - AC_ERROR(${srcdir}/${ac_file}: File not found) + AC_MSG_ERROR(${srcdir}/${ac_file}: File not found) fi rm -f ${ac_link} # Make a symlink if possible; otherwise try a hard link. if ln -s ${srcdir}/${ac_file} ${ac_link} 2>/dev/null || ln ${srcdir}/${ac_file} ${ac_link}; then : else - AC_ERROR(can not link ${ac_link} to ${srcdir}/${ac_file}) + AC_MSG_ERROR(can not link ${ac_link} to ${srcdir}/${ac_file}) fi done ])dnl @@ -1664,9 +1661,9 @@ define(AC_OUTPUT_SUBDIRS, ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -changequote(,)dnl +changequote(, )dnl *[" "]*) ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; -changequote([,])dnl +changequote([, ])dnl *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done @@ -1686,7 +1683,7 @@ changequote([,])dnl *) if test -d ./${ac_config_dir} || mkdir ./${ac_config_dir}; then :; else - AC_ERROR(can not create `pwd`/${ac_config_dir}) + AC_MSG_ERROR(can not create `pwd`/${ac_config_dir}) fi ;; esac @@ -1709,15 +1706,15 @@ changequote([,])dnl elif test -f ${ac_sub_srcdir}/configure.in; then ac_sub_configure=${ac_configure} else - AC_WARN(no configuration information is in ${ac_config_dir}) + AC_MSG_WARN(no configuration information is in ${ac_config_dir}) ac_sub_configure= fi # Make the cache file name correct relative to the subdirectory. -changequote(,)dnl +changequote(, )dnl # A "../" for each directory in /${ac_config_dir}. ac_dots=`echo /${ac_config_dir}|sed 's%/[^/]*%../%g'` -changequote([,])dnl +changequote([, ])dnl case "$cache_file" in /*) ac_sub_cache_file=$cache_file ;; *) # Relative path. @@ -1726,11 +1723,11 @@ changequote([,])dnl # The recursion is here. if test -n "${ac_sub_configure}"; then - AC_VERBOSE([running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file] --srcdir=${ac_sub_srcdir}) + 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}) if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir} then : else - AC_ERROR(${ac_sub_configure} failed for ${ac_config_dir}) + AC_MSG_ERROR(${ac_sub_configure} failed for ${ac_config_dir}) fi fi diff --git a/acspecific.m4 b/acspecific.m4 index 5c7a4e22..9fe3c2c8 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -27,7 +27,7 @@ dnl define(AC_PROG_CC, [AC_BEFORE([$0], [AC_PROG_CPP])dnl AC_PROVIDE([$0])dnl -AC_PROGRAM_CHECK(CC, gcc, gcc, cc) +AC_CHECK_PROG(CC, gcc, gcc, cc) # Find out if we are using GNU C, under whatever name. AC_CACHE_VAL(ac_cv_prog_gcc, @@ -45,9 +45,9 @@ if test $ac_cv_prog_gcc = yes; then GCC=yes; else GCC= ; fi ])dnl dnl define(AC_PROG_CXX, -[AC_BEFORE([$0],[AC_PROG_CXXCPP])dnl +[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl AC_PROVIDE([$0])dnl -AC_PROGRAMS_CHECK(CXX, $CCC c++ g++ gcc CC cxx, gcc) +AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx, gcc) # Find out if we are using GNU C++, under whatever name. AC_CACHE_VAL(ac_cv_prog_gxx, @@ -64,35 +64,35 @@ fi])dnl if test $ac_cv_prog_gxx = yes; then GXX=yes; else GXX= ; fi ])dnl dnl -define(AC_GCC_TRADITIONAL, +define(AC_PROG_GCC_TRADITIONAL, [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_CPP])dnl if test $ac_cv_prog_gcc = yes; then - AC_CHECKING(whether -traditional is needed) + AC_MSG_CHECKING(whether -traditional is needed) AC_CACHE_VAL(ac_cv_prog_gcc_traditional, [ ac_pattern="Autoconf.*'x'" ac_prog='#include Autoconf TIOCGETP' - AC_PROGRAM_EGREP($ac_pattern, $ac_prog, + AC_EGREP_CPP($ac_pattern, $ac_prog, ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no) if test $ac_cv_prog_gcc_traditional = no; then ac_prog='#include Autoconf TCGETA' - AC_PROGRAM_EGREP($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 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" - AC_VERBOSE(setting CC to $CC) + AC_MSG_RESULT(setting CC to $CC) fi fi ])dnl dnl -define(AC_MINUS_C_MINUS_O, +define(AC_PROG_CC_C_O, [if test "x$CC" != xcc; then - AC_CHECKING(whether $CC and cc understand -c and -o together) + AC_MSG_CHECKING(whether $CC and cc understand -c and -o together) else - AC_CHECKING(whether cc understands -c and -o together) + AC_MSG_CHECKING(whether cc understands -c and -o together) fi set dummy $CC; ac_cc=[$]2 AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, @@ -124,18 +124,18 @@ fi ])dnl dnl dnl Define SET_MAKE to set ${MAKE} if make doesn't. -define(AC_SET_MAKE, -[AC_CHECKING(whether ${MAKE-make} sets \$MAKE) +define(AC_PROG_MAKE_SET, +[AC_MSG_CHECKING(whether ${MAKE-make} sets \$MAKE) set dummy ${MAKE-make}; ac_make=[$]2 AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, [cat > conftestmake <<'EOF' all: @echo 'ac_maketemp="${MAKE}"' EOF -changequote(,)dnl +changequote(, )dnl # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -changequote([,])dnl +changequote([, ])dnl if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else @@ -146,20 +146,20 @@ if test $ac_cv_prog_make_${ac_make}_set = yes; then SET_MAKE= else SET_MAKE="MAKE=${MAKE-make}" - AC_VERBOSE(setting MAKE to ${MAKE-make} in Makefiles) + AC_MSG_RESULT(setting MAKE to ${MAKE-make} in Makefiles) fi AC_SUBST([SET_MAKE])dnl ])dnl dnl -define(AC_PROG_RANLIB, [AC_PROGRAM_CHECK(RANLIB, ranlib, ranlib, :)])dnl +define(AC_PROG_RANLIB, [AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)])dnl dnl -define(AC_PROG_AWK, [AC_PROGRAMS_CHECK(AWK, mawk gawk nawk awk,)])dnl +define(AC_PROG_AWK, [AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])dnl dnl -define(AC_PROG_YACC,[AC_PROGRAMS_CHECK(YACC, 'bison -y' byacc, yacc)])dnl +define(AC_PROG_YACC, [AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])dnl dnl define(AC_PROG_CPP, [AC_PROVIDE([$0])dnl -AC_CHECKING(how to run the C preprocessor) +AC_MSG_CHECKING(how to run the C preprocessor) if test -z "$CPP"; then AC_CACHE_VAL(ac_cv_prog_CPP, [ # This must be in double quotes, not single quotes, because CPP may get @@ -167,57 +167,57 @@ AC_CACHE_VAL(ac_cv_prog_CPP, CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. - AC_TEST_CPP([#include + AC_TRY_CPP([#include Syntax Error], , CPP="${CC-cc} -E -traditional-cpp" - AC_TEST_CPP([#include -Syntax Error], ,CPP=/lib/cpp)) + AC_TRY_CPP([#include +Syntax Error], , CPP=/lib/cpp)) ac_cv_prog_CPP="$CPP"])dnl fi CPP="$ac_cv_prog_CPP" -AC_VERBOSE(setting CPP to $CPP) +AC_MSG_RESULT(setting CPP to $CPP) AC_SUBST(CPP)dnl ])dnl dnl define(AC_PROG_CXXCPP, [AC_PROVIDE([$0])dnl -AC_CHECKING(how to run the C++ preprocessor) +AC_MSG_CHECKING(how to run the C++ preprocessor) if test -z "$CXXCPP"; then AC_CACHE_VAL(ac_cv_prog_CXXCPP, [AC_LANG_SAVE[]dnl AC_LANG_CPLUSPLUS[]dnl CXXCPP="${CXX-c++} -E" - AC_TEST_CPP([#include ], , CXXCPP=/lib/cpp) + AC_TRY_CPP([#include ], , CXXCPP=/lib/cpp) ac_cv_prog_CXXCPP="$CXXCPP" AC_LANG_RESTORE[]dnl fi])dnl CXXCPP="$ac_cv_prog_CXXCPP" -AC_VERBOSE(setting CXXCPP to $CXXCPP) +AC_MSG_RESULT(setting CXXCPP to $CXXCPP) AC_SUBST(CXXCPP)dnl ])dnl dnl dnl Require finding the C or C++ preprocessor, whichever is the dnl current language. define(AC_REQUIRE_CPP, -[ifelse(AC_LANG,C,[AC_REQUIRE([AC_PROG_CPP])],[AC_REQUIRE([AC_PROG_CXXCPP])])])dnl +[ifelse(AC_LANG, C, [AC_REQUIRE([AC_PROG_CPP])], [AC_REQUIRE([AC_PROG_CXXCPP])])])dnl dnl define(AC_PROG_LEX, [AC_PROVIDE([$0])dnl -AC_PROGRAM_CHECK(LEX, flex, flex, lex) +AC_CHECK_PROG(LEX, flex, flex, lex) if test -z "$LEXLIB" then case "$LEX" in - flex*) AC_HAVE_LIBRARY(fl, LEXLIB="-lfl") ;; + flex*) AC_CHECK_LIB(fl, LEXLIB="-lfl") ;; *) LEXLIB="-ll" ;; esac fi -AC_VERBOSE(setting LEXLIB to $LEXLIB) +AC_MSG_RESULT(setting LEXLIB to $LEXLIB) AC_SUBST(LEXLIB)])dnl dnl -define(AC_YYTEXT_POINTER, +define(AC_DECL_YYTEXT, [AC_REQUIRE_CPP()dnl AC_REQUIRE([AC_PROG_LEX])dnl -AC_CHECKING(for yytext declaration) +AC_MSG_CHECKING(for yytext declaration) AC_CACHE_VAL(ac_cv_prog_lex_yytext_pointer, [# POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since @@ -233,12 +233,12 @@ if test -f lex.yy.c; then elif test -f lexyy.c; then LEX_OUTPUT_ROOT=lexyy else - AC_ERROR(cannot find output from $LEX, giving up) + AC_MSG_ERROR(cannot find output from $LEX, giving up) fi echo 'extern char *yytext; main () { exit (0); }' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" -AC_TEST_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" rm -f "${LEX_OUTPUT_ROOT}.c"])dnl if test $ac_cv_prog_lex_yytext_pointer = yes; then @@ -265,7 +265,7 @@ define(AC_PROG_INSTALL, # # Avoid using ./install, which might have been erroneously created # by make from ./install.sh. -AC_CHECKING(for a BSD compatible install) +AC_MSG_CHECKING(for a BSD compatible install) if test -z "${INSTALL}"; then AC_CACHE_VAL(ac_cv_path_install, [ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" @@ -296,21 +296,21 @@ AC_CACHE_VAL(ac_cv_path_install, INSTALL="$ac_cv_path_install" fi AC_SUBST(INSTALL)dnl -AC_VERBOSE(setting INSTALL to $INSTALL) +AC_MSG_RESULT(setting INSTALL to $INSTALL) # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' AC_SUBST(INSTALL_PROGRAM)dnl -AC_VERBOSE(setting INSTALL_PROGRAM to $INSTALL_PROGRAM) +AC_MSG_RESULT(setting INSTALL_PROGRAM to $INSTALL_PROGRAM) test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' AC_SUBST(INSTALL_DATA)dnl -AC_VERBOSE(setting INSTALL_DATA to $INSTALL_DATA) +AC_MSG_RESULT(setting INSTALL_DATA to $INSTALL_DATA) ])dnl dnl -define(AC_LN_S, -[AC_CHECKING(whether ln -s works) +define(AC_PROG_LN_S, +[AC_MSG_CHECKING(whether ln -s works) AC_CACHE_VAL(ac_cv_prog_LN_S, [rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -322,15 +322,15 @@ else fi])dnl LN_S="$ac_cv_prog_LN_S" if test "$ac_cv_prog_LN_S" = "ln -s"; then - AC_VERBOSE(ln -s is supported) + AC_MSG_RESULT(ln -s is supported) else - AC_VERBOSE(ln -s is not supported) + AC_MSG_RESULT(ln -s is not supported) fi AC_SUBST(LN_S)dnl ])dnl dnl -define(AC_RSH, -[AC_CHECKING(for remote shell) +define(AC_PROG_RSH, +[AC_MSG_CHECKING(for remote shell) AC_CACHE_VAL(ac_cv_path_RSH, [ac_cv_path_RSH=true for ac_file in \ @@ -343,11 +343,11 @@ do done])dnl RSH="$ac_cv_path_RSH" if test $RSH != true; then - AC_VERBOSE(found remote shell $RSH) + AC_MSG_RESULT(found remote shell $RSH) RTAPELIB=rtapelib.o else - AC_VERBOSE(found no remote shell) - AC_HEADER_CHECK(netdb.h, RTAPELIB=rtapelib.o AC_DEFINE(HAVE_NETDB_H), + AC_MSG_RESULT(found no remote shell) + AC_CHECK_HEADER(netdb.h, RTAPELIB=rtapelib.o AC_DEFINE(HAVE_NETDB_H), RTAPELIB= AC_DEFINE(NO_REMOTE)) fi AC_SUBST(RSH)dnl @@ -358,31 +358,31 @@ dnl dnl ### Checks for header files dnl dnl -define(AC_STDC_HEADERS, +define(AC_HEADER_STDC, [AC_REQUIRE_CPP()dnl -AC_CHECKING(for ANSI C header files) +AC_MSG_CHECKING(for ANSI C header files) AC_CACHE_VAL(ac_cv_header_stdc, -[AC_TEST_CPP([#include +[AC_TRY_CPP([#include #include #include #include ], ac_cv_header_stdc=yes, ac_cv_header_stdc=no) if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -AC_HEADER_EGREP(memchr, string.h, , ac_cv_header_stdc=no) +AC_EGREP_HEADER(memchr, string.h, , ac_cv_header_stdc=no) fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -AC_HEADER_EGREP(free, stdlib.h, , ac_cv_header_stdc=no) +AC_EGREP_HEADER(free, stdlib.h, , ac_cv_header_stdc=no) fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -AC_TEST_RUN([#include +AC_TRY_RUN([#include #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e,f) (((e) && !(f)) || (!(e) && (f))) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -393,35 +393,35 @@ if test $ac_cv_header_stdc = yes; then fi])dnl dnl define(AC_UNISTD_H, -[AC_OBSOLETE([$0], [; instead use AC_HAVE_HEADERS(unistd.h)])dnl -AC_HEADER_CHECK(unistd.h, AC_DEFINE(HAVE_UNISTD_H))])dnl +[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(unistd.h)])dnl +AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))])dnl dnl define(AC_USG, [AC_OBSOLETE([$0], - [; instead use AC_HAVE_HEADERS(string.h) and HAVE_STRING_H])dnl -AC_CHECKING([for BSD string and memory functions]) -AC_TEST_LINK([#include ], [rindex(0, 0); bzero(0, 0);], , + [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl +AC_MSG_CHECKING([for BSD string and memory functions]) +AC_TRY_LINK([#include ], [rindex(0, 0); bzero(0, 0);], , AC_DEFINE(USG))])dnl dnl dnl dnl If memchr and the like aren't declared in , include . dnl To avoid problems, don't check for gcc2 built-ins. define(AC_MEMORY_H, -[AC_OBSOLETE([$0], [; instead use AC_HAVE_HEADERS(memory.h) and HAVE_MEMORY_H])AC_CHECKING(whether string.h declares mem functions) -AC_HEADER_EGREP(memchr, string.h, , - [AC_HEADER_CHECK(memory.h, AC_DEFINE(NEED_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_EGREP_HEADER(memchr, string.h, , + [AC_CHECK_HEADER(memory.h, AC_DEFINE(NEED_MEMORY_H))])] )dnl dnl -define(AC_MAJOR_HEADER, -[AC_CHECKING([for major, minor and makedev header]) +define(AC_HEADER_MAJOR, +[AC_MSG_CHECKING([for major, minor and makedev header]) AC_CACHE_VAL(ac_cv_header_major, -[AC_TEST_LINK([#include ], +[AC_TRY_LINK([#include ], [return makedev(0, 0);], ac_cv_header_major=sys/types.h, ac_cv_header_major=no) if test $ac_cv_header_major = no; then -AC_HEADER_CHECK(sys/mkdev.h, ac_cv_header_major=sys/mkdev.h) +AC_CHECK_HEADER(sys/mkdev.h, ac_cv_header_major=sys/mkdev.h) fi if test $ac_cv_header_major = no; then -AC_HEADER_CHECK(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 case "$ac_cv_header_major" in sys/mkdev.h) AC_DEFINE(MAJOR_IN_MKDEV) ;; @@ -429,26 +429,31 @@ sys/sysmacros.h) AC_DEFINE(MAJOR_IN_SYSMACROS) ;; esac ])dnl dnl -define(AC_DIR_HEADER, +define(AC_HEADER_DIRENT, [AC_PROVIDE([$0])dnl -AC_CHECKING(for directory library header) +AC_MSG_CHECKING(for directory library header) AC_CACHE_VAL(ac_cv_header_dir, [ac_cv_header_dir=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - AC_CHECKING([for $ac_hdr]) -AC_TEST_LINK([#include + AC_MSG_CHECKING([for $ac_hdr]) +AC_TRY_LINK([#include #include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break) done])dnl + case "$ac_cv_header_dir" in -dirent.h) AC_DEFINE(DIRENT) ;; -sys/ndir.h) AC_DEFINE(SYSNDIR) ;; -sys/dir.h) AC_DEFINE(SYSDIR) ;; -ndir.h) AC_DEFINE(NDIR) ;; +dirent.h) AC_DEFINE(DIRENT) +AC_DEFINE(HAVE_DIRENT_H) ;; +sys/ndir.h) AC_DEFINE(SYSNDIR) +AC_DEFINE(HAVE_SYS_NDIR_H) ;; +sys/dir.h) AC_DEFINE(SYSDIR) +AC_DEFINE(HAVE_SYS_DIR_H) ;; +ndir.h) AC_DEFINE(NDIR) +AC_DEFINE(HAVE_NDIR_H) ;; esac -AC_CHECKING(for closedir return value) +AC_MSG_CHECKING(for closedir return value) AC_CACHE_VAL(ac_cv_func_closedir_void, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include #include <$ac_cv_header_dir> int closedir(); main() { exit(closedir(opendir(".")) != 0); }], ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl @@ -457,10 +462,10 @@ if test $ac_cv_func_closedir_void = yes; then fi ])dnl dnl -define(AC_STAT_MACROS_BROKEN, -[AC_CHECKING(for broken stat file mode macros) +define(AC_HEADER_STAT, +[AC_MSG_CHECKING(for broken stat file mode macros) AC_CACHE_VAL(ac_cv_header_stat_broken, -[AC_PROGRAM_EGREP([You lose], [#include +[AC_EGREP_CPP([You lose], [#include #include #ifdef S_ISBLK #if S_ISBLK (S_IFDIR) @@ -488,10 +493,10 @@ if test $ac_cv_header_stat_broken = yes; then fi ])dnl dnl -define(AC_SYS_SIGLIST_DECLARED, -[AC_CHECKING([for sys_siglist declaration in signal.h or unistd.h]) +define(AC_DECL_SYS_SIGLIST, +[AC_MSG_CHECKING([for sys_siglist declaration in signal.h or unistd.h]) AC_CACHE_VAL(ac_cv_decl_sys_siglist, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include /* NetBSD declares sys_siglist in unistd.h. */ #ifdef HAVE_UNISTD_H @@ -507,17 +512,17 @@ dnl dnl ### Checks for typedefs dnl dnl -define(AC_GETGROUPS_T, -[AC_REQUIRE([AC_UID_T])dnl -AC_CHECKING(for type of array argument to getgroups) +define(AC_TYPE_GETGROUPS, +[AC_REQUIRE([AC_TYPE_UID_T])dnl +AC_MSG_CHECKING(for type of array argument to getgroups) AC_CACHE_VAL(ac_cv_type_getgroups, -[changequote(,)dnl +[changequote(, )dnl dnl Do not put single quotes in the C program text! ac_prog='/* Thanks to Mike Rendell for this test. */ #include #define NGID 256 #undef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) +#define MAX(x, y) ((x) > (y) ? (x) : (y)) main() { gid_t gidset[NGID]; @@ -533,17 +538,17 @@ main() happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); }' -changequote([,])dnl -AC_TEST_RUN([$ac_prog], +changequote([, ])dnl +AC_TRY_RUN([$ac_prog], ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)])dnl AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups) ])dnl dnl -define(AC_UID_T, +define(AC_TYPE_UID_T, [AC_PROVIDE([$0])dnl -AC_CHECKING(for uid_t in sys/types.h) +AC_MSG_CHECKING(for uid_t in sys/types.h) AC_CACHE_VAL(ac_cv_type_uid_t, -[AC_HEADER_EGREP(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 if test $ac_cv_type_uid_t = no; then AC_DEFINE(uid_t, int) @@ -551,22 +556,22 @@ if test $ac_cv_type_uid_t = no; then fi ])dnl dnl -define(AC_SIZE_T, [AC_CHECK_TYPE(size_t, unsigned)])dnl +define(AC_TYPE_SIZE_T, [AC_CHECK_TYPE(size_t, unsigned)])dnl dnl -define(AC_PID_T, [AC_CHECK_TYPE(pid_t, int)])dnl +define(AC_TYPE_PID_T, [AC_CHECK_TYPE(pid_t, int)])dnl dnl -define(AC_OFF_T, +define(AC_TYPE_OFF_T, [AC_PROVIDE([$0])dnl AC_CHECK_TYPE(off_t, long)])dnl dnl -define(AC_MODE_T, [AC_CHECK_TYPE(mode_t, int)])dnl +define(AC_TYPE_MODE_T, [AC_CHECK_TYPE(mode_t, int)])dnl dnl dnl Note that identifiers starting with SIG are reserved by ANSI C. -define(AC_RETSIGTYPE, +define(AC_TYPE_SIGNAL, [AC_PROVIDE([$0])dnl -AC_CHECKING([return type of signal handlers]) +AC_MSG_CHECKING([return type of signal handlers]) AC_CACHE_VAL(ac_cv_type_signal, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include #ifdef signal #undef signal @@ -580,10 +585,10 @@ dnl dnl ### Checks for functions dnl dnl -define(AC_MMAP, -[AC_CHECKING(for working mmap) +define(AC_FUNC_MMAP, +[AC_MSG_CHECKING(for working mmap) AC_CACHE_VAL(ac_cv_func_mmap, -[AC_TEST_RUN([/* Thanks to Mike Haertel and Jim Avera for this test. */ +[AC_TRY_RUN([/* Thanks to Mike Haertel and Jim Avera for this test. */ #include #include #include @@ -655,20 +660,20 @@ if test $ac_cv_func_mmap = yes; then fi ])dnl dnl -define(AC_VPRINTF, -[AC_FUNC_CHECK(vprintf, AC_DEFINE(HAVE_VPRINTF)) +define(AC_FUNC_VPRINTF, +[AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF)) if test "$ac_cv_func_vprintf" != yes; then -AC_FUNC_CHECK(_doprnt, AC_DEFINE(HAVE_DOPRNT)) +AC_CHECK_FUNC(_doprnt, AC_DEFINE(HAVE_DOPRNT)) fi ])dnl dnl -define(AC_VFORK, -[AC_REQUIRE([AC_PID_T])dnl -AC_HEADER_CHECK(vfork.h, AC_DEFINE(HAVE_VFORK_H)) -AC_CHECKING(for working vfork) +define(AC_FUNC_VFORK, +[AC_REQUIRE([AC_TYPE_PID_T])dnl +AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H)) +AC_MSG_CHECKING(for working vfork) AC_CACHE_VAL(ac_cv_func_vfork, -[AC_REQUIRE([AC_RETSIGTYPE]) -AC_TEST_RUN([/* Thanks to Paul Eggert for this test. */ +[AC_REQUIRE([AC_TYPE_SIGNAL]) +AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */ #include #include #include @@ -773,10 +778,10 @@ if test $ac_cv_func_vfork = no; then fi ])dnl dnl -define(AC_WAIT3, -[AC_CHECKING(for wait3 that fills in rusage) +define(AC_FUNC_WAIT3, +[AC_MSG_CHECKING(for wait3 that fills in rusage) AC_CACHE_VAL(ac_cv_func_wait3, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include #include #include #include @@ -808,20 +813,20 @@ if test $ac_cv_func_wait3 = yes; then fi ])dnl dnl -define(AC_ALLOCA, +define(AC_FUNC_ALLOCA, [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -AC_CHECKING([for working alloca.h]) +AC_MSG_CHECKING([for working alloca.h]) AC_CACHE_VAL(ac_cv_header_alloca_h, -[AC_TEST_LINK([#include ], [char *p = alloca(2 * sizeof(int));], +[AC_TRY_LINK([#include ], [char *p = alloca(2 * sizeof(int));], ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])dnl if test $ac_cv_header_alloca_h = yes; then AC_DEFINE(HAVE_ALLOCA_H) fi -AC_CHECKING([for alloca]) +AC_MSG_CHECKING([for alloca]) AC_CACHE_VAL(ac_cv_func_alloca, -[AC_TEST_LINK([#ifdef __GNUC__ +[AC_TRY_LINK([#ifdef __GNUC__ #define alloca __builtin_alloca #else #if HAVE_ALLOCA_H @@ -850,21 +855,21 @@ if test $ac_cv_func_alloca = no; then ALLOCA=alloca.o AC_DEFINE(C_ALLOCA) -AC_CHECKING(whether Cray hooks are needed for C alloca) -AC_PROGRAM_EGREP(webecray, +AC_MSG_CHECKING(whether Cray hooks are needed for C alloca) +AC_EGREP_CPP(webecray, [#if defined(CRAY) && ! defined(CRAY2) webecray #else wenotbecray #endif ], -AC_FUNC_CHECK([_getb67],AC_DEFINE(CRAY_STACKSEG_END, _getb67), -AC_FUNC_CHECK([GETB67],AC_DEFINE(CRAY_STACKSEG_END, GETB67), -AC_FUNC_CHECK([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_CHECKING(stack direction for C alloca) +AC_MSG_CHECKING(stack direction for C alloca) AC_CACHE_VAL(ac_cv_c_stack_direction, -[AC_TEST_RUN([find_stack_direction () +[AC_TRY_RUN([find_stack_direction () { static char *addr = 0; auto char dummy; @@ -886,22 +891,22 @@ fi AC_SUBST(ALLOCA)dnl ])dnl dnl -define(AC_GETLOADAVG, +define(AC_FUNC_GETLOADAVG, [# Some definitions of getloadavg require that the program be installed setgid. NEED_SETGID=false AC_SUBST(NEED_SETGID)dnl ac_have_func=no # Check for the 4.4BSD definition of getloadavg. -AC_HAVE_LIBRARY(util, [LIBS="$LIBS -lutil" ac_have_func=yes +AC_CHECK_LIB(util, [LIBS="$LIBS -lutil" ac_have_func=yes # Some systems with -lutil have (and need) -lkvm as well, some do not. -AC_HAVE_LIBRARY(kvm, LIBS="$LIBS -lkvm")]) +AC_CHECK_LIB(kvm, LIBS="$LIBS -lkvm")]) if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX. # Since it is not a standard part of AIX, it might be installed locally. ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" -AC_HAVE_LIBRARY(getloadavg, LIBS="$LIBS -lgetloadavg", LIBS="$ac_save_LIBS") +AC_CHECK_LIB(getloadavg, LIBS="$LIBS -lgetloadavg", LIBS="$ac_save_LIBS") fi # Make sure it is really in the library, if we think we found it. @@ -911,35 +916,35 @@ if test $ac_cv_func_getloadavg = yes; then AC_DEFINE(HAVE_GETLOADAVG) else ac_have_func=no -AC_HEADER_CHECK(sys/dg_sys_info.h, +AC_CHECK_HEADER(sys/dg_sys_info.h, [ac_have_func=yes AC_DEFINE(DGUX) # Some versions of DGUX need -ldgc for dg_sys_info. -AC_HAVE_LIBRARY(dgc)]) +AC_CHECK_LIB(dgc)]) if test $ac_have_func = no; then # We cannot check for , because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for because # Irix 4.0.5F has the header but not the library. -AC_HAVE_LIBRARY(elf, +AC_CHECK_LIB(elf, [LIBS="$LIBS -lelf" ac_have_func=yes AC_DEFINE(SVR4) - AC_HAVE_LIBRARY(kvm, LIBS="$LIBS -lkvm")]) + AC_CHECK_LIB(kvm, LIBS="$LIBS -lkvm")]) fi if test $ac_have_func = no; then -AC_HEADER_CHECK(inq_stats/cpustats.h, +AC_CHECK_HEADER(inq_stats/cpustats.h, [ac_have_func=yes AC_DEFINE(UMAX4_3) AC_DEFINE(UMAX)]) fi if test $ac_have_func = no; then -AC_HEADER_CHECK(sys/cpustats.h, +AC_CHECK_HEADER(sys/cpustats.h, [ac_have_func=yes AC_DEFINE(UMAX)]) fi if test $ac_have_func = no; then -AC_HAVE_HEADERS(mach/mach.h) +AC_CHECK_HEADERS(mach/mach.h) fi -AC_HEADER_CHECK(nlist.h, +AC_CHECK_HEADER(nlist.h, [AC_DEFINE(NLIST_STRUCT) -AC_CHECKING([for n_un in struct nlist]) +AC_MSG_CHECKING([for n_un in struct nlist]) AC_CACHE_VAL(ac_cv_struct_nlist_n_un, -[AC_TEST_LINK([#include ], +[AC_TRY_LINK([#include ], [struct nlist n; n.n_un.n_name = 0;], ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl if test $ac_cv_struct_nlist_n_un = yes; then @@ -947,9 +952,9 @@ if test $ac_cv_struct_nlist_n_un = yes; then fi ])dnl -AC_CHECKING(whether getloadavg requires setgid) +AC_MSG_CHECKING(whether getloadavg requires setgid) AC_CACHE_VAL(ac_cv_func_getloadavg_setgid, -[AC_PROGRAM_EGREP([Yowza Am I SETGID yet], +[AC_EGREP_CPP([Yowza Am I SETGID yet], [#include "${srcdir}/getloadavg.c" #ifdef LDAV_PRIVILEGED Yowza Am I SETGID yet @@ -962,9 +967,9 @@ fi fi # Do not have getloadavg in system libraries. if test "$NEED_SETGID" = true; then - AC_CHECKING(group of /dev/kmem) + AC_MSG_CHECKING(group of /dev/kmem) AC_CACHE_VAL(ac_cv_group_kmem, -[changequote(,)dnl +[changequote(, )dnl # On Solaris, /dev/kmem is a symlink. Get info on the real file. ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` # If we got an error (system does not support symlinks), try without -L. @@ -973,20 +978,20 @@ AC_CACHE_VAL(ac_cv_group_kmem, | sed -ne 's/[ ][ ]*/ /g; s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; / /s/.* //;p;'` -changequote([,])dnl +changequote([, ])dnl ])dnl KMEM_GROUP=$ac_cv_group_kmem - AC_VERBOSE(/dev/kmem is owned by $KMEM_GROUP) + AC_MSG_RESULT(/dev/kmem is owned by $KMEM_GROUP) fi AC_SUBST(KMEM_GROUP)dnl ])dnl dnl -define(AC_UTIME_NULL, -[AC_CHECKING(utime with null argument) +define(AC_FUNC_UTIME_NULL, +[AC_MSG_CHECKING(utime with null argument) AC_CACHE_VAL(ac_cv_func_utime_null, [rm -f conftestdata; > conftestdata # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. -AC_TEST_RUN([#include +AC_TRY_RUN([#include #include main() { struct stat s, t; @@ -1000,10 +1005,10 @@ if test $ac_cv_func_utime_null = yes; then fi ])dnl dnl -define(AC_STRCOLL, -[AC_CHECKING(for strcoll) +define(AC_FUNC_STRCOLL, +[AC_MSG_CHECKING(for strcoll) AC_CACHE_VAL(ac_cv_func_strcoll, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include main () { exit (strcoll ("abc", "def") >= 0 || @@ -1015,10 +1020,10 @@ if test $ac_cv_func_strcoll = yes; then fi ])dnl dnl -define(AC_SETVBUF_REVERSED, -[AC_CHECKING(whether setvbuf arguments are reversed) +define(AC_FUNC_SETVBUF_REVERSED, +[AC_MSG_CHECKING(whether setvbuf arguments are reversed) AC_CACHE_VAL(ac_cv_func_setvbuf_reversed, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include /* If setvbuf has the reversed format, exit 0. */ main () { /* This call has the arguments reversed. @@ -1041,9 +1046,9 @@ dnl dnl define(AC_STRUCT_TM, [AC_PROVIDE([$0])dnl -AC_CHECKING([for struct tm in sys/time.h instead of time.h]) +AC_MSG_CHECKING([for struct tm in sys/time.h instead of time.h]) AC_CACHE_VAL(ac_cv_struct_tm, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include ], [struct tm *tp; tp->tm_sec;], ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])dnl @@ -1052,10 +1057,10 @@ if test $ac_cv_struct_tm = sys/time.h; then fi ])dnl dnl -define(AC_TIME_WITH_SYS_TIME, -[AC_CHECKING([whether time.h and sys/time.h may both be included]) +define(AC_HEADER_TIME, +[AC_MSG_CHECKING([whether time.h and sys/time.h may both be included]) AC_CACHE_VAL(ac_cv_header_time, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include #include ], [struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])dnl @@ -1064,23 +1069,23 @@ if test $ac_cv_header_time = yes; then fi ])dnl dnl -define(AC_TIMEZONE, +define(AC_STRUCT_TIMEZONE, [AC_REQUIRE([AC_STRUCT_TM])dnl -AC_CHECKING([for tm_zone in struct tm]) +AC_MSG_CHECKING([for tm_zone in struct tm]) AC_CACHE_VAL(ac_cv_struct_tm_zone, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;], ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])dnl if test "$ac_cv_struct_tm_zone" = yes; then AC_DEFINE(HAVE_TM_ZONE) else - AC_CHECKING([for tzname]) + AC_MSG_CHECKING([for tzname]) AC_CACHE_VAL(ac_cv_var_tzname, -[AC_TEST_LINK(changequote(<<,>>)dnl +[AC_TRY_LINK(changequote(<<, >>)dnl <<#include #ifndef tzname /* For SGI. */ 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 if test $ac_cv_var_tzname = yes; then AC_DEFINE(HAVE_TZNAME) @@ -1088,10 +1093,10 @@ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ fi ])dnl dnl -define(AC_ST_BLOCKS, -[AC_CHECKING([for st_blocks in struct stat]) +define(AC_STRUCT_ST_BLOCKS, +[AC_MSG_CHECKING([for st_blocks in struct stat]) AC_CACHE_VAL(ac_cv_struct_st_blocks, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include ], [struct stat s; s.st_blocks;], ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])dnl if test $ac_cv_struct_st_blocks = yes; then @@ -1102,10 +1107,10 @@ fi AC_SUBST(LIBOBJS)dnl ])dnl dnl -define(AC_ST_BLKSIZE, -[AC_CHECKING([for st_blksize in struct stat]) +define(AC_STRUCT_ST_BLKSIZE, +[AC_MSG_CHECKING([for st_blksize in struct stat]) AC_CACHE_VAL(ac_cv_struct_st_blksize, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include ], [struct stat s; s.st_blksize;], ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])dnl if test $ac_cv_struct_st_blksize = yes; then @@ -1113,10 +1118,10 @@ if test $ac_cv_struct_st_blksize = yes; then fi ])dnl dnl -define(AC_ST_RDEV, -[AC_CHECKING([for st_rdev in struct stat]) +define(AC_STRUCT_ST_RDEV, +[AC_MSG_CHECKING([for st_rdev in struct stat]) AC_CACHE_VAL(ac_cv_struct_st_rdev, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include ], [struct stat s; s.st_rdev;], ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])dnl if test $ac_cv_struct_st_rdev = yes; then @@ -1128,23 +1133,23 @@ dnl dnl ### Checks for compiler characteristics dnl dnl -define(AC_CROSS_CHECK, +define(AC_TRY_CROSS, [AC_PROVIDE([$0])dnl # If we cannot run a trivial program, we must be cross compiling. -AC_CHECKING(whether cross-compiling) +AC_MSG_CHECKING(whether cross-compiling) AC_CACHE_VAL(ac_cv_c_cross, -[AC_TEST_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 if test $ac_cv_c_cross = yes; then - AC_VERBOSE(we are cross-compiling) + AC_MSG_RESULT(we are cross-compiling) else - AC_VERBOSE(we are not cross-compiling) + AC_MSG_RESULT(we are not cross-compiling) fi])dnl dnl -define(AC_CHAR_UNSIGNED, -[AC_CHECKING(for unsigned characters) +define(AC_C_CHAR_UNSIGNED, +[AC_MSG_CHECKING(for unsigned characters) AC_CACHE_VAL(ac_cv_c_char_unsigned, -[AC_TEST_RUN( +[AC_TRY_RUN( [/* volatile prevents gcc2 from optimizing the test away on sparcs. */ #if !__STDC__ #define volatile @@ -1161,14 +1166,14 @@ if test $ac_cv_c_char_unsigned = yes; then fi ])dnl dnl -define(AC_LONG_DOUBLE, +define(AC_C_LONG_DOUBLE, [AC_REQUIRE([AC_PROG_CC])dnl -AC_CHECKING(for long double) +AC_MSG_CHECKING(for long double) AC_CACHE_VAL(ac_cv_c_long_double, [if test "$GCC" = yes; then ac_cv_c_long_double=yes else -AC_TEST_RUN([int main() { +AC_TRY_RUN([int main() { /* The Stardent Vistra knows sizeof(long double), but does not support it. */ long double foo = 0.0; /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ @@ -1181,23 +1186,23 @@ fi ])dnl dnl define(AC_INT_16_BITS, -[AC_OBSOLETE([$0], [; instead use AC_SIZEOF_TYPE(int)]) -AC_CHECKING(integer size) -AC_TEST_RUN([main() { exit(sizeof(int) != 2); }], +[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)]) +AC_MSG_CHECKING(integer size) +AC_TRY_RUN([main() { exit(sizeof(int) != 2); }], AC_DEFINE(INT_16_BITS)) ])dnl dnl define(AC_LONG_64_BITS, -[AC_OBSOLETE([$0], [; instead use AC_SIZEOF_TYPE(long)]) -AC_CHECKING(for 64-bit long ints) -AC_TEST_RUN([main() { exit(sizeof(long int) != 8); }], +[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)]) +AC_MSG_CHECKING(for 64-bit long ints) +AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }], AC_DEFINE(LONG_64_BITS)) ])dnl dnl -define(AC_WORDS_BIGENDIAN, -[AC_CHECKING(byte ordering) +define(AC_C_BIGENDIAN, +[AC_MSG_CHECKING(byte ordering) AC_CACHE_VAL(ac_cv_c_bigendian, -[AC_TEST_RUN([main () { +[AC_TRY_RUN([main () { /* Are we little or big endian? From Harbison&Steele. */ union { @@ -1212,10 +1217,10 @@ if test $ac_cv_c_bigendian = yes; then fi ])dnl dnl -define(AC_ARG_ARRAY, -[AC_CHECKING(whether the address of an argument can be used as an array) +define(AC_C_ARG_ARRAY, +[AC_MSG_CHECKING(whether the address of an argument can be used as an array) AC_CACHE_VAL(ac_cv_c_arg_array, -[AC_TEST_RUN([main() { +[AC_TRY_RUN([main() { /* Return 0 iff arg arrays are ok. */ exit(!x(1, 2, 3, 4)); } @@ -1232,12 +1237,12 @@ if test $ac_cv_c_arg_array = no; then fi ])dnl dnl -define(AC_INLINE, +define(AC_C_INLINE, [AC_REQUIRE([AC_PROG_CC])dnl -AC_CHECKING([for inline]) +AC_MSG_CHECKING([for inline]) AC_CACHE_VAL(ac_cv_c_inline, [if test "$GCC" = yes; then -AC_TEST_LINK( , [} inline foo() {], ac_cv_c_inline=yes, ac_cv_c_inline=no) +AC_TRY_LINK(, [} inline foo() {], ac_cv_c_inline=yes, ac_cv_c_inline=no) else ac_cv_c_inline=no fi])dnl @@ -1245,11 +1250,11 @@ if test $ac_cv_c_inline = no; then AC_DEFINE(inline, __inline) fi ])dnl -define(AC_CONST, +define(AC_C_CONST, [dnl Do not "break" this again. -AC_CHECKING([for lack of working const]) +AC_MSG_CHECKING([for lack of working const]) AC_CACHE_VAL(ac_cv_c_const, -[changequote(,)dnl +[changequote(, )dnl dnl Do not put single quotes in the C program text! ac_prog='/* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; @@ -1272,7 +1277,7 @@ ccp = (char const *const *) p; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25,17}; + int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } @@ -1289,10 +1294,10 @@ ccp = (char const *const *) p; { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; }' -changequote([,])dnl -AC_TEST_LINK( , [$ac_prog], ac_cv_c_const=yes, ac_cv_c_const=no)])dnl +changequote([, ])dnl +AC_TRY_LINK(, [$ac_prog], ac_cv_c_const=yes, ac_cv_c_const=no)])dnl if test $ac_cv_c_const = no; then - AC_DEFINE(const,) + AC_DEFINE(const, ) fi ])dnl dnl @@ -1301,7 +1306,7 @@ dnl ### Checks for operating system services dnl dnl define(AC_HAVE_POUNDBANG, -[AC_CHECKING(whether [#]! works in shell scripts) +[AC_MSG_CHECKING(whether [#]! works in shell scripts) AC_CACHE_VAL(ac_cv_sys_interpreter, [echo '#!/bin/cat exit 69 @@ -1321,13 +1326,13 @@ ifelse([$2], , , [else ])dnl fi ])dnl -define(AC_REMOTE_TAPE, -[AC_CHECKING(for remote tape and socket header files) -AC_HEADER_CHECK(sys/mtio.h, AC_DEFINE(HAVE_SYS_MTIO_H)) +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)) if test "$ac_cv_header_mtio_h" = yes; then AC_CACHE_VAL(ac_cv_header_rmt, -[AC_TEST_CPP([#include +[AC_TRY_CPP([#include #include ], ac_cv_header_rmt=yes, ac_cv_header_rmt=no)])dnl if test $ac_cv_header_rmt = yes; then PROGS="$PROGS rmt" @@ -1336,8 +1341,8 @@ fi AC_SUBST(PROGS)dnl ])dnl dnl -define(AC_LONG_FILE_NAMES, -[AC_CHECKING(for long file names) +define(AC_SYS_LONG_FILE_NAMES, +[AC_MSG_CHECKING(for long file names) AC_CACHE_VAL(ac_cv_sys_long_file_names, [ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: @@ -1366,10 +1371,10 @@ if test $ac_cv_sys_long_file_names = yes; then fi ])dnl dnl -define(AC_RESTARTABLE_SYSCALLS, -[AC_CHECKING(for restartable system calls) +define(AC_SYS_RESTARTABLE_SYSCALLS, +[AC_MSG_CHECKING(for restartable system calls) AC_CACHE_VAL(ac_cv_sys_restartable_syscalls, -[AC_TEST_RUN( +[AC_TRY_RUN( [/* Exit 0 (true) if wait returns something other than -1, i.e. the pid of the child, which means that wait was restarted after getting the signal. */ @@ -1390,8 +1395,8 @@ if test $ac_cv_sys_restartable_syscalls = yes; then fi ])dnl dnl -define(AC_FIND_X, -[AC_REQUIRE_CPP()dnl Set CPP; we run AC_FIND_X_DIRECT conditionally. +define(AC_PATH_X, +[AC_REQUIRE_CPP()dnl Set CPP; we run AC_PATH_X_DIRECT conditionally. AC_PROVIDE([$0])dnl # If we find X, set shell vars x_includes and x_libraries to the paths. no_x=yes @@ -1403,13 +1408,13 @@ test -n "$x_includes" && ac_cv_x_includes="$x_includes" test -n "$x_libraries" && ac_cv_x_includes="$x_libraries" if test "${ac_cv_x_includes+set}" = set && test "${ac_cv_x_libraries+set}" = set; then - AC_VERBOSE(using cached values for ac_cv_x_includes and ac_cv_x_libraries) + AC_MSG_RESULT(using cached values for ac_cv_x_includes and ac_cv_x_libraries) else -AC_FIND_X_XMKMF +AC_PATH_X_XMKMF fi if test "${ac_cv_x_includes+set}" != set || test "${ac_cv_x_libraries+set}" != set; then -AC_FIND_X_DIRECT +AC_PATH_X_DIRECT fi test -z "$ac_cv_x_includes" && ac_cv_x_includes=NONE test -z "$ac_cv_x_libraries" && ac_cv_x_libraries=NONE @@ -1423,14 +1428,14 @@ if test -z "$x_libraries" && test "$ac_cv_x_libraries" != NONE; then x_libraries="$ac_cv_x_libraries" fi -test -n "$x_includes" && AC_VERBOSE(X11 headers are in $x_includes) -test -n "$x_libraries" && AC_VERBOSE(X11 libraries are in $x_libraries) +test -n "$x_includes" && AC_MSG_RESULT(X11 headers are in $x_includes) +test -n "$x_libraries" && AC_MSG_RESULT(X11 libraries are in $x_libraries) fi # No --with-x=no. ])dnl dnl -dnl Internal subroutine of AC_FIND_X. -define(AC_FIND_X_XMKMF, -[AC_CHECKING(for X include and library files with xmkmf) +dnl Internal subroutine of AC_PATH_X. +define(AC_PATH_X_XMKMF, +[AC_MSG_CHECKING(for X include and library files with xmkmf) rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -1462,12 +1467,12 @@ EOF fi ])dnl dnl -dnl Internal subroutine of AC_FIND_X. -define(AC_FIND_X_DIRECT, -[AC_CHECKING(for X include and library files directly) -test -z "$x_direct_test_library" && x_direct_test_library=Xt -test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h -AC_TEST_CPP([#include <$x_direct_test_include>], no_x=, +dnl Internal subroutine of AC_PATH_X. +define(AC_PATH_X_DIRECT, +[AC_MSG_CHECKING(for X include and library files directly) +test -z "$x_direct_TRY_library" && x_direct_TRY_library=Xt +test -z "$x_direct_TRY_include" && x_direct_TRY_include=X11/Intrinsic.h +AC_TRY_CPP([#include <$x_direct_TRY_include>], no_x=, for ac_dir in \ /usr/X11R6/include \ /usr/X11R5/include \ @@ -1505,7 +1510,7 @@ AC_TEST_CPP([#include <$x_direct_test_include>], no_x=, /usr/openwin/share/include \ ; \ do - if test -r "$ac_dir/$x_direct_test_include"; then + if test -r "$ac_dir/$x_direct_TRY_include"; then test -z "$ac_cv_x_includes" && ac_cv_x_includes=$ac_dir no_x= break @@ -1514,7 +1519,7 @@ AC_TEST_CPP([#include <$x_direct_test_include>], no_x=, # Check for the libraries. First see if replacing the include by # lib works. -AC_HAVE_LIBRARY("$x_direct_test_library", no_x=, +AC_CHECK_LIB("$x_direct_TRY_library", no_x=, for ac_dir in `echo "$ac_cv_x_includes" | sed s/include/lib/` \ /usr/X11R6/lib \ /usr/X11R5/lib \ @@ -1553,7 +1558,7 @@ for ac_dir in `echo "$ac_cv_x_includes" | sed s/include/lib/` \ ; \ do for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + if test -r $ac_dir/lib${x_direct_TRY_library}.$ac_extension; then test -z "$ac_cv_x_libraries" && ac_cv_x_libraries=$ac_dir no_x= break 2 @@ -1562,10 +1567,10 @@ do done)])dnl dnl dnl Find additional X libraries, magic flags, etc. -define(AC_FIND_XTRA, -[AC_REQUIRE([AC_ISC_POSIX])dnl -AC_REQUIRE([AC_FIND_X])dnl -AC_CHECKING(for additional X libraries and flags) +define(AC_PATH_XTRA, +[AC_REQUIRE([AC_OS_ISC])dnl +AC_REQUIRE([AC_PATH_X])dnl +AC_MSG_CHECKING(for additional X libraries and flags) if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" elif test "$no_x" = yes; then @@ -1592,22 +1597,22 @@ else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). - AC_HAVE_LIBRARY(dnet, + AC_CHECK_LIB(dnet, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" ac_have_dnet=yes], ac_have_dnet=no) if test "$ac_have_dnet" = no; then - AC_HAVE_LIBRARY(dnet_stub, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) + AC_CHECK_LIB(dnet_stub, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT 2.0. # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch. if test "`(uname) 2>/dev/null`" != IRIX; then - AC_HAVE_LIBRARY(socket, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"]) + AC_CHECK_LIB(socket, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"]) fi fi # -AC_VERBOSE(X compiler flags: $X_CFLAGS) -AC_VERBOSE(X library flags: $X_LIBS) -AC_VERBOSE(extra X libraries: $X_EXTRA_LIBS) +AC_MSG_RESULT(X compiler flags: $X_CFLAGS) +AC_MSG_RESULT(X library flags: $X_LIBS) +AC_MSG_RESULT(extra X libraries: $X_EXTRA_LIBS) AC_SUBST(X_CFLAGS)dnl AC_SUBST(X_LIBS)dnl AC_SUBST(X_EXTRA_LIBS)dnl @@ -1618,23 +1623,23 @@ dnl ### Checks for UNIX variants dnl These are kludges; we need a more systematic approach. dnl dnl -define(AC_AIX, -[AC_CHECKING(for AIX) -AC_BEFORE([$0], [AC_TEST_LINK])dnl -AC_BEFORE([$0], [AC_TEST_RUN])dnl -AC_BEFORE([$0], [AC_TEST_CPP])dnl -AC_PROGRAM_EGREP(yes, +define(AC_OS_AIX, +[AC_MSG_CHECKING(for AIX) +AC_BEFORE([$0], [AC_TRY_LINK])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_BEFORE([$0], [AC_TRY_CPP])dnl +AC_EGREP_CPP(yes, [#ifdef _AIX yes #endif ], AC_DEFINE(_ALL_SOURCE)) ])dnl dnl -define(AC_MINIX, -[AC_BEFORE([$0], [AC_TEST_LINK])dnl -AC_BEFORE([$0], [AC_TEST_RUN])dnl -AC_BEFORE([$0], [AC_TEST_CPP])dnl -AC_HEADER_CHECK(minix/config.h, MINIX=yes, MINIX=) +define(AC_OS_MINIX, +[AC_BEFORE([$0], [AC_TRY_LINK])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_BEFORE([$0], [AC_TRY_CPP])dnl +AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) # The Minix shell ca not assign to the same variable on the same line! if test "$MINIX" = yes; then AC_DEFINE(_POSIX_SOURCE) @@ -1643,12 +1648,12 @@ if test "$MINIX" = yes; then fi ])dnl dnl -define(AC_ISC_POSIX, +define(AC_OS_ISC, [AC_PROVIDE([$0])dnl -AC_BEFORE([$0], [AC_TEST_LINK])dnl -AC_BEFORE([$0], [AC_TEST_RUN])dnl -AC_BEFORE([$0], [AC_TEST_CPP])dnl -AC_CHECKING(for POSIXized ISC) +AC_BEFORE([$0], [AC_TRY_LINK])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_BEFORE([$0], [AC_TRY_CPP])dnl +AC_MSG_CHECKING(for POSIXized ISC) if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1 then @@ -1664,10 +1669,10 @@ else fi ])dnl dnl -define(AC_XENIX_DIR, -[AC_REQUIRE([AC_DIR_HEADER])dnl -AC_CHECKING(for Xenix) -AC_PROGRAM_EGREP(yes, +define(AC_OS_XENIX, +[AC_REQUIRE([AC_HEADER_DIRENT])dnl +AC_MSG_CHECKING(for Xenix) +AC_EGREP_CPP(yes, [#if defined(M_XENIX) && !defined(M_UNIX) yes #endif @@ -1681,14 +1686,14 @@ if test "$XENIX" = yes; then fi ])dnl dnl -define(AC_SCO_INTL, -[AC_HAVE_LIBRARY(intl, LIBS="$LIBS -lintl") +define(AC_OS_SCO, +[AC_CHECK_LIB(intl, LIBS="$LIBS -lintl") ])dnl dnl -define(AC_IRIX_SUN, -[AC_HAVE_LIBRARY(sun, LIBS="$LIBS -lsun") +define(AC_OS_IRIX, +[AC_CHECK_LIB(sun, LIBS="$LIBS -lsun") ])dnl dnl -define(AC_DYNIX_SEQ, -[AC_HAVE_LIBRARY(seq, LIBS="$LIBS -lseq") +define(AC_OS_DYNIX, +[AC_CHECK_LIB(seq, LIBS="$LIBS -lseq") ])dnl diff --git a/autoconf.in b/autoconf.in index f1c73e6c..0cb5859d 100644 --- a/autoconf.in +++ b/autoconf.in @@ -21,8 +21,8 @@ # the given template file. usage="\ -Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir] - [-v] [--version] [template-file]" +Usage: autoconf [-hv] [--help] [-m dir] [--macrodir=dir] + [--version] [template-file]" # NLS nuisances. # Only set `LANG' and `LC_ALL' to "C" if already set. @@ -40,8 +40,8 @@ case "${M4}" in esac tmpout=/tmp/acout.$$ - print_version= + while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) @@ -88,13 +88,14 @@ if test -z "$print_version"; then fi fi -MACROFILES="${AC_MACRODIR}/acgeneral.m4 ${AC_MACRODIR}/acspecific.m4" -test -r ${AC_MACRODIR}/aclocal.m4 \ - && MACROFILES="${MACROFILES} ${AC_MACRODIR}/aclocal.m4" +MACROFILES="${AC_MACRODIR}/acgeneral.m4 ${AC_MACRODIR}/acspecific.m4 \ +${AC_MACRODIR}/acoldnames.m4" +test -r ${AC_MACRODIR}/aclocal.m4 && + MACROFILES="${MACROFILES} ${AC_MACRODIR}/aclocal.m4" test -r aclocal.m4 && MACROFILES="${MACROFILES} aclocal.m4" -MACROFILES="${print_version} ${MACROFILES}" +MACROFILES="${print_version} ${MACROFILES} ${infile}" -$M4 $MACROFILES $infile > $tmpout || { st=$?; rm -f $tmpin $tmpout; exit $st; } +$M4 $MACROFILES > $tmpout || { st=$?; rm -f $tmpin $tmpout; exit $st; } if test -n "$print_version"; then cat $tmpout diff --git a/autoconf.sh b/autoconf.sh index f1c73e6c..0cb5859d 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -21,8 +21,8 @@ # the given template file. usage="\ -Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir] - [-v] [--version] [template-file]" +Usage: autoconf [-hv] [--help] [-m dir] [--macrodir=dir] + [--version] [template-file]" # NLS nuisances. # Only set `LANG' and `LC_ALL' to "C" if already set. @@ -40,8 +40,8 @@ case "${M4}" in esac tmpout=/tmp/acout.$$ - print_version= + while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) @@ -88,13 +88,14 @@ if test -z "$print_version"; then fi fi -MACROFILES="${AC_MACRODIR}/acgeneral.m4 ${AC_MACRODIR}/acspecific.m4" -test -r ${AC_MACRODIR}/aclocal.m4 \ - && MACROFILES="${MACROFILES} ${AC_MACRODIR}/aclocal.m4" +MACROFILES="${AC_MACRODIR}/acgeneral.m4 ${AC_MACRODIR}/acspecific.m4 \ +${AC_MACRODIR}/acoldnames.m4" +test -r ${AC_MACRODIR}/aclocal.m4 && + MACROFILES="${MACROFILES} ${AC_MACRODIR}/aclocal.m4" test -r aclocal.m4 && MACROFILES="${MACROFILES} aclocal.m4" -MACROFILES="${print_version} ${MACROFILES}" +MACROFILES="${print_version} ${MACROFILES} ${infile}" -$M4 $MACROFILES $infile > $tmpout || { st=$?; rm -f $tmpin $tmpout; exit $st; } +$M4 $MACROFILES > $tmpout || { st=$?; rm -f $tmpin $tmpout; exit $st; } if test -n "$print_version"; then cat $tmpout diff --git a/autoconf.texi b/autoconf.texi index 2f47a998..a988b9d8 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -6,9 +6,9 @@ @c @setchapternewpage odd @c %**end of header -@set EDITION 1.95 -@set VERSION 1.95 -@set UPDATED July 1994 +@set EDITION 1.96 +@set VERSION 1.96 +@set UPDATED August 1994 @iftex @finalout @@ -117,6 +117,7 @@ Making @code{configure} Scripts * Invoking autoscan:: Semi-automatic @file{configure.in} writing. * Invoking ifnames:: Listing the conditionals in source code. * Invoking autoreconf:: Remaking multiple @code{configure} scripts. +* Invoking autoupdate:: Replacing old macro names in @code{configure.in}. * Invoking shindent:: Making @code{configure} scripts more readable. Specific Tests @@ -170,11 +171,11 @@ Makefiles Running @code{configure} Scripts * Basic Installation:: Instructions for typical cases. +* Compilers and Options:: Selecting compilers and optimization. * Build Directory:: Configuring in a different directory. * Installation Directories:: Installing in different directories. * System Type:: Specifying the system type. * Optional Features:: Selecting optional features. -* Compilers and Options:: Selecting compilers and optimization. An Example @@ -237,7 +238,7 @@ functions that are not available instead of omitting them from the library. As a result, Autoconf scripts are fooled into thinking that those functions are available. This problem does not exist with releases 1.06 and later of the GNU C library, which define C -preprocessor macros that the Autoconf macros @code{AC_FUNC_CHECK} and +preprocessor macros that the Autoconf macros @code{AC_CHECK_FUNC} and @code{AC_REPLACE_FUNCS} test, indicating that certain functions are stubs (@pxref{C Features}, for more information on checking for functions). @@ -363,6 +364,7 @@ Makefile.in ---' `-> Makefile ---' * Invoking autoscan:: Semi-automatic @file{configure.in} writing. * Invoking ifnames:: Listing the conditionals in source code. * Invoking autoreconf:: Remaking multiple @code{configure} scripts. +* Invoking autoupdate:: Replacing old macro names in @code{configure.in}. * Invoking shindent:: Making @code{configure} scripts more readable. @end menu @@ -475,8 +477,8 @@ preprocessor symbols it might define. It copies comments and also uses a file called @file{acconfig.h} in the current directory, if present; you must create that file to contain entries for any additional symbols that you @code{AC_DEFINE}. For symbols defined by -@code{AC_HAVE_HEADERS}, @code{AC_HAVE_FUNCS}, @code{AC_SIZEOF_TYPE}, -or @code{AC_HAVE_LIBRARY}, +@code{AC_CHECK_HEADERS}, @code{AC_CHECK_FUNCS}, @code{AC_CHECK_SIZEOF}, +or @code{AC_CHECK_LIB}, @code{autoheader} generates comments and @code{#undef} statements itself rather than copying them from a file, since the possible symbols are effectively limitless. @@ -580,7 +582,7 @@ default installation directory. Only used to get the version number. Print the version number of @code{ifnames} and exit. @end table -@node Invoking autoreconf, Invoking shindent, Invoking ifnames, Making configure Scripts +@node Invoking autoreconf, Invoking autoupdate, Invoking ifnames, Making configure Scripts @section Invoking autoreconf If you have a lot of Autoconf-generated @code{configure} scripts and you @@ -609,7 +611,42 @@ Print the name of each directory where @code{autoreconf} runs Print the version number of @code{autoreconf} and exit. @end table -@node Invoking shindent, , Invoking autoreconf, Making configure Scripts +@node Invoking autoupdate, Invoking shindent, Invoking autoreconf, Making configure Scripts +@section Invoking autoupdate + +The @code{autoupdate} program updates a @file{configure.in} file that +calls Autoconf macros by their old names to use the current macro names. +In version 2 of Autoconf, most of the macros were renamed to use a more +uniform and descriptive naming scheme. Although the old names still +work (@pxref{Old Macro Names}, for a list of the old macro names and the +corresponding new names), you can make your @file{configure.in} files +more readable and make it easier to use the current Autoconf +documentation if you update them to use the new macro names. + +If given no arguments, @code{autoupdate} updates @file{configure.in}, +backing up the original version in the file @file{configure.in~}. If +you give @code{autoupdate} an argument, it reads that file instead of +@file{configure.in} and writes the updated file to the standard output. + +@noindent +@code{autoupdate} accepts the following options: + +@table @code +@item --help +@itemx -h +Print a summary of the command line options and exit. + +@item --macrodir=@var{dir} +@itemx -m @var{dir} +Look for the Autoconf macro files in directory @var{dir} instead of the +default installation directory. + +@item --version +@itemx -v +Print the version number of @code{autoupdate} and exit. +@end table + +@node Invoking shindent, , Invoking autoupdate, Making configure Scripts @section Invoking shindent Autoconf-generated @code{configure} scripts can be somewhat hard to @@ -698,7 +735,7 @@ what existing GNU programs use. These macros are defined in the file The following macros check for the presence or behavior of particular programs: -@defmac AC_GCC_TRADITIONAL +@defmac AC_PROG_GCC_TRADITIONAL @maindex GCC_TRADITIONAL Add @samp{-traditional} to @code{make} variable @code{CC} if using the GNU C compiler and @code{ioctl} does not work properly without @@ -706,14 +743,14 @@ GNU C compiler and @code{ioctl} does not work properly without @code{AC_PROG_CPP} if they haven't been called already. @end defmac -@defmac AC_LN_S +@defmac AC_PROG_LN_S @maindex LN_S If @samp{ln -s} works on the current filesystem (the operating system and filesystem support symbolic links), set shell and @code{make} variable @code{LN_S} to @samp{ln -s}, otherwise set it to @samp{ln}. @end defmac -@defmac AC_MINUS_C_MINUS_O +@defmac AC_PROG_CC_C_O @maindex MINUS_C_MINUS_O @vindex NO_MINUS_C_MINUS_O If the C compiler does not accept the @samp{-c} and @samp{-o} options @@ -743,8 +780,8 @@ extension. If the current language is C (@pxref{Language Choice}), many of the specific test macros use the value of @code{CPP} indirectly by calling -@code{AC_TEST_CPP}, @code{AC_HEADER_CHECK}, @code{AC_HEADER_EGREP}, or -@code{AC_PROGRAM_EGREP}. Those macros call this macro first if it +@code{AC_TRY_CPP}, @code{AC_CHECK_HEADER}, @code{AC_EGREP_HEADER}, or +@code{AC_EGREP_CPP}. Those macros call this macro first if it hasn't been called already. It calls @code{AC_PROG_CC} if it hasn't been called already. @end defmac @@ -769,8 +806,8 @@ It is only portable to run @code{CXXCPP} on files with a @file{.c}, If the current language is C++ (@pxref{Language Choice}), many of the specific test macros use the value of @code{CXXCPP} indirectly by -calling @code{AC_TEST_CPP}, @code{AC_HEADER_CHECK}, -@code{AC_HEADER_EGREP}, or @code{AC_PROGRAM_EGREP}. Those macros call +calling @code{AC_TRY_CPP}, @code{AC_CHECK_HEADER}, +@code{AC_EGREP_HEADER}, or @code{AC_EGREP_CPP}. Those macros call this macro first if it hasn't been called already. This macro calls @code{AC_PROG_CXX} if it hasn't been called already. @end defmac @@ -816,7 +853,7 @@ If @code{bison} is found, set @code{make} variable @code{YACC} to to @samp{byacc}. Otherwise set @code{YACC} to @samp{yacc}. @end defmac -@defmac AC_RSH +@defmac AC_PROG_RSH @maindex RSH @vindex RSH @vindex NO_REMOTE @@ -828,7 +865,7 @@ also put @samp{rtapelib.o} in @code{make} variable @code{RTAPELIB}. Otherwise, define @code{NO_REMOTE}. @end defmac -@defmac AC_SET_MAKE +@defmac AC_PROG_MAKE_SET @maindex SET_MAKE If @code{make} predefines the variable @code{MAKE}, define @code{make} variable @code{SET_MAKE} to be empty. Otherwise, define @code{SET_MAKE} @@ -848,7 +885,7 @@ If you use this macro, simply place a line like this in your @end example @end defmac -@defmac AC_YYTEXT_POINTER +@defmac AC_DECL_YYTEXT @maindex YYTEXT_POINTER @vindex YYTEXT_POINTER Define @code{YYTEXT_POINTER} if @code{yytext} is a @samp{char *} instead @@ -865,23 +902,42 @@ This macro replaces @code{AC_DECLARE_YYTEXT}, which didn't work. The following macros check for the presence of certain C header files: -@defmac AC_DIR_HEADER +@defmac AC_HEADER_DIRENT @maindex DIR_HEADER @vindex DIRENT +@vindex HAVE_DIRENT_H +@vindex HAVE_NDIR_H +@vindex HAVE_SYS_DIR_H +@vindex HAVE_SYS_NDIR_H @vindex SYSDIR @vindex SYSNDIR @vindex NDIR @vindex VOID_CLOSEDIR -If the system has @file{dirent.h}, define @code{DIRENT}; otherwise, if -it has @file{sys/ndir.h}, define @code{SYSNDIR}; otherwise, if it has -@file{sys/dir.h}, define @code{SYSDIR}; otherwise, if it has -@file{ndir.h}, define @code{NDIR}. Also, if the directory library -header file contains a declaration of the @code{closedir} function with -a @code{void} return type, define @code{VOID_CLOSEDIR}. +Check for the the following header files, and for the first one that is +found, define the listed macros (the second macros listed are for +backward compatibility, and are considered obsolete): + +@table @file +@item dirent.h +Define @code{HAVE_DIRENT_H} and @code{DIRENT}. + +@item sys/ndir.h +Define @code{HAVE_SYS_NDIR_H} and @code{SYSNDIR}. + +@item sys/dir.h +Define @code{HAVE_SYS_DIR_H} and @code{SYSDIR}. + +@item ndir.h +Define @code{HAVE_NDIR_H} and @code{NDIR}. +@end table + +Also, if the directory library header file contains a declaration of the +@code{closedir} function with a @code{void} return type, define +@code{VOID_CLOSEDIR}. The directory library declarations in the source code should look something like the following, which assumes that you have also called -@samp{AC_HAVE_HEADERS(unistd.h)}: +@samp{AC_CHECK_HEADERS(unistd.h)}: @example @group @@ -890,33 +946,32 @@ something like the following, which assumes that you have also called #include #endif -/* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */ -#if defined(DIRENT) || defined(_POSIX_VERSION) -#include -#define NLENGTH(dirent) (strlen((dirent)->d_name)) -#else /* not (DIRENT or _POSIX_VERSION) */ -#define dirent direct -#define NLENGTH(dirent) ((dirent)->d_namlen) -#ifdef SYSNDIR -#include -#endif /* SYSNDIR */ -#ifdef SYSDIR -#include -#endif /* SYSDIR */ -#ifdef NDIR -#include -#endif /* NDIR */ -#endif /* not (DIRENT or _POSIX_VERSION) */ +#ifdef HAVE_DIRENT_H +# include +# define NAMLEN(dirent) (strlen((dirent)->d_name)) +#else /* !HAVE_DIRENT_H */ +# define dirent direct +# define NAMLEN(dirent) ((dirent)->d_namlen) +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* HAVE_SYS_NDIR_H */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* HAVE_SYS_DIR_H */ +# ifdef HAVE_NDIR_H +# include +# endif /* HAVE_NDIR_H */ +#endif /* !HAVE_DIRENT_H */ @end group @end example Using the above declarations, the program would declare variables to be type @code{struct dirent}, not @code{struct direct}, and would access the length of a directory entry name by passing a pointer to a -@code{struct dirent} to the @code{NLENGTH} macro. +@code{struct dirent} to the @code{NAMLEN} macro. @end defmac -@defmac AC_MAJOR_HEADER +@defmac AC_HEADER_MAJOR @maindex MAJOR_HEADER @vindex MAJOR_IN_MKDEV @vindex MAJOR_IN_SYSMACROS @@ -931,11 +986,11 @@ If @file{sys/types.h} does not define @code{major}, @code{minor}, and @vindex NEED_MEMORY_H Define @code{NEED_MEMORY_H} if @code{memcpy}, @code{memcmp}, etc. are not declared in @file{string.h} and @file{memory.h} exists. This macro -is obsolete; instead, use @code{AC_HAVE_HEADERS(memory.h)}. See the -example for @code{AC_STDC_HEADERS}. +is obsolete; instead, use @code{AC_CHECK_HEADERS(memory.h)}. See the +example for @code{AC_HEADER_STDC}. @end defmac -@defmac AC_STDC_HEADERS +@defmac AC_HEADER_STDC @maindex STDC_HEADERS @vindex STDC_HEADERS Define @code{STDC_HEADERS} if the system has ANSI C header files. @@ -957,8 +1012,8 @@ To check whether to use the System V/ANSI C string functions and header file, you can put the following in @file{configure.in}: @example -AC_STDC_HEADERS -AC_HAVE_HEADERS(string.h memory.h) +AC_HEADER_STDC +AC_CHECK_HEADERS(string.h memory.h) @end example @noindent @@ -1006,7 +1061,7 @@ been called already. @maindex UNISTD_H @vindex HAVE_UNISTD_H Define @code{HAVE_UNISTD_H} if the system has @file{unistd.h}. This -macro is obsolete; instead, use @samp{AC_HAVE_HEADERS(unistd.h)}. +macro is obsolete; instead, use @samp{AC_CHECK_HEADERS(unistd.h)}. The way to check if the system supports POSIX.1 is: @@ -1037,11 +1092,11 @@ Define @code{USG} if the system does not have @file{strings.h}, @file{string.h}, @code{strrchr}, @code{memset}, etc. The symbol @code{USG} is obsolete. Instead of this macro, use -@code{AC_HAVE_HEADERS(string.h)} and use @code{HAVE_STRING_H} in your -code. See the example for @code{AC_STDC_HEADERS}. +@code{AC_CHECK_HEADERS(string.h)} and use @code{HAVE_STRING_H} in your +code. See the example for @code{AC_HEADER_STDC}. @end defmac -@defmac AC_SYS_SIGLIST_DECLARED +@defmac AC_DECL_SYS_SIGLIST @maindex SYS_SIGLIST_DECLARED @vindex SYS_SIGLIST_DECLARED Define @code{SYS_SIGLIST_DECLARED} if the variable @code{sys_siglist} is @@ -1054,35 +1109,35 @@ declared in a system header file, either @file{signal.h} or The following macros check for predefined C types: -@defmac AC_GETGROUPS_T +@defmac AC_TYPE_GETGROUPS @maindex GETGROUPS_T @vindex GETGROUPS_T Define @code{GETGROUPS_T} to be whichever of @code{gid_t} or @code{int} is the base type of the array argument to @code{getgroups}. @end defmac -@defmac AC_MODE_T +@defmac AC_TYPE_MODE_T @maindex MODE_T @vindex mode_t If @code{mode_t} is not defined in @file{sys/types.h}, define @code{mode_t} to be @code{int}. @end defmac -@defmac AC_OFF_T +@defmac AC_TYPE_OFF_T @maindex OFF_T @vindex off_t If @code{off_t} is not defined in @file{sys/types.h}, define @code{off_t} to be @code{long}. @end defmac -@defmac AC_PID_T +@defmac AC_TYPE_PID_T @maindex PID_T @vindex pid_t If @code{pid_t} is not defined in @file{sys/types.h}, define @code{pid_t} to be @code{int}. @end defmac -@defmac AC_RETSIGTYPE +@defmac AC_TYPE_SIGNAL @maindex RETSIGTYPE @vindex RETSIGTYPE If @file{signal.h} declares @code{signal} as returning a pointer to a @@ -1102,14 +1157,14 @@ hup_handler () @end example @end defmac -@defmac AC_SIZE_T +@defmac AC_TYPE_SIZE_T @maindex SIZE_T @vindex size_t If @code{size_t} is not defined in @file{sys/types.h}, define @code{size_t} to be @code{unsigned}. @end defmac -@defmac AC_UID_T +@defmac AC_TYPE_UID_T @maindex UID_T @vindex uid_t @vindex gid_t @@ -1122,14 +1177,15 @@ If @code{uid_t} is not defined in @file{sys/types.h}, define The following macros check for particular C library functions: -@defmac AC_ALLOCA +@defmac AC_FUNC_ALLOCA @maindex ALLOCA @vindex C_ALLOCA @vindex HAVE_ALLOCA_H Check how to get @code{alloca}. Tries to get a builtin version by checking for @file{alloca.h} or the predefined C preprocessor macros @code{__GNUC__} and @code{_AIX}. If that fails, it looks for a function -in the standard C library. If that fails, it sets the @code{make} +in the standard C library. If any of those methods succeed, it defines +@code{HAVE_ALLOCA}. Otherwise, it sets the @code{make} variable @code{ALLOCA} to @samp{alloca.o} and defines @code{C_ALLOCA} (so programs can periodically call @samp{alloca(0)} to garbage collect). This variable is separate from @code{LIBOBJS} so multiple programs can @@ -1174,7 +1230,7 @@ char *alloca (); @end example @end defmac -@defmac AC_GETLOADAVG +@defmac AC_FUNC_GETLOADAVG @maindex GETLOADAVG @vindex SVR4 @vindex DGUX @@ -1218,14 +1274,14 @@ to the name of the group that should own the installed program. @end enumerate @end defmac -@defmac AC_MMAP +@defmac AC_FUNC_MMAP @maindex MMAP @vindex HAVE_MMAP If the @code{mmap} function exists and works correctly, define @code{HAVE_MMAP}. @end defmac -@defmac AC_SETVBUF_REVERSED +@defmac AC_FUNC_SETVBUF_REVERSED @maindex SETVBUF_REVERSED @vindex SETVBUF_REVERSED If @code{setvbuf} takes the buffering type as its second argument and @@ -1233,23 +1289,23 @@ the buffer pointer as the third, instead of the other way around, define @code{SETVBUF_REVERSED}. This is the case on System V before release 3. @end defmac -@defmac AC_STRCOLL +@defmac AC_FUNC_STRCOLL @maindex STRCOLL @vindex HAVE_STRCOLL If the @code{strcoll} function exists and works correctly, define @code{HAVE_STRCOLL}. This does a bit more than -@samp{AC_HAVE_FUNCS(strcoll)}, because some systems have incorrect +@samp{AC_CHECK_FUNCS(strcoll)}, because some systems have incorrect definitions of @code{strcoll}, which should not be used. @end defmac -@defmac AC_UTIME_NULL +@defmac AC_FUNC_UTIME_NULL @maindex UTIME_NULL @vindex HAVE_UTIME_NULL If @samp{utime(@var{file}, NULL)} sets @var{file}'s timestamp to the present, define @code{HAVE_UTIME_NULL}. @end defmac -@defmac AC_VFORK +@defmac AC_FUNC_VFORK @maindex VFORK @vindex HAVE_VFORK_H @vindex vfork @@ -1260,7 +1316,7 @@ and considers the system to not have a working @code{vfork} if it detects any of them. @end defmac -@defmac AC_VPRINTF +@defmac AC_FUNC_VPRINTF @maindex VPRINTF @vindex HAVE_VPRINTF @vindex HAVE_DOPRNT @@ -1270,7 +1326,7 @@ is available, you may assume that @code{vfprintf} and @code{vsprintf} are also available.) @end defmac -@defmac AC_WAIT3 +@defmac AC_FUNC_WAIT3 @maindex WAIT3 @vindex HAVE_WAIT3 If @code{wait3} is found and fills in the contents of its third argument @@ -1283,7 +1339,7 @@ If @code{wait3} is found and fills in the contents of its third argument The following macros check for certain structures or structure members: -@defmac AC_STAT_MACROS_BROKEN +@defmac AC_HEADER_STAT @maindex STAT_MACROS_BROKEN @maindex STAT_MACROS_BROKEN If the macros @code{S_ISDIR}, @code{S_ISREG} et al. defined in @@ -1292,14 +1348,14 @@ define @code{STAT_MACROS_BROKEN}. This is the case on Tektronix UTekV, Amdahl UTS and Motorola System V/88. @end defmac -@defmac AC_ST_BLKSIZE +@defmac AC_STRUCT_ST_BLKSIZE @maindex ST_BLKSIZE @vindex HAVE_ST_BLKSIZE If @code{struct stat} contains an @code{st_blksize} member, define @code{HAVE_ST_BLKSIZE}. @end defmac -@defmac AC_ST_BLOCKS +@defmac AC_STRUCT_ST_BLOCKS @maindex ST_BLOCKS @vindex HAVE_ST_BLOCKS If @code{struct stat} contains an @code{st_blocks} member, define @@ -1307,14 +1363,14 @@ If @code{struct stat} contains an @code{st_blocks} member, define @code{make} variable @code{LIBOBJS}. @end defmac -@defmac AC_ST_RDEV +@defmac AC_STRUCT_ST_RDEV @maindex ST_RDEV @vindex HAVE_ST_RDEV If @code{struct stat} contains an @code{st_rdev} member, define @code{HAVE_ST_RDEV}. @end defmac -@defmac AC_TIME_WITH_SYS_TIME +@defmac AC_HEADER_TIME @maindex TIME_WITH_SYS_TIME @vindex TIME_WITH_SYS_TIME If a program may include both @file{time.h} and @file{sys/time.h}, @@ -1348,7 +1404,7 @@ If @file{time.h} does not define @code{struct tm}, define defines @code{struct tm}. @end defmac -@defmac AC_TIMEZONE +@defmac AC_STRUCT_TIMEZONE @maindex TIMEZONE @vindex HAVE_TM_ZONE @vindex HAVE_TZNAME @@ -1364,7 +1420,7 @@ macro calls @code{AC_STRUCT_TM} if it hasn't been called already. The following macros check for C compiler or machine architecture features: -@defmac AC_ARG_ARRAY +@defmac AC_C_ARG_ARRAY @maindex ARG_ARRAY @vindex NO_ARG_ARRAY If the address of an argument to a C function can not be used like @@ -1373,24 +1429,24 @@ a sequence of arguments with the same type to be accessed as if they were an array of values. @end defmac -@defmac AC_CROSS_CHECK +@defmac AC_TRY_CROSS @maindex CROSS_CHECK 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 variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}. -This information can be used by @code{AC_TEST_RUN} to determine whether +This information can be used by @code{AC_TRY_RUN} to determine whether to take a default action instead of trying to run a test program (@pxref{C Features}). @end defmac -@defmac AC_CHAR_UNSIGNED +@defmac AC_C_CHAR_UNSIGNED @maindex CHAR_UNSIGNED @vindex __CHAR_UNSIGNED__ If the C type @code{char} is unsigned, define @code{__CHAR_UNSIGNED__}, unless the C compiler predefines it. @end defmac -@defmac AC_CONST +@defmac AC_C_CONST @maindex CONST @vindex const If the C compiler does not fully support the keyword @code{const}, @@ -1404,7 +1460,7 @@ include it before any other header files, to prevent inconsistencies in declarations.) @end defmac -@defmac AC_INLINE +@defmac AC_C_INLINE @maindex INLINE @vindex inline If the C compiler is a version of GCC that supports the keyword @@ -1418,7 +1474,7 @@ define @code{inline} to be @code{__inline}. This macro calls @vindex INT_16_BITS If the C type @code{int} is 16 bits wide, define @code{INT_16_BITS}. This macro is obsolete; it is more general to use -@samp{AC_SIZEOF_TYPE(int)} instead (@pxref{C Features}). +@samp{AC_CHECK_SIZEOF(int)} instead (@pxref{C Features}). @end defmac @defmac AC_LONG_64_BITS @@ -1426,10 +1482,10 @@ This macro is obsolete; it is more general to use @vindex LONG_64_BITS If the C type @code{long int} is 64 bits wide, define @code{LONG_64_BITS}. This macro is obsolete; it is more general to use -@samp{AC_SIZEOF_TYPE(long)} instead (@pxref{C Features}). +@samp{AC_CHECK_SIZEOF(long)} instead (@pxref{C Features}). @end defmac -@defmac AC_LONG_DOUBLE +@defmac AC_C_LONG_DOUBLE @maindex HAVE_LONG_DOUBLE @vindex HAVE_LONG_DOUBLE If the C compiler supports the @code{long double} type, define @@ -1438,7 +1494,7 @@ If the C compiler supports the @code{long double} type, define that define @code{__STDC__} do not support @code{long double}. @end defmac -@defmac AC_WORDS_BIGENDIAN +@defmac AC_C_BIGENDIAN @maindex WORDS_BIGENDIAN @vindex WORDS_BIGENDIAN If words are stored with the most significant byte first (like Motorola @@ -1450,7 +1506,7 @@ and SPARC, but not Intel and VAX, CPUs), define @code{WORDS_BIGENDIAN}. The following macros check for operating system services: -@defmac AC_FIND_X +@defmac AC_PATH_X @maindex FIND_X Try to locate the X Window System include files and libraries. Try first by running @code{xmkmf} on a trivial @file{Imakefile} and @@ -1468,19 +1524,19 @@ The command line options @samp{--x-includes=@var{dir}} and @samp{--x-libraries=@var{dir}} override the values chosen by this macro. @end defmac -@defmac AC_FIND_XTRA +@defmac AC_PATH_XTRA @maindex FIND_XTRA -An enhanced version of @code{AC_FIND_X}. Put the C compiler flags that +An enhanced version of @code{AC_PATH_X}. Put the C compiler flags that X needs into @code{make} variable @code{X_CFLAGS}, and the X linker flags into @code{X_LIBS}. If X is not available, put @samp{-DX_DISPLAY_MISSING} into @code{X_CFLAGS}. Also check for special libraries that some systems need in order to compile X programs. Add any that the system needs to @code{make} -variable @code{X_EXTRA_LIBS}. This macro calls @code{AC_FIND_X} and -@code{AC_ISC_POSIX} (@pxref{UNIX Variants}) if they have not already +variable @code{X_EXTRA_LIBS}. This macro calls @code{AC_PATH_X} and +@code{AC_OS_ISC} (@pxref{UNIX Variants}) if they have not already been called. Because of the macro dependencies, if you call this macro, -you should let it call @code{AC_FIND_X} rather than doing that yourself. +you should let it call @code{AC_PATH_X} rather than doing that yourself. @end defmac @defmac AC_HAVE_POUNDBANG (@var{action-if-supported} @r{[}, @var{action-if-not-supported}@r{]}) @@ -1491,14 +1547,14 @@ works, execute shell commands @var{action-if-supported}; if not, execute @var{action-if-not-supported}. @end defmac -@defmac AC_LONG_FILE_NAMES +@defmac AC_SYS_LONG_FILE_NAMES @maindex LONG_FILE_NAMES @vindex HAVE_LONG_FILE_NAMES If the system supports file names longer than 14 characters, define @code{HAVE_LONG_FILE_NAMES}. @end defmac -@defmac AC_REMOTE_TAPE +@defmac AC_SYS_REMOTE_TAPE @maindex REMOTE_TAPE @vindex HAVE_SYS_MTIO_H If BSD tape drive ioctls are available, define @code{HAVE_SYS_MTIO_H}, @@ -1506,7 +1562,7 @@ and if sockets are available add @code{rmt} to @code{make} variable @code{PROGS}. @end defmac -@defmac AC_RESTARTABLE_SYSCALLS +@defmac AC_SYS_RESTARTABLE_SYSCALLS @maindex RESTARTABLE_SYSCALLS @vindex HAVE_RESTARTABLE_SYSCALLS If the system automatically restarts a system call that is interrupted @@ -1522,21 +1578,21 @@ their header files or libraries. These macros are kludges; they should be replaced someday with a more systematic approach, based either on the functions they make available or the environments they provide. -@defmac AC_AIX +@defmac AC_OS_AIX @maindex AIX @vindex _ALL_SOURCE If on AIX, define @code{_ALL_SOURCE}. Allows the use of some BSD functions. Should be called before any macros that run the C compiler. @end defmac -@defmac AC_DYNIX_SEQ +@defmac AC_OS_DYNIX @maindex DYNIX_SEQ If on DYNIX/ptx (Sequent UNIX), add @samp{-lseq} to @code{make} variable @code{LIBS}. Allows use of some BSD system calls and @code{getmntent}. @end defmac -@defmac AC_IRIX_SUN +@defmac AC_OS_IRIX @maindex IRIX_SUN If on IRIX (Silicon Graphics UNIX), add @samp{-lsun} to @code{make} variable @code{LIBS}. Needed to get @code{getmntent}. At sites using @@ -1546,7 +1602,7 @@ so on. @c (According to Garrett.Wollman@uvm.edu.) @end defmac -@defmac AC_ISC_POSIX +@defmac AC_OS_ISC @maindex ISC_POSIX @vindex _POSIX_SOURCE If on a POSIXized ISC UNIX, define @code{_POSIX_SOURCE} and add @@ -1556,7 +1612,7 @@ POSIX facilities. Must be called after @code{AC_PROG_CC} and before any other macros that run the C compiler. @end defmac -@defmac AC_MINIX +@defmac AC_OS_MINIX @maindex MINIX @vindex _MINIX @vindex _POSIX_SOURCE @@ -1566,21 +1622,21 @@ If on Minix, define @code{_MINIX} and @code{_POSIX_SOURCE} and define facilities. Should be called before any macros that run the C compiler. @end defmac -@defmac AC_SCO_INTL +@defmac AC_OS_SCO @maindex SCO_INTL If on SCO UNIX, add @samp{-lintl} to @code{make} variable @code{LIBS}. Used to get @code{strftime}. It must be called before checking for @code{strftime}. @end defmac -@defmac AC_XENIX_DIR +@defmac AC_OS_XENIX @maindex XENIX_DIR @vindex VOID_CLOSEDIR If on Xenix, define @code{VOID_CLOSEDIR} and add @samp{-lx} to @code{make} variable @code{LIBS}. Also, if @file{sys/ndir.h} is not being used, add @samp{-ldir} to @code{LIBS}. Needed when using the directory reading functions. This macro must be called after -@code{AC_DIR_HEADER}. +@code{AC_HEADER_DIRENT}. @end defmac @node General Purpose Macros, Manual Configuration, Specific Tests, Top @@ -1632,7 +1688,7 @@ These macros are defined in the file @file{acgeneral.m4}. The following macros control the kind of output that Autoconf produces. @file{configure.in} should call them before @code{AC_INIT} or -@code{AC_PREPARE}. Remember to put a @code{dnl} comment at the ends of +@code{AC_INIT_PREPARE}. Remember to put a @code{dnl} comment at the ends of the lines containing their calls, to avoid inserting blank lines at the beginning of @file{configure}. @@ -1730,15 +1786,15 @@ is found, set the prefix to the parent of the directory containing set the prefix to @file{/usr/local/gnu}. @end defmac -@defmac AC_PREPARE (@var{unique-file-in-source-dir}) +@defmac AC_INIT_PREPARE (@var{unique-file-in-source-dir}) @maindex PREPARE Find the source code directory and set up shell variables necessary for other Autoconf macros to work. @var{unique-file-in-source-dir} is some file that is in the package's source directory; @code{configure} checks for this file's existence to make sure that the directory that it is told contains the source code in fact does (@pxref{Invoking configure}, -for more information). @code{AC_PREPARE} is the last thing done by -@code{AC_INIT}. Use @code{AC_PREPARE} instead of @code{AC_INIT} if you +for more information). @code{AC_INIT_PREPARE} is the last thing done by +@code{AC_INIT}. Use @code{AC_INIT_PREPARE} instead of @code{AC_INIT} if you want to do argument parsing yourself; never use both. @end defmac @@ -1792,7 +1848,7 @@ produces this in @file{configure}: These macros check whether particular files exist. -@defmac AC_HAVE_LIBRARY (@var{library} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found} @r{[}, @var{other-libraries}@r{]]]}) +@defmac AC_CHECK_LIB (@var{library} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found} @r{[}, @var{other-libraries}@r{]]]}) @maindex HAVE_LIBRARY Create a test C program to see whether that program can be linked with the library @var{library}. @var{action-if-found} is a list of shell @@ -1819,7 +1875,7 @@ This macro is like @code{AC_PREFIX_PROGRAM}, except that it prevents finding the site-wide defaults file correctly, so it is obsolete. @end defmac -@defmac AC_PROGRAM_CHECK (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found}@r{]}) +@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found}@r{]}) @maindex PROGRAM_CHECK Check whether program @var{prog-to-check-for} exists in @code{PATH}. If it is found, set @var{variable} to @var{value-if-found}, otherwise to @@ -1827,15 +1883,15 @@ it is found, set @var{variable} to @var{value-if-found}, otherwise to do nothing. Calls @code{AC_SUBST} for @var{variable}. @end defmac -@defmac AC_PROGRAM_PATH (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) +@defmac AC_PATH_PROG (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) @maindex PROGRAM_PATH -Similar to @code{AC_PROGRAM_CHECK}, but set @var{variable} to the entire +Similar to @code{AC_CHECK_PROG}, but set @var{variable} to the entire path of @var{prog-to-check-for} if found. Otherwise, set @var{variable} to @var{value-if-not-found}, if given. If @var{variable} was already set, do nothing. Calls @code{AC_SUBST} for @var{variable}. @end defmac -@defmac AC_PROGRAMS_CHECK (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) +@defmac AC_CHECK_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) @maindex PROGRAMS_CHECK Check for each program in the whitespace-separated list @var{progs-to-check-for} exists in @code{PATH}. If it is found, set @@ -1846,9 +1902,9 @@ list are found, set @var{variable} to @var{value-if-not-found}; if is not changed. Calls @code{AC_SUBST} for @var{variable}. @end defmac -@defmac AC_PROGRAMS_PATH (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) +@defmac AC_PATH_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) @maindex PROGRAMS_PATH -Like @code{AC_PROGRAMS_CHECK}, but if any of @var{progs-to-check-for} +Like @code{AC_CHECK_PROGS}, but if any of @var{progs-to-check-for} are found, set @var{variable} to the entire pathname of the program found. @end defmac @@ -1867,52 +1923,53 @@ to be the C (or C++) builtin type @var{default}, e.g. @samp{short} or @defmac AC_COMPILE_CHECK (@var{echo-text}, @var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex COMPILE_CHECK -This is an obsolete alias for @code{AC_TEST_LINK}, with the addition that it +This is an obsolete alias for @code{AC_TRY_LINK}, with the addition that it prints @samp{checking for @var{echo-text}} to the standard output first. @end defmac -@defmac AC_FUNC_CHECK (@var{function}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_CHECK_FUNC (@var{function}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex FUNC_CHECK If @var{function} is available, run shell commands @var{action-if-found}, otherwise @var{action-if-not-found}. If the functions might be in libraries other than the default C library, first -call @code{AC_HAVE_LIBRARY} for those libraries. If you just want to +call @code{AC_CHECK_LIB} for those libraries. If you just want to define a symbol if the function is available, consider using -@code{AC_HAVE_FUNCS} instead. +@code{AC_CHECK_FUNCS} instead. @end defmac -@defmac AC_HAVE_FUNCS (@var{function}@dots{}) +@defmac AC_CHECK_FUNCS (@var{function}@dots{}) @maindex HAVE_FUNCS @vindex HAVE_@var{function} For each given @var{function} in the whitespace-separated argument list that is available, define @code{HAVE_@var{function}} (in all caps). @xref{Specific Tests}, for a precise definition of ``define'' as it is used here. If the functions might be in libraries other than the -default C library, first call @code{AC_HAVE_LIBRARY} for those libraries. +default C library, first call @code{AC_CHECK_LIB} for those libraries. @end defmac -@defmac AC_HAVE_HEADERS (@var{header-file}@dots{}) +@defmac AC_CHECK_HEADERS (@var{header-file}@dots{}) @maindex HAVE_HEADERS @vindex HAVE_@var{header} -For each given @var{header-file} in the whitespace-separated argument -list that exists, define @code{HAVE_@var{header-file}} (in all caps). -@xref{Specific Tests}, for a precise definition of ``define'' as -it is used here. +For each given system header file @var{header-file} in the +whitespace-separated argument list that exists, define +@code{HAVE_@var{header-file}} (in all caps). @xref{Specific Tests}, for +a precise definition of ``define'' as it is used here. @end defmac -@defmac AC_HEADER_CHECK (@var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_CHECK_HEADER (@var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex HEADER_CHECK -If @var{header-file} exists, execute shell commands +If the system header file @var{header-file} exists, execute shell commands @var{action-if-found}, otherwise execute @var{action-if-not-found}. If you just want to define a symbol if the header file is available, -consider using @code{AC_HAVE_HEADERS} instead. +consider using @code{AC_CHECK_HEADERS} instead. @end defmac -@defmac AC_HEADER_EGREP (@var{pattern}, @var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_EGREP_HEADER (@var{pattern}, @var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex HEADER_EGREP -If the output of running the preprocessor on @var{header-file} -contains the @code{egrep} regular expression @var{pattern}, execute -shell commands @var{action-if-found}, otherwise execute +If the output of running the preprocessor on the system header file +@var{header-file} contains the @code{egrep} regular expression +@var{pattern}, execute shell commands @var{action-if-found}, otherwise +execute This macro calls @code{AC_PROG_CPP} or @code{AC_PROG_CXXCPP} (depending on which language is current, @pxref{Language Choice}), if it hasn't @@ -1925,7 +1982,7 @@ almost always detect them by simply using @code{#ifdef} directives in your programs. @end defmac -@defmac AC_PROGRAM_EGREP (@var{pattern}, @var{program}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_EGREP_CPP (@var{pattern}, @var{program}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex PROGRAM_EGREP @var{program} is the text of a C or C++ program, on which shell variable and backquote substitutions are performed. If the output of running the @@ -1946,10 +2003,10 @@ For each given @var{function-name} in the whitespace-separated argument list that is not in the C library, add @samp{@var{function-name}.o} to the value of the @code{make} variable @code{LIBOBJS}. If the functions might be in libraries other than the default C library, first call -@code{AC_HAVE_LIBRARY} for those libraries. +@code{AC_CHECK_LIB} for those libraries. @end defmac -@defmac AC_SIZEOF_TYPE (@var{type}) +@defmac AC_CHECK_SIZEOF (@var{type}) @maindex SIZEOF_TYPE Define @code{SIZEOF_@var{uctype}} to be the size in bytes of the C (or C++) builtin type @var{type}, e.g. @samp{int} or @samp{char *}. If @@ -1957,13 +2014,13 @@ C++) builtin type @var{type}, e.g. @samp{int} or @samp{char *}. If is @var{type}, with lowercase converted to uppercase, spaces changed to underscores, and asterisks changed to @samp{P}. For example, the call @example -AC_SIZEOF_TYPE(int *) +AC_CHECK_SIZEOF(int *) @end example @noindent defines @code{SIZEOF_INT_P} to be 8 on DEC Alpha AXP systems. @end defmac -@defmac AC_TEST_CPP (@var{includes}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]}) +@defmac AC_TRY_CPP (@var{includes}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]}) @maindex TEST_CPP @var{includes} is C or C++ @code{#include} statements and declarations, on which shell variable and backquote substitutions are performed. @@ -1977,8 +2034,8 @@ on which language is current, @pxref{Language Choice}), if it hasn't been called already. @end defmac -@defmac AC_TEST_LINK (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) -@maindex TEST_LINK +@defmac AC_TRY_LINK (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@maindex TRY_LINK Create a test C program to see whether a function whose body consists of @var{function-body} can be compiled and linked; @var{includes} is any @code{#include} statements needed by the code in @var{function-body}. @@ -1986,13 +2043,8 @@ If the file compiles and links successfully, run shell commands @var{action-if-found}, otherwise run @var{action-if-not-found}. @end defmac -@defmac AC_TEST_PROGRAM (@var{program}, @var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]}) -@maindex TEST_PROGRAM -This is an obsolete alias for @code{AC_TEST_RUN}. -@end defmac - -@defmac AC_TEST_RUN (@var{program}, @var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]}) -@maindex TEST_RUN +@defmac AC_TRY_RUN (@var{program}, @var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]}) +@maindex TRY_RUN @var{program} is the text of a C program, on which shell variable and backquote substitutions are performed. If it compiles and links successfully and returns an exit status of 0 when executed, run shell @@ -2003,7 +2055,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 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. If that argument is given, this macro calls @code{AC_CROSS_CHECK} +run. If that argument is given, this macro calls @code{AC_TRY_CROSS} if it has not already been called (@pxref{Compiler Characteristics}). @end defmac @@ -2121,7 +2173,7 @@ header file by substituting the correct values into @code{#define} statements in a template file. For example, suppose your @file{configure.in} calls -@code{AC_CONFIG_HEADER(conf.h)} and @code{AC_HAVE_HEADERS(unistd.h)}. +@code{AC_CONFIG_HEADER(conf.h)} and @code{AC_CHECK_HEADERS(unistd.h)}. You could have code like this in @file{conf.h.in}: @example @@ -2154,14 +2206,14 @@ shell code; that can cause syntax errors in the resulting this: @example -AC_HEADER_CHECK(elf.h, AC_DEFINE(SVR4) LIBS="$LIBS -lelf") +AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) LIBS="$LIBS -lelf") @end example @noindent or this: @example -AC_HEADER_CHECK(elf.h, +AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) LIBS="$LIBS -lelf") @end example @@ -2170,7 +2222,7 @@ AC_HEADER_CHECK(elf.h, instead of this: @example -AC_HEADER_CHECK(elf.h, AC_DEFINE(SVR4); LIBS="$LIBS -lelf") +AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4); LIBS="$LIBS -lelf") @end example @end defmac @@ -2231,7 +2283,7 @@ 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 callers change automatically. -@defmac AC_CHECKING (@var{feature-description}) +@defmac AC_MSG_CHECKING (@var{feature-description}) @maindex CHECKING Notify the user that @code{configure} is checking for a particular feature. This macro prints a message that starts with @samp{checking }. @@ -2241,7 +2293,7 @@ something like @samp{whether the Fortran compiler accepts C++ comments} or @samp{for c89}. @end defmac -@defmac AC_ERROR (@var{error-description}) +@defmac AC_MSG_ERROR (@var{error-description}) @maindex ERROR Notify the user of an error that prevents @code{configure} from completing. This macro prints an error message on the standard error @@ -2250,7 +2302,7 @@ stream and exits @code{configure} with a nonzero status. $HOME for \$HOME}. @end defmac -@defmac AC_VERBOSE (@var{result-description}) +@defmac AC_MSG_RESULT (@var{result-description}) @maindex VERBOSE Notify the user of the results of a check. This information is only printed if @code{configure} is run with the @samp{--verbose} @@ -2258,11 +2310,11 @@ option. @var{result-description} should be something like @samp{setting ADA to $ADA}. @end defmac -@defmac AC_WARN (@var{problem-description}) +@defmac AC_MSG_WARN (@var{problem-description}) @maindex WARN Notify the @code{configure} user of a possible problem. This macro prints the message on the standard error stream; @code{configure} -continues running afterward, so macros that call @code{AC_WARN} should +continues running afterward, so macros that call @code{AC_MSG_WARN} should provide a default (back-up) behavior for the situations they warn about. @var{problem-description} should be something like @samp{ln -s seems to make hard links}. @@ -2359,7 +2411,7 @@ a suggestion for what to use instead of @var{this-macro-name}. A sample call is: @example -AC_OBSOLETE([$0], [; use AC_HAVE_HEADERS(unistd.h) instead]) +AC_OBSOLETE([$0], [; use AC_CHECK_HEADERS(unistd.h) instead]) @end example @end defmac @@ -2665,7 +2717,7 @@ and only if @code{AC_PROG_CPP} has not already been run. Some macros should be run before another macro if both are called, but neither requires the other to be called. For example, a macro like -@code{AC_AIX} that changes the behavior of the C compiler (@pxref{UNIX +@code{AC_OS_AIX} that changes the behavior of the C compiler (@pxref{UNIX Variants}) should be called before any macros that run the C compiler. Many of these dependencies are noted in the documentation. @@ -2681,22 +2733,22 @@ which might change its behavior. The macro which should come first should contain a call to @code{AC_BEFORE} and the macro which should come later should contain a call to @code{AC_PROVIDE}. -For example, @code{AC_AIX} contains +For example, @code{AC_OS_AIX} contains @example -AC_BEFORE([$0], [AC_TEST_LINK]) +AC_BEFORE([$0], [AC_TRY_LINK]) @end example @noindent -and @code{AC_TEST_LINK} contains +and @code{AC_TRY_LINK} contains @example AC_PROVIDE([$0]) @end example @noindent -As a result, if @code{AC_AIX} is called after @code{AC_TEST_LINK}, -it will note that @code{AC_TEST_LINK} has already been called and +As a result, if @code{AC_OS_AIX} is called after @code{AC_TRY_LINK}, +it will note that @code{AC_TRY_LINK} has already been called and print a warning message. @node Checking for Files, Checking for Symbols, Dependencies Between Macros, Writing Macros @@ -2719,7 +2771,7 @@ Do not use @samp{test -x}, because 4.3BSD does not have it. Use @section Checking for Symbols If you need to check whether a symbol is defined in a C header file, you -can use @code{AC_HEADER_EGREP} if the symbol is not a C preprocessor +can use @code{AC_EGREP_HEADER} if the symbol is not a C preprocessor macro (@pxref{C Features}), or compile a small test program that includes the file and references the symbol (@pxref{Test Programs}). Don't directly @code{grep} for the symbol in the file, because on some systems @@ -2767,16 +2819,16 @@ than scanning the libraries. If you need to check for a condition other than whether some symbol exists on the system or has a certain value, then you can't use -@code{AC_TEST_LINK} (@pxref{C Features}). You have to write a +@code{AC_TRY_LINK} (@pxref{C Features}). You have to write a test program by hand. You can compile and run it using -@code{AC_TEST_RUN} (@pxref{C Features}). +@code{AC_TRY_RUN} (@pxref{C Features}). Try to avoid writing test programs if possible, because using them prevents people from configuring your package for cross-compiling. If it's really best that you test for a run-time behavior, try to provide a default ``worst case'' value to use when cross-compiling makes run-time tests impossible. You do this by passing the optional last argument to -@code{AC_TEST_RUN}. +@code{AC_TRY_RUN}. @menu * Guidelines:: General rules for writing test programs. @@ -2796,7 +2848,7 @@ output. Test programs can use @code{#if} or @code{#ifdef} to check the values of preprocessor macros defined by tests that have already run. For -example, if you call @code{AC_STDC_HEADERS}, then later on in +example, if you call @code{AC_HEADER_STDC}, then later on in @file{configure.in} you can have a test program that includes an ANSI C header file conditionally: @@ -2849,16 +2901,16 @@ cases which are not shown here but follow the same pattern. @group echo checking how to get filesystem type # SVR4. -AC_TEST_CPP([#include +AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_STATVFS) fstype=1) if test -z "$fstype"; then # SVR3. -AC_TEST_CPP([#include +AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_USG_STATFS) fstype=1) fi if test -z "$fstype"; then # AIX. -AC_TEST_CPP([#include +AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=1) fi @end group @@ -2912,7 +2964,7 @@ commands @var{commands-to-set-it}. Those commands should have no side effects except for setting the variable @var{cache-id}. In particular, they should not call @code{AC_DEFINE}; the code that follows the call to @code{AC_CACHE_VAL} should do that, based on the cached value. Also, -they should not print any messages, for example with @code{AC_CHECKING}; +they should not print any messages, for example with @code{AC_MSG_CHECKING}; do that before calling @code{AC_CACHE_VAL}, so the messages are printed regardless of whether the results of the check are retrieved from the cache or determined by running the shell commands. If the shell @@ -3269,7 +3321,7 @@ Makefile: Makefile.in config.status (If @file{configure.in} does not call @code{AC_CONFIG_HEADER}, there is no need to set @code{CONFIG_HEADERS} in the @code{make} rules.) -@node Site Default Values, Example, Invoking config.status, Top +@node Site Default Values, Old Macro Names, Invoking config.status, Top @chapter Site Default Values Autoconf-generated @code{configure} scripts support site and system wide @@ -3306,7 +3358,317 @@ check that variables such as @code{prefix} and @code{cache_file} have their default values (as set near the top of @code{configure}) before changing them. -@node Example, Preprocessor Symbol Index, Site Default Values, Top +@node Old Macro Names, Example, Site Default Values, Top +@chapter Old Macro Names + +In version 2 of Autoconf, most of the macros were renamed to use a more +uniform and descriptive naming scheme. Here are the old names of the +macros that were renamed, followed by the current names of those macros. +Although the old names are still accepted by the @code{autoconf} program +for backward compatibility, the old names are considered obsolete. + +@table @code +@item AC_NOTICE +@vindex NOTICE +@vindex INIT_NOTICE +@code{AC_INIT_NOTICE} +@item AC_PARSEARGS +@vindex PARSEARGS +@vindex INIT_PARSEARGS +@code{AC_INIT_PARSEARGS} +@item AC_PREPARE +@vindex PREPARE +@vindex 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 +@vindex WARN +@vindex MSG_WARN +@code{AC_MSG_WARN} +@item AC_ERROR +@vindex ERROR +@vindex MSG_ERROR +@code{AC_MSG_ERROR} +@item AC_PROGRAM_CHECK +@vindex PROGRAM_CHECK +@vindex CHECK_PROG +@code{AC_CHECK_PROG} +@item AC_PROGRAM_PATH +@vindex PROGRAM_PATH +@vindex PATH_PROG +@code{AC_PATH_PROG} +@item AC_PROGRAMS_CHECK +@vindex PROGRAMS_CHECK +@vindex CHECK_PROGS +@code{AC_CHECK_PROGS} +@item AC_PROGRAMS_PATH +@vindex PROGRAMS_PATH +@vindex PATH_PROGS +@code{AC_PATH_PROGS} +@item AC_HAVE_LIBRARY +@vindex HAVE_LIBRARY +@vindex CHECK_LIB +@code{AC_CHECK_LIB} +@item AC_HEADER_EGREP +@vindex HEADER_EGREP +@vindex EGREP_HEADER +@code{AC_EGREP_HEADER} +@item AC_PROGRAM_EGREP +@vindex PROGRAM_EGREP +@vindex EGREP_CPP +@code{AC_EGREP_CPP} +@vindex TRY_LINK +@code{AC_TRY_LINK} +@item AC_TEST_PROGRAM +@vindex TEST_PROGRAM +@vindex TRY_RUN +@code{AC_TRY_RUN} +@item AC_TEST_CPP +@vindex TEST_CPP +@vindex TRY_CPP +@code{AC_TRY_CPP} +@item AC_HEADER_CHECK +@vindex HEADER_CHECK +@vindex CHECK_HEADER +@code{AC_CHECK_HEADER} +@item AC_FUNC_CHECK +@vindex FUNC_CHECK +@vindex CHECK_FUNC +@code{AC_CHECK_FUNC} +@item AC_HAVE_FUNCS +@vindex HAVE_FUNCS +@vindex CHECK_FUNCS +@code{AC_CHECK_FUNCS} +@item AC_HAVE_HEADERS +@vindex HAVE_HEADERS +@vindex CHECK_HEADERS +@code{AC_CHECK_HEADERS} +@item AC_SIZEOF_TYPE +@vindex SIZEOF_TYPE +@vindex CHECK_SIZEOF +@code{AC_CHECK_SIZEOF} +@item AC_GCC_TRADITIONAL +@vindex GCC_TRADITIONAL +@vindex PROG_GCC_TRADITIONAL +@code{AC_PROG_GCC_TRADITIONAL} +@item AC_MINUS_C_MINUS_O +@vindex MINUS_C_MINUS_O +@vindex PROG_CC_C_O +@code{AC_PROG_CC_C_O} +@item AC_SET_MAKE +@vindex SET_MAKE +@vindex PROG_MAKE_SET +@code{AC_PROG_MAKE_SET} +@item AC_YYTEXT_POINTER +@vindex YYTEXT_POINTER +@vindex DECL_YYTEXT +@code{AC_DECL_YYTEXT} +@item AC_LN_S +@vindex LN_S +@vindex PROG_LN_S +@code{AC_PROG_LN_S} +@item AC_RSH +@vindex RSH +@vindex PROG_RSH +@code{AC_PROG_RSH} +@item AC_STDC_HEADERS +@vindex STDC_HEADERS +@vindex HEADER_STDC +@code{AC_HEADER_STDC} +@item AC_MAJOR_HEADER +@vindex MAJOR_HEADER +@vindex HEADER_MAJOR +@code{AC_HEADER_MAJOR} +@item AC_DIR_HEADER +@vindex DIR_HEADER +@vindex HEADER_DIRENT +@code{AC_HEADER_DIRENT} +@item AC_STAT_MACROS_BROKEN +@vindex STAT_MACROS_BROKEN +@vindex HEADER_STAT +@code{AC_HEADER_STAT} +@item AC_SYS_SIGLIST_DECLARED +@vindex SYS_SIGLIST_DECLARED +@vindex DECL_SYS_SIGLIST +@code{AC_DECL_SYS_SIGLIST} +@item AC_GETGROUPS_T +@vindex GETGROUPS_T +@vindex TYPE_GETGROUPS +@code{AC_TYPE_GETGROUPS} +@item AC_UID_T +@vindex UID_T +@vindex TYPE_UID_T +@code{AC_TYPE_UID_T} +@item AC_SIZE_T +@vindex SIZE_T +@vindex TYPE_SIZE_T +@code{AC_TYPE_SIZE_T} +@item AC_PID_T +@vindex PID_T +@vindex TYPE_PID_T +@code{AC_TYPE_PID_T} +@item AC_OFF_T +@vindex OFF_T +@vindex TYPE_OFF_T +@code{AC_TYPE_OFF_T} +@item AC_MODE_T +@vindex MODE_T +@vindex TYPE_MODE_T +@code{AC_TYPE_MODE_T} +@item AC_RETSIGTYPE +@vindex RETSIGTYPE +@vindex TYPE_SIGNAL +@code{AC_TYPE_SIGNAL} +@item AC_MMAP +@vindex MMAP +@vindex FUNC_MMAP +@code{AC_FUNC_MMAP} +@item AC_VPRINTF +@vindex VPRINTF +@vindex FUNC_VPRINTF +@code{AC_FUNC_VPRINTF} +@item AC_VFORK +@vindex VFORK +@vindex FUNC_VFORK +@code{AC_FUNC_VFORK} +@item AC_WAIT3 +@vindex WAIT3 +@vindex FUNC_WAIT3 +@code{AC_FUNC_WAIT3} +@item AC_ALLOCA +@vindex ALLOCA +@vindex FUNC_ALLOCA +@code{AC_FUNC_ALLOCA} +@item AC_GETLOADAVG +@vindex GETLOADAVG +@vindex FUNC_GETLOADAVG +@code{AC_FUNC_GETLOADAVG} +@item AC_UTIME_NULL +@vindex UTIME_NULL +@vindex FUNC_UTIME_NULL +@code{AC_FUNC_UTIME_NULL} +@item AC_STRCOLL +@vindex STRCOLL +@vindex FUNC_STRCOLL +@code{AC_FUNC_STRCOLL} +@item AC_SETVBUF_REVERSED +@vindex SETVBUF_REVERSED +@vindex FUNC_SETVBUF_REVERSED +@code{AC_FUNC_SETVBUF_REVERSED} +@item AC_TIME_WITH_SYS_TIME +@vindex TIME_WITH_SYS_TIME +@vindex HEADER_TIME +@code{AC_HEADER_TIME} +@item AC_TIMEZONE +@vindex TIMEZONE +@vindex STRUCT_TIMEZONE +@code{AC_STRUCT_TIMEZONE} +@item AC_ST_BLOCKS +@vindex ST_BLOCKS +@vindex STRUCT_ST_BLOCKS +@code{AC_STRUCT_ST_BLOCKS} +@item AC_ST_BLKSIZE +@vindex ST_BLKSIZE +@vindex STRUCT_ST_BLKSIZE +@code{AC_STRUCT_ST_BLKSIZE} +@item AC_ST_RDEV +@vindex ST_RDEV +@vindex STRUCT_ST_RDEV +@code{AC_STRUCT_ST_RDEV} +@item AC_CROSS_CHECK +@vindex CROSS_CHECK +@vindex TRY_CROSS +@code{AC_TRY_CROSS} +@item AC_CHAR_UNSIGNED +@vindex CHAR_UNSIGNED +@vindex C_CHAR_UNSIGNED +@code{AC_C_CHAR_UNSIGNED} +@item AC_LONG_DOUBLE +@vindex LONG_DOUBLE +@vindex C_LONG_DOUBLE +@code{AC_C_LONG_DOUBLE} +@item AC_WORDS_BIGENDIAN +@vindex WORDS_BIGENDIAN +@vindex C_BIGENDIAN +@code{AC_C_BIGENDIAN} +@item AC_ARG_ARRAY +@vindex ARG_ARRAY +@vindex C_ARG_ARRAY +@code{AC_C_ARG_ARRAY} +@item AC_INLINE +@vindex INLINE +@vindex C_INLINE +@code{AC_C_INLINE} +@item AC_CONST +@vindex CONST +@vindex C_CONST +@code{AC_C_CONST} +@item AC_REMOTE_TAPE +@vindex REMOTE_TAPE +@vindex SYS_REMOTE_TAPE +@code{AC_SYS_REMOTE_TAPE} +@item AC_LONG_FILE_NAMES +@vindex LONG_FILE_NAMES +@vindex SYS_LONG_FILE_NAMES +@code{AC_SYS_LONG_FILE_NAMES} +@item AC_RESTARTABLE_SYSCALLS +@vindex RESTARTABLE_SYSCALLS +@vindex SYS_RESTARTABLE_SYSCALLS +@code{AC_SYS_RESTARTABLE_SYSCALLS} +@item AC_FIND_X +@vindex FIND_X +@vindex PATH_X +@code{AC_PATH_X} +@item AC_FIND_X_XMKMF +@vindex FIND_X_XMKMF +@vindex PATH_X_XMKMF +@code{AC_PATH_X_XMKMF} +@item AC_FIND_X_DIRECT +@vindex FIND_X_DIRECT +@vindex PATH_X_DIRECT +@code{AC_PATH_X_DIRECT} +@item AC_FIND_XTRA +@vindex FIND_XTRA +@vindex PATH_XTRA +@code{AC_PATH_XTRA} +@item AC_AIX +@vindex AIX +@vindex OS_AIX +@code{AC_OS_AIX} +@item AC_MINIX +@vindex MINIX +@vindex OS_MINIX +@code{AC_OS_MINIX} +@item AC_ISC_POSIX +@vindex ISC_POSIX +@vindex OS_ISC +@code{AC_OS_ISC} +@item AC_XENIX_DIR +@vindex XENIX_DIR +@vindex OS_XENIX +@code{AC_OS_XENIX} +@item AC_SCO_INTL +@vindex SCO_INTL +@vindex OS_SCO +@code{AC_OS_SCO} +@item AC_IRIX_SUN +@vindex IRIX_SUN +@vindex OS_IRIX +@code{AC_OS_IRIX} +@item AC_DYNIX_SEQ +@vindex DYNIX_SEQ +@vindex OS_DYNIX +@code{AC_OS_DYNIX} +@end table + +@node Example, Preprocessor Symbol Index, Old Macro Names, Top @chapter An Example Here are sample @file{configure.in} and @file{Makefile.in} files, to @@ -3336,27 +3698,27 @@ PROGS="cpio" AC_SUBST(PROGS)dnl AC_PROG_CC AC_PROG_CPP -AC_GCC_TRADITIONAL +AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL -AC_AIX -AC_MINIX -AC_ISC_POSIX -AC_RETSIGTYPE -AC_MAJOR_HEADER -AC_REMOTE_TAPE +AC_OS_AIX +AC_OS_MINIX +AC_OS_ISC +AC_TYPE_SIGNAL +AC_HEADER_MAJOR +AC_SYS_REMOTE_TAPE test -n "$have_mtio" && PROGS="$PROGS mt" -AC_RSH -AC_CONST -AC_UID_T -AC_STDC_HEADERS -AC_HAVE_HEADERS(string.h fcntl.h utime.h unistd.h sys/io/trioctl.h) +AC_PROG_RSH +AC_C_CONST +AC_TYPE_UID_T +AC_HEADER_STDC +AC_CHECK_HEADERS(string.h fcntl.h utime.h unistd.h sys/io/trioctl.h) AC_REPLACE_FUNCS(fnmatch bcopy mkdir strdup) -AC_HAVE_FUNCS(strerror lchown) -AC_VPRINTF -AC_ALLOCA -AC_XENIX_DIR -AC_HAVE_LIBRARY(socket, [LIBS="$LIBS -lsocket"]) -AC_HAVE_LIBRARY(nsl, [LIBS="$LIBS -lnsl"]) +AC_CHECK_FUNCS(strerror lchown) +AC_FUNC_VPRINTF +AC_FUNC_ALLOCA +AC_OS_XENIX +AC_CHECK_LIB(socket, [LIBS="$LIBS -lsocket"]) +AC_CHECK_LIB(nsl, [LIBS="$LIBS -lnsl"]) AC_OUTPUT(Makefile) @end example @@ -3502,5 +3864,5 @@ easier to use, the macros are listed without their preceding @samp{AC_}. @bye @c Local variables: -@c compile-command: "makeinfo --no-split autoconf.texi" +@c compile-command: "makeinfo autoconf.texi" @c End: diff --git a/bin/autoconf.in b/bin/autoconf.in index f1c73e6c..0cb5859d 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -21,8 +21,8 @@ # the given template file. usage="\ -Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir] - [-v] [--version] [template-file]" +Usage: autoconf [-hv] [--help] [-m dir] [--macrodir=dir] + [--version] [template-file]" # NLS nuisances. # Only set `LANG' and `LC_ALL' to "C" if already set. @@ -40,8 +40,8 @@ case "${M4}" in esac tmpout=/tmp/acout.$$ - print_version= + while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) @@ -88,13 +88,14 @@ if test -z "$print_version"; then fi fi -MACROFILES="${AC_MACRODIR}/acgeneral.m4 ${AC_MACRODIR}/acspecific.m4" -test -r ${AC_MACRODIR}/aclocal.m4 \ - && MACROFILES="${MACROFILES} ${AC_MACRODIR}/aclocal.m4" +MACROFILES="${AC_MACRODIR}/acgeneral.m4 ${AC_MACRODIR}/acspecific.m4 \ +${AC_MACRODIR}/acoldnames.m4" +test -r ${AC_MACRODIR}/aclocal.m4 && + MACROFILES="${MACROFILES} ${AC_MACRODIR}/aclocal.m4" test -r aclocal.m4 && MACROFILES="${MACROFILES} aclocal.m4" -MACROFILES="${print_version} ${MACROFILES}" +MACROFILES="${print_version} ${MACROFILES} ${infile}" -$M4 $MACROFILES $infile > $tmpout || { st=$?; rm -f $tmpin $tmpout; exit $st; } +$M4 $MACROFILES > $tmpout || { st=$?; rm -f $tmpin $tmpout; exit $st; } if test -n "$print_version"; then cat $tmpout diff --git a/doc/Makefile.in b/doc/Makefile.in index 0bc04330..828a8444 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -27,7 +27,7 @@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi M4 = @M4@ -PROGS = autoconf autoheader autoreconf ifnames @PROGS@ +PROGS = autoconf autoheader autoreconf autoupdate ifnames @PROGS@ # Path of the perl interpreter. PERL = @PERL@ @@ -54,9 +54,10 @@ DISTDEP = info Makefile # Files to distribute. DISTFILES = COPYING ChangeLog INSTALL Makefile.in NEWS README \ acconfig.h acfunctions acgeneral.m4 acheaders acidentifiers \ - acmakevars acprograms acspecific.m4 autoconf.info* \ + acmakevars acoldnames.m4 acprograms acspecific.m4 autoconf.info* \ autoconf.sh autoconf.texi install.texi \ - autoheader.sh autoreconf.sh autoscan.pl shindent.sh ifnames.sh \ + autoheader.sh autoreconf.sh autoscan.pl autoupdate.sh \ + shindent.sh ifnames.sh \ config.guess config.sub configure configure.in \ install.sh mkinstalldirs texinfo.tex \ testsuite/Makefile.in testsuite/config/*.exp \ @@ -80,6 +81,10 @@ autoreconf: autoreconf.sh rm -f $@ $@.tmp $(editsh) $(srcdir)/autoreconf.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@ +autoupdate: autoupdate.sh + rm -f $@ $@.tmp + $(editsh) $(srcdir)/autoupdate.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@ + shindent: shindent.sh rm -f $@ $@.tmp $(editsh) $(srcdir)/shindent.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@ @@ -122,12 +127,15 @@ installdirs: $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir) # References to install-info have been removed until it's released. -install: all acgeneral.m4 acspecific.m4 acconfig.h installdirs install-info +install: all acgeneral.m4 acoldnames.m4 acspecific.m4 acconfig.h \ + installdirs install-info $(INSTALL_PROGRAM) autoconf $(bindir)/autoconf $(INSTALL_PROGRAM) autoheader $(bindir)/autoheader $(INSTALL_PROGRAM) autoreconf $(bindir)/autoreconf + $(INSTALL_PROGRAM) autoupdate $(bindir)/autoupdate $(INSTALL_PROGRAM) ifnames $(bindir)/ifnames $(INSTALL_DATA) $(srcdir)/acgeneral.m4 $(acdatadir)/acgeneral.m4 + $(INSTALL_DATA) $(srcdir)/acoldnames.m4 $(acdatadir)/acoldnames.m4 $(INSTALL_DATA) $(srcdir)/acspecific.m4 $(acdatadir)/acspecific.m4 $(INSTALL_DATA) $(srcdir)/acconfig.h $(acdatadir)/acconfig.h -if test -f autoscan; then \ @@ -154,16 +162,17 @@ install-info: info installdirs uninstall: rm -f $(bindir)/autoconf $(bindir)/autoheader $(bindir)/autoscan - rm -f $(bindir)/autoreconf $(bindir)/shindent $(bindir)/ifnames + rm -f $(bindir)/autoreconf $(bindir)/autoupdate + rm -f $(bindir)/shindent $(bindir)/ifnames rm -fr $(acdatadir) cd $(infodir); rm -f autoconf.info* if test -f standards.info || test -f $(srcdir)/standards.info; \ then cd $(infodir); rm -f standards.info*; fi -configure: configure.in acgeneral.m4 acspecific.m4 +configure: configure.in acgeneral.m4 acspecific.m4 acoldnames.m4 cd $(srcdir); \ rm -f $@ $@.tmp; \ - $(M4) acgeneral.m4 acspecific.m4 configure.in > $@.tmp && \ + $(M4) acgeneral.m4 acspecific.m4 acoldnames.m4 configure.in > $@.tmp && \ mv $@.tmp $@ && \ chmod +x $@ Makefile: Makefile.in config.status @@ -178,7 +187,8 @@ clean mostlyclean distclean realclean:: done clean:: - rm -f autoconf autoheader autoscan autoreconf shindent ifnames *.tmp + rm -f autoconf autoheader autoscan autoreconf autoupdate + rm -f shindent ifnames *.tmp rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.ma *.mas diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 2f47a998..a988b9d8 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -6,9 +6,9 @@ @c @setchapternewpage odd @c %**end of header -@set EDITION 1.95 -@set VERSION 1.95 -@set UPDATED July 1994 +@set EDITION 1.96 +@set VERSION 1.96 +@set UPDATED August 1994 @iftex @finalout @@ -117,6 +117,7 @@ Making @code{configure} Scripts * Invoking autoscan:: Semi-automatic @file{configure.in} writing. * Invoking ifnames:: Listing the conditionals in source code. * Invoking autoreconf:: Remaking multiple @code{configure} scripts. +* Invoking autoupdate:: Replacing old macro names in @code{configure.in}. * Invoking shindent:: Making @code{configure} scripts more readable. Specific Tests @@ -170,11 +171,11 @@ Makefiles Running @code{configure} Scripts * Basic Installation:: Instructions for typical cases. +* Compilers and Options:: Selecting compilers and optimization. * Build Directory:: Configuring in a different directory. * Installation Directories:: Installing in different directories. * System Type:: Specifying the system type. * Optional Features:: Selecting optional features. -* Compilers and Options:: Selecting compilers and optimization. An Example @@ -237,7 +238,7 @@ functions that are not available instead of omitting them from the library. As a result, Autoconf scripts are fooled into thinking that those functions are available. This problem does not exist with releases 1.06 and later of the GNU C library, which define C -preprocessor macros that the Autoconf macros @code{AC_FUNC_CHECK} and +preprocessor macros that the Autoconf macros @code{AC_CHECK_FUNC} and @code{AC_REPLACE_FUNCS} test, indicating that certain functions are stubs (@pxref{C Features}, for more information on checking for functions). @@ -363,6 +364,7 @@ Makefile.in ---' `-> Makefile ---' * Invoking autoscan:: Semi-automatic @file{configure.in} writing. * Invoking ifnames:: Listing the conditionals in source code. * Invoking autoreconf:: Remaking multiple @code{configure} scripts. +* Invoking autoupdate:: Replacing old macro names in @code{configure.in}. * Invoking shindent:: Making @code{configure} scripts more readable. @end menu @@ -475,8 +477,8 @@ preprocessor symbols it might define. It copies comments and also uses a file called @file{acconfig.h} in the current directory, if present; you must create that file to contain entries for any additional symbols that you @code{AC_DEFINE}. For symbols defined by -@code{AC_HAVE_HEADERS}, @code{AC_HAVE_FUNCS}, @code{AC_SIZEOF_TYPE}, -or @code{AC_HAVE_LIBRARY}, +@code{AC_CHECK_HEADERS}, @code{AC_CHECK_FUNCS}, @code{AC_CHECK_SIZEOF}, +or @code{AC_CHECK_LIB}, @code{autoheader} generates comments and @code{#undef} statements itself rather than copying them from a file, since the possible symbols are effectively limitless. @@ -580,7 +582,7 @@ default installation directory. Only used to get the version number. Print the version number of @code{ifnames} and exit. @end table -@node Invoking autoreconf, Invoking shindent, Invoking ifnames, Making configure Scripts +@node Invoking autoreconf, Invoking autoupdate, Invoking ifnames, Making configure Scripts @section Invoking autoreconf If you have a lot of Autoconf-generated @code{configure} scripts and you @@ -609,7 +611,42 @@ Print the name of each directory where @code{autoreconf} runs Print the version number of @code{autoreconf} and exit. @end table -@node Invoking shindent, , Invoking autoreconf, Making configure Scripts +@node Invoking autoupdate, Invoking shindent, Invoking autoreconf, Making configure Scripts +@section Invoking autoupdate + +The @code{autoupdate} program updates a @file{configure.in} file that +calls Autoconf macros by their old names to use the current macro names. +In version 2 of Autoconf, most of the macros were renamed to use a more +uniform and descriptive naming scheme. Although the old names still +work (@pxref{Old Macro Names}, for a list of the old macro names and the +corresponding new names), you can make your @file{configure.in} files +more readable and make it easier to use the current Autoconf +documentation if you update them to use the new macro names. + +If given no arguments, @code{autoupdate} updates @file{configure.in}, +backing up the original version in the file @file{configure.in~}. If +you give @code{autoupdate} an argument, it reads that file instead of +@file{configure.in} and writes the updated file to the standard output. + +@noindent +@code{autoupdate} accepts the following options: + +@table @code +@item --help +@itemx -h +Print a summary of the command line options and exit. + +@item --macrodir=@var{dir} +@itemx -m @var{dir} +Look for the Autoconf macro files in directory @var{dir} instead of the +default installation directory. + +@item --version +@itemx -v +Print the version number of @code{autoupdate} and exit. +@end table + +@node Invoking shindent, , Invoking autoupdate, Making configure Scripts @section Invoking shindent Autoconf-generated @code{configure} scripts can be somewhat hard to @@ -698,7 +735,7 @@ what existing GNU programs use. These macros are defined in the file The following macros check for the presence or behavior of particular programs: -@defmac AC_GCC_TRADITIONAL +@defmac AC_PROG_GCC_TRADITIONAL @maindex GCC_TRADITIONAL Add @samp{-traditional} to @code{make} variable @code{CC} if using the GNU C compiler and @code{ioctl} does not work properly without @@ -706,14 +743,14 @@ GNU C compiler and @code{ioctl} does not work properly without @code{AC_PROG_CPP} if they haven't been called already. @end defmac -@defmac AC_LN_S +@defmac AC_PROG_LN_S @maindex LN_S If @samp{ln -s} works on the current filesystem (the operating system and filesystem support symbolic links), set shell and @code{make} variable @code{LN_S} to @samp{ln -s}, otherwise set it to @samp{ln}. @end defmac -@defmac AC_MINUS_C_MINUS_O +@defmac AC_PROG_CC_C_O @maindex MINUS_C_MINUS_O @vindex NO_MINUS_C_MINUS_O If the C compiler does not accept the @samp{-c} and @samp{-o} options @@ -743,8 +780,8 @@ extension. If the current language is C (@pxref{Language Choice}), many of the specific test macros use the value of @code{CPP} indirectly by calling -@code{AC_TEST_CPP}, @code{AC_HEADER_CHECK}, @code{AC_HEADER_EGREP}, or -@code{AC_PROGRAM_EGREP}. Those macros call this macro first if it +@code{AC_TRY_CPP}, @code{AC_CHECK_HEADER}, @code{AC_EGREP_HEADER}, or +@code{AC_EGREP_CPP}. Those macros call this macro first if it hasn't been called already. It calls @code{AC_PROG_CC} if it hasn't been called already. @end defmac @@ -769,8 +806,8 @@ It is only portable to run @code{CXXCPP} on files with a @file{.c}, If the current language is C++ (@pxref{Language Choice}), many of the specific test macros use the value of @code{CXXCPP} indirectly by -calling @code{AC_TEST_CPP}, @code{AC_HEADER_CHECK}, -@code{AC_HEADER_EGREP}, or @code{AC_PROGRAM_EGREP}. Those macros call +calling @code{AC_TRY_CPP}, @code{AC_CHECK_HEADER}, +@code{AC_EGREP_HEADER}, or @code{AC_EGREP_CPP}. Those macros call this macro first if it hasn't been called already. This macro calls @code{AC_PROG_CXX} if it hasn't been called already. @end defmac @@ -816,7 +853,7 @@ If @code{bison} is found, set @code{make} variable @code{YACC} to to @samp{byacc}. Otherwise set @code{YACC} to @samp{yacc}. @end defmac -@defmac AC_RSH +@defmac AC_PROG_RSH @maindex RSH @vindex RSH @vindex NO_REMOTE @@ -828,7 +865,7 @@ also put @samp{rtapelib.o} in @code{make} variable @code{RTAPELIB}. Otherwise, define @code{NO_REMOTE}. @end defmac -@defmac AC_SET_MAKE +@defmac AC_PROG_MAKE_SET @maindex SET_MAKE If @code{make} predefines the variable @code{MAKE}, define @code{make} variable @code{SET_MAKE} to be empty. Otherwise, define @code{SET_MAKE} @@ -848,7 +885,7 @@ If you use this macro, simply place a line like this in your @end example @end defmac -@defmac AC_YYTEXT_POINTER +@defmac AC_DECL_YYTEXT @maindex YYTEXT_POINTER @vindex YYTEXT_POINTER Define @code{YYTEXT_POINTER} if @code{yytext} is a @samp{char *} instead @@ -865,23 +902,42 @@ This macro replaces @code{AC_DECLARE_YYTEXT}, which didn't work. The following macros check for the presence of certain C header files: -@defmac AC_DIR_HEADER +@defmac AC_HEADER_DIRENT @maindex DIR_HEADER @vindex DIRENT +@vindex HAVE_DIRENT_H +@vindex HAVE_NDIR_H +@vindex HAVE_SYS_DIR_H +@vindex HAVE_SYS_NDIR_H @vindex SYSDIR @vindex SYSNDIR @vindex NDIR @vindex VOID_CLOSEDIR -If the system has @file{dirent.h}, define @code{DIRENT}; otherwise, if -it has @file{sys/ndir.h}, define @code{SYSNDIR}; otherwise, if it has -@file{sys/dir.h}, define @code{SYSDIR}; otherwise, if it has -@file{ndir.h}, define @code{NDIR}. Also, if the directory library -header file contains a declaration of the @code{closedir} function with -a @code{void} return type, define @code{VOID_CLOSEDIR}. +Check for the the following header files, and for the first one that is +found, define the listed macros (the second macros listed are for +backward compatibility, and are considered obsolete): + +@table @file +@item dirent.h +Define @code{HAVE_DIRENT_H} and @code{DIRENT}. + +@item sys/ndir.h +Define @code{HAVE_SYS_NDIR_H} and @code{SYSNDIR}. + +@item sys/dir.h +Define @code{HAVE_SYS_DIR_H} and @code{SYSDIR}. + +@item ndir.h +Define @code{HAVE_NDIR_H} and @code{NDIR}. +@end table + +Also, if the directory library header file contains a declaration of the +@code{closedir} function with a @code{void} return type, define +@code{VOID_CLOSEDIR}. The directory library declarations in the source code should look something like the following, which assumes that you have also called -@samp{AC_HAVE_HEADERS(unistd.h)}: +@samp{AC_CHECK_HEADERS(unistd.h)}: @example @group @@ -890,33 +946,32 @@ something like the following, which assumes that you have also called #include #endif -/* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */ -#if defined(DIRENT) || defined(_POSIX_VERSION) -#include -#define NLENGTH(dirent) (strlen((dirent)->d_name)) -#else /* not (DIRENT or _POSIX_VERSION) */ -#define dirent direct -#define NLENGTH(dirent) ((dirent)->d_namlen) -#ifdef SYSNDIR -#include -#endif /* SYSNDIR */ -#ifdef SYSDIR -#include -#endif /* SYSDIR */ -#ifdef NDIR -#include -#endif /* NDIR */ -#endif /* not (DIRENT or _POSIX_VERSION) */ +#ifdef HAVE_DIRENT_H +# include +# define NAMLEN(dirent) (strlen((dirent)->d_name)) +#else /* !HAVE_DIRENT_H */ +# define dirent direct +# define NAMLEN(dirent) ((dirent)->d_namlen) +# ifdef HAVE_SYS_NDIR_H +# include +# endif /* HAVE_SYS_NDIR_H */ +# ifdef HAVE_SYS_DIR_H +# include +# endif /* HAVE_SYS_DIR_H */ +# ifdef HAVE_NDIR_H +# include +# endif /* HAVE_NDIR_H */ +#endif /* !HAVE_DIRENT_H */ @end group @end example Using the above declarations, the program would declare variables to be type @code{struct dirent}, not @code{struct direct}, and would access the length of a directory entry name by passing a pointer to a -@code{struct dirent} to the @code{NLENGTH} macro. +@code{struct dirent} to the @code{NAMLEN} macro. @end defmac -@defmac AC_MAJOR_HEADER +@defmac AC_HEADER_MAJOR @maindex MAJOR_HEADER @vindex MAJOR_IN_MKDEV @vindex MAJOR_IN_SYSMACROS @@ -931,11 +986,11 @@ If @file{sys/types.h} does not define @code{major}, @code{minor}, and @vindex NEED_MEMORY_H Define @code{NEED_MEMORY_H} if @code{memcpy}, @code{memcmp}, etc. are not declared in @file{string.h} and @file{memory.h} exists. This macro -is obsolete; instead, use @code{AC_HAVE_HEADERS(memory.h)}. See the -example for @code{AC_STDC_HEADERS}. +is obsolete; instead, use @code{AC_CHECK_HEADERS(memory.h)}. See the +example for @code{AC_HEADER_STDC}. @end defmac -@defmac AC_STDC_HEADERS +@defmac AC_HEADER_STDC @maindex STDC_HEADERS @vindex STDC_HEADERS Define @code{STDC_HEADERS} if the system has ANSI C header files. @@ -957,8 +1012,8 @@ To check whether to use the System V/ANSI C string functions and header file, you can put the following in @file{configure.in}: @example -AC_STDC_HEADERS -AC_HAVE_HEADERS(string.h memory.h) +AC_HEADER_STDC +AC_CHECK_HEADERS(string.h memory.h) @end example @noindent @@ -1006,7 +1061,7 @@ been called already. @maindex UNISTD_H @vindex HAVE_UNISTD_H Define @code{HAVE_UNISTD_H} if the system has @file{unistd.h}. This -macro is obsolete; instead, use @samp{AC_HAVE_HEADERS(unistd.h)}. +macro is obsolete; instead, use @samp{AC_CHECK_HEADERS(unistd.h)}. The way to check if the system supports POSIX.1 is: @@ -1037,11 +1092,11 @@ Define @code{USG} if the system does not have @file{strings.h}, @file{string.h}, @code{strrchr}, @code{memset}, etc. The symbol @code{USG} is obsolete. Instead of this macro, use -@code{AC_HAVE_HEADERS(string.h)} and use @code{HAVE_STRING_H} in your -code. See the example for @code{AC_STDC_HEADERS}. +@code{AC_CHECK_HEADERS(string.h)} and use @code{HAVE_STRING_H} in your +code. See the example for @code{AC_HEADER_STDC}. @end defmac -@defmac AC_SYS_SIGLIST_DECLARED +@defmac AC_DECL_SYS_SIGLIST @maindex SYS_SIGLIST_DECLARED @vindex SYS_SIGLIST_DECLARED Define @code{SYS_SIGLIST_DECLARED} if the variable @code{sys_siglist} is @@ -1054,35 +1109,35 @@ declared in a system header file, either @file{signal.h} or The following macros check for predefined C types: -@defmac AC_GETGROUPS_T +@defmac AC_TYPE_GETGROUPS @maindex GETGROUPS_T @vindex GETGROUPS_T Define @code{GETGROUPS_T} to be whichever of @code{gid_t} or @code{int} is the base type of the array argument to @code{getgroups}. @end defmac -@defmac AC_MODE_T +@defmac AC_TYPE_MODE_T @maindex MODE_T @vindex mode_t If @code{mode_t} is not defined in @file{sys/types.h}, define @code{mode_t} to be @code{int}. @end defmac -@defmac AC_OFF_T +@defmac AC_TYPE_OFF_T @maindex OFF_T @vindex off_t If @code{off_t} is not defined in @file{sys/types.h}, define @code{off_t} to be @code{long}. @end defmac -@defmac AC_PID_T +@defmac AC_TYPE_PID_T @maindex PID_T @vindex pid_t If @code{pid_t} is not defined in @file{sys/types.h}, define @code{pid_t} to be @code{int}. @end defmac -@defmac AC_RETSIGTYPE +@defmac AC_TYPE_SIGNAL @maindex RETSIGTYPE @vindex RETSIGTYPE If @file{signal.h} declares @code{signal} as returning a pointer to a @@ -1102,14 +1157,14 @@ hup_handler () @end example @end defmac -@defmac AC_SIZE_T +@defmac AC_TYPE_SIZE_T @maindex SIZE_T @vindex size_t If @code{size_t} is not defined in @file{sys/types.h}, define @code{size_t} to be @code{unsigned}. @end defmac -@defmac AC_UID_T +@defmac AC_TYPE_UID_T @maindex UID_T @vindex uid_t @vindex gid_t @@ -1122,14 +1177,15 @@ If @code{uid_t} is not defined in @file{sys/types.h}, define The following macros check for particular C library functions: -@defmac AC_ALLOCA +@defmac AC_FUNC_ALLOCA @maindex ALLOCA @vindex C_ALLOCA @vindex HAVE_ALLOCA_H Check how to get @code{alloca}. Tries to get a builtin version by checking for @file{alloca.h} or the predefined C preprocessor macros @code{__GNUC__} and @code{_AIX}. If that fails, it looks for a function -in the standard C library. If that fails, it sets the @code{make} +in the standard C library. If any of those methods succeed, it defines +@code{HAVE_ALLOCA}. Otherwise, it sets the @code{make} variable @code{ALLOCA} to @samp{alloca.o} and defines @code{C_ALLOCA} (so programs can periodically call @samp{alloca(0)} to garbage collect). This variable is separate from @code{LIBOBJS} so multiple programs can @@ -1174,7 +1230,7 @@ char *alloca (); @end example @end defmac -@defmac AC_GETLOADAVG +@defmac AC_FUNC_GETLOADAVG @maindex GETLOADAVG @vindex SVR4 @vindex DGUX @@ -1218,14 +1274,14 @@ to the name of the group that should own the installed program. @end enumerate @end defmac -@defmac AC_MMAP +@defmac AC_FUNC_MMAP @maindex MMAP @vindex HAVE_MMAP If the @code{mmap} function exists and works correctly, define @code{HAVE_MMAP}. @end defmac -@defmac AC_SETVBUF_REVERSED +@defmac AC_FUNC_SETVBUF_REVERSED @maindex SETVBUF_REVERSED @vindex SETVBUF_REVERSED If @code{setvbuf} takes the buffering type as its second argument and @@ -1233,23 +1289,23 @@ the buffer pointer as the third, instead of the other way around, define @code{SETVBUF_REVERSED}. This is the case on System V before release 3. @end defmac -@defmac AC_STRCOLL +@defmac AC_FUNC_STRCOLL @maindex STRCOLL @vindex HAVE_STRCOLL If the @code{strcoll} function exists and works correctly, define @code{HAVE_STRCOLL}. This does a bit more than -@samp{AC_HAVE_FUNCS(strcoll)}, because some systems have incorrect +@samp{AC_CHECK_FUNCS(strcoll)}, because some systems have incorrect definitions of @code{strcoll}, which should not be used. @end defmac -@defmac AC_UTIME_NULL +@defmac AC_FUNC_UTIME_NULL @maindex UTIME_NULL @vindex HAVE_UTIME_NULL If @samp{utime(@var{file}, NULL)} sets @var{file}'s timestamp to the present, define @code{HAVE_UTIME_NULL}. @end defmac -@defmac AC_VFORK +@defmac AC_FUNC_VFORK @maindex VFORK @vindex HAVE_VFORK_H @vindex vfork @@ -1260,7 +1316,7 @@ and considers the system to not have a working @code{vfork} if it detects any of them. @end defmac -@defmac AC_VPRINTF +@defmac AC_FUNC_VPRINTF @maindex VPRINTF @vindex HAVE_VPRINTF @vindex HAVE_DOPRNT @@ -1270,7 +1326,7 @@ is available, you may assume that @code{vfprintf} and @code{vsprintf} are also available.) @end defmac -@defmac AC_WAIT3 +@defmac AC_FUNC_WAIT3 @maindex WAIT3 @vindex HAVE_WAIT3 If @code{wait3} is found and fills in the contents of its third argument @@ -1283,7 +1339,7 @@ If @code{wait3} is found and fills in the contents of its third argument The following macros check for certain structures or structure members: -@defmac AC_STAT_MACROS_BROKEN +@defmac AC_HEADER_STAT @maindex STAT_MACROS_BROKEN @maindex STAT_MACROS_BROKEN If the macros @code{S_ISDIR}, @code{S_ISREG} et al. defined in @@ -1292,14 +1348,14 @@ define @code{STAT_MACROS_BROKEN}. This is the case on Tektronix UTekV, Amdahl UTS and Motorola System V/88. @end defmac -@defmac AC_ST_BLKSIZE +@defmac AC_STRUCT_ST_BLKSIZE @maindex ST_BLKSIZE @vindex HAVE_ST_BLKSIZE If @code{struct stat} contains an @code{st_blksize} member, define @code{HAVE_ST_BLKSIZE}. @end defmac -@defmac AC_ST_BLOCKS +@defmac AC_STRUCT_ST_BLOCKS @maindex ST_BLOCKS @vindex HAVE_ST_BLOCKS If @code{struct stat} contains an @code{st_blocks} member, define @@ -1307,14 +1363,14 @@ If @code{struct stat} contains an @code{st_blocks} member, define @code{make} variable @code{LIBOBJS}. @end defmac -@defmac AC_ST_RDEV +@defmac AC_STRUCT_ST_RDEV @maindex ST_RDEV @vindex HAVE_ST_RDEV If @code{struct stat} contains an @code{st_rdev} member, define @code{HAVE_ST_RDEV}. @end defmac -@defmac AC_TIME_WITH_SYS_TIME +@defmac AC_HEADER_TIME @maindex TIME_WITH_SYS_TIME @vindex TIME_WITH_SYS_TIME If a program may include both @file{time.h} and @file{sys/time.h}, @@ -1348,7 +1404,7 @@ If @file{time.h} does not define @code{struct tm}, define defines @code{struct tm}. @end defmac -@defmac AC_TIMEZONE +@defmac AC_STRUCT_TIMEZONE @maindex TIMEZONE @vindex HAVE_TM_ZONE @vindex HAVE_TZNAME @@ -1364,7 +1420,7 @@ macro calls @code{AC_STRUCT_TM} if it hasn't been called already. The following macros check for C compiler or machine architecture features: -@defmac AC_ARG_ARRAY +@defmac AC_C_ARG_ARRAY @maindex ARG_ARRAY @vindex NO_ARG_ARRAY If the address of an argument to a C function can not be used like @@ -1373,24 +1429,24 @@ a sequence of arguments with the same type to be accessed as if they were an array of values. @end defmac -@defmac AC_CROSS_CHECK +@defmac AC_TRY_CROSS @maindex CROSS_CHECK 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 variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}. -This information can be used by @code{AC_TEST_RUN} to determine whether +This information can be used by @code{AC_TRY_RUN} to determine whether to take a default action instead of trying to run a test program (@pxref{C Features}). @end defmac -@defmac AC_CHAR_UNSIGNED +@defmac AC_C_CHAR_UNSIGNED @maindex CHAR_UNSIGNED @vindex __CHAR_UNSIGNED__ If the C type @code{char} is unsigned, define @code{__CHAR_UNSIGNED__}, unless the C compiler predefines it. @end defmac -@defmac AC_CONST +@defmac AC_C_CONST @maindex CONST @vindex const If the C compiler does not fully support the keyword @code{const}, @@ -1404,7 +1460,7 @@ include it before any other header files, to prevent inconsistencies in declarations.) @end defmac -@defmac AC_INLINE +@defmac AC_C_INLINE @maindex INLINE @vindex inline If the C compiler is a version of GCC that supports the keyword @@ -1418,7 +1474,7 @@ define @code{inline} to be @code{__inline}. This macro calls @vindex INT_16_BITS If the C type @code{int} is 16 bits wide, define @code{INT_16_BITS}. This macro is obsolete; it is more general to use -@samp{AC_SIZEOF_TYPE(int)} instead (@pxref{C Features}). +@samp{AC_CHECK_SIZEOF(int)} instead (@pxref{C Features}). @end defmac @defmac AC_LONG_64_BITS @@ -1426,10 +1482,10 @@ This macro is obsolete; it is more general to use @vindex LONG_64_BITS If the C type @code{long int} is 64 bits wide, define @code{LONG_64_BITS}. This macro is obsolete; it is more general to use -@samp{AC_SIZEOF_TYPE(long)} instead (@pxref{C Features}). +@samp{AC_CHECK_SIZEOF(long)} instead (@pxref{C Features}). @end defmac -@defmac AC_LONG_DOUBLE +@defmac AC_C_LONG_DOUBLE @maindex HAVE_LONG_DOUBLE @vindex HAVE_LONG_DOUBLE If the C compiler supports the @code{long double} type, define @@ -1438,7 +1494,7 @@ If the C compiler supports the @code{long double} type, define that define @code{__STDC__} do not support @code{long double}. @end defmac -@defmac AC_WORDS_BIGENDIAN +@defmac AC_C_BIGENDIAN @maindex WORDS_BIGENDIAN @vindex WORDS_BIGENDIAN If words are stored with the most significant byte first (like Motorola @@ -1450,7 +1506,7 @@ and SPARC, but not Intel and VAX, CPUs), define @code{WORDS_BIGENDIAN}. The following macros check for operating system services: -@defmac AC_FIND_X +@defmac AC_PATH_X @maindex FIND_X Try to locate the X Window System include files and libraries. Try first by running @code{xmkmf} on a trivial @file{Imakefile} and @@ -1468,19 +1524,19 @@ The command line options @samp{--x-includes=@var{dir}} and @samp{--x-libraries=@var{dir}} override the values chosen by this macro. @end defmac -@defmac AC_FIND_XTRA +@defmac AC_PATH_XTRA @maindex FIND_XTRA -An enhanced version of @code{AC_FIND_X}. Put the C compiler flags that +An enhanced version of @code{AC_PATH_X}. Put the C compiler flags that X needs into @code{make} variable @code{X_CFLAGS}, and the X linker flags into @code{X_LIBS}. If X is not available, put @samp{-DX_DISPLAY_MISSING} into @code{X_CFLAGS}. Also check for special libraries that some systems need in order to compile X programs. Add any that the system needs to @code{make} -variable @code{X_EXTRA_LIBS}. This macro calls @code{AC_FIND_X} and -@code{AC_ISC_POSIX} (@pxref{UNIX Variants}) if they have not already +variable @code{X_EXTRA_LIBS}. This macro calls @code{AC_PATH_X} and +@code{AC_OS_ISC} (@pxref{UNIX Variants}) if they have not already been called. Because of the macro dependencies, if you call this macro, -you should let it call @code{AC_FIND_X} rather than doing that yourself. +you should let it call @code{AC_PATH_X} rather than doing that yourself. @end defmac @defmac AC_HAVE_POUNDBANG (@var{action-if-supported} @r{[}, @var{action-if-not-supported}@r{]}) @@ -1491,14 +1547,14 @@ works, execute shell commands @var{action-if-supported}; if not, execute @var{action-if-not-supported}. @end defmac -@defmac AC_LONG_FILE_NAMES +@defmac AC_SYS_LONG_FILE_NAMES @maindex LONG_FILE_NAMES @vindex HAVE_LONG_FILE_NAMES If the system supports file names longer than 14 characters, define @code{HAVE_LONG_FILE_NAMES}. @end defmac -@defmac AC_REMOTE_TAPE +@defmac AC_SYS_REMOTE_TAPE @maindex REMOTE_TAPE @vindex HAVE_SYS_MTIO_H If BSD tape drive ioctls are available, define @code{HAVE_SYS_MTIO_H}, @@ -1506,7 +1562,7 @@ and if sockets are available add @code{rmt} to @code{make} variable @code{PROGS}. @end defmac -@defmac AC_RESTARTABLE_SYSCALLS +@defmac AC_SYS_RESTARTABLE_SYSCALLS @maindex RESTARTABLE_SYSCALLS @vindex HAVE_RESTARTABLE_SYSCALLS If the system automatically restarts a system call that is interrupted @@ -1522,21 +1578,21 @@ their header files or libraries. These macros are kludges; they should be replaced someday with a more systematic approach, based either on the functions they make available or the environments they provide. -@defmac AC_AIX +@defmac AC_OS_AIX @maindex AIX @vindex _ALL_SOURCE If on AIX, define @code{_ALL_SOURCE}. Allows the use of some BSD functions. Should be called before any macros that run the C compiler. @end defmac -@defmac AC_DYNIX_SEQ +@defmac AC_OS_DYNIX @maindex DYNIX_SEQ If on DYNIX/ptx (Sequent UNIX), add @samp{-lseq} to @code{make} variable @code{LIBS}. Allows use of some BSD system calls and @code{getmntent}. @end defmac -@defmac AC_IRIX_SUN +@defmac AC_OS_IRIX @maindex IRIX_SUN If on IRIX (Silicon Graphics UNIX), add @samp{-lsun} to @code{make} variable @code{LIBS}. Needed to get @code{getmntent}. At sites using @@ -1546,7 +1602,7 @@ so on. @c (According to Garrett.Wollman@uvm.edu.) @end defmac -@defmac AC_ISC_POSIX +@defmac AC_OS_ISC @maindex ISC_POSIX @vindex _POSIX_SOURCE If on a POSIXized ISC UNIX, define @code{_POSIX_SOURCE} and add @@ -1556,7 +1612,7 @@ POSIX facilities. Must be called after @code{AC_PROG_CC} and before any other macros that run the C compiler. @end defmac -@defmac AC_MINIX +@defmac AC_OS_MINIX @maindex MINIX @vindex _MINIX @vindex _POSIX_SOURCE @@ -1566,21 +1622,21 @@ If on Minix, define @code{_MINIX} and @code{_POSIX_SOURCE} and define facilities. Should be called before any macros that run the C compiler. @end defmac -@defmac AC_SCO_INTL +@defmac AC_OS_SCO @maindex SCO_INTL If on SCO UNIX, add @samp{-lintl} to @code{make} variable @code{LIBS}. Used to get @code{strftime}. It must be called before checking for @code{strftime}. @end defmac -@defmac AC_XENIX_DIR +@defmac AC_OS_XENIX @maindex XENIX_DIR @vindex VOID_CLOSEDIR If on Xenix, define @code{VOID_CLOSEDIR} and add @samp{-lx} to @code{make} variable @code{LIBS}. Also, if @file{sys/ndir.h} is not being used, add @samp{-ldir} to @code{LIBS}. Needed when using the directory reading functions. This macro must be called after -@code{AC_DIR_HEADER}. +@code{AC_HEADER_DIRENT}. @end defmac @node General Purpose Macros, Manual Configuration, Specific Tests, Top @@ -1632,7 +1688,7 @@ These macros are defined in the file @file{acgeneral.m4}. The following macros control the kind of output that Autoconf produces. @file{configure.in} should call them before @code{AC_INIT} or -@code{AC_PREPARE}. Remember to put a @code{dnl} comment at the ends of +@code{AC_INIT_PREPARE}. Remember to put a @code{dnl} comment at the ends of the lines containing their calls, to avoid inserting blank lines at the beginning of @file{configure}. @@ -1730,15 +1786,15 @@ is found, set the prefix to the parent of the directory containing set the prefix to @file{/usr/local/gnu}. @end defmac -@defmac AC_PREPARE (@var{unique-file-in-source-dir}) +@defmac AC_INIT_PREPARE (@var{unique-file-in-source-dir}) @maindex PREPARE Find the source code directory and set up shell variables necessary for other Autoconf macros to work. @var{unique-file-in-source-dir} is some file that is in the package's source directory; @code{configure} checks for this file's existence to make sure that the directory that it is told contains the source code in fact does (@pxref{Invoking configure}, -for more information). @code{AC_PREPARE} is the last thing done by -@code{AC_INIT}. Use @code{AC_PREPARE} instead of @code{AC_INIT} if you +for more information). @code{AC_INIT_PREPARE} is the last thing done by +@code{AC_INIT}. Use @code{AC_INIT_PREPARE} instead of @code{AC_INIT} if you want to do argument parsing yourself; never use both. @end defmac @@ -1792,7 +1848,7 @@ produces this in @file{configure}: These macros check whether particular files exist. -@defmac AC_HAVE_LIBRARY (@var{library} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found} @r{[}, @var{other-libraries}@r{]]]}) +@defmac AC_CHECK_LIB (@var{library} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found} @r{[}, @var{other-libraries}@r{]]]}) @maindex HAVE_LIBRARY Create a test C program to see whether that program can be linked with the library @var{library}. @var{action-if-found} is a list of shell @@ -1819,7 +1875,7 @@ This macro is like @code{AC_PREFIX_PROGRAM}, except that it prevents finding the site-wide defaults file correctly, so it is obsolete. @end defmac -@defmac AC_PROGRAM_CHECK (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found}@r{]}) +@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found}@r{]}) @maindex PROGRAM_CHECK Check whether program @var{prog-to-check-for} exists in @code{PATH}. If it is found, set @var{variable} to @var{value-if-found}, otherwise to @@ -1827,15 +1883,15 @@ it is found, set @var{variable} to @var{value-if-found}, otherwise to do nothing. Calls @code{AC_SUBST} for @var{variable}. @end defmac -@defmac AC_PROGRAM_PATH (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) +@defmac AC_PATH_PROG (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) @maindex PROGRAM_PATH -Similar to @code{AC_PROGRAM_CHECK}, but set @var{variable} to the entire +Similar to @code{AC_CHECK_PROG}, but set @var{variable} to the entire path of @var{prog-to-check-for} if found. Otherwise, set @var{variable} to @var{value-if-not-found}, if given. If @var{variable} was already set, do nothing. Calls @code{AC_SUBST} for @var{variable}. @end defmac -@defmac AC_PROGRAMS_CHECK (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) +@defmac AC_CHECK_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) @maindex PROGRAMS_CHECK Check for each program in the whitespace-separated list @var{progs-to-check-for} exists in @code{PATH}. If it is found, set @@ -1846,9 +1902,9 @@ list are found, set @var{variable} to @var{value-if-not-found}; if is not changed. Calls @code{AC_SUBST} for @var{variable}. @end defmac -@defmac AC_PROGRAMS_PATH (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) +@defmac AC_PATH_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) @maindex PROGRAMS_PATH -Like @code{AC_PROGRAMS_CHECK}, but if any of @var{progs-to-check-for} +Like @code{AC_CHECK_PROGS}, but if any of @var{progs-to-check-for} are found, set @var{variable} to the entire pathname of the program found. @end defmac @@ -1867,52 +1923,53 @@ to be the C (or C++) builtin type @var{default}, e.g. @samp{short} or @defmac AC_COMPILE_CHECK (@var{echo-text}, @var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex COMPILE_CHECK -This is an obsolete alias for @code{AC_TEST_LINK}, with the addition that it +This is an obsolete alias for @code{AC_TRY_LINK}, with the addition that it prints @samp{checking for @var{echo-text}} to the standard output first. @end defmac -@defmac AC_FUNC_CHECK (@var{function}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_CHECK_FUNC (@var{function}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex FUNC_CHECK If @var{function} is available, run shell commands @var{action-if-found}, otherwise @var{action-if-not-found}. If the functions might be in libraries other than the default C library, first -call @code{AC_HAVE_LIBRARY} for those libraries. If you just want to +call @code{AC_CHECK_LIB} for those libraries. If you just want to define a symbol if the function is available, consider using -@code{AC_HAVE_FUNCS} instead. +@code{AC_CHECK_FUNCS} instead. @end defmac -@defmac AC_HAVE_FUNCS (@var{function}@dots{}) +@defmac AC_CHECK_FUNCS (@var{function}@dots{}) @maindex HAVE_FUNCS @vindex HAVE_@var{function} For each given @var{function} in the whitespace-separated argument list that is available, define @code{HAVE_@var{function}} (in all caps). @xref{Specific Tests}, for a precise definition of ``define'' as it is used here. If the functions might be in libraries other than the -default C library, first call @code{AC_HAVE_LIBRARY} for those libraries. +default C library, first call @code{AC_CHECK_LIB} for those libraries. @end defmac -@defmac AC_HAVE_HEADERS (@var{header-file}@dots{}) +@defmac AC_CHECK_HEADERS (@var{header-file}@dots{}) @maindex HAVE_HEADERS @vindex HAVE_@var{header} -For each given @var{header-file} in the whitespace-separated argument -list that exists, define @code{HAVE_@var{header-file}} (in all caps). -@xref{Specific Tests}, for a precise definition of ``define'' as -it is used here. +For each given system header file @var{header-file} in the +whitespace-separated argument list that exists, define +@code{HAVE_@var{header-file}} (in all caps). @xref{Specific Tests}, for +a precise definition of ``define'' as it is used here. @end defmac -@defmac AC_HEADER_CHECK (@var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_CHECK_HEADER (@var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex HEADER_CHECK -If @var{header-file} exists, execute shell commands +If the system header file @var{header-file} exists, execute shell commands @var{action-if-found}, otherwise execute @var{action-if-not-found}. If you just want to define a symbol if the header file is available, -consider using @code{AC_HAVE_HEADERS} instead. +consider using @code{AC_CHECK_HEADERS} instead. @end defmac -@defmac AC_HEADER_EGREP (@var{pattern}, @var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_EGREP_HEADER (@var{pattern}, @var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex HEADER_EGREP -If the output of running the preprocessor on @var{header-file} -contains the @code{egrep} regular expression @var{pattern}, execute -shell commands @var{action-if-found}, otherwise execute +If the output of running the preprocessor on the system header file +@var{header-file} contains the @code{egrep} regular expression +@var{pattern}, execute shell commands @var{action-if-found}, otherwise +execute This macro calls @code{AC_PROG_CPP} or @code{AC_PROG_CXXCPP} (depending on which language is current, @pxref{Language Choice}), if it hasn't @@ -1925,7 +1982,7 @@ almost always detect them by simply using @code{#ifdef} directives in your programs. @end defmac -@defmac AC_PROGRAM_EGREP (@var{pattern}, @var{program}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_EGREP_CPP (@var{pattern}, @var{program}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex PROGRAM_EGREP @var{program} is the text of a C or C++ program, on which shell variable and backquote substitutions are performed. If the output of running the @@ -1946,10 +2003,10 @@ For each given @var{function-name} in the whitespace-separated argument list that is not in the C library, add @samp{@var{function-name}.o} to the value of the @code{make} variable @code{LIBOBJS}. If the functions might be in libraries other than the default C library, first call -@code{AC_HAVE_LIBRARY} for those libraries. +@code{AC_CHECK_LIB} for those libraries. @end defmac -@defmac AC_SIZEOF_TYPE (@var{type}) +@defmac AC_CHECK_SIZEOF (@var{type}) @maindex SIZEOF_TYPE Define @code{SIZEOF_@var{uctype}} to be the size in bytes of the C (or C++) builtin type @var{type}, e.g. @samp{int} or @samp{char *}. If @@ -1957,13 +2014,13 @@ C++) builtin type @var{type}, e.g. @samp{int} or @samp{char *}. If is @var{type}, with lowercase converted to uppercase, spaces changed to underscores, and asterisks changed to @samp{P}. For example, the call @example -AC_SIZEOF_TYPE(int *) +AC_CHECK_SIZEOF(int *) @end example @noindent defines @code{SIZEOF_INT_P} to be 8 on DEC Alpha AXP systems. @end defmac -@defmac AC_TEST_CPP (@var{includes}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]}) +@defmac AC_TRY_CPP (@var{includes}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]}) @maindex TEST_CPP @var{includes} is C or C++ @code{#include} statements and declarations, on which shell variable and backquote substitutions are performed. @@ -1977,8 +2034,8 @@ on which language is current, @pxref{Language Choice}), if it hasn't been called already. @end defmac -@defmac AC_TEST_LINK (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) -@maindex TEST_LINK +@defmac AC_TRY_LINK (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@maindex TRY_LINK Create a test C program to see whether a function whose body consists of @var{function-body} can be compiled and linked; @var{includes} is any @code{#include} statements needed by the code in @var{function-body}. @@ -1986,13 +2043,8 @@ If the file compiles and links successfully, run shell commands @var{action-if-found}, otherwise run @var{action-if-not-found}. @end defmac -@defmac AC_TEST_PROGRAM (@var{program}, @var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]}) -@maindex TEST_PROGRAM -This is an obsolete alias for @code{AC_TEST_RUN}. -@end defmac - -@defmac AC_TEST_RUN (@var{program}, @var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]}) -@maindex TEST_RUN +@defmac AC_TRY_RUN (@var{program}, @var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]}) +@maindex TRY_RUN @var{program} is the text of a C program, on which shell variable and backquote substitutions are performed. If it compiles and links successfully and returns an exit status of 0 when executed, run shell @@ -2003,7 +2055,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 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. If that argument is given, this macro calls @code{AC_CROSS_CHECK} +run. If that argument is given, this macro calls @code{AC_TRY_CROSS} if it has not already been called (@pxref{Compiler Characteristics}). @end defmac @@ -2121,7 +2173,7 @@ header file by substituting the correct values into @code{#define} statements in a template file. For example, suppose your @file{configure.in} calls -@code{AC_CONFIG_HEADER(conf.h)} and @code{AC_HAVE_HEADERS(unistd.h)}. +@code{AC_CONFIG_HEADER(conf.h)} and @code{AC_CHECK_HEADERS(unistd.h)}. You could have code like this in @file{conf.h.in}: @example @@ -2154,14 +2206,14 @@ shell code; that can cause syntax errors in the resulting this: @example -AC_HEADER_CHECK(elf.h, AC_DEFINE(SVR4) LIBS="$LIBS -lelf") +AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) LIBS="$LIBS -lelf") @end example @noindent or this: @example -AC_HEADER_CHECK(elf.h, +AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) LIBS="$LIBS -lelf") @end example @@ -2170,7 +2222,7 @@ AC_HEADER_CHECK(elf.h, instead of this: @example -AC_HEADER_CHECK(elf.h, AC_DEFINE(SVR4); LIBS="$LIBS -lelf") +AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4); LIBS="$LIBS -lelf") @end example @end defmac @@ -2231,7 +2283,7 @@ 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 callers change automatically. -@defmac AC_CHECKING (@var{feature-description}) +@defmac AC_MSG_CHECKING (@var{feature-description}) @maindex CHECKING Notify the user that @code{configure} is checking for a particular feature. This macro prints a message that starts with @samp{checking }. @@ -2241,7 +2293,7 @@ something like @samp{whether the Fortran compiler accepts C++ comments} or @samp{for c89}. @end defmac -@defmac AC_ERROR (@var{error-description}) +@defmac AC_MSG_ERROR (@var{error-description}) @maindex ERROR Notify the user of an error that prevents @code{configure} from completing. This macro prints an error message on the standard error @@ -2250,7 +2302,7 @@ stream and exits @code{configure} with a nonzero status. $HOME for \$HOME}. @end defmac -@defmac AC_VERBOSE (@var{result-description}) +@defmac AC_MSG_RESULT (@var{result-description}) @maindex VERBOSE Notify the user of the results of a check. This information is only printed if @code{configure} is run with the @samp{--verbose} @@ -2258,11 +2310,11 @@ option. @var{result-description} should be something like @samp{setting ADA to $ADA}. @end defmac -@defmac AC_WARN (@var{problem-description}) +@defmac AC_MSG_WARN (@var{problem-description}) @maindex WARN Notify the @code{configure} user of a possible problem. This macro prints the message on the standard error stream; @code{configure} -continues running afterward, so macros that call @code{AC_WARN} should +continues running afterward, so macros that call @code{AC_MSG_WARN} should provide a default (back-up) behavior for the situations they warn about. @var{problem-description} should be something like @samp{ln -s seems to make hard links}. @@ -2359,7 +2411,7 @@ a suggestion for what to use instead of @var{this-macro-name}. A sample call is: @example -AC_OBSOLETE([$0], [; use AC_HAVE_HEADERS(unistd.h) instead]) +AC_OBSOLETE([$0], [; use AC_CHECK_HEADERS(unistd.h) instead]) @end example @end defmac @@ -2665,7 +2717,7 @@ and only if @code{AC_PROG_CPP} has not already been run. Some macros should be run before another macro if both are called, but neither requires the other to be called. For example, a macro like -@code{AC_AIX} that changes the behavior of the C compiler (@pxref{UNIX +@code{AC_OS_AIX} that changes the behavior of the C compiler (@pxref{UNIX Variants}) should be called before any macros that run the C compiler. Many of these dependencies are noted in the documentation. @@ -2681,22 +2733,22 @@ which might change its behavior. The macro which should come first should contain a call to @code{AC_BEFORE} and the macro which should come later should contain a call to @code{AC_PROVIDE}. -For example, @code{AC_AIX} contains +For example, @code{AC_OS_AIX} contains @example -AC_BEFORE([$0], [AC_TEST_LINK]) +AC_BEFORE([$0], [AC_TRY_LINK]) @end example @noindent -and @code{AC_TEST_LINK} contains +and @code{AC_TRY_LINK} contains @example AC_PROVIDE([$0]) @end example @noindent -As a result, if @code{AC_AIX} is called after @code{AC_TEST_LINK}, -it will note that @code{AC_TEST_LINK} has already been called and +As a result, if @code{AC_OS_AIX} is called after @code{AC_TRY_LINK}, +it will note that @code{AC_TRY_LINK} has already been called and print a warning message. @node Checking for Files, Checking for Symbols, Dependencies Between Macros, Writing Macros @@ -2719,7 +2771,7 @@ Do not use @samp{test -x}, because 4.3BSD does not have it. Use @section Checking for Symbols If you need to check whether a symbol is defined in a C header file, you -can use @code{AC_HEADER_EGREP} if the symbol is not a C preprocessor +can use @code{AC_EGREP_HEADER} if the symbol is not a C preprocessor macro (@pxref{C Features}), or compile a small test program that includes the file and references the symbol (@pxref{Test Programs}). Don't directly @code{grep} for the symbol in the file, because on some systems @@ -2767,16 +2819,16 @@ than scanning the libraries. If you need to check for a condition other than whether some symbol exists on the system or has a certain value, then you can't use -@code{AC_TEST_LINK} (@pxref{C Features}). You have to write a +@code{AC_TRY_LINK} (@pxref{C Features}). You have to write a test program by hand. You can compile and run it using -@code{AC_TEST_RUN} (@pxref{C Features}). +@code{AC_TRY_RUN} (@pxref{C Features}). Try to avoid writing test programs if possible, because using them prevents people from configuring your package for cross-compiling. If it's really best that you test for a run-time behavior, try to provide a default ``worst case'' value to use when cross-compiling makes run-time tests impossible. You do this by passing the optional last argument to -@code{AC_TEST_RUN}. +@code{AC_TRY_RUN}. @menu * Guidelines:: General rules for writing test programs. @@ -2796,7 +2848,7 @@ output. Test programs can use @code{#if} or @code{#ifdef} to check the values of preprocessor macros defined by tests that have already run. For -example, if you call @code{AC_STDC_HEADERS}, then later on in +example, if you call @code{AC_HEADER_STDC}, then later on in @file{configure.in} you can have a test program that includes an ANSI C header file conditionally: @@ -2849,16 +2901,16 @@ cases which are not shown here but follow the same pattern. @group echo checking how to get filesystem type # SVR4. -AC_TEST_CPP([#include +AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_STATVFS) fstype=1) if test -z "$fstype"; then # SVR3. -AC_TEST_CPP([#include +AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_USG_STATFS) fstype=1) fi if test -z "$fstype"; then # AIX. -AC_TEST_CPP([#include +AC_TRY_CPP([#include #include ], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=1) fi @end group @@ -2912,7 +2964,7 @@ commands @var{commands-to-set-it}. Those commands should have no side effects except for setting the variable @var{cache-id}. In particular, they should not call @code{AC_DEFINE}; the code that follows the call to @code{AC_CACHE_VAL} should do that, based on the cached value. Also, -they should not print any messages, for example with @code{AC_CHECKING}; +they should not print any messages, for example with @code{AC_MSG_CHECKING}; do that before calling @code{AC_CACHE_VAL}, so the messages are printed regardless of whether the results of the check are retrieved from the cache or determined by running the shell commands. If the shell @@ -3269,7 +3321,7 @@ Makefile: Makefile.in config.status (If @file{configure.in} does not call @code{AC_CONFIG_HEADER}, there is no need to set @code{CONFIG_HEADERS} in the @code{make} rules.) -@node Site Default Values, Example, Invoking config.status, Top +@node Site Default Values, Old Macro Names, Invoking config.status, Top @chapter Site Default Values Autoconf-generated @code{configure} scripts support site and system wide @@ -3306,7 +3358,317 @@ check that variables such as @code{prefix} and @code{cache_file} have their default values (as set near the top of @code{configure}) before changing them. -@node Example, Preprocessor Symbol Index, Site Default Values, Top +@node Old Macro Names, Example, Site Default Values, Top +@chapter Old Macro Names + +In version 2 of Autoconf, most of the macros were renamed to use a more +uniform and descriptive naming scheme. Here are the old names of the +macros that were renamed, followed by the current names of those macros. +Although the old names are still accepted by the @code{autoconf} program +for backward compatibility, the old names are considered obsolete. + +@table @code +@item AC_NOTICE +@vindex NOTICE +@vindex INIT_NOTICE +@code{AC_INIT_NOTICE} +@item AC_PARSEARGS +@vindex PARSEARGS +@vindex INIT_PARSEARGS +@code{AC_INIT_PARSEARGS} +@item AC_PREPARE +@vindex PREPARE +@vindex 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 +@vindex WARN +@vindex MSG_WARN +@code{AC_MSG_WARN} +@item AC_ERROR +@vindex ERROR +@vindex MSG_ERROR +@code{AC_MSG_ERROR} +@item AC_PROGRAM_CHECK +@vindex PROGRAM_CHECK +@vindex CHECK_PROG +@code{AC_CHECK_PROG} +@item AC_PROGRAM_PATH +@vindex PROGRAM_PATH +@vindex PATH_PROG +@code{AC_PATH_PROG} +@item AC_PROGRAMS_CHECK +@vindex PROGRAMS_CHECK +@vindex CHECK_PROGS +@code{AC_CHECK_PROGS} +@item AC_PROGRAMS_PATH +@vindex PROGRAMS_PATH +@vindex PATH_PROGS +@code{AC_PATH_PROGS} +@item AC_HAVE_LIBRARY +@vindex HAVE_LIBRARY +@vindex CHECK_LIB +@code{AC_CHECK_LIB} +@item AC_HEADER_EGREP +@vindex HEADER_EGREP +@vindex EGREP_HEADER +@code{AC_EGREP_HEADER} +@item AC_PROGRAM_EGREP +@vindex PROGRAM_EGREP +@vindex EGREP_CPP +@code{AC_EGREP_CPP} +@vindex TRY_LINK +@code{AC_TRY_LINK} +@item AC_TEST_PROGRAM +@vindex TEST_PROGRAM +@vindex TRY_RUN +@code{AC_TRY_RUN} +@item AC_TEST_CPP +@vindex TEST_CPP +@vindex TRY_CPP +@code{AC_TRY_CPP} +@item AC_HEADER_CHECK +@vindex HEADER_CHECK +@vindex CHECK_HEADER +@code{AC_CHECK_HEADER} +@item AC_FUNC_CHECK +@vindex FUNC_CHECK +@vindex CHECK_FUNC +@code{AC_CHECK_FUNC} +@item AC_HAVE_FUNCS +@vindex HAVE_FUNCS +@vindex CHECK_FUNCS +@code{AC_CHECK_FUNCS} +@item AC_HAVE_HEADERS +@vindex HAVE_HEADERS +@vindex CHECK_HEADERS +@code{AC_CHECK_HEADERS} +@item AC_SIZEOF_TYPE +@vindex SIZEOF_TYPE +@vindex CHECK_SIZEOF +@code{AC_CHECK_SIZEOF} +@item AC_GCC_TRADITIONAL +@vindex GCC_TRADITIONAL +@vindex PROG_GCC_TRADITIONAL +@code{AC_PROG_GCC_TRADITIONAL} +@item AC_MINUS_C_MINUS_O +@vindex MINUS_C_MINUS_O +@vindex PROG_CC_C_O +@code{AC_PROG_CC_C_O} +@item AC_SET_MAKE +@vindex SET_MAKE +@vindex PROG_MAKE_SET +@code{AC_PROG_MAKE_SET} +@item AC_YYTEXT_POINTER +@vindex YYTEXT_POINTER +@vindex DECL_YYTEXT +@code{AC_DECL_YYTEXT} +@item AC_LN_S +@vindex LN_S +@vindex PROG_LN_S +@code{AC_PROG_LN_S} +@item AC_RSH +@vindex RSH +@vindex PROG_RSH +@code{AC_PROG_RSH} +@item AC_STDC_HEADERS +@vindex STDC_HEADERS +@vindex HEADER_STDC +@code{AC_HEADER_STDC} +@item AC_MAJOR_HEADER +@vindex MAJOR_HEADER +@vindex HEADER_MAJOR +@code{AC_HEADER_MAJOR} +@item AC_DIR_HEADER +@vindex DIR_HEADER +@vindex HEADER_DIRENT +@code{AC_HEADER_DIRENT} +@item AC_STAT_MACROS_BROKEN +@vindex STAT_MACROS_BROKEN +@vindex HEADER_STAT +@code{AC_HEADER_STAT} +@item AC_SYS_SIGLIST_DECLARED +@vindex SYS_SIGLIST_DECLARED +@vindex DECL_SYS_SIGLIST +@code{AC_DECL_SYS_SIGLIST} +@item AC_GETGROUPS_T +@vindex GETGROUPS_T +@vindex TYPE_GETGROUPS +@code{AC_TYPE_GETGROUPS} +@item AC_UID_T +@vindex UID_T +@vindex TYPE_UID_T +@code{AC_TYPE_UID_T} +@item AC_SIZE_T +@vindex SIZE_T +@vindex TYPE_SIZE_T +@code{AC_TYPE_SIZE_T} +@item AC_PID_T +@vindex PID_T +@vindex TYPE_PID_T +@code{AC_TYPE_PID_T} +@item AC_OFF_T +@vindex OFF_T +@vindex TYPE_OFF_T +@code{AC_TYPE_OFF_T} +@item AC_MODE_T +@vindex MODE_T +@vindex TYPE_MODE_T +@code{AC_TYPE_MODE_T} +@item AC_RETSIGTYPE +@vindex RETSIGTYPE +@vindex TYPE_SIGNAL +@code{AC_TYPE_SIGNAL} +@item AC_MMAP +@vindex MMAP +@vindex FUNC_MMAP +@code{AC_FUNC_MMAP} +@item AC_VPRINTF +@vindex VPRINTF +@vindex FUNC_VPRINTF +@code{AC_FUNC_VPRINTF} +@item AC_VFORK +@vindex VFORK +@vindex FUNC_VFORK +@code{AC_FUNC_VFORK} +@item AC_WAIT3 +@vindex WAIT3 +@vindex FUNC_WAIT3 +@code{AC_FUNC_WAIT3} +@item AC_ALLOCA +@vindex ALLOCA +@vindex FUNC_ALLOCA +@code{AC_FUNC_ALLOCA} +@item AC_GETLOADAVG +@vindex GETLOADAVG +@vindex FUNC_GETLOADAVG +@code{AC_FUNC_GETLOADAVG} +@item AC_UTIME_NULL +@vindex UTIME_NULL +@vindex FUNC_UTIME_NULL +@code{AC_FUNC_UTIME_NULL} +@item AC_STRCOLL +@vindex STRCOLL +@vindex FUNC_STRCOLL +@code{AC_FUNC_STRCOLL} +@item AC_SETVBUF_REVERSED +@vindex SETVBUF_REVERSED +@vindex FUNC_SETVBUF_REVERSED +@code{AC_FUNC_SETVBUF_REVERSED} +@item AC_TIME_WITH_SYS_TIME +@vindex TIME_WITH_SYS_TIME +@vindex HEADER_TIME +@code{AC_HEADER_TIME} +@item AC_TIMEZONE +@vindex TIMEZONE +@vindex STRUCT_TIMEZONE +@code{AC_STRUCT_TIMEZONE} +@item AC_ST_BLOCKS +@vindex ST_BLOCKS +@vindex STRUCT_ST_BLOCKS +@code{AC_STRUCT_ST_BLOCKS} +@item AC_ST_BLKSIZE +@vindex ST_BLKSIZE +@vindex STRUCT_ST_BLKSIZE +@code{AC_STRUCT_ST_BLKSIZE} +@item AC_ST_RDEV +@vindex ST_RDEV +@vindex STRUCT_ST_RDEV +@code{AC_STRUCT_ST_RDEV} +@item AC_CROSS_CHECK +@vindex CROSS_CHECK +@vindex TRY_CROSS +@code{AC_TRY_CROSS} +@item AC_CHAR_UNSIGNED +@vindex CHAR_UNSIGNED +@vindex C_CHAR_UNSIGNED +@code{AC_C_CHAR_UNSIGNED} +@item AC_LONG_DOUBLE +@vindex LONG_DOUBLE +@vindex C_LONG_DOUBLE +@code{AC_C_LONG_DOUBLE} +@item AC_WORDS_BIGENDIAN +@vindex WORDS_BIGENDIAN +@vindex C_BIGENDIAN +@code{AC_C_BIGENDIAN} +@item AC_ARG_ARRAY +@vindex ARG_ARRAY +@vindex C_ARG_ARRAY +@code{AC_C_ARG_ARRAY} +@item AC_INLINE +@vindex INLINE +@vindex C_INLINE +@code{AC_C_INLINE} +@item AC_CONST +@vindex CONST +@vindex C_CONST +@code{AC_C_CONST} +@item AC_REMOTE_TAPE +@vindex REMOTE_TAPE +@vindex SYS_REMOTE_TAPE +@code{AC_SYS_REMOTE_TAPE} +@item AC_LONG_FILE_NAMES +@vindex LONG_FILE_NAMES +@vindex SYS_LONG_FILE_NAMES +@code{AC_SYS_LONG_FILE_NAMES} +@item AC_RESTARTABLE_SYSCALLS +@vindex RESTARTABLE_SYSCALLS +@vindex SYS_RESTARTABLE_SYSCALLS +@code{AC_SYS_RESTARTABLE_SYSCALLS} +@item AC_FIND_X +@vindex FIND_X +@vindex PATH_X +@code{AC_PATH_X} +@item AC_FIND_X_XMKMF +@vindex FIND_X_XMKMF +@vindex PATH_X_XMKMF +@code{AC_PATH_X_XMKMF} +@item AC_FIND_X_DIRECT +@vindex FIND_X_DIRECT +@vindex PATH_X_DIRECT +@code{AC_PATH_X_DIRECT} +@item AC_FIND_XTRA +@vindex FIND_XTRA +@vindex PATH_XTRA +@code{AC_PATH_XTRA} +@item AC_AIX +@vindex AIX +@vindex OS_AIX +@code{AC_OS_AIX} +@item AC_MINIX +@vindex MINIX +@vindex OS_MINIX +@code{AC_OS_MINIX} +@item AC_ISC_POSIX +@vindex ISC_POSIX +@vindex OS_ISC +@code{AC_OS_ISC} +@item AC_XENIX_DIR +@vindex XENIX_DIR +@vindex OS_XENIX +@code{AC_OS_XENIX} +@item AC_SCO_INTL +@vindex SCO_INTL +@vindex OS_SCO +@code{AC_OS_SCO} +@item AC_IRIX_SUN +@vindex IRIX_SUN +@vindex OS_IRIX +@code{AC_OS_IRIX} +@item AC_DYNIX_SEQ +@vindex DYNIX_SEQ +@vindex OS_DYNIX +@code{AC_OS_DYNIX} +@end table + +@node Example, Preprocessor Symbol Index, Old Macro Names, Top @chapter An Example Here are sample @file{configure.in} and @file{Makefile.in} files, to @@ -3336,27 +3698,27 @@ PROGS="cpio" AC_SUBST(PROGS)dnl AC_PROG_CC AC_PROG_CPP -AC_GCC_TRADITIONAL +AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL -AC_AIX -AC_MINIX -AC_ISC_POSIX -AC_RETSIGTYPE -AC_MAJOR_HEADER -AC_REMOTE_TAPE +AC_OS_AIX +AC_OS_MINIX +AC_OS_ISC +AC_TYPE_SIGNAL +AC_HEADER_MAJOR +AC_SYS_REMOTE_TAPE test -n "$have_mtio" && PROGS="$PROGS mt" -AC_RSH -AC_CONST -AC_UID_T -AC_STDC_HEADERS -AC_HAVE_HEADERS(string.h fcntl.h utime.h unistd.h sys/io/trioctl.h) +AC_PROG_RSH +AC_C_CONST +AC_TYPE_UID_T +AC_HEADER_STDC +AC_CHECK_HEADERS(string.h fcntl.h utime.h unistd.h sys/io/trioctl.h) AC_REPLACE_FUNCS(fnmatch bcopy mkdir strdup) -AC_HAVE_FUNCS(strerror lchown) -AC_VPRINTF -AC_ALLOCA -AC_XENIX_DIR -AC_HAVE_LIBRARY(socket, [LIBS="$LIBS -lsocket"]) -AC_HAVE_LIBRARY(nsl, [LIBS="$LIBS -lnsl"]) +AC_CHECK_FUNCS(strerror lchown) +AC_FUNC_VPRINTF +AC_FUNC_ALLOCA +AC_OS_XENIX +AC_CHECK_LIB(socket, [LIBS="$LIBS -lsocket"]) +AC_CHECK_LIB(nsl, [LIBS="$LIBS -lnsl"]) AC_OUTPUT(Makefile) @end example @@ -3502,5 +3864,5 @@ easier to use, the macros are listed without their preceding @samp{AC_}. @bye @c Local variables: -@c compile-command: "makeinfo --no-split autoconf.texi" +@c compile-command: "makeinfo autoconf.texi" @c End: diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 3f45e9e6..42062e5b 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -20,7 +20,7 @@ dnl Written by David MacKenzie, with help from dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, dnl Roland McGrath, Noah Friedman, and david d zuhn. dnl -changequote([,])dnl +changequote([, ])dnl undefine([eval])dnl undefine([include])dnl undefine([shift])dnl @@ -29,7 +29,7 @@ dnl ifdef([__gnu__], , [errprint(Autoconf requires GNU m4 )m4exit(2)])dnl dnl -define(AC_ACVERSION, 1.95)dnl +define(AC_ACVERSION, 1.96)dnl dnl This is defined by the --version option of the autoconf script. ifdef([AC_PRINT_VERSION], [Autoconf version AC_ACVERSION m4exit(0)])dnl @@ -47,7 +47,7 @@ define(AC_DIVERSION_ARG_ENABLE, 4)dnl --enable/--disable actions define(AC_DIVERSION_HELP_WITH, 5)dnl --with/--without help strings define(AC_DIVERSION_ARG_WITH, 6)dnl --with/--without actions dnl -define(AC_NOTICE, +define(AC_INIT_NOTICE, [# Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version] AC_ACVERSION [ # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. @@ -67,7 +67,7 @@ define(AC_NOTICE, # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ])dnl dnl -define(AC_PARSEARGS, +define(AC_INIT_PARSEARGS, [AC_BEFORE([$0], [AC_ARG_ENABLE])dnl AC_BEFORE([$0], [AC_ARG_WITH])dnl # Save the original args to write them into config.status later. @@ -75,7 +75,7 @@ configure_args="[$]@" # Omit some internal, obsolete, or unimplemented options to make the # list less imposing. -changequote(,)dnl +changequote(, )dnl ac_usage="Usage: configure [options] [host] Options: [defaults in brackets after descriptions] --build=BUILD configure for building on BUILD [BUILD=HOST] @@ -101,7 +101,7 @@ Options: [defaults in brackets after descriptions] undivert(AC_DIVERSION_HELP_ENABLE)dnl --with/--without options recognized: undivert(AC_DIVERSION_HELP_WITH)"dnl -changequote([,])dnl +changequote([, ])dnl # Initialize some variables set by options. # The variables have the same names as the options, with @@ -139,9 +139,9 @@ do fi case "$ac_option" in -changequote(,)dnl +changequote(, )dnl -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; -changequote([,])dnl +changequote([, ])dnl *) ac_optarg= ;; esac @@ -165,10 +165,10 @@ changequote([,])dnl -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then -changequote([,])dnl - AC_ERROR($ac_feature: invalid feature name) +changequote([, ])dnl + AC_MSG_ERROR($ac_feature: invalid feature name) fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; @@ -176,10 +176,10 @@ changequote([,])dnl -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then -changequote([,])dnl - AC_ERROR($ac_feature: invalid feature name) +changequote([, ])dnl + AC_MSG_ERROR($ac_feature: invalid feature name) fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in @@ -284,10 +284,10 @@ EOF -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then -changequote([,])dnl - AC_ERROR($ac_package: invalid package name) +changequote([, ])dnl + AC_MSG_ERROR($ac_package: invalid package name) fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in @@ -299,10 +299,10 @@ changequote([,])dnl -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then -changequote([,])dnl - AC_ERROR($ac_package: invalid package name) +changequote([, ])dnl + AC_MSG_ERROR($ac_package: invalid package name) fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; @@ -325,17 +325,17 @@ changequote([,])dnl | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; - -*) AC_ERROR([$ac_option: invalid option; use --help to show usage]) + -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage]) ;; *) -changequote(,)dnl +changequote(, )dnl if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then -changequote([,])dnl - AC_WARN($ac_option: invalid host type) +changequote([, ])dnl + AC_MSG_WARN($ac_option: invalid host type) fi if test "x$nonopt" != xNONE; then - AC_ERROR(can only configure for one host and one target at a time) + AC_MSG_ERROR(can only configure for one host and one target at a time) fi nonopt="$ac_option" ;; @@ -344,7 +344,7 @@ changequote([,])dnl done if test -n "$ac_prev"; then - AC_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) + AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`) fi ])dnl dnl @@ -357,12 +357,12 @@ dnl AC_REQUIRE inserts a newline after this. dnl define(AC_INIT, [AC_REQUIRE([AC_BINSH])dnl -AC_NOTICE -AC_PARSEARGS -AC_PREPARE($1)])dnl +AC_INIT_NOTICE +AC_INIT_PARSEARGS +AC_INIT_PREPARE($1)])dnl dnl -dnl AC_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) -define(AC_PREPARE, +dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) +define(AC_INIT_PREPARE, [AC_BEFORE([$0], [AC_ARG_ENABLE])dnl AC_BEFORE([$0], [AC_ARG_WITH])dnl AC_BEFORE([$0], [AC_CONFIG_HEADER])dnl @@ -408,9 +408,9 @@ for ac_arg in $ac_configure_temp; do | --no-cr | --no-c) ;; -norecursion | --norecursion | --norecursio | --norecursi \ | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;; -changequote(,)dnl +changequote(, )dnl *[" "]*) configure_args="$configure_args '$ac_arg'" ;; -changequote([,])dnl +changequote([, ])dnl *) configure_args="$configure_args $ac_arg" ;; esac done @@ -436,9 +436,9 @@ if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=[$]0 -changequote(,)dnl +changequote(, )dnl ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` -changequote([,])dnl +changequote([, ])dnl test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then @@ -449,13 +449,13 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - AC_ERROR(can not find sources in ${ac_confdir} or ..) + AC_MSG_ERROR(can not find sources in ${ac_confdir} or ..) else - AC_ERROR(can not find sources in ${srcdir}) + AC_MSG_ERROR(can not find sources in ${srcdir}) fi fi -ifdef([AC_LIST_SUBDIRS],[subdirs="AC_LIST_SUBDIRS" +ifdef([AC_LIST_SUBDIRS], [subdirs="AC_LIST_SUBDIRS" AC_SUBST(subdirs)])dnl ifdef([AC_LIST_PREFIX_PROGRAM], [AC_PREFIX(AC_LIST_PREFIX_PROGRAM)])dnl dnl Let the site file select an alternate cache file if it wants to. @@ -485,7 +485,7 @@ dnl dnl AC_ENABLE_INTERNAL(FEATURE, ACTION-IF-TRUE [, ACTION-IF-FALSE]) define(AC_ENABLE_INTERNAL, [[#] Check whether --enable-$1 or --disable-$1 was given. -enableval="[$enable_]patsubst($1,-,_)" +enableval="[$enable_]patsubst($1, -, _)" if test -n "$enableval"; then ifelse([$2], , :, [$2]) ifelse([$3], , , [else @@ -512,7 +512,7 @@ dnl dnl AC_WITH_INTERNAL(PACKAGE, ACTION-IF-TRUE [, ACTION-IF-FALSE]) define(AC_WITH_INTERNAL, [[#] Check whether --with-$1 or --without-$1 was given. -withval="[$with_]patsubst($1,-,_)" +withval="[$with_]patsubst($1, -, _)" if test -n "$withval"; then ifelse([$2], , :, [$2]) ifelse([$3], , , [else @@ -526,22 +526,22 @@ define(AC_CONFIG_HEADER, [AC_PROVIDE([$0])define(AC_LIST_HEADERS, $1)])dnl dnl dnl AC_REVISION(REVISION-INFO) define(AC_REVISION, [AC_PROVIDE([$0])AC_REQUIRE([AC_BINSH])dnl -[# From configure.in] translit([$1],$")])dnl +[# From configure.in] translit([$1], $")])dnl dnl dnl Subroutines of AC_PREREQ. dnl dnl Change the dots in version number $1 into commas. -define(AC_PREREQ_SPLIT, [translit($1,.,[,])])dnl +define(AC_PREREQ_SPLIT, [translit($1, ., [, ])])dnl dnl -dnl Default the ternary version number to 0 (e.g., 1,7 -> 1,7,0). -define(AC_PREREQ_CANON, [$1,$2,ifelse([$3],,0,[$3])])dnl +dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0). +define(AC_PREREQ_CANON, [$1, $2, ifelse([$3], , 0, [$3])])dnl dnl dnl Complain and exit if the version number in $1 through $3 is less than dnl the version number in $4 through $6. dnl $7 is the printable version of the second version number. define(AC_PREREQ_COMPARE, [ifelse(builtin([eval], -[$3 + $2 * 100 + $1 * 10000 < $6 + $5 * 100 + $4 * 10000]),1, +[$3 + $2 * 100 + $1 * 10000 < $6 + $5 * 100 + $4 * 10000]), 1, [errprint(Autoconf version $7 or higher is required )m4exit(3)])])dnl dnl @@ -550,7 +550,7 @@ dnl AC_PREREQ(VERSION) define(AC_PREREQ, [AC_PROVIDE([$0])dnl AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), -AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),[$1])])dnl +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])dnl dnl dnl Run configure in subdirectories $1. dnl Not actually done until AC_OUTPUT_SUBDIRS. @@ -558,26 +558,26 @@ dnl AC_CONFIG_SUBDIRS(DIR ...) define(AC_CONFIG_SUBDIRS, [AC_PROVIDE([$0])dnl AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -define([AC_LIST_SUBDIRS],[$1])])dnl +define([AC_LIST_SUBDIRS], [$1])])dnl dnl dnl Guess the value for the `prefix' variable by looking for dnl the argument program along PATH and taking its parent. dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc, dnl set `prefix' to /usr/local/gnu. dnl AC_PREFIX_PROGRAM(PROGRAM) -define(AC_PREFIX_PROGRAM, [define([AC_LIST_PREFIX_PROGRAM],[$1])])dnl +define(AC_PREFIX_PROGRAM, [define([AC_LIST_PREFIX_PROGRAM], [$1])])dnl define(AC_PREFIX_INTERNAL, [if test "x$prefix" = xNONE; then -changequote(<<,>>)dnl +changequote(<<, >>)dnl define(<>, translit($1, [a-z], [A-Z]))dnl -changequote([,])dnl -AC_PROGRAM_PATH(AC_VAR_NAME, $1) -changequote(<<,>>)dnl +changequote([, ])dnl +AC_PATH_PROG(AC_VAR_NAME, $1) +changequote(<<, >>)dnl if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'` -changequote([,])dnl +changequote([, ])dnl dnl test -z "$prefix" && prefix=/ - AC_VERBOSE(setting installation directory prefix to ${prefix}) + AC_MSG_RESULT(setting installation directory prefix to ${prefix}) fi fi undefine(AC_VAR_NAME)dnl @@ -615,7 +615,7 @@ for ac_dir in $1; do fi done if test -z "$ac_aux_dir"; then - AC_ERROR([can not find install.sh in $1]) + AC_MSG_ERROR([can not find install.sh in $1]) fi ac_config_guess=${ac_aux_dir}/config.guess ac_config_sub=${ac_aux_dir}/config.sub @@ -648,12 +648,12 @@ host_alias=$host target_alias=$target case $host_alias---$target_alias---$nonopt in NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) AC_ERROR(can only configure for one host and one target at a time) ;; +*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;; esac # Make sure we can run config.sub. if ${ac_config_sub} sun4 >/dev/null 2>&1; then : -else AC_ERROR(can not run ${ac_config_sub}) +else AC_MSG_ERROR(can not run ${ac_config_sub}) fi AC_CANONICAL_HOST @@ -664,14 +664,14 @@ dnl dnl Subroutines of AC_CANONICAL_SYSTEM. dnl define(AC_CANONICAL_HOST, -[AC_CHECKING(host type) +[AC_MSG_CHECKING(host type) case "${host_alias}" in NONE) case $nonopt in NONE) if host_alias=`${ac_config_guess}`; then : - else AC_ERROR(can not guess host type; you must specify one) + else AC_MSG_ERROR(can not guess host type; you must specify one) fi ;; *) host_alias=$nonopt ;; esac ;; @@ -681,7 +681,7 @@ host=`${ac_config_sub} ${host_alias}` host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` -test -n "$host" && AC_VERBOSE(setting host to $host) +test -n "$host" && AC_MSG_RESULT(setting host to $host) AC_SUBST(host)dnl AC_SUBST(host_alias)dnl AC_SUBST(host_cpu)dnl @@ -690,7 +690,7 @@ AC_SUBST(host_os)dnl ])dnl dnl define(AC_CANONICAL_TARGET, -[AC_CHECKING(target type) +[AC_MSG_CHECKING(target type) case "${target_alias}" in NONE) @@ -704,7 +704,7 @@ target=`${ac_config_sub} ${target_alias}` target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` -test -n "$target" && AC_VERBOSE(setting target to $target) +test -n "$target" && AC_MSG_RESULT(setting target to $target) AC_SUBST(target)dnl AC_SUBST(target_alias)dnl AC_SUBST(target_cpu)dnl @@ -713,7 +713,7 @@ AC_SUBST(target_os)dnl ])dnl dnl define(AC_CANONICAL_BUILD, -[AC_CHECKING(build type) +[AC_MSG_CHECKING(build type) case "${build_alias}" in NONE) build= build_alias= ;; @@ -724,7 +724,7 @@ build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` ;; esac -test -n "$build" && AC_VERBOSE(setting build to $build) +test -n "$build" && AC_MSG_RESULT(setting build to $build) AC_SUBST(build)dnl AC_SUBST(build_alias)dnl AC_SUBST(build_cpu)dnl @@ -737,7 +737,7 @@ dnl link name in $1. dnl Not actually done until AC_OUTPUT_LINKS. dnl AC_LINK_FILES(LINK ..., FILE ...) define(AC_LINK_FILES, -[define([AC_LIST_LINKS],[$1])define([AC_LIST_FILES],[$2])])dnl +[define([AC_LIST_LINKS], [$1])define([AC_LIST_FILES], [$2])])dnl dnl dnl dnl ### Caching test results @@ -756,7 +756,7 @@ fi for ac_site_dir in $ac_site_dirs; do ac_site_file=$ac_site_dir/lib/config.site if test -r "$ac_site_file"; then - AC_VERBOSE(loading site initialization script $ac_site_file) + AC_MSG_RESULT(loading site initialization script $ac_site_file) . $ac_site_file fi done @@ -764,16 +764,16 @@ done dnl define(AC_CACHE_LOAD, [if test -r "$cache_file"; then - AC_VERBOSE(loading test results from cache file $cache_file) + AC_MSG_RESULT(loading test results from cache file $cache_file) . $cache_file else - AC_VERBOSE(creating new cache file $cache_file) + AC_MSG_RESULT(creating new cache file $cache_file) > $cache_file fi])dnl dnl define(AC_CACHE_SAVE, [if test -w $cache_file; then -AC_VERBOSE(saving test results in cache file $cache_file) +AC_MSG_RESULT(saving test results in cache file $cache_file) cat > $cache_file <<\CEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -788,11 +788,11 @@ cat > $cache_file <<\CEOF # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. CEOF -changequote(,)dnl +changequote(, )dnl dnl Allow a site initialization script to override cache values. # Ultrix sh set writes to stderr and can't be redirected directly. (set) 2>&1 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1-'\2'}/p" >> $cache_file -changequote([,])dnl +changequote([, ])dnl fi])dnl dnl dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) @@ -803,7 +803,7 @@ dnl shell variable, so we need the eval. dnl if test "${$1+set}" = set; then if eval "test \"`echo '${'$1'+set}'`\" = set"; then dnl This verbose message is just for testing the caching code. - AC_VERBOSE(using cached value for $1) + AC_MSG_RESULT(using cached value for $1) else $2 fi @@ -817,28 +817,28 @@ dnl Several simple subroutines to do various flavors of quoting. dnl dnl Quote $1 against shell "s. define(AC_QUOTE_DQUOTE, [dnl We use \1 instead of \& to avoid an m4 1.0.3 bug. -patsubst($1, changequote(,)\([$"`\\]\)changequote([,]), \\\1)])dnl +patsubst($1, changequote(, )\([$"`\\]\)changequote([, ]), \\\1)])dnl dnl dnl Quote $1 against shell 's. define(AC_QUOTE_SQUOTE, [patsubst($1, ', '\\'')])dnl dnl dnl Quote $1 against shell here documents (<&5 " defining" $1 to be ifelse(AC_VAL,, empty, "AC_QUOTE_SQUOTE(AC_VAL)")], +echo 1>&5 " defining" $1 to be ifelse(AC_VAL, , empty, "AC_QUOTE_SQUOTE(AC_VAL)")], [define([AC_VAL], 1)dnl echo 1>&5 " defining $1"]) dnl @@ -887,11 +887,11 @@ dnl the top level, because m4 doesn't really support nested functions; dnl it doesn't distinguish between the arguments to the outer dnl function, which should be expanded, and the arguments to the inner dnl function, which shouldn't yet. -define(AC_QUOTE_IDENTITY,$1)dnl -define(AC_DEFINE_UNQUOTED,[dnl -pushdef([AC_QUOTE_SQUOTE],defn([AC_QUOTE_IDENTITY]))dnl -pushdef([AC_DEFINE_SEDQUOTE],defn([AC_QUOTE_IDENTITY]))dnl -AC_DEFINE($1,$2)dnl +define(AC_QUOTE_IDENTITY, $1)dnl +define(AC_DEFINE_UNQUOTED, [dnl +pushdef([AC_QUOTE_SQUOTE], defn([AC_QUOTE_IDENTITY]))dnl +pushdef([AC_DEFINE_SEDQUOTE], defn([AC_QUOTE_IDENTITY]))dnl +AC_DEFINE($1, $2)dnl popdef([AC_DEFINE_SEDQUOTE])dnl popdef([AC_QUOTE_SQUOTE])dnl ])dnl @@ -912,10 +912,10 @@ dnl dnl AC_SUBST_FILE(VARIABLE, FILE) define(AC_SUBST_FILE, [if test -f $2; then - AC_VERBOSE(using $2 for $1) + AC_MSG_RESULT(using $2 for $1) AC_INSERT_FILE($1, $2) elif test -f ${srcdir}/$2; then - AC_VERBOSE(using ${srcdir}/$2 for $1) + AC_MSG_RESULT(using ${srcdir}/$2 for $1) AC_INSERT_FILE($1, ${srcdir}/$2) fi ])dnl @@ -934,20 +934,20 @@ dnl dnl ### Printing messages dnl dnl -dnl AC_CHECKING(FEATURE-DESCRIPTION) -define(AC_CHECKING, +dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION) +define(AC_MSG_CHECKING, [echo "checking $1" 1>&4])dnl dnl -dnl AC_VERBOSE(RESULT-DESCRIPTION) -define(AC_VERBOSE, +dnl AC_MSG_RESULT(RESULT-DESCRIPTION) +define(AC_MSG_RESULT, [echo " $1" 1>&5])dnl dnl -dnl AC_WARN(PROBLEM-DESCRIPTION) -define(AC_WARN, +dnl AC_MSG_WARN(PROBLEM-DESCRIPTION) +define(AC_MSG_WARN, [echo "configure: warning: $1" 1>&2])dnl dnl -dnl AC_ERROR(ERROR-DESCRIPTION) -define(AC_ERROR, +dnl AC_MSG_ERROR(ERROR-DESCRIPTION) +define(AC_MSG_ERROR, [echo "configure: $1" 1>&2; exit 1])dnl dnl dnl @@ -955,7 +955,7 @@ dnl ### Selecting which language to use for testing dnl dnl define(AC_LANG_C, -[define([AC_LANG],[C])dnl +[define([AC_LANG], [C])dnl AC_PROVIDE([$0])dnl ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -964,7 +964,7 @@ ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&6 ])dnl dnl define(AC_LANG_CPLUSPLUS, -[define([AC_LANG],[CPLUSPLUS])dnl +[define([AC_LANG], [CPLUSPLUS])dnl AC_PROVIDE([$0])dnl ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -977,7 +977,7 @@ define(AC_LANG_SAVE, [pushdef([AC_LANG_STACK], AC_LANG)])dnl dnl dnl Restore the current language from the stack. define(AC_LANG_RESTORE, -[ifelse(AC_LANG_STACK,C,[ifelse(AC_LANG,C,,[AC_LANG_C])],[ifelse(AC_LANG,CPLUSPLUS,,[AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])dnl +[ifelse(AC_LANG_STACK, C, [ifelse(AC_LANG, C, , [AC_LANG_C])], [ifelse(AC_LANG, CPLUSPLUS, , [AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])dnl dnl dnl dnl ### Enforcing ordering constraints @@ -990,12 +990,12 @@ define(AC_BEFORE, dnl dnl AC_REQUIRE(MACRO-NAME) define(AC_REQUIRE, -[ifdef([AC_PROVIDE_$1],,[indir([$1]) +[ifdef([AC_PROVIDE_$1], , [indir([$1]) ])])dnl dnl dnl AC_PROVIDE(MACRO-NAME) define(AC_PROVIDE, -[define([AC_PROVIDE_$1],)])dnl +[define([AC_PROVIDE_$1], )])dnl dnl dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION]) define(AC_OBSOLETE, @@ -1006,12 +1006,12 @@ dnl dnl ### Checking for files - fundamental (caching) dnl dnl -dnl AC_PROGRAM_CHECK(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND +dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND dnl [, VALUE-IF-NOT-FOUND]) -define(AC_PROGRAM_CHECK, +define(AC_CHECK_PROG, [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 -AC_CHECKING([for $ac_word]) +AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_prog_$1, [if test -n "[$]$1"; then ac_cv_prog_$1="[$]$1" # Let the user override the test. @@ -1026,20 +1026,20 @@ else done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PROGRAMS_CHECK will keep looking. -ifelse([$4],,, [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4" +dnl so AC_CHECK_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4" ])dnl fi])dnl $1="$ac_cv_prog_$1" -test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1) +test -n "[$]$1" && AC_MSG_RESULT(setting $1 to [$]$1) AC_SUBST($1)dnl ])dnl dnl -dnl AC_PROGRAM_PATH(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) -define(AC_PROGRAM_PATH, +dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) +define(AC_PATH_PROG, [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 -AC_CHECKING([for $ac_word]) +AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) @@ -1056,13 +1056,13 @@ AC_CACHE_VAL(ac_cv_path_$1, done IFS="$ac_save_ifs" dnl If no 3rd arg is given, leave the cache variable unset, -dnl so AC_PROGRAMS_PATH will keep looking. -ifelse([$3],,, [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3" +dnl so AC_PATH_PROGS will keep looking. +ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" -test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1) +test -n "[$]$1" && AC_MSG_RESULT(setting $1 to [$]$1) AC_SUBST($1)dnl ])dnl dnl @@ -1070,39 +1070,39 @@ dnl dnl ### Checking for files - derived (caching) dnl dnl -dnl AC_PROGRAMS_CHECK(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) -define(AC_PROGRAMS_CHECK, +dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) +define(AC_CHECK_PROGS, [for ac_prog in $2 do -AC_PROGRAM_CHECK($1, [$]ac_prog, [$]ac_prog, ) +AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, ) test -n "[$]$1" && break done -ifelse([$3],,, [test -n "[$]$1" || $1="$3" +ifelse([$3], , , [test -n "[$]$1" || $1="$3" ])])dnl dnl -dnl AC_PROGRAMS_PATH(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) -define(AC_PROGRAMS_PATH, +dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) +define(AC_PATH_PROGS, [for ac_prog in $2 do -AC_PROGRAM_PATH($1, [$]ac_prog) +AC_PATH_PROG($1, [$]ac_prog) test -n "[$]$1" && break done -ifelse([$3],,, [test -n "[$]$1" || $1="$3" +ifelse([$3], , , [test -n "[$]$1" || $1="$3" ])])dnl dnl -dnl AC_HAVE_LIBRARY(LIBRARY [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl AC_CHECK_LIB(LIBRARY [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND dnl [, OTHER-LIBRARIES]]]) -define(AC_HAVE_LIBRARY, [dnl -changequote(/,/)dnl +define(AC_CHECK_LIB, [dnl +changequote(/, /)dnl define(/AC_LIB_NAME/, dnl patsubst(patsubst($1, /lib\([^\.]*\)\.a/, /\1/), /-l/, //))dnl define(/AC_CV_NAME/, ac_cv_lib_//AC_LIB_NAME)dnl -changequote([,])dnl -AC_CHECKING([for -l[]AC_LIB_NAME]) +changequote([, ])dnl +AC_MSG_CHECKING([for -l[]AC_LIB_NAME]) AC_CACHE_VAL(AC_CV_NAME, [ac_save_LIBS="${LIBS}" LIBS="${LIBS} -l[]AC_LIB_NAME[] $4" -AC_TEST_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}" ])dnl if test "${AC_CV_NAME}" = yes; then @@ -1122,17 +1122,17 @@ dnl dnl ### Checking for C features - fundamental (no caching) dnl dnl -dnl AC_HEADER_EGREP(PATTERN, HEADER-FILE, ACTION-IF-FOUND [, +dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [, dnl ACTION-IF-NOT-FOUND]) -define(AC_HEADER_EGREP, +define(AC_EGREP_HEADER, [AC_PROVIDE([$0])dnl -AC_PROGRAM_EGREP([$1], [#include <$2>], [$3], [$4])])dnl +AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])dnl dnl -dnl Because this macro is used by AC_GCC_TRADITIONAL, which must come early, +dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must come early, dnl it is not included in AC_BEFORE checks. -dnl AC_PROGRAM_EGREP(PATTERN, PROGRAM, ACTION-IF-FOUND [, +dnl AC_EGREP_CPP(PATTERN, PROGRAM, ACTION-IF-FOUND [, dnl ACTION-IF-NOT-FOUND]) -define(AC_PROGRAM_EGREP, +define(AC_EGREP_CPP, [AC_REQUIRE_CPP()dnl AC_PROVIDE([$0])dnl cat > conftest.${ac_ext} < conftest.${ac_ext} < conftest.${ac_ext} <], 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 if eval "test \"`echo '$ac_cv_header_'$ac_var`\" = yes"; then ifelse([$2], , :, [$2]) @@ -1254,11 +1251,11 @@ ifelse([$3], , , [else fi ])dnl dnl -dnl AC_FUNC_CHECK(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) -define(AC_FUNC_CHECK, -[AC_CHECKING([for $1]) +dnl AC_CHECK_FUNC(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) +define(AC_CHECK_FUNC, +[AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_func_$1, -[AC_TEST_LINK( +[AC_TRY_LINK( [#include /* Arbitrary system header to define __stub macros. */], [ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named @@ -1278,26 +1275,26 @@ ifelse([$3], , , [else fi ])dnl dnl -dnl AC_HAVE_FUNCS(FUNCTION...) -define(AC_HAVE_FUNCS, +dnl AC_CHECK_FUNCS(FUNCTION...) +define(AC_CHECK_FUNCS, [for ac_func in $1 do -changequote(,)dnl +changequote(, )dnl ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` -changequote([,])dnl -AC_FUNC_CHECK(${ac_func}, AC_DEFINE(${ac_tr_func}))dnl +changequote([, ])dnl +AC_CHECK_FUNC(${ac_func}, AC_DEFINE(${ac_tr_func}))dnl done ])dnl dnl -dnl AC_HAVE_HEADERS(HEADER-FILE...) -define(AC_HAVE_HEADERS, +dnl AC_CHECK_HEADERS(HEADER-FILE...) +define(AC_CHECK_HEADERS, [AC_REQUIRE_CPP()dnl Make sure the cpp check happens outside the loop. for ac_hdr in $1 do -changequote(,)dnl +changequote(, )dnl ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` -changequote([,])dnl -AC_HEADER_CHECK(${ac_hdr}, AC_DEFINE(${ac_tr_hdr}))dnl +changequote([, ])dnl +AC_CHECK_HEADER(${ac_hdr}, AC_DEFINE(${ac_tr_hdr}))dnl done ])dnl dnl @@ -1305,25 +1302,25 @@ dnl AC_REPLACE_FUNCS(FUNCTION-NAME...) define(AC_REPLACE_FUNCS, [for ac_func in $1 do -AC_FUNC_CHECK(${ac_func}, , +AC_CHECK_FUNC(${ac_func}, , [LIBOBJS="$LIBOBJS ${ac_func}.o" -AC_VERBOSE(using ${ac_func}.o instead) +AC_MSG_RESULT(using ${ac_func}.o instead) ])dnl done AC_SUBST(LIBOBJS)dnl ])dnl dnl -dnl AC_SIZEOF_TYPE(TYPE) -define(AC_SIZEOF_TYPE, -[changequote(<<,>>)dnl +dnl AC_CHECK_SIZEOF(TYPE) +define(AC_CHECK_SIZEOF, +[changequote(<<, >>)dnl dnl The name to #define. define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl dnl The cache variable name. define(<>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl -changequote([,])dnl -AC_CHECKING(size of $1) +changequote([, ])dnl +AC_MSG_CHECKING(size of $1) AC_CACHE_VAL(AC_CV_NAME, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include main() { FILE *f=fopen("conftestval", "w"); @@ -1338,9 +1335,9 @@ undefine(AC_CV_NAME)dnl dnl dnl AC_CHECK_TYPE(TYPE, DEFAULT) define(AC_CHECK_TYPE, -[AC_CHECKING(for $1 in sys/types.h) +[AC_MSG_CHECKING(for $1 in sys/types.h) AC_CACHE_VAL(ac_cv_type_$1, -[AC_HEADER_EGREP($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 if test $ac_cv_type_$1 = no; then AC_DEFINE($1, $2) fi @@ -1350,7 +1347,7 @@ dnl dnl ### The big finish dnl dnl -dnl AC_OUTPUT([FILE...] [,EXTRA-CMDS]) +dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS]) define(AC_OUTPUT, [AC_CACHE_SAVE @@ -1361,7 +1358,7 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. -changequote(,)dnl +changequote(, )dnl if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi @@ -1374,7 +1371,7 @@ ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g' DEFS=`sed "$ac_escape_ampersand_and_backslash" $ac_file fi; done -ifdef([AC_LIST_HEADERS],[AC_OUTPUT_HEADER(AC_LIST_HEADERS)])dnl -ifdef([AC_LIST_LINKS],[AC_OUTPUT_LINKS(AC_LIST_LINKS,AC_LIST_FILES)])dnl +ifdef([AC_LIST_HEADERS], [AC_OUTPUT_HEADER(AC_LIST_HEADERS)])dnl +ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_LINKS, AC_LIST_FILES)])dnl $2 exit 0 EOF chmod +x ${CONFIG_STATUS} test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} ${CONFIG_STATUS} dnl config.status should never do recursion. -ifdef([AC_LIST_SUBDIRS],[AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl +ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl ])dnl dnl dnl Create the header files listed in $1. dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted dnl here document whose contents are going into config.status. define(AC_OUTPUT_HEADER, -[changequote(<<,>>)dnl +[changequote(<<, >>)dnl # These sed commands are put into ac_sed_defs when defining a macro. # They are broken into pieces to make the sed script easier to manage. @@ -1538,7 +1535,7 @@ ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='<<$>>!\1#\2define\3' ac_eC=' ' ac_eD='!g' -changequote([,])dnl +changequote([, ])dnl rm -f conftest.sed EOF # Turn off quoting long enough to insert the sed commands. @@ -1577,9 +1574,9 @@ cat >> ${CONFIG_STATUS} <<\EOF # on some systems where configure will not decide to define it in [#] $1. cat >> conftest.sed <<\CONFEOF -changequote(,)dnl +changequote(, )dnl s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -changequote([,])dnl +changequote([, ])dnl CONFEOF rm -f conftest.h # Break up the sed commands because old seds have small limits. @@ -1630,14 +1627,14 @@ while test -n "${ac_files}"; do echo "linking ${ac_link} to ${srcdir}/${ac_file}" if test ! -r ${srcdir}/${ac_file}; then - AC_ERROR(${srcdir}/${ac_file}: File not found) + AC_MSG_ERROR(${srcdir}/${ac_file}: File not found) fi rm -f ${ac_link} # Make a symlink if possible; otherwise try a hard link. if ln -s ${srcdir}/${ac_file} ${ac_link} 2>/dev/null || ln ${srcdir}/${ac_file} ${ac_link}; then : else - AC_ERROR(can not link ${ac_link} to ${srcdir}/${ac_file}) + AC_MSG_ERROR(can not link ${ac_link} to ${srcdir}/${ac_file}) fi done ])dnl @@ -1664,9 +1661,9 @@ define(AC_OUTPUT_SUBDIRS, ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -changequote(,)dnl +changequote(, )dnl *[" "]*) ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; -changequote([,])dnl +changequote([, ])dnl *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done @@ -1686,7 +1683,7 @@ changequote([,])dnl *) if test -d ./${ac_config_dir} || mkdir ./${ac_config_dir}; then :; else - AC_ERROR(can not create `pwd`/${ac_config_dir}) + AC_MSG_ERROR(can not create `pwd`/${ac_config_dir}) fi ;; esac @@ -1709,15 +1706,15 @@ changequote([,])dnl elif test -f ${ac_sub_srcdir}/configure.in; then ac_sub_configure=${ac_configure} else - AC_WARN(no configuration information is in ${ac_config_dir}) + AC_MSG_WARN(no configuration information is in ${ac_config_dir}) ac_sub_configure= fi # Make the cache file name correct relative to the subdirectory. -changequote(,)dnl +changequote(, )dnl # A "../" for each directory in /${ac_config_dir}. ac_dots=`echo /${ac_config_dir}|sed 's%/[^/]*%../%g'` -changequote([,])dnl +changequote([, ])dnl case "$cache_file" in /*) ac_sub_cache_file=$cache_file ;; *) # Relative path. @@ -1726,11 +1723,11 @@ changequote([,])dnl # The recursion is here. if test -n "${ac_sub_configure}"; then - AC_VERBOSE([running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file] --srcdir=${ac_sub_srcdir}) + 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}) if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir} then : else - AC_ERROR(${ac_sub_configure} failed for ${ac_config_dir}) + AC_MSG_ERROR(${ac_sub_configure} failed for ${ac_config_dir}) fi fi diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 5c7a4e22..9fe3c2c8 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -27,7 +27,7 @@ dnl define(AC_PROG_CC, [AC_BEFORE([$0], [AC_PROG_CPP])dnl AC_PROVIDE([$0])dnl -AC_PROGRAM_CHECK(CC, gcc, gcc, cc) +AC_CHECK_PROG(CC, gcc, gcc, cc) # Find out if we are using GNU C, under whatever name. AC_CACHE_VAL(ac_cv_prog_gcc, @@ -45,9 +45,9 @@ if test $ac_cv_prog_gcc = yes; then GCC=yes; else GCC= ; fi ])dnl dnl define(AC_PROG_CXX, -[AC_BEFORE([$0],[AC_PROG_CXXCPP])dnl +[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl AC_PROVIDE([$0])dnl -AC_PROGRAMS_CHECK(CXX, $CCC c++ g++ gcc CC cxx, gcc) +AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx, gcc) # Find out if we are using GNU C++, under whatever name. AC_CACHE_VAL(ac_cv_prog_gxx, @@ -64,35 +64,35 @@ fi])dnl if test $ac_cv_prog_gxx = yes; then GXX=yes; else GXX= ; fi ])dnl dnl -define(AC_GCC_TRADITIONAL, +define(AC_PROG_GCC_TRADITIONAL, [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_CPP])dnl if test $ac_cv_prog_gcc = yes; then - AC_CHECKING(whether -traditional is needed) + AC_MSG_CHECKING(whether -traditional is needed) AC_CACHE_VAL(ac_cv_prog_gcc_traditional, [ ac_pattern="Autoconf.*'x'" ac_prog='#include Autoconf TIOCGETP' - AC_PROGRAM_EGREP($ac_pattern, $ac_prog, + AC_EGREP_CPP($ac_pattern, $ac_prog, ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no) if test $ac_cv_prog_gcc_traditional = no; then ac_prog='#include Autoconf TCGETA' - AC_PROGRAM_EGREP($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 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" - AC_VERBOSE(setting CC to $CC) + AC_MSG_RESULT(setting CC to $CC) fi fi ])dnl dnl -define(AC_MINUS_C_MINUS_O, +define(AC_PROG_CC_C_O, [if test "x$CC" != xcc; then - AC_CHECKING(whether $CC and cc understand -c and -o together) + AC_MSG_CHECKING(whether $CC and cc understand -c and -o together) else - AC_CHECKING(whether cc understands -c and -o together) + AC_MSG_CHECKING(whether cc understands -c and -o together) fi set dummy $CC; ac_cc=[$]2 AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, @@ -124,18 +124,18 @@ fi ])dnl dnl dnl Define SET_MAKE to set ${MAKE} if make doesn't. -define(AC_SET_MAKE, -[AC_CHECKING(whether ${MAKE-make} sets \$MAKE) +define(AC_PROG_MAKE_SET, +[AC_MSG_CHECKING(whether ${MAKE-make} sets \$MAKE) set dummy ${MAKE-make}; ac_make=[$]2 AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, [cat > conftestmake <<'EOF' all: @echo 'ac_maketemp="${MAKE}"' EOF -changequote(,)dnl +changequote(, )dnl # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` -changequote([,])dnl +changequote([, ])dnl if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else @@ -146,20 +146,20 @@ if test $ac_cv_prog_make_${ac_make}_set = yes; then SET_MAKE= else SET_MAKE="MAKE=${MAKE-make}" - AC_VERBOSE(setting MAKE to ${MAKE-make} in Makefiles) + AC_MSG_RESULT(setting MAKE to ${MAKE-make} in Makefiles) fi AC_SUBST([SET_MAKE])dnl ])dnl dnl -define(AC_PROG_RANLIB, [AC_PROGRAM_CHECK(RANLIB, ranlib, ranlib, :)])dnl +define(AC_PROG_RANLIB, [AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)])dnl dnl -define(AC_PROG_AWK, [AC_PROGRAMS_CHECK(AWK, mawk gawk nawk awk,)])dnl +define(AC_PROG_AWK, [AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])dnl dnl -define(AC_PROG_YACC,[AC_PROGRAMS_CHECK(YACC, 'bison -y' byacc, yacc)])dnl +define(AC_PROG_YACC, [AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)])dnl dnl define(AC_PROG_CPP, [AC_PROVIDE([$0])dnl -AC_CHECKING(how to run the C preprocessor) +AC_MSG_CHECKING(how to run the C preprocessor) if test -z "$CPP"; then AC_CACHE_VAL(ac_cv_prog_CPP, [ # This must be in double quotes, not single quotes, because CPP may get @@ -167,57 +167,57 @@ AC_CACHE_VAL(ac_cv_prog_CPP, CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. - AC_TEST_CPP([#include + AC_TRY_CPP([#include Syntax Error], , CPP="${CC-cc} -E -traditional-cpp" - AC_TEST_CPP([#include -Syntax Error], ,CPP=/lib/cpp)) + AC_TRY_CPP([#include +Syntax Error], , CPP=/lib/cpp)) ac_cv_prog_CPP="$CPP"])dnl fi CPP="$ac_cv_prog_CPP" -AC_VERBOSE(setting CPP to $CPP) +AC_MSG_RESULT(setting CPP to $CPP) AC_SUBST(CPP)dnl ])dnl dnl define(AC_PROG_CXXCPP, [AC_PROVIDE([$0])dnl -AC_CHECKING(how to run the C++ preprocessor) +AC_MSG_CHECKING(how to run the C++ preprocessor) if test -z "$CXXCPP"; then AC_CACHE_VAL(ac_cv_prog_CXXCPP, [AC_LANG_SAVE[]dnl AC_LANG_CPLUSPLUS[]dnl CXXCPP="${CXX-c++} -E" - AC_TEST_CPP([#include ], , CXXCPP=/lib/cpp) + AC_TRY_CPP([#include ], , CXXCPP=/lib/cpp) ac_cv_prog_CXXCPP="$CXXCPP" AC_LANG_RESTORE[]dnl fi])dnl CXXCPP="$ac_cv_prog_CXXCPP" -AC_VERBOSE(setting CXXCPP to $CXXCPP) +AC_MSG_RESULT(setting CXXCPP to $CXXCPP) AC_SUBST(CXXCPP)dnl ])dnl dnl dnl Require finding the C or C++ preprocessor, whichever is the dnl current language. define(AC_REQUIRE_CPP, -[ifelse(AC_LANG,C,[AC_REQUIRE([AC_PROG_CPP])],[AC_REQUIRE([AC_PROG_CXXCPP])])])dnl +[ifelse(AC_LANG, C, [AC_REQUIRE([AC_PROG_CPP])], [AC_REQUIRE([AC_PROG_CXXCPP])])])dnl dnl define(AC_PROG_LEX, [AC_PROVIDE([$0])dnl -AC_PROGRAM_CHECK(LEX, flex, flex, lex) +AC_CHECK_PROG(LEX, flex, flex, lex) if test -z "$LEXLIB" then case "$LEX" in - flex*) AC_HAVE_LIBRARY(fl, LEXLIB="-lfl") ;; + flex*) AC_CHECK_LIB(fl, LEXLIB="-lfl") ;; *) LEXLIB="-ll" ;; esac fi -AC_VERBOSE(setting LEXLIB to $LEXLIB) +AC_MSG_RESULT(setting LEXLIB to $LEXLIB) AC_SUBST(LEXLIB)])dnl dnl -define(AC_YYTEXT_POINTER, +define(AC_DECL_YYTEXT, [AC_REQUIRE_CPP()dnl AC_REQUIRE([AC_PROG_LEX])dnl -AC_CHECKING(for yytext declaration) +AC_MSG_CHECKING(for yytext declaration) AC_CACHE_VAL(ac_cv_prog_lex_yytext_pointer, [# POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since @@ -233,12 +233,12 @@ if test -f lex.yy.c; then elif test -f lexyy.c; then LEX_OUTPUT_ROOT=lexyy else - AC_ERROR(cannot find output from $LEX, giving up) + AC_MSG_ERROR(cannot find output from $LEX, giving up) fi echo 'extern char *yytext; main () { exit (0); }' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" -AC_TEST_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" rm -f "${LEX_OUTPUT_ROOT}.c"])dnl if test $ac_cv_prog_lex_yytext_pointer = yes; then @@ -265,7 +265,7 @@ define(AC_PROG_INSTALL, # # Avoid using ./install, which might have been erroneously created # by make from ./install.sh. -AC_CHECKING(for a BSD compatible install) +AC_MSG_CHECKING(for a BSD compatible install) if test -z "${INSTALL}"; then AC_CACHE_VAL(ac_cv_path_install, [ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" @@ -296,21 +296,21 @@ AC_CACHE_VAL(ac_cv_path_install, INSTALL="$ac_cv_path_install" fi AC_SUBST(INSTALL)dnl -AC_VERBOSE(setting INSTALL to $INSTALL) +AC_MSG_RESULT(setting INSTALL to $INSTALL) # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' AC_SUBST(INSTALL_PROGRAM)dnl -AC_VERBOSE(setting INSTALL_PROGRAM to $INSTALL_PROGRAM) +AC_MSG_RESULT(setting INSTALL_PROGRAM to $INSTALL_PROGRAM) test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' AC_SUBST(INSTALL_DATA)dnl -AC_VERBOSE(setting INSTALL_DATA to $INSTALL_DATA) +AC_MSG_RESULT(setting INSTALL_DATA to $INSTALL_DATA) ])dnl dnl -define(AC_LN_S, -[AC_CHECKING(whether ln -s works) +define(AC_PROG_LN_S, +[AC_MSG_CHECKING(whether ln -s works) AC_CACHE_VAL(ac_cv_prog_LN_S, [rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -322,15 +322,15 @@ else fi])dnl LN_S="$ac_cv_prog_LN_S" if test "$ac_cv_prog_LN_S" = "ln -s"; then - AC_VERBOSE(ln -s is supported) + AC_MSG_RESULT(ln -s is supported) else - AC_VERBOSE(ln -s is not supported) + AC_MSG_RESULT(ln -s is not supported) fi AC_SUBST(LN_S)dnl ])dnl dnl -define(AC_RSH, -[AC_CHECKING(for remote shell) +define(AC_PROG_RSH, +[AC_MSG_CHECKING(for remote shell) AC_CACHE_VAL(ac_cv_path_RSH, [ac_cv_path_RSH=true for ac_file in \ @@ -343,11 +343,11 @@ do done])dnl RSH="$ac_cv_path_RSH" if test $RSH != true; then - AC_VERBOSE(found remote shell $RSH) + AC_MSG_RESULT(found remote shell $RSH) RTAPELIB=rtapelib.o else - AC_VERBOSE(found no remote shell) - AC_HEADER_CHECK(netdb.h, RTAPELIB=rtapelib.o AC_DEFINE(HAVE_NETDB_H), + AC_MSG_RESULT(found no remote shell) + AC_CHECK_HEADER(netdb.h, RTAPELIB=rtapelib.o AC_DEFINE(HAVE_NETDB_H), RTAPELIB= AC_DEFINE(NO_REMOTE)) fi AC_SUBST(RSH)dnl @@ -358,31 +358,31 @@ dnl dnl ### Checks for header files dnl dnl -define(AC_STDC_HEADERS, +define(AC_HEADER_STDC, [AC_REQUIRE_CPP()dnl -AC_CHECKING(for ANSI C header files) +AC_MSG_CHECKING(for ANSI C header files) AC_CACHE_VAL(ac_cv_header_stdc, -[AC_TEST_CPP([#include +[AC_TRY_CPP([#include #include #include #include ], ac_cv_header_stdc=yes, ac_cv_header_stdc=no) if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -AC_HEADER_EGREP(memchr, string.h, , ac_cv_header_stdc=no) +AC_EGREP_HEADER(memchr, string.h, , ac_cv_header_stdc=no) fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -AC_HEADER_EGREP(free, stdlib.h, , ac_cv_header_stdc=no) +AC_EGREP_HEADER(free, stdlib.h, , ac_cv_header_stdc=no) fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -AC_TEST_RUN([#include +AC_TRY_RUN([#include #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e,f) (((e) && !(f)) || (!(e) && (f))) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -393,35 +393,35 @@ if test $ac_cv_header_stdc = yes; then fi])dnl dnl define(AC_UNISTD_H, -[AC_OBSOLETE([$0], [; instead use AC_HAVE_HEADERS(unistd.h)])dnl -AC_HEADER_CHECK(unistd.h, AC_DEFINE(HAVE_UNISTD_H))])dnl +[AC_OBSOLETE([$0], [; instead use AC_CHECK_HEADERS(unistd.h)])dnl +AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))])dnl dnl define(AC_USG, [AC_OBSOLETE([$0], - [; instead use AC_HAVE_HEADERS(string.h) and HAVE_STRING_H])dnl -AC_CHECKING([for BSD string and memory functions]) -AC_TEST_LINK([#include ], [rindex(0, 0); bzero(0, 0);], , + [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])dnl +AC_MSG_CHECKING([for BSD string and memory functions]) +AC_TRY_LINK([#include ], [rindex(0, 0); bzero(0, 0);], , AC_DEFINE(USG))])dnl dnl dnl dnl If memchr and the like aren't declared in , include . dnl To avoid problems, don't check for gcc2 built-ins. define(AC_MEMORY_H, -[AC_OBSOLETE([$0], [; instead use AC_HAVE_HEADERS(memory.h) and HAVE_MEMORY_H])AC_CHECKING(whether string.h declares mem functions) -AC_HEADER_EGREP(memchr, string.h, , - [AC_HEADER_CHECK(memory.h, AC_DEFINE(NEED_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_EGREP_HEADER(memchr, string.h, , + [AC_CHECK_HEADER(memory.h, AC_DEFINE(NEED_MEMORY_H))])] )dnl dnl -define(AC_MAJOR_HEADER, -[AC_CHECKING([for major, minor and makedev header]) +define(AC_HEADER_MAJOR, +[AC_MSG_CHECKING([for major, minor and makedev header]) AC_CACHE_VAL(ac_cv_header_major, -[AC_TEST_LINK([#include ], +[AC_TRY_LINK([#include ], [return makedev(0, 0);], ac_cv_header_major=sys/types.h, ac_cv_header_major=no) if test $ac_cv_header_major = no; then -AC_HEADER_CHECK(sys/mkdev.h, ac_cv_header_major=sys/mkdev.h) +AC_CHECK_HEADER(sys/mkdev.h, ac_cv_header_major=sys/mkdev.h) fi if test $ac_cv_header_major = no; then -AC_HEADER_CHECK(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 case "$ac_cv_header_major" in sys/mkdev.h) AC_DEFINE(MAJOR_IN_MKDEV) ;; @@ -429,26 +429,31 @@ sys/sysmacros.h) AC_DEFINE(MAJOR_IN_SYSMACROS) ;; esac ])dnl dnl -define(AC_DIR_HEADER, +define(AC_HEADER_DIRENT, [AC_PROVIDE([$0])dnl -AC_CHECKING(for directory library header) +AC_MSG_CHECKING(for directory library header) AC_CACHE_VAL(ac_cv_header_dir, [ac_cv_header_dir=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - AC_CHECKING([for $ac_hdr]) -AC_TEST_LINK([#include + AC_MSG_CHECKING([for $ac_hdr]) +AC_TRY_LINK([#include #include <$ac_hdr>], [DIR *dirp = 0;], ac_cv_header_dir=$ac_hdr; break) done])dnl + case "$ac_cv_header_dir" in -dirent.h) AC_DEFINE(DIRENT) ;; -sys/ndir.h) AC_DEFINE(SYSNDIR) ;; -sys/dir.h) AC_DEFINE(SYSDIR) ;; -ndir.h) AC_DEFINE(NDIR) ;; +dirent.h) AC_DEFINE(DIRENT) +AC_DEFINE(HAVE_DIRENT_H) ;; +sys/ndir.h) AC_DEFINE(SYSNDIR) +AC_DEFINE(HAVE_SYS_NDIR_H) ;; +sys/dir.h) AC_DEFINE(SYSDIR) +AC_DEFINE(HAVE_SYS_DIR_H) ;; +ndir.h) AC_DEFINE(NDIR) +AC_DEFINE(HAVE_NDIR_H) ;; esac -AC_CHECKING(for closedir return value) +AC_MSG_CHECKING(for closedir return value) AC_CACHE_VAL(ac_cv_func_closedir_void, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include #include <$ac_cv_header_dir> int closedir(); main() { exit(closedir(opendir(".")) != 0); }], ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])dnl @@ -457,10 +462,10 @@ if test $ac_cv_func_closedir_void = yes; then fi ])dnl dnl -define(AC_STAT_MACROS_BROKEN, -[AC_CHECKING(for broken stat file mode macros) +define(AC_HEADER_STAT, +[AC_MSG_CHECKING(for broken stat file mode macros) AC_CACHE_VAL(ac_cv_header_stat_broken, -[AC_PROGRAM_EGREP([You lose], [#include +[AC_EGREP_CPP([You lose], [#include #include #ifdef S_ISBLK #if S_ISBLK (S_IFDIR) @@ -488,10 +493,10 @@ if test $ac_cv_header_stat_broken = yes; then fi ])dnl dnl -define(AC_SYS_SIGLIST_DECLARED, -[AC_CHECKING([for sys_siglist declaration in signal.h or unistd.h]) +define(AC_DECL_SYS_SIGLIST, +[AC_MSG_CHECKING([for sys_siglist declaration in signal.h or unistd.h]) AC_CACHE_VAL(ac_cv_decl_sys_siglist, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include /* NetBSD declares sys_siglist in unistd.h. */ #ifdef HAVE_UNISTD_H @@ -507,17 +512,17 @@ dnl dnl ### Checks for typedefs dnl dnl -define(AC_GETGROUPS_T, -[AC_REQUIRE([AC_UID_T])dnl -AC_CHECKING(for type of array argument to getgroups) +define(AC_TYPE_GETGROUPS, +[AC_REQUIRE([AC_TYPE_UID_T])dnl +AC_MSG_CHECKING(for type of array argument to getgroups) AC_CACHE_VAL(ac_cv_type_getgroups, -[changequote(,)dnl +[changequote(, )dnl dnl Do not put single quotes in the C program text! ac_prog='/* Thanks to Mike Rendell for this test. */ #include #define NGID 256 #undef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) +#define MAX(x, y) ((x) > (y) ? (x) : (y)) main() { gid_t gidset[NGID]; @@ -533,17 +538,17 @@ main() happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); }' -changequote([,])dnl -AC_TEST_RUN([$ac_prog], +changequote([, ])dnl +AC_TRY_RUN([$ac_prog], ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int)])dnl AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups) ])dnl dnl -define(AC_UID_T, +define(AC_TYPE_UID_T, [AC_PROVIDE([$0])dnl -AC_CHECKING(for uid_t in sys/types.h) +AC_MSG_CHECKING(for uid_t in sys/types.h) AC_CACHE_VAL(ac_cv_type_uid_t, -[AC_HEADER_EGREP(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 if test $ac_cv_type_uid_t = no; then AC_DEFINE(uid_t, int) @@ -551,22 +556,22 @@ if test $ac_cv_type_uid_t = no; then fi ])dnl dnl -define(AC_SIZE_T, [AC_CHECK_TYPE(size_t, unsigned)])dnl +define(AC_TYPE_SIZE_T, [AC_CHECK_TYPE(size_t, unsigned)])dnl dnl -define(AC_PID_T, [AC_CHECK_TYPE(pid_t, int)])dnl +define(AC_TYPE_PID_T, [AC_CHECK_TYPE(pid_t, int)])dnl dnl -define(AC_OFF_T, +define(AC_TYPE_OFF_T, [AC_PROVIDE([$0])dnl AC_CHECK_TYPE(off_t, long)])dnl dnl -define(AC_MODE_T, [AC_CHECK_TYPE(mode_t, int)])dnl +define(AC_TYPE_MODE_T, [AC_CHECK_TYPE(mode_t, int)])dnl dnl dnl Note that identifiers starting with SIG are reserved by ANSI C. -define(AC_RETSIGTYPE, +define(AC_TYPE_SIGNAL, [AC_PROVIDE([$0])dnl -AC_CHECKING([return type of signal handlers]) +AC_MSG_CHECKING([return type of signal handlers]) AC_CACHE_VAL(ac_cv_type_signal, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include #ifdef signal #undef signal @@ -580,10 +585,10 @@ dnl dnl ### Checks for functions dnl dnl -define(AC_MMAP, -[AC_CHECKING(for working mmap) +define(AC_FUNC_MMAP, +[AC_MSG_CHECKING(for working mmap) AC_CACHE_VAL(ac_cv_func_mmap, -[AC_TEST_RUN([/* Thanks to Mike Haertel and Jim Avera for this test. */ +[AC_TRY_RUN([/* Thanks to Mike Haertel and Jim Avera for this test. */ #include #include #include @@ -655,20 +660,20 @@ if test $ac_cv_func_mmap = yes; then fi ])dnl dnl -define(AC_VPRINTF, -[AC_FUNC_CHECK(vprintf, AC_DEFINE(HAVE_VPRINTF)) +define(AC_FUNC_VPRINTF, +[AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF)) if test "$ac_cv_func_vprintf" != yes; then -AC_FUNC_CHECK(_doprnt, AC_DEFINE(HAVE_DOPRNT)) +AC_CHECK_FUNC(_doprnt, AC_DEFINE(HAVE_DOPRNT)) fi ])dnl dnl -define(AC_VFORK, -[AC_REQUIRE([AC_PID_T])dnl -AC_HEADER_CHECK(vfork.h, AC_DEFINE(HAVE_VFORK_H)) -AC_CHECKING(for working vfork) +define(AC_FUNC_VFORK, +[AC_REQUIRE([AC_TYPE_PID_T])dnl +AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H)) +AC_MSG_CHECKING(for working vfork) AC_CACHE_VAL(ac_cv_func_vfork, -[AC_REQUIRE([AC_RETSIGTYPE]) -AC_TEST_RUN([/* Thanks to Paul Eggert for this test. */ +[AC_REQUIRE([AC_TYPE_SIGNAL]) +AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */ #include #include #include @@ -773,10 +778,10 @@ if test $ac_cv_func_vfork = no; then fi ])dnl dnl -define(AC_WAIT3, -[AC_CHECKING(for wait3 that fills in rusage) +define(AC_FUNC_WAIT3, +[AC_MSG_CHECKING(for wait3 that fills in rusage) AC_CACHE_VAL(ac_cv_func_wait3, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include #include #include #include @@ -808,20 +813,20 @@ if test $ac_cv_func_wait3 = yes; then fi ])dnl dnl -define(AC_ALLOCA, +define(AC_FUNC_ALLOCA, [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -AC_CHECKING([for working alloca.h]) +AC_MSG_CHECKING([for working alloca.h]) AC_CACHE_VAL(ac_cv_header_alloca_h, -[AC_TEST_LINK([#include ], [char *p = alloca(2 * sizeof(int));], +[AC_TRY_LINK([#include ], [char *p = alloca(2 * sizeof(int));], ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])dnl if test $ac_cv_header_alloca_h = yes; then AC_DEFINE(HAVE_ALLOCA_H) fi -AC_CHECKING([for alloca]) +AC_MSG_CHECKING([for alloca]) AC_CACHE_VAL(ac_cv_func_alloca, -[AC_TEST_LINK([#ifdef __GNUC__ +[AC_TRY_LINK([#ifdef __GNUC__ #define alloca __builtin_alloca #else #if HAVE_ALLOCA_H @@ -850,21 +855,21 @@ if test $ac_cv_func_alloca = no; then ALLOCA=alloca.o AC_DEFINE(C_ALLOCA) -AC_CHECKING(whether Cray hooks are needed for C alloca) -AC_PROGRAM_EGREP(webecray, +AC_MSG_CHECKING(whether Cray hooks are needed for C alloca) +AC_EGREP_CPP(webecray, [#if defined(CRAY) && ! defined(CRAY2) webecray #else wenotbecray #endif ], -AC_FUNC_CHECK([_getb67],AC_DEFINE(CRAY_STACKSEG_END, _getb67), -AC_FUNC_CHECK([GETB67],AC_DEFINE(CRAY_STACKSEG_END, GETB67), -AC_FUNC_CHECK([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_CHECKING(stack direction for C alloca) +AC_MSG_CHECKING(stack direction for C alloca) AC_CACHE_VAL(ac_cv_c_stack_direction, -[AC_TEST_RUN([find_stack_direction () +[AC_TRY_RUN([find_stack_direction () { static char *addr = 0; auto char dummy; @@ -886,22 +891,22 @@ fi AC_SUBST(ALLOCA)dnl ])dnl dnl -define(AC_GETLOADAVG, +define(AC_FUNC_GETLOADAVG, [# Some definitions of getloadavg require that the program be installed setgid. NEED_SETGID=false AC_SUBST(NEED_SETGID)dnl ac_have_func=no # Check for the 4.4BSD definition of getloadavg. -AC_HAVE_LIBRARY(util, [LIBS="$LIBS -lutil" ac_have_func=yes +AC_CHECK_LIB(util, [LIBS="$LIBS -lutil" ac_have_func=yes # Some systems with -lutil have (and need) -lkvm as well, some do not. -AC_HAVE_LIBRARY(kvm, LIBS="$LIBS -lkvm")]) +AC_CHECK_LIB(kvm, LIBS="$LIBS -lkvm")]) if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX. # Since it is not a standard part of AIX, it might be installed locally. ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" -AC_HAVE_LIBRARY(getloadavg, LIBS="$LIBS -lgetloadavg", LIBS="$ac_save_LIBS") +AC_CHECK_LIB(getloadavg, LIBS="$LIBS -lgetloadavg", LIBS="$ac_save_LIBS") fi # Make sure it is really in the library, if we think we found it. @@ -911,35 +916,35 @@ if test $ac_cv_func_getloadavg = yes; then AC_DEFINE(HAVE_GETLOADAVG) else ac_have_func=no -AC_HEADER_CHECK(sys/dg_sys_info.h, +AC_CHECK_HEADER(sys/dg_sys_info.h, [ac_have_func=yes AC_DEFINE(DGUX) # Some versions of DGUX need -ldgc for dg_sys_info. -AC_HAVE_LIBRARY(dgc)]) +AC_CHECK_LIB(dgc)]) if test $ac_have_func = no; then # We cannot check for , because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for because # Irix 4.0.5F has the header but not the library. -AC_HAVE_LIBRARY(elf, +AC_CHECK_LIB(elf, [LIBS="$LIBS -lelf" ac_have_func=yes AC_DEFINE(SVR4) - AC_HAVE_LIBRARY(kvm, LIBS="$LIBS -lkvm")]) + AC_CHECK_LIB(kvm, LIBS="$LIBS -lkvm")]) fi if test $ac_have_func = no; then -AC_HEADER_CHECK(inq_stats/cpustats.h, +AC_CHECK_HEADER(inq_stats/cpustats.h, [ac_have_func=yes AC_DEFINE(UMAX4_3) AC_DEFINE(UMAX)]) fi if test $ac_have_func = no; then -AC_HEADER_CHECK(sys/cpustats.h, +AC_CHECK_HEADER(sys/cpustats.h, [ac_have_func=yes AC_DEFINE(UMAX)]) fi if test $ac_have_func = no; then -AC_HAVE_HEADERS(mach/mach.h) +AC_CHECK_HEADERS(mach/mach.h) fi -AC_HEADER_CHECK(nlist.h, +AC_CHECK_HEADER(nlist.h, [AC_DEFINE(NLIST_STRUCT) -AC_CHECKING([for n_un in struct nlist]) +AC_MSG_CHECKING([for n_un in struct nlist]) AC_CACHE_VAL(ac_cv_struct_nlist_n_un, -[AC_TEST_LINK([#include ], +[AC_TRY_LINK([#include ], [struct nlist n; n.n_un.n_name = 0;], ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl if test $ac_cv_struct_nlist_n_un = yes; then @@ -947,9 +952,9 @@ if test $ac_cv_struct_nlist_n_un = yes; then fi ])dnl -AC_CHECKING(whether getloadavg requires setgid) +AC_MSG_CHECKING(whether getloadavg requires setgid) AC_CACHE_VAL(ac_cv_func_getloadavg_setgid, -[AC_PROGRAM_EGREP([Yowza Am I SETGID yet], +[AC_EGREP_CPP([Yowza Am I SETGID yet], [#include "${srcdir}/getloadavg.c" #ifdef LDAV_PRIVILEGED Yowza Am I SETGID yet @@ -962,9 +967,9 @@ fi fi # Do not have getloadavg in system libraries. if test "$NEED_SETGID" = true; then - AC_CHECKING(group of /dev/kmem) + AC_MSG_CHECKING(group of /dev/kmem) AC_CACHE_VAL(ac_cv_group_kmem, -[changequote(,)dnl +[changequote(, )dnl # On Solaris, /dev/kmem is a symlink. Get info on the real file. ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` # If we got an error (system does not support symlinks), try without -L. @@ -973,20 +978,20 @@ AC_CACHE_VAL(ac_cv_group_kmem, | sed -ne 's/[ ][ ]*/ /g; s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; / /s/.* //;p;'` -changequote([,])dnl +changequote([, ])dnl ])dnl KMEM_GROUP=$ac_cv_group_kmem - AC_VERBOSE(/dev/kmem is owned by $KMEM_GROUP) + AC_MSG_RESULT(/dev/kmem is owned by $KMEM_GROUP) fi AC_SUBST(KMEM_GROUP)dnl ])dnl dnl -define(AC_UTIME_NULL, -[AC_CHECKING(utime with null argument) +define(AC_FUNC_UTIME_NULL, +[AC_MSG_CHECKING(utime with null argument) AC_CACHE_VAL(ac_cv_func_utime_null, [rm -f conftestdata; > conftestdata # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. -AC_TEST_RUN([#include +AC_TRY_RUN([#include #include main() { struct stat s, t; @@ -1000,10 +1005,10 @@ if test $ac_cv_func_utime_null = yes; then fi ])dnl dnl -define(AC_STRCOLL, -[AC_CHECKING(for strcoll) +define(AC_FUNC_STRCOLL, +[AC_MSG_CHECKING(for strcoll) AC_CACHE_VAL(ac_cv_func_strcoll, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include main () { exit (strcoll ("abc", "def") >= 0 || @@ -1015,10 +1020,10 @@ if test $ac_cv_func_strcoll = yes; then fi ])dnl dnl -define(AC_SETVBUF_REVERSED, -[AC_CHECKING(whether setvbuf arguments are reversed) +define(AC_FUNC_SETVBUF_REVERSED, +[AC_MSG_CHECKING(whether setvbuf arguments are reversed) AC_CACHE_VAL(ac_cv_func_setvbuf_reversed, -[AC_TEST_RUN([#include +[AC_TRY_RUN([#include /* If setvbuf has the reversed format, exit 0. */ main () { /* This call has the arguments reversed. @@ -1041,9 +1046,9 @@ dnl dnl define(AC_STRUCT_TM, [AC_PROVIDE([$0])dnl -AC_CHECKING([for struct tm in sys/time.h instead of time.h]) +AC_MSG_CHECKING([for struct tm in sys/time.h instead of time.h]) AC_CACHE_VAL(ac_cv_struct_tm, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include ], [struct tm *tp; tp->tm_sec;], ac_cv_struct_tm=time.h, ac_cv_struct_tm=sys/time.h)])dnl @@ -1052,10 +1057,10 @@ if test $ac_cv_struct_tm = sys/time.h; then fi ])dnl dnl -define(AC_TIME_WITH_SYS_TIME, -[AC_CHECKING([whether time.h and sys/time.h may both be included]) +define(AC_HEADER_TIME, +[AC_MSG_CHECKING([whether time.h and sys/time.h may both be included]) AC_CACHE_VAL(ac_cv_header_time, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include #include ], [struct tm *tp;], ac_cv_header_time=yes, ac_cv_header_time=no)])dnl @@ -1064,23 +1069,23 @@ if test $ac_cv_header_time = yes; then fi ])dnl dnl -define(AC_TIMEZONE, +define(AC_STRUCT_TIMEZONE, [AC_REQUIRE([AC_STRUCT_TM])dnl -AC_CHECKING([for tm_zone in struct tm]) +AC_MSG_CHECKING([for tm_zone in struct tm]) AC_CACHE_VAL(ac_cv_struct_tm_zone, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;], ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])dnl if test "$ac_cv_struct_tm_zone" = yes; then AC_DEFINE(HAVE_TM_ZONE) else - AC_CHECKING([for tzname]) + AC_MSG_CHECKING([for tzname]) AC_CACHE_VAL(ac_cv_var_tzname, -[AC_TEST_LINK(changequote(<<,>>)dnl +[AC_TRY_LINK(changequote(<<, >>)dnl <<#include #ifndef tzname /* For SGI. */ 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 if test $ac_cv_var_tzname = yes; then AC_DEFINE(HAVE_TZNAME) @@ -1088,10 +1093,10 @@ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ fi ])dnl dnl -define(AC_ST_BLOCKS, -[AC_CHECKING([for st_blocks in struct stat]) +define(AC_STRUCT_ST_BLOCKS, +[AC_MSG_CHECKING([for st_blocks in struct stat]) AC_CACHE_VAL(ac_cv_struct_st_blocks, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include ], [struct stat s; s.st_blocks;], ac_cv_struct_st_blocks=yes, ac_cv_struct_st_blocks=no)])dnl if test $ac_cv_struct_st_blocks = yes; then @@ -1102,10 +1107,10 @@ fi AC_SUBST(LIBOBJS)dnl ])dnl dnl -define(AC_ST_BLKSIZE, -[AC_CHECKING([for st_blksize in struct stat]) +define(AC_STRUCT_ST_BLKSIZE, +[AC_MSG_CHECKING([for st_blksize in struct stat]) AC_CACHE_VAL(ac_cv_struct_st_blksize, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include ], [struct stat s; s.st_blksize;], ac_cv_struct_st_blksize=yes, ac_cv_struct_st_blksize=no)])dnl if test $ac_cv_struct_st_blksize = yes; then @@ -1113,10 +1118,10 @@ if test $ac_cv_struct_st_blksize = yes; then fi ])dnl dnl -define(AC_ST_RDEV, -[AC_CHECKING([for st_rdev in struct stat]) +define(AC_STRUCT_ST_RDEV, +[AC_MSG_CHECKING([for st_rdev in struct stat]) AC_CACHE_VAL(ac_cv_struct_st_rdev, -[AC_TEST_LINK([#include +[AC_TRY_LINK([#include #include ], [struct stat s; s.st_rdev;], ac_cv_struct_st_rdev=yes, ac_cv_struct_st_rdev=no)])dnl if test $ac_cv_struct_st_rdev = yes; then @@ -1128,23 +1133,23 @@ dnl dnl ### Checks for compiler characteristics dnl dnl -define(AC_CROSS_CHECK, +define(AC_TRY_CROSS, [AC_PROVIDE([$0])dnl # If we cannot run a trivial program, we must be cross compiling. -AC_CHECKING(whether cross-compiling) +AC_MSG_CHECKING(whether cross-compiling) AC_CACHE_VAL(ac_cv_c_cross, -[AC_TEST_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 if test $ac_cv_c_cross = yes; then - AC_VERBOSE(we are cross-compiling) + AC_MSG_RESULT(we are cross-compiling) else - AC_VERBOSE(we are not cross-compiling) + AC_MSG_RESULT(we are not cross-compiling) fi])dnl dnl -define(AC_CHAR_UNSIGNED, -[AC_CHECKING(for unsigned characters) +define(AC_C_CHAR_UNSIGNED, +[AC_MSG_CHECKING(for unsigned characters) AC_CACHE_VAL(ac_cv_c_char_unsigned, -[AC_TEST_RUN( +[AC_TRY_RUN( [/* volatile prevents gcc2 from optimizing the test away on sparcs. */ #if !__STDC__ #define volatile @@ -1161,14 +1166,14 @@ if test $ac_cv_c_char_unsigned = yes; then fi ])dnl dnl -define(AC_LONG_DOUBLE, +define(AC_C_LONG_DOUBLE, [AC_REQUIRE([AC_PROG_CC])dnl -AC_CHECKING(for long double) +AC_MSG_CHECKING(for long double) AC_CACHE_VAL(ac_cv_c_long_double, [if test "$GCC" = yes; then ac_cv_c_long_double=yes else -AC_TEST_RUN([int main() { +AC_TRY_RUN([int main() { /* The Stardent Vistra knows sizeof(long double), but does not support it. */ long double foo = 0.0; /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ @@ -1181,23 +1186,23 @@ fi ])dnl dnl define(AC_INT_16_BITS, -[AC_OBSOLETE([$0], [; instead use AC_SIZEOF_TYPE(int)]) -AC_CHECKING(integer size) -AC_TEST_RUN([main() { exit(sizeof(int) != 2); }], +[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(int)]) +AC_MSG_CHECKING(integer size) +AC_TRY_RUN([main() { exit(sizeof(int) != 2); }], AC_DEFINE(INT_16_BITS)) ])dnl dnl define(AC_LONG_64_BITS, -[AC_OBSOLETE([$0], [; instead use AC_SIZEOF_TYPE(long)]) -AC_CHECKING(for 64-bit long ints) -AC_TEST_RUN([main() { exit(sizeof(long int) != 8); }], +[AC_OBSOLETE([$0], [; instead use AC_CHECK_SIZEOF(long)]) +AC_MSG_CHECKING(for 64-bit long ints) +AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }], AC_DEFINE(LONG_64_BITS)) ])dnl dnl -define(AC_WORDS_BIGENDIAN, -[AC_CHECKING(byte ordering) +define(AC_C_BIGENDIAN, +[AC_MSG_CHECKING(byte ordering) AC_CACHE_VAL(ac_cv_c_bigendian, -[AC_TEST_RUN([main () { +[AC_TRY_RUN([main () { /* Are we little or big endian? From Harbison&Steele. */ union { @@ -1212,10 +1217,10 @@ if test $ac_cv_c_bigendian = yes; then fi ])dnl dnl -define(AC_ARG_ARRAY, -[AC_CHECKING(whether the address of an argument can be used as an array) +define(AC_C_ARG_ARRAY, +[AC_MSG_CHECKING(whether the address of an argument can be used as an array) AC_CACHE_VAL(ac_cv_c_arg_array, -[AC_TEST_RUN([main() { +[AC_TRY_RUN([main() { /* Return 0 iff arg arrays are ok. */ exit(!x(1, 2, 3, 4)); } @@ -1232,12 +1237,12 @@ if test $ac_cv_c_arg_array = no; then fi ])dnl dnl -define(AC_INLINE, +define(AC_C_INLINE, [AC_REQUIRE([AC_PROG_CC])dnl -AC_CHECKING([for inline]) +AC_MSG_CHECKING([for inline]) AC_CACHE_VAL(ac_cv_c_inline, [if test "$GCC" = yes; then -AC_TEST_LINK( , [} inline foo() {], ac_cv_c_inline=yes, ac_cv_c_inline=no) +AC_TRY_LINK(, [} inline foo() {], ac_cv_c_inline=yes, ac_cv_c_inline=no) else ac_cv_c_inline=no fi])dnl @@ -1245,11 +1250,11 @@ if test $ac_cv_c_inline = no; then AC_DEFINE(inline, __inline) fi ])dnl -define(AC_CONST, +define(AC_C_CONST, [dnl Do not "break" this again. -AC_CHECKING([for lack of working const]) +AC_MSG_CHECKING([for lack of working const]) AC_CACHE_VAL(ac_cv_c_const, -[changequote(,)dnl +[changequote(, )dnl dnl Do not put single quotes in the C program text! ac_prog='/* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; @@ -1272,7 +1277,7 @@ ccp = (char const *const *) p; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25,17}; + int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } @@ -1289,10 +1294,10 @@ ccp = (char const *const *) p; { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; }' -changequote([,])dnl -AC_TEST_LINK( , [$ac_prog], ac_cv_c_const=yes, ac_cv_c_const=no)])dnl +changequote([, ])dnl +AC_TRY_LINK(, [$ac_prog], ac_cv_c_const=yes, ac_cv_c_const=no)])dnl if test $ac_cv_c_const = no; then - AC_DEFINE(const,) + AC_DEFINE(const, ) fi ])dnl dnl @@ -1301,7 +1306,7 @@ dnl ### Checks for operating system services dnl dnl define(AC_HAVE_POUNDBANG, -[AC_CHECKING(whether [#]! works in shell scripts) +[AC_MSG_CHECKING(whether [#]! works in shell scripts) AC_CACHE_VAL(ac_cv_sys_interpreter, [echo '#!/bin/cat exit 69 @@ -1321,13 +1326,13 @@ ifelse([$2], , , [else ])dnl fi ])dnl -define(AC_REMOTE_TAPE, -[AC_CHECKING(for remote tape and socket header files) -AC_HEADER_CHECK(sys/mtio.h, AC_DEFINE(HAVE_SYS_MTIO_H)) +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)) if test "$ac_cv_header_mtio_h" = yes; then AC_CACHE_VAL(ac_cv_header_rmt, -[AC_TEST_CPP([#include +[AC_TRY_CPP([#include #include ], ac_cv_header_rmt=yes, ac_cv_header_rmt=no)])dnl if test $ac_cv_header_rmt = yes; then PROGS="$PROGS rmt" @@ -1336,8 +1341,8 @@ fi AC_SUBST(PROGS)dnl ])dnl dnl -define(AC_LONG_FILE_NAMES, -[AC_CHECKING(for long file names) +define(AC_SYS_LONG_FILE_NAMES, +[AC_MSG_CHECKING(for long file names) AC_CACHE_VAL(ac_cv_sys_long_file_names, [ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: @@ -1366,10 +1371,10 @@ if test $ac_cv_sys_long_file_names = yes; then fi ])dnl dnl -define(AC_RESTARTABLE_SYSCALLS, -[AC_CHECKING(for restartable system calls) +define(AC_SYS_RESTARTABLE_SYSCALLS, +[AC_MSG_CHECKING(for restartable system calls) AC_CACHE_VAL(ac_cv_sys_restartable_syscalls, -[AC_TEST_RUN( +[AC_TRY_RUN( [/* Exit 0 (true) if wait returns something other than -1, i.e. the pid of the child, which means that wait was restarted after getting the signal. */ @@ -1390,8 +1395,8 @@ if test $ac_cv_sys_restartable_syscalls = yes; then fi ])dnl dnl -define(AC_FIND_X, -[AC_REQUIRE_CPP()dnl Set CPP; we run AC_FIND_X_DIRECT conditionally. +define(AC_PATH_X, +[AC_REQUIRE_CPP()dnl Set CPP; we run AC_PATH_X_DIRECT conditionally. AC_PROVIDE([$0])dnl # If we find X, set shell vars x_includes and x_libraries to the paths. no_x=yes @@ -1403,13 +1408,13 @@ test -n "$x_includes" && ac_cv_x_includes="$x_includes" test -n "$x_libraries" && ac_cv_x_includes="$x_libraries" if test "${ac_cv_x_includes+set}" = set && test "${ac_cv_x_libraries+set}" = set; then - AC_VERBOSE(using cached values for ac_cv_x_includes and ac_cv_x_libraries) + AC_MSG_RESULT(using cached values for ac_cv_x_includes and ac_cv_x_libraries) else -AC_FIND_X_XMKMF +AC_PATH_X_XMKMF fi if test "${ac_cv_x_includes+set}" != set || test "${ac_cv_x_libraries+set}" != set; then -AC_FIND_X_DIRECT +AC_PATH_X_DIRECT fi test -z "$ac_cv_x_includes" && ac_cv_x_includes=NONE test -z "$ac_cv_x_libraries" && ac_cv_x_libraries=NONE @@ -1423,14 +1428,14 @@ if test -z "$x_libraries" && test "$ac_cv_x_libraries" != NONE; then x_libraries="$ac_cv_x_libraries" fi -test -n "$x_includes" && AC_VERBOSE(X11 headers are in $x_includes) -test -n "$x_libraries" && AC_VERBOSE(X11 libraries are in $x_libraries) +test -n "$x_includes" && AC_MSG_RESULT(X11 headers are in $x_includes) +test -n "$x_libraries" && AC_MSG_RESULT(X11 libraries are in $x_libraries) fi # No --with-x=no. ])dnl dnl -dnl Internal subroutine of AC_FIND_X. -define(AC_FIND_X_XMKMF, -[AC_CHECKING(for X include and library files with xmkmf) +dnl Internal subroutine of AC_PATH_X. +define(AC_PATH_X_XMKMF, +[AC_MSG_CHECKING(for X include and library files with xmkmf) rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -1462,12 +1467,12 @@ EOF fi ])dnl dnl -dnl Internal subroutine of AC_FIND_X. -define(AC_FIND_X_DIRECT, -[AC_CHECKING(for X include and library files directly) -test -z "$x_direct_test_library" && x_direct_test_library=Xt -test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h -AC_TEST_CPP([#include <$x_direct_test_include>], no_x=, +dnl Internal subroutine of AC_PATH_X. +define(AC_PATH_X_DIRECT, +[AC_MSG_CHECKING(for X include and library files directly) +test -z "$x_direct_TRY_library" && x_direct_TRY_library=Xt +test -z "$x_direct_TRY_include" && x_direct_TRY_include=X11/Intrinsic.h +AC_TRY_CPP([#include <$x_direct_TRY_include>], no_x=, for ac_dir in \ /usr/X11R6/include \ /usr/X11R5/include \ @@ -1505,7 +1510,7 @@ AC_TEST_CPP([#include <$x_direct_test_include>], no_x=, /usr/openwin/share/include \ ; \ do - if test -r "$ac_dir/$x_direct_test_include"; then + if test -r "$ac_dir/$x_direct_TRY_include"; then test -z "$ac_cv_x_includes" && ac_cv_x_includes=$ac_dir no_x= break @@ -1514,7 +1519,7 @@ AC_TEST_CPP([#include <$x_direct_test_include>], no_x=, # Check for the libraries. First see if replacing the include by # lib works. -AC_HAVE_LIBRARY("$x_direct_test_library", no_x=, +AC_CHECK_LIB("$x_direct_TRY_library", no_x=, for ac_dir in `echo "$ac_cv_x_includes" | sed s/include/lib/` \ /usr/X11R6/lib \ /usr/X11R5/lib \ @@ -1553,7 +1558,7 @@ for ac_dir in `echo "$ac_cv_x_includes" | sed s/include/lib/` \ ; \ do for ac_extension in a so sl; do - if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + if test -r $ac_dir/lib${x_direct_TRY_library}.$ac_extension; then test -z "$ac_cv_x_libraries" && ac_cv_x_libraries=$ac_dir no_x= break 2 @@ -1562,10 +1567,10 @@ do done)])dnl dnl dnl Find additional X libraries, magic flags, etc. -define(AC_FIND_XTRA, -[AC_REQUIRE([AC_ISC_POSIX])dnl -AC_REQUIRE([AC_FIND_X])dnl -AC_CHECKING(for additional X libraries and flags) +define(AC_PATH_XTRA, +[AC_REQUIRE([AC_OS_ISC])dnl +AC_REQUIRE([AC_PATH_X])dnl +AC_MSG_CHECKING(for additional X libraries and flags) if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" elif test "$no_x" = yes; then @@ -1592,22 +1597,22 @@ else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). - AC_HAVE_LIBRARY(dnet, + AC_CHECK_LIB(dnet, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" ac_have_dnet=yes], ac_have_dnet=no) if test "$ac_have_dnet" = no; then - AC_HAVE_LIBRARY(dnet_stub, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) + AC_CHECK_LIB(dnet_stub, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT 2.0. # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch. if test "`(uname) 2>/dev/null`" != IRIX; then - AC_HAVE_LIBRARY(socket, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"]) + AC_CHECK_LIB(socket, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"]) fi fi # -AC_VERBOSE(X compiler flags: $X_CFLAGS) -AC_VERBOSE(X library flags: $X_LIBS) -AC_VERBOSE(extra X libraries: $X_EXTRA_LIBS) +AC_MSG_RESULT(X compiler flags: $X_CFLAGS) +AC_MSG_RESULT(X library flags: $X_LIBS) +AC_MSG_RESULT(extra X libraries: $X_EXTRA_LIBS) AC_SUBST(X_CFLAGS)dnl AC_SUBST(X_LIBS)dnl AC_SUBST(X_EXTRA_LIBS)dnl @@ -1618,23 +1623,23 @@ dnl ### Checks for UNIX variants dnl These are kludges; we need a more systematic approach. dnl dnl -define(AC_AIX, -[AC_CHECKING(for AIX) -AC_BEFORE([$0], [AC_TEST_LINK])dnl -AC_BEFORE([$0], [AC_TEST_RUN])dnl -AC_BEFORE([$0], [AC_TEST_CPP])dnl -AC_PROGRAM_EGREP(yes, +define(AC_OS_AIX, +[AC_MSG_CHECKING(for AIX) +AC_BEFORE([$0], [AC_TRY_LINK])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_BEFORE([$0], [AC_TRY_CPP])dnl +AC_EGREP_CPP(yes, [#ifdef _AIX yes #endif ], AC_DEFINE(_ALL_SOURCE)) ])dnl dnl -define(AC_MINIX, -[AC_BEFORE([$0], [AC_TEST_LINK])dnl -AC_BEFORE([$0], [AC_TEST_RUN])dnl -AC_BEFORE([$0], [AC_TEST_CPP])dnl -AC_HEADER_CHECK(minix/config.h, MINIX=yes, MINIX=) +define(AC_OS_MINIX, +[AC_BEFORE([$0], [AC_TRY_LINK])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_BEFORE([$0], [AC_TRY_CPP])dnl +AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) # The Minix shell ca not assign to the same variable on the same line! if test "$MINIX" = yes; then AC_DEFINE(_POSIX_SOURCE) @@ -1643,12 +1648,12 @@ if test "$MINIX" = yes; then fi ])dnl dnl -define(AC_ISC_POSIX, +define(AC_OS_ISC, [AC_PROVIDE([$0])dnl -AC_BEFORE([$0], [AC_TEST_LINK])dnl -AC_BEFORE([$0], [AC_TEST_RUN])dnl -AC_BEFORE([$0], [AC_TEST_CPP])dnl -AC_CHECKING(for POSIXized ISC) +AC_BEFORE([$0], [AC_TRY_LINK])dnl +AC_BEFORE([$0], [AC_TRY_RUN])dnl +AC_BEFORE([$0], [AC_TRY_CPP])dnl +AC_MSG_CHECKING(for POSIXized ISC) if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1 then @@ -1664,10 +1669,10 @@ else fi ])dnl dnl -define(AC_XENIX_DIR, -[AC_REQUIRE([AC_DIR_HEADER])dnl -AC_CHECKING(for Xenix) -AC_PROGRAM_EGREP(yes, +define(AC_OS_XENIX, +[AC_REQUIRE([AC_HEADER_DIRENT])dnl +AC_MSG_CHECKING(for Xenix) +AC_EGREP_CPP(yes, [#if defined(M_XENIX) && !defined(M_UNIX) yes #endif @@ -1681,14 +1686,14 @@ if test "$XENIX" = yes; then fi ])dnl dnl -define(AC_SCO_INTL, -[AC_HAVE_LIBRARY(intl, LIBS="$LIBS -lintl") +define(AC_OS_SCO, +[AC_CHECK_LIB(intl, LIBS="$LIBS -lintl") ])dnl dnl -define(AC_IRIX_SUN, -[AC_HAVE_LIBRARY(sun, LIBS="$LIBS -lsun") +define(AC_OS_IRIX, +[AC_CHECK_LIB(sun, LIBS="$LIBS -lsun") ])dnl dnl -define(AC_DYNIX_SEQ, -[AC_HAVE_LIBRARY(seq, LIBS="$LIBS -lseq") +define(AC_OS_DYNIX, +[AC_CHECK_LIB(seq, LIBS="$LIBS -lseq") ])dnl