GNU bug report logs -
#8104
automake suggests use of AC_PROG_LIBTOOL, this has been replaced by LT_INIT
Previous Next
Reported by: Jack Kelly <jack <at> jackkelly.name>
Date: Thu, 24 Feb 2011 02:02:02 UTC
Severity: normal
Tags: patch
Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8104 in the body.
You can then email your comments to 8104 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Thu, 24 Feb 2011 02:02:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jack Kelly <jack <at> jackkelly.name>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
Your message had a Version: pseudo-header with an invalid package
version:
1.11.1 (ubuntu 10.10). I have inspected the most recent
please either use found or fixed to the control server with a correct
version, or reply to this report indicating the correct version so the
maintainer (or someone else) can correct it for you.
(Thu, 24 Feb 2011 02:02:02 GMT) Full text and rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Version: 1.11.1 (ubuntu 10.10). I have inspected the most recent
master and it appears to also have this bug.
configure.ac:
AC_INIT([a], [b], [c])
AM_INIT_AUTOMAKE([foreign])
dnl no LT_INIT -- on purpose
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
Makefile.am:
lib_LTLIBRARIES = libfoo.la
Run autoreconf -i:
$ autoreconf -i
Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
Makefile.am:1: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
Makefile.am:1: to `configure.ac' and run `aclocal' and `autoconf' again.
Makefile.am:1: If `AC_PROG_LIBTOOL' is in `configure.ac', make sure
Makefile.am:1: its definition is in aclocal's search path.
autoreconf: automake failed with exit status: 1
See the libtool manual (
http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
):
AC_PROG_LIBTOOL and AM_PROG_LIBTOOL are deprecated names for older
versions of this macro; autoupdate will upgrade your configure.ac
files.
It appears that automake's message is out of date.
-- Jack
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Thu, 24 Feb 2011 09:46:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 8104 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thursday 24 February 2011, Jack Kelly wrote:
> Version: 1.11.1 (ubuntu 10.10). I have inspected the most recent
> master and it appears to also have this bug.
>
> configure.ac:
> AC_INIT([a], [b], [c])
> AM_INIT_AUTOMAKE([foreign])
> dnl no LT_INIT -- on purpose
> AC_PROG_CC
> AC_CONFIG_FILES([Makefile])
> AC_OUTPUT
>
> Makefile.am:
> lib_LTLIBRARIES = libfoo.la
>
> Run autoreconf -i:
> $ autoreconf -i
> Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
> Makefile.am:1: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
> Makefile.am:1: to `configure.ac' and run `aclocal' and `autoconf' again.
> Makefile.am:1: If `AC_PROG_LIBTOOL' is in `configure.ac', make sure
> Makefile.am:1: its definition is in aclocal's search path.
> autoreconf: automake failed with exit status: 1
>
> See the libtool manual (
> http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html
> ):
> AC_PROG_LIBTOOL and AM_PROG_LIBTOOL are deprecated names for older
> versions of this macro; autoupdate will upgrade your configure.ac
> files.
>
> It appears that automake's message is out of date.
>
I agree with Jack that advertising the use of LT_INIT would be better,
since, according to Libtool NEWS file, that has obsoleted AC_PROG_LIBTOOL
since version 1.9b (2004-08-29).
What about the attached patch (for maint)?
Regards,
Stefano
[0001-libtool-suggest-LT_INIT-if-LTLIBRARIES-primary-is-us.patch (text/x-patch, inline)]
From f61bfa70a40c5f29fa4fa9eb3ce7435f13aeb479 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Thu, 24 Feb 2011 10:21:19 +0100
Subject: [PATCH] libtool: suggest LT_INIT if LTLIBRARIES primary is used
When the LTLIBRARIES primary was used, but $(LIBTOOL) wasn't
defined, automake suggested to add a call to AC_PROG_LIBTOOL
in configure.ac. But that macro is deprecated since Libtool
version 1.9b (2004-08-29), in favor of the newer LT_INIT. So
suggest the use of this latter macro instead.
* lib/Automake/Variable.pm (%_am_macro_for_var): Pair 'LIBTOOL'
with 'LT_INIT', not with 'AC_PROG_LIBTOOL'.
* libtool4.test: Adjust and extend. Also, add a call to macro
AC_PROG_CC in configure.in, to help ensuring that automake does
not fail for the wrong reasons.
* ltinit.test: New test, ensure that automake's libtool support
works with LT_INIT-based interface.
Thanks to Jack Kelly for the suggestion.
---
ChangeLog | 17 +++++++++++++
lib/Automake/Variable.pm | 2 +-
tests/Makefile.am | 1 +
tests/Makefile.in | 1 +
tests/libtool4.test | 9 ++++++-
tests/ltinit.test | 61 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 89 insertions(+), 2 deletions(-)
create mode 100755 tests/ltinit.test
diff --git a/ChangeLog b/ChangeLog
index 8d03512..acd71bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2011-02-24 Stefano Lattarini <stefano.lattarini <at> gmail.com>
+
+ libtool: suggest LT_INIT if LTLIBRARIES primary is used
+ When the LTLIBRARIES primary was used, but $(LIBTOOL) wasn't
+ defined, automake suggested to add a call to AC_PROG_LIBTOOL
+ in configure.ac. But that macro is deprecated since Libtool
+ version 1.9b (2004-08-29), in favor of the newer LT_INIT. So
+ suggest the use of this latter macro instead.
+ * lib/Automake/Variable.pm (%_am_macro_for_var): Pair 'LIBTOOL'
+ with 'LT_INIT', not with 'AC_PROG_LIBTOOL'.
+ * libtool4.test: Adjust and extend. Also, add a call to macro
+ AC_PROG_CC in configure.in, to help ensuring that automake does
+ not fail for the wrong reasons.
+ * ltinit.test: New test, ensure that automake's libtool support
+ works with LT_INIT-based interface.
+ Thanks to Jack Kelly for the suggestion.
+
2011-02-20 Stefano Lattarini <stefano.lattarini <at> gmail.com>
tests: tempdirs with restrictive permissions are cleaned correctly
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index cb9d182..686847d 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -162,7 +162,7 @@ my %_am_macro_for_var =
EMACS => 'AM_PATH_LISPDIR',
GCJ => 'AM_PROG_GCJ',
LEX => 'AM_PROG_LEX',
- LIBTOOL => 'AC_PROG_LIBTOOL',
+ LIBTOOL => 'LT_INIT',
lispdir => 'AM_PATH_LISPDIR',
pkgpyexecdir => 'AM_PATH_PYTHON',
pkgpythondir => 'AM_PATH_PYTHON',
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 047bc7b..cd564fa 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -481,6 +481,7 @@ ltcond.test \
ltcond2.test \
ltconv.test \
ltdeps.test \
+ltinit.test \
ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index fe6238b..f56ff21 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -751,6 +751,7 @@ ltcond.test \
ltcond2.test \
ltconv.test \
ltdeps.test \
+ltinit.test \
ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
diff --git a/tests/libtool4.test b/tests/libtool4.test
index bcc9b0f..9f6a730 100755
--- a/tests/libtool4.test
+++ b/tests/libtool4.test
@@ -20,10 +20,17 @@
set -e
+cat >> configure.in <<'END'
+AC_PROG_CC
+END
+
cat > Makefile.am << 'END'
EXTRA_LTLIBRARIES = liblib.la
END
$ACLOCAL
AUTOMAKE_fails
-grep AC_PROG_LIBTOOL stderr
+grep '[Ll]ibtool library .*LIBTOOL.* undefined' stderr
+grep 'define .*LIBTOOL.* add .*LT_INIT' stderr
+
+:
diff --git a/tests/ltinit.test b/tests/ltinit.test
new file mode 100755
index 0000000..d646bc9
--- /dev/null
+++ b/tests/ltinit.test
@@ -0,0 +1,61 @@
+#!/bin/sh
+# Copyright (C) 2011 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, see <http://www.gnu.org/licenses/>.
+
+# Test that libtool support works correctly when "newer" libtool
+# interface (with LT_INIT etc.) is used (this interface has been
+# present since libtool 1.9b, circa 2004).
+
+required='libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+LT_PREREQ([2.0])
+LT_INIT([dlopen])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+lib_LTLIBRARIES = libfoo.la
+END
+
+cat > libfoo.c <<'END'
+int foo (void)
+{
+ return 1;
+}
+END
+
+libtoolize
+$ACLOCAL
+
+$AUTOCONF || { if $? -eq 63; then Exit 77; else Exit 1; fi; }
+$EGREP '^LT_(INIT|PREREQ)' configure && Exit 77
+
+$AUTOMAKE -a
+
+cwd=`pwd`
+./configure --prefix="$cwd/inst" >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^checking.*dlopen' stdout
+
+$MAKE
+$MAKE install
+$MAKE distcheck
+
+:
--
1.7.2.3
Added tag(s) patch.
Request was from
Stefano Lattarini <stefano.lattarini <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Thu, 24 Feb 2011 09:49:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Sat, 26 Feb 2011 11:29:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 8104 <at> debbugs.gnu.org (full text, mbox):
* Stefano Lattarini wrote on Thu, Feb 24, 2011 at 10:45:11AM CET:
> I agree with Jack that advertising the use of LT_INIT would be better,
> since, according to Libtool NEWS file, that has obsoleted AC_PROG_LIBTOOL
> since version 1.9b (2004-08-29).
Yes. There are still 1.5.x users out there, but my patience with them
is starting to go down.
> What about the attached patch (for maint)?
Yes, if it has been tested that it will skip when Libtool 1.5.x macros
are in place. LT_PREREQ has been introduced in 1.9b only. Also, I
think that if the LT_PREREQ check fails, it will fail already at aclocal
run time, but I am not sure of that.
Thanks,
Ralf
> Subject: [PATCH] libtool: suggest LT_INIT if LTLIBRARIES primary is used
>
> When the LTLIBRARIES primary was used, but $(LIBTOOL) wasn't
> defined, automake suggested to add a call to AC_PROG_LIBTOOL
> in configure.ac. But that macro is deprecated since Libtool
> version 1.9b (2004-08-29), in favor of the newer LT_INIT. So
> suggest the use of this latter macro instead.
>
> * lib/Automake/Variable.pm (%_am_macro_for_var): Pair 'LIBTOOL'
> with 'LT_INIT', not with 'AC_PROG_LIBTOOL'.
> * libtool4.test: Adjust and extend. Also, add a call to macro
> AC_PROG_CC in configure.in, to help ensuring that automake does
> not fail for the wrong reasons.
> * ltinit.test: New test, ensure that automake's libtool support
> works with LT_INIT-based interface.
>
> Thanks to Jack Kelly for the suggestion.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Sat, 26 Feb 2011 13:10:03 GMT)
Full text and
rfc822 format available.
Message #16 received at 8104 <at> debbugs.gnu.org (full text, mbox):
On Saturday 26 February 2011, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Thu, Feb 24, 2011 at 10:45:11AM CET:
> > I agree with Jack that advertising the use of LT_INIT would be better,
> > since, according to Libtool NEWS file, that has obsoleted AC_PROG_LIBTOOL
> > since version 1.9b (2004-08-29).
>
> Yes. There are still 1.5.x users out there, but my patience with them
> is starting to go down.
>
> > What about the attached patch (for maint)?
>
> Yes, if it has been tested that it will skip when Libtool 1.5.x macros
> are in place.
>
Done now, it works.
BTW, such kind of checks would be much easier to perform with Paolo's
pending patch for ACLOCAL_PATH support in place; pointer:
<http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00089.html>
> LT_PREREQ has been introduced in 1.9b only. Also, I
> think that if the LT_PREREQ check fails, it will fail already
> at aclocal run time,
>
Oops, I dind't think of that.
> but I am not sure of that.
>
Better play safe anyway IMHO. What about the following squash-in?
-*-*-
diff --git a/tests/ltinit.test b/tests/ltinit.test
index d646bc9..288a186 100755
--- a/tests/ltinit.test
+++ b/tests/ltinit.test
@@ -25,7 +25,6 @@ set -e
cat >>configure.in <<'END'
AC_PROG_CC
-LT_PREREQ([2.0])
LT_INIT([dlopen])
AC_OUTPUT
END
@@ -43,9 +42,9 @@ END
libtoolize
$ACLOCAL
-
-$AUTOCONF || { if $? -eq 63; then Exit 77; else Exit 1; fi; }
-$EGREP '^LT_(INIT|PREREQ)' configure && Exit 77
+$AUTOCONF
+# Skip if older libtool (pre-2.0) is used.
+$EGREP '^LT_INIT' configure && Exit 77
$AUTOMAKE -a
-*-*-
> Thanks,
> Ralf
>
I'll push in 72 hours if there are no more objections.
Regards,
Stefano
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Sat, 26 Feb 2011 13:39:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 8104 <at> debbugs.gnu.org (full text, mbox):
* Stefano Lattarini wrote on Sat, Feb 26, 2011 at 02:08:39PM CET:
> BTW, such kind of checks would be much easier to perform with Paolo's
> pending patch for ACLOCAL_PATH support in place; pointer:
> <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00089.html>
Hmmyes, we have a lot of old pending stuff unfortunately ...
> On Saturday 26 February 2011, Ralf Wildenhues wrote:
> > * Stefano Lattarini wrote on Thu, Feb 24, 2011 at 10:45:11AM CET:
> > LT_PREREQ has been introduced in 1.9b only. Also, I
> > think that if the LT_PREREQ check fails, it will fail already
> > at aclocal run time,
> >
> Oops, I dind't think of that.
>
> > but I am not sure of that.
> >
> Better play safe anyway IMHO. What about the following squash-in?
Well, not using LT_PREREQ seems like another step back: situations like
this is what LT_PREREQ was designed for. How about something like this?
m4_ifdef([LT_PREREQ],
[LT_PREREQ([2.0])],
[m4_fatal([Libtool version too old], [63])])
(untested, sorry)
Thanks,
Ralf
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Sat, 26 Feb 2011 13:55:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 8104 <at> debbugs.gnu.org (full text, mbox):
On Saturday 26 February 2011, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Sat, Feb 26, 2011 at 02:08:39PM CET:
> > BTW, such kind of checks would be much easier to perform with Paolo's
> > pending patch for ACLOCAL_PATH support in place; pointer:
> > <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00089.html>
>
> Hmmyes, we have a lot of old pending stuff unfortunately ...
>
> > On Saturday 26 February 2011, Ralf Wildenhues wrote:
> > > * Stefano Lattarini wrote on Thu, Feb 24, 2011 at 10:45:11AM CET:
> > > LT_PREREQ has been introduced in 1.9b only. Also, I
> > > think that if the LT_PREREQ check fails, it will fail already
> > > at aclocal run time,
> > >
> > Oops, I dind't think of that.
> >
> > > but I am not sure of that.
> > >
> > Better play safe anyway IMHO. What about the following squash-in?
>
> Well, not using LT_PREREQ seems like another step back: situations like
> this is what LT_PREREQ was designed for. How about something like this?
>
> m4_ifdef([LT_PREREQ],
> [LT_PREREQ([2.0])],
> [m4_fatal([Libtool version too old], [63])])
>
> (untested, sorry)
>
Fine with me. This is the additional squash-in -- on the top of the old
one, since I had already commited that locally :-(
-*-*-
diff --git a/tests/ltinit.test b/tests/ltinit.test
index 288a186..8517009 100755
--- a/tests/ltinit.test
+++ b/tests/ltinit.test
@@ -25,6 +25,10 @@ set -e
cat >>configure.in <<'END'
AC_PROG_CC
+# Older libtool versions don't define LT_PREREQ :-(
+m4_ifdef([LT_PREREQ],
+ [LT_PREREQ([2.0])],
+ [m4_fatal([Libtool version too old], [63])])
LT_INIT([dlopen])
AC_OUTPUT
END
@@ -42,10 +46,9 @@ END
libtoolize
$ACLOCAL
-$AUTOCONF
# Skip if older libtool (pre-2.0) is used.
-$EGREP '^LT_INIT' configure && Exit 77
-
+$AUTOCONF || { if $? -eq 63; then Exit 77; else Exit 1; fi; }
+$EGREP 'LT_(INIT|PREREQ)' configure && Exit 1 # Sanity check.
$AUTOMAKE -a
cwd=`pwd`
-*-*-
I will push in 72 hours if there are no further objections.
Thanks,
Stefano
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Sat, 26 Feb 2011 14:12:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 8104 <at> debbugs.gnu.org (full text, mbox):
* Stefano Lattarini wrote on Sat, Feb 26, 2011 at 02:54:09PM CET:
> Fine with me. This is the additional squash-in -- on the top of the old
> one, since I had already commited that locally :-(
Don't worry, I do such junk commits all the time. You could
git diff HEAD@{2}
or some similar command, based on 'git reflog' output.
> I will push in 72 hours if there are no further objections.
Feel free to go ahead.
Thanks!
Ralf
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Sat, 26 Feb 2011 23:42:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 8104 <at> debbugs.gnu.org (full text, mbox):
On 02/26/2011 03:11 PM, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Sat, Feb 26, 2011 at 02:54:09PM CET:
>> Fine with me. This is the additional squash-in -- on the top of the old
>> one, since I had already commited that locally :-(
>
> Don't worry, I do such junk commits all the time. You could
> git diff HEAD@{2}
>
> or some similar command, based on 'git reflog' output.
You can use
git add FILENAME
git commit --amend -C HEAD
to add additional stuff to the last commit.
Ralf
Information forwarded
to
owner <at> debbugs.gnu.org, bug-automake <at> gnu.org
:
bug#8104
; Package
automake
.
(Mon, 28 Feb 2011 12:26:01 GMT)
Full text and
rfc822 format available.
Message #31 received at 8104 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Saturday 26 February 2011, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Sat, Feb 26, 2011 at 02:54:09PM CET:
> > Fine with me. This is the additional squash-in -- on the top of the old
> > one, since I had already commited that locally :-(
>
> Don't worry, I do such junk commits all the time. You could
> git diff HEAD@{2}
>
> or some similar command, based on 'git reflog' output.
>
Thanks for the suggestion; I keep forgetting the usefulness of the
`reflog' command (or its very existence) ...
> > I will push in 72 hours if there are no further objections.
>
> Feel free to go ahead.
>
OK, attached is what I pushed. Note that it is slightly different
from my last posted version, because also the call to aclocal can
fail with older libtools. I should have tested better before
submitting the previous diff; sorry for the noise.
Thanks,
Stefano
[0001-libtool-suggest-LT_INIT-if-LTLIBRARIES-primary-is-us.patch (text/x-patch, inline)]
From d51e7b79713f909c235c9880f7f62c4b0c0910d0 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Thu, 24 Feb 2011 10:21:19 +0100
Subject: [PATCH] libtool: suggest LT_INIT if LTLIBRARIES primary is used
When the LTLIBRARIES primary was used, but $(LIBTOOL) wasn't
defined, automake suggested to add a call to AC_PROG_LIBTOOL
in configure.ac. But that macro is deprecated since Libtool
version 1.9b (2004-08-29), in favor of the newer LT_INIT. So
suggest the use of this latter macro instead.
* lib/Automake/Variable.pm (%_am_macro_for_var): Pair 'LIBTOOL'
with 'LT_INIT', not with 'AC_PROG_LIBTOOL'.
* libtool4.test: Adjust and extend. Also, add a call to macro
AC_PROG_CC in configure.in, to help ensuring that automake does
not fail for the wrong reasons.
* ltinit.test: New test, ensure that automake's libtool support
works with LT_INIT-based interface.
Thanks to Jack Kelly for the suggestion.
---
ChangeLog | 17 ++++++++++++
lib/Automake/Variable.pm | 2 +-
tests/Makefile.am | 1 +
tests/Makefile.in | 1 +
tests/libtool4.test | 9 ++++++-
tests/ltinit.test | 64 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 92 insertions(+), 2 deletions(-)
create mode 100755 tests/ltinit.test
diff --git a/ChangeLog b/ChangeLog
index 8d03512..47bc9fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2011-02-26 Stefano Lattarini <stefano.lattarini <at> gmail.com>
+
+ libtool: suggest LT_INIT if LTLIBRARIES primary is used
+ When the LTLIBRARIES primary was used, but $(LIBTOOL) wasn't
+ defined, automake suggested to add a call to AC_PROG_LIBTOOL
+ in configure.ac. But that macro is deprecated since Libtool
+ version 1.9b (2004-08-29), in favor of the newer LT_INIT. So
+ suggest the use of this latter macro instead.
+ * lib/Automake/Variable.pm (%_am_macro_for_var): Pair 'LIBTOOL'
+ with 'LT_INIT', not with 'AC_PROG_LIBTOOL'.
+ * libtool4.test: Adjust and extend. Also, add a call to macro
+ AC_PROG_CC in configure.in, to help ensuring that automake does
+ not fail for the wrong reasons.
+ * ltinit.test: New test, ensure that automake's libtool support
+ works with LT_INIT-based interface.
+ Thanks to Jack Kelly for the suggestion.
+
2011-02-20 Stefano Lattarini <stefano.lattarini <at> gmail.com>
tests: tempdirs with restrictive permissions are cleaned correctly
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index cb9d182..686847d 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -162,7 +162,7 @@ my %_am_macro_for_var =
EMACS => 'AM_PATH_LISPDIR',
GCJ => 'AM_PROG_GCJ',
LEX => 'AM_PROG_LEX',
- LIBTOOL => 'AC_PROG_LIBTOOL',
+ LIBTOOL => 'LT_INIT',
lispdir => 'AM_PATH_LISPDIR',
pkgpyexecdir => 'AM_PATH_PYTHON',
pkgpythondir => 'AM_PATH_PYTHON',
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 047bc7b..cd564fa 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -481,6 +481,7 @@ ltcond.test \
ltcond2.test \
ltconv.test \
ltdeps.test \
+ltinit.test \
ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index fe6238b..f56ff21 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -751,6 +751,7 @@ ltcond.test \
ltcond2.test \
ltconv.test \
ltdeps.test \
+ltinit.test \
ltinstloc.test \
ltlibobjs.test \
ltlibsrc.test \
diff --git a/tests/libtool4.test b/tests/libtool4.test
index bcc9b0f..9f6a730 100755
--- a/tests/libtool4.test
+++ b/tests/libtool4.test
@@ -20,10 +20,17 @@
set -e
+cat >> configure.in <<'END'
+AC_PROG_CC
+END
+
cat > Makefile.am << 'END'
EXTRA_LTLIBRARIES = liblib.la
END
$ACLOCAL
AUTOMAKE_fails
-grep AC_PROG_LIBTOOL stderr
+grep '[Ll]ibtool library .*LIBTOOL.* undefined' stderr
+grep 'define .*LIBTOOL.* add .*LT_INIT' stderr
+
+:
diff --git a/tests/ltinit.test b/tests/ltinit.test
new file mode 100755
index 0000000..b4eaad6
--- /dev/null
+++ b/tests/ltinit.test
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Copyright (C) 2011 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, see <http://www.gnu.org/licenses/>.
+
+# Test that libtool support works correctly when "newer" libtool
+# interface (with LT_INIT etc.) is used (this interface has been
+# present since libtool 1.9b, circa 2004).
+
+required='libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+dnl Older libtool versions don't define LT_PREREQ :-(
+m4_ifdef([LT_PREREQ],
+ [LT_PREREQ([2.0])],
+ [m4_fatal([Libtool version too old], [63])])
+LT_INIT([dlopen])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+lib_LTLIBRARIES = libfoo.la
+END
+
+cat > libfoo.c <<'END'
+int foo (void)
+{
+ return 1;
+}
+END
+
+libtoolize
+# Skip if older libtool (pre-2.0) is used.
+{ $ACLOCAL && $AUTOCONF; } || {
+ if test $? -eq 63; then Exit 77; else Exit 1; fi
+}
+$EGREP 'LT_(INIT|PREREQ)' configure && Exit 1 # Sanity check.
+$AUTOMAKE -a
+
+cwd=`pwd`
+./configure --prefix="$cwd/inst" >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '^checking.*dlopen' stdout
+
+$MAKE
+$MAKE install
+$MAKE distcheck
+
+:
--
1.7.2.3
Reply sent
to
Stefano Lattarini <stefano.lattarini <at> gmail.com>
:
You have taken responsibility.
(Mon, 07 Mar 2011 13:21:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jack Kelly <jack <at> jackkelly.name>
:
bug acknowledged by developer.
(Mon, 07 Mar 2011 13:21:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 8104-done <at> debbugs.gnu.org (full text, mbox):
A patch fixing this bug has been applied in commit
`v1.11-315-gd51e7b7' "libtool: suggest LT_INIT if
LTLIBRARIES primary is used"; I'm thus closing the
bug.
Regards,
Stefano
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 05 Apr 2011 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.