aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--acinclude.m4110
-rw-r--r--configure.in41
2 files changed, 72 insertions, 79 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 42839a3ad9..d866581387 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -768,9 +768,13 @@ AC_DEFUN([AC_ETHEREAL_UCDSNMP_CHECK],
# libraries on various platforms, such as "-ldes425"
# in "/usr/kerberos/lib" on some versions of Red
# Hat Linux, or "-lkstat" on Solaris.
- # XXX - it may also require "-lcrypto" on some platforms;
- # we should check for that as well, rather than requiring
- # users to explicitly indicate whether it's required.
+ #
+ # It might also require "-lcrypto" on some platforms;
+ # if the user didn't specify --with-ssl, we check
+ # whether it would have made a difference and, if so,
+ # we tell the user that they needed to request it.
+ # (There are annoying licensing issues with it and
+ # GPL'ed code, so we don't include it by default.)
#
# XXX - autoconf really needs a way to test for
# a given routine in a given library *and* to test
@@ -791,27 +795,40 @@ AC_DEFUN([AC_ETHEREAL_UCDSNMP_CHECK],
sprint_realloc_objid();
],
[
+ #
+ # We found "sprint_realloc_objid()",
+ # and required the libraries in
+ # extras as well.
+ #
SNMP_LIBS="-lsnmp $extras"; break;
],
[
+ #
+ # The link failed. If they didn't ask
+ # for SSL, try linking with -lcrypto
+ # as well, and if *that* succeeds,
+ # tell them they'll need to specify
+ # --want-ssl.
+ #
+ if test "x$want_ssl" = "xno"
+ then
+ LIBS="$LIBS -lcrypto"
+ AC_TRY_LINK(
+ [
+ ],
+ [
+ sprint_realloc_objid();
+ ],
+ [
+ #
+ # It worked with -lcrypto; tell
+ # them they'll need to specify
+ # --with-ssl.
+ #
+ AC_MSG_ERROR([UCD SNMP requires -lcrypto but --with-ssl not specified])
+ ])
+ fi
])
-
-# int sprint_realloc_objid(u_char **buf, size_t *buf_len, size_t *out_len, int allow_realloc, const oid *objid, size_t objidlen);
-# AC_TRY_LINK(includes, body, [if-found], [if-not-found])
-# AC_CHECK_LIB(snmp, sprint_realloc_objid,
-# [
-# SNMP_LIBS="-lsnmp $extras"; break
-# ],
-# [
-# #
-# # Throw away the cached "we didn't find it"
-# # answer, so that if we rerun "configure",
-# # we still do all these checks and don't
-# # just blithely assume we don't need
-# # the extra libraries.
-# #
-# unset ac_cv_lib_snmp_sprint_realloc_objid
-# ], $SOCKET_LIBS $NSL_LIBS $SSL_LIBS $extras)
done
LIBS=$ac_save_LIBS
@@ -843,59 +860,6 @@ AC_DEFUN([AC_ETHEREAL_UCDSNMP_CHECK],
])
#
-# AC_ETHEREAL_SSL_CHECK
-#
-AC_DEFUN([AC_ETHEREAL_SSL_CHECK],
-[
- want_ssl=defaultno
-
- 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
- ])
-
- if test "x$want_ssl" = "xdefaultyes"; then
- want_ssl=yes
- withval=/usr/local/ssl
- if test -d "$withval"; then
- AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${withval}/lib)
- fi
- fi
-
- if test "x$want_ssl" = "xyes"; then
- LIBS="-lcrypto"
- AC_TRY_LINK(
- [
- void EVP_md5();
- ],
- [
- EVP_md5();
- ],
- [
- AC_MSG_RESULT([yes])
- SSL_LIBS=-lcrypto
- ],
- [
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([libcrypto failed link test.])
- ])
-
- else
- AC_MSG_RESULT(not required)
- fi
-])
-
-#
# AC_ETHEREAL_RPM_CHECK
# Looks for the rpm program, and checks to see if we can redefine "_topdir".
#
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"