app-emulation/hercules: fix ./libtool not fond warnings #791859

Use simpler logic to find shared library info, and use the system
libtool to compile the test programs.  This shouldn't really matter
in practice as this test was defaulting to "no" when the code wasn't
working correctly, and now that it is, it still ends up as "no" as
the hack shouldn't be needed on Linux systems with good shared lib
infrastructure.

Bug: https://bugs.gentoo.org/252716
Closes: https://bugs.gentoo.org/791859
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger
2021-11-18 02:43:44 -05:00
parent 29795392e7
commit e93a59e844

View File

@@ -350,3 +350,30 @@
LIB_LD_FLAGS = $(XSTATIC) \
-no-undefined \
-avoid-version
--- a/autoconf/hercules.m4
+++ b/autoconf/hercules.m4
@@ -270,7 +270,7 @@
else
- if test $(./libtool --features | fgrep "enable shared libraries" | wc -l) -ne 1; then
+ if test "$enable_shared" != "yes"; then
# Libtool doesn't support shared libraries,
# and thus our wrapper kludge is not needed.
@@ -280,11 +280,11 @@
}
DUPGETOPT2
- ./libtool --mode=compile ${CC-cc} conftest1.c -c -o conftest1.lo > /dev/null 2>&1
- ./libtool --mode=compile ${CC-cc} conftest2.c -c -o conftest2.lo > /dev/null 2>&1
+ libtool --mode=compile ${CC-cc} conftest1.c -c -o conftest1.lo > /dev/null 2>&1
+ libtool --mode=compile ${CC-cc} conftest2.c -c -o conftest2.lo > /dev/null 2>&1
- ./libtool --mode=link ${CC-cc} -shared -rpath /lib -no-undefined conftest1.lo -o libconftest1.la > /dev/null 2>&1
- ./libtool --mode=link ${CC-cc} -shared -rpath /lib -no-undefined conftest2.lo libconftest1.la -o libconftest2.la > /dev/null 2>&1
+ libtool --mode=link ${CC-cc} -shared -rpath /lib -no-undefined conftest1.lo -o libconftest1.la > /dev/null 2>&1
+ libtool --mode=link ${CC-cc} -shared -rpath /lib -no-undefined conftest2.lo libconftest1.la -o libconftest2.la > /dev/null 2>&1
if test $? = 0; then