[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: doc-upgrading-from-2.13.patch:wq
From: |
akim |
Subject: |
FYI: doc-upgrading-from-2.13.patch:wq |
Date: |
Sun, 24 Jun 2001 01:02:34 +0200 |
User-agent: |
Mutt/1.3.18i |
Index: ChangeLog
from Akim Demaille <address@hidden>
* acfunctions.m4 (AM_FUNC_ERROR_AT_LINE, AM_FUNC_FNMATCH)
(AM_FUNC_MKTIME, AM_FUNC_OBSTACK, AM_FUNC_STRTOD): Reactivated.
* doc/autoconf.texi (Autoconf 2.13): New section.
Index: NEWS
--- NEWS Sat, 23 Jun 2001 23:30:41 +0200 akim (ace/31_NEWS 1.44 644)
+++ NEWS Sun, 24 Jun 2001 00:58:05 +0200 akim (ace/31_NEWS 1.44 644)
@@ -7,6 +7,7 @@
is useful when writing strings that contain unbalanced quotes, or
other hard-to-quote constructs.
- m4_pattern_forbid, m4_pattern_allow
+- Tips for upgrading from 2.13.
** Default includes
- Now include stdint.h.
@@ -38,6 +39,10 @@
** Specific Macros
- AC_PATH_XTRA only adds -ldnet to $LIBS if it's needed to link.
- AC_FUNC_WAIT3 and AC_SYS_RESTARTABLE_SYSCALLS are obsoleted.
+- AM_FUNC_ERROR_AT_LINE, AM_FUNC_FNMATCH, AM_FUNC_MKTIME,
+ AM_FUNC_OBSTACK, and AM_FUNC_STRTOD are now activated.
+ Be sure to read `Upgrading from Version 2.13' to understand why
+ running `autoupdate' is needed.
* Major changes in Autoconf 2.50
Index: acfunctions.m4
--- acfunctions.m4 Sat, 23 Jun 2001 23:01:08 +0200 akim (ace/b/37_acfunction
1.21 644)
+++ acfunctions.m4 Sun, 24 Jun 2001 00:54:54 +0200 akim (ace/b/37_acfunction
1.21 644)
@@ -327,9 +327,7 @@ AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
# AU::AM_FUNC_ERROR_AT_LINE
# -------------------------
-# FIXME: Because Automake macros are defined with their name unquoted,
-# we can't yet provide the Autoupdate glue.
-# AU_ALIAS([AM_FUNC_ERROR_AT_LINE], [AC_FUNC_ERROR_AT_LINE])
+AU_ALIAS([AM_FUNC_ERROR_AT_LINE], [AC_FUNC_ERROR_AT_LINE])
# AC_FUNC_FNMATCH
@@ -361,9 +359,7 @@ AC_DEFUN([AC_FUNC_FNMATCH],
# AU::AM_FUNC_FNMATCH
# AU::fp_FUNC_FNMATCH
# -------------------
-# FIXME: Because Automake macros are defined with their name unquoted,
-# we can't yet provide the Autoupdate glue.
-# AU_ALIAS([AM_FUNC_FNMATCH], [AC_FUNC_FNMATCH])
+AU_ALIAS([AM_FUNC_FNMATCH], [AC_FUNC_FNMATCH])
AU_ALIAS([fp_FUNC_FNMATCH], [AC_FUNC_FNMATCH])
@@ -916,9 +912,7 @@ AC_DEFUN([AC_FUNC_MKTIME],
# AU::AM_FUNC_MKTIME
# ------------------
-# FIXME: Because Automake macros are defined with their name unquoted,
-# we can't yet provide the Autoupdate glue.
-# AU_ALIAS([AM_FUNC_MKTIME], [AC_FUNC_MKTIME])
+AU_ALIAS([AM_FUNC_MKTIME], [AC_FUNC_MKTIME])
# AC_FUNC_MMAP
@@ -1086,9 +1080,7 @@ AC_DEFUN([AC_FUNC_OBSTACK],
# AU::AM_FUNC_OBSTACK
# -------------------
-# FIXME: Because Automake macros are defined with their name unquoted,
-# we can't yet provide the Autoupdate glue.
-# AU_ALIAS([AM_FUNC_OBSTACK], [AC_FUNC_OBSTACK])
+AU_ALIAS([AM_FUNC_OBSTACK], [AC_FUNC_OBSTACK])
# AC_FUNC_SELECT_ARGTYPES
@@ -1249,9 +1241,7 @@ AC_DEFUN([AC_FUNC_STRTOD],
# AU::AM_FUNC_STRTOD
# ------------------
-# FIXME: Because Automake macros are defined with their name unquoted,
-# we can't yet provide the Autoupdate glue.
-# AU_ALIAS([AM_FUNC_STRTOD], [AC_FUNC_STRTOD])
+AU_ALIAS([AM_FUNC_STRTOD], [AC_FUNC_STRTOD])
# AC_FUNC_STRERROR_R
Index: doc/autoconf.texi
--- doc/autoconf.texi Sat, 23 Jun 2001 23:01:08 +0200 akim (ace/16_autoconf.t
1.61.2.112 644)
+++ doc/autoconf.texi Sun, 24 Jun 2001 00:53:57 +0200 akim (ace/16_autoconf.t
1.61.2.112 644)
@@ -157,8 +157,7 @@ @node Top, Introduction, (dir), (dir)
* M4 Macro Index:: Index of M4, M4sugar, and M4sh macros
* Concept Index:: General index
address@hidden
- --- The Detailed Node Listing ---
address@hidden --- The Detailed Node Listing ---
The GNU build system
@@ -373,6 +372,7 @@ @node Top, Introduction, (dir), (dir)
* autoupdate Invocation:: Automatic update of @file{configure.ac}
* Obsolete Macros:: Backward compatibility macros
* Autoconf 1:: Tips for upgrading your files
+* Autoconf 2.13:: Some fresher tips
Upgrading From Version 1
@@ -382,6 +382,11 @@ @node Top, Introduction, (dir), (dir)
* Changed Results:: Changes in how to check test results
* Changed Macro Writing:: Better ways to write your own macros
+Upgrading From Version 2.13
+
+* Changed Quotation:: Broken code which used to work
+* New Macros:: Interaction with foreign macros
+
Questions About Autoconf
* Distributing:: Distributing @code{configure} scripts
@@ -9436,6 +9441,7 @@ @node Obsolete Constructs, Questions, co
* autoupdate Invocation:: Automatic update of @file{configure.ac}
* Obsolete Macros:: Backward compatibility macros
* Autoconf 1:: Tips for upgrading your files
+* Autoconf 2.13::
@end menu
@node Obsolete config.status Use, acconfig.h, Obsolete Constructs, Obsolete
Constructs
@@ -10372,7 +10378,7 @@ @node Obsolete Macros, Autoconf 1, autou
@code{AC_DECL_YYTEXT}
@end defmac
address@hidden Autoconf 1, , Obsolete Macros, Obsolete Constructs
address@hidden Autoconf 1, Autoconf 2.13, Obsolete Macros, Obsolete Constructs
@section Upgrading From Version 1
Autoconf version 2 is mostly backward compatible with version 1.
@@ -10553,6 +10559,154 @@ @node Changed Macro Writing, , Changed
See whether any of your tests are of general enough usefulness to
encapsulate into macros that you can share.
+
address@hidden Autoconf 2.13, , Autoconf 1, Obsolete Constructs
address@hidden Upgrading From Version 2.13
+
+The introduction of the previous section (@pxref{Autoconf 1}) perfectly
+suits this section...
+
address@hidden
+Autoconf version 2.50 is mostly backward compatible with version 2.13.
+However, it introduces better ways to do some things, and doesn't
+support some of the ugly things in version 2.13. So, depending on how
+sophisticated your @file{configure.ac} files are, you might have to do
+some manual work in order to upgrade to version 2.50. This chapter
+points out some problems to watch for when upgrading. Also, perhaps
+your @code{configure} scripts could benefit from some of the new
+features in version 2.50; the changes are summarized in the file
address@hidden in the Autoconf distribution.
address@hidden quotation
+
address@hidden
+* Changed Quotation:: Broken code which used to work
+* New Macros:: Interaction with foreign macros
address@hidden menu
+
address@hidden Changed Quotation, New Macros, Autoconf 2.13, Autoconf 2.13
address@hidden Changed Quotation
+
+The most important changes are invisible to you: the implementation of
+most macros have completely changed. This allowed more factorization of
+the code, better error messages, a higher uniformity of the user's
+interface etc. Unfortunately, as a side effect, some construct which
+used to (miraculously) work might break starting with Autoconf 2.50.
+The most common culprit is bad quotation.
+
+For instance, in the following example, the message is not properly
+quoted:
+
address@hidden
+AC_INIT
+AC_CHECK_HEADERS(foo.h,,
+AC_MSG_ERROR(cannot find foo.h, bailing out))
+AC_OUTPUT
address@hidden example
+
address@hidden
+Autoconf 2.13 simply ignores it:
+
address@hidden
+$ autoconf-2.13; ./configure --silent
+creating cache ./config.cache
+configure: error: cannot find foo.h
+$
address@hidden example
+
address@hidden
+while Autoconf 2.50 will produce a broken @file{configure}:
+
address@hidden
+$ autoconf-2.50; ./configure --silent
+configure: error: cannot find foo.h
+./configure: exit: bad non-numeric arg `bailing'
+./configure: exit: bad non-numeric arg `bailing'
+$
address@hidden example
+
+The message needs to be quoted, and the @code{AC_MSG_ERROR} invocation
+too!
+
address@hidden
+AC_INIT
+AC_CHECK_HEADERS(foo.h,,
+ [AC_MSG_ERROR([cannot find foo.h, bailing out])])
+AC_OUTPUT
address@hidden example
+
+Many many (and many more) Autoconf macros were lacking proper quotation,
+including no less than... @code{AC_DEFUN} itself!
+
address@hidden
+$ cat configure.in
+AC_DEFUN([AC_PROG_INSTALL],
+[# My own much better version
+])
+AC_INIT
+AC_PROG_INSTALL
+AC_OUTPUT
+$ autoconf-2.13
+autoconf: Undefined macros:
+***BUG in Autoconf--please report*** AC_FD_MSG
+***BUG in Autoconf--please report*** AC_EPI
+configure.in:1:AC_DEFUN([AC_PROG_INSTALL],
+configure.in:5:AC_PROG_INSTALL
+$ autoconf-2.50
+$
address@hidden example
+
+
address@hidden New Macros, , Changed Quotation, Autoconf 2.13
address@hidden New Macros
+
address@hidden @code{undefined macro: _m4_divert_diversion}
+
+Because Autoconf has been dormant for years, Automake provided
+Autoconf-like macros for a while. Autoconf 2.50 now provides better
+versions of these macros, integrated in the @code{AC_} namespace,
+instead of @code{AM_}. But in order to ease the upgrading via
address@hidden, bindings to such @code{AM_} macros are provided.
+
+Unfortunately Automake did not quote the name of these macros!
+Therefore, when @command{m4} find in @file{aclocal.m4} something like
address@hidden(AM_TYPE_PTRDIFF_T, ...)}, @code{AM_TYPE_PTRDIFF_T} is
+expanded, replaced with its Autoconf definition.
+
+Fortunately Autoconf catches address@hidden expansions, and will
+complain, in its own words:
+
address@hidden
+$ cat configure.in
+AC_INIT
+AM_TYPE_PTRDIFF_T
+$ aclocal-1.4
+$ autoconf
+./aclocal.m4:17: error: m4_defn: undefined macro: _m4_divert_diversion
+actypes.m4:289: AM_TYPE_PTRDIFF_T is expanded from...
+./aclocal.m4:17: the top level
+$
address@hidden example
+
+Future versions of Automake will simply no longer define most of these
+macros, and will properly quote the names of the remaining macros.
+But you don't have to wait for it to happen to do the right thing right
+now: do not depend upon macros from Automake as it is simply not its job
+to provide macros (but the one it requires by itself):
+
address@hidden
+$ cat configure.in
+AC_INIT
+AM_TYPE_PTRDIFF_T
+$ rm aclocal.m4
+$ autoupdate
+autoupdate: `configure.in' is updated
+$ cat configure.in
+AC_INIT
+AC_CHECK_TYPES([ptrdiff_t])
+$ aclocal-1.4
+$ autoconf
+$
address@hidden example
@c ================================================ Questions About Autoconf.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: doc-upgrading-from-2.13.patch:wq,
akim <=