diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 56 |
1 files changed, 35 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac index 30f380cf..ab83a4ad 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ dnl */ AC_PREREQ([2.69]) -AC_REVISION([Rev:14 by chappa@washington.edu]) +AC_REVISION([Rev:16 by chappa@washington.edu]) dnl Alpine Version Number is in $srcdir/VERSION AC_INIT([alpine],[m4_normalize(m4_include(VERSION))],[chappa@washington.edu]) @@ -903,6 +903,9 @@ dnl find it anywhere else. alpine_SSLLIB=$withval fi ]) +fi + +if test "x$alpine_SSLTYPE" != "xnone" ; then dnl setup globals so tests below work if test -n "$alpine_SSLINCLUDE" ; then CPPFLAGS="-I$alpine_SSLINCLUDE $CPPFLAGS" @@ -916,6 +919,7 @@ dnl find it anywhere else. fi fi + dnl Include Kerberos? dnl Set GSSDIR for c-client make AC_ARG_WITH(krb5, @@ -1346,29 +1350,16 @@ if test "x$alpine_DL" = "xnone" ; then exit 1 fi -dnl Crypto support is needed +dnl Check Openssl/LibreSSL version first if test "x$alpine_SSLTYPE" != "xnone" ; then - AC_SEARCH_LIBS(SSLeay,crypto,, [ alpine_CRYPTO="none" ]) - if test "x$alpine_CRYPTO" = "xnone" ; then - AC_MSG_ERROR(crypto library NOT found) - exit 1 - fi -fi - -dnl provide SSL support? -if test "x$alpine_SSLTYPE" != "xnone" ; then - AC_SEARCH_LIBS(SSL_library_init,ssl,,[ alpine_SSLTYPE="none" ]) - - if test "x$alpine_SSLTYPE" = "xnone" ; then - AC_MSG_ERROR(No library containing SSL_library_init found in your path) - exit 1 - fi - - AC_MSG_CHECKING([Openssl library version >= 1.0.1c]) + AC_MSG_CHECKING([Openssl library version >= 1.0.0c]) AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include <stdio.h> #include <stdlib.h> +#if HAVE_STDINT_H +#include <stdint.h> +#endif /* HAVE_STDINT_H */ #include <openssl/ssl.h> int main(void) { @@ -1379,10 +1370,11 @@ int main(void) { } ]])], [ AC_MSG_RESULT(yes) ], - [ alpine_SSLTYPE="none" ]) + [ alpine_SSLTYPE="none" ], + [ AC_MSG_WARN([cross compiling: not checking])]) if test "x$alpine_SSLTYPE" = "xnone" ; then - AC_MSG_ERROR(Install openssl version >= 1.0.1c) + AC_MSG_ERROR(Install openssl version >= 1.0.0c) exit 1 fi AC_SEARCH_LIBS(TLSv1_2_client_method,ssl, @@ -1391,6 +1383,26 @@ int main(void) { ]) fi +dnl Crypto support is needed +if test "x$alpine_SSLTYPE" != "xnone" ; then + AC_SEARCH_LIBS(SSLeay,crypto,, [ alpine_CRYPTO="none" ]) + if test "x$alpine_CRYPTO" = "xnone" ; then + AC_MSG_ERROR(crypto library NOT found) + exit 1 + fi +fi + +dnl provide SSL support? +if test "x$alpine_SSLTYPE" != "xnone" ; then + AC_SEARCH_LIBS(SSL_library_init,ssl,,[ alpine_SSLTYPE="none" ]) + + if test "x$alpine_SSLTYPE" = "xnone" ; then + AC_MSG_ERROR(No library containing SSL_library_init found in your path) + exit 1 + fi + +fi + dnl provide LDAP support? if test "$alpine_with_ldap" = "yes" ; then alpine_has_ldap= @@ -1848,6 +1860,8 @@ else certdir="${alpine_SSLDIR}/ssl/certs" elif test -n "$alpine_SSLCERTS_ORIG" -a -d "$alpine_SSLCERTS_ORIG" ; then certdir="$alpine_SSLCERTS_ORIG" + elif test -n "$alpine_SSLCERTS" ; then + certdir="$alpine_SSLCERTS" else AC_MSG_NOTICE([SSL Problem: certificate directory not found]) fi |