aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-12-16 23:00:33 +0000
committerGuy Harris <guy@alum.mit.edu>2003-12-16 23:00:33 +0000
commit7d0683d44f5c1ca2e5b624a5f804ba703223a67e (patch)
tree91d320a61474ca32212142b3d639c154c41c13f2 /configure.in
parent585ab5ab2d021fc09276cde1adef9017f89248ee (diff)
From D. Manzella: run $NETSNMPCONFIG, not "net-snmp-config" (as long as
we've gone through the trouble of finding the path, we should use it, and if the user explicitly said where it is, we should *definitely* use it), and add the output of "$NETSNMPCONFIG --cflags" to CFLAGS and CPPFLAGS before searching for Net-SNMP headers, so we check the appropriate directory for them. svn path=/trunk/; revision=9303
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in25
1 files changed, 21 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index b19c9bc46e..7439420eed 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.236 2003/12/13 18:05:48 gerald Exp $
+# $Id: configure.in,v 1.237 2003/12/16 23:00:33 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
@@ -659,11 +659,20 @@ if test "x$NETSNMPCONFIG" != "xno" -a "x$NETSNMPCONFIG" != "x" -a -x "$NETSNMPCO
dnl other choices for flags to use here: could also use
dnl --prefix or --exec-prefix if you don't want the full list.
+ #
+ # Save the current settings of CFLAGS and CPPFLAGS, and add
+ # the output of "$NETSNMPCONFIG --cflags" to it, so that when
+ # searching for the Net-SNMP headers, we look in whatever
+ # directory that output specifies.
+ #
+ ethereal_save_CFLAGS="$CFLAGS"
+ ethereal_save_CPPFLAGS="$CPPFLAGS"
+ CFLAGS="$CFLAGS `$NETSNMPCONFIG --cflags`"
+ CPPFLAGS="$CPPFLAGS `$NETSNMPCONFIG --cflags`"
+
AC_CHECK_HEADERS(net-snmp/net-snmp-config.h net-snmp/library/default_store.h)
if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = "xyes" -a "x$ac_cv_header_net_snmp_library_default_store_h" = "xyes" ; then
- CFLAGS="$CFLAGS `net-snmp-config --cflags`"
- CPPFLAGS="$CPPLAGS `net-snmp-config --cflags`"
- SNMP_LIBS=`net-snmp-config --libs`
+ SNMP_LIBS=`$NETSNMPCONFIG --libs`
AC_DEFINE(HAVE_NET_SNMP, 1, [Define to enable support for NET-SNMP])
have_net_snmp="yes"
else
@@ -673,6 +682,14 @@ if test "x$NETSNMPCONFIG" != "xno" -a "x$NETSNMPCONFIG" != "x" -a -x "$NETSNMPCO
# headers. This would likely be a broken system to
# try and use anyway.
NETSNMPCONFIG="no"
+
+ #
+ # Restore the versions of CFLAGS and CPPFLAGS before
+ # we added the output of '$NETSNMPCONFIG --cflags",
+ # as we didn't actually find Net-SNMP there.
+ #
+ CFLAGS="$ethereal_save_CFLAGS"
+ CPPFLAGS="$ethereal_save_CPPFLAGS"
fi
else
AC_MSG_CHECKING(whether to use UCD SNMP library if available)