+1999-11-10 Akim Demaille <akim@epita.fr>
+
+ A test suite will be introduced which tries to run all the
+ specific macros, but hasbeen'd macro make configure die with bad
+ exit status. So we wish to distinguish live macros from defunct
+ macros at the moment they are AC_DEFUN'd, not in their body. Hm,
+ defunct, defunct... Hey! That's a good name!
+
+ * acgeneral.m4 (AC_DEFUNCT): New macro, comparable to AC_DEFUN,
+ but for macros which are no longer defined. Replaces AC_HASBEEN.
+ (AC_HASBEEN): Defunct. Well, removed in fact.
+ (AC_HAVE_LIBRARY): Don't use AC_DEFUN and AC_HASBEEN, just
+ AC_DEFUNCT.
+ * acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_DIR_HEADER,
+ AC_INT_16_BITS, AC_LONG_64_BITS): Likewise.
+ (AC_XENIX_DIR): It was defunct even before I declared it was: was
+ depending upon AC_DIR_HEADER which is defunct. So AC_DEFUNCT'ed
+ now.
+ (AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): While we're here, you
+ too are defunct now.
+ * autoconf.texi (Obsolete Macros): Replace the documentation of
+ AC_HASBEEN with that of AC_DEFUNCT.
+
1999-11-10 Akim Demaille <akim@epita.fr>
* autoconf.sh: Formatting changes.
define([$1], [AC_PRO([$1])$4[]AC_EPI()])])])
+dnl AC_DEFUNCT(NAME, COMMENT)
+dnl -------------------------
+dnl Declare the macro NAME no longer exists, and must not be used.
+define([AC_DEFUNCT],
+[define([$1], [AC_FATAL([$1] is defunct[$2])])])
+
+
+
dnl ### Some /bin/sh idioms
define(AC_OBSOLETE,
[AC_WARNING([$1] is obsolete[$2])])
-dnl AC_HASBEEN(THIS-MACRO-NAME [, SUGGESTION])
-dnl ------------------------------------------
-define(AC_HASBEEN,
-[AC_FATAL([$1] is obsolete[$2])])
-
dnl ### Generic structure checks
dnl AC_HAVE_LIBRARY
dnl ---------------
-AC_DEFUN(AC_HAVE_LIBRARY,
-[AC_HASBEEN([$0], [; instead use AC_CHECK_LIB])])
+AC_DEFUNCT(AC_HAVE_LIBRARY, [; instead use AC_CHECK_LIB])
dnl ### Examining declarations
dnl A few hasbeen'd macros.
-AC_DEFUN(AC_UNISTD_H,
-[AC_HASBEEN([$0], [; instead use AC_CHECK_HEADERS(unistd.h)])])
+AC_DEFUNCT(AC_UNISTD_H, [; instead use AC_CHECK_HEADERS(unistd.h)])
-AC_DEFUN(AC_USG,
-[AC_HASBEEN([$0],
- [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])])
+AC_DEFUNCT(AC_USG,
+ [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])
dnl If memchr and the like aren't declared in <string.h>, include <memory.h>.
dnl To avoid problems, don't check for gcc2 built-ins.
-AC_DEFUN(AC_MEMORY_H,
-[AC_HASBEEN([$0],
- [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])])
+AC_DEFUNCT(AC_MEMORY_H,
+ [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])
-AC_DEFUN(AC_DIR_HEADER,
-[AC_HASBEEN([$0], [; instead use AC_HEADER_DIRENT])])
+AC_DEFUNCT(AC_DIR_HEADER, [; instead use AC_HEADER_DIRENT])
dnl ### Checks for typedefs
])dnl AC_C_LONG_DOUBLE
-AC_DEFUN(AC_INT_16_BITS,
-[AC_HASBEEN([$0], [; instead use AC_CHECK_SIZEOF(int)])])
-
-AC_DEFUN(AC_LONG_64_BITS,
-[AC_HASBEEN([$0], [; instead use AC_CHECK_SIZEOF(long)])])
+AC_DEFUNCT(AC_INT_16_BITS, [; instead use AC_CHECK_SIZEOF(int)])
+AC_DEFUNCT(AC_LONG_64_BITS, [; instead use AC_CHECK_SIZEOF(long)])
dnl AC_C_BIGENDIAN
fi
])dnl AC_ISC_POSIX
-AC_DEFUN(AC_XENIX_DIR,
-[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl
-AC_REQUIRE([AC_DIR_HEADER])dnl
-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=])
-if test "$XENIX" = yes; then
- # Make sure -ldir precedes -lx.
- test $ac_header_dirent = dirent.h && LIBS="-ldir $LIBS"
- LIBS="$LIBS -lx"
-fi
-])dnl AC_XENIX_DIR
-
-AC_DEFUN(AC_DYNIX_SEQ,
-[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT])dnl
-AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")
-])
-
-AC_DEFUN(AC_IRIX_SUN,
-[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])dnl
-AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS")
-])
-
-AC_DEFUN(AC_SCO_INTL,
-[AC_OBSOLETE([$0], [; instead use AC_FUNC_STRFTIME])dnl
-AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
-])
+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])
intends to free the maintainer from this nightmare while still report an
error to the users.
-@defmac AC_HASBEEN (@var{this-macro-name} @r{[}, @var{suggestion}@r{]})
-@maindex HASBEEN
-This is a stronger version of @code{AC_OBSOLETE} to be used when a macro
-is no longer implemented: @code{autoconf} dies on each occurence of
-@code{AC_HASBEEN}. Macros which have been left obsolete for a long time
-are likely to use this mechanism.
+@defmac AC_DEFUNCT (@var{macro-name}, @ovar{suggestion})
+@maindex DEFUNCT
+Define @var{macro-name} to be a macro which is no longer supported,
+i.e., die as soon as it is used. This is the destiny of macros which
+have been left obsolete for a long time.
@end defmac
intends to free the maintainer from this nightmare while still report an
error to the users.
-@defmac AC_HASBEEN (@var{this-macro-name} @r{[}, @var{suggestion}@r{]})
-@maindex HASBEEN
-This is a stronger version of @code{AC_OBSOLETE} to be used when a macro
-is no longer implemented: @code{autoconf} dies on each occurence of
-@code{AC_HASBEEN}. Macros which have been left obsolete for a long time
-are likely to use this mechanism.
+@defmac AC_DEFUNCT (@var{macro-name}, @ovar{suggestion})
+@maindex DEFUNCT
+Define @var{macro-name} to be a macro which is no longer supported,
+i.e., die as soon as it is used. This is the destiny of macros which
+have been left obsolete for a long time.
@end defmac
define([$1], [AC_PRO([$1])$4[]AC_EPI()])])])
+dnl AC_DEFUNCT(NAME, COMMENT)
+dnl -------------------------
+dnl Declare the macro NAME no longer exists, and must not be used.
+define([AC_DEFUNCT],
+[define([$1], [AC_FATAL([$1] is defunct[$2])])])
+
+
+
dnl ### Some /bin/sh idioms
define(AC_OBSOLETE,
[AC_WARNING([$1] is obsolete[$2])])
-dnl AC_HASBEEN(THIS-MACRO-NAME [, SUGGESTION])
-dnl ------------------------------------------
-define(AC_HASBEEN,
-[AC_FATAL([$1] is obsolete[$2])])
-
dnl ### Generic structure checks
dnl AC_HAVE_LIBRARY
dnl ---------------
-AC_DEFUN(AC_HAVE_LIBRARY,
-[AC_HASBEEN([$0], [; instead use AC_CHECK_LIB])])
+AC_DEFUNCT(AC_HAVE_LIBRARY, [; instead use AC_CHECK_LIB])
dnl ### Examining declarations
dnl A few hasbeen'd macros.
-AC_DEFUN(AC_UNISTD_H,
-[AC_HASBEEN([$0], [; instead use AC_CHECK_HEADERS(unistd.h)])])
+AC_DEFUNCT(AC_UNISTD_H, [; instead use AC_CHECK_HEADERS(unistd.h)])
-AC_DEFUN(AC_USG,
-[AC_HASBEEN([$0],
- [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])])
+AC_DEFUNCT(AC_USG,
+ [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])
dnl If memchr and the like aren't declared in <string.h>, include <memory.h>.
dnl To avoid problems, don't check for gcc2 built-ins.
-AC_DEFUN(AC_MEMORY_H,
-[AC_HASBEEN([$0],
- [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])])
+AC_DEFUNCT(AC_MEMORY_H,
+ [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])
-AC_DEFUN(AC_DIR_HEADER,
-[AC_HASBEEN([$0], [; instead use AC_HEADER_DIRENT])])
+AC_DEFUNCT(AC_DIR_HEADER, [; instead use AC_HEADER_DIRENT])
dnl ### Checks for typedefs
])dnl AC_C_LONG_DOUBLE
-AC_DEFUN(AC_INT_16_BITS,
-[AC_HASBEEN([$0], [; instead use AC_CHECK_SIZEOF(int)])])
-
-AC_DEFUN(AC_LONG_64_BITS,
-[AC_HASBEEN([$0], [; instead use AC_CHECK_SIZEOF(long)])])
+AC_DEFUNCT(AC_INT_16_BITS, [; instead use AC_CHECK_SIZEOF(int)])
+AC_DEFUNCT(AC_LONG_64_BITS, [; instead use AC_CHECK_SIZEOF(long)])
dnl AC_C_BIGENDIAN
fi
])dnl AC_ISC_POSIX
-AC_DEFUN(AC_XENIX_DIR,
-[AC_OBSOLETE([$0], [; instead use AC_HEADER_DIRENT])dnl
-AC_REQUIRE([AC_DIR_HEADER])dnl
-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=])
-if test "$XENIX" = yes; then
- # Make sure -ldir precedes -lx.
- test $ac_header_dirent = dirent.h && LIBS="-ldir $LIBS"
- LIBS="$LIBS -lx"
-fi
-])dnl AC_XENIX_DIR
-
-AC_DEFUN(AC_DYNIX_SEQ,
-[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT])dnl
-AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")
-])
-
-AC_DEFUN(AC_IRIX_SUN,
-[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])dnl
-AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS")
-])
-
-AC_DEFUN(AC_SCO_INTL,
-[AC_OBSOLETE([$0], [; instead use AC_FUNC_STRFTIME])dnl
-AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
-])
+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])