Changes to look for SSL library for those who have UCD SNMP compiled

with SSL support, from Andy Hood.

svn path=/trunk/; revision=2919
This commit is contained in:
Guy Harris 2001-01-18 09:54:09 +00:00
parent 43142e7a3a
commit f3470d6341
2 changed files with 66 additions and 4 deletions

View File

@ -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
])

View File

@ -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