]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_REVISION must not AC_REQUIRE AC_INIT, it leaves the diversions
authorAkim Demaille <akim@epita.fr>
Fri, 7 Jul 2000 10:54:01 +0000 (10:54 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 7 Jul 2000 10:54:01 +0000 (10:54 +0000)
in a messy state.  Don't even try to emulate AC_REQUIRE: just
introduce a diversion just for AC_REVISION, and let the magic
happen.
Fixes Autoconf PR/134, from Raja R Harinath.

* acgeneral.m4 (_AC_DIVERT(REVISION)): New diversion.
(AC_REVISION): Don't require AC_INIT, dump in your diversion.
(_AC_INIT): Delete, inline its body in...
(AC_INIT): here.
(_AC_INIT_NOTICE, _AC_INIT_COPYRIGHT): New macros so that...
(AC_INIT): be more uniform.
(AC_INIT, AC_REVISION, AC_COPYRIGHT): `define', don't AC_DEFUN.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index ec7e9b3a9b5e22e423773f8dd7642cb616989375..fa52e7b75d6276c3e67a3b20a9a6f06050d2b8b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2000-07-07  Akim Demaille  <akim@epita.fr>
+
+       AC_REVISION must not AC_REQUIRE AC_INIT, it leaves the diversions
+       in a messy state.  Don't even try to emulate AC_REQUIRE: just
+       introduce a diversion just for AC_REVISION, and let the magic
+       happen.
+       Fixes Autoconf PR/134, from Raja R Harinath.
+
+       * acgeneral.m4 (_AC_DIVERT(REVISION)): New diversion.
+       (AC_REVISION): Don't require AC_INIT, dump in your diversion.
+       (_AC_INIT): Delete, inline its body in...
+       (AC_INIT): here.
+       (_AC_INIT_NOTICE, _AC_INIT_COPYRIGHT): New macros so that...
+       (AC_INIT): be more uniform.
+       (AC_INIT, AC_REVISION, AC_COPYRIGHT): `define', don't AC_DEFUN.
+
 2000-07-07  Martin Wilck <martin@tropos.de>
 
        * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Keep -lm, if a Fortran
index 8ff13407e05bf8c8049a245b3949b1f9fabc450e..df3c17dbc8c66dc62af46d81624292a88c530d56 100644 (file)
@@ -69,6 +69,8 @@ define([sinclude], [builtin([sinclude], $@)])
 #
 # - BINSH
 #   AC_REQUIRE'd #! /bin/sh line
+# - REVISION
+#   Sent by AC_REVISION
 # - NOTICE
 #   copyright notice(s)
 # - DEFAULTS
@@ -125,9 +127,10 @@ define([sinclude], [builtin([sinclude], $@)])
 define([_AC_DIVERT(KILL)],           -1)
 
 define([_AC_DIVERT(BINSH)],           0)
-define([_AC_DIVERT(NOTICE)],          1)
-define([_AC_DIVERT(DEFAULTS)],        2)
-define([_AC_DIVERT(INIT_PARSE_ARGS)], 3)
+define([_AC_DIVERT(REVISION)],        1)
+define([_AC_DIVERT(NOTICE)],          2)
+define([_AC_DIVERT(DEFAULTS)],        3)
+define([_AC_DIVERT(INIT_PARSE_ARGS)], 4)
 
 define([_AC_DIVERT(HELP_BEGIN)],     10)
 define([_AC_DIVERT(HELP_CANON)],     11)
@@ -1043,23 +1046,22 @@ define([AC_PACKAGE_BUGREPORT], [$3])dnl
 # would have be to use m4_quote to force an evaluation:
 #
 #     patsubst(m4_quote($1), [^], [# ])
-AC_DEFUN([AC_COPYRIGHT],
+define([AC_COPYRIGHT],
 [AC_DIVERT([NOTICE],
 [patsubst([
 $1], [^], [@%:@ ])])dnl
 AC_DIVERT([VERSION_BEGIN],
 [
 $1])dnl
-])# _AC_INIT_COPYRIGHT
+])# AC_COPYRIGHT
 
 
 # AC_REVISION(REVISION-INFO)
 # --------------------------
-# The quote in the comment below is just to cope with font-lock-mode
+# The second quote in the translit is just to cope with font-lock-mode
 # which sees the opening of a string.
-AC_DEFUN([AC_REVISION],
-[AC_REQUIRE([AC_INIT])dnl
-AC_DIVERT([BINSH], [@%:@ From configure.in translit([$1], $")])dnl "
+define([AC_REVISION],
+[AC_DIVERT([REVISION], [@%:@ From configure.in translit([$1], $"")])dnl
 ])
 
 
@@ -1887,30 +1889,24 @@ AC_DIVERT_POP()dnl
 ])# _AC_INIT_PREPARE
 
 
-# _AC_INIT
-# --------
-# Include the user macro files, prepare the diversions, and output the
-# preamble of the `configure' script.
-define([_AC_INIT],
-[AC_DIVERT([BINSH], [@%:@! /bin/sh])
-_AC_INIT_DEFAULTS()dnl
-AC_DIVERT_POP()dnl to BODY
-_AC_INIT_PARSE_ARGS
-_AC_INIT_SRCDIR
-_AC_INIT_HELP
-_AC_INIT_VERSION
-_AC_INIT_PREPARE
-dnl AC_COPYRIGHT must be called after _AC_INIT_VERSION, since it dumps
-dnl into a diversion prepared by _AC_INIT_VERSION.
-AC_DIVERT([NOTICE],
+# _AC_INIT_NOTICE
+# ---------------
+define([_AC_INIT_NOTICE],
+[AC_DIVERT([NOTICE],
 [# Guess values for system-dependent variables and create Makefiles.
 @%:@ Generated by Autoconf AC_ACVERSION.])dnl
-AC_COPYRIGHT(
+])
+
+
+# _AC_INIT_COPYRIGHT
+# ------------------
+define([_AC_INIT_COPYRIGHT],
+[AC_COPYRIGHT(
 [Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.])dnl
-])# _AC_INIT
+])
 
 
 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
@@ -1926,13 +1922,24 @@ AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
 
 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
 # ----------------------------------------
-# Wrapper around _AC_INIT which guarantees _AC_INIT is expanded only
-# once.
+# Include the user macro files, prepare the diversions, and output the
+# preamble of the `configure' script.
 # Note that the order is important: first initialize, then set the
 # AC_CONFIG_SRCDIR.
-AC_DEFUN([AC_INIT],
+define([AC_INIT],
 [ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
-AC_EXPAND_ONCE([_AC_INIT()])dnl
+AC_DIVERT([BINSH], [@%:@! /bin/sh])
+_AC_INIT_DEFAULTS()dnl
+AC_DIVERT_POP()dnl to BODY
+_AC_INIT_PARSE_ARGS
+_AC_INIT_SRCDIR
+_AC_INIT_HELP
+_AC_INIT_VERSION
+_AC_INIT_PREPARE
+dnl _AC__INIT_COPYRIGHT must be called after _AC_INIT_VERSION, since
+dnl it dumps into a diversion prepared by _AC_INIT_VERSION.
+_AC_INIT_NOTICE
+_AC_INIT_COPYRIGHT
 ifval([$2], , [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
 ])
 
index 8ff13407e05bf8c8049a245b3949b1f9fabc450e..df3c17dbc8c66dc62af46d81624292a88c530d56 100644 (file)
@@ -69,6 +69,8 @@ define([sinclude], [builtin([sinclude], $@)])
 #
 # - BINSH
 #   AC_REQUIRE'd #! /bin/sh line
+# - REVISION
+#   Sent by AC_REVISION
 # - NOTICE
 #   copyright notice(s)
 # - DEFAULTS
@@ -125,9 +127,10 @@ define([sinclude], [builtin([sinclude], $@)])
 define([_AC_DIVERT(KILL)],           -1)
 
 define([_AC_DIVERT(BINSH)],           0)
-define([_AC_DIVERT(NOTICE)],          1)
-define([_AC_DIVERT(DEFAULTS)],        2)
-define([_AC_DIVERT(INIT_PARSE_ARGS)], 3)
+define([_AC_DIVERT(REVISION)],        1)
+define([_AC_DIVERT(NOTICE)],          2)
+define([_AC_DIVERT(DEFAULTS)],        3)
+define([_AC_DIVERT(INIT_PARSE_ARGS)], 4)
 
 define([_AC_DIVERT(HELP_BEGIN)],     10)
 define([_AC_DIVERT(HELP_CANON)],     11)
@@ -1043,23 +1046,22 @@ define([AC_PACKAGE_BUGREPORT], [$3])dnl
 # would have be to use m4_quote to force an evaluation:
 #
 #     patsubst(m4_quote($1), [^], [# ])
-AC_DEFUN([AC_COPYRIGHT],
+define([AC_COPYRIGHT],
 [AC_DIVERT([NOTICE],
 [patsubst([
 $1], [^], [@%:@ ])])dnl
 AC_DIVERT([VERSION_BEGIN],
 [
 $1])dnl
-])# _AC_INIT_COPYRIGHT
+])# AC_COPYRIGHT
 
 
 # AC_REVISION(REVISION-INFO)
 # --------------------------
-# The quote in the comment below is just to cope with font-lock-mode
+# The second quote in the translit is just to cope with font-lock-mode
 # which sees the opening of a string.
-AC_DEFUN([AC_REVISION],
-[AC_REQUIRE([AC_INIT])dnl
-AC_DIVERT([BINSH], [@%:@ From configure.in translit([$1], $")])dnl "
+define([AC_REVISION],
+[AC_DIVERT([REVISION], [@%:@ From configure.in translit([$1], $"")])dnl
 ])
 
 
@@ -1887,30 +1889,24 @@ AC_DIVERT_POP()dnl
 ])# _AC_INIT_PREPARE
 
 
-# _AC_INIT
-# --------
-# Include the user macro files, prepare the diversions, and output the
-# preamble of the `configure' script.
-define([_AC_INIT],
-[AC_DIVERT([BINSH], [@%:@! /bin/sh])
-_AC_INIT_DEFAULTS()dnl
-AC_DIVERT_POP()dnl to BODY
-_AC_INIT_PARSE_ARGS
-_AC_INIT_SRCDIR
-_AC_INIT_HELP
-_AC_INIT_VERSION
-_AC_INIT_PREPARE
-dnl AC_COPYRIGHT must be called after _AC_INIT_VERSION, since it dumps
-dnl into a diversion prepared by _AC_INIT_VERSION.
-AC_DIVERT([NOTICE],
+# _AC_INIT_NOTICE
+# ---------------
+define([_AC_INIT_NOTICE],
+[AC_DIVERT([NOTICE],
 [# Guess values for system-dependent variables and create Makefiles.
 @%:@ Generated by Autoconf AC_ACVERSION.])dnl
-AC_COPYRIGHT(
+])
+
+
+# _AC_INIT_COPYRIGHT
+# ------------------
+define([_AC_INIT_COPYRIGHT],
+[AC_COPYRIGHT(
 [Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.])dnl
-])# _AC_INIT
+])
 
 
 # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
@@ -1926,13 +1922,24 @@ AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
 
 # AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
 # ----------------------------------------
-# Wrapper around _AC_INIT which guarantees _AC_INIT is expanded only
-# once.
+# Include the user macro files, prepare the diversions, and output the
+# preamble of the `configure' script.
 # Note that the order is important: first initialize, then set the
 # AC_CONFIG_SRCDIR.
-AC_DEFUN([AC_INIT],
+define([AC_INIT],
 [ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
-AC_EXPAND_ONCE([_AC_INIT()])dnl
+AC_DIVERT([BINSH], [@%:@! /bin/sh])
+_AC_INIT_DEFAULTS()dnl
+AC_DIVERT_POP()dnl to BODY
+_AC_INIT_PARSE_ARGS
+_AC_INIT_SRCDIR
+_AC_INIT_HELP
+_AC_INIT_VERSION
+_AC_INIT_PREPARE
+dnl _AC__INIT_COPYRIGHT must be called after _AC_INIT_VERSION, since
+dnl it dumps into a diversion prepared by _AC_INIT_VERSION.
+_AC_INIT_NOTICE
+_AC_INIT_COPYRIGHT
 ifval([$2], , [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
 ])