+2000-04-07 Akim Demaille <akim@epita.fr>
+
+ 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 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_LANG_FUNC_LINK_TRY, AC_LANG_FUNC_LINK_TRY(C),
fi
])# AC_ISC_POSIX
-AC_DEFUNCT([AC_XENIX_DIR], [; instead use AC_HEADER_DIRENT])
-AC_DEFUNCT([AC_DYNIX_SEQ], [; instead use AC_FUNC_GETMNTENT])
-AC_DEFUNCT([AC_IRIX_SUN],
- [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])
-AC_DEFUNCT([AC_SCO_INTL], [; instead use AC_FUNC_STRFTIME])
+
+# AC_XENIX_DIR
+# ------------
+AU_DEFUN(AC_XENIX_DIR,
+[# You shouldn't need to depend upon XENIX. Remove this test if useless.
+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_HEADER_DIRENT[]dnl
+])
+
+
+# AC_DYNIX_SEQ
+# ------------
+AU_DEFUN([AC_DYNIX_SEQ], [AC_FUNC_GETMNTENT])
+
+
+# AC_IRIX_SUN
+# -----------
+AU_DEFUN([AC_IRIX_SUN],
+[AC_FUNC_GETMNTENT
+AC_CHECK_LIB(sun, getpwnam)])
+
+
+# AC_SCO_INTL
+# -----------
+AU_DEFUN([AC_SCO_INTL], [AC_FUNC_STRFTIME])
@defmac AC_DYNIX_SEQ
@maindex DYNIX_SEQ
If on Dynix/PTX (Sequent @sc{unix}), add @samp{-lseq} to output variable
-@code{LIBS}. This macro is obsolete; instead, use
-@code{AC_FUNC_GETMNTENT}.
+@code{LIBS}. This macro used to be defined as
+
+@example
+AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")
+@end example
+
+@noindent
+now it is just @code{AC_FUNC_GETMNTENT}.
@end defmac
@defmac AC_EXEEXT
@defmac AC_IRIX_SUN
@maindex IRIX_SUN
If on IRIX (Silicon Graphics @sc{unix}), add @samp{-lsun} to output
-variable @code{LIBS}. This macro is obsolete. If you were using it to
-get @code{getmntent}, use @code{AC_FUNC_GETMNTENT} instead. If you used
-it for the NIS versions of the password and group functions, use
-@samp{AC_CHECK_LIB(sun, getpwnam)}.
+@code{LIBS}. If you were using it to get @code{getmntent}, use
+@code{AC_FUNC_GETMNTENT} instead. If you used it for the NIS versions
+of the password and group functions, use @samp{AC_CHECK_LIB(sun,
+getpwnam)}. Up to Autoconf 2.13, it used to be
+
+@example
+AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS")
+@end example
+
+@noindent
+now it is defined as
+
+@example
+AC_FUNC_GETMNTENT
+AC_CHECK_LIB(sun, getpwnam)
+@end example
@end defmac
@defmac AC_LANG_C
@defmac AC_SCO_INTL
@maindex SCO_INTL
@ovindex LIBS
-If on SCO @sc{unix}, add @samp{-lintl} to output variable @code{LIBS}.
-Use @code{AC_FUNC_STRFTIME} instead.
+If on SCO UNIX, add @samp{-lintl} to output variable @code{LIBS}. This
+macro used to
+
+@example
+AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
+@end example
+
+@noindent
+now it just calls @code{AC_FUNC_STRFTIME} instead.
@end defmac
@defmac AC_SETVBUF_REVERSED
@defmac AC_XENIX_DIR
@maindex XENIX_DIR
@ovindex LIBS
-If on Xenix, add @samp{-lx} to output variable @code{LIBS}. Also, if
-@file{dirent.h} is being used, add @samp{-ldir} to @code{LIBS}. Use
-@code{AC_HEADER_DIRENT} instead.
+This macro used to add @samp{-lx} to output variable @code{LIBS} if on
+Xenix. Also, if @file{dirent.h} is being checked for, added
+@samp{-ldir} to @code{LIBS}. Now it is merely an alias of
+@code{AC_HEADER_DIRENT} instead, plus some code to detect whether
+running @sc{xenix} on which you should not depend:
+
+@example
+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=])
+@end example
@end defmac
@defmac AC_YYTEXT_POINTER
fi
])# AC_ISC_POSIX
-AC_DEFUNCT([AC_XENIX_DIR], [; instead use AC_HEADER_DIRENT])
-AC_DEFUNCT([AC_DYNIX_SEQ], [; instead use AC_FUNC_GETMNTENT])
-AC_DEFUNCT([AC_IRIX_SUN],
- [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])
-AC_DEFUNCT([AC_SCO_INTL], [; instead use AC_FUNC_STRFTIME])
+
+# AC_XENIX_DIR
+# ------------
+AU_DEFUN(AC_XENIX_DIR,
+[# You shouldn't need to depend upon XENIX. Remove this test if useless.
+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_HEADER_DIRENT[]dnl
+])
+
+
+# AC_DYNIX_SEQ
+# ------------
+AU_DEFUN([AC_DYNIX_SEQ], [AC_FUNC_GETMNTENT])
+
+
+# AC_IRIX_SUN
+# -----------
+AU_DEFUN([AC_IRIX_SUN],
+[AC_FUNC_GETMNTENT
+AC_CHECK_LIB(sun, getpwnam)])
+
+
+# AC_SCO_INTL
+# -----------
+AU_DEFUN([AC_SCO_INTL], [AC_FUNC_STRFTIME])
DISTCLEANFILES = atconfig testsuite
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = atconfig
-DIST_COMMON = Makefile.am Makefile.in atconfig.in
+DIST_COMMON = Makefile.am Makefile.in atconfig.in configure \
+configure.in
PACKAGE = @PACKAGE@
-dnl actest.m4 -*- autoconf -*-
-dnl Additional Autoconf macros to ease testing.
+# actest.m4 -*- autoconf -*-
+# Additional Autoconf macros to ease testing.
# join(SEP, ARG1, ARG2...)
# ------------------------
# Produce ARG1SEPARG2...SEPARGn.
-define(join,
+define([join],
[ifelse([$#], [1], [],
[$#], [2], [[$2]],
[[$2][$1]join([$1], m4_shift(m4_shift($@)))])])
# - _|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS
# Some variables some shells use and change
-AC_DEFUN(AC_ENV_SAVE,
+AC_DEFUN([AC_ENV_SAVE],
[(set) 2>&1 |
egrep -v -e \
'join([|],
[^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=],
[^(LIBS|LIBOBJS|LDFLAGS)=],
[^INSTALL(_(DATA|PROGRAM|SCRIPT))?=],
- [^(CYGWIN|ISC|MINGW32|MINIX|EMXOS2|EXEEXT|OBJEXT)=],
+ [^(CYGWIN|ISC|MINGW32|MINIX|EMXOS2|XENIX|EXEEXT|OBJEXT)=],
[^(X_(CFLAGS|(EXTRA_|PRE_)?LIBS)|x_(includes|libraries)|have_x)=],
[^(host|build|target)(_(alias|cpu|vendor|os))?=],
[^(cross_compiling)=],
# ----------------
# Related VALUE to NAME both with AC_SUBST and AC_DEFINE. This is
# used in the torture tests.
-AC_DEFUN(AC_DEFUBST,
+AC_DEFUN([AC_DEFUBST],
[AC_DUMMY_VAR($1)="AC_DEFUBST_VALUE"
AC_DEFINE_UNQUOTED(AC_DUMMY_VAR($1),
"$AC_DUMMY_VAR($1)",