From frol@nerve.riss-telecom.ru  Fri Mar  3 06:38:02 2006
Return-Path: <frol@nerve.riss-telecom.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D12B916A420
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Mar 2006 06:38:02 +0000 (GMT)
	(envelope-from frol@nerve.riss-telecom.ru)
Received: from nerve.riss-telecom.ru (nerve.riss-telecom.ru [80.66.65.3])
	by mx1.FreeBSD.org (Postfix) with ESMTP id F410543D46
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  3 Mar 2006 06:38:01 +0000 (GMT)
	(envelope-from frol@nerve.riss-telecom.ru)
Received: from nerve.riss-telecom.ru (7vrr4wz2c3imsova@localhost [127.0.0.1])
	by nerve.riss-telecom.ru (8.13.1/8.13.1) with ESMTP id k236XBbk062756;
	Fri, 3 Mar 2006 12:33:11 +0600 (NOVT)
	(envelope-from frol@nerve.riss-telecom.ru)
Received: (from frol@localhost)
	by nerve.riss-telecom.ru (8.13.1/8.13.1/Submit) id k236XB2p062755;
	Fri, 3 Mar 2006 12:33:11 +0600 (NOVT)
	(envelope-from frol)
Message-Id: <200603030633.k236XB2p062755@nerve.riss-telecom.ru>
Date: Fri, 3 Mar 2006 12:33:11 +0600 (NOVT)
From: Dmitry Frolov <frolov@riss-telecom.ru>
Reply-To: Dmitry Frolov <frolov@riss-telecom.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [bsd.autotools.mk] aclocal can't find libtool macros
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         94043
>Category:       ports
>Synopsis:       [patch] bsd.autotools.mk: aclocal can't find libtool macros
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ade
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 03 06:40:06 GMT 2006
>Closed-Date:    Tue Jul 31 07:43:59 GMT 2007
>Last-Modified:  Tue Jul 31 07:43:59 GMT 2007
>Originator:     Dmitry Frolov
>Release:        FreeBSD 5.3-BETA7 i386
>Organization:
RISS-Telecom
>Environment:
System: FreeBSD nerve.riss-telecom.ru 5.3-BETA7 FreeBSD 5.3-BETA7 #18: Wed Jun 8 15:55:56 NOVST 2005 root@*****.riss-telecom.ru:/var/obj/usr/src/sys/NERVE i386


	
>Description:

aclocal from devel/automake19 fails to find libtool macros if
both aclocal and libtool used in port's Makefile.  That's because
aclocal searches for macros (according to bsd.autotools.mk) in
${LOCALBASE}/share/aclocal${AUTOMAKE_VERSION} dir but devel/libtool*
ports install their aclocal macros into ${LOCALBASE}/share/aclocal dir.

>How-To-Repeat:

frol@nerve ttypa:~/ports/sysutils/ipmitool$grep AUTO Makefile
USE_AUTOTOOLS=  autoconf:259 libtool:15 aclocal:19 automake:19

frol@nerve ttypa:~/ports/sysutils/ipmitool$make configure
===>  Vulnerability check disabled, database not found
===>  Extracting for ipmitool-1.8.6_1
[...]
===>  Configuring for ipmitool-1.8.6_1
aclocal:configure.in:38: warning: macro `AM_PROG_LIBTOOL' not found in library
configure.in:38: error: possibly undefined macro: AM_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
*** Error code 1

>Fix:

One of the possible fixes (patch against bsd.autotools.mk rev 1.23):

--- /usr/ports/Mk/bsd.autotools.mk	Sat Feb 25 01:25:03 2006
+++ bsd.autotools.mk	Fri Mar  3 12:21:59 2006
@@ -122,7 +122,7 @@
 . endif
 
 . if defined(AUTOTOOL_aclocal)
-ACLOCAL_ARGS?=		--acdir=${ACLOCAL_DIR}
+ACLOCAL_ARGS?=		--acdir=${ACLOCAL_DIR} ${ACLOCAL_INC}
 . endif
 
 .endif
@@ -198,7 +198,8 @@
 LIBTOOLIZE=			${LOCALBASE}/bin/libtoolize
 LIBTOOL_LIBEXECDIR=	${LOCALBASE}/libexec/libtool
 LIBTOOL_SHAREDIR=	${LOCALBASE}/share/libtool
-LIBTOOL_M4=			${LOCALBASE}/share/aclocal/libtool.m4
+LIBTOOL_ACLOCALDIR=	${LOCALBASE}/share/aclocal
+LIBTOOL_M4=			${LIBTOOL_ACLOCALDIR}/libtool.m4
 LTMAIN=				${LIBTOOL_SHAREDIR}/ltmain.sh
 LIBTOOL_VARS=		LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} LIBTOOL_M4=${LIBTOOL_M4}
 
@@ -206,6 +207,9 @@
 BUILD_DEPENDS+=		${LIBTOOL_DEPENDS}
 
 LIBTOOLFLAGS?=		# default to empty
+
+# Add libtool macros dir to the list of aclocal dirs
+ACLOCAL_INC+=	-I ${LIBTOOL_ACLOCALDIR}
 
 . if defined(AUTOTOOL_autoconf)
 LIBTOOLFILES?=		aclocal.m4
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ade 
Responsible-Changed-By: ade 
Responsible-Changed-When: Fri Mar 3 07:11:33 UTC 2006 
Responsible-Changed-Why:  
This one is mine. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94043 
State-Changed-From-To: open->feedback 
State-Changed-By: ade 
State-Changed-When: Tue Aug 22 03:42:08 UTC 2006 
State-Changed-Why:  
This will be dealt with as part of the next set of major changes to 
the autotools infrastructure, involving wrapper scripts around the 
components of autoconf/automake to more seemlessly handle multiple 
versions of autotools both for building ports, and for cross-development 
outside of the ports tree. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94043 
State-Changed-From-To: feedback->analyzed 
State-Changed-By: ade 
State-Changed-When: Sun Apr 8 10:17:05 UTC 2007 
State-Changed-Why:  
Put into a more appropriate state, given the current under-test 
reworking of autoconf/automake. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94043 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: ade 
State-Changed-When: Sat Jul 28 06:40:28 UTC 2007 
State-Changed-Why:  
The latest round of updates to autotools should have fixed this. 
Unless I hear otherwise, I'll be closing this PR 2 weeks from today 
(11th August 2007). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94043 
State-Changed-From-To: feedback->closed 
State-Changed-By: ade 
State-Changed-When: Tue Jul 31 07:43:33 UTC 2007 
State-Changed-Why:  
Submitter email address is hard-bouncing. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94043 
>Unformatted:
