diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-01-18 09:54:09 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-01-18 09:54:09 +0000 |
commit | f3470d634106430a128b541944d0dbd288e7e768 (patch) | |
tree | 24ae31cc77997f873b97e21f46fffbdcdca55eb2 | |
parent | 43142e7a3a3eca67f41f12d4fc5e3672613ae987 (diff) |
Changes to look for SSL library for those who have UCD SNMP compiled
with SSL support, from Andy Hood.
svn path=/trunk/; revision=2919
-rw-r--r-- | acinclude.m4 | 52 | ||||
-rw-r--r-- | configure.in | 18 |
2 files changed, 66 insertions, 4 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 2d918ee37e..cf7bbadcb7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2,7 +2,7 @@ dnl Macros that test for specific features. dnl This file is part of the Autoconf packaging for Ethereal. dnl Copyright (C) 1998-2000 by Gerald Combs. dnl -dnl $Id: acinclude.m4,v 1.20 2000/01/21 06:18:15 guy Exp $ +dnl $Id: acinclude.m4,v 1.21 2001/01/18 09:54:09 guy Exp $ dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -342,3 +342,53 @@ AC_DEFUN(AC_ETHEREAL_UCDSNMP_CHECK, fi fi ]) + +# +# AC_ETHEREAL_SSL_CHECK +# +AC_DEFUN(AC_ETHEREAL_SSL_CHECK, +[ + want_ssl=yes + + AC_ARG_WITH(ssl, + [ --with-ssl=DIR use SSL crypto library, located in directory DIR.], [ + if test $withval = no + then + want_ssl=no + else + want_ssl=yes + ssl_user_dir=$withval + fi + ]) + + if test $want_ssl = yes + then + ssldir="" + + for d in $ssl_user_dir $prefix + do + if test x$d != xNONE + then + AC_MSG_CHECKING($d for ssl) + + if test x$d != x/usr/local && test -f $d/lib/libcrypto.a + then + AC_MSG_RESULT(found) + ssldir=$d + break + else + AC_MSG_RESULT(not found) + fi + fi + done + + if test x$ssldir != x + then + SSL_LIBS=-lcrypto + AC_MSG_RESULT(added $d to paths) + CFLAGS="$CFLAGS -I${ssldir}/include" + CPPFLAGS="$CPPFLAGS -I${ssldir}/include" + AC_ETHEREAL_ADD_DASH_L(LDFLAGS, ${ssldir}/lib) + fi + fi +]) diff --git a/configure.in b/configure.in index b87fba5704..64a5f4ad4d 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.111 2001/01/12 04:06:22 gram Exp $ +# $Id: configure.in,v 1.112 2001/01/18 09:54:09 guy Exp $ dnl dnl Process this file with autoconf 2.13 or later to produce a dnl configure script; 2.12 doesn't generate a "configure" script that @@ -317,6 +317,18 @@ if test "$ac_cv_header_dlfcn_h" = yes ; then AC_DEFINE(HAVE_PLUGINS) fi +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_RESULT(yes) + AC_ETHEREAL_SSL_CHECK + AC_MSG_CHECKING(SSL_LIBS=$SSL_LIBS) +fi +AC_SUBST(SSL_LIBS) + dnl SNMP Check AC_ARG_ENABLE(snmp, [ --enable-snmp use SNMP library, if available. [default=yes]],,enable_snmp=yes) @@ -356,9 +368,9 @@ else # unset ac_cv_lib_snmp_sprint_objid SNMP_LIBS="-lsnmp -lkstat" - ],,$SOCKET_LIBS $NSL_LIBS -lkstat + ],,$SOCKET_LIBS $NSL_LIBS $SSL_LIBS -lkstat ) - ], $SOCKET_LIBS $NSL_LIBS + ], $SOCKET_LIBS $NSL_LIBS $SSL_LIBS ) fi |