Commit Graph

273 Commits

Author SHA1 Message Date
Akim Demaille
4f77fd56b9 * acspecific.m4 (AC_PATH_X): Use AC_DIVERT.
Use `no', not `NO' for ac_x_includes and ac_x_libraries.
Adjust dependencies.
(_AC_PATH_X_DIRECT): Introduce ac_x_header_dirs to factor the list
of places where headers and libs might be.
(AC_PATH_XTRA): Don't quote the argument of `case'.
2000-06-07 07:00:07 +00:00
Jim Meyering
8d425b4c24 (AC_FUNC_STRERROR_R): Call strerror_r with 2nd arg
of type char*, not int.  Suggestion from Paul Eggert.
2000-05-28 16:27:56 +00:00
Akim Demaille
36a549b7ac Currently, AC_PROG_LN_S incorrectly reports yes with DJGPP. This
is because the DJGPP `ln' emulates soft links for executables by
generating a stub that in turn calls the real program.  This
feature also works with nonexistent files like in the Unix
spec. So `ln -s X conftestdata' will generate `conftestdata.exe'
which will attempt to call 'X.exe'. But this feature only works
for executables.  Fix it.

* acspecific.m4 (AC_PROG_LN_S): Create a sample file and use it to
test `ln -s'.
2000-05-26 17:27:24 +00:00
Akim Demaille
0e26510db8 Fix the archive: some parts of the following patches were missing:
- CC < aCC
- unquote the argument of case
- AC_FUNC_STRERROR_R
- AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
- typos in autoconf.texi
2000-05-26 17:12:01 +00:00
Akim Demaille
aa8bef1fcd No library nor special privilege is needed to run `getloadavg'
under FreeBSD.
Reported by Alec Wolman.

* acspecific.m4 (AC_FUNC_GETLOADAVG): Check for `getloadavg'
without any additional library.
Fixes Autoconf/109.
2000-05-26 08:37:38 +00:00
Akim Demaille
0fbdd96cf3 The night of the living dead...
* acspecific.m4 (AC_XENIX_DIR, AC_DYNIX_SEQ, AC_IRIX_SUN,
AC_SCO_INTL): Wake up a few zombies.
* doc/autoconf.texi: Adjust.
* tests/aclocal.m4 (AC_ENV_SAVE): Likewise.
2000-05-24 14:39:24 +00:00
Akim Demaille
3ba24b8270 * acspecific.m4 (AC_FUNC_VFORK): Quote properly.
(AC_FUNC_STRFTIME, AC_FUNC_VFORK, AC_FUNC_VPRINTF): Don't use
AC_DEFINE, just use the AC_CHECK_*S macro.
2000-05-24 13:14:13 +00:00
Akim Demaille
7435a2e96c Simplify the interface: users shouldn't need to explicitly check
for special environments.

* acspecific.m4 (AC_EXEEXT, AC_OBJEXT): AU defined to
nothing.  Replace them by...
(_AC_EXEEXT, _AC_OBJEXT): this.
* aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call them.
(AC_PROG_CC_G, AC_PROG_CXX_G, AC_PROG_F77_G): Rename as...
(_AC_PROG_CC_G, _AC_PROG_CXX_G, _AC_PROG_F77_G): this.
Adjust dependencies.
* tests/Makefile.am (FILTER_MACROS): Adjust.
* doc/autoconf.texi (Compilers and Preprocessors): New section,
move the documentation of AC_PROG_CC, AC_PROG_CC_C_O,
AC_PROG_CC_STDC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP,
AC_PROG_F77, AC_PROG_F77_C_O, AC_PROG_GCC_TRADITIONAL here.
Factor the comment documentation of AC_PROG_CC, AC_PROG_CXX,
AC_PROG_F77.
2000-05-23 14:54:49 +00:00
Akim Demaille
ede91cff94 Modernize AC_EXEEXT and AC_OBJEXT.
Now work with other languages than C and C++.

* acspecific.m4 (AC_EXEEXT, AC_OBJEXT): Use
AC_COMPILE_IFELSE/AC_LINK_IFELSE and AC_LANG_PROGRAM instead of
ad hoc code.
Use `$ac_ext' instead of listing `.c', `.C' etc.
Use AC_CACHE_CHECK.
* doc/autoconf.texi (System Services): Adjust.
2000-05-23 14:50:43 +00:00
Akim Demaille
85b29b03d3 Simplify the interface: users shouldn't need to explicitly check
for special environments.

* acspecific.m4	(AC_CYGWIN, AC_EMXOS2, AC_MINGW32): AU defined to
nothing.  Replace them by...
(_AC_CYGWIN, _AC_EMXOS2, _AC_MINGW32): these, which are
automatically called by...
(AC_EXEEXT): this.
* doc/autoconf.texi (System Services, Obsolete Macros): Adjust.
2000-05-23 14:47:33 +00:00
Akim Demaille
999100ca48 AC_PROG_GNU_M4 should actually be private to the package
Autoconf.

* acspecific.m4 (AC_PROG_GNU_M4): Move to...
* m4/m4.m4: here.
* m4/Makefile.am (EXTRA_DIST): Adjust.
* doc/autoconf.texi (Particular Programs): Adjust.
2000-05-23 14:46:23 +00:00
Akim Demaille
fe75d0cad0 * acspecific.m4 (_AC_LIBOBJ_ALLOCA): New macro, extracted from...
(AC_FUNC_ALLOCA): here.  Adjust.
2000-05-22 14:09:35 +00:00
Akim Demaille
0cd794da59 * acspecific.m4 (AC_FUNC_CHOWN): New macro, based on Jim
Meyering's `chown.m4' serial 4.
(AC_FUNC_GETGROUPS): New macro, based on Jim Meyering's
`getgroups.m4' serial 3.
(AC_FUNC_MEMCMP): Updated, based on Jim Meyering's `memcmp.m4'
serial 3.
(AC_FUNC_MALLOC): New macro, based on Jim Meyering's
`malloc.m4' serial 3.
(AC_FUNC_MMAP): Include `stdlib.h' when `STDC_HEADERS'.
* acfunctions: Sort.
Add `chown' and `malloc', point `getgroups' to `AC_FUNC_GETGROUPS'
instead of `AC_TYPE_GETGROUPS'.
* doc/autoconf.texi (Particular Functions): Adjust.
2000-05-22 08:46:23 +00:00
Akim Demaille
dc8d091541 * acgeneral.m4: Quote the names being m4-defined.
* acspecific.m4: Likewise.
* aclang.m4: Likewise.
2000-05-22 08:41:36 +00:00
Akim Demaille
5db6a4b156 * acgeneral.m4: Simplify all the unjustified `[\$]foo' into
`\$foo', the quotes are needed only for `\$[1]', `\$[@]' etc.
Prefer `$$1' to `[$]$1', `$foo' to `[$]foo', `$[1]' to `[$]1' etc.
* aclang.m4: Likewise.
* acspecific.m4: Likewise.
2000-05-19 13:07:13 +00:00
Akim Demaille
cf9061701f * acspecific.m4 (_AC_LIBOBJ_GETLOADAVG): New macro, extracted from
(AC_FUNC_GETLOADAVG): here.
Use it.
2000-05-19 12:15:14 +00:00
Akim Demaille
d5c975f17b * acgeneral.m4 (AC_SPECIALIZE): Avoid a useless `indir'.
(AC_CHECK_MEMBER, AC_CHECK_MEMBERS): Fix to work properly on
`struct f.g.h'.
* acspecific.m4 (AC_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS and
AC_CHECK_MEMBERS instead of performing their task by hand.
2000-05-19 12:11:47 +00:00
Akim Demaille
beb715a12b Synchronize AC_FUNC_GETLOADAVG with the version of the shellutils
1.16f (serial 4).

* acspecific.m4 (AC_FUNC_GETLOADAVG): Check for
`pstat_getdynamic'.
Define `C_GETLOADAVG' if compiling `getloadavg.c'.
Check for NLS.
Compute `GETLOADAVG_LIBS'.
(AC_FUNC_MKTIME): Remove a forgotten `AC_SUBST(LIBOBJS)'.
2000-05-19 12:08:46 +00:00
Akim Demaille
c706f3273a Eradicate AC_TRY_COMPILE.
* aclang.m4 (AC_PROG_CC_STDC, AC_C_BIGENDIAN, AC_C_INLINE,
AC_C_CONST, AC_C_VOLATILE, AC_F77_NAME_MANGLING): Use
`AC_COMPILE_IFELSE'.
* acspecific.m4 (AC_DECL_SYS_SIGLIST, _AC_CHECK_HEADER_DIRENT,
AC_HEADER_SYS_WAIT, AC_HEADER_TIME, AC_TYPE_SIGNAL,
AC_FUNC_GETLOADAVG, AC_FUNC_SELECT_ARGTYPES, AC_STRUCT_TM,
AC_CYGWIN, AC_MINGW32, AC_EMXOS2): Likewise.
* tests/semantics.m4 (C keywords): Check that AC_C_CONST,
AC_C_VOLATILE, and AC_C_INLINE function properly with GCC.
2000-05-11 13:09:05 +00:00
Akim Demaille
bf8eaa27de * acspecific.m4 (_AC_CHECK_HEADER_DIRENT): Use more modern
Autoconf idioms.
(_AC_CHECK_HEADERS_DIRENT): Removed, instead...
(AC_HEADER_DIRENT): Handle the loop.
2000-05-11 08:31:16 +00:00
Akim Demaille
465612289e Merge AC_DECL_YYTEXT into AC_PROG_LEX.
* acgeneral.m4 (AC_DECL_YYTEXT): Rename as
(_AC_DECL_YYTEXT): this.
(AC_PROG_LEX): Use it.
(AC_DECL_YYTEXT): New AU macro.
* doc/autoconf.texi: Adjust.
2000-05-11 07:59:08 +00:00
Akim Demaille
87c43d275c * libm4.m4 (m4_foreach): Rewritten so that it does not require
lists in between parens.
(m4_foreach_quoted): new copy of the previous `m4_foreach' which
is still used by `m4_wrap'.
* acgeneral.m4 (AC_INCLUDE, AC_INCLUDES): Removed.
(AC_FOREACH): Don't use parens with `m4_foreach'.
(AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES): Adjust the
description.
* acspecific.m4 (AC_STRUCT_TIMEZONE, AC_STRUCT_ST_BLKSIZE,
AC_STRUCT_ST_BLOCKS, AC_STRUCT_ST_RDEV): Adjust.
* autoconf.texi (AC_CHECK_MEMBER, AC_CHECK_DECLS, AC_CHECK_TYPES):
Adjust their documentation.
(AC_INCLUDE): Undocument.
* tests/semantics.m4: Adjust.
* tests/actest.m4: Rename as...
* tests/aclocal.m4: this.
* tests/atspecific.m4: No longer include actest.m4.
* tests/torture.m4: Likewise.
* tests/Makefile.am: Adjust.
2000-05-10 16:16:31 +00:00
Akim Demaille
a9408e08e8 * doc/autoconf.texi (Obsolete Macros): Document `AU_DEFUN'.
Move the documentation of `AC_OBSOLETE' from here, to...
(Old Macros): here.
* acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV):
AU_DEFUN'd.
2000-05-10 15:39:22 +00:00
Akim Demaille
0591c3a3ba * acgeneral.m4 (AC_LIBOBJ_DECL, AC_LIBOBJ): New macros.
(AC_REPLACE_FUNCS): Use AC_LIBOBJ.
* acspecific.m4 (AC_FUNC_MKTIME, AC_FUNC_MEMCMP,
AC_STRUCT_ST_BLOCKS): Use AC_LIBOBJ.
* doc/autoconf.texi : Adjust so that the user is not encouraged to
use LIBOBJS directly.
(Generic Functions): Document AC_LIBOBJ_DECL and AC_LIBOBJ.
2000-05-10 11:47:35 +00:00
Akim Demaille
04149796fa * acspecific.m4 (AC_FUNC_MKTIME): Use AC_SUBST. 2000-04-20 11:49:53 +00:00
Akim Demaille
1e6abf4e36 * acgeneral.m4: Simplify all the foo="$bar"' into foo=$bar'.
* acspecific.m4: Likewise.
* aclang.m4: Likewise.
2000-04-11 12:00:13 +00:00
Akim Demaille
af8eb3314f Rewrite the autoheader chain on top of `autoconf --trace'.
* autoheader.m4: Dispatch the prototypes next to there AC_
siblings.
(AH_TEMPLATE, AH_VERBATIM): Move to...
* acgeneral.m4: here.
(AH_OUTPUT): New macro.
* autoheader.sh: Run `autoconf --trace' instead of `m4 autoheader.m4'.
* autoheader.m4: Remove.
* Makefile.am: Adjust.
* tests/tools.m4 (AH_DEFUN): Remove, no longer makes sense.
* tests/actests.m4 (autoheader::AC_TATOOINE): Remove, was used by
the test above.
2000-03-29 16:48:00 +00:00
Akim Demaille
b23061fafb Move all the language dependent macros into aclang.m4.
* aclang.m4: New file.
* autoconf.m4: Include it.
* autoheader.m4: Likewise.
* autoupdate.m4: Likewise.
* Makefile.am: Adjust.
* test/Makefile.am: Likewise.
* acgeneral.m4 (AC_LANG_CASE,AC_LANG_SAVE, _AC_LANG_DISPATCH,
AC_LANG, _AC_LANG_CURRENT, AC_LANG_SOURCE, AC_LANG_PROGRAM,
AC_LANG_CALL, AC_LANG(C), AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C),
AC_LANG_CALL(C), AC_LANG(C++), AC_LANG_SOURCE(C++),
AC_LANG_PROGRAM(C++), AC_LANG_CALL(C++), AC_LANG(FORTRAN77),
AC_LANG_SOURCE(FORTRAN77), AC_LANG_PROGRAM(FORTRAN77),
AC_LANG_CALL(FORTRAN77): Move to...
* aclang.m4: here.
* acspecific.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77,
AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS, AC_PROG_F77_WORKS,
AC_PROG_CC_GNU, AC_PROG_CXX_GNU, AC_PROG_F77_GNU, AC_PROG_CC_G,
AC_PROG_CXX_G, AC_PROG_F77_G, AC_PROG_GCC_TRADITIONAL,
AC_PROG_CC_C_O, AC_PROG_F77_C_O, AC_PROG_CC_STDC, AC_PROG_CPP,
AC_PROG_CXXCPP, AC_REQUIRE_CPP, AC_PROG_LEX, AC_TYPE_MODE_T,
AC_C_CROSS, AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE, AC_C_BIGENDIAN,
AC_C_INLINE, AC_C_CONST, AC_C_VOLATILE, AC_C_STRINGIZE,
AC_C_PROTOTYPES, AC_F77_LIBRARY_LDFLAGS, AC_F77_NAME_MANGLING,
AC_F77_WRAPPERS): Move to...
* aclang.m4: here.
2000-03-27 12:26:33 +00:00
Akim Demaille
6e08327ec7 * acgeneral.m4 (AC_LINK_IFELSE, AC_COMPILE_IFELSE): New macros.
(AC_TRY_LINK, AC_TRY_COMPILE): Use them.
(AC_CHECK_MEMBER, AC_COMPILE_CHECK, AC_CHECK_DECL,
_AC_CHECK_TYPE_NEW): Adjust.
* acspecific.m4 (AC_DECL_YYTEXT, AC_PATH_XTRA): Adjust.
2000-03-25 09:00:53 +00:00
Akim Demaille
94663d40de * acspecific.m4 (AC_F77_NAME_MANGLING): Need to use
AC_F77_LIBRARY_LDFLAGS when linking C and Fortran code.
2000-03-24 09:03:56 +00:00
Akim Demaille
2200cf61c9 Start the language support overhaul: Introduce AC_LANG().
* acgeneral.m4 (AC_LANG): Renamed as _AC_LANG_CURRENT.
(AC_LANG, AC_LANG(C), AC_LANG(C++), AC_LANG(FORTRAN77)): New
macros.
(AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_FORTRAN): AU_DEFUN'ed.
Adjust all callers.
* acspecific.m4 (AC_F77_NAME_MANGLING): Remove the exceeding
AC_LANG_RESTORE.
* tests/Makefile.am (FILTER_MACROS): Add AC_LANG.
2000-03-21 12:15:54 +00:00
Jim Meyering
6d877fe7a1 (AC_SYS_LONG_FILE_NAMES): Don't test for existence
of $ac_xdir.  Not only is `test -e' not portable, but the test isn't
necessary at all;  the following mkdir ends up accomplishing the
same goal.  Suggestion from Alexandre Oliva.
2000-03-20 11:16:40 +00:00
Akim Demaille
ab542b1f77 * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Security fixes: create
the temp files in a private temporary directory, not directly in
TMPDIR.
2000-03-17 08:40:27 +00:00
Akim Demaille
75b5d70be3 Install the IFS we need once for all.
* acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): New macro.
Handle the NLS envvars, and IFS.
(_AC_INIT_PREPARE): Use it, no longer set the NLS envvars.
(_AC_WHICH_A, AC_PATH_PROG): Rely on the default IFS.
* acspecific.m4 (AC_PROG_INSTALL, AC_FUNC_SELECT_ARGTYPES):
Likewise.
2000-03-17 08:37:50 +00:00
Akim Demaille
6522e14a8f * acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use
: ${foo='some words'}
not
  : ${foo=some words}
since this is not portable: Digital Unix v5.0: `bad substitution'.
From Nicolas Joly.
2000-03-16 18:12:58 +00:00
Akim Demaille
cbccb222a2 Revamp AC_FUNC_SELECT_ARGTYPES.
* acspecific.m4 (AC_FUNC_SELECT_ARGTYPES): Use a single cache
variable instead of three.
Use AC_CACHE_CHECK.
Shorten the name of the var loops, they are no longer cached.
Include sys/types.h unconditionally.
`select' returns an int, fixes Autoconf/46.
Don't display parens in the user messages.
2000-03-15 09:55:21 +00:00
Akim Demaille
9da44165aa * acgeneral.m4: Replace some ifelse with ifval or m4_default, or
even nothing when not needed.
* acspecific.m4: Likewise.
2000-03-14 08:41:15 +00:00
Akim Demaille
6b95f3a59e Simplify the diversions naming system.
Suggested by Alexandre Oliva and Lars J. Aas

* libm4.m4 (ifndef): New macro.
* acgeneral.m4 (AC_DIVERT): New macro, maps a diversion name to
its value.  The diversions now have a short name, e.g., `NOTICE',
instead of the former macros which had long names, e.g.,
`AC_DIVERSION_NOTICE'.
(AC_DIVERT_PUSH): Adjust.
(AC_DIVERT_POP): Use ifndef.
(AC_DIVERSION_CURRENT): Rename as `AC_DIVERT_DIVERSION' to stay
within the `AC_DIVERT' name domain.
Adjust all callers.
* acspecific.m4: Adjust all callers.
2000-03-13 17:52:26 +00:00
Akim Demaille
bc37b8f562 Typos in ChangeLog. 2000-03-13 15:31:26 +00:00
Akim Demaille
47f8108881 * acspecific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Added some missing
headers if they exist (needed for some missing prototypes) and
corrects the signal handler prototype/definition.  The signal
handler prototype is now prepended with an `extern "C"' for C++
compilers since some platforms explicitly require an `extern "C"'
signal handler.
2000-03-09 15:44:40 +00:00
Akim Demaille
f206e89cb3 * acspecific.m4 (AC_FUNC_MMAP, AC_FUNC_ALLOCA): Make them C++
safe: include the right headers, cast the allocations etc.
2000-03-08 16:44:55 +00:00
Akim Demaille
304c21e672 Don't dump X help messages when `configure' does not check for X.
* acgeneral.m4 (_AC_INIT_HELP): Don't dump X help messages.
* acspecific.m4 (AC_PATH_X): Do it.
2000-03-08 11:09:59 +00:00
Akim Demaille
c33696519a Move the quadrigraphs out of the user name space.
* acgeneral.m4: 's/@BKL@/@<:@/g', 's/@BKR@/@:>@/g',
's/@DLR@/@S|@/g', 's/@PND@/@%:@/g'.
* acspecific.m4: Likewise.
* autoconf.sh: Likewise.
2000-03-03 14:25:03 +00:00
Akim Demaille
d98e77231b * acspecific.m4 (AC_PATH_X_DIRECT): Moved all the shell variable
into the ac_ name space.
Reported by Nicolas Joly.
2000-03-02 17:03:30 +00:00
Akim Demaille
9a04f64347 * acspecific.m4: Move some macros to a better place. 2000-03-02 16:48:06 +00:00
Akim Demaille
c86888e32d Internal macros are named `_AC_'.
* acgeneral.m4 (AC_CANONICAL_TARGET, AC_CANONICAL_BUILD,
AC_CANONICAL_THING, AC_CHECK_TOOL_PREFIX, AC_CONFIG_UNIQUE):
Prepend `_' to their names.
* acspecific.m4 (AC_CHECK_HEADER_DIRENT, AC_CHECK_HEADERS_DIRENT,
AC_PATH_X_XMKMF, AC_PATH_X_DIRECT): Prepend `_' to their names.
* doc/autoconf.texi (Macro Names): Adjusted.
2000-03-02 16:36:16 +00:00
Akim Demaille
3f31064d8d * acgeneral.m4: Formatting changes.
* acspecific.m4: Likewise.
2000-03-02 16:27:51 +00:00
Akim Demaille
f59041e9ac Fixed a mistake in ChangeLog, and moved a few more addresses from acspecific to THANKS. 2000-03-01 15:54:37 +00:00
Akim Demaille
c3a47ec7ad * acspecific.m4: Removed a few addresses, the correspondence is...
* THANKS: here.
2000-03-01 12:29:26 +00:00
Akim Demaille
93cabdd478 * acspecific.m4 (AC_PATH_XTRA): On LynxOS 3.0.1/i386,
gethostbyname(), getservbyname(), and inet_addr() are in -lbsd.
2000-03-01 12:25:02 +00:00