]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: only add OpenSSL paths if they are defined
authorMichael Hordijk <hordijk@aurora.tech>
Tue, 9 Mar 2021 20:04:06 +0000 (15:04 -0500)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 12 Mar 2021 08:45:10 +0000 (09:45 +0100)
Add paths for OpenSSL compiling and linking only if they have been
defined.  If they haven't been defined, we'll assume that the paths are
already available to the toolchain.

Closes #6730

configure.ac

index f3b11f0053b85901b4d1e552e8b9d6b924074109..a168044198d7c4d68ed1a14b7b892dba1994456c 100755 (executable)
@@ -1834,8 +1834,10 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
      HAVECRYPTO="yes"
      LIBS="-lcrypto $LIBS"
      ],[
-     LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
-     if test "$PKGCONFIG" = "no" ; then
+     if test -n "$LIB_OPENSSL" ; then
+       LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
+     fi
+     if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
        # only set this if pkg-config wasn't used
        CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
      fi