> On Fri, March 21, 2008 14:02, Eric Blake wrote:
> > Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:

> >> +          _AM_COND_IF => 1,
> >> +          _AM_COND_ELSE => 1,
> >> +          _AM_COND_ENDIF => 1,
> >
> > Based on your question about trace order, should this section be modified
> > to take macro invocation depth into account to work around underquoted
> > usage?

Well, I guess the cheapest way to cope with underquoted usage is to
error out when the macro depth is not 1, right?

Updated patch below.  This moves the new macro code into m4/cond-if.m4
(no need to add bloat to all those aclocal.m4 files that don't need
AM_COND_IF), incorporates your review suggestions (I already added the
@ovar macro in an earlier patch), and adds a number of tests that should
expose underquotation, and other inconsistencies.

Note that both the second and third argument of AM_COND_IF are optional.

WDYT?

I think I have a followup patch to address the FIXME.

Cheers,
Ralf

    Implement conditional AC_CONFIG_FILES: AM_COND_IF.
    
    * automake.in (%ac_config_files_condition): New.
    (scan_autoconf_config_files): Record condition if any.
    (scan_autoconf_traces): Trace _AM_COND_IF, _AM_COND_ELSE,
    _AM_COND_ENDIF, updating @cond_stack as appropriate.
    (handle_configure): Prefix config.status rule with condition.
    Check that m4 quotation is done consistently.
    * m4/cond.m4 (AM_CONDITION): Define `_AM_COND_VALUE_name'
    with `name' being the name of the condition, to its shell
    condition.
    * m4/cond-if.m4: New file.
    (_AM_COND_IF, _AM_COND_ELSE, _AM_COND_ENDIF): New trace helpers.
    (AM_COND_IF): New macro, implements conditionals.
    * m4/Makefile.am: Adjust.
    * doc/automake.texi (Requirements, Optional, Conditionals):
    Document AM_COND_IF.
    * NEWS: Update.
    * tests/cond39.test, tests/cond40.test, tests/cond41.test,
    tests/cond42.test, tests/cond43.test: New tests.
    * tests/Makefile.am: Adjust.

diff --git a/NEWS b/NEWS
index 39ae49a..72081f1 100644
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,9 @@ New in 1.10a:
   - New prefix `notrans_' for manpages which should not be transformed
     by --program-transform.
 
+  - New macro AM_COND_IF for conditional evaluation and conditional
+    config files.
+
 Bugs fixed in 1.10a:
 
 * Long standing bugs:
diff --git a/automake.in b/automake.in
index ee8819c..dc431fe 100755
--- a/automake.in
+++ b/automake.in
@@ -326,6 +326,8 @@ my @other_input_files = ();
 # Where each AC_CONFIG_FILES/AC_OUTPUT/AC_CONFIG_LINK/AC_CONFIG_HEADER appears.
 # The keys are the files created by these macros.
 my %ac_config_files_location = ();
+# The condition under which AC_CONFIG_FOOS appears.
+my %ac_config_files_condition = ();
 
 # Directory to search for configure-required files.  This
 # will be computed by &locate_aux_dir and can be set using
@@ -4198,10 +4200,13 @@ sub handle_configure ($$$@)
       # Cannot output rules for shell variables.
       next if (substitute_ac_subst_variables $local) =~ /\$/;
 
-      $output_rules .= ($local . ': '
+      my $condstr = '';
+      $condstr = $ac_config_files_condition{$lfile}->subst_string
+        if ($ac_config_files_condition{$lfile});
+      $output_rules .= ($condstr . $local . ': '
                        . '$(top_builddir)/config.status '
                        . "@rewritten_inputs\n"
-                       . "\t"
+                       . $condstr . "\t"
                        . 'cd $(top_builddir) && '
                        . '$(SHELL) ./config.status '
                        . ($relative_dir eq '.' ? '' : '$(subdir)/')
@@ -4855,6 +4860,9 @@ sub scan_autoconf_config_files ($$)
          push (@other_input_files, $_);
        }
       $ac_config_files_location{$local} = $where;
+      $ac_config_files_condition{$local} =
+        new Automake::Condition (@cond_stack)
+          if (@cond_stack);
     }
 }
 
@@ -4892,6 +4900,9 @@ sub scan_autoconf_traces ($)
                AM_MAINTAINER_MODE => 0,
                AM_PROG_CC_C_O => 0,
                _AM_SUBST_NOTMAKE => 1,
+               _AM_COND_IF => 1,
+               _AM_COND_ELSE => 1,
+               _AM_COND_ENDIF => 1,
                LT_SUPPORTED_TAG => 1,
                _LT_AC_TAGCONFIG => 0,
                m4_include => 1,
@@ -4904,17 +4915,20 @@ sub scan_autoconf_traces ($)
   # Use a separator unlikely to be used, not `:', the default, which
   # has a precise meaning for AC_CONFIG_FILES and so on.
   $traces .= join (' ',
-                  map { "--trace=$_" . ':\$f:\$l::\$n::\${::}%' }
+                  map { "--trace=$_" . ':\$f:\$l::\$d::\$n::\${::}%' }
                   (keys %traced));
 
   my $tracefh = new Automake::XFile ("$traces $filename |");
   verb "reading $traces";
 
+  @cond_stack = ();
+  my $where;
+
   while ($_ = $tracefh->getline)
     {
       chomp;
-      my ($here, @args) = split (/::/);
-      my $where = new Automake::Location $here;
+      my ($here, $depth, @args) = split (/::/);
+      $where = new Automake::Location $here;
       my $macro = $args[0];
 
       prog_error ("unrequested trace `$macro'")
@@ -5078,6 +5092,24 @@ sub scan_autoconf_traces ($)
        {
          $seen_cc_c_o = $where;
        }
+      elsif ($macro eq '_AM_COND_IF')
+        {
+         cond_stack_if ('', $args[1], $where);
+         error ($where, "missing m4 quoting, macro depth $depth")
+           if ($depth != 1);
+       }
+      elsif ($macro eq '_AM_COND_ELSE')
+        {
+         cond_stack_else ('!', $args[1], $where);
+         error ($where, "missing m4 quoting, macro depth $depth")
+           if ($depth != 1);
+       }
+      elsif ($macro eq '_AM_COND_ENDIF')
+        {
+         cond_stack_endif (undef, undef, $where);
+         error ($where, "missing m4 quoting, macro depth $depth")
+           if ($depth != 1);
+       }
       elsif ($macro eq '_AM_SUBST_NOTMAKE')
        {
          $ignored_configure_vars{$args[1]} = $where;
@@ -5123,6 +5155,9 @@ sub scan_autoconf_traces ($)
        }
     }
 
+  error ($where, "condition stack not properly closed")
+    if (@cond_stack);
+
   $tracefh->close;
 }
 
diff --git a/doc/automake.texi b/doc/automake.texi
index c326c89..3afa55a 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -2662,6 +2662,10 @@ to check whether @file{Makefile.am} exists.  (In the 
very hairy case
 that your setup requires such use of variables, you will have to tell
 Automake which @file{Makefile.in}s to generate on the command-line.)
 
+It is possible to let @command{automake} emit conditional rules for
[EMAIL PROTECTED] with the help of @code{AM_COND_IF}
+(@pxref{Optional}).
+
 To summarize:
 @itemize @bullet
 @item
@@ -2839,6 +2843,15 @@ you can use these variables in any @file{Makefile.am} if
 This is required when using the obsolete de-ANSI-fication feature; see
 @ref{ANSI}.
 
[EMAIL PROTECTED] AM_CONDITIONAL
+This introduces an Automake conditional (@pxref{Conditionals}).
+
[EMAIL PROTECTED] AM_COND_IF
+This macro allows @code{automake} to detect subsequent access within
[EMAIL PROTECTED] to a conditional previously introduced with
[EMAIL PROTECTED], thus enabling conditional @code{AC_CONFIG_FILES}
+(@pxref{Conditionals}).
+
 @item AM_GNU_GETTEXT
 This macro is required for packages that use GNU gettext
 (@pxref{gettext}).  It is distributed with gettext.  If Automake sees
@@ -8941,6 +8954,31 @@ The @code{else} branch of the above two examples could 
be omitted,
 since assigning the empty string to an otherwise undefined variable
 makes no difference.
 
[EMAIL PROTECTED] AM_COND_IF
+In order to allow access to the condition registered by
[EMAIL PROTECTED] inside @file{configure.ac}, and to allow
+conditional @code{AC_CONFIG_FILES}, @code{AM_COND_IF} may be used:
+
[EMAIL PROTECTED] AM_COND_IF (@var{conditional}, @ovar{if-true}, 
@ovar{if-false})
+If @var{conditional} is fulfilled, execute @var{if-true}, otherwise
+execute @var{if-false}.  If either branch contains @code{AC_CONFIG_FILES},
+it will cause @command{automake} to output the rules for the respective
+files only for the given condition.
[EMAIL PROTECTED] defmac
+
[EMAIL PROTECTED] macros may be nested.
+
[EMAIL PROTECTED] Example conditional @code{AC_CONFIG_FILES}
[EMAIL PROTECTED] @code{AC_CONFIG_FILES}, conditional
+
+Here is an example of how to define a conditional config file:
+
[EMAIL PROTECTED]
+AM_CONDITIONAL([SHELL_WRAPPER], [test "x$with_wrapper" = xtrue])
+AM_COND_IF([SHELL_WRAPPER],
+          [AC_CONFIG_FILES([wrapper:wrapper.in])])
[EMAIL PROTECTED] example
+
 @unnumberedsec Portability
 
 Note that conditionals in Automake are not the same as conditionals in
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 8d09e4d..9f5e1c2 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -2,8 +2,8 @@
 
 ## Makefile for Automake m4.
 
-## Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006
-## Free Software Foundation, Inc.
+## Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
+## 2008 Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@ as.m4 \
 auxdir.m4 \
 ccstdc.m4 \
 cond.m4 \
+cond-if.m4 \
 depend.m4 \
 depout.m4 \
 dmalloc.m4 \
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 4044299..1c353a8 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -160,6 +160,7 @@ as.m4 \
 auxdir.m4 \
 ccstdc.m4 \
 cond.m4 \
+cond-if.m4 \
 depend.m4 \
 depout.m4 \
 dmalloc.m4 \
diff --git a/m4/cond-if.m4 b/m4/cond-if.m4
new file mode 100644
index 0000000..9f2611e
--- /dev/null
+++ b/m4/cond-if.m4
@@ -0,0 +1,39 @@
+# AM_COND_IF                                            -*- Autoconf -*-
+
+# Copyright (C) 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# _AM_COND_IF
+# _AM_COND_ELSE
+# _AM_COND_ENDIF
+# --------------
+# These macros are only used for tracing.
+m4_define([_AM_COND_IF])
+m4_define([_AM_COND_ELSE])
+m4_define([_AM_COND_ENDIF])
+
+
+# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
+# ---------------------------------------
+# If the shell condition matching COND is true, execute IF-TRUE,
+# otherwise execute IF-FALSE.  Allow automake to learn about conditional
+# instantiating macros (the AC_CONFIG_FOOS).
+AC_DEFUN([AM_COND_IF],
+[m4_ifndef([_AM_COND_VALUE_$1],
+          [m4_fatal([$0: no such condition "$1"])])dnl
+_AM_COND_IF([$1])dnl
+if _AM_COND_VALUE_$1; then
+  m4_default([$2], [:])
+m4_ifval([$3],
+[_AM_COND_ELSE([$1])dnl
+else
+  $3
+])dnl
+_AM_COND_ENDIF([$1])dnl
+fi[]dnl
+])
diff --git a/m4/cond.m4 b/m4/cond.m4
index d9a58d2..fd248b2 100644
--- a/m4/cond.m4
+++ b/m4/cond.m4
@@ -1,13 +1,13 @@
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -20,6 +20,7 @@ AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 720eaca..9fe2794 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -157,6 +157,11 @@ cond35.test \
 cond36.test \
 cond37.test \
 cond38.test \
+cond39.test \
+cond40.test \
+cond41.test \
+cond42.test \
+cond43.test \
 condd.test \
 condhook.test \
 condinc.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index b012bc1..838b969 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -308,6 +308,11 @@ cond35.test \
 cond36.test \
 cond37.test \
 cond38.test \
+cond39.test \
+cond40.test \
+cond41.test \
+cond42.test \
+cond43.test \
 condd.test \
 condhook.test \
 condinc.test \
diff --git a/tests/cond39.test b/tests/cond39.test
new file mode 100755
index 0000000..93f0363
--- /dev/null
+++ b/tests/cond39.test
@@ -0,0 +1,78 @@
+#!/bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Build either as CONFIG_FILE or as PROGRAM.
+
+. ./defs
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AM_CONDITIONAL([COND], [test "$COND" = true])
+AM_COND_IF([COND], [],
+          [AC_CONFIG_FILES([prog], [chmod 755 prog])])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+if COND
+bin_PROGRAMS = prog
+prog_SOURCES = prog.c
+else
+# FIXME: the next line is still needed to get automake to output the
+# bin_PROGRAMS above in the right condition only.
+prog:
+bin_SCRIPTS = prog
+CLEANFILES = prog
+endif
+END
+
+cat >prog.c <<'END'
+int main () { return 42; }
+END
+
+cat >prog.in <<'END'
+#! /bin/sh
+bindir='@bindir@'
+echo "hi, this is $0, and bindir is $bindir"
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure COND=true
+$MAKE 2>stderr
+cat stderr
+grep 'overriding commands' stderr && exit 1
+./prog && exit 1
+$MAKE clean
+$MAKE
+./prog && exit 1
+$MAKE distclean
+
+./configure COND=false
+$MAKE 2>stderr
+cat stderr
+grep 'overriding commands' stderr && exit 1
+./prog
+$MAKE clean
+$MAKE
+./prog
diff --git a/tests/cond40.test b/tests/cond40.test
new file mode 100755
index 0000000..d567a68
--- /dev/null
+++ b/tests/cond40.test
@@ -0,0 +1,78 @@
+#!/bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test AM_COND_IF.
+
+. ./defs
+set -e
+
+cat >>configure.in <<'END'
+AC_DEFUN([FOO],
+        [AC_CONFIG_FILES([$1])])
+
+AM_CONDITIONAL([COND], [test "$cond" = yes])
+AM_COND_IF([COND],
+          [AC_CONFIG_FILES([file1])])
+
+AM_CONDITIONAL([COND1], [test "$cond1" = yes])
+AM_CONDITIONAL([COND2], [test "$cond2" = yes])
+AM_CONDITIONAL([COND3], [test "$cond3" = yes])
+
+AM_COND_IF([COND1],
+          [AM_COND_IF([COND2], [FOO([file2])],
+                      [AM_COND_IF([COND3],
+                                  [FOO([file3])])])])
+
+AC_OUTPUT
+END
+
+: >Makefile.am
+: >file1.in
+: >file2.in
+: >file3.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure cond=yes cond1=yes cond2=no cond3=yes
+test -f file1
+test ! -f file2
+test -f file3
+rm -f file1 file3
+$MAKE file1 file3
+$MAKE file2 && exit 1
+test -f file1
+test ! -f file2
+test -f file3
+$MAKE distclean
+
+./configure cond=no cond1=yes cond2=yes
+test ! -f file1
+test -f file2
+test ! -f file3
+rm -f file2
+$MAKE file1 && exit 1
+$MAKE file2
+$MAKE file3 && exit 1
+test ! -f file1
+test -f file2
+test ! -f file3
+:
diff --git a/tests/cond41.test b/tests/cond41.test
new file mode 100755
index 0000000..281e484
--- /dev/null
+++ b/tests/cond41.test
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# AM_COND_IF with an undefined condition should fail.
+
+. ./defs
+set -e
+
+cat >>configure.in <<'END'
+AM_COND_IF([COND],
+          [AC_CONFIG_FILES([file1])])
+AC_OUTPUT
+END
+
+$ACLOCAL && exit 1
+:
diff --git a/tests/cond42.test b/tests/cond42.test
new file mode 100755
index 0000000..4b9e604
--- /dev/null
+++ b/tests/cond42.test
@@ -0,0 +1,59 @@
+#!/bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Ensure an error with inconsistent state of conditionals in configure.ac.
+# This shouldn't happen with user input, as _AM_COND_* are not documented,
+# but better to be safe.
+
+. ./defs
+set -e
+
+cat >>configure.in <<'END'
+AM_CONDITIONAL([COND], [:])
+# next line needed so that cond-if.m4 is pulled in.
+AM_COND_IF([COND])
+_AM_COND_IF([COND])
+AC_OUTPUT
+END
+: >Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'condition stack' stderr
+
+sed 's/_AM_COND_IF/_AM_COND_ELSE/' < configure.in >configure.int
+mv -f configure.int configure.in
+rm -rf autom4te*.cache
+AUTOMAKE_fails
+grep 'else without if' stderr
+
+sed 's/_AM_COND_ELSE/_AM_COND_ENDIF/' < configure.in >configure.int
+mv -f configure.int configure.in
+rm -rf autom4te*.cache
+AUTOMAKE_fails
+grep 'endif without if' stderr
+
+sed 's/\(_AM_COND_ENDIF\).*/_AM_COND_IF\
+_AM_COND_ENDIF/' < configure.in >configure.int
+mv -f configure.int configure.in
+rm -rf autom4te*.cache
+AUTOMAKE_fails
+test 2 = `grep -c 'not enough arguments' stderr`
+:
diff --git a/tests/cond43.test b/tests/cond43.test
new file mode 100755
index 0000000..d1a863d
--- /dev/null
+++ b/tests/cond43.test
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
+
+. ./defs
+set -e
+
+cat >>configure.in <<'END'
+AM_CONDITIONAL([COND1], [:])
+AM_CONDITIONAL([COND2], [:])
+AM_COND_IF([COND1],
+          AM_COND_IF([COND2], [:])
+)
+AC_OUTPUT
+END
+: >Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails
+
+sed '/.AM_COND_IF/{
+       s/^/[/
+       s/$/]/
+     }' < configure.in > configure.int
+mv -f configure.int configure.in
+rm -rf autom4te*.cache
+$AUTOMAKE


Reply via email to