[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix LT_WITH_LTDL: AU_ALIAS bug
From: |
Ralf Wildenhues |
Subject: |
Re: Fix LT_WITH_LTDL: AU_ALIAS bug |
Date: |
Mon, 24 Oct 2005 17:56:42 +0200 |
User-agent: |
Mutt/1.5.11 |
Hi Stepan,
Sorry for the delay.
* Stepan Kasal wrote on Thu, Oct 20, 2005 at 10:19:24AM CEST:
> On Fri, Sep 09, 2005 at 02:09:01PM +0200, Ralf Wildenhues wrote:
> > Second: Autoconf bug: AU_ALIAS mumbles with the number of arguments:
>
> A modified version of Ralf's example:
*snip* (see in patch below)
> leads to:
>
> foo: 0
> foo: 1
> foo: 1
> ==
> foo: 1
> foo: 1
> foo: 2
Weird. Over here, it leads to:
foo: 0
foo: 1
foo: 1
==
foo: 1
foo: 1
foo: 1
with both autoconf-2.59 and CVS HEAD. It's also what I reported
earlier. Typo?
> Attached please find a patch which fixes that.
>
> A test has to be written, to make sure that "AC_STDC_HEADERS" is
> indeed autoupdated to "AC_HEADER_STDC", and not to "AC_HEADER_STDC([])".
> We should autotest this with AC_STDC_HEADERS.
Below is a test suggestion that includes above checking and
AC_HEADER_STDC.
Cheers,
Ralf
* tests/autoupdate.at: New file; test for AU_ALIAS `$#' bug.
* tests/Makefile.am, tests/suite.at: Updated.
Index: tests/Makefile.am
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/Makefile.am,v
retrieving revision 1.97
diff -u -r1.97 Makefile.am
--- tests/Makefile.am 15 Aug 2005 23:47:57 -0000 1.97
+++ tests/Makefile.am 24 Oct 2005 14:34:32 -0000
@@ -92,6 +92,7 @@
compile.at c.at fortran.at \
semantics.at \
autoscan.at \
+ autoupdate.at \
foreign.at
TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT)
Index: tests/suite.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/suite.at,v
retrieving revision 1.33
diff -u -r1.33 suite.at
--- tests/suite.at 16 Aug 2005 08:18:04 -0000 1.33
+++ tests/suite.at 24 Oct 2005 14:34:32 -0000
@@ -75,3 +75,6 @@
# Autoscan test
m4_include([autoscan.at])
+
+# Autoupdate test
+m4_include([autoupdate.at])
--- /dev/null 2005-08-03 12:45:51.659987528 +0200
+++ tests/autoupdate.at 2005-10-24 16:28:45.000000000 +0200
@@ -0,0 +1,45 @@
+# -*- Autotest -*-
+
+AT_BANNER([Autoupdate.])
+
+# Copyright (C) 2005 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+AT_SETUP([AU_ALIAS])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_DEFUN([FOO], [echo $#])
+AU_ALIAS([BAZ],[FOO])
+test `FOO` -eq 0 || exit 1
+test `FOO()` -eq 1 || exit 1
+test `FOO(1)` -eq 1 || exit 1
+test `BAZ` -eq 0 || exit 1
+test `BAZ()` -eq 1 || exit 1
+test `BAZ(1)` -eq 1 || exit 1
+AC_PROG_CC
+AC_STDC_HEADERS
+AC_OUTPUT
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE
+AT_CHECK_AUTOUPDATE
+AT_CHECK([grep 'AC_HEADER_STDC(' configure.ac], 1, [ignore], [ignore])
+AT_CHECK([grep 'AC_HEADER_STDC' configure.ac], 0, [ignore], [ignore])
+
+AT_CLEANUP