Commit Graph

288 Commits

Author SHA1 Message Date
Akim Demaille
58b54a585e The --help message should have paragraphs starting with a title,
the options, and then optionally a small paragraph.

* acgeneral.m4 (AC_DIVERT_ONCE): New macro.
(HELP_VAR_END): New diversion.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Use AC_DIVERT_ONCE.
(AC_ARG_VAR): Follow the --help style.
* acspecific.m4 (AC_PATH_X): Use AC_DIVERT_ONCE.
2000-07-19 09:08:13 +00:00
Akim Demaille
8f6793ea53 * acspecific.m4 (AC_MING32): Rename as AC_MINGW32. 2000-07-18 15:58:03 +00:00
Akim Demaille
612e9ac2d5 * acspecific.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): s/ac_check/ac_cv/. 2000-07-11 09:44:39 +00:00
Akim Demaille
c0e9f9300b * acspecific.m4 (_AC_PROG_ECHO): Modernize. 2000-07-10 10:55:48 +00:00
Akim Demaille
3bc2795dde * acspecific.m4 (AC_FUNC_STRERROR_R): Aaaaaaarg! Don't leave the
AC_DEFINE inside the AC_CACHE_CHECK.
2000-07-10 10:27:21 +00:00
Akim Demaille
61591d6648 * acspecific.m4 (_AC_FUNC_STAT, AC_FUNC_STAT, AC_FUNC_LSTAT): New
macros, from Jim's stat.m4 and lstat.m4 serial 6.
* doc/autoconf.texi (Particular Functions): Document
* acfunctions: Add them.
2000-07-10 10:27:02 +00:00
Akim Demaille
4d590944bc * acgeneral.m4 (AC_DEFUNCT): Remove.
(AC_RSH, AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_DIR_HEADER,
AC_INT_16_BITS, AC_LONG_64_BITS): They're alive!...
* doc/autoconf.texi (Obsolete Macros): but not fresh.
2000-07-10 10:10:04 +00:00
Akim Demaille
7207ae0d7b * aclang.m4: Promote s,,, over s%%%, and sed prog' over sed -e
prog'.
* acgeneral.m4: Likewise.
* acspecific.m4: Likewise.
* doc/autoconf.texi (Limitations of Usual Tools, Coding Style):
Likewise.
2000-07-10 08:43:55 +00:00
Jim Meyering
7763c2db35 (_AC_LIBOBJ_GETLOADAVG): Put quotes around use of
`$ac_cv_lib_elf_elf_begin', since that variable may not be defined.
From Volker Borchert.
2000-06-27 20:21:04 +00:00
Akim Demaille
ef0391870c Various cleanups.
* acgeneral.m4 (AC_PRO, AC_EPI): Rename as _AC_DEFUN_PRO and
_AC_DEFUN_EPI.
Adjust dependencies.
(AC_DEFUN): Remove the not-to-be-released specializing mechanism.
(AC_SPECIALIZE): Remove for the same reasons.
Adjust dependencies.
(_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS, _AC_INIT_VERSION,
_AC_INIT_PREPARE, _AC_CANONICAL_SPLIT, _AC_CHECK_TYPE_NEW,
_AC_CHECK_TYPE_OLD): Define via `define' instead of `AC_DEFUN':
they are not related to AC_REQUIRE in any way.
* acspecific.m4 (AC_PROG_ECHO, _AC_DECL_YYTEXT, _AC_PATH_X_XMKMF,
_AC_PATH_X_DIRECT): Define via `define' instead of `AC_DEFUN'.
2000-06-26 09:03:15 +00:00
Akim Demaille
32fbc9ac9d * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): Don't obsolete them, let
them be empty, so that Automake still provide support for $(EXEEXT).
2000-06-16 15:49:39 +00:00
Akim Demaille
acc29d58f3 * acspecific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Always initialize
$3 to no
2000-06-09 08:22:37 +00:00
Akim Demaille
3a6a9bb4f3 Import AC_SYS_LARGEFILE from largefile.m4 serial 12.
* acspecific.m4 (AC_SYS_LARGEFILE, _AC_SYS_LARGEFILE_MACRO_VALUE,
_AC_SYS_LARGEFILE_SOURCE): New.
* doc/autoconf.texi (System Services): Document AC_SYS_LARGEFILE.
2000-06-08 12:07:14 +00:00
Akim Demaille
9e00d56625 * acspecific.m4 (_AC_PATH_X_DIRECT): Include `X11/Intrinsic.h'
when trying to use `XtMalloc' to actually have a chance of
succeeding.
2000-06-07 07:07:01 +00:00
Akim Demaille
b1a16bbee3 Hard (code) X.
* acspecific.m4 (_AC_PATH_X_DIRECT): Hard code `X11/Intrinsic.h'
instead of using `ac_x_direct_test_include', likewise for `Xt' and
`ac_x_direct_test_lib', `XtMalloc' and
`ac_x_direct_test_function'.
2000-06-07 07:02:26 +00:00
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