1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

nicer OpenSSL header check

This commit is contained in:
Daniel Stenberg 2001-05-18 12:36:38 +00:00
parent 49b9926d5a
commit 23903306a7

View File

@ -522,6 +522,7 @@ else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi fi
dnl ********************************************************************** dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers dnl Check for the presence of SSL libraries and headers
dnl ********************************************************************** dnl **********************************************************************
@ -540,7 +541,6 @@ then
else else
dnl Check for & handle argument to --with-ssl. dnl Check for & handle argument to --with-ssl.
AC_MSG_CHECKING(where to look for SSL) AC_MSG_CHECKING(where to look for SSL)
if test X"$OPT_SSL" = Xoff if test X"$OPT_SSL" = Xoff
then then
@ -577,35 +577,14 @@ else
fi fi
dnl Check for SSLeay headers dnl Check for SSLeay headers
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \ 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 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) AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h,
fi OPENSSL_ENABLED=1)
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";
fi fi
AC_SUBST(OPENSSL_ENABLED) AC_SUBST(OPENSSL_ENABLED)