diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-26 09:39:43 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-26 09:39:43 +0000 |
commit | 0a4062c6ee70bb07e3859e2962c276ed8c366d0b (patch) | |
tree | bd61f36d37ba52af38d01a6b3373e1ae76ad0aed /acinclude.m4 | |
parent | fbd198f16626bb46db6d11d291c0adfff5875522 (diff) |
From Albert Chin: libpcap 0.8.1 loads the BPF driver on AIX, but to do
so it requires routines from -lcfg and -lodm - if attempting to link
with libpcap fails, try linking with libpcap and -lcfg and -lodm and, if
that succeeds, add all those libraries to the link list.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10244 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index a3f1171675..f9999480a9 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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.67 2003/12/19 01:36:01 guy Exp $ +dnl $Id: acinclude.m4,v 1.68 2004/02/26 09:39:43 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 @@ -324,8 +324,28 @@ and did you also install that package?]])) [ PCAP_LIBS=-lpcap AC_DEFINE(HAVE_LIBPCAP, 1, [Define to use libpcap library]) - ], [AC_MSG_ERROR(Library libpcap not found.)], - $SOCKET_LIBS $NSL_LIBS) + ], [ + AC_MSG_CHECKING([for pcap_open_live in -lpcap -lcfg -lodm]) + ac_save_LIBS="$LIBS" + LIBS="-lpcap -lcfg -lodm" + AC_TRY_LINK( + [ +# include <pcap.h> + ], + [ + pcap_open_live(NULL, 0, 0, 0, NULL); + ], + [ + AC_MSG_RESULT([yes]) + PCAP_LIBS="-lpcap -lcfg -lodm" + AC_DEFINE(HAVE_LIBPCAP, 1, [Define to use libpcap library]) + ], + [ + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Library libpcap not found.]) + ]) + LIBS=$ac_save_LIBS + ], $SOCKET_LIBS $NSL_LIBS) AC_SUBST(PCAP_LIBS) # |