[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Allow different --libtool options from multiple gnulib-tool invocations
From: |
Bruno Haible |
Subject: |
Allow different --libtool options from multiple gnulib-tool invocations |
Date: |
Fri, 29 Sep 2023 23:02:54 +0200 |
Since 2021, gnulib-tool supports multiple gnulib-tool invocations in the scope
of a single configure.ac file (assuming different values for --macro-prefix,
of course).
But there is one problem: When the last of these invocations (in the sense
of the order in which the *_INIT macros are invoked from configure.ac) does
NOT have a --libtool invocation, but earlier gnulib-tool invocations do use
--libtool, there can be link errors. The reason is that the GL_COND_LIBTOOL
Automake conditional gets the value from the *last* invocation, that is,
false, and then *all* Makefile.am snippets of the form
if GL_COND_LIBTOOL
lib_LDFLAGS += $(LTLIB_SOMETHING)
endif
get ignored. Including those from the earlier gnulib-tool invocations.
The fix is to remove these 'if GL_COND_LIBTOOL' conditionals.
gnulib-tool already eliminates lib_LDFLAGS augmentations for non-libtool
libraries, since 2006 (cf. sed_eliminate_LDFLAGS).
2023-09-29 Bruno Haible <bruno@clisp.org>
Allow different --libtool options from multiple gnulib-tool invocations.
* modules/crypto/gc (Makefile.am): Don't test GL_COND_LIBTOOL, since
gnulib-tool already eliminates lib_LDFLAGS augmentations for non-libtool
libraries.
* modules/striconv (Makefile.am): Likewise.
* modules/striconveh (Makefile.am): Likewise.
* modules/termcap (Makefile.am): Likewise.
* modules/terminfo (Makefile.am): Likewise.
diff --git a/modules/crypto/gc b/modules/crypto/gc
index cd1d56b5c0..bda331ff3d 100644
--- a/modules/crypto/gc
+++ b/modules/crypto/gc
@@ -26,9 +26,7 @@ lib_SOURCES += gc-libgcrypt.c
else
lib_SOURCES += gc-gnulib.c
endif
-if GL_COND_LIBTOOL
lib_LDFLAGS += $(LTLIBGCRYPT)
-endif
Include:
"gc.h"
diff --git a/modules/striconv b/modules/striconv
index d4677a33cc..542287dcea 100644
--- a/modules/striconv
+++ b/modules/striconv
@@ -20,9 +20,7 @@ fi
Makefile.am:
lib_SOURCES += striconv.h striconv.c
-if GL_COND_LIBTOOL
lib_LDFLAGS += $(LTLIBICONV)
-endif
Include:
"striconv.h"
diff --git a/modules/striconveh b/modules/striconveh
index 2702cec6c2..7e039ec146 100644
--- a/modules/striconveh
+++ b/modules/striconveh
@@ -29,9 +29,7 @@ fi
Makefile.am:
lib_SOURCES += striconveh.h striconveh.c
-if GL_COND_LIBTOOL
lib_LDFLAGS += $(LTLIBICONV)
-endif
Include:
"striconveh.h"
diff --git a/modules/termcap b/modules/termcap
index 4f9156c4e6..74b4071478 100644
--- a/modules/termcap
+++ b/modules/termcap
@@ -23,9 +23,7 @@ configure.ac:
gl_TERMCAP
Makefile.am:
-if GL_COND_LIBTOOL
lib_LDFLAGS += $(LTLIBTERMCAP)
-endif
Include:
diff --git a/modules/terminfo b/modules/terminfo
index c7b0a8b71f..7d37385a41 100644
--- a/modules/terminfo
+++ b/modules/terminfo
@@ -16,9 +16,7 @@ configure.ac:
gl_TERMINFO
Makefile.am:
-if GL_COND_LIBTOOL
lib_LDFLAGS += $(LTLIBTERMINFO)
-endif
Include:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Allow different --libtool options from multiple gnulib-tool invocations,
Bruno Haible <=