[packages] snort: fix autoreconf
[openwrt/svn-archive/archive.git] / net / snort / patches / 002-automake-cross.patch
1 --- a/configure.in
2 +++ b/configure.in
3 @@ -163,28 +163,6 @@ else
4 AC_MSG_RESULT(no)
5 fi
6
7 -# check for sparc %time register
8 -if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
9 - OLD_CFLAGS="$CFLAGS"
10 - CFLAGS="$CFLAGS -mcpu=v9 "
11 - AC_MSG_CHECKING([for sparc %time register])
12 - AC_RUN_IFELSE(
13 - [AC_LANG_PROGRAM(
14 - [[]],
15 - [[
16 - int val;
17 - __asm__ __volatile__("rd %%tick, %0" : "=r"(val));
18 - ]])],
19 - [sparcv9="yes"],
20 - [sparcv9="no"])
21 - AC_MSG_RESULT($sparcv9)
22 - if test "x$sparcv9" = "xyes"; then
23 - AC_DEFINE([SPARCV9], [], [For sparc v9 with %time register])
24 - else
25 - CFLAGS="$OLD_CFLAGS"
26 - fi
27 -fi
28 -
29 dnl checking headers
30 AC_CHECK_HEADERS(strings.h)
31 AC_CHECK_HEADERS(string.h)
32 @@ -282,22 +260,12 @@ AC_CHECK_FUNCS(vswprintf)
33 AC_CHECK_FUNCS(wprintf)
34
35 AC_MSG_CHECKING([for sizeof(unsigned long)])
36 -AC_RUN_IFELSE(
37 -[AC_LANG_PROGRAM(
38 -[],
39 -[[
40 - if (sizeof(unsigned long) == 8)
41 - return 0;
42 -
43 - return 1;
44 -]])],
45 -[ulong_is_64_bit="yes"],
46 -[ulong_is_64_bit="no"])
47 -if test "x$ulong_is_64_bit" = "xyes"; then
48 - AC_MSG_RESULT([64 bits])
49 - AC_DEFINE([ULONGIS64BIT], [], [If unsigned long is 64 bits])
50 +AC_CHECK_SIZEOF([unsigned long])
51 +if test $ac_cv_sizeof_unsigned_long = 8; then
52 + AC_MSG_RESULT([64 bits])
53 + AC_DEFINE([ULONGIS64BIT], [], [If unsigned long is 64 bits])
54 else
55 - AC_MSG_RESULT([32 bits])
56 + AC_MSG_RESULT([32 bits])
57 fi
58
59 AC_TRY_COMPILE([
60 @@ -412,88 +380,7 @@ if test "x$LPCAP" = "xno"; then
61 fi
62
63
64 -# This is to determine which pcap library version is being used. The reason being
65 -# that versions < 0.9 do not accumulate packet statistics whereas >= 0.9 do accumulate.
66 -# This is Linux only. The check is done after pcre because the code below uses pcre.
67 -# It seems Phil Wood's pcap does not accumulate - 0.9x
68 -pcap_version_check="yes"
69 -if test "x$linux" = "xyes"; then
70 - if test "x$pcap_version_check" = "xyes"; then
71 - AC_MSG_CHECKING([for libpcap version >= 0.9])
72 - AC_RUN_IFELSE(
73 - [AC_LANG_PROGRAM(
74 - [[
75 - #include <pcap.h>
76 - #include <string.h>
77 - extern char pcap_version[];
78 - ]],
79 - [[
80 - if (strcmp(pcap_version, "0.9x") == 0)
81 - return 1;
82 -
83 - if (strcmp(pcap_version, "0.9.0") < 0)
84 - return 1;
85 - ]])],
86 - [libpcap_version_09="yes"],
87 - [libpcap_version_09="no"])
88 - AC_MSG_RESULT($libpcap_version_09)
89 - if test "x$libpcap_version_09" = "xyes"; then
90 - AC_DEFINE([LIBPCAP_ACCUMULATES], [], [For libpcap versions that accumulate stats])
91 - fi
92 - else
93 - libpcap_version_09="no"
94 - AC_DEFINE([LIBPCAP_ACCUMULATES], [], [For libpcap versions that accumulate stats])
95 - fi
96 -
97 - # there is a bug in the Linux code in 0.9.0 - 0.9.4 where the pcap
98 - # stats are doubled.
99 - if test "x$libpcap_version_09" = "xyes"; then
100 - AC_MSG_CHECKING(for libpcap version 0.9.0 - 0.9.4)
101 - AC_RUN_IFELSE(
102 - [AC_LANG_PROGRAM(
103 - [[
104 - #include <pcap.h>
105 - #include <string.h>
106 - extern char pcap_version[];
107 - ]],
108 - [[
109 - if (strcmp(pcap_version, "0.9.5") < 0)
110 - return 1;
111 - ]])],
112 - [libpcap_version_09_bug="no"],
113 - [libpcap_version_09_bug="yes"])
114 - AC_MSG_RESULT($libpcap_version_09_bug)
115 - else
116 - libpcap_version_09_bug="no"
117 - fi
118 -
119 - if test "x$libpcap_version_09_bug" = "xyes"; then
120 - AC_DEFINE([LINUX_LIBPCAP_DOUBLES_STATS], [], [For Linux libpcap versions 0.9.0 to 0.9.4])
121 - fi
122 -else
123 - AC_DEFINE([LIBPCAP_ACCUMULATES], [], [For libpcap versions that accumulate stats])
124 -fi
125 -
126 -# In case INADDR_NONE is not defined (like on Solaris)
127 -have_inaddr_none="no"
128 -AC_MSG_CHECKING([for INADDR_NONE])
129 -AC_RUN_IFELSE(
130 -[AC_LANG_PROGRAM(
131 -[[
132 -#include <sys/types.h>
133 -#include <netinet/in.h>
134 -]],
135 -[[
136 - if (inet_addr("10,5,2") == INADDR_NONE);
137 -]])],
138 -[have_inaddr_none="yes"],
139 -[have_inaddr_none="no"])
140 -AC_MSG_RESULT($have_inaddr_none)
141 -if test "x$have_inaddr_none" = "xno"; then
142 - AC_DEFINE([INADDR_NONE], [-1], [For INADDR_NONE definition])
143 -fi
144 -
145 -default_directory="/usr /usr/local"
146 +AC_DEFINE([LIBPCAP_ACCUMULATES], [], [For libpcap versions that accumulate stats])
147
148 AC_DEFUN([FAIL_MESSAGE],[
149 echo
150 @@ -745,64 +632,6 @@ if test "x$with_mysql" != "xno"; then
151 LIBS="-lmysqlclient ${LIBS}"
152 fi
153 fi
154 -
155 - AC_MSG_CHECKING([for mysql default client reconnect])
156 -
157 - AC_RUN_IFELSE(
158 - [AC_LANG_PROGRAM(
159 - [[
160 - #include <mysql.h>
161 - ]],
162 - [[
163 - if (mysql_get_client_version() < 50003)
164 - return 1;
165 - ]])],
166 - [mysql_default_reconnect="no"],
167 - [mysql_default_reconnect="yes"])
168 -
169 - AC_MSG_RESULT($mysql_default_reconnect)
170 -
171 - if test "x$mysql_default_reconnect" = "xno"; then
172 - AC_MSG_CHECKING([for mysql reconnect option])
173 -
174 - AC_RUN_IFELSE(
175 - [AC_LANG_PROGRAM(
176 - [[
177 - #include <mysql.h>
178 - ]],
179 - [[
180 - if (mysql_get_client_version() < 50013)
181 - return 1;
182 - ]])],
183 - [mysql_has_reconnect="yes"],
184 - [mysql_has_reconnect="no"])
185 -
186 - AC_MSG_RESULT($mysql_has_reconnect)
187 -
188 - if test "x$mysql_has_reconnect" = "xyes"; then
189 - AC_DEFINE([MYSQL_HAS_OPT_RECONNECT], [], [For MySQL versions 5.0.13 and greater])
190 -
191 - AC_MSG_CHECKING([for mysql setting of reconnect option before connect bug])
192 -
193 - AC_RUN_IFELSE(
194 - [AC_LANG_PROGRAM(
195 - [[
196 - #include <mysql.h>
197 - ]],
198 - [[
199 - if (mysql_get_client_version() < 50019)
200 - return 1;
201 - ]])],
202 - [mysql_has_reconnect_bug="no"],
203 - [mysql_has_reconnect_bug="yes"])
204 -
205 - AC_MSG_RESULT($mysql_has_reconnect_bug)
206 -
207 - if test "x$mysql_has_reconnect_bug" = "xyes"; then
208 - AC_DEFINE([MYSQL_HAS_OPT_RECONNECT_BUG], [], [For MySQL versions 5.0.13 to 5.0.18])
209 - fi
210 - fi
211 - fi
212 fi
213
214 AC_ARG_WITH(odbc,