As we're not using the default action for AC_CHECK_LIB in
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 15 Jan 2000 10:25:41 +0000 (10:25 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 15 Jan 2000 10:25:41 +0000 (10:25 +0000)
AC_ETHEREAL_PCAP_CHECK, we have to explicitly define HAVE_LIBPCAP if we
find it, otherwise it doesn't get defined.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1486 f5534014-38df-0310-8fa8-9805f1628bb7

acconfig.h
acinclude.m4

index a16b4d0b847e8a2f6187e26275de5ed9baa0c1ff..32b4ecc721fda95b8b0e0e76a05f5817b61a054f 100644 (file)
@@ -1,7 +1,7 @@
 /* acconfig.h
  * #ifdefs to be controlled by "configure"
  *
- * $Id: acconfig.h,v 1.14 2000/01/15 00:22:29 gram Exp $
+ * $Id: acconfig.h,v 1.15 2000/01/15 10:25:41 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -39,4 +39,6 @@
 
 #undef NEED_MKSTEMP
 
+#undef HAVE_LIBPCAP
+
 #undef PLUGIN_DIR
index d1a7c80e9f2cdf149eafff82368b2a30503d67b7..f3b0123c58f06c71338ca9c4a0b18d7d972fb40d 100644 (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.17 2000/01/15 09:46:28 guy Exp $
+dnl $Id: acinclude.m4,v 1.18 2000/01/15 10:25:41 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
@@ -269,7 +269,10 @@ AC_DEFUN(AC_ETHEREAL_PCAP_CHECK,
        # Try various directories to find libpcap
        #
        AC_CHECK_LIB(pcap, pcap_open_live,
-         PCAP_LIBS=-lpcap,
+         [
+           PCAP_LIBS=-lpcap
+           AC_DEFINE(HAVE_LIBPCAP)
+         ],
          [
            #
            # Throw away the cached "we didn't find it"
@@ -296,6 +299,7 @@ AC_DEFUN(AC_ETHEREAL_PCAP_CHECK,
                unset ac_cv_lib_pcap_pcap_open_live
                AC_ETHEREAL_ADD_DASH_L(PCAP_LIBS, /usr/local/lib)
                PCAP_LIBS="$PCAP_LIBS -lpcap"
+               AC_DEFINE(HAVE_LIBPCAP)
                LIBS="$save_LIBS"
              ],
              [
@@ -316,6 +320,7 @@ AC_DEFUN(AC_ETHEREAL_PCAP_CHECK,
                    unset ac_cv_lib_pcap_pcap_open_live
                    AC_ETHEREAL_ADD_DASH_L(PCAP_LIBS, $prefix/lib)
                    PCAP_LIBS="$PCAP_LIBS -lpcap"
+                   AC_DEFINE(HAVE_LIBPCAP)
                    LIBS="$save_LIBS"
                  ],
                  AC_MSG_ERROR(Library libpcap not found.),