summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim@epita.fr>1999-10-01 12:34:27 +0000
committerAkim Demaille <akim@epita.fr>1999-10-01 12:34:27 +0000
commit65c5c630c274b807026ede5f69b40737591f91c6 (patch)
treebe9e2d6af8357dc92851aa85ef323c3739baf6fc
parentf2089b8fb28820872df055193bfdf4486250f8a8 (diff)
downloadautoconf-65c5c630c274b807026ede5f69b40737591f91c6.tar.gz
(tag: trunk-pre-merge-trunk-into-experimental-1999-10-01) into the experimental branch (tag:experimental-pre-merge-trunk-into-experimental-1999-10-01). Result is tagged experimental-post-merge-trunk-into-experimental-1999-10-01.
-rw-r--r--ChangeLog245
-rw-r--r--TODO3
-rw-r--r--acconfig.h12
-rw-r--r--acgeneral.m441
-rw-r--r--acspecific.m450
-rw-r--r--autoconf.texi49
-rw-r--r--autoheader.m42
-rw-r--r--autoheader.sh19
-rw-r--r--autoreconf.sh10
-rw-r--r--autoscan.pl1
-rwxr-xr-xconfigure18
-rw-r--r--doc/autoconf.texi49
-rw-r--r--lib/autoconf/general.m441
-rw-r--r--lib/autoconf/specific.m450
14 files changed, 490 insertions, 100 deletions
diff --git a/ChangeLog b/ChangeLog
index 9c50fe8c..697907a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
1999-09-29 Akim Demaille <akim@epita.fr>
+ Merged the trunk into the experimental branch.
+
+1999-09-29 Ben Elliston <bje@cygnus.com>
+
+ * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for the kstat_open()
+ function in libkstat (on systems such as Solaris). This family of
+ functions is preferred since they don't require setgid permissions
+ to use them. Fix for autoconf/65.
+
+1999-09-29 Akim Demaille <akim@epita.fr>
+
* acconfig.h: Commit the change announced below.
1999-09-29 Akim Demaille <akim@epita.fr>
@@ -85,6 +96,12 @@
* autoconf.texi (Generic Declarations): Update.
+1999-09-27 Ben Elliston <bje@cygnus.com>
+
+ * autoscan.pl (scan_files): Emit an AC_PROG_CC invocation to
+ configure.scan if there are any C files present. Fix for
+ autoconf/19.
+
1999-09-27 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_OUTPUT): Divert AC_OUTPUT_FILE to
@@ -125,6 +142,21 @@
Allow a third optional argument: extra includes.
* autoconf.texi (Generic Typedefs): Documents.
+1999-09-26 Ben Elliston <bje@cygnus.com>
+
+ * acgeneral.m4 (AC_OUTPUT_LINKS): Eliminate gratuitous spaces from
+ $ac_sources if this variable is otherwise empty. Fix for
+ autoconf/30.
+
+1999-09-25 Ben Elliston <bje@cygnus.com>
+
+ * autoconf.texi (AC_FUNC_SETVBUF): Do not mention which systems
+ might have their setvbuf() arguments reordered. It's difficult to
+ accurately determine and is not essential. Fix for autoconf/7.
+
+ * acgeneral.m4 (AC_LINK_FILES): Emit an error if an incorrect
+ number of arguments are collected. Fix for autoconf/10.
+
1999-09-25 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_OUTPUT, handling of options): Make it possible
@@ -140,6 +172,26 @@
* TODO: Updated.
Added a section for 2.15 and 3.
+1999-09-24 Ben Elliston <bje@cygnus.com>
+
+ * acspecific.m4 (AC_HEADER_STDC): Define ISLOWER and ISUPPER
+ macros correctly on EBCDIC systems. Contributed by Kurt D.
+ Zeilenga <kurt@openldap.org>. Fix for autoconf/6.
+
+1999-09-24 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * acspecific.m4 (AC_C_VOLATILE): New test.
+ * acconfig.h: Add new entry for `volatile'.
+ * autoconf.texi (C Compiler Characteristics): Document it.
+
+1999-09-24 Ben Elliston <bje@cygnus.com>
+
+ * autoreconf.sh: Do not run autoheader if AC_CONFIG_HEADER is
+ commented out in configure.in. Reported by Erez Zadok
+ <ezk@cs.columbia.edu> as a fix for autoconf/21.
+
+ * install.texi: Replace `can not' with `cannot'.
+
1999-09-23 Pavel Roskin <pavel_roskin@geocities.com>
Avoid that comments from aclocal.m4 show up in configure when
@@ -185,6 +237,18 @@
the default action.
Reported by Pavel.
+1999-09-22 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Clear the CCOPTS environment variable before
+ invoking the C compiler on HP-UX. This is necessary to guarantee
+ that the test program is compiled correctly. Reported by Dietmar
+ P. Schindler <schd@mra.man.de>.
+
+1999-09-22 Linas Vepstas <linas@linas.org>
+
+ * config.guess: Add OS/390 match pattern.
+ * config.sub: Add mvs, openedition targets.
+
1999-09-21 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_INIT_PARSE_ARGS, --help message): Use quoted
@@ -252,6 +316,17 @@
* THANKS: Update some mail addresses.
+1999-09-21 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Add fr30 target.
+
+1999-09-21 Ben Elliston <bje@cygnus.com>
+
+ * configure.in: Check if an appropriate version of GNU m4 is
+ installed at configure-time rather than at runtime. From Pavel
+ Roskin <pavel_roskin@geocities.com>. Fix for autoconf/2.
+ * configure: Regenerate.
+
1999-09-20 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_OUTPUT): Don't remove the CONFIG_HEADERS
@@ -261,6 +336,11 @@
* autoheader.sh: Fix the tr invocation.
+1999-09-20 Ben Elliston <bje@cygnus.com>
+
+ * autoheader.sh: Bourne shell compatibility fix. From Pavel Roskin
+ <pavel_roskin@geocities.com>.
+
1999-09-17 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_INIT_PARSE_ARGS): Improve configure's --help.
@@ -300,6 +380,16 @@
* THANKS: New file.
+1999-09-17 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Detect QNX version 4.
+ * config.sub: Handle `qnx' and `i386-qnx' aliases.
+
+1999-09-17 Erez Zadok <ezk@cs.columbia.edu>
+
+ * config.guess: Eliminate the trailing dot if ${UNAME_RELEASE} is
+ 1.4-<SOMETHING>. Fix for autoconf/22.
+
1999-09-15 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_CHECK_FILE): Use ifset.
@@ -308,6 +398,14 @@
(AC_CACHE_CHECK): Use AC_MSG_RESULT_UNQUOTED.
(AC_MSG_RESULT_UNQUOTED): New macro.
+1999-09-15 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ Fix for autoconf/28.
+ * acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is \012, use
+ `echo` followed by a non-blank, within quotes.
+ * autoheader.sh (syms): Likewise.
+ * configure: Rebuilt.
+
1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Don't assume LF is \012,
@@ -359,6 +457,68 @@
Remove the dots from the menus: horizontal space is precious.
(Invoking config.status): More traditional presentation of the options.
+1999-09-07 Ben Elliston <bje@cygnus.com>
+
+ * autoreconf.sh: Recognise -v as a synonym for --verbose.
+
+1999-09-07 Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
+
+ * Makefile.in (INSTALL, standards.info, autoconf.info): MiKTeX
+ for Windows treats all options after the first filename as
+ additional filenames, so real options must appear before the first
+ filename.
+
+1999-09-07 Steven G. Johnson <stevenj@alum.mit.edu>
+
+ * autoconf.texi (LDFLAGS, LIBS): Document that -L linker flags
+ should be kept in LDFLAGS and not LIBS.
+
+1999-09-07 Jim Meyering <meyering@ascend.com>
+
+ * acgeneral.m4 (AC_SEARCH_LIBS): Use $ac_lib as the index, not $i.
+
+1999-09-06 Ben Elliston <bje@cygnus.com>
+
+ * acspecific.m4 (AC_FUNC_ALLOCA): Rename cache variable to avoid
+ name clashes with AC_CHECK_HEADER(alloca.h).
+
+1999-09-05 Steve Chamberlain <sac@pobox.com>
+
+ * config.sub: Add support for configuring for picoJava (pj).
+
+1999-09-05 Ben Elliston <bje@cygnus.com>
+
+ * acgeneral.m4 (CONFIG_AUX_DIRS): Try running `shtool install'.
+ Contributed by Ralf S. Engelschall <rse@engelschall.com>.
+
+1999-09-04 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Use POSIX compliant shell code on DG/UX.
+ Suggested by Stephen Gildea <gildea@alum.mit.edu>.
+
+1999-09-04 Pavel Roskin <pavel_roskin@geocities.com>
+
+ * acgeneral.m4 (AC_OUTPUT_FILES): Output comment to not only
+ `Makefile', but also `makefile'.
+
+1999-09-04 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * Makefile.in (install): Don't freak if the M4FROZEN files were
+ never generated. m4 1.1 is supported, but doesn't freeze files.
+
+1999-09-04 Scott Bambrough <scottb@netwinder.org>
+
+ * config.guess: Autodetect ArmLinux using 2.9.1.xx linker
+ emulation names and using the emulation names from the linker from
+ the binutils CVS tree.
+
+ * config.sub: Change manufacturer name for the NetWinder alias
+ from Corel to Rebel.
+
+1999-09-04 Jeremy Elson <jelson@circlemud.org>
+
+ * autoheader.m4 (AC_CHECK_HEADER): Define.
+
1999-09-02 Tom Tromey <tromey@cygnus.com>
* autoheader.sh: Allow multiple spaces between #undef and symbol
@@ -408,6 +568,30 @@
* acgeneral.m4: Fixed the regular expressions: `$' shall not be
portably in a sed \(\) group.
+1999-08-28 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Once and for all, emit the correct string for
+ Unixware 7! Contributed by Mike Hopkirk <hops@sco.com>.
+
+ * acspecific.m4 (AC_C_INLINE): Qualify the return type of the
+ dummy inlined function to satisfy newer C++ compilers. Fix for
+ autoconf/49.
+
+1999-08-26 Ben Elliston <bje@cygnus.com>
+
+ * autoconf.texi (Changed Results): Correct an error in one of the
+ examples. Fix for autoconf/38.
+
+1999-08-25 Ben Elliston <bje@cygnus.com>
+
+ * autoconf.texi (Cache Variable Names): Be more explicit about the
+ requirements for cache variable names. Fix for autoconf/53.
+
+1999-08-25 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * autoreconf.sh: Run aclocal with the -I option only if
+ aclocal_dir != `.'. Fix for autoconf/44.
+
1999-08-22 Matthew D. Langston <langston@SLAC.Stanford.EDU>
* acspecific.m4 (AC_PROG_CC): Remove uname test for win32/Cygwin,
@@ -427,6 +611,39 @@
which gives the user an opportunity to specify an alternative
search list for the compiler.
+1999-08-18 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Remove "/MP" from the release string on
+ multiprocessor x86 machines running SVR4.0. Suggested by Tom
+ Purcell <Tom.Purcell@wang.com>.
+
+1999-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * acgeneral.m4 (AC_CHECK_TYPE): Add optional third argument
+ INCLUDES, which specifies the headers in which to search for the
+ type in question. Also, pass a "description" argument to
+ AC_DEFINE_UNQUOTED.
+ * acconfig.h (mode_t, off_t, pid_t, size_t): Remove definitions.
+ * autoconf.texi (AC_CHECK_TYPE): Document optional third argument.
+
+1999-08-05 Jeffrey A Law <law@cygnus.com>
+
+ * config.sub (-wrs case): Use os=-vxworks, not os=vxworks.
+
+1999-08-05 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Update patch submission address.
+
+1999-08-05 Ben Elliston <bje@cygnus.com>
+
+ * config.sub: Accept version number appended to OS name for MiNT.
+ Contributed by Guido Flohr <gufl0000@stud.uni-sb.de>.
+
+1999-08-04 Ben Elliston <bje@cygnus.com>
+
+ * Makefile.in (INSTALL_SCRIPT): Substitute.
+ (install): Install scripts with $(INSTALL_SCRIPT).
+
1999-07-20 Tom Tromey <tromey@cygnus.com>
* autoheader.sh: Fixed regexp when searching for missing symbol.
@@ -448,6 +665,25 @@
macro" use by AC_F77_LIBRARY_LDFLAGS.
(AC_LINKER_OPTION): Likewise.
+1999-07-11 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Cray T3E has an Alpha CPU.
+
+1999-07-04 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * acspecific.m4 (AC_PROG_CXX): Look for gpp after g++. gpp is the
+ DJGPP C++ compiler, since `g++' is not a valid DOS filename.
+
+1999-06-12 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Detect Linux on ia64.
+ * config.sub: Handle ia64.
+
+1999-06-12 Ben Elliston <bje@cygnus.com>
+
+ * config.guess: Handle `elf32ppclinux' from ld. Contributed by
+ Cort Dougan <cort@cs.nmt.edu>.
+
1999-06-09 Matthew D. Langston <langston@SLAC.Stanford.EDU>
* autoconf.texi (Pretty Help Strings): Synchronize documentation
@@ -458,6 +694,10 @@
* acgeneral.m4 (AC_OUTPUT_MAKE_DEFS): Fix sed regexp for handling
CPP macros with args.
+1999-06-04 Nick Clifton <nickc@cygnus.com>
+
+ * config.sub: Add more target.
+
1999-06-03 Ben Elliston <bje@cygnus.com>
* acgeneral.m4 (AC_ACVERSION): Correct version number.
@@ -1933,8 +2173,9 @@ Wed Mar 8 12:44:34 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
Tue Mar 7 11:48:19 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
- * acspecific.m4 (AC_FUNC_ALLOCA): Keep sh variable namespace clean.
- Put newline after AC_DEFINE_UNQUOTED call to avoid Irix syntax error.
+ * acspecific.m4 (AC_FUNC_ALLOCA): Keep sh variable namespace
+ clean. Put newline after AC_DEFINE_UNQUOTED call to avoid Irix
+ syntax error.
Mon Mar 6 15:07:00 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
diff --git a/TODO b/TODO
index 35b8a2ef..fe1670dd 100644
--- a/TODO
+++ b/TODO
@@ -13,6 +13,9 @@ These are things mandatory to fulfill before releasing 2.15. There
are also suggestions we should either satisfy right now (they're
easy), or remove (obsoleted since then).
+** AC_CHECK_HEADER should not template config.h entries.
+Its entry in autoheader.m4 should be removed.
+
** fnmatch
From: Stanislav Brabec <utx@k332.feld.cvut.cz>
diff --git a/acconfig.h b/acconfig.h
index a058dcfc..e8c1ea75 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -44,18 +44,6 @@
/* Define if you have the ANSI # stringizing operator in cpp. */
#undef HAVE_STRINGIZE
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef mode_t
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-#undef pid_t
-
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
-
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
diff --git a/acgeneral.m4 b/acgeneral.m4
index b847a197..38d21b83 100644
--- a/acgeneral.m4
+++ b/acgeneral.m4
@@ -1466,6 +1466,10 @@ for ac_dir in $1; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
@@ -2202,10 +2206,10 @@ AC_DEFUN(AC_SEARCH_LIBS,
[ac_func_search_save_LIBS="$LIBS"
ac_cv_search_$1="no"
AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
-test "$ac_cv_search_$1" = "no" && for i in $2; do
-LIBS="-l$i $5 $ac_func_search_save_LIBS"
+test "$ac_cv_search_$1" = "no" && for ac_lib in $2; do
+LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
AC_TRY_LINK_FUNC([$1],
-[ac_cv_search_$1="-l$i"
+[ac_cv_search_$1="-l$ac_lib"
break])
done
LIBS="$ac_func_search_save_LIBS"])
@@ -2707,18 +2711,19 @@ AC_CACHE_CHECK([for $1], ac_Type,
[AC_EGREP_CPP(dnl
changequote(<<,>>)dnl
<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
-changequote([,]), [#include <stdio.h>
+changequote([,]), m4_default([$3], [#include <stdio.h>
#include <sys/types.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
-$3
-], AC_VAR_SET(ac_Type, yes), AC_VAR_SET(ac_Type, no))])
+]), AC_VAR_SET(ac_Type, yes), AC_VAR_SET(ac_Type, no))])
AC_SHELL_IFELSE(test AC_VAR_GET(ac_Type) = yes,,
- [AC_DEFINE_UNQUOTED($1, $2)])dnl
+ [AC_DEFINE_UNQUOTED($1, $2,
+ [Define to `$2' if <sys/types.h>
+ does not define.])])dnl
AC_VAR_POPDEF([ac_Type])dnl
-])
+])dnl AC_CHECK_TYPE
dnl ### Creating output files
@@ -2733,6 +2738,10 @@ dnl link name in DEST...
dnl AC_LINK_FILES(SOURCE..., DEST...)
AC_DEFUN(AC_LINK_FILES,
[dnl
+ifelse($#, 2, , dnl
+ [errprint(__file__:__line__: incorrect number of arguments to [AC_LINK_FILES]
+)]
+ AC_MSG_ERROR([aborting due to error at __file__:__line__]))dnl
define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl
define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])])
@@ -2971,7 +2980,7 @@ EOF
# platform that uses two characters for line-breaks (e.g., DOS), tr
# would break.
ac_LF_and_DOT="`echo; echo .`"
-DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+DEFS=`sed -f $ac_cs_root.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
rm -f $ac_cs_root.defs
])
@@ -3093,7 +3102,9 @@ changequote([, ])dnl
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
+changequote(, )dnl
+ *[Mm]akefile*) ac_comsub="1i\\
+changequote([, ])dnl
# $configure_input" ;;
*) ac_comsub= ;;
esac
@@ -3200,10 +3211,10 @@ s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%^[ ]*<<#>>[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$%${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD}%gp
t cleanup
-s%^[ ]*<<#>>[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$% ${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%^[ ]*<<#>>[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
: cleanup
-s%ac_d%ac_e%gp
-s%ac_e%ac_u%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
changequote([, ])dnl
EOF
# If some macros were called several times there might be several times
@@ -3286,6 +3297,10 @@ EOF
cat >> $CONFIG_STATUS <<\EOF
srcdir=$ac_given_srcdir
+# Remove spaces from $ac_sources if it is otherwise empty.
+set -- $ac_sources
+ac_sources=[$]*
+
while test -n "$ac_sources"; do
set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
diff --git a/acspecific.m4 b/acspecific.m4
index 495519d1..4a25caf5 100644
--- a/acspecific.m4
+++ b/acspecific.m4
@@ -124,13 +124,15 @@ else
fi
])
-dnl AC_PROG_CXX takes an optional first argument which, if specified,
-dnl must be a space separated list of C++ compilers to search for. This
-dnl just gives the user an opportunity to specify an alternative search
-dnl list for the C++ compiler.
+dnl AC_PROG_CXX([LIST-OF-COMPILERS])
+dnl --------------------------------
+dnl LIST-OF-COMPILERS is a space separated list of C++ compilers to search
+dnl for (if not specified, a default list is used). This just gives the
+dnl user an opportunity to specify an alternative search list for the C++
+dnl compiler.
AC_DEFUN(AC_PROG_CXX,
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
-AC_CHECK_PROGS(CXX, $CCC ifelse([$1], , [c++ g++ gcc CC cxx cc++ cl], [$1]), gcc)
+AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gcc CC cxx cc++ cl]), gcc)
AC_PROG_CXX_WORKS
AC_PROG_CXX_GNU
@@ -771,8 +773,15 @@ 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_TRY_RUN([#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+#define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+#define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
#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);
@@ -1488,10 +1497,10 @@ AC_DEFUN(AC_FUNC_ALLOCA,
[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
+AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h,
[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
- ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
-if test $ac_cv_header_alloca_h = yes; then
+ ac_cv_working_alloca_h=yes, ac_cv_working_alloca_h=no)])
+if test $ac_cv_working_alloca_h = yes; then
AC_DEFINE(HAVE_ALLOCA_H, 1,
[Define if you have <alloca.h> and it should be used
(not on Ultrix).])
@@ -1583,6 +1592,7 @@ AC_DEFUN(AC_FUNC_GETLOADAVG,
# to get the right answer into the cache.
AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")
AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS")
+AC_CHECK_LIB(kstat, kstat_open)
# Check for the 4.4BSD definition of getloadavg.
AC_CHECK_LIB(util, getloadavg,
[LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
@@ -2168,7 +2178,7 @@ AC_DEFUN(AC_C_INLINE,
[AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
+ AC_TRY_COMPILE(, [} $ac_kw int foo() {], [ac_cv_c_inline=$ac_kw; break])
done
])
case "$ac_cv_c_inline" in
@@ -2239,6 +2249,28 @@ if test $ac_cv_c_const = no; then
fi
])
+dnl AC_C_VOLATILE
+dnl -------------
+dnl Note that, unlike const, #defining volatile to be the empty string can
+dnl actually turn a correct program into an incorrect one, since removing
+dnl uses of volatile actually grants the compiler permission to perform
+dnl optimizations that could break the user's code. So, do not #define
+dnl volatile away unless it is really necessary to allow the user's code
+dnl to compile cleanly. Benign compiler failures should be tolerated.
+AC_DEFUN(AC_C_VOLATILE,
+[AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile,
+[AC_TRY_COMPILE(,[
+volatile int x;
+int * volatile y;],
+ac_cv_c_volatile=yes, ac_cv_c_volatile=no)])
+if test $ac_cv_c_volatile = no; then
+ AC_DEFINE(volatile,,
+ [Define to empty if the keyword `volatile' does not work.
+ Warning: valid code using `volatile' can become incorrect
+ without. Disable with care.])
+fi
+])
+
AC_DEFUN(AC_C_STRINGIZE, [
AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([for preprocessor stringizing operator])
diff --git a/autoconf.texi b/autoconf.texi
index 207635e3..a6d44be1 100644
--- a/autoconf.texi
+++ b/autoconf.texi
@@ -1125,15 +1125,15 @@ how to check the results of previous tests.
@defvar LDFLAGS
@ovindex LDFLAGS
-Stripping (@samp{-s}) and any other miscellaneous options for the
-linker. If it is not set in the environment when @code{configure} runs,
-the default value is empty. @code{configure} uses this variable when
-linking programs to test for C features.
+Stripping (@samp{-s}), path (@samp{-L}), and any other miscellaneous
+options for the linker. If it is not set in the environment when
+@code{configure} runs, the default value is empty. @code{configure}
+uses this variable when linking programs to test for C features.
@end defvar
@defvar LIBS
@ovindex LIBS
-@samp{-l} and @samp{-L} options to pass to the linker.
+@samp{-l} options to pass to the linker.
@end defvar
@node Build Directories, Automatic Remaking, Preset Output Variables, Makefile Substitutions
@@ -2183,7 +2183,7 @@ first call @code{AC_CHECK_FUNC} for @code{setpgrp}.
@cvindex SETVBUF_REVERSED
If @code{setvbuf} takes the buffering type as its second argument and
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.
+@code{SETVBUF_REVERSED}.
@end defmac
@defmac AC_FUNC_STRCOLL
@@ -2827,12 +2827,13 @@ and its design will probably change in the future.
One of its main flaws is that missing types are not typedef'd, they are
defined, which can lead to incompatible code in the case of pointer types.
-@defmac AC_CHECK_TYPE (@var{type}, @var{default}@r{[}, @var{includes}@r{]})
+@defmac AC_CHECK_TYPE (@var{type}, @var{default} @r{[}, @var{includes}@r{]})
@maindex CHECK_TYPE
If the type @var{type} is not defined in @file{sys/types.h}, or
-@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the C
-(or C++) builtin type @var{default}; e.g., @samp{short} or
-@samp{unsigned}.
+@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the
+C (or C++) builtin type @var{default}; e.g., @samp{short} or
+@samp{unsigned}. The default header files to search can be replaced
+by supplying the optional argument @var{includes}.
@end defmac
@@ -2863,6 +2864,28 @@ that don't, the @file{Makefile} or configuration header file will define
it as empty.
@end defmac
+@defmac AC_C_VOLATILE
+@maindex C_VOLATILE
+@cvindex volatile
+If the C compiler does not understand the keyword @code{volatile},
+define @code{volatile} to be empty. Programs can simply use
+@code{volatile} as if every C compiler supported it; for those that do
+not, the @file{Makefile} or configuration header will define it as
+empty.
+
+If the correctness of your program depends on the semantics of
+@code{volatile}, simply defining it to be empty does, in a sense, break
+your code. However, given that the compiler does not support
+@code{volatile}, you are at its mercy anyway. At least your
+program will compile, when it wouldn't before.
+
+In general, the @code{volatile} keyword is a feature of ANSI C, so you
+might expect that @code{volatile} is available only when @code{__STDC__}
+is defined. However, Ultrix 4.3's native compiler does support
+volatile, but does not defined @code{__STDC__}.
+@end defmac
+
+
@defmac AC_C_INLINE
@maindex C_INLINE
@cvindex inline
@@ -3999,7 +4022,9 @@ For cache values used by the distributed Autoconf macros, this value is
@samp{ac}.
@item @code{_cv_}
-Indicates that this shell variable is a cache value.
+Indicates that this shell variable is a cache value. This string
+@emph{must} be present in the variable name, including the leading
+underscore.
@item @var{value-type}
A convention for classifying cache values, to produce a rational naming
@@ -5576,7 +5601,7 @@ if test $ac_cv_func_syslog = no; then
# syslog is not in the default libraries. See if it's in some other.
for lib in bsd socket inet; do
AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG)
- LIBS="$LIBS $lib"; break])
+ LIBS="$LIBS -l$lib"; break])
done
fi
@end example
diff --git a/autoheader.m4 b/autoheader.m4
index 65cd35ab..5662a7b6 100644
--- a/autoheader.m4
+++ b/autoheader.m4
@@ -50,6 +50,8 @@ $3
])
])
+define([AC_CHECK_HEADER], [AC_CHECK_HEADERS($1,$2,$3)])
+
define([AC_CHECK_HEADERS_DIRENT], [#
@@@headers="$headers $1"@@@
])
diff --git a/autoheader.sh b/autoheader.sh
index 4297f690..9534d227 100644
--- a/autoheader.sh
+++ b/autoheader.sh
@@ -57,6 +57,15 @@ case "${M4}" in
test -f "${M4}" || M4=m4 ;;
esac
+# ac_LF_and_DOT
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT="`echo; echo .`"
+
localdir=.
show_version=no
debug=false
@@ -220,16 +229,10 @@ $syms
EOF
fgrep -f $fgrep_tmp
rm -f $fgrep_tmp) |
- tr @. "`echo; echo .`"
-# We use echo to avoid assuming a particular line-breaking character.
-# The extra dot is to prevent the shell from consuming trailing
-# line-breaks from the sub-command output. A line-break within
-# single-quotes doesn't work because, if this script is created in a
-# platform that uses two characters for line-breaks (e.g., DOS), tr
-# would break.
+ tr @. "$ac_LF_and_DOT"
fi
-echo "$types" | tr ,. "`echo`." | sort | uniq | while read ctype; do
+echo "$types" | tr ,. "$ac_LF_and_DOT" | sort | uniq | while read ctype; do
test -z "$ctype" && continue
sym="`echo "${ctype}" | tr 'abcdefghijklmnopqrstuvwxyz *' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_P'`"
echo "
diff --git a/autoreconf.sh b/autoreconf.sh
index 125d442e..237d0e39 100644
--- a/autoreconf.sh
+++ b/autoreconf.sh
@@ -73,7 +73,7 @@ while test $# -gt 0; do
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
AC_MACRODIR="$1"
shift ;;
- --verbose | --verb*)
+ -v | --verbose | --verb*)
verbose=echo; shift ;;
-f | --force)
force=yes; shift ;;
@@ -170,8 +170,12 @@ while read dir; do
then
:
else
+ if test x"$aclocal_dir" != x.
+ then
+ aclocal_flags="$aclocal_flags -I $aclocal_dir"
+ fi
$verbose "running aclocal $aclocal_flags in $dir, creating $aclocal_m4"
- aclocal $aclocal_flags --output=$aclocal_m4 -I $aclocal_dir
+ aclocal $aclocal_flags --output=$aclocal_m4
fi
fi
@@ -197,7 +201,7 @@ while read dir; do
$autoconf $macrodir_opt $localdir_opt
fi
- if grep 'A[CM]_CONFIG_HEADER' configure.in >/dev/null; then
+ if grep '^[ ]*A[CM]_CONFIG_HEADER' configure.in >/dev/null; then
templates=`sed -n '/A[CM]_CONFIG_HEADER/ {
s%[^#]*A[CM]_CONFIG_HEADER[ ]*(\([^)]*\).*%\1%
p
diff --git a/autoscan.pl b/autoscan.pl
index ac394c7f..98c15335 100644
--- a/autoscan.pl
+++ b/autoscan.pl
@@ -160,6 +160,7 @@ sub scan_files
}
foreach $file (@cfiles) {
+ $programs{"cc"}++;
&scan_c_file($file);
}
diff --git a/configure b/configure
index 10e9633e..2da527be 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.14.1
+# Generated automatically using Autoconf version 2.14.1
# Copyright (C) 1992, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -448,7 +448,7 @@ running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
+# Also quote any args containing shell meta-characters.
ac_configure_args=
for ac_arg
do
@@ -709,6 +709,10 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
@@ -730,7 +734,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6
-echo "configure:734: checking for a BSD compatible install" 1>&5
+echo "configure:738: checking for a BSD compatible install" 1>&5
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -879,7 +883,7 @@ EOF
# platform that uses two characters for line-breaks (e.g., DOS), tr
# would break.
ac_LF_and_DOT="`echo; echo .`"
-DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+DEFS=`sed -f $ac_cs_root.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
rm -f $ac_cs_root.defs
@@ -901,7 +905,7 @@ cat > $CONFIG_STATUS <<EOF
# configure, is in ./config.log if it exists.
ac_cs_usage="\\
-\\\`$CONFIG_STATUS' instanciates files from templates according to the
+\\\`$CONFIG_STATUS' instantiates files from templates according to the
current configuration.
Usage: $CONFIG_STATUS [OPTIONS] FILE...
@@ -910,7 +914,7 @@ Usage: $CONFIG_STATUS [OPTIONS] FILE...
--version Print the version of Autoconf and exit
--help Display this help and exit
-Files to instanciate:
+Files to instantiate:
Configuration files:
Makefile testsuite/Makefile
@@ -1103,7 +1107,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
+ *[Mm]akefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 207635e3..a6d44be1 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -1125,15 +1125,15 @@ how to check the results of previous tests.
@defvar LDFLAGS
@ovindex LDFLAGS
-Stripping (@samp{-s}) and any other miscellaneous options for the
-linker. If it is not set in the environment when @code{configure} runs,
-the default value is empty. @code{configure} uses this variable when
-linking programs to test for C features.
+Stripping (@samp{-s}), path (@samp{-L}), and any other miscellaneous
+options for the linker. If it is not set in the environment when
+@code{configure} runs, the default value is empty. @code{configure}
+uses this variable when linking programs to test for C features.
@end defvar
@defvar LIBS
@ovindex LIBS
-@samp{-l} and @samp{-L} options to pass to the linker.
+@samp{-l} options to pass to the linker.
@end defvar
@node Build Directories, Automatic Remaking, Preset Output Variables, Makefile Substitutions
@@ -2183,7 +2183,7 @@ first call @code{AC_CHECK_FUNC} for @code{setpgrp}.
@cvindex SETVBUF_REVERSED
If @code{setvbuf} takes the buffering type as its second argument and
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.
+@code{SETVBUF_REVERSED}.
@end defmac
@defmac AC_FUNC_STRCOLL
@@ -2827,12 +2827,13 @@ and its design will probably change in the future.
One of its main flaws is that missing types are not typedef'd, they are
defined, which can lead to incompatible code in the case of pointer types.
-@defmac AC_CHECK_TYPE (@var{type}, @var{default}@r{[}, @var{includes}@r{]})
+@defmac AC_CHECK_TYPE (@var{type}, @var{default} @r{[}, @var{includes}@r{]})
@maindex CHECK_TYPE
If the type @var{type} is not defined in @file{sys/types.h}, or
-@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the C
-(or C++) builtin type @var{default}; e.g., @samp{short} or
-@samp{unsigned}.
+@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the
+C (or C++) builtin type @var{default}; e.g., @samp{short} or
+@samp{unsigned}. The default header files to search can be replaced
+by supplying the optional argument @var{includes}.
@end defmac
@@ -2863,6 +2864,28 @@ that don't, the @file{Makefile} or configuration header file will define
it as empty.
@end defmac
+@defmac AC_C_VOLATILE
+@maindex C_VOLATILE
+@cvindex volatile
+If the C compiler does not understand the keyword @code{volatile},
+define @code{volatile} to be empty. Programs can simply use
+@code{volatile} as if every C compiler supported it; for those that do
+not, the @file{Makefile} or configuration header will define it as
+empty.
+
+If the correctness of your program depends on the semantics of
+@code{volatile}, simply defining it to be empty does, in a sense, break
+your code. However, given that the compiler does not support
+@code{volatile}, you are at its mercy anyway. At least your
+program will compile, when it wouldn't before.
+
+In general, the @code{volatile} keyword is a feature of ANSI C, so you
+might expect that @code{volatile} is available only when @code{__STDC__}
+is defined. However, Ultrix 4.3's native compiler does support
+volatile, but does not defined @code{__STDC__}.
+@end defmac
+
+
@defmac AC_C_INLINE
@maindex C_INLINE
@cvindex inline
@@ -3999,7 +4022,9 @@ For cache values used by the distributed Autoconf macros, this value is
@samp{ac}.
@item @code{_cv_}
-Indicates that this shell variable is a cache value.
+Indicates that this shell variable is a cache value. This string
+@emph{must} be present in the variable name, including the leading
+underscore.
@item @var{value-type}
A convention for classifying cache values, to produce a rational naming
@@ -5576,7 +5601,7 @@ if test $ac_cv_func_syslog = no; then
# syslog is not in the default libraries. See if it's in some other.
for lib in bsd socket inet; do
AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG)
- LIBS="$LIBS $lib"; break])
+ LIBS="$LIBS -l$lib"; break])
done
fi
@end example
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index b847a197..38d21b83 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1466,6 +1466,10 @@ for ac_dir in $1; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
@@ -2202,10 +2206,10 @@ AC_DEFUN(AC_SEARCH_LIBS,
[ac_func_search_save_LIBS="$LIBS"
ac_cv_search_$1="no"
AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
-test "$ac_cv_search_$1" = "no" && for i in $2; do
-LIBS="-l$i $5 $ac_func_search_save_LIBS"
+test "$ac_cv_search_$1" = "no" && for ac_lib in $2; do
+LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
AC_TRY_LINK_FUNC([$1],
-[ac_cv_search_$1="-l$i"
+[ac_cv_search_$1="-l$ac_lib"
break])
done
LIBS="$ac_func_search_save_LIBS"])
@@ -2707,18 +2711,19 @@ AC_CACHE_CHECK([for $1], ac_Type,
[AC_EGREP_CPP(dnl
changequote(<<,>>)dnl
<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
-changequote([,]), [#include <stdio.h>
+changequote([,]), m4_default([$3], [#include <stdio.h>
#include <sys/types.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
-$3
-], AC_VAR_SET(ac_Type, yes), AC_VAR_SET(ac_Type, no))])
+]), AC_VAR_SET(ac_Type, yes), AC_VAR_SET(ac_Type, no))])
AC_SHELL_IFELSE(test AC_VAR_GET(ac_Type) = yes,,
- [AC_DEFINE_UNQUOTED($1, $2)])dnl
+ [AC_DEFINE_UNQUOTED($1, $2,
+ [Define to `$2' if <sys/types.h>
+ does not define.])])dnl
AC_VAR_POPDEF([ac_Type])dnl
-])
+])dnl AC_CHECK_TYPE
dnl ### Creating output files
@@ -2733,6 +2738,10 @@ dnl link name in DEST...
dnl AC_LINK_FILES(SOURCE..., DEST...)
AC_DEFUN(AC_LINK_FILES,
[dnl
+ifelse($#, 2, , dnl
+ [errprint(__file__:__line__: incorrect number of arguments to [AC_LINK_FILES]
+)]
+ AC_MSG_ERROR([aborting due to error at __file__:__line__]))dnl
define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl
define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])])
@@ -2971,7 +2980,7 @@ EOF
# platform that uses two characters for line-breaks (e.g., DOS), tr
# would break.
ac_LF_and_DOT="`echo; echo .`"
-DEFS=`sed -f $conftest.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+DEFS=`sed -f $ac_cs_root.defs confdefs.h | tr "$ac_LF_and_DOT" ' .'`
rm -f $ac_cs_root.defs
])
@@ -3093,7 +3102,9 @@ changequote([, ])dnl
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
+changequote(, )dnl
+ *[Mm]akefile*) ac_comsub="1i\\
+changequote([, ])dnl
# $configure_input" ;;
*) ac_comsub= ;;
esac
@@ -3200,10 +3211,10 @@ s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%^[ ]*<<#>>[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$%${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD}%gp
t cleanup
-s%^[ ]*<<#>>[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$% ${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%^[ ]*<<#>>[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
: cleanup
-s%ac_d%ac_e%gp
-s%ac_e%ac_u%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
changequote([, ])dnl
EOF
# If some macros were called several times there might be several times
@@ -3286,6 +3297,10 @@ EOF
cat >> $CONFIG_STATUS <<\EOF
srcdir=$ac_given_srcdir
+# Remove spaces from $ac_sources if it is otherwise empty.
+set -- $ac_sources
+ac_sources=[$]*
+
while test -n "$ac_sources"; do
set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4
index 495519d1..4a25caf5 100644
--- a/lib/autoconf/specific.m4
+++ b/lib/autoconf/specific.m4
@@ -124,13 +124,15 @@ else
fi
])
-dnl AC_PROG_CXX takes an optional first argument which, if specified,
-dnl must be a space separated list of C++ compilers to search for. This
-dnl just gives the user an opportunity to specify an alternative search
-dnl list for the C++ compiler.
+dnl AC_PROG_CXX([LIST-OF-COMPILERS])
+dnl --------------------------------
+dnl LIST-OF-COMPILERS is a space separated list of C++ compilers to search
+dnl for (if not specified, a default list is used). This just gives the
+dnl user an opportunity to specify an alternative search list for the C++
+dnl compiler.
AC_DEFUN(AC_PROG_CXX,
[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
-AC_CHECK_PROGS(CXX, $CCC ifelse([$1], , [c++ g++ gcc CC cxx cc++ cl], [$1]), gcc)
+AC_CHECK_PROGS(CXX, $CCC m4_default([$1], [c++ g++ gcc CC cxx cc++ cl]), gcc)
AC_PROG_CXX_WORKS
AC_PROG_CXX_GNU
@@ -771,8 +773,15 @@ 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_TRY_RUN([#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+#define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+#define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
#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);
@@ -1488,10 +1497,10 @@ AC_DEFUN(AC_FUNC_ALLOCA,
[AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
+AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h,
[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
- ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
-if test $ac_cv_header_alloca_h = yes; then
+ ac_cv_working_alloca_h=yes, ac_cv_working_alloca_h=no)])
+if test $ac_cv_working_alloca_h = yes; then
AC_DEFINE(HAVE_ALLOCA_H, 1,
[Define if you have <alloca.h> and it should be used
(not on Ultrix).])
@@ -1583,6 +1592,7 @@ AC_DEFUN(AC_FUNC_GETLOADAVG,
# to get the right answer into the cache.
AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")
AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS")
+AC_CHECK_LIB(kstat, kstat_open)
# Check for the 4.4BSD definition of getloadavg.
AC_CHECK_LIB(util, getloadavg,
[LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
@@ -2168,7 +2178,7 @@ AC_DEFUN(AC_C_INLINE,
[AC_CACHE_CHECK([for inline], ac_cv_c_inline,
[ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
- AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
+ AC_TRY_COMPILE(, [} $ac_kw int foo() {], [ac_cv_c_inline=$ac_kw; break])
done
])
case "$ac_cv_c_inline" in
@@ -2239,6 +2249,28 @@ if test $ac_cv_c_const = no; then
fi
])
+dnl AC_C_VOLATILE
+dnl -------------
+dnl Note that, unlike const, #defining volatile to be the empty string can
+dnl actually turn a correct program into an incorrect one, since removing
+dnl uses of volatile actually grants the compiler permission to perform
+dnl optimizations that could break the user's code. So, do not #define
+dnl volatile away unless it is really necessary to allow the user's code
+dnl to compile cleanly. Benign compiler failures should be tolerated.
+AC_DEFUN(AC_C_VOLATILE,
+[AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile,
+[AC_TRY_COMPILE(,[
+volatile int x;
+int * volatile y;],
+ac_cv_c_volatile=yes, ac_cv_c_volatile=no)])
+if test $ac_cv_c_volatile = no; then
+ AC_DEFINE(volatile,,
+ [Define to empty if the keyword `volatile' does not work.
+ Warning: valid code using `volatile' can become incorrect
+ without. Disable with care.])
+fi
+])
+
AC_DEFUN(AC_C_STRINGIZE, [
AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([for preprocessor stringizing operator])