GNU bug report logs - #21352
AC_CONFIG_MACRO_DIRS vs. ACLOCAL_FLAGS: different behavior wrt AM_COND_IF, aclocal fails

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: automake; Reported by: Christian Rössel <christian.roessel@HIDDEN>; dated Wed, 26 Aug 2015 15:53:01 UTC; Maintainer for automake is bug-automake@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Aug 2015 15:52:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 26 11:52:43 2015
Received: from localhost ([127.0.0.1]:38960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZUd0F-0007j5-8T
	for submit <at> debbugs.gnu.org; Wed, 26 Aug 2015 11:52:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34533)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <christian.roessel@HIDDEN>) id 1ZUcKD-0006fj-5x
 for submit <at> debbugs.gnu.org; Wed, 26 Aug 2015 11:09:17 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <christian.roessel@HIDDEN>) id 1ZUcK7-0003v1-7w
 for submit <at> debbugs.gnu.org; Wed, 26 Aug 2015 11:09:16 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:54231)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <christian.roessel@HIDDEN>) id 1ZUcK7-0003uu-5l
 for submit <at> debbugs.gnu.org; Wed, 26 Aug 2015 11:09:11 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44472)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <christian.roessel@HIDDEN>) id 1ZUcK3-0001Zl-6b
 for bug-automake@HIDDEN; Wed, 26 Aug 2015 11:09:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <christian.roessel@HIDDEN>) id 1ZUcJy-0003qf-PZ
 for bug-automake@HIDDEN; Wed, 26 Aug 2015 11:09:07 -0400
Received: from mout.gmx.net ([212.227.15.15]:64554)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <christian.roessel@HIDDEN>) id 1ZUcJy-0003qI-E8
 for bug-automake@HIDDEN; Wed, 26 Aug 2015 11:09:02 -0400
Received: from [134.94.171.188] ([134.94.171.188]) by mail.gmx.com (mrgmx003)
 with ESMTPSA (Nemesis) id 0MXZbS-1ZGoJ82zAc-00WWSH for
 <bug-automake@HIDDEN>; Wed, 26 Aug 2015 17:09:00 +0200
Message-ID: <55DDD68C.1090702@HIDDEN>
Date: Wed, 26 Aug 2015 17:09:00 +0200
From: =?UTF-8?B?Q2hyaXN0aWFuIFLDtnNzZWw=?= <christian.roessel@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:31.0) Gecko/20100101 Thunderbird/31.8.0
MIME-Version: 1.0
To: bug-automake@HIDDEN
Subject: AC_CONFIG_MACRO_DIRS vs. ACLOCAL_FLAGS: different behavior wrt
 AM_COND_IF, aclocal fails
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:sk1W0tmWDIM5Xnza0Pqg137OtA2NE8WCqh0kWBmemvjeDb71hoR
 4gbhUMzZLozA58sUJjE79K6kzuJ998FVEWEr2PVQcLaUEuIMAmxmpCFOvdwynnE/XQOnzu1
 /+LBJRwYNWx1OwZjWTsS174b9ifT9Q9Wyk3+Tr+SJehAkH3XRECYeVOmLId6TaOd7OcilnJ
 S5PSpTmeXvp1As+11pvNA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:AkcVTZbCJbk=:ZVHqbwGbTlWaHh/jso0fjN
 ROlOX/7WWEVMKLAJmQb+EQNBXCIx/xkaf9Qs71YMIsh4fiuOz0e4lpIFkX0eeskPrzDGGQSzD
 iRnZcsovLCYcKA9/3Ah9kSAOSuJ5w9NJTfqpaB3iyzY32RUbXv0hwHBcMoiBISS3GkX8e/BY/
 4jMgMIa4GWz3Pdk4SrdealwpXRs/vCstKi+RAXmR2v6k/MMge4wf7LZyGNL7yhUwN7pl2wLxm
 ocsBAV6HxmhQUFYwhSK0X5ZHXKPVoe067Qd8c1EDNlmwsjzUwvwArsnron6gxByKU2AQXzfd7
 Z3VJrJtug/Gw3e1qwpTluCvaTnCZFN0CYDTpRlFJTO4tcIZYjn10as6ZYjTKKB6THBBmCo8AR
 ARgqiYy4Nh2lIQtb/TTCL4FfzJSgxvwgrVNpSsTT47O2D545aP+yApC4heWcWZHnjh3R8eSwq
 eDP4GQ7tIRO1gGdAP3JdydaENP+ksGFmiZ2nOnGcJ5M/JQXlTOa25tbjvqrQWv/5+Ifgfseiq
 4SDz6RmNXevysV0HoQT77Oi8iESu3Iog8MWi1GM5TDW5neOQZO5KwLSMDKHfy0EspAcOvOXOf
 zrssXy95fFm6p9HuoDGC9ZEZ4ErkEgwUzXCK4nFAgbapTnsIG2FkD5hlfQ84fIxNbj8p1aInA
 YZQ+C5vTdE6lm/dJeXBpkytYDIeCGv4GCwS8o7qpVGYU2om9EQ7xyGccYNYGidAbppec7pMaF
 uwAuR+RMq6mGgPQQVyP+pFvQr8ErUwd0j15AUw==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 26 Aug 2015 11:52:41 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

automake 1.15/1.13.4 (other versions not tested)
autoconf 2.69

Dear all,

'AC_CONFIG_MACRO_DIRS([m4])' is supposed to replace 'ACLOCAL_FLAGS = -I 
m4'. Just using AC_CONFIG_MACRO_DIRS works fine unless I have a 
AM_COND_IF in configure.ac that references a <conditional> which is not 
defined in configure.ac but in a m4 file that lives in subdirectory m4. 
In this case aclocal (via autoreconf) fails with

> error: AM_COND_IF: no such condition "<conditional>"

When using 'ACLOCAL_FLAGS = -I m4', autoreconf succeeds.

The difference between AC_CONFIG_MACRO_DIRS and ACLOCAL_FLAGS when 
running autoreconf is that the latter passes '-I m4' to aclocal, the 
former doesn't (but still finds the macros in the m4 subdirectory). As 
ACLOCAL_AMFLAGS will be fully deprecated in Automake 2.0, 
AC_CONFIG_MACRO_DIRS/aclocal needs IMO to be fixed (unfortunately I 
can't help on that).

To reproduce:

$ cat > configure.ac <<'END'
AC_INIT([foo], [0])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([-Wall foreign])
MY_FEATURE
AM_COND_IF([HAVE_MY_FEATURE], [echo "bingo"])
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
END

$ cat > Makefile.am <<'END'
#ACLOCAL_FLAGS = -I m4
END

$ mkdir m4
cat > m4/my_feature.m4 <<'END'
AC_DEFUN([MY_FEATURE], [
AM_CONDITIONAL([HAVE_MY_FEATURE], [test 1 -eq 1])])
END

$ autoreconf -v --install
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal
configure.ac:5: error: AM_COND_IF: no such condition "HAVE_MY_FEATURE"
/opt/packages/afs-dev/01/share/aclocal-1.13/cond-if.m4:23: AM_COND_IF is 
expanded from...
configure.ac:5: the top level
autom4te: /opt/packages/afs-dev/01/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1

Best regards,
Christian
-- 




Acknowledgement sent to Christian Rössel <christian.roessel@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-automake@HIDDEN. Full text available.
Report forwarded to bug-automake@HIDDEN:
bug#21352; Package automake. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.