1.1.3
by Stephen Gran
Import upstream version 0.88 |
1 |
dnl Copyright (C) 2002 - 2006 Tomasz Kojm <tkojm@clamav.net> |
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
2 |
dnl readdir_r checks (c) COPYRIGHT MIT 1995 |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
3 |
dnl socklen_t check (c) Alexander V. Lukyanov <lav@yars.free.net> |
1
by Stephen Gran
Import upstream version 0.73 |
4 |
dnl
|
5 |
dnl This program is free software; you can redistribute it and/or modify |
|
6 |
dnl it under the terms of the GNU General Public License as published by |
|
7 |
dnl the Free Software Foundation; either version 2 of the License, or |
|
8 |
dnl (at your option) any later version. |
|
9 |
dnl
|
|
10 |
dnl This program is distributed in the hope that it will be useful, |
|
11 |
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
dnl GNU General Public License for more details. |
|
14 |
dnl
|
|
15 |
dnl You should have received a copy of the GNU General Public License |
|
16 |
dnl along with this program; if not, write to the Free Software |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
17 |
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
18 |
dnl MA 02110-1301, USA. |
|
1
by Stephen Gran
Import upstream version 0.73 |
19 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
20 |
AC_PREREQ([2.59]) |
21 |
dnl For a release change [devel] to the real version [0.xy] |
|
22 |
dnl also change VERSION below |
|
0.1.10
by Michael Tautschnig
Import upstream version 0.96.5+dfsg |
23 |
AC_INIT([ClamAV], [0.96.5], [http://bugs.clamav.net/], [clamav], [http://www.clamav.net/]) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
24 |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
25 |
AH_BOTTOM([#include "platform.h"]) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
26 |
dnl put configure auxiliary into config |
27 |
AC_CONFIG_AUX_DIR([config]) |
|
28 |
AC_CONFIG_HEADER([clamav-config.h]) |
|
29 |
||
30 |
dnl safety check, this used to be a parameter to AC_INIT |
|
31 |
AC_CONFIG_SRCDIR([clamscan/clamscan.c]) |
|
32 |
AC_CONFIG_MACRO_DIR([m4]) |
|
33 |
AC_CREATE_TARGET_H([target.h]) |
|
34 |
||
35 |
dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings |
|
0.1.5
by Michael Tautschnig
Import upstream version 0.95.3+dfsg |
36 |
dnl enable stealth builds and psychedelic tests |
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
37 |
AM_INIT_AUTOMAKE([1.11 -Wall -Wportability -Wno-override -Werror std-options foreign dist-bzip2 no-define color-tests parallel-tests tar-ustar]) |
38 |
AM_SILENT_RULES([yes]) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
39 |
|
40 |
dnl we told automake to not define these, since we want to include |
|
41 |
dnl the date in the version |
|
42 |
AC_DEFINE([PACKAGE], PACKAGE_NAME, [Name of package]) |
|
43 |
||
0.1.5
by Michael Tautschnig
Import upstream version 0.95.3+dfsg |
44 |
dnl change this on a release |
0.1.10
by Michael Tautschnig
Import upstream version 0.96.5+dfsg |
45 |
VERSION="0.96.5" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
46 |
AC_DEFINE_UNQUOTED([VERSION],"$VERSION",[Version number of package]) |
47 |
||
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
48 |
LC_CURRENT=7 |
0.1.10
by Michael Tautschnig
Import upstream version 0.96.5+dfsg |
49 |
LC_REVISION=7 |
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
50 |
LC_AGE=1 |
1
by Stephen Gran
Import upstream version 0.73 |
51 |
LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
52 |
AC_SUBST([LIBCLAMAV_VERSION]) |
1
by Stephen Gran
Import upstream version 0.73 |
53 |
|
54 |
AC_PROG_AWK
|
|
55 |
AC_PROG_INSTALL
|
|
56 |
AC_PROG_LN_S
|
|
57 |
AC_PROG_MAKE_SET
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
58 |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
59 |
LT_CONFIG_LTDL_DIR([libltdl]) |
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
60 |
LT_INIT([dlopen disable-static]) |
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
61 |
LTDL_INIT([recursive]) |
62 |
AC_CONFIG_FILES([libltdl/Makefile]) |
|
1
by Stephen Gran
Import upstream version 0.73 |
63 |
|
62
by Scott Kitterman, Scott Kitterman, Jamie Strandboge
[ Scott Kitterman ] |
64 |
major=`expr $LC_CURRENT - $LC_AGE` |
65 |
AC_DEFINE_UNQUOTED([LIBCLAMAV_FULLVER], "$major.$LC_AGE.$LC_REVISION", |
|
66 |
["Full library version number"]) |
|
67 |
AC_DEFINE_UNQUOTED([LIBCLAMAV_MAJORVER], $major, |
|
68 |
["Major library version number"]) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
69 |
AC_DEFINE([SCANBUFF], 131072, [scan buffer size]) |
70 |
AC_DEFINE([FILEBUFF], 8192, [file i/o buffer size]) |
|
1
by Stephen Gran
Import upstream version 0.73 |
71 |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
72 |
AC_LIB_MULTILIB_GUESS
|
73 |
||
1
by Stephen Gran
Import upstream version 0.73 |
74 |
AC_HEADER_STDC
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
75 |
AC_C_RESTRICT
|
76 |
AC_C_CONST
|
|
77 |
AC_C_INLINE
|
|
78 |
AC_C_FPU_BIGENDIAN
|
|
79 |
AC_C_BIGENDIAN
|
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
80 |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
81 |
LT_LIB_M
|
82 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
83 |
AC_ARG_ENABLE([gcc-vcheck], |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
84 |
[ --disable-gcc-vcheck do not check for buggy gcc version ], |
85 |
gcc_check=$enableval, gcc_check="yes") |
|
86 |
||
87 |
msg_gcc_check="use --disable-gcc-vcheck to disable this check. Before reporting any bugs check with a supported version of gcc" |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
88 |
VERSION_SUFFIX= |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
89 |
dnl Check for gcc-4.1.0 |
90 |
if test "$gcc_check" = "yes"; then |
|
91 |
if test "x$ac_compiler_gnu" = "xyes"; then |
|
92 |
AC_MSG_CHECKING([for a supported version of gcc]) |
|
93 |
gcc_version=`${CC} -dumpversion` |
|
94 |
case "${gcc_version}" in |
|
95 |
4.1.0*) |
|
96 |
AC_MSG_RESULT([no (${gcc_version})]) |
|
97 |
AC_MSG_ERROR([gcc 4.1.0 is known to incorrectly compile upx.c. Upgrade your compiler to at least 4.1.1/4.1.2)]) |
|
98 |
;; |
|
99 |
*) |
|
100 |
AC_MSG_RESULT([ok (${gcc_version})]) |
|
101 |
;; |
|
66
by Scott Kitterman
* Merge from debian unstable, remaining changes (LP: #388111): |
102 |
esac |
0.1.5
by Michael Tautschnig
Import upstream version 0.95.3+dfsg |
103 |
case "${gcc_version}" in |
104 |
[[56789]].* | 4.[[3456789]].*) |
|
105 |
# bb #1581 - temporarely add -fno-strict-aliasing so gcc 4.4.0 |
|
106 |
# works correctly |
|
107 |
CFLAGS="$CFLAGS -fno-strict-aliasing" |
|
108 |
;; |
|
109 |
*) |
|
110 |
;; |
|
111 |
esac |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
112 |
fi |
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
113 |
else
|
114 |
CFLAGS="$CFLAGS -O0" |
|
115 |
VERSION_SUFFIX="$VERSION_SUFFIX-broken-compiler" |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
116 |
fi
|
117 |
||
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
118 |
# add distcheck warning flags |
119 |
distcheck_enable_flags=0 |
|
120 |
if test "x$ac_compiler_gnu" = "xyes"; then |
|
121 |
gcc_version=`${CC} -dumpversion` |
|
122 |
case "${gcc_version}" in |
|
123 |
4.[[3456789]].*) |
|
124 |
distcheck_enable_flags=1 |
|
125 |
;; |
|
126 |
[[56789]].*) |
|
127 |
distcheck_enable_flags=1 |
|
128 |
;; |
|
129 |
esac |
|
130 |
fi
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
131 |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
132 |
dnl Checks if compiler produces valid code, regardless of compiler |
133 |
dnl we do these checks here to avoid receiving endless bugreports about |
|
134 |
dnl breakages due to compiler bugs. |
|
135 |
||
136 |
dnl Check if compiler produces invalid code on gcc PR27603 (affects upx.c) |
|
137 |
dnl testcase from gcc testsuite |
|
138 |
AC_MSG_CHECKING([for gcc bug PR27603]) |
|
139 |
AC_TRY_RUN( |
|
140 |
[ |
|
141 |
/* (C) Richard Guenther */
|
|
142 |
void exit (int);
|
|
143 |
void abort (void);
|
|
144 |
int a;
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
145 |
int main(void)
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
146 |
{
|
147 |
int j;
|
|
148 |
for (j = 0; j < 6; j++)
|
|
149 |
{
|
|
150 |
if ((unsigned)j - 3 <= 1)
|
|
151 |
exit (0);
|
|
152 |
a = 1000 * (6 - j);
|
|
153 |
}
|
|
154 |
abort ();
|
|
155 |
}
|
|
156 |
], [AC_MSG_RESULT([ok, bug not present])], |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
157 |
[AC_MSG_ERROR([your compiler has gcc PR27603 bug, use a different compiler, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27603])], [AC_MSG_RESULT([cross-compiling, assumed ok])]) |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
158 |
|
159 |
dnl Check if compiler produces invalid code on gcc PR26763-2 (affects upx.c) |
|
160 |
dnl testcase from gcc testsuite |
|
161 |
AC_MSG_CHECKING([for gcc bug PR26763-2]) |
|
162 |
AC_TRY_RUN( |
|
163 |
[ |
|
164 |
/* (C) Richard Guenther */
|
|
165 |
extern void abort(void);
|
|
166 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
167 |
static int try (char *a, int d)
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
168 |
{
|
169 |
return a + d > a;
|
|
170 |
}
|
|
171 |
||
172 |
int main(void)
|
|
173 |
{
|
|
174 |
char bla[100]; |
|
175 |
||
176 |
if (try (bla + 50, -1)) |
|
177 |
abort (); |
|
178 |
||
179 |
return 0; |
|
180 |
}
|
|
181 |
], [AC_MSG_RESULT([ok, bug not present])], |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
182 |
[AC_MSG_ERROR([your compiler has gcc PR26763-2 bug, use a different compiler, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26763])],[AC_MSG_RESULT([cross-compiling, assumed ok])]) |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
183 |
|
184 |
dnl Check if compiler produces invalid code on own testcase based on upx.c |
|
185 |
AC_MSG_CHECKING([for valid code generation of CLI_ISCONTAINED]) |
|
186 |
AC_TRY_RUN( |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
187 |
[ |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
188 |
#include <stdio.h>
|
189 |
static struct v{
|
|
190 |
char* dst;
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
191 |
unsigned int dsize;
|
192 |
unsigned int dcur;
|
|
193 |
unsigned int backsize;
|
|
194 |
signed int unp_offset;
|
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
195 |
} values[] = { |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
196 |
{(char*)0xf78ab008, 0x2e000, 1, 4, -1594}, |
197 |
{(char*)0xb7af1008, 0x2e000, 1, 4, -1594} |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
198 |
|
199 |
}; |
|
200 |
extern void abort(void); |
|
201 |
||
202 |
#define CLI_ISCONTAINED(bb, bb_size, sb, sb_size) \ |
|
62
by Scott Kitterman, Scott Kitterman, Jamie Strandboge
[ Scott Kitterman ] |
203 |
((bb_size) > 0 && (sb_size) > 0 && (size_t)(sb_size) <= (size_t)(bb_size) \ |
204 |
&& (sb) >= (bb) && ((sb) + (sb_size)) <= ((bb) + (bb_size)) && ((sb) + (sb_size)) > (bb) && (sb) < ((bb) + (bb_size))) |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
205 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
206 |
int crashtest() |
207 |
{
|
|
208 |
unsigned int backsize, dcur; |
|
209 |
int dval=0x12000, unp_offset; |
|
210 |
int* dsize = &dval; |
|
211 |
char* dst = (char*)0x12000; |
|
212 |
while(1) { |
|
213 |
backsize=4; |
|
214 |
dcur=0; |
|
215 |
unp_offset=0x800002c7; |
|
216 |
||
217 |
if (!CLI_ISCONTAINED(dst, *dsize, dst+dcur+unp_offset, backsize) || !CLI_ISCONTAINED(dst, *dsize, dst+dcur, backsize) || unp_offset >=0) |
|
218 |
return -1; |
|
219 |
abort(); |
|
220 |
} |
|
221 |
return 0; |
|
222 |
}
|
|
223 |
||
224 |
int main(void) |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
225 |
{
|
226 |
int i; |
|
227 |
for(i=0;i<sizeof(values)/sizeof(values[0]);i++) { |
|
228 |
struct v* v= &values[i]; |
|
229 |
char* dst = v->dst; |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
230 |
unsigned int* dsize = &v->dsize; |
231 |
unsigned int dcur = v->dcur; |
|
232 |
unsigned int backsize = v->backsize-1; |
|
233 |
signed int unp_offset = v->unp_offset; |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
234 |
|
235 |
if(!CLI_ISCONTAINED(dst, *dsize, dst+dcur+unp_offset, backsize) || |
|
236 |
!CLI_ISCONTAINED(dst, *dsize,dst+dcur,backsize) || unp_offset >= 0) { |
|
237 |
continue; |
|
238 |
} |
|
239 |
abort(); |
|
240 |
} |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
241 |
crashtest(); |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
242 |
return 0; |
243 |
}
|
|
244 |
], [AC_MSG_RESULT([ok, bug not present])], |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
245 |
[AC_MSG_ERROR([your compiler has a bug that causes clamav bug no. 670, use a different compiler, see http://bugs.clamav.net/bugzilla/show_bug.cgi?id=670])], [AC_MSG_RESULT([cross-compiling, assumed ok])]) |
246 |
||
247 |
dnl Check if compiler produces invalid code on gcc PR28045 (affects upx.c) |
|
248 |
dnl testcase from gcc testsuite |
|
249 |
AC_MSG_CHECKING([for gcc bug PR28045]) |
|
250 |
AC_TRY_RUN( |
|
251 |
[ |
|
252 |
/* (C) Andrew Pinski */
|
|
253 |
extern void abort(void);
|
|
254 |
struct a
|
|
255 |
{
|
|
256 |
unsigned int bits : 1;
|
|
257 |
signed long val : ((sizeof(long) * 8) - 1);
|
|
258 |
};
|
|
259 |
static int Fnegate (struct a b)
|
|
260 |
{
|
|
261 |
if ((-((long)b.val)) <= ((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))
|
|
262 |
&& (-((long)b.val)) >= (-(((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))) - 1))
|
|
263 |
return 0 ;
|
|
264 |
abort ();
|
|
265 |
}
|
|
266 |
int main (void)
|
|
267 |
{
|
|
268 |
struct a b = {1, 1};
|
|
269 |
Fnegate (b);
|
|
270 |
return 0;
|
|
271 |
}
|
|
272 |
], [AC_MSG_RESULT([ok, bug not present])], |
|
273 |
[AC_MSG_ERROR([your compiler has gcc PR28045 bug, use a different compiler, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28045])], [AC_MSG_RESULT([cross-compiling, assumed ok])]) |
|
274 |
||
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
275 |
dnl Check if compiler produces invalid code on gcc PR37573 (affects autoit.c) |
276 |
dnl this is a bug in gcc 4.4.0, but for some reason it affects gcc 4.1.2 too |
|
277 |
dnl gcc 4.1.3 is OK. This bug occurs only at -O3. |
|
278 |
AC_MSG_CHECKING([for gcc bug PR37573]) |
|
279 |
AC_TRY_RUN( |
|
280 |
[ |
|
281 |
#include <stdlib.h>
|
|
282 |
#include <string.h>
|
|
283 |
struct S
|
|
284 |
{
|
|
285 |
unsigned int *a;
|
|
286 |
unsigned int b;
|
|
287 |
unsigned int c[624]; |
|
288 |
}; |
|
289 |
static unsigned char |
|
290 |
foo (struct S *s) |
|
291 |
{
|
|
292 |
unsigned int r; |
|
293 |
if (!--s->b) |
|
294 |
{ |
|
295 |
unsigned int *c = s->c; |
|
296 |
unsigned int i; |
|
297 |
s->a = c; |
|
298 |
for (i = 0; i < 227; i++) |
|
299 |
c[i] = |
|
300 |
((((c[i] ^ c[i + 1]) & 0x7ffffffe) ^ c[i]) >> 1) ^ |
|
301 |
((0 - (c[i + 1] & 1)) & 0x9908b0df) ^ c[i + 397]; |
|
302 |
for (; i < 623; i++) |
|
303 |
c[i] = |
|
304 |
((((c[i] ^ c[i + 1]) & 0x7ffffffe) ^ c[i]) >> 1) ^ |
|
305 |
((0 - (c[i + 1] & 1)) & 0x9908b0df) ^ c[i - 227]; |
|
306 |
c[623] = |
|
307 |
((((c[623] ^ c[0]) & 0x7ffffffe) ^ c[623]) >> 1) ^ ((0 - (c[0] & 1)) & |
|
308 |
0x9908b0df) ^ c[i |
|
309 |
-
|
|
310 |
227]; |
|
311 |
} |
|
312 |
r = *(s->a++); |
|
313 |
r ^= (r >> 11); |
|
314 |
r ^= ((r & 0xff3a58ad) << 7); |
|
315 |
r ^= ((r & 0xffffdf8c) << 15); |
|
316 |
r ^= (r >> 18); |
|
317 |
return (unsigned char) (r >> 1); |
|
318 |
}
|
|
319 |
||
320 |
void
|
|
321 |
bar (unsigned char *p, unsigned int q, unsigned int r) |
|
322 |
{
|
|
323 |
struct S s; |
|
324 |
unsigned int i; |
|
325 |
unsigned int *c = s.c; |
|
326 |
*c = r; |
|
327 |
for (i = 1; i < 624; i++) |
|
328 |
c[i] = i + 0x6c078965 * ((c[i - 1] >> 30) ^ c[i - 1]); |
|
329 |
s.b = 1; |
|
330 |
while (q--) |
|
331 |
*p++ ^= foo (&s); |
|
332 |
}; |
|
333 |
||
334 |
static unsigned char p[23] = { |
|
335 |
0xc0, 0x49, 0x17, 0x32, 0x62, 0x1e, 0x2e, 0xd5, 0x4c, 0x19, 0x28, 0x49, |
|
336 |
0x91, 0xe4, 0x72, 0x83, 0x91, 0x3d, 0x93, 0x83, 0xb3, 0x61, 0x38 |
|
337 |
}; |
|
338 |
||
339 |
static unsigned char q[23] = { |
|
340 |
0x3e, 0x41, 0x55, 0x54, 0x4f, 0x49, 0x54, 0x20, 0x55, 0x4e, 0x49, 0x43, |
|
341 |
0x4f, 0x44, 0x45, 0x20, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x3c |
|
342 |
}; |
|
343 |
||
344 |
int
|
|
345 |
main (void) |
|
346 |
{
|
|
347 |
unsigned int s; |
|
348 |
s = 23; |
|
349 |
bar (p, s, s + 0xa25e); |
|
350 |
if (memcmp (p, q, s) != 0) |
|
351 |
abort (); |
|
352 |
return 0; |
|
353 |
}
|
|
354 |
||
355 |
], [AC_MSG_RESULT([ok, bug not present])], |
|
356 |
[AC_MSG_ERROR([your compiler has gcc PR37573 bug, use a lower optimization level (-O1 or -O2), see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37573])], [AC_MSG_RESULT([cross-compiling, assumed ok])]) |
|
357 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
358 |
dnl Linker feature checks |
359 |
dnl check for version script support in the linker (GNU ld, or Solaris ld style) |
|
360 |
AC_CACHE_CHECK([for ld --version-script], [ac_cv_ld_version_script], [dnl |
|
361 |
cat > conftest.c <<EOF
|
|
362 |
void cl_symbol1(void) {}
|
|
363 |
void cli_symbol2(void) {}
|
|
364 |
EOF
|
|
365 |
cat > conftest.map <<EOF
|
|
366 |
RELEASE
|
|
367 |
{
|
|
368 |
global:
|
|
369 |
cl_*;
|
|
370 |
local:
|
|
371 |
*;
|
|
372 |
};
|
|
373 |
PRIVATE
|
|
374 |
{
|
|
375 |
global:
|
|
376 |
cli_*;
|
|
377 |
local:
|
|
378 |
*;
|
|
379 |
};
|
|
380 |
EOF
|
|
381 |
dnl check for GNU ld style linker version script
|
|
382 |
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
|
|
383 |
-o conftest.so conftest.c
|
|
384 |
-Wl,--version-script,conftest.map
|
|
385 |
1>&AS_MESSAGE_LOG_FD]); |
|
386 |
then |
|
387 |
VERSIONSCRIPTFLAG=--version-script |
|
388 |
ac_cv_ld_version_script=yes |
|
389 |
else |
|
390 |
dnl check for Solaris ld style linker version script |
|
391 |
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared |
|
392 |
-o conftest.so conftest.c
|
|
393 |
-Wl,-M,conftest.map
|
|
394 |
1>&AS_MESSAGE_LOG_FD]); |
|
395 |
then |
|
396 |
VERSIONSCRIPTFLAG=-M |
|
397 |
ac_cv_ld_version_script=yes; |
|
398 |
else |
|
399 |
ac_cv_ld_version_script=no |
|
400 |
fi |
|
401 |
fi |
|
402 |
rm -f conftest*]) |
|
403 |
AC_SUBST([VERSIONSCRIPTFLAG]) |
|
404 |
AM_CONDITIONAL([VERSIONSCRIPT], test "x$ac_cv_ld_version_script" = "xyes") |
|
405 |
||
406 |
# it is not fatal if gperf is missing |
|
407 |
AM_MISSING_PROG(GPERF, gperf) |
|
408 |
AC_SUBST(GPERF) |
|
409 |
||
410 |
AC_CHECK_HEADERS([stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h memory.h ndir.h stdlib.h strings.h string.h sys/mman.h sys/param.h sys/stat.h sys/types.h malloc.h poll.h limits.h sys/filio.h sys/uio.h termios.h stdbool.h pwd.h grp.h]) |
|
411 |
AC_CHECK_HEADER([syslog.h],AC_DEFINE([USE_SYSLOG],1,[use syslog]),) |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
412 |
|
1
by Stephen Gran
Import upstream version 0.73 |
413 |
AC_TYPE_OFF_T
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
414 |
AC_COMPILE_CHECK_SIZEOF([short]) |
415 |
AC_COMPILE_CHECK_SIZEOF([int]) |
|
416 |
AC_COMPILE_CHECK_SIZEOF([long]) |
|
417 |
AC_COMPILE_CHECK_SIZEOF([long long]) |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
418 |
AC_COMPILE_CHECK_SIZEOF([void *]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
419 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
420 |
AC_ARG_ENABLE([experimental], |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
421 |
[ --enable-experimental enable experimental code], |
422 |
enable_experimental=$enableval, enable_experimental="no") |
|
423 |
||
424 |
if test "$enable_experimental" = "yes"; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
425 |
AC_DEFINE([CL_EXPERIMENTAL],1,[enable experimental code]) |
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
426 |
VERSION_SUFFIX="$VERSION_SUFFIX-exp" |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
427 |
fi
|
428 |
||
0.1.7
by Michael Tautschnig
Import upstream version 0.96.1+dfsg |
429 |
build_configure_args=`echo "$ac_configure_args" | sed -e 's/[\"]//g'` |
430 |
AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args]) |
|
431 |
||
432 |
AX_CHECK_UNAME_SYSCALL
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
433 |
AC_CHECK_LIB([socket], [bind], [LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"]) |
1.1.7
by Jamie Strandboge
Import upstream version 0.92.1~dfsg2 |
434 |
AC_SEARCH_LIBS([gethostent],[nsl], [(LIBS="$LIBS -lnsl"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lnsl"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lnsl"; CLAMD_LIBS="$CLAMD_LIBS -lnsl")]) |
0.7.1
by Kees Cook
Import upstream version 0.90 |
435 |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
436 |
AC_CHECK_FUNCS([poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat strcasestr inet_ntop setgroups initgroups ctime_r mkstemp mallinfo madvise]) |
0.1.5
by Michael Tautschnig
Import upstream version 0.95.3+dfsg |
437 |
AC_FUNC_FSEEKO
|
438 |
||
439 |
dnl Check if anon maps are available, check if we can determine the page size |
|
0.36.1
by Scott Kitterman
Import upstream version 0.94.dfsg.1~rc1 |
440 |
AC_C_FUNC_MMAP_PRIVATE
|
0.1.5
by Michael Tautschnig
Import upstream version 0.95.3+dfsg |
441 |
AC_C_FUNC_PAGESIZE
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
442 |
AC_C_FUNC_MMAP_ANONYMOUS
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
443 |
AC_ARG_ENABLE([mempool],[ --disable-mempool disable memory pools], enable_mempool=$enableval, enable_mempool="yes") |
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
444 |
have_mempool="no" |
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
445 |
if test "$enable_mempool" = "yes"; then |
446 |
if test "$ac_cv_c_mmap_private" != "yes"; then |
|
447 |
AC_MSG_NOTICE([****** mempool support disabled (mmap not available or not usable)]) |
|
448 |
else |
|
0.1.5
by Michael Tautschnig
Import upstream version 0.95.3+dfsg |
449 |
if test "$ac_cv_c_can_get_pagesize" != "yes"; then |
450 |
AC_MSG_NOTICE([****** mempool support disabled (pagesize cannot be determined)]) |
|
451 |
else |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
452 |
if test "$ac_cv_c_mmap_anonymous" = "no"; then |
453 |
AC_MSG_NOTICE([****** mempool support disabled (anonymous mmap not available)]) |
|
454 |
else |
|
455 |
AC_DEFINE([USE_MPOOL],1,[enable memory pools]) |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
456 |
have_mempool="yes" |
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
457 |
fi |
0.1.5
by Michael Tautschnig
Import upstream version 0.95.3+dfsg |
458 |
fi |
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
459 |
fi |
460 |
fi
|
|
461 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
462 |
enable_check_ut=auto |
463 |
enable_ut_install=no |
|
464 |
AC_ARG_ENABLE(check, |
|
465 |
[ --enable-check Enable 'check' unit tests (default=auto)], enable_check_ut=$enableval, enable_check_ut="auto" ) |
|
466 |
||
467 |
if test "$enable_check_ut" != "no" ; then |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
468 |
AC_LIB_FIND([check],[check.h], |
469 |
AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)]), |
|
470 |
[CHECK_CPPFLAGS="$INCCHECK"; CHECK_LIBS="$LTLIBCHECK"], |
|
471 |
[]) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
472 |
fi
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
473 |
AC_SUBST([CHECK_CPPFLAGS]) |
474 |
AC_SUBST([CHECK_LIBS]) |
|
475 |
AM_CONDITIONAL([HAVE_LIBCHECK],test "X$HAVE_LIBCHECK" = "Xyes") |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
476 |
|
477 |
if test "x$CHECK_LIBS" = "x" -a "$enable_check_ut" = "yes"; then |
|
478 |
AC_MSG_ERROR([ |
|
479 |
||
480 |
ERROR! Check was configured, but not found. Get it from http://check.sf.net/
|
|
481 |
]) |
|
482 |
fi
|
|
483 |
||
484 |
AC_ARG_ENABLE(coverage, |
|
485 |
AC_HELP_STRING([--enable-coverage], |
|
486 |
[turn on test coverage |
|
487 |
@<:@default=no@:>@]), |
|
488 |
[enable_cov=$enableval],[enable_cov="no"]) |
|
489 |
||
490 |
if test "x$enable_coverage" = "xyes"; then |
|
491 |
if test "x$CHECK_LIBS" = "x"; then |
|
492 |
AC_MSG_ERROR([Coverage testing required, but unit tests not enabled!]) |
|
493 |
fi |
|
494 |
if test "x$ac_compiler_gnu" != "xyes"; then |
|
495 |
AC_MSG_ERROR([coverage testing only works if gcc is used]) |
|
496 |
fi |
|
497 |
||
498 |
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" |
|
499 |
LDFLAGS="$LDFLAGS -lgcov" |
|
500 |
AC_CHECK_PROGS(GCOV, gcov, false) |
|
501 |
AC_CHECK_PROGS(LCOV, lcov, false) |
|
502 |
AC_CHECK_PROGS(GENHTML, genhtml, false) |
|
503 |
fi
|
|
504 |
||
505 |
AM_CONDITIONAL(ENABLE_COVERAGE, test "x$enable_coverage" = "xyes") |
|
506 |
||
1
by Stephen Gran
Import upstream version 0.73 |
507 |
have_pthreads=no |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
508 |
AC_CHECK_HEADER([pthread.h],[have_pthreads=yes],) |
1
by Stephen Gran
Import upstream version 0.73 |
509 |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
510 |
AM_MAINTAINER_MODE
|
511 |
dnl Check for zlib |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
512 |
AC_MSG_CHECKING([for zlib installation]) |
513 |
AC_ARG_WITH([zlib], |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
514 |
[ --with-zlib=DIR path to directory containing zlib library (default= |
515 |
/usr/local or /usr if not found in /usr/local)], |
|
516 |
[
|
|
517 |
if test "$withval"; then
|
|
518 |
ZLIB_HOME="$withval"
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
519 |
AC_MSG_RESULT([using $ZLIB_HOME]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
520 |
fi
|
521 |
], [ |
|
522 |
ZLIB_HOME=/usr/local
|
|
523 |
if test ! -f "$ZLIB_HOME/include/zlib.h"
|
|
524 |
then
|
|
525 |
ZLIB_HOME=/usr
|
|
526 |
fi
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
527 |
AC_MSG_RESULT([$ZLIB_HOME]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
528 |
]) |
529 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
530 |
AC_ARG_ENABLE([zlib-vcheck], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
531 |
[ --disable-zlib-vcheck do not check for buggy zlib version ], |
532 |
zlib_check=$enableval, zlib_check="yes") |
|
533 |
||
534 |
if test ! -f "$ZLIB_HOME/include/zlib.h" |
|
535 |
then
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
536 |
AC_MSG_ERROR([Please install zlib and zlib-devel packages]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
537 |
else
|
538 |
||
539 |
vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h` |
|
540 |
if test -z "$vuln"; then |
|
541 |
vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h` |
|
542 |
fi |
|
543 |
||
544 |
if test -n "$vuln"; then |
|
545 |
if test "$zlib_check" = "yes"; then |
|
546 |
AC_MSG_ERROR(The installed zlib version may contain a security bug. Please upgrade to 1.2.2 or later: http://www.zlib.net. You can omit this check with --disable-zlib-vcheck but DO NOT REPORT any stability issues then!) |
|
547 |
else |
|
548 |
AC_MSG_WARN([****** This ClamAV installation may be linked against]) |
|
549 |
AC_MSG_WARN([****** a broken zlib version. Please DO NOT report any]) |
|
550 |
AC_MSG_WARN([****** stability problems to the ClamAV developers!]) |
|
551 |
fi |
|
552 |
fi |
|
553 |
||
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
554 |
save_LIBS="$LIBS" |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
555 |
if test "$ZLIB_HOME" != "/usr"; then |
556 |
CPPFLAGS="$CPPFLAGS -I$ZLIB_HOME/include" |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
557 |
save_LDFLAGS="$LDFLAGS" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
558 |
LDFLAGS="$LDFLAGS -L$ZLIB_HOME/lib" |
79
by Scott Kitterman
* Merge from Debian Unstable. Remaining Ubuntu changes: |
559 |
AC_CHECK_LIB([z], [inflateEnd], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -L$ZLIB_HOME/lib -lz"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -L$ZLIB_HOME/lib -lz"], AC_MSG_ERROR([Please install zlib and zlib-devel packages])) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
560 |
AC_CHECK_LIB([z], [gzopen], [], AC_MSG_ERROR([Your zlib is missing gzopen()])) |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
561 |
LDFLAGS="$save_LDFLAGS" |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
562 |
else |
79
by Scott Kitterman
* Merge from Debian Unstable. Remaining Ubuntu changes: |
563 |
AC_CHECK_LIB([z], [inflateEnd], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lz";FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lz"], AC_MSG_ERROR([Please install zlib and zlib-devel packages])) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
564 |
AC_CHECK_LIB([z], [gzopen],[], AC_MSG_ERROR([Your zlib is missing gzopen()])) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
565 |
fi |
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
566 |
LIBS="$save_LIBS" |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
567 |
fi
|
568 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
569 |
AC_ARG_ENABLE([bzip2], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
570 |
[ --disable-bzip2 disable bzip2 support], |
571 |
want_bzip2=$enableval, want_bzip2="yes") |
|
1
by Stephen Gran
Import upstream version 0.73 |
572 |
|
0.35.14
by Michael Tautschnig, Stephen Gran, Alberto WU, Michael Tautschnig
[ Stephen Gran ] |
573 |
bzip_check="ok" |
1
by Stephen Gran
Import upstream version 0.73 |
574 |
if test "$want_bzip2" = "yes" |
575 |
then
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
576 |
AC_LIB_LINKFLAGS([bz2]) |
577 |
save_LDFLAGS="$LDFLAGS" |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
578 |
# Only add -L if prefix is not empty |
579 |
test -z "$LIBBZ2_PREFIX" || LDFLAGS="$LDFLAGS -L$LIBBZ2_PREFIX/$acl_libdirstem"; |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
580 |
|
581 |
have_bzprefix="no" |
|
582 |
AC_CHECK_LIB([bz2], [BZ2_bzReadOpen], [have_bzprefix="yes"]) |
|
583 |
if test "x$have_bzprefix" = "xno"; then |
|
584 |
AC_DEFINE([NOBZ2PREFIX],1,[bzip funtions do not have bz2 prefix]) |
|
585 |
fi |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
586 |
LDFLAGS="$save_LDFLAGS" |
587 |
if test "$HAVE_LIBBZ2" = "yes"; then |
|
588 |
AC_CHECK_HEADER([bzlib.h], |
|
589 |
[AC_C_CVE_2008_1372], |
|
590 |
[ac_cv_c_cve_2008_1372="no"]) |
|
591 |
if test "$ac_cv_c_cve_2008_1372" = "bugged"; then |
|
592 |
AC_MSG_WARN([****** bzip2 libraries are affected by the CVE-2008-1372 bug]) |
|
593 |
AC_MSG_WARN([****** We strongly suggest you to update to bzip2 1.0.5.]) |
|
594 |
AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!]) |
|
0.35.14
by Michael Tautschnig, Stephen Gran, Alberto WU, Michael Tautschnig
[ Stephen Gran ] |
595 |
bzip_check="bugged (CVE-2008-1372)" |
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
596 |
fi |
597 |
if test "$ac_cv_c_cve_2008_1372" = "linkfailed"; then |
|
598 |
dnl This shouldn't happen |
|
599 |
dnl We failed to link but libtool may still be able to link, so don't disable bzip2 just yet |
|
600 |
AC_MSG_WARN([****** Unable to link bzip2 testcase]) |
|
601 |
AC_MSG_WARN([****** You may be affected by CVE-2008-1372 bug, but I need to be able to link a testcase to verify]) |
|
602 |
AC_MSG_WARN([****** It is recommended to fix your build environment so that we can run the testcase!]) |
|
603 |
AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!]) |
|
0.35.14
by Michael Tautschnig, Stephen Gran, Alberto WU, Michael Tautschnig
[ Stephen Gran ] |
604 |
bzip_check="link failed (CVE-2008-1372)" |
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
605 |
fi |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
606 |
|
607 |
case "$ac_cv_c_cve_2008_1372" in |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
608 |
ok|bugged|linkfailed) |
0.35.14
by Michael Tautschnig, Stephen Gran, Alberto WU, Michael Tautschnig
[ Stephen Gran ] |
609 |
;; |
610 |
*) |
|
611 |
HAVE_LIBBZ2=no |
|
612 |
;; |
|
613 |
esac |
|
614 |
fi |
|
615 |
||
616 |
if test "$HAVE_LIBBZ2" = "yes"; then |
|
617 |
AC_C_CVE_2010_0405 |
|
618 |
if test "$ac_cv_c_cve_2010_0405" = "bugged"; then |
|
619 |
AC_MSG_WARN([****** bzip2 libraries are affected by the CVE-2010-0405 bug]) |
|
620 |
AC_MSG_WARN([****** We strongly suggest you to update bzip2]) |
|
621 |
AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!]) |
|
622 |
bzip_check="bugged (CVE-2010-0405)" |
|
623 |
fi |
|
624 |
if test "$ac_cv_c_cve_2010_0405" = "linkfailed"; then |
|
625 |
dnl This shouldn't happen |
|
626 |
dnl We failed to link but libtool may still be able to link, so don't disable bzip2 just yet |
|
627 |
AC_MSG_WARN([****** Unable to link bzip2 testcase]) |
|
628 |
AC_MSG_WARN([****** You may be affected by CVE-2010-0405 bug, but I need to be able to link a testcase to verify]) |
|
629 |
AC_MSG_WARN([****** It is recommended to fix your build environment so that we can run the testcase!]) |
|
630 |
AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!]) |
|
631 |
bzip_check="link failed (CVE-2010-0405)" |
|
632 |
fi |
|
633 |
||
634 |
case "$ac_cv_c_cve_2010_0405" in |
|
635 |
ok|bugged|linkfailed) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
636 |
LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $LTLIBBZ2" |
637 |
AC_DEFINE([HAVE_BZLIB_H],1,[have bzip2]) |
|
638 |
;; |
|
639 |
*) |
|
640 |
AC_MSG_WARN([****** bzip2 support disabled]) |
|
641 |
;; |
|
642 |
esac |
|
643 |
||
644 |
else |
|
645 |
AC_MSG_WARN([****** bzip2 support disabled]) |
|
646 |
fi |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
647 |
fi
|
648 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
649 |
AC_ARG_ENABLE([unrar], |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
650 |
[ --disable-unrar don't build libclamunrar and libclamunrar_iface ], |
651 |
want_unrar=$enableval, want_unrar="yes") |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
652 |
AM_CONDITIONAL([ENABLE_UNRAR],[test "$want_unrar" = "yes"]) |
0.6.1
by Kees Cook
Import upstream version 0.90~rc3 |
653 |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
654 |
AC_ARG_ENABLE([getaddrinfo], |
655 |
[ --disable-getaddrinfo disable support for getaddrinfo], |
|
656 |
want_getaddrinfo=$enableval, want_getaddrinfo="yes") |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
657 |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
658 |
if test "$want_getaddrinfo" = "yes" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
659 |
then
|
660 |
AC_MSG_CHECKING([for getaddrinfo]) |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
661 |
AC_CACHE_VAL([have_cv_gai],[ |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
662 |
AC_TRY_RUN([
|
663 |
#include <sys/types.h>
|
|
664 |
#include <sys/socket.h>
|
|
665 |
#include <netdb.h>
|
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
666 |
#include <unistd.h>
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
667 |
int main(int argc, char **argv)
|
668 |
{
|
|
669 |
struct addrinfo *res;
|
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
670 |
int sd;
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
671 |
|
672 |
if(getaddrinfo("127.0.0.1", NULL, NULL, &res) < 0)
|
|
673 |
return 1;
|
|
674 |
freeaddrinfo(res);
|
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
675 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
676 |
return 0;
|
677 |
}
|
|
678 |
], |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
679 |
[have_cv_gai=yes], |
680 |
[have_cv_gai=no], |
|
681 |
[have_cv_gai=no]) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
682 |
]) |
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
683 |
AC_MSG_RESULT([$have_cv_gai]) |
684 |
if test "$have_cv_gai" = yes; then |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
685 |
AC_DEFINE(HAVE_GETADDRINFO, 1, [have getaddrinfo()]) |
686 |
fi |
|
687 |
fi
|
|
688 |
||
689 |
AC_ARG_ENABLE([ipv6], |
|
690 |
[ --disable-ipv6 disable IPv6 support], |
|
691 |
want_ipv6=$enableval, want_ipv6="yes") |
|
692 |
||
693 |
if test "$want_ipv6" = "yes" |
|
694 |
then
|
|
695 |
AC_MSG_CHECKING([for IPv6 support]) |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
696 |
AC_CACHE_VAL([have_cv_ipv6],[ |
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
697 |
AC_TRY_RUN([
|
698 |
#include <sys/types.h>
|
|
699 |
#include <sys/socket.h>
|
|
700 |
#include <netdb.h>
|
|
701 |
#include <unistd.h>
|
|
702 |
int main(int argc, char **argv)
|
|
703 |
{
|
|
704 |
struct addrinfo *res, hints;
|
|
705 |
int sd;
|
|
706 |
||
707 |
if((sd = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
|
|
708 |
return 1;
|
|
709 |
close(sd);
|
|
710 |
/* also check if getaddrinfo() handles AF_UNSPEC -- bb#1196 */
|
|
711 |
memset(&hints, 0, sizeof(hints));
|
|
712 |
hints.ai_family = AF_UNSPEC;
|
|
713 |
if(getaddrinfo("127.0.0.1", NULL, &hints, &res) < 0)
|
|
714 |
return 1;
|
|
715 |
freeaddrinfo(res);
|
|
716 |
return 0;
|
|
717 |
}
|
|
718 |
], |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
719 |
[have_cv_ipv6=yes], |
720 |
[have_cv_ipv6=no], |
|
721 |
[have_cv_ipv6=no]) |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
722 |
]) |
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
723 |
AC_MSG_RESULT([$have_cv_ipv6]) |
724 |
if test "$have_cv_ipv6" = yes; then |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
725 |
AC_DEFINE(SUPPORT_IPv6, 1, [Support for IPv6]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
726 |
fi |
727 |
fi
|
|
728 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
729 |
AC_C_DNS
|
730 |
||
731 |
AC_ARG_ENABLE([clamuko], |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
732 |
[ --disable-clamuko disable clamuko support (Linux, DragonFly and FreeBSD only)], |
733 |
want_clamuko=$enableval, want_clamuko="yes") |
|
1
by Stephen Gran
Import upstream version 0.73 |
734 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
735 |
dnl AC_FUNC_SETPGRP does not work when cross compiling |
736 |
dnl Instead, assume we will have a prototype for setpgrp if cross compiling. |
|
737 |
dnl testcase from gdb/configure.ac |
|
738 |
if test "$cross_compiling" = no; then |
|
739 |
AC_FUNC_SETPGRP |
|
740 |
else
|
|
741 |
AC_CACHE_CHECK([whether setpgrp takes no argument], [ac_cv_func_setpgrp_void], |
|
742 |
[AC_TRY_COMPILE([ |
|
743 |
#include <unistd.h>
|
|
744 |
], [ |
|
745 |
if (setpgrp(1,1) == -1)
|
|
746 |
exit (0);
|
|
747 |
else
|
|
748 |
exit (1);
|
|
749 |
], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)]) |
|
750 |
if test $ac_cv_func_setpgrp_void = yes; then |
|
751 |
AC_DEFINE([SETPGRP_VOID], 1) |
|
752 |
fi
|
|
753 |
fi
|
|
1
by Stephen Gran
Import upstream version 0.73 |
754 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
755 |
AC_ARG_ENABLE([milter], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
756 |
[ --enable-milter build clamav-milter], |
757 |
have_milter=$enableval, have_milter="no") |
|
758 |
||
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
759 |
have_system_tommath=no |
760 |
AC_ARG_WITH([system-tommath], |
|
761 |
[ --with-system-tommath link against system libtommath (default = no, use bundled)], |
|
762 |
[
|
|
763 |
case "$withval" in
|
|
764 |
yes)
|
|
765 |
AC_CHECK_LIB([tommath], [mp_mul_2d], |
|
766 |
[ |
|
767 |
AC_DEFINE([HAVE_SYSTEM_TOMMATH], 1, [link against system-wide libtommath]) |
|
768 |
LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -ltommath" |
|
769 |
have_system_tommath=yes |
|
770 |
], |
|
771 |
[AC_MSG_WARN([****** Option --with-system-tommath was given but libtommath does not seem to be available, using bundled files instead])] |
|
772 |
) |
|
773 |
;; |
|
774 |
no) ;; |
|
775 |
*) AC_MSG_ERROR([--with-system-tommath does not take an argument]) ;; |
|
776 |
esac |
|
777 |
]) |
|
778 |
AM_CONDITIONAL([LINK_TOMMATH], test "x$have_system_tommath" = "xyes") |
|
1
by Stephen Gran
Import upstream version 0.73 |
779 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
780 |
|
781 |
dnl we need to try to link with iconv, otherwise there could be a |
|
782 |
dnl mismatch between a 32-bit and 64-bit lib. Detect this at configure time. |
|
783 |
dnl we need to check after zlib/bzip2, because they can change the include path |
|
784 |
AC_ARG_WITH([iconv], [ --with-iconv supports iconv() (default=auto)], |
|
785 |
[
|
|
786 |
case "$withval" in
|
|
787 |
yes|no) wiconv="$withval";;
|
|
788 |
*) AC_MSG_ERROR([--with-iconv does not take an argument]);; |
|
789 |
esac], |
|
790 |
[ wiconv=auto ]) |
|
791 |
if test "X$wiconv" != "Xno"; then |
|
792 |
AC_CHECK_LIB([iconv], [libiconv_open], LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -liconv") |
|
793 |
AC_MSG_CHECKING([for iconv]) |
|
794 |
save_LIBS="$LIBS" |
|
795 |
LIBS="$LIBCLAMAV_LIBS" |
|
796 |
AC_TRY_LINK([ |
|
797 |
#include <iconv.h>
|
|
798 |
],[ |
|
799 |
char** xin,**xout;
|
|
800 |
unsigned long il,ol;
|
|
801 |
int rc;
|
|
802 |
iconv_t iconv_struct = iconv_open("UTF-16BE","UTF-8");
|
|
803 |
rc = iconv(iconv_struct,xin,&il,xout,&ol);
|
|
804 |
iconv_close(iconv_struct);
|
|
805 |
],[ |
|
806 |
AC_MSG_RESULT(yes)
|
|
807 |
AC_DEFINE([HAVE_ICONV], 1, [iconv() available]) |
|
808 |
],[ |
|
809 |
AC_MSG_RESULT(no)
|
|
810 |
]) |
|
811 |
LIBS="$save_LIBS" |
|
812 |
fi
|
|
813 |
||
814 |
AC_ARG_ENABLE([pthreads], |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
815 |
[ --disable-pthreads disable POSIX threads support], |
816 |
have_pthreads=$enableval,) |
|
1
by Stephen Gran
Import upstream version 0.73 |
817 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
818 |
AC_ARG_ENABLE([cr], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
819 |
[ --disable-cr don't link with C reentrant library (BSD) ], |
820 |
use_cr=$enableval,) |
|
1
by Stephen Gran
Import upstream version 0.73 |
821 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
822 |
AC_ARG_ENABLE([id-check], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
823 |
[ --enable-id-check use id utility instead of /etc/passwd parsing], |
824 |
use_id=$enableval, use_id="no") |
|
1
by Stephen Gran
Import upstream version 0.73 |
825 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
826 |
AC_ARG_ENABLE([yp-check], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
827 |
[ --enable-yp-check use ypmatch utility instead of /etc/passwd parsing], |
828 |
use_yp=$enableval, use_yp="no") |
|
1
by Stephen Gran
Import upstream version 0.73 |
829 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
830 |
AC_ARG_WITH([user], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
831 |
[ --with-user=uid name of the clamav user (default=clamav)], |
1
by Stephen Gran
Import upstream version 0.73 |
832 |
clamav_user="$withval", clamav_user="clamav") |
833 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
834 |
AC_ARG_WITH([group], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
835 |
[ --with-group=gid name of the clamav group (default=clamav)], |
1
by Stephen Gran
Import upstream version 0.73 |
836 |
clamav_group="$withval", clamav_group="clamav") |
837 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
838 |
AC_DEFINE_UNQUOTED([CLAMAVUSER],"$clamav_user",[name of the clamav user]) |
839 |
AC_DEFINE_UNQUOTED([CLAMAVGROUP],"$clamav_group",[name of the clamav group]) |
|
1
by Stephen Gran
Import upstream version 0.73 |
840 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
841 |
AC_ARG_ENABLE([clamav], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
842 |
[ --disable-clamav disable test for clamav user/group], |
843 |
test_clamav=$enableval, test_clamav=yes) |
|
1
by Stephen Gran
Import upstream version 0.73 |
844 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
845 |
AC_ARG_ENABLE([debug], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
846 |
[ --enable-debug enable debug code], |
847 |
enable_debug=$enableval, enable_debug="no") |
|
848 |
||
849 |
if test "$enable_debug" = "yes"; then |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
850 |
VERSION_SUFFIX="$VERSION_SUFFIX-debug" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
851 |
AC_DEFINE([CL_DEBUG],1,[enable debugging]) |
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
852 |
else
|
853 |
AC_DEFINE([NDEBUG],1,[disable assertions]) |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
854 |
fi
|
1
by Stephen Gran
Import upstream version 0.73 |
855 |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
856 |
AC_ARG_ENABLE([unsigned-bytecode], |
857 |
[ --enable-unsigned-bytecode enable load of unsigned bytecode], |
|
858 |
enable_unsignedbytecode="$enableval", enable_unsignedbytecode="no") |
|
859 |
||
860 |
if test "$enable_unsignedbytecode" = "yes"; then |
|
861 |
VERSION_SUFFIX="$VERSION_SUFFIX-unsigned-bc" |
|
862 |
AC_DEFINE([CL_BCUNSIGNED],1,[enable loading of unsigned bytecode]) |
|
863 |
fi
|
|
864 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
865 |
AC_ARG_ENABLE([no-cache], |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
866 |
[ --enable-no-cache use "Cache-Control: no-cache" in freshclam], |
867 |
enable_nocache=$enableval, enable_nocache="no") |
|
868 |
||
869 |
if test "$enable_nocache" = "yes"; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
870 |
AC_DEFINE([FRESHCLAM_NO_CACHE],1,[use "Cache-Control: no-cache" in freshclam]) |
0.4.1
by Kees Cook
Import upstream version 0.88.6 |
871 |
fi
|
872 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
873 |
AC_ARG_ENABLE([dns-fix], |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
874 |
[ --enable-dns-fix enable workaround for broken DNS servers (as in SpeedTouch 510)], |
875 |
enable_dnsfix=$enableval, enable_dnsfix="no") |
|
876 |
||
877 |
if test "$enable_dnsfix" = "yes"; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
878 |
AC_DEFINE([FRESHCLAM_DNS_FIX],1,[enable workaround for broken DNS servers]) |
0.6.1
by Kees Cook
Import upstream version 0.90~rc3 |
879 |
fi
|
880 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
881 |
AC_ARG_ENABLE([bigstack], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
882 |
[ --enable-bigstack increase thread stack size], |
883 |
enable_bigstack=$enableval, enable_bigstack="no") |
|
884 |
||
885 |
if test "$enable_bigstack" = "yes"; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
886 |
AC_DEFINE([C_BIGSTACK],1,[Increase thread stack size.]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
887 |
fi
|
1
by Stephen Gran
Import upstream version 0.73 |
888 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
889 |
AC_ARG_WITH([dbdir], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
890 |
[ --with-dbdir=path path to virus database directory], |
1
by Stephen Gran
Import upstream version 0.73 |
891 |
db_dir="$withval", db_dir="_default_") |
892 |
||
893 |
dnl I had problems with $pkgdatadir thus these funny checks |
|
894 |
if test "$db_dir" = "_default_" |
|
895 |
then
|
|
896 |
if test "$prefix" = "NONE" |
|
897 |
then |
|
898 |
db_dir="$ac_default_prefix/share/clamav" |
|
899 |
else |
|
900 |
db_dir="$prefix/share/clamav" |
|
901 |
fi |
|
902 |
fi
|
|
903 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
904 |
AC_DEFINE_UNQUOTED([DATADIR],"$db_dir", [Path to virus database directory.]) |
1
by Stephen Gran
Import upstream version 0.73 |
905 |
DBDIR="$db_dir" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
906 |
AC_SUBST([DBDIR]) |
1
by Stephen Gran
Import upstream version 0.73 |
907 |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
908 |
dnl configure config directory |
1
by Stephen Gran
Import upstream version 0.73 |
909 |
cfg_dir=`echo $sysconfdir | grep prefix` |
910 |
||
911 |
if test -n "$cfg_dir"; then |
|
912 |
if test "$prefix" = "NONE" |
|
913 |
then |
|
914 |
cfg_dir="$ac_default_prefix/etc" |
|
915 |
else |
|
916 |
cfg_dir="$prefix/etc" |
|
917 |
fi |
|
918 |
else
|
|
919 |
cfg_dir="$sysconfdir" |
|
920 |
fi
|
|
921 |
||
922 |
CFGDIR=$cfg_dir |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
923 |
AC_SUBST([CFGDIR]) |
924 |
AC_DEFINE_UNQUOTED([CONFDIR],"$cfg_dir",[where to look for the config file]) |
|
1
by Stephen Gran
Import upstream version 0.73 |
925 |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
926 |
dnl check for in_port_t definition |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
927 |
AC_MSG_CHECKING([whether in_port_t is defined]) |
928 |
AC_TRY_COMPILE([ |
|
1
by Stephen Gran
Import upstream version 0.73 |
929 |
#include <sys/types.h>
|
930 |
#include <netinet/in.h>
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
931 |
], |
932 |
[in_port_t pt; pt = 0; return pt;], |
|
933 |
[
|
|
934 |
AC_MSG_RESULT(yes)
|
|
935 |
AC_DEFINE([HAVE_IN_PORT_T],1,[in_port_t is defined]) |
|
936 |
], |
|
937 |
AC_MSG_RESULT(no)) |
|
1
by Stephen Gran
Import upstream version 0.73 |
938 |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
939 |
dnl check for in_addr_t definition |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
940 |
AC_MSG_CHECKING([for in_addr_t definition]) |
941 |
AC_TRY_COMPILE([ |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
942 |
#include <sys/types.h>
|
943 |
#include <netinet/in.h>
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
944 |
], |
945 |
[ in_addr_t pt; pt = 0; return pt; ], |
|
946 |
[
|
|
947 |
AC_MSG_RESULT(yes)
|
|
948 |
AC_DEFINE([HAVE_IN_ADDR_T],1,[in_addr_t is defined]) |
|
949 |
], |
|
950 |
AC_MSG_RESULT(no)) |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
951 |
|
1
by Stephen Gran
Import upstream version 0.73 |
952 |
case "$target_os" in |
953 |
linux*) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
954 |
AC_DEFINE([C_LINUX],1,[target is linux]) |
1
by Stephen Gran
Import upstream version 0.73 |
955 |
if test "$have_pthreads" = "yes"; then |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
956 |
THREAD_LIBS="-lpthread" |
1
by Stephen Gran
Import upstream version 0.73 |
957 |
TH_SAFE="-thread-safe" |
958 |
if test "$want_clamuko" = "yes"; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
959 |
AC_DEFINE([CLAMUKO],1,[enable clamuko]) |
1
by Stephen Gran
Import upstream version 0.73 |
960 |
fi |
961 |
fi |
|
962 |
;; |
|
3
by Stephen Gran
* New upstream version |
963 |
kfreebsd*-gnu) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
964 |
AC_DEFINE([C_KFREEBSD_GNU],1,[target is kfreebsd-gnu]) |
3
by Stephen Gran
* New upstream version |
965 |
if test "$have_pthreads" = "yes"; then |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
966 |
THREAD_LIBS="-lpthread" |
7
by Martin Pitt
* Synchronize to Debian to get new upstream microrelease (UVF exception |
967 |
TH_SAFE="-thread-safe" |
968 |
if test "$want_clamuko" = "yes"; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
969 |
AC_DEFINE([CLAMUKO],1,[enable clamuko]) |
7
by Martin Pitt
* Synchronize to Debian to get new upstream microrelease (UVF exception |
970 |
fi |
3
by Stephen Gran
* New upstream version |
971 |
fi |
972 |
;; |
|
1
by Stephen Gran
Import upstream version 0.73 |
973 |
solaris*) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
974 |
FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lresolv" |
1
by Stephen Gran
Import upstream version 0.73 |
975 |
if test "$have_pthreads" = "yes"; then |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
976 |
THREAD_LIBS="-lpthread" |
977 |
CLAMD_LIBS="$CLAMD_LIBS -lresolv" |
|
978 |
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lresolv" |
|
1
by Stephen Gran
Import upstream version 0.73 |
979 |
TH_SAFE="-thread-safe" |
980 |
fi |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
981 |
AC_DEFINE([C_SOLARIS],1,[os is solaris]) |
1
by Stephen Gran
Import upstream version 0.73 |
982 |
;; |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
983 |
freebsd[[45]]*) |
984 |
if test "$have_pthreads" = "yes"; then |
|
985 |
THREAD_LIBS="-pthread -lc_r" |
|
986 |
TH_SAFE="-thread-safe" |
|
0.8.1
by Michael Bienia
Import upstream version 0.90.1 |
987 |
if test "$want_clamuko" = "yes"; then |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
988 |
AC_DEFINE([CLAMUKO],1,[enable clamuko]) |
0.8.1
by Michael Bienia
Import upstream version 0.90.1 |
989 |
fi |
990 |
fi |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
991 |
AC_DEFINE([C_BSD],1,[os is freebsd 4 or 5]) |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
992 |
;; |
1
by Stephen Gran
Import upstream version 0.73 |
993 |
freebsd*) |
994 |
if test "$have_pthreads" = "yes"; then |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
995 |
THREAD_LIBS="-lthr" |
1
by Stephen Gran
Import upstream version 0.73 |
996 |
TH_SAFE="-thread-safe" |
997 |
if test "$want_clamuko" = "yes"; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
998 |
AC_DEFINE([CLAMUKO],1,[enable clamuko]) |
1
by Stephen Gran
Import upstream version 0.73 |
999 |
fi |
1000 |
fi |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1001 |
AC_DEFINE([C_BSD],1,[os is freebsd 6]) |
1
by Stephen Gran
Import upstream version 0.73 |
1002 |
;; |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1003 |
dragonfly*) |
1
by Stephen Gran
Import upstream version 0.73 |
1004 |
if test "$have_pthreads" = "yes"; then |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1005 |
THREAD_LIBS="-pthread" |
1
by Stephen Gran
Import upstream version 0.73 |
1006 |
TH_SAFE="-thread-safe" |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1007 |
if test "$want_clamuko" = "yes"; then |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1008 |
AC_DEFINE([CLAMUKO],1,[enable clamuko]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1009 |
fi |
1
by Stephen Gran
Import upstream version 0.73 |
1010 |
fi |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1011 |
AC_DEFINE([C_BSD],1,[os is dragonfly]) |
1
by Stephen Gran
Import upstream version 0.73 |
1012 |
;; |
1013 |
openbsd*) |
|
1014 |
if test "$have_pthreads" = "yes"; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1015 |
THREAD_LIBS="-pthread" |
1016 |
CLAMD_LIBS="$CLAMD_LIBS -pthread" |
|
1017 |
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread" |
|
1
by Stephen Gran
Import upstream version 0.73 |
1018 |
TH_SAFE="-thread-safe" |
1019 |
fi |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1020 |
AC_DEFINE([C_BSD],1,[os is OpenBSD]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1021 |
;; |
1022 |
bsdi*) |
|
1023 |
if test "$have_pthreads" = "yes"; then |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1024 |
THREAD_LIBS="-pthread" |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1025 |
TH_SAFE="-thread-safe" |
1026 |
fi |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1027 |
AC_DEFINE([C_BSD],1,[os is BSDI BSD/OS]) |
1
by Stephen Gran
Import upstream version 0.73 |
1028 |
;; |
1029 |
netbsd*) |
|
1030 |
if test "$have_pthreads" = "yes"; then |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1031 |
THREAD_LIBS="-lpthread" |
1
by Stephen Gran
Import upstream version 0.73 |
1032 |
fi |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1033 |
AC_DEFINE([C_BSD],1,[os is NetBSD]) |
1
by Stephen Gran
Import upstream version 0.73 |
1034 |
;; |
1035 |
bsd*) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1036 |
AC_MSG_RESULT([Unknown BSD detected. Disabling thread support.]) |
1
by Stephen Gran
Import upstream version 0.73 |
1037 |
have_pthreads="no" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1038 |
AC_DEFINE([C_BSD],1,[os is bsd flavor]) |
1
by Stephen Gran
Import upstream version 0.73 |
1039 |
;; |
1040 |
beos*) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1041 |
AC_MSG_RESULT([BeOS detected. Disabling thread support.]) |
1
by Stephen Gran
Import upstream version 0.73 |
1042 |
have_pthreads="no" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1043 |
AC_DEFINE([C_BEOS],1,[os is beos]) |
1
by Stephen Gran
Import upstream version 0.73 |
1044 |
;; |
1045 |
darwin*) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1046 |
AC_DEFINE([C_BSD],1,[os is bsd flavor]) |
1047 |
AC_DEFINE([C_DARWIN],1,[os is darwin]) |
|
1048 |
AC_DEFINE([BIND_8_COMPAT],1,[enable bind8 compatibility]) |
|
1
by Stephen Gran
Import upstream version 0.73 |
1049 |
use_netinfo="yes" |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1050 |
;; |
1051 |
os2*) |
|
1052 |
FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsyslog" |
|
1053 |
CLAMD_LIBS="$CLAMD_LIBS -lsyslog" |
|
1054 |
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsyslog" |
|
1055 |
if test "$have_pthreads" = "yes"; then |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1056 |
THREAD_LIBS="-lpthread" |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1057 |
TH_SAFE="-thread-safe" |
1058 |
fi |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1059 |
AC_DEFINE([C_OS2],1,[os is OS/2]) |
1
by Stephen Gran
Import upstream version 0.73 |
1060 |
;; |
1061 |
sco*) |
|
1062 |
dnl njh@bandsman.sco.uk: SCO Unix port |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1063 |
dnl FRESHCLAM_LIBS="-lsocket" |
1064 |
dnl CLAMD_LIBS="-lsocket" |
|
1065 |
dnl CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket" |
|
1
by Stephen Gran
Import upstream version 0.73 |
1066 |
;; |
1067 |
hpux*) |
|
1068 |
if test "$have_pthreads" = "yes"; then |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1069 |
THREAD_LIBS="-lpthread" |
1
by Stephen Gran
Import upstream version 0.73 |
1070 |
TH_SAFE="-thread-safe" |
1071 |
fi |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1072 |
AC_DEFINE([C_HPUX],1,[os is hpux]) |
1
by Stephen Gran
Import upstream version 0.73 |
1073 |
;; |
1074 |
aix*) |
|
1075 |
if test "$have_pthreads" = "yes"; then |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1076 |
THREAD_LIBS="-lpthread" |
1
by Stephen Gran
Import upstream version 0.73 |
1077 |
TH_SAFE="-thread-safe" |
66
by Scott Kitterman
* Merge from debian unstable, remaining changes (LP: #388111): |
1078 |
AC_DEFINE([_THREAD_SAFE],1,[thread safe]) |
1
by Stephen Gran
Import upstream version 0.73 |
1079 |
fi |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1080 |
AC_DEFINE([C_AIX],1,[os is aix]) |
1
by Stephen Gran
Import upstream version 0.73 |
1081 |
;; |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1082 |
*-*-osf*) |
1083 |
if test "$have_pthreads" = "yes"; then |
|
1084 |
THREAD_LIBS="-pthread" |
|
1085 |
TH_SAFE="-thread-safe" |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1086 |
AC_DEFINE([_POSIX_PII_SOCKET],1,[POSIX compatibility]) |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1087 |
fi |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1088 |
AC_DEFINE([C_OSF],1,[os is osf/tru64]) |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1089 |
;; |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1090 |
nto-qnx*) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1091 |
AC_DEFINE([C_QNX6],1,[os is QNX 6.x.x]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1092 |
;; |
1
by Stephen Gran
Import upstream version 0.73 |
1093 |
irix*) |
1094 |
if test "$have_pthreads" = "yes"; then |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1095 |
THREAD_LIBS="-lpthread" |
1
by Stephen Gran
Import upstream version 0.73 |
1096 |
TH_SAFE="-thread-safe" |
1097 |
fi |
|
0.1.5
by Michael Tautschnig
Import upstream version 0.95.3+dfsg |
1098 |
LIBS="$LIBS -lgen" |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1099 |
AC_DEFINE([C_IRIX],1,[os is irix]) |
1
by Stephen Gran
Import upstream version 0.73 |
1100 |
;; |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1101 |
interix*) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1102 |
AC_DEFINE([C_INTERIX],1,[os is interix]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1103 |
if test "$test_clamav" = "yes"; then |
1104 |
if test ! -r /etc/passwd; then |
|
1105 |
test_clamav="no" |
|
1106 |
fi |
|
1107 |
fi |
|
1108 |
if test "$have_pthreads" = "yes"; then |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1109 |
THREAD_LIBS="-lpthread" |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1110 |
TH_SAFE="-thread-safe" |
1111 |
fi |
|
1112 |
;; |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1113 |
gnu*) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1114 |
AC_DEFINE([C_GNU_HURD],1,[target is gnu-hurd]) |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1115 |
if test "$have_pthreads" = "yes"; then |
1116 |
THREAD_LIBS="-lpthread" |
|
1117 |
TH_SAFE="-thread-safe" |
|
1118 |
fi |
|
1119 |
;; |
|
1
by Stephen Gran
Import upstream version 0.73 |
1120 |
*) |
1121 |
;; |
|
1122 |
esac
|
|
1123 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1124 |
AC_SUBST([LIBCLAMAV_LIBS]) |
1125 |
AC_SUBST([CLAMD_LIBS]) |
|
1126 |
AC_SUBST([CLAMAV_MILTER_LIBS]) |
|
1127 |
AC_SUBST([FRESHCLAM_LIBS]) |
|
1128 |
AC_SUBST([TH_SAFE]) |
|
1129 |
AC_SUBST([THREAD_LIBS]) |
|
1
by Stephen Gran
Import upstream version 0.73 |
1130 |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1131 |
dnl --enable-milter |
1132 |
if test "$have_milter" = "yes"; then |
|
1133 |
dnl libmilter checking code adapted from spamass-milter by |
|
1134 |
dnl Tom G. Christensen <tgc@statsbiblioteket.dk> |
|
1135 |
||
1136 |
dnl Check for libmilter and it's header files in the usual locations |
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
1137 |
save_LIBS="$LIBS"
|
1138 |
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lpthread"
|
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1139 |
if test -d /usr/lib/libmilter ; then
|
1140 |
CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -L/usr/lib/libmilter"
|
|
1141 |
fi
|
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
1142 |
LIBS="$LIBS -lmilter $CLAMAV_MILTER_LIBS"
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1143 |
AC_CHECK_LIB([milter],[mi_stop],[CLAMAV_MILTER_LIBS="-lmilter $CLAMAV_MILTER_LIBS"],[
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1144 |
dnl Older sendmails require libsm or libsmutil for support functions
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1145 |
AC_SEARCH_LIBS([strlcpy], [sm smutil], [test "$ac_cv_search_strlcpy" = "none required" || CLAMAV_MILTER_XLIB="$ac_cv_search_strlcpy"])
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
1146 |
LIBS="$save_LIBS $CLAMAV_MILTER_LIBS $CLAMAV_MILTER_XLIB"
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1147 |
$as_unset ac_cv_lib_milter_mi_stop
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1148 |
AC_CHECK_LIB([milter],[mi_stop],[CLAMAV_MILTER_LIBS="-lmilter $CLAMAV_MILTER_XLIB $CLAMAV_MILTER_LIBS"],[
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1149 |
AC_MSG_ERROR([Cannot find libmilter])
|
1150 |
])
|
|
1151 |
])
|
|
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
1152 |
LIBS="$save_LIBS"
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1153 |
AC_CHECK_HEADERS([libmilter/mfapi.h],[have_milter="yes"],[
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1154 |
AC_MSG_ERROR([Please install mfapi.h from the sendmail distribution])
|
1155 |
])
|
|
1156 |
fi
|
|
1157 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1158 |
AM_CONDITIONAL([BUILD_CLAMD],[test "$have_pthreads" = "yes"])
|
1159 |
AM_CONDITIONAL([HAVE_MILTER],[test "$have_milter" = "yes"])
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1160 |
|
1161 |
if test "$have_pthreads" = "yes"
|
|
1162 |
then
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1163 |
save_LIBS="$LIBS"
|
1164 |
LIBS="$THREAD_LIBS $LIBS"
|
|
1165 |
AC_CHECK_FUNCS([sched_yield pthread_yield])
|
|
1166 |
LIBS="$save_LIBS"
|
|
1167 |
AC_DEFINE([BUILD_CLAMD], 1, "build clamd")
|
|
0.1.7
by Michael Tautschnig
Import upstream version 0.96.1+dfsg |
1168 |
dnl define these here, so we don't forget any system |
1169 |
AC_DEFINE([CL_THREAD_SAFE],1,[thread safe]) |
|
1170 |
AC_DEFINE([_REENTRANT],1,[thread safe]) |
|
1
by Stephen Gran
Import upstream version 0.73 |
1171 |
fi
|
1172 |
||
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1173 |
dnl Check for readdir_r and number of its arguments |
1174 |
dnl Code from libwww/configure.in |
|
1175 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1176 |
AC_MSG_CHECKING([for readdir_r]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1177 |
if test -z "$ac_cv_readdir_args"; then |
1178 |
AC_TRY_COMPILE( |
|
1179 |
[ |
|
1180 |
#include <sys/types.h>
|
|
1181 |
#include <dirent.h>
|
|
1182 |
], |
|
1183 |
[ |
|
1184 |
struct dirent dir, *dirp;
|
|
1185 |
DIR *mydir;
|
|
1186 |
dirp = readdir_r(mydir, &dir);
|
|
1187 |
], ac_cv_readdir_args=2) |
|
1188 |
fi
|
|
1189 |
if test -z "$ac_cv_readdir_args"; then |
|
1190 |
AC_TRY_COMPILE( |
|
1191 |
[ |
|
1192 |
#include <sys/types.h>
|
|
1193 |
#include <dirent.h>
|
|
1194 |
], |
|
1195 |
[ |
|
1196 |
struct dirent dir, *dirp;
|
|
1197 |
DIR *mydir;
|
|
1198 |
int rc;
|
|
1199 |
rc = readdir_r(mydir, &dir, &dirp);
|
|
1200 |
], ac_cv_readdir_args=3) |
|
1201 |
fi
|
|
1202 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1203 |
AC_ARG_ENABLE([readdir_r], |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1204 |
[ --enable-readdir_r enable support for readdir_r], |
1205 |
enable_readdir_r=$enableval, enable_readdir_r="no") |
|
1206 |
||
1207 |
if test "$enable_readdir_r" = "no"; then |
|
1208 |
AC_MSG_RESULT(support disabled) |
|
1209 |
elif test -z "$ac_cv_readdir_args"; then |
|
1210 |
AC_MSG_RESULT(no) |
|
1211 |
else
|
|
1212 |
if test "$ac_cv_readdir_args" = 2; then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1213 |
AC_DEFINE([HAVE_READDIR_R_2],1,[readdir_r takes 2 arguments]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1214 |
elif test "$ac_cv_readdir_args" = 3; then |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1215 |
AC_DEFINE([HAVE_READDIR_R_3],1,[readdir_r takes 3 arguments]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1216 |
fi |
1217 |
AC_MSG_RESULT([yes, and it takes $ac_cv_readdir_args arguments]) |
|
1218 |
fi
|
|
1219 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1220 |
AC_MSG_CHECKING([for ctime_r]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1221 |
if test "$ac_cv_func_ctime_r" = "yes"; then |
1222 |
AC_TRY_COMPILE([ |
|
1223 |
#include <time.h>
|
|
1224 |
],[ |
|
1225 |
char buf[31]; |
|
1226 |
time_t t; |
|
1227 |
ctime_r(&t, buf, 30); |
|
1228 |
],[ |
|
1229 |
ac_cv_ctime_args=3
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1230 |
AC_DEFINE([HAVE_CTIME_R_3],1,[ctime_r takes 3 arguments]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1231 |
],[ |
1232 |
ac_cv_ctime_args=2
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1233 |
AC_DEFINE([HAVE_CTIME_R_2],1,[ctime_r takes 2 arguments]) |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1234 |
]) |
1235 |
||
1236 |
AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments]) |
|
1237 |
fi
|
|
1238 |
||
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1239 |
dnl Determine socklen_t type. Code from lftp. |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1240 |
AC_MSG_CHECKING([for socklen_t]) |
1241 |
AC_CACHE_VAL([ac_cv_socklen_t], |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1242 |
[
|
1243 |
ac_cv_socklen_t=no
|
|
1244 |
AC_TRY_COMPILE([
|
|
1245 |
#include <sys/types.h>
|
|
1246 |
#include <sys/socket.h>
|
|
1247 |
], |
|
1248 |
[ |
|
1249 |
socklen_t len;
|
|
1250 |
getpeername(0,0,&len);
|
|
1251 |
], |
|
1252 |
[ |
|
1253 |
ac_cv_socklen_t=yes
|
|
1254 |
]) |
|
1255 |
]) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1256 |
AC_MSG_RESULT([$ac_cv_socklen_t]) |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1257 |
if test $ac_cv_socklen_t = no; then |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1258 |
AC_MSG_CHECKING([for socklen_t equivalent]) |
1259 |
AC_CACHE_VAL([ac_cv_socklen_t_equiv], |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1260 |
[ |
1261 |
ac_cv_socklen_t_equiv=int
|
|
1262 |
for t in int size_t unsigned long "unsigned long"; do
|
|
1263 |
AC_TRY_COMPILE([
|
|
1264 |
#include <sys/types.h>
|
|
1265 |
#include <sys/socket.h>
|
|
1266 |
], |
|
1267 |
[ |
|
1268 |
$t len;
|
|
1269 |
getpeername(0,0,&len);
|
|
1270 |
], |
|
1271 |
[ |
|
1272 |
ac_cv_socklen_t_equiv="$t"
|
|
1273 |
break
|
|
1274 |
]) |
|
1275 |
done |
|
1276 |
]) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1277 |
AC_MSG_RESULT([$ac_cv_socklen_t_equiv]) |
1278 |
AC_DEFINE_UNQUOTED([socklen_t], $ac_cv_socklen_t_equiv, [Define to "int" if <sys/socket.h> does not define.]) |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1279 |
fi
|
1280 |
||
1
by Stephen Gran
Import upstream version 0.73 |
1281 |
dnl Check for clamav in /etc/passwd |
1282 |
if test "$test_clamav" = "yes" |
|
1283 |
then
|
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1284 |
dnl parse /etc/passwd |
1285 |
if test "$use_id" = "no" |
|
1
by Stephen Gran
Import upstream version 0.73 |
1286 |
then |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1287 |
AC_MSG_CHECKING([for $clamav_user in /etc/passwd]) |
1
by Stephen Gran
Import upstream version 0.73 |
1288 |
if test -r /etc/passwd; then |
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1289 |
clamavuser=`cat /etc/passwd|grep "^$clamav_user:"` |
1290 |
clamavgroup=`cat /etc/group|grep "^$clamav_group:"` |
|
1
by Stephen Gran
Import upstream version 0.73 |
1291 |
fi |
1292 |
else |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1293 |
AC_MSG_CHECKING([for $clamav_user using id]) |
1
by Stephen Gran
Import upstream version 0.73 |
1294 |
id $clamav_user > /dev/null 2>&1 |
1295 |
if test "$?" = 0 ; then |
|
1296 |
clamavuser=1 |
|
1297 |
AC_PATH_PROG(GETENT, getent) |
|
1298 |
if test -n "$GETENT" ; then |
|
1299 |
clamavgroup=`$GETENT group | grep "^${clamav_group}:"` |
|
1300 |
else |
|
1301 |
clamavgroup=`cat /etc/group|grep $clamav_group` |
|
1302 |
fi |
|
1303 |
fi |
|
1304 |
fi |
|
1305 |
||
1306 |
if test "$use_netinfo" = "yes" |
|
1307 |
then |
|
1.1.7
by Jamie Strandboge
Import upstream version 0.92.1~dfsg2 |
1308 |
if test -x /usr/bin/dscl; then |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1309 |
AC_MSG_CHECKING([for $clamav_user using dscl]) |
1.1.7
by Jamie Strandboge
Import upstream version 0.92.1~dfsg2 |
1310 |
clamavuser=`/usr/bin/dscl . -list /Users |grep ${clamav_user}` |
1311 |
clamavgroup=`/usr/bin/dscl . -list /Groups |grep ${clamav_group}` |
|
1312 |
else |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1313 |
AC_MSG_CHECKING([for $clamav_user using netinfo]) |
1.1.7
by Jamie Strandboge
Import upstream version 0.92.1~dfsg2 |
1314 |
clamavuser=`/usr/bin/nidump passwd . |grep ${clamav_user}` |
1315 |
clamavgroup=`/usr/bin/nidump group . |grep ${clamav_group}` |
|
1316 |
fi |
|
1
by Stephen Gran
Import upstream version 0.73 |
1317 |
fi |
1318 |
||
1319 |
if test "$use_yp" = "yes" |
|
1320 |
then |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1321 |
AC_MSG_CHECKING([for $clamav_user using ypmatch]) |
1
by Stephen Gran
Import upstream version 0.73 |
1322 |
clamavuser=`ypmatch ${clamav_user} passwd` |
1323 |
clamavgroup=`ypmatch ${clamav_group} group` |
|
1324 |
fi |
|
1325 |
||
1326 |
if test -z "$clamavuser" || test -z "$clamavgroup" |
|
1327 |
then |
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1328 |
AC_MSG_RESULT(no) |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1329 |
AC_MSG_ERROR([User $clamav_user (and/or group $clamav_group) doesn't exist. Please read the documentation !]) |
1
by Stephen Gran
Import upstream version 0.73 |
1330 |
else |
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1331 |
AC_MSG_RESULT([yes, user $clamav_user and group $clamav_group]) |
1332 |
CLAMAVUSER="$clamav_user" |
|
1333 |
CLAMAVGROUP="$clamav_group" |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1334 |
AC_SUBST([CLAMAVUSER]) |
1335 |
AC_SUBST([CLAMAVGROUP]) |
|
1
by Stephen Gran
Import upstream version 0.73 |
1336 |
fi |
1337 |
fi
|
|
1338 |
||
1339 |
dnl check for __attribute__((packed)) |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1340 |
dnl but only on compilers claiming to be gcc compatible |
1341 |
dnl because for example Sun's compiler silently ignores the packed attribute. |
|
1
by Stephen Gran
Import upstream version 0.73 |
1342 |
AC_MSG_CHECKING([for structure packing via __attribute__((packed))])
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1343 |
AC_CACHE_VAL([have_cv_attrib_packed],[
|
1
by Stephen Gran
Import upstream version 0.73 |
1344 |
AC_TRY_COMPILE(,
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1345 |
[#ifdef __GNUC__
|
1346 |
struct { int i __attribute__((packed)); } s;
|
|
1347 |
#else
|
|
1348 |
#error Only checking for packed attribute on gcc-like compilers
|
|
1349 |
#endif],
|
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1350 |
[have_cv_attrib_packed=yes],
|
1351 |
[have_cv_attrib_packed=no])
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1352 |
])
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1353 |
AC_MSG_RESULT([$have_cv_attrib_packed])
|
1
by Stephen Gran
Import upstream version 0.73 |
1354 |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1355 |
if test "$have_cv_attrib_packed" = no; then
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1356 |
AC_MSG_CHECKING([for structure packing via pragma])
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1357 |
AC_CACHE_VAL([have_cv_pragma_pack],[
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1358 |
AC_TRY_RUN([
|
1359 |
int main(int argc, char **argv) {
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1360 |
#pragma pack(1) /* has to be in column 1 ! */
|
1361 |
struct { char c; long l; } s;
|
|
1362 |
return sizeof(s)==sizeof(s.c)+sizeof(s.l) ? 0:1; } ],
|
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1363 |
[have_cv_pragma_pack=yes],
|
1364 |
[have_cv_pragma_pack=no])
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1365 |
])
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1366 |
AC_MSG_RESULT([$have_cv_pragma_pack])
|
1367 |
if test "$have_cv_pragma_pack" = yes; then
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1368 |
AC_DEFINE([HAVE_PRAGMA_PACK], 1, "pragma pack")
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1369 |
else
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1370 |
AC_MSG_CHECKING([for structure packing via hppa/hp-ux pragma])
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1371 |
AC_CACHE_VAL([have_cv_pragma_pack_hpux],[
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1372 |
AC_TRY_RUN([
|
1373 |
/* hppa/hp-ux wants pragma outside of function */
|
|
1374 |
#pragma pack 1 /* has to be in column 1 ! */
|
|
1375 |
struct { char c; long l; } s;
|
|
1376 |
int main(int argc, char **argv) {
|
|
1377 |
return sizeof(s)==sizeof(s.c)+sizeof(s.l) ? 0:1; } ],
|
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1378 |
[have_cv_pragma_pack_hpux=yes],
|
1379 |
[have_cv_pragma_pack_hpux=no])
|
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1380 |
])
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1381 |
AC_MSG_RESULT([$have_cv_pragma_pack_hpux])
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1382 |
AC_DEFINE([HAVE_PRAGMA_PACK_HPPA], 1, "pragma pack hppa/hp-ux style")
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1383 |
fi
|
1
by Stephen Gran
Import upstream version 0.73 |
1384 |
fi
|
1385 |
||
1.1.3
by Stephen Gran
Import upstream version 0.88 |
1386 |
dnl check for __attribute__((aligned))
|
1387 |
AC_MSG_CHECKING([for type aligning via __attribute__((aligned))])
|
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1388 |
AC_CACHE_VAL([have_cv_attrib_aligned],[
|
1.1.3
by Stephen Gran
Import upstream version 0.88 |
1389 |
AC_TRY_COMPILE(,
|
1390 |
[typedef int cl_aligned_int __attribute__((aligned));],
|
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1391 |
[have_cv_attrib_aligned=yes],
|
1392 |
[have_cv_attrib_aligned=no])
|
|
1.1.3
by Stephen Gran
Import upstream version 0.88 |
1393 |
])
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1394 |
AC_MSG_RESULT([$have_cv_attrib_aligned])
|
1.1.3
by Stephen Gran
Import upstream version 0.88 |
1395 |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1396 |
if test "$have_cv_attrib_packed" = no -a "$have_cv_pragma_pack" = no -a "$have_cv_pragma_pack_hpux" = no; then
|
1
by Stephen Gran
Import upstream version 0.73 |
1397 |
AC_MSG_ERROR(Need to know how to pack structures with this compiler)
|
1398 |
fi
|
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1399 |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1400 |
if test "$have_cv_attrib_packed" = yes; then
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1401 |
AC_DEFINE([HAVE_ATTRIB_PACKED], 1, [attrib packed])
|
1
by Stephen Gran
Import upstream version 0.73 |
1402 |
fi
|
0.6.1
by Kees Cook
Import upstream version 0.90~rc3 |
1403 |
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1404 |
if test "$have_cv_attrib_aligned" = yes; then
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1405 |
AC_DEFINE([HAVE_ATTRIB_ALIGNED], 1, [attrib aligned])
|
1.1.3
by Stephen Gran
Import upstream version 0.88 |
1406 |
fi
|
1
by Stephen Gran
Import upstream version 0.73 |
1407 |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
1408 |
dnl Sanity check that struct packing works
|
1409 |
AC_MSG_CHECKING([that structure packing works])
|
|
1410 |
AC_CACHE_VAL([have_cv_struct_pack],[
|
|
1411 |
AC_TRY_RUN([
|
|
1412 |
#ifndef HAVE_ATTRIB_PACKED
|
|
1413 |
#define __attribute__(x)
|
|
1414 |
#endif
|
|
1415 |
#ifdef HAVE_PRAGMA_PACK
|
|
1416 |
#pragma pack(1) /* has to be in column 1 ! */
|
|
1417 |
#endif
|
|
1418 |
#ifdef HAVE_PRAGMA_PACK_HPPA
|
|
1419 |
#pragma pack 1 /* has to be in column 1 ! */
|
|
1420 |
#endif
|
|
1421 |
||
1422 |
struct { char c __attribute__((packed)); long l __attribute__((packed)); } s;
|
|
1423 |
||
1424 |
#ifdef HAVE_PRAGMA_PACK
|
|
1425 |
#pragma pack()
|
|
1426 |
#endif
|
|
1427 |
#ifdef HAVE_PRAGMA_PACK_HPPA
|
|
1428 |
#pragma pack
|
|
1429 |
#endif
|
|
1430 |
||
1431 |
struct { char c; long l;} s2;
|
|
1432 |
||
1433 |
#ifdef HAVE_PRAGMA_PACK
|
|
1434 |
#pragma pack(1) /* has to be in column 1 ! */
|
|
1435 |
#endif
|
|
1436 |
#ifdef HAVE_PRAGMA_PACK_HPPA
|
|
1437 |
#pragma pack 1 /* has to be in column 1 ! */
|
|
1438 |
#endif
|
|
1439 |
||
1440 |
struct { char c; long l; } __attribute__((packed)) s3;
|
|
1441 |
||
1442 |
#ifdef HAVE_PRAGMA_PACK
|
|
1443 |
#pragma pack()
|
|
1444 |
#endif
|
|
1445 |
#ifdef HAVE_PRAGMA_PACK_HPPA
|
|
1446 |
#pragma pack
|
|
1447 |
#endif
|
|
1448 |
||
1449 |
int main(int argc, char **argv) {
|
|
1450 |
if (sizeof(s)!=sizeof(s.c)+sizeof(s.l))
|
|
1451 |
return 1;
|
|
1452 |
if (sizeof(s) != sizeof(s3))
|
|
1453 |
return 2;
|
|
1454 |
return (sizeof(s2) >= sizeof(s)) ? 0 : 3;
|
|
1455 |
}],
|
|
1456 |
[have_cv_struct_pack=yes],
|
|
1457 |
[have_cv_struct_pack=no],
|
|
1458 |
[have_cv_struct_pack=yes])
|
|
1459 |
])
|
|
1460 |
AC_MSG_RESULT([$have_cv_struct_pack])
|
|
1461 |
||
1462 |
if test "$have_cv_struct_pack" = "no"; then
|
|
1463 |
AC_MSG_ERROR([Structure packing seems to be available, but is not working with this compiler])
|
|
1464 |
fi
|
|
1465 |
||
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1466 |
dnl Check if <sys/select.h> needs to be included for fd_set
|
1
by Stephen Gran
Import upstream version 0.73 |
1467 |
AC_MSG_CHECKING([for fd_set])
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1468 |
AC_HEADER_EGREP([fd_mask], [sys/select.h], [have_fd_set=yes])
|
1469 |
if test "$have_fd_set" = yes; then
|
|
1470 |
AC_DEFINE([HAVE_SYS_SELECT_H], 1, "have <sys/select.h>")
|
|
1471 |
AC_MSG_RESULT([yes, found in sys/select.h])
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1472 |
else
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1473 |
AC_TRY_COMPILE([#include <sys/time.h>
|
1474 |
#include <sys/types.h>
|
|
1475 |
#ifdef HAVE_UNISTD_H
|
|
1476 |
#include <unistd.h>
|
|
1477 |
#endif],
|
|
1478 |
[fd_set readMask, writeMask;], have_fd_set=yes, have_fd_set=no)
|
|
1479 |
if test "$have_fd_set" = yes; then
|
|
1480 |
AC_MSG_RESULT([yes, found in sys/types.h])
|
|
1481 |
else
|
|
1482 |
AC_DEFINE([NO_FD_SET], 1, "no fd_set")
|
|
1483 |
AC_MSG_RESULT(no)
|
|
1484 |
fi
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1485 |
fi
|
1486 |
||
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1487 |
AC_MSG_CHECKING([default FD_SETSIZE value])
|
1
by Stephen Gran
Import upstream version 0.73 |
1488 |
AC_TRY_RUN([
|
1489 |
#include <stdio.h>
|
|
1490 |
#include <unistd.h>
|
|
1491 |
#include <sys/time.h>
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1492 |
#ifdef HAVE_SYS_SELECT_H
|
1
by Stephen Gran
Import upstream version 0.73 |
1493 |
#include <sys/select.h>
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1494 |
#endif
|
1495 |
#ifdef HAVE_SYS_TYPES_H
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1496 |
#include <sys/types.h>
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1497 |
#endif
|
1498 |
#include <errno.h>
|
|
1499 |
int main(void) {
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1500 |
FILE *fp = fopen("conftestval", "w");
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1501 |
if(fp) {
|
1502 |
if(fprintf (fp, "%d\n", FD_SETSIZE) < 1) {
|
|
1503 |
perror("fprintf failed");
|
|
1504 |
return errno;
|
|
1505 |
}
|
|
1506 |
} else {
|
|
1507 |
perror("fopen failed");
|
|
1508 |
return errno;
|
|
1509 |
}
|
|
1510 |
return 0;
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1511 |
}
|
1512 |
],
|
|
1513 |
DEFAULT_FD_SETSIZE=`cat conftestval`,
|
|
1514 |
DEFAULT_FD_SETSIZE=256,
|
|
1515 |
DEFAULT_FD_SETSIZE=256)
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1516 |
AC_MSG_RESULT([$DEFAULT_FD_SETSIZE])
|
1517 |
AC_DEFINE_UNQUOTED([DEFAULT_FD_SETSIZE], $DEFAULT_FD_SETSIZE, "default FD_SETSIZE value")
|
|
1
by Stephen Gran
Import upstream version 0.73 |
1518 |
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1519 |
dnl Check signed right shift implementation
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1520 |
AC_MSG_CHECKING([whether signed right shift is sign extended])
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1521 |
AC_TRY_RUN([int main(void){int a=-1;int b=a>>1;return(a!=b);}],
|
1522 |
[have_signed_rightshift_extended=yes],
|
|
1523 |
[have_signed_rightshift_extended=no],
|
|
1524 |
[have_signed_rightshift_extended=no])
|
|
1525 |
if test $have_signed_rightshift_extended = yes; then
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1526 |
AC_DEFINE([HAVE_SAR], 1, [Define signed right shift implementation])
|
1.1.4
by Martin Pitt
Import upstream version 0.88.1 |
1527 |
fi
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1528 |
AC_MSG_RESULT([$have_signed_rightshift_extended]);
|
1.1.4
by Martin Pitt
Import upstream version 0.88.1 |
1529 |
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1530 |
AC_C_FDPASSING
|
1531 |
||
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
1532 |
AC_DEFINE_UNQUOTED([VERSION_SUFFIX],"$VERSION_SUFFIX",[Version suffix for package])
|
1533 |
||
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1534 |
AC_ARG_ENABLE(clamdtop,
|
1535 |
AC_HELP_STRING([--enable-clamdtop],
|
|
1536 |
[Enable 'clamdtop' tool @<:@default=auto@:>@]), |
|
1537 |
[enable_clamdtop=$enableval], [enable_clamdtop="auto"])
|
|
1538 |
||
1539 |
if test "$enable_clamdtop" != "no"; then
|
|
1540 |
||
1541 |
AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
|
|
1542 |
AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
|
|
1543 |
[initscr(); KEY_RESIZE;]),
|
|
1544 |
[CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
|
|
1545 |
CURSES_INCLUDE="<ncurses/ncurses.h>"],
|
|
1546 |
[])
|
|
1547 |
||
1548 |
if test "X$HAVE_LIBNCURSES" != "Xyes"; then
|
|
1549 |
HAVE_LIBNCURSES=
|
|
1550 |
AC_LIB_FIND([ncurses], [ncurses.h],
|
|
1551 |
AC_LANG_PROGRAM([#include <ncurses.h>],
|
|
1552 |
[initscr(); KEY_RESIZE;]),
|
|
1553 |
[CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
|
|
1554 |
CURSES_INCLUDE="<ncurses.h>"],
|
|
1555 |
[])
|
|
1556 |
fi
|
|
1557 |
||
1558 |
if test "X$HAVE_LIBNCURSES" != "Xyes"; then
|
|
1559 |
AC_LIB_FIND([pdcurses],[curses.h],
|
|
1560 |
AC_LANG_PROGRAM([#include <curses.h>],
|
|
1561 |
[initscr(); KEY_RESIZE;]),
|
|
1562 |
[CURSES_CPPFLAGS="$INCPDCURSES";
|
|
1563 |
CURSES_LIBS="$LTLIBPDCURSES";
|
|
1564 |
CURSES_INCLUDE="<curses.h>"],
|
|
1565 |
[AC_MSG_WARN([****** not building clamdtop: ncurses not found])])
|
|
1566 |
fi
|
|
1567 |
||
1568 |
if test "x$CURSES_LIBS" = "x" -a "$enable_clamdtop" = "yes"; then
|
|
1569 |
AC_MSG_ERROR([
|
|
1570 |
||
1571 |
ERROR! Clamdtop was configured, but not found. You need to install libncurses5-dev.
|
|
1572 |
])
|
|
1573 |
fi
|
|
1574 |
||
1575 |
fi
|
|
1576 |
||
1577 |
AC_DEFINE_UNQUOTED([CURSES_INCLUDE], $CURSES_INCLUDE, [curses header location])
|
|
1578 |
AC_SUBST([CURSES_CPPFLAGS])
|
|
1579 |
AC_SUBST([CURSES_LIBS])
|
|
1580 |
AM_CONDITIONAL([HAVE_CURSES],
|
|
1581 |
[test "X$HAVE_LIBNCURSES" = "Xyes" || test "X$HAVE_LIBPDCURSES" = "Xyes"])
|
|
1582 |
||
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
1583 |
AC_ARG_ENABLE([distcheck-werror],
|
1584 |
AC_HELP_STRING([--enable-distcheck-werror],
|
|
1585 |
[enable warnings as error for distcheck
|
|
1586 |
@<:@default=no@:>@]),
|
|
1587 |
[enable_distcheckwerror=$enableval],[enable_distcheckwerror="no"])
|
|
1588 |
||
1589 |
# Enable distcheck warnings and Werror only for gcc versions that support them,
|
|
1590 |
# and only after we've run the configure tests. |
|
1591 |
# Some configure tests fail (like checking for cos in -lm) if we enable these |
|
1592 |
# Werror flags for configure too (for example -Wstrict-prototypes makes |
|
1593 |
# configure think that -lm doesn't have cos, hence its in libc). |
|
1594 |
if test "x$enable_distcheckwerror" = "xyes"; then
|
|
1595 |
if test "$distcheck_enable_flags" = "1"; then
|
|
1596 |
CFLAGS="$CFLAGS -Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wno-error=bad-function-cast -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-function -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=aggregate-return"
|
|
1597 |
fi
|
|
1598 |
fi
|
|
1599 |
||
1600 |
AC_ARG_ENABLE([llvm],AC_HELP_STRING([--enable-llvm],
|
|
1601 |
[Enable 'llvm' JIT/verifier support @<:@default=auto@:>@]), |
|
1602 |
[enable_llvm=$enableval], [enable_llvm="auto"])
|
|
1603 |
||
1604 |
if test "$enable_llvm" != "no"; then
|
|
1605 |
dnl Try to configure subdir, optionally
|
|
1606 |
AC_CONFIG_SUBDIRS_OPTIONAL([libclamav/c++])
|
|
1607 |
fi
|
|
1608 |
||
0.1.7
by Michael Tautschnig
Import upstream version 0.96.1+dfsg |
1609 |
AC_ARG_ENABLE([sha-collector-for-internal-use], [], [enable_sha_collector="yes"], [enable_sha_collector="no"])
|
1610 |
if test "$enable_sha_collector" != "no"; then
|
|
1611 |
AC_DEFINE([HAVE__INTERNAL__SHA_COLLECT], 1, [For internal use only - DO NOT DEFINE])
|
|
1612 |
fi
|
|
0.46.1
by Jamie Strandboge
Import upstream version 0.96.1+dfsg |
1613 |
AM_CONDITIONAL([BUILD_SHA1],[test "$enable_sha_collector" != "no"])
|
0.1.7
by Michael Tautschnig
Import upstream version 0.96.1+dfsg |
1614 |
|
1
by Stephen Gran
Import upstream version 0.73 |
1615 |
AC_OUTPUT([
|
1616 |
clamscan/Makefile
|
|
1617 |
database/Makefile
|
|
1618 |
docs/Makefile
|
|
1619 |
clamd/Makefile
|
|
1620 |
clamdscan/Makefile
|
|
1621 |
clamav-milter/Makefile
|
|
1622 |
freshclam/Makefile
|
|
1623 |
sigtool/Makefile
|
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1624 |
clamconf/Makefile
|
1
by Stephen Gran
Import upstream version 0.73 |
1625 |
etc/Makefile
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1626 |
test/Makefile
|
1627 |
unit_tests/Makefile
|
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1628 |
clamdtop/Makefile
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
1629 |
clambc/Makefile
|
1
by Stephen Gran
Import upstream version 0.73 |
1630 |
Makefile
|
1631 |
clamav-config
|
|
1632 |
libclamav.pc
|
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
1633 |
platform.h
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1634 |
docs/man/clamav-milter.8
|
0.1.7
by Michael Tautschnig
Import upstream version 0.96.1+dfsg |
1635 |
docs/man/clamav-milter.conf.5
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1636 |
docs/man/clamconf.1
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1637 |
docs/man/clamd.8
|
1638 |
docs/man/clamd.conf.5
|
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1639 |
docs/man/clamdscan.1
|
1640 |
docs/man/clamscan.1
|
|
1.1.1
by Stephen Gran
Import upstream version 0.87 |
1641 |
docs/man/freshclam.1
|
1642 |
docs/man/freshclam.conf.5
|
|
1.1.6
by Leonel Nunez
Import upstream version 0.92~dfsg |
1643 |
docs/man/sigtool.1
|
0.1.3
by Stephen Gran
Import upstream version 0.95.1+dfsg |
1644 |
docs/man/clamdtop.1
|
1
by Stephen Gran
Import upstream version 0.73 |
1645 |
])
|
0.28.1
by Stephen Gran
Import upstream version 0.93~dfsg |
1646 |
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
1647 |
if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then
|
1648 |
AC_MSG_ERROR([Failed to configure LLVM, and LLVM was explicitly requested])
|
|
1649 |
fi
|
|
1650 |
AM_CONDITIONAL([ENABLE_LLVM],
|
|
1651 |
[test "$subdirfailed" != "yes" && test "$enable_llvm" != "no"])
|
|
1652 |
no_recursion="yes";
|
|
1653 |
AC_OUTPUT([libclamav/Makefile])
|
|
1654 |
||
1655 |
# Print a summary of what features we enabled
|
|
1656 |
AC_MSG_NOTICE([Summary of detected features follows])
|
|
1657 |
||
1658 |
cat <<EOF
|
|
1659 |
OS : $target_os
|
|
1660 |
pthreads : $have_pthreads ($THREAD_LIBS)
|
|
1661 |
EOF
|
|
1662 |
||
1663 |
AC_MSG_NOTICE([Summary of miscellaneous features])
|
|
1664 |
if test "x$CHECK_LIBS" = "x"; then
|
|
1665 |
check_libs="no"
|
|
1666 |
else
|
|
1667 |
check_libs="$CHECK_LIBS"
|
|
1668 |
fi
|
|
1669 |
CL_MSG_STATUS([check ],[$check_libs],[$enable_check_ut])
|
|
1670 |
CL_MSG_STATUS([clamuko ],[$want_clamuko],[$want_clamuko])
|
|
1671 |
if test "x$ac_cv_have_control_in_msghdr" = "xyes"; then
|
|
1672 |
CL_MSG_STATUS([fdpassing ],[$have_fdpass],[$want_fdpassing])
|
|
1673 |
else
|
|
1674 |
CL_MSG_STATUS([fdpassing ],[n/a],[])
|
|
1675 |
fi
|
|
1676 |
CL_MSG_STATUS([IPv6 ],[$have_cv_ipv6],[$want_ipv6])
|
|
1677 |
||
1678 |
AC_MSG_NOTICE([Summary of optional tools])
|
|
1679 |
CL_MSG_STATUS([clamdtop ],[$CURSES_LIBS],[$enable_clamdtop])
|
|
1680 |
CL_MSG_STATUS([milter ],[yes],[$have_milter])
|
|
1681 |
||
1682 |
AC_MSG_NOTICE([Summary of engine performance features)])
|
|
1683 |
if test "x$enable_debug" = "xyes"; then
|
|
1684 |
CL_MSG_STATUS([release mode],[no],[debug build])
|
|
1685 |
else
|
|
1686 |
CL_MSG_STATUS([release mode],[yes],[yes])
|
|
1687 |
fi
|
|
1688 |
have_jit="no"
|
|
1689 |
if test "$subdirfailed" = "no"; then
|
|
1690 |
have_jit="yes"
|
|
1691 |
fi
|
|
1692 |
CL_MSG_STATUS([jit ],[$have_jit],[$enable_llvm])
|
|
1693 |
CL_MSG_STATUS([mempool ],[$have_mempool],[$enable_mempool])
|
|
1694 |
||
1695 |
AC_MSG_NOTICE([Summary of engine detection features])
|
|
1696 |
CL_MSG_STATUS([autoit_ea06 ],[$have_autoitea06],[])
|
|
0.35.14
by Michael Tautschnig, Stephen Gran, Alberto WU, Michael Tautschnig
[ Stephen Gran ] |
1697 |
CL_MSG_STATUS([bzip2 ],[$bzip_check],[$want_bzip2])
|
0.1.6
by Stephen Gran
Import upstream version 0.96+dfsg |
1698 |
CL_MSG_STATUS([zlib ],[$ZLIB_HOME],[yes])
|
1699 |
CL_MSG_STATUS([unrar ],[$want_unrar],[$want_unrar])
|
|
1700 |
||
0.1.2
by Michael Meskes
Import upstream version 0.94.dfsg.2 |
1701 |
# Yep, downgrading the compiler avoids the bug too:
|
1702 |
# 4.0.x, and 4.1.0 are the known buggy versions
|
|
1703 |
# 3.4 doesn't have the bug |
|
1704 |
if test "x$gcc_check" != "xyes"; then |
|
1705 |
AC_MSG_WARN([ |
|
1706 |
****** Optimizations disabled to avoid compiler bugs
|
|
1707 |
****** The resulting binaries will be slow!
|
|
1708 |
****** It is recommended to either upgrade or downgrade your compiler
|
|
1709 |
]) |
|
1710 |
fi
|
|
1711 |
||
0.35.14
by Michael Tautschnig, Stephen Gran, Alberto WU, Michael Tautschnig
[ Stephen Gran ] |
1712 |
if test "x$cross_compiling" != "xno" || test "x$gcc_check" != "xyes" || test "x$zlib_check" = "xno" || test "x$bzip_check" != "xok" ; then |
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1713 |
AC_MSG_WARN([ |
1714 |
****** WARNING:
|
|
0.35.14
by Michael Tautschnig, Stephen Gran, Alberto WU, Michael Tautschnig
[ Stephen Gran ] |
1715 |
****** You are cross compiling to a different host or you are
|
1716 |
****** linking to bugged system libraries or you have manually
|
|
1717 |
****** disabled important configure checks.
|
|
0.1.1
by Stephen Gran
Import upstream version 0.94.dfsg |
1718 |
****** Please be aware that this build may be badly broken.
|
1719 |
****** DO NOT REPORT BUGS BASED ON THIS BUILD !!!
|
|
1720 |
]) |
|
1721 |
fi
|
|
1722 |