| @@ -1,16 +1,19 @@ | | | @@ -1,16 +1,19 @@ |
1 | $NetBSD: patch-ac,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ | | 1 | $NetBSD: patch-ac,v 1.2 2013/02/22 21:12:25 jperkin Exp $ |
2 | | | 2 | |
3 | --- configure.orig 2001-01-18 09:59:33.000000000 +1300 | | 3 | Look for dlpi before bpf, SunOS has both but this package assumes |
| | | 4 | bpf is only on BSD systems and tries to use sysctl etc. |
| | | 5 | |
| | | 6 | --- configure.orig 2001-01-17 20:59:33.000000000 +0000 |
4 | +++ configure | | 7 | +++ configure |
5 | @@ -506,7 +506,7 @@ fi | | 8 | @@ -506,7 +506,7 @@ fi |
6 | | | 9 | |
7 | ac_ext=c | | 10 | ac_ext=c |
8 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | | 11 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
9 | -ac_cpp='$CPP $CPPFLAGS' | | 12 | -ac_cpp='$CPP $CPPFLAGS' |
10 | +ac_cpp='${CC-cc} -E $CPPFLAGS' | | 13 | +ac_cpp='${CC-cc} -E $CPPFLAGS' |
11 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | | 14 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
12 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | | 15 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
13 | cross_compiling=$ac_cv_prog_cc_cross | | 16 | cross_compiling=$ac_cv_prog_cc_cross |
14 | @@ -778,7 +778,7 @@ echo "configure:778: checking whether th | | 17 | @@ -778,7 +778,7 @@ echo "configure:778: checking whether th |
15 | | | 18 | |
16 | ac_ext=c | | 19 | ac_ext=c |
| @@ -19,40 +22,60 @@ $NetBSD: patch-ac,v 1.1.1.1 2007/02/18 1 | | | @@ -19,40 +22,60 @@ $NetBSD: patch-ac,v 1.1.1.1 2007/02/18 1 |
19 | +ac_cpp='${CC-cc} -E $CPPFLAGS' | | 22 | +ac_cpp='${CC-cc} -E $CPPFLAGS' |
20 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | | 23 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
21 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | | 24 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
22 | cross_compiling=$ac_cv_prog_cc_cross | | 25 | cross_compiling=$ac_cv_prog_cc_cross |
23 | @@ -806,7 +806,7 @@ fi | | 26 | @@ -806,7 +806,7 @@ fi |
24 | rm -fr conftest* | | 27 | rm -fr conftest* |
25 | ac_ext=c | | 28 | ac_ext=c |
26 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | | 29 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
27 | -ac_cpp='$CPP $CPPFLAGS' | | 30 | -ac_cpp='$CPP $CPPFLAGS' |
28 | +ac_cpp='${CC-cc} -E $CPPFLAGS' | | 31 | +ac_cpp='${CC-cc} -E $CPPFLAGS' |
29 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | | 32 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
30 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | | 33 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
31 | cross_compiling=$ac_cv_prog_cc_cross | | 34 | cross_compiling=$ac_cv_prog_cc_cross |
32 | @@ -1284,7 +1284,7 @@ fi | | 35 | @@ -1284,7 +1284,13 @@ fi |
33 | echo $ac_n "checking low-level packet interface type""... $ac_c" 1>&6 | | 36 | echo $ac_n "checking low-level packet interface type""... $ac_c" 1>&6 |
34 | echo "configure:1286: checking low-level packet interface type" >&5 | | 37 | echo "configure:1286: checking low-level packet interface type" >&5 |
35 | | | 38 | |
36 | -if test -r /dev/bpf0 ; then | | 39 | -if test -r /dev/bpf0 ; then |
37 | +if test -r /dev/bpf0 -o -r /dev/bpf -o -r /usr/include/net/bpf.h ; then | | 40 | +if test -r /usr/include/sys/dlpi.h ; then |
| | | 41 | + LL_INT_TYPE=dlpi |
| | | 42 | + echo "$ac_t""found dlpi" 1>&6 |
| | | 43 | + cat >> confdefs.h <<\EOF |
| | | 44 | +#define HAVE_DLPI 1 |
| | | 45 | +EOF |
| | | 46 | +elif test -r /dev/bpf0 -o -r /dev/bpf -o -r /usr/include/net/bpf.h ; then |
38 | LL_INT_TYPE=bpf | | 47 | LL_INT_TYPE=bpf |
39 | echo "$ac_t""found bpf" 1>&6 | | 48 | echo "$ac_t""found bpf" 1>&6 |
40 | elif test -r /usr/include/net/pfilt.h ; then | | 49 | elif test -r /usr/include/net/pfilt.h ; then |
41 | @@ -1416,7 +1416,7 @@ fi | | 50 | @@ -1299,13 +1305,6 @@ elif test -r /usr/include/sys/net/nit.h |
| | | 51 | elif test -r /usr/include/net/raw.h ; then |
| | | 52 | LL_INT_TYPE=snoop |
| | | 53 | echo "$ac_t""found snoop" 1>&6 |
| | | 54 | -elif test -r /usr/include/sys/dlpi.h ; then |
| | | 55 | - LL_INT_TYPE=dlpi |
| | | 56 | - echo "$ac_t""found dlpi" 1>&6 |
| | | 57 | - cat >> confdefs.h <<\EOF |
| | | 58 | -#define HAVE_DLPI 1 |
| | | 59 | -EOF |
| | | 60 | - |
| | | 61 | elif test -r /usr/include/linux/socket.h ; then |
| | | 62 | LL_INT_TYPE=sockpacket |
| | | 63 | echo "$ac_t""found SOCK_PACKET" 1>&6 |
| | | 64 | @@ -1416,7 +1415,7 @@ fi |
42 | | | 65 | |
43 | | | 66 | |
44 | fi | | 67 | fi |
45 | -elif test -c /dev/bpf0 ; then # check again in case not readable | | 68 | -elif test -c /dev/bpf0 ; then # check again in case not readable |
46 | +elif test -c /dev/bpf0 -o -c /dev/bpf ; then # check again in case not readable | | 69 | +elif test -c /dev/bpf0 -o -c /dev/bpf ; then # check again in case not readable |
47 | LL_INT_TYPE=bpf | | 70 | LL_INT_TYPE=bpf |
48 | echo "$ac_t""found bpf" 1>&6 | | 71 | echo "$ac_t""found bpf" 1>&6 |
49 | elif test -c /dev/enet ; then # check again in case not readable | | 72 | elif test -c /dev/enet ; then # check again in case not readable |
50 | @@ -1577,7 +1577,7 @@ done | | 73 | @@ -1577,7 +1576,7 @@ done |
51 | BIN_PREFIX="$prefix/bin/" | | 74 | BIN_PREFIX="$prefix/bin/" |
52 | ;; | | 75 | ;; |
53 | | | 76 | |
54 | -*freebsd*) | | 77 | -*freebsd*) |
55 | +*freebsd* | *dragonfly*) | | 78 | +*freebsd* | *dragonfly*) |
56 | cat >> confdefs.h <<\EOF | | 79 | cat >> confdefs.h <<\EOF |
57 | #define LIBNET_BSDISH_OS 1 | | 80 | #define LIBNET_BSDISH_OS 1 |
58 | EOF | | 81 | EOF |