From b206df58a52551014be05465194c7d230743d457 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Wed, 23 Apr 2025 17:06:59 +0800 Subject: [PATCH 5/5] configure.ac: improve detection of db and pcap --- configure.ac | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 7217d9d..3b4638c 100755 --- a/configure.ac +++ b/configure.ac @@ -120,11 +120,18 @@ AC_ARG_WITH(db, DBLIB="-L$withval/dist -ldb" elif test -f $withval/include/db_185.h -a \ -f $withval/lib/libdb.a; then - owd=`pwd` - if cd $withval; then withval=`pwd`; cd $owd; fi + owd=`pwd` + if cd $withval; then withval=`pwd`; cd $owd; fi AC_DEFINE(HAVE_DB_185_H) DBINC="-I$withval/include" DBLIB="-L$withval/lib -ldb" + elif test -f $withval/include/db46/db_185.h -a \ + -f $withval/lib/db46/libdb.a; then + owd=`pwd` + if cd $withval; then withval=`pwd`; cd $owd; fi + AC_DEFINE(HAVE_DB_185_H) + DBINC="-I$withval/include/db46" + DBLIB="-L$withval/lib/db46 -ldb" else AC_MSG_ERROR(db_185.h or libdb.a not found in $withval or not configured with --enable-compat185) fi @@ -200,6 +207,9 @@ AC_ARG_WITH(libpcap, [ if test -f ${prefix}/include/pcap.h; then PCAPINC="-I${prefix}/include" PCAPLIB="-L${prefix}/lib -lpcap" + elif test -f ${prefix}/include/pcap/pcap.h; then + PCAPINC="-I${prefix}/include/pcap" + PCAPLIB="-lpcap" elif test -f /usr/include/pcap/pcap.h; then PCAPINC="-I/usr/include/pcap" PCAPLIB="-lpcap" -- 2.49.0