+2000-07-10 Akim Demaille <akim@epita.fr>
+
+ * 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 Akim Demaille <akim@epita.fr>
* autoreconf.sh (debug): New variable.
[_AC_DEFUN_PRO([$1])$2[]_AC_DEFUN_EPI([$1])])])])
-# AC_DEFUNCT(NAME, COMMENT)
-# -------------------------
-# Declare the macro NAME no longer exists, and must not be used.
-define([AC_DEFUNCT],
-[define([$1], [AC_FATAL([$1] is defunct[$2])])])
-
-
# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
# ------------------------------------------
define([AC_OBSOLETE],
])# AC_PROG_LN_S
-AC_DEFUNCT([AC_RSH], [; replace it with equivalent code])
-
+# AC_RSH
+# ------
+# I don't know what it used to do, but it no longer does.
+AU_DEFUN([AC_RSH],
+[AC_WARNING([$0: is no longer supported.
+Remove this AC_WARNING when you adjust the code.])])
-# A few hasbeen'd macros.
+# A few obsolete macros.
-AC_DEFUNCT([AC_UNISTD_H], [; instead use AC_CHECK_HEADERS(unistd.h)])
+AU_DEFUN([AC_UNISTD_H],
+[AC_CHECK_HEADERS(unistd.h)])
-AC_DEFUNCT([AC_USG],
- [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])
-# If memchr and the like aren't declared in <string.h>, include <memory.h>.
-# To avoid problems, don't check for gcc2 built-ins.
-AC_DEFUNCT([AC_MEMORY_H],
- [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])
+# AU::AC_USG
+# ----------
+# Define `USG' if string functions are in strings.h.
+AU_DEFUN([AC_USG],
+[AC_WARNING([$0: Remove `AC_MSG_CHECKING', `AC_TRY_LINK' and this `AC_WARNING'
+when you ajust your code to use HAVE_STRING_H.])dnl
+AC_MSG_CHECKING([for BSD string and memory functions])
+AC_TRY_LINK([@%:@include <strings.h>], [rindex(0, 0); bzero(0, 0);],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ AC_DEFINE(USG, 1,
+ [Define if you do not have <strings.h>, index, bzero, etc...
+ This symbol is obsolete, you should not depend upon it.])])
+AC_CHECK_HEADERS(string.h)])
+
+
+# AU::AC_MEMORY_H
+# ---------------
+# To be precise this macro used to be:
+#
+# | AC_MSG_CHECKING(whether string.h declares mem functions)
+# | AC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no)
+# | AC_MSG_RESULT($ac_found)
+# | if test $ac_found = no; then
+# | AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)])
+# | fi
+#
+# But it is better to check for both headers, and alias NEED_MEMORY_H to
+# HAVE_MEMORY_H.
+AU_DEFUN([AC_MEMORY_H],
+[AC_WARNING([$0: Remove this `AC_WARNING' and
+`AC_CHECK_HEADER(memory.h, AC_DEFINE(...))' when you ajust your code to
+use and HAVE_STRING_H and HAVE_MEMORY_H, not NEED_MEMORY_H.])dnl
+AC_CHECK_HEADER(memory.h,
+ [AC_DEFINE([NEED_MEMORY_H], 1,
+ [Same as `HAVE_MEMORY_H', don't depend on me.])])
+AC_CHECK_HEADERS(string.h memory.h)
+])
+# AU::AC_DIR_HEADER
+# -----------------
# Like calling `AC_HEADER_DIRENT' and `AC_FUNC_CLOSEDIR_VOID', but
# defines a different set of C preprocessor macros to indicate which
-# header file is found. This macro and the names it defines are
-# considered obsolete.
-AC_DEFUNCT([AC_DIR_HEADER],
-[; instead use AC_HEADER_DIRENT])
+# header file is found.
+AU_DEFUN([AC_DIR_HEADER],
+[AC_HEADER_DIRENT
+AC_FUNC_CLOSEDIR_VOID
+AC_WARNING([$0: Remove this `AC_WARNING' and the four `AC_DEFINE' when you
+ajust your code to use `AC_HEADER_DIRENT'.])
+test ac_cv_header_dirent_dirent_h &&
+ AC_DEFINE([DIRENT], 1, [Same as `HAVE_DIRENT_H', don't depend on me.])
+test ac_cv_header_dirent_sys_ndir_h &&
+ AC_DEFINE([SYSNDIR], 1, [Same as `HAVE_SYS_NDIR_H', don't depend on me.])
+test ac_cv_header_dirent_sys_dir_h &&
+ AC_DEFINE([SYSDIR], 1, [Same as `HAVE_SYS_DIR_H', don't depend on me.])
+test ac_cv_header_dirent_ndir_h &&
+ AC_DEFINE([NDIR], 1, [Same as `HAVE_NDIR_H', don't depend on me.])
+])
fi
])
-# FIXME: AU_DEFUN these guys?
-AC_DEFUN([AC_TYPE_SIZE_T],
-[AC_CHECK_TYPE(size_t, unsigned)])
-AC_DEFUN([AC_TYPE_PID_T],
-[AC_CHECK_TYPE(pid_t, int)])
+AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned)])
+AC_DEFUN([AC_TYPE_PID_T], [AC_CHECK_TYPE(pid_t, int)])
+AC_DEFUN([AC_TYPE_OFF_T], [AC_CHECK_TYPE(off_t, long)])
+AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
+
-AC_DEFUN([AC_TYPE_OFF_T],
-[AC_CHECK_TYPE(off_t, long)])
+# AU::AC_INT_16_BITS
+# ------------------
+# What a great name :)
+AU_DEFUN([AC_INT_16_BITS],
+[AC_CHECK_SIZEOF([int])
+AC_WARNING([$0:
+ your code should no longer depend upon `INT_16_BITS', but upon
+ `SIZEOF_INT'. Remove this AC_WARNING and the `AC_DEFINE' when you
+ adjust the code.])dnl
+test $ac_check_sizeof_int = 2 &&
+ AC_DEFINE(INT_16_BITS, 1,
+ [Define if `sizeof (int)' = 2. Obsolete, use `SIZEOF_INT'.])
+])
-AC_DEFUN([AC_TYPE_MODE_T],
-[AC_CHECK_TYPE(mode_t, int)])
-AC_DEFUNCT([AC_INT_16_BITS], [; instead use AC_CHECK_SIZEOF(int)])
-AC_DEFUNCT([AC_LONG_64_BITS], [; instead use AC_CHECK_SIZEOF(long)])
+# AU::AC_LONG_64_BITS
+# -------------------
+AU_DEFUN([AC_LONG_64_BITS],
+[AC_CHECK_SIZEOF([long int])
+AC_WARNING([$0:
+ your code should no longer depend upon `LONG_64_BITS', but upon
+ `SIZEOF_LONG_INT'. Remove this AC_WARNING and the `AC_DEFINE' when
+ you adjust the code.])dnl
+test $ac_check_sizeof_long_int = 8 &&
+ AC_DEFINE(LONG_64_BITS, 1,
+ [Define if `sizeof (long int)' = 8. Obsolete, use
+ `SIZEOF_LONG_INT'.])
+])
# AC_TYPE_SIGNAL
])
-AC_DEFUNCT([AC_HAVE_POUNDBANG], [;use AC_SYS_INTERPRETER, taking no arguments])
-AC_DEFUNCT([AC_ARG_ARRAY], [; don't do unportable things with arguments])
+AU_DEFUN([AC_HAVE_POUNDBANG],
+[AC_SYS_INTERPRETER
+AC_WARNING([$0: Remove this warning when you adjust your code to use
+ `AC_SYS_INTERPRETER'.])])
+
+
+AU_DEFUN([AC_ARG_ARRAY],
+[AC_WARNING([$0: no longer implemented: don't do unportable things
+with arguments. Remove this warning when you adjust your code.])])
# _AC_SYS_LARGEFILE_SOURCE(PROLOGUE, BODY)
@end defmac
@defmac AC_DECL_YYTEXT
+@maindex DECL_YYTEXT
Does nothing, now integrated in @code{AC_PROG_LEX}.
@end defmac
+@defmac AC_DIR_HEADER
+@maindex DIR_HEADER
+@cvindex DIRENT
+@cvindex SYSNDIR
+@cvindex SYSDIR
+@cvindex NDIR
+Like calling @code{AC_FUNC_CLOSEDIR_VOID} and@code{AC_HEADER_DIRENT},
+but defines a different set of C preprocessor macros to indicate which
+header file is found:
+
+@multitable {@file{sys/ndir.h}} {Old Symbol} {@code{HAVE_SYS_NDIR_H}}
+@item Header @tab Old Symbol @tab New Symbol
+@item @file{dirent.h} @tab @code{DIRENT} @tab @code{HAVE_DIRENT_H}
+@item @file{sys/ndir.h} @tab @code{SYSNDIR} @tab @code{HAVE_SYS_NDIR_H}
+@item @file{sys/dir.h} @tab @code{SYSDIR} @tab @code{HAVE_SYS_DIR_H}
+@item @file{ndir.h} @tab @code{NDIR} @tab @code{HAVE_NDIR_H}
+@end multitable
+@end defmac
+
@defmac AC_DYNIX_SEQ
@maindex DYNIX_SEQ
If on Dynix/PTX (Sequent @sc{unix}), add @option{-lseq} to output variable
@code{AC_C_INLINE}
@end defmac
+@defmac AC_INT_16_BITS
+@maindex INT_16_BITS
+@cvindex INT_16_BITS
+If the C type @code{int} is 16 bits wide, define @code{INT_16_BITS}.
+Use @samp{AC_CHECK_SIZEOF(int)} instead.
+@end defmac
+
@defmac AC_IRIX_SUN
@maindex IRIX_SUN
If on IRIX (Silicon Graphics @sc{unix}), add @option{-lsun} to output
@code{AC_PROG_LN_S}
@end defmac
+@defmac AC_LONG_64_BITS
+@maindex LONG_64_BITS
+@cvindex LONG_64_BITS
+If the C type @code{long int} is 16 bits wide, define
+@code{LONG_64_BITS}. Use @samp{AC_CHECK_SIZEOF(long int)} instead.
+@end defmac
+
@defmac AC_LONG_DOUBLE
@maindex LONG_DOUBLE
@code{AC_C_LONG_DOUBLE}
@code{AC_HEADER_MAJOR}
@end defmac
+@defmac AC_MEMORY_H
+@maindex MEMORY_H
+@cvindex NEED_MEMORY_H
+Used to define @code{NEED_MEMORY_H} if the @code{mem} functions were
+defined in @file{memory.h}. Today it is equivalent to
+@samp{AC_CHECK_HEADERS(memory.h)}. Adjust your code to depend upon
+@code{HAVE_MEMORY_H}, not @code{NEED_MEMORY_H}, see @xref{Standard
+Symbols}.
+@end defmac
+
@defmac AC_MINGW32
@maindex MINGW32
Checked for the MingW32 compiler environment, in which case the shell
@defmac AC_RSH
@maindex RSH
-removed because of limited usefulness
+Removed because of limited usefulness.
@end defmac
@defmac AC_SCO_INTL
@code{AC_TYPE_UID_T}
@end defmac
+@defmac AC_UNISTD_H
+@maindex UNISTD_H
+Same as @samp{AC_CHECK_HEADERS(unistd.h)}.
+@end defmac
+
+@defmac AC_USG
+@maindex USG
+@cvindex USG
+Define @code{USG} if the @sc{bsd} string functions are defined in
+@file{strings.h}. You should no longer depend upon @code{USG}, but on
+@code{HAVE_STRING_H}, see @xref{Standard Symbols}.
+@end defmac
+
@defmac AC_UTIME_NULL
@maindex UTIME_NULL
@code{AC_FUNC_UTIME_NULL}
[_AC_DEFUN_PRO([$1])$2[]_AC_DEFUN_EPI([$1])])])])
-# AC_DEFUNCT(NAME, COMMENT)
-# -------------------------
-# Declare the macro NAME no longer exists, and must not be used.
-define([AC_DEFUNCT],
-[define([$1], [AC_FATAL([$1] is defunct[$2])])])
-
-
# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
# ------------------------------------------
define([AC_OBSOLETE],
])# AC_PROG_LN_S
-AC_DEFUNCT([AC_RSH], [; replace it with equivalent code])
-
+# AC_RSH
+# ------
+# I don't know what it used to do, but it no longer does.
+AU_DEFUN([AC_RSH],
+[AC_WARNING([$0: is no longer supported.
+Remove this AC_WARNING when you adjust the code.])])
-# A few hasbeen'd macros.
+# A few obsolete macros.
-AC_DEFUNCT([AC_UNISTD_H], [; instead use AC_CHECK_HEADERS(unistd.h)])
+AU_DEFUN([AC_UNISTD_H],
+[AC_CHECK_HEADERS(unistd.h)])
-AC_DEFUNCT([AC_USG],
- [; instead use AC_CHECK_HEADERS(string.h) and HAVE_STRING_H])
-# If memchr and the like aren't declared in <string.h>, include <memory.h>.
-# To avoid problems, don't check for gcc2 built-ins.
-AC_DEFUNCT([AC_MEMORY_H],
- [; instead use AC_CHECK_HEADERS(memory.h) and HAVE_MEMORY_H])
+# AU::AC_USG
+# ----------
+# Define `USG' if string functions are in strings.h.
+AU_DEFUN([AC_USG],
+[AC_WARNING([$0: Remove `AC_MSG_CHECKING', `AC_TRY_LINK' and this `AC_WARNING'
+when you ajust your code to use HAVE_STRING_H.])dnl
+AC_MSG_CHECKING([for BSD string and memory functions])
+AC_TRY_LINK([@%:@include <strings.h>], [rindex(0, 0); bzero(0, 0);],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ AC_DEFINE(USG, 1,
+ [Define if you do not have <strings.h>, index, bzero, etc...
+ This symbol is obsolete, you should not depend upon it.])])
+AC_CHECK_HEADERS(string.h)])
+
+
+# AU::AC_MEMORY_H
+# ---------------
+# To be precise this macro used to be:
+#
+# | AC_MSG_CHECKING(whether string.h declares mem functions)
+# | AC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no)
+# | AC_MSG_RESULT($ac_found)
+# | if test $ac_found = no; then
+# | AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)])
+# | fi
+#
+# But it is better to check for both headers, and alias NEED_MEMORY_H to
+# HAVE_MEMORY_H.
+AU_DEFUN([AC_MEMORY_H],
+[AC_WARNING([$0: Remove this `AC_WARNING' and
+`AC_CHECK_HEADER(memory.h, AC_DEFINE(...))' when you ajust your code to
+use and HAVE_STRING_H and HAVE_MEMORY_H, not NEED_MEMORY_H.])dnl
+AC_CHECK_HEADER(memory.h,
+ [AC_DEFINE([NEED_MEMORY_H], 1,
+ [Same as `HAVE_MEMORY_H', don't depend on me.])])
+AC_CHECK_HEADERS(string.h memory.h)
+])
+# AU::AC_DIR_HEADER
+# -----------------
# Like calling `AC_HEADER_DIRENT' and `AC_FUNC_CLOSEDIR_VOID', but
# defines a different set of C preprocessor macros to indicate which
-# header file is found. This macro and the names it defines are
-# considered obsolete.
-AC_DEFUNCT([AC_DIR_HEADER],
-[; instead use AC_HEADER_DIRENT])
+# header file is found.
+AU_DEFUN([AC_DIR_HEADER],
+[AC_HEADER_DIRENT
+AC_FUNC_CLOSEDIR_VOID
+AC_WARNING([$0: Remove this `AC_WARNING' and the four `AC_DEFINE' when you
+ajust your code to use `AC_HEADER_DIRENT'.])
+test ac_cv_header_dirent_dirent_h &&
+ AC_DEFINE([DIRENT], 1, [Same as `HAVE_DIRENT_H', don't depend on me.])
+test ac_cv_header_dirent_sys_ndir_h &&
+ AC_DEFINE([SYSNDIR], 1, [Same as `HAVE_SYS_NDIR_H', don't depend on me.])
+test ac_cv_header_dirent_sys_dir_h &&
+ AC_DEFINE([SYSDIR], 1, [Same as `HAVE_SYS_DIR_H', don't depend on me.])
+test ac_cv_header_dirent_ndir_h &&
+ AC_DEFINE([NDIR], 1, [Same as `HAVE_NDIR_H', don't depend on me.])
+])
fi
])
-# FIXME: AU_DEFUN these guys?
-AC_DEFUN([AC_TYPE_SIZE_T],
-[AC_CHECK_TYPE(size_t, unsigned)])
-AC_DEFUN([AC_TYPE_PID_T],
-[AC_CHECK_TYPE(pid_t, int)])
+AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned)])
+AC_DEFUN([AC_TYPE_PID_T], [AC_CHECK_TYPE(pid_t, int)])
+AC_DEFUN([AC_TYPE_OFF_T], [AC_CHECK_TYPE(off_t, long)])
+AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)])
+
-AC_DEFUN([AC_TYPE_OFF_T],
-[AC_CHECK_TYPE(off_t, long)])
+# AU::AC_INT_16_BITS
+# ------------------
+# What a great name :)
+AU_DEFUN([AC_INT_16_BITS],
+[AC_CHECK_SIZEOF([int])
+AC_WARNING([$0:
+ your code should no longer depend upon `INT_16_BITS', but upon
+ `SIZEOF_INT'. Remove this AC_WARNING and the `AC_DEFINE' when you
+ adjust the code.])dnl
+test $ac_check_sizeof_int = 2 &&
+ AC_DEFINE(INT_16_BITS, 1,
+ [Define if `sizeof (int)' = 2. Obsolete, use `SIZEOF_INT'.])
+])
-AC_DEFUN([AC_TYPE_MODE_T],
-[AC_CHECK_TYPE(mode_t, int)])
-AC_DEFUNCT([AC_INT_16_BITS], [; instead use AC_CHECK_SIZEOF(int)])
-AC_DEFUNCT([AC_LONG_64_BITS], [; instead use AC_CHECK_SIZEOF(long)])
+# AU::AC_LONG_64_BITS
+# -------------------
+AU_DEFUN([AC_LONG_64_BITS],
+[AC_CHECK_SIZEOF([long int])
+AC_WARNING([$0:
+ your code should no longer depend upon `LONG_64_BITS', but upon
+ `SIZEOF_LONG_INT'. Remove this AC_WARNING and the `AC_DEFINE' when
+ you adjust the code.])dnl
+test $ac_check_sizeof_long_int = 8 &&
+ AC_DEFINE(LONG_64_BITS, 1,
+ [Define if `sizeof (long int)' = 8. Obsolete, use
+ `SIZEOF_LONG_INT'.])
+])
# AC_TYPE_SIGNAL
])
-AC_DEFUNCT([AC_HAVE_POUNDBANG], [;use AC_SYS_INTERPRETER, taking no arguments])
-AC_DEFUNCT([AC_ARG_ARRAY], [; don't do unportable things with arguments])
+AU_DEFUN([AC_HAVE_POUNDBANG],
+[AC_SYS_INTERPRETER
+AC_WARNING([$0: Remove this warning when you adjust your code to use
+ `AC_SYS_INTERPRETER'.])])
+
+
+AU_DEFUN([AC_ARG_ARRAY],
+[AC_WARNING([$0: no longer implemented: don't do unportable things
+with arguments. Remove this warning when you adjust your code.])])
# _AC_SYS_LARGEFILE_SOURCE(PROLOGUE, BODY)