]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/libnids/libnids-1.18/configure.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / libnids / libnids-1.18 / configure.patch
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
3 @@ -65,12 +65,15 @@
4       ;;
5    *)
6       AC_MSG_RESULT($withval)
7 -     if test -f $withval/pcap.h -a -f $withval/libpcap.a; then
8 -        owd=`pwd`
9 -        if cd $withval; then withval=`pwd`; cd $owd; fi
10 -       PCAP_CFLAGS="-I$withval -I$withval/bpf"
11 -       PCAPLIB="-L$withval -lpcap"
12 -     else
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"
16 +        fi
17 +        if test -f $i/libpcap.a; then
18 +           PCAPLIB="-L$i -lpcap"
19 +        fi
20 +     done
21 +     if test -z "$PCAP_CFLAGS" -o -z "$PCAPLIB"; then
22          AC_ERROR(pcap.h or libpcap.a not found in $withval)
23       fi
24       ;;
25 @@ -127,20 +130,22 @@
26       ;;
27    *)
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
30 -        owd=`pwd`
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
35 -        owd=`pwd`
36 -        if cd $withval; then withval=`pwd`; cd $owd; fi
37 -       LNET_CFLAGS="-I$withval/include"
38 -       LNETLIB="-L$withval/src -lnet"
39 -     else
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"
41 -        AC_ERROR(libnet)
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"
46 +        fi
47 +        if test -f $i/libnet.h; then
48 +           LNET_CFLAGS="-I$i"
49 +        fi
50 +        if test -f $i/libnet.a; then
51 +           LNETLIB="-L$i -lnet"
52 +        fi
53 +     done
54 +     if test -z "$LNET_CFLAGS" -o -z "$LNETLIB" -o -z "$LNETC"; then
55 +        AC_ERROR([libnet not found in $withval])
56       fi
57 +     LNET_CFLAGS="$LNET_CFLAGS `$LNETC --defines`"
58       ;;
59    esac ],
60  [ if test "x"$LIBNET_VER = "x"-1 ; then