]>
Commit | Line | Data |
---|---|---|
1ee5465f | 1 | based on http://github.com/mcr/libpcap/commit/d1a3a92fab103210ab5f61780a731bce9a8909b5 |
2a9db745 AM |
2 | diff -urNp -x '*.orig' arpwatch-2.1a15.org/aclocal.m4 arpwatch-2.1a15/aclocal.m4 |
3 | --- arpwatch-2.1a15.org/aclocal.m4 2021-05-09 14:37:46.275738586 +0200 | |
4 | +++ arpwatch-2.1a15/aclocal.m4 2021-05-09 14:37:46.332408198 +0200 | |
5 | @@ -23,29 +23,22 @@ dnl LBL autoconf macros | |
1ee5465f SS |
6 | dnl |
7 | ||
8 | dnl | |
9 | -dnl Determine which compiler we're using (cc or gcc) | |
10 | -dnl If using gcc, determine the version number | |
11 | -dnl If using cc, require that it support ansi prototypes | |
12 | -dnl If using gcc, use -O2 (otherwise use -O) | |
13 | -dnl If using cc, explicitly specify /usr/local/include | |
14 | -dnl | |
15 | -dnl usage: | |
16 | -dnl | |
17 | +dnl Do whatever AC_LBL_C_INIT work is necessary before using AC_PROG_CC. | |
18 | dnl AC_LBL_C_INIT(copt, incls) | |
19 | dnl | |
20 | -dnl results: | |
1ee5465f SS |
21 | +dnl It appears that newer versions of autoconf (2.64 and later) will, |
22 | +dnl if you use AC_TRY_COMPILE in a macro, stick AC_PROG_CC at the | |
23 | +dnl beginning of the macro, even if the macro itself calls AC_PROG_CC. | |
24 | +dnl See section 20.8 "Expanded Before Required" in the Autoconf | |
25 | +dnl documentation. | |
26 | +dnl | |
27 | +dnl This causes a steaming heap of fail in our case, as we were, in | |
28 | +dnl AC_LBL_C_INIT, doing the tests we now do in AC_LBL_C_PREPARE, | |
29 | +dnl calling AC_PROG_CC, and then doing the tests we now do in | |
30 | +dnl AC_LBL_C_INIT. | |
31 | dnl | |
2a9db745 AM |
32 | -dnl $1 (copt set) |
33 | -dnl $2 (incls set) | |
34 | -dnl CC | |
35 | -dnl LDFLAGS | |
36 | -dnl LBL_CFLAGS | |
37 | -dnl | |
1ee5465f SS |
38 | -AC_DEFUN(AC_LBL_C_INIT, |
39 | - [AC_PREREQ(2.12) | |
40 | - AC_BEFORE([$0], [AC_PROG_CC]) | |
41 | - AC_BEFORE([$0], [AC_LBL_FIXINCLUDES]) | |
42 | - AC_BEFORE([$0], [AC_LBL_DEVEL]) | |
43 | +AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC, | |
44 | +[ | |
45 | AC_ARG_WITH(gcc, [ --without-gcc don't use gcc]) | |
46 | $2="" | |
47 | if test "${srcdir}" != "." ; then | |
2a9db745 | 48 | @@ -70,7 +63,32 @@ AC_DEFUN(AC_LBL_C_INIT, |
1ee5465f SS |
49 | CC=cc |
50 | export CC | |
51 | fi | |
52 | - AC_PROG_CC | |
53 | +]) | |
54 | + | |
55 | +dnl | |
56 | +dnl Determine which compiler we're using (cc or gcc) | |
57 | +dnl If using gcc, determine the version number | |
58 | +dnl If using cc, require that it support ansi prototypes | |
59 | +dnl If using gcc, use -O2 (otherwise use -O) | |
60 | +dnl If using cc, explicitly specify /usr/local/include | |
61 | +dnl | |
62 | +dnl usage: | |
63 | +dnl | |
64 | +dnl AC_LBL_C_INIT(copt, incls) | |
65 | +dnl | |
66 | +dnl results: | |
67 | +dnl | |
68 | +dnl $1 (copt set) | |
69 | +dnl $2 (incls set) | |
70 | +dnl CC | |
71 | +dnl LDFLAGS | |
72 | +dnl ac_cv_lbl_gcc_vers | |
73 | +dnl LBL_CFLAGS | |
74 | +dnl | |
75 | +AC_DEFUN(AC_LBL_C_INIT, | |
76 | + [AC_PREREQ(2.50) | |
77 | + AC_BEFORE([$0], [AC_LBL_FIXINCLUDES]) | |
78 | + AC_BEFORE([$0], [AC_LBL_DEVEL]) | |
79 | if test "$GCC" != yes ; then | |
80 | AC_MSG_CHECKING(that $CC handles ansi prototypes) | |
81 | AC_CACHE_VAL(ac_cv_lbl_cc_ansi_prototypes, | |
2a9db745 AM |
82 | diff -urNp -x '*.orig' arpwatch-2.1a15.org/configure.in arpwatch-2.1a15/configure.in |
83 | --- arpwatch-2.1a15.org/configure.in 2006-06-21 22:34:29.000000000 +0200 | |
84 | +++ arpwatch-2.1a15/configure.in 2021-05-09 14:37:46.332408198 +0200 | |
85 | @@ -16,6 +16,8 @@ if test -z "$PWD" ; then | |
86 | PWD=`pwd` | |
87 | fi | |
88 | ||
89 | +AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS) | |
90 | +AC_PROG_CC | |
91 | AC_LBL_C_INIT(V_CCOPT, V_INCLS) | |
92 | ||
93 | AC_CHECK_HEADERS(fcntl.h memory.h) |