aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2022-04-01 19:23:06 +0200
committerMatthias Andree <matthias.andree@gmx.de>2022-04-23 12:16:27 +0200
commit28c476ec453fb445bf3eceeec8cce1e9822eabd2 (patch)
treec271131da14ecf2226033ad633d091935e502018
parent6b6cb4a30876409ea7f34f822a19f1d52e237bfd (diff)
downloadfetchmail-28c476ec453fb445bf3eceeec8cce1e9822eabd2.tar.gz
fetchmail-28c476ec453fb445bf3eceeec8cce1e9822eabd2.tar.bz2
fetchmail-28c476ec453fb445bf3eceeec8cce1e9822eabd2.zip
configure.ac: fix cross-compilation with openssl
Don't call AC_LIB_LINKFLAGS when the libraries are retrieved through pkg-config to avoid the following build failure when cross-compiling raised since commit 77503f545d2806d07ab83c59ed9a96f435d281da: /home/autobuild/autobuild/instance-5/output-1/host/bin/arc-buildroot-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -D_FORTIFY_SOURCE=1 -I/home/autobuild/autobuild/instance-5/output-1/host/arc-buildroot-linux-gnu/sysroot/usr/include -I/usr/kerberos/include -L/home/autobuild/autobuild/instance-5/output-1/host/arc-buildroot-linux-gnu/sysroot/usr/lib -L/home/autobuild/autobuild/instance-5/output-1/host/bin/../arc-buildroot-linux-gnu/sysroot/usr/lib -o fetchmail socket.o getpass.o fetchmail.o env.o idle.o options.o daemon.o driver.o transact.o sink.o smtp.o idlist.o uid.o mxget.o md5ify.o cram.o gssapi.o opie.o interface.o netrc.o unmime.o conf.o checkalias.o uid_db.o lock.o rcfile_l.o rcfile_y.o ucs/norm_charmap.o fm_realpath.o pop3.o imap.o etrn.o odmr.o libfm.a strlcpy.o strlcat.o /usr/lib/libssl.so /usr/lib/libcrypto.so /usr/lib/libssl.so: file not recognized: file format not recognized This build failure is raised because AC_LIB_LINKFLAGS will override the pkg-config target libraries by the host openssl libraries: configure: Enabling OpenSSL support in /home/autobuild/autobuild/instance-5/output-1/host/arc-buildroot-linux-gnu/sysroot/usr. configure: SSL-check: trying pkg-config for openssl checking for SSL... yes checking how to link with libssl... /usr/lib/libssl.so /usr/lib/libcrypto.so configure: From pkg-config: Adding /usr/lib/libssl.so /usr/lib/libcrypto.so to LIBS. LDFLAGS= -L/home/autobuild/autobuild/instance-5/output-1/host/arc-buildroot-linux-gnu/sysroot/usr/lib -L/home/autobuild/autobuild/instance-5/output-1/host/bin/../arc-buildroot-linux-gnu/sysroot/usr/lib Fixes: - http://autobuild.buildroot.org/results/815f18f25017be178d478458c48712d9a8570d5a Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-rw-r--r--configure.ac6
1 files changed, 2 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index ff24c2f7..6c55c30c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -838,15 +838,13 @@ else
PKG_CHECK_MODULES([SSL],[$i],[
set -- $SSL_LIBS
while test $# -ge 1 ; do
- case $1 in -l*|lib*) : ;;
+ case $1 in -l*|lib*) LIBS="$LIBS $1" ;;
*) LDFLAGS="$LDFLAGS $1" ;;
esac
shift
done
CPPFLAGS="$SSL_CFLAGS $CPPFLAGS"
- AC_LIB_LINKFLAGS([ssl], [crypto])
- AS_MESSAGE([From pkg-config: Adding $LIBSSL to LIBS. LDFLAGS=$LDFLAGS])
- LIBS="$LIBS $LIBSSL"
+ AS_MESSAGE([From pkg-config: $SSL_LIBS])
found=1
break],[: ignore-error])
done