diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-01-08 22:52:22 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-01-08 22:52:22 +0000 |
commit | eb52423d71950e303b5af228de0eb22a6fddfede (patch) | |
tree | 597d3004ef9f472efdc25698db4a2ee43ec73c05 /configure.in | |
parent | 0a0108699e4ca0bc41790b239abe94122112c278 (diff) |
Cope with "net-snmp-config --cflags" emitting flags that the C compiler
can use but cpp can't.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9602 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 36edf3975c..ac346eb5d9 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.240 2003/12/24 14:06:36 jmayer Exp $ +# $Id: configure.in,v 1.241 2004/01/08 22:52:22 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 @@ -665,10 +665,18 @@ if test "x$NETSNMPCONFIG" != "xno" -a "x$NETSNMPCONFIG" != "x" -a -x "$NETSNMPCO # searching for the Net-SNMP headers, we look in whatever # directory that output specifies. # + # XXX - some versions of net-snmp-config, when run with --cflags, + # might set flags that won't work with cpp, and AC_CHECK_HEADERS + # might use cpp. To work around this, we just use --prefix to + # get the directory in which to search for header files, and + # construct CPPFLAGS from that, although that might miss -D or + # -U flags you get from --cflags; the -I flag should be + # sufficient for AC_CHECK_HEADERS' purpose. + # ethereal_save_CFLAGS="$CFLAGS" ethereal_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS `$NETSNMPCONFIG --cflags`" - CPPFLAGS="$CPPFLAGS `$NETSNMPCONFIG --cflags`" + CPPFLAGS="$CPPFLAGS -I`$NETSNMPCONFIG --prefix`/include" 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 |