1 --- tmp/base/libnids-1.18-r0/libnids-1.18/configure.in Tue Oct 14 18:40:00 2003
2 +++ libnids-1.18/configure.in Wed Nov 5 16:01:27 2003
6 AC_MSG_RESULT($withval)
7 - if test -f $withval/pcap.h -a -f $withval/libpcap.a; then
9 - if cd $withval; then withval=`pwd`; cd $owd; fi
10 - PCAP_CFLAGS="-I$withval -I$withval/bpf"
11 - PCAPLIB="-L$withval -lpcap"
13 + for i in $withval $withval/include $withval/lib $withval/include/pcap; do
14 + if test -f $i/pcap.h; then
15 + PCAP_CFLAGS="-I$i -I$i/bpf"
17 + if test -f $i/libpcap.a; then
18 + PCAPLIB="-L$i -lpcap"
21 + if test -z "$PCAP_CFLAGS" -o -z "$PCAPLIB"; then
22 AC_ERROR(pcap.h or libpcap.a not found in $withval)
28 AC_MSG_RESULT($withval)
29 - if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.a -a -f $withval/libnet-config ; then
31 - if cd $withval; then withval=`pwd`; cd $owd; fi
32 - LNET_CFLAGS="-I$withval/include `$withval/libnet-config --defines`"
33 - LNETLIB="-L$withval/lib -lnet"
34 - elif test -f $withval/include/libnet.h -a -f $withval/src/libnet.a; then
36 - if cd $withval; then withval=`pwd`; cd $owd; fi
37 - LNET_CFLAGS="-I$withval/include"
38 - LNETLIB="-L$withval/src -lnet"
40 - echo "A working combination of libnet.h, libnet.a and libnet-config not found in $withval; get libnet from www.packetfactory.net/projects/libnet and reinstall"
42 + LNETC="`which libnet-config 2>/dev/null`"
43 + for i in $withval $withval/include $withval/lib $withval/bin; do
44 + if test -f $i/libnet-config; then
45 + LNETC"=$i/libnet-config"
47 + if test -f $i/libnet.h; then
50 + if test -f $i/libnet.a; then
51 + LNETLIB="-L$i -lnet"
54 + if test -z "$LNET_CFLAGS" -o -z "$LNETLIB" -o -z "$LNETC"; then
55 + AC_ERROR([libnet not found in $withval])
57 + LNET_CFLAGS="$LNET_CFLAGS `$LNETC --defines`"
60 [ if test "x"$LIBNET_VER = "x"-1 ; then