From aa580a0ccaf6598301aa8cabc98bd7bf282dbe73 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 26 Sep 2004 04:00:20 +0000 Subject: Clean up a bunch of cruft in --with-ssl; make it more resemble other --with flags. Report, in the messages at the end of the configure script, whether we're building with the SSL library. If we fail to find "sprint_realloc_objid()" when linking with a particular library, and --with-ssl wasn't specified, try linking with -lcrypto as well and, if that succeeds, fail with an indication that UCD SNMP requires -lcrypto but --with-ssl wasn't specified. svn path=/trunk/; revision=12105 --- configure.in | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index fccd4f1e13..4e81ab841d 100644 --- a/configure.in +++ b/configure.in @@ -744,13 +744,35 @@ AC_CHECK_HEADERS(iconv.h) dnl SSL Check SSL_LIBS='' -AC_MSG_CHECKING(whether to use SSL library if available) -if test "x$enable_ssl" = "xno" ; then - AC_MSG_RESULT(no) -else +AC_MSG_CHECKING(whether to use SSL library) + +AC_ARG_WITH(ssl, +changequote(<<, >>)dnl +<< --with-ssl[=DIR] use SSL crypto library (located in directory DIR, if supplied). [default=no]>>, +changequote([, ])dnl +[ +if test "x$withval" = "xno"; then + want_ssl=no +elif test "x$withval" = "xyes"; then + want_ssl=yes +elif test -d "$withval"; then + want_ssl=yes + AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib) +fi +],[ + want_ssl=no +]) +if test "x$want_ssl" = "xyes"; then AC_MSG_RESULT(yes) - AC_MSG_CHECKING(whether SSL library is available) - AC_ETHEREAL_SSL_CHECK + AC_CHECK_LIB(crypto,EVP_md5, + [ + SSL_LIBS=-lcrypto + ], + [ + AC_MSG_ERROR([SSL crypto library was requested, but is not available]) + ]) +else + AC_MSG_RESULT(no) fi AC_SUBST(SSL_LIBS) @@ -1253,6 +1275,12 @@ else pcre_message="yes" fi +if test "x$want_ssl" = "xno" ; then + ssl_message="no" +else + ssl_message="yes" +fi + if test "x$want_krb5" = "xno" ; then krb5_message="no" else @@ -1297,5 +1325,6 @@ echo " Use zlib library : $zlib_message" echo " Use pcre library : $pcre_message" echo " Use kerberos library : $krb5_message" echo " Use GNU ADNS library : $adns_message" +echo " Use SSL crypto library : $ssl_message" echo " Use IPv6 name resolution : $enable_ipv6" echo " Use UCD SNMP/NET-SNMP library : $snmp_libs_message" -- cgit v1.2.3