Skip to content
Snippets Groups Projects
Commit 23903306 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

nicer OpenSSL header check

parent 49b9926d
No related branches found
No related tags found
No related merge requests found
......@@ -522,6 +522,7 @@ else
AC_MSG_RESULT(no)
fi
dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers
dnl **********************************************************************
......@@ -540,7 +541,6 @@ then
else
dnl Check for & handle argument to --with-ssl.
AC_MSG_CHECKING(where to look for SSL)
if test X"$OPT_SSL" = Xoff
then
......@@ -577,35 +577,14 @@ else
fi
dnl Check for SSLeay headers
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
openssl/pem.h openssl/ssl.h openssl/err.h)
openssl/pem.h openssl/ssl.h openssl/err.h,
OPENSSL_ENABLED=1)
if test $ac_cv_header_openssl_x509_h = no; then
AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
fi
dnl
dnl If all heades are present, we have enabled SSL!
if test "$ac_cv_header_openssl_x509_h" = "yes" &&
test "$ac_cv_header_openssl_rsa_h" = "yes" &&
test "$ac_cv_header_openssl_crypto_h" = "yes" &&
test "$ac_cv_header_openssl_pem_h" = "yes" &&
test "$ac_cv_header_openssl_ssl_h" = "yes" &&
test "$ac_cv_header_openssl_err_h" = "yes"; then
OPENSSL_ENABLED="1";
fi
dnl
dnl Check the alternative headers too
if test "$ac_cv_header_x509_h" = "yes" &&
test "$ac_cv_header_rsa_h" = "yes" &&
test "$ac_cv_header_crypto_h" = "yes" &&
test "$ac_cv_header_pem_h" = "yes" &&
test "$ac_cv_header_ssl_h" = "yes" &&
test "$ac_cv_header_err_h" = "yes"; then
OPENSSL_ENABLED="1";
AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h,
OPENSSL_ENABLED=1)
fi
AC_SUBST(OPENSSL_ENABLED)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment