As we're not using the default action for AC_CHECK_LIB in

AC_ETHEREAL_PCAP_CHECK, we have to explicitly define HAVE_LIBPCAP if we
find it, otherwise it doesn't get defined.

svn path=/trunk/; revision=1486
This commit is contained in:
Guy Harris 2000-01-15 10:25:41 +00:00
parent 84776702fa
commit d24c46a027
2 changed files with 10 additions and 3 deletions

View 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

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.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.),