]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (Obsolete Macros): Document `AU_DEFUN'.
authorAkim Demaille <akim@epita.fr>
Wed, 10 May 2000 15:39:22 +0000 (15:39 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 10 May 2000 15:39:22 +0000 (15:39 +0000)
Move the documentation of `AC_OBSOLETE' from here, to...
(Old Macros): here.
* acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV):
AU_DEFUN'd.

ChangeLog
acspecific.m4
doc/autoconf.texi
lib/autoconf/specific.m4

index e554e9bd8c740f9640ac33ca520c4b40d2e4dfe3..ef78ccfbdd5cbc435a105744ed9ab0b9a84ea197 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-05-10  Akim Demaille  <akim@epita.fr>
+
+       * doc/autoconf.texi (Obsolete Macros): Document `AU_DEFUN'.
+       Move the documentation of `AC_OBSOLETE' from here, to...
+       (Old Macros): here.
+       * acspecific.m4 (AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_RDEV):
+       AU_DEFUN'd.
+
 2000-05-10  Akim Demaille  <akim@epita.fr>
 
        * acgeneral.m4 (AC_LIBOBJ_DECL, AC_LIBOBJ): New macros.
index d9191635242629c89dd592d7aea64f47322dd5b8..79b43f32f2811cf0c40343e2c58347c6ed3c482b 100644 (file)
@@ -1768,11 +1768,11 @@ fi
 
 # AC_STRUCT_ST_BLKSIZE
 # --------------------
-AC_DEFUN(AC_STRUCT_ST_BLKSIZE,
-[AC_OBSOLETE([$0], [; replace it with
-  AC_CHECK_MEMBERS((struct stat.st_blksize))
-Please note that it will define `HAVE_STRUCT_STAT_ST_BLKSIZE',
-and not `HAVE_ST_BLKSIZE'.])dnl
+AU_DEFUN(AC_STRUCT_ST_BLKSIZE,
+[AC_WARNING([$0:
+        your code should no longer depend upon `HAVE_ST_BLKSIZE', but
+        `HAVE_STRUCT_STAT_ST_BLKSIZE'.  Remove this AC_WARNING and
+        the `AC_DEFINE' when you adjust the code.])
 AC_CHECK_MEMBERS((struct stat.st_blksize),
                   [AC_DEFINE(HAVE_ST_BLKSIZE, 1,
                              [Define if your `struct stat' has
@@ -1813,11 +1813,11 @@ AC_DEFUN(AC_STRUCT_ST_BLOCKS,
 
 # AC_STRUCT_ST_RDEV
 # -----------------
-AC_DEFUN(AC_STRUCT_ST_RDEV,
-[AC_OBSOLETE([$0], [; replace it with
-  AC_CHECK_MEMBERS((struct stat.st_rdev))
-Please note that it will define `HAVE_STRUCT_STAT_ST_RDEV',
-and not `HAVE_ST_RDEV'.])dnl
+AU_DEFUN(AC_STRUCT_ST_RDEV,
+[AC_WARNING([$0:
+        your code should no longer depend upon `HAVE_ST_RDEV', but
+        `HAVE_STRUCT_STAT_ST_RDEV'.  Remove this AC_WARNING and
+        the `AC_DEFINE' when you adjust the code.])
 AC_CHECK_MEMBERS((struct stat.st_rdev),
                   [AC_DEFINE(HAVE_ST_RDEV, 1,
                              [Define if your `struct stat' has `st_rdev'.
index 8fad5f77380a5d526a075fbd48ead3eb97bf851e..949d45357a90599e4752eb889ac20b90a5d5dcc2 100644 (file)
@@ -5722,22 +5722,22 @@ Often better ways of solving a particular problem are developed, or
 ad-hoc approaches are systematized.  This process has occurred in many
 parts of Autoconf.  One result is that some of the macros are now
 considered @dfn{obsolete}; they still work, but are no longer considered
-the best thing to do.  Autoconf provides the @code{AC_OBSOLETE} macro to
-warn users producing @code{configure} scripts when they use obsolete
-macros, to encourage them to modernize.  A sample call is:
+the best thing to do, hence they should be replaced with more modern
+macros.  Ideally, @code{autoupdate} should substitute the old macro calls
+with their modern implementation.
 
-@example
-AC_OBSOLETE([$0], [; use AC_CHECK_HEADERS(unistd.h) instead])dnl
-@end example
+Autoconf provides a simple means to obsolete a macro.
 
-@defmac AC_OBSOLETE (@var{this-macro-name}, @ovar{suggestion})
-@maindex OBSOLETE
-Make @code{m4} print a message on the standard error output warning that
-@var{this-macro-name} is obsolete, and giving the file and line number
-where it was called.  @var{this-macro-name} should be the name of the
-macro that is calling @code{AC_OBSOLETE}.  If @var{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 @var{this-macro-name}.
+@defmac AU_DEFUN (@var{old-macro}, @var{implementation}, @ovar{message})
+@maindex DEFUN
+@maindex AU_DEFUN
+Define @var{old-macro} as @var{implementation}.  The only difference
+with @code{AC_DEFUN} is that the user will be warned that
+@var{old-macro} is now obsolete.
+
+If she then uses @code{autoupdate}, the call to @var{old-macro} will be
+replaced by the modern @var{implementation}.  The additional
+@var{message} is then printed.
 @end defmac
 
 Supporting old macros can quickly become a maintenance nightmare, so the
@@ -7544,6 +7544,25 @@ AC_CONFIG_LINKS(host.h:config/$@{machine@}.h
 @code{AC_TYPE_MODE_T}
 @end defmac
 
+@defmac AC_OBSOLETE (@var{this-macro-name}, @ovar{suggestion})
+@maindex OBSOLETE
+Make @code{m4} print a message on the standard error output warning that
+@var{this-macro-name} is obsolete, and giving the file and line number
+where it was called.  @var{this-macro-name} should be the name of the
+macro that is calling @code{AC_OBSOLETE}.  If @var{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 @var{this-macro-name}.
+
+For instance
+
+@example
+AC_OBSOLETE([$0], [; use AC_CHECK_HEADERS(unistd.h) instead])dnl
+@end example
+
+You are encouraged to use @code{AU_DEFUN} instead, since it gives better
+services to the user.
+@end defmac
+
 @defmac AC_OFF_T
 @maindex OFF_T
 @code{AC_TYPE_OFF_T}
index d9191635242629c89dd592d7aea64f47322dd5b8..79b43f32f2811cf0c40343e2c58347c6ed3c482b 100644 (file)
@@ -1768,11 +1768,11 @@ fi
 
 # AC_STRUCT_ST_BLKSIZE
 # --------------------
-AC_DEFUN(AC_STRUCT_ST_BLKSIZE,
-[AC_OBSOLETE([$0], [; replace it with
-  AC_CHECK_MEMBERS((struct stat.st_blksize))
-Please note that it will define `HAVE_STRUCT_STAT_ST_BLKSIZE',
-and not `HAVE_ST_BLKSIZE'.])dnl
+AU_DEFUN(AC_STRUCT_ST_BLKSIZE,
+[AC_WARNING([$0:
+        your code should no longer depend upon `HAVE_ST_BLKSIZE', but
+        `HAVE_STRUCT_STAT_ST_BLKSIZE'.  Remove this AC_WARNING and
+        the `AC_DEFINE' when you adjust the code.])
 AC_CHECK_MEMBERS((struct stat.st_blksize),
                   [AC_DEFINE(HAVE_ST_BLKSIZE, 1,
                              [Define if your `struct stat' has
@@ -1813,11 +1813,11 @@ AC_DEFUN(AC_STRUCT_ST_BLOCKS,
 
 # AC_STRUCT_ST_RDEV
 # -----------------
-AC_DEFUN(AC_STRUCT_ST_RDEV,
-[AC_OBSOLETE([$0], [; replace it with
-  AC_CHECK_MEMBERS((struct stat.st_rdev))
-Please note that it will define `HAVE_STRUCT_STAT_ST_RDEV',
-and not `HAVE_ST_RDEV'.])dnl
+AU_DEFUN(AC_STRUCT_ST_RDEV,
+[AC_WARNING([$0:
+        your code should no longer depend upon `HAVE_ST_RDEV', but
+        `HAVE_STRUCT_STAT_ST_RDEV'.  Remove this AC_WARNING and
+        the `AC_DEFINE' when you adjust the code.])
 AC_CHECK_MEMBERS((struct stat.st_rdev),
                   [AC_DEFINE(HAVE_ST_RDEV, 1,
                              [Define if your `struct stat' has `st_rdev'.