]> granicus.if.org Git - curl/commitdiff
configure: error out if OpenSSL wasn't detected when asked for
authorDaniel Stenberg <daniel@haxx.se>
Thu, 2 May 2019 08:42:23 +0000 (10:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 14 May 2019 11:19:47 +0000 (13:19 +0200)
If --with-ssl is used and configure still couldn't enable SSL this
creates an error instead of just silently ignoring the fact.

Suggested-by: Isaiah Norton
Fixes #3824
Closes #3830

configure.ac

index 00fef948918cb9649531f71356f2f29b17d664c4..f1c48b165734241712693ba2ea13b5d4e4116c36 100755 (executable)
@@ -1889,6 +1889,14 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
   test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
 fi
 
+if test X"$OPT_SSL" != Xoff &&
+  test X"$OPT_SSL" != Xno &&
+  test "$OPENSSL_ENABLED" != "1"; then
+  AC_MSG_NOTICE([OPT_SSL: $OPT_SSL])
+  AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED])
+  AC_MSG_ERROR([--with-ssl was given but OpenSSL could not be detected])
+fi
+
 dnl **********************************************************************
 dnl Check for the random seed preferences
 dnl **********************************************************************