]> granicus.if.org Git - curl/commitdiff
configure: enhance ability to detect/build with static openssl
authorDaniel Stenberg <daniel@haxx.se>
Thu, 14 Jun 2018 14:52:43 +0000 (16:52 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 14 Jun 2018 21:08:04 +0000 (23:08 +0200)
Fix the -ldl and -ldl + -lpthread checks for OpenSSL, necessary for
building with static libs without pkg-config.

Reported-by: Marcel Raad
Fixes #2199
Closes #2659

configure.ac

index a9fd3d103ce987a3786a075d8ca51a4b4c607b7a..f38e1c0ce5cf40348b84848a8c4ad99c81612f36 100755 (executable)
@@ -1657,7 +1657,7 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
 
        dnl still no, but what about with -ldl?
        AC_MSG_CHECKING([OpenSSL linking with -ldl])
-       LIBS="$LIBS -ldl"
+       LIBS="$LIBS -ldl -lcrypto"
        AC_TRY_LINK(
        [
          #include <openssl/err.h>
@@ -1674,7 +1674,7 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
          dnl ok, so what about bouth -ldl and -lpthread?
 
          AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
-         LIBS="$LIBS -lpthread"
+         LIBS="$CLEANLIBS -ldl -lpthread -lcrypto"
          AC_TRY_LINK(
          [
            #include <openssl/err.h>