Commit Graph

327 Commits

Author SHA1 Message Date
Akim Demaille
f49bab6de6 Medium term goal: AC_ macros can be tested with -W obsolete.
* acgeneral.m4 (AC_RUN_IFELSE): Accept IF-CROSS-COMPILING.
(AC_TRY_RUN): Use it.
* acfunctions.m4: Start ousting AC_TRY_RUN and AC_TRY_COMPILE.
* acspecific.m4 (AC_AIX, AC_MINIX, AC_ISC_POSIX): AC_BEFORE on
AC_COMPILE_IFELSE and AC_RUN_IFELSE.
2001-01-18 09:16:39 +00:00
Akim Demaille
2b6bd63255 * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77))
(AC_PROG_CPP, AC_PROG_CXXCPP, AC_PROG_GCC_TRADITIONAL)
(_AC_PROG_CC_G, AC_PROG_CC_C_O, _AC_PROG_CXX_G, AC_PROG_CC_STDC):
Don't use `${CC-cc}' since now the AC_REQUIRE machinery guarantees
that $CC is defined.  And if not, it's a bug which must be
observable.
* acspecific.m4 (AC_SYS_LARGEFILE): Likewise.
2000-12-15 07:49:13 +00:00
Akim Demaille
9dc8609370 * acgeneral.m4 (_AC_PREPROC_IFELSE, AC_PREPROC_IFELSE): New.
(AC_TRY_CPP): Use AC_PREPROC_IFELSE.
(AC_CHECK_MEMBER, AC_CHECK_DECL, _AC_CHECK_TYPE_NEW): Quote
properly.
* acheaders.m4 (AC_CHECK_HEADER): Quote properly, use
AC_PREPROC_IFELSE.
* acspecific.m4 (_AC_PATH_X_DIRECT): Use AC_PREPROC_IFELSE.
2000-12-15 07:47:02 +00:00
Akim Demaille
6c3edbb4c4 Put back AC_CYGWIN etc. under the responsibility of the
configure.in maintainer, but discourage its use.
* acspecific.m4 (_AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2): Rename as...
(AC_CYGWIN, AC_MINGW32, AC_EMXOS2): these.
AU defined on top of AC_CANONICAL_HOST and $host_os.
* tests/mktests.sh (update_exclude_list): Add AC_CYGWIN,
AC_MINGW32, and AC_EMXOS2.
2000-12-14 09:39:33 +00:00
Akim Demaille
61231f5399 EXEEXT and OBJEXT don't need to know $CYGWIN etc.
* acspecific.m4 (AC_EXEEXT, AC_OBJEXT, _AC_EXEEXT, _AC_OBJEXT):
Move as...
* aclang.m4 (AC_EXEEXT, AC_OBJEXT, _AC_COMPILER_EXEEXT)
(_AC_COMPILER_OBJEXT): these.
(_AC_COMPILER_EXEEXT): Use _AC_LINK_IFELSE.
Don't depend upon $CYGWIN and the like.
(_AC_COMPILER_OBJEXT): Model after _AC_COMPILER_EXEEXT.
Skip more extensions.
Use _AC_COMPILE_IFELSE.
2000-12-13 12:36:54 +00:00
Akim Demaille
cce1813e74 * acspecific.m4 (_AC_EXEEXT): Skip *.pdb.
From Paul Berrevoets <paul@swi.com>.
2000-12-07 16:09:12 +00:00
Akim Demaille
5561d67cf9 * tests/atgeneral.m4 (AT_CHECK): Bad typo: assign `exit 1' to
at_continue if something failed, not `:'.
* tests/semantics.at (AC_PATH_XTRA): New.
* acspecific.m4 (_AC_PATH_X): New, extracted form AC_PATH_X.
2000-12-07 15:21:54 +00:00
Akim Demaille
cc458dbc82 * acspecific.m4 (_AC_OBJEXT, _AC_EXEEXT): Ignore .d files produced
by CFLAGS=-MD.
2000-12-05 18:15:44 +00:00
Akim Demaille
12a40aa45c * acspecific.m4 (_AC_EXEEXT): Also remove conftest$ac_exeext.
Reported by Pavel.
2000-11-30 16:22:30 +00:00
Akim Demaille
b9e9a0f95b * acspecific.m4 (_AC_EXEEXT, _AC_OBJEXT): Make the two macros more
alike: a loop over a sorted list of possible files.
Don't cleanup on errors, the trap will do it.
Cleanup when there are no errors.
(_AC_EXEEXT): Use the empty string instead of `no' as the cached
value.
Be sure to prefer `.exe' to `' when the two are observable.
Suggested by Lars and Earnie.
2000-11-30 15:24:13 +00:00
Akim Demaille
d4de67f987 * acspecific.m4 (_AC_OBJEXT): Skip *.tds, special case .o and
.obj.
Suggested by Lars.
2000-11-29 18:41:14 +00:00
Akim Demaille
7abc919fd0 * acgeneral.m4 (_AC_INIT_DEFAULTS) <ac_includes_default>: Include
sys/stat.h.
* acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_BLOCKS)
(AC_STRUCT_ST_RDEV): Simplify.
* acfunctions.m4 (AC_FUNC_MMAP): Include sys/stat.h unconditionally.
* doc/autoconf.texi (Default Includes): Adjust.
(Particular Structures) <AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV>:
Adjust.
2000-11-17 16:45:24 +00:00
Akim Demaille
eb0f047bb5 * acspecific.m4 (AC_SYS_LARGEFILE): _AC_SYS_LARGEFILE_SOURCE no
longer exist.
2000-11-16 10:30:02 +00:00
Akim Demaille
ae4c79d264 * m4/largefile.m4 (_AC_SYS_LARGEFILE_SOURCE): Remove, replaced by...
(_AC_SYS_LARGEFILE_TEST_INCLUDES): this.
(AC_SYS_LARGEFILE_MACRO_VALUE): Use AC_LANG_PROGRAM instead of
_AC_SYS_LARGEFILE_SOURCE, i.e., don't pass
_AC_SYS_LARGEFILE_TEST_INCLUDES by default: this isn't desirable
when checking for fseeko.
(AC_SYS_LARGEFILE): Pass AC_SYS_LARGEFILE_TEST_INCLUDES to
_AC_SYS_LARGEFILE_MACRO_VALUE, since it no longer does this for us.
2000-11-16 08:52:54 +00:00
Akim Demaille
d286d1d41e * acspecific.m4 (AC_SYS_LARGEFILE): Don't worry about
whether fseeko and ftello are properly declared.
* acfunctions.m4 (AC_FUNC_FSEEKO): New macro, which worries about
fseeko (and presumably ftello).  Do not set _XOPEN_SOURCE; that
causes too many problems in practice.
* acfunctions (fteelo, fseeko): Trigger AC_FUNC_FSEEKO.
* doc/autoconf.texi: Adjust.
2000-11-14 16:01:05 +00:00
Akim Demaille
300fbf12d3 Set AC_LANG_PREPROC_REQUIRE which replaces AC_REQUIRE_CPP.
The main difference is that the former requires AC_LANG_COMPILER.
* aclang (AC_LANG_PREPROC, AC_LANG_PREPROC(C), AC_LANG_PREPROC(C++))
(AC_LANG_PREPROC(Fortran 77), AC_LANG_PREPROC_REQUIRE): New
macros.  Issue a warning when looking for the Fortran 77
preprocessor instead of an error.
(AC_LANG_COMPILER): Check that it is run before the corresponding
AC_LANG_PREPROC.
(AC_PROG_C
(AC_LANG_COMPILER_REQUIRE): Don't call directly
AC_LANG_COMPILER(_AC_LANG), rather invoke AC_LANG_COMPILER so that
the generic code in AC_LANG_COMPILER is run.
(AC_REQUIRE_CPP): Use AC_LANG_PREPROC_REQUIRE.
(AC_PROG_CC, AC_PROG_CXX): Don't require being run before the
corresponding AC_LANG_PREPROC: AC_LANG_COMPILER does it.
Propagate AC_LANG_PREPROC_REQUIRE.
* acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP): Use it instead of
AC_REQUIRE_CPP.
* acspecific.m4 (_AC_DECL_YYTEXT, AC_PATH_X): Don't
AC_REQUIRE_CPP, inner macro will do it.
* aclang.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_STRINGIZE)
(AC_C_PROTOTYPES): Likewise.
(AC_C_STRINGIZE): Yeeks!  The body of AC_CACHE_CHECK was not
quoted.  Use @%:@ do assist Emacs.
For some reason (don't ask), this revamping revealed that
AC_PROG_CC_STDC, because of the `break', does not clean its tmp
files.
* aclang.m4 (AC_PROG_CC_STDC): Extract the creation of conftest.c
out of AC_COMPILE_IFELSE.
Be sure to clean the tmp files.
2000-11-14 10:44:27 +00:00
Akim Demaille
e555c2fb78 Create acheaders.m4.
* acgeneral.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS)
(AH_CHECK_HEADERS): Move to...
* acheaders.m4: here, a new file.
* acspecific.m4	(_AC_CHECK_HEADER_DIRENT, AH_CHECK_HEADERS_DIRENT)
(AC_HEADER_DIRENT, AC_HEADER_MAJOR, AC_HEADER_STAT, AC_HEADER_STDC)
(AC_HEADER_SYS_WAIT, AC_HEADER_TIME)
(_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H)
(_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_HEADER_TIOCGWINSZ): Move
to...
* acheaders.m4: here.
2000-11-14 10:31:39 +00:00
Pavel Roskin
edf0d70863 * acfunctions.m4 (AC_CHECK_FUNCS): Add missing m4 quotes.
(AC_FUNC_GETPGRP): Likewise.
* acspecific.m4 (AC_AIX): Likewise.
* m4/init.m4 (AM_INIT_AUTOMAKE): Likewise.
* m4/missing.m4 (AM_MISSING_PROG): Likewise.
* m4/sanity.m4 (AM_SANITY_CHECK): Likewise.
2000-11-11 07:05:02 +00:00
Pavel Roskin
03d06c0d47 * acfunctions.m4: Always quote first argument of AC_MSG_ERROR,
AC_MSG_WARN, AC_MSG_CHECKING, AC_MSG_RESULT,
AC_MSG_RESULT_UNQUOTED.
* acgeneral.m4: Likewise.
* aclang.m4: Likewise.
* acspecific.m4: Likewise.
* configure.in: Likewise.
* doc/autoconf.texi: Likewise.
2000-11-11 05:59:21 +00:00
Akim Demaille
ded24ff599 * autoconf.m4 (define): Reestablish only after having read the
`ac' files.
Adjust all the Autoconf code to use `m4_define', not `define'.
2000-11-03 13:41:40 +00:00
Pavel Roskin
a462c5c75e * acspecific.m4 (AC_PATH_XTRA): Use AC_LANG_PROGRAM() as the
argument to AC_LINK_IFELSE.
2000-10-31 04:47:23 +00:00
Akim Demaille
a14a5e7ca5 Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.

* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.

* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-25 17:51:10 +00:00
Pavel Roskin
0c101b88ae * acfunctions.m4 (AC_FUNC_CHOWN): Remove temporary files on exit.
(AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
        (AC_FUNC_SELECT_ARGTYPES): Likewise.
        (AC_FUNC_UTIME_NULL): Likewise.
        * acgeneral.m4 (_AC_COMPUTE_INT): Likewise.
        * aclang.m4 (_AC_F77_NAME_MANGLING): Likewise.
        * acspecific.m4 (_AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
2000-10-23 04:07:42 +00:00
Akim Demaille
11090b5d3c * acspecific.m4 (AC_PROG_LN_S): If neither ln -s' nor ln' work,
fall back to `cp'.
2000-10-18 11:05:32 +00:00
Akim Demaille
1e3cdfe0a3 * acgeneral.m4: Adjust copyright notice.
* acspecific.m4: Likewise.
* acoldnames.m4: Likewise.
* acversion.m4.in: Likewise.
* autoconf.sh: Likewise.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
* autoscan.pl: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
2000-10-16 18:25:55 +00:00
Pavel Roskin
3781fd0022 * acspecific.m4 (AC_PROG_LEX): Don't assume that lex exists.
Don't run _AC_DECL_YYTEXT if it doesn't. Always check libl and
libfl regardless of the $LEX value.
2000-10-12 20:46:23 +00:00
Akim Demaille
2499688c24 Macros used by AC_LANG_COMPILER macros shall not AC_REQUIRE
AC_LANG_COMPILER by the way of AC_COMPILE_IFELSE etc.
* acspecific.m4 (_AC_EXEEXT): Use _AC_LINK_IFELSE, not
AC_LINK_IFELSE to avoid AC_REQUIREing AC_PROG_CC which precisely
requires _AC_EXEEXT.
Don't run _AC_CYGWIN, _AC_MINGW32, _AC_EMXOS2.
* aclang.m4 (_AC_PROG_F77_G): Use _AC_COMPILE_IFELSE, not
AC_COMPILE_IFELSE.
(_AC_LANG_COMPILER_WORKS): Use _AC_LINK_IFELSE, not
AC_LINK_IFELSE.
2000-10-12 12:39:25 +00:00
Pavel Roskin
ff690f003f * acspecific.m4 (AC_PROG_LEX): Use AC_DEFUN_ONCE.
(AC_DECL_YYTEXT): Don't use AC_REQUIRE because autoupdate
would place it into configure.in but it's not allowed
outside AC_DEFUN.
2000-10-02 12:47:13 +00:00
Pavel Roskin
c865483335 * acfunctions.m4: Formatting fixes.
* acgeneral.m4: Likewise.
* aclang.m4: Likewise.
* acspecific.m4: Likewise.
* libm4.m4: Likewise.
2000-09-28 14:26:50 +00:00
Pavel Roskin
53e7a1a55a * acgeneral.m4 (AC_CHECK_PROG): Added protection against spaces
in $PATH.
* acspecific.m4 (AC_PROG_INSTALL): Likewise.
2000-09-27 18:17:36 +00:00
Pavel Roskin
3ad877f56d * acspecific.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Cache
variable wasn't always set inside AC_CACHE_CHECK.
(_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL): Likewise.
2000-09-20 13:01:44 +00:00
Akim Demaille
0c6d235eeb * acspecific.m4 (AC_PROG_INSTALL): Exclude c:install on AmigaOS. 2000-09-12 15:03:13 +00:00
Akim Demaille
d2cb51aef4 * acspecific.m4 (_AC_OBJEXT): No longer use AC_COMPILE_IFELSE,
which uses $ac_objext hence depends upon _AC_OBJEXT.
* aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call
_AC_EXEEXT before _AC_OBJEXT since the former needs $ac_objext.
2000-09-06 13:05:58 +00:00
Akim Demaille
5aa6b910ce * acspecific.m4 (_AC_EXEEXT): Set extension to void if linking
creates both an unsuffixed file and suffixed ones.
2000-09-06 13:03:08 +00:00
Akim Demaille
01383c4818 * acspecific.m4 (AC_PROG_RANLIB): Use AC_CHECK_TOOL.
* doc/autoconf.texi (Limitations of Usual Tools): Typos.
2000-08-04 09:21:52 +00:00
Akim Demaille
b1775923a8 Release Automake from being a substitute to Autoconf.
* acspecific.m4 (_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL, AC_HEADER_TIOCGWINSZ,
AC_SYS_POSIX_TERMIOS): New macros from both Automake and the
fileutils.
2000-08-02 17:40:25 +00:00
Akim Demaille
99d2fcb4af * acidentifiers: Catch ptrdiff_t.
* acspecific.m4 (AM_TYPE_PTRDIFF_T): AU define.
2000-08-01 11:14:48 +00:00
Akim Demaille
a1dde0367f Create acfunctions.m4, in charge of the macros related to
functions.

* acgeneral.m4 (AC_CHECK_FUNC, AC_CHECK_FUNCS, AC_REPLACE_FUNCS):
Move to...
* acfunctions.m4: here, new file.
* acspecific.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA, AC_FUNC_CHOWN,
AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETGROUPS,
_AC_LIBOBJ_GETLOADAVG, AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT,
AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK,
AC_FUNC_MALLOC, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP,
AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, _AC_FUNC_STAT,
AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, AC_FUNC_STRFTIME,
AC_FUNC_VFORK, AC_FUNC_VPRINTF, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL,
AC_FUNC_STRCOLL, AC_FUNC_SETVBUF_REVERSED): Likewise.
* Makefile.am: Adjust.

Move also the old definitions into acfunctions.m4, and adjust the
test suite.

* acgeneral.m4 (AU_ALIAS): New macro.
* acoldnames (AC_FUNC_CHECK, AC_HAVE_FUNCS, AC_ALLOCA,
AC_GETLOADAVG, AC_MMAP, AC_SETVBUF_REVERSED, AC_STRCOLL,
AC_UTIME_NULL, AC_VFORK, AC_VPRINTF, AC_WAIT3, AM_FUNC_FNMATCH,
AM_FUNC_MKTIME, fp_FUNC_FNMATCH): Move to...
* acfunctions.m4: here, using AU_ALIAS.
* acgeneral.m4 (AC_FD_CC, AC_CANONICAL_SYSTEM): Use AU_ALIAS to
define them.
* acoldnames.m4: Use AU_ALIAS instead of AU_DEFUN.
* tests/Makefile.am (MACRO_FILES): Adjust.
2000-08-01 10:13:14 +00:00
Akim Demaille
b3f7ddf817 Warnings related to obsolete constructs should be properly
classified.

* acspecific.m4 (AC_RSH, AC_USG, AC_MEMORY_H, AC_DIR_HEADER,
AC_INT_16_BITS, AC_LONG_64_BITS, AC_STRUCT_ST_BLKSIZE,
AC_STRUCT_ST_RDEV, AC_HAVE_POUNDBANG, AC_ARG_ARRAY): Use
`AC_DIAGNOSE(obsolete, ...)' instead of `AC_WARNING'.
2000-07-19 09:20:57 +00:00
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