Node:Obsolete Macros, Next:Autoconf 1, Previous:autoupdate Invocation, Up:Obsolete Constructs
Several macros are obsoleted in Autoconf, for various reasons (typically they failed to quote properly, couldn't be extended for more recent issues etc.). They are still supported, but deprecated: their use should be avoided.
During the jump from Autoconf version 1 to version 2, most of the macros were renamed to use a more uniform and descriptive naming scheme, but their signature did not change. See Macro Names, for a description of the new naming scheme. Below, there is just the mapping from old names to new names for these macros, the reader is invited to refer to the definition of the new macro for the signature and the description.
AC_ALLOCA | Macro |
AC_FUNC_ALLOCA
|
AC_ARG_ARRAY | Macro |
removed because of limited usefulness |
AC_C_CROSS | Macro |
This macro is obsolete; it does nothing. |
AC_CANONICAL_SYSTEM | Macro |
Determine the system type and set output variables to the names of the
canonical system types. See Canonicalizing, for details about the
variables this macro sets.
The user is encouraged to use either |
AC_CHAR_UNSIGNED | Macro |
AC_C_CHAR_UNSIGNED
|
AC_CHECK_TYPE (type, default) | Macro |
Autoconf, up to 2.13, used to provide this version of
AC_CHECK_TYPE , deprecated because of its flaws. Firstly, although
it is a member of the CHECK clan, singular sub-family, it does
more than just checking. Second, missing types are not
typedef 'd, they are #define 'd, which can lead to
incompatible code in the case of pointer types.
This use of If the type type is not defined, define it to be the C (or C++)
builtin type default; e.g., This macro is equivalent to:
AC_CHECK_TYPE([type], [AC_DEFINE([type], [default], [Define to `default' if <sys/types.h> does not define.])]) In order to keep backward compatibility, the two versions of
You are encouraged either to use a valid builtin type, or to use the
equivalent modern code (see above), or better yet, to use
#if !HAVE_LOFF_T typedef loff_t off_t; #endif |
AC_CHECKING (feature-description) | Macro |
Same as AC_MSG_NOTICE([checking feature-description...] .
|
AC_COMPILE_CHECK (echo-text, includes, function-body, action-if-found, [action-if-not-found]) | Macro |
This is an obsolete version of AC_TRY_LINK (see Examining Libraries), with the addition that it prints checking for
echo-text to the standard output first, if echo-text is
non-empty. Use AC_MSG_CHECKING and AC_MSG_RESULT instead
to print messages (see Printing Messages).
|
AC_CONST | Macro |
AC_C_CONST
|
AC_CROSS_CHECK | Macro |
Same as AC_C_CROSS , which is obsolete too, and does nothing
:-) .
|
AC_CYGWIN | Macro |
Check for the Cygwin environment in which case the shell variable
CYGWIN is set to yes . Don't use this macro, the dignified
means to check the nature of the host is using
AC_CANONICAL_HOST . As a matter of fact this macro is defined as:
AC_REQUIRE([AC_CANONICAL_HOST])[]dnl case $host_os in *cygwin* ) CYGWIN=yes;; * ) CYGWIN=no;; esac Beware that the variable |
AC_DECL_YYTEXT | Macro |
Does nothing, now integrated in AC_PROG_LEX .
|
AC_DIR_HEADER | Macro |
Like calling AC_FUNC_CLOSEDIR_VOID andAC_HEADER_DIRENT ,
but defines a different set of C preprocessor macros to indicate which
header file is found:
|
AC_DYNIX_SEQ | Macro |
If on Dynix/PTX (Sequent UNIX), add -lseq to output variable
LIBS . This macro used to be defined as
AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS") now it is just |
AC_EXEEXT | Macro |
Defined the output variable EXEEXT based on the output of the
compiler, which is now done automatically. Typically set to empty
string if Unix and .exe if Win32 or OS/2.
|
AC_EMXOS2 | Macro |
Similar to AC_CYGWIN but checks for the EMX environment on OS/2
and sets EMXOS2 .
|
AC_ERROR | Macro |
AC_MSG_ERROR
|
AC_FIND_X | Macro |
AC_PATH_X
|
AC_FIND_XTRA | Macro |
AC_PATH_XTRA
|
AC_FUNC_CHECK | Macro |
AC_CHECK_FUNC
|
AC_FUNC_WAIT3 | Macro |
If wait3 is found and fills in the contents of its third argument
(a struct rusage * ), which HP-UX does not do, define
HAVE_WAIT3 .
These days portable programs should use |
AC_GCC_TRADITIONAL | Macro |
AC_PROG_GCC_TRADITIONAL
|
AC_GETGROUPS_T | Macro |
AC_TYPE_GETGROUPS
|
AC_GETLOADAVG | Macro |
AC_FUNC_GETLOADAVG
|
AC_HAVE_FUNCS | Macro |
AC_CHECK_FUNCS
|
AC_HAVE_HEADERS | Macro |
AC_CHECK_HEADERS
|
AC_HAVE_LIBRARY (library, [action-if-found], [action-if-not-found], [other-libraries]) | Macro |
This macro is equivalent to calling AC_CHECK_LIB with a
function argument of main . In addition, library can
be written as any of foo , -lfoo , or libfoo.a . In
all of those cases, the compiler is passed -lfoo . However,
library cannot be a shell variable; it must be a literal name.
|
AC_HAVE_POUNDBANG | Macro |
AC_SYS_INTERPRETER (different calling convention)
|
AC_HEADER_CHECK | Macro |
AC_CHECK_HEADER
|
AC_HEADER_EGREP | Macro |
AC_EGREP_HEADER
|
AC_INIT (unique-file-in-source-dir) | Macro |
Formerly AC_INIT used to have a single argument, and was
equivalent to:
AC_INIT AC_CONFIG_SRCDIR(unique-file-in-source-dir) |
AC_INLINE | Macro |
AC_C_INLINE
|
AC_INT_16_BITS | Macro |
If the C type int is 16 bits wide, define INT_16_BITS .
Use AC_CHECK_SIZEOF(int) instead.
|
AC_IRIX_SUN | Macro |
If on IRIX (Silicon Graphics UNIX), add -lsun to output
LIBS . If you were using it to get getmntent , use
AC_FUNC_GETMNTENT instead. If you used it for the NIS versions
of the password and group functions, use AC_CHECK_LIB(sun,
getpwnam) . Up to Autoconf 2.13, it used to be
AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS") now it is defined as
AC_FUNC_GETMNTENT AC_CHECK_LIB(sun, getpwnam) |
AC_LANG_C | Macro |
Same as AC_LANG(C) .
|
AC_LANG_CPLUSPLUS | Macro |
Same as AC_LANG(C++) .
|
AC_LANG_FORTRAN77 | Macro |
Same as AC_LANG(Fortran 77) .
|
AC_LANG_RESTORE | Macro |
Select the language that is saved on the top of the stack, as set
by AC_LANG_SAVE , remove it from the stack, and call
AC_LANG(language) .
|
AC_LANG_SAVE | Macro |
Remember the current language (as set by AC_LANG ) on a stack.
The current language does not change. AC_LANG_PUSH is preferred.
|
AC_LINK_FILES (source..., dest...) | Macro |
This is an obsolete version of AC_CONFIG_LINKS . An updated
version of:
AC_LINK_FILES(config/$machine.h config/$obj_format.h, host.h object.h) is:
AC_CONFIG_LINKS(host.h:config/$machine.h object.h:config/$obj_format.h) |
AC_LN_S | Macro |
AC_PROG_LN_S
|
AC_LONG_64_BITS | Macro |
Define LONG_64_BITS if the C type long int is 64 bits wide.
Use the generic macro AC_CHECK_SIZEOF([long int]) instead.
|
AC_LONG_DOUBLE | Macro |
AC_C_LONG_DOUBLE
|
AC_LONG_FILE_NAMES | Macro |
AC_SYS_LONG_FILE_NAMES
|
AC_MAJOR_HEADER | Macro |
AC_HEADER_MAJOR
|
AC_MEMORY_H | Macro |
Used to define NEED_MEMORY_H if the mem functions were
defined in memory.h . Today it is equivalent to
AC_CHECK_HEADERS(memory.h) . Adjust your code to depend upon
HAVE_MEMORY_H , not NEED_MEMORY_H , see See Standard Symbols.
|
AC_MINGW32 | Macro |
Similar to AC_CYGWIN but checks for the MingW32 compiler
environment and sets MINGW32 .
|
AC_MINUS_C_MINUS_O | Macro |
AC_PROG_CC_C_O
|
AC_MMAP | Macro |
AC_FUNC_MMAP
|
AC_MODE_T | Macro |
AC_TYPE_MODE_T
|
AC_OBJEXT | Macro |
Defined the output variable OBJEXT based on the output of the
compiler, after .c files have been excluded. Typically set to o
if Unix, obj if Win32. Now the compiler checking macros handle
this automatically.
|
AC_OBSOLETE (this-macro-name, [suggestion]) | Macro |
Make m4 print a message to the standard error output warning that
this-macro-name is obsolete, and giving the file and line number
where it was called. this-macro-name should be the name of the
macro that is calling AC_OBSOLETE . If suggestion is given,
it is printed at the end of the warning message; for example, it can be
a suggestion for what to use instead of this-macro-name.
For instance
AC_OBSOLETE([$0], [; use AC_CHECK_HEADERS(unistd.h) instead])dnl You are encouraged to use |
AC_OFF_T | Macro |
AC_TYPE_OFF_T
|
AC_OUTPUT ([file]..., [extra-cmds], [init-cmds]) | Macro |
The use of AC_OUTPUT with argument is deprecated, this obsoleted
interface is equivalent to:
AC_CONFIG_FILES(file...) AC_CONFIG_COMMANDS([default], extra-cmds, init-cmds) AC_OUTPUT |
AC_OUTPUT_COMMANDS (extra-cmds, [init-cmds]) | Macro |
Specify additional shell commands to run at the end of
config.status , and shell commands to initialize any variables
from configure . This macro may be called multiple times. It is
obsolete, replaced by AC_CONFIG_COMMANDS .
Here is an unrealistic example:
fubar=27 AC_OUTPUT_COMMANDS([echo this is extra $fubar, and so on.], [fubar=$fubar]) AC_OUTPUT_COMMANDS([echo this is another, extra, bit], [echo init bit]) Aside from the fact that AC_CONFIG_COMMANDS(foo, [my_FOO()]) conversely, where one level of quoting was enough for literal strings
with AC_OUTPUT_COMMANDS([echo "Square brackets: []"]) AC_CONFIG_COMMANDS([default], [[echo "Square brackets: []"]]) |
AC_PID_T | Macro |
AC_TYPE_PID_T
|
AC_PREFIX | Macro |
AC_PREFIX_PROGRAM
|
AC_PROGRAMS_CHECK | Macro |
AC_CHECK_PROGS
|
AC_PROGRAMS_PATH | Macro |
AC_PATH_PROGS
|
AC_PROGRAM_CHECK | Macro |
AC_CHECK_PROG
|
AC_PROGRAM_EGREP | Macro |
AC_EGREP_CPP
|
AC_PROGRAM_PATH | Macro |
AC_PATH_PROG
|
AC_REMOTE_TAPE | Macro |
removed because of limited usefulness |
AC_RESTARTABLE_SYSCALLS | Macro |
AC_SYS_RESTARTABLE_SYSCALLS
|
AC_RETSIGTYPE | Macro |
AC_TYPE_SIGNAL
|
AC_RSH | Macro |
Removed because of limited usefulness. |
AC_SCO_INTL | Macro |
If on SCO UNIX, add -lintl to output variable LIBS . This
macro used to
AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS") now it just calls |
AC_SETVBUF_REVERSED | Macro |
AC_FUNC_SETVBUF_REVERSED
|
AC_SET_MAKE | Macro |
AC_PROG_MAKE_SET
|
AC_SIZEOF_TYPE | Macro |
AC_CHECK_SIZEOF
|
AC_SIZE_T | Macro |
AC_TYPE_SIZE_T
|
AC_STAT_MACROS_BROKEN | Macro |
AC_HEADER_STAT
|
AC_STDC_HEADERS | Macro |
AC_HEADER_STDC
|
AC_STRCOLL | Macro |
AC_FUNC_STRCOLL
|
AC_ST_BLKSIZE | Macro |
AC_STRUCT_ST_BLKSIZE
|
AC_ST_BLOCKS | Macro |
AC_STRUCT_ST_BLOCKS
|
AC_ST_RDEV | Macro |
AC_STRUCT_ST_RDEV
|
AC_SYS_RESTARTABLE_SYSCALLS | Macro |
If the system automatically restarts a system call that is interrupted
by a signal, define HAVE_RESTARTABLE_SYSCALLS . This macro does
not check if system calls are restarted in general-it tests whether a
signal handler installed with signal (but not sigaction )
causes system calls to be restarted. It does not test if system calls
can be restarted when interrupted by signals that have no handler.
These days portable programs should use |
AC_SYS_SIGLIST_DECLARED | Macro |
AC_DECL_SYS_SIGLIST
|
AC_TEST_CPP | Macro |
AC_TRY_CPP
|
AC_TEST_PROGRAM | Macro |
AC_TRY_RUN
|
AC_TIMEZONE | Macro |
AC_STRUCT_TIMEZONE
|
AC_TIME_WITH_SYS_TIME | Macro |
AC_HEADER_TIME
|
AC_UID_T | Macro |
AC_TYPE_UID_T
|
AC_UNISTD_H | Macro |
Same as AC_CHECK_HEADERS(unistd.h) .
|
AC_USG | Macro |
Define USG if the BSD string functions are defined in
strings.h . You should no longer depend upon USG , but on
HAVE_STRING_H , see See Standard Symbols.
|
AC_UTIME_NULL | Macro |
AC_FUNC_UTIME_NULL
|
AC_VALIDATE_CACHED_SYSTEM_TUPLE ([cmd]) | Macro |
If the cache file is inconsistent with the current host, target and
build system types, it used to execute cmd or print a default
error message.
This is now handled by default. |
AC_VERBOSE (result-description) | Macro |
AC_MSG_RESULT .
|
AC_VFORK | Macro |
AC_FUNC_VFORK
|
AC_VPRINTF | Macro |
AC_FUNC_VPRINTF
|
AC_WAIT3 | Macro |
AC_FUNC_WAIT3
|
AC_WARN | Macro |
AC_MSG_WARN
|
AC_WORDS_BIGENDIAN | Macro |
AC_C_BIGENDIAN
|
AC_XENIX_DIR | Macro |
This macro used to add -lx to output variable LIBS if on
Xenix. Also, if dirent.h is being checked for, added
-ldir to LIBS . Now it is merely an alias of
AC_HEADER_DIRENT instead, plus some code to detect whether
running XENIX on which you should not depend:
AC_MSG_CHECKING([for Xenix]) AC_EGREP_CPP(yes, [#if defined M_XENIX && !defined M_UNIX yes #endif], [AC_MSG_RESULT([yes]); XENIX=yes], [AC_MSG_RESULT([no]); XENIX=]) |
AC_YYTEXT_POINTER | Macro |
AC_DECL_YYTEXT
|