Browse code

Migrate ClamAV's crypto routines over to OpenSSL.

Shawn Webb authored on 2014/02/13 07:55:38
Showing 263 changed files
... ...
@@ -103,6 +103,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
103 103
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
104 104
 	$(top_srcdir)/m4/lt~obsolete.m4 \
105 105
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
106
+	$(top_srcdir)/m4/reorganization/version.m4 \
107
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
108
+	$(top_srcdir)/m4/reorganization/headers.m4 \
109
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
110
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
111
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
112
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
113
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
114
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
115
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
116
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
117
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
118
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
120
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
121
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
123
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
126
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
127
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
128
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
129
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
130
+	$(top_srcdir)/m4/reorganization/debug.m4 \
131
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
132
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
133
+	$(top_srcdir)/m4/reorganization/dns.m4 \
134
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
135
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
136
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
137
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
138
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
139
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
140
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
141
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
142
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
143
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
144
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
145
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
146
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
147
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
148
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
149
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
150
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
151
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
152
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
153
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
154
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
155
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
156
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
157
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
158
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
159
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
106 160
 	$(top_srcdir)/configure.ac
107 161
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
108 162
 	$(ACLOCAL_M4)
... ...
@@ -234,9 +288,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
234 234
 CHECK_LIBS = @CHECK_LIBS@
235 235
 CLAMAVGROUP = @CLAMAVGROUP@
236 236
 CLAMAVUSER = @CLAMAVUSER@
237
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
237 238
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
239
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
240
+CLAMBC_LIBS = @CLAMBC_LIBS@
241
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
242
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
238 243
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
244
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
245
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
246
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
239 247
 CLAMD_LIBS = @CLAMD_LIBS@
248
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
249
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
250
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
251
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
240 252
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
241 253
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
242 254
 CPP = @CPP@
... ...
@@ -256,6 +322,7 @@ ECHO_T = @ECHO_T@
256 256
 EGREP = @EGREP@
257 257
 EXEEXT = @EXEEXT@
258 258
 FGREP = @FGREP@
259
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
259 260
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
260 261
 GCOV = @GCOV@
261 262
 GENHTML = @GENHTML@
... ...
@@ -277,8 +344,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
277 277
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
278 278
 LIBBZ2 = @LIBBZ2@
279 279
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
280
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
280 281
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
281 282
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
283
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
282 284
 LIBLTDL = @LIBLTDL@
283 285
 LIBM = @LIBM@
284 286
 LIBOBJS = @LIBOBJS@
... ...
@@ -316,6 +385,7 @@ RANLIB = @RANLIB@
316 316
 SED = @SED@
317 317
 SET_MAKE = @SET_MAKE@
318 318
 SHELL = @SHELL@
319
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
319 320
 STRIP = @STRIP@
320 321
 THREAD_LIBS = @THREAD_LIBS@
321 322
 TH_SAFE = @TH_SAFE@
... ...
@@ -178,9 +178,6 @@
178 178
 /* Define to 1 if the system has the type `error_t'. */
179 179
 #undef HAVE_ERROR_T
180 180
 
181
-/* Define to 1 if you have the <fcntl.h> header file */
182
-#undef HAVE_FCNTL_H
183
-
184 181
 /* have working file descriptor passing support */
185 182
 #undef HAVE_FD_PASSING
186 183
 
... ...
@@ -190,9 +187,6 @@
190 190
 /* have getaddrinfo() */
191 191
 #undef HAVE_GETADDRINFO
192 192
 
193
-/* Define to 1 if you have the `getifaddrs' function. */
194
-#undef HAVE_GETIFADDRS
195
-
196 193
 /* Define to 1 if getpagesize() is available */
197 194
 #undef HAVE_GETPAGESIZE
198 195
 
... ...
@@ -275,9 +269,6 @@
275 275
 /* Define to 1 if you have the <ndir.h> header file. */
276 276
 #undef HAVE_NDIR_H
277 277
 
278
-/* Define to 1 if you have the <net/if_dl.h> header file */
279
-#undef HAVE_NET_IF_DL_H
280
-
281 278
 /* Define to 1 if you have the `opendir' function. */
282 279
 #undef HAVE_OPENDIR
283 280
 
... ...
@@ -374,9 +365,6 @@
374 374
 /* Define to 1 if sysconf(_SC_PAGESIZE) is available */
375 375
 #undef HAVE_SYSCONF_SC_PAGESIZE
376 376
 
377
-/* Define to 1 if you have the `sysctlbyname' function. */
378
-#undef HAVE_SYSCTLBYNAME
379
-
380 377
 /* Define to 1 if you have the <sys/dl.h> header file. */
381 378
 #undef HAVE_SYS_DL_H
382 379
 
... ...
@@ -526,6 +514,28 @@
526 526
 /* use syslog */
527 527
 #undef USE_SYSLOG
528 528
 
529
+/* Enable extensions on AIX 3, Interix.  */
530
+#ifndef _ALL_SOURCE
531
+# undef _ALL_SOURCE
532
+#endif
533
+/* Enable GNU extensions on systems that have them.  */
534
+#ifndef _GNU_SOURCE
535
+# undef _GNU_SOURCE
536
+#endif
537
+/* Enable threading extensions on Solaris.  */
538
+#ifndef _POSIX_PTHREAD_SEMANTICS
539
+# undef _POSIX_PTHREAD_SEMANTICS
540
+#endif
541
+/* Enable extensions on HP NonStop.  */
542
+#ifndef _TANDEM_SOURCE
543
+# undef _TANDEM_SOURCE
544
+#endif
545
+/* Enable general extensions on Solaris.  */
546
+#ifndef __EXTENSIONS__
547
+# undef __EXTENSIONS__
548
+#endif
549
+
550
+
529 551
 /* Version number of package */
530 552
 #undef VERSION
531 553
 
... ...
@@ -547,9 +557,19 @@
547 547
 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
548 548
 #undef _LARGEFILE_SOURCE
549 549
 
550
+/* Define to 1 if on MINIX. */
551
+#undef _MINIX
552
+
553
+/* Define to 2 if the system does not provide POSIX.1 features except with
554
+   this defined. */
555
+#undef _POSIX_1_SOURCE
556
+
550 557
 /* POSIX compatibility */
551 558
 #undef _POSIX_PII_SOCKET
552 559
 
560
+/* Define to 1 if you need to in order for `stat' and other things to work. */
561
+#undef _POSIX_SOURCE
562
+
553 563
 /* thread safe */
554 564
 #undef _REENTRANT
555 565
 
... ...
@@ -85,6 +85,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
85 85
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
86 86
 	$(top_srcdir)/m4/lt~obsolete.m4 \
87 87
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
88
+	$(top_srcdir)/m4/reorganization/version.m4 \
89
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
90
+	$(top_srcdir)/m4/reorganization/headers.m4 \
91
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
92
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
97
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
100
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
105
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
108
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
110
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
111
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
112
+	$(top_srcdir)/m4/reorganization/debug.m4 \
113
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
114
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
115
+	$(top_srcdir)/m4/reorganization/dns.m4 \
116
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
117
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
121
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
122
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
126
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
127
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
132
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
133
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
134
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
135
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
136
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
137
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
140
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
141
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
88 142
 	$(top_srcdir)/configure.ac
89 143
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
90 144
 	$(ACLOCAL_M4)
... ...
@@ -200,9 +254,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
200 200
 CHECK_LIBS = @CHECK_LIBS@
201 201
 CLAMAVGROUP = @CLAMAVGROUP@
202 202
 CLAMAVUSER = @CLAMAVUSER@
203
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
203 204
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
205
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
206
+CLAMBC_LIBS = @CLAMBC_LIBS@
207
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
208
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
204 209
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
210
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
211
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
212
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
205 213
 CLAMD_LIBS = @CLAMD_LIBS@
214
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
215
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
216
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
217
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
206 218
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
207 219
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
208 220
 CPP = @CPP@
... ...
@@ -222,6 +288,7 @@ ECHO_T = @ECHO_T@
222 222
 EGREP = @EGREP@
223 223
 EXEEXT = @EXEEXT@
224 224
 FGREP = @FGREP@
225
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
225 226
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
226 227
 GCOV = @GCOV@
227 228
 GENHTML = @GENHTML@
... ...
@@ -243,8 +310,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
243 243
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
244 244
 LIBBZ2 = @LIBBZ2@
245 245
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
246
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
246 247
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
247 248
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
249
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
248 250
 LIBLTDL = @LIBLTDL@
249 251
 LIBM = @LIBM@
250 252
 LIBOBJS = @LIBOBJS@
... ...
@@ -282,6 +351,7 @@ RANLIB = @RANLIB@
282 282
 SED = @SED@
283 283
 SET_MAKE = @SET_MAKE@
284 284
 SHELL = @SHELL@
285
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
285 286
 STRIP = @STRIP@
286 287
 THREAD_LIBS = @THREAD_LIBS@
287 288
 TH_SAFE = @TH_SAFE@
... ...
@@ -66,6 +66,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
66 66
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
67 67
 	$(top_srcdir)/m4/lt~obsolete.m4 \
68 68
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
69
+	$(top_srcdir)/m4/reorganization/version.m4 \
70
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
71
+	$(top_srcdir)/m4/reorganization/headers.m4 \
72
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
73
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
74
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
75
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
76
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
77
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
78
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
79
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
80
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
81
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
82
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
83
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
84
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
85
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
86
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
87
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
88
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
89
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
90
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
91
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
92
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
93
+	$(top_srcdir)/m4/reorganization/debug.m4 \
94
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
95
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
96
+	$(top_srcdir)/m4/reorganization/dns.m4 \
97
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
98
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
99
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
102
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
103
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
108
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
109
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
110
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
111
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
112
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
113
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
114
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
115
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
116
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
117
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
118
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
119
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
120
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
121
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
122
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
69 123
 	$(top_srcdir)/configure.ac
70 124
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
71 125
 	$(ACLOCAL_M4)
... ...
@@ -136,9 +190,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
136 136
 CHECK_LIBS = @CHECK_LIBS@
137 137
 CLAMAVGROUP = @CLAMAVGROUP@
138 138
 CLAMAVUSER = @CLAMAVUSER@
139
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
139 140
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
141
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
142
+CLAMBC_LIBS = @CLAMBC_LIBS@
143
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
144
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
140 145
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
146
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
147
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
148
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
141 149
 CLAMD_LIBS = @CLAMD_LIBS@
150
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
151
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
152
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
153
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
142 154
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
143 155
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
144 156
 CPP = @CPP@
... ...
@@ -158,6 +224,7 @@ ECHO_T = @ECHO_T@
158 158
 EGREP = @EGREP@
159 159
 EXEEXT = @EXEEXT@
160 160
 FGREP = @FGREP@
161
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
161 162
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
162 163
 GCOV = @GCOV@
163 164
 GENHTML = @GENHTML@
... ...
@@ -179,8 +246,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
179 179
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
180 180
 LIBBZ2 = @LIBBZ2@
181 181
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
182
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
182 183
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
183 184
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
185
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
184 186
 LIBLTDL = @LIBLTDL@
185 187
 LIBM = @LIBM@
186 188
 LIBOBJS = @LIBOBJS@
... ...
@@ -218,6 +287,7 @@ RANLIB = @RANLIB@
218 218
 SED = @SED@
219 219
 SET_MAKE = @SET_MAKE@
220 220
 SHELL = @SHELL@
221
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
221 222
 STRIP = @STRIP@
222 223
 THREAD_LIBS = @THREAD_LIBS@
223 224
 TH_SAFE = @TH_SAFE@
... ...
@@ -27,6 +27,11 @@
27 27
 #include <sys/time.h>
28 28
 #endif
29 29
 #include <stdlib.h>
30
+
31
+#include <openssl/ssl.h>
32
+#include <openssl/err.h>
33
+#include "libclamav/crypto.h"
34
+
30 35
 #include "bytecode.h"
31 36
 #include "bytecode_priv.h"
32 37
 #include "clamav.h"
... ...
@@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
84 84
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
85 85
 	$(top_srcdir)/m4/lt~obsolete.m4 \
86 86
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
87
+	$(top_srcdir)/m4/reorganization/version.m4 \
88
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
89
+	$(top_srcdir)/m4/reorganization/headers.m4 \
90
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
91
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
92
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
97
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
104
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
108
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
110
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
111
+	$(top_srcdir)/m4/reorganization/debug.m4 \
112
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
113
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
114
+	$(top_srcdir)/m4/reorganization/dns.m4 \
115
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
116
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
117
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
121
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
126
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
127
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
132
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
133
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
134
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
135
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
136
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
137
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
140
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
87 141
 	$(top_srcdir)/configure.ac
88 142
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 143
 	$(ACLOCAL_M4)
... ...
@@ -154,9 +208,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
154 154
 CHECK_LIBS = @CHECK_LIBS@
155 155
 CLAMAVGROUP = @CLAMAVGROUP@
156 156
 CLAMAVUSER = @CLAMAVUSER@
157
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
157 158
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
159
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
160
+CLAMBC_LIBS = @CLAMBC_LIBS@
161
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
162
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
158 163
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
164
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
165
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
166
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
159 167
 CLAMD_LIBS = @CLAMD_LIBS@
168
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
169
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
170
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
171
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
160 172
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
161 173
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
162 174
 CPP = @CPP@
... ...
@@ -176,6 +242,7 @@ ECHO_T = @ECHO_T@
176 176
 EGREP = @EGREP@
177 177
 EXEEXT = @EXEEXT@
178 178
 FGREP = @FGREP@
179
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
179 180
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
180 181
 GCOV = @GCOV@
181 182
 GENHTML = @GENHTML@
... ...
@@ -197,8 +264,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
197 197
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
198 198
 LIBBZ2 = @LIBBZ2@
199 199
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
200
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
200 201
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
201 202
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
203
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
202 204
 LIBLTDL = @LIBLTDL@
203 205
 LIBM = @LIBM@
204 206
 LIBOBJS = @LIBOBJS@
... ...
@@ -236,6 +305,7 @@ RANLIB = @RANLIB@
236 236
 SED = @SED@
237 237
 SET_MAKE = @SET_MAKE@
238 238
 SHELL = @SHELL@
239
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
239 240
 STRIP = @STRIP@
240 241
 THREAD_LIBS = @THREAD_LIBS@
241 242
 TH_SAFE = @TH_SAFE@
... ...
@@ -35,6 +35,10 @@
35 35
 #include <sys/stat.h>
36 36
 #include <dirent.h>
37 37
 
38
+#include <openssl/ssl.h>
39
+#include <openssl/err.h>
40
+#include "libclamav/crypto.h"
41
+
38 42
 #include "shared/optparser.h"
39 43
 #include "shared/misc.h"
40 44
 
... ...
@@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
84 84
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
85 85
 	$(top_srcdir)/m4/lt~obsolete.m4 \
86 86
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
87
+	$(top_srcdir)/m4/reorganization/version.m4 \
88
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
89
+	$(top_srcdir)/m4/reorganization/headers.m4 \
90
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
91
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
92
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
97
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
104
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
108
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
110
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
111
+	$(top_srcdir)/m4/reorganization/debug.m4 \
112
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
113
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
114
+	$(top_srcdir)/m4/reorganization/dns.m4 \
115
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
116
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
117
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
121
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
126
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
127
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
132
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
133
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
134
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
135
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
136
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
137
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
140
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
87 141
 	$(top_srcdir)/configure.ac
88 142
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 143
 	$(ACLOCAL_M4)
... ...
@@ -167,9 +221,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
167 167
 CHECK_LIBS = @CHECK_LIBS@
168 168
 CLAMAVGROUP = @CLAMAVGROUP@
169 169
 CLAMAVUSER = @CLAMAVUSER@
170
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
170 171
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
172
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
173
+CLAMBC_LIBS = @CLAMBC_LIBS@
174
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
175
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
171 176
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
177
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
178
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
179
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
172 180
 CLAMD_LIBS = @CLAMD_LIBS@
181
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
182
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
183
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
184
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
173 185
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
174 186
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
175 187
 CPP = @CPP@
... ...
@@ -189,6 +255,7 @@ ECHO_T = @ECHO_T@
189 189
 EGREP = @EGREP@
190 190
 EXEEXT = @EXEEXT@
191 191
 FGREP = @FGREP@
192
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
192 193
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
193 194
 GCOV = @GCOV@
194 195
 GENHTML = @GENHTML@
... ...
@@ -210,8 +277,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
210 210
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
211 211
 LIBBZ2 = @LIBBZ2@
212 212
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
213
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
213 214
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
214 215
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
216
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
215 217
 LIBLTDL = @LIBLTDL@
216 218
 LIBM = @LIBM@
217 219
 LIBOBJS = @LIBOBJS@
... ...
@@ -249,6 +318,7 @@ RANLIB = @RANLIB@
249 249
 SED = @SED@
250 250
 SET_MAKE = @SET_MAKE@
251 251
 SHELL = @SHELL@
252
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
252 253
 STRIP = @STRIP@
253 254
 THREAD_LIBS = @THREAD_LIBS@
254 255
 TH_SAFE = @TH_SAFE@
... ...
@@ -53,6 +53,10 @@
53 53
 #include <sys/resource.h>
54 54
 #endif
55 55
 
56
+#include <openssl/ssl.h>
57
+#include <openssl/err.h>
58
+#include "libclamav/crypto.h"
59
+
56 60
 #include "target.h"
57 61
 
58 62
 #include "libclamav/clamav.h"
... ...
@@ -35,6 +35,11 @@
35 35
 #include <errno.h>
36 36
 
37 37
 #include <sys/fanotify.h>
38
+
39
+#include <openssl/ssl.h>
40
+#include <openssl/err.h>
41
+#include "libclamav/crypto.h"
42
+
38 43
 #include "fan.h"
39 44
 
40 45
 #include "libclamav/clamav.h"
... ...
@@ -65,6 +65,10 @@
65 65
 #endif /* HAVE_POLL_H */
66 66
 #endif /* HAVE_POLL */
67 67
 
68
+#include <openssl/ssl.h>
69
+#include <openssl/err.h>
70
+#include "libclamav/crypto.h"
71
+
68 72
 #include <limits.h>
69 73
 #include "shared/optparser.h"
70 74
 #include "shared/output.h"
... ...
@@ -49,6 +49,10 @@
49 49
 #include <stddef.h>
50 50
 #endif
51 51
 
52
+#include <openssl/ssl.h>
53
+#include <openssl/err.h>
54
+#include "libclamav/crypto.h"
55
+
52 56
 #include "libclamav/clamav.h"
53 57
 #include "libclamav/others.h"
54 58
 #include "libclamav/scanners.h"
... ...
@@ -40,6 +40,10 @@
40 40
 #include <unistd.h>
41 41
 #endif
42 42
 
43
+#include <openssl/ssl.h>
44
+#include <openssl/err.h>
45
+#include "libclamav/crypto.h"
46
+
43 47
 #include <fcntl.h>
44 48
 #ifdef C_SOLARIS
45 49
 #include <stdio_ext.h>
... ...
@@ -49,6 +49,10 @@
49 49
 #include <stddef.h>
50 50
 #include <limits.h>
51 51
 
52
+#include <openssl/ssl.h>
53
+#include <openssl/err.h>
54
+#include "libclamav/crypto.h"
55
+
52 56
 #include "libclamav/clamav.h"
53 57
 #include "libclamav/str.h"
54 58
 #include "libclamav/others.h"
... ...
@@ -29,6 +29,10 @@
29 29
 #include <errno.h>
30 30
 #include <string.h>
31 31
 
32
+#include <openssl/ssl.h>
33
+#include <openssl/err.h>
34
+#include "libclamav/crypto.h"
35
+
32 36
 #include "shared/output.h"
33 37
 
34 38
 #include "thrmgr.h"
... ...
@@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
84 84
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
85 85
 	$(top_srcdir)/m4/lt~obsolete.m4 \
86 86
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
87
+	$(top_srcdir)/m4/reorganization/version.m4 \
88
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
89
+	$(top_srcdir)/m4/reorganization/headers.m4 \
90
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
91
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
92
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
97
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
104
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
108
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
110
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
111
+	$(top_srcdir)/m4/reorganization/debug.m4 \
112
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
113
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
114
+	$(top_srcdir)/m4/reorganization/dns.m4 \
115
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
116
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
117
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
121
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
126
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
127
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
132
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
133
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
134
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
135
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
136
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
137
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
140
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
87 141
 	$(top_srcdir)/configure.ac
88 142
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 143
 	$(ACLOCAL_M4)
... ...
@@ -165,9 +219,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
165 165
 CHECK_LIBS = @CHECK_LIBS@
166 166
 CLAMAVGROUP = @CLAMAVGROUP@
167 167
 CLAMAVUSER = @CLAMAVUSER@
168
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
168 169
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
170
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
171
+CLAMBC_LIBS = @CLAMBC_LIBS@
172
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
173
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
169 174
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
175
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
176
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
177
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
170 178
 CLAMD_LIBS = @CLAMD_LIBS@
179
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
180
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
181
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
182
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
171 183
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
172 184
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
173 185
 CPP = @CPP@
... ...
@@ -187,6 +253,7 @@ ECHO_T = @ECHO_T@
187 187
 EGREP = @EGREP@
188 188
 EXEEXT = @EXEEXT@
189 189
 FGREP = @FGREP@
190
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
190 191
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
191 192
 GCOV = @GCOV@
192 193
 GENHTML = @GENHTML@
... ...
@@ -208,8 +275,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
208 208
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
209 209
 LIBBZ2 = @LIBBZ2@
210 210
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
211
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
211 212
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
212 213
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
214
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
213 215
 LIBLTDL = @LIBLTDL@
214 216
 LIBM = @LIBM@
215 217
 LIBOBJS = @LIBOBJS@
... ...
@@ -247,6 +316,7 @@ RANLIB = @RANLIB@
247 247
 SED = @SED@
248 248
 SET_MAKE = @SET_MAKE@
249 249
 SHELL = @SHELL@
250
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
250 251
 STRIP = @STRIP@
251 252
 THREAD_LIBS = @THREAD_LIBS@
252 253
 TH_SAFE = @TH_SAFE@
... ...
@@ -52,6 +52,10 @@
52 52
 #include <sys/uio.h>
53 53
 #endif
54 54
 
55
+#include <openssl/ssl.h>
56
+#include <openssl/err.h>
57
+#include "libclamav/crypto.h"
58
+
55 59
 #include "shared/optparser.h"
56 60
 #include "shared/output.h"
57 61
 #include "shared/misc.h"
... ...
@@ -43,6 +43,10 @@
43 43
 #include <sys/socket.h>
44 44
 #endif
45 45
 
46
+#include <openssl/ssl.h>
47
+#include <openssl/err.h>
48
+#include "libclamav/crypto.h"
49
+
46 50
 #include "libclamav/others.h"
47 51
 #include "shared/actions.h"
48 52
 #include "shared/output.h"
... ...
@@ -66,6 +66,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
66 66
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
67 67
 	$(top_srcdir)/m4/lt~obsolete.m4 \
68 68
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
69
+	$(top_srcdir)/m4/reorganization/version.m4 \
70
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
71
+	$(top_srcdir)/m4/reorganization/headers.m4 \
72
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
73
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
74
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
75
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
76
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
77
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
78
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
79
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
80
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
81
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
82
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
83
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
84
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
85
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
86
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
87
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
88
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
89
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
90
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
91
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
92
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
93
+	$(top_srcdir)/m4/reorganization/debug.m4 \
94
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
95
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
96
+	$(top_srcdir)/m4/reorganization/dns.m4 \
97
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
98
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
99
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
102
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
103
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
108
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
109
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
110
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
111
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
112
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
113
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
114
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
115
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
116
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
117
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
118
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
119
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
120
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
121
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
122
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
69 123
 	$(top_srcdir)/configure.ac
70 124
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
71 125
 	$(ACLOCAL_M4)
... ...
@@ -171,9 +225,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
171 171
 CHECK_LIBS = @CHECK_LIBS@
172 172
 CLAMAVGROUP = @CLAMAVGROUP@
173 173
 CLAMAVUSER = @CLAMAVUSER@
174
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
174 175
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
176
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
177
+CLAMBC_LIBS = @CLAMBC_LIBS@
178
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
179
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
175 180
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
181
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
182
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
183
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
176 184
 CLAMD_LIBS = @CLAMD_LIBS@
185
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
186
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
187
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
188
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
177 189
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
178 190
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
179 191
 CPP = @CPP@
... ...
@@ -193,6 +259,7 @@ ECHO_T = @ECHO_T@
193 193
 EGREP = @EGREP@
194 194
 EXEEXT = @EXEEXT@
195 195
 FGREP = @FGREP@
196
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
196 197
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
197 198
 GCOV = @GCOV@
198 199
 GENHTML = @GENHTML@
... ...
@@ -214,8 +281,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
214 214
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
215 215
 LIBBZ2 = @LIBBZ2@
216 216
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
217
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
217 218
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
218 219
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
220
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
219 221
 LIBLTDL = @LIBLTDL@
220 222
 LIBM = @LIBM@
221 223
 LIBOBJS = @LIBOBJS@
... ...
@@ -253,6 +322,7 @@ RANLIB = @RANLIB@
253 253
 SED = @SED@
254 254
 SET_MAKE = @SET_MAKE@
255 255
 SHELL = @SHELL@
256
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
256 257
 STRIP = @STRIP@
257 258
 THREAD_LIBS = @THREAD_LIBS@
258 259
 TH_SAFE = @TH_SAFE@
... ...
@@ -85,6 +85,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
85 85
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
86 86
 	$(top_srcdir)/m4/lt~obsolete.m4 \
87 87
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
88
+	$(top_srcdir)/m4/reorganization/version.m4 \
89
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
90
+	$(top_srcdir)/m4/reorganization/headers.m4 \
91
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
92
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
97
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
100
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
105
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
108
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
110
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
111
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
112
+	$(top_srcdir)/m4/reorganization/debug.m4 \
113
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
114
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
115
+	$(top_srcdir)/m4/reorganization/dns.m4 \
116
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
117
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
121
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
122
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
126
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
127
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
132
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
133
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
134
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
135
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
136
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
137
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
140
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
141
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
88 142
 	$(top_srcdir)/configure.ac
89 143
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
90 144
 	$(ACLOCAL_M4)
... ...
@@ -156,9 +210,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
156 156
 CHECK_LIBS = @CHECK_LIBS@
157 157
 CLAMAVGROUP = @CLAMAVGROUP@
158 158
 CLAMAVUSER = @CLAMAVUSER@
159
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
159 160
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
161
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
162
+CLAMBC_LIBS = @CLAMBC_LIBS@
163
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
164
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
160 165
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
166
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
167
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
168
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
161 169
 CLAMD_LIBS = @CLAMD_LIBS@
170
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
171
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
172
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
173
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
162 174
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
163 175
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
164 176
 CPP = @CPP@
... ...
@@ -178,6 +244,7 @@ ECHO_T = @ECHO_T@
178 178
 EGREP = @EGREP@
179 179
 EXEEXT = @EXEEXT@
180 180
 FGREP = @FGREP@
181
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
181 182
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
182 183
 GCOV = @GCOV@
183 184
 GENHTML = @GENHTML@
... ...
@@ -199,8 +266,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
199 199
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
200 200
 LIBBZ2 = @LIBBZ2@
201 201
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
202
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
202 203
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
203 204
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
205
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
204 206
 LIBLTDL = @LIBLTDL@
205 207
 LIBM = @LIBM@
206 208
 LIBOBJS = @LIBOBJS@
... ...
@@ -238,6 +307,7 @@ RANLIB = @RANLIB@
238 238
 SED = @SED@
239 239
 SET_MAKE = @SET_MAKE@
240 240
 SHELL = @SHELL@
241
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
241 242
 STRIP = @STRIP@
242 243
 THREAD_LIBS = @THREAD_LIBS@
243 244
 TH_SAFE = @TH_SAFE@
... ...
@@ -38,6 +38,10 @@
38 38
 #include <sys/resource.h>
39 39
 #endif
40 40
 
41
+#include <openssl/ssl.h>
42
+#include <openssl/err.h>
43
+#include "libclamav/crypto.h"
44
+
41 45
 #include "others.h"
42 46
 #include "global.h"
43 47
 #include "manager.h"
... ...
@@ -48,6 +48,10 @@
48 48
 #include <errno.h>
49 49
 #include <target.h>
50 50
 
51
+#include <openssl/ssl.h>
52
+#include <openssl/err.h>
53
+#include "libclamav/crypto.h"
54
+
51 55
 #include "manager.h"
52 56
 #include "global.h"
53 57
 
... ...
@@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
84 84
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
85 85
 	$(top_srcdir)/m4/lt~obsolete.m4 \
86 86
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
87
+	$(top_srcdir)/m4/reorganization/version.m4 \
88
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
89
+	$(top_srcdir)/m4/reorganization/headers.m4 \
90
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
91
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
92
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
97
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
104
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
108
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
110
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
111
+	$(top_srcdir)/m4/reorganization/debug.m4 \
112
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
113
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
114
+	$(top_srcdir)/m4/reorganization/dns.m4 \
115
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
116
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
117
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
121
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
126
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
127
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
132
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
133
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
134
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
135
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
136
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
137
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
140
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
87 141
 	$(top_srcdir)/configure.ac
88 142
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 143
 	$(ACLOCAL_M4)
... ...
@@ -154,9 +208,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
154 154
 CHECK_LIBS = @CHECK_LIBS@
155 155
 CLAMAVGROUP = @CLAMAVGROUP@
156 156
 CLAMAVUSER = @CLAMAVUSER@
157
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
157 158
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
159
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
160
+CLAMBC_LIBS = @CLAMBC_LIBS@
161
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
162
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
158 163
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
164
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
165
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
166
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
159 167
 CLAMD_LIBS = @CLAMD_LIBS@
168
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
169
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
170
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
171
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
160 172
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
161 173
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
162 174
 CPP = @CPP@
... ...
@@ -176,6 +242,7 @@ ECHO_T = @ECHO_T@
176 176
 EGREP = @EGREP@
177 177
 EXEEXT = @EXEEXT@
178 178
 FGREP = @FGREP@
179
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
179 180
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
180 181
 GCOV = @GCOV@
181 182
 GENHTML = @GENHTML@
... ...
@@ -197,8 +264,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
197 197
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
198 198
 LIBBZ2 = @LIBBZ2@
199 199
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
200
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
200 201
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
201 202
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
203
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
202 204
 LIBLTDL = @LIBLTDL@
203 205
 LIBM = @LIBM@
204 206
 LIBOBJS = @LIBOBJS@
... ...
@@ -236,6 +305,7 @@ RANLIB = @RANLIB@
236 236
 SED = @SED@
237 237
 SET_MAKE = @SET_MAKE@
238 238
 SHELL = @SHELL@
239
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
239 240
 STRIP = @STRIP@
240 241
 THREAD_LIBS = @THREAD_LIBS@
241 242
 TH_SAFE = @TH_SAFE@
... ...
@@ -3,6 +3,10 @@
3 3
 #include <unistd.h>
4 4
 #include <string.h>
5 5
 
6
+#include <openssl/ssl.h>
7
+#include <openssl/err.h>
8
+#include "libclamav/crypto.h"
9
+
6 10
 #include <curl/curl.h>
7 11
 
8 12
 #include "libclamav/clamav.h"
... ...
@@ -198,6 +198,7 @@ test -x / || exit 1"
198 198
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 199
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 200
   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201
+test \$(( 1 + 1 )) = 2 || exit 1
201 202
 
202 203
   test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
203 204
     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
... ...
@@ -205,8 +206,7 @@ test -x / || exit 1"
205 205
     ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206 206
     PATH=/empty FPATH=/empty; export PATH FPATH
207 207
     test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
208
-      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
209
-test \$(( 1 + 1 )) = 2 || exit 1"
208
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210 209
   if (eval "$as_required") 2>/dev/null; then :
211 210
   as_have_required=yes
212 211
 else
... ...
@@ -645,6 +645,33 @@ LTLIBOBJS
645 645
 LIBOBJS
646 646
 ENABLE_CLAMSUBMIT_FALSE
647 647
 ENABLE_CLAMSUBMIT_TRUE
648
+CLAMBC_LIBS
649
+CLAMDTOP_LIBS
650
+THREAD_LIBS
651
+TH_SAFE
652
+CLAMDSCAN_LIBS
653
+CLAMSCAN_LIBS
654
+FRESHCLAM_LIBS
655
+CLAMAV_MILTER_LIBS
656
+CLAMMEM_LIBS
657
+CLAMD_LIBS
658
+LIBCLAMAV_LIBS
659
+LIBCLAMSHARED_CPPFLAGS
660
+CLAMBC_CPPFLAGS
661
+CLAMDTOP_CPPFLAGS
662
+CLAMCONF_CPPFLAGS
663
+SIGTOOL_CPPFLAGS
664
+LIBCLAMAV_CPPFLAGS
665
+CLAMAV_MILTER_CPPFLAGS
666
+CLAMMEM_CPPFLAGS
667
+CLAMD_CPPFLAGS
668
+CLAMDSCAN_CPPFLAGS
669
+CLAMSCAN_CPPFLAGS
670
+FRESHCLAM_CPPFLAGS
671
+XML_LIBS
672
+XML_CPPFLAGS
673
+CLAMSUBMIT_CFLAGS
674
+CLAMSUBMIT_LIBS
648 675
 subdirs
649 676
 WERR_CFLAGS_MILTER
650 677
 WERR_CFLAGS
... ...
@@ -659,19 +686,8 @@ HAVE_MILTER_FALSE
659 659
 HAVE_MILTER_TRUE
660 660
 BUILD_CLAMD_FALSE
661 661
 BUILD_CLAMD_TRUE
662
-CLAMSUBMIT_CFLAGS
663
-CLAMSUBMIT_LIBS
664
-THREAD_LIBS
665
-TH_SAFE
666
-CLAMDSCAN_LIBS
667
-FRESHCLAM_LIBS
668
-CLAMAV_MILTER_LIBS
669
-CLAMD_LIBS
670
-LIBCLAMAV_LIBS
671 662
 CFGDIR
672 663
 DBDIR
673
-XML_LIBS
674
-XML_CPPFLAGS
675 664
 ENABLE_UNRAR_FALSE
676 665
 ENABLE_UNRAR_TRUE
677 666
 HAVE_LIBBZ2_FALSE
... ...
@@ -692,10 +708,10 @@ HAVE_LIBCHECK_TRUE
692 692
 CHECK_LIBS
693 693
 CHECK_CPPFLAGS
694 694
 BUILD_CONFIGURE_FLAGS
695
-GPERF
696 695
 VERSIONSCRIPT_FALSE
697 696
 VERSIONSCRIPT_TRUE
698 697
 VERSIONSCRIPTFLAG
698
+GPERF
699 699
 LIBM
700 700
 LTDLOPEN
701 701
 LT_CONFIG_H
... ...
@@ -715,7 +731,6 @@ INCLTDL
715 715
 LTDLINCL
716 716
 LTDLDEPS
717 717
 LIBLTDL
718
-CPP
719 718
 OTOOL64
720 719
 OTOOL
721 720
 LIPO
... ...
@@ -727,14 +742,19 @@ ac_ct_AR
727 727
 AR
728 728
 DLLTOOL
729 729
 OBJDUMP
730
+LN_S
730 731
 NM
731 732
 ac_ct_DUMPBIN
732 733
 DUMPBIN
733 734
 LD
734 735
 FGREP
735
-EGREP
736
-GREP
737 736
 SED
737
+LIBTOOL
738
+LIBCLAMAV_VERSION
739
+AM_BACKSLASH
740
+AM_DEFAULT_VERBOSITY
741
+AM_DEFAULT_V
742
+AM_V
738 743
 am__fastdepCC_FALSE
739 744
 am__fastdepCC_TRUE
740 745
 CCDEPMODE
... ...
@@ -745,20 +765,6 @@ AMDEP_TRUE
745 745
 am__quote
746 746
 am__include
747 747
 DEPDIR
748
-OBJEXT
749
-EXEEXT
750
-ac_ct_CC
751
-CPPFLAGS
752
-LDFLAGS
753
-CFLAGS
754
-CC
755
-LIBTOOL
756
-LN_S
757
-LIBCLAMAV_VERSION
758
-AM_BACKSLASH
759
-AM_DEFAULT_VERBOSITY
760
-AM_DEFAULT_V
761
-AM_V
762 748
 am__untar
763 749
 am__tar
764 750
 AMTAR
... ...
@@ -782,6 +788,16 @@ am__isrc
782 782
 INSTALL_DATA
783 783
 INSTALL_SCRIPT
784 784
 INSTALL_PROGRAM
785
+EGREP
786
+GREP
787
+CPP
788
+OBJEXT
789
+EXEEXT
790
+ac_ct_CC
791
+CPPFLAGS
792
+LDFLAGS
793
+CFLAGS
794
+CC
785 795
 target_os
786 796
 target_vendor
787 797
 target_cpu
... ...
@@ -835,12 +851,12 @@ SHELL'
835 835
 ac_subst_files=''
836 836
 ac_user_opts='
837 837
 enable_option_checking
838
+enable_dependency_tracking
838 839
 enable_silent_rules
839 840
 enable_static
840 841
 enable_shared
841 842
 with_pic
842 843
 enable_fast_install
843
-enable_dependency_tracking
844 844
 with_gnu_ld
845 845
 with_sysroot
846 846
 enable_libtool_lock
... ...
@@ -860,10 +876,7 @@ with_zlib
860 860
 enable_zlib_vcheck
861 861
 enable_bzip2
862 862
 with_libbz2_prefix
863
-with_libcurl
864 863
 enable_unrar
865
-enable_xml
866
-with_xml
867 864
 enable_getaddrinfo
868 865
 enable_ipv6
869 866
 enable_dns
... ...
@@ -876,8 +889,6 @@ enable_id_check
876 876
 enable_yp_check
877 877
 with_user
878 878
 with_group
879
-enable_clamav
880
-enable_debug
881 879
 with_version
882 880
 enable_no_cache
883 881
 enable_dns_fix
... ...
@@ -891,6 +902,10 @@ with_libpdcurses_prefix
891 891
 enable_distcheck_werror
892 892
 enable_llvm
893 893
 enable_sha_collector_for_internal_use
894
+with_libcurl
895
+enable_xml
896
+with_xml
897
+with_openssl
894 898
 '
895 899
       ac_precious_vars='build_alias
896 900
 host_alias
... ...
@@ -1521,14 +1536,14 @@ Optional Features:
1521 1521
   --disable-option-checking  ignore unrecognized --enable/--with options
1522 1522
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1523 1523
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1524
+  --disable-dependency-tracking  speeds up one-time build
1525
+  --enable-dependency-tracking   do not reject slow dependency extractors
1524 1526
   --enable-silent-rules          less verbose build output (undo: `make V=1')
1525 1527
   --disable-silent-rules         verbose build output (undo: `make V=0')
1526 1528
   --enable-static[=PKGS]  build static libraries [default=no]
1527 1529
   --enable-shared[=PKGS]  build shared libraries [default=yes]
1528 1530
   --enable-fast-install[=PKGS]
1529 1531
                           optimize for fast installation [default=yes]
1530
-  --disable-dependency-tracking  speeds up one-time build
1531
-  --enable-dependency-tracking   do not reject slow dependency extractors
1532 1532
   --disable-libtool-lock  avoid locking (might break parallel builds)
1533 1533
   --enable-ltdl-install   install libltdl
1534 1534
   --disable-gcc-vcheck	  do not check for buggy gcc version
... ...
@@ -1541,8 +1556,7 @@ Optional Features:
1541 1541
                           (and sometimes confusing) to the casual installer
1542 1542
   --disable-zlib-vcheck	  do not check for buggy zlib version
1543 1543
   --disable-bzip2	  disable bzip2 support
1544
-  --disable-unrar	  do not build libclamunrar and libclamunrar_iface
1545
-  --disable-xml	  disable DMG and XAR support
1544
+  --disable-unrar	  don't build libclamunrar and libclamunrar_iface
1546 1545
   --disable-getaddrinfo          disable support for getaddrinfo
1547 1546
   --disable-ipv6          disable IPv6 support
1548 1547
   --disable-dns           disable support for database verification through
... ...
@@ -1550,11 +1564,9 @@ Optional Features:
1550 1550
   --disable-fanotify	  disable fanotify support (Linux only)
1551 1551
   --enable-milter	  build clamav-milter
1552 1552
   --disable-pthreads      disable POSIX threads support
1553
-  --disable-cr		  do not link with C reentrant library (BSD)
1553
+  --disable-cr		  don't link with C reentrant library (BSD)
1554 1554
   --enable-id-check	  use id utility instead of /etc/passwd parsing
1555 1555
   --enable-yp-check	  use ypmatch utility instead of /etc/passwd parsing
1556
-  --disable-clamav	  disable test for clamav user/group
1557
-  --enable-debug	  enable debug code
1558 1556
   --enable-no-cache	  use "Cache-Control: no-cache" in freshclam
1559 1557
   --enable-dns-fix	  enable workaround for broken DNS servers (as in SpeedTouch 510)
1560 1558
   --enable-bigstack	  increase thread stack size
... ...
@@ -1565,6 +1577,7 @@ Optional Features:
1565 1565
                           enable warnings as error for distcheck [default=no]
1566 1566
   --enable-llvm           Enable 'llvm' JIT/verifier support [default=auto]
1567 1567
 
1568
+  --disable-xml	  disable DMG and XAR support
1568 1569
 
1569 1570
 Optional Packages:
1570 1571
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
... ...
@@ -1584,10 +1597,6 @@ Optional Packages:
1584 1584
 			  /usr/local or /usr if not found in /usr/local)
1585 1585
   --with-libbz2-prefix[=DIR]  search for libbz2 in DIR/include and DIR/lib
1586 1586
   --without-libbz2-prefix     don't search for libbz2 in includedir and libdir
1587
-  --with-libcurl=DIR   path to directory containing libcurl (default=
1588
-    /usr/local or /usr if not found in /usr/local)
1589
-  --with-xml=DIR	  path to directory containing libxml2 library (default=
1590
-			  /usr/local or /usr if not found in /usr/local)
1591 1587
   --with-iconv supports iconv() (default=auto)
1592 1588
   --with-user=uid	  name of the clamav user (default=clamav)
1593 1589
   --with-group=gid	  name of the clamav group (default=clamav)
... ...
@@ -1597,6 +1606,12 @@ Optional Packages:
1597 1597
   --without-libncurses-prefix     don't search for libncurses in includedir and libdir
1598 1598
   --with-libpdcurses-prefix[=DIR]  search for libpdcurses in DIR/include and DIR/lib
1599 1599
   --without-libpdcurses-prefix     don't search for libpdcurses in includedir and libdir
1600
+  --with-libcurl=DIR   path to directory containing libcurl (default=
1601
+    /usr/local or /usr if not found in /usr/local)
1602
+  --with-xml=DIR	  path to directory containing libxml2 library (default=
1603
+			  /usr/local or /usr if not found in /usr/local)
1604
+  --with-openssl=DIR   path to directory containing openssl (default=
1605
+    /usr/local or /usr if not found in /usr/local)
1600 1606
 
1601 1607
 Some influential environment variables:
1602 1608
   CC          C compiler command
... ...
@@ -1727,21 +1742,20 @@ fi
1727 1727
 
1728 1728
 } # ac_fn_c_try_compile
1729 1729
 
1730
-# ac_fn_c_try_link LINENO
1731
-# -----------------------
1732
-# Try to link conftest.$ac_ext, and return whether this succeeded.
1733
-ac_fn_c_try_link ()
1730
+# ac_fn_c_try_cpp LINENO
1731
+# ----------------------
1732
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1733
+ac_fn_c_try_cpp ()
1734 1734
 {
1735 1735
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1736
-  rm -f conftest.$ac_objext conftest$ac_exeext
1737
-  if { { ac_try="$ac_link"
1736
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
1738 1737
 case "(($ac_try" in
1739 1738
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1740 1739
   *) ac_try_echo=$ac_try;;
1741 1740
 esac
1742 1741
 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1743 1742
 $as_echo "$ac_try_echo"; } >&5
1744
-  (eval "$ac_link") 2>conftest.err
1743
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1745 1744
   ac_status=$?
1746 1745
   if test -s conftest.err; then
1747 1746
     grep -v '^ *+' conftest.err >conftest.er1
... ...
@@ -1749,97 +1763,112 @@ $as_echo "$ac_try_echo"; } >&5
1749 1749
     mv -f conftest.er1 conftest.err
1750 1750
   fi
1751 1751
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1752
-  test $ac_status = 0; } && {
1753
-	 test -z "$ac_c_werror_flag" ||
1752
+  test $ac_status = 0; } > conftest.i && {
1753
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1754 1754
 	 test ! -s conftest.err
1755
-       } && test -s conftest$ac_exeext && {
1756
-	 test "$cross_compiling" = yes ||
1757
-	 test -x conftest$ac_exeext
1758 1755
        }; then :
1759 1756
   ac_retval=0
1760 1757
 else
1761 1758
   $as_echo "$as_me: failed program was:" >&5
1762 1759
 sed 's/^/| /' conftest.$ac_ext >&5
1763 1760
 
1764
-	ac_retval=1
1761
+    ac_retval=1
1765 1762
 fi
1766
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1767
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1768
-  # interfere with the next link command; also delete a directory that is
1769
-  # left behind by Apple's compiler.  We do this before executing the actions.
1770
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1771 1763
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1772 1764
   as_fn_set_status $ac_retval
1773 1765
 
1774
-} # ac_fn_c_try_link
1766
+} # ac_fn_c_try_cpp
1775 1767
 
1776
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1768
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1777 1769
 # -------------------------------------------------------
1778
-# Tests whether HEADER exists and can be compiled using the include files in
1779
-# INCLUDES, setting the cache variable VAR accordingly.
1780
-ac_fn_c_check_header_compile ()
1770
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1771
+# the include files in INCLUDES and setting the cache variable VAR
1772
+# accordingly.
1773
+ac_fn_c_check_header_mongrel ()
1781 1774
 {
1782 1775
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776
+  if eval \${$3+:} false; then :
1783 1777
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1784 1778
 $as_echo_n "checking for $2... " >&6; }
1785 1779
 if eval \${$3+:} false; then :
1786 1780
   $as_echo_n "(cached) " >&6
1781
+fi
1782
+eval ac_res=\$$3
1783
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784
+$as_echo "$ac_res" >&6; }
1787 1785
 else
1788
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786
+  # Is the header compilable?
1787
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1788
+$as_echo_n "checking $2 usability... " >&6; }
1789
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1789 1790
 /* end confdefs.h.  */
1790 1791
 $4
1791 1792
 #include <$2>
1792 1793
 _ACEOF
1793 1794
 if ac_fn_c_try_compile "$LINENO"; then :
1794
-  eval "$3=yes"
1795
+  ac_header_compiler=yes
1795 1796
 else
1796
-  eval "$3=no"
1797
+  ac_header_compiler=no
1797 1798
 fi
1798 1799
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1799
-fi
1800
-eval ac_res=\$$3
1801
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1802
-$as_echo "$ac_res" >&6; }
1803
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1800
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1801
+$as_echo "$ac_header_compiler" >&6; }
1804 1802
 
1805
-} # ac_fn_c_check_header_compile
1803
+# Is the header present?
1804
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1805
+$as_echo_n "checking $2 presence... " >&6; }
1806
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807
+/* end confdefs.h.  */
1808
+#include <$2>
1809
+_ACEOF
1810
+if ac_fn_c_try_cpp "$LINENO"; then :
1811
+  ac_header_preproc=yes
1812
+else
1813
+  ac_header_preproc=no
1814
+fi
1815
+rm -f conftest.err conftest.i conftest.$ac_ext
1816
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1817
+$as_echo "$ac_header_preproc" >&6; }
1806 1818
 
1807
-# ac_fn_c_try_cpp LINENO
1808
-# ----------------------
1809
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1810
-ac_fn_c_try_cpp ()
1811
-{
1812
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
1814
-case "(($ac_try" in
1815
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816
-  *) ac_try_echo=$ac_try;;
1819
+# So?  What about this header?
1820
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1821
+  yes:no: )
1822
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1823
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1824
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1825
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1826
+    ;;
1827
+  no:yes:* )
1828
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1829
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1830
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1831
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1832
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1833
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1834
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1835
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1836
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1838
+( $as_echo "## -------------------------------------- ##
1839
+## Report this to http://bugs.clamav.net/ ##
1840
+## -------------------------------------- ##"
1841
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
1842
+    ;;
1817 1843
 esac
1818
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819
-$as_echo "$ac_try_echo"; } >&5
1820
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821
-  ac_status=$?
1822
-  if test -s conftest.err; then
1823
-    grep -v '^ *+' conftest.err >conftest.er1
1824
-    cat conftest.er1 >&5
1825
-    mv -f conftest.er1 conftest.err
1826
-  fi
1827
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828
-  test $ac_status = 0; } > conftest.i && {
1829
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830
-	 test ! -s conftest.err
1831
-       }; then :
1832
-  ac_retval=0
1844
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845
+$as_echo_n "checking for $2... " >&6; }
1846
+if eval \${$3+:} false; then :
1847
+  $as_echo_n "(cached) " >&6
1833 1848
 else
1834
-  $as_echo "$as_me: failed program was:" >&5
1835
-sed 's/^/| /' conftest.$ac_ext >&5
1836
-
1837
-    ac_retval=1
1849
+  eval "$3=\$ac_header_compiler"
1850
+fi
1851
+eval ac_res=\$$3
1852
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853
+$as_echo "$ac_res" >&6; }
1838 1854
 fi
1839 1855
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840
-  as_fn_set_status $ac_retval
1841 1856
 
1842
-} # ac_fn_c_try_cpp
1857
+} # ac_fn_c_check_header_mongrel
1843 1858
 
1844 1859
 # ac_fn_c_try_run LINENO
1845 1860
 # ----------------------
... ...
@@ -1883,6 +1912,83 @@ fi
1883 1883
 
1884 1884
 } # ac_fn_c_try_run
1885 1885
 
1886
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1887
+# -------------------------------------------------------
1888
+# Tests whether HEADER exists and can be compiled using the include files in
1889
+# INCLUDES, setting the cache variable VAR accordingly.
1890
+ac_fn_c_check_header_compile ()
1891
+{
1892
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894
+$as_echo_n "checking for $2... " >&6; }
1895
+if eval \${$3+:} false; then :
1896
+  $as_echo_n "(cached) " >&6
1897
+else
1898
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899
+/* end confdefs.h.  */
1900
+$4
1901
+#include <$2>
1902
+_ACEOF
1903
+if ac_fn_c_try_compile "$LINENO"; then :
1904
+  eval "$3=yes"
1905
+else
1906
+  eval "$3=no"
1907
+fi
1908
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909
+fi
1910
+eval ac_res=\$$3
1911
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1912
+$as_echo "$ac_res" >&6; }
1913
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1914
+
1915
+} # ac_fn_c_check_header_compile
1916
+
1917
+# ac_fn_c_try_link LINENO
1918
+# -----------------------
1919
+# Try to link conftest.$ac_ext, and return whether this succeeded.
1920
+ac_fn_c_try_link ()
1921
+{
1922
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1923
+  rm -f conftest.$ac_objext conftest$ac_exeext
1924
+  if { { ac_try="$ac_link"
1925
+case "(($ac_try" in
1926
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1927
+  *) ac_try_echo=$ac_try;;
1928
+esac
1929
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1930
+$as_echo "$ac_try_echo"; } >&5
1931
+  (eval "$ac_link") 2>conftest.err
1932
+  ac_status=$?
1933
+  if test -s conftest.err; then
1934
+    grep -v '^ *+' conftest.err >conftest.er1
1935
+    cat conftest.er1 >&5
1936
+    mv -f conftest.er1 conftest.err
1937
+  fi
1938
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1939
+  test $ac_status = 0; } && {
1940
+	 test -z "$ac_c_werror_flag" ||
1941
+	 test ! -s conftest.err
1942
+       } && test -s conftest$ac_exeext && {
1943
+	 test "$cross_compiling" = yes ||
1944
+	 test -x conftest$ac_exeext
1945
+       }; then :
1946
+  ac_retval=0
1947
+else
1948
+  $as_echo "$as_me: failed program was:" >&5
1949
+sed 's/^/| /' conftest.$ac_ext >&5
1950
+
1951
+	ac_retval=1
1952
+fi
1953
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1954
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1955
+  # interfere with the next link command; also delete a directory that is
1956
+  # left behind by Apple's compiler.  We do this before executing the actions.
1957
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1958
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1959
+  as_fn_set_status $ac_retval
1960
+
1961
+} # ac_fn_c_try_link
1962
+
1886 1963
 # ac_fn_c_check_func LINENO FUNC VAR
1887 1964
 # ----------------------------------
1888 1965
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
... ...
@@ -2049,97 +2155,6 @@ $as_echo "$ac_res" >&6; }
2049 2049
   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2050 2050
 
2051 2051
 } # ac_fn_c_check_type
2052
-
2053
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2054
-# -------------------------------------------------------
2055
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2056
-# the include files in INCLUDES and setting the cache variable VAR
2057
-# accordingly.
2058
-ac_fn_c_check_header_mongrel ()
2059
-{
2060
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2061
-  if eval \${$3+:} false; then :
2062
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2063
-$as_echo_n "checking for $2... " >&6; }
2064
-if eval \${$3+:} false; then :
2065
-  $as_echo_n "(cached) " >&6
2066
-fi
2067
-eval ac_res=\$$3
2068
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069
-$as_echo "$ac_res" >&6; }
2070
-else
2071
-  # Is the header compilable?
2072
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2073
-$as_echo_n "checking $2 usability... " >&6; }
2074
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075
-/* end confdefs.h.  */
2076
-$4
2077
-#include <$2>
2078
-_ACEOF
2079
-if ac_fn_c_try_compile "$LINENO"; then :
2080
-  ac_header_compiler=yes
2081
-else
2082
-  ac_header_compiler=no
2083
-fi
2084
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2086
-$as_echo "$ac_header_compiler" >&6; }
2087
-
2088
-# Is the header present?
2089
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2090
-$as_echo_n "checking $2 presence... " >&6; }
2091
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092
-/* end confdefs.h.  */
2093
-#include <$2>
2094
-_ACEOF
2095
-if ac_fn_c_try_cpp "$LINENO"; then :
2096
-  ac_header_preproc=yes
2097
-else
2098
-  ac_header_preproc=no
2099
-fi
2100
-rm -f conftest.err conftest.i conftest.$ac_ext
2101
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2102
-$as_echo "$ac_header_preproc" >&6; }
2103
-
2104
-# So?  What about this header?
2105
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2106
-  yes:no: )
2107
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2108
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2109
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2110
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2111
-    ;;
2112
-  no:yes:* )
2113
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2114
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2115
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2116
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2117
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2118
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2119
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2120
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2121
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2122
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2123
-( $as_echo "## -------------------------------------- ##
2124
-## Report this to http://bugs.clamav.net/ ##
2125
-## -------------------------------------- ##"
2126
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
2127
-    ;;
2128
-esac
2129
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2130
-$as_echo_n "checking for $2... " >&6; }
2131
-if eval \${$3+:} false; then :
2132
-  $as_echo_n "(cached) " >&6
2133
-else
2134
-  eval "$3=\$ac_header_compiler"
2135
-fi
2136
-eval ac_res=\$$3
2137
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2138
-$as_echo "$ac_res" >&6; }
2139
-fi
2140
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2141
-
2142
-} # ac_fn_c_check_header_mongrel
2143 2052
 cat >config.log <<_ACEOF
2144 2053
 This file contains any messages produced by compilers while
2145 2054
 running configure, to aid debugging if configure makes a mistake.
... ...
@@ -2826,859 +2841,6 @@ do
2826 2826
 done
2827 2827
 
2828 2828
 
2829
-
2830
-am__api_version='1.11'
2831
-
2832
-# Find a good install program.  We prefer a C program (faster),
2833
-# so one script is as good as another.  But avoid the broken or
2834
-# incompatible versions:
2835
-# SysV /etc/install, /usr/sbin/install
2836
-# SunOS /usr/etc/install
2837
-# IRIX /sbin/install
2838
-# AIX /bin/install
2839
-# AmigaOS /C/install, which installs bootblocks on floppy discs
2840
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2841
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2842
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2843
-# OS/2's system install, which has a completely different semantic
2844
-# ./install, which can be erroneously created by make from ./install.sh.
2845
-# Reject install programs that cannot install multiple files.
2846
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2847
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
2848
-if test -z "$INSTALL"; then
2849
-if ${ac_cv_path_install+:} false; then :
2850
-  $as_echo_n "(cached) " >&6
2851
-else
2852
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2853
-for as_dir in $PATH
2854
-do
2855
-  IFS=$as_save_IFS
2856
-  test -z "$as_dir" && as_dir=.
2857
-    # Account for people who put trailing slashes in PATH elements.
2858
-case $as_dir/ in #((
2859
-  ./ | .// | /[cC]/* | \
2860
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2861
-  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2862
-  /usr/ucb/* ) ;;
2863
-  *)
2864
-    # OSF1 and SCO ODT 3.0 have their own names for install.
2865
-    # Don't use installbsd from OSF since it installs stuff as root
2866
-    # by default.
2867
-    for ac_prog in ginstall scoinst install; do
2868
-      for ac_exec_ext in '' $ac_executable_extensions; do
2869
-	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2870
-	  if test $ac_prog = install &&
2871
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2872
-	    # AIX install.  It has an incompatible calling convention.
2873
-	    :
2874
-	  elif test $ac_prog = install &&
2875
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2876
-	    # program-specific install script used by HP pwplus--don't use.
2877
-	    :
2878
-	  else
2879
-	    rm -rf conftest.one conftest.two conftest.dir
2880
-	    echo one > conftest.one
2881
-	    echo two > conftest.two
2882
-	    mkdir conftest.dir
2883
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2884
-	      test -s conftest.one && test -s conftest.two &&
2885
-	      test -s conftest.dir/conftest.one &&
2886
-	      test -s conftest.dir/conftest.two
2887
-	    then
2888
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2889
-	      break 3
2890
-	    fi
2891
-	  fi
2892
-	fi
2893
-      done
2894
-    done
2895
-    ;;
2896
-esac
2897
-
2898
-  done
2899
-IFS=$as_save_IFS
2900
-
2901
-rm -rf conftest.one conftest.two conftest.dir
2902
-
2903
-fi
2904
-  if test "${ac_cv_path_install+set}" = set; then
2905
-    INSTALL=$ac_cv_path_install
2906
-  else
2907
-    # As a last resort, use the slow shell script.  Don't cache a
2908
-    # value for INSTALL within a source directory, because that will
2909
-    # break other packages using the cache if that directory is
2910
-    # removed, or if the value is a relative name.
2911
-    INSTALL=$ac_install_sh
2912
-  fi
2913
-fi
2914
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2915
-$as_echo "$INSTALL" >&6; }
2916
-
2917
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2918
-# It thinks the first close brace ends the variable substitution.
2919
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2920
-
2921
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2922
-
2923
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2924
-
2925
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2926
-$as_echo_n "checking whether build environment is sane... " >&6; }
2927
-# Just in case
2928
-sleep 1
2929
-echo timestamp > conftest.file
2930
-# Reject unsafe characters in $srcdir or the absolute working directory
2931
-# name.  Accept space and tab only in the latter.
2932
-am_lf='
2933
-'
2934
-case `pwd` in
2935
-  *[\\\"\#\$\&\'\`$am_lf]*)
2936
-    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2937
-esac
2938
-case $srcdir in
2939
-  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
2940
-    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2941
-esac
2942
-
2943
-# Do `set' in a subshell so we don't clobber the current shell's
2944
-# arguments.  Must try -L first in case configure is actually a
2945
-# symlink; some systems play weird games with the mod time of symlinks
2946
-# (eg FreeBSD returns the mod time of the symlink's containing
2947
-# directory).
2948
-if (
2949
-   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2950
-   if test "$*" = "X"; then
2951
-      # -L didn't work.
2952
-      set X `ls -t "$srcdir/configure" conftest.file`
2953
-   fi
2954
-   rm -f conftest.file
2955
-   if test "$*" != "X $srcdir/configure conftest.file" \
2956
-      && test "$*" != "X conftest.file $srcdir/configure"; then
2957
-
2958
-      # If neither matched, then we have a broken ls.  This can happen
2959
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
2960
-      # broken ls alias from the environment.  This has actually
2961
-      # happened.  Such a system could not be considered "sane".
2962
-      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
2963
-alias in your environment" "$LINENO" 5
2964
-   fi
2965
-
2966
-   test "$2" = conftest.file
2967
-   )
2968
-then
2969
-   # Ok.
2970
-   :
2971
-else
2972
-   as_fn_error $? "newly created file is older than distributed files!
2973
-Check your system clock" "$LINENO" 5
2974
-fi
2975
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2976
-$as_echo "yes" >&6; }
2977
-test "$program_prefix" != NONE &&
2978
-  program_transform_name="s&^&$program_prefix&;$program_transform_name"
2979
-# Use a double $ so make ignores it.
2980
-test "$program_suffix" != NONE &&
2981
-  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2982
-# Double any \ or $.
2983
-# By default was `s,x,x', remove it if useless.
2984
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2985
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2986
-
2987
-# expand $ac_aux_dir to an absolute path
2988
-am_aux_dir=`cd $ac_aux_dir && pwd`
2989
-
2990
-if test x"${MISSING+set}" != xset; then
2991
-  case $am_aux_dir in
2992
-  *\ * | *\	*)
2993
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2994
-  *)
2995
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
2996
-  esac
2997
-fi
2998
-# Use eval to expand $SHELL
2999
-if eval "$MISSING --run true"; then
3000
-  am_missing_run="$MISSING --run "
3001
-else
3002
-  am_missing_run=
3003
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3004
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3005
-fi
3006
-
3007
-if test x"${install_sh}" != xset; then
3008
-  case $am_aux_dir in
3009
-  *\ * | *\	*)
3010
-    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3011
-  *)
3012
-    install_sh="\${SHELL} $am_aux_dir/install-sh"
3013
-  esac
3014
-fi
3015
-
3016
-# Installed binaries are usually stripped using `strip' when the user
3017
-# run `make install-strip'.  However `strip' might not be the right
3018
-# tool to use in cross-compilation environments, therefore Automake
3019
-# will honor the `STRIP' environment variable to overrule this program.
3020
-if test "$cross_compiling" != no; then
3021
-  if test -n "$ac_tool_prefix"; then
3022
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3023
-set dummy ${ac_tool_prefix}strip; ac_word=$2
3024
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3025
-$as_echo_n "checking for $ac_word... " >&6; }
3026
-if ${ac_cv_prog_STRIP+:} false; then :
3027
-  $as_echo_n "(cached) " >&6
3028
-else
3029
-  if test -n "$STRIP"; then
3030
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3031
-else
3032
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3033
-for as_dir in $PATH
3034
-do
3035
-  IFS=$as_save_IFS
3036
-  test -z "$as_dir" && as_dir=.
3037
-    for ac_exec_ext in '' $ac_executable_extensions; do
3038
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3039
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3040
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3041
-    break 2
3042
-  fi
3043
-done
3044
-  done
3045
-IFS=$as_save_IFS
3046
-
3047
-fi
3048
-fi
3049
-STRIP=$ac_cv_prog_STRIP
3050
-if test -n "$STRIP"; then
3051
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3052
-$as_echo "$STRIP" >&6; }
3053
-else
3054
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3055
-$as_echo "no" >&6; }
3056
-fi
3057
-
3058
-
3059
-fi
3060
-if test -z "$ac_cv_prog_STRIP"; then
3061
-  ac_ct_STRIP=$STRIP
3062
-  # Extract the first word of "strip", so it can be a program name with args.
3063
-set dummy strip; ac_word=$2
3064
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3065
-$as_echo_n "checking for $ac_word... " >&6; }
3066
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3067
-  $as_echo_n "(cached) " >&6
3068
-else
3069
-  if test -n "$ac_ct_STRIP"; then
3070
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3071
-else
3072
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3073
-for as_dir in $PATH
3074
-do
3075
-  IFS=$as_save_IFS
3076
-  test -z "$as_dir" && as_dir=.
3077
-    for ac_exec_ext in '' $ac_executable_extensions; do
3078
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3079
-    ac_cv_prog_ac_ct_STRIP="strip"
3080
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3081
-    break 2
3082
-  fi
3083
-done
3084
-  done
3085
-IFS=$as_save_IFS
3086
-
3087
-fi
3088
-fi
3089
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3090
-if test -n "$ac_ct_STRIP"; then
3091
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3092
-$as_echo "$ac_ct_STRIP" >&6; }
3093
-else
3094
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3095
-$as_echo "no" >&6; }
3096
-fi
3097
-
3098
-  if test "x$ac_ct_STRIP" = x; then
3099
-    STRIP=":"
3100
-  else
3101
-    case $cross_compiling:$ac_tool_warned in
3102
-yes:)
3103
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3104
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3105
-ac_tool_warned=yes ;;
3106
-esac
3107
-    STRIP=$ac_ct_STRIP
3108
-  fi
3109
-else
3110
-  STRIP="$ac_cv_prog_STRIP"
3111
-fi
3112
-
3113
-fi
3114
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3115
-
3116
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3117
-$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3118
-if test -z "$MKDIR_P"; then
3119
-  if ${ac_cv_path_mkdir+:} false; then :
3120
-  $as_echo_n "(cached) " >&6
3121
-else
3122
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3123
-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3124
-do
3125
-  IFS=$as_save_IFS
3126
-  test -z "$as_dir" && as_dir=.
3127
-    for ac_prog in mkdir gmkdir; do
3128
-	 for ac_exec_ext in '' $ac_executable_extensions; do
3129
-	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3130
-	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3131
-	     'mkdir (GNU coreutils) '* | \
3132
-	     'mkdir (coreutils) '* | \
3133
-	     'mkdir (fileutils) '4.1*)
3134
-	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3135
-	       break 3;;
3136
-	   esac
3137
-	 done
3138
-       done
3139
-  done
3140
-IFS=$as_save_IFS
3141
-
3142
-fi
3143
-
3144
-  test -d ./--version && rmdir ./--version
3145
-  if test "${ac_cv_path_mkdir+set}" = set; then
3146
-    MKDIR_P="$ac_cv_path_mkdir -p"
3147
-  else
3148
-    # As a last resort, use the slow shell script.  Don't cache a
3149
-    # value for MKDIR_P within a source directory, because that will
3150
-    # break other packages using the cache if that directory is
3151
-    # removed, or if the value is a relative name.
3152
-    MKDIR_P="$ac_install_sh -d"
3153
-  fi
3154
-fi
3155
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3156
-$as_echo "$MKDIR_P" >&6; }
3157
-
3158
-mkdir_p="$MKDIR_P"
3159
-case $mkdir_p in
3160
-  [\\/$]* | ?:[\\/]*) ;;
3161
-  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3162
-esac
3163
-
3164
-for ac_prog in gawk mawk nawk awk
3165
-do
3166
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
3167
-set dummy $ac_prog; ac_word=$2
3168
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3169
-$as_echo_n "checking for $ac_word... " >&6; }
3170
-if ${ac_cv_prog_AWK+:} false; then :
3171
-  $as_echo_n "(cached) " >&6
3172
-else
3173
-  if test -n "$AWK"; then
3174
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3175
-else
3176
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3177
-for as_dir in $PATH
3178
-do
3179
-  IFS=$as_save_IFS
3180
-  test -z "$as_dir" && as_dir=.
3181
-    for ac_exec_ext in '' $ac_executable_extensions; do
3182
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3183
-    ac_cv_prog_AWK="$ac_prog"
3184
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3185
-    break 2
3186
-  fi
3187
-done
3188
-  done
3189
-IFS=$as_save_IFS
3190
-
3191
-fi
3192
-fi
3193
-AWK=$ac_cv_prog_AWK
3194
-if test -n "$AWK"; then
3195
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3196
-$as_echo "$AWK" >&6; }
3197
-else
3198
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3199
-$as_echo "no" >&6; }
3200
-fi
3201
-
3202
-
3203
-  test -n "$AWK" && break
3204
-done
3205
-
3206
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3207
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3208
-set x ${MAKE-make}
3209
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3210
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3211
-  $as_echo_n "(cached) " >&6
3212
-else
3213
-  cat >conftest.make <<\_ACEOF
3214
-SHELL = /bin/sh
3215
-all:
3216
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
3217
-_ACEOF
3218
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3219
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
3220
-  *@@@%%%=?*=@@@%%%*)
3221
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
3222
-  *)
3223
-    eval ac_cv_prog_make_${ac_make}_set=no;;
3224
-esac
3225
-rm -f conftest.make
3226
-fi
3227
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3228
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3229
-$as_echo "yes" >&6; }
3230
-  SET_MAKE=
3231
-else
3232
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3233
-$as_echo "no" >&6; }
3234
-  SET_MAKE="MAKE=${MAKE-make}"
3235
-fi
3236
-
3237
-rm -rf .tst 2>/dev/null
3238
-mkdir .tst 2>/dev/null
3239
-if test -d .tst; then
3240
-  am__leading_dot=.
3241
-else
3242
-  am__leading_dot=_
3243
-fi
3244
-rmdir .tst 2>/dev/null
3245
-
3246
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
3247
-  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3248
-  # is not polluted with repeated "-I."
3249
-  am__isrc=' -I$(srcdir)'
3250
-  # test to see if srcdir already configured
3251
-  if test -f $srcdir/config.status; then
3252
-    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3253
-  fi
3254
-fi
3255
-
3256
-# test whether we have cygpath
3257
-if test -z "$CYGPATH_W"; then
3258
-  if (cygpath --version) >/dev/null 2>/dev/null; then
3259
-    CYGPATH_W='cygpath -w'
3260
-  else
3261
-    CYGPATH_W=echo
3262
-  fi
3263
-fi
3264
-
3265
-
3266
-# Define the identity of the package.
3267
- PACKAGE='clamav'
3268
- VERSION='devel'
3269
-
3270
-
3271
-# Some tools Automake needs.
3272
-
3273
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3274
-
3275
-
3276
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3277
-
3278
-
3279
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3280
-
3281
-
3282
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3283
-
3284
-
3285
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3286
-
3287
-# We need awk for the "check" target.  The system "awk" is bad on
3288
-# some platforms.
3289
-# Always define AMTAR for backward compatibility.  Yes, it's still used
3290
-# in the wild :-(  We should find a proper way to deprecate it ...
3291
-AMTAR='$${TAR-tar}'
3292
-
3293
-
3294
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
3295
-$as_echo_n "checking how to create a ustar tar archive... " >&6; }
3296
-# Loop over all known methods to create a tar archive until one works.
3297
-_am_tools='gnutar plaintar pax cpio none'
3298
-_am_tools=${am_cv_prog_tar_ustar-$_am_tools}
3299
-# Do not fold the above two line into one, because Tru64 sh and
3300
-# Solaris sh will not grok spaces in the rhs of `-'.
3301
-for _am_tool in $_am_tools
3302
-do
3303
-  case $_am_tool in
3304
-  gnutar)
3305
-    for _am_tar in tar gnutar gtar;
3306
-    do
3307
-      { echo "$as_me:$LINENO: $_am_tar --version" >&5
3308
-   ($_am_tar --version) >&5 2>&5
3309
-   ac_status=$?
3310
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3311
-   (exit $ac_status); } && break
3312
-    done
3313
-    am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
3314
-    am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
3315
-    am__untar="$_am_tar -xf -"
3316
-    ;;
3317
-  plaintar)
3318
-    # Must skip GNU tar: if it does not support --format= it doesn't create
3319
-    # ustar tarball either.
3320
-    (tar --version) >/dev/null 2>&1 && continue
3321
-    am__tar='tar chf - "$$tardir"'
3322
-    am__tar_='tar chf - "$tardir"'
3323
-    am__untar='tar xf -'
3324
-    ;;
3325
-  pax)
3326
-    am__tar='pax -L -x ustar -w "$$tardir"'
3327
-    am__tar_='pax -L -x ustar -w "$tardir"'
3328
-    am__untar='pax -r'
3329
-    ;;
3330
-  cpio)
3331
-    am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
3332
-    am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
3333
-    am__untar='cpio -i -H ustar -d'
3334
-    ;;
3335
-  none)
3336
-    am__tar=false
3337
-    am__tar_=false
3338
-    am__untar=false
3339
-    ;;
3340
-  esac
3341
-
3342
-  # If the value was cached, stop now.  We just wanted to have am__tar
3343
-  # and am__untar set.
3344
-  test -n "${am_cv_prog_tar_ustar}" && break
3345
-
3346
-  # tar/untar a dummy directory, and stop if the command works
3347
-  rm -rf conftest.dir
3348
-  mkdir conftest.dir
3349
-  echo GrepMe > conftest.dir/file
3350
-  { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
3351
-   (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
3352
-   ac_status=$?
3353
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3354
-   (exit $ac_status); }
3355
-  rm -rf conftest.dir
3356
-  if test -s conftest.tar; then
3357
-    { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
3358
-   ($am__untar <conftest.tar) >&5 2>&5
3359
-   ac_status=$?
3360
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3361
-   (exit $ac_status); }
3362
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3363
-  fi
3364
-done
3365
-rm -rf conftest.dir
3366
-
3367
-if ${am_cv_prog_tar_ustar+:} false; then :
3368
-  $as_echo_n "(cached) " >&6
3369
-else
3370
-  am_cv_prog_tar_ustar=$_am_tool
3371
-fi
3372
-
3373
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
3374
-$as_echo "$am_cv_prog_tar_ustar" >&6; }
3375
-
3376
-
3377
-
3378
-
3379
-
3380
-# Check whether --enable-silent-rules was given.
3381
-if test "${enable_silent_rules+set}" = set; then :
3382
-  enableval=$enable_silent_rules;
3383
-fi
3384
-
3385
-case $enable_silent_rules in
3386
-yes) AM_DEFAULT_VERBOSITY=0;;
3387
-no)  AM_DEFAULT_VERBOSITY=1;;
3388
-*)   AM_DEFAULT_VERBOSITY=0;;
3389
-esac
3390
-am_make=${MAKE-make}
3391
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3392
-$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3393
-if ${am_cv_make_support_nested_variables+:} false; then :
3394
-  $as_echo_n "(cached) " >&6
3395
-else
3396
-  if $as_echo 'TRUE=$(BAR$(V))
3397
-BAR0=false
3398
-BAR1=true
3399
-V=1
3400
-am__doit:
3401
-	@$(TRUE)
3402
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3403
-  am_cv_make_support_nested_variables=yes
3404
-else
3405
-  am_cv_make_support_nested_variables=no
3406
-fi
3407
-fi
3408
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3409
-$as_echo "$am_cv_make_support_nested_variables" >&6; }
3410
-if test $am_cv_make_support_nested_variables = yes; then
3411
-    AM_V='$(V)'
3412
-  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3413
-else
3414
-  AM_V=$AM_DEFAULT_VERBOSITY
3415
-  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3416
-fi
3417
-AM_BACKSLASH='\'
3418
-
3419
-
3420
-
3421
-$as_echo "#define PACKAGE PACKAGE_NAME" >>confdefs.h
3422
-
3423
-
3424
-VERSION="devel-`date +%Y%m%d`"
3425
-
3426
-LC_CURRENT=7
3427
-LC_REVISION=19
3428
-LC_AGE=1
3429
-LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
3430
-
3431
-
3432
-for ac_prog in gawk mawk nawk awk
3433
-do
3434
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
3435
-set dummy $ac_prog; ac_word=$2
3436
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3437
-$as_echo_n "checking for $ac_word... " >&6; }
3438
-if ${ac_cv_prog_AWK+:} false; then :
3439
-  $as_echo_n "(cached) " >&6
3440
-else
3441
-  if test -n "$AWK"; then
3442
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3443
-else
3444
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3445
-for as_dir in $PATH
3446
-do
3447
-  IFS=$as_save_IFS
3448
-  test -z "$as_dir" && as_dir=.
3449
-    for ac_exec_ext in '' $ac_executable_extensions; do
3450
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3451
-    ac_cv_prog_AWK="$ac_prog"
3452
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3453
-    break 2
3454
-  fi
3455
-done
3456
-  done
3457
-IFS=$as_save_IFS
3458
-
3459
-fi
3460
-fi
3461
-AWK=$ac_cv_prog_AWK
3462
-if test -n "$AWK"; then
3463
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3464
-$as_echo "$AWK" >&6; }
3465
-else
3466
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3467
-$as_echo "no" >&6; }
3468
-fi
3469
-
3470
-
3471
-  test -n "$AWK" && break
3472
-done
3473
-
3474
-
3475
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
3476
-$as_echo_n "checking whether ln -s works... " >&6; }
3477
-LN_S=$as_ln_s
3478
-if test "$LN_S" = "ln -s"; then
3479
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3480
-$as_echo "yes" >&6; }
3481
-else
3482
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
3483
-$as_echo "no, using $LN_S" >&6; }
3484
-fi
3485
-
3486
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3487
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3488
-set x ${MAKE-make}
3489
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3490
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3491
-  $as_echo_n "(cached) " >&6
3492
-else
3493
-  cat >conftest.make <<\_ACEOF
3494
-SHELL = /bin/sh
3495
-all:
3496
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
3497
-_ACEOF
3498
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3499
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
3500
-  *@@@%%%=?*=@@@%%%*)
3501
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
3502
-  *)
3503
-    eval ac_cv_prog_make_${ac_make}_set=no;;
3504
-esac
3505
-rm -f conftest.make
3506
-fi
3507
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3508
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3509
-$as_echo "yes" >&6; }
3510
-  SET_MAKE=
3511
-else
3512
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3513
-$as_echo "no" >&6; }
3514
-  SET_MAKE="MAKE=${MAKE-make}"
3515
-fi
3516
-
3517
-
3518
-
3519
-
3520
-
3521
-
3522
-
3523
-
3524
-
3525
-case `pwd` in
3526
-  *\ * | *\	*)
3527
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
3528
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
3529
-esac
3530
-
3531
-
3532
-
3533
-macro_version='2.4.2'
3534
-macro_revision='1.3337'
3535
-
3536
-
3537
-
3538
-
3539
-
3540
-
3541
-
3542
-
3543
-
3544
-
3545
-
3546
-
3547
-
3548
-ltmain="$ac_aux_dir/ltmain.sh"
3549
-
3550
-# Backslashify metacharacters that are still active within
3551
-# double-quoted strings.
3552
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
3553
-
3554
-# Same as above, but do not quote variable references.
3555
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
3556
-
3557
-# Sed substitution to delay expansion of an escaped shell variable in a
3558
-# double_quote_subst'ed string.
3559
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3560
-
3561
-# Sed substitution to delay expansion of an escaped single quote.
3562
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3563
-
3564
-# Sed substitution to avoid accidental globbing in evaled expressions
3565
-no_glob_subst='s/\*/\\\*/g'
3566
-
3567
-ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3568
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3569
-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3570
-
3571
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
3572
-$as_echo_n "checking how to print strings... " >&6; }
3573
-# Test print first, because it will be a builtin if present.
3574
-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3575
-   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3576
-  ECHO='print -r --'
3577
-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3578
-  ECHO='printf %s\n'
3579
-else
3580
-  # Use this function as a fallback that always works.
3581
-  func_fallback_echo ()
3582
-  {
3583
-    eval 'cat <<_LTECHO_EOF
3584
-$1
3585
-_LTECHO_EOF'
3586
-  }
3587
-  ECHO='func_fallback_echo'
3588
-fi
3589
-
3590
-# func_echo_all arg...
3591
-# Invoke $ECHO with all args, space-separated.
3592
-func_echo_all ()
3593
-{
3594
-    $ECHO ""
3595
-}
3596
-
3597
-case "$ECHO" in
3598
-  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
3599
-$as_echo "printf" >&6; } ;;
3600
-  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
3601
-$as_echo "print -r" >&6; } ;;
3602
-  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
3603
-$as_echo "cat" >&6; } ;;
3604
-esac
3605
-
3606
-
3607
-
3608
-
3609
-
3610
-
3611
-
3612
-
3613
-
3614
-
3615
-
3616
-
3617
-
3618
-
3619
-DEPDIR="${am__leading_dot}deps"
3620
-
3621
-ac_config_commands="$ac_config_commands depfiles"
3622
-
3623
-
3624
-am_make=${MAKE-make}
3625
-cat > confinc << 'END'
3626
-am__doit:
3627
-	@echo this is the am__doit target
3628
-.PHONY: am__doit
3629
-END
3630
-# If we don't find an include directive, just comment out the code.
3631
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3632
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
3633
-am__include="#"
3634
-am__quote=
3635
-_am_result=none
3636
-# First try GNU make style include.
3637
-echo "include confinc" > confmf
3638
-# Ignore all kinds of additional output from `make'.
3639
-case `$am_make -s -f confmf 2> /dev/null` in #(
3640
-*the\ am__doit\ target*)
3641
-  am__include=include
3642
-  am__quote=
3643
-  _am_result=GNU
3644
-  ;;
3645
-esac
3646
-# Now try BSD make style include.
3647
-if test "$am__include" = "#"; then
3648
-   echo '.include "confinc"' > confmf
3649
-   case `$am_make -s -f confmf 2> /dev/null` in #(
3650
-   *the\ am__doit\ target*)
3651
-     am__include=.include
3652
-     am__quote="\""
3653
-     _am_result=BSD
3654
-     ;;
3655
-   esac
3656
-fi
3657
-
3658
-
3659
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3660
-$as_echo "$_am_result" >&6; }
3661
-rm -f confinc confmf
3662
-
3663
-# Check whether --enable-dependency-tracking was given.
3664
-if test "${enable_dependency_tracking+set}" = set; then :
3665
-  enableval=$enable_dependency_tracking;
3666
-fi
3667
-
3668
-if test "x$enable_dependency_tracking" != xno; then
3669
-  am_depcomp="$ac_aux_dir/depcomp"
3670
-  AMDEPBACKSLASH='\'
3671
-  am__nodep='_no'
3672
-fi
3673
- if test "x$enable_dependency_tracking" != xno; then
3674
-  AMDEP_TRUE=
3675
-  AMDEP_FALSE='#'
3676
-else
3677
-  AMDEP_TRUE='#'
3678
-  AMDEP_FALSE=
3679
-fi
3680
-
3681
-
3682 2829
 ac_ext=c
3683 2830
 ac_cpp='$CPP $CPPFLAGS'
3684 2831
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
... ...
@@ -4468,6 +3630,1078 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4468 4468
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4469 4469
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4470 4470
 
4471
+
4472
+ac_ext=c
4473
+ac_cpp='$CPP $CPPFLAGS'
4474
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4475
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4476
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
4477
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4478
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
4479
+# On Suns, sometimes $CPP names a directory.
4480
+if test -n "$CPP" && test -d "$CPP"; then
4481
+  CPP=
4482
+fi
4483
+if test -z "$CPP"; then
4484
+  if ${ac_cv_prog_CPP+:} false; then :
4485
+  $as_echo_n "(cached) " >&6
4486
+else
4487
+      # Double quotes because CPP needs to be expanded
4488
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4489
+    do
4490
+      ac_preproc_ok=false
4491
+for ac_c_preproc_warn_flag in '' yes
4492
+do
4493
+  # Use a header file that comes with gcc, so configuring glibc
4494
+  # with a fresh cross-compiler works.
4495
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4496
+  # <limits.h> exists even on freestanding compilers.
4497
+  # On the NeXT, cc -E runs the code through the compiler's parser,
4498
+  # not just through cpp. "Syntax error" is here to catch this case.
4499
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4500
+/* end confdefs.h.  */
4501
+#ifdef __STDC__
4502
+# include <limits.h>
4503
+#else
4504
+# include <assert.h>
4505
+#endif
4506
+		     Syntax error
4507
+_ACEOF
4508
+if ac_fn_c_try_cpp "$LINENO"; then :
4509
+
4510
+else
4511
+  # Broken: fails on valid input.
4512
+continue
4513
+fi
4514
+rm -f conftest.err conftest.i conftest.$ac_ext
4515
+
4516
+  # OK, works on sane cases.  Now check whether nonexistent headers
4517
+  # can be detected and how.
4518
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4519
+/* end confdefs.h.  */
4520
+#include <ac_nonexistent.h>
4521
+_ACEOF
4522
+if ac_fn_c_try_cpp "$LINENO"; then :
4523
+  # Broken: success on invalid input.
4524
+continue
4525
+else
4526
+  # Passes both tests.
4527
+ac_preproc_ok=:
4528
+break
4529
+fi
4530
+rm -f conftest.err conftest.i conftest.$ac_ext
4531
+
4532
+done
4533
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4534
+rm -f conftest.i conftest.err conftest.$ac_ext
4535
+if $ac_preproc_ok; then :
4536
+  break
4537
+fi
4538
+
4539
+    done
4540
+    ac_cv_prog_CPP=$CPP
4541
+
4542
+fi
4543
+  CPP=$ac_cv_prog_CPP
4544
+else
4545
+  ac_cv_prog_CPP=$CPP
4546
+fi
4547
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4548
+$as_echo "$CPP" >&6; }
4549
+ac_preproc_ok=false
4550
+for ac_c_preproc_warn_flag in '' yes
4551
+do
4552
+  # Use a header file that comes with gcc, so configuring glibc
4553
+  # with a fresh cross-compiler works.
4554
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4555
+  # <limits.h> exists even on freestanding compilers.
4556
+  # On the NeXT, cc -E runs the code through the compiler's parser,
4557
+  # not just through cpp. "Syntax error" is here to catch this case.
4558
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4559
+/* end confdefs.h.  */
4560
+#ifdef __STDC__
4561
+# include <limits.h>
4562
+#else
4563
+# include <assert.h>
4564
+#endif
4565
+		     Syntax error
4566
+_ACEOF
4567
+if ac_fn_c_try_cpp "$LINENO"; then :
4568
+
4569
+else
4570
+  # Broken: fails on valid input.
4571
+continue
4572
+fi
4573
+rm -f conftest.err conftest.i conftest.$ac_ext
4574
+
4575
+  # OK, works on sane cases.  Now check whether nonexistent headers
4576
+  # can be detected and how.
4577
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4578
+/* end confdefs.h.  */
4579
+#include <ac_nonexistent.h>
4580
+_ACEOF
4581
+if ac_fn_c_try_cpp "$LINENO"; then :
4582
+  # Broken: success on invalid input.
4583
+continue
4584
+else
4585
+  # Passes both tests.
4586
+ac_preproc_ok=:
4587
+break
4588
+fi
4589
+rm -f conftest.err conftest.i conftest.$ac_ext
4590
+
4591
+done
4592
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4593
+rm -f conftest.i conftest.err conftest.$ac_ext
4594
+if $ac_preproc_ok; then :
4595
+
4596
+else
4597
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4598
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4599
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4600
+See \`config.log' for more details" "$LINENO" 5; }
4601
+fi
4602
+
4603
+ac_ext=c
4604
+ac_cpp='$CPP $CPPFLAGS'
4605
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4606
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4607
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
4608
+
4609
+
4610
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4611
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4612
+if ${ac_cv_path_GREP+:} false; then :
4613
+  $as_echo_n "(cached) " >&6
4614
+else
4615
+  if test -z "$GREP"; then
4616
+  ac_path_GREP_found=false
4617
+  # Loop through the user's path and test for each of PROGNAME-LIST
4618
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4619
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4620
+do
4621
+  IFS=$as_save_IFS
4622
+  test -z "$as_dir" && as_dir=.
4623
+    for ac_prog in grep ggrep; do
4624
+    for ac_exec_ext in '' $ac_executable_extensions; do
4625
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4626
+      as_fn_executable_p "$ac_path_GREP" || continue
4627
+# Check for GNU ac_path_GREP and select it if it is found.
4628
+  # Check for GNU $ac_path_GREP
4629
+case `"$ac_path_GREP" --version 2>&1` in
4630
+*GNU*)
4631
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4632
+*)
4633
+  ac_count=0
4634
+  $as_echo_n 0123456789 >"conftest.in"
4635
+  while :
4636
+  do
4637
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
4638
+    mv "conftest.tmp" "conftest.in"
4639
+    cp "conftest.in" "conftest.nl"
4640
+    $as_echo 'GREP' >> "conftest.nl"
4641
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4642
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4643
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
4644
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4645
+      # Best one so far, save it but keep looking for a better one
4646
+      ac_cv_path_GREP="$ac_path_GREP"
4647
+      ac_path_GREP_max=$ac_count
4648
+    fi
4649
+    # 10*(2^10) chars as input seems more than enough
4650
+    test $ac_count -gt 10 && break
4651
+  done
4652
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4653
+esac
4654
+
4655
+      $ac_path_GREP_found && break 3
4656
+    done
4657
+  done
4658
+  done
4659
+IFS=$as_save_IFS
4660
+  if test -z "$ac_cv_path_GREP"; then
4661
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4662
+  fi
4663
+else
4664
+  ac_cv_path_GREP=$GREP
4665
+fi
4666
+
4667
+fi
4668
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4669
+$as_echo "$ac_cv_path_GREP" >&6; }
4670
+ GREP="$ac_cv_path_GREP"
4671
+
4672
+
4673
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4674
+$as_echo_n "checking for egrep... " >&6; }
4675
+if ${ac_cv_path_EGREP+:} false; then :
4676
+  $as_echo_n "(cached) " >&6
4677
+else
4678
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4679
+   then ac_cv_path_EGREP="$GREP -E"
4680
+   else
4681
+     if test -z "$EGREP"; then
4682
+  ac_path_EGREP_found=false
4683
+  # Loop through the user's path and test for each of PROGNAME-LIST
4684
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4686
+do
4687
+  IFS=$as_save_IFS
4688
+  test -z "$as_dir" && as_dir=.
4689
+    for ac_prog in egrep; do
4690
+    for ac_exec_ext in '' $ac_executable_extensions; do
4691
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4692
+      as_fn_executable_p "$ac_path_EGREP" || continue
4693
+# Check for GNU ac_path_EGREP and select it if it is found.
4694
+  # Check for GNU $ac_path_EGREP
4695
+case `"$ac_path_EGREP" --version 2>&1` in
4696
+*GNU*)
4697
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4698
+*)
4699
+  ac_count=0
4700
+  $as_echo_n 0123456789 >"conftest.in"
4701
+  while :
4702
+  do
4703
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
4704
+    mv "conftest.tmp" "conftest.in"
4705
+    cp "conftest.in" "conftest.nl"
4706
+    $as_echo 'EGREP' >> "conftest.nl"
4707
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4708
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4709
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
4710
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4711
+      # Best one so far, save it but keep looking for a better one
4712
+      ac_cv_path_EGREP="$ac_path_EGREP"
4713
+      ac_path_EGREP_max=$ac_count
4714
+    fi
4715
+    # 10*(2^10) chars as input seems more than enough
4716
+    test $ac_count -gt 10 && break
4717
+  done
4718
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4719
+esac
4720
+
4721
+      $ac_path_EGREP_found && break 3
4722
+    done
4723
+  done
4724
+  done
4725
+IFS=$as_save_IFS
4726
+  if test -z "$ac_cv_path_EGREP"; then
4727
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4728
+  fi
4729
+else
4730
+  ac_cv_path_EGREP=$EGREP
4731
+fi
4732
+
4733
+   fi
4734
+fi
4735
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4736
+$as_echo "$ac_cv_path_EGREP" >&6; }
4737
+ EGREP="$ac_cv_path_EGREP"
4738
+
4739
+
4740
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4741
+$as_echo_n "checking for ANSI C header files... " >&6; }
4742
+if ${ac_cv_header_stdc+:} false; then :
4743
+  $as_echo_n "(cached) " >&6
4744
+else
4745
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746
+/* end confdefs.h.  */
4747
+#include <stdlib.h>
4748
+#include <stdarg.h>
4749
+#include <string.h>
4750
+#include <float.h>
4751
+
4752
+int
4753
+main ()
4754
+{
4755
+
4756
+  ;
4757
+  return 0;
4758
+}
4759
+_ACEOF
4760
+if ac_fn_c_try_compile "$LINENO"; then :
4761
+  ac_cv_header_stdc=yes
4762
+else
4763
+  ac_cv_header_stdc=no
4764
+fi
4765
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4766
+
4767
+if test $ac_cv_header_stdc = yes; then
4768
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4769
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4770
+/* end confdefs.h.  */
4771
+#include <string.h>
4772
+
4773
+_ACEOF
4774
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4775
+  $EGREP "memchr" >/dev/null 2>&1; then :
4776
+
4777
+else
4778
+  ac_cv_header_stdc=no
4779
+fi
4780
+rm -f conftest*
4781
+
4782
+fi
4783
+
4784
+if test $ac_cv_header_stdc = yes; then
4785
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4786
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4787
+/* end confdefs.h.  */
4788
+#include <stdlib.h>
4789
+
4790
+_ACEOF
4791
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4792
+  $EGREP "free" >/dev/null 2>&1; then :
4793
+
4794
+else
4795
+  ac_cv_header_stdc=no
4796
+fi
4797
+rm -f conftest*
4798
+
4799
+fi
4800
+
4801
+if test $ac_cv_header_stdc = yes; then
4802
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4803
+  if test "$cross_compiling" = yes; then :
4804
+  :
4805
+else
4806
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807
+/* end confdefs.h.  */
4808
+#include <ctype.h>
4809
+#include <stdlib.h>
4810
+#if ((' ' & 0x0FF) == 0x020)
4811
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4812
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4813
+#else
4814
+# define ISLOWER(c) \
4815
+		   (('a' <= (c) && (c) <= 'i') \
4816
+		     || ('j' <= (c) && (c) <= 'r') \
4817
+		     || ('s' <= (c) && (c) <= 'z'))
4818
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4819
+#endif
4820
+
4821
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4822
+int
4823
+main ()
4824
+{
4825
+  int i;
4826
+  for (i = 0; i < 256; i++)
4827
+    if (XOR (islower (i), ISLOWER (i))
4828
+	|| toupper (i) != TOUPPER (i))
4829
+      return 2;
4830
+  return 0;
4831
+}
4832
+_ACEOF
4833
+if ac_fn_c_try_run "$LINENO"; then :
4834
+
4835
+else
4836
+  ac_cv_header_stdc=no
4837
+fi
4838
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4839
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
4840
+fi
4841
+
4842
+fi
4843
+fi
4844
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4845
+$as_echo "$ac_cv_header_stdc" >&6; }
4846
+if test $ac_cv_header_stdc = yes; then
4847
+
4848
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4849
+
4850
+fi
4851
+
4852
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4853
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4854
+		  inttypes.h stdint.h unistd.h
4855
+do :
4856
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4857
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4858
+"
4859
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4860
+  cat >>confdefs.h <<_ACEOF
4861
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4862
+_ACEOF
4863
+
4864
+fi
4865
+
4866
+done
4867
+
4868
+
4869
+
4870
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4871
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
4872
+  MINIX=yes
4873
+else
4874
+  MINIX=
4875
+fi
4876
+
4877
+
4878
+  if test "$MINIX" = yes; then
4879
+
4880
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4881
+
4882
+
4883
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4884
+
4885
+
4886
+$as_echo "#define _MINIX 1" >>confdefs.h
4887
+
4888
+  fi
4889
+
4890
+
4891
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4892
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4893
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
4894
+  $as_echo_n "(cached) " >&6
4895
+else
4896
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4897
+/* end confdefs.h.  */
4898
+
4899
+#         define __EXTENSIONS__ 1
4900
+          $ac_includes_default
4901
+int
4902
+main ()
4903
+{
4904
+
4905
+  ;
4906
+  return 0;
4907
+}
4908
+_ACEOF
4909
+if ac_fn_c_try_compile "$LINENO"; then :
4910
+  ac_cv_safe_to_define___extensions__=yes
4911
+else
4912
+  ac_cv_safe_to_define___extensions__=no
4913
+fi
4914
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4915
+fi
4916
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4917
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4918
+  test $ac_cv_safe_to_define___extensions__ = yes &&
4919
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4920
+
4921
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4922
+
4923
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4924
+
4925
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4926
+
4927
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4928
+
4929
+
4930
+
4931
+am__api_version='1.11'
4932
+
4933
+# Find a good install program.  We prefer a C program (faster),
4934
+# so one script is as good as another.  But avoid the broken or
4935
+# incompatible versions:
4936
+# SysV /etc/install, /usr/sbin/install
4937
+# SunOS /usr/etc/install
4938
+# IRIX /sbin/install
4939
+# AIX /bin/install
4940
+# AmigaOS /C/install, which installs bootblocks on floppy discs
4941
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4942
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4943
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4944
+# OS/2's system install, which has a completely different semantic
4945
+# ./install, which can be erroneously created by make from ./install.sh.
4946
+# Reject install programs that cannot install multiple files.
4947
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4948
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
4949
+if test -z "$INSTALL"; then
4950
+if ${ac_cv_path_install+:} false; then :
4951
+  $as_echo_n "(cached) " >&6
4952
+else
4953
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954
+for as_dir in $PATH
4955
+do
4956
+  IFS=$as_save_IFS
4957
+  test -z "$as_dir" && as_dir=.
4958
+    # Account for people who put trailing slashes in PATH elements.
4959
+case $as_dir/ in #((
4960
+  ./ | .// | /[cC]/* | \
4961
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4962
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4963
+  /usr/ucb/* ) ;;
4964
+  *)
4965
+    # OSF1 and SCO ODT 3.0 have their own names for install.
4966
+    # Don't use installbsd from OSF since it installs stuff as root
4967
+    # by default.
4968
+    for ac_prog in ginstall scoinst install; do
4969
+      for ac_exec_ext in '' $ac_executable_extensions; do
4970
+	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4971
+	  if test $ac_prog = install &&
4972
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4973
+	    # AIX install.  It has an incompatible calling convention.
4974
+	    :
4975
+	  elif test $ac_prog = install &&
4976
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4977
+	    # program-specific install script used by HP pwplus--don't use.
4978
+	    :
4979
+	  else
4980
+	    rm -rf conftest.one conftest.two conftest.dir
4981
+	    echo one > conftest.one
4982
+	    echo two > conftest.two
4983
+	    mkdir conftest.dir
4984
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4985
+	      test -s conftest.one && test -s conftest.two &&
4986
+	      test -s conftest.dir/conftest.one &&
4987
+	      test -s conftest.dir/conftest.two
4988
+	    then
4989
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4990
+	      break 3
4991
+	    fi
4992
+	  fi
4993
+	fi
4994
+      done
4995
+    done
4996
+    ;;
4997
+esac
4998
+
4999
+  done
5000
+IFS=$as_save_IFS
5001
+
5002
+rm -rf conftest.one conftest.two conftest.dir
5003
+
5004
+fi
5005
+  if test "${ac_cv_path_install+set}" = set; then
5006
+    INSTALL=$ac_cv_path_install
5007
+  else
5008
+    # As a last resort, use the slow shell script.  Don't cache a
5009
+    # value for INSTALL within a source directory, because that will
5010
+    # break other packages using the cache if that directory is
5011
+    # removed, or if the value is a relative name.
5012
+    INSTALL=$ac_install_sh
5013
+  fi
5014
+fi
5015
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5016
+$as_echo "$INSTALL" >&6; }
5017
+
5018
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5019
+# It thinks the first close brace ends the variable substitution.
5020
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5021
+
5022
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5023
+
5024
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5025
+
5026
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
5027
+$as_echo_n "checking whether build environment is sane... " >&6; }
5028
+# Just in case
5029
+sleep 1
5030
+echo timestamp > conftest.file
5031
+# Reject unsafe characters in $srcdir or the absolute working directory
5032
+# name.  Accept space and tab only in the latter.
5033
+am_lf='
5034
+'
5035
+case `pwd` in
5036
+  *[\\\"\#\$\&\'\`$am_lf]*)
5037
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
5038
+esac
5039
+case $srcdir in
5040
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
5041
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
5042
+esac
5043
+
5044
+# Do `set' in a subshell so we don't clobber the current shell's
5045
+# arguments.  Must try -L first in case configure is actually a
5046
+# symlink; some systems play weird games with the mod time of symlinks
5047
+# (eg FreeBSD returns the mod time of the symlink's containing
5048
+# directory).
5049
+if (
5050
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
5051
+   if test "$*" = "X"; then
5052
+      # -L didn't work.
5053
+      set X `ls -t "$srcdir/configure" conftest.file`
5054
+   fi
5055
+   rm -f conftest.file
5056
+   if test "$*" != "X $srcdir/configure conftest.file" \
5057
+      && test "$*" != "X conftest.file $srcdir/configure"; then
5058
+
5059
+      # If neither matched, then we have a broken ls.  This can happen
5060
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
5061
+      # broken ls alias from the environment.  This has actually
5062
+      # happened.  Such a system could not be considered "sane".
5063
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
5064
+alias in your environment" "$LINENO" 5
5065
+   fi
5066
+
5067
+   test "$2" = conftest.file
5068
+   )
5069
+then
5070
+   # Ok.
5071
+   :
5072
+else
5073
+   as_fn_error $? "newly created file is older than distributed files!
5074
+Check your system clock" "$LINENO" 5
5075
+fi
5076
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5077
+$as_echo "yes" >&6; }
5078
+test "$program_prefix" != NONE &&
5079
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
5080
+# Use a double $ so make ignores it.
5081
+test "$program_suffix" != NONE &&
5082
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5083
+# Double any \ or $.
5084
+# By default was `s,x,x', remove it if useless.
5085
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5086
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5087
+
5088
+# expand $ac_aux_dir to an absolute path
5089
+am_aux_dir=`cd $ac_aux_dir && pwd`
5090
+
5091
+if test x"${MISSING+set}" != xset; then
5092
+  case $am_aux_dir in
5093
+  *\ * | *\	*)
5094
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
5095
+  *)
5096
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
5097
+  esac
5098
+fi
5099
+# Use eval to expand $SHELL
5100
+if eval "$MISSING --run true"; then
5101
+  am_missing_run="$MISSING --run "
5102
+else
5103
+  am_missing_run=
5104
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
5105
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
5106
+fi
5107
+
5108
+if test x"${install_sh}" != xset; then
5109
+  case $am_aux_dir in
5110
+  *\ * | *\	*)
5111
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5112
+  *)
5113
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
5114
+  esac
5115
+fi
5116
+
5117
+# Installed binaries are usually stripped using `strip' when the user
5118
+# run `make install-strip'.  However `strip' might not be the right
5119
+# tool to use in cross-compilation environments, therefore Automake
5120
+# will honor the `STRIP' environment variable to overrule this program.
5121
+if test "$cross_compiling" != no; then
5122
+  if test -n "$ac_tool_prefix"; then
5123
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5124
+set dummy ${ac_tool_prefix}strip; ac_word=$2
5125
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126
+$as_echo_n "checking for $ac_word... " >&6; }
5127
+if ${ac_cv_prog_STRIP+:} false; then :
5128
+  $as_echo_n "(cached) " >&6
5129
+else
5130
+  if test -n "$STRIP"; then
5131
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5132
+else
5133
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134
+for as_dir in $PATH
5135
+do
5136
+  IFS=$as_save_IFS
5137
+  test -z "$as_dir" && as_dir=.
5138
+    for ac_exec_ext in '' $ac_executable_extensions; do
5139
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5140
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5141
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142
+    break 2
5143
+  fi
5144
+done
5145
+  done
5146
+IFS=$as_save_IFS
5147
+
5148
+fi
5149
+fi
5150
+STRIP=$ac_cv_prog_STRIP
5151
+if test -n "$STRIP"; then
5152
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5153
+$as_echo "$STRIP" >&6; }
5154
+else
5155
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156
+$as_echo "no" >&6; }
5157
+fi
5158
+
5159
+
5160
+fi
5161
+if test -z "$ac_cv_prog_STRIP"; then
5162
+  ac_ct_STRIP=$STRIP
5163
+  # Extract the first word of "strip", so it can be a program name with args.
5164
+set dummy strip; ac_word=$2
5165
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5166
+$as_echo_n "checking for $ac_word... " >&6; }
5167
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5168
+  $as_echo_n "(cached) " >&6
5169
+else
5170
+  if test -n "$ac_ct_STRIP"; then
5171
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5172
+else
5173
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5174
+for as_dir in $PATH
5175
+do
5176
+  IFS=$as_save_IFS
5177
+  test -z "$as_dir" && as_dir=.
5178
+    for ac_exec_ext in '' $ac_executable_extensions; do
5179
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5180
+    ac_cv_prog_ac_ct_STRIP="strip"
5181
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5182
+    break 2
5183
+  fi
5184
+done
5185
+  done
5186
+IFS=$as_save_IFS
5187
+
5188
+fi
5189
+fi
5190
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5191
+if test -n "$ac_ct_STRIP"; then
5192
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5193
+$as_echo "$ac_ct_STRIP" >&6; }
5194
+else
5195
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196
+$as_echo "no" >&6; }
5197
+fi
5198
+
5199
+  if test "x$ac_ct_STRIP" = x; then
5200
+    STRIP=":"
5201
+  else
5202
+    case $cross_compiling:$ac_tool_warned in
5203
+yes:)
5204
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5205
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5206
+ac_tool_warned=yes ;;
5207
+esac
5208
+    STRIP=$ac_ct_STRIP
5209
+  fi
5210
+else
5211
+  STRIP="$ac_cv_prog_STRIP"
5212
+fi
5213
+
5214
+fi
5215
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5216
+
5217
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5218
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5219
+if test -z "$MKDIR_P"; then
5220
+  if ${ac_cv_path_mkdir+:} false; then :
5221
+  $as_echo_n "(cached) " >&6
5222
+else
5223
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5225
+do
5226
+  IFS=$as_save_IFS
5227
+  test -z "$as_dir" && as_dir=.
5228
+    for ac_prog in mkdir gmkdir; do
5229
+	 for ac_exec_ext in '' $ac_executable_extensions; do
5230
+	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
5231
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5232
+	     'mkdir (GNU coreutils) '* | \
5233
+	     'mkdir (coreutils) '* | \
5234
+	     'mkdir (fileutils) '4.1*)
5235
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5236
+	       break 3;;
5237
+	   esac
5238
+	 done
5239
+       done
5240
+  done
5241
+IFS=$as_save_IFS
5242
+
5243
+fi
5244
+
5245
+  test -d ./--version && rmdir ./--version
5246
+  if test "${ac_cv_path_mkdir+set}" = set; then
5247
+    MKDIR_P="$ac_cv_path_mkdir -p"
5248
+  else
5249
+    # As a last resort, use the slow shell script.  Don't cache a
5250
+    # value for MKDIR_P within a source directory, because that will
5251
+    # break other packages using the cache if that directory is
5252
+    # removed, or if the value is a relative name.
5253
+    MKDIR_P="$ac_install_sh -d"
5254
+  fi
5255
+fi
5256
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5257
+$as_echo "$MKDIR_P" >&6; }
5258
+
5259
+mkdir_p="$MKDIR_P"
5260
+case $mkdir_p in
5261
+  [\\/$]* | ?:[\\/]*) ;;
5262
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
5263
+esac
5264
+
5265
+for ac_prog in gawk mawk nawk awk
5266
+do
5267
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
5268
+set dummy $ac_prog; ac_word=$2
5269
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5270
+$as_echo_n "checking for $ac_word... " >&6; }
5271
+if ${ac_cv_prog_AWK+:} false; then :
5272
+  $as_echo_n "(cached) " >&6
5273
+else
5274
+  if test -n "$AWK"; then
5275
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5276
+else
5277
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278
+for as_dir in $PATH
5279
+do
5280
+  IFS=$as_save_IFS
5281
+  test -z "$as_dir" && as_dir=.
5282
+    for ac_exec_ext in '' $ac_executable_extensions; do
5283
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5284
+    ac_cv_prog_AWK="$ac_prog"
5285
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286
+    break 2
5287
+  fi
5288
+done
5289
+  done
5290
+IFS=$as_save_IFS
5291
+
5292
+fi
5293
+fi
5294
+AWK=$ac_cv_prog_AWK
5295
+if test -n "$AWK"; then
5296
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5297
+$as_echo "$AWK" >&6; }
5298
+else
5299
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300
+$as_echo "no" >&6; }
5301
+fi
5302
+
5303
+
5304
+  test -n "$AWK" && break
5305
+done
5306
+
5307
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5308
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5309
+set x ${MAKE-make}
5310
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5311
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
5312
+  $as_echo_n "(cached) " >&6
5313
+else
5314
+  cat >conftest.make <<\_ACEOF
5315
+SHELL = /bin/sh
5316
+all:
5317
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
5318
+_ACEOF
5319
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5320
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
5321
+  *@@@%%%=?*=@@@%%%*)
5322
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
5323
+  *)
5324
+    eval ac_cv_prog_make_${ac_make}_set=no;;
5325
+esac
5326
+rm -f conftest.make
5327
+fi
5328
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5329
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5330
+$as_echo "yes" >&6; }
5331
+  SET_MAKE=
5332
+else
5333
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5334
+$as_echo "no" >&6; }
5335
+  SET_MAKE="MAKE=${MAKE-make}"
5336
+fi
5337
+
5338
+rm -rf .tst 2>/dev/null
5339
+mkdir .tst 2>/dev/null
5340
+if test -d .tst; then
5341
+  am__leading_dot=.
5342
+else
5343
+  am__leading_dot=_
5344
+fi
5345
+rmdir .tst 2>/dev/null
5346
+
5347
+DEPDIR="${am__leading_dot}deps"
5348
+
5349
+ac_config_commands="$ac_config_commands depfiles"
5350
+
5351
+
5352
+am_make=${MAKE-make}
5353
+cat > confinc << 'END'
5354
+am__doit:
5355
+	@echo this is the am__doit target
5356
+.PHONY: am__doit
5357
+END
5358
+# If we don't find an include directive, just comment out the code.
5359
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5360
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
5361
+am__include="#"
5362
+am__quote=
5363
+_am_result=none
5364
+# First try GNU make style include.
5365
+echo "include confinc" > confmf
5366
+# Ignore all kinds of additional output from `make'.
5367
+case `$am_make -s -f confmf 2> /dev/null` in #(
5368
+*the\ am__doit\ target*)
5369
+  am__include=include
5370
+  am__quote=
5371
+  _am_result=GNU
5372
+  ;;
5373
+esac
5374
+# Now try BSD make style include.
5375
+if test "$am__include" = "#"; then
5376
+   echo '.include "confinc"' > confmf
5377
+   case `$am_make -s -f confmf 2> /dev/null` in #(
5378
+   *the\ am__doit\ target*)
5379
+     am__include=.include
5380
+     am__quote="\""
5381
+     _am_result=BSD
5382
+     ;;
5383
+   esac
5384
+fi
5385
+
5386
+
5387
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5388
+$as_echo "$_am_result" >&6; }
5389
+rm -f confinc confmf
5390
+
5391
+# Check whether --enable-dependency-tracking was given.
5392
+if test "${enable_dependency_tracking+set}" = set; then :
5393
+  enableval=$enable_dependency_tracking;
5394
+fi
5395
+
5396
+if test "x$enable_dependency_tracking" != xno; then
5397
+  am_depcomp="$ac_aux_dir/depcomp"
5398
+  AMDEPBACKSLASH='\'
5399
+  am__nodep='_no'
5400
+fi
5401
+ if test "x$enable_dependency_tracking" != xno; then
5402
+  AMDEP_TRUE=
5403
+  AMDEP_FALSE='#'
5404
+else
5405
+  AMDEP_TRUE='#'
5406
+  AMDEP_FALSE=
5407
+fi
5408
+
5409
+
5410
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
5411
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
5412
+  # is not polluted with repeated "-I."
5413
+  am__isrc=' -I$(srcdir)'
5414
+  # test to see if srcdir already configured
5415
+  if test -f $srcdir/config.status; then
5416
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
5417
+  fi
5418
+fi
5419
+
5420
+# test whether we have cygpath
5421
+if test -z "$CYGPATH_W"; then
5422
+  if (cygpath --version) >/dev/null 2>/dev/null; then
5423
+    CYGPATH_W='cygpath -w'
5424
+  else
5425
+    CYGPATH_W=echo
5426
+  fi
5427
+fi
5428
+
5429
+
5430
+# Define the identity of the package.
5431
+ PACKAGE='clamav'
5432
+ VERSION='devel'
5433
+
5434
+
5435
+# Some tools Automake needs.
5436
+
5437
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
5438
+
5439
+
5440
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
5441
+
5442
+
5443
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
5444
+
5445
+
5446
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
5447
+
5448
+
5449
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
5450
+
5451
+# We need awk for the "check" target.  The system "awk" is bad on
5452
+# some platforms.
5453
+# Always define AMTAR for backward compatibility.  Yes, it's still used
5454
+# in the wild :-(  We should find a proper way to deprecate it ...
5455
+AMTAR='$${TAR-tar}'
5456
+
5457
+
5458
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
5459
+$as_echo_n "checking how to create a ustar tar archive... " >&6; }
5460
+# Loop over all known methods to create a tar archive until one works.
5461
+_am_tools='gnutar plaintar pax cpio none'
5462
+_am_tools=${am_cv_prog_tar_ustar-$_am_tools}
5463
+# Do not fold the above two line into one, because Tru64 sh and
5464
+# Solaris sh will not grok spaces in the rhs of `-'.
5465
+for _am_tool in $_am_tools
5466
+do
5467
+  case $_am_tool in
5468
+  gnutar)
5469
+    for _am_tar in tar gnutar gtar;
5470
+    do
5471
+      { echo "$as_me:$LINENO: $_am_tar --version" >&5
5472
+   ($_am_tar --version) >&5 2>&5
5473
+   ac_status=$?
5474
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5475
+   (exit $ac_status); } && break
5476
+    done
5477
+    am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
5478
+    am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
5479
+    am__untar="$_am_tar -xf -"
5480
+    ;;
5481
+  plaintar)
5482
+    # Must skip GNU tar: if it does not support --format= it doesn't create
5483
+    # ustar tarball either.
5484
+    (tar --version) >/dev/null 2>&1 && continue
5485
+    am__tar='tar chf - "$$tardir"'
5486
+    am__tar_='tar chf - "$tardir"'
5487
+    am__untar='tar xf -'
5488
+    ;;
5489
+  pax)
5490
+    am__tar='pax -L -x ustar -w "$$tardir"'
5491
+    am__tar_='pax -L -x ustar -w "$tardir"'
5492
+    am__untar='pax -r'
5493
+    ;;
5494
+  cpio)
5495
+    am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
5496
+    am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
5497
+    am__untar='cpio -i -H ustar -d'
5498
+    ;;
5499
+  none)
5500
+    am__tar=false
5501
+    am__tar_=false
5502
+    am__untar=false
5503
+    ;;
5504
+  esac
5505
+
5506
+  # If the value was cached, stop now.  We just wanted to have am__tar
5507
+  # and am__untar set.
5508
+  test -n "${am_cv_prog_tar_ustar}" && break
5509
+
5510
+  # tar/untar a dummy directory, and stop if the command works
5511
+  rm -rf conftest.dir
5512
+  mkdir conftest.dir
5513
+  echo GrepMe > conftest.dir/file
5514
+  { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
5515
+   (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
5516
+   ac_status=$?
5517
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5518
+   (exit $ac_status); }
5519
+  rm -rf conftest.dir
5520
+  if test -s conftest.tar; then
5521
+    { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
5522
+   ($am__untar <conftest.tar) >&5 2>&5
5523
+   ac_status=$?
5524
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525
+   (exit $ac_status); }
5526
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
5527
+  fi
5528
+done
5529
+rm -rf conftest.dir
5530
+
5531
+if ${am_cv_prog_tar_ustar+:} false; then :
5532
+  $as_echo_n "(cached) " >&6
5533
+else
5534
+  am_cv_prog_tar_ustar=$_am_tool
5535
+fi
5536
+
5537
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
5538
+$as_echo "$am_cv_prog_tar_ustar" >&6; }
5539
+
5540
+
5541
+
5542
+
4471 5543
 depcc="$CC"   am_compiler_list=
4472 5544
 
4473 5545
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
... ...
@@ -4596,6 +4830,184 @@ else
4596 4596
 fi
4597 4597
 
4598 4598
 
4599
+
4600
+# Check whether --enable-silent-rules was given.
4601
+if test "${enable_silent_rules+set}" = set; then :
4602
+  enableval=$enable_silent_rules;
4603
+fi
4604
+
4605
+case $enable_silent_rules in
4606
+yes) AM_DEFAULT_VERBOSITY=0;;
4607
+no)  AM_DEFAULT_VERBOSITY=1;;
4608
+*)   AM_DEFAULT_VERBOSITY=0;;
4609
+esac
4610
+am_make=${MAKE-make}
4611
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4612
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4613
+if ${am_cv_make_support_nested_variables+:} false; then :
4614
+  $as_echo_n "(cached) " >&6
4615
+else
4616
+  if $as_echo 'TRUE=$(BAR$(V))
4617
+BAR0=false
4618
+BAR1=true
4619
+V=1
4620
+am__doit:
4621
+	@$(TRUE)
4622
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4623
+  am_cv_make_support_nested_variables=yes
4624
+else
4625
+  am_cv_make_support_nested_variables=no
4626
+fi
4627
+fi
4628
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4629
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
4630
+if test $am_cv_make_support_nested_variables = yes; then
4631
+    AM_V='$(V)'
4632
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4633
+else
4634
+  AM_V=$AM_DEFAULT_VERBOSITY
4635
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4636
+fi
4637
+AM_BACKSLASH='\'
4638
+
4639
+
4640
+
4641
+$as_echo "#define PACKAGE PACKAGE_NAME" >>confdefs.h
4642
+
4643
+
4644
+VERSION="devel-`date +%Y%m%d`"
4645
+
4646
+LC_CURRENT=7
4647
+LC_REVISION=11
4648
+LC_AGE=1
4649
+LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
4650
+
4651
+
4652
+
4653
+cat >>confdefs.h <<_ACEOF
4654
+#define LIBCLAMAV_FULLVER "$major.$LC_AGE.$LC_REVISION"
4655
+_ACEOF
4656
+
4657
+
4658
+
4659
+cat >>confdefs.h <<_ACEOF
4660
+#define LIBCLAMAV_MAJORVER $major
4661
+_ACEOF
4662
+
4663
+
4664
+
4665
+cat >>confdefs.h <<_ACEOF
4666
+#define VERSION "$VERSION"
4667
+_ACEOF
4668
+
4669
+
4670
+cat >>confdefs.h <<_ACEOF
4671
+#define VERSION_SUFFIX "$VERSION_SUFFIX"
4672
+_ACEOF
4673
+
4674
+
4675
+
4676
+
4677
+
4678
+
4679
+
4680
+
4681
+
4682
+
4683
+case `pwd` in
4684
+  *\ * | *\	*)
4685
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
4686
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
4687
+esac
4688
+
4689
+
4690
+
4691
+macro_version='2.4.2'
4692
+macro_revision='1.3337'
4693
+
4694
+
4695
+
4696
+
4697
+
4698
+
4699
+
4700
+
4701
+
4702
+
4703
+
4704
+
4705
+
4706
+ltmain="$ac_aux_dir/ltmain.sh"
4707
+
4708
+# Backslashify metacharacters that are still active within
4709
+# double-quoted strings.
4710
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
4711
+
4712
+# Same as above, but do not quote variable references.
4713
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
4714
+
4715
+# Sed substitution to delay expansion of an escaped shell variable in a
4716
+# double_quote_subst'ed string.
4717
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4718
+
4719
+# Sed substitution to delay expansion of an escaped single quote.
4720
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
4721
+
4722
+# Sed substitution to avoid accidental globbing in evaled expressions
4723
+no_glob_subst='s/\*/\\\*/g'
4724
+
4725
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4726
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4727
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4728
+
4729
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
4730
+$as_echo_n "checking how to print strings... " >&6; }
4731
+# Test print first, because it will be a builtin if present.
4732
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4733
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
4734
+  ECHO='print -r --'
4735
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
4736
+  ECHO='printf %s\n'
4737
+else
4738
+  # Use this function as a fallback that always works.
4739
+  func_fallback_echo ()
4740
+  {
4741
+    eval 'cat <<_LTECHO_EOF
4742
+$1
4743
+_LTECHO_EOF'
4744
+  }
4745
+  ECHO='func_fallback_echo'
4746
+fi
4747
+
4748
+# func_echo_all arg...
4749
+# Invoke $ECHO with all args, space-separated.
4750
+func_echo_all ()
4751
+{
4752
+    $ECHO ""
4753
+}
4754
+
4755
+case "$ECHO" in
4756
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
4757
+$as_echo "printf" >&6; } ;;
4758
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
4759
+$as_echo "print -r" >&6; } ;;
4760
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
4761
+$as_echo "cat" >&6; } ;;
4762
+esac
4763
+
4764
+
4765
+
4766
+
4767
+
4768
+
4769
+
4770
+
4771
+
4772
+
4773
+
4774
+
4775
+
4776
+
4599 4777
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4600 4778
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
4601 4779
 if ${ac_cv_path_SED+:} false; then :
... ...
@@ -4678,136 +5090,6 @@ Xsed="$SED -e 1s/^X//"
4678 4678
 
4679 4679
 
4680 4680
 
4681
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4682
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4683
-if ${ac_cv_path_GREP+:} false; then :
4684
-  $as_echo_n "(cached) " >&6
4685
-else
4686
-  if test -z "$GREP"; then
4687
-  ac_path_GREP_found=false
4688
-  # Loop through the user's path and test for each of PROGNAME-LIST
4689
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4691
-do
4692
-  IFS=$as_save_IFS
4693
-  test -z "$as_dir" && as_dir=.
4694
-    for ac_prog in grep ggrep; do
4695
-    for ac_exec_ext in '' $ac_executable_extensions; do
4696
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4697
-      as_fn_executable_p "$ac_path_GREP" || continue
4698
-# Check for GNU ac_path_GREP and select it if it is found.
4699
-  # Check for GNU $ac_path_GREP
4700
-case `"$ac_path_GREP" --version 2>&1` in
4701
-*GNU*)
4702
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4703
-*)
4704
-  ac_count=0
4705
-  $as_echo_n 0123456789 >"conftest.in"
4706
-  while :
4707
-  do
4708
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
4709
-    mv "conftest.tmp" "conftest.in"
4710
-    cp "conftest.in" "conftest.nl"
4711
-    $as_echo 'GREP' >> "conftest.nl"
4712
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4713
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4714
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
4715
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4716
-      # Best one so far, save it but keep looking for a better one
4717
-      ac_cv_path_GREP="$ac_path_GREP"
4718
-      ac_path_GREP_max=$ac_count
4719
-    fi
4720
-    # 10*(2^10) chars as input seems more than enough
4721
-    test $ac_count -gt 10 && break
4722
-  done
4723
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4724
-esac
4725
-
4726
-      $ac_path_GREP_found && break 3
4727
-    done
4728
-  done
4729
-  done
4730
-IFS=$as_save_IFS
4731
-  if test -z "$ac_cv_path_GREP"; then
4732
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4733
-  fi
4734
-else
4735
-  ac_cv_path_GREP=$GREP
4736
-fi
4737
-
4738
-fi
4739
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4740
-$as_echo "$ac_cv_path_GREP" >&6; }
4741
- GREP="$ac_cv_path_GREP"
4742
-
4743
-
4744
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4745
-$as_echo_n "checking for egrep... " >&6; }
4746
-if ${ac_cv_path_EGREP+:} false; then :
4747
-  $as_echo_n "(cached) " >&6
4748
-else
4749
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4750
-   then ac_cv_path_EGREP="$GREP -E"
4751
-   else
4752
-     if test -z "$EGREP"; then
4753
-  ac_path_EGREP_found=false
4754
-  # Loop through the user's path and test for each of PROGNAME-LIST
4755
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4757
-do
4758
-  IFS=$as_save_IFS
4759
-  test -z "$as_dir" && as_dir=.
4760
-    for ac_prog in egrep; do
4761
-    for ac_exec_ext in '' $ac_executable_extensions; do
4762
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4763
-      as_fn_executable_p "$ac_path_EGREP" || continue
4764
-# Check for GNU ac_path_EGREP and select it if it is found.
4765
-  # Check for GNU $ac_path_EGREP
4766
-case `"$ac_path_EGREP" --version 2>&1` in
4767
-*GNU*)
4768
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4769
-*)
4770
-  ac_count=0
4771
-  $as_echo_n 0123456789 >"conftest.in"
4772
-  while :
4773
-  do
4774
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
4775
-    mv "conftest.tmp" "conftest.in"
4776
-    cp "conftest.in" "conftest.nl"
4777
-    $as_echo 'EGREP' >> "conftest.nl"
4778
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4779
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4780
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
4781
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4782
-      # Best one so far, save it but keep looking for a better one
4783
-      ac_cv_path_EGREP="$ac_path_EGREP"
4784
-      ac_path_EGREP_max=$ac_count
4785
-    fi
4786
-    # 10*(2^10) chars as input seems more than enough
4787
-    test $ac_count -gt 10 && break
4788
-  done
4789
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4790
-esac
4791
-
4792
-      $ac_path_EGREP_found && break 3
4793
-    done
4794
-  done
4795
-  done
4796
-IFS=$as_save_IFS
4797
-  if test -z "$ac_cv_path_EGREP"; then
4798
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4799
-  fi
4800
-else
4801
-  ac_cv_path_EGREP=$EGREP
4802
-fi
4803
-
4804
-   fi
4805
-fi
4806
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4807
-$as_echo "$ac_cv_path_EGREP" >&6; }
4808
- EGREP="$ac_cv_path_EGREP"
4809
-
4810
-
4811 4681
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4812 4682
 $as_echo_n "checking for fgrep... " >&6; }
4813 4683
 if ${ac_cv_path_FGREP+:} false; then :
... ...
@@ -5208,6 +5490,17 @@ fi
5208 5208
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
5209 5209
 $as_echo "$lt_cv_nm_interface" >&6; }
5210 5210
 
5211
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5212
+$as_echo_n "checking whether ln -s works... " >&6; }
5213
+LN_S=$as_ln_s
5214
+if test "$LN_S" = "ln -s"; then
5215
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5216
+$as_echo "yes" >&6; }
5217
+else
5218
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5219
+$as_echo "no, using $LN_S" >&6; }
5220
+fi
5221
+
5211 5222
 # find the maximum length of command line arguments
5212 5223
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
5213 5224
 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
... ...
@@ -6006,7 +6299,6 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6006 6006
 
6007 6007
 
6008 6008
 
6009
-
6010 6009
 if test -n "$ac_tool_prefix"; then
6011 6010
   for ac_prog in ar
6012 6011
   do
... ...
@@ -7710,273 +8002,6 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
7710 7710
     ;;
7711 7711
   esac
7712 7712
 
7713
-ac_ext=c
7714
-ac_cpp='$CPP $CPPFLAGS'
7715
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7716
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7717
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
7718
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7719
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
7720
-# On Suns, sometimes $CPP names a directory.
7721
-if test -n "$CPP" && test -d "$CPP"; then
7722
-  CPP=
7723
-fi
7724
-if test -z "$CPP"; then
7725
-  if ${ac_cv_prog_CPP+:} false; then :
7726
-  $as_echo_n "(cached) " >&6
7727
-else
7728
-      # Double quotes because CPP needs to be expanded
7729
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7730
-    do
7731
-      ac_preproc_ok=false
7732
-for ac_c_preproc_warn_flag in '' yes
7733
-do
7734
-  # Use a header file that comes with gcc, so configuring glibc
7735
-  # with a fresh cross-compiler works.
7736
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7737
-  # <limits.h> exists even on freestanding compilers.
7738
-  # On the NeXT, cc -E runs the code through the compiler's parser,
7739
-  # not just through cpp. "Syntax error" is here to catch this case.
7740
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7741
-/* end confdefs.h.  */
7742
-#ifdef __STDC__
7743
-# include <limits.h>
7744
-#else
7745
-# include <assert.h>
7746
-#endif
7747
-		     Syntax error
7748
-_ACEOF
7749
-if ac_fn_c_try_cpp "$LINENO"; then :
7750
-
7751
-else
7752
-  # Broken: fails on valid input.
7753
-continue
7754
-fi
7755
-rm -f conftest.err conftest.i conftest.$ac_ext
7756
-
7757
-  # OK, works on sane cases.  Now check whether nonexistent headers
7758
-  # can be detected and how.
7759
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7760
-/* end confdefs.h.  */
7761
-#include <ac_nonexistent.h>
7762
-_ACEOF
7763
-if ac_fn_c_try_cpp "$LINENO"; then :
7764
-  # Broken: success on invalid input.
7765
-continue
7766
-else
7767
-  # Passes both tests.
7768
-ac_preproc_ok=:
7769
-break
7770
-fi
7771
-rm -f conftest.err conftest.i conftest.$ac_ext
7772
-
7773
-done
7774
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7775
-rm -f conftest.i conftest.err conftest.$ac_ext
7776
-if $ac_preproc_ok; then :
7777
-  break
7778
-fi
7779
-
7780
-    done
7781
-    ac_cv_prog_CPP=$CPP
7782
-
7783
-fi
7784
-  CPP=$ac_cv_prog_CPP
7785
-else
7786
-  ac_cv_prog_CPP=$CPP
7787
-fi
7788
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7789
-$as_echo "$CPP" >&6; }
7790
-ac_preproc_ok=false
7791
-for ac_c_preproc_warn_flag in '' yes
7792
-do
7793
-  # Use a header file that comes with gcc, so configuring glibc
7794
-  # with a fresh cross-compiler works.
7795
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7796
-  # <limits.h> exists even on freestanding compilers.
7797
-  # On the NeXT, cc -E runs the code through the compiler's parser,
7798
-  # not just through cpp. "Syntax error" is here to catch this case.
7799
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7800
-/* end confdefs.h.  */
7801
-#ifdef __STDC__
7802
-# include <limits.h>
7803
-#else
7804
-# include <assert.h>
7805
-#endif
7806
-		     Syntax error
7807
-_ACEOF
7808
-if ac_fn_c_try_cpp "$LINENO"; then :
7809
-
7810
-else
7811
-  # Broken: fails on valid input.
7812
-continue
7813
-fi
7814
-rm -f conftest.err conftest.i conftest.$ac_ext
7815
-
7816
-  # OK, works on sane cases.  Now check whether nonexistent headers
7817
-  # can be detected and how.
7818
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7819
-/* end confdefs.h.  */
7820
-#include <ac_nonexistent.h>
7821
-_ACEOF
7822
-if ac_fn_c_try_cpp "$LINENO"; then :
7823
-  # Broken: success on invalid input.
7824
-continue
7825
-else
7826
-  # Passes both tests.
7827
-ac_preproc_ok=:
7828
-break
7829
-fi
7830
-rm -f conftest.err conftest.i conftest.$ac_ext
7831
-
7832
-done
7833
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7834
-rm -f conftest.i conftest.err conftest.$ac_ext
7835
-if $ac_preproc_ok; then :
7836
-
7837
-else
7838
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7839
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7840
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7841
-See \`config.log' for more details" "$LINENO" 5; }
7842
-fi
7843
-
7844
-ac_ext=c
7845
-ac_cpp='$CPP $CPPFLAGS'
7846
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7847
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7848
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
7849
-
7850
-
7851
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7852
-$as_echo_n "checking for ANSI C header files... " >&6; }
7853
-if ${ac_cv_header_stdc+:} false; then :
7854
-  $as_echo_n "(cached) " >&6
7855
-else
7856
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7857
-/* end confdefs.h.  */
7858
-#include <stdlib.h>
7859
-#include <stdarg.h>
7860
-#include <string.h>
7861
-#include <float.h>
7862
-
7863
-int
7864
-main ()
7865
-{
7866
-
7867
-  ;
7868
-  return 0;
7869
-}
7870
-_ACEOF
7871
-if ac_fn_c_try_compile "$LINENO"; then :
7872
-  ac_cv_header_stdc=yes
7873
-else
7874
-  ac_cv_header_stdc=no
7875
-fi
7876
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7877
-
7878
-if test $ac_cv_header_stdc = yes; then
7879
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7880
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7881
-/* end confdefs.h.  */
7882
-#include <string.h>
7883
-
7884
-_ACEOF
7885
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7886
-  $EGREP "memchr" >/dev/null 2>&1; then :
7887
-
7888
-else
7889
-  ac_cv_header_stdc=no
7890
-fi
7891
-rm -f conftest*
7892
-
7893
-fi
7894
-
7895
-if test $ac_cv_header_stdc = yes; then
7896
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7897
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7898
-/* end confdefs.h.  */
7899
-#include <stdlib.h>
7900
-
7901
-_ACEOF
7902
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7903
-  $EGREP "free" >/dev/null 2>&1; then :
7904
-
7905
-else
7906
-  ac_cv_header_stdc=no
7907
-fi
7908
-rm -f conftest*
7909
-
7910
-fi
7911
-
7912
-if test $ac_cv_header_stdc = yes; then
7913
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7914
-  if test "$cross_compiling" = yes; then :
7915
-  :
7916
-else
7917
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7918
-/* end confdefs.h.  */
7919
-#include <ctype.h>
7920
-#include <stdlib.h>
7921
-#if ((' ' & 0x0FF) == 0x020)
7922
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7923
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7924
-#else
7925
-# define ISLOWER(c) \
7926
-		   (('a' <= (c) && (c) <= 'i') \
7927
-		     || ('j' <= (c) && (c) <= 'r') \
7928
-		     || ('s' <= (c) && (c) <= 'z'))
7929
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7930
-#endif
7931
-
7932
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7933
-int
7934
-main ()
7935
-{
7936
-  int i;
7937
-  for (i = 0; i < 256; i++)
7938
-    if (XOR (islower (i), ISLOWER (i))
7939
-	|| toupper (i) != TOUPPER (i))
7940
-      return 2;
7941
-  return 0;
7942
-}
7943
-_ACEOF
7944
-if ac_fn_c_try_run "$LINENO"; then :
7945
-
7946
-else
7947
-  ac_cv_header_stdc=no
7948
-fi
7949
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7950
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
7951
-fi
7952
-
7953
-fi
7954
-fi
7955
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7956
-$as_echo "$ac_cv_header_stdc" >&6; }
7957
-if test $ac_cv_header_stdc = yes; then
7958
-
7959
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7960
-
7961
-fi
7962
-
7963
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
7964
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7965
-		  inttypes.h stdint.h unistd.h
7966
-do :
7967
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7968
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7969
-"
7970
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7971
-  cat >>confdefs.h <<_ACEOF
7972
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7973
-_ACEOF
7974
-
7975
-fi
7976
-
7977
-done
7978
-
7979
-
7980 7713
 for ac_header in dlfcn.h
7981 7714
 do :
7982 7715
   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
... ...
@@ -13071,175 +13096,808 @@ eval "LTDLOPEN=\"$libname_spec\""
13071 13071
 # Only expand once:
13072 13072
 
13073 13073
 
13074
-ac_config_files="$ac_config_files libltdl/Makefile"
13075 13074
 
13075
+ac_ext=c
13076
+ac_cpp='$CPP $CPPFLAGS'
13077
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13078
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13079
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
13080
+if test -n "$ac_tool_prefix"; then
13081
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
13082
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
13083
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13084
+$as_echo_n "checking for $ac_word... " >&6; }
13085
+if ${ac_cv_prog_CC+:} false; then :
13086
+  $as_echo_n "(cached) " >&6
13087
+else
13088
+  if test -n "$CC"; then
13089
+  ac_cv_prog_CC="$CC" # Let the user override the test.
13090
+else
13091
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13092
+for as_dir in $PATH
13093
+do
13094
+  IFS=$as_save_IFS
13095
+  test -z "$as_dir" && as_dir=.
13096
+    for ac_exec_ext in '' $ac_executable_extensions; do
13097
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13098
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
13099
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13100
+    break 2
13101
+  fi
13102
+done
13103
+  done
13104
+IFS=$as_save_IFS
13076 13105
 
13077
-major=`expr $LC_CURRENT - $LC_AGE`
13106
+fi
13107
+fi
13108
+CC=$ac_cv_prog_CC
13109
+if test -n "$CC"; then
13110
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
13111
+$as_echo "$CC" >&6; }
13112
+else
13113
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13114
+$as_echo "no" >&6; }
13115
+fi
13078 13116
 
13079
-cat >>confdefs.h <<_ACEOF
13080
-#define LIBCLAMAV_FULLVER "$major.$LC_AGE.$LC_REVISION"
13081
-_ACEOF
13082 13117
 
13118
+fi
13119
+if test -z "$ac_cv_prog_CC"; then
13120
+  ac_ct_CC=$CC
13121
+  # Extract the first word of "gcc", so it can be a program name with args.
13122
+set dummy gcc; ac_word=$2
13123
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124
+$as_echo_n "checking for $ac_word... " >&6; }
13125
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
13126
+  $as_echo_n "(cached) " >&6
13127
+else
13128
+  if test -n "$ac_ct_CC"; then
13129
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
13130
+else
13131
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13132
+for as_dir in $PATH
13133
+do
13134
+  IFS=$as_save_IFS
13135
+  test -z "$as_dir" && as_dir=.
13136
+    for ac_exec_ext in '' $ac_executable_extensions; do
13137
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13138
+    ac_cv_prog_ac_ct_CC="gcc"
13139
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13140
+    break 2
13141
+  fi
13142
+done
13143
+  done
13144
+IFS=$as_save_IFS
13083 13145
 
13084
-cat >>confdefs.h <<_ACEOF
13085
-#define LIBCLAMAV_MAJORVER $major
13086
-_ACEOF
13146
+fi
13147
+fi
13148
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
13149
+if test -n "$ac_ct_CC"; then
13150
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
13151
+$as_echo "$ac_ct_CC" >&6; }
13152
+else
13153
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154
+$as_echo "no" >&6; }
13155
+fi
13087 13156
 
13157
+  if test "x$ac_ct_CC" = x; then
13158
+    CC=""
13159
+  else
13160
+    case $cross_compiling:$ac_tool_warned in
13161
+yes:)
13162
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13163
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13164
+ac_tool_warned=yes ;;
13165
+esac
13166
+    CC=$ac_ct_CC
13167
+  fi
13168
+else
13169
+  CC="$ac_cv_prog_CC"
13170
+fi
13088 13171
 
13089
-$as_echo "#define SCANBUFF 131072" >>confdefs.h
13172
+if test -z "$CC"; then
13173
+          if test -n "$ac_tool_prefix"; then
13174
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
13175
+set dummy ${ac_tool_prefix}cc; ac_word=$2
13176
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13177
+$as_echo_n "checking for $ac_word... " >&6; }
13178
+if ${ac_cv_prog_CC+:} false; then :
13179
+  $as_echo_n "(cached) " >&6
13180
+else
13181
+  if test -n "$CC"; then
13182
+  ac_cv_prog_CC="$CC" # Let the user override the test.
13183
+else
13184
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13185
+for as_dir in $PATH
13186
+do
13187
+  IFS=$as_save_IFS
13188
+  test -z "$as_dir" && as_dir=.
13189
+    for ac_exec_ext in '' $ac_executable_extensions; do
13190
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13191
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
13192
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13193
+    break 2
13194
+  fi
13195
+done
13196
+  done
13197
+IFS=$as_save_IFS
13090 13198
 
13199
+fi
13200
+fi
13201
+CC=$ac_cv_prog_CC
13202
+if test -n "$CC"; then
13203
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
13204
+$as_echo "$CC" >&6; }
13205
+else
13206
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13207
+$as_echo "no" >&6; }
13208
+fi
13091 13209
 
13092
-$as_echo "#define FILEBUFF 8192" >>confdefs.h
13093 13210
 
13211
+  fi
13212
+fi
13213
+if test -z "$CC"; then
13214
+  # Extract the first word of "cc", so it can be a program name with args.
13215
+set dummy cc; ac_word=$2
13216
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13217
+$as_echo_n "checking for $ac_word... " >&6; }
13218
+if ${ac_cv_prog_CC+:} false; then :
13219
+  $as_echo_n "(cached) " >&6
13220
+else
13221
+  if test -n "$CC"; then
13222
+  ac_cv_prog_CC="$CC" # Let the user override the test.
13223
+else
13224
+  ac_prog_rejected=no
13225
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13226
+for as_dir in $PATH
13227
+do
13228
+  IFS=$as_save_IFS
13229
+  test -z "$as_dir" && as_dir=.
13230
+    for ac_exec_ext in '' $ac_executable_extensions; do
13231
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13232
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
13233
+       ac_prog_rejected=yes
13234
+       continue
13235
+     fi
13236
+    ac_cv_prog_CC="cc"
13237
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13238
+    break 2
13239
+  fi
13240
+done
13241
+  done
13242
+IFS=$as_save_IFS
13094 13243
 
13244
+if test $ac_prog_rejected = yes; then
13245
+  # We found a bogon in the path, so make sure we never use it.
13246
+  set dummy $ac_cv_prog_CC
13247
+  shift
13248
+  if test $# != 0; then
13249
+    # We chose a different compiler from the bogus one.
13250
+    # However, it has the same basename, so the bogon will be chosen
13251
+    # first if we set CC to just the basename; use the full file name.
13252
+    shift
13253
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
13254
+  fi
13255
+fi
13256
+fi
13257
+fi
13258
+CC=$ac_cv_prog_CC
13259
+if test -n "$CC"; then
13260
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
13261
+$as_echo "$CC" >&6; }
13262
+else
13263
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13264
+$as_echo "no" >&6; }
13265
+fi
13095 13266
 
13096
-	# Only modify libdir if user has not overriden it
13097
-	default_libdir='${exec_prefix}/lib'
13098
-	if test "$libdir" = "$default_libdir"; then
13099
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multiarch libdir" >&5
13100
-$as_echo_n "checking for multiarch libdir... " >&6; }
13101
-		# Based on http://lists.gnu.org/archive/html/autoconf/2008-09/msg00072.html
13102
-		if test "$GCC" = yes; then
13103
-			ac_multilibdir=`$CC -print-multi-os-directory $CFLAGS $CPPFLAGS $LDFLAGS` || ac_multilibdir=.
13104
-		else
13105
-			ac_multilibdir=.
13106
-		fi
13107
-		case "$ac_multilibdir" in
13108
-			 # I don't know if the first two cases can happen, but it would be a
13109
-			 # bad idea to override $exec_prefix
13110
-			 /* | ../../* | .) acl_libdirstem=lib ;;
13111
-			 ../*)             acl_libdirstem=`echo $ac_multilibdir | sed 's/^...//' ` ;;
13112
-			*)                 acl_libdirstem=lib/$ac_multilibdir ;;
13113
-		esac
13114
-		libdir='${exec_prefix}/'$acl_libdirstem
13115
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdir" >&5
13116
-$as_echo "$libdir" >&6; }
13117
-	else
13118
-		acl_libdirstem=lib
13119
-		if test -d "$libdir"; then
13120
-			case "$libdir" in
13121
-				*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
13122
-				*) searchdir=`cd "$libdir" && pwd`
13123
-				   case "$searchdir" in
13124
-					*/lib64 ) acl_libdirstem=lib64 ;;
13125
-				   esac
13126
-			esac
13127
-		fi
13128
-	fi
13129 13267
 
13268
+fi
13269
+if test -z "$CC"; then
13270
+  if test -n "$ac_tool_prefix"; then
13271
+  for ac_prog in cl.exe
13272
+  do
13273
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13274
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13275
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13276
+$as_echo_n "checking for $ac_word... " >&6; }
13277
+if ${ac_cv_prog_CC+:} false; then :
13278
+  $as_echo_n "(cached) " >&6
13279
+else
13280
+  if test -n "$CC"; then
13281
+  ac_cv_prog_CC="$CC" # Let the user override the test.
13282
+else
13283
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13284
+for as_dir in $PATH
13285
+do
13286
+  IFS=$as_save_IFS
13287
+  test -z "$as_dir" && as_dir=.
13288
+    for ac_exec_ext in '' $ac_executable_extensions; do
13289
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13290
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
13291
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13292
+    break 2
13293
+  fi
13294
+done
13295
+  done
13296
+IFS=$as_save_IFS
13297
+
13298
+fi
13299
+fi
13300
+CC=$ac_cv_prog_CC
13301
+if test -n "$CC"; then
13302
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
13303
+$as_echo "$CC" >&6; }
13304
+else
13305
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13306
+$as_echo "no" >&6; }
13307
+fi
13130 13308
 
13131
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13132
-$as_echo_n "checking for ANSI C header files... " >&6; }
13133
-if ${ac_cv_header_stdc+:} false; then :
13309
+
13310
+    test -n "$CC" && break
13311
+  done
13312
+fi
13313
+if test -z "$CC"; then
13314
+  ac_ct_CC=$CC
13315
+  for ac_prog in cl.exe
13316
+do
13317
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
13318
+set dummy $ac_prog; ac_word=$2
13319
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13320
+$as_echo_n "checking for $ac_word... " >&6; }
13321
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
13322
+  $as_echo_n "(cached) " >&6
13323
+else
13324
+  if test -n "$ac_ct_CC"; then
13325
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
13326
+else
13327
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13328
+for as_dir in $PATH
13329
+do
13330
+  IFS=$as_save_IFS
13331
+  test -z "$as_dir" && as_dir=.
13332
+    for ac_exec_ext in '' $ac_executable_extensions; do
13333
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13334
+    ac_cv_prog_ac_ct_CC="$ac_prog"
13335
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13336
+    break 2
13337
+  fi
13338
+done
13339
+  done
13340
+IFS=$as_save_IFS
13341
+
13342
+fi
13343
+fi
13344
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
13345
+if test -n "$ac_ct_CC"; then
13346
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
13347
+$as_echo "$ac_ct_CC" >&6; }
13348
+else
13349
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13350
+$as_echo "no" >&6; }
13351
+fi
13352
+
13353
+
13354
+  test -n "$ac_ct_CC" && break
13355
+done
13356
+
13357
+  if test "x$ac_ct_CC" = x; then
13358
+    CC=""
13359
+  else
13360
+    case $cross_compiling:$ac_tool_warned in
13361
+yes:)
13362
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13363
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13364
+ac_tool_warned=yes ;;
13365
+esac
13366
+    CC=$ac_ct_CC
13367
+  fi
13368
+fi
13369
+
13370
+fi
13371
+
13372
+
13373
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13374
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13375
+as_fn_error $? "no acceptable C compiler found in \$PATH
13376
+See \`config.log' for more details" "$LINENO" 5; }
13377
+
13378
+# Provide some information about the compiler.
13379
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
13380
+set X $ac_compile
13381
+ac_compiler=$2
13382
+for ac_option in --version -v -V -qversion; do
13383
+  { { ac_try="$ac_compiler $ac_option >&5"
13384
+case "(($ac_try" in
13385
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13386
+  *) ac_try_echo=$ac_try;;
13387
+esac
13388
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13389
+$as_echo "$ac_try_echo"; } >&5
13390
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
13391
+  ac_status=$?
13392
+  if test -s conftest.err; then
13393
+    sed '10a\
13394
+... rest of stderr output deleted ...
13395
+         10q' conftest.err >conftest.er1
13396
+    cat conftest.er1 >&5
13397
+  fi
13398
+  rm -f conftest.er1 conftest.err
13399
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13400
+  test $ac_status = 0; }
13401
+done
13402
+
13403
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
13404
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
13405
+if ${ac_cv_c_compiler_gnu+:} false; then :
13134 13406
   $as_echo_n "(cached) " >&6
13135 13407
 else
13136 13408
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13137 13409
 /* end confdefs.h.  */
13138
-#include <stdlib.h>
13139
-#include <stdarg.h>
13140
-#include <string.h>
13141
-#include <float.h>
13142 13410
 
13143 13411
 int
13144 13412
 main ()
13145 13413
 {
13414
+#ifndef __GNUC__
13415
+       choke me
13416
+#endif
13146 13417
 
13147 13418
   ;
13148 13419
   return 0;
13149 13420
 }
13150 13421
 _ACEOF
13151 13422
 if ac_fn_c_try_compile "$LINENO"; then :
13152
-  ac_cv_header_stdc=yes
13423
+  ac_compiler_gnu=yes
13153 13424
 else
13154
-  ac_cv_header_stdc=no
13425
+  ac_compiler_gnu=no
13155 13426
 fi
13156 13427
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13428
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
13157 13429
 
13158
-if test $ac_cv_header_stdc = yes; then
13159
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13160
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13430
+fi
13431
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
13432
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
13433
+if test $ac_compiler_gnu = yes; then
13434
+  GCC=yes
13435
+else
13436
+  GCC=
13437
+fi
13438
+ac_test_CFLAGS=${CFLAGS+set}
13439
+ac_save_CFLAGS=$CFLAGS
13440
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
13441
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
13442
+if ${ac_cv_prog_cc_g+:} false; then :
13443
+  $as_echo_n "(cached) " >&6
13444
+else
13445
+  ac_save_c_werror_flag=$ac_c_werror_flag
13446
+   ac_c_werror_flag=yes
13447
+   ac_cv_prog_cc_g=no
13448
+   CFLAGS="-g"
13449
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13161 13450
 /* end confdefs.h.  */
13162
-#include <string.h>
13163 13451
 
13452
+int
13453
+main ()
13454
+{
13455
+
13456
+  ;
13457
+  return 0;
13458
+}
13164 13459
 _ACEOF
13165
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13166
-  $EGREP "memchr" >/dev/null 2>&1; then :
13460
+if ac_fn_c_try_compile "$LINENO"; then :
13461
+  ac_cv_prog_cc_g=yes
13462
+else
13463
+  CFLAGS=""
13464
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13465
+/* end confdefs.h.  */
13466
+
13467
+int
13468
+main ()
13469
+{
13470
+
13471
+  ;
13472
+  return 0;
13473
+}
13474
+_ACEOF
13475
+if ac_fn_c_try_compile "$LINENO"; then :
13167 13476
 
13168 13477
 else
13169
-  ac_cv_header_stdc=no
13170
-fi
13171
-rm -f conftest*
13478
+  ac_c_werror_flag=$ac_save_c_werror_flag
13479
+	 CFLAGS="-g"
13480
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13481
+/* end confdefs.h.  */
13172 13482
 
13173
-fi
13483
+int
13484
+main ()
13485
+{
13174 13486
 
13175
-if test $ac_cv_header_stdc = yes; then
13176
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13177
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13487
+  ;
13488
+  return 0;
13489
+}
13490
+_ACEOF
13491
+if ac_fn_c_try_compile "$LINENO"; then :
13492
+  ac_cv_prog_cc_g=yes
13493
+fi
13494
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13495
+fi
13496
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13497
+fi
13498
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13499
+   ac_c_werror_flag=$ac_save_c_werror_flag
13500
+fi
13501
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
13502
+$as_echo "$ac_cv_prog_cc_g" >&6; }
13503
+if test "$ac_test_CFLAGS" = set; then
13504
+  CFLAGS=$ac_save_CFLAGS
13505
+elif test $ac_cv_prog_cc_g = yes; then
13506
+  if test "$GCC" = yes; then
13507
+    CFLAGS="-g -O2"
13508
+  else
13509
+    CFLAGS="-g"
13510
+  fi
13511
+else
13512
+  if test "$GCC" = yes; then
13513
+    CFLAGS="-O2"
13514
+  else
13515
+    CFLAGS=
13516
+  fi
13517
+fi
13518
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
13519
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
13520
+if ${ac_cv_prog_cc_c89+:} false; then :
13521
+  $as_echo_n "(cached) " >&6
13522
+else
13523
+  ac_cv_prog_cc_c89=no
13524
+ac_save_CC=$CC
13525
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13178 13526
 /* end confdefs.h.  */
13179
-#include <stdlib.h>
13527
+#include <stdarg.h>
13528
+#include <stdio.h>
13529
+struct stat;
13530
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13531
+struct buf { int x; };
13532
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
13533
+static char *e (p, i)
13534
+     char **p;
13535
+     int i;
13536
+{
13537
+  return p[i];
13538
+}
13539
+static char *f (char * (*g) (char **, int), char **p, ...)
13540
+{
13541
+  char *s;
13542
+  va_list v;
13543
+  va_start (v,p);
13544
+  s = g (p, va_arg (v,int));
13545
+  va_end (v);
13546
+  return s;
13547
+}
13548
+
13549
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
13550
+   function prototypes and stuff, but not '\xHH' hex character constants.
13551
+   These don't provoke an error unfortunately, instead are silently treated
13552
+   as 'x'.  The following induces an error, until -std is added to get
13553
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
13554
+   array size at least.  It's necessary to write '\x00'==0 to get something
13555
+   that's true only with -std.  */
13556
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
13557
+
13558
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
13559
+   inside strings and character constants.  */
13560
+#define FOO(x) 'x'
13561
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
13180 13562
 
13563
+int test (int i, double x);
13564
+struct s1 {int (*f) (int a);};
13565
+struct s2 {int (*f) (double a);};
13566
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13567
+int argc;
13568
+char **argv;
13569
+int
13570
+main ()
13571
+{
13572
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13573
+  ;
13574
+  return 0;
13575
+}
13181 13576
 _ACEOF
13182
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13183
-  $EGREP "free" >/dev/null 2>&1; then :
13577
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
13578
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13579
+do
13580
+  CC="$ac_save_CC $ac_arg"
13581
+  if ac_fn_c_try_compile "$LINENO"; then :
13582
+  ac_cv_prog_cc_c89=$ac_arg
13583
+fi
13584
+rm -f core conftest.err conftest.$ac_objext
13585
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
13586
+done
13587
+rm -f conftest.$ac_ext
13588
+CC=$ac_save_CC
13184 13589
 
13590
+fi
13591
+# AC_CACHE_VAL
13592
+case "x$ac_cv_prog_cc_c89" in
13593
+  x)
13594
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
13595
+$as_echo "none needed" >&6; } ;;
13596
+  xno)
13597
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
13598
+$as_echo "unsupported" >&6; } ;;
13599
+  *)
13600
+    CC="$CC $ac_cv_prog_cc_c89"
13601
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
13602
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
13603
+esac
13604
+if test "x$ac_cv_prog_cc_c89" != xno; then :
13605
+
13606
+fi
13607
+
13608
+ac_ext=c
13609
+ac_cpp='$CPP $CPPFLAGS'
13610
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13611
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13612
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
13613
+
13614
+
13615
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
13616
+$as_echo_n "checking whether ln -s works... " >&6; }
13617
+LN_S=$as_ln_s
13618
+if test "$LN_S" = "ln -s"; then
13619
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13620
+$as_echo "yes" >&6; }
13185 13621
 else
13186
-  ac_cv_header_stdc=no
13622
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
13623
+$as_echo "no, using $LN_S" >&6; }
13187 13624
 fi
13188
-rm -f conftest*
13189 13625
 
13626
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
13627
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
13628
+set x ${MAKE-make}
13629
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
13630
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
13631
+  $as_echo_n "(cached) " >&6
13632
+else
13633
+  cat >conftest.make <<\_ACEOF
13634
+SHELL = /bin/sh
13635
+all:
13636
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
13637
+_ACEOF
13638
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
13639
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
13640
+  *@@@%%%=?*=@@@%%%*)
13641
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
13642
+  *)
13643
+    eval ac_cv_prog_make_${ac_make}_set=no;;
13644
+esac
13645
+rm -f conftest.make
13646
+fi
13647
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
13648
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13649
+$as_echo "yes" >&6; }
13650
+  SET_MAKE=
13651
+else
13652
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13653
+$as_echo "no" >&6; }
13654
+  SET_MAKE="MAKE=${MAKE-make}"
13190 13655
 fi
13191 13656
 
13192
-if test $ac_cv_header_stdc = yes; then
13193
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13194
-  if test "$cross_compiling" = yes; then :
13195
-  :
13657
+
13658
+
13659
+LIBM=
13660
+case $host in
13661
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
13662
+  # These system don't have libm, or don't need it
13663
+  ;;
13664
+*-ncr-sysv4.3*)
13665
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
13666
+$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
13667
+if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then :
13668
+  $as_echo_n "(cached) " >&6
13196 13669
 else
13197
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13670
+  ac_check_lib_save_LIBS=$LIBS
13671
+LIBS="-lmw  $LIBS"
13672
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13198 13673
 /* end confdefs.h.  */
13199
-#include <ctype.h>
13200
-#include <stdlib.h>
13201
-#if ((' ' & 0x0FF) == 0x020)
13202
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13203
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13204
-#else
13205
-# define ISLOWER(c) \
13206
-		   (('a' <= (c) && (c) <= 'i') \
13207
-		     || ('j' <= (c) && (c) <= 'r') \
13208
-		     || ('s' <= (c) && (c) <= 'z'))
13209
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13674
+
13675
+/* Override any GCC internal prototype to avoid an error.
13676
+   Use char because int might match the return type of a GCC
13677
+   builtin and then its argument prototype would still apply.  */
13678
+#ifdef __cplusplus
13679
+extern "C"
13210 13680
 #endif
13681
+char _mwvalidcheckl ();
13682
+int
13683
+main ()
13684
+{
13685
+return _mwvalidcheckl ();
13686
+  ;
13687
+  return 0;
13688
+}
13689
+_ACEOF
13690
+if ac_fn_c_try_link "$LINENO"; then :
13691
+  ac_cv_lib_mw__mwvalidcheckl=yes
13692
+else
13693
+  ac_cv_lib_mw__mwvalidcheckl=no
13694
+fi
13695
+rm -f core conftest.err conftest.$ac_objext \
13696
+    conftest$ac_exeext conftest.$ac_ext
13697
+LIBS=$ac_check_lib_save_LIBS
13698
+fi
13699
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
13700
+$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
13701
+if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then :
13702
+  LIBM="-lmw"
13703
+fi
13211 13704
 
13212
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13705
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
13706
+$as_echo_n "checking for cos in -lm... " >&6; }
13707
+if ${ac_cv_lib_m_cos+:} false; then :
13708
+  $as_echo_n "(cached) " >&6
13709
+else
13710
+  ac_check_lib_save_LIBS=$LIBS
13711
+LIBS="-lm  $LIBS"
13712
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13713
+/* end confdefs.h.  */
13714
+
13715
+/* Override any GCC internal prototype to avoid an error.
13716
+   Use char because int might match the return type of a GCC
13717
+   builtin and then its argument prototype would still apply.  */
13718
+#ifdef __cplusplus
13719
+extern "C"
13720
+#endif
13721
+char cos ();
13213 13722
 int
13214 13723
 main ()
13215 13724
 {
13216
-  int i;
13217
-  for (i = 0; i < 256; i++)
13218
-    if (XOR (islower (i), ISLOWER (i))
13219
-	|| toupper (i) != TOUPPER (i))
13220
-      return 2;
13725
+return cos ();
13726
+  ;
13221 13727
   return 0;
13222 13728
 }
13223 13729
 _ACEOF
13224
-if ac_fn_c_try_run "$LINENO"; then :
13730
+if ac_fn_c_try_link "$LINENO"; then :
13731
+  ac_cv_lib_m_cos=yes
13732
+else
13733
+  ac_cv_lib_m_cos=no
13734
+fi
13735
+rm -f core conftest.err conftest.$ac_objext \
13736
+    conftest$ac_exeext conftest.$ac_ext
13737
+LIBS=$ac_check_lib_save_LIBS
13738
+fi
13739
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
13740
+$as_echo "$ac_cv_lib_m_cos" >&6; }
13741
+if test "x$ac_cv_lib_m_cos" = xyes; then :
13742
+  LIBM="$LIBM -lm"
13743
+fi
13225 13744
 
13745
+  ;;
13746
+*)
13747
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
13748
+$as_echo_n "checking for cos in -lm... " >&6; }
13749
+if ${ac_cv_lib_m_cos+:} false; then :
13750
+  $as_echo_n "(cached) " >&6
13226 13751
 else
13227
-  ac_cv_header_stdc=no
13752
+  ac_check_lib_save_LIBS=$LIBS
13753
+LIBS="-lm  $LIBS"
13754
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13755
+/* end confdefs.h.  */
13756
+
13757
+/* Override any GCC internal prototype to avoid an error.
13758
+   Use char because int might match the return type of a GCC
13759
+   builtin and then its argument prototype would still apply.  */
13760
+#ifdef __cplusplus
13761
+extern "C"
13762
+#endif
13763
+char cos ();
13764
+int
13765
+main ()
13766
+{
13767
+return cos ();
13768
+  ;
13769
+  return 0;
13770
+}
13771
+_ACEOF
13772
+if ac_fn_c_try_link "$LINENO"; then :
13773
+  ac_cv_lib_m_cos=yes
13774
+else
13775
+  ac_cv_lib_m_cos=no
13228 13776
 fi
13229
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13230
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
13777
+rm -f core conftest.err conftest.$ac_objext \
13778
+    conftest$ac_exeext conftest.$ac_ext
13779
+LIBS=$ac_check_lib_save_LIBS
13780
+fi
13781
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
13782
+$as_echo "$ac_cv_lib_m_cos" >&6; }
13783
+if test "x$ac_cv_lib_m_cos" = xyes; then :
13784
+  LIBM="-lm"
13231 13785
 fi
13232 13786
 
13787
+  ;;
13788
+esac
13789
+
13790
+
13791
+
13792
+$ac_includes_default
13793
+
13794
+for ac_header in stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h sys/times.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
13795
+do :
13796
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13797
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13798
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13799
+  cat >>confdefs.h <<_ACEOF
13800
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13801
+_ACEOF
13802
+
13233 13803
 fi
13804
+
13805
+done
13806
+
13807
+ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13808
+if test "x$ac_cv_header_syslog_h" = xyes; then :
13809
+
13810
+$as_echo "#define USE_SYSLOG 1" >>confdefs.h
13811
+
13234 13812
 fi
13235
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13236
-$as_echo "$ac_cv_header_stdc" >&6; }
13237
-if test $ac_cv_header_stdc = yes; then
13238 13813
 
13239
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
13240 13814
 
13815
+
13816
+have_pthreads=no
13817
+ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
13818
+if test "x$ac_cv_header_pthread_h" = xyes; then :
13819
+  have_pthreads=yes
13241 13820
 fi
13242 13821
 
13822
+
13823
+if test "$have_pthreads" = "yes"; then
13824
+
13825
+$as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h
13826
+
13827
+fi
13828
+
13829
+
13830
+ac_config_files="$ac_config_files libltdl/Makefile"
13831
+
13832
+
13833
+
13834
+$as_echo "#define SCANBUFF 131072" >>confdefs.h
13835
+
13836
+
13837
+$as_echo "#define FILEBUFF 8192" >>confdefs.h
13838
+
13839
+
13840
+
13841
+	# Only modify libdir if user has not overriden it
13842
+	default_libdir='${exec_prefix}/lib'
13843
+	if test "$libdir" = "$default_libdir"; then
13844
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multiarch libdir" >&5
13845
+$as_echo_n "checking for multiarch libdir... " >&6; }
13846
+		# Based on http://lists.gnu.org/archive/html/autoconf/2008-09/msg00072.html
13847
+		if test "$GCC" = yes; then
13848
+			ac_multilibdir=`$CC -print-multi-os-directory $CFLAGS $CPPFLAGS $LDFLAGS` || ac_multilibdir=.
13849
+		else
13850
+			ac_multilibdir=.
13851
+		fi
13852
+		case "$ac_multilibdir" in
13853
+			 # I don't know if the first two cases can happen, but it would be a
13854
+			 # bad idea to override $exec_prefix
13855
+			 /* | ../../* | .) acl_libdirstem=lib ;;
13856
+			 ../*)             acl_libdirstem=`echo $ac_multilibdir | sed 's/^...//' ` ;;
13857
+			*)                 acl_libdirstem=lib/$ac_multilibdir ;;
13858
+		esac
13859
+		libdir='${exec_prefix}/'$acl_libdirstem
13860
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdir" >&5
13861
+$as_echo "$libdir" >&6; }
13862
+	else
13863
+		acl_libdirstem=lib
13864
+		if test -d "$libdir"; then
13865
+			case "$libdir" in
13866
+				*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
13867
+				*) searchdir=`cd "$libdir" && pwd`
13868
+				   case "$searchdir" in
13869
+					*/lib64 ) acl_libdirstem=lib64 ;;
13870
+				   esac
13871
+			esac
13872
+		fi
13873
+	fi
13874
+
13875
+
13243 13876
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
13244 13877
 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
13245 13878
 if ${ac_cv_c_restrict+:} false; then :
... ...
@@ -13634,139 +14292,6 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13634 13634
  esac
13635 13635
 
13636 13636
 
13637
-LIBM=
13638
-case $host in
13639
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
13640
-  # These system don't have libm, or don't need it
13641
-  ;;
13642
-*-ncr-sysv4.3*)
13643
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
13644
-$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
13645
-if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then :
13646
-  $as_echo_n "(cached) " >&6
13647
-else
13648
-  ac_check_lib_save_LIBS=$LIBS
13649
-LIBS="-lmw  $LIBS"
13650
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13651
-/* end confdefs.h.  */
13652
-
13653
-/* Override any GCC internal prototype to avoid an error.
13654
-   Use char because int might match the return type of a GCC
13655
-   builtin and then its argument prototype would still apply.  */
13656
-#ifdef __cplusplus
13657
-extern "C"
13658
-#endif
13659
-char _mwvalidcheckl ();
13660
-int
13661
-main ()
13662
-{
13663
-return _mwvalidcheckl ();
13664
-  ;
13665
-  return 0;
13666
-}
13667
-_ACEOF
13668
-if ac_fn_c_try_link "$LINENO"; then :
13669
-  ac_cv_lib_mw__mwvalidcheckl=yes
13670
-else
13671
-  ac_cv_lib_mw__mwvalidcheckl=no
13672
-fi
13673
-rm -f core conftest.err conftest.$ac_objext \
13674
-    conftest$ac_exeext conftest.$ac_ext
13675
-LIBS=$ac_check_lib_save_LIBS
13676
-fi
13677
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
13678
-$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
13679
-if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then :
13680
-  LIBM="-lmw"
13681
-fi
13682
-
13683
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
13684
-$as_echo_n "checking for cos in -lm... " >&6; }
13685
-if ${ac_cv_lib_m_cos+:} false; then :
13686
-  $as_echo_n "(cached) " >&6
13687
-else
13688
-  ac_check_lib_save_LIBS=$LIBS
13689
-LIBS="-lm  $LIBS"
13690
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13691
-/* end confdefs.h.  */
13692
-
13693
-/* Override any GCC internal prototype to avoid an error.
13694
-   Use char because int might match the return type of a GCC
13695
-   builtin and then its argument prototype would still apply.  */
13696
-#ifdef __cplusplus
13697
-extern "C"
13698
-#endif
13699
-char cos ();
13700
-int
13701
-main ()
13702
-{
13703
-return cos ();
13704
-  ;
13705
-  return 0;
13706
-}
13707
-_ACEOF
13708
-if ac_fn_c_try_link "$LINENO"; then :
13709
-  ac_cv_lib_m_cos=yes
13710
-else
13711
-  ac_cv_lib_m_cos=no
13712
-fi
13713
-rm -f core conftest.err conftest.$ac_objext \
13714
-    conftest$ac_exeext conftest.$ac_ext
13715
-LIBS=$ac_check_lib_save_LIBS
13716
-fi
13717
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
13718
-$as_echo "$ac_cv_lib_m_cos" >&6; }
13719
-if test "x$ac_cv_lib_m_cos" = xyes; then :
13720
-  LIBM="$LIBM -lm"
13721
-fi
13722
-
13723
-  ;;
13724
-*)
13725
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
13726
-$as_echo_n "checking for cos in -lm... " >&6; }
13727
-if ${ac_cv_lib_m_cos+:} false; then :
13728
-  $as_echo_n "(cached) " >&6
13729
-else
13730
-  ac_check_lib_save_LIBS=$LIBS
13731
-LIBS="-lm  $LIBS"
13732
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733
-/* end confdefs.h.  */
13734
-
13735
-/* Override any GCC internal prototype to avoid an error.
13736
-   Use char because int might match the return type of a GCC
13737
-   builtin and then its argument prototype would still apply.  */
13738
-#ifdef __cplusplus
13739
-extern "C"
13740
-#endif
13741
-char cos ();
13742
-int
13743
-main ()
13744
-{
13745
-return cos ();
13746
-  ;
13747
-  return 0;
13748
-}
13749
-_ACEOF
13750
-if ac_fn_c_try_link "$LINENO"; then :
13751
-  ac_cv_lib_m_cos=yes
13752
-else
13753
-  ac_cv_lib_m_cos=no
13754
-fi
13755
-rm -f core conftest.err conftest.$ac_objext \
13756
-    conftest$ac_exeext conftest.$ac_ext
13757
-LIBS=$ac_check_lib_save_LIBS
13758
-fi
13759
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
13760
-$as_echo "$ac_cv_lib_m_cos" >&6; }
13761
-if test "x$ac_cv_lib_m_cos" = xyes; then :
13762
-  LIBM="-lm"
13763
-fi
13764
-
13765
-  ;;
13766
-esac
13767
-
13768
-
13769
-
13770 13637
 # Check whether --enable-gcc-vcheck was given.
13771 13638
 if test "${enable_gcc_vcheck+set}" = set; then :
13772 13639
   enableval=$enable_gcc_vcheck; gcc_check=$enableval
... ...
@@ -14115,102 +14640,12 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14115 14115
 fi
14116 14116
 
14117 14117
 
14118
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld --version-script" >&5
14119
-$as_echo_n "checking for ld --version-script... " >&6; }
14120
-if ${ac_cv_ld_version_script+:} false; then :
14121
-  $as_echo_n "(cached) " >&6
14122
-else
14123
-    cat > conftest.c <<EOF
14124
-void cl_symbol1(void) {}
14125
-void cli_symbol2(void) {}
14126
-EOF
14127
-  cat > conftest.map <<EOF
14128
-RELEASE
14129
-{
14130
-	global:
14131
-		cl_*;
14132
-	local:
14133
-		*;
14134
-};
14135
-PRIVATE
14136
-{
14137
-	global:
14138
-		cli_*;
14139
-	local:
14140
-		*;
14141
-};
14142
-EOF
14143
-    if { ac_try='${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
14144
-				-o conftest.so conftest.c
14145
-				-Wl,--version-script,conftest.map
14146
-		       1>&5'
14147
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
14148
-  (eval $ac_try) 2>&5
14149
-  ac_status=$?
14150
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14151
-  test $ac_status = 0; }; };
14152
-  then
14153
-      VERSIONSCRIPTFLAG=--version-script
14154
-      ac_cv_ld_version_script=yes
14155
-  else
14156
-		if { ac_try='${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
14157
-				-o conftest.so conftest.c
14158
-				-Wl,-M,conftest.map
14159
-			1>&5'
14160
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
14161
-  (eval $ac_try) 2>&5
14162
-  ac_status=$?
14163
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14164
-  test $ac_status = 0; }; };
14165
-	then
14166
-		VERSIONSCRIPTFLAG=-M
14167
-		ac_cv_ld_version_script=yes;
14168
-	else
14169
-		ac_cv_ld_version_script=no
14170
-	fi
14171
-  fi
14172
- rm -f conftest*
14173
-fi
14174
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_version_script" >&5
14175
-$as_echo "$ac_cv_ld_version_script" >&6; }
14176
-
14177
- if test "x$ac_cv_ld_version_script" = "xyes"; then
14178
-  VERSIONSCRIPT_TRUE=
14179
-  VERSIONSCRIPT_FALSE='#'
14180
-else
14181
-  VERSIONSCRIPT_TRUE='#'
14182
-  VERSIONSCRIPT_FALSE=
14183
-fi
14184
-
14185
-
14186
-# it is not fatal if gperf is missing
14118
+# It's not fatal if gperf is missing
14187 14119
 
14188 14120
 GPERF=${GPERF-"${am_missing_run}gperf"}
14189 14121
 
14190 14122
 
14191 14123
 
14192
-for ac_header in stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h sys/times.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
14193
-do :
14194
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14195
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14196
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14197
-  cat >>confdefs.h <<_ACEOF
14198
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14199
-_ACEOF
14200
-
14201
-fi
14202
-
14203
-done
14204
-
14205
-ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
14206
-if test "x$ac_cv_header_syslog_h" = xyes; then :
14207
-
14208
-$as_echo "#define USE_SYSLOG 1" >>confdefs.h
14209
-
14210
-fi
14211
-
14212
-
14213
-
14214 14124
 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
14215 14125
 if test "x$ac_cv_type_off_t" = xyes; then :
14216 14126
 
... ...
@@ -14423,49 +14858,71 @@ _ACEOF
14423 14423
 
14424 14424
 
14425 14425
 
14426
-for ac_func in sysctlbyname
14427
-do :
14428
-  ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname"
14429
-if test "x$ac_cv_func_sysctlbyname" = xyes; then :
14430
-  cat >>confdefs.h <<_ACEOF
14431
-#define HAVE_SYSCTLBYNAME 1
14432
-_ACEOF
14433
-
14434
-fi
14435
-done
14436
-
14437
-for ac_func in getifaddrs
14438
-do :
14439
-  ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
14440
-if test "x$ac_cv_func_getifaddrs" = xyes; then :
14441
-  cat >>confdefs.h <<_ACEOF
14442
-#define HAVE_GETIFADDRS 1
14443
-_ACEOF
14444
-
14445
-fi
14446
-done
14447
-
14448
-ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
14449
-if test "x$ac_cv_header_fcntl_h" = xyes; then :
14450
-
14451
-$as_echo "#define HAVE_FCNTL_H 1" >>confdefs.h
14452
-
14453
-fi
14454
-
14455
-
14456
-ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14457
-if test "x$ac_cv_header_pthread_h" = xyes; then :
14458
-
14459
-$as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h
14460
-
14426
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld --version-script" >&5
14427
+$as_echo_n "checking for ld --version-script... " >&6; }
14428
+if ${ac_cv_ld_version_script+:} false; then :
14429
+  $as_echo_n "(cached) " >&6
14430
+else
14431
+    cat > conftest.c <<EOF
14432
+void cl_symbol1(void) {}
14433
+void cli_symbol2(void) {}
14434
+EOF
14435
+  cat > conftest.map <<EOF
14436
+RELEASE
14437
+{
14438
+	global:
14439
+		cl_*;
14440
+	local:
14441
+		*;
14442
+};
14443
+PRIVATE
14444
+{
14445
+	global:
14446
+		cli_*;
14447
+	local:
14448
+		*;
14449
+};
14450
+EOF
14451
+    if { ac_try='${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
14452
+				-o conftest.so conftest.c
14453
+				-Wl,--version-script,conftest.map
14454
+		       1>&5'
14455
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
14456
+  (eval $ac_try) 2>&5
14457
+  ac_status=$?
14458
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14459
+  test $ac_status = 0; }; };
14460
+  then
14461
+      VERSIONSCRIPTFLAG=--version-script
14462
+      ac_cv_ld_version_script=yes
14463
+  else
14464
+		if { ac_try='${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
14465
+				-o conftest.so conftest.c
14466
+				-Wl,-M,conftest.map
14467
+			1>&5'
14468
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
14469
+  (eval $ac_try) 2>&5
14470
+  ac_status=$?
14471
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14472
+  test $ac_status = 0; }; };
14473
+	then
14474
+		VERSIONSCRIPTFLAG=-M
14475
+		ac_cv_ld_version_script=yes;
14476
+	else
14477
+		ac_cv_ld_version_script=no
14478
+	fi
14479
+  fi
14480
+ rm -f conftest*
14461 14481
 fi
14482
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ld_version_script" >&5
14483
+$as_echo "$ac_cv_ld_version_script" >&6; }
14462 14484
 
14463
-
14464
-ac_fn_c_check_header_mongrel "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default"
14465
-if test "x$ac_cv_header_net_if_dl_h" = xyes; then :
14466
-
14467
-$as_echo "#define HAVE_NET_IF_DL_H 1" >>confdefs.h
14468
-
14485
+ if test "x$ac_cv_ld_version_script" = "xyes"; then
14486
+  VERSIONSCRIPT_TRUE=
14487
+  VERSIONSCRIPT_FALSE='#'
14488
+else
14489
+  VERSIONSCRIPT_TRUE='#'
14490
+  VERSIONSCRIPT_FALSE=
14469 14491
 fi
14470 14492
 
14471 14493
 
... ...
@@ -14936,6 +15393,19 @@ _ACEOF
14936 14936
 
14937 14937
 	fi
14938 14938
 
14939
+
14940
+for ac_func in enable_extended_FILE_stdio
14941
+do :
14942
+  ac_fn_c_check_func "$LINENO" "enable_extended_FILE_stdio" "ac_cv_func_enable_extended_FILE_stdio"
14943
+if test "x$ac_cv_func_enable_extended_FILE_stdio" = xyes; then :
14944
+  cat >>confdefs.h <<_ACEOF
14945
+#define HAVE_ENABLE_EXTENDED_FILE_STDIO 1
14946
+_ACEOF
14947
+
14948
+fi
14949
+done
14950
+
14951
+
14939 14952
 # Check whether --enable-mempool was given.
14940 14953
 if test "${enable_mempool+set}" = set; then :
14941 14954
   enableval=$enable_mempool; enable_mempool=$enableval
... ...
@@ -15841,13 +16311,6 @@ else
15841 15841
 fi
15842 15842
 
15843 15843
 
15844
-have_pthreads=no
15845
-ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15846
-if test "x$ac_cv_header_pthread_h" = xyes; then :
15847
-  have_pthreads=yes
15848
-fi
15849
-
15850
-
15851 15844
 
15852 15845
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
15853 15846
 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
... ...
@@ -15871,6 +16334,7 @@ fi
15871 15871
   MAINT=$MAINTAINER_MODE_TRUE
15872 15872
 
15873 15873
 
15874
+
15874 15875
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib installation" >&5
15875 15876
 $as_echo_n "checking for zlib installation... " >&6; }
15876 15877
 
... ...
@@ -15933,8 +16397,8 @@ $as_echo "$as_me: WARNING: ****** stability problems to the ClamAV developers!"
15933 15933
     if test "$ZLIB_HOME" != "/usr"; then
15934 15934
 	CPPFLAGS="$CPPFLAGS -I$ZLIB_HOME/include"
15935 15935
 	save_LDFLAGS="$LDFLAGS"
15936
-	LDFLAGS="$LDFLAGS -L$ZLIB_HOME/lib"
15937
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
15936
+    LDFLAGS="$LDFLAGS -L$ZLIB_HOME/lib"
15937
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateEnd in -lz" >&5
15938 15938
 $as_echo_n "checking for inflateEnd in -lz... " >&6; }
15939 15939
 if ${ac_cv_lib_z_inflateEnd+:} false; then :
15940 15940
   $as_echo_n "(cached) " >&6
... ...
@@ -16118,6 +16582,7 @@ fi
16118 16118
     LIBS="$save_LIBS"
16119 16119
 fi
16120 16120
 
16121
+
16121 16122
 # Check whether --enable-bzip2 was given.
16122 16123
 if test "${enable_bzip2+set}" = set; then :
16123 16124
   enableval=$enable_bzip2; want_bzip2=$enableval
... ...
@@ -16953,93 +17418,6 @@ $as_echo "$as_me: WARNING: ****** bzip2 support disabled" >&2;}
16953 16953
     fi
16954 16954
 fi
16955 16955
 
16956
-have_curl="no"
16957
-curl_msg="Please use the web interface for submitting FPs/FNs."
16958
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl installation" >&5
16959
-$as_echo_n "checking for libcurl installation... " >&6; }
16960
-
16961
-
16962
-# Check whether --with-libcurl was given.
16963
-if test "${with_libcurl+set}" = set; then :
16964
-  withval=$with_libcurl;
16965
-if test "$withval"; then
16966
-    LIBCURL_HOME="$withval"
16967
-fi
16968
-
16969
-else
16970
-
16971
-LIBCURL_HOME=/usr/local
16972
-if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
16973
-then
16974
-    LIBCURL_HOME=/usr
16975
-fi
16976
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5
16977
-$as_echo "$LIBCURL_HOME" >&6; }
16978
-
16979
-fi
16980
-
16981
-
16982
-if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
16983
-then
16984
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcurl not found. Please use the web interface for submitting FPs/FNs." >&5
16985
-$as_echo "$as_me: WARNING: libcurl not found. Please use the web interface for submitting FPs/FNs." >&2;}
16986
-else
16987
-    if test -f "$LIBCURL_HOME/bin/curl-config"; then
16988
-        CURL_LDFLAGS=$($LIBCURL_HOME/bin/curl-config --libs)
16989
-        CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags)
16990
-    else
16991
-        CURL_LDFLAGS="-L$LIBCURL_HOME/lib -lcurl"
16992
-        CURL_CPPFLAGS="-I$LIBCURL_HOME/include"
16993
-    fi
16994
-
16995
-    save_LDFLAGS="$LDFLAGS"
16996
-    LDFLAGS="-L$LIBCURL_HOME/lib -lcurl"
16997
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
16998
-$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
16999
-if ${ac_cv_lib_curl_curl_easy_init+:} false; then :
17000
-  $as_echo_n "(cached) " >&6
17001
-else
17002
-  ac_check_lib_save_LIBS=$LIBS
17003
-LIBS="-lcurl  $LIBS"
17004
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17005
-/* end confdefs.h.  */
17006
-
17007
-/* Override any GCC internal prototype to avoid an error.
17008
-   Use char because int might match the return type of a GCC
17009
-   builtin and then its argument prototype would still apply.  */
17010
-#ifdef __cplusplus
17011
-extern "C"
17012
-#endif
17013
-char curl_easy_init ();
17014
-int
17015
-main ()
17016
-{
17017
-return curl_easy_init ();
17018
-  ;
17019
-  return 0;
17020
-}
17021
-_ACEOF
17022
-if ac_fn_c_try_link "$LINENO"; then :
17023
-  ac_cv_lib_curl_curl_easy_init=yes
17024
-else
17025
-  ac_cv_lib_curl_curl_easy_init=no
17026
-fi
17027
-rm -f core conftest.err conftest.$ac_objext \
17028
-    conftest$ac_exeext conftest.$ac_ext
17029
-LIBS=$ac_check_lib_save_LIBS
17030
-fi
17031
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5
17032
-$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
17033
-if test "x$ac_cv_lib_curl_curl_easy_init" = xyes; then :
17034
-  curl_msg="";have_curl="yes";CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS";CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"
17035
-else
17036
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs." >&5
17037
-$as_echo "$as_me: WARNING: Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs." >&2;}
17038
-fi
17039
-
17040
-    LDFLAGS="$save_LDFLAGS"
17041
-fi
17042
-
17043 16956
  if test "x$HAVE_LIBBZ2" = "xyes"; then
17044 16957
   HAVE_LIBBZ2_TRUE=
17045 16958
   HAVE_LIBBZ2_FALSE='#'
... ...
@@ -17065,163 +17443,6 @@ else
17065 17065
 fi
17066 17066
 
17067 17067
 
17068
-want_xml="auto"
17069
-# Check whether --enable-xml was given.
17070
-if test "${enable_xml+set}" = set; then :
17071
-  enableval=$enable_xml; want_xml=$enableval
17072
-else
17073
-  want_xml="auto"
17074
-fi
17075
-
17076
-
17077
-XML_HOME=""
17078
-if test "X$want_xml" != "Xno"; then
17079
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2 installation" >&5
17080
-$as_echo_n "checking for libxml2 installation... " >&6; }
17081
-
17082
-# Check whether --with-xml was given.
17083
-if test "${with_xml+set}" = set; then :
17084
-  withval=$with_xml;
17085
-  if test "$withval"
17086
-  then
17087
-    XML_HOME="$withval"
17088
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $XML_HOME" >&5
17089
-$as_echo "using $XML_HOME" >&6; }
17090
-  else
17091
-    as_fn_error $? "cannot assign blank value to --with-xml" "$LINENO" 5
17092
-  fi
17093
-
17094
-else
17095
-
17096
-  XML_HOME=/usr/local
17097
-  if test ! -x "$XML_HOME/bin/xml2-config"
17098
-  then
17099
-    XML_HOME=/usr
17100
-    if test ! -x "$XML_HOME/bin/xml2-config"
17101
-    then
17102
-      XML_HOME=""
17103
-    fi
17104
-  fi
17105
-  if test "x$XML_HOME" != "x"; then
17106
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_HOME" >&5
17107
-$as_echo "$XML_HOME" >&6; }
17108
-  else
17109
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17110
-$as_echo "not found" >&6; }
17111
-  fi
17112
-
17113
-fi
17114
-
17115
-fi
17116
-
17117
-found_xml="no"
17118
-XMLCONF_VERSION=""
17119
-XML_CPPFLAGS=""
17120
-XML_LIBS=""
17121
-if test "x$XML_HOME" != "x"; then
17122
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking xml2-config version" >&5
17123
-$as_echo_n "checking xml2-config version... " >&6; }
17124
-  XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`"
17125
-  if test "x%XMLCONF_VERSION" != "x"; then
17126
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLCONF_VERSION" >&5
17127
-$as_echo "$XMLCONF_VERSION" >&6; }
17128
-    found_xml="yes"
17129
-    XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
17130
-    XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
17131
-  else
17132
-    as_fn_error $? "xml2-config failed" "$LINENO" 5
17133
-  fi
17134
-fi
17135
-
17136
-working_xml="no"
17137
-if test "X$found_xml" != "Xno"; then
17138
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlreader.h in $XML_HOME" >&5
17139
-$as_echo_n "checking for xmlreader.h in $XML_HOME... " >&6; }
17140
-
17141
-  if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then
17142
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17143
-$as_echo "not found" >&6; }
17144
-  else
17145
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
17146
-$as_echo "found" >&6; }
17147
-    save_LIBS="$LIBS"
17148
-    save_CPPFLAGS="$CPPFLAGS"
17149
-    CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
17150
-    save_LDFLAGS="$LDFLAGS"
17151
-    LDFLAGS="$LDFLAGS $XML_LIBS"
17152
-
17153
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlTextReaderRead in -lxml2" >&5
17154
-$as_echo_n "checking for xmlTextReaderRead in -lxml2... " >&6; }
17155
-if ${ac_cv_lib_xml2_xmlTextReaderRead+:} false; then :
17156
-  $as_echo_n "(cached) " >&6
17157
-else
17158
-  ac_check_lib_save_LIBS=$LIBS
17159
-LIBS="-lxml2  $LIBS"
17160
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17161
-/* end confdefs.h.  */
17162
-
17163
-/* Override any GCC internal prototype to avoid an error.
17164
-   Use char because int might match the return type of a GCC
17165
-   builtin and then its argument prototype would still apply.  */
17166
-#ifdef __cplusplus
17167
-extern "C"
17168
-#endif
17169
-char xmlTextReaderRead ();
17170
-int
17171
-main ()
17172
-{
17173
-return xmlTextReaderRead ();
17174
-  ;
17175
-  return 0;
17176
-}
17177
-_ACEOF
17178
-if ac_fn_c_try_link "$LINENO"; then :
17179
-  ac_cv_lib_xml2_xmlTextReaderRead=yes
17180
-else
17181
-  ac_cv_lib_xml2_xmlTextReaderRead=no
17182
-fi
17183
-rm -f core conftest.err conftest.$ac_objext \
17184
-    conftest$ac_exeext conftest.$ac_ext
17185
-LIBS=$ac_check_lib_save_LIBS
17186
-fi
17187
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlTextReaderRead" >&5
17188
-$as_echo "$ac_cv_lib_xml2_xmlTextReaderRead" >&6; }
17189
-if test "x$ac_cv_lib_xml2_xmlTextReaderRead" = xyes; then :
17190
-  working_xml="yes"
17191
-else
17192
-  working_xml="no"
17193
-fi
17194
-
17195
-
17196
-    CPPFLAGS="$save_CPPFLAGS"
17197
-    LDFLAGS="$save_LDFLAGS"
17198
-    LIBS="$save_LIBS"
17199
-  fi
17200
-fi
17201
-
17202
-if test "$working_xml" = "yes"; then
17203
-
17204
-$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
17205
-
17206
-
17207
-
17208
-  { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with libxml2 from $XML_HOME" >&5
17209
-$as_echo "$as_me: Compiling and linking with libxml2 from $XML_HOME" >&6;}
17210
-else
17211
-  if test "$want_xml" = "yes"; then
17212
-     as_fn_error $? "****** Please install libxml2 packages!" "$LINENO" 5
17213
-  else
17214
-    if test "$want_xml" != "no"; then
17215
-      { $as_echo "$as_me:${as_lineno-$LINENO}: ****** libxml2 support unavailable" >&5
17216
-$as_echo "$as_me: ****** libxml2 support unavailable" >&6;}
17217
-    fi
17218
-  fi
17219
-  XML_CPPFLAGS=""
17220
-  XML_LIBS=""
17221
-
17222
-
17223
-fi
17224
-
17225 17068
 # Check whether --enable-getaddrinfo was given.
17226 17069
 if test "${enable_getaddrinfo+set}" = set; then :
17227 17070
   enableval=$enable_getaddrinfo; want_getaddrinfo=$enableval
... ...
@@ -17669,6 +17890,14 @@ else
17669 17669
 fi
17670 17670
 
17671 17671
 
17672
+# Check whether --enable-yp-check was given.
17673
+if test "${enable_yp_check+set}" = set; then :
17674
+  enableval=$enable_yp_check; use_yp=$enableval
17675
+else
17676
+  use_yp="no"
17677
+fi
17678
+
17679
+
17672 17680
 
17673 17681
 # Check whether --with-user was given.
17674 17682
 if test "${with_user+set}" = set; then :
... ...
@@ -17698,22 +17927,6 @@ cat >>confdefs.h <<_ACEOF
17698 17698
 _ACEOF
17699 17699
 
17700 17700
 
17701
-# Check whether --enable-clamav was given.
17702
-if test "${enable_clamav+set}" = set; then :
17703
-  enableval=$enable_clamav; test_clamav=$enableval
17704
-else
17705
-  test_clamav=yes
17706
-fi
17707
-
17708
-
17709
-# Check whether --enable-debug was given.
17710
-if test "${enable_debug+set}" = set; then :
17711
-  enableval=$enable_debug; enable_debug=$enableval
17712
-else
17713
-  enable_debug="no"
17714
-fi
17715
-
17716
-
17717 17701
 if test "$enable_debug" = "yes"; then
17718 17702
   VERSION_SUFFIX="$VERSION_SUFFIX-debug"
17719 17703
 
... ...
@@ -17746,6 +17959,7 @@ $as_echo "#define FRESHCLAM_NO_CACHE 1" >>confdefs.h
17746 17746
 
17747 17747
 fi
17748 17748
 
17749
+
17749 17750
 # Check whether --enable-dns-fix was given.
17750 17751
 if test "${enable_dns_fix+set}" = set; then :
17751 17752
   enableval=$enable_dns_fix; enable_dnsfix=$enableval
... ...
@@ -18108,16 +18322,6 @@ $as_echo "#define C_GNU_HURD 1" >>confdefs.h
18108 18108
     ;;
18109 18109
 esac
18110 18110
 
18111
-
18112
-
18113
-
18114
-
18115
-
18116
-
18117
-
18118
-
18119
-
18120
-
18121 18111
 if test "$have_milter" = "yes"; then
18122 18112
 
18123 18113
         save_LIBS="$LIBS"
... ...
@@ -18335,18 +18539,6 @@ $as_echo "#define _REENTRANT 1" >>confdefs.h
18335 18335
 
18336 18336
 fi
18337 18337
 
18338
-for ac_func in enable_extended_FILE_stdio
18339
-do :
18340
-  ac_fn_c_check_func "$LINENO" "enable_extended_FILE_stdio" "ac_cv_func_enable_extended_FILE_stdio"
18341
-if test "x$ac_cv_func_enable_extended_FILE_stdio" = xyes; then :
18342
-  cat >>confdefs.h <<_ACEOF
18343
-#define HAVE_ENABLE_EXTENDED_FILE_STDIO 1
18344
-_ACEOF
18345
-
18346
-fi
18347
-done
18348
-
18349
-
18350 18338
 
18351 18339
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readdir_r" >&5
18352 18340
 $as_echo_n "checking for readdir_r... " >&6; }
... ...
@@ -18641,7 +18833,7 @@ $as_echo_n "checking for $clamav_user using ypmatch... " >&6; }
18641 18641
     then
18642 18642
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18643 18643
 $as_echo "no" >&6; }
18644
-	as_fn_error $? "User $clamav_user (and/or group $clamav_group) does not exist. Please read the documentation !" "$LINENO" 5
18644
+	as_fn_error $? "User $clamav_user (and/or group $clamav_group) doesn't exist. Please read the documentation !" "$LINENO" 5
18645 18645
     else
18646 18646
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, user $clamav_user and group $clamav_group" >&5
18647 18647
 $as_echo "yes, user $clamav_user and group $clamav_group" >&6; }
... ...
@@ -19493,17 +19685,6 @@ $as_echo "disabled" >&6; }
19493 19493
 fi
19494 19494
 
19495 19495
 
19496
-
19497
-cat >>confdefs.h <<_ACEOF
19498
-#define VERSION "$VERSION"
19499
-_ACEOF
19500
-
19501
-
19502
-cat >>confdefs.h <<_ACEOF
19503
-#define VERSION_SUFFIX "$VERSION_SUFFIX"
19504
-_ACEOF
19505
-
19506
-
19507 19496
 # Check whether --enable-clamdtop was given.
19508 19497
 if test "${enable_clamdtop+set}" = set; then :
19509 19498
   enableval=$enable_clamdtop; enable_clamdtop=$enableval
... ...
@@ -21175,6 +21356,454 @@ $as_echo "#define HAVE__INTERNAL__SHA_COLLECT 1" >>confdefs.h
21175 21175
 
21176 21176
 fi
21177 21177
 
21178
+
21179
+case "$host_os" in
21180
+freebsd*)
21181
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kinfo_getvmmap in -lutil" >&5
21182
+$as_echo_n "checking for kinfo_getvmmap in -lutil... " >&6; }
21183
+if ${ac_cv_lib_util_kinfo_getvmmap+:} false; then :
21184
+  $as_echo_n "(cached) " >&6
21185
+else
21186
+  ac_check_lib_save_LIBS=$LIBS
21187
+LIBS="-lutil  $LIBS"
21188
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21189
+/* end confdefs.h.  */
21190
+
21191
+/* Override any GCC internal prototype to avoid an error.
21192
+   Use char because int might match the return type of a GCC
21193
+   builtin and then its argument prototype would still apply.  */
21194
+#ifdef __cplusplus
21195
+extern "C"
21196
+#endif
21197
+char kinfo_getvmmap ();
21198
+int
21199
+main ()
21200
+{
21201
+return kinfo_getvmmap ();
21202
+  ;
21203
+  return 0;
21204
+}
21205
+_ACEOF
21206
+if ac_fn_c_try_link "$LINENO"; then :
21207
+  ac_cv_lib_util_kinfo_getvmmap=yes
21208
+else
21209
+  ac_cv_lib_util_kinfo_getvmmap=no
21210
+fi
21211
+rm -f core conftest.err conftest.$ac_objext \
21212
+    conftest$ac_exeext conftest.$ac_ext
21213
+LIBS=$ac_check_lib_save_LIBS
21214
+fi
21215
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_kinfo_getvmmap" >&5
21216
+$as_echo "$ac_cv_lib_util_kinfo_getvmmap" >&6; }
21217
+if test "x$ac_cv_lib_util_kinfo_getvmmap" = xyes; then :
21218
+  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lutil"
21219
+else
21220
+  as_fn_error $? "You are running BSD but you don't have kinfo_getvmmap in the util library. Please fix manually." "$LINENO" 5
21221
+fi
21222
+
21223
+;;
21224
+esac
21225
+
21226
+
21227
+have_curl="no"
21228
+curl_msg="Please use the web interface for submitting FPs/FNs."
21229
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl installation" >&5
21230
+$as_echo_n "checking for libcurl installation... " >&6; }
21231
+
21232
+
21233
+# Check whether --with-libcurl was given.
21234
+if test "${with_libcurl+set}" = set; then :
21235
+  withval=$with_libcurl;
21236
+if test "$withval"; then
21237
+    LIBCURL_HOME="$withval"
21238
+fi
21239
+
21240
+else
21241
+
21242
+LIBCURL_HOME=/usr/local
21243
+if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
21244
+then
21245
+    LIBCURL_HOME=/usr
21246
+fi
21247
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5
21248
+$as_echo "$LIBCURL_HOME" >&6; }
21249
+
21250
+fi
21251
+
21252
+
21253
+if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
21254
+then
21255
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcurl not found. Please use the web interface for submitting FPs/FNs." >&5
21256
+$as_echo "$as_me: WARNING: libcurl not found. Please use the web interface for submitting FPs/FNs." >&2;}
21257
+else
21258
+    if test -f "$LIBCURL_HOME/bin/curl-config"; then
21259
+        CURL_LDFLAGS=$($LIBCURL_HOME/bin/curl-config --libs)
21260
+        CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags)
21261
+    else
21262
+        CURL_LDFLAGS="-L$LIBCURL_HOME/lib -lcurl"
21263
+        CURL_CPPFLAGS="-I$LIBCURL_HOME/include"
21264
+    fi
21265
+
21266
+    save_LDFLAGS="$LDFLAGS"
21267
+    LDFLAGS="-L$LIBCURL_HOME/lib -lcurl"
21268
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5
21269
+$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; }
21270
+if ${ac_cv_lib_curl_curl_easy_init+:} false; then :
21271
+  $as_echo_n "(cached) " >&6
21272
+else
21273
+  ac_check_lib_save_LIBS=$LIBS
21274
+LIBS="-lcurl  $LIBS"
21275
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21276
+/* end confdefs.h.  */
21277
+
21278
+/* Override any GCC internal prototype to avoid an error.
21279
+   Use char because int might match the return type of a GCC
21280
+   builtin and then its argument prototype would still apply.  */
21281
+#ifdef __cplusplus
21282
+extern "C"
21283
+#endif
21284
+char curl_easy_init ();
21285
+int
21286
+main ()
21287
+{
21288
+return curl_easy_init ();
21289
+  ;
21290
+  return 0;
21291
+}
21292
+_ACEOF
21293
+if ac_fn_c_try_link "$LINENO"; then :
21294
+  ac_cv_lib_curl_curl_easy_init=yes
21295
+else
21296
+  ac_cv_lib_curl_curl_easy_init=no
21297
+fi
21298
+rm -f core conftest.err conftest.$ac_objext \
21299
+    conftest$ac_exeext conftest.$ac_ext
21300
+LIBS=$ac_check_lib_save_LIBS
21301
+fi
21302
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5
21303
+$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; }
21304
+if test "x$ac_cv_lib_curl_curl_easy_init" = xyes; then :
21305
+  curl_msg="";have_curl="yes";CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS";CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"
21306
+else
21307
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs." >&5
21308
+$as_echo "$as_me: WARNING: Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs." >&2;}
21309
+fi
21310
+
21311
+    LDFLAGS="$save_LDFLAGS"
21312
+fi
21313
+
21314
+
21315
+
21316
+
21317
+
21318
+
21319
+want_xml="auto"
21320
+# Check whether --enable-xml was given.
21321
+if test "${enable_xml+set}" = set; then :
21322
+  enableval=$enable_xml; want_xml=$enableval
21323
+else
21324
+  want_xml="auto"
21325
+fi
21326
+
21327
+
21328
+XML_HOME=""
21329
+if test "X$want_xml" != "Xno"; then
21330
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml2 installation" >&5
21331
+$as_echo_n "checking for libxml2 installation... " >&6; }
21332
+
21333
+# Check whether --with-xml was given.
21334
+if test "${with_xml+set}" = set; then :
21335
+  withval=$with_xml;
21336
+  if test "$withval"
21337
+  then
21338
+    XML_HOME="$withval"
21339
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $XML_HOME" >&5
21340
+$as_echo "using $XML_HOME" >&6; }
21341
+  else
21342
+    as_fn_error $? "cannot assign blank value to --with-xml" "$LINENO" 5
21343
+  fi
21344
+
21345
+else
21346
+
21347
+  XML_HOME=/usr/local
21348
+  if test ! -x "$XML_HOME/bin/xml2-config"
21349
+  then
21350
+    XML_HOME=/usr
21351
+    if test ! -x "$XML_HOME/bin/xml2-config"
21352
+    then
21353
+      XML_HOME=""
21354
+    fi
21355
+  fi
21356
+  if test "x$XML_HOME" != "x"; then
21357
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML_HOME" >&5
21358
+$as_echo "$XML_HOME" >&6; }
21359
+  else
21360
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21361
+$as_echo "not found" >&6; }
21362
+  fi
21363
+
21364
+fi
21365
+
21366
+fi
21367
+
21368
+found_xml="no"
21369
+XMLCONF_VERSION=""
21370
+XML_CPPFLAGS=""
21371
+XML_LIBS=""
21372
+if test "x$XML_HOME" != "x"; then
21373
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking xml2-config version" >&5
21374
+$as_echo_n "checking xml2-config version... " >&6; }
21375
+  XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`"
21376
+  if test "x%XMLCONF_VERSION" != "x"; then
21377
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLCONF_VERSION" >&5
21378
+$as_echo "$XMLCONF_VERSION" >&6; }
21379
+    found_xml="yes"
21380
+    XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
21381
+    XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
21382
+  else
21383
+    as_fn_error $? "xml2-config failed" "$LINENO" 5
21384
+  fi
21385
+fi
21386
+
21387
+working_xml="no"
21388
+if test "X$found_xml" != "Xno"; then
21389
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlreader.h in $XML_HOME" >&5
21390
+$as_echo_n "checking for xmlreader.h in $XML_HOME... " >&6; }
21391
+
21392
+  if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then
21393
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21394
+$as_echo "not found" >&6; }
21395
+  else
21396
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
21397
+$as_echo "found" >&6; }
21398
+    save_LIBS="$LIBS"
21399
+    save_CPPFLAGS="$CPPFLAGS"
21400
+    CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
21401
+    save_LDFLAGS="$LDFLAGS"
21402
+    LDFLAGS="$LDFLAGS $XML_LIBS"
21403
+
21404
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlTextReaderRead in -lxml2" >&5
21405
+$as_echo_n "checking for xmlTextReaderRead in -lxml2... " >&6; }
21406
+if ${ac_cv_lib_xml2_xmlTextReaderRead+:} false; then :
21407
+  $as_echo_n "(cached) " >&6
21408
+else
21409
+  ac_check_lib_save_LIBS=$LIBS
21410
+LIBS="-lxml2  $LIBS"
21411
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21412
+/* end confdefs.h.  */
21413
+
21414
+/* Override any GCC internal prototype to avoid an error.
21415
+   Use char because int might match the return type of a GCC
21416
+   builtin and then its argument prototype would still apply.  */
21417
+#ifdef __cplusplus
21418
+extern "C"
21419
+#endif
21420
+char xmlTextReaderRead ();
21421
+int
21422
+main ()
21423
+{
21424
+return xmlTextReaderRead ();
21425
+  ;
21426
+  return 0;
21427
+}
21428
+_ACEOF
21429
+if ac_fn_c_try_link "$LINENO"; then :
21430
+  ac_cv_lib_xml2_xmlTextReaderRead=yes
21431
+else
21432
+  ac_cv_lib_xml2_xmlTextReaderRead=no
21433
+fi
21434
+rm -f core conftest.err conftest.$ac_objext \
21435
+    conftest$ac_exeext conftest.$ac_ext
21436
+LIBS=$ac_check_lib_save_LIBS
21437
+fi
21438
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlTextReaderRead" >&5
21439
+$as_echo "$ac_cv_lib_xml2_xmlTextReaderRead" >&6; }
21440
+if test "x$ac_cv_lib_xml2_xmlTextReaderRead" = xyes; then :
21441
+  working_xml="yes"
21442
+else
21443
+  working_xml="no"
21444
+fi
21445
+
21446
+
21447
+    CPPFLAGS="$save_CPPFLAGS"
21448
+    LDFLAGS="$save_LDFLAGS"
21449
+    LIBS="$save_LIBS"
21450
+  fi
21451
+fi
21452
+
21453
+if test "$working_xml" = "yes"; then
21454
+
21455
+$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
21456
+
21457
+
21458
+
21459
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with libxml2 from $XML_HOME" >&5
21460
+$as_echo "$as_me: Compiling and linking with libxml2 from $XML_HOME" >&6;}
21461
+else
21462
+  if test "$want_xml" = "yes"; then
21463
+     as_fn_error $? "****** Please install libxml2 packages!" "$LINENO" 5
21464
+  else
21465
+    if test "$want_xml" != "no"; then
21466
+      { $as_echo "$as_me:${as_lineno-$LINENO}: ****** libxml2 support unavailable" >&5
21467
+$as_echo "$as_me: ****** libxml2 support unavailable" >&6;}
21468
+    fi
21469
+  fi
21470
+  XML_CPPFLAGS=""
21471
+  XML_LIBS=""
21472
+
21473
+
21474
+fi
21475
+
21476
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL installation" >&5
21477
+$as_echo_n "checking for OpenSSL installation... " >&6; }
21478
+
21479
+
21480
+# Check whether --with-openssl was given.
21481
+if test "${with_openssl+set}" = set; then :
21482
+  withval=$with_openssl;
21483
+if test "$withval"; then
21484
+    LIBSSL_HOME="$withval"
21485
+fi
21486
+
21487
+else
21488
+
21489
+LIBSSL_HOME=/usr/local
21490
+if test ! -f "$LIBSSL_HOME/include/openssl/ssl.h"
21491
+then
21492
+    LIBSSL_HOME=/usr
21493
+fi
21494
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBSSL_HOME" >&5
21495
+$as_echo "$LIBSSL_HOME" >&6; }
21496
+
21497
+fi
21498
+
21499
+
21500
+if test ! -f "$LIBSSL_HOME/include/openssl/ssl.h"
21501
+then
21502
+    as_fn_error $? "OpenSSL not found." "$LINENO" 5
21503
+fi
21504
+
21505
+SSL_LDFLAGS="-L$LIBSSL_HOME/lib -lssl"
21506
+SSL_CPPFLAGS="-I$LIBSSL_HOME/include"
21507
+
21508
+save_LDFLAGS="$LDFLAGS"
21509
+LDFLAGS="-L$LIBSSL_HOME/lib -lssl"
21510
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
21511
+$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
21512
+if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
21513
+  $as_echo_n "(cached) " >&6
21514
+else
21515
+  ac_check_lib_save_LIBS=$LIBS
21516
+LIBS="-lssl  $LIBS"
21517
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21518
+/* end confdefs.h.  */
21519
+
21520
+/* Override any GCC internal prototype to avoid an error.
21521
+   Use char because int might match the return type of a GCC
21522
+   builtin and then its argument prototype would still apply.  */
21523
+#ifdef __cplusplus
21524
+extern "C"
21525
+#endif
21526
+char SSL_library_init ();
21527
+int
21528
+main ()
21529
+{
21530
+return SSL_library_init ();
21531
+  ;
21532
+  return 0;
21533
+}
21534
+_ACEOF
21535
+if ac_fn_c_try_link "$LINENO"; then :
21536
+  ac_cv_lib_ssl_SSL_library_init=yes
21537
+else
21538
+  ac_cv_lib_ssl_SSL_library_init=no
21539
+fi
21540
+rm -f core conftest.err conftest.$ac_objext \
21541
+    conftest$ac_exeext conftest.$ac_ext
21542
+LIBS=$ac_check_lib_save_LIBS
21543
+fi
21544
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
21545
+$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
21546
+if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
21547
+  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $SSL_LDFLAGS"
21548
+else
21549
+  as_fn_error $? "Your OpenSSL is misconfigured" "$LINENO" 5
21550
+fi
21551
+
21552
+
21553
+LDFLAGS="-L$LIBSSL_HOME/lib -lcrypto"
21554
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_EncryptInit in -lcrypto" >&5
21555
+$as_echo_n "checking for EVP_EncryptInit in -lcrypto... " >&6; }
21556
+if ${ac_cv_lib_crypto_EVP_EncryptInit+:} false; then :
21557
+  $as_echo_n "(cached) " >&6
21558
+else
21559
+  ac_check_lib_save_LIBS=$LIBS
21560
+LIBS="-lcrypto  $LIBS"
21561
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21562
+/* end confdefs.h.  */
21563
+
21564
+/* Override any GCC internal prototype to avoid an error.
21565
+   Use char because int might match the return type of a GCC
21566
+   builtin and then its argument prototype would still apply.  */
21567
+#ifdef __cplusplus
21568
+extern "C"
21569
+#endif
21570
+char EVP_EncryptInit ();
21571
+int
21572
+main ()
21573
+{
21574
+return EVP_EncryptInit ();
21575
+  ;
21576
+  return 0;
21577
+}
21578
+_ACEOF
21579
+if ac_fn_c_try_link "$LINENO"; then :
21580
+  ac_cv_lib_crypto_EVP_EncryptInit=yes
21581
+else
21582
+  ac_cv_lib_crypto_EVP_EncryptInit=no
21583
+fi
21584
+rm -f core conftest.err conftest.$ac_objext \
21585
+    conftest$ac_exeext conftest.$ac_ext
21586
+LIBS=$ac_check_lib_save_LIBS
21587
+fi
21588
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_EncryptInit" >&5
21589
+$as_echo "$ac_cv_lib_crypto_EVP_EncryptInit" >&6; }
21590
+if test "x$ac_cv_lib_crypto_EVP_EncryptInit" = xyes; then :
21591
+  LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lcrypto"
21592
+else
21593
+  as_fn_error $? "Your OpenSSL installation is misconfigured" "$LINENO" 5
21594
+fi
21595
+
21596
+
21597
+LDFLAGS="$save_LDFLAGS"
21598
+
21599
+
21600
+
21601
+
21602
+
21603
+
21604
+
21605
+
21606
+
21607
+
21608
+
21609
+
21610
+
21611
+
21612
+
21613
+
21614
+
21615
+
21616
+
21617
+
21618
+
21619
+
21620
+
21621
+
21622
+
21623
+
21624
+
21625
+
21178 21626
  if test "$have_curl" = "yes"; then
21179 21627
   ENABLE_CLAMSUBMIT_TRUE=
21180 21628
   ENABLE_CLAMSUBMIT_FALSE='#'
... ...
@@ -21184,7 +21813,8 @@ else
21184 21184
 fi
21185 21185
 
21186 21186
 
21187
-ac_config_files="$ac_config_files clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile clamsubmit/Makefile etc/Makefile test/Makefile unit_tests/Makefile clamdtop/Makefile clambc/Makefile Makefile clamav-config libclamav.pc platform.h docs/man/clamav-milter.8 docs/man/clamav-milter.conf.5 docs/man/clambc.1 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1 docs/man/clamdtop.1"
21187
+ac_config_files="$ac_config_files shared/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/Makefile clamsubmit/Makefile clamav-milter/Makefile freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile test/Makefile unit_tests/Makefile clamdtop/Makefile clambc/Makefile Makefile clamav-config libclamav.pc platform.h docs/man/clamav-milter.8 docs/man/clamav-milter.conf.5 docs/man/clambc.1 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1 docs/man/clamdtop.1"
21188
+
21188 21189
 
21189 21190
 cat >confcache <<\_ACEOF
21190 21191
 # This file is a shell script that caches the results of configure
... ...
@@ -21295,14 +21925,6 @@ LIBOBJS=$ac_libobjs
21295 21295
 LTLIBOBJS=$ac_ltlibobjs
21296 21296
 
21297 21297
 
21298
- if test -n "$EXEEXT"; then
21299
-  am__EXEEXT_TRUE=
21300
-  am__EXEEXT_FALSE='#'
21301
-else
21302
-  am__EXEEXT_TRUE='#'
21303
-  am__EXEEXT_FALSE=
21304
-fi
21305
-
21306 21298
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21307 21299
   as_fn_error $? "conditional \"AMDEP\" was never defined.
21308 21300
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
... ...
@@ -21311,6 +21933,14 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21311 21311
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
21312 21312
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21313 21313
 fi
21314
+ if test -n "$EXEEXT"; then
21315
+  am__EXEEXT_TRUE=
21316
+  am__EXEEXT_FALSE='#'
21317
+else
21318
+  am__EXEEXT_TRUE='#'
21319
+  am__EXEEXT_FALSE=
21320
+fi
21321
+
21314 21322
 if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then
21315 21323
   as_fn_error $? "conditional \"INSTALL_LTDL\" was never defined.
21316 21324
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
... ...
@@ -22251,16 +22881,17 @@ do
22251 22251
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
22252 22252
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
22253 22253
     "libltdl/Makefile") CONFIG_FILES="$CONFIG_FILES libltdl/Makefile" ;;
22254
+    "shared/Makefile") CONFIG_FILES="$CONFIG_FILES shared/Makefile" ;;
22254 22255
     "clamscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamscan/Makefile" ;;
22255 22256
     "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
22256 22257
     "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
22257 22258
     "clamd/Makefile") CONFIG_FILES="$CONFIG_FILES clamd/Makefile" ;;
22258 22259
     "clamdscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamdscan/Makefile" ;;
22260
+    "clamsubmit/Makefile") CONFIG_FILES="$CONFIG_FILES clamsubmit/Makefile" ;;
22259 22261
     "clamav-milter/Makefile") CONFIG_FILES="$CONFIG_FILES clamav-milter/Makefile" ;;
22260 22262
     "freshclam/Makefile") CONFIG_FILES="$CONFIG_FILES freshclam/Makefile" ;;
22261 22263
     "sigtool/Makefile") CONFIG_FILES="$CONFIG_FILES sigtool/Makefile" ;;
22262 22264
     "clamconf/Makefile") CONFIG_FILES="$CONFIG_FILES clamconf/Makefile" ;;
22263
-    "clamsubmit/Makefile") CONFIG_FILES="$CONFIG_FILES clamsubmit/Makefile" ;;
22264 22265
     "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
22265 22266
     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
22266 22267
     "unit_tests/Makefile") CONFIG_FILES="$CONFIG_FILES unit_tests/Makefile" ;;
... ...
@@ -23912,14 +24543,6 @@ LIBOBJS=$ac_libobjs
23912 23912
 LTLIBOBJS=$ac_ltlibobjs
23913 23913
 
23914 23914
 
23915
- if test -n "$EXEEXT"; then
23916
-  am__EXEEXT_TRUE=
23917
-  am__EXEEXT_FALSE='#'
23918
-else
23919
-  am__EXEEXT_TRUE='#'
23920
-  am__EXEEXT_FALSE=
23921
-fi
23922
-
23923 23915
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
23924 23916
   as_fn_error $? "conditional \"AMDEP\" was never defined.
23925 23917
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
... ...
@@ -23928,6 +24551,14 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
23928 23928
   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
23929 23929
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
23930 23930
 fi
23931
+ if test -n "$EXEEXT"; then
23932
+  am__EXEEXT_TRUE=
23933
+  am__EXEEXT_FALSE='#'
23934
+else
23935
+  am__EXEEXT_TRUE='#'
23936
+  am__EXEEXT_FALSE=
23937
+fi
23938
+
23931 23939
 if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then
23932 23940
   as_fn_error $? "conditional \"INSTALL_LTDL\" was never defined.
23933 23941
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
... ...
@@ -24877,16 +25508,17 @@ do
24877 24877
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
24878 24878
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
24879 24879
     "libltdl/Makefile") CONFIG_FILES="$CONFIG_FILES libltdl/Makefile" ;;
24880
+    "shared/Makefile") CONFIG_FILES="$CONFIG_FILES shared/Makefile" ;;
24880 24881
     "clamscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamscan/Makefile" ;;
24881 24882
     "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
24882 24883
     "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
24883 24884
     "clamd/Makefile") CONFIG_FILES="$CONFIG_FILES clamd/Makefile" ;;
24884 24885
     "clamdscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamdscan/Makefile" ;;
24886
+    "clamsubmit/Makefile") CONFIG_FILES="$CONFIG_FILES clamsubmit/Makefile" ;;
24885 24887
     "clamav-milter/Makefile") CONFIG_FILES="$CONFIG_FILES clamav-milter/Makefile" ;;
24886 24888
     "freshclam/Makefile") CONFIG_FILES="$CONFIG_FILES freshclam/Makefile" ;;
24887 24889
     "sigtool/Makefile") CONFIG_FILES="$CONFIG_FILES sigtool/Makefile" ;;
24888 24890
     "clamconf/Makefile") CONFIG_FILES="$CONFIG_FILES clamconf/Makefile" ;;
24889
-    "clamsubmit/Makefile") CONFIG_FILES="$CONFIG_FILES clamsubmit/Makefile" ;;
24890 24891
     "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
24891 24892
     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
24892 24893
     "unit_tests/Makefile") CONFIG_FILES="$CONFIG_FILES unit_tests/Makefile" ;;
... ...
@@ -31,6 +31,7 @@ dnl safety check, this used to be a parameter to AC_INIT
31 31
 AC_CONFIG_SRCDIR([clamscan/clamscan.c])
32 32
 AC_CONFIG_MACRO_DIR([m4])
33 33
 AC_CREATE_TARGET_H([target.h])
34
+AC_USE_SYSTEM_EXTENSIONS
34 35
 
35 36
 dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings
36 37
 dnl enable stealth builds and psychedelic tests
... ...
@@ -41,386 +42,23 @@ dnl we told automake to not define these, since we want to include
41 41
 dnl the date in the version
42 42
 AC_DEFINE([PACKAGE], PACKAGE_NAME, [Name of package])
43 43
 
44
-dnl change this on a release
45
-VERSION="devel-`date +%Y%m%d`"
46
-dnl VERSION="0.98"
47
-
48
-LC_CURRENT=7
49
-LC_REVISION=19
50
-LC_AGE=1
51
-LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
52
-AC_SUBST([LIBCLAMAV_VERSION])
53
-
54
-AC_PROG_AWK
55
-AC_PROG_INSTALL
56
-AC_PROG_LN_S
57
-AC_PROG_MAKE_SET
44
+m4_include([m4/reorganization/version.m4])
58 45
 
59 46
 LT_CONFIG_LTDL_DIR([libltdl])
60 47
 LT_INIT([dlopen disable-static])
61 48
 LTDL_INIT([recursive])
49
+
50
+m4_include([m4/reorganization/build_tools.m4])
51
+m4_include([m4/reorganization/headers.m4])
52
+
62 53
 AC_CONFIG_FILES([libltdl/Makefile])
63 54
 
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"])
69 55
 AC_DEFINE([SCANBUFF], 131072, [scan buffer size])
70 56
 AC_DEFINE([FILEBUFF], 8192,   [file i/o buffer size])
71 57
 
72
-AC_LIB_MULTILIB_GUESS
73
-
74
-AC_HEADER_STDC
75
-AC_C_RESTRICT
76
-AC_C_CONST
77
-AC_C_INLINE
78
-AC_C_BIGENDIAN
79
-
80
-LT_LIB_M
81
-
82
-AC_ARG_ENABLE([gcc-vcheck],
83
-[  --disable-gcc-vcheck	  do not check for buggy gcc version ],
84
-gcc_check=$enableval, gcc_check="yes")
85
-
86
-msg_gcc_check="use --disable-gcc-vcheck to disable this check. Before reporting any bugs check with a supported version of gcc"
87
-VERSION_SUFFIX=
88
-dnl Check for gcc-4.1.0
89
-if test "$gcc_check" = "yes"; then
90
-	if test "x$ac_compiler_gnu" = "xyes"; then
91
-		AC_MSG_CHECKING([for a supported version of gcc])
92
-		gcc_version=`${CC} -dumpversion`
93
-		case "${gcc_version}" in
94
-			4.1.0*)
95
-				AC_MSG_RESULT([no (${gcc_version})])
96
-				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)])
97
-				;;
98
-			*)
99
-				AC_MSG_RESULT([ok (${gcc_version})])
100
-				;;
101
-		esac
102
-		case "${gcc_version}" in
103
-		    [[56789]].* | 4.[[3456789]].*)
104
-			# bb #1581 - temporarely add -fno-strict-aliasing so gcc 4.4.0
105
-			# works correctly
106
-			CFLAGS="$CFLAGS -fno-strict-aliasing"
107
-			;;
108
-		    *)
109
-			;;
110
-		esac
111
-	fi
112
-else
113
-	CFLAGS="$CFLAGS -O0"
114
-	VERSION_SUFFIX="$VERSION_SUFFIX-broken-compiler"
115
-fi
116
-
117
-# add distcheck warning flags
118
-distcheck_enable_flags=0
119
-if test "x$ac_compiler_gnu" = "xyes"; then
120
-	gcc_version=`${CC} -dumpversion`
121
-	case "${gcc_version}" in
122
-		4.[[3456789]]*)
123
-			distcheck_enable_flags=1
124
-			;;
125
-		[[56789]].*)
126
-			distcheck_enable_flags=1
127
-			;;
128
-	esac
129
-fi
130
-
131
-dnl Checks if compiler produces valid code, regardless of compiler
132
-dnl we do these checks here to avoid receiving endless bugreports about
133
-dnl breakages due to compiler bugs.
134
-
135
-dnl Check if compiler produces invalid code on gcc PR27603 (affects upx.c)
136
-dnl testcase from gcc testsuite
137
-AC_MSG_CHECKING([for gcc bug PR27603])
138
-AC_TRY_RUN(
139
-	   [
140
-/* (C) Richard Guenther */	   
141
-void exit (int);
142
-void abort (void);
143
-int a;
144
-int main(void)
145
-{
146
-  int j;
147
-  for (j = 0; j < 6; j++)
148
-  {
149
-    if ((unsigned)j - 3 <= 1)
150
-      exit (0);
151
-    a = 1000 * (6 - j);
152
-  }
153
-  abort ();
154
-}
155
-], [AC_MSG_RESULT([ok, bug not present])],
156
-[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])])
157
-
158
-dnl Check if compiler produces invalid code on gcc PR26763-2 (affects upx.c)
159
-dnl testcase from gcc testsuite
160
-AC_MSG_CHECKING([for gcc bug PR26763-2])
161
-AC_TRY_RUN(
162
-	   [
163
-/* (C) Richard Guenther */	   
164
-extern void abort(void);
165
-
166
-static int try (char *a, int d)
167
-{
168
-  return a + d > a;
169
-}
170
-
171
-int main(void)
172
-{
173
-  char bla[100];
174
-
175
-  if (try (bla + 50, -1))
176
-    abort ();
177
-
178
-  return 0;
179
-}
180
-], [AC_MSG_RESULT([ok, bug not present])],
181
-[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])])
182
-
183
-dnl Check if compiler produces invalid code on own testcase based on upx.c
184
-AC_MSG_CHECKING([for valid code generation of CLI_ISCONTAINED])
185
-AC_TRY_RUN(
186
-	   [
187
-#include <stdio.h>
188
-static struct v{
189
-	char* dst;
190
-	unsigned int dsize;
191
-	unsigned int dcur;
192
-	unsigned int backsize;
193
-	signed int unp_offset;
194
-} values[] = {
195
-	{(char*)0xf78ab008, 0x2e000, 1, 4, -1594},
196
-	{(char*)0xb7af1008, 0x2e000, 1, 4, -1594}
197
-
198
-};
199
-extern void abort(void);
200
-
201
-#define CLI_ISCONTAINED(bb, bb_size, sb, sb_size)	\
202
-  ((bb_size) > 0 && (sb_size) > 0 && (size_t)(sb_size) <= (size_t)(bb_size) \
203
-   && (sb) >= (bb) && ((sb) + (sb_size)) <= ((bb) + (bb_size)) && ((sb) + (sb_size)) > (bb) && (sb) < ((bb) + (bb_size)))
204
-
205
-int crashtest()
206
-{
207
-	unsigned int backsize, dcur;
208
-	int dval=0x12000, unp_offset;
209
-	int* dsize = &dval;
210
-	char* dst = (char*)0x12000;
211
-	while(1) {
212
-		backsize=4;
213
-		dcur=0;
214
-		unp_offset=0x800002c7;
215
-
216
-		if (!CLI_ISCONTAINED(dst, *dsize, dst+dcur+unp_offset, backsize) || !CLI_ISCONTAINED(dst, *dsize, dst+dcur, backsize) || unp_offset >=0)
217
-			return -1;
218
-		abort();
219
-	}
220
-	return 0;
221
-}
222
-
223
-int main(void)
224
-{
225
-	int i;
226
-	for(i=0;i<sizeof(values)/sizeof(values[0]);i++) {
227
-		struct v* v= &values[i];
228
-		char* dst = v->dst;
229
-		unsigned int* dsize = &v->dsize;
230
-		unsigned int dcur = v->dcur;
231
-		unsigned int backsize = v->backsize-1;
232
-		signed int  unp_offset = v->unp_offset;
233
-
234
-		if(!CLI_ISCONTAINED(dst, *dsize, dst+dcur+unp_offset, backsize) ||
235
-				!CLI_ISCONTAINED(dst, *dsize,dst+dcur,backsize) || unp_offset >= 0)  {
236
-			continue;
237
-		}
238
-		abort();
239
-	}
240
-	crashtest();
241
-	return 0;
242
-}
243
-], [AC_MSG_RESULT([ok, bug not present])],
244
-[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])])
245
-
246
-dnl Check if compiler produces invalid code on gcc PR28045 (affects upx.c)
247
-dnl testcase from gcc testsuite
248
-AC_MSG_CHECKING([for gcc bug PR28045])
249
-AC_TRY_RUN(
250
-	   [
251
-/* (C) Andrew Pinski */
252
-extern void abort(void);
253
-struct a
254
-{
255
-   unsigned int bits : 1;
256
-   signed long val : ((sizeof(long) * 8) - 1);
257
-};
258
-static int Fnegate (struct a b)
259
-{
260
-  if ((-((long)b.val)) <= ((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))
261
-      && (-((long)b.val)) >= (-(((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))) - 1))
262
-     return 0 ;
263
-  abort ();
264
-}
265
-int main (void)
266
-{
267
-  struct a b = {1, 1};
268
-  Fnegate (b);
269
-  return 0;
270
-}
271
-], [AC_MSG_RESULT([ok, bug not present])],
272
-[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])])
273
-
274
-dnl Check if compiler produces invalid code on gcc PR37573 (affects autoit.c)
275
-dnl this is a bug in gcc 4.4.0, but for some reason it affects gcc 4.1.2 too
276
-dnl gcc 4.1.3 is OK. This bug occurs only at -O3.
277
-AC_MSG_CHECKING([for gcc bug PR37573])
278
-AC_TRY_RUN(
279
-	   [
280
-#include <stdlib.h>
281
-#include <string.h>
282
-struct S
283
-{
284
-  unsigned int *a;
285
-  unsigned int b;
286
-  unsigned int c[624];
287
-};
288
-static unsigned char
289
-foo (struct S *s)
290
-{
291
-  unsigned int r;
292
-  if (!--s->b)
293
-    {
294
-      unsigned int *c = s->c;
295
-      unsigned int i;
296
-      s->a = c;
297
-      for (i = 0; i < 227; i++)
298
-	c[i] =
299
-	  ((((c[i] ^ c[i + 1]) & 0x7ffffffe) ^ c[i]) >> 1) ^
300
-	  ((0 - (c[i + 1] & 1)) & 0x9908b0df) ^ c[i + 397];
301
-      for (; i < 623; i++)
302
-	c[i] =
303
-	  ((((c[i] ^ c[i + 1]) & 0x7ffffffe) ^ c[i]) >> 1) ^
304
-	  ((0 - (c[i + 1] & 1)) & 0x9908b0df) ^ c[i - 227];
305
-      c[623] =
306
-	((((c[623] ^ c[0]) & 0x7ffffffe) ^ c[623]) >> 1) ^ ((0 - (c[0] & 1)) &
307
-							    0x9908b0df) ^ c[i
308
-									    -
309
-									    227];
310
-    }
311
-  r = *(s->a++);
312
-  r ^= (r >> 11);
313
-  r ^= ((r & 0xff3a58ad) << 7);
314
-  r ^= ((r & 0xffffdf8c) << 15);
315
-  r ^= (r >> 18);
316
-  return (unsigned char) (r >> 1);
317
-}
318
-
319
-void
320
-bar (unsigned char *p, unsigned int q, unsigned int r)
321
-{
322
-  struct S s;
323
-  unsigned int i;
324
-  unsigned int *c = s.c;
325
-  *c = r;
326
-  for (i = 1; i < 624; i++)
327
-    c[i] = i + 0x6c078965 * ((c[i - 1] >> 30) ^ c[i - 1]);
328
-  s.b = 1;
329
-  while (q--)
330
-    *p++ ^= foo (&s);
331
-};
332
-
333
-static unsigned char p[23] = {
334
-  0xc0, 0x49, 0x17, 0x32, 0x62, 0x1e, 0x2e, 0xd5, 0x4c, 0x19, 0x28, 0x49,
335
-    0x91, 0xe4, 0x72, 0x83, 0x91, 0x3d, 0x93, 0x83, 0xb3, 0x61, 0x38
336
-};
337
-
338
-static unsigned char q[23] = {
339
-  0x3e, 0x41, 0x55, 0x54, 0x4f, 0x49, 0x54, 0x20, 0x55, 0x4e, 0x49, 0x43,
340
-    0x4f, 0x44, 0x45, 0x20, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x3c
341
-};
342
-
343
-int
344
-main (void)
345
-{
346
-  unsigned int s;
347
-  s = 23;
348
-  bar (p, s, s + 0xa25e);
349
-  if (memcmp (p, q, s) != 0)
350
-	abort ();
351
-  return 0;
352
-}
353
-
354
-], [AC_MSG_RESULT([ok, bug not present])],
355
-[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])])
356
-
357
-dnl Linker feature checks
358
-dnl check for version script support in the linker (GNU ld, or Solaris ld style)
359
-AC_CACHE_CHECK([for ld --version-script], [ac_cv_ld_version_script], [dnl
360
-  cat > conftest.c <<EOF
361
-void cl_symbol1(void) {}
362
-void cli_symbol2(void) {}
363
-EOF
364
-  cat > conftest.map <<EOF
365
-RELEASE
366
-{
367
-	global:
368
-		cl_*;
369
-	local:
370
-		*;
371
-};
372
-PRIVATE
373
-{
374
-	global:
375
-		cli_*;
376
-	local:
377
-		*;
378
-};
379
-EOF
380
-  dnl check for GNU ld style linker version script
381
-  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
382
-				-o conftest.so conftest.c
383
-				-Wl,--version-script,conftest.map
384
-		       1>&AS_MESSAGE_LOG_FD]);
385
-  then
386
-      VERSIONSCRIPTFLAG=--version-script
387
-      ac_cv_ld_version_script=yes
388
-  else
389
-	dnl check for Solaris ld style linker version script
390
-	if AC_TRY_COMMAND([${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
391
-				-o conftest.so conftest.c
392
-				-Wl,-M,conftest.map
393
-			1>&AS_MESSAGE_LOG_FD]);
394
-	then
395
-		VERSIONSCRIPTFLAG=-M
396
-		ac_cv_ld_version_script=yes;
397
-	else
398
-		ac_cv_ld_version_script=no
399
-	fi
400
-  fi
401
- rm -f conftest*])
402
-AC_SUBST([VERSIONSCRIPTFLAG])
403
-AM_CONDITIONAL([VERSIONSCRIPT], test "x$ac_cv_ld_version_script" = "xyes")
404
-
405
-# it is not fatal if gperf is missing
406
-AM_MISSING_PROG(GPERF, gperf)
407
-AC_SUBST(GPERF)
408
-
409
-AC_CHECK_HEADERS([stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h sys/times.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])
410
-AC_CHECK_HEADER([syslog.h],AC_DEFINE([USE_SYSLOG],1,[use syslog]),)
411
-
412
-AC_TYPE_OFF_T
413
-AC_COMPILE_CHECK_SIZEOF([short])
414
-AC_COMPILE_CHECK_SIZEOF([int])
415
-AC_COMPILE_CHECK_SIZEOF([long])
416
-AC_COMPILE_CHECK_SIZEOF([long long])
417
-AC_COMPILE_CHECK_SIZEOF([void *])
418
-
419
-AC_CHECK_FUNCS([sysctlbyname])
420
-AC_CHECK_FUNCS([getifaddrs])
421
-AC_CHECK_HEADER([fcntl.h], AC_DEFINE([HAVE_FCNTL_H],1,[Define to 1 if you have the <fcntl.h> header file]))
422
-AC_CHECK_HEADER([pthread.h], AC_DEFINE([HAVE_PTHREAD_H],1,[Define to 1 if you have the <pthread.h> header file]))
423
-AC_CHECK_HEADER([net/if_dl.h], AC_DEFINE([HAVE_NET_IF_DL_H],1,[Define to 1 if you have the <net/if_dl.h> header file]))
58
+m4_include([m4/reorganization/c_options.m4])
59
+m4_include([m4/reorganization/compiler_checks.m4])
60
+m4_include([m4/reorganization/linker_checks.m4])
424 61
 
425 62
 AC_ARG_ENABLE([experimental],
426 63
 [  --enable-experimental	enable experimental code],
... ...
@@ -434,1352 +72,77 @@ fi
434 434
 build_configure_args=`echo "$ac_configure_args" | sed -e 's/[\"]//g'`
435 435
 AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args])
436 436
 
437
-AX_CHECK_UNAME_SYSCALL
438
-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"])
439
-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")])
440
-
441
-AC_CHECK_FUNCS([poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat strcasestr inet_ntop setgroups initgroups ctime_r mkstemp mallinfo madvise])
442
-AC_FUNC_FSEEKO
443
-
444
-dnl Check if anon maps are available, check if we can determine the page size
445
-AC_C_FUNC_MMAP_PRIVATE
446
-AC_C_FUNC_PAGESIZE
447
-AC_C_FUNC_MMAP_ANONYMOUS
448
-AC_ARG_ENABLE([mempool],[  --disable-mempool       disable memory pools], enable_mempool=$enableval, enable_mempool="yes")
449
-have_mempool="no"
450
-if test "$enable_mempool" = "yes"; then
451
-	if test "$ac_cv_c_mmap_private" != "yes"; then
452
-		AC_MSG_NOTICE([****** mempool support disabled (mmap not available or not usable)])
453
-	else
454
-		if test "$ac_cv_c_can_get_pagesize" != "yes"; then
455
-			AC_MSG_NOTICE([****** mempool support disabled (pagesize cannot be determined)])
456
-		else
457
-			if test "$ac_cv_c_mmap_anonymous" = "no"; then
458
-				AC_MSG_NOTICE([****** mempool support disabled (anonymous mmap not available)])
459
-			else
460
-				AC_DEFINE([USE_MPOOL],1,[enable memory pools])
461
-				have_mempool="yes"
462
-			fi
463
-		fi
464
-	fi
465
-fi
466
-
467
-enable_check_ut=auto
468
-enable_ut_install=no
469
-AC_ARG_ENABLE(check,
470
-[  --enable-check           Enable 'check' unit tests (default=auto)], enable_check_ut=$enableval, enable_check_ut="auto" )
471
-
472
-if test "$enable_check_ut" != "no" ; then
473
-	AC_LIB_FIND([check],[check.h],
474
-			AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)]),
475
-			[CHECK_CPPFLAGS="$INCCHECK"; CHECK_LIBS="$LTLIBCHECK"],
476
-			[])
477
-fi
478
-AC_SUBST([CHECK_CPPFLAGS])
479
-AC_SUBST([CHECK_LIBS])
480
-AM_CONDITIONAL([HAVE_LIBCHECK],test "X$HAVE_LIBCHECK" = "Xyes")
481
-
482
-if test "x$CHECK_LIBS" = "x" -a "$enable_check_ut" = "yes"; then
483
-    AC_MSG_ERROR([
484
-
485
-ERROR!  Check was configured, but not found.  Get it from http://check.sf.net/
486
-])
487
-fi
488
-
489
-AC_ARG_ENABLE(coverage,
490
-	      AC_HELP_STRING([--enable-coverage],
491
-			     [turn on test coverage
492
-			      @<:@default=no@:>@]),
493
-[enable_cov=$enableval],[enable_cov="no"])
494
-
495
-if test "x$enable_coverage" = "xyes"; then
496
-	if test "x$CHECK_LIBS" = "x"; then
497
-		AC_MSG_ERROR([Coverage testing required, but unit tests not enabled!])
498
-	fi
499
-	if test "x$ac_compiler_gnu" != "xyes"; then
500
-		AC_MSG_ERROR([coverage testing only works if gcc is used])
501
-	fi
502
-
503
-	CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
504
-	LDFLAGS="$LDFLAGS -lgcov"
505
-	AC_CHECK_PROGS(GCOV, gcov, false)
506
-	AC_CHECK_PROGS(LCOV, lcov, false)
507
-	AC_CHECK_PROGS(GENHTML, genhtml, false)
508
-fi
509
-
510
-AM_CONDITIONAL(ENABLE_COVERAGE, test "x$enable_coverage" = "xyes")
511
-
512
-have_pthreads=no
513
-AC_CHECK_HEADER([pthread.h],[have_pthreads=yes],)
437
+m4_include([m4/reorganization/code_checks/functions.m4])
438
+m4_include([m4/reorganization/code_checks/mpool.m4])
439
+m4_include([m4/reorganization/code_checks/unit_tests.m4])
440
+m4_include([m4/reorganization/code_checks/coverage.m4])
514 441
 
515 442
 AM_MAINTAINER_MODE
516
-dnl Check for zlib
517
-AC_MSG_CHECKING([for zlib installation])
518
-AC_ARG_WITH([zlib],
519
-[  --with-zlib=DIR	  path to directory containing zlib library (default=
520
-			  /usr/local or /usr if not found in /usr/local)],
521
-[
522
-if test "$withval"; then
523
-  ZLIB_HOME="$withval"
524
-  AC_MSG_RESULT([using $ZLIB_HOME])
525
-fi
526
-], [
527
-ZLIB_HOME=/usr/local
528
-if test ! -f "$ZLIB_HOME/include/zlib.h"
529
-then
530
-  ZLIB_HOME=/usr
531
-fi
532
-AC_MSG_RESULT([$ZLIB_HOME])
533
-])
534
-
535
-CLAMDSCAN_LIBS="$FRESHCLAM_LIBS"
536
-
537
-AC_ARG_ENABLE([zlib-vcheck],
538
-[  --disable-zlib-vcheck	  do not check for buggy zlib version ],
539
-zlib_check=$enableval, zlib_check="yes")
540
-
541
-if test ! -f "$ZLIB_HOME/include/zlib.h"
542
-then
543
-    AC_MSG_ERROR([Please install zlib and zlib-devel packages])
544
-else
545
-
546
-    vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
547
-    if test -z "$vuln"; then
548
-	vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
549
-    fi
550
-
551
-    if test -n "$vuln"; then
552
-	if test "$zlib_check" = "yes"; then
553
-	    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!)
554
-	else
555
-	    AC_MSG_WARN([****** This ClamAV installation may be linked against])
556
-	    AC_MSG_WARN([****** a broken zlib version. Please DO NOT report any])
557
-	    AC_MSG_WARN([****** stability problems to the ClamAV developers!])
558
-	fi
559
-    fi
560
-
561
-    save_LIBS="$LIBS"
562
-    if test "$ZLIB_HOME" != "/usr"; then
563
-	CPPFLAGS="$CPPFLAGS -I$ZLIB_HOME/include"
564
-	save_LDFLAGS="$LDFLAGS"
565
-	LDFLAGS="$LDFLAGS -L$ZLIB_HOME/lib"
566
-	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]))
567
-	AC_CHECK_LIB([z], [gzopen], [], AC_MSG_ERROR([Your zlib is missing gzopen()]))
568
-	LDFLAGS="$save_LDFLAGS"
569
-    else
570
-	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]))
571
-	AC_CHECK_LIB([z], [gzopen],[], AC_MSG_ERROR([Your zlib is missing gzopen()]))
572
-    fi
573
-    LIBS="$save_LIBS"
574
-fi
575
-
576
-AC_ARG_ENABLE([bzip2],
577
-[  --disable-bzip2	  disable bzip2 support],
578
-want_bzip2=$enableval, want_bzip2="yes")
579
-
580
-bzip_check="ok"
581
-if test "$want_bzip2" = "yes"
582
-then
583
-    AC_LIB_LINKFLAGS([bz2])
584
-    save_LDFLAGS="$LDFLAGS"
585
-    # Only add -L if prefix is not empty
586
-    test -z "$LIBBZ2_PREFIX" || LDFLAGS="$LDFLAGS -L$LIBBZ2_PREFIX/$acl_libdirstem";
587
-
588
-    have_bzprefix="no"
589
-    AC_CHECK_LIB([bz2], [BZ2_bzDecompressInit], [have_bzprefix="yes"])
590
-    if test "x$have_bzprefix" = "xno"; then
591
-        AC_DEFINE([NOBZ2PREFIX],1,[bzip funtions do not have bz2 prefix])
592
-    fi
593
-    LDFLAGS="$save_LDFLAGS"
594
-    if test "$HAVE_LIBBZ2" = "yes"; then
595
-	AC_CHECK_HEADER([bzlib.h],
596
-			[AC_C_CVE_2008_1372],
597
-			[ac_cv_c_cve_2008_1372="no"])
598
-	if test "$ac_cv_c_cve_2008_1372" = "bugged"; then
599
-		AC_MSG_WARN([****** bzip2 libraries are affected by the CVE-2008-1372 bug])
600
-		AC_MSG_WARN([****** We strongly suggest you to update to bzip2 1.0.5.])
601
-		AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
602
-		bzip_check="bugged (CVE-2008-1372)"
603
-	fi
604
-	if test "$ac_cv_c_cve_2008_1372" = "linkfailed"; then
605
-		dnl This shouldn't happen
606
-		dnl We failed to link but libtool may still be able to link, so don't disable bzip2 just yet
607
-		AC_MSG_WARN([****** Unable to link bzip2 testcase])
608
-		AC_MSG_WARN([****** You may be affected by CVE-2008-1372 bug, but I need to be able to link a testcase to verify])
609
-		AC_MSG_WARN([****** It is recommended to fix your build environment so that we can run the testcase!])
610
-		AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
611
-		bzip_check="link failed (CVE-2008-1372)"
612
-	fi
613
-
614
-	case "$ac_cv_c_cve_2008_1372" in
615
-	ok|bugged|linkfailed)
616
-		;;
617
-	*)
618
-		HAVE_LIBBZ2=no
619
-		;;
620
-	esac
621
-    fi
622
-
623
-    if test "$HAVE_LIBBZ2" = "yes"; then
624
-	AC_C_CVE_2010_0405
625
-	if test "$ac_cv_c_cve_2010_0405" = "bugged"; then
626
-		AC_MSG_WARN([****** bzip2 libraries are affected by the CVE-2010-0405 bug])
627
-		AC_MSG_WARN([****** We strongly suggest you to update bzip2])
628
-		AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
629
-		bzip_check="bugged (CVE-2010-0405)"
630
-	fi
631
-	if test "$ac_cv_c_cve_2010_0405" = "linkfailed"; then
632
-		dnl This shouldn't happen
633
-		dnl We failed to link but libtool may still be able to link, so don't disable bzip2 just yet
634
-		AC_MSG_WARN([****** Unable to link bzip2 testcase])
635
-		AC_MSG_WARN([****** You may be affected by CVE-2010-0405 bug, but I need to be able to link a testcase to verify])
636
-		AC_MSG_WARN([****** It is recommended to fix your build environment so that we can run the testcase!])
637
-		AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
638
-		bzip_check="link failed (CVE-2010-0405)"
639
-	fi
640
-
641
-	case "$ac_cv_c_cve_2010_0405" in
642
-	ok|bugged|linkfailed)
643
-		LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $LTLIBBZ2"
644
-		AC_DEFINE([HAVE_BZLIB_H],1,[have bzip2])
645
-		;;
646
-	*)
647
-		AC_MSG_WARN([****** bzip2 support disabled])
648
-		;;
649
-	esac
650
-
651
-    else
652
-	AC_MSG_WARN([****** bzip2 support disabled])
653
-    fi
654
-fi
655
-
656
-have_curl="no"
657
-curl_msg="Please use the web interface for submitting FPs/FNs."
658
-AC_MSG_CHECKING([for libcurl installation])
659
-
660
-AC_ARG_WITH([libcurl],
661
-[  --with-libcurl=DIR   path to directory containing libcurl (default=
662
-    /usr/local or /usr if not found in /usr/local)],
663
-[
664
-if test "$withval"; then
665
-    LIBCURL_HOME="$withval"
666
-fi
667
-], [
668
-LIBCURL_HOME=/usr/local
669
-if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
670
-then
671
-    LIBCURL_HOME=/usr
672
-fi
673
-AC_MSG_RESULT([$LIBCURL_HOME])
674
-])
675
-
676
-if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
677
-then
678
-    AC_MSG_WARN([libcurl not found. Please use the web interface for submitting FPs/FNs.])
679
-else
680
-    if test -f "$LIBCURL_HOME/bin/curl-config"; then
681
-        CURL_LDFLAGS=$($LIBCURL_HOME/bin/curl-config --libs)
682
-        CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags)
683
-    else
684
-        CURL_LDFLAGS="-L$LIBCURL_HOME/lib -lcurl"
685
-        CURL_CPPFLAGS="-I$LIBCURL_HOME/include"
686
-    fi
687
-
688
-    save_LDFLAGS="$LDFLAGS"
689
-    LDFLAGS="-L$LIBCURL_HOME/lib -lcurl"
690
-    AC_CHECK_LIB([curl], [curl_easy_init], [curl_msg="";have_curl="yes";CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS";CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"],
691
-            [AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])])
692
-    LDFLAGS="$save_LDFLAGS"
693
-fi
694
-
695
-AM_CONDITIONAL([HAVE_LIBBZ2], test "x$HAVE_LIBBZ2" = "xyes")
696
-
697
-AC_ARG_ENABLE([unrar],
698
-[  --disable-unrar	  do not build libclamunrar and libclamunrar_iface ],
699
-want_unrar=$enableval, want_unrar="yes")
700
-AM_CONDITIONAL([ENABLE_UNRAR],[test "$want_unrar" = "yes"])
701
-
702
-dnl libxml2
703
-want_xml="auto"
704
-AC_ARG_ENABLE([xml],
705
-[  --disable-xml	  disable DMG and XAR support],
706
-want_xml=$enableval, want_xml="auto")
707
-
708
-XML_HOME=""
709
-if test "X$want_xml" != "Xno"; then
710
-  AC_MSG_CHECKING([for libxml2 installation])
711
-  AC_ARG_WITH([xml],
712
-  [  --with-xml=DIR	  path to directory containing libxml2 library (default=
713
-			  /usr/local or /usr if not found in /usr/local)],
714
-  [
715
-  if test "$withval"
716
-  then
717
-    XML_HOME="$withval"
718
-    AC_MSG_RESULT([using $XML_HOME])
719
-  else
720
-    AC_MSG_ERROR([cannot assign blank value to --with-xml])
721
-  fi
722
-  ], [
723
-  XML_HOME=/usr/local
724
-  if test ! -x "$XML_HOME/bin/xml2-config"
725
-  then
726
-    XML_HOME=/usr
727
-    if test ! -x "$XML_HOME/bin/xml2-config"
728
-    then
729
-      XML_HOME=""
730
-    fi
731
-  fi
732
-  if test "x$XML_HOME" != "x"; then
733
-    AC_MSG_RESULT([$XML_HOME])
734
-  else
735
-    AC_MSG_RESULT([not found])
736
-  fi
737
-  ])
738
-fi
739
-
740
-found_xml="no"
741
-XMLCONF_VERSION=""
742
-XML_CPPFLAGS=""
743
-XML_LIBS=""
744
-if test "x$XML_HOME" != "x"; then
745
-  AC_MSG_CHECKING([xml2-config version])
746
-  XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`"
747
-  if test "x%XMLCONF_VERSION" != "x"; then
748
-    AC_MSG_RESULT([$XMLCONF_VERSION])
749
-    found_xml="yes"
750
-    XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
751
-    XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
752
-  else
753
-    AC_MSG_ERROR([xml2-config failed])
754
-  fi
755
-fi
756
-
757
-working_xml="no"
758
-if test "X$found_xml" != "Xno"; then
759
-  AC_MSG_CHECKING([for xmlreader.h in $XML_HOME])
760
-
761
-  if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then
762
-    AC_MSG_RESULT([not found])
763
-  else
764
-    AC_MSG_RESULT([found])
765
-    save_LIBS="$LIBS"
766
-    save_CPPFLAGS="$CPPFLAGS"
767
-    CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
768
-    save_LDFLAGS="$LDFLAGS"
769
-    LDFLAGS="$LDFLAGS $XML_LIBS"
770
-
771
-    AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"])
772
-
773
-    CPPFLAGS="$save_CPPFLAGS"
774
-    LDFLAGS="$save_LDFLAGS"
775
-    LIBS="$save_LIBS"
776
-  fi
777
-fi
778
-
779
-if test "$working_xml" = "yes"; then
780
-  AC_DEFINE([HAVE_LIBXML2],1,[Define to 1 if you have the 'libxml2' library (-lxml2).])
781
-  AC_SUBST(XML_CPPFLAGS)
782
-  AC_SUBST(XML_LIBS)
783
-  AC_MSG_NOTICE([Compiling and linking with libxml2 from $XML_HOME])
784
-else
785
-  if test "$want_xml" = "yes"; then
786
-     AC_MSG_ERROR([****** Please install libxml2 packages!])
787
-  else
788
-    if test "$want_xml" != "no"; then
789
-      AC_MSG_NOTICE([****** libxml2 support unavailable])
790
-    fi
791
-  fi
792
-  XML_CPPFLAGS=""
793
-  XML_LIBS=""
794
-  AC_SUBST(XML_CPPFLAGS)
795
-  AC_SUBST(XML_LIBS)
796
-fi
797
-
798
-AC_ARG_ENABLE([getaddrinfo],
799
-[  --disable-getaddrinfo          disable support for getaddrinfo],
800
-want_getaddrinfo=$enableval, want_getaddrinfo="yes")
801
-
802
-if test "$want_getaddrinfo" = "yes"
803
-then
804
-    AC_MSG_CHECKING([for getaddrinfo])
805
-    AC_CACHE_VAL([have_cv_gai],[
806
-		AC_TRY_RUN([
807
-		    #include <sys/types.h>
808
-		    #include <sys/socket.h>
809
-		    #include <netdb.h>
810
-		    #include <unistd.h>
811
-		    int main(int argc, char **argv)
812
-		    {
813
-			    struct addrinfo *res;
814
-			    int sd;
815
-
816
-			if(getaddrinfo("127.0.0.1", NULL, NULL, &res) < 0)
817
-			    return 1;
818
-			freeaddrinfo(res);
819
-
820
-			return 0;
821
-		    }
822
-		],
823
-		[have_cv_gai=yes],
824
-		[have_cv_gai=no],
825
-		[have_cv_gai=no])
826
-		])
827
-    AC_MSG_RESULT([$have_cv_gai])
828
-    if test "$have_cv_gai" = yes; then
829
-	AC_DEFINE(HAVE_GETADDRINFO, 1, [have getaddrinfo()])
830
-    fi
831
-fi
832
-
833
-AC_ARG_ENABLE([ipv6],
834
-[  --disable-ipv6          disable IPv6 support],
835
-want_ipv6=$enableval, want_ipv6="yes")
836
-
837
-if test "$want_ipv6" = "yes"
838
-then
839
-    AC_MSG_CHECKING([for IPv6 support])
840
-    AC_CACHE_VAL([have_cv_ipv6],[
841
-		AC_TRY_RUN([
842
-		    #include <sys/types.h>
843
-		    #include <sys/socket.h>
844
-		    #include <netdb.h>
845
-		    #include <unistd.h>
846
-		    int main(int argc, char **argv)
847
-		    {
848
-			    struct addrinfo *res, hints;
849
-			    int sd;
850
-
851
-			if((sd = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
852
-			    return 1;
853
-			close(sd);
854
-			/* also check if getaddrinfo() handles AF_UNSPEC -- bb#1196 */
855
-			memset(&hints, 0, sizeof(hints));
856
-			hints.ai_family = AF_UNSPEC;
857
-			if(getaddrinfo("127.0.0.1", NULL, &hints, &res) < 0)
858
-			    return 1;
859
-			freeaddrinfo(res);
860
-			return 0;
861
-		    }
862
-		],
863
-		[have_cv_ipv6=yes],
864
-		[have_cv_ipv6=no],
865
-		[have_cv_ipv6=no])
866
-		])
867
-    AC_MSG_RESULT([$have_cv_ipv6])
868
-    if test "$have_cv_ipv6" = yes; then
869
-	AC_DEFINE(SUPPORT_IPv6, 1, [Support for IPv6])
870
-    fi
871
-fi
872
-
873
-AC_C_DNS
874
-
875
-AC_ARG_ENABLE([fanotify],
876
-[  --disable-fanotify	  disable fanotify support (Linux only)],
877
-want_fanotify=$enableval, want_fanotify="yes")
878
-
879
-dnl AC_FUNC_SETPGRP does not work when cross compiling
880
-dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
881
-dnl testcase from gdb/configure.ac
882
-if test "$cross_compiling" = no; then
883
- AC_FUNC_SETPGRP
884
-else
885
- AC_CACHE_CHECK([whether setpgrp takes no argument], [ac_cv_func_setpgrp_void],
886
-   [AC_TRY_COMPILE([
887
-#include <unistd.h>
888
-], [
889
- if (setpgrp(1,1) == -1)
890
-   exit (0);
891
- else
892
-   exit (1);
893
-], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)])
894
-if test $ac_cv_func_setpgrp_void = yes; then
895
- AC_DEFINE([SETPGRP_VOID], 1)
896
-fi
897
-fi
898
-
899
-AC_ARG_ENABLE([milter],
900
-[  --enable-milter	  build clamav-milter],
901
-have_milter=$enableval, have_milter="no")
902
-
903
-dnl we need to try to link with iconv, otherwise there could be a 
904
-dnl mismatch between a 32-bit and 64-bit lib. Detect this at configure time.
905
-dnl we need to check after zlib/bzip2, because they can change the include path
906
-AC_ARG_WITH([iconv], [  --with-iconv supports iconv() (default=auto)],
907
-[
908
- case "$withval" in
909
-	 yes|no) wiconv="$withval";;
910
-	 *) AC_MSG_ERROR([--with-iconv does not take an argument]);;
911
- esac],
912
-[ wiconv=auto ])
913
-if test "X$wiconv" != "Xno"; then
914
-	AC_CHECK_LIB([iconv], [libiconv_open], LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -liconv")
915
-	AC_MSG_CHECKING([for iconv])
916
-	save_LIBS="$LIBS"
917
-	LIBS="$LIBCLAMAV_LIBS"
918
-	AC_TRY_LINK([
919
-		     #include <iconv.h>
920
-	],[
921
-	char** xin,**xout;
922
-	unsigned long il,ol;
923
-	int rc;
924
-	iconv_t iconv_struct = iconv_open("UTF-16BE","UTF-8");
925
-	rc = iconv(iconv_struct,xin,&il,xout,&ol);
926
-	iconv_close(iconv_struct);
927
-],[
928
-   AC_MSG_RESULT(yes)
929
-   AC_DEFINE([HAVE_ICONV], 1, [iconv() available])
930
-],[
931
-	AC_MSG_RESULT(no)
932
-])
933
-	LIBS="$save_LIBS"
934
-fi
935
-
936
-AC_ARG_ENABLE([pthreads],
937
-[  --disable-pthreads      disable POSIX threads support],
938
-have_pthreads=$enableval,)
939
-
940
-AC_ARG_ENABLE([cr],
941
-[  --disable-cr		  do not link with C reentrant library (BSD) ],
942
-use_cr=$enableval,)
943
-
944
-AC_ARG_ENABLE([id-check],
945
-[  --enable-id-check	  use id utility instead of /etc/passwd parsing],
946
-use_id=$enableval, use_id="no")
947
-
948
-AC_ARG_ENABLE([yp-check],
949
-[  --enable-yp-check	  use ypmatch utility instead of /etc/passwd parsing],
950
-use_yp=$enableval, use_yp="no")
951
-
952
-AC_ARG_WITH([user], 
953
-[  --with-user=uid	  name of the clamav user (default=clamav)],
954
-clamav_user="$withval", clamav_user="clamav")
955
-
956
-AC_ARG_WITH([group], 
957
-[  --with-group=gid	  name of the clamav group (default=clamav)],
958
-clamav_group="$withval", clamav_group="clamav")
959
-
960
-AC_DEFINE_UNQUOTED([CLAMAVUSER],"$clamav_user",[name of the clamav user])
961
-AC_DEFINE_UNQUOTED([CLAMAVGROUP],"$clamav_group",[name of the clamav group])
962
-
963
-AC_ARG_ENABLE([clamav],
964
-[  --disable-clamav	  disable test for clamav user/group],
965
-test_clamav=$enableval, test_clamav=yes)
966
-
967
-AC_ARG_ENABLE([debug],
968
-[  --enable-debug	  enable debug code],
969
-enable_debug=$enableval, enable_debug="no")
970
-
971
-if test "$enable_debug" = "yes"; then
972
-  VERSION_SUFFIX="$VERSION_SUFFIX-debug"
973
-  AC_DEFINE([CL_DEBUG],1,[enable debugging])
974
-else
975
-  AC_DEFINE([NDEBUG],1,[disable assertions])
976
-fi
977
-
978
-AC_ARG_WITH([version], 
979
-[  --with-version=STR    use custom version string (dev only)],
980
-VERSION="$withval", )
981
-
982
-AC_ARG_ENABLE([no-cache],
983
-[  --enable-no-cache	  use "Cache-Control: no-cache" in freshclam],
984
-enable_nocache=$enableval, enable_nocache="no")
985
-
986
-if test "$enable_nocache" = "yes"; then
987
-  AC_DEFINE([FRESHCLAM_NO_CACHE],1,[use "Cache-Control: no-cache" in freshclam])
988
-fi
989
-
990
-AC_ARG_ENABLE([dns-fix],
991
-[  --enable-dns-fix	  enable workaround for broken DNS servers (as in SpeedTouch 510)],
992
-enable_dnsfix=$enableval, enable_dnsfix="no")
993
-
994
-if test "$enable_dnsfix" = "yes"; then
995
-  AC_DEFINE([FRESHCLAM_DNS_FIX],1,[enable workaround for broken DNS servers])
996
-fi
997
-
998
-AC_ARG_ENABLE([bigstack],
999
-[  --enable-bigstack	  increase thread stack size],
1000
-enable_bigstack=$enableval, enable_bigstack="no")
1001
-
1002
-if test "$enable_bigstack" = "yes"; then
1003
-  AC_DEFINE([C_BIGSTACK],1,[Increase thread stack size.])
1004
-fi
1005
-
1006
-AC_ARG_WITH([dbdir], 
1007
-[  --with-dbdir=path	  path to virus database directory],
1008
-db_dir="$withval", db_dir="_default_")
1009
-
1010
-dnl I had problems with $pkgdatadir thus these funny checks
1011
-if test "$db_dir" = "_default_"
1012
-then
1013
-    if test "$prefix" = "NONE"
1014
-    then
1015
-	db_dir="$ac_default_prefix/share/clamav"
1016
-    else
1017
-	db_dir="$prefix/share/clamav"
1018
-    fi
1019
-fi
1020
-
1021
-AC_DEFINE_UNQUOTED([DATADIR],"$db_dir", [Path to virus database directory.])
1022
-DBDIR="$db_dir"
1023
-AC_SUBST([DBDIR])
1024
-
1025
-dnl configure config directory
1026
-cfg_dir=`echo $sysconfdir | grep prefix`
1027
-
1028
-if test -n "$cfg_dir"; then
1029
-    if test "$prefix" = "NONE"
1030
-    then
1031
-	cfg_dir="$ac_default_prefix/etc"
1032
-    else
1033
-	cfg_dir="$prefix/etc"
1034
-    fi
1035
-else
1036
-    cfg_dir="$sysconfdir"
1037
-fi
1038
-
1039
-CFGDIR=$cfg_dir
1040
-AC_SUBST([CFGDIR])
1041
-AC_DEFINE_UNQUOTED([CONFDIR],"$cfg_dir",[where to look for the config file])
1042
-
1043
-dnl check for in_port_t definition
1044
-AC_MSG_CHECKING([whether in_port_t is defined])
1045
-AC_TRY_COMPILE([
1046
-#include <sys/types.h>
1047
-#include <netinet/in.h>
1048
-],
1049
-[in_port_t pt; pt = 0; return pt;],
1050
-[
1051
-    AC_MSG_RESULT(yes)
1052
-    AC_DEFINE([HAVE_IN_PORT_T],1,[in_port_t is defined])
1053
-],
1054
-AC_MSG_RESULT(no))
1055
-
1056
-dnl check for in_addr_t definition
1057
-AC_MSG_CHECKING([for in_addr_t definition])
1058
-AC_TRY_COMPILE([
1059
-#include <sys/types.h>
1060
-#include <netinet/in.h>
1061
-],
1062
-[ in_addr_t pt; pt = 0; return pt; ],
1063
-[
1064
-    AC_MSG_RESULT(yes)
1065
-    AC_DEFINE([HAVE_IN_ADDR_T],1,[in_addr_t is defined])
1066
-],
1067
-AC_MSG_RESULT(no))
1068
-
1069
-case "$target_os" in
1070
-linux*)
1071
-    AC_DEFINE([C_LINUX],1,[target is linux])
1072
-    if test "$have_pthreads" = "yes"; then
1073
-	THREAD_LIBS="-lpthread"
1074
-	TH_SAFE="-thread-safe"
1075
-	if test "$want_fanotify" = "yes"; then
1076
-	    AC_CHECK_HEADER([sys/fanotify.h],AC_DEFINE([FANOTIFY],1,[use fanotify]),)
1077
-	fi
1078
-    fi
1079
-    ;;
1080
-kfreebsd*-gnu)
1081
-    AC_DEFINE([C_KFREEBSD_GNU],1,[target is kfreebsd-gnu])
1082
-    if test "$have_pthreads" = "yes"; then
1083
-       THREAD_LIBS="-lpthread"
1084
-       TH_SAFE="-thread-safe"
1085
-    fi
1086
-    ;;
1087
-solaris*)
1088
-    CLAMDSCAN_LIBS="$CLAMDSCAN_LIBS -lresolv"
1089
-    FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lresolv"
1090
-    if test "$have_pthreads" = "yes"; then
1091
-	THREAD_LIBS="-lpthread"
1092
-	CLAMD_LIBS="$CLAMD_LIBS -lresolv"
1093
-	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lresolv"
1094
-	TH_SAFE="-thread-safe"
1095
-    fi
1096
-    AC_DEFINE([C_SOLARIS],1,[os is solaris])
1097
-    ;;
1098
-freebsd[[45]]*)
1099
-    if test "$have_pthreads" = "yes"; then
1100
-	THREAD_LIBS="-pthread -lc_r"
1101
-	TH_SAFE="-thread-safe"
1102
-    fi
1103
-    AC_DEFINE([C_BSD],1,[os is freebsd 4 or 5])
1104
-    ;;
1105
-freebsd*)
1106
-    if test "$have_pthreads" = "yes"; then
1107
-	THREAD_LIBS="-lthr"
1108
-	TH_SAFE="-thread-safe"
1109
-    fi
1110
-    AC_DEFINE([C_BSD],1,[os is freebsd 6])
1111
-    ;;
1112
-dragonfly*)
1113
-    if test "$have_pthreads" = "yes"; then
1114
-	THREAD_LIBS="-pthread"
1115
-	TH_SAFE="-thread-safe"
1116
-    fi
1117
-    AC_DEFINE([C_BSD],1,[os is dragonfly])
1118
-    ;;
1119
-openbsd*)
1120
-    if test "$have_pthreads" = "yes"; then
1121
-	THREAD_LIBS="-pthread"
1122
-	CLAMD_LIBS="$CLAMD_LIBS -pthread"
1123
-	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
1124
-	TH_SAFE="-thread-safe"
1125
-    fi
1126
-    AC_DEFINE([C_BSD],1,[os is OpenBSD])
1127
-    ;;
1128
-bsdi*)
1129
-    if test "$have_pthreads" = "yes"; then
1130
-	THREAD_LIBS="-pthread"
1131
-	TH_SAFE="-thread-safe"
1132
-    fi
1133
-    AC_DEFINE([C_BSD],1,[os is BSDI BSD/OS])
1134
-    ;;
1135
-netbsd*)
1136
-     if test "$have_pthreads" = "yes"; then
1137
-	THREAD_LIBS="-lpthread"
1138
-     fi
1139
-    AC_DEFINE([C_BSD],1,[os is NetBSD])
1140
-    ;;
1141
-bsd*)
1142
-    AC_MSG_RESULT([Unknown BSD detected. Disabling thread support.])
1143
-    have_pthreads="no"
1144
-    AC_DEFINE([C_BSD],1,[os is bsd flavor])
1145
-    ;;
1146
-beos*)
1147
-    AC_MSG_RESULT([BeOS detected. Disabling thread support.])
1148
-    have_pthreads="no"
1149
-    AC_DEFINE([C_BEOS],1,[os is beos])
1150
-    ;;
1151
-x86:Interix*)
1152
-    AC_DEFINE([C_INTERIX],1,[os is Interix])
1153
-    ;;
1154
-darwin*)
1155
-    AC_DEFINE([C_BSD],1,[os is bsd flavor])
1156
-    AC_DEFINE([C_DARWIN],1,[os is darwin])
1157
-    AC_DEFINE([BIND_8_COMPAT],1,[enable bind8 compatibility])
1158
-    AC_DEFINE([CLAMAUTH],1,[use ClamAuth])
1159
-    use_netinfo="yes"
1160
-    ;;
1161
-os2*)
1162
-    CLAMDSCAN_LIBS="$CLAMDSCAN_LIBS -lsyslog"
1163
-    FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsyslog"
1164
-    CLAMD_LIBS="$CLAMD_LIBS -lsyslog"
1165
-    CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsyslog"
1166
-    if test "$have_pthreads" = "yes"; then
1167
-	THREAD_LIBS="-lpthread"
1168
-	TH_SAFE="-thread-safe"
1169
-    fi
1170
-    AC_DEFINE([C_OS2],1,[os is OS/2])
1171
-    ;;
1172
-sco*)
1173
-    dnl njh@bandsman.sco.uk: SCO Unix port
1174
-    dnl FRESHCLAM_LIBS="-lsocket"
1175
-    dnl CLAMD_LIBS="-lsocket"
1176
-    dnl CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"
1177
-    ;;
1178
-hpux*)
1179
-    if test "$have_pthreads" = "yes"; then
1180
-	THREAD_LIBS="-lpthread"
1181
-	TH_SAFE="-thread-safe"
1182
-    fi
1183
-    AC_DEFINE([C_HPUX],1,[os is hpux])
1184
-    if test "$have_mempool" = "yes"; then
1185
-	LDFLAGS="$LDFLAGS -Wl,+pd,1M"
1186
-    fi
1187
-    ;;
1188
-aix*)
1189
-    if test "$have_pthreads" = "yes"; then
1190
-	THREAD_LIBS="-lpthread"
1191
-	TH_SAFE="-thread-safe"
1192
-	AC_DEFINE([_THREAD_SAFE],1,[thread safe])
1193
-    fi
1194
-    AC_DEFINE([C_AIX],1,[os is aix])
1195
-    ;;
1196
-*-*-osf*)
1197
-    if test "$have_pthreads" = "yes"; then
1198
-	THREAD_LIBS="-pthread"
1199
-	TH_SAFE="-thread-safe"
1200
-	AC_DEFINE([_POSIX_PII_SOCKET],1,[POSIX compatibility])
1201
-    fi
1202
-    AC_DEFINE([C_OSF],1,[os is osf/tru64])
1203
-    ;;
1204
-nto-qnx*)
1205
-    AC_DEFINE([C_QNX6],1,[os is QNX 6.x.x])
1206
-    ;;
1207
-irix*)
1208
-    if test "$have_pthreads" = "yes"; then
1209
-	THREAD_LIBS="-lpthread"
1210
-	TH_SAFE="-thread-safe"
1211
-    fi
1212
-    LIBS="$LIBS -lgen"
1213
-    AC_DEFINE([C_IRIX],1,[os is irix])
1214
-    ;;
1215
-interix*)
1216
-    AC_DEFINE([C_INTERIX],1,[os is interix])
1217
-    if test "$test_clamav" = "yes"; then
1218
-	if test ! -r /etc/passwd; then
1219
-	   test_clamav="no"
1220
-	fi
1221
-    fi
1222
-    if test "$have_pthreads" = "yes"; then
1223
-	THREAD_LIBS="-lpthread"
1224
-	TH_SAFE="-thread-safe"
1225
-    fi
1226
-    ;;
1227
-gnu*)
1228
-    AC_DEFINE([C_GNU_HURD],1,[target is gnu-hurd])
1229
-    if test "$have_pthreads" = "yes"; then
1230
-       THREAD_LIBS="-lpthread"
1231
-       TH_SAFE="-thread-safe"
1232
-    fi
1233
-    ;;
1234
-*)
1235
-    ;;
1236
-esac
1237
-
1238
-AC_SUBST([LIBCLAMAV_LIBS])
1239
-AC_SUBST([CLAMD_LIBS])
1240
-AC_SUBST([CLAMAV_MILTER_LIBS])
1241
-AC_SUBST([FRESHCLAM_LIBS])
1242
-AC_SUBST([CLAMDSCAN_LIBS])
1243
-AC_SUBST([TH_SAFE])
1244
-AC_SUBST([THREAD_LIBS])
1245
-AC_SUBST([CLAMSUBMIT_LIBS])
1246
-AC_SUBST([CLAMSUBMIT_CFLAGS])
1247
-
1248
-dnl --enable-milter
1249
-if test "$have_milter" = "yes"; then
1250
-    dnl libmilter checking code adapted from spamass-milter by
1251
-    dnl Tom G. Christensen <tgc@statsbiblioteket.dk>
1252
-
1253
-    dnl Check for libmilter and it's header files in the usual locations
1254
-    save_LIBS="$LIBS"
1255
-    CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lpthread"
1256
-    if test -d /usr/lib/libmilter ; then
1257
-	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -L/usr/lib/libmilter"
1258
-    fi
1259
-    LIBS="$LIBS -lmilter $CLAMAV_MILTER_LIBS"
1260
-    AC_CHECK_LIB([milter],[mi_stop],[CLAMAV_MILTER_LIBS="-lmilter $CLAMAV_MILTER_LIBS"],[
1261
-	dnl Older sendmails require libsm or libsmutil for support functions
1262
-	AC_SEARCH_LIBS([strlcpy], [sm smutil], [test "$ac_cv_search_strlcpy" = "none required" || CLAMAV_MILTER_XLIB="$ac_cv_search_strlcpy"])
1263
-	LIBS="$save_LIBS $CLAMAV_MILTER_LIBS $CLAMAV_MILTER_XLIB"
1264
-	$as_unset ac_cv_lib_milter_mi_stop
1265
-	AC_CHECK_LIB([milter],[mi_stop],[CLAMAV_MILTER_LIBS="-lmilter $CLAMAV_MILTER_XLIB $CLAMAV_MILTER_LIBS"],[
1266
-	    AC_MSG_ERROR([Cannot find libmilter])
1267
-	])
1268
-    ])
1269
-    LIBS="$save_LIBS"
1270
-    AC_CHECK_HEADERS([libmilter/mfapi.h],[have_milter="yes"],[
1271
-	AC_MSG_ERROR([Please install mfapi.h from the sendmail distribution])
1272
-    ])
1273
-fi
1274
-
1275
-AM_CONDITIONAL([BUILD_CLAMD],[test "$have_pthreads" = "yes"])
1276
-AM_CONDITIONAL([HAVE_MILTER],[test "$have_milter" = "yes"])
1277
-
1278
-if test "$have_pthreads" = "yes"
1279
-then
1280
-    save_LIBS="$LIBS"
1281
-    LIBS="$THREAD_LIBS $LIBS"
1282
-    AC_CHECK_FUNCS([sched_yield pthread_yield])
1283
-    LIBS="$save_LIBS"
1284
-    AC_DEFINE([BUILD_CLAMD], 1, "build clamd")
1285
-    dnl define these here, so we don't forget any system
1286
-    AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
1287
-    AC_DEFINE([_REENTRANT],1,[thread safe])
1288
-fi
1289
-
1290
-AC_CHECK_FUNCS([enable_extended_FILE_stdio])
1291
-
1292
-dnl Check for readdir_r and number of its arguments
1293
-dnl Code from libwww/configure.in
1294
-
1295
-AC_MSG_CHECKING([for readdir_r])
1296
-if test -z "$ac_cv_readdir_args"; then
1297
-    AC_TRY_COMPILE(
1298
-    [
1299
-#include <sys/types.h>
1300
-#include <dirent.h>
1301
-    ],
1302
-    [
1303
-    struct dirent dir, *dirp;
1304
-    DIR *mydir;
1305
-    dirp = readdir_r(mydir, &dir);
1306
-    ], ac_cv_readdir_args=2)
1307
-fi
1308
-if test -z "$ac_cv_readdir_args"; then
1309
-    AC_TRY_COMPILE(
1310
-        [
1311
-#include <sys/types.h>
1312
-#include <dirent.h>
1313
-    ],
1314
-    [
1315
-        struct dirent dir, *dirp;
1316
-        DIR *mydir;
1317
-        int rc;
1318
-        rc = readdir_r(mydir, &dir, &dirp);
1319
-    ], ac_cv_readdir_args=3)
1320
-fi
1321
-
1322
-AC_ARG_ENABLE([readdir_r],
1323
-[  --enable-readdir_r		    enable support for readdir_r],
1324
-enable_readdir_r=$enableval, enable_readdir_r="no")
1325
-
1326
-if test "$enable_readdir_r" = "no"; then
1327
-    AC_MSG_RESULT(support disabled)
1328
-elif test -z "$ac_cv_readdir_args"; then
1329
-    AC_MSG_RESULT(no)
1330
-else
1331
-    if test "$ac_cv_readdir_args" = 2; then
1332
-	AC_DEFINE([HAVE_READDIR_R_2],1,[readdir_r takes 2 arguments])
1333
-    elif test "$ac_cv_readdir_args" = 3; then
1334
-	AC_DEFINE([HAVE_READDIR_R_3],1,[readdir_r takes 3 arguments])
1335
-    fi
1336
-    AC_MSG_RESULT([yes, and it takes $ac_cv_readdir_args arguments])
1337
-fi
1338
-
1339
-AC_MSG_CHECKING([for ctime_r])
1340
-if test "$ac_cv_func_ctime_r" = "yes"; then
1341
-    AC_TRY_COMPILE([
1342
-	#include <time.h>
1343
-    ],[
1344
-	char buf[31];
1345
-	time_t t;
1346
-	ctime_r(&t, buf, 30);
1347
-    ],[
1348
-	ac_cv_ctime_args=3
1349
-	AC_DEFINE([HAVE_CTIME_R_3],1,[ctime_r takes 3 arguments])
1350
-    ],[
1351
-	ac_cv_ctime_args=2
1352
-	AC_DEFINE([HAVE_CTIME_R_2],1,[ctime_r takes 2 arguments])
1353
-    ])
1354
-
1355
-    AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments])
1356
-fi
1357
-
1358
-dnl Determine socklen_t type. Code from lftp.
1359
-AC_MSG_CHECKING([for socklen_t])
1360
-AC_CACHE_VAL([ac_cv_socklen_t],
1361
-[
1362
-    ac_cv_socklen_t=no
1363
-    AC_TRY_COMPILE([
1364
-	#include <sys/types.h>
1365
-        #include <sys/socket.h>
1366
-    ],
1367
-    [
1368
-	socklen_t len;
1369
-        getpeername(0,0,&len);
1370
-    ],
1371
-    [
1372
-	ac_cv_socklen_t=yes
1373
-    ])
1374
-])
1375
-AC_MSG_RESULT([$ac_cv_socklen_t])
1376
-    if test $ac_cv_socklen_t = no; then
1377
-    AC_MSG_CHECKING([for socklen_t equivalent])
1378
-    AC_CACHE_VAL([ac_cv_socklen_t_equiv],
1379
-    [
1380
-	ac_cv_socklen_t_equiv=int
1381
-        for t in int size_t unsigned long "unsigned long"; do
1382
-	    AC_TRY_COMPILE([
1383
-		#include <sys/types.h>
1384
-		#include <sys/socket.h>
1385
-	    ],
1386
-            [
1387
-		$t len;
1388
-		getpeername(0,0,&len);
1389
-            ],
1390
-            [
1391
-		ac_cv_socklen_t_equiv="$t"
1392
-		break
1393
-            ])
1394
-	done
1395
-    ])
1396
-    AC_MSG_RESULT([$ac_cv_socklen_t_equiv])
1397
-    AC_DEFINE_UNQUOTED([socklen_t], $ac_cv_socklen_t_equiv, [Define to "int" if <sys/socket.h> does not define.])
1398
-fi
1399
-
1400
-dnl Check for clamav in /etc/passwd
1401
-if test "$test_clamav" = "yes"
1402
-then
1403
-    dnl parse /etc/passwd
1404
-    if test "$use_id" = "no"
1405
-    then
1406
-	AC_MSG_CHECKING([for $clamav_user in /etc/passwd])
1407
-	if test -r /etc/passwd; then
1408
-	    clamavuser=`cat /etc/passwd|grep "^$clamav_user:"`
1409
-	    clamavgroup=`cat /etc/group|grep "^$clamav_group:"`
1410
-	fi
1411
-    else
1412
-	AC_MSG_CHECKING([for $clamav_user using id])
1413
-	id $clamav_user > /dev/null 2>&1
1414
-	if test "$?" = 0 ; then
1415
-	    clamavuser=1
1416
-	    AC_PATH_PROG(GETENT, getent)
1417
-	    if test -n "$GETENT" ; then
1418
-		clamavgroup=`$GETENT group | grep "^${clamav_group}:"`
1419
-	    else
1420
-		clamavgroup=`cat /etc/group|grep $clamav_group`
1421
-	    fi
1422
-	fi
1423
-    fi
1424
-
1425
-    if test "$use_netinfo" = "yes"
1426
-    then
1427
-	if test -x /usr/bin/dscl; then
1428
-	    AC_MSG_CHECKING([for $clamav_user using dscl])
1429
-	    clamavuser=`/usr/bin/dscl . -list /Users |grep ${clamav_user}`
1430
-	    clamavgroup=`/usr/bin/dscl . -list /Groups |grep ${clamav_group}`
1431
-	else
1432
-	    AC_MSG_CHECKING([for $clamav_user using netinfo])
1433
-	    clamavuser=`/usr/bin/nidump passwd . |grep ${clamav_user}`
1434
-	    clamavgroup=`/usr/bin/nidump group . |grep ${clamav_group}`
1435
-	fi
1436
-    fi
1437
-
1438
-    if test "$use_yp" = "yes"
1439
-    then
1440
-	AC_MSG_CHECKING([for $clamav_user using ypmatch])
1441
-        clamavuser=`ypmatch ${clamav_user} passwd`
1442
-        clamavgroup=`ypmatch ${clamav_group} group`
1443
-    fi
1444
-
1445
-    if test -z "$clamavuser" || test -z "$clamavgroup"
1446
-    then
1447
-	AC_MSG_RESULT(no)
1448
-	AC_MSG_ERROR([User $clamav_user (and/or group $clamav_group) does not exist. Please read the documentation !])
1449
-    else
1450
-	AC_MSG_RESULT([yes, user $clamav_user and group $clamav_group])
1451
-        CLAMAVUSER="$clamav_user"
1452
-        CLAMAVGROUP="$clamav_group"
1453
-        AC_SUBST([CLAMAVUSER])
1454
-        AC_SUBST([CLAMAVGROUP])
1455
-    fi
1456
-fi
1457
-
1458
-dnl check for __attribute__((packed))
1459
-dnl but only on compilers claiming to be gcc compatible
1460
-dnl because for example Sun's compiler silently ignores the packed attribute.
1461
-AC_MSG_CHECKING([for structure packing via __attribute__((packed))])
1462
-AC_CACHE_VAL([have_cv_attrib_packed],[
1463
-	AC_TRY_COMPILE(,
1464
-		[#ifdef __GNUC__
1465
-		 struct { int i __attribute__((packed)); } s;
1466
-		 #else
1467
-		 #error Only checking for packed attribute on gcc-like compilers
1468
-		 #endif],
1469
-		[have_cv_attrib_packed=yes],
1470
-		[have_cv_attrib_packed=no])
1471
-	])
1472
-AC_MSG_RESULT([$have_cv_attrib_packed])
1473
-
1474
-if test "$have_cv_attrib_packed" = no; then
1475
-	AC_MSG_CHECKING([for structure packing via pragma])
1476
-	AC_CACHE_VAL([have_cv_pragma_pack],[
1477
-		AC_TRY_RUN([
1478
-			    int main(int argc, char **argv) {
1479
-#pragma pack(1)			/* has to be in column 1 ! */
1480
-			struct { char c; long l; } s;
1481
-			return sizeof(s)==sizeof(s.c)+sizeof(s.l) ? 0:1; } ],
1482
-			[have_cv_pragma_pack=yes],
1483
-			[have_cv_pragma_pack=no])
1484
-		])
1485
-	AC_MSG_RESULT([$have_cv_pragma_pack])
1486
-	if test "$have_cv_pragma_pack" = yes; then
1487
-		AC_DEFINE([HAVE_PRAGMA_PACK], 1, "pragma pack")
1488
-	else
1489
-		AC_MSG_CHECKING([for structure packing via hppa/hp-ux pragma])
1490
-		AC_CACHE_VAL([have_cv_pragma_pack_hpux],[
1491
-			AC_TRY_RUN([
1492
-			/* hppa/hp-ux wants pragma outside of function */
1493
-#pragma pack 1 /* has to be in column 1 ! */
1494
-			struct { char c; long l; } s;
1495
-			    int main(int argc, char **argv) {
1496
-			return sizeof(s)==sizeof(s.c)+sizeof(s.l) ? 0:1; } ],
1497
-			[have_cv_pragma_pack_hpux=yes],
1498
-			[have_cv_pragma_pack_hpux=no])
1499
-		])
1500
-		AC_MSG_RESULT([$have_cv_pragma_pack_hpux])
1501
-		AC_DEFINE([HAVE_PRAGMA_PACK_HPPA], 1, "pragma pack hppa/hp-ux style")
1502
-	fi
1503
-fi
1504
-
1505
-dnl check for __attribute__((aligned))
1506
-AC_MSG_CHECKING([for type aligning via __attribute__((aligned))])
1507
-AC_CACHE_VAL([have_cv_attrib_aligned],[
1508
-	AC_TRY_COMPILE(,
1509
-		[typedef int cl_aligned_int __attribute__((aligned));],
1510
-		[have_cv_attrib_aligned=yes],
1511
-		[have_cv_attrib_aligned=no])
1512
-	])
1513
-AC_MSG_RESULT([$have_cv_attrib_aligned])
1514
-
1515
-if test "$have_cv_attrib_packed" = no -a "$have_cv_pragma_pack" = no -a "$have_cv_pragma_pack_hpux" = no; then
1516
-	AC_MSG_ERROR(Need to know how to pack structures with this compiler)
1517
-fi
1518
-
1519
-if test "$have_cv_attrib_packed" = yes; then
1520
-	AC_DEFINE([HAVE_ATTRIB_PACKED], 1, [attrib packed])
1521
-fi
1522
-
1523
-if test "$have_cv_attrib_aligned" = yes; then
1524
-	AC_DEFINE([HAVE_ATTRIB_ALIGNED], 1, [attrib aligned])
1525
-fi
1526
-
1527
-dnl Sanity check that struct packing works
1528
-AC_MSG_CHECKING([that structure packing works])
1529
-AC_CACHE_VAL([have_cv_struct_pack],[
1530
-    AC_TRY_RUN([
1531
-#ifndef HAVE_ATTRIB_PACKED
1532
-#define __attribute__(x)
1533
-#endif
1534
-#ifdef HAVE_PRAGMA_PACK
1535
-#pragma pack(1) /* has to be in column 1 ! */
1536
-#endif
1537
-#ifdef HAVE_PRAGMA_PACK_HPPA
1538
-#pragma pack 1 /* has to be in column 1 ! */
1539
-#endif
1540
-
1541
-struct { char c __attribute__((packed)); long l __attribute__((packed)); } s;
1542
-
1543
-#ifdef HAVE_PRAGMA_PACK
1544
-#pragma pack()
1545
-#endif
1546
-#ifdef HAVE_PRAGMA_PACK_HPPA
1547
-#pragma pack
1548
-#endif
1549
-
1550
-struct { char c; long l;} s2;
1551
-
1552
-#ifdef HAVE_PRAGMA_PACK
1553
-#pragma pack(1) /* has to be in column 1 ! */
1554
-#endif
1555
-#ifdef HAVE_PRAGMA_PACK_HPPA
1556
-#pragma pack 1 /* has to be in column 1 ! */
1557
-#endif
1558
-
1559
-struct { char c; long l; } __attribute__((packed)) s3;
1560
-
1561
-#ifdef HAVE_PRAGMA_PACK
1562
-#pragma pack()
1563
-#endif
1564
-#ifdef HAVE_PRAGMA_PACK_HPPA
1565
-#pragma pack
1566
-#endif
1567
-
1568
-    int main(int argc, char **argv) {
1569
-        if (sizeof(s)!=sizeof(s.c)+sizeof(s.l))
1570
-	    return 1;
1571
-	if (sizeof(s) != sizeof(s3))
1572
-	    return 2;
1573
-	return (sizeof(s2) >= sizeof(s)) ? 0 : 3;
1574
-    }],
1575
-    [have_cv_struct_pack=yes],
1576
-    [have_cv_struct_pack=no],
1577
-    [have_cv_struct_pack=yes])
1578
-])
1579
-AC_MSG_RESULT([$have_cv_struct_pack])
1580
-
1581
-if test "$have_cv_struct_pack" = "no"; then
1582
-    AC_MSG_ERROR([Structure packing seems to be available, but is not working with this compiler])
1583
-fi
1584
-
1585
-dnl Check if <sys/select.h> needs to be included for fd_set
1586
-AC_MSG_CHECKING([for fd_set])
1587
-AC_HEADER_EGREP([fd_mask], [sys/select.h], [have_fd_set=yes])
1588
-if test "$have_fd_set" = yes; then
1589
-	AC_DEFINE([HAVE_SYS_SELECT_H], 1, "have <sys/select.h>")
1590
-	AC_MSG_RESULT([yes, found in sys/select.h])
1591
-else
1592
-	AC_TRY_COMPILE([#include <sys/time.h>
1593
-			#include <sys/types.h>
1594
-			#ifdef HAVE_UNISTD_H
1595
-			#include <unistd.h>
1596
-			#endif],
1597
-		[fd_set readMask, writeMask;], have_fd_set=yes, have_fd_set=no)
1598
-	if test "$have_fd_set" = yes; then
1599
-		AC_MSG_RESULT([yes, found in sys/types.h])
1600
-	else
1601
-		AC_DEFINE([NO_FD_SET], 1, "no fd_set")
1602
-		AC_MSG_RESULT(no)
1603
-	fi
1604
-fi
1605
-
1606
-AC_MSG_CHECKING([default FD_SETSIZE value])
1607
-AC_TRY_RUN([
1608
-#include <stdio.h>
1609
-#include <unistd.h>
1610
-#include <sys/time.h>
1611
-#ifdef HAVE_SYS_SELECT_H
1612
-#include <sys/select.h>
1613
-#endif
1614
-#ifdef HAVE_SYS_TYPES_H
1615
-#include <sys/types.h>
1616
-#endif
1617
-#include <errno.h>
1618
-int main(void) {
1619
-        FILE *fp = fopen("conftestval", "w");
1620
-	if(fp) {
1621
-		if(fprintf (fp, "%d\n", FD_SETSIZE) < 1)  {
1622
-			perror("fprintf failed");
1623
-			return errno;
1624
-		}
1625
-	} else {
1626
-		perror("fopen failed");
1627
-		return errno;
1628
-	}
1629
-        return 0;
1630
-}
1631
-],
1632
-DEFAULT_FD_SETSIZE=`cat conftestval`,
1633
-DEFAULT_FD_SETSIZE=256,
1634
-DEFAULT_FD_SETSIZE=256)
1635
-AC_MSG_RESULT([$DEFAULT_FD_SETSIZE])
1636
-AC_DEFINE_UNQUOTED([DEFAULT_FD_SETSIZE], $DEFAULT_FD_SETSIZE, "default FD_SETSIZE value")
1637
-
1638
-AC_MSG_CHECKING([stat64])
1639
-AC_TRY_RUN([
1640
-#define _LARGEFILE_SOURCE
1641
-#define _LARGEFILE64_SOURCE
1642
-#include <stdio.h>
1643
-#include <sys/types.h>
1644
-#include <sys/stat.h>
1645
-#include <unistd.h>
1646
-#include <errno.h>
1647
-
1648
-int main(void) {
1649
-    struct stat64 sb;
1650
-
1651
-    if (stat64(".", &sb) == -1)
1652
-        return errno;
1653
-
1654
-    return 0;
1655
-}
1656
-],
1657
-[enable_stat64=yes],
1658
-[enable_stat64=no],
1659
-[enable_stat64=no],
1660
-)
1661
-
1662
-if test "$enable_stat64" != "no"; then
1663
-AC_DEFINE([HAVE_STAT64],1,[enable stat64])
1664
-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
1665
-fi
1666
-AC_MSG_RESULT([$enable_stat64])
1667
-
1668
-dnl Check signed right shift implementation
1669
-AC_MSG_CHECKING([whether signed right shift is sign extended])
1670
-AC_TRY_RUN([int main(void){int a=-1;int b=a>>1;return(a!=b);}],
1671
-    [have_signed_rightshift_extended=yes],
1672
-    [have_signed_rightshift_extended=no],
1673
-    [have_signed_rightshift_extended=no])
1674
-if test $have_signed_rightshift_extended = yes; then
1675
-    AC_DEFINE([HAVE_SAR], 1, [Define signed right shift implementation])
1676
-fi
1677
-AC_MSG_RESULT([$have_signed_rightshift_extended]);
1678
-
1679
-AC_C_FDPASSING
1680
-
1681
-AC_DEFINE_UNQUOTED([VERSION],"$VERSION",[Version number of package])
1682
-AC_DEFINE_UNQUOTED([VERSION_SUFFIX],"$VERSION_SUFFIX",[Version suffix for package])
1683
-
1684
-AC_ARG_ENABLE(clamdtop,
1685
-	      AC_HELP_STRING([--enable-clamdtop],
1686
-			     [Enable 'clamdtop' tool @<:@default=auto@:>@]),
1687
-[enable_clamdtop=$enableval], [enable_clamdtop="auto"])
1688
-
1689
-if test "$enable_clamdtop" != "no"; then
1690
-
1691
-AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
1692
-	    AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
1693
-			    [initscr(); KEY_RESIZE;]),
1694
-	    [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
1695
-	     CURSES_INCLUDE="<ncurses/ncurses.h>"],
1696
-	    [])
1697
-
1698
-if test "X$HAVE_LIBNCURSES" != "Xyes"; then
1699
-    HAVE_LIBNCURSES=
1700
-    AC_LIB_FIND([ncurses], [ncurses.h],
1701
-	    AC_LANG_PROGRAM([#include <ncurses.h>],
1702
-			    [initscr(); KEY_RESIZE;]),
1703
-	    [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
1704
-	     CURSES_INCLUDE="<ncurses.h>"],
1705
-	    [])
1706
-fi
1707
-
1708
-if test "X$HAVE_LIBNCURSES" != "Xyes"; then
1709
-    AC_LIB_FIND([pdcurses],[curses.h],
1710
-			    AC_LANG_PROGRAM([#include <curses.h>],
1711
-					    [initscr(); KEY_RESIZE;]),
1712
-			    [CURSES_CPPFLAGS="$INCPDCURSES";
1713
-			     CURSES_LIBS="$LTLIBPDCURSES";
1714
-			     CURSES_INCLUDE="<curses.h>"],
1715
-			    [AC_MSG_WARN([****** not building clamdtop: ncurses not found])])
1716
-fi
1717
-
1718
-if test "x$CURSES_LIBS" = "x" -a "$enable_clamdtop" = "yes"; then
1719
-    AC_MSG_ERROR([
1720
-
1721
-ERROR!  Clamdtop was configured, but not found.  You need to install libncurses5-dev.
1722
-])
1723
-fi
1724
-
1725
-fi
1726
-
1727
-AC_DEFINE_UNQUOTED([CURSES_INCLUDE], $CURSES_INCLUDE, [curses header location])
1728
-AC_SUBST([CURSES_CPPFLAGS])
1729
-AC_SUBST([CURSES_LIBS])
1730
-AM_CONDITIONAL([HAVE_CURSES],
1731
-	       [test "X$HAVE_LIBNCURSES" = "Xyes" || test "X$HAVE_LIBPDCURSES" = "Xyes"])
1732
-
1733
-AC_ARG_ENABLE([distcheck-werror],
1734
-	      AC_HELP_STRING([--enable-distcheck-werror],
1735
-			     [enable warnings as error for distcheck
1736
-			      @<:@default=no@:>@]),
1737
-[enable_distcheckwerror=$enableval],[enable_distcheckwerror="no"])
1738
-
1739
-# Enable distcheck warnings and Werror only for gcc versions that support them,
1740
-# and only after we've run the configure tests.
1741
-# Some configure tests fail (like checking for cos in -lm) if we enable these
1742
-# Werror flags for configure too (for example -Wstrict-prototypes makes
1743
-# configure think that -lm doesn't have cos, hence its in libc).
1744
-WERR_CFLAGS=
1745
-WERR_CFLAGS_MILTER=
1746
-if test "x$enable_distcheckwerror" = "xyes"; then
1747
-    if test "$distcheck_enable_flags" = "1"; then
1748
-	WERR_COMMON="-Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wno-error=strict-aliasing -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 -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-but-set-variable -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"
1749
-	WERR_CFLAGS="$WERR_COMMON -Wwrite-strings"
1750
-	WERR_CFLAGS_MILTER="$WERR_COMMON -Wno-error=format-nonliteral"
1751
-    fi
1752
-fi
1753
-AC_SUBST([WERR_CFLAGS])
1754
-AC_SUBST([WERR_CFLAGS_MILTER])
1755
-
1756
-AC_ARG_ENABLE([llvm],AC_HELP_STRING([--enable-llvm],
1757
-				    [Enable 'llvm' JIT/verifier support @<:@default=auto@:>@]),
1758
-				    [enable_llvm=$enableval], [enable_llvm="auto"])
1759
-
1760
-if test "$enable_llvm" != "no"; then
1761
-    dnl Try to configure subdir, optionally
1762
-    AC_CONFIG_SUBDIRS_OPTIONAL([libclamav/c++])
1763
-fi
1764
-
1765
-AC_ARG_ENABLE([sha-collector-for-internal-use], [], [enable_sha_collector="yes"], [enable_sha_collector="no"])
1766
-if test "$enable_sha_collector" != "no"; then
1767
-    AC_DEFINE([HAVE__INTERNAL__SHA_COLLECT], 1, [For internal use only - DO NOT DEFINE])
1768
-fi
443
+m4_include([m4/reorganization/libs/libz.m4])
444
+m4_include([m4/reorganization/libs/bzip.m4])
445
+m4_include([m4/reorganization/libs/unrar.m4])
446
+m4_include([m4/reorganization/code_checks/ipv6.m4])
447
+m4_include([m4/reorganization/code_checks/dns.m4])
448
+m4_include([m4/reorganization/code_checks/fanotify.m4])
449
+m4_include([m4/reorganization/code_checks/setpgrp.m4])
450
+m4_include([m4/reorganization/milter/enable.m4])
451
+m4_include([m4/reorganization/code_checks/iconv.m4])
452
+m4_include([m4/reorganization/code_checks/pthreads.m4])
453
+m4_include([m4/reorganization/code_checks/reentrant.m4])
454
+m4_include([m4/reorganization/utility_checks/id.m4])
455
+m4_include([m4/reorganization/utility_checks/yp.m4])
456
+m4_include([m4/reorganization/usergroup.m4])
457
+m4_include([m4/reorganization/debug.m4])
458
+m4_include([m4/reorganization/customversion.m4])
459
+m4_include([m4/reorganization/nocache.m4])
460
+m4_include([m4/reorganization/dns.m4])
461
+m4_include([m4/reorganization/bigstack.m4])
462
+m4_include([m4/reorganization/dbdir.m4])
463
+m4_include([m4/reorganization/cfgdir.m4])
464
+m4_include([m4/reorganization/code_checks/in_port_t.m4])
465
+m4_include([m4/reorganization/code_checks/in_addr_t.m4])
466
+m4_include([m4/reorganization/os_checks.m4])
467
+m4_include([m4/reorganization/milter/check.m4])
468
+m4_include([m4/reorganization/code_checks/pthread_02.m4])
469
+m4_include([m4/reorganization/code_checks/readdir.m4])
470
+m4_include([m4/reorganization/code_checks/ctime.m4])
471
+m4_include([m4/reorganization/code_checks/socklen_t.m4])
472
+m4_include([m4/reorganization/clamav_user.m4])
473
+m4_include([m4/reorganization/code_checks/compiler_attribs.m4])
474
+m4_include([m4/reorganization/code_checks/select.m4])
475
+m4_include([m4/reorganization/code_checks/stat64.m4])
476
+m4_include([m4/reorganization/code_checks/shift.m4])
477
+m4_include([m4/reorganization/code_checks/features.m4])
478
+m4_include([m4/reorganization/clamdtop.m4])
479
+m4_include([m4/reorganization/distcheck.m4])
480
+m4_include([m4/reorganization/llvm.m4])
481
+m4_include([m4/reorganization/sha_collect.m4])
482
+
483
+m4_include([m4/reorganization/bsd.m4])
484
+
485
+dnl Freshclam dependencies
486
+m4_include([m4/reorganization/libs/curl.m4])
487
+
488
+dnl libclamav dependencies
489
+m4_include([m4/reorganization/libs/xml.m4])
490
+m4_include([m4/reorganization/libs/openssl.m4])
491
+
492
+m4_include([m4/reorganization/substitutions.m4])
1769 493
 
1770 494
 AM_CONDITIONAL([ENABLE_CLAMSUBMIT], [test "$have_curl" = "yes"])
1771 495
 
1772
-AC_OUTPUT([
496
+AC_CONFIG_FILES([
497
+shared/Makefile
1773 498
 clamscan/Makefile
1774 499
 database/Makefile
1775 500
 docs/Makefile
1776 501
 clamd/Makefile
1777 502
 clamdscan/Makefile
503
+clamsubmit/Makefile
1778 504
 clamav-milter/Makefile
1779 505
 freshclam/Makefile
1780 506
 sigtool/Makefile
1781 507
 clamconf/Makefile
1782
-clamsubmit/Makefile
1783 508
 etc/Makefile
1784 509
 test/Makefile
1785 510
 unit_tests/Makefile
... ...
@@ -1803,6 +166,8 @@ docs/man/sigtool.1
1803 1803
 docs/man/clamdtop.1
1804 1804
 ])
1805 1805
 
1806
+AC_OUTPUT
1807
+
1806 1808
 if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then
1807 1809
     AC_MSG_ERROR([Failed to configure LLVM, and LLVM was explicitly requested])
1808 1810
 fi
... ...
@@ -1856,7 +221,7 @@ AC_MSG_NOTICE([Summary of engine detection features])
1856 1856
 CL_MSG_STATUS([bzip2       ],[$bzip_check],[$want_bzip2])
1857 1857
 CL_MSG_STATUS([zlib        ],[$ZLIB_HOME],[yes])
1858 1858
 CL_MSG_STATUS([unrar       ],[$want_unrar],[$want_unrar])
1859
-if test "x$XML_LIBS" = "x"; then
1859
+if test "x$XML_LIBS" = "x"; then 
1860 1860
     CL_MSG_STATUS([dmg and xar ],[no],[])
1861 1861
 else
1862 1862
     CL_MSG_STATUS([dmg and xar ],[yes, from $XML_HOME],[])
... ...
@@ -83,6 +83,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
83 83
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
84 84
 	$(top_srcdir)/m4/lt~obsolete.m4 \
85 85
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
86
+	$(top_srcdir)/m4/reorganization/version.m4 \
87
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
88
+	$(top_srcdir)/m4/reorganization/headers.m4 \
89
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
90
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
91
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
92
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
96
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
97
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
99
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
103
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
107
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
108
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
109
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
110
+	$(top_srcdir)/m4/reorganization/debug.m4 \
111
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
112
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
113
+	$(top_srcdir)/m4/reorganization/dns.m4 \
114
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
115
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
116
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
117
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
119
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
120
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
121
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
125
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
126
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
127
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
131
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
132
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
133
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
134
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
135
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
136
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
137
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
139
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
86 140
 	$(top_srcdir)/configure.ac
87 141
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
88 142
 	$(ACLOCAL_M4)
... ...
@@ -122,9 +176,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
122 122
 CHECK_LIBS = @CHECK_LIBS@
123 123
 CLAMAVGROUP = @CLAMAVGROUP@
124 124
 CLAMAVUSER = @CLAMAVUSER@
125
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
125 126
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
127
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
128
+CLAMBC_LIBS = @CLAMBC_LIBS@
129
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
130
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
126 131
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
132
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
133
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
134
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
127 135
 CLAMD_LIBS = @CLAMD_LIBS@
136
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
137
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
138
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
139
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
128 140
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
129 141
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
130 142
 CPP = @CPP@
... ...
@@ -144,6 +210,7 @@ ECHO_T = @ECHO_T@
144 144
 EGREP = @EGREP@
145 145
 EXEEXT = @EXEEXT@
146 146
 FGREP = @FGREP@
147
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
147 148
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
148 149
 GCOV = @GCOV@
149 150
 GENHTML = @GENHTML@
... ...
@@ -165,8 +232,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
165 165
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
166 166
 LIBBZ2 = @LIBBZ2@
167 167
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
168
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
168 169
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
169 170
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
171
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
170 172
 LIBLTDL = @LIBLTDL@
171 173
 LIBM = @LIBM@
172 174
 LIBOBJS = @LIBOBJS@
... ...
@@ -204,6 +273,7 @@ RANLIB = @RANLIB@
204 204
 SED = @SED@
205 205
 SET_MAKE = @SET_MAKE@
206 206
 SHELL = @SHELL@
207
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
207 208
 STRIP = @STRIP@
208 209
 THREAD_LIBS = @THREAD_LIBS@
209 210
 TH_SAFE = @TH_SAFE@
... ...
@@ -82,6 +82,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
82 82
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
83 83
 	$(top_srcdir)/m4/lt~obsolete.m4 \
84 84
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
85
+	$(top_srcdir)/m4/reorganization/version.m4 \
86
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
87
+	$(top_srcdir)/m4/reorganization/headers.m4 \
88
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
89
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
90
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
91
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
92
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
95
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
96
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
97
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
98
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
99
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
102
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
106
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
107
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
108
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
109
+	$(top_srcdir)/m4/reorganization/debug.m4 \
110
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
111
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
112
+	$(top_srcdir)/m4/reorganization/dns.m4 \
113
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
114
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
115
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
116
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
117
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
118
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
119
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
120
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
121
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
124
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
126
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
127
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
130
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
131
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
132
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
133
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
134
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
135
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
136
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
137
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
138
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
85 139
 	$(top_srcdir)/configure.ac
86 140
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
87 141
 	$(ACLOCAL_M4)
... ...
@@ -155,9 +209,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
155 155
 CHECK_LIBS = @CHECK_LIBS@
156 156
 CLAMAVGROUP = @CLAMAVGROUP@
157 157
 CLAMAVUSER = @CLAMAVUSER@
158
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
158 159
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
160
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
161
+CLAMBC_LIBS = @CLAMBC_LIBS@
162
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
163
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
159 164
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
165
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
166
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
167
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
160 168
 CLAMD_LIBS = @CLAMD_LIBS@
169
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
170
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
171
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
172
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
161 173
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
162 174
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
163 175
 CPP = @CPP@
... ...
@@ -177,6 +243,7 @@ ECHO_T = @ECHO_T@
177 177
 EGREP = @EGREP@
178 178
 EXEEXT = @EXEEXT@
179 179
 FGREP = @FGREP@
180
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
180 181
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
181 182
 GCOV = @GCOV@
182 183
 GENHTML = @GENHTML@
... ...
@@ -198,8 +265,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
198 198
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
199 199
 LIBBZ2 = @LIBBZ2@
200 200
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
201
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
201 202
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
202 203
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
204
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
203 205
 LIBLTDL = @LIBLTDL@
204 206
 LIBM = @LIBM@
205 207
 LIBOBJS = @LIBOBJS@
... ...
@@ -237,6 +306,7 @@ RANLIB = @RANLIB@
237 237
 SED = @SED@
238 238
 SET_MAKE = @SET_MAKE@
239 239
 SHELL = @SHELL@
240
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
240 241
 STRIP = @STRIP@
241 242
 THREAD_LIBS = @THREAD_LIBS@
242 243
 TH_SAFE = @TH_SAFE@
... ...
@@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
84 84
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
85 85
 	$(top_srcdir)/m4/lt~obsolete.m4 \
86 86
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
87
+	$(top_srcdir)/m4/reorganization/version.m4 \
88
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
89
+	$(top_srcdir)/m4/reorganization/headers.m4 \
90
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
91
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
92
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
97
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
104
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
108
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
110
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
111
+	$(top_srcdir)/m4/reorganization/debug.m4 \
112
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
113
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
114
+	$(top_srcdir)/m4/reorganization/dns.m4 \
115
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
116
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
117
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
121
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
126
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
127
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
132
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
133
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
134
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
135
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
136
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
137
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
140
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
87 141
 	$(top_srcdir)/configure.ac
88 142
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 143
 	$(ACLOCAL_M4)
... ...
@@ -152,9 +206,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
152 152
 CHECK_LIBS = @CHECK_LIBS@
153 153
 CLAMAVGROUP = @CLAMAVGROUP@
154 154
 CLAMAVUSER = @CLAMAVUSER@
155
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
155 156
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
157
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
158
+CLAMBC_LIBS = @CLAMBC_LIBS@
159
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
160
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
156 161
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
162
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
163
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
164
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
157 165
 CLAMD_LIBS = @CLAMD_LIBS@
166
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
167
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
168
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
169
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
158 170
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
159 171
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
160 172
 CPP = @CPP@
... ...
@@ -174,6 +240,7 @@ ECHO_T = @ECHO_T@
174 174
 EGREP = @EGREP@
175 175
 EXEEXT = @EXEEXT@
176 176
 FGREP = @FGREP@
177
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
177 178
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
178 179
 GCOV = @GCOV@
179 180
 GENHTML = @GENHTML@
... ...
@@ -195,8 +262,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
195 195
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
196 196
 LIBBZ2 = @LIBBZ2@
197 197
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
198
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
198 199
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
199 200
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
201
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
200 202
 LIBLTDL = @LIBLTDL@
201 203
 LIBM = @LIBM@
202 204
 LIBOBJS = @LIBOBJS@
... ...
@@ -234,6 +303,7 @@ RANLIB = @RANLIB@
234 234
 SED = @SED@
235 235
 SET_MAKE = @SET_MAKE@
236 236
 SHELL = @SHELL@
237
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
237 238
 STRIP = @STRIP@
238 239
 THREAD_LIBS = @THREAD_LIBS@
239 240
 TH_SAFE = @TH_SAFE@
... ...
@@ -85,6 +85,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
85 85
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
86 86
 	$(top_srcdir)/m4/lt~obsolete.m4 \
87 87
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
88
+	$(top_srcdir)/m4/reorganization/version.m4 \
89
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
90
+	$(top_srcdir)/m4/reorganization/headers.m4 \
91
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
92
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
97
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
100
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
105
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
108
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
110
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
111
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
112
+	$(top_srcdir)/m4/reorganization/debug.m4 \
113
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
114
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
115
+	$(top_srcdir)/m4/reorganization/dns.m4 \
116
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
117
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
121
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
122
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
126
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
127
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
132
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
133
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
134
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
135
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
136
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
137
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
140
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
141
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
88 142
 	$(top_srcdir)/configure.ac
89 143
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
90 144
 	$(ACLOCAL_M4)
... ...
@@ -158,9 +212,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
158 158
 CHECK_LIBS = @CHECK_LIBS@
159 159
 CLAMAVGROUP = @CLAMAVGROUP@
160 160
 CLAMAVUSER = @CLAMAVUSER@
161
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
161 162
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
163
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
164
+CLAMBC_LIBS = @CLAMBC_LIBS@
165
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
166
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
162 167
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
168
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
169
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
170
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
163 171
 CLAMD_LIBS = @CLAMD_LIBS@
172
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
173
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
174
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
175
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
164 176
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
165 177
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
166 178
 CPP = @CPP@
... ...
@@ -180,6 +246,7 @@ ECHO_T = @ECHO_T@
180 180
 EGREP = @EGREP@
181 181
 EXEEXT = @EXEEXT@
182 182
 FGREP = @FGREP@
183
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
183 184
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
184 185
 GCOV = @GCOV@
185 186
 GENHTML = @GENHTML@
... ...
@@ -201,8 +268,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
201 201
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
202 202
 LIBBZ2 = @LIBBZ2@
203 203
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
204
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
204 205
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
205 206
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
207
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
206 208
 LIBLTDL = @LIBLTDL@
207 209
 LIBM = @LIBM@
208 210
 LIBOBJS = @LIBOBJS@
... ...
@@ -240,6 +309,7 @@ RANLIB = @RANLIB@
240 240
 SED = @SED@
241 241
 SET_MAKE = @SET_MAKE@
242 242
 SHELL = @SHELL@
243
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
243 244
 STRIP = @STRIP@
244 245
 THREAD_LIBS = @THREAD_LIBS@
245 246
 TH_SAFE = @TH_SAFE@
... ...
@@ -46,6 +46,10 @@
46 46
 #include <syslog.h>
47 47
 #endif
48 48
 
49
+#include <openssl/ssl.h>
50
+#include <openssl/err.h>
51
+#include "libclamav/crypto.h"
52
+
49 53
 #include "target.h"
50 54
 #include "clamav.h"
51 55
 #include "freshclamcodes.h"
... ...
@@ -30,7 +30,6 @@
30 30
  * fails on Solaris because it would require a c99 compiler,
31 31
  * 500 fails completely on Solaris, and FreeBSD, and w/o _XOPEN_SOURCE
32 32
  * strptime is not defined on Linux */
33
-#define _GNU_SOURCE
34 33
 #define __EXTENSIONS
35 34
 
36 35
 #include <stdio.h>
... ...
@@ -61,6 +60,10 @@
61 61
 #include <errno.h>
62 62
 #include <zlib.h>
63 63
 
64
+#include <openssl/ssl.h>
65
+#include <openssl/err.h>
66
+#include "libclamav/crypto.h"
67
+
64 68
 #include "target.h"
65 69
 
66 70
 #include "freshclamcodes.h"
... ...
@@ -3,6 +3,11 @@
3 3
 
4 4
 #include "7zAlloc.h"
5 5
 
6
+#if defined(_WIN32)
7
+#include <WinSock2.h>
8
+#include <Windows.h>
9
+#endif
10
+
6 11
 /* #define _SZ_ALLOC_DEBUG */
7 12
 /* use _SZ_ALLOC_DEBUG to debug alloc/free operations */
8 13
 
... ...
@@ -2,6 +2,12 @@
2 2
 2008-10-04 : Igor Pavlov : Public domain */
3 3
 
4 4
 #include <string.h>
5
+
6
+#if defined(_WIN32)
7
+#include <WinSock2.h>
8
+#include <Windows.h>
9
+#endif
10
+
5 11
 #include "7zBuf.h"
6 12
 
7 13
 void DynBuf_Construct(CDynBuf *p)
... ...
@@ -1,6 +1,15 @@
1 1
 /* 7zCrc.c -- CRC32 calculation
2 2
 2009-11-23 : Igor Pavlov : Public domain */
3 3
 
4
+#if defined(_WIN32)
5
+#include <WinSock2.h>
6
+#include <Windows.h>
7
+#endif
8
+
9
+#include <openssl/ssl.h>
10
+#include <openssl/err.h>
11
+#include "libclamav/crypto.h"
12
+
4 13
 #include "7zCrc.h"
5 14
 #include "CpuArch.h"
6 15
 
... ...
@@ -1,6 +1,15 @@
1 1
 /* 7zCrcOpt.c -- CRC32 calculation : optimized version
2 2
 2009-11-23 : Igor Pavlov : Public domain */
3 3
 
4
+#if defined(_WIN32)
5
+#include <WinSock2.h>
6
+#include <Windows.h>
7
+#endif
8
+
9
+#include <openssl/ssl.h>
10
+#include <openssl/err.h>
11
+#include "libclamav/crypto.h"
12
+
4 13
 #include "CpuArch.h"
5 14
 
6 15
 #ifdef MY_CPU_LE
... ...
@@ -3,6 +3,15 @@
3 3
 
4 4
 #include <string.h>
5 5
 
6
+#if defined(_WIN32)
7
+#include <WinSock2.h>
8
+#include <Windows.h>
9
+#endif
10
+
11
+#include <openssl/ssl.h>
12
+#include <openssl/err.h>
13
+#include "libclamav/crypto.h"
14
+
6 15
 #define _7ZIP_PPMD_SUPPPORT
7 16
 
8 17
 #include "7z.h"
... ...
@@ -3,6 +3,15 @@
3 3
 
4 4
 #include <string.h>
5 5
 
6
+#if defined(_WIN32)
7
+#include <WinSock2.h>
8
+#include <Windows.h>
9
+#endif
10
+
11
+#include <openssl/ssl.h>
12
+#include <openssl/err.h>
13
+#include "libclamav/crypto.h"
14
+
6 15
 #include "7z.h"
7 16
 #include "7zCrc.h"
8 17
 #include "CpuArch.h"
... ...
@@ -1,6 +1,15 @@
1 1
 /* CpuArch.c -- CPU specific code
2 2
 2010-10-26: Igor Pavlov : Public domain */
3 3
 
4
+#if defined(_WIN32)
5
+#include <WinSock2.h>
6
+#include <Windows.h>
7
+#endif
8
+
9
+#include <openssl/ssl.h>
10
+#include <openssl/err.h>
11
+#include "libclamav/crypto.h"
12
+
4 13
 #include "CpuArch.h"
5 14
 
6 15
 #ifdef MY_CPU_X86_OR_AMD64
... ...
@@ -4,6 +4,10 @@ This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
4 4
 
5 5
 #include <memory.h>
6 6
 
7
+#include <openssl/ssl.h>
8
+#include <openssl/err.h>
9
+#include "libclamav/crypto.h"
10
+
7 11
 #include "Ppmd7.h"
8 12
 
9 13
 const Byte PPMD7_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 };
... ...
@@ -2,6 +2,10 @@
2 2
 2010-03-12 : Igor Pavlov : Public domain
3 3
 This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
4 4
 
5
+#include <openssl/ssl.h>
6
+#include <openssl/err.h>
7
+#include "libclamav/crypto.h"
8
+
5 9
 #include "Ppmd7.h"
6 10
 
7 11
 #define kTopValue (1 << 24)
8 12
deleted file mode 100755
... ...
@@ -1,35 +0,0 @@
1
-/* Sha256.h -- SHA-256 Hash
2
-2010-06-11 : Igor Pavlov : Public domain */
3
-
4
-#ifndef __CRYPTO_SHA256_H
5
-#define __CRYPTO_SHA256_H
6
-
7
-#include "Types.h"
8
-
9
-EXTERN_C_BEGIN
10
-
11
-#define SHA256_DIGEST_SIZE 32
12
-
13
-#define __USE_CLAM_SHA256_FOR_7Z__
14
-
15
-#ifndef __USE_CLAM_SHA256_FOR_7Z__
16
-typedef struct
17
-{
18
-  UInt32 state[8];
19
-  UInt64 count;
20
-  Byte buffer[64];
21
-} CSha256;
22
-
23
-void Sha256_Init(CSha256 *p);
24
-void Sha256_Update(CSha256 *p, const Byte *data, size_t size);
25
-void Sha256_Final(CSha256 *p, Byte *digest);
26
-#else
27
-#include "../sha256.h"
28
-#define CSha256 SHA256_CTX
29
-#define Sha256_Init sha256_init
30
-#define Sha256_Update sha256_update
31
-#define Sha256_Final sha256_final
32
-#endif
33
-EXTERN_C_END
34
-
35
-#endif
... ...
@@ -1,6 +1,15 @@
1 1
 /* Xz.c - Xz
2 2
 2009-04-15 : Igor Pavlov : Public domain */
3 3
 
4
+#if defined(_WIN32)
5
+#include <WinSock2.h>
6
+#include <Windows.h>
7
+#endif
8
+
9
+#include <openssl/ssl.h>
10
+#include <openssl/err.h>
11
+#include "libclamav/crypto.h"
12
+
4 13
 #include "7zCrc.h"
5 14
 #include "CpuArch.h"
6 15
 #include "Xz.h"
... ...
@@ -49,7 +58,7 @@ void XzCheck_Init(CXzCheck *p, int mode)
49 49
   {
50 50
     case XZ_CHECK_CRC32: p->crc = CRC_INIT_VAL; break;
51 51
     case XZ_CHECK_CRC64: p->crc64 = CRC64_INIT_VAL; break;
52
-    case XZ_CHECK_SHA256: Sha256_Init(&p->sha); break;
52
+    case XZ_CHECK_SHA256: EVP_DigestInit(&p->sha, EVP_sha256()); break;
53 53
   }
54 54
 }
55 55
 
... ...
@@ -59,7 +68,7 @@ void XzCheck_Update(CXzCheck *p, const void *data, size_t size)
59 59
   {
60 60
     case XZ_CHECK_CRC32: p->crc = CrcUpdate(p->crc, data, size); break;
61 61
     case XZ_CHECK_CRC64: p->crc64 = Crc64Update(p->crc64, data, size); break;
62
-    case XZ_CHECK_SHA256: Sha256_Update(&p->sha, (const Byte *)data, size); break;
62
+    case XZ_CHECK_SHA256: EVP_DigestUpdate(&p->sha, (const Byte *)data, size); break;
63 63
   }
64 64
 }
65 65
 
... ...
@@ -79,7 +88,8 @@ int XzCheck_Final(CXzCheck *p, Byte *digest)
79 79
       break;
80 80
     }
81 81
     case XZ_CHECK_SHA256:
82
-      Sha256_Final(&p->sha, digest);
82
+      EVP_DigestFinal(&p->sha, digest, NULL);
83
+      EVP_MD_CTX_cleanup(&(p->sha));
83 84
       break;
84 85
     default:
85 86
       return 0;
... ...
@@ -4,7 +4,9 @@
4 4
 #ifndef __XZ_H
5 5
 #define __XZ_H
6 6
 
7
-#include "Sha256.h"
7
+#include "Types.h"
8
+
9
+#define SHA256_DIGEST_SIZE 32
8 10
 
9 11
 EXTERN_C_BEGIN
10 12
 
... ...
@@ -79,7 +81,7 @@ typedef struct
79 79
   int mode;
80 80
   UInt32 crc;
81 81
   UInt64 crc64;
82
-  CSha256 sha;
82
+  EVP_MD_CTX sha;
83 83
 } CXzCheck;
84 84
 
85 85
 void XzCheck_Init(CXzCheck *p, int mode);
... ...
@@ -215,7 +217,7 @@ typedef struct
215 215
   CMixCoder decoder;
216 216
   CXzBlock block;
217 217
   CXzCheck check;
218
-  CSha256 sha;
218
+  EVP_MD_CTX sha;
219 219
   Byte shaDigest[SHA256_DIGEST_SIZE];
220 220
   Byte buf[XZ_BLOCK_HEADER_SIZE_MAX];
221 221
 } CXzUnpacker;
... ...
@@ -10,6 +10,15 @@
10 10
 #include <stdlib.h>
11 11
 #include <string.h>
12 12
 
13
+#if defined(_WIN32)
14
+#include <WinSock2.h>
15
+#include <Windows.h>
16
+#endif
17
+
18
+#include <openssl/ssl.h>
19
+#include <openssl/err.h>
20
+#include "libclamav/crypto.h"
21
+
13 22
 #include "7zCrc.h"
14 23
 #include "Alloc.h"
15 24
 #include "Bra.h"
... ...
@@ -642,7 +651,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
642 642
         Byte temp[32];
643 643
         unsigned num = Xz_WriteVarInt(temp, p->packSize + p->blockHeaderSize + XzFlags_GetCheckSize(p->streamFlags));
644 644
         num += Xz_WriteVarInt(temp + num, p->unpackSize);
645
-        Sha256_Update(&p->sha, temp, num);
645
+        EVP_DigestUpdate(&p->sha, temp, num);
646 646
         p->indexSize += num;
647 647
         p->numBlocks++;
648 648
         
... ...
@@ -677,7 +686,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
677 677
         {
678 678
           RINOK(Xz_ParseHeader(&p->streamFlags, p->buf));
679 679
           p->state = XZ_STATE_BLOCK_HEADER;
680
-          Sha256_Init(&p->sha);
680
+          EVP_DigestInit(&p->sha, EVP_sha256());
681 681
           p->indexSize = 0;
682 682
           p->numBlocks = 0;
683 683
           p->pos = 0;
... ...
@@ -696,8 +705,9 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
696 696
             p->indexPreSize = 1 + Xz_WriteVarInt(p->buf + 1, p->numBlocks);
697 697
             p->indexPos = p->indexPreSize;
698 698
             p->indexSize += p->indexPreSize;
699
-            Sha256_Final(&p->sha, p->shaDigest);
700
-            Sha256_Init(&p->sha);
699
+            EVP_DigestFinal(&p->sha, p->shaDigest, NULL);
700
+            EVP_MD_CTX_cleanup(&p->sha);
701
+            EVP_DigestInit(&p->sha, EVP_sha256());
701 702
             p->crc = CrcUpdate(CRC_INIT_VAL, p->buf, p->indexPreSize);
702 703
             p->state = XZ_STATE_STREAM_INDEX;
703 704
           }
... ...
@@ -775,7 +785,7 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
775 775
             if (srcRem > cur)
776 776
               srcRem = (SizeT)cur;
777 777
             p->crc = CrcUpdate(p->crc, src, srcRem);
778
-            Sha256_Update(&p->sha, src, srcRem);
778
+            EVP_DigestUpdate(&p->sha, src, srcRem);
779 779
             (*srcLen) += srcRem;
780 780
             src += srcRem;
781 781
             p->indexPos += srcRem;
... ...
@@ -796,7 +806,8 @@ SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen,
796 796
             p->state = XZ_STATE_STREAM_INDEX_CRC;
797 797
             p->indexSize += 4;
798 798
             p->pos = 0;
799
-            Sha256_Final(&p->sha, digest);
799
+            EVP_DigestFinal(&p->sha, digest, NULL);
800
+            EVP_MD_CTX_cleanup(&p->sha);
800 801
             if (memcmp(digest, p->shaDigest, SHA256_DIGEST_SIZE) != 0)
801 802
               return SZ_ERROR_CRC;
802 803
           }
... ...
@@ -3,6 +3,15 @@
3 3
 
4 4
 #include <string.h>
5 5
 
6
+#if defined(_WIN32)
7
+#include <WinSock2.h>
8
+#include <Windows.h>
9
+#endif
10
+
11
+#include <openssl/ssl.h>
12
+#include <openssl/err.h>
13
+#include "libclamav/crypto.h"
14
+
6 15
 #include "7zCrc.h"
7 16
 #include "CpuArch.h"
8 17
 #include "Xz.h"
... ...
@@ -18,6 +18,14 @@
18 18
  *  MA 02110-1301, USA.
19 19
  */
20 20
 
21
+#if defined(_WIN32)
22
+#include <WinSock2.h>
23
+#include <Windows.h>
24
+#endif
25
+
26
+#include <openssl/ssl.h>
27
+#include <openssl/err.h>
28
+#include "libclamav/crypto.h"
21 29
 
22 30
 #include "7z_iface.h"
23 31
 #include "lzma_iface.h"
... ...
@@ -73,10 +73,13 @@ endif
73 73
 
74 74
 libclamav_internal_utils_la_SOURCES=str.c\
75 75
 				    str.h\
76
+					conv.c \
77
+					conv.h \
78
+					crypto.c \
79
+					crypto.h \
80
+					clamav.h \
76 81
 				    iowrap.c \
77 82
 				    iowrap.h \
78
-				    md5.c\
79
-				    md5.h\
80 83
 				    others_common.c \
81 84
 				    others.h \
82 85
 				    qsort.c \
... ...
@@ -91,15 +94,18 @@ libclamav_internal_utils_la_SOURCES=str.c\
91 91
 				    regex/regex2.h \
92 92
 				    regex/utils.h
93 93
 
94
-libclamav_internal_utils_la_LDFLAGS=-static
94
+libclamav_internal_utils_la_LDFLAGS=-static @LIBCLAMAV_LIBS@
95 95
 libclamav_internal_utils_la_CFLAGS=$(AM_CFLAGS)  -fPIC -DPIC
96 96
 
97 97
 libclamav_internal_utils_nothreads_la_SOURCES=str.c\
98
+					conv.c \
99
+					conv.h \
100
+					crypto.c \
101
+					crypto.h \
102
+					clamav.h \
98 103
 				    str.h\
99 104
 				    iowrap.c \
100 105
 				    iowrap.h \
101
-				    md5.c\
102
-				    md5.h\
103 106
 				    others_common.c \
104 107
 				    others.h \
105 108
 				    qsort.c \
... ...
@@ -114,7 +120,7 @@ libclamav_internal_utils_nothreads_la_SOURCES=str.c\
114 114
 				    regex/regex2.h \
115 115
 				    regex/utils.h
116 116
 
117
-libclamav_internal_utils_nothreads_la_LDFLAGS=-static
117
+libclamav_internal_utils_nothreads_la_LDFLAGS=-static @LIBCLAMAV_LIBS@
118 118
 libclamav_internal_utils_nothreads_la_CFLAGS=$(AM_CFLAGS) -DCL_NOTHREADS
119 119
 
120 120
 if ENABLE_LLVM
... ...
@@ -143,7 +149,6 @@ endif
143 143
 include_HEADERS = clamav.h
144 144
 
145 145
 libclamav_la_SOURCES = \
146
-	clamav.h \
147 146
         matcher-ac.c \
148 147
         matcher-ac.h \
149 148
         matcher-bm.c \
... ...
@@ -325,7 +330,6 @@ libclamav_la_SOURCES = \
325 325
 	7z/XzCrc64.h \
326 326
 	7z/XzDec.c \
327 327
 	7z/XzIn.c \
328
-	7z/Sha256.h \
329 328
 	7z/Delta.c \
330 329
 	7z/Delta.h \
331 330
 	7z/Alloc.h \
... ...
@@ -357,10 +361,6 @@ libclamav_la_SOURCES = \
357 357
 	perflogging.c\
358 358
 	perflogging.h\
359 359
 	default.h\
360
-	sha256.c\
361
-	sha256.h\
362
-	sha1.c\
363
-	sha1.h\
364 360
 	bytecode.c\
365 361
 	bytecode.h\
366 362
 	bytecode_vm.c\
... ...
@@ -95,6 +95,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
95 95
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
96 96
 	$(top_srcdir)/m4/lt~obsolete.m4 \
97 97
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
98
+	$(top_srcdir)/m4/reorganization/version.m4 \
99
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
100
+	$(top_srcdir)/m4/reorganization/headers.m4 \
101
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
102
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
103
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
108
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
109
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
110
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
111
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
112
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
113
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
114
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
115
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
116
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
117
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
119
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
120
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
121
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
122
+	$(top_srcdir)/m4/reorganization/debug.m4 \
123
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
124
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
125
+	$(top_srcdir)/m4/reorganization/dns.m4 \
126
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
127
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
128
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
131
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
132
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
133
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
134
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
135
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
136
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
137
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
138
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
139
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
140
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
141
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
142
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
143
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
144
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
145
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
146
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
147
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
148
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
149
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
150
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
151
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
98 152
 	$(top_srcdir)/configure.ac
99 153
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
100 154
 	$(ACLOCAL_M4)
... ...
@@ -183,7 +237,6 @@ am_libclamav_la_OBJECTS = libclamav_la-matcher-ac.lo \
183 183
 	libclamav_la-uniq.lo libclamav_la-version.lo \
184 184
 	libclamav_la-mpool.lo libclamav_la-filtering.lo \
185 185
 	libclamav_la-fmap.lo libclamav_la-perflogging.lo \
186
-	libclamav_la-sha256.lo libclamav_la-sha1.lo \
187 186
 	libclamav_la-bytecode.lo libclamav_la-bytecode_vm.lo \
188 187
 	libclamav_la-cpio.lo libclamav_la-macho.lo \
189 188
 	libclamav_la-ishield.lo libclamav_la-bytecode_api.lo \
... ...
@@ -259,8 +312,9 @@ libclamav_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
259 259
 libclamav_internal_utils_la_LIBADD =
260 260
 am_libclamav_internal_utils_la_OBJECTS =  \
261 261
 	libclamav_internal_utils_la-str.lo \
262
+	libclamav_internal_utils_la-conv.lo \
263
+	libclamav_internal_utils_la-crypto.lo \
262 264
 	libclamav_internal_utils_la-iowrap.lo \
263
-	libclamav_internal_utils_la-md5.lo \
264 265
 	libclamav_internal_utils_la-others_common.lo \
265 266
 	libclamav_internal_utils_la-qsort.lo \
266 267
 	libclamav_internal_utils_la-strlcpy.lo \
... ...
@@ -277,8 +331,9 @@ libclamav_internal_utils_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
277 277
 libclamav_internal_utils_nothreads_la_LIBADD =
278 278
 am_libclamav_internal_utils_nothreads_la_OBJECTS =  \
279 279
 	libclamav_internal_utils_nothreads_la-str.lo \
280
+	libclamav_internal_utils_nothreads_la-conv.lo \
281
+	libclamav_internal_utils_nothreads_la-crypto.lo \
280 282
 	libclamav_internal_utils_nothreads_la-iowrap.lo \
281
-	libclamav_internal_utils_nothreads_la-md5.lo \
282 283
 	libclamav_internal_utils_nothreads_la-others_common.lo \
283 284
 	libclamav_internal_utils_nothreads_la-qsort.lo \
284 285
 	libclamav_internal_utils_nothreads_la-strlcpy.lo \
... ...
@@ -429,9 +484,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
429 429
 CHECK_LIBS = @CHECK_LIBS@
430 430
 CLAMAVGROUP = @CLAMAVGROUP@
431 431
 CLAMAVUSER = @CLAMAVUSER@
432
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
432 433
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
434
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
435
+CLAMBC_LIBS = @CLAMBC_LIBS@
436
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
437
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
433 438
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
439
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
440
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
441
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
434 442
 CLAMD_LIBS = @CLAMD_LIBS@
443
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
444
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
445
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
446
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
435 447
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
436 448
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
437 449
 CPP = @CPP@
... ...
@@ -451,6 +518,7 @@ ECHO_T = @ECHO_T@
451 451
 EGREP = @EGREP@
452 452
 EXEEXT = @EXEEXT@
453 453
 FGREP = @FGREP@
454
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
454 455
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
455 456
 GCOV = @GCOV@
456 457
 GENHTML = @GENHTML@
... ...
@@ -472,8 +540,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
472 472
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
473 473
 LIBBZ2 = @LIBBZ2@
474 474
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
475
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
475 476
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
476 477
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
478
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
477 479
 LIBLTDL = @LIBLTDL@
478 480
 LIBM = @LIBM@
479 481
 LIBOBJS = @LIBOBJS@
... ...
@@ -511,6 +581,7 @@ RANLIB = @RANLIB@
511 511
 SED = @SED@
512 512
 SET_MAKE = @SET_MAKE@
513 513
 SHELL = @SHELL@
514
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
514 515
 STRIP = @STRIP@
515 516
 THREAD_LIBS = @THREAD_LIBS@
516 517
 TH_SAFE = @TH_SAFE@
... ...
@@ -624,10 +695,13 @@ EXTRA_DIST = c++/Makefile.nollvm.in $(am__append_4) regex/engine.c \
624 624
 @ENABLE_UNRAR_TRUE@IFACEDEP = libclamunrar_iface.la
625 625
 libclamav_internal_utils_la_SOURCES = str.c\
626 626
 				    str.h\
627
+					conv.c \
628
+					conv.h \
629
+					crypto.c \
630
+					crypto.h \
631
+					clamav.h \
627 632
 				    iowrap.c \
628 633
 				    iowrap.h \
629
-				    md5.c\
630
-				    md5.h\
631 634
 				    others_common.c \
632 635
 				    others.h \
633 636
 				    qsort.c \
... ...
@@ -642,14 +716,17 @@ libclamav_internal_utils_la_SOURCES = str.c\
642 642
 				    regex/regex2.h \
643 643
 				    regex/utils.h
644 644
 
645
-libclamav_internal_utils_la_LDFLAGS = -static
645
+libclamav_internal_utils_la_LDFLAGS = -static @LIBCLAMAV_LIBS@
646 646
 libclamav_internal_utils_la_CFLAGS = $(AM_CFLAGS)  -fPIC -DPIC
647 647
 libclamav_internal_utils_nothreads_la_SOURCES = str.c\
648
+					conv.c \
649
+					conv.h \
650
+					crypto.c \
651
+					crypto.h \
652
+					clamav.h \
648 653
 				    str.h\
649 654
 				    iowrap.c \
650 655
 				    iowrap.h \
651
-				    md5.c\
652
-				    md5.h\
653 656
 				    others_common.c \
654 657
 				    others.h \
655 658
 				    qsort.c \
... ...
@@ -664,7 +741,7 @@ libclamav_internal_utils_nothreads_la_SOURCES = str.c\
664 664
 				    regex/regex2.h \
665 665
 				    regex/utils.h
666 666
 
667
-libclamav_internal_utils_nothreads_la_LDFLAGS = -static
667
+libclamav_internal_utils_nothreads_la_LDFLAGS = -static @LIBCLAMAV_LIBS@
668 668
 libclamav_internal_utils_nothreads_la_CFLAGS = $(AM_CFLAGS) -DCL_NOTHREADS
669 669
 @ENABLE_LLVM_FALSE@LLVMLIBADD = libclamav_nocxx.la
670 670
 @ENABLE_LLVM_TRUE@LLVMLIBADD = c++/libclamavcxx.la -lstdc++ -lm
... ...
@@ -678,7 +755,7 @@ libclamav_la_CFLAGS = $(AM_CFLAGS) $(XML_CPPFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\"
678 678
 libclamav_la_LDFLAGS = @TH_SAFE@ $(XML_LIBS) -version-info \
679 679
 	@LIBCLAMAV_VERSION@ -no-undefined $(am__append_6)
680 680
 include_HEADERS = clamav.h
681
-libclamav_la_SOURCES = clamav.h matcher-ac.c matcher-ac.h matcher-bm.c \
681
+libclamav_la_SOURCES = matcher-ac.c matcher-ac.h matcher-bm.c \
682 682
 	matcher-bm.h matcher-hash.c matcher-hash.h matcher.c matcher.h \
683 683
 	others.c others.h readdb.c readdb.h cvd.c cvd.h dsig.c dsig.h \
684 684
 	scanners.c scanners.h textdet.c textdet.h filetypes.c \
... ...
@@ -711,14 +788,13 @@ libclamav_la_SOURCES = clamav.h matcher-ac.c matcher-ac.h matcher-bm.c \
711 711
 	7z/Bra.c 7z/Bra.h 7z/Bra86.c 7z/CpuArch.h 7z/Lzma2Dec.c \
712 712
 	7z/Lzma2Dec.h 7z/LzmaDec.c 7z/LzmaDec.h 7z/Ppmd.h 7z/Ppmd7.c \
713 713
 	7z/Ppmd7.h 7z/Ppmd7Dec.c 7z/Types.h 7z/Xz.c 7z/Xz.h \
714
-	7z/XzCrc64.c 7z/XzCrc64.h 7z/XzDec.c 7z/XzIn.c 7z/Sha256.h \
715
-	7z/Delta.c 7z/Delta.h 7z/Alloc.h 7z/BraIA64.c 7z/CpuArch.c \
716
-	7z/CpuArch.h 7z/7zCrcOpt.c 7z/RotateDefs.h explode.c explode.h \
717
-	textnorm.c textnorm.h dlp.c dlp.h jsparse/js-norm.c \
718
-	jsparse/js-norm.h jsparse/lexglobal.h jsparse/textbuf.h uniq.c \
719
-	uniq.h version.c version.h mpool.c mpool.h filtering.h \
720
-	filtering.c fmap.c fmap.h perflogging.c perflogging.h \
721
-	default.h sha256.c sha256.h sha1.c sha1.h bytecode.c \
714
+	7z/XzCrc64.c 7z/XzCrc64.h 7z/XzDec.c 7z/XzIn.c 7z/Delta.c \
715
+	7z/Delta.h 7z/Alloc.h 7z/BraIA64.c 7z/CpuArch.c 7z/CpuArch.h \
716
+	7z/7zCrcOpt.c 7z/RotateDefs.h explode.c explode.h textnorm.c \
717
+	textnorm.h dlp.c dlp.h jsparse/js-norm.c jsparse/js-norm.h \
718
+	jsparse/lexglobal.h jsparse/textbuf.h uniq.c uniq.h version.c \
719
+	version.h mpool.c mpool.h filtering.h filtering.c fmap.c \
720
+	fmap.h perflogging.c perflogging.h default.h bytecode.c \
722 721
 	bytecode.h bytecode_vm.c bytecode_priv.h clambc.h cpio.c \
723 722
 	cpio.h macho.c macho.h ishield.c ishield.h type_desc.h \
724 723
 	bcfeatures.h bytecode_api.c bytecode_api_decl.c bytecode_api.h \
... ...
@@ -896,8 +972,9 @@ distclean-compile:
896 896
 	-rm -f *.tab.c
897 897
 
898 898
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bytecode_nojit.Plo@am__quote@
899
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-conv.Plo@am__quote@
900
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-crypto.Plo@am__quote@
899 901
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-iowrap.Plo@am__quote@
900
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-md5.Plo@am__quote@
901 902
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-others_common.Plo@am__quote@
902 903
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-qsort.Plo@am__quote@
903 904
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-regcomp.Plo@am__quote@
... ...
@@ -906,8 +983,9 @@ distclean-compile:
906 906
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-regfree.Plo@am__quote@
907 907
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-str.Plo@am__quote@
908 908
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-strlcpy.Plo@am__quote@
909
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-conv.Plo@am__quote@
910
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-crypto.Plo@am__quote@
909 911
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-iowrap.Plo@am__quote@
910
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-md5.Plo@am__quote@
911 912
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-others_common.Plo@am__quote@
912 913
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-qsort.Plo@am__quote@
913 914
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_nothreads_la-regcomp.Plo@am__quote@
... ...
@@ -1104,8 +1182,6 @@ distclean-compile:
1104 1104
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-s_fp_sub.Plo@am__quote@
1105 1105
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-scanners.Plo@am__quote@
1106 1106
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sf_base64decode.Plo@am__quote@
1107
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sha1.Plo@am__quote@
1108
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sha256.Plo@am__quote@
1109 1107
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sis.Plo@am__quote@
1110 1108
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-special.Plo@am__quote@
1111 1109
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-spin.Plo@am__quote@
... ...
@@ -1855,20 +1931,6 @@ libclamav_la-perflogging.lo: perflogging.c
1855 1855
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1856 1856
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-perflogging.lo `test -f 'perflogging.c' || echo '$(srcdir)/'`perflogging.c
1857 1857
 
1858
-libclamav_la-sha256.lo: sha256.c
1859
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-sha256.lo -MD -MP -MF $(DEPDIR)/libclamav_la-sha256.Tpo -c -o libclamav_la-sha256.lo `test -f 'sha256.c' || echo '$(srcdir)/'`sha256.c
1860
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-sha256.Tpo $(DEPDIR)/libclamav_la-sha256.Plo
1861
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sha256.c' object='libclamav_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@
1862
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1863
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-sha256.lo `test -f 'sha256.c' || echo '$(srcdir)/'`sha256.c
1864
-
1865
-libclamav_la-sha1.lo: sha1.c
1866
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-sha1.lo -MD -MP -MF $(DEPDIR)/libclamav_la-sha1.Tpo -c -o libclamav_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
1867
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-sha1.Tpo $(DEPDIR)/libclamav_la-sha1.Plo
1868
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='sha1.c' object='libclamav_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@
1869
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
1870
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-sha1.lo `test -f 'sha1.c' || echo '$(srcdir)/'`sha1.c
1871
-
1872 1858
 libclamav_la-bytecode.lo: bytecode.c
1873 1859
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-bytecode.lo -MD -MP -MF $(DEPDIR)/libclamav_la-bytecode.Tpo -c -o libclamav_la-bytecode.lo `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c
1874 1860
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-bytecode.Tpo $(DEPDIR)/libclamav_la-bytecode.Plo
... ...
@@ -2674,6 +2736,20 @@ libclamav_internal_utils_la-str.lo: str.c
2674 2674
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2675 2675
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-str.lo `test -f 'str.c' || echo '$(srcdir)/'`str.c
2676 2676
 
2677
+libclamav_internal_utils_la-conv.lo: conv.c
2678
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-conv.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-conv.Tpo -c -o libclamav_internal_utils_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c
2679
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-conv.Tpo $(DEPDIR)/libclamav_internal_utils_la-conv.Plo
2680
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='conv.c' object='libclamav_internal_utils_la-conv.lo' libtool=yes @AMDEPBACKSLASH@
2681
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2682
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c
2683
+
2684
+libclamav_internal_utils_la-crypto.lo: crypto.c
2685
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-crypto.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-crypto.Tpo -c -o libclamav_internal_utils_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c
2686
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-crypto.Tpo $(DEPDIR)/libclamav_internal_utils_la-crypto.Plo
2687
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='crypto.c' object='libclamav_internal_utils_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@
2688
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2689
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c
2690
+
2677 2691
 libclamav_internal_utils_la-iowrap.lo: iowrap.c
2678 2692
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-iowrap.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-iowrap.Tpo -c -o libclamav_internal_utils_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c
2679 2693
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-iowrap.Tpo $(DEPDIR)/libclamav_internal_utils_la-iowrap.Plo
... ...
@@ -2681,13 +2757,6 @@ libclamav_internal_utils_la-iowrap.lo: iowrap.c
2681 2681
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2682 2682
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c
2683 2683
 
2684
-libclamav_internal_utils_la-md5.lo: md5.c
2685
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-md5.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-md5.Tpo -c -o libclamav_internal_utils_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
2686
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-md5.Tpo $(DEPDIR)/libclamav_internal_utils_la-md5.Plo
2687
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='md5.c' object='libclamav_internal_utils_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
2688
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2689
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
2690
-
2691 2684
 libclamav_internal_utils_la-others_common.lo: others_common.c
2692 2685
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-others_common.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-others_common.Tpo -c -o libclamav_internal_utils_la-others_common.lo `test -f 'others_common.c' || echo '$(srcdir)/'`others_common.c
2693 2686
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-others_common.Tpo $(DEPDIR)/libclamav_internal_utils_la-others_common.Plo
... ...
@@ -2744,6 +2813,20 @@ libclamav_internal_utils_nothreads_la-str.lo: str.c
2744 2744
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2745 2745
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-str.lo `test -f 'str.c' || echo '$(srcdir)/'`str.c
2746 2746
 
2747
+libclamav_internal_utils_nothreads_la-conv.lo: conv.c
2748
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-conv.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-conv.Tpo -c -o libclamav_internal_utils_nothreads_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c
2749
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-conv.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-conv.Plo
2750
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='conv.c' object='libclamav_internal_utils_nothreads_la-conv.lo' libtool=yes @AMDEPBACKSLASH@
2751
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2752
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c
2753
+
2754
+libclamav_internal_utils_nothreads_la-crypto.lo: crypto.c
2755
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-crypto.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-crypto.Tpo -c -o libclamav_internal_utils_nothreads_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c
2756
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-crypto.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-crypto.Plo
2757
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='crypto.c' object='libclamav_internal_utils_nothreads_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@
2758
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2759
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c
2760
+
2747 2761
 libclamav_internal_utils_nothreads_la-iowrap.lo: iowrap.c
2748 2762
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-iowrap.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-iowrap.Tpo -c -o libclamav_internal_utils_nothreads_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c
2749 2763
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-iowrap.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-iowrap.Plo
... ...
@@ -2751,13 +2834,6 @@ libclamav_internal_utils_nothreads_la-iowrap.lo: iowrap.c
2751 2751
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2752 2752
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c
2753 2753
 
2754
-libclamav_internal_utils_nothreads_la-md5.lo: md5.c
2755
-@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-md5.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-md5.Tpo -c -o libclamav_internal_utils_nothreads_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
2756
-@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-md5.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-md5.Plo
2757
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='md5.c' object='libclamav_internal_utils_nothreads_la-md5.lo' libtool=yes @AMDEPBACKSLASH@
2758
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
2759
-@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_nothreads_la-md5.lo `test -f 'md5.c' || echo '$(srcdir)/'`md5.c
2760
-
2761 2754
 libclamav_internal_utils_nothreads_la-others_common.lo: others_common.c
2762 2755
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_nothreads_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_nothreads_la-others_common.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_nothreads_la-others_common.Tpo -c -o libclamav_internal_utils_nothreads_la-others_common.lo `test -f 'others_common.c' || echo '$(srcdir)/'`others_common.c
2763 2756
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_nothreads_la-others_common.Tpo $(DEPDIR)/libclamav_internal_utils_nothreads_la-others_common.Plo
... ...
@@ -28,6 +28,10 @@
28 28
 #include <string.h>
29 29
 #endif
30 30
 
31
+#include <openssl/ssl.h>
32
+#include <openssl/err.h>
33
+#include "libclamav/crypto.h"
34
+
31 35
 #include "cltypes.h"
32 36
 #include "others.h"
33 37
 #include "adc.h"
... ...
@@ -24,9 +24,11 @@
24 24
 
25 25
 #include <time.h>
26 26
 
27
+#include <openssl/ssl.h>
28
+#include <openssl/err.h>
29
+#include "libclamav/crypto.h"
30
+
27 31
 #include "asn1.h"
28
-#include "sha1.h"
29
-#include "md5.h"
30 32
 #include "bignum.h"
31 33
 #include "matcher-hash.h"
32 34
 
... ...
@@ -97,37 +99,19 @@ struct cli_asn1 {
97 97
 };
98 98
 
99 99
 static int map_sha1(fmap_t *map, const void *data, unsigned int len, uint8_t sha1[SHA1_HASH_SIZE]) {
100
-    SHA1Context ctx;
101 100
     if(!fmap_need_ptr_once(map, data, len)) {
102 101
 	cli_dbgmsg("map_sha1: failed to read hash data\n");
103 102
 	return 1;
104 103
     }
105
-    SHA1Init(&ctx);
106
-    while(len) {
107
-	unsigned int todo = MIN(len, map->pgsz);
108
-	SHA1Update(&ctx, data, todo);
109
-	data = (uint8_t *)data + todo;
110
-	len -= todo;
111
-    }
112
-    SHA1Final(&ctx, sha1);
113
-    return 0;
104
+    return (cl_sha1(data, len, sha1, NULL) == NULL);
114 105
 }
115 106
 
116 107
 static int map_md5(fmap_t *map, const void *data, unsigned int len, uint8_t *md5) {
117
-    cli_md5_ctx ctx;
118 108
     if(!fmap_need_ptr_once(map, data, len)) {
119 109
 	cli_dbgmsg("map_md5: failed to read hash data\n");
120 110
 	return 1;
121 111
     }
122
-    cli_md5_init(&ctx);
123
-    while(len) {
124
-	unsigned int todo = MIN(len, map->pgsz);
125
-	cli_md5_update(&ctx, data, len);
126
-	data = (uint8_t *)data + todo;
127
-	len -= todo;
128
-    }
129
-    cli_md5_final(md5, &ctx);
130
-    return 0;
112
+    return (cl_hash_data("md5", data, len, md5, NULL) == NULL);
131 113
 }
132 114
 
133 115
 
... ...
@@ -746,8 +730,8 @@ static int asn1_parse_mscat(fmap_t *map, size_t offset, unsigned int size, crtmg
746 746
     const uint8_t *message, *attrs;
747 747
     unsigned int dsize, message_size, attrs_size;
748 748
     cli_crt_hashtype hashtype;
749
-    SHA1Context ctx;
750 749
     cli_crt *x509;
750
+    EVP_MD_CTX ctx;
751 751
     int result;
752 752
     int isBlacklisted = 0;
753 753
 
... ...
@@ -1037,10 +1021,11 @@ static int asn1_parse_mscat(fmap_t *map, size_t offset, unsigned int size, crtmg
1037 1037
 	    break;
1038 1038
 	}
1039 1039
 
1040
-	SHA1Init(&ctx);
1041
-	SHA1Update(&ctx, "\x31", 1);
1042
-	SHA1Update(&ctx, attrs + 1, attrs_size - 1);
1043
-	SHA1Final(&ctx, sha1);
1040
+    EVP_DigestInit(&ctx, EVP_sha1());
1041
+	EVP_DigestUpdate(&ctx, "\x31", 1);
1042
+	EVP_DigestUpdate(&ctx, attrs + 1, attrs_size - 1);
1043
+	EVP_DigestFinal(&ctx, sha1, NULL);
1044
+    EVP_MD_CTX_cleanup(&ctx);
1044 1045
 
1045 1046
 	if(!fmap_need_ptr_once(map, asn1.content, asn1.size)) {
1046 1047
 	    cli_dbgmsg("asn1_parse_mscat: failed to read encryptedDigest\n");
... ...
@@ -1278,16 +1263,17 @@ static int asn1_parse_mscat(fmap_t *map, size_t offset, unsigned int size, crtmg
1278 1278
 	}
1279 1279
 
1280 1280
 	if(hashtype == CLI_SHA1RSA) {
1281
-	    SHA1Init(&ctx);
1282
-	    SHA1Update(&ctx, "\x31", 1);
1283
-	    SHA1Update(&ctx, attrs + 1, attrs_size - 1);
1284
-	    SHA1Final(&ctx, sha1);
1281
+        EVP_DigestInit(&ctx, EVP_sha1());
1282
+        EVP_DigestUpdate(&ctx, "\x31", 1);
1283
+        EVP_DigestUpdate(&ctx, attrs + 1, attrs_size - 1);
1284
+        EVP_DigestFinal(&ctx, sha1, NULL);
1285
+        EVP_MD_CTX_cleanup(&ctx);
1285 1286
 	} else {
1286
-	    cli_md5_ctx ctx;
1287
-	    cli_md5_init(&ctx);
1288
-	    cli_md5_update(&ctx, "\x31", 1);
1289
-	    cli_md5_update(&ctx, attrs + 1, attrs_size - 1);
1290
-	    cli_md5_final(sha1, &ctx);
1287
+        EVP_DigestInit(&ctx, EVP_md5());
1288
+        EVP_DigestUpdate(&ctx, "\x31", 1);
1289
+        EVP_DigestUpdate(&ctx, attrs + 1, attrs_size - 1);
1290
+        EVP_DigestFinal(&ctx, sha1, NULL);
1291
+        EVP_MD_CTX_cleanup(&ctx);
1291 1292
 	}
1292 1293
 
1293 1294
 	if(!fmap_need_ptr_once(map, asn1.content, asn1.size)) {
... ...
@@ -19,6 +19,11 @@
19 19
  */
20 20
 
21 21
 #include <string.h>
22
+
23
+#include <openssl/ssl.h>
24
+#include <openssl/err.h>
25
+#include "libclamav/crypto.h"
26
+
22 27
 #include "cltypes.h"
23 28
 #include "execs.h"
24 29
 #include "others.h"
... ...
@@ -35,6 +35,10 @@
35 35
 #include <unistd.h>
36 36
 #endif
37 37
 
38
+#include <openssl/ssl.h>
39
+#include <openssl/err.h>
40
+#include "libclamav/crypto.h"
41
+
38 42
 #include "others.h"
39 43
 #include "scanners.h"
40 44
 #include "autoit.h"
... ...
@@ -25,6 +25,10 @@
25 25
 
26 26
 #include <string.h>
27 27
 
28
+#include <openssl/ssl.h>
29
+#include <openssl/err.h>
30
+#include "libclamav/crypto.h"
31
+
28 32
 #include "scanners.h"
29 33
 #include "cltypes.h"
30 34
 #include "others.h"
... ...
@@ -44,6 +44,10 @@ static	char	const	rcsid[] = "$Id: blob.c,v 1.64 2007/02/12 22:25:14 njh Exp $";
44 44
 #include <unistd.h>
45 45
 #endif
46 46
 
47
+#include <openssl/ssl.h>
48
+#include <openssl/err.h>
49
+#include "libclamav/crypto.h"
50
+
47 51
 #include "others.h"
48 52
 #include "mbox.h"
49 53
 #include "matcher.h"
... ...
@@ -24,8 +24,14 @@
24 24
 #include "clamav-config.h"
25 25
 #endif
26 26
 
27
+#include <string.h>
27 28
 #include <assert.h>
28 29
 #include <fcntl.h>
30
+
31
+#include <openssl/ssl.h>
32
+#include <openssl/err.h>
33
+#include "libclamav/crypto.h"
34
+
29 35
 #include "dconf.h"
30 36
 #include "clamav.h"
31 37
 #include "others.h"
... ...
@@ -38,7 +44,6 @@
38 38
 #include "bytecode_api.h"
39 39
 #include "bytecode_api_impl.h"
40 40
 #include "builtin_bytecodes.h"
41
-#include <string.h>
42 41
 
43 42
 #define MAX_BC 64
44 43
 #define BC_EVENTS_PER_SIG 2
... ...
@@ -33,6 +33,11 @@
33 33
 #include <string.h>
34 34
 #include <math.h>
35 35
 #include <ctype.h>
36
+
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
36 41
 #include "cltypes.h"
37 42
 #include "clambc.h"
38 43
 #include "bytecode.h"
... ...
@@ -23,6 +23,11 @@
23 23
 #if HAVE_CONFIG_H
24 24
 #include "clamav-config.h"
25 25
 #endif
26
+
27
+#include <openssl/ssl.h>
28
+#include <openssl/err.h>
29
+#include "libclamav/crypto.h"
30
+
26 31
 #include "target.h"
27 32
 #include "cltypes.h"
28 33
 
... ...
@@ -22,6 +22,11 @@
22 22
 
23 23
 #include <stdio.h>
24 24
 #include <stdlib.h>
25
+
26
+#include <openssl/ssl.h>
27
+#include <openssl/err.h>
28
+#include "libclamav/crypto.h"
29
+
25 30
 #include "cltypes.h"
26 31
 #include "bytecode.h"
27 32
 #include "bytecode_priv.h"
... ...
@@ -22,6 +22,11 @@
22 22
 #if HAVE_CONFIG_H
23 23
 #include "clamav-config.h"
24 24
 #endif
25
+
26
+#include <openssl/ssl.h>
27
+#include <openssl/err.h>
28
+#include "libclamav/crypto.h"
29
+
25 30
 #include "clamav.h"
26 31
 #include "others.h"
27 32
 #include "bytecode.h"
... ...
@@ -24,6 +24,7 @@
24 24
 #ifndef _WIN32
25 25
 #include <sys/time.h>
26 26
 #endif
27
+
27 28
 #include "ClamBCModule.h"
28 29
 #include "ClamBCDiagnostics.h"
29 30
 #include "llvm/Analysis/DebugInfo.h"
... ...
@@ -126,15 +127,20 @@ void LLVMInitializePowerPCAsmPrinter();
126 126
 #undef PACKAGE_URL
127 127
 #include "clamav-config.h"
128 128
 #endif
129
+
130
+#include <openssl/ssl.h>
131
+#include <openssl/err.h>
132
+
133
+extern "C" {
134
+#include "libclamav/crypto.h"
135
+}
136
+
129 137
 #include "dconf.h"
130 138
 #include "clamav.h"
131 139
 #include "clambc.h"
132 140
 #include "bytecode.h"
133 141
 #include "bytecode_priv.h"
134 142
 #include "type_desc.h"
135
-extern "C" {
136
-#include "md5.h"
137
-}
138 143
 
139 144
 #define MODULE "libclamav JIT: "
140 145
 
... ...
@@ -2201,15 +2207,12 @@ int cli_vm_execute_jit(const struct cli_all_bc *bcs, struct cli_bc_ctx *ctx,
2201 2201
 static unsigned char name_salt[16] = { 16, 38, 97, 12, 8, 4, 72, 196, 217, 144, 33, 124, 18, 11, 17, 253 };
2202 2202
 static void setGuard(unsigned char* guardbuf)
2203 2203
 {
2204
-    cli_md5_ctx ctx;
2205 2204
     char salt[48];
2206 2205
     memcpy(salt, name_salt, 16);
2207 2206
     for(unsigned i = 16; i < 48; i++)
2208
-	salt[i] = cli_rndnum(255);
2207
+        salt[i] = cli_rndnum(255);
2209 2208
 
2210
-    cli_md5_init(&ctx);
2211
-    cli_md5_update(&ctx, salt, 48);
2212
-    cli_md5_final(guardbuf, &ctx);
2209
+    cl_hash_data("md5", salt, 48, guardbuf, NULL);
2213 2210
 }
2214 2211
 
2215 2212
 static void addFPasses(FunctionPassManager &FPM, bool trusted, const TargetData *TD)
... ...
@@ -32,6 +32,10 @@
32 32
 #endif
33 33
 #include <fcntl.h>
34 34
 
35
+#include <openssl/ssl.h>
36
+#include <openssl/err.h>
37
+#include "libclamav/crypto.h"
38
+
35 39
 #include "cltypes.h"
36 40
 #include "others.h"
37 41
 #include "mspack.h"
... ...
@@ -27,7 +27,10 @@
27 27
 #include <pthread.h>
28 28
 #include <assert.h>
29 29
 
30
-#include "md5.h"
30
+#include <openssl/ssl.h>
31
+#include <openssl/err.h>
32
+#include "libclamav/crypto.h"
33
+
31 34
 #include "mpool.h"
32 35
 #include "clamav.h"
33 36
 #include "cache.h"
... ...
@@ -902,7 +905,7 @@ void cache_remove(unsigned char *md5, size_t size, const struct cl_engine *engin
902 902
 int cache_check(unsigned char *hash, cli_ctx *ctx) {
903 903
     fmap_t *map;
904 904
     size_t todo, at = 0;
905
-    cli_md5_ctx md5;
905
+    EVP_MD_CTX hashctx;
906 906
     int ret;
907 907
 
908 908
     if(!ctx || !ctx->engine || !ctx->engine->cache)
... ...
@@ -916,20 +919,27 @@ int cache_check(unsigned char *hash, cli_ctx *ctx) {
916 916
     map = *ctx->fmap;
917 917
     todo = map->len;
918 918
 
919
-    cli_md5_init(&md5);
919
+    EVP_DigestInit(&hashctx, EVP_md5());
920
+
920 921
     while(todo) {
921
-	const void *buf;
922
-	size_t readme = todo < FILEBUFF ? todo : FILEBUFF;
923
-	if(!(buf = fmap_need_off_once(map, at, readme)))
924
-	    return CL_EREAD;
925
-	todo -= readme;
926
-	at += readme;
927
-	if (cli_md5_update(&md5, buf, readme)) {
928
-	    cli_errmsg("cache_check: error reading while generating hash!\n");
929
-	    return CL_EREAD;
930
-	}
922
+        const void *buf;
923
+        size_t readme = todo < FILEBUFF ? todo : FILEBUFF;
924
+
925
+        if(!(buf = fmap_need_off_once(map, at, readme)))
926
+            return CL_EREAD;
927
+
928
+        todo -= readme;
929
+        at += readme;
930
+
931
+        if (!EVP_DigestUpdate(&hashctx, buf, readme)) {
932
+            cli_errmsg("cache_check: error reading while generating hash!\n");
933
+            return CL_EREAD;
934
+        }
931 935
     }
932
-    cli_md5_final(hash, &md5);
936
+
937
+    EVP_DigestFinal(&hashctx, hash, NULL);
938
+    EVP_MD_CTX_cleanup(&hashctx);
939
+
933 940
     ret = cache_lookup_hash(hash, map->len, ctx->engine->cache, ctx->recursion);
934 941
     cli_dbgmsg("cache_check: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x is %s\n", hash[0], hash[1], hash[2], hash[3], hash[4], hash[5], hash[6], hash[7], hash[8], hash[9], hash[10], hash[11], hash[12], hash[13], hash[14], hash[15], (ret == CL_VIRUS) ? "negative" : "positive");
935 942
     return ret;
... ...
@@ -34,6 +34,10 @@
34 34
 #include <string.h>
35 35
 #include <errno.h>
36 36
 
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
37 41
 #include "fmap.h"
38 42
 #include "others.h"
39 43
 #include "mspack.h"
40 44
new file mode 100644
... ...
@@ -0,0 +1,189 @@
0
+/*
1
+ *  Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
2
+ *
3
+ *  Author: Shawn Webb
4
+ *
5
+ *  This program is free software; you can redistribute it and/or modify
6
+ *  it under the terms of the GNU General Public License version 2 as
7
+ *  published by the Free Software Foundation.
8
+ *
9
+ *  This program is distributed in the hope that it will be useful,
10
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
+ *  GNU General Public License for more details.
13
+ *
14
+ *  You should have received a copy of the GNU General Public License
15
+ *  along with this program; if not, write to the Free Software
16
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17
+ *  MA 02110-1301, USA.
18
+ */
19
+
20
+#if HAVE_CONF_H
21
+#include "clamav-config.h"
22
+#endif
23
+
24
+#include <stdio.h>
25
+#include <stdlib.h>
26
+#include <string.h>
27
+
28
+#ifdef HAVE_UNISTD_H
29
+#include <unistd.h>
30
+#endif
31
+
32
+#include <math.h>
33
+
34
+#include <sys/types.h>
35
+
36
+#include <openssl/bio.h>
37
+#include <openssl/evp.h>
38
+
39
+#include "libclamav/conv.h"
40
+#include "libclamav/crypto.h"
41
+
42
+/** Get the expected decoded length of a base64-encoded string
43
+ * @param[in] data Base64-encoded string
44
+ * @param[in] len length of the string
45
+ * @return The expected decoded length of the base64-encoded string
46
+ */
47
+static size_t base64_len(const char *data, size_t len)
48
+{
49
+    int padding=0;
50
+    size_t i;
51
+
52
+    if (!len)
53
+        return 0;
54
+
55
+    for (i=len-1; i > 0 && data[i] == '='; i--)
56
+        padding++;
57
+
58
+    return (size_t)((3*len)/4 - padding);
59
+}
60
+
61
+/** Decode a base64-encoded string
62
+ * @param[in] data The base64-encoded string
63
+ * @param[in] len Length of the base64-encoded string
64
+ * @param[out] obuf If obuf is not set to NULL, store the decoded data in obuf. Otherwise, the decoded data is stored in a dynamically-allocated buffer.
65
+ * @param[out] olen The length of the decoded data
66
+ * @return The base64-decoded data
67
+ */
68
+void *cl_base64_decode(char *data, size_t len, void *obuf, size_t *olen)
69
+{
70
+    BIO *bio, *b64;
71
+    void *buf, *ret;
72
+
73
+    buf = (obuf) ? obuf : malloc(base64_len(data, len)+1);
74
+    if (!(buf))
75
+        return NULL;
76
+
77
+    b64 = BIO_new(BIO_f_base64());
78
+    if (!(b64)) {
79
+        if (!(obuf))
80
+            free(buf);
81
+
82
+        return NULL;
83
+    }
84
+
85
+    bio = BIO_new_mem_buf(data, len);
86
+    if (!(bio)) {
87
+        BIO_free(b64);
88
+        if (!(obuf))
89
+            free(buf);
90
+
91
+        return NULL;
92
+    }
93
+
94
+    bio = BIO_push(b64, bio);
95
+    BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL);
96
+
97
+    *olen = BIO_read(bio, buf, base64_len(data, len));
98
+
99
+    BIO_free_all(bio);
100
+
101
+    return buf;
102
+}
103
+
104
+/** Base64-encode data
105
+ * @param[in] data The data to be encoded
106
+ * @param[in] len The length of the data
107
+ * @return A pointer to the base64-encoded data. The data is stored in a dynamically-allocated buffer.
108
+ */
109
+char *cl_base64_encode(void *data, size_t len)
110
+{
111
+    BIO *bio, *b64;
112
+    char *buf, *p;
113
+    size_t elen;
114
+
115
+    b64 = BIO_new(BIO_f_base64());
116
+    bio = BIO_new(BIO_s_mem());
117
+
118
+    bio = BIO_push(b64, bio);
119
+    BIO_write(bio, data, len);
120
+
121
+    BIO_flush(bio);
122
+    elen = (size_t)BIO_get_mem_data(bio, &buf);
123
+
124
+    /* Ensure we're dealing with a NULL-terminated string */
125
+    p = (char *)malloc(elen+1);
126
+    memcpy((void *)p, (void *)buf, elen);
127
+    p[elen] = 0x00;
128
+    buf = p;
129
+
130
+    BIO_free_all(bio);
131
+
132
+    return buf;
133
+}
134
+
135
+#if defined(CONV_SELF_TEST)
136
+
137
+int main(int argc, char *argv[])
138
+{
139
+    char *plaintext, *encoded, *decoded;
140
+    unsigned char *sha_plaintext, *sha_decoded;
141
+    size_t len;
142
+    int ret=0;
143
+    unsigned int shalen;
144
+
145
+    initialize_crypto();
146
+
147
+    plaintext = (argv[1]) ? argv[1] : "Hello. This is dog";
148
+    sha_plaintext = sha256(plaintext, strlen(plaintext), NULL, NULL);
149
+    if (!(sha_plaintext)) {
150
+        fprintf(stderr, "Could not generate sha256 of plaintext\n");
151
+        return 1;
152
+    }
153
+
154
+    encoded = base64_encode(plaintext, strlen(plaintext));
155
+    if (!(encoded)) {
156
+        fprintf(stderr, "Could not base64 encode plaintest\n");
157
+        return 1;
158
+    }
159
+    fprintf(stderr, "Base64 encoded: %s\n", encoded);
160
+
161
+    decoded = base64_decode(encoded, strlen(encoded), NULL, &len);
162
+    if (!(decoded)) {
163
+        fprintf(stderr, "Could not base64 decoded string\n");
164
+        return 1;
165
+    }
166
+
167
+    sha_decoded = sha256(decoded, len, NULL, &shalen);
168
+    if (!(sha_decoded)) {
169
+        fprintf(stderr, "Could not generate sha256 of decoded data\n");
170
+        return 1;
171
+    }
172
+
173
+    if (memcmp(sha_plaintext, sha_decoded, shalen)) {
174
+        fprintf(stderr, "Decoded does not match plaintext: %s\n", decoded);
175
+        ret = 1;
176
+    }
177
+
178
+    free(sha_decoded);
179
+    free(sha_plaintext);
180
+    free(encoded);
181
+    free(decoded);
182
+
183
+    cleanup_crypto();
184
+
185
+    return ret;
186
+}
187
+
188
+#endif
0 189
new file mode 100644
... ...
@@ -0,0 +1,27 @@
0
+/*
1
+ *  Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
2
+ *
3
+ *  Author: Shawn Webb
4
+ *
5
+ *  This program is free software; you can redistribute it and/or modify
6
+ *  it under the terms of the GNU General Public License version 2 as
7
+ *  published by the Free Software Foundation.
8
+ *
9
+ *  This program is distributed in the hope that it will be useful,
10
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
+ *  GNU General Public License for more details.
13
+ *
14
+ *  You should have received a copy of the GNU General Public License
15
+ *  along with this program; if not, write to the Free Software
16
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17
+ *  MA 02110-1301, USA.
18
+ */
19
+
20
+#if !defined(_CLAMAV_CONV_H)
21
+#define _CLAMAV_CONV_H
22
+
23
+void *cl_base64_decode(char *, size_t, void *, size_t *);
24
+char *cl_base64_encode(void *, size_t);
25
+
26
+#endif
... ...
@@ -32,6 +32,10 @@
32 32
 #include <sys/stat.h>
33 33
 #include <fcntl.h>
34 34
 
35
+#include <openssl/ssl.h>
36
+#include <openssl/err.h>
37
+#include "libclamav/crypto.h"
38
+
35 39
 #include "cltypes.h"
36 40
 #include "others.h"
37 41
 #include "cpio.h"
... ...
@@ -22,6 +22,10 @@
22 22
 #include "clamav-config.h"
23 23
 #endif
24 24
 
25
+#include <openssl/ssl.h>
26
+#include <openssl/err.h>
27
+#include "libclamav/crypto.h"
28
+
25 29
 #include "others.h"
26 30
 #include "crtmgr.h"
27 31
 
... ...
@@ -24,7 +24,6 @@
24 24
 #include <time.h>
25 25
 
26 26
 #include "bignum.h"
27
-#include "sha1.h"
28 27
 
29 28
 typedef enum { CLI_SHA1RSA, CLI_MD5RSA } cli_crt_hashtype;
30 29
 typedef enum {VRFY_CODE, VRFY_TIME} cli_vrfy_type;
31 30
new file mode 100644
... ...
@@ -0,0 +1,958 @@
0
+/*
1
+ *  Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
2
+ *
3
+ *  Author: Shawn Webb
4
+ *
5
+ *  This program is free software; you can redistribute it and/or modify
6
+ *  it under the terms of the GNU General Public License version 2 as
7
+ *  published by the Free Software Foundation.
8
+ *
9
+ *  This program is distributed in the hope that it will be useful,
10
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
+ *  GNU General Public License for more details.
13
+ *
14
+ *  You should have received a copy of the GNU General Public License
15
+ *  along with this program; if not, write to the Free Software
16
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17
+ *  MA 02110-1301, USA.
18
+ */
19
+
20
+#if HAVE_CONFIG_H
21
+#include "clamav-config.h"
22
+#endif
23
+
24
+#include <stdio.h>
25
+#include <stdlib.h>
26
+#include <string.h>
27
+
28
+#include <time.h>
29
+
30
+#ifdef _WIN32
31
+#include <io.h>
32
+#endif
33
+
34
+#include <sys/types.h>
35
+#include <dirent.h>
36
+#include <sys/stat.h>
37
+#include <fcntl.h>
38
+
39
+#if !defined(_WIN32)
40
+#include <unistd.h>
41
+#endif
42
+
43
+#include <openssl/ssl.h>
44
+#include <openssl/err.h>
45
+#include "libclamav/crypto.h"
46
+
47
+#include "clamav.h"
48
+#include "default.h"
49
+#include "others.h"
50
+#include "libclamav/conv.h"
51
+#include "libclamav/str.h"
52
+
53
+#if defined(_WIN32)
54
+char * strptime(const char *buf, const char *fmt, struct tm *tm);
55
+#endif
56
+
57
+#if !defined(MIN)
58
+    #define MIN(x,y) ((x)<(y)?(x):(y))
59
+#endif
60
+
61
+int cl_initialize_crypto(void)
62
+{
63
+    SSL_load_error_strings();
64
+    SSL_library_init();
65
+    OpenSSL_add_all_digests();
66
+    OpenSSL_add_all_algorithms();
67
+    OpenSSL_add_all_ciphers();
68
+    ERR_load_crypto_strings();
69
+
70
+    return 0;
71
+}
72
+
73
+void cl_cleanup_crypto(void)
74
+{
75
+    EVP_cleanup();
76
+}
77
+
78
+unsigned char *cl_hash_data(char *alg, const void *buf, size_t len, unsigned char *obuf, unsigned int *olen)
79
+{
80
+    EVP_MD_CTX ctx;
81
+    unsigned char *ret;
82
+    size_t mdsz;
83
+    const EVP_MD *md;
84
+    unsigned int i;
85
+    size_t cur;
86
+
87
+    md = EVP_get_digestbyname(alg);
88
+    if (!(md))
89
+        return NULL;
90
+
91
+    mdsz = EVP_MD_size(md);
92
+
93
+    ret = (obuf != NULL) ? obuf : (unsigned char *)malloc(mdsz);
94
+    if (!(ret))
95
+        return NULL;
96
+
97
+    if (!EVP_DigestInit(&ctx, md)) {
98
+        if (!(obuf))
99
+            free(ret);
100
+
101
+        if ((olen))
102
+            *olen = 0;
103
+
104
+        return NULL;
105
+    }
106
+
107
+    cur=0;
108
+    while (cur < len) {
109
+        size_t todo = MIN(EVP_MD_block_size(md), len-cur);
110
+        if (!EVP_DigestUpdate(&ctx, (void *)(((unsigned char *)buf)+cur), todo)) {
111
+            if (!(obuf))
112
+                free(ret);
113
+
114
+            if ((olen))
115
+                *olen = 0;
116
+
117
+            return NULL;
118
+        }
119
+
120
+        cur += todo;
121
+    }
122
+
123
+    if (!EVP_DigestFinal(&ctx, ret, &i)) {
124
+        if (!(obuf))
125
+            free(ret);
126
+
127
+        if ((olen))
128
+            *olen = 0;
129
+
130
+        return NULL;
131
+    }
132
+
133
+    EVP_MD_CTX_cleanup(&ctx);
134
+
135
+    if ((olen))
136
+        *olen = i;
137
+
138
+    return ret;
139
+}
140
+
141
+unsigned char *cl_hash_file_fd(int fd, char *alg, unsigned int *olen)
142
+{
143
+    EVP_MD_CTX ctx;
144
+    const EVP_MD *md;
145
+    unsigned char *res;
146
+
147
+    md = EVP_get_digestbyname(alg);
148
+    if (!(md))
149
+        return NULL;
150
+
151
+    if (!EVP_DigestInit(&ctx, md)) {
152
+        return NULL;
153
+    }
154
+
155
+    res = cl_hash_file_fd_ctx(&ctx, fd, olen);
156
+
157
+    return res;
158
+}
159
+
160
+unsigned char *cl_hash_file_fd_ctx(EVP_MD_CTX *ctx, int fd, unsigned int *olen)
161
+{
162
+    unsigned char *buf;
163
+    unsigned char *hash;
164
+    int mdsz;
165
+    unsigned int hashlen;
166
+    struct stat sb;
167
+
168
+	unsigned int blocksize;
169
+
170
+#ifdef _WIN32
171
+    int nread;
172
+#else
173
+    ssize_t nread;
174
+#endif
175
+
176
+    mdsz = EVP_MD_CTX_size(ctx);
177
+
178
+    if (fstat(fd, &sb) < 0) {
179
+        return NULL;
180
+    }
181
+
182
+#ifdef _WIN32
183
+	blocksize = 8192;
184
+#else
185
+	blocksize = sb.st_blksize;
186
+#endif
187
+
188
+    buf = (unsigned char *)malloc(blocksize);
189
+    if (!(buf)) {
190
+        return NULL;
191
+    }
192
+
193
+    hash = (unsigned char *)malloc(mdsz);
194
+    if (!(hash)) {
195
+        free(buf);
196
+        return NULL;
197
+    }
198
+
199
+#ifdef _WIN32
200
+    while ((nread = _read(fd, buf, blocksize)) > 0) {
201
+#else
202
+    while ((nread = read(fd, buf, blocksize)) > 0) {
203
+#endif
204
+        if (!EVP_DigestUpdate(ctx, buf, nread)) {
205
+            free(buf);
206
+            free(hash);
207
+
208
+            return NULL;
209
+        }
210
+    }
211
+
212
+    if (!EVP_DigestFinal(ctx, hash, &hashlen)) {
213
+        free(hash);
214
+        free(buf);
215
+
216
+        return NULL;
217
+    }
218
+
219
+    EVP_MD_CTX_cleanup(&ctx);
220
+
221
+    if ((olen))
222
+        *olen = hashlen;
223
+
224
+    free(buf);
225
+
226
+    return hash;
227
+}
228
+
229
+unsigned char *cl_hash_file_fp(FILE *fp, char *alg, unsigned int *olen)
230
+{
231
+    return cl_hash_file_fd(fileno(fp), alg, olen);
232
+}
233
+
234
+unsigned char *cl_sha256(const void *buf, size_t len, unsigned char *obuf, unsigned int *olen)
235
+{
236
+    return cl_hash_data("sha256", buf, len, obuf, olen);
237
+}
238
+
239
+unsigned char *cl_sha1(const void *buf, size_t len, unsigned char *obuf, unsigned int *olen)
240
+{
241
+    return cl_hash_data("sha1", buf, len, obuf, olen);
242
+}
243
+
244
+int cl_verify_signature_hash(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest)
245
+{
246
+    EVP_MD_CTX ctx;
247
+    const EVP_MD *md;
248
+    size_t mdsz;
249
+
250
+    md = EVP_get_digestbyname(alg);
251
+    if (!(md))
252
+        return -1;
253
+
254
+    mdsz = EVP_MD_size(md);
255
+
256
+    if (!EVP_VerifyInit(&ctx, md)) {
257
+        return -1;
258
+    }
259
+
260
+    if (!EVP_VerifyUpdate(&ctx, digest, mdsz)) {
261
+        return -1;
262
+    }
263
+
264
+    if (EVP_VerifyFinal(&ctx, sig, siglen, pkey) != 0) {
265
+        return -1;
266
+    }
267
+
268
+    return 0;
269
+}
270
+
271
+int cl_verify_signature_fd(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, int fd)
272
+{
273
+    EVP_MD_CTX ctx;
274
+    const EVP_MD *md;
275
+    size_t mdsz;
276
+    unsigned char *digest;
277
+
278
+    digest = cl_hash_file_fd(fd, alg, NULL);
279
+    if (!(digest))
280
+        return -1;
281
+
282
+    md = EVP_get_digestbyname(alg);
283
+    if (!(md))
284
+        return -1;
285
+
286
+    mdsz = EVP_MD_size(md);
287
+
288
+    if (!EVP_VerifyInit(&ctx, md)) {
289
+        free(digest);
290
+        return -1;
291
+    }
292
+
293
+    if (!EVP_VerifyUpdate(&ctx, digest, mdsz)) {
294
+        free(digest);
295
+        return -1;
296
+    }
297
+
298
+    if (EVP_VerifyFinal(&ctx, sig, siglen, pkey) != 0) {
299
+        free(digest);
300
+        return -1;
301
+    }
302
+
303
+    free(digest);
304
+    return 0;
305
+}
306
+
307
+int cl_verify_signature(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode)
308
+{
309
+    EVP_MD_CTX ctx;
310
+    const EVP_MD *md;
311
+    size_t mdsz;
312
+    unsigned char *digest;
313
+
314
+    if (decode) {
315
+        unsigned char *newsig;
316
+        size_t newsiglen;
317
+
318
+        newsig = (unsigned char *)cl_base64_decode((char *)sig, siglen, NULL, &newsiglen);
319
+        if (!(newsig))
320
+            return -1;
321
+
322
+        sig = newsig;
323
+        siglen = newsiglen;
324
+    }
325
+
326
+    digest = cl_hash_data(alg, data, datalen, NULL, NULL);
327
+    if (!(digest)) {
328
+        if (decode)
329
+            free(sig);
330
+
331
+        return -1;
332
+    }
333
+
334
+    md = EVP_get_digestbyname(alg);
335
+    if (!(md)) {
336
+        free(digest);
337
+        if (decode)
338
+            free(sig);
339
+
340
+        return -1;
341
+    }
342
+
343
+    mdsz = EVP_MD_size(md);
344
+
345
+    if (!EVP_VerifyInit(&ctx, md)) {
346
+        free(digest);
347
+        if (decode)
348
+            free(sig);
349
+
350
+        return -1;
351
+    }
352
+
353
+    if (!EVP_VerifyUpdate(&ctx, digest, mdsz)) {
354
+        free(digest);
355
+        if (decode)
356
+            free(sig);
357
+
358
+        return -1;
359
+    }
360
+
361
+    if (EVP_VerifyFinal(&ctx, sig, siglen, pkey) != 0) {
362
+        free(digest);
363
+        if (decode)
364
+            free(sig);
365
+
366
+        return -1;
367
+    }
368
+
369
+    if (decode)
370
+        free(sig);
371
+
372
+    free(digest);
373
+    return 0;
374
+}
375
+
376
+int cl_verify_signature_hash_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest)
377
+{
378
+    X509 *x509;
379
+    FILE *fp;
380
+    int res;
381
+
382
+    fp = fopen(x509path, "r");
383
+    if (!(fp)) {
384
+        return -1;
385
+    }
386
+
387
+    x509 = PEM_read_X509(fp, NULL, NULL, NULL);
388
+    if (!(x509)) {
389
+        fclose(fp);
390
+        return -1;
391
+    }
392
+
393
+    fclose(fp);
394
+
395
+    res = cl_verify_signature_hash_x509(x509, alg, sig, siglen, digest);
396
+
397
+    X509_free(x509);
398
+
399
+    return res;
400
+}
401
+
402
+int cl_verify_signature_fd_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, int fd)
403
+{
404
+    X509 *x509;
405
+    FILE *fp;
406
+    int res;
407
+
408
+    fp = fopen(x509path, "r");
409
+    if (!(fp)) {
410
+        return -1;
411
+    }
412
+
413
+    x509 = PEM_read_X509(fp, NULL, NULL, NULL);
414
+    if (!(x509)) {
415
+        fclose(fp);
416
+        return -1;
417
+    }
418
+
419
+    fclose(fp);
420
+
421
+    res = cl_verify_signature_fd_x509(x509, alg, sig, siglen, fd);
422
+
423
+    X509_free(x509);
424
+
425
+    return res;
426
+}
427
+
428
+int cl_verify_signature_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode)
429
+{
430
+    X509 *x509;
431
+    FILE *fp;
432
+    int res;
433
+
434
+    fp = fopen(x509path, "r");
435
+    if (!(fp)) {
436
+        return -1;
437
+    }
438
+
439
+    x509 = PEM_read_X509(fp, NULL, NULL, NULL);
440
+    if (!(x509)) {
441
+        fclose(fp);
442
+        return -1;
443
+    }
444
+
445
+    fclose(fp);
446
+
447
+    res = cl_verify_signature_x509(x509, alg, sig, siglen, data, datalen, decode);
448
+
449
+    X509_free(x509);
450
+
451
+    return res;
452
+}
453
+
454
+int cl_verify_signature_hash_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest)
455
+{
456
+    EVP_PKEY *pkey;
457
+    int res;
458
+
459
+    pkey = X509_get_pubkey(x509);
460
+    if (!(pkey))
461
+        return -1;
462
+
463
+    res = cl_verify_signature_hash(pkey, alg, sig, siglen, digest);
464
+
465
+    EVP_PKEY_free(pkey);
466
+
467
+    return res;
468
+}
469
+
470
+int cl_verify_signature_fd_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, int fd)
471
+{
472
+    EVP_PKEY *pkey;
473
+    int res;
474
+
475
+    pkey = X509_get_pubkey(x509);
476
+    if (!(pkey))
477
+        return -1;
478
+
479
+    res = cl_verify_signature_fd(pkey, alg, sig, siglen, fd);
480
+
481
+    EVP_PKEY_free(pkey);
482
+
483
+    return res;
484
+}
485
+
486
+int cl_verify_signature_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode)
487
+{
488
+    EVP_PKEY *pkey;
489
+    int res;
490
+
491
+    pkey = X509_get_pubkey(x509);
492
+    if (!(pkey))
493
+        return -1;
494
+
495
+    res = cl_verify_signature(pkey, alg, sig, siglen, data, datalen, decode);
496
+
497
+    EVP_PKEY_free(pkey);
498
+
499
+    return res;
500
+}
501
+
502
+unsigned char *cl_sign_data_keyfile(char *keypath, char *alg, unsigned char *hash, unsigned int *olen, int encode)
503
+{
504
+    FILE *fp;
505
+    EVP_PKEY *pkey;
506
+    unsigned char *res;
507
+
508
+    fp = fopen(keypath, "r");
509
+    if (!(fp)) {
510
+        return NULL;
511
+    }
512
+
513
+    pkey = PEM_read_PrivateKey(fp, NULL, NULL, NULL);
514
+    if (!(pkey)) {
515
+        fclose(fp);
516
+        return NULL;
517
+    }
518
+
519
+    fclose(fp);
520
+
521
+    res = cl_sign_data(pkey, alg, hash, olen, encode);
522
+
523
+    EVP_PKEY_free(pkey);
524
+
525
+    return res;
526
+}
527
+
528
+unsigned char *cl_sign_data(EVP_PKEY *pkey, char *alg, unsigned char *hash, unsigned int *olen, int encode)
529
+{
530
+    EVP_MD_CTX ctx;
531
+    const EVP_MD *md;
532
+    unsigned int siglen;
533
+    unsigned char *sig;
534
+
535
+    md = EVP_get_digestbyname(alg);
536
+    if (!(md))
537
+        return NULL;
538
+
539
+    sig = (unsigned char *)calloc(1, EVP_PKEY_size(pkey));
540
+    if (!(sig)) {
541
+        free(hash);
542
+        return NULL;
543
+    }
544
+
545
+    if (!EVP_SignInit(&ctx, md)) {
546
+        free(sig);
547
+        free(hash);
548
+        return NULL;
549
+    }
550
+
551
+    if (!EVP_SignUpdate(&ctx, hash, EVP_MD_size(md))) {
552
+        free(sig);
553
+        free(hash);
554
+        return NULL;
555
+    }
556
+
557
+    if (!EVP_SignFinal(&ctx, sig, &siglen, pkey)) {
558
+        free(sig);
559
+        free(hash);
560
+        return NULL;
561
+    }
562
+
563
+    if (encode) {
564
+        unsigned char *newsig = (unsigned char *)cl_base64_encode(sig, siglen);
565
+        if (!(newsig)) {
566
+            free(sig);
567
+            free(hash);
568
+            return NULL;
569
+        }
570
+
571
+        free(sig);
572
+        sig = newsig;
573
+        siglen = (unsigned int)strlen((const char *)newsig);
574
+    }
575
+
576
+    free(hash);
577
+
578
+    *olen = siglen;
579
+    return sig;
580
+}
581
+
582
+unsigned char *cl_sign_file_fd(int fd, EVP_PKEY *pkey, char *alg, unsigned int *olen, int encode)
583
+{
584
+    unsigned char *hash, *res;
585
+    unsigned int hashlen;
586
+
587
+    hash = cl_hash_file_fd(fd, alg, &hashlen);
588
+    if (!(hash)) {
589
+        return NULL;
590
+    }
591
+
592
+    res = cl_sign_data(pkey, alg, hash, olen, encode);
593
+
594
+    free(hash);
595
+    return res;
596
+}
597
+
598
+unsigned char *cl_sign_file_fp(FILE *fp, EVP_PKEY *pkey, char *alg, unsigned int *olen, int encode)
599
+{
600
+    return cl_sign_file_fd(fileno(fp), pkey, alg, olen, encode);
601
+}
602
+
603
+EVP_PKEY *cl_get_pkey_file(char *keypath)
604
+{
605
+    EVP_PKEY *pkey;
606
+    FILE *fp;
607
+
608
+    fp = fopen(keypath, "r");
609
+    if (!(fp))
610
+        return NULL;
611
+
612
+    if (!(pkey = PEM_read_PrivateKey(fp, NULL, NULL, NULL))) {
613
+        fclose(fp);
614
+        return NULL;
615
+    }
616
+
617
+    fclose(fp);
618
+
619
+    return pkey;
620
+}
621
+
622
+X509 *cl_get_x509_from_mem(void *data, unsigned int len)
623
+{
624
+    X509 *cert;
625
+    BIO *cbio;
626
+
627
+    cbio = BIO_new_mem_buf(data, len);
628
+    if (!(cbio))
629
+        return NULL;
630
+
631
+    cert = PEM_read_bio_X509(cbio, NULL, 0, NULL);
632
+    BIO_free(cbio);
633
+
634
+    return cert;
635
+}
636
+
637
+int cl_validate_certificate_chain_ts_dir(char *tsdir, char *certpath)
638
+{
639
+    char **authorities=NULL, **t, *fullpath;
640
+    size_t nauths = 0;
641
+    int res;
642
+    DIR *dp;
643
+    struct dirent *dirent;
644
+#if defined(HAVE_READDIR_R_3) || defined(HAVE_READDIR_R_2)
645
+    union {
646
+        struct dirent d;
647
+        char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
648
+    } result;
649
+#endif
650
+
651
+    dp = opendir(tsdir);
652
+    if (!(dp))
653
+        return CL_EOPEN;
654
+
655
+#if defined(HAVE_READDIR_R_3)
656
+    while (!readdir_r(dp, &result.d, &dirent) && dirent) {
657
+#elif defined(HAVE_READDIR_R_2)
658
+    while ((dirent = (struct dirent *)readdir_r(dp, &result.d))) {
659
+#else
660
+    while ((dirent = readdir(dp))) {
661
+#endif
662
+        if (dirent->d_name[0] == '.')
663
+            continue;
664
+
665
+        if (!cli_strbcasestr(dirent->d_name, ".crt"))
666
+            continue;
667
+
668
+        t = (char **)realloc(authorities, sizeof(char **) * (nauths + 1));
669
+        if (!(t)) {
670
+            if (nauths) {
671
+                while (nauths > 0)
672
+                    free(authorities[--nauths]);
673
+                free(authorities);
674
+                return -1;
675
+            }
676
+        }
677
+
678
+        authorities = t;
679
+        authorities[nauths] = (char *)malloc(strlen(tsdir) + strlen(dirent->d_name) + 2);
680
+        if (!authorities[nauths]) {
681
+            if (nauths) {
682
+                while (nauths > 0)
683
+                    free(authorities[nauths--]);
684
+                free(authorities[0]);
685
+                free(authorities);
686
+                return -1;
687
+            }
688
+        }
689
+
690
+        sprintf(authorities[nauths], "%s"PATHSEP"%s", tsdir, dirent->d_name);
691
+        nauths++;
692
+    }
693
+
694
+    t = (char **)realloc(authorities, sizeof(char **) * (nauths + 1));
695
+    if (!(t)) {
696
+        if (nauths) {
697
+            while (nauths > 0)
698
+                free(authorities[--nauths]);
699
+            free(authorities);
700
+            return -1;
701
+        }
702
+    }
703
+
704
+    authorities = t;
705
+    authorities[nauths] = NULL;
706
+
707
+    closedir(dp);
708
+
709
+    res = cl_validate_certificate_chain(authorities, NULL, certpath);
710
+
711
+    while (nauths > 0)
712
+        free(authorities[--nauths]);
713
+    
714
+    free(authorities);
715
+
716
+    return res;
717
+}
718
+
719
+int cl_validate_certificate_chain(char **authorities, char *crlpath, char *certpath)
720
+{
721
+    X509_STORE *store=NULL;
722
+    X509_STORE_CTX *store_ctx;
723
+    X509_LOOKUP *lookup=NULL;
724
+    X509_CRL *crl=NULL;
725
+    X509_VERIFY_PARAM *param=NULL;
726
+    X509 *cert;
727
+    unsigned long i;
728
+    int res;
729
+
730
+    store = X509_STORE_new();
731
+    if (!(store)) {
732
+        return -1;
733
+    }
734
+    X509_STORE_set_flags(store, 0);
735
+
736
+    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
737
+    if (!(lookup)) {
738
+        X509_STORE_free(store);
739
+        return -1;
740
+    }
741
+
742
+    if ((crlpath)) {
743
+
744
+        crl = cl_load_crl(crlpath);
745
+        if (!(crl)) {
746
+            X509_STORE_free(store);
747
+            return -1;
748
+        }
749
+
750
+        X509_STORE_add_crl(store, crl);
751
+        param = X509_VERIFY_PARAM_new();
752
+        if ((param)) {
753
+            X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_CRL_CHECK);
754
+            X509_STORE_set1_param(store, param);
755
+        } else {
756
+            X509_STORE_free(store);
757
+            X509_CRL_free(crl);
758
+            return -1;
759
+        }
760
+    }
761
+
762
+    /* Support multi-tiered setups */
763
+    for (i=0; authorities[i]; i++) {
764
+        if (!X509_LOOKUP_load_file(lookup, authorities[i], X509_FILETYPE_PEM)) {
765
+            X509_STORE_free(store);
766
+            if ((crl))
767
+                X509_CRL_free(crl);
768
+            if ((param))
769
+                X509_VERIFY_PARAM_free(param);
770
+            return -1;
771
+        }
772
+    }
773
+
774
+    lookup = X509_STORE_add_lookup(store, X509_LOOKUP_hash_dir());
775
+    if (!(lookup)) {
776
+        X509_STORE_free(store);
777
+        if ((crl))
778
+            X509_CRL_free(crl);
779
+        if ((param))
780
+            X509_VERIFY_PARAM_free(param);
781
+        return -1;
782
+    }
783
+
784
+    X509_LOOKUP_add_dir(lookup, NULL, X509_FILETYPE_DEFAULT);
785
+
786
+    store_ctx = X509_STORE_CTX_new();
787
+    if (!(store_ctx)) {
788
+        X509_STORE_free(store);
789
+        if ((crl))
790
+            X509_CRL_free(crl);
791
+        if ((param))
792
+            X509_VERIFY_PARAM_free(param);
793
+        return -1;
794
+    }
795
+
796
+    cert = cl_load_cert(certpath);
797
+    if (!(cert)) {
798
+        X509_STORE_CTX_free(store_ctx);
799
+        X509_STORE_free(store);
800
+        if ((crl))
801
+            X509_CRL_free(crl);
802
+        if ((param))
803
+            X509_VERIFY_PARAM_free(param);
804
+
805
+        return -1;
806
+    }
807
+
808
+    if (!X509_STORE_CTX_init(store_ctx, store, cert, NULL)) {
809
+        X509_STORE_CTX_free(store_ctx);
810
+        X509_STORE_free(store);
811
+        if ((crl))
812
+            X509_CRL_free(crl);
813
+        if ((param))
814
+            X509_VERIFY_PARAM_free(param);
815
+
816
+        X509_free(cert);
817
+
818
+        return -1;
819
+    }
820
+
821
+    res = X509_verify_cert(store_ctx);
822
+
823
+    X509_STORE_CTX_free(store_ctx);
824
+    if ((crl))
825
+        X509_CRL_free(crl);
826
+
827
+    if ((param))
828
+        X509_VERIFY_PARAM_free(param);
829
+
830
+    X509_STORE_free(store);
831
+
832
+    X509_free(cert);
833
+
834
+    return (res > 0);
835
+}
836
+
837
+X509 *cl_load_cert(const char *certpath)
838
+{
839
+    X509 *cert;
840
+    BIO *bio;
841
+
842
+    bio = BIO_new(BIO_s_file());
843
+    if (!(bio))
844
+        return NULL;
845
+
846
+    if (BIO_read_filename(bio, certpath) != 1) {
847
+        BIO_free(bio);
848
+        return NULL;
849
+    }
850
+
851
+    cert = PEM_read_bio_X509_AUX(bio, NULL, NULL, NULL);
852
+
853
+    BIO_free(bio);
854
+
855
+    return cert;
856
+}
857
+
858
+struct tm *cl_ASN1_GetTimeT(ASN1_TIME *timeobj)
859
+{
860
+    struct tm *t;
861
+    char* str;
862
+    size_t i = 0;
863
+    const char *fmt;
864
+    time_t localt;
865
+#ifdef _WIN32
866
+    struct tm localtm, *ltm;
867
+#else
868
+    struct tm localtm;
869
+#endif
870
+
871
+    if (!(timeobj) || !(timeobj->data))
872
+        return NULL;
873
+
874
+    str = (char *)(timeobj->data);
875
+    if (strlen(str) < 12)
876
+        return NULL;
877
+
878
+    t = (struct tm *)calloc(1, sizeof(struct tm));
879
+    if (!(t))
880
+        return NULL;
881
+
882
+    if (timeobj->type == V_ASN1_UTCTIME) {
883
+        /* two digit year */
884
+        fmt = "%y%m%d%H%M%S";
885
+        if (str[3] == '0') {
886
+            str[2] = '0';
887
+            str[3] = '9';
888
+        } else {
889
+            str[3]--;
890
+        }
891
+    }
892
+    else if (timeobj->type == V_ASN1_GENERALIZEDTIME) {
893
+        /* four digit year */
894
+        fmt = "%Y%m%d%H%M%S";
895
+        if (str[5] == '0') {
896
+            str[4] = '0';
897
+            str[5] = '9';
898
+        } else {
899
+            str[5]--;
900
+        }
901
+    }
902
+
903
+    if (!strptime(str, fmt, t)) {
904
+        free(t);
905
+        return NULL;
906
+    }
907
+
908
+    /* Convert to local time */
909
+    localt = time(NULL);
910
+#ifdef _WIN32
911
+    ltm = localtime(&localt);
912
+    memcpy((void *)(&localtm), (void *)ltm, sizeof(struct tm));
913
+#else
914
+    localtime_r(&localt, &localtm);
915
+#endif
916
+    t->tm_isdst = localtm.tm_isdst;
917
+    return t;
918
+}
919
+
920
+X509_CRL *cl_load_crl(const char *file)
921
+{
922
+    X509_CRL *x=NULL;
923
+    FILE *fp;
924
+    struct tm *tm;
925
+    time_t crltime;
926
+
927
+    if (!(file))
928
+        return NULL;
929
+
930
+    fp = fopen(file, "r");
931
+    if (!(fp))
932
+        return NULL;
933
+
934
+    x = PEM_read_X509_CRL(fp, NULL, NULL, NULL);
935
+
936
+    fclose(fp);
937
+
938
+    if ((x)) {
939
+        tm = cl_ASN1_GetTimeT(x->crl->nextUpdate);
940
+        if (!(tm)) {
941
+            X509_CRL_free(x);
942
+            return NULL;
943
+        }
944
+
945
+#if !defined(_WIN32)
946
+        if (timegm(tm) < time(NULL)) {
947
+            X509_CRL_free(x);
948
+            free(tm);
949
+            return NULL;
950
+        }
951
+#endif
952
+
953
+        free(tm);
954
+    }
955
+
956
+    return x;
957
+}
0 958
new file mode 100644
... ...
@@ -0,0 +1,277 @@
0
+/*
1
+ *  Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
2
+ *
3
+ *  Author: Shawn Webb
4
+ *
5
+ *  This program is free software; you can redistribute it and/or modify
6
+ *  it under the terms of the GNU General Public License version 2 as
7
+ *  published by the Free Software Foundation.
8
+ *
9
+ *  This program is distributed in the hope that it will be useful,
10
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
+ *  GNU General Public License for more details.
13
+ *
14
+ *  You should have received a copy of the GNU General Public License
15
+ *  along with this program; if not, write to the Free Software
16
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17
+ *  MA 02110-1301, USA.
18
+ */
19
+
20
+#if !defined(_CLAMAV_CRYPTO_H)
21
+#define _CLAMAV_CRYPTO_H
22
+
23
+/**
24
+ * \defgroup CryptoAPI ClamAV Crypto API
25
+ * @{
26
+ */
27
+
28
+#define SHA1_HASH_SIZE 20
29
+#define SHA256_HASH_SIZE 32
30
+
31
+/**
32
+ * Initialize the crypto system.
33
+ * @return Always returns 0
34
+ */
35
+int cl_initialize_crypto(void);
36
+
37
+/** Clean up the crypto system prior to program exit.
38
+ */
39
+void cl_cleanup_crypto(void);
40
+
41
+/** Generate a hash of data.
42
+ @param[in] alg The hashing algorithm to use
43
+ @param[in] buf The data to be hashed
44
+ @param[in] len The length of the to-be-hashed data
45
+ @param[out] obuf An optional buffer to store the generated hash. Use NULL to dynamically allocate buffer.
46
+ @param[out] olen An optional pointer that stores how long the generated hash is.
47
+ @return A pointer to the generated hash or obuf if obuf is not NULL.
48
+ */
49
+unsigned char *cl_hash_data(char *alg, const void *buf, size_t len, unsigned char *obuf, unsigned int *olen);
50
+
51
+/** Generate a hash of a file.
52
+ @param[in] ctx A pointer to the OpenSSL EVP_MD_CTX object
53
+ @param[in] fd The file descriptor
54
+ @param[out] olen An optional pointer that stores how long the generated hash is
55
+ @return A pointer to a dynamically-created buffer that holds the generated hash
56
+ */
57
+unsigned char *cl_hash_file_fd_ctx(EVP_MD_CTX *ctx, int fd, unsigned int *olen);
58
+
59
+/** Generate a hash of a file.
60
+ @param[in] fd The file descriptor
61
+ @param[in] alg The hashing algorithm to use
62
+ @param[out] olen An optional pointer that stores how long the generated hash is
63
+ @return A pointer to a dynamically-created buffer that holds the generated hash
64
+ */
65
+unsigned char *cl_hash_file_fd(int fd, char *alg, unsigned int *olen);
66
+
67
+/** Generate a hash of a file.
68
+ @param[in] fp A pointer to a FILE object
69
+ @param[in] alg The hashing algorithm to use
70
+ @param[out] olen An optional pointer that stores how long the generated hash is
71
+ @return A pointer to a dynamically-created buffer that holds the generated hash
72
+ */
73
+unsigned char *cl_hash_file_fp(FILE *fp, char *alg, unsigned int *olen);
74
+
75
+/** Generate a sha256 hash of data
76
+ @param[in] buf The data to hash
77
+ @param[in] len The length of the to-be-hashed data
78
+ @param[out] obuf An optional pointer to store the generated hash. Use NULL to dynamically allocate buffer.
79
+ @param[out] olen An optional pointer that stores how long the generated hash is.
80
+ @return A pointer to the buffer that holds the generated hash
81
+ */
82
+unsigned char *cl_sha256(const void *buf, size_t len, unsigned char *obuf, unsigned int *olen);
83
+
84
+/** Generate a sha1 hash of data
85
+ @param[in] buf The data to hash
86
+ @param[in] len The length of the to-be-hashed data
87
+ @param[out] obuf An optional pointer to store the generated hash. Use NULL to dynamically allocate buffer.
88
+ @param[out] olen An optional pointer that stores how long the generated hash is.
89
+ @return A pointer to the buffer that holds the generated hash or obuf if obuf is not NULL
90
+ */
91
+unsigned char *cl_sha1(const void *buf, size_t len, unsigned char *obuf, unsigned int *olen);
92
+
93
+/** Verify validity of signed data
94
+ @param[in] pkey The public key of the keypair that signed the data
95
+ @param[in] alg The algorithm used to hash the data
96
+ @param[in] sig The signature block
97
+ @param[in] siglen The length of the signature
98
+ @param[in] data The data that was signed
99
+ @param[in] datalen The length of the data
100
+ @param[in] decode Whether or not to base64-decode the signature prior to verification. 1 for yes, 0 for no.
101
+ @return 0 for success, -1 for error or invalid signature
102
+ */
103
+int cl_verify_signature(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode);
104
+
105
+/** Verify validity of signed data
106
+ @param[in] pkey The public key of the keypair that signed the data
107
+ @param[in] alg The algorithm used to hash the data
108
+ @param[in] sig The signature block
109
+ @param[in] siglen The length of the signature
110
+ @param[in] digest The hash of the signed data
111
+ @return 0 for success, -1 for error or invalid signature
112
+ */
113
+int cl_verify_signature_hash(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest);
114
+
115
+/** Verify validity of signed data
116
+ @param[in] pkey The public key of the keypair that signed the data
117
+ @param[in] alg The algorithm used to hash the data
118
+ @param[in] sig The signature block
119
+ @param[in] siglen The length of the signature
120
+ @param[in] fd The file descriptor
121
+ @return 0 for success, -1 for error or invalid signature
122
+ */
123
+int cl_verify_signature_fd(EVP_PKEY *pkey, char *alg, unsigned char *sig, unsigned int siglen, int fd);
124
+
125
+/** Verify validity of signed data
126
+ @param[in] x509path The path to the public key of the keypair that signed the data
127
+ @param[in] alg The algorithm used to hash the data
128
+ @param[in] sig The signature block
129
+ @param[in] siglen The length of the signature
130
+ @param[in] digest The hash of the signed data
131
+ @return 0 for success, -1 for error or invalid signature
132
+ */
133
+int cl_verify_signature_hash_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest);
134
+
135
+/** Verify validity of signed data
136
+ @param[in] x509path The path to the public key of the keypair that signed the data
137
+ @param[in] alg The algorithm used to hash the data
138
+ @param[in] sig The signature block
139
+ @param[in] siglen The length of the signature
140
+ @param[in] fd The file descriptor
141
+ @return 0 for success, -1 for error or invalid signature
142
+ */
143
+int cl_verify_signature_fd_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, int fd);
144
+
145
+/** Verify validity of signed data
146
+ @param[in] x509path The path to the public key of the keypair that signed the data
147
+ @param[in] alg The algorithm used to hash the data
148
+ @param[in] sig The signature block
149
+ @param[in] siglen The length of the signature
150
+ @param[in] data The data that was signed
151
+ @param[in] datalen The length of the data
152
+ @param[in] decode Whether or not to base64-decode the signature prior to verification. 1 for yes, 0 for no.
153
+ @return 0 for success, -1 for error or invalid signature
154
+ */
155
+int cl_verify_signature_x509_keyfile(char *x509path, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode);
156
+
157
+/** Verify validity of signed data
158
+ @param[in] x509 The X509 object of the public key of the keypair that signed the data
159
+ @param[in] alg The algorithm used to hash the data
160
+ @param[in] sig The signature block
161
+ @param[in] siglen The length of the signature
162
+ @param[in] digest The hash of the signed data
163
+ @return 0 for success, -1 for error or invalid signature
164
+ */
165
+int cl_verify_signature_hash_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *digest);
166
+
167
+/** Verify validity of signed data
168
+ @param[in] x509 The X509 object of the public key of the keypair that signed the data
169
+ @param[in] alg The algorithm used to hash the data
170
+ @param[in] sig The signature block
171
+ @param[in] siglen The length of the signature
172
+ @param[in] fd The file descriptor
173
+ @return 0 for success, -1 for error or invalid signature
174
+ */
175
+int cl_verify_signature_fd_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, int fd);
176
+
177
+/** Verify validity of signed data
178
+ @param[in] x509 The X509 object of the public key of the keypair that signed the data
179
+ @param[in] alg The algorithm used to hash the data
180
+ @param[in] sig The signature block
181
+ @param[in] siglen The length of the signature
182
+ @param[in] data The data that was signed
183
+ @param[in] datalen The length of the data
184
+ @param[in] decode Whether or not to base64-decode the signature prior to verification. 1 for yes, 0 for no.
185
+ @return 0 for success, -1 for error or invalid signature
186
+ */
187
+int cl_verify_signature_x509(X509 *x509, char *alg, unsigned char *sig, unsigned int siglen, unsigned char *data, size_t datalen, int decode);
188
+
189
+/** Get an X509 object from memory
190
+ * @param[in] data A pointer to a spot in memory that contains the PEM X509 cert
191
+ * @param[in] len The length of the data
192
+ * @return a pointer to the X509 object on success, NULL on error
193
+ */
194
+X509 *cl_get_x509_from_mem(void *data, unsigned int len);
195
+
196
+/** Validate an X509 certificate chain, with the chain being located in a directory
197
+ @param[in] tsdir The path to the trust store directory
198
+ @param[in] certpath The path to the X509 certificate to be validated.
199
+ @return 0 for success, -1 for error or invalid certificate.
200
+ */
201
+int cl_validate_certificate_chain_ts_dir(char *tsdir, char *certpath);
202
+
203
+/** Validate an X509 certificate chain with support for a CRL
204
+ @param[in] authorities A NULL-terminated array of strings that hold the path of the CA's X509 certificate
205
+ @param[in] crlpath An optional path to the CRL file. NULL if no CRL.
206
+ @param[in] certpath The path to the X509 certificate to be validated.
207
+ @return 0 for success, -1 for error or invalid certificate.
208
+ */
209
+int cl_validate_certificate_chain(char **authorities, char *crlpath, char *certpath);
210
+
211
+/** Load an X509 certificate from a file
212
+ @param[in] certpath The path to the X509 certificate
213
+ */
214
+X509 *cl_load_cert(const char *certpath);
215
+
216
+/** Parse an ASN1_TIME object
217
+ @param[in] timeobj The ASN1_TIME object
218
+ @return A pointer to a (struct tm). Adjusted for time zone and daylight savings time.
219
+ */
220
+struct tm *cl_ASN1_GetTimeT(ASN1_TIME *timeobj);
221
+
222
+/** Load a CRL file into an X509_CRL object
223
+ @param[in] file The path to the CRL
224
+ @return A pointer to an X509_CRL object or NULL on error.
225
+ */
226
+X509_CRL *cl_load_crl(const char *timeobj);
227
+
228
+/** Sign data with a key stored on disk
229
+ @param[in] keypath The path to the RSA private key
230
+ @param[in] alg The hash/signature algorithm to use
231
+ @param[in] hash The hash to sign
232
+ @param[out] olen A pointer that stores the size of the signature
233
+ @param[in] Whether or not to base64-encode the signature. 1 for yes, 0 for no.
234
+ @return The generated signature
235
+ */
236
+unsigned char *cl_sign_data_keyfile(char *keypath, char *alg, unsigned char *hash, unsigned int *olen, int encode);
237
+
238
+/** Sign data with an RSA private key object
239
+ @param[in] pkey The RSA private key object
240
+ @param[in] alg The hash/signature algorithm to use
241
+ @param[in] hash The hash to sign
242
+ @param[out] olen A pointer that stores the size of the signature
243
+ @param[in] Whether or not to base64-encode the signature. 1 for yes, 0 for no.
244
+ @return The generated signature
245
+ */
246
+unsigned char *cl_sign_data(EVP_PKEY *pkey, char *alg, unsigned char *hash, unsigned int *olen, int encode);
247
+
248
+/** Sign a file with an RSA private key object
249
+ @param[in] fd The file descriptor
250
+ @param[in] pkey The RSA private key object
251
+ @param[in] alg The hash/signature algorithm to use
252
+ @param[out] olen A pointer that stores the size of the signature
253
+ @param[in] encode Whether or not to base64-encode the signature. 1 for yes, 0 for no.
254
+ */
255
+unsigned char *cl_sign_file_fd(int fd, EVP_PKEY *pkey, char *alg, unsigned int *olen, int encode);
256
+
257
+/** Sign a file with an RSA private key object
258
+ @param[in] fp A pointer to a FILE object
259
+ @param[in] pkey The RSA private key object
260
+ @param[in] alg The hash/signature algorithm to use
261
+ @param[out] olen A pointer that stores the size of the signature
262
+ @param[in] encode Whether or not to base64-encode the signature. 1 for yes, 0 for no.
263
+ */
264
+unsigned char *cl_sign_file_fp(FILE *fp, EVP_PKEY *pkey, char *alg, unsigned int *olen, int encode);
265
+
266
+/** Get the Private Key stored on disk
267
+ * @param[in] keypath The path on disk where the private key is stored
268
+ * @return A pointer to the EVP_PKEY object that contains the private key in memory
269
+ */
270
+EVP_PKEY *cl_get_pkey_file(char *keypath);
271
+
272
+/**
273
+ * @}
274
+ */
275
+
276
+#endif
... ...
@@ -35,6 +35,10 @@
35 35
 #include <time.h>
36 36
 #include <errno.h>
37 37
 
38
+#include <openssl/ssl.h>
39
+#include <openssl/err.h>
40
+#include "libclamav/crypto.h"
41
+
38 42
 #include "clamav.h"
39 43
 #include "others.h"
40 44
 #include "dsig.h"
... ...
@@ -42,7 +46,6 @@
42 42
 #include "cvd.h"
43 43
 #include "readdb.h"
44 44
 #include "default.h"
45
-#include "sha256.h"
46 45
 
47 46
 #define TAR_BLOCKSIZE 512
48 47
 
... ...
@@ -194,6 +197,11 @@ static void cli_tgzload_cleanup(int comp, struct cli_dbio *dbio, int fdd)
194 194
         free(dbio->buf);
195 195
         dbio->buf = NULL;
196 196
     }
197
+
198
+    if (dbio->hashctx) {
199
+        EVP_MD_CTX_destroy(dbio->hashctx);
200
+        dbio->hashctx = NULL;
201
+    }
197 202
 }
198 203
 
199 204
 static int cli_tgzload(int fd, struct cl_engine *engine, unsigned int *signo, unsigned int options, struct cli_dbio *dbio, struct cli_dbinfo *dbinfo)
... ...
@@ -312,7 +320,14 @@ static int cli_tgzload(int fd, struct cl_engine *engine, unsigned int *signo, un
312 312
 	dbio->readsize = dbio->size < dbio->bufsize ? dbio->size : dbio->bufsize - 1;
313 313
 	dbio->bufpt = NULL;
314 314
 	dbio->readpt = dbio->buf;
315
-	sha256_init(&dbio->sha256ctx);
315
+    if (!(dbio->hashctx)) {
316
+        dbio->hashctx = EVP_MD_CTX_create();
317
+        if (!(dbio->hashctx)) {
318
+            cli_tgzload_cleanup(compr, dbio, fdd);
319
+            return CL_EMALFDB;
320
+        }
321
+        EVP_DigestInit(dbio->hashctx, EVP_sha256());
322
+    }
316 323
 	dbio->bread = 0;
317 324
 
318 325
 	/* cli_dbgmsg("cli_tgzload: Loading %s, size: %u\n", name, size); */
... ...
@@ -346,7 +361,8 @@ static int cli_tgzload(int fd, struct cl_engine *engine, unsigned int *signo, un
346 346
 			cli_tgzload_cleanup(compr, dbio, fdd);
347 347
 			return CL_EMALFDB;
348 348
 		    }
349
-		    sha256_final(&dbio->sha256ctx, hash);
349
+            EVP_DigestFinal(dbio->hashctx, hash, NULL);
350
+            EVP_DigestInit(dbio->hashctx, EVP_sha256());
350 351
 		    if(memcmp(db->hash, hash, 32)) {
351 352
 			cli_errmsg("cli_tgzload: Invalid checksum for file %s\n", name);
352 353
 			cli_tgzload_cleanup(compr, dbio, fdd);
... ...
@@ -587,6 +603,8 @@ int cli_cvdload(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigne
587 587
 	struct cli_dbinfo *dbinfo = NULL;
588 588
 	char *dupname;
589 589
 
590
+    dbio.hashctx = NULL;
591
+
590 592
     cli_dbgmsg("in cli_cvdload()\n");
591 593
 
592 594
     /* verify */
... ...
@@ -25,8 +25,6 @@
25 25
 #include <zlib.h>
26 26
 #include "clamav.h"
27 27
 
28
-#include "sha256.h"
29
-
30 28
 struct cli_dbio {
31 29
     gzFile gzs;
32 30
     FILE *fs;
... ...
@@ -34,7 +32,7 @@ struct cli_dbio {
34 34
     char *buf, *bufpt, *readpt;
35 35
     unsigned int usebuf, bufsize, readsize;
36 36
     unsigned int chkonly;
37
-    SHA256_CTX sha256ctx;
37
+    EVP_MD_CTX *hashctx;
38 38
 };
39 39
 
40 40
 int cli_cvdload(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigned int options, unsigned int dbtype, const char *filename, unsigned int chkonly);
... ...
@@ -29,6 +29,10 @@
29 29
 #include <ctype.h>
30 30
 #include <zlib.h>
31 31
 
32
+#include <openssl/ssl.h>
33
+#include <openssl/err.h>
34
+#include "libclamav/crypto.h"
35
+
32 36
 #include "clamav.h"
33 37
 #include "cltypes.h"
34 38
 #include "dconf.h"
... ...
@@ -26,6 +26,10 @@
26 26
 #include <string.h>
27 27
 #include <assert.h>
28 28
 
29
+#include <openssl/ssl.h>
30
+#include <openssl/err.h>
31
+#include "libclamav/crypto.h"
32
+
29 33
 #include "others.h"
30 34
 
31 35
 #include "disasmpriv.h"
... ...
@@ -24,6 +24,10 @@
24 24
 #include "clamav-config.h"
25 25
 #endif
26 26
 
27
+#include <openssl/ssl.h>
28
+#include <openssl/err.h>
29
+#include "libclamav/crypto.h"
30
+
27 31
 #include <stdio.h>
28 32
 #include <ctype.h>  
29 33
 #include <string.h>
... ...
@@ -49,6 +49,10 @@
49 49
 #include <libxml/xmlreader.h>
50 50
 #endif
51 51
 
52
+#include <openssl/ssl.h>
53
+#include <openssl/err.h>
54
+#include "libclamav/crypto.h"
55
+
52 56
 #include "cltypes.h"
53 57
 #include "others.h"
54 58
 #include "dmg.h"
... ...
@@ -27,12 +27,15 @@
27 27
 #include <stdlib.h>
28 28
 #include <ctype.h>
29 29
 
30
+#include <openssl/ssl.h>
31
+#include <openssl/err.h>
32
+#include "libclamav/crypto.h"
33
+
30 34
 #include "clamav.h"
31 35
 #include "others.h"
32 36
 #include "dsig.h"
33 37
 #include "str.h"
34 38
 #include "bignum.h"
35
-#include "sha256.h"
36 39
 
37 40
 #define CLI_NSTR "118640995551645342603070001658453189751527774412027743746599405743243142607464144767361060640655844749760788890022283424922762488917565551002467771109669598189410434699034532232228621591089508178591428456220796841621637175567590476666928698770143328137383952820383197532047771780196576957695822641224262693037"
38 41
 
... ...
@@ -108,7 +111,6 @@ int cli_versig(const char *md5, const char *dsig)
108 108
 	mp_int n, e;
109 109
 	char *pt, *pt2;
110 110
 
111
-
112 111
     if(strlen(md5) != 32 || !isalnum(md5[0])) {
113 112
 	/* someone is trying to fool us with empty/malformed MD5 ? */
114 113
 	cli_errmsg("SECURITY WARNING: MD5 basic test failure.\n");
... ...
@@ -156,7 +158,7 @@ int cli_versig2(const unsigned char *sha256, const char *dsig_str, const char *n
156 156
 	unsigned char *decoded, digest1[HASH_LEN], digest2[HASH_LEN], digest3[HASH_LEN], *salt;
157 157
 	unsigned char mask[BLK_LEN], data[BLK_LEN], final[8 + 2 * HASH_LEN], c[4];
158 158
 	unsigned int i, rounds;
159
-	SHA256_CTX ctx;
159
+    EVP_MD_CTX ctx;
160 160
 	mp_int n, e;
161 161
 
162 162
     mp_init(&e);
... ...
@@ -184,10 +186,12 @@ int cli_versig2(const unsigned char *sha256, const char *dsig_str, const char *n
184 184
     for(i = 0; i < rounds; i++) {
185 185
 	c[2] = (unsigned char) (i / 256);
186 186
 	c[3] = (unsigned char) i;
187
-	sha256_init(&ctx);
188
-	sha256_update(&ctx, digest2, HASH_LEN);
189
-	sha256_update(&ctx, c, 4);
190
-	sha256_final(&ctx, digest3);
187
+
188
+    EVP_DigestInit(&ctx, EVP_sha256());
189
+	EVP_DigestUpdate(&ctx, digest2, HASH_LEN);
190
+	EVP_DigestUpdate(&ctx, c, 4);
191
+	EVP_DigestFinal(&ctx, digest3, NULL);
192
+    EVP_MD_CTX_cleanup(&ctx);
191 193
 	if(i + 1 == rounds)
192 194
             memcpy(&data[i * 32], digest3, BLK_LEN - i * HASH_LEN);
193 195
 	else
... ...
@@ -209,9 +213,10 @@ int cli_versig2(const unsigned char *sha256, const char *dsig_str, const char *n
209 209
     memcpy(&final[8], sha256, HASH_LEN);
210 210
     memcpy(&final[8 + HASH_LEN], salt, SALT_LEN);
211 211
 
212
-    sha256_init(&ctx);
213
-    sha256_update(&ctx, final, sizeof(final));
214
-    sha256_final(&ctx, digest1);
212
+    EVP_DigestInit(&ctx, EVP_sha256());
213
+	EVP_DigestUpdate(&ctx, final, sizeof(final));
214
+	EVP_DigestFinal(&ctx, digest1, NULL);
215
+    EVP_MD_CTX_cleanup(&ctx);
215 216
 
216 217
     return memcmp(digest1, digest2, HASH_LEN) ? CL_EVERIFY : CL_SUCCESS;
217 218
 }
... ...
@@ -33,6 +33,10 @@
33 33
 #endif
34 34
 #include <time.h>
35 35
 
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
36 40
 #include "cltypes.h"
37 41
 #include "elf.h"
38 42
 #include "clamav.h"
... ...
@@ -35,6 +35,10 @@
35 35
 
36 36
 #include <assert.h>
37 37
 
38
+#include <openssl/ssl.h>
39
+#include <openssl/err.h>
40
+#include "libclamav/crypto.h"
41
+
38 42
 #include "clamav.h"
39 43
 #include "others.h"
40 44
 #include "htmlnorm.h"
... ...
@@ -19,14 +19,20 @@
19 19
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 20
  *  MA 02110-1301, USA.
21 21
  */
22
+
23
+#ifndef _WIN32
24
+#include <sys/time.h>
25
+#endif
26
+
27
+#include <openssl/ssl.h>
28
+#include <openssl/err.h>
29
+#include "libclamav/crypto.h"
30
+
22 31
 #include "events.h"
23 32
 #include "others.h"
24 33
 #include "7z/7zCrc.h"
25 34
 #include "str.h"
26 35
 #include <string.h>
27
-#ifndef _WIN32
28
-#include <sys/time.h>
29
-#endif
30 36
 
31 37
 struct cli_event {
32 38
     const char *name;
... ...
@@ -38,6 +38,10 @@
38 38
 #include <string.h>
39 39
 #endif
40 40
 
41
+#include <openssl/ssl.h>
42
+#include <openssl/err.h>
43
+#include "libclamav/crypto.h"
44
+
41 45
 #include "explode.h"
42 46
 #include "others.h"
43 47
 
... ...
@@ -30,6 +30,10 @@
30 30
 #include <unistd.h>
31 31
 #endif
32 32
 
33
+#include <openssl/ssl.h>
34
+#include <openssl/err.h>
35
+#include "libclamav/crypto.h"
36
+
33 37
 #include "clamav.h"
34 38
 #include "filetypes.h"
35 39
 #include "others.h"
... ...
@@ -22,6 +22,11 @@
22 22
 #if HAVE_CONFIG_H
23 23
 #include "clamav-config.h"
24 24
 #endif
25
+
26
+#include <openssl/ssl.h>
27
+#include <openssl/err.h>
28
+#include "libclamav/crypto.h"
29
+
25 30
 #include "filtering.h"
26 31
 #include "matcher-ac.h"
27 32
 #include <string.h>
... ...
@@ -41,6 +41,10 @@
41 41
 #include <pthread.h>
42 42
 #endif
43 43
 
44
+#include <openssl/ssl.h>
45
+#include <openssl/err.h>
46
+#include "libclamav/crypto.h"
47
+
44 48
 #include "others.h"
45 49
 #include "cltypes.h"
46 50
 
... ...
@@ -18,6 +18,10 @@
18 18
  *  MA 02110-1301, USA.
19 19
  */
20 20
 
21
+#include <openssl/ssl.h>
22
+#include <openssl/err.h>
23
+#include "libclamav/crypto.h"
24
+
21 25
 #include "others.h"
22 26
 #include "fpu.h"
23 27
 
... ...
@@ -40,6 +40,10 @@
40 40
 
41 41
 #include <stdlib.h>
42 42
 
43
+#include <openssl/ssl.h>
44
+#include <openssl/err.h>
45
+#include "libclamav/crypto.h"
46
+
43 47
 #include "cltypes.h"
44 48
 #include "rebuildpe.h"
45 49
 #include "others.h"
... ...
@@ -31,6 +31,10 @@
31 31
 #include <fcntl.h>
32 32
 #include <zlib.h>
33 33
 
34
+#include <openssl/ssl.h>
35
+#include <openssl/err.h>
36
+#include "libclamav/crypto.h"
37
+
34 38
 #include "cltypes.h"
35 39
 #include "others.h"
36 40
 #include "gpt.h"
... ...
@@ -25,6 +25,10 @@
25 25
 #include <stdio.h>
26 26
 #include <string.h>
27 27
 
28
+#include <openssl/ssl.h>
29
+#include <openssl/err.h>
30
+#include "libclamav/crypto.h"
31
+
28 32
 #include "cltypes.h"
29 33
 #include "clamav.h"
30 34
 #include "others.h"
... ...
@@ -22,6 +22,10 @@
22 22
 #include "clamav-config.h"
23 23
 #endif
24 24
 
25
+#include <openssl/ssl.h>
26
+#include <openssl/err.h>
27
+#include "libclamav/crypto.h"
28
+
25 29
 #include "cltypes.h"
26 30
 #include "others.h"
27 31
 #include "hfsplus.h"
... ...
@@ -53,8 +53,11 @@
53 53
 
54 54
 #include <errno.h>
55 55
 
56
+#include <openssl/ssl.h>
57
+#include <openssl/err.h>
58
+#include "libclamav/crypto.h"
59
+
56 60
 #include "hostid.h"
57
-#include "libclamav/md5.h"
58 61
 #include "libclamav/others.h"
59 62
 
60 63
 struct device *get_device_entry(struct device *devices, size_t *ndevices, const char *name)
... ...
@@ -240,8 +243,8 @@ char *internal_get_host_id(void)
240 240
     size_t i;
241 241
     unsigned char raw_md5[16];
242 242
     char *printable_md5;
243
-    cli_md5_ctx ctx;
244 243
     struct device *devices;
244
+    EVP_MD_CTX ctx;
245 245
 
246 246
     devices = get_devices();
247 247
     if (!(devices))
... ...
@@ -253,11 +256,12 @@ char *internal_get_host_id(void)
253 253
         return NULL;
254 254
     }
255 255
 
256
-    cli_md5_init(&ctx);
256
+    EVP_DigestInit(&ctx, EVP_md5());
257 257
     for (i=0; devices[i].name != NULL; i++)
258
-        cli_md5_update(&ctx, devices[i].mac, sizeof(devices[i].mac));
258
+        EVP_DigestUpdate(&ctx, devices[i].mac, sizeof(devices[i].mac));
259 259
 
260
-    cli_md5_final(raw_md5, &ctx);
260
+    EVP_DigestFinal(&ctx, raw_md5, NULL);
261
+    EVP_MD_CTX_cleanup(&ctx);
261 262
 
262 263
     for (i=0; devices[i].name != NULL; i++)
263 264
         free(devices[i].name);
... ...
@@ -40,6 +40,10 @@
40 40
 #include <stdio.h>
41 41
 #include <ctype.h>
42 42
 
43
+#include <openssl/ssl.h>
44
+#include <openssl/err.h>
45
+#include "libclamav/crypto.h"
46
+
43 47
 #include "fmap.h"
44 48
 #include "others.h"
45 49
 #include "htmlnorm.h"
... ...
@@ -48,6 +48,10 @@ const char inflate64_copyright[] =
48 48
 
49 49
 
50 50
 
51
+#include <openssl/ssl.h>
52
+#include <openssl/err.h>
53
+#include "libclamav/crypto.h"
54
+
51 55
 #include "inflate64_priv.h"
52 56
 
53 57
 #include <stdlib.h> /* calloc/free */
... ...
@@ -20,6 +20,10 @@
20 20
 #include <sys/types.h>
21 21
 #include "is_tar.h"
22 22
 
23
+#include <openssl/ssl.h>
24
+#include <openssl/err.h>
25
+#include "libclamav/crypto.h"
26
+
23 27
 #include "others.h"
24 28
 
25 29
 #define	isodigit(c)	( ((c) >= '0') && ((c) <= '7') )
... ...
@@ -42,6 +42,10 @@
42 42
 #endif
43 43
 #include <zlib.h>
44 44
 
45
+#include <openssl/ssl.h>
46
+#include <openssl/err.h>
47
+#include "libclamav/crypto.h"
48
+
45 49
 #include "scanners.h"
46 50
 #include "cltypes.h"
47 51
 #include "others.h"
... ...
@@ -19,6 +19,11 @@
19 19
  */
20 20
 
21 21
 #include <string.h>
22
+
23
+#include <openssl/ssl.h>
24
+#include <openssl/err.h>
25
+#include "libclamav/crypto.h"
26
+
22 27
 #include "scanners.h"
23 28
 #include "iso9660.h"
24 29
 #include "fmap.h"
... ...
@@ -33,6 +33,10 @@
33 33
 #endif
34 34
 #include <time.h>
35 35
 
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
36 40
 #include "cltypes.h"
37 41
 #include "jpeg.h"
38 42
 #include "clamav.h"
... ...
@@ -29,6 +29,15 @@
29 29
 #include <sys/types.h>
30 30
 #include <errno.h>
31 31
 
32
+#if defined(_WIN32)
33
+#include <WinSock2.h>
34
+#include <Windows.h>
35
+#endif
36
+
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
32 41
 #include "libclamav/others.h"
33 42
 #include "libclamav/clamav.h"
34 43
 
... ...
@@ -34,6 +34,10 @@
34 34
 #include <ctype.h>
35 35
 #include <assert.h>
36 36
 
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
37 41
 #include "cltypes.h"
38 42
 #include "jsparse/lexglobal.h"
39 43
 #include "hashtab.h"
... ...
@@ -164,12 +164,6 @@ CLAMAV_PRIVATE {
164 164
     cli_ftw;
165 165
     cli_unlink;
166 166
     cli_writen;
167
-    SHA1Init;
168
-    SHA1Update;
169
-    SHA1Final;
170
-    sha256_init;
171
-    sha256_update;
172
-    sha256_final;
173 167
     cli_url_canon;
174 168
     cli_strerror;
175 169
     decodeLine;
... ...
@@ -204,6 +198,36 @@ CLAMAV_PRIVATE {
204 204
     cli_disasm_one;
205 205
     cli_utf16_to_utf8;
206 206
     get_fpu_endian;
207
+    cl_initialize_crypto;
208
+    cl_cleanup_crypto;
209
+    cl_hash_data;
210
+    cl_hash_file_fd;
211
+    cl_hash_file_fp;
212
+    cl_hash_file_fd_ctx;
213
+    cl_sha256;
214
+    cl_sha1;
215
+    cl_verify_signature;
216
+    cl_verify_signature_x509_keyfile;
217
+    cl_verify_signature_x509;
218
+    cl_get_x509_from_mem;
219
+    cl_validate_certificate_chain_ts_dir;
220
+    cl_validate_certificate_chain;
221
+    cl_verify_signature_fd;
222
+    cl_verify_signature_fd_x509;
223
+    cl_verify_signature_fd_x509_keyfile;
224
+    cl_verify_signature_hash;
225
+    cl_verify_signature_hash_x509;
226
+    cl_verify_signature_hash_x509_keyfile;
227
+    cl_load_cert;
228
+    cl_ASN1_GetTimeT;
229
+    cl_load_crl;
230
+    sl_sign_data_keyfile;
231
+    cl_sign_data;
232
+    cl_sign_file_fd;
233
+    cl_sign_file_fp;
234
+    cl_get_pkey_file;
235
+    cl_base64_decode;
236
+    cl_base64_encode;
207 237
   local:
208 238
     *;
209 239
 };
... ...
@@ -63,6 +63,10 @@ static	char	const	rcsid[] = "$Id: line.c,v 1.11 2007/02/12 20:46:08 njh Exp $";
63 63
 #include <string.h>
64 64
 #include <assert.h>
65 65
 
66
+#include <openssl/ssl.h>
67
+#include <openssl/err.h>
68
+#include "libclamav/crypto.h"
69
+
66 70
 #include "line.h"
67 71
 #include "others.h"
68 72
 
... ...
@@ -24,6 +24,10 @@
24 24
 #include "clamav-config.h"
25 25
 #endif
26 26
 
27
+#include <openssl/ssl.h>
28
+#include <openssl/err.h>
29
+#include "libclamav/crypto.h"
30
+
27 31
 #include "lzma_iface.h"
28 32
 
29 33
 void *__lzma_wrap_alloc(void *unused, size_t size) { 
... ...
@@ -28,6 +28,10 @@
28 28
 #include <sys/stat.h>
29 29
 #include <fcntl.h>
30 30
 
31
+#include <openssl/ssl.h>
32
+#include <openssl/err.h>
33
+#include "libclamav/crypto.h"
34
+
31 35
 #include "clamav.h"
32 36
 #include "cltypes.h"
33 37
 #include "others.h"
... ...
@@ -33,6 +33,10 @@
33 33
 #include <unistd.h>
34 34
 #endif
35 35
 
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
36 40
 #include "clamav.h"
37 41
 #include "others.h"
38 42
 #include "matcher.h"
... ...
@@ -24,6 +24,11 @@
24 24
 
25 25
 #include <stdio.h>
26 26
 #include <assert.h>
27
+
28
+#include <openssl/ssl.h>
29
+#include <openssl/err.h>
30
+#include "libclamav/crypto.h"
31
+
27 32
 #include "clamav.h"
28 33
 #include "memory.h"
29 34
 #include "others.h"
... ...
@@ -18,13 +18,17 @@
18 18
  *  MA 02110-1301, USA.
19 19
  */
20 20
 
21
+#include <string.h>
22
+#include <stdlib.h>
23
+
24
+#include <openssl/ssl.h>
25
+#include <openssl/err.h>
26
+#include "libclamav/crypto.h"
27
+
21 28
 #include "matcher.h"
22 29
 #include "others.h"
23 30
 #include "str.h"
24 31
 
25
-#include <string.h>
26
-#include <stdlib.h>
27
-
28 32
 
29 33
 int hm_addhash_str(struct cli_matcher *root, const char *strhash, uint32_t size, const char *virusname) {
30 34
     enum CLI_HASH_TYPE type;
... ...
@@ -30,13 +30,14 @@
30 30
 #include <unistd.h>
31 31
 #endif
32 32
 
33
+#include <openssl/ssl.h>
34
+#include <openssl/err.h>
35
+#include "libclamav/crypto.h"
36
+
33 37
 #include "clamav.h"
34 38
 #include "others.h"
35 39
 #include "matcher-ac.h"
36 40
 #include "matcher-bm.h"
37
-#include "md5.h"
38
-#include "sha1.h"
39
-#include "sha256.h"
40 41
 #include "filetypes.h"
41 42
 #include "matcher.h"
42 43
 #include "pe.h"
... ...
@@ -55,8 +56,6 @@
55 55
 #include "perflogging.h"
56 56
 #include "bytecode_priv.h"
57 57
 #include "bytecode_api_impl.h"
58
-#include "sha256.h"
59
-#include "sha1.h"
60 58
 
61 59
 #ifdef CLI_PERF_LOGGING
62 60
 
... ...
@@ -421,8 +420,6 @@ int cli_checkfp(unsigned char *digest, size_t size, cli_ctx *ctx)
421 421
     char md5[33];
422 422
     unsigned int i;
423 423
     const char *virname=NULL;
424
-    SHA1Context sha1;
425
-    SHA256_CTX sha256;
426 424
     fmap_t *map;
427 425
     const char *ptr;
428 426
     uint8_t shash1[SHA1_HASH_SIZE*2+1];
... ...
@@ -459,9 +456,7 @@ int cli_checkfp(unsigned char *digest, size_t size, cli_ctx *ctx)
459 459
     if(have_sha1 || have_sha256) {
460 460
         if((ptr = fmap_need_off_once(map, 0, size))) {
461 461
             if(have_sha1) {
462
-                SHA1Init(&sha1);
463
-                SHA1Update(&sha1, ptr, size);
464
-                SHA1Final(&sha1, &shash1[SHA1_HASH_SIZE]);
462
+                cl_sha1(ptr, size, shash1, NULL);
465 463
 
466 464
                 if(cli_hm_scan(&shash1[SHA1_HASH_SIZE], size, &virname, ctx->engine->hm_fp, CLI_HASH_SHA1) == CL_VIRUS) {
467 465
                     cli_dbgmsg("cli_checkfp(sha1): Found false positive detection (fp sig: %s)\n", virname);
... ...
@@ -478,9 +473,7 @@ int cli_checkfp(unsigned char *digest, size_t size, cli_ctx *ctx)
478 478
             }
479 479
 
480 480
             if(have_sha256) {
481
-                sha256_init(&sha256);
482
-                sha256_update(&sha256, ptr, size);
483
-                sha256_final(&sha256, &shash256[SHA256_HASH_SIZE]);
481
+                cl_sha256(ptr, size, shash256, NULL);
484 482
 
485 483
                 if(cli_hm_scan(&shash256[SHA256_HASH_SIZE], size, &virname, ctx->engine->hm_fp, CLI_HASH_SHA256) == CL_VIRUS) {
486 484
                     cli_dbgmsg("cli_checkfp(sha256): Found false positive detection (fp sig: %s)\n", virname);
... ...
@@ -497,20 +490,14 @@ int cli_checkfp(unsigned char *digest, size_t size, cli_ctx *ctx)
497 497
 #ifdef HAVE__INTERNAL__SHA_COLLECT
498 498
     if((ctx->options & CL_SCAN_INTERNAL_COLLECT_SHA) && ctx->sha_collect>0) {
499 499
         if((ptr = fmap_need_off_once(map, 0, size))) {
500
-            if(!have_sha256) {
501
-                sha256_init(&sha256);
502
-                sha256_update(&sha256, ptr, size);
503
-                sha256_final(&sha256, &shash256[SHA256_HASH_SIZE]);
504
-            }
500
+            if(!have_sha256)
501
+                cl_sha256(ptr, size, shash256+SHA256_HASH_SIZE, NULL);
505 502
 
506 503
             for(i=0; i<SHA256_HASH_SIZE; i++)
507 504
                 sprintf((char *)shash256+i*2, "%02x", shash256[SHA256_HASH_SIZE+i]);
508 505
 
509
-            if(!have_sha1) {
510
-                SHA1Init(&sha1);
511
-                SHA1Update(&sha1, ptr, size);
512
-                SHA1Final(&sha1, &shash1[SHA1_HASH_SIZE]);
513
-            }
506
+            if(!have_sha1)
507
+                cl_sha1(ptr, size, shash1+SHA1_HASH_SIZE);
514 508
 
515 509
             for(i=0; i<SHA1_HASH_SIZE; i++)
516 510
                 sprintf((char *)shash1+i*2, "%02x", shash1[SHA1_HASH_SIZE+i]);
... ...
@@ -717,283 +704,333 @@ int cli_lsig_eval(cli_ctx *ctx, struct cli_matcher *root, struct cli_ac_data *ac
717 717
 
718 718
 int cli_fmap_scandesc(cli_ctx *ctx, cli_file_t ftype, uint8_t ftonly, struct cli_matched_type **ftoffset, unsigned int acmode, struct cli_ac_result **acres, unsigned char *refhash)
719 719
 {
720
-	const unsigned char *buff;
721
-	int ret = CL_CLEAN, type = CL_CLEAN, bytes, compute_hash[CLI_HASH_AVAIL_TYPES];
722
-	unsigned int i = 0, bm_offmode = 0;
723
-	uint32_t maxpatlen, offset = 0;
724
-	struct cli_ac_data gdata, tdata;
725
-	struct cli_bm_off toff;
726
-	cli_md5_ctx md5ctx;
727
-	SHA256_CTX sha256ctx;
728
-	SHA1Context sha1ctx;
729
-	unsigned char digest[CLI_HASH_AVAIL_TYPES][32];
730
-	struct cli_matcher *groot = NULL, *troot = NULL;
731
-	struct cli_target_info info;
732
-	fmap_t *map = *ctx->fmap;
733
-	struct cli_matcher *hdb, *fp;
734
-	const char *virname = NULL;
735
-	uint32_t viroffset = 0;
736
-	uint32_t viruses_found = 0;
720
+    const unsigned char *buff;
721
+    int ret = CL_CLEAN, type = CL_CLEAN, bytes, compute_hash[CLI_HASH_AVAIL_TYPES];
722
+    unsigned int i = 0, bm_offmode = 0;
723
+    uint32_t maxpatlen, offset = 0;
724
+    struct cli_ac_data gdata, tdata;
725
+    struct cli_bm_off toff;
726
+    unsigned char digest[CLI_HASH_AVAIL_TYPES][32];
727
+    struct cli_matcher *groot = NULL, *troot = NULL;
728
+    struct cli_target_info info;
729
+    fmap_t *map = *ctx->fmap;
730
+    struct cli_matcher *hdb, *fp;
731
+    const char *virname = NULL;
732
+    uint32_t viroffset = 0;
733
+    uint32_t viruses_found = 0;
734
+    EVP_MD_CTX md5ctx, sha1ctx, sha256ctx;
737 735
 
738 736
     if(!ctx->engine) {
739
-	cli_errmsg("cli_scandesc: engine == NULL\n");
740
-	return CL_ENULLARG;
737
+        cli_errmsg("cli_scandesc: engine == NULL\n");
738
+        return CL_ENULLARG;
739
+    }
740
+
741
+    if (!EVP_DigestInit(&md5ctx, EVP_md5())) {
742
+        return CL_CLEAN;
743
+    }
744
+
745
+    if (!EVP_DigestInit(&sha1ctx, EVP_sha1())) {
746
+        return CL_CLEAN;
747
+    }
748
+
749
+    if (!EVP_DigestInit(&sha256ctx, EVP_sha256())) {
750
+        return CL_CLEAN;
741 751
     }
742 752
 
743 753
     if(!ftonly)
744
-	groot = ctx->engine->root[0]; /* generic signatures */
754
+        groot = ctx->engine->root[0]; /* generic signatures */
745 755
 
746 756
     if(ftype) {
747
-	for(i = 1; i < CLI_MTARGETS; i++) {
748
-	    if(cli_mtargets[i].target == ftype) {
749
-		troot = ctx->engine->root[i];
750
-		break;
751
-	    }
752
-	}
757
+        for(i = 1; i < CLI_MTARGETS; i++) {
758
+            if(cli_mtargets[i].target == ftype) {
759
+                troot = ctx->engine->root[i];
760
+                break;
761
+            }
762
+        }
753 763
     }
754 764
 
755 765
     if(ftonly) {
756
-	if(!troot)
757
-	    return CL_CLEAN;
766
+        if(!troot) {
767
+            EVP_MD_CTX_cleanup(&md5ctx);
768
+            EVP_MD_CTX_cleanup(&sha1ctx);
769
+            EVP_MD_CTX_cleanup(&sha256ctx);
770
+            return CL_CLEAN;
771
+        }
758 772
 
759
-	maxpatlen = troot->maxpatlen;
773
+        maxpatlen = troot->maxpatlen;
760 774
     } else {
761
-	if(troot)
762
-	    maxpatlen = MAX(troot->maxpatlen, groot->maxpatlen);
763
-	else
764
-	    maxpatlen = groot->maxpatlen;
775
+        if(troot)
776
+            maxpatlen = MAX(troot->maxpatlen, groot->maxpatlen);
777
+        else
778
+            maxpatlen = groot->maxpatlen;
765 779
     }
766 780
 
767 781
     cli_targetinfo(&info, i, map);
768 782
 
769
-    if(!ftonly)
770
-	if((ret = cli_ac_initdata(&gdata, groot->ac_partsigs, groot->ac_lsigs, groot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN)) || (ret = cli_ac_caloff(groot, &gdata, &info))) {
771
-	    if(info.exeinfo.section)
772
-		free(info.exeinfo.section);
773
-	    cli_hashset_destroy(&info.exeinfo.vinfo);
774
-	    return ret;
775
-	}
783
+    if(!ftonly) {
784
+        if((ret = cli_ac_initdata(&gdata, groot->ac_partsigs, groot->ac_lsigs, groot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN)) || (ret = cli_ac_caloff(groot, &gdata, &info))) {
785
+            if(info.exeinfo.section)
786
+                free(info.exeinfo.section);
787
+
788
+            cli_hashset_destroy(&info.exeinfo.vinfo);
789
+            EVP_MD_CTX_cleanup(&md5ctx);
790
+            EVP_MD_CTX_cleanup(&sha1ctx);
791
+            EVP_MD_CTX_cleanup(&sha256ctx);
792
+            return ret;
793
+        }
794
+    }
776 795
 
777 796
     if(troot) {
778
-	if((ret = cli_ac_initdata(&tdata, troot->ac_partsigs, troot->ac_lsigs, troot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN)) || (ret = cli_ac_caloff(troot, &tdata, &info))) {
779
-	    if(!ftonly)
780
-		cli_ac_freedata(&gdata);
781
-	    if(info.exeinfo.section)
782
-		free(info.exeinfo.section);
783
-	    cli_hashset_destroy(&info.exeinfo.vinfo);
784
-	    return ret;
785
-	}
786
-	if(troot->bm_offmode) {
787
-	    if(map->len >= CLI_DEFAULT_BM_OFFMODE_FSIZE) {
788
-		if((ret = cli_bm_initoff(troot, &toff, &info))) {
789
-		    if(!ftonly)
790
-			cli_ac_freedata(&gdata);
791
-		    cli_ac_freedata(&tdata);
792
-		    if(info.exeinfo.section)
793
-			free(info.exeinfo.section);
794
-		    cli_hashset_destroy(&info.exeinfo.vinfo);
795
-		    return ret;
796
-		}
797
-		bm_offmode = 1;
798
-	    }
799
-	}
797
+        if((ret = cli_ac_initdata(&tdata, troot->ac_partsigs, troot->ac_lsigs, troot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN)) || (ret = cli_ac_caloff(troot, &tdata, &info))) {
798
+            if(!ftonly)
799
+                cli_ac_freedata(&gdata);
800
+            if(info.exeinfo.section)
801
+                free(info.exeinfo.section);
802
+
803
+            cli_hashset_destroy(&info.exeinfo.vinfo);
804
+            EVP_MD_CTX_cleanup(&md5ctx);
805
+            EVP_MD_CTX_cleanup(&sha1ctx);
806
+            EVP_MD_CTX_cleanup(&sha256ctx);
807
+            return ret;
808
+        }
809
+        if(troot->bm_offmode) {
810
+            if(map->len >= CLI_DEFAULT_BM_OFFMODE_FSIZE) {
811
+                if((ret = cli_bm_initoff(troot, &toff, &info))) {
812
+                    if(!ftonly)
813
+                        cli_ac_freedata(&gdata);
814
+
815
+                    cli_ac_freedata(&tdata);
816
+                    if(info.exeinfo.section)
817
+                        free(info.exeinfo.section);
818
+
819
+                    cli_hashset_destroy(&info.exeinfo.vinfo);
820
+                    EVP_MD_CTX_cleanup(&md5ctx);
821
+                    EVP_MD_CTX_cleanup(&sha1ctx);
822
+                    EVP_MD_CTX_cleanup(&sha256ctx);
823
+                    return ret;
824
+                }
825
+
826
+                bm_offmode = 1;
827
+            }
828
+        }
800 829
     }
801 830
 
802 831
     hdb = ctx->engine->hm_hdb;
803 832
     fp = ctx->engine->hm_fp;
804 833
 
805 834
     if(!ftonly && hdb) {
806
-	if(!refhash) {
807
-	    if(cli_hm_have_size(hdb, CLI_HASH_MD5, map->len) || cli_hm_have_size(fp, CLI_HASH_MD5, map->len)) {
808
-		cli_md5_init(&md5ctx);
809
-		compute_hash[CLI_HASH_MD5] = 1;
810
-	    } else
811
-		compute_hash[CLI_HASH_MD5] = 0;
812
-	} else {
813
-	    compute_hash[CLI_HASH_MD5] = 0;
814
-	    memcpy(digest[CLI_HASH_MD5], refhash, 16);
815
-	}
835
+        if(!refhash) {
836
+            if(cli_hm_have_size(hdb, CLI_HASH_MD5, map->len) || cli_hm_have_size(fp, CLI_HASH_MD5, map->len)) {
837
+                compute_hash[CLI_HASH_MD5] = 1;
838
+            } else {
839
+                compute_hash[CLI_HASH_MD5] = 0;
840
+            }
841
+        } else {
842
+            compute_hash[CLI_HASH_MD5] = 0;
843
+            memcpy(digest[CLI_HASH_MD5], refhash, 16);
844
+        }
816 845
 
817
-	if(cli_hm_have_size(hdb, CLI_HASH_SHA1, map->len) || cli_hm_have_wild(hdb, CLI_HASH_SHA1)
818
-		|| cli_hm_have_size(fp, CLI_HASH_SHA1, map->len) || cli_hm_have_wild(fp, CLI_HASH_SHA1) ) {
819
-	    SHA1Init(&sha1ctx);
820
-	    compute_hash[CLI_HASH_SHA1] = 1;
821
-	} else
822
-	    compute_hash[CLI_HASH_SHA1] = 0;
823
-
824
-	if(cli_hm_have_size(hdb, CLI_HASH_SHA256, map->len) || cli_hm_have_wild(hdb, CLI_HASH_SHA256)
825
-		|| cli_hm_have_size(fp, CLI_HASH_SHA256, map->len) || cli_hm_have_wild(fp, CLI_HASH_SHA256)) {
826
-	    sha256_init(&sha256ctx);
827
-	    compute_hash[CLI_HASH_SHA256] = 1;
828
-	} else
829
-	    compute_hash[CLI_HASH_SHA256] = 0;
846
+        if(cli_hm_have_size(hdb, CLI_HASH_SHA1, map->len) || cli_hm_have_wild(hdb, CLI_HASH_SHA1)
847
+            || cli_hm_have_size(fp, CLI_HASH_SHA1, map->len) || cli_hm_have_wild(fp, CLI_HASH_SHA1) ) {
848
+            compute_hash[CLI_HASH_SHA1] = 1;
849
+        } else {
850
+            compute_hash[CLI_HASH_SHA1] = 0;
851
+        }
852
+
853
+        if(cli_hm_have_size(hdb, CLI_HASH_SHA256, map->len) || cli_hm_have_wild(hdb, CLI_HASH_SHA256)
854
+            || cli_hm_have_size(fp, CLI_HASH_SHA256, map->len) || cli_hm_have_wild(fp, CLI_HASH_SHA256)) {
855
+            compute_hash[CLI_HASH_SHA256] = 1;
856
+        } else {
857
+            compute_hash[CLI_HASH_SHA256] = 0;
858
+        }
830 859
     }
831 860
 
832 861
     while(offset < map->len) {
833
-	bytes = MIN(map->len - offset, SCANBUFF);
834
-	if(!(buff = fmap_need_off_once(map, offset, bytes)))
835
-	    break;
836
-	if(ctx->scanned)
837
-	    *ctx->scanned += bytes / CL_COUNT_PRECISION;
862
+        bytes = MIN(map->len - offset, SCANBUFF);
863
+        if(!(buff = fmap_need_off_once(map, offset, bytes)))
864
+            break;
865
+        if(ctx->scanned)
866
+            *ctx->scanned += bytes / CL_COUNT_PRECISION;
867
+
868
+        if(troot) {
869
+                virname = NULL;
870
+                viroffset = 0;
871
+                ret = matcher_run(troot, buff, bytes, &virname, &tdata, offset, &info, ftype, ftoffset, acmode, acres, map, bm_offmode ? &toff : NULL, &viroffset, ctx);
838 872
 
839
-	if(troot) {
873
+            if (virname) {
874
+                /* virname already appended by matcher_run */
875
+                viruses_found = 1;
876
+            }
877
+            if((ret == CL_VIRUS && !SCAN_ALL) || ret == CL_EMEM) {
878
+                if(!ftonly)
879
+                    cli_ac_freedata(&gdata);
880
+
881
+                cli_ac_freedata(&tdata);
882
+                if(bm_offmode)
883
+                    cli_bm_freeoff(&toff);
884
+
885
+                if(info.exeinfo.section)
886
+                    free(info.exeinfo.section);
887
+
888
+                cli_hashset_destroy(&info.exeinfo.vinfo);
889
+                EVP_MD_CTX_cleanup(&md5ctx);
890
+                EVP_MD_CTX_cleanup(&sha1ctx);
891
+                EVP_MD_CTX_cleanup(&sha256ctx);
892
+                return ret;
893
+            }
894
+        }
895
+
896
+        if(!ftonly) {
840 897
             virname = NULL;
841 898
             viroffset = 0;
842
-	    ret = matcher_run(troot, buff, bytes, &virname, &tdata, offset, &info, ftype, ftoffset, acmode, acres, map, bm_offmode ? &toff : NULL, &viroffset, ctx);
899
+            ret = matcher_run(groot, buff, bytes, &virname, &gdata, offset, &info, ftype, ftoffset, acmode, acres, map, NULL, &viroffset, ctx);
843 900
 
844
-	    if (virname) {
845
-		/* virname already appended by matcher_run */
846
-		viruses_found = 1;
847
-	    }
848
-	    if((ret == CL_VIRUS && !SCAN_ALL) || ret == CL_EMEM) {
849
-		if(!ftonly)
850
-		    cli_ac_freedata(&gdata);
851
-		cli_ac_freedata(&tdata);
852
-		if(bm_offmode)
853
-		    cli_bm_freeoff(&toff);
854
-		if(info.exeinfo.section)
855
-		    free(info.exeinfo.section);
856
-		cli_hashset_destroy(&info.exeinfo.vinfo);
857
-		return ret;
858
-	    }
859
-	}
901
+            if (virname) {
902
+                /* virname already appended by matcher_run */
903
+                viruses_found = 1;
904
+            }
905
+            if((ret == CL_VIRUS && !SCAN_ALL) || ret == CL_EMEM) {
906
+                cli_ac_freedata(&gdata);
907
+                if(troot) {
908
+                    cli_ac_freedata(&tdata);
909
+                    if(bm_offmode)
910
+                        cli_bm_freeoff(&toff);
911
+                }
860 912
 
861
-	if(!ftonly) {
862
-	    virname = NULL;
863
-	    viroffset = 0;
864
-	    ret = matcher_run(groot, buff, bytes, &virname, &gdata, offset, &info, ftype, ftoffset, acmode, acres, map, NULL, &viroffset, ctx);
913
+                if(info.exeinfo.section)
914
+                    free(info.exeinfo.section);
865 915
 
866
-            if (virname) {
867
-		/* virname already appended by matcher_run */
868
-		viruses_found = 1;
869
-	    }
870
-	    if((ret == CL_VIRUS && !SCAN_ALL) || ret == CL_EMEM) {
871
-		cli_ac_freedata(&gdata);
872
-		if(troot) {
873
-		    cli_ac_freedata(&tdata);
874
-		    if(bm_offmode)
875
-			cli_bm_freeoff(&toff);
876
-		}
877
-		if(info.exeinfo.section)
878
-		    free(info.exeinfo.section);
879
-		cli_hashset_destroy(&info.exeinfo.vinfo);
880
-		return ret;
881
-	    } else if((acmode & AC_SCAN_FT) && ret >= CL_TYPENO) {
882
-		if(ret > type)
883
-		    type = ret;
884
-	    }
916
+                cli_hashset_destroy(&info.exeinfo.vinfo);
917
+                return ret;
918
+            } else if((acmode & AC_SCAN_FT) && ret >= CL_TYPENO) {
919
+                if(ret > type)
920
+                    type = ret;
921
+            }
885 922
 
886
-	    if(hdb && !SCAN_ALL) {
887
-		const void *data = buff + maxpatlen * (offset!=0);
888
-		uint32_t data_len = bytes - maxpatlen * (offset!=0);
923
+            if(hdb && !SCAN_ALL) {
924
+                const void *data = buff + maxpatlen * (offset!=0);
925
+                uint32_t data_len = bytes - maxpatlen * (offset!=0);
889 926
 
890
-		if(compute_hash[CLI_HASH_MD5])
891
-		    cli_md5_update(&md5ctx, data, data_len);
892
-		if(compute_hash[CLI_HASH_SHA1])
893
-		    SHA1Update(&sha1ctx, data, data_len);
894
-		if(compute_hash[CLI_HASH_SHA256])
895
-		    sha256_update(&sha256ctx, data, data_len);
896
-	    }
897
-	}
927
+                if(compute_hash[CLI_HASH_MD5])
928
+                    EVP_DigestUpdate(&md5ctx, data, data_len);
929
+                if(compute_hash[CLI_HASH_SHA1])
930
+                    EVP_DigestUpdate(&sha1ctx, data, data_len);
931
+                if(compute_hash[CLI_HASH_SHA256])
932
+                    EVP_DigestUpdate(&sha256ctx, data, data_len);
933
+            }
934
+        }
898 935
 
899
-	if(SCAN_ALL && viroffset) {
900
-	    offset = viroffset;
901
-	    continue;
902
-	}
903
-	if(bytes < SCANBUFF) break;
904
-	offset += bytes - maxpatlen;
936
+        if(SCAN_ALL && viroffset) {
937
+            offset = viroffset;
938
+            continue;
939
+        }
940
+
941
+        if(bytes < SCANBUFF)
942
+            break;
943
+
944
+        offset += bytes - maxpatlen;
905 945
     }
906 946
 
907 947
     if(!ftonly && hdb) {
908
-	enum CLI_HASH_TYPE hashtype, hashtype2;
909
-
910
-	if(compute_hash[CLI_HASH_MD5])
911
-	    cli_md5_final(digest[CLI_HASH_MD5], &md5ctx);
912
-	if(refhash)
913
-	    compute_hash[CLI_HASH_MD5] = 1;
914
-	if(compute_hash[CLI_HASH_SHA1])
915
-	    SHA1Final(&sha1ctx, digest[CLI_HASH_SHA1]);
916
-	if(compute_hash[CLI_HASH_SHA256])
917
-	    sha256_final(&sha256ctx, digest[CLI_HASH_SHA256]);
918
-
919
-	virname = NULL;
920
-	for(hashtype = CLI_HASH_MD5; hashtype < CLI_HASH_AVAIL_TYPES; hashtype++) {
921
-	    const char * virname_w = NULL;
922
-	    int found = 0;
923
-
924
-	    /* If no hash, skip to next type */
925
-	    if(!compute_hash[hashtype])
926
-		continue;
948
+        enum CLI_HASH_TYPE hashtype, hashtype2;
927 949
 
928
-	    /* Do hash scan */
929
-	    if((ret = cli_hm_scan(digest[hashtype], map->len, &virname, hdb, hashtype)) == CL_VIRUS) {
930
-		found += 1;
931
-	    }
932
-	    if(!found || SCAN_ALL) {
933
-		if ((ret = cli_hm_scan_wild(digest[hashtype], &virname_w, hdb, hashtype)) == CL_VIRUS)
934
-		    found += 2;
935
-	    }
950
+        if(compute_hash[CLI_HASH_MD5]) {
951
+            EVP_DigestFinal(&md5ctx, digest[CLI_HASH_MD5], NULL);
952
+        }
953
+        if(refhash)
954
+            compute_hash[CLI_HASH_MD5] = 1;
955
+        if(compute_hash[CLI_HASH_SHA1]) {
956
+            EVP_DigestFinal(&sha1ctx, digest[CLI_HASH_SHA1], NULL);
957
+        }
958
+        if(compute_hash[CLI_HASH_SHA256]) {
959
+            EVP_DigestFinal(&sha256ctx, digest[CLI_HASH_SHA256], NULL);
960
+        }
936 961
 
937
-	    /* If found, do immediate hash-only FP check */
938
-	    if (found && fp) {
939
-		for(hashtype2 = CLI_HASH_MD5; hashtype2 < CLI_HASH_AVAIL_TYPES; hashtype2++) {
940
-		    if(!compute_hash[hashtype2])
941
-			continue;
942
-		    if(cli_hm_scan(digest[hashtype2], map->len, NULL, fp, hashtype2) == CL_VIRUS) {
943
-			found = 0;
944
-			ret = CL_CLEAN;
945
-			break;
946
-		    }
947
-		    else if(cli_hm_scan_wild(digest[hashtype2], NULL, fp, hashtype2) == CL_VIRUS) {
948
-			found = 0;
949
-			ret = CL_CLEAN;
950
-			break;
951
-		    }
952
-		}
953
-	    }
962
+        virname = NULL;
963
+        for(hashtype = CLI_HASH_MD5; hashtype < CLI_HASH_AVAIL_TYPES; hashtype++) {
964
+            const char * virname_w = NULL;
965
+            int found = 0;
954 966
 
955
-	    /* If matched size-based hash ... */
956
-	    if (found % 2) {
957
-		viruses_found = 1;
958
-		cli_append_virus(ctx, virname);
959
-		if (!SCAN_ALL)
960
-		    break;
961
-		virname = NULL;
962
-	    }
963
-	    /* If matched size-agnostic hash ... */
964
-	    if (found > 1) {
965
-		viruses_found = 1;
966
-		cli_append_virus(ctx, virname_w);
967
-		if (!SCAN_ALL)
968
-		    break;
969
-	    }
970
-	}
967
+            /* If no hash, skip to next type */
968
+            if(!compute_hash[hashtype])
969
+                continue;
970
+
971
+            /* Do hash scan */
972
+            if((ret = cli_hm_scan(digest[hashtype], map->len, &virname, hdb, hashtype)) == CL_VIRUS) {
973
+                found += 1;
974
+            }
975
+            if(!found || SCAN_ALL) {
976
+                if ((ret = cli_hm_scan_wild(digest[hashtype], &virname_w, hdb, hashtype)) == CL_VIRUS)
977
+                    found += 2;
978
+            }
979
+
980
+            /* If found, do immediate hash-only FP check */
981
+            if (found && fp) {
982
+                for(hashtype2 = CLI_HASH_MD5; hashtype2 < CLI_HASH_AVAIL_TYPES; hashtype2++) {
983
+                    if(!compute_hash[hashtype2])
984
+                        continue;
985
+                    if(cli_hm_scan(digest[hashtype2], map->len, NULL, fp, hashtype2) == CL_VIRUS) {
986
+                        found = 0;
987
+                        ret = CL_CLEAN;
988
+                        break;
989
+                    }
990
+                    else if(cli_hm_scan_wild(digest[hashtype2], NULL, fp, hashtype2) == CL_VIRUS) {
991
+                        found = 0;
992
+                        ret = CL_CLEAN;
993
+                        break;
994
+                    }
995
+                }
996
+            }
997
+
998
+            /* If matched size-based hash ... */
999
+            if (found % 2) {
1000
+                viruses_found = 1;
1001
+                cli_append_virus(ctx, virname);
1002
+                if (!SCAN_ALL)
1003
+                    break;
1004
+                virname = NULL;
1005
+            }
1006
+            /* If matched size-agnostic hash ... */
1007
+            if (found > 1) {
1008
+                viruses_found = 1;
1009
+                cli_append_virus(ctx, virname_w);
1010
+
1011
+                if (!SCAN_ALL)
1012
+                    break;
1013
+            }
1014
+        }
971 1015
     }
972 1016
 
1017
+    EVP_MD_CTX_cleanup(&md5ctx);
1018
+    EVP_MD_CTX_cleanup(&sha1ctx);
1019
+    EVP_MD_CTX_cleanup(&sha256ctx);
1020
+
973 1021
     if(troot) {
974
-	if(ret != CL_VIRUS || SCAN_ALL)
975
-	    ret = cli_lsig_eval(ctx, troot, &tdata, &info, refhash);
976
-	if (ret == CL_VIRUS)
977
-	    viruses_found++;
978
-	cli_ac_freedata(&tdata);
979
-	if(bm_offmode)
980
-	    cli_bm_freeoff(&toff);
1022
+        if(ret != CL_VIRUS || SCAN_ALL)
1023
+            ret = cli_lsig_eval(ctx, troot, &tdata, &info, refhash);
1024
+        if (ret == CL_VIRUS)
1025
+            viruses_found++;
1026
+
1027
+        cli_ac_freedata(&tdata);
1028
+        if(bm_offmode)
1029
+            cli_bm_freeoff(&toff);
981 1030
     }
982 1031
 
983 1032
     if(groot) {
984
-	if(ret != CL_VIRUS || SCAN_ALL)
985
-	    ret = cli_lsig_eval(ctx, groot, &gdata, &info, refhash);
986
-	cli_ac_freedata(&gdata);
1033
+        if(ret != CL_VIRUS || SCAN_ALL)
1034
+            ret = cli_lsig_eval(ctx, groot, &gdata, &info, refhash);
1035
+        cli_ac_freedata(&gdata);
987 1036
     }
988 1037
 
989 1038
     if(info.exeinfo.section)
990
-	free(info.exeinfo.section);
1039
+        free(info.exeinfo.section);
1040
+
991 1041
     cli_hashset_destroy(&info.exeinfo.vinfo);
992 1042
 
993 1043
     if (SCAN_ALL && viruses_found)
994
-	return CL_VIRUS;
1044
+        return CL_VIRUS;
995 1045
     if(ret == CL_VIRUS)
996
-	return CL_VIRUS;
1046
+        return CL_VIRUS;
997 1047
 
998 1048
     return (acmode & AC_SCAN_FT) ? type : CL_CLEAN;
999 1049
 }
... ...
@@ -30,8 +30,6 @@ static	char	const	rcsid[] = "$Id: mbox.c,v 1.381 2007/02/15 12:26:44 njh Exp $";
30 30
 #endif
31 31
 #endif
32 32
 
33
-#define _GNU_SOURCE
34
-
35 33
 #include <stdio.h>
36 34
 #include <stdlib.h>
37 35
 #include <errno.h>
... ...
@@ -66,12 +64,15 @@ static	char	const	rcsid[] = "$Id: mbox.c,v 1.381 2007/02/15 12:26:44 njh Exp $";
66 66
 #include <pthread.h>
67 67
 #endif
68 68
 
69
+#include <openssl/ssl.h>
70
+#include <openssl/err.h>
71
+#include "libclamav/crypto.h"
72
+
69 73
 #include "others.h"
70 74
 #include "str.h"
71 75
 #include "filetypes.h"
72 76
 #include "mbox.h"
73 77
 #include "dconf.h"
74
-#include "md5.h"
75 78
 #include "fmap.h"
76 79
 
77 80
 #define DCONF_PHISHING mctx->ctx->dconf->phishing
... ...
@@ -2795,7 +2796,6 @@ rfc1341(message *m, const char *dir)
2795 2795
 	int n;
2796 2796
 	char pdir[NAME_MAX + 1];
2797 2797
 	unsigned char md5_val[16];
2798
-	cli_md5_ctx md5;
2799 2798
 	char *md5_hex;
2800 2799
 
2801 2800
 	id = (char *)messageFindArgument(m, "id");
... ...
@@ -2852,9 +2852,7 @@ rfc1341(message *m, const char *dir)
2852 2852
 	}
2853 2853
 
2854 2854
 	n = atoi(number);
2855
-	cli_md5_init(&md5);
2856
-	cli_md5_update(&md5, id, strlen(id));
2857
-	cli_md5_final(md5_val, &md5);
2855
+    cl_hash_data("md5", id, strlen(id), md5_val, NULL);
2858 2856
 	md5_hex = cli_str2hex((const char*)md5_val, 16);
2859 2857
 
2860 2858
 	if(!md5_hex) {
2861 2859
deleted file mode 100644
... ...
@@ -1,284 +0,0 @@
1
-/*
2
- * This is an OpenSSL-compatible implementation of the RSA Data Security,
3
- * Inc. MD5 Message-Digest Algorithm (RFC 1321).
4
- *
5
- * Written by Solar Designer <solar at openwall.com> in 2001, and placed
6
- * in the public domain.  There's absolutely no warranty.
7
- *
8
- * This differs from Colin Plumb's older public domain implementation in
9
- * that no 32-bit integer data type is required, there's no compile-time
10
- * endianness configuration, and the function prototypes match OpenSSL's.
11
- * The primary goals are portability and ease of use.
12
- *
13
- * This implementation is meant to be fast, but not as fast as possible.
14
- * Some known optimizations are not included to reduce source code size
15
- * and avoid compile-time configuration.
16
- *
17
- * Updated in 2012 to meet the needs of ClamAV.
18
- */
19
-
20
-#include <string.h>
21
-
22
-#include "md5.h"
23
-#include "iowrap.h"
24
-
25
-/*
26
- * The basic MD5 functions.
27
- *
28
- * F and G are optimized compared to their RFC 1321 definitions for
29
- * architectures that lack an AND-NOT instruction, just like in Colin Plumb's
30
- * implementation.
31
- */
32
-#define F(x, y, z)			((z) ^ ((x) & ((y) ^ (z))))
33
-#define G(x, y, z)			((y) ^ ((z) & ((x) ^ (y))))
34
-#define H(x, y, z)			((x) ^ (y) ^ (z))
35
-#define I(x, y, z)			((y) ^ ((x) | ~(z)))
36
-
37
-/*
38
- * The MD5 transformation for all four rounds.
39
- */
40
-#define STEP(f, a, b, c, d, x, t, s) \
41
-	(a) += f((b), (c), (d)) + (x) + (t); \
42
-	(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
43
-	(a) += (b);
44
-
45
-/*
46
- * SET reads 4 input bytes in little-endian byte order and stores them
47
- * in a properly aligned word in host byte order.
48
- *
49
- * The check for little-endian architectures that tolerate unaligned
50
- * memory accesses is just an optimization.  Nothing will break if it
51
- * doesn't work.
52
- */
53
-#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
54
-#define SET(n) \
55
-	(*(const MD5_u32plus *)&chunk[(n) * 4])
56
-#define GET(n) \
57
-	SET(n)
58
-#else
59
-#define SET(n) \
60
-	(ctx->block[(n)] = \
61
-	(MD5_u32plus)chunk[(n) * 4] | \
62
-	((MD5_u32plus)chunk[(n) * 4 + 1] << 8) | \
63
-	((MD5_u32plus)chunk[(n) * 4 + 2] << 16) | \
64
-	((MD5_u32plus)chunk[(n) * 4 + 3] << 24))
65
-#define GET(n) \
66
-	(ctx->block[(n)])
67
-#endif
68
-
69
-/*
70
- * This processes one or more 64-byte data blocks, but does NOT update
71
- * the bit counters.  There are no alignment requirements.
72
- * Returns NULL on a read error, or a pointer to the next byte if successful.
73
- */
74
-static const void *body(cli_md5_ctx *ctx, const void *data, unsigned long size)
75
-{
76
-	const unsigned char *ptr;
77
-	MD5_u32plus a, b, c, d;
78
-	MD5_u32plus saved_a, saved_b, saved_c, saved_d;
79
-	unsigned char chunk[64];
80
-
81
-	ptr = data;
82
-
83
-	a = ctx->a;
84
-	b = ctx->b;
85
-	c = ctx->c;
86
-	d = ctx->d;
87
-
88
-	do {
89
-		saved_a = a;
90
-		saved_b = b;
91
-		saved_c = c;
92
-		saved_d = d;
93
-
94
-		if(cli_memcpy(chunk, ptr, 64))
95
-			return NULL;
96
-/* Round 1 */
97
-		STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
98
-		STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
99
-		STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
100
-		STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
101
-		STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
102
-		STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
103
-		STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
104
-		STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
105
-		STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
106
-		STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
107
-		STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
108
-		STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
109
-		STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
110
-		STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
111
-		STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
112
-		STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
113
-
114
-/* Round 2 */
115
-		STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
116
-		STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
117
-		STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
118
-		STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
119
-		STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
120
-		STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
121
-		STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
122
-		STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
123
-		STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
124
-		STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
125
-		STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
126
-		STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
127
-		STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
128
-		STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
129
-		STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
130
-		STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
131
-
132
-/* Round 3 */
133
-		STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
134
-		STEP(H, d, a, b, c, GET(8), 0x8771f681, 11)
135
-		STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
136
-		STEP(H, b, c, d, a, GET(14), 0xfde5380c, 23)
137
-		STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
138
-		STEP(H, d, a, b, c, GET(4), 0x4bdecfa9, 11)
139
-		STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
140
-		STEP(H, b, c, d, a, GET(10), 0xbebfbc70, 23)
141
-		STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
142
-		STEP(H, d, a, b, c, GET(0), 0xeaa127fa, 11)
143
-		STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
144
-		STEP(H, b, c, d, a, GET(6), 0x04881d05, 23)
145
-		STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
146
-		STEP(H, d, a, b, c, GET(12), 0xe6db99e5, 11)
147
-		STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
148
-		STEP(H, b, c, d, a, GET(2), 0xc4ac5665, 23)
149
-
150
-/* Round 4 */
151
-		STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
152
-		STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
153
-		STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
154
-		STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
155
-		STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
156
-		STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
157
-		STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
158
-		STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
159
-		STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
160
-		STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
161
-		STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
162
-		STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
163
-		STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
164
-		STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
165
-		STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
166
-		STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)
167
-
168
-		a += saved_a;
169
-		b += saved_b;
170
-		c += saved_c;
171
-		d += saved_d;
172
-
173
-		ptr += 64;
174
-	} while (size -= 64);
175
-
176
-	ctx->a = a;
177
-	ctx->b = b;
178
-	ctx->c = c;
179
-	ctx->d = d;
180
-
181
-	return ptr;
182
-}
183
-
184
-void cli_md5_init(cli_md5_ctx *ctx)
185
-{
186
-	ctx->a = 0x67452301;
187
-	ctx->b = 0xefcdab89;
188
-	ctx->c = 0x98badcfe;
189
-	ctx->d = 0x10325476;
190
-
191
-	ctx->lo = 0;
192
-	ctx->hi = 0;
193
-}
194
-
195
-int cli_md5_update(cli_md5_ctx *ctx, const void *data, unsigned long size)
196
-{
197
-	MD5_u32plus saved_lo;
198
-	unsigned long used, free;
199
-	int invalid = 0;
200
-
201
-	saved_lo = ctx->lo;
202
-	if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
203
-		ctx->hi++;
204
-	ctx->hi += size >> 29;
205
-
206
-	used = saved_lo & 0x3f;
207
-
208
-	if (used) {
209
-		free = 64 - used;
210
-
211
-		if (size < free) {
212
-			invalid = cli_memcpy(&ctx->buffer[used], data, size);
213
-			return invalid;
214
-		}
215
-
216
-		invalid = cli_memcpy(&ctx->buffer[used], data, free);
217
-		if (invalid)
218
-			return invalid;
219
-		data = (const unsigned char *)data + free;
220
-		size -= free;
221
-		if (body(ctx, ctx->buffer, 64) == NULL)
222
-			return 1;
223
-	}
224
-
225
-	if (size >= 64) {
226
-		data = body(ctx, data, size & ~(unsigned long)0x3f);
227
-		if (data == NULL)
228
-			return 1;
229
-		size &= 0x3f;
230
-	}
231
-
232
-	return cli_memcpy(ctx->buffer, data, size);
233
-}
234
-
235
-void cli_md5_final(unsigned char *result, cli_md5_ctx *ctx)
236
-{
237
-	unsigned long used, free;
238
-
239
-	used = ctx->lo & 0x3f;
240
-
241
-	ctx->buffer[used++] = 0x80;
242
-
243
-	free = 64 - used;
244
-
245
-	if (free < 8) {
246
-		memset(&ctx->buffer[used], 0, free);
247
-		body(ctx, ctx->buffer, 64);
248
-		used = 0;
249
-		free = 64;
250
-	}
251
-
252
-	memset(&ctx->buffer[used], 0, free - 8);
253
-
254
-	ctx->lo <<= 3;
255
-	ctx->buffer[56] = ctx->lo;
256
-	ctx->buffer[57] = ctx->lo >> 8;
257
-	ctx->buffer[58] = ctx->lo >> 16;
258
-	ctx->buffer[59] = ctx->lo >> 24;
259
-	ctx->buffer[60] = ctx->hi;
260
-	ctx->buffer[61] = ctx->hi >> 8;
261
-	ctx->buffer[62] = ctx->hi >> 16;
262
-	ctx->buffer[63] = ctx->hi >> 24;
263
-
264
-	body(ctx, ctx->buffer, 64);
265
-
266
-	result[0] = ctx->a;
267
-	result[1] = ctx->a >> 8;
268
-	result[2] = ctx->a >> 16;
269
-	result[3] = ctx->a >> 24;
270
-	result[4] = ctx->b;
271
-	result[5] = ctx->b >> 8;
272
-	result[6] = ctx->b >> 16;
273
-	result[7] = ctx->b >> 24;
274
-	result[8] = ctx->c;
275
-	result[9] = ctx->c >> 8;
276
-	result[10] = ctx->c >> 16;
277
-	result[11] = ctx->c >> 24;
278
-	result[12] = ctx->d;
279
-	result[13] = ctx->d >> 8;
280
-	result[14] = ctx->d >> 16;
281
-	result[15] = ctx->d >> 24;
282
-
283
-	memset(ctx, 0, sizeof(*ctx));
284
-}
285 1
deleted file mode 100644
... ...
@@ -1,30 +0,0 @@
1
-/*
2
- * This is an OpenSSL-compatible implementation of the RSA Data Security,
3
- * Inc. MD5 Message-Digest Algorithm (RFC 1321).
4
- *
5
- * Written by Solar Designer <solar at openwall.com> in 2001, and placed
6
- * in the public domain.  There's absolutely no warranty.
7
- *
8
- * Updated in 2012 to meet the needs of ClamAV.
9
- *
10
- * See md5.c for more information.
11
- */
12
-
13
-#ifndef __MD5_H
14
-#define __MD5_H
15
-
16
-/* Any 32-bit or wider unsigned integer data type will do */
17
-typedef unsigned int MD5_u32plus;
18
-
19
-typedef struct {
20
-	MD5_u32plus lo, hi;
21
-	MD5_u32plus a, b, c, d;
22
-	unsigned char buffer[64];
23
-	MD5_u32plus block[16];
24
-} cli_md5_ctx;
25
-
26
-extern void cli_md5_init(cli_md5_ctx *ctx);
27
-extern int cli_md5_update(cli_md5_ctx *ctx, const void *data, unsigned long size);
28
-extern void cli_md5_final(unsigned char *result, cli_md5_ctx *ctx);
29
-
30
-#endif
... ...
@@ -47,6 +47,10 @@ static	char	const	rcsid[] = "$Id: message.c,v 1.195 2007/02/12 20:46:09 njh Exp
47 47
 #include <pthread.h>
48 48
 #endif
49 49
 
50
+#include <openssl/ssl.h>
51
+#include <openssl/err.h>
52
+#include "libclamav/crypto.h"
53
+
50 54
 #include "others.h"
51 55
 #include "str.h"
52 56
 #include "filetypes.h"
... ...
@@ -48,6 +48,10 @@
48 48
 #include <string.h>
49 49
 #endif
50 50
 
51
+#include <openssl/ssl.h>
52
+#include <openssl/err.h>
53
+#include "libclamav/crypto.h"
54
+
51 55
 #include "cltypes.h"
52 56
 #include "pe.h"
53 57
 #include "others.h"
... ...
@@ -40,6 +40,10 @@
40 40
 #endif
41 41
 #include <stddef.h>
42 42
 
43
+#include <openssl/ssl.h>
44
+#include <openssl/err.h>
45
+#include "libclamav/crypto.h"
46
+
43 47
 #include "others.h"
44 48
 #include "str.h"
45 49
 #include "readdb.h"
... ...
@@ -29,6 +29,10 @@
29 29
 #include <fcntl.h>
30 30
 #include <string.h>
31 31
 
32
+#include <openssl/ssl.h>
33
+#include <openssl/err.h>
34
+#include "libclamav/crypto.h"
35
+
32 36
 #include "clamav.h"
33 37
 #include "cltypes.h"
34 38
 #include "others.h"
... ...
@@ -26,6 +26,10 @@
26 26
 #include <stdio.h>
27 27
 #include <string.h>
28 28
 
29
+#include <openssl/ssl.h>
30
+#include <openssl/err.h>
31
+#include "libclamav/crypto.h"
32
+
29 33
 #include "others.h"
30 34
 #include "clamav.h"
31 35
 #include "mspack.h"
... ...
@@ -30,6 +30,10 @@
30 30
 #include "clamav-config.h"
31 31
 #endif
32 32
 
33
+#include <openssl/ssl.h>
34
+#include <openssl/err.h>
35
+#include "libclamav/crypto.h"
36
+
33 37
 #include "bzlib_private.h"
34 38
 #include "others.h"
35 39
 
... ...
@@ -31,6 +31,10 @@
31 31
 #include <unistd.h>
32 32
 #endif
33 33
 
34
+#include <openssl/ssl.h>
35
+#include <openssl/err.h>
36
+#include "libclamav/crypto.h"
37
+
34 38
 #include "others.h"
35 39
 #include "cltypes.h"
36 40
 #include "nsis_bzlib.h"
... ...
@@ -35,6 +35,10 @@
35 35
 #include <stdlib.h>
36 36
 #include "clamav.h"
37 37
 
38
+#include <openssl/ssl.h>
39
+#include <openssl/err.h>
40
+#include "libclamav/crypto.h"
41
+
38 42
 #include "cltypes.h"
39 43
 #include "others.h"
40 44
 #include "ole2_extract.h"
... ...
@@ -65,11 +65,12 @@
65 65
 #include <libxml/parser.h>
66 66
 #endif
67 67
 
68
+#include <openssl/ssl.h>
69
+#include <openssl/err.h>
70
+#include "libclamav/crypto.h"
71
+
68 72
 #include "clamav.h"
69 73
 #include "others.h"
70
-#include "md5.h"
71
-#include "sha1.h"
72
-#include "sha256.h"
73 74
 #include "cltypes.h"
74 75
 #include "regex/regex.h"
75 76
 #include "ltdl.h"
... ...
@@ -876,53 +877,36 @@ int cli_updatelimits(cli_ctx *ctx, unsigned long needed) {
876 876
  */
877 877
 char *cli_hashstream(FILE *fs, unsigned char *digcpy, int type)
878 878
 {
879
-	unsigned char digest[32];
880
-	char buff[FILEBUFF];
881
-	cli_md5_ctx md5;
882
-	SHA1Context sha1;
883
-	SHA256_CTX sha256;
884
-	char *hashstr, *pt;
885
-	int i, bytes, size;
886
-
879
+    unsigned char digest[32];
880
+    char buff[FILEBUFF];
881
+    char *hashstr, *pt;
882
+    int i, bytes, size;
883
+    EVP_MD_CTX ctx;
887 884
 
888 885
     if(type == 1)
889
-	cli_md5_init(&md5);
886
+        EVP_DigestInit(&ctx, EVP_md5());
890 887
     else if(type == 2)
891
-	SHA1Init(&sha1);
888
+        EVP_DigestInit(&ctx, EVP_sha1());
892 889
     else
893
-	sha256_init(&sha256);
894
-
895
-    while((bytes = fread(buff, 1, FILEBUFF, fs))) {
896
-	if(type == 1)
897
-	    cli_md5_update(&md5, buff, bytes);
898
-	else if(type == 2)
899
-	    SHA1Update(&sha1, buff, bytes);
900
-	else
901
-	    sha256_update(&sha256, buff, bytes);
902
-    }
890
+        EVP_DigestInit(&ctx, EVP_sha256());
903 891
 
904
-    if(type == 1) {
905
-	cli_md5_final(digest, &md5);
906
-	size = 16;
907
-    } else if(type == 2) {
908
-	SHA1Final(&sha1, digest);
909
-	size = 20;
910
-    } else {
911
-	sha256_final(&sha256, digest);
912
-	size = 32;
913
-    }
892
+    while((bytes = fread(buff, 1, FILEBUFF, fs)))
893
+        EVP_DigestUpdate(&ctx, buff, bytes);
894
+
895
+    EVP_DigestFinal(&ctx, digest, &size);
896
+    EVP_MD_CTX_cleanup(&ctx);
914 897
 
915 898
     if(!(hashstr = (char *) cli_calloc(size*2 + 1, sizeof(char))))
916
-	return NULL;
899
+        return NULL;
917 900
 
918 901
     pt = hashstr;
919 902
     for(i = 0; i < size; i++) {
920
-	sprintf(pt, "%02x", digest[i]);
921
-	pt += 2;
903
+        sprintf(pt, "%02x", digest[i]);
904
+        pt += 2;
922 905
     }
923 906
 
924 907
     if(digcpy)
925
-	memcpy(digcpy, digest, size);
908
+        memcpy(digcpy, digest, size);
926 909
 
927 910
     return hashstr;
928 911
 }
... ...
@@ -1284,3 +1268,13 @@ void cl_engine_set_clcb_meta(struct cl_engine *engine, clcb_meta callback)
1284 1284
 {
1285 1285
     engine->cb_meta = callback;
1286 1286
 }
1287
+
1288
+__attribute__((constructor)) void init(void)
1289
+{
1290
+    cl_initialize_crypto();
1291
+}
1292
+
1293
+__attribute__((destructor)) void deinit(void)
1294
+{
1295
+    cl_cleanup_crypto();
1296
+}
... ...
@@ -52,14 +52,16 @@
52 52
 #include <malloc.h>
53 53
 #endif
54 54
 
55
+#include <openssl/ssl.h>
56
+#include <openssl/err.h>
57
+#include "libclamav/crypto.h"
58
+
55 59
 #include "clamav.h"
56 60
 #include "others.h"
57
-#include "md5.h"
58 61
 #include "cltypes.h"
59 62
 #include "regex/regex.h"
60 63
 #include "ltdl.h"
61 64
 #include "matcher-ac.h"
62
-#include "md5.h"
63 65
 
64 66
 static unsigned char name_salt[16] = { 16, 38, 97, 12, 8, 4, 72, 196, 217, 144, 33, 124, 18, 11, 17, 253 };
65 67
 
... ...
@@ -823,13 +825,9 @@ static char *cli_md5buff(const unsigned char *buffer, unsigned int len, unsigned
823 823
 {
824 824
 	unsigned char digest[16];
825 825
 	char *md5str, *pt;
826
-	cli_md5_ctx ctx;
827 826
 	int i;
828 827
 
829
-
830
-    cli_md5_init(&ctx);
831
-    cli_md5_update(&ctx, buffer, len);
832
-    cli_md5_final(digest, &ctx);
828
+    cl_hash_data("md5", buffer, len, digest, NULL);
833 829
 
834 830
     if(dig)
835 831
 	memcpy(dig, digest, 16);
... ...
@@ -22,6 +22,10 @@
22 22
 #include "clamav-config.h"
23 23
 #endif
24 24
 
25
+#include <openssl/ssl.h>
26
+#include <openssl/err.h>
27
+#include "libclamav/crypto.h"
28
+
25 29
 #include "others.h"
26 30
 #include "execs.h"
27 31
 #include "pe.h"
... ...
@@ -44,6 +44,10 @@ static	char	const	rcsid[] = "$Id: pdf.c,v 1.61 2007/02/12 20:46:09 njh Exp $";
44 44
 #endif
45 45
 #include <zlib.h>
46 46
 
47
+#include <openssl/ssl.h>
48
+#include <openssl/err.h>
49
+#include "libclamav/crypto.h"
50
+
47 51
 #include "clamav.h"
48 52
 #include "others.h"
49 53
 #include "pdf.h"
... ...
@@ -52,10 +56,8 @@ static	char	const	rcsid[] = "$Id: pdf.c,v 1.61 2007/02/12 20:46:09 njh Exp $";
52 52
 #include "str.h"
53 53
 #include "bytecode.h"
54 54
 #include "bytecode_api.h"
55
-#include "md5.h"
56 55
 #include "arc4.h"
57 56
 #include "rijndael.h"
58
-#include "sha256.h"
59 57
 #include "textnorm.h"
60 58
 
61 59
 
... ...
@@ -665,7 +667,6 @@ static char *decrypt_any(struct pdf_struct *pdf, uint32_t id, const char *in, of
665 665
 {
666 666
     unsigned char *key, *q, result[16];
667 667
     unsigned n;
668
-    cli_md5_ctx md5;
669 668
     struct arc4_state arc4;
670 669
 
671 670
     if (!length || !*length || !in) {
... ...
@@ -690,9 +691,7 @@ static char *decrypt_any(struct pdf_struct *pdf, uint32_t id, const char *in, of
690 690
     *q++ = 0;
691 691
     if (enc_method == ENC_AESV2)
692 692
 	memcpy(q, "sAlT", 4);
693
-    cli_md5_init(&md5);
694
-    cli_md5_update(&md5, key, n);
695
-    cli_md5_final(result, &md5);
693
+    cl_hash_data("md5", key, n, result, NULL);
696 694
     free(key);
697 695
 
698 696
     n = pdf->keylen + 5;
... ...
@@ -1722,7 +1721,6 @@ static void check_user_password(struct pdf_struct *pdf, int R, const char *O,
1722 1722
     unsigned i;
1723 1723
     uint8_t result[16];
1724 1724
     char data[32];
1725
-    cli_md5_ctx md5;
1726 1725
     struct arc4_state arc4;
1727 1726
     unsigned password_empty = 0;
1728 1727
 
... ...
@@ -1730,20 +1728,15 @@ static void check_user_password(struct pdf_struct *pdf, int R, const char *O,
1730 1730
     dbg_printhex("O: ", O, 32);
1731 1731
     if (R == 5) {
1732 1732
 	uint8_t result2[32];
1733
-	SHA256_CTX sha256;
1734 1733
 	/* supplement to ISO3200, 3.5.2 Algorithm 3.11 */
1735
-	sha256_init(&sha256);
1736 1734
 	/* user validation salt */
1737
-	sha256_update(&sha256, U+32, 8);
1738
-	sha256_final(&sha256, result2);
1735
+    cl_sha256(U+32, 8, result2, NULL);
1739 1736
 	dbg_printhex("Computed U", result2, 32);
1740 1737
 	if (!memcmp(result2, U, 32)) {
1741 1738
 	    off_t n;
1742 1739
 	    password_empty = 1;
1743 1740
 	    /* Algorithm 3.2a could be used to recover encryption key */
1744
-	    sha256_init(&sha256);
1745
-	    sha256_update(&sha256, U+40, 8);
1746
-	    sha256_final(&sha256, result2);
1741
+        cl_sha256(U+40, 8, result2, NULL);
1747 1742
 	    n = UE ? strlen(UE) : 0;
1748 1743
 	    if (n != 32) {
1749 1744
 		cli_dbgmsg("cli_pdf: UE length is not 32: %d\n", (int)n);
... ...
@@ -1760,27 +1753,32 @@ static void check_user_password(struct pdf_struct *pdf, int R, const char *O,
1760 1760
 	    }
1761 1761
 	}
1762 1762
     } else if ((R >= 2) && (R <= 4)) {
1763
+        unsigned char *d;
1764
+        size_t sz = 68 + pdf->fileIDlen + (R >= 4 && !EM ? 4 : 0);
1765
+        d = calloc(1, sz);
1766
+
1767
+        if (!(d))
1768
+            return;
1769
+
1770
+        memcpy(d, key_padding, 32);
1771
+        memcpy(d+32, O, 32);
1772
+        P = le32_to_host(P);
1773
+        memcpy(d+64, &P, 4);
1774
+        memcpy(d+68, pdf->fileID, pdf->fileIDlen);
1763 1775
 	/* 7.6.3.3 Algorithm 2 */
1764
-	cli_md5_init(&md5);
1765 1776
 	/* empty password, password == padding */
1766
-	cli_md5_update(&md5, key_padding, 32);
1767
-	cli_md5_update(&md5, O, 32);
1768
-	P = le32_to_host(P);
1769
-	cli_md5_update(&md5, &P, 4);
1770
-	cli_md5_update(&md5, pdf->fileID, pdf->fileIDlen);
1771 1777
 	if (R >= 4 && !EM) {
1772 1778
 	    uint32_t v = 0xFFFFFFFF;
1773
-	    cli_md5_update(&md5, &v, 4);
1779
+        memcpy(d+68+pdf->fileIDlen, &v, 4);
1774 1780
 	}
1775
-	cli_md5_final(result, &md5);
1781
+    cl_hash_data("md5", d, sz, result, NULL);
1782
+    free(d);
1776 1783
 	if (length > 128)
1777 1784
 	    length = 128;
1778 1785
 	if (R >= 3) {
1779
-	    for (i=0;i<50;i++) {
1780
-		cli_md5_init(&md5);
1781
-		cli_md5_update(&md5, result, length/8);
1782
-		cli_md5_final(result, &md5);
1783
-	    }
1786
+        /* Yes, this really is on purpose */
1787
+	    for (i=0;i<50;i++)
1788
+            cl_hash_data("md5", result, length/8, result, NULL);
1784 1789
 	}
1785 1790
 	if (R == 2)
1786 1791
 	    length = 40;
... ...
@@ -1803,11 +1801,16 @@ static void check_user_password(struct pdf_struct *pdf, int R, const char *O,
1803 1803
 		password_empty = 1;
1804 1804
 	} else if (R >= 3) {
1805 1805
 	    unsigned len = pdf->keylen;
1806
+        unsigned char *d;
1807
+
1808
+        d = calloc(1, 32 + pdf->fileIDlen);
1809
+        if (!(d))
1810
+            return;
1811
+
1806 1812
 	    /* 7.6.3.3 Algorithm 5 */
1807
-	    cli_md5_init(&md5);
1808
-	    cli_md5_update(&md5, key_padding, 32);
1809
-	    cli_md5_update(&md5, pdf->fileID, pdf->fileIDlen);
1810
-	    cli_md5_final(result, &md5);
1813
+        memcpy(d, key_padding, 32);
1814
+        memcpy(d+32, pdf->fileID, pdf->fileIDlen);
1815
+        cl_hash_data("md5", d, 32 + pdf->fileIDlen, result, NULL);
1811 1816
 	    memcpy(data, pdf->key, len);
1812 1817
 	    arc4_init(&arc4, data, len);
1813 1818
 	    arc4_apply(&arc4, result, 16);
... ...
@@ -35,6 +35,10 @@
35 35
 #include <time.h>
36 36
 #include <stdarg.h>
37 37
 
38
+#include <openssl/ssl.h>
39
+#include <openssl/err.h>
40
+#include "libclamav/crypto.h"
41
+
38 42
 #include "cltypes.h"
39 43
 #include "clamav.h"
40 44
 #include "others.h"
... ...
@@ -50,7 +54,6 @@
50 50
 #include "scanners.h"
51 51
 #include "str.h"
52 52
 #include "execs.h"
53
-#include "md5.h"
54 53
 #include "mew.h"
55 54
 #include "upack.h"
56 55
 #include "matcher.h"
... ...
@@ -59,8 +62,6 @@
59 59
 #include "special.h"
60 60
 #include "ishield.h"
61 61
 #include "asn1.h"
62
-#include "sha1.h"
63
-#include "libclamav/md5.h"
64 62
 
65 63
 #define DCONF ctx->dconf->pe
66 64
 
... ...
@@ -487,9 +488,6 @@ static void cli_parseres_special(uint32_t base, uint32_t rva, fmap_t *map, struc
487 487
 static unsigned int cli_hashsect(fmap_t *map, struct cli_exe_section *s, unsigned char **digest, int * foundhash, int * foundwild)
488 488
 {
489 489
     const void *hashme;
490
-    cli_md5_ctx md5;
491
-    SHA1Context sha1ctx;
492
-    SHA256_CTX sha256ctx;
493 490
 
494 491
     if (s->rsz > CLI_MAX_ALLOCATION) {
495 492
         cli_dbgmsg("cli_hashsect: skipping hash calculation for too big section\n");
... ...
@@ -502,21 +500,12 @@ static unsigned int cli_hashsect(fmap_t *map, struct cli_exe_section *s, unsigne
502 502
         return 0;
503 503
     }
504 504
 
505
-    if(foundhash[CLI_HASH_MD5] || foundwild[CLI_HASH_MD5]) {
506
-        cli_md5_init(&md5);
507
-        cli_md5_update(&md5, hashme, s->rsz);
508
-        cli_md5_final(digest[CLI_HASH_MD5], &md5);
509
-    }
510
-    if(foundhash[CLI_HASH_SHA1] || foundwild[CLI_HASH_SHA1]) {
511
-        SHA1Init(&sha1ctx);
512
-        SHA1Update(&sha1ctx, hashme, s->rsz);
513
-        SHA1Final(&sha1ctx, digest[CLI_HASH_SHA1]);
514
-    }
515
-    if(foundhash[CLI_HASH_SHA256] || foundwild[CLI_HASH_SHA256]) {
516
-        sha256_init(&sha256ctx);
517
-        sha256_update(&sha256ctx, hashme, s->rsz);
518
-        sha256_final(&sha256ctx, digest[CLI_HASH_SHA256]);
519
-    }
505
+    if(foundhash[CLI_HASH_MD5] || foundwild[CLI_HASH_MD5])
506
+        cl_hash_data("md5", hashme, s->rsz, digest[CLI_HASH_MD5], NULL);
507
+    if(foundhash[CLI_HASH_SHA1] || foundwild[CLI_HASH_SHA1])
508
+        cl_sha1(hashme, s->rsz, digest[CLI_HASH_SHA1], NULL);
509
+    if(foundhash[CLI_HASH_SHA256] || foundwild[CLI_HASH_SHA256])
510
+        cl_sha256(hashme, s->rsz, digest[CLI_HASH_SHA256], NULL);
520 511
 
521 512
     return 1;
522 513
 }
... ...
@@ -563,7 +552,6 @@ static int scan_pe_mdb (cli_ctx * ctx, struct cli_exe_section *exe_section)
563 563
                 md5[8], md5[9], md5[10], md5[11], md5[12], md5[13], md5[14], md5[15]);
564 564
         } else if (cli_always_gen_section_hash) {
565 565
             const void *hashme = fmap_need_off_once(*ctx->fmap, exe_section->raw, exe_section->rsz);
566
-            cli_md5_ctx md5ctx;
567 566
             if (!(hashme)) {
568 567
                 cli_errmsg("scan_pe_mdb: unable to read section data\n");
569 568
                 ret = CL_EREAD;
... ...
@@ -577,9 +565,7 @@ static int scan_pe_mdb (cli_ctx * ctx, struct cli_exe_section *exe_section)
577 577
                 goto end;
578 578
             }
579 579
 
580
-            cli_md5_init(&md5ctx);
581
-            cli_md5_update(&md5ctx, hashme, exe_section->rsz);
582
-            cli_md5_final(md5, &md5ctx);
580
+            cl_hash_data("md5", hashme, exe_section->rsz, md5, NULL);
583 581
 
584 582
             cli_dbgmsg("MDB: %u:%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
585 583
                 exe_section->rsz, md5[0], md5[1], md5[2], md5[3], md5[4], md5[5], md5[6], md5[7],
... ...
@@ -2814,8 +2800,7 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uin
2814 2814
     struct cli_exe_section *exe_sections;
2815 2815
     struct pe_image_data_dir *dirs;
2816 2816
     fmap_t *map = *ctx->fmap;
2817
-    SHA1Context sha1;
2818
-    cli_md5_ctx md5ctx;
2817
+    EVP_MD_CTX hashctx;
2819 2818
 
2820 2819
     if (flags & CL_CHECKFP_PE_FLAG_STATS)
2821 2820
         if (!(hashes))
... ...
@@ -2942,6 +2927,7 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uin
2942 2942
     }
2943 2943
 
2944 2944
     cli_qsort(exe_sections, nsections, sizeof(*exe_sections), sort_sects);
2945
+    EVP_DigestInit(&hashctx, EVP_sha1());
2945 2946
 
2946 2947
     if (flags & CL_CHECKFP_PE_FLAG_AUTHENTICODE) {
2947 2948
         /* Check to see if we have a security section. */
... ...
@@ -2950,11 +2936,10 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uin
2950 2950
                 /* If stats is enabled, continue parsing the sample */
2951 2951
                 flags ^= CL_CHECKFP_PE_FLAG_AUTHENTICODE;
2952 2952
             } else {
2953
+                EVP_MD_CTX_cleanup(&hashctx);
2953 2954
                 return CL_BREAK;
2954 2955
             }
2955 2956
         }
2956
-
2957
-        SHA1Init(&sha1);
2958 2957
     }
2959 2958
 
2960 2959
 #define hash_chunk(where, size, isStatAble, section) \
... ...
@@ -2966,12 +2951,13 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uin
2966 2966
             return CL_EFORMAT; \
2967 2967
         } \
2968 2968
         if (flags & CL_CHECKFP_PE_FLAG_AUTHENTICODE) \
2969
-            SHA1Update(&sha1, hptr, size); \
2969
+            EVP_DigestUpdate(&hashctx, hptr, size); \
2970 2970
         if (isStatAble && flags & CL_CHECKFP_PE_FLAG_STATS) { \
2971
-            cli_md5_init(&md5ctx); \
2972
-            cli_md5_update(&md5ctx, hptr, size); \
2973
-            cli_md5_final(hashes->sections[section].md5, &md5ctx); \
2974
-            hashes->sections[section].len = size; \
2971
+            EVP_MD_CTX md5ctx; \
2972
+            EVP_DigestInit(&md5ctx, EVP_md5()); \
2973
+            EVP_DigestUpdate(&md5ctx, hptr, size); \
2974
+            EVP_DigestFinal(&md5ctx, hashes->sections[section].md5, NULL); \
2975
+            EVP_MD_CTX_cleanup(&md5ctx); \
2975 2976
         } \
2976 2977
     } while(0)
2977 2978
 
... ...
@@ -2996,6 +2982,7 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uin
2996 2996
                 break;
2997 2997
             } else {
2998 2998
                 free(exe_sections);
2999
+                EVP_MD_CTX_cleanup(&hashctx);
2999 3000
                 return CL_EFORMAT;
3000 3001
             }
3001 3002
         }
... ...
@@ -3027,6 +3014,7 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uin
3027 3027
                     break;
3028 3028
                 } else {
3029 3029
                     free(exe_sections);
3030
+                    EVP_MD_CTX_cleanup(&hashctx);
3030 3031
                     return CL_EFORMAT;
3031 3032
                 }
3032 3033
             }
... ...
@@ -3042,7 +3030,7 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uin
3042 3042
     free(exe_sections);
3043 3043
 
3044 3044
     if (flags & CL_CHECKFP_PE_FLAG_AUTHENTICODE) {
3045
-        SHA1Final(&sha1, authsha1);
3045
+        EVP_DigestFinal(&hashctx, authsha1, NULL);
3046 3046
 
3047 3047
         if(cli_debug_flag) {
3048 3048
             char shatxt[SHA1_HASH_SIZE*2+1];
... ...
@@ -3057,8 +3045,10 @@ int cli_checkfp_pe(cli_ctx *ctx, uint8_t *authsha1, stats_section_t *hashes, uin
3057 3057
 
3058 3058
         hlen -= 8;
3059 3059
 
3060
+        EVP_MD_CTX_cleanup(&hashctx);
3060 3061
         return asn1_check_mscat((struct cl_engine *)(ctx->engine), map, at + 8, hlen, authsha1);
3061 3062
     } else {
3063
+        EVP_MD_CTX_cleanup(&hashctx);
3062 3064
         return CL_VIRUS;
3063 3065
     }
3064 3066
 }
... ...
@@ -25,6 +25,10 @@
25 25
 #include <string.h>
26 26
 #include <math.h>
27 27
 
28
+#include <openssl/ssl.h>
29
+#include <openssl/err.h>
30
+#include "libclamav/crypto.h"
31
+
28 32
 #include "pe_icons.h"
29 33
 #include "others.h"
30 34
 
... ...
@@ -52,6 +52,10 @@
52 52
 #include <stdlib.h>
53 53
 #include <string.h>
54 54
 
55
+#include <openssl/ssl.h>
56
+#include <openssl/err.h>
57
+#include "libclamav/crypto.h"
58
+
55 59
 #include "cltypes.h"
56 60
 #include "rebuildpe.h"
57 61
 #include "execs.h"
... ...
@@ -34,6 +34,10 @@
34 34
 #include <string.h>
35 35
 #include <ctype.h>
36 36
 
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
37 41
 #include "clamav.h"
38 42
 #include "others.h"
39 43
 #include "phishcheck.h"
... ...
@@ -34,6 +34,10 @@
34 34
 #include <string.h>
35 35
 #include <ctype.h>
36 36
 
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
37 41
 #include "clamav.h"
38 42
 #include "others.h"
39 43
 #include "phish_whitelist.h"
... ...
@@ -34,6 +34,10 @@
34 34
 #include <string.h>
35 35
 #include <ctype.h>
36 36
 
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
37 41
 #include "clamav.h"
38 42
 #include "cltypes.h"
39 43
 #include "others.h"
... ...
@@ -45,7 +49,6 @@
45 45
 #include "iana_tld.h"
46 46
 #include "iana_cctld.h"
47 47
 #include "scanners.h"
48
-#include "sha256.h"
49 48
 #include <assert.h>
50 49
 
51 50
 #include "mpool.h"
... ...
@@ -1199,12 +1202,14 @@ static int hash_match(const struct regex_matcher *rlist, const char *host, size_
1199 1199
 	    unsigned char h[65];
1200 1200
 	    unsigned char sha256_dig[32];
1201 1201
 	    unsigned i;
1202
-	    SHA256_CTX sha256;
1202
+        EVP_MD_CTX sha256;
1203
+
1204
+        EVP_DigestInit(&sha256, EVP_sha256());
1205
+        EVP_DigestUpdate(&sha256, host, hlen);
1206
+        EVP_DigestUpdate(&sha256, path, plen);
1207
+        EVP_DigestFinal(&sha256, sha256_dig, NULL);
1208
+        EVP_MD_CTX_cleanup(&sha256);
1203 1209
 
1204
-	    sha256_init(&sha256);
1205
-	    sha256_update(&sha256, host, hlen);
1206
-	    sha256_update(&sha256, path, plen);
1207
-	    sha256_final(&sha256, sha256_dig);
1208 1210
 	    for(i=0;i<32;i++) {
1209 1211
 		h[2*i] = hexchars[sha256_dig[i]>>4];
1210 1212
 		h[2*i+1] = hexchars[sha256_dig[i]&0xf];
... ...
@@ -33,6 +33,10 @@
33 33
 #endif
34 34
 #include <zlib.h>
35 35
 
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
36 40
 #include "clamav.h"
37 41
 #include "others.h"
38 42
 #include "png.h"
... ...
@@ -32,6 +32,10 @@
32 32
 
33 33
 #include <stdlib.h>
34 34
 
35
+#include <openssl/ssl.h>
36
+#include <openssl/err.h>
37
+#include "libclamav/crypto.h"
38
+
35 39
 #include "platform.h"
36 40
 #include "cltypes.h"
37 41
 #include "others.h"
... ...
@@ -39,6 +39,10 @@
39 39
 #include <zlib.h>
40 40
 #include <errno.h>
41 41
 
42
+#include <openssl/ssl.h>
43
+#include <openssl/err.h>
44
+#include "libclamav/crypto.h"
45
+
42 46
 #include "clamav.h"
43 47
 #include "cvd.h"
44 48
 #ifdef	HAVE_STRINGS_H
... ...
@@ -56,8 +60,6 @@
56 56
 #include "readdb.h"
57 57
 #include "cltypes.h"
58 58
 #include "default.h"
59
-#include "md5.h"
60
-#include "sha256.h"
61 59
 #include "dsig.h"
62 60
 #include "asn1.h"
63 61
 
... ...
@@ -418,7 +420,8 @@ char *cli_dbgets(char *buff, unsigned int size, FILE *fs, struct cli_dbio *dbio)
418 418
 		dbio->bufpt = dbio->buf;
419 419
 		dbio->size -= bread;
420 420
 		dbio->bread += bread;
421
-		sha256_update(&dbio->sha256ctx, dbio->readpt, bread);
421
+        if (dbio->hashctx)
422
+            EVP_DigestUpdate(dbio->hashctx, dbio->readpt, bread);
422 423
 	    }
423 424
 	    if(dbio->chkonly && dbio->bufpt) {
424 425
 		dbio->bufpt = NULL;
... ...
@@ -475,30 +478,29 @@ char *cli_dbgets(char *buff, unsigned int size, FILE *fs, struct cli_dbio *dbio)
475 475
 	bs = strlen(buff);
476 476
 	dbio->size -= bs;
477 477
 	dbio->bread += bs;
478
-	sha256_update(&dbio->sha256ctx, buff, bs);
478
+    if (dbio->hashctx)
479
+        EVP_DigestUpdate(dbio->hashctx, buff, bs);
479 480
 	return pt;
480 481
     }
481 482
 }
482 483
 
483 484
 static int cli_chkign(const struct cli_matcher *ignored, const char *signame, const char *entry)
484 485
 {
485
-	const char *md5_expected = NULL;
486
-        cli_md5_ctx md5ctx;
487
-        unsigned char digest[16];
486
+    const char *md5_expected = NULL;
487
+    unsigned char digest[16];
488 488
 
489 489
     if(!ignored || !signame || !entry)
490
-	return 0;
490
+        return 0;
491 491
 
492 492
     if(cli_bm_scanbuff((const unsigned char *) signame, strlen(signame), &md5_expected, NULL, ignored, 0, NULL, NULL,NULL) == CL_VIRUS) {
493
-	if(md5_expected) {
494
-	    cli_md5_init(&md5ctx);
495
-            cli_md5_update(&md5ctx, entry, strlen(entry));
496
-	    cli_md5_final(digest, &md5ctx);
497
-	    if(memcmp(digest, (const unsigned char *) md5_expected, 16))
498
-		return 0;
499
-	}
500
-	cli_dbgmsg("Ignoring signature %s\n", signame);
501
-	return 1;
493
+        if(md5_expected) {
494
+            cl_hash_data("md5", entry, strlen(entry), digest, NULL);
495
+            if(memcmp(digest, (const unsigned char *) md5_expected, 16))
496
+                return 0;
497
+        }
498
+
499
+        cli_dbgmsg("Ignoring signature %s\n", signame);
500
+        return 1;
502 501
     }
503 502
 
504 503
     return 0;
... ...
@@ -1731,19 +1733,26 @@ static int cli_loadinfo(FILE *fs, struct cl_engine *engine, unsigned int options
1731 1731
 	unsigned char hash[32];
1732 1732
         struct cli_dbinfo *last = NULL, *new;
1733 1733
 	int ret = CL_SUCCESS, dsig = 0;
1734
-	SHA256_CTX ctx;
1734
+    EVP_MD_CTX *ctx;
1735 1735
 
1736 1736
 
1737 1737
     if(!dbio) {
1738 1738
 	cli_errmsg("cli_loadinfo: .info files can only be loaded from within database container files\n");
1739 1739
 	return CL_EMALFDB;
1740 1740
     }
1741
-    sha256_init(&ctx);
1741
+
1742
+    ctx = EVP_MD_CTX_create();
1743
+    if (!(ctx))
1744
+        return CL_EMALFDB;
1745
+
1746
+    EVP_DigestInit(ctx, EVP_sha256());
1747
+
1742 1748
     while(cli_dbgets(buffer, FILEBUFF, fs, dbio)) {
1743 1749
 	line++;
1744 1750
 	if(!(options & CL_DB_UNSIGNED) && !strncmp(buffer, "DSIG:", 5)) {
1745 1751
 	    dsig = 1;
1746
-	    sha256_final(&ctx, hash);
1752
+	    EVP_DigestFinal(ctx, hash, NULL);
1753
+        EVP_MD_CTX_destroy(ctx);
1747 1754
 	    if(cli_versig2(hash, buffer + 5, INFO_NSTR, INFO_ESTR) != CL_SUCCESS) {
1748 1755
 		cli_errmsg("cli_loadinfo: Incorrect digital signature\n");
1749 1756
 		ret = CL_EMALFDB;
... ...
@@ -1761,7 +1770,7 @@ static int cli_loadinfo(FILE *fs, struct cl_engine *engine, unsigned int options
1761 1761
             buffer[len + 1] = 0;
1762 1762
         }
1763 1763
     }
1764
-	sha256_update(&ctx, buffer, strlen(buffer));
1764
+	EVP_DigestUpdate(ctx, buffer, strlen(buffer));
1765 1765
 	cli_chomp(buffer);
1766 1766
 	if(!strncmp("ClamAV-VDB:", buffer, 11)) {
1767 1767
 	    if(engine->dbinfo) { /* shouldn't be initialized at this point */
... ...
@@ -40,6 +40,10 @@
40 40
 
41 41
 #include <string.h>
42 42
 
43
+#include <openssl/ssl.h>
44
+#include <openssl/err.h>
45
+#include "libclamav/crypto.h"
46
+
43 47
 #include "rebuildpe.h"
44 48
 #include "others.h"
45 49
 
... ...
@@ -41,6 +41,11 @@
41 41
 #include <ctype.h>
42 42
 #include <limits.h>
43 43
 #include <stdlib.h>
44
+
45
+#include <openssl/ssl.h>
46
+#include <openssl/err.h>
47
+#include "libclamav/crypto.h"
48
+
44 49
 #include "others.h"
45 50
 #include "regex.h"
46 51
 
... ...
@@ -41,6 +41,11 @@
41 41
 #include <ctype.h>
42 42
 #include <limits.h>
43 43
 #include <stdlib.h>
44
+
45
+#include <openssl/ssl.h>
46
+#include <openssl/err.h>
47
+#include "libclamav/crypto.h"
48
+
44 49
 #include "others.h"
45 50
 #include "regex.h"
46 51
 
... ...
@@ -48,6 +48,11 @@
48 48
 #include <string.h>
49 49
 #include <limits.h>
50 50
 #include <ctype.h>
51
+
52
+#include <openssl/ssl.h>
53
+#include <openssl/err.h>
54
+#include "libclamav/crypto.h"
55
+
51 56
 #include "others.h"
52 57
 #include "regex.h"
53 58
 
... ...
@@ -38,6 +38,11 @@
38 38
 #include <sys/types.h>
39 39
 #include <stdio.h>
40 40
 #include <stdlib.h>
41
+
42
+#include <openssl/ssl.h>
43
+#include <openssl/err.h>
44
+#include "libclamav/crypto.h"
45
+
41 46
 #include "others.h"
42 47
 #include "regex.h"
43 48
 
... ...
@@ -40,10 +40,12 @@
40 40
 #include <sys/types.h>
41 41
 #include <assert.h>
42 42
 
43
+#include <openssl/ssl.h>
44
+#include <openssl/err.h>
45
+#include "libclamav/crypto.h"
43 46
 
44 47
 #include "regex/regex.h"
45 48
 
46
-
47 49
 #include "clamav.h"
48 50
 #include "others.h"
49 51
 #include "regex_list.h"
... ...
@@ -28,6 +28,10 @@
28 28
 #include <string.h>
29 29
 #include <assert.h>
30 30
 
31
+#include <openssl/ssl.h>
32
+#include <openssl/err.h>
33
+#include "libclamav/crypto.h"
34
+
31 35
 #include "others.h"
32 36
 #include "jsparse/textbuf.h"
33 37
 #include "regex_suffix.h"
... ...
@@ -33,6 +33,10 @@
33 33
 #include <unistd.h>
34 34
 #endif
35 35
 
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
36 40
 #include "others.h"
37 41
 #include "rtf.h"
38 42
 #include "clamav.h"
... ...
@@ -43,6 +43,10 @@
43 43
 #include <sys/times.h>
44 44
 #endif
45 45
 
46
+#include <openssl/ssl.h>
47
+#include <openssl/err.h>
48
+#include "libclamav/crypto.h"
49
+
46 50
 #define DCONF_ARCH  ctx->dconf->archive
47 51
 #define DCONF_DOC   ctx->dconf->doc
48 52
 #define DCONF_MAIL  ctx->dconf->mail
... ...
@@ -111,6 +115,8 @@
111 111
 #include <stddef.h>
112 112
 #endif
113 113
 
114
+#include <string.h>
115
+
114 116
 static int cli_scanfile(const char *filename, cli_ctx *ctx);
115 117
 
116 118
 static int cli_scandir(const char *dirname, cli_ctx *ctx)
117 119
deleted file mode 100644
... ...
@@ -1,626 +0,0 @@
1
-/*-
2
- * Copyright (c) 2001-2003 Allan Saddi <allan@saddi.com>
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions
7
- * are met:
8
- * 1. Redistributions of source code must retain the above copyright
9
- *    notice, this list of conditions and the following disclaimer.
10
- * 2. Redistributions in binary form must reproduce the above copyright
11
- *    notice, this list of conditions and the following disclaimer in the
12
- *    documentation and/or other materials provided with the distribution.
13
- *
14
- * THIS SOFTWARE IS PROVIDED BY ALLAN SADDI AND HIS CONTRIBUTORS ``AS IS''
15
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
- * ARE DISCLAIMED.  IN NO EVENT SHALL ALLAN SADDI OR HIS CONTRIBUTORS BE
18
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
- * POSSIBILITY OF SUCH DAMAGE.
25
- *
26
- * $Id: sha1.c 680 2003-07-25 21:57:38Z asaddi $
27
- */
28
-
29
-/*
30
- * Define WORDS_BIGENDIAN if compiling on a big-endian architecture.
31
- *
32
- * Define SHA1_TEST to test the implementation using the NIST's
33
- * sample messages. The output should be:
34
- *
35
- *   a9993e36 4706816a ba3e2571 7850c26c 9cd0d89d
36
- *   84983e44 1c3bd26e baae4aa1 f95129e5 e54670f1
37
- *   34aa973c d4c4daa4 f61eeb2b dbad2731 6534016f
38
- */
39
-
40
-#ifdef HAVE_CONFIG_H
41
-#include "clamav-config.h"
42
-#endif /* HAVE_CONFIG_H */
43
-
44
-#if HAVE_INTTYPES_H
45
-# include <inttypes.h>
46
-#else
47
-# if HAVE_STDINT_H
48
-#  include <stdint.h>
49
-# endif
50
-#endif
51
-
52
-#include <string.h>
53
-
54
-#include "sha1.h"
55
-
56
-#ifndef lint
57
-static const char rcsid[] =
58
-	"$Id: sha1.c 680 2003-07-25 21:57:38Z asaddi $";
59
-#endif /* !lint */
60
-
61
-#define ROTL(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
62
-#define ROTR(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
63
-
64
-#define F_0_19(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
65
-#define F_20_39(x, y, z) ((x) ^ (y) ^ (z))
66
-#define F_40_59(x, y, z) (((x) & ((y) | (z))) | ((y) & (z)))
67
-#define F_60_79(x, y, z) ((x) ^ (y) ^ (z))
68
-
69
-#define DO_ROUND(F, K) { \
70
-  temp = ROTL(a, 5) + F(b, c, d) + e + *(W++) + K; \
71
-  e = d; \
72
-  d = c; \
73
-  c = ROTL(b, 30); \
74
-  b = a; \
75
-  a = temp; \
76
-}
77
-
78
-#define K_0_19 0x5a827999L
79
-#define K_20_39 0x6ed9eba1L
80
-#define K_40_59 0x8f1bbcdcL
81
-#define K_60_79 0xca62c1d6L
82
-
83
-#ifndef RUNTIME_ENDIAN
84
-
85
-#if WORDS_BIGENDIAN == 1
86
-
87
-#define BYTESWAP(x) (x)
88
-#define BYTESWAP64(x) (x)
89
-
90
-#else /* WORDS_BIGENDIAN */
91
-
92
-#define BYTESWAP(x) ((ROTR((x), 8) & 0xff00ff00L) | \
93
-		     (ROTL((x), 8) & 0x00ff00ffL))
94
-#define BYTESWAP64(x) _byteswap64(x)
95
-
96
-static inline uint64_t _byteswap64(uint64_t x)
97
-{
98
-  uint32_t a = x >> 32;
99
-  uint32_t b = (uint32_t) x;
100
-  return ((uint64_t) BYTESWAP(b) << 32) | (uint64_t) BYTESWAP(a);
101
-}
102
-
103
-#endif /* WORDS_BIGENDIAN */
104
-
105
-#else /* !RUNTIME_ENDIAN */
106
-
107
-#define BYTESWAP(x) _byteswap(sc->littleEndian, x)
108
-#define BYTESWAP64(x) _byteswap64(sc->littleEndian, x)
109
-
110
-#define _BYTESWAP(x) ((ROTR((x), 8) & 0xff00ff00L) | \
111
-		      (ROTL((x), 8) & 0x00ff00ffL))
112
-#define _BYTESWAP64(x) __byteswap64(x)
113
-
114
-static inline uint64_t __byteswap64(uint64_t x)
115
-{
116
-  uint32_t a = x >> 32;
117
-  uint32_t b = (uint32_t) x;
118
-  return ((uint64_t) _BYTESWAP(b) << 32) | (uint64_t) _BYTESWAP(a);
119
-}
120
-
121
-static inline uint32_t _byteswap(int littleEndian, uint32_t x)
122
-{
123
-  if (!littleEndian)
124
-    return x;
125
-  else
126
-    return _BYTESWAP(x);
127
-}
128
-
129
-static inline uint64_t _byteswap64(int littleEndian, uint64_t x)
130
-{
131
-  if (!littleEndian)
132
-    return x;
133
-  else
134
-    return _BYTESWAP64(x);
135
-}
136
-
137
-static inline void setEndian(int *littleEndianp)
138
-{
139
-  union {
140
-    uint32_t w;
141
-    uint8_t b[4];
142
-  } endian;
143
-
144
-  endian.w = 1L;
145
-  *littleEndianp = endian.b[0] != 0;
146
-}
147
-
148
-#endif /* !RUNTIME_ENDIAN */
149
-
150
-static const uint8_t padding[64] = {
151
-  0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
152
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
153
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
154
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
155
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
156
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
157
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
158
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
159
-};
160
-
161
-void
162
-SHA1Init (SHA1Context *sc)
163
-{
164
-#ifdef RUNTIME_ENDIAN
165
-  setEndian (&sc->littleEndian);
166
-#endif /* RUNTIME_ENDIAN */
167
-
168
-  sc->totalLength = 0LL;
169
-  sc->hash[0] = 0x67452301L;
170
-  sc->hash[1] = 0xefcdab89L;
171
-  sc->hash[2] = 0x98badcfeL;
172
-  sc->hash[3] = 0x10325476L;
173
-  sc->hash[4] = 0xc3d2e1f0L;
174
-  sc->bufferLength = 0L;
175
-}
176
-
177
-static void
178
-burnStack (int size)
179
-{
180
-  char buf[128];
181
-
182
-  memset (buf, 0, sizeof (buf));
183
-  size -= sizeof (buf);
184
-  if (size > 0)
185
-    burnStack (size);
186
-}
187
-
188
-static void
189
-SHA1Guts (SHA1Context *sc, const uint32_t *cbuf)
190
-{
191
-  uint32_t buf[80];
192
-  uint32_t *W, *W3, *W8, *W14, *W16;
193
-  uint32_t a, b, c, d, e, temp;
194
-  int i;
195
-
196
-  W = buf;
197
-
198
-  for (i = 15; i >= 0; i--) {
199
-    *(W++) = BYTESWAP(*cbuf);
200
-    cbuf++;
201
-  }
202
-
203
-  W16 = &buf[0];
204
-  W14 = &buf[2];
205
-  W8 = &buf[8];
206
-  W3 = &buf[13];
207
-
208
-  for (i = 63; i >= 0; i--) {
209
-    *W = *(W3++) ^ *(W8++) ^ *(W14++) ^ *(W16++);
210
-    *W = ROTL(*W, 1);
211
-    W++;
212
-  }
213
-
214
-  a = sc->hash[0];
215
-  b = sc->hash[1];
216
-  c = sc->hash[2];
217
-  d = sc->hash[3];
218
-  e = sc->hash[4];
219
-
220
-  W = buf;
221
-
222
-#ifndef SHA1_UNROLL
223
-#define SHA1_UNROLL 20
224
-#endif /* !SHA1_UNROLL */
225
-
226
-#if SHA1_UNROLL == 1
227
-  for (i = 19; i >= 0; i--)
228
-    DO_ROUND(F_0_19, K_0_19);
229
-
230
-  for (i = 19; i >= 0; i--)
231
-    DO_ROUND(F_20_39, K_20_39);
232
-
233
-  for (i = 19; i >= 0; i--)
234
-    DO_ROUND(F_40_59, K_40_59);
235
-
236
-  for (i = 19; i >= 0; i--)
237
-    DO_ROUND(F_60_79, K_60_79);
238
-#elif SHA1_UNROLL == 2
239
-  for (i = 9; i >= 0; i--) {
240
-    DO_ROUND(F_0_19, K_0_19);
241
-    DO_ROUND(F_0_19, K_0_19);
242
-  }
243
-
244
-  for (i = 9; i >= 0; i--) {
245
-    DO_ROUND(F_20_39, K_20_39);
246
-    DO_ROUND(F_20_39, K_20_39);
247
-  }
248
-
249
-  for (i = 9; i >= 0; i--) {
250
-    DO_ROUND(F_40_59, K_40_59);
251
-    DO_ROUND(F_40_59, K_40_59);
252
-  }
253
-
254
-  for (i = 9; i >= 0; i--) {
255
-    DO_ROUND(F_60_79, K_60_79);
256
-    DO_ROUND(F_60_79, K_60_79);
257
-  }
258
-#elif SHA1_UNROLL == 4
259
-  for (i = 4; i >= 0; i--) {
260
-    DO_ROUND(F_0_19, K_0_19);
261
-    DO_ROUND(F_0_19, K_0_19);
262
-    DO_ROUND(F_0_19, K_0_19);
263
-    DO_ROUND(F_0_19, K_0_19);
264
-  }
265
-
266
-  for (i = 4; i >= 0; i--) {
267
-    DO_ROUND(F_20_39, K_20_39);
268
-    DO_ROUND(F_20_39, K_20_39);
269
-    DO_ROUND(F_20_39, K_20_39);
270
-    DO_ROUND(F_20_39, K_20_39);
271
-  }
272
-
273
-  for (i = 4; i >= 0; i--) {
274
-    DO_ROUND(F_40_59, K_40_59);
275
-    DO_ROUND(F_40_59, K_40_59);
276
-    DO_ROUND(F_40_59, K_40_59);
277
-    DO_ROUND(F_40_59, K_40_59);
278
-  }
279
-
280
-  for (i = 4; i >= 0; i--) {
281
-    DO_ROUND(F_60_79, K_60_79);
282
-    DO_ROUND(F_60_79, K_60_79);
283
-    DO_ROUND(F_60_79, K_60_79);
284
-    DO_ROUND(F_60_79, K_60_79);
285
-  }
286
-#elif SHA1_UNROLL == 5
287
-  for (i = 3; i >= 0; i--) {
288
-    DO_ROUND(F_0_19, K_0_19);
289
-    DO_ROUND(F_0_19, K_0_19);
290
-    DO_ROUND(F_0_19, K_0_19);
291
-    DO_ROUND(F_0_19, K_0_19);
292
-    DO_ROUND(F_0_19, K_0_19);
293
-  }
294
-
295
-  for (i = 3; i >= 0; i--) {
296
-    DO_ROUND(F_20_39, K_20_39);
297
-    DO_ROUND(F_20_39, K_20_39);
298
-    DO_ROUND(F_20_39, K_20_39);
299
-    DO_ROUND(F_20_39, K_20_39);
300
-    DO_ROUND(F_20_39, K_20_39);
301
-  }
302
-
303
-  for (i = 3; i >= 0; i--) {
304
-    DO_ROUND(F_40_59, K_40_59);
305
-    DO_ROUND(F_40_59, K_40_59);
306
-    DO_ROUND(F_40_59, K_40_59);
307
-    DO_ROUND(F_40_59, K_40_59);
308
-    DO_ROUND(F_40_59, K_40_59);
309
-  }
310
-
311
-  for (i = 3; i >= 0; i--) {
312
-    DO_ROUND(F_60_79, K_60_79);
313
-    DO_ROUND(F_60_79, K_60_79);
314
-    DO_ROUND(F_60_79, K_60_79);
315
-    DO_ROUND(F_60_79, K_60_79);
316
-    DO_ROUND(F_60_79, K_60_79);
317
-  }
318
-#elif SHA1_UNROLL == 10
319
-  for (i = 1; i >= 0; i--) {
320
-    DO_ROUND(F_0_19, K_0_19);
321
-    DO_ROUND(F_0_19, K_0_19);
322
-    DO_ROUND(F_0_19, K_0_19);
323
-    DO_ROUND(F_0_19, K_0_19);
324
-    DO_ROUND(F_0_19, K_0_19);
325
-    DO_ROUND(F_0_19, K_0_19);
326
-    DO_ROUND(F_0_19, K_0_19);
327
-    DO_ROUND(F_0_19, K_0_19);
328
-    DO_ROUND(F_0_19, K_0_19);
329
-    DO_ROUND(F_0_19, K_0_19);
330
-  }
331
-
332
-  for (i = 1; i >= 0; i--) {
333
-    DO_ROUND(F_20_39, K_20_39);
334
-    DO_ROUND(F_20_39, K_20_39);
335
-    DO_ROUND(F_20_39, K_20_39);
336
-    DO_ROUND(F_20_39, K_20_39);
337
-    DO_ROUND(F_20_39, K_20_39);
338
-    DO_ROUND(F_20_39, K_20_39);
339
-    DO_ROUND(F_20_39, K_20_39);
340
-    DO_ROUND(F_20_39, K_20_39);
341
-    DO_ROUND(F_20_39, K_20_39);
342
-    DO_ROUND(F_20_39, K_20_39);
343
-  }
344
-
345
-  for (i = 1; i >= 0; i--) {
346
-    DO_ROUND(F_40_59, K_40_59);
347
-    DO_ROUND(F_40_59, K_40_59);
348
-    DO_ROUND(F_40_59, K_40_59);
349
-    DO_ROUND(F_40_59, K_40_59);
350
-    DO_ROUND(F_40_59, K_40_59);
351
-    DO_ROUND(F_40_59, K_40_59);
352
-    DO_ROUND(F_40_59, K_40_59);
353
-    DO_ROUND(F_40_59, K_40_59);
354
-    DO_ROUND(F_40_59, K_40_59);
355
-    DO_ROUND(F_40_59, K_40_59);
356
-  }
357
-
358
-  for (i = 1; i >= 0; i--) {
359
-    DO_ROUND(F_60_79, K_60_79);
360
-    DO_ROUND(F_60_79, K_60_79);
361
-    DO_ROUND(F_60_79, K_60_79);
362
-    DO_ROUND(F_60_79, K_60_79);
363
-    DO_ROUND(F_60_79, K_60_79);
364
-    DO_ROUND(F_60_79, K_60_79);
365
-    DO_ROUND(F_60_79, K_60_79);
366
-    DO_ROUND(F_60_79, K_60_79);
367
-    DO_ROUND(F_60_79, K_60_79);
368
-    DO_ROUND(F_60_79, K_60_79);
369
-  }
370
-#elif SHA1_UNROLL == 20
371
-  DO_ROUND(F_0_19, K_0_19);
372
-  DO_ROUND(F_0_19, K_0_19);
373
-  DO_ROUND(F_0_19, K_0_19);
374
-  DO_ROUND(F_0_19, K_0_19);
375
-  DO_ROUND(F_0_19, K_0_19);
376
-  DO_ROUND(F_0_19, K_0_19);
377
-  DO_ROUND(F_0_19, K_0_19);
378
-  DO_ROUND(F_0_19, K_0_19);
379
-  DO_ROUND(F_0_19, K_0_19);
380
-  DO_ROUND(F_0_19, K_0_19);
381
-  DO_ROUND(F_0_19, K_0_19);
382
-  DO_ROUND(F_0_19, K_0_19);
383
-  DO_ROUND(F_0_19, K_0_19);
384
-  DO_ROUND(F_0_19, K_0_19);
385
-  DO_ROUND(F_0_19, K_0_19);
386
-  DO_ROUND(F_0_19, K_0_19);
387
-  DO_ROUND(F_0_19, K_0_19);
388
-  DO_ROUND(F_0_19, K_0_19);
389
-  DO_ROUND(F_0_19, K_0_19);
390
-  DO_ROUND(F_0_19, K_0_19);
391
-
392
-  DO_ROUND(F_20_39, K_20_39);
393
-  DO_ROUND(F_20_39, K_20_39);
394
-  DO_ROUND(F_20_39, K_20_39);
395
-  DO_ROUND(F_20_39, K_20_39);
396
-  DO_ROUND(F_20_39, K_20_39);
397
-  DO_ROUND(F_20_39, K_20_39);
398
-  DO_ROUND(F_20_39, K_20_39);
399
-  DO_ROUND(F_20_39, K_20_39);
400
-  DO_ROUND(F_20_39, K_20_39);
401
-  DO_ROUND(F_20_39, K_20_39);
402
-  DO_ROUND(F_20_39, K_20_39);
403
-  DO_ROUND(F_20_39, K_20_39);
404
-  DO_ROUND(F_20_39, K_20_39);
405
-  DO_ROUND(F_20_39, K_20_39);
406
-  DO_ROUND(F_20_39, K_20_39);
407
-  DO_ROUND(F_20_39, K_20_39);
408
-  DO_ROUND(F_20_39, K_20_39);
409
-  DO_ROUND(F_20_39, K_20_39);
410
-  DO_ROUND(F_20_39, K_20_39);
411
-  DO_ROUND(F_20_39, K_20_39);
412
-
413
-  DO_ROUND(F_40_59, K_40_59);
414
-  DO_ROUND(F_40_59, K_40_59);
415
-  DO_ROUND(F_40_59, K_40_59);
416
-  DO_ROUND(F_40_59, K_40_59);
417
-  DO_ROUND(F_40_59, K_40_59);
418
-  DO_ROUND(F_40_59, K_40_59);
419
-  DO_ROUND(F_40_59, K_40_59);
420
-  DO_ROUND(F_40_59, K_40_59);
421
-  DO_ROUND(F_40_59, K_40_59);
422
-  DO_ROUND(F_40_59, K_40_59);
423
-  DO_ROUND(F_40_59, K_40_59);
424
-  DO_ROUND(F_40_59, K_40_59);
425
-  DO_ROUND(F_40_59, K_40_59);
426
-  DO_ROUND(F_40_59, K_40_59);
427
-  DO_ROUND(F_40_59, K_40_59);
428
-  DO_ROUND(F_40_59, K_40_59);
429
-  DO_ROUND(F_40_59, K_40_59);
430
-  DO_ROUND(F_40_59, K_40_59);
431
-  DO_ROUND(F_40_59, K_40_59);
432
-  DO_ROUND(F_40_59, K_40_59);
433
-
434
-  DO_ROUND(F_60_79, K_60_79);
435
-  DO_ROUND(F_60_79, K_60_79);
436
-  DO_ROUND(F_60_79, K_60_79);
437
-  DO_ROUND(F_60_79, K_60_79);
438
-  DO_ROUND(F_60_79, K_60_79);
439
-  DO_ROUND(F_60_79, K_60_79);
440
-  DO_ROUND(F_60_79, K_60_79);
441
-  DO_ROUND(F_60_79, K_60_79);
442
-  DO_ROUND(F_60_79, K_60_79);
443
-  DO_ROUND(F_60_79, K_60_79);
444
-  DO_ROUND(F_60_79, K_60_79);
445
-  DO_ROUND(F_60_79, K_60_79);
446
-  DO_ROUND(F_60_79, K_60_79);
447
-  DO_ROUND(F_60_79, K_60_79);
448
-  DO_ROUND(F_60_79, K_60_79);
449
-  DO_ROUND(F_60_79, K_60_79);
450
-  DO_ROUND(F_60_79, K_60_79);
451
-  DO_ROUND(F_60_79, K_60_79);
452
-  DO_ROUND(F_60_79, K_60_79);
453
-  DO_ROUND(F_60_79, K_60_79);
454
-#else /* SHA1_UNROLL */
455
-#error SHA1_UNROLL must be 1, 2, 4, 5, 10 or 20!
456
-#endif
457
-
458
-  sc->hash[0] += a;
459
-  sc->hash[1] += b;
460
-  sc->hash[2] += c;
461
-  sc->hash[3] += d;
462
-  sc->hash[4] += e;
463
-}
464
-
465
-void
466
-SHA1Update (SHA1Context *sc, const void *vdata, uint32_t len)
467
-{
468
-  const uint8_t *data = vdata;
469
-  uint32_t bufferBytesLeft;
470
-  uint32_t bytesToCopy;
471
-  int needBurn = 0;
472
-
473
-#ifdef SHA1_FAST_COPY
474
-  if (sc->bufferLength) {
475
-    bufferBytesLeft = 64L - sc->bufferLength;
476
-
477
-    bytesToCopy = bufferBytesLeft;
478
-    if (bytesToCopy > len)
479
-      bytesToCopy = len;
480
-
481
-    memcpy (&sc->buffer.bytes[sc->bufferLength], data, bytesToCopy);
482
-
483
-    sc->totalLength += bytesToCopy * 8L;
484
-
485
-    sc->bufferLength += bytesToCopy;
486
-    data += bytesToCopy;
487
-    len -= bytesToCopy;
488
-
489
-    if (sc->bufferLength == 64L) {
490
-      SHA1Guts (sc, sc->buffer.words);
491
-      needBurn = 1;
492
-      sc->bufferLength = 0L;
493
-    }
494
-  }
495
-
496
-  while (len > 63) {
497
-    sc->totalLength += 512L;
498
-
499
-    SHA1Guts (sc, data);
500
-    needBurn = 1;
501
-
502
-    data += 64L;
503
-    len -= 64L;
504
-  }
505
-
506
-  if (len) {
507
-    memcpy (&sc->buffer.bytes[sc->bufferLength], data, len);
508
-
509
-    sc->totalLength += len * 8L;
510
-
511
-    sc->bufferLength += len;
512
-  }
513
-#else /* SHA1_FAST_COPY */
514
-  while (len) {
515
-    bufferBytesLeft = 64L - sc->bufferLength;
516
-
517
-    bytesToCopy = bufferBytesLeft;
518
-    if (bytesToCopy > len)
519
-      bytesToCopy = len;
520
-
521
-    memcpy (&sc->buffer.bytes[sc->bufferLength], data, bytesToCopy);
522
-
523
-    sc->totalLength += bytesToCopy * 8L;
524
-
525
-    sc->bufferLength += bytesToCopy;
526
-    data += bytesToCopy;
527
-    len -= bytesToCopy;
528
-
529
-    if (sc->bufferLength == 64L) {
530
-      SHA1Guts (sc, sc->buffer.words);
531
-      needBurn = 1;
532
-      sc->bufferLength = 0L;
533
-    }
534
-  }
535
-#endif /* SHA1_FAST_COPY */
536
-
537
-  if (needBurn)
538
-    burnStack (sizeof (uint32_t[86]) + sizeof (uint32_t *[5]) + sizeof (int));
539
-}
540
-
541
-void
542
-SHA1Final (SHA1Context *sc, uint8_t hash[SHA1_HASH_SIZE])
543
-{
544
-  uint32_t bytesToPad;
545
-  uint64_t lengthPad;
546
-  int i;
547
-
548
-  bytesToPad = 120L - sc->bufferLength;
549
-  if (bytesToPad > 64L)
550
-    bytesToPad -= 64L;
551
-
552
-  lengthPad = BYTESWAP64(sc->totalLength);
553
-
554
-  SHA1Update (sc, padding, bytesToPad);
555
-  SHA1Update (sc, &lengthPad, 8L);
556
-
557
-  if (hash) {
558
-    for (i = 0; i < SHA1_HASH_WORDS; i++) {
559
-#ifdef SHA1_FAST_COPY
560
-      *((uint32_t *) hash) = BYTESWAP(sc->hash[i]);
561
-#else /* SHA1_FAST_COPY */
562
-      hash[0] = (uint8_t) (sc->hash[i] >> 24);
563
-      hash[1] = (uint8_t) (sc->hash[i] >> 16);
564
-      hash[2] = (uint8_t) (sc->hash[i] >> 8);
565
-      hash[3] = (uint8_t) sc->hash[i];
566
-#endif /* SHA1_FAST_COPY */
567
-      hash += 4;
568
-    }
569
-  }
570
-}
571
-
572
-#ifdef SHA1_TEST
573
-
574
-#include <stdio.h>
575
-#include <stdlib.h>
576
-#include <string.h>
577
-
578
-int
579
-main (int argc, char *argv[])
580
-{
581
-  SHA1Context foo;
582
-  uint8_t hash[SHA1_HASH_SIZE];
583
-  char buf[1000];
584
-  int i;
585
-
586
-  SHA1Init (&foo);
587
-  SHA1Update (&foo, "abc", 3);
588
-  SHA1Final (&foo, hash);
589
-
590
-  for (i = 0; i < SHA1_HASH_SIZE;) {
591
-    printf ("%02x", hash[i++]);
592
-    if (!(i % 4))
593
-      printf (" ");
594
-  }
595
-  printf ("\n");
596
-
597
-  SHA1Init (&foo);
598
-  SHA1Update (&foo,
599
-		"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
600
-		56);
601
-  SHA1Final (&foo, hash);
602
-
603
-  for (i = 0; i < SHA1_HASH_SIZE;) {
604
-    printf ("%02x", hash[i++]);
605
-    if (!(i % 4))
606
-      printf (" ");
607
-  }
608
-  printf ("\n");
609
-
610
-  SHA1Init (&foo);
611
-  memset (buf, 'a', sizeof (buf));
612
-  for (i = 0; i < 1000; i++)
613
-    SHA1Update (&foo, buf, sizeof (buf));
614
-  SHA1Final (&foo, hash);
615
-
616
-  for (i = 0; i < SHA1_HASH_SIZE;) {
617
-    printf ("%02x", hash[i++]);
618
-    if (!(i % 4))
619
-      printf (" ");
620
-  }
621
-  printf ("\n");
622
-
623
-  exit (0);
624
-}
625
-
626
-#endif /* SHA1_TEST */
627 1
deleted file mode 100644
... ...
@@ -1,66 +0,0 @@
1
-/*-
2
- * Copyright (c) 2001-2003 Allan Saddi <allan@saddi.com>
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions
7
- * are met:
8
- * 1. Redistributions of source code must retain the above copyright
9
- *    notice, this list of conditions and the following disclaimer.
10
- * 2. Redistributions in binary form must reproduce the above copyright
11
- *    notice, this list of conditions and the following disclaimer in the
12
- *    documentation and/or other materials provided with the distribution.
13
- *
14
- * THIS SOFTWARE IS PROVIDED BY ALLAN SADDI AND HIS CONTRIBUTORS ``AS IS''
15
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
- * ARE DISCLAIMED.  IN NO EVENT SHALL ALLAN SADDI OR HIS CONTRIBUTORS BE
18
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
- * POSSIBILITY OF SUCH DAMAGE.
25
- *
26
- * $Id: sha1.h 347 2003-02-23 22:11:49Z asaddi $
27
- */
28
-
29
-#ifndef _SHA1_H
30
-#define _SHA1_H
31
-
32
-#include "cltypes.h"
33
-
34
-#define SHA1_HASH_SIZE 20
35
-
36
-/* Hash size in 32-bit words */
37
-#define SHA1_HASH_WORDS 5
38
-
39
-struct _SHA1Context {
40
-  uint64_t totalLength;
41
-  uint32_t hash[SHA1_HASH_WORDS];
42
-  uint32_t bufferLength;
43
-  union {
44
-    uint32_t words[16];
45
-    uint8_t bytes[64];
46
-  } buffer;
47
-#ifdef RUNTIME_ENDIAN
48
-  int littleEndian;
49
-#endif /* RUNTIME_ENDIAN */
50
-};
51
-
52
-typedef struct _SHA1Context SHA1Context;
53
-
54
-#ifdef __cplusplus
55
-extern "C" {
56
-#endif
57
-
58
-void SHA1Init (SHA1Context *sc);
59
-void SHA1Update (SHA1Context *sc, const void *data, uint32_t len);
60
-void SHA1Final (SHA1Context *sc, uint8_t hash[SHA1_HASH_SIZE]);
61
-
62
-#ifdef __cplusplus
63
-}
64
-#endif
65
-
66
-#endif /* _SHA1_H */
67 1
deleted file mode 100644
... ...
@@ -1,480 +0,0 @@
1
-/*-
2
- * Copyright (c) 2001-2003 Allan Saddi <allan@saddi.com>
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions
7
- * are met:
8
- * 1. Redistributions of source code must retain the above copyright
9
- *    notice, this list of conditions and the following disclaimer.
10
- * 2. Redistributions in binary form must reproduce the above copyright
11
- *    notice, this list of conditions and the following disclaimer in the
12
- *    documentation and/or other materials provided with the distribution.
13
- *
14
- * THIS SOFTWARE IS PROVIDED BY ALLAN SADDI AND HIS CONTRIBUTORS ``AS IS''
15
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
- * ARE DISCLAIMED.  IN NO EVENT SHALL ALLAN SADDI OR HIS CONTRIBUTORS BE
18
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
- * POSSIBILITY OF SUCH DAMAGE.
25
- *
26
- * $Id: sha256.c 680 2003-07-25 21:57:49Z asaddi $
27
- */
28
-
29
-/*
30
- * Define WORDS_BIGENDIAN if compiling on a big-endian architecture.
31
- *
32
- * Define SHA256_TEST to test the implementation using the NIST's
33
- * sample messages. The output should be:
34
- *
35
- *   ba7816bf 8f01cfea 414140de 5dae2223 b00361a3 96177a9c b410ff61 f20015ad
36
- *   248d6a61 d20638b8 e5c02693 0c3e6039 a33ce459 64ff2167 f6ecedd4 19db06c1
37
- *   cdc76e5c 9914fb92 81a1c7e2 84d73e67 f1809a48 a497200e 046d39cc c7112cd0
38
- */
39
-
40
-#ifdef HAVE_CONFIG_H
41
-#include "clamav-config.h"
42
-#endif /* HAVE_CONFIG_H */
43
-
44
-#if HAVE_INTTYPES_H
45
-# include <inttypes.h>
46
-#else
47
-# if HAVE_STDINT_H
48
-#  include <stdint.h>
49
-# endif
50
-#endif
51
-
52
-#include <string.h>
53
-
54
-#include "sha256.h"
55
-
56
-#ifndef lint
57
-static const char rcsid[] =
58
-	"$Id: sha256.c 680 2003-07-25 21:57:49Z asaddi $";
59
-#endif /* !lint */
60
-
61
-#define ROTL(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
62
-#define ROTR(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
63
-
64
-#define Ch(x, y, z) ((z) ^ ((x) & ((y) ^ (z))))
65
-#define Maj(x, y, z) (((x) & ((y) | (z))) | ((y) & (z)))
66
-#define SIGMA0(x) (ROTR((x), 2) ^ ROTR((x), 13) ^ ROTR((x), 22))
67
-#define SIGMA1(x) (ROTR((x), 6) ^ ROTR((x), 11) ^ ROTR((x), 25))
68
-#define sigma0(x) (ROTR((x), 7) ^ ROTR((x), 18) ^ ((x) >> 3))
69
-#define sigma1(x) (ROTR((x), 17) ^ ROTR((x), 19) ^ ((x) >> 10))
70
-
71
-#define DO_ROUND() { \
72
-  t1 = h + SIGMA1(e) + Ch(e, f, g) + *(Kp++) + *(W++); \
73
-  t2 = SIGMA0(a) + Maj(a, b, c); \
74
-  h = g; \
75
-  g = f; \
76
-  f = e; \
77
-  e = d + t1; \
78
-  d = c; \
79
-  c = b; \
80
-  b = a; \
81
-  a = t1 + t2; \
82
-}
83
-
84
-static const uint32_t K[64] = {
85
-  0x428a2f98L, 0x71374491L, 0xb5c0fbcfL, 0xe9b5dba5L,
86
-  0x3956c25bL, 0x59f111f1L, 0x923f82a4L, 0xab1c5ed5L,
87
-  0xd807aa98L, 0x12835b01L, 0x243185beL, 0x550c7dc3L,
88
-  0x72be5d74L, 0x80deb1feL, 0x9bdc06a7L, 0xc19bf174L,
89
-  0xe49b69c1L, 0xefbe4786L, 0x0fc19dc6L, 0x240ca1ccL,
90
-  0x2de92c6fL, 0x4a7484aaL, 0x5cb0a9dcL, 0x76f988daL,
91
-  0x983e5152L, 0xa831c66dL, 0xb00327c8L, 0xbf597fc7L,
92
-  0xc6e00bf3L, 0xd5a79147L, 0x06ca6351L, 0x14292967L,
93
-  0x27b70a85L, 0x2e1b2138L, 0x4d2c6dfcL, 0x53380d13L,
94
-  0x650a7354L, 0x766a0abbL, 0x81c2c92eL, 0x92722c85L,
95
-  0xa2bfe8a1L, 0xa81a664bL, 0xc24b8b70L, 0xc76c51a3L,
96
-  0xd192e819L, 0xd6990624L, 0xf40e3585L, 0x106aa070L,
97
-  0x19a4c116L, 0x1e376c08L, 0x2748774cL, 0x34b0bcb5L,
98
-  0x391c0cb3L, 0x4ed8aa4aL, 0x5b9cca4fL, 0x682e6ff3L,
99
-  0x748f82eeL, 0x78a5636fL, 0x84c87814L, 0x8cc70208L,
100
-  0x90befffaL, 0xa4506cebL, 0xbef9a3f7L, 0xc67178f2L
101
-};
102
-
103
-#ifndef RUNTIME_ENDIAN
104
-
105
-#if WORDS_BIGENDIAN == 1 
106
-
107
-#define BYTESWAP(x) (x)
108
-#define BYTESWAP64(x) (x)
109
-
110
-#else /* WORDS_BIGENDIAN */
111
-
112
-#define BYTESWAP(x) ((ROTR((x), 8) & 0xff00ff00L) | \
113
-		     (ROTL((x), 8) & 0x00ff00ffL))
114
-#define BYTESWAP64(x) _byteswap64(x)
115
-
116
-static inline uint64_t _byteswap64(uint64_t x)
117
-{
118
-  uint32_t a = x >> 32;
119
-  uint32_t b = (uint32_t) x;
120
-  return ((uint64_t) BYTESWAP(b) << 32) | (uint64_t) BYTESWAP(a);
121
-}
122
-
123
-#endif /* WORDS_BIGENDIAN */
124
-
125
-#else /* !RUNTIME_ENDIAN */
126
-
127
-#define BYTESWAP(x) _byteswap(sc->littleEndian, x)
128
-#define BYTESWAP64(x) _byteswap64(sc->littleEndian, x)
129
-
130
-#define _BYTESWAP(x) ((ROTR((x), 8) & 0xff00ff00L) | \
131
-		      (ROTL((x), 8) & 0x00ff00ffL))
132
-#define _BYTESWAP64(x) __byteswap64(x)
133
-
134
-static inline uint64_t __byteswap64(uint64_t x)
135
-{
136
-  uint32_t a = x >> 32;
137
-  uint32_t b = (uint32_t) x;
138
-  return ((uint64_t) _BYTESWAP(b) << 32) | (uint64_t) _BYTESWAP(a);
139
-}
140
-
141
-static inline uint32_t _byteswap(int littleEndian, uint32_t x)
142
-{
143
-  if (!littleEndian)
144
-    return x;
145
-  else
146
-    return _BYTESWAP(x);
147
-}
148
-
149
-static inline uint64_t _byteswap64(int littleEndian, uint64_t x)
150
-{
151
-  if (!littleEndian)
152
-    return x;
153
-  else
154
-    return _BYTESWAP64(x);
155
-}
156
-
157
-static inline void setEndian(int *littleEndianp)
158
-{
159
-  union {
160
-    uint32_t w;
161
-    uint8_t b[4];
162
-  } endian;
163
-
164
-  endian.w = 1L;
165
-  *littleEndianp = endian.b[0] != 0;
166
-}
167
-
168
-#endif /* !RUNTIME_ENDIAN */
169
-
170
-static const uint8_t padding[64] = {
171
-  0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
172
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
173
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
174
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
175
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
176
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
177
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
178
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
179
-};
180
-
181
-void
182
-sha256_init (SHA256_CTX *sc)
183
-{
184
-#ifdef RUNTIME_ENDIAN
185
-  setEndian (&sc->littleEndian);
186
-#endif /* RUNTIME_ENDIAN */
187
-
188
-  sc->totalLength = 0LL;
189
-  sc->hash[0] = 0x6a09e667L;
190
-  sc->hash[1] = 0xbb67ae85L;
191
-  sc->hash[2] = 0x3c6ef372L;
192
-  sc->hash[3] = 0xa54ff53aL;
193
-  sc->hash[4] = 0x510e527fL;
194
-  sc->hash[5] = 0x9b05688cL;
195
-  sc->hash[6] = 0x1f83d9abL;
196
-  sc->hash[7] = 0x5be0cd19L;
197
-  sc->bufferLength = 0L;
198
-}
199
-
200
-static void
201
-burnStack (int size)
202
-{
203
-  char buf[128];
204
-
205
-  memset (buf, 0, sizeof (buf));
206
-  size -= sizeof (buf);
207
-  if (size > 0)
208
-    burnStack (size);
209
-}
210
-
211
-static void
212
-SHA256Guts (SHA256_CTX *sc, const uint32_t *cbuf)
213
-{
214
-  uint32_t buf[64];
215
-  uint32_t *W, *W2, *W7, *W15, *W16;
216
-  uint32_t a, b, c, d, e, f, g, h;
217
-  uint32_t t1, t2;
218
-  const uint32_t *Kp;
219
-  int i;
220
-
221
-  W = buf;
222
-
223
-  for (i = 15; i >= 0; i--) {
224
-    *(W++) = BYTESWAP(*cbuf);
225
-    cbuf++;
226
-  }
227
-
228
-  W16 = &buf[0];
229
-  W15 = &buf[1];
230
-  W7 = &buf[9];
231
-  W2 = &buf[14];
232
-
233
-  for (i = 47; i >= 0; i--) {
234
-    *(W++) = sigma1(*W2) + *(W7++) + sigma0(*W15) + *(W16++);
235
-    W2++;
236
-    W15++;
237
-  }
238
-
239
-  a = sc->hash[0];
240
-  b = sc->hash[1];
241
-  c = sc->hash[2];
242
-  d = sc->hash[3];
243
-  e = sc->hash[4];
244
-  f = sc->hash[5];
245
-  g = sc->hash[6];
246
-  h = sc->hash[7];
247
-
248
-  Kp = K;
249
-  W = buf;
250
-
251
-#ifndef SHA256_UNROLL
252
-#define SHA256_UNROLL 4
253
-#endif /* !SHA256_UNROLL */
254
-
255
-#if SHA256_UNROLL == 1
256
-  for (i = 63; i >= 0; i--)
257
-    DO_ROUND();
258
-#elif SHA256_UNROLL == 2
259
-  for (i = 31; i >= 0; i--) {
260
-    DO_ROUND(); DO_ROUND();
261
-  }
262
-#elif SHA256_UNROLL == 4
263
-  for (i = 15; i >= 0; i--) {
264
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
265
-  }
266
-#elif SHA256_UNROLL == 8
267
-  for (i = 7; i >= 0; i--) {
268
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
269
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
270
-  }
271
-#elif SHA256_UNROLL == 16
272
-  for (i = 3; i >= 0; i--) {
273
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
274
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
275
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
276
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
277
-  }
278
-#elif SHA256_UNROLL == 32
279
-  for (i = 1; i >= 0; i--) {
280
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
281
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
282
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
283
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
284
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
285
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
286
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
287
-    DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
288
-  }
289
-#elif SHA256_UNROLL == 64
290
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
291
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
292
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
293
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
294
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
295
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
296
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
297
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
298
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
299
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
300
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
301
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
302
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
303
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
304
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
305
-  DO_ROUND(); DO_ROUND(); DO_ROUND(); DO_ROUND();
306
-#else
307
-#error "SHA256_UNROLL must be 1, 2, 4, 8, 16, 32, or 64!"
308
-#endif
309
-
310
-  sc->hash[0] += a;
311
-  sc->hash[1] += b;
312
-  sc->hash[2] += c;
313
-  sc->hash[3] += d;
314
-  sc->hash[4] += e;
315
-  sc->hash[5] += f;
316
-  sc->hash[6] += g;
317
-  sc->hash[7] += h;
318
-}
319
-
320
-void
321
-sha256_update (SHA256_CTX *sc, const void *vdata, uint32_t len)
322
-{
323
-  const uint8_t *data = vdata;
324
-  uint32_t bufferBytesLeft;
325
-  uint32_t bytesToCopy;
326
-  int needBurn = 0;
327
-#ifdef SHA256_FAST_COPY
328
-  if (sc->bufferLength) {
329
-    bufferBytesLeft = 64L - sc->bufferLength;
330
-
331
-    bytesToCopy = bufferBytesLeft;
332
-    if (bytesToCopy > len)
333
-      bytesToCopy = len;
334
-
335
-    memcpy (&sc->buffer.bytes[sc->bufferLength], data, bytesToCopy);
336
-
337
-    sc->totalLength += bytesToCopy * 8L;
338
-
339
-    sc->bufferLength += bytesToCopy;
340
-    data += bytesToCopy;
341
-    len -= bytesToCopy;
342
-
343
-    if (sc->bufferLength == 64L) {
344
-      SHA256Guts (sc, sc->buffer.words);
345
-      needBurn = 1;
346
-      sc->bufferLength = 0L;
347
-    }
348
-  }
349
-
350
-  while (len > 63L) {
351
-    sc->totalLength += 512L;
352
-
353
-    SHA256Guts (sc, data);
354
-    needBurn = 1;
355
-
356
-    data += 64L;
357
-    len -= 64L;
358
-  }
359
-
360
-  if (len) {
361
-    memcpy (&sc->buffer.bytes[sc->bufferLength], data, len);
362
-
363
-    sc->totalLength += len * 8L;
364
-
365
-    sc->bufferLength += len;
366
-  }
367
-#else /* SHA256_FAST_COPY */
368
-  while (len) {
369
-    bufferBytesLeft = 64L - sc->bufferLength;
370
-
371
-    bytesToCopy = bufferBytesLeft;
372
-    if (bytesToCopy > len)
373
-      bytesToCopy = len;
374
-
375
-    memcpy (&sc->buffer.bytes[sc->bufferLength], data, bytesToCopy);
376
-
377
-    sc->totalLength += bytesToCopy * 8L;
378
-
379
-    sc->bufferLength += bytesToCopy;
380
-    data += bytesToCopy;
381
-    len -= bytesToCopy;
382
-
383
-    if (sc->bufferLength == 64L) {
384
-      SHA256Guts (sc, sc->buffer.words);
385
-      needBurn = 1;
386
-      sc->bufferLength = 0L;
387
-    }
388
-  }
389
-#endif /* SHA256_FAST_COPY */
390
-
391
-  if (needBurn)
392
-    burnStack (sizeof (uint32_t[74]) + sizeof (uint32_t *[6]) + sizeof (int));
393
-}
394
-
395
-void
396
-sha256_final (SHA256_CTX *sc, uint8_t hash[SHA256_HASH_SIZE])
397
-{
398
-  uint32_t bytesToPad;
399
-  uint64_t lengthPad;
400
-  int i;
401
-
402
-  bytesToPad = 120L - sc->bufferLength;
403
-  if (bytesToPad > 64L)
404
-    bytesToPad -= 64L;
405
-
406
-  lengthPad = BYTESWAP64(sc->totalLength);
407
-
408
-  sha256_update (sc, padding, bytesToPad);
409
-  sha256_update (sc, &lengthPad, 8L);
410
-
411
-  if (hash) {
412
-    for (i = 0; i < SHA256_HASH_WORDS; i++) {
413
-#ifdef SHA256_FAST_COPY
414
-      *((uint32_t *) hash) = BYTESWAP(sc->hash[i]);
415
-#else /* SHA256_FAST_COPY */
416
-      hash[0] = (uint8_t) (sc->hash[i] >> 24);
417
-      hash[1] = (uint8_t) (sc->hash[i] >> 16);
418
-      hash[2] = (uint8_t) (sc->hash[i] >> 8);
419
-      hash[3] = (uint8_t) sc->hash[i];
420
-#endif /* SHA256_FAST_COPY */
421
-      hash += 4;
422
-    }
423
-  }
424
-}
425
-
426
-#ifdef SHA256_TEST
427
-
428
-#include <stdio.h>
429
-#include <stdlib.h>
430
-#include <string.h>
431
-
432
-int
433
-main (int argc, char *argv[])
434
-{
435
-  SHA256_CTX foo;
436
-  uint8_t hash[SHA256_HASH_SIZE];
437
-  char buf[1000];
438
-  int i;
439
-
440
-  sha256_init (&foo);
441
-  sha256_update (&foo, "abc", 3);
442
-  sha256_final (&foo, hash);
443
-
444
-  for (i = 0; i < SHA256_HASH_SIZE;) {
445
-    printf ("%02x", hash[i++]);
446
-    if (!(i % 4))
447
-      printf (" ");
448
-  }
449
-  printf ("\n");
450
-
451
-  sha256_init (&foo);
452
-  sha256_update (&foo,
453
-		"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
454
-		56);
455
-  sha256_final (&foo, hash);
456
-
457
-  for (i = 0; i < SHA256_HASH_SIZE;) {
458
-    printf ("%02x", hash[i++]);
459
-    if (!(i % 4))
460
-      printf (" ");
461
-  }
462
-  printf ("\n");
463
-
464
-  sha256_init (&foo);
465
-  memset (buf, 'a', sizeof (buf));
466
-  for (i = 0; i < 1000; i++)
467
-    sha256_update (&foo, buf, sizeof (buf));
468
-  sha256_final (&foo, hash);
469
-
470
-  for (i = 0; i < SHA256_HASH_SIZE;) {
471
-    printf ("%02x", hash[i++]);
472
-    if (!(i % 4))
473
-      printf (" ");
474
-  }
475
-  printf ("\n");
476
-
477
-  exit (0);
478
-}
479
-
480
-#endif /* SHA256_TEST */
481 1
deleted file mode 100644
... ...
@@ -1,66 +0,0 @@
1
-/*-
2
- * Copyright (c) 2001-2003 Allan Saddi <allan@saddi.com>
3
- * All rights reserved.
4
- *
5
- * Redistribution and use in source and binary forms, with or without
6
- * modification, are permitted provided that the following conditions
7
- * are met:
8
- * 1. Redistributions of source code must retain the above copyright
9
- *    notice, this list of conditions and the following disclaimer.
10
- * 2. Redistributions in binary form must reproduce the above copyright
11
- *    notice, this list of conditions and the following disclaimer in the
12
- *    documentation and/or other materials provided with the distribution.
13
- *
14
- * THIS SOFTWARE IS PROVIDED BY ALLAN SADDI AND HIS CONTRIBUTORS ``AS IS''
15
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17
- * ARE DISCLAIMED.  IN NO EVENT SHALL ALLAN SADDI OR HIS CONTRIBUTORS BE
18
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24
- * POSSIBILITY OF SUCH DAMAGE.
25
- *
26
- * $Id: sha256.h 348 2003-02-23 22:12:06Z asaddi $
27
- */
28
-
29
-#ifndef _SHA256_H
30
-#define _SHA256_H
31
-
32
-#include "cltypes.h"
33
-
34
-#define SHA256_HASH_SIZE 32
35
-
36
-/* Hash size in 32-bit words */
37
-#define SHA256_HASH_WORDS 8
38
-
39
-struct _SHA256Context {
40
-  uint64_t totalLength;
41
-  uint32_t hash[SHA256_HASH_WORDS];
42
-  uint32_t bufferLength;
43
-  union {
44
-    uint32_t words[16];
45
-    uint8_t bytes[64];
46
-  } buffer;
47
-#ifdef RUNTIME_ENDIAN
48
-  int littleEndian;
49
-#endif /* RUNTIME_ENDIAN */
50
-};
51
-
52
-typedef struct _SHA256Context SHA256_CTX;
53
-
54
-#ifdef __cplusplus
55
-extern "C" {
56
-#endif
57
-
58
-void sha256_init (SHA256_CTX *sc);
59
-void sha256_update (SHA256_CTX *sc, const void *data, uint32_t len);
60
-void sha256_final (SHA256_CTX *sc, uint8_t hash[SHA256_HASH_SIZE]);
61
-
62
-#ifdef __cplusplus
63
-}
64
-#endif
65
-
66
-#endif /* !_SHA256_H */
... ...
@@ -38,6 +38,10 @@
38 38
 #include <fcntl.h>
39 39
 #include <zlib.h>
40 40
 
41
+#include <openssl/ssl.h>
42
+#include <openssl/err.h>
43
+#include "libclamav/crypto.h"
44
+
41 45
 #include "others.h"
42 46
 #include "clamav.h"
43 47
 #include "scanners.h"
... ...
@@ -33,6 +33,11 @@
33 33
 #ifndef _WIN32
34 34
 #include <netinet/in.h>
35 35
 #endif
36
+
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
36 41
 #include "clamav.h"
37 42
 #include "others.h"
38 43
 #include "cltypes.h"
... ...
@@ -55,6 +55,10 @@
55 55
 #include <stdlib.h>
56 56
 #include <string.h>
57 57
 
58
+#include <openssl/ssl.h>
59
+#include <openssl/err.h>
60
+#include "libclamav/crypto.h"
61
+
58 62
 #include "cltypes.h"
59 63
 #include "pe.h"
60 64
 #include "rebuildpe.h"
... ...
@@ -44,6 +44,10 @@
44 44
 
45 45
 #include <errno.h>
46 46
 
47
+#include <openssl/ssl.h>
48
+#include <openssl/err.h>
49
+#include "libclamav/crypto.h"
50
+
47 51
 #include "libclamav/others.h"
48 52
 #include "libclamav/clamav.h"
49 53
 #include "libclamav/dconf.h"
... ...
@@ -33,6 +33,10 @@
33 33
 #include <ctype.h>
34 34
 #include <sys/types.h>
35 35
 
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
36 40
 #include "clamav.h"
37 41
 #include "others.h"
38 42
 #include "matcher.h"
... ...
@@ -44,6 +44,10 @@
44 44
 #include <time.h>
45 45
 #include <zlib.h>
46 46
 
47
+#include <openssl/ssl.h>
48
+#include <openssl/err.h>
49
+#include "libclamav/crypto.h"
50
+
47 51
 #include "cltypes.h"
48 52
 #include "swf.h"
49 53
 #include "clamav.h"
... ...
@@ -33,6 +33,10 @@
33 33
 #endif
34 34
 #include <assert.h>
35 35
 
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
36 40
 #include "table.h"
37 41
 #include "others.h"
38 42
 
... ...
@@ -108,6 +108,10 @@ static	char	const	rcsid[] = "$Id: text.c,v 1.25 2007/02/12 20:46:09 njh Exp $";
108 108
 #include <assert.h>
109 109
 #include <stdio.h>
110 110
 
111
+#include <openssl/ssl.h>
112
+#include <openssl/err.h>
113
+#include "libclamav/crypto.h"
114
+
111 115
 #include "others.h"
112 116
 
113 117
 #include "mbox.h"
... ...
@@ -43,6 +43,10 @@
43 43
 #include <unistd.h>
44 44
 #endif
45 45
 
46
+#include <openssl/ssl.h>
47
+#include <openssl/err.h>
48
+#include "libclamav/crypto.h"
49
+
46 50
 #include "filetypes.h"
47 51
 #include "textdet.h"
48 52
 #include "others.h"
... ...
@@ -31,6 +31,10 @@ static	char	const	rcsid[] = "$Id: tnef.c,v 1.41 2007/02/12 22:22:27 njh Exp $";
31 31
 #include <unistd.h>
32 32
 #endif
33 33
 
34
+#include <openssl/ssl.h>
35
+#include <openssl/err.h>
36
+#include "libclamav/crypto.h"
37
+
34 38
 #include "cltypes.h"
35 39
 #include "clamav.h"
36 40
 #include "others.h"
... ...
@@ -36,6 +36,10 @@
36 36
 #include <clamav.h>
37 37
 #include <ctype.h>
38 38
 
39
+#include <openssl/ssl.h>
40
+#include <openssl/err.h>
41
+#include "libclamav/crypto.h"
42
+
39 43
 #include "clamav.h"
40 44
 #include "cltypes.h"
41 45
 #include "others.h"
... ...
@@ -29,9 +29,12 @@
29 29
 #include <string.h>
30 30
 #endif
31 31
 
32
+#include <openssl/ssl.h>
33
+#include <openssl/err.h>
34
+#include "libclamav/crypto.h"
35
+
32 36
 #include "uniq.h"
33 37
 #include "others.h"
34
-#include "md5.h"
35 38
 
36 39
 struct uniq *uniq_init(uint32_t count) {
37 40
   struct uniq *U;
... ...
@@ -57,12 +60,9 @@ void uniq_free(struct uniq *U) {
57 57
 uint32_t uniq_add(struct uniq *U, const char *key, uint32_t key_len, char **rhash) {
58 58
   unsigned int i;
59 59
   uint8_t digest[16];
60
-  cli_md5_ctx md5;
61 60
   struct UNIQMD5 *m = NULL;
62 61
 
63
-  cli_md5_init(&md5);
64
-  cli_md5_update(&md5, key, key_len);
65
-  cli_md5_final(digest, &md5);
62
+  cl_hash_data("md5", key, key_len, digest, NULL);
66 63
 
67 64
   if(U->items && U->md5s[U->idx[*digest]].md5[0]==*digest)
68 65
     for(m=&U->md5s[U->idx[*digest]]; m; m=m->next)
... ...
@@ -96,12 +96,9 @@ uint32_t uniq_add(struct uniq *U, const char *key, uint32_t key_len, char **rhas
96 96
 
97 97
 uint32_t uniq_get(struct uniq *U, const char *key, uint32_t key_len, char **rhash) {
98 98
   uint8_t digest[16];
99
-  cli_md5_ctx md5;
100 99
   struct UNIQMD5 *m = NULL;
101 100
 
102
-  cli_md5_init(&md5);
103
-  cli_md5_update(&md5, key, key_len);
104
-  cli_md5_final(digest, &md5);
101
+  cl_hash_data("md5", key, key_len, digest, NULL);
105 102
 
106 103
   if(!U->items || U->md5s[U->idx[*digest]].md5[0]!=*digest)
107 104
     return 0;
... ...
@@ -111,6 +111,10 @@ nsp1:00435A5A                 push    8000h
111 111
 
112 112
 #include <stdlib.h>
113 113
 
114
+#include <openssl/ssl.h>
115
+#include <openssl/err.h>
116
+#include "libclamav/crypto.h"
117
+
114 118
 #include "cltypes.h"
115 119
 #include "clamav.h"
116 120
 #include "others.h"
... ...
@@ -36,6 +36,10 @@ static	char	const	rcsid[] = "$Id: untar.c,v 1.35 2007/02/12 20:46:09 njh Exp $";
36 36
 #include <sys/param.h>	/* for NAME_MAX */
37 37
 #endif
38 38
 
39
+#include <openssl/ssl.h>
40
+#include <openssl/err.h>
41
+#include "libclamav/crypto.h"
42
+
39 43
 #include "clamav.h"
40 44
 #include "others.h"
41 45
 #include "untar.h"
... ...
@@ -36,6 +36,10 @@
36 36
 #include <stdlib.h>
37 37
 #include <stdio.h>
38 38
 
39
+#include <openssl/ssl.h>
40
+#include <openssl/err.h>
41
+#include "libclamav/crypto.h"
42
+
39 43
 #include <zlib.h>
40 44
 #include "inflate64.h"
41 45
 #if HAVE_BZLIB_H
... ...
@@ -39,6 +39,10 @@
39 39
 #include <string.h>
40 40
 #endif
41 41
 
42
+#include <openssl/ssl.h>
43
+#include <openssl/err.h>
44
+#include "libclamav/crypto.h"
45
+
42 46
 #include "cltypes.h"
43 47
 #include "pe.h"
44 48
 #include "rebuildpe.h"
... ...
@@ -52,6 +52,10 @@
52 52
 #include <stdlib.h>
53 53
 #include <string.h>
54 54
 
55
+#include <openssl/ssl.h>
56
+#include <openssl/err.h>
57
+#include "libclamav/crypto.h"
58
+
55 59
 #include "cltypes.h"
56 60
 #include "others.h"
57 61
 #include "upx.h"
... ...
@@ -36,6 +36,11 @@ static	char	const	rcsid[] = "$Id: uuencode.c,v 1.8 2006/12/11 11:55:11 njh Exp $
36 36
 #ifdef	HAVE_STRINGS_H
37 37
 #include <strings.h>
38 38
 #endif
39
+
40
+#include <openssl/ssl.h>
41
+#include <openssl/err.h>
42
+#include "libclamav/crypto.h"
43
+
39 44
 #include "others.h"
40 45
 #include "str.h"
41 46
 
... ...
@@ -34,6 +34,10 @@
34 34
 #include <ctype.h>
35 35
 #include <zlib.h>
36 36
 
37
+#include <openssl/ssl.h>
38
+#include <openssl/err.h>
39
+#include "libclamav/crypto.h"
40
+
37 41
 #include "clamav.h"
38 42
 
39 43
 #include "others.h"
... ...
@@ -22,6 +22,10 @@
22 22
 #include "clamav-config.h"
23 23
 #endif
24 24
 
25
+#include <openssl/ssl.h>
26
+#include <openssl/err.h>
27
+#include "libclamav/crypto.h"
28
+
25 29
 #include "cltypes.h"
26 30
 #include "others.h"
27 31
 #include "execs.h"
... ...
@@ -40,6 +40,10 @@
40 40
 #include <netdb.h>
41 41
 #endif
42 42
 
43
+#include <openssl/ssl.h>
44
+#include <openssl/err.h>
45
+#include "libclamav/crypto.h"
46
+
43 47
 #include "libclamav/others.h"
44 48
 #include "libclamav/clamav.h"
45 49
 #include "libclamav/www.h"
... ...
@@ -22,6 +22,10 @@
22 22
 #include "clamav-config.h"
23 23
 #endif
24 24
 
25
+#include <openssl/ssl.h>
26
+#include <openssl/err.h>
27
+#include "libclamav/crypto.h"
28
+
25 29
 #include <errno.h>
26 30
 #include "xar.h"
27 31
 #include "fmap.h"
... ...
@@ -36,8 +40,6 @@
36 36
 #include "scanners.h"
37 37
 #include "inflate64.h"
38 38
 #include "lzma_iface.h"
39
-#include "sha1.h"
40
-#include "md5.h"
41 39
 
42 40
 /*
43 41
    xar_cleanup_temp_file - cleanup after cli_gentempfd
... ...
@@ -323,16 +325,16 @@ static int xar_scan_subdocuments(xmlTextReaderPtr reader, cli_ctx *ctx)
323 323
     return rc;
324 324
 }
325 325
 
326
-static void * xar_hash_init(int hash, SHA1Context *sc, cli_md5_ctx *mc)
326
+static EVP_MD_CTX * xar_hash_init(int hash, EVP_MD_CTX *sc, EVP_MD_CTX *mc)
327 327
 {
328 328
     if (!sc && !mc)
329 329
         return NULL;
330 330
     switch (hash) {
331 331
     case XAR_CKSUM_SHA1:
332
-        SHA1Init(sc);
332
+        EVP_DigestInit(sc, EVP_sha1());
333 333
         return sc;
334 334
     case XAR_CKSUM_MD5:
335
-        cli_md5_init(mc);
335
+        EVP_DigestInit(mc, EVP_md5());
336 336
         return mc;
337 337
     case XAR_CKSUM_OTHER:
338 338
     case XAR_CKSUM_NONE:
... ...
@@ -341,44 +343,34 @@ static void * xar_hash_init(int hash, SHA1Context *sc, cli_md5_ctx *mc)
341 341
     }
342 342
 }
343 343
 
344
-static void xar_hash_update(void * hash_ctx, const void * data, unsigned long size, int hash)
344
+static void xar_hash_update(EVP_MD_CTX * hash_ctx, const void * data, unsigned long size, int hash)
345 345
 {
346 346
     if (!hash_ctx || !data || !size)
347 347
         return;
348
+
348 349
     switch (hash) {
349
-    case XAR_CKSUM_SHA1:
350
-        SHA1Update(hash_ctx, data, size);
351
-        return;
352
-    case XAR_CKSUM_MD5:
353
-        if (0 == cli_md5_update(hash_ctx, data, size)) {
354
-            cli_dbgmsg("cli_scanxar: cli_md5_update invalid return.\n");
355
-            return;
356
-        }
357
-        return;
358
-    case XAR_CKSUM_OTHER:
359 350
     case XAR_CKSUM_NONE:
360
-    default:
351
+    case XAR_CKSUM_OTHER:
361 352
         return;
362 353
     }
354
+
355
+    EVP_DigestUpdate(hash_ctx, data, size);
363 356
 }
364 357
 
365
-static void xar_hash_final(void * hash_ctx, void * result, int hash)
358
+static void xar_hash_final(EVP_MD_CTX * hash_ctx, void * result, int hash)
366 359
 {
367
-    
368 360
     if (!hash_ctx || !result)
369 361
         return;
362
+
370 363
     switch (hash) {
371
-    case XAR_CKSUM_SHA1:
372
-        SHA1Final(hash_ctx, result);
373
-        return;
374
-    case XAR_CKSUM_MD5:
375
-        cli_md5_final(result, hash_ctx);
376
-        return;
377 364
     case XAR_CKSUM_OTHER:
378 365
     case XAR_CKSUM_NONE:
379 366
     default:
380 367
         return;
381 368
     }
369
+
370
+    EVP_DigestFinal(hash_ctx, result, NULL);
371
+    EVP_MD_CTX_cleanup(hash_ctx);
382 372
 }
383 373
 
384 374
 static int xar_hash_check(int hash, const void * result, const void * expected)
... ...
@@ -538,9 +530,9 @@ int cli_scanxar(cli_ctx *ctx)
538 538
                                                        &a_cksum, &a_hash, &e_cksum, &e_hash))) {
539 539
         int do_extract_cksum = 1;
540 540
         unsigned char * blockp;
541
-        SHA1Context a_sc, e_sc;
542
-        cli_md5_ctx a_mc, e_mc;
543
-        void *a_hash_ctx, *e_hash_ctx;
541
+        EVP_MD_CTX a_sc, e_sc;
542
+        EVP_MD_CTX a_mc, e_mc;
543
+        EVP_MD_CTX *a_hash_ctx, *e_hash_ctx;
544 544
         char result[SHA1_HASH_SIZE];
545 545
         char * expected;
546 546
 
... ...
@@ -22,7 +22,10 @@
22 22
 #include "clamav-config.h"
23 23
 #endif
24 24
 
25
-#include "7z/Sha256.h"
25
+#include <openssl/ssl.h>
26
+#include <openssl/err.h>
27
+#include "libclamav/crypto.h"
28
+
26 29
 #include "7z/XzCrc64.h"
27 30
 #include "xz_iface.h"
28 31
 
... ...
@@ -30,6 +30,11 @@
30 30
 #if HAVE_CONFIG_H
31 31
 #include "clamav-config.h"
32 32
 #endif
33
+
34
+#include <openssl/ssl.h>
35
+#include <openssl/err.h>
36
+#include "libclamav/crypto.h"
37
+
33 38
 #include "cltypes.h"
34 39
 #include "pe.h"
35 40
 #include "others.h"
... ...
@@ -73,6 +73,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
73 73
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
74 74
 	$(top_srcdir)/m4/lt~obsolete.m4 \
75 75
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
76
+	$(top_srcdir)/m4/reorganization/version.m4 \
77
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
78
+	$(top_srcdir)/m4/reorganization/headers.m4 \
79
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
80
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
81
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
82
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
83
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
84
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
85
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
86
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
87
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
88
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
89
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
90
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
91
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
92
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
93
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
97
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
98
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
99
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
100
+	$(top_srcdir)/m4/reorganization/debug.m4 \
101
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
102
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
103
+	$(top_srcdir)/m4/reorganization/dns.m4 \
104
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
105
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
106
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
108
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
109
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
110
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
111
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
112
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
113
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
114
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
115
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
116
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
117
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
120
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
121
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
122
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
123
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
124
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
125
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
126
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
127
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
128
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
129
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
76 130
 	$(top_srcdir)/configure.ac
77 131
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
78 132
 	$(ACLOCAL_M4)
... ...
@@ -234,9 +288,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
234 234
 CHECK_LIBS = @CHECK_LIBS@
235 235
 CLAMAVGROUP = @CLAMAVGROUP@
236 236
 CLAMAVUSER = @CLAMAVUSER@
237
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
237 238
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
239
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
240
+CLAMBC_LIBS = @CLAMBC_LIBS@
241
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
242
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
238 243
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
244
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
245
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
246
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
239 247
 CLAMD_LIBS = @CLAMD_LIBS@
248
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
249
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
250
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
251
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
240 252
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
241 253
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
242 254
 CPP = @CPP@
... ...
@@ -256,6 +322,7 @@ ECHO_T = @ECHO_T@
256 256
 EGREP = @EGREP@
257 257
 EXEEXT = @EXEEXT@
258 258
 FGREP = @FGREP@
259
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
259 260
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
260 261
 GCOV = @GCOV@
261 262
 GENHTML = @GENHTML@
... ...
@@ -277,8 +344,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
277 277
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
278 278
 LIBBZ2 = @LIBBZ2@
279 279
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
280
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
280 281
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
281 282
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
283
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
282 284
 LIBLTDL = @LIBLTDL@
283 285
 LIBM = @LIBM@
284 286
 LIBOBJS = @LIBOBJS@
... ...
@@ -316,6 +385,7 @@ RANLIB = @RANLIB@
316 316
 SED = @SED@
317 317
 SET_MAKE = @SET_MAKE@
318 318
 SHELL = @SHELL@
319
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
319 320
 STRIP = @STRIP@
320 321
 THREAD_LIBS = @THREAD_LIBS@
321 322
 TH_SAFE = @TH_SAFE@
322 323
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+AC_ARG_ENABLE([bigstack],
1
+[  --enable-bigstack	  increase thread stack size],
2
+enable_bigstack=$enableval, enable_bigstack="no")
3
+
4
+if test "$enable_bigstack" = "yes"; then
5
+  AC_DEFINE([C_BIGSTACK],1,[Increase thread stack size.])
6
+fi
0 7
new file mode 100644
... ...
@@ -0,0 +1,5 @@
0
+case "$host_os" in
1
+freebsd*)
2
+AC_CHECK_LIB([util], [kinfo_getvmmap], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lutil"], AC_MSG_ERROR([You are running BSD but you don't have kinfo_getvmmap in the util library. Please fix manually.]))
3
+;;
4
+esac
0 5
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+AC_PROG_CC
1
+AC_PROG_INSTALL
2
+AC_PROG_LN_S
3
+AC_PROG_MAKE_SET
4
+AC_PROG_LIBTOOL
5
+
6
+LT_LIB_M
0 7
new file mode 100644
... ...
@@ -0,0 +1,6 @@
0
+AC_LIB_MULTILIB_GUESS
1
+
2
+AC_C_RESTRICT
3
+AC_C_CONST
4
+AC_C_INLINE
5
+AC_C_BIGENDIAN
0 6
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+dnl configure config directory
1
+cfg_dir=`echo $sysconfdir | grep prefix`
2
+
3
+if test -n "$cfg_dir"; then
4
+    if test "$prefix" = "NONE"
5
+    then
6
+	cfg_dir="$ac_default_prefix/etc"
7
+    else
8
+	cfg_dir="$prefix/etc"
9
+    fi
10
+else
11
+    cfg_dir="$sysconfdir"
12
+fi
13
+
14
+CFGDIR=$cfg_dir
15
+AC_SUBST([CFGDIR])
16
+AC_DEFINE_UNQUOTED([CONFDIR],"$cfg_dir",[where to look for the config file])
0 17
new file mode 100644
... ...
@@ -0,0 +1,57 @@
0
+dnl Check for clamav in /etc/passwd
1
+if test "$test_clamav" = "yes"
2
+then
3
+    dnl parse /etc/passwd
4
+    if test "$use_id" = "no"
5
+    then
6
+	AC_MSG_CHECKING([for $clamav_user in /etc/passwd])
7
+	if test -r /etc/passwd; then
8
+	    clamavuser=`cat /etc/passwd|grep "^$clamav_user:"`
9
+	    clamavgroup=`cat /etc/group|grep "^$clamav_group:"`
10
+	fi
11
+    else
12
+	AC_MSG_CHECKING([for $clamav_user using id])
13
+	id $clamav_user > /dev/null 2>&1
14
+	if test "$?" = 0 ; then
15
+	    clamavuser=1
16
+	    AC_PATH_PROG(GETENT, getent)
17
+	    if test -n "$GETENT" ; then
18
+		clamavgroup=`$GETENT group | grep "^${clamav_group}:"`
19
+	    else
20
+		clamavgroup=`cat /etc/group|grep $clamav_group`
21
+	    fi
22
+	fi
23
+    fi
24
+
25
+    if test "$use_netinfo" = "yes"
26
+    then
27
+	if test -x /usr/bin/dscl; then
28
+	    AC_MSG_CHECKING([for $clamav_user using dscl])
29
+	    clamavuser=`/usr/bin/dscl . -list /Users |grep ${clamav_user}`
30
+	    clamavgroup=`/usr/bin/dscl . -list /Groups |grep ${clamav_group}`
31
+	else
32
+	    AC_MSG_CHECKING([for $clamav_user using netinfo])
33
+	    clamavuser=`/usr/bin/nidump passwd . |grep ${clamav_user}`
34
+	    clamavgroup=`/usr/bin/nidump group . |grep ${clamav_group}`
35
+	fi
36
+    fi
37
+
38
+    if test "$use_yp" = "yes"
39
+    then
40
+	AC_MSG_CHECKING([for $clamav_user using ypmatch])
41
+        clamavuser=`ypmatch ${clamav_user} passwd`
42
+        clamavgroup=`ypmatch ${clamav_group} group`
43
+    fi
44
+
45
+    if test -z "$clamavuser" || test -z "$clamavgroup"
46
+    then
47
+	AC_MSG_RESULT(no)
48
+	AC_MSG_ERROR([User $clamav_user (and/or group $clamav_group) doesn't exist. Please read the documentation !])
49
+    else
50
+	AC_MSG_RESULT([yes, user $clamav_user and group $clamav_group])
51
+        CLAMAVUSER="$clamav_user"
52
+        CLAMAVGROUP="$clamav_group"
53
+        AC_SUBST([CLAMAVUSER])
54
+        AC_SUBST([CLAMAVGROUP])
55
+    fi
56
+fi
0 57
new file mode 100644
... ...
@@ -0,0 +1,48 @@
0
+AC_ARG_ENABLE(clamdtop,
1
+	      AC_HELP_STRING([--enable-clamdtop],
2
+			     [Enable 'clamdtop' tool @<:@default=auto@:>@]),
3
+[enable_clamdtop=$enableval], [enable_clamdtop="auto"])
4
+
5
+if test "$enable_clamdtop" != "no"; then
6
+
7
+AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
8
+	    AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
9
+			    [initscr(); KEY_RESIZE;]),
10
+	    [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
11
+	     CURSES_INCLUDE="<ncurses/ncurses.h>"],
12
+	    [])
13
+
14
+if test "X$HAVE_LIBNCURSES" != "Xyes"; then
15
+    HAVE_LIBNCURSES=
16
+    AC_LIB_FIND([ncurses], [ncurses.h],
17
+	    AC_LANG_PROGRAM([#include <ncurses.h>],
18
+			    [initscr(); KEY_RESIZE;]),
19
+	    [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
20
+	     CURSES_INCLUDE="<ncurses.h>"],
21
+	    [])
22
+fi
23
+
24
+if test "X$HAVE_LIBNCURSES" != "Xyes"; then
25
+    AC_LIB_FIND([pdcurses],[curses.h],
26
+			    AC_LANG_PROGRAM([#include <curses.h>],
27
+					    [initscr(); KEY_RESIZE;]),
28
+			    [CURSES_CPPFLAGS="$INCPDCURSES";
29
+			     CURSES_LIBS="$LTLIBPDCURSES";
30
+			     CURSES_INCLUDE="<curses.h>"],
31
+			    [AC_MSG_WARN([****** not building clamdtop: ncurses not found])])
32
+fi
33
+
34
+if test "x$CURSES_LIBS" = "x" -a "$enable_clamdtop" = "yes"; then
35
+    AC_MSG_ERROR([
36
+
37
+ERROR!  Clamdtop was configured, but not found.  You need to install libncurses5-dev.
38
+])
39
+fi
40
+
41
+fi
42
+
43
+AC_DEFINE_UNQUOTED([CURSES_INCLUDE], $CURSES_INCLUDE, [curses header location])
44
+AC_SUBST([CURSES_CPPFLAGS])
45
+AC_SUBST([CURSES_LIBS])
46
+AM_CONDITIONAL([HAVE_CURSES],
47
+	       [test "X$HAVE_LIBNCURSES" = "Xyes" || test "X$HAVE_LIBPDCURSES" = "Xyes"])
0 48
new file mode 100644
... ...
@@ -0,0 +1,126 @@
0
+dnl check for __attribute__((packed))
1
+dnl but only on compilers claiming to be gcc compatible
2
+dnl because for example Sun's compiler silently ignores the packed attribute.
3
+AC_MSG_CHECKING([for structure packing via __attribute__((packed))])
4
+AC_CACHE_VAL([have_cv_attrib_packed],[
5
+	AC_TRY_COMPILE(,
6
+		[#ifdef __GNUC__
7
+		 struct { int i __attribute__((packed)); } s;
8
+		 #else
9
+		 #error Only checking for packed attribute on gcc-like compilers
10
+		 #endif],
11
+		[have_cv_attrib_packed=yes],
12
+		[have_cv_attrib_packed=no])
13
+	])
14
+AC_MSG_RESULT([$have_cv_attrib_packed])
15
+
16
+if test "$have_cv_attrib_packed" = no; then
17
+	AC_MSG_CHECKING([for structure packing via pragma])
18
+	AC_CACHE_VAL([have_cv_pragma_pack],[
19
+		AC_TRY_RUN([
20
+			    int main(int argc, char **argv) {
21
+#pragma pack(1)			/* has to be in column 1 ! */
22
+			struct { char c; long l; } s;
23
+			return sizeof(s)==sizeof(s.c)+sizeof(s.l) ? 0:1; } ],
24
+			[have_cv_pragma_pack=yes],
25
+			[have_cv_pragma_pack=no])
26
+		])
27
+	AC_MSG_RESULT([$have_cv_pragma_pack])
28
+	if test "$have_cv_pragma_pack" = yes; then
29
+		AC_DEFINE([HAVE_PRAGMA_PACK], 1, "pragma pack")
30
+	else
31
+		AC_MSG_CHECKING([for structure packing via hppa/hp-ux pragma])
32
+		AC_CACHE_VAL([have_cv_pragma_pack_hpux],[
33
+			AC_TRY_RUN([
34
+			/* hppa/hp-ux wants pragma outside of function */
35
+#pragma pack 1 /* has to be in column 1 ! */
36
+			struct { char c; long l; } s;
37
+			    int main(int argc, char **argv) {
38
+			return sizeof(s)==sizeof(s.c)+sizeof(s.l) ? 0:1; } ],
39
+			[have_cv_pragma_pack_hpux=yes],
40
+			[have_cv_pragma_pack_hpux=no])
41
+		])
42
+		AC_MSG_RESULT([$have_cv_pragma_pack_hpux])
43
+		AC_DEFINE([HAVE_PRAGMA_PACK_HPPA], 1, "pragma pack hppa/hp-ux style")
44
+	fi
45
+fi
46
+
47
+dnl check for __attribute__((aligned))
48
+AC_MSG_CHECKING([for type aligning via __attribute__((aligned))])
49
+AC_CACHE_VAL([have_cv_attrib_aligned],[
50
+	AC_TRY_COMPILE(,
51
+		[typedef int cl_aligned_int __attribute__((aligned));],
52
+		[have_cv_attrib_aligned=yes],
53
+		[have_cv_attrib_aligned=no])
54
+	])
55
+AC_MSG_RESULT([$have_cv_attrib_aligned])
56
+
57
+if test "$have_cv_attrib_packed" = no -a "$have_cv_pragma_pack" = no -a "$have_cv_pragma_pack_hpux" = no; then
58
+	AC_MSG_ERROR(Need to know how to pack structures with this compiler)
59
+fi
60
+
61
+if test "$have_cv_attrib_packed" = yes; then
62
+	AC_DEFINE([HAVE_ATTRIB_PACKED], 1, [attrib packed])
63
+fi
64
+
65
+if test "$have_cv_attrib_aligned" = yes; then
66
+	AC_DEFINE([HAVE_ATTRIB_ALIGNED], 1, [attrib aligned])
67
+fi
68
+
69
+dnl Sanity check that struct packing works
70
+AC_MSG_CHECKING([that structure packing works])
71
+AC_CACHE_VAL([have_cv_struct_pack],[
72
+    AC_TRY_RUN([
73
+#ifndef HAVE_ATTRIB_PACKED
74
+#define __attribute__(x)
75
+#endif
76
+#ifdef HAVE_PRAGMA_PACK
77
+#pragma pack(1) /* has to be in column 1 ! */
78
+#endif
79
+#ifdef HAVE_PRAGMA_PACK_HPPA
80
+#pragma pack 1 /* has to be in column 1 ! */
81
+#endif
82
+
83
+struct { char c __attribute__((packed)); long l __attribute__((packed)); } s;
84
+
85
+#ifdef HAVE_PRAGMA_PACK
86
+#pragma pack()
87
+#endif
88
+#ifdef HAVE_PRAGMA_PACK_HPPA
89
+#pragma pack
90
+#endif
91
+
92
+struct { char c; long l;} s2;
93
+
94
+#ifdef HAVE_PRAGMA_PACK
95
+#pragma pack(1) /* has to be in column 1 ! */
96
+#endif
97
+#ifdef HAVE_PRAGMA_PACK_HPPA
98
+#pragma pack 1 /* has to be in column 1 ! */
99
+#endif
100
+
101
+struct { char c; long l; } __attribute__((packed)) s3;
102
+
103
+#ifdef HAVE_PRAGMA_PACK
104
+#pragma pack()
105
+#endif
106
+#ifdef HAVE_PRAGMA_PACK_HPPA
107
+#pragma pack
108
+#endif
109
+
110
+    int main(int argc, char **argv) {
111
+        if (sizeof(s)!=sizeof(s.c)+sizeof(s.l))
112
+	    return 1;
113
+	if (sizeof(s) != sizeof(s3))
114
+	    return 2;
115
+	return (sizeof(s2) >= sizeof(s)) ? 0 : 3;
116
+    }],
117
+    [have_cv_struct_pack=yes],
118
+    [have_cv_struct_pack=no],
119
+    [have_cv_struct_pack=yes])
120
+])
121
+AC_MSG_RESULT([$have_cv_struct_pack])
122
+
123
+if test "$have_cv_struct_pack" = "no"; then
124
+    AC_MSG_ERROR([Structure packing seems to be available, but is not working with this compiler])
125
+fi
0 126
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+AC_ARG_ENABLE(coverage,
1
+	      AC_HELP_STRING([--enable-coverage],
2
+			     [turn on test coverage
3
+			      @<:@default=no@:>@]),
4
+[enable_cov=$enableval],[enable_cov="no"])
5
+
6
+if test "x$enable_coverage" = "xyes"; then
7
+	if test "x$CHECK_LIBS" = "x"; then
8
+		AC_MSG_ERROR([Coverage testing required, but unit tests not enabled!])
9
+	fi
10
+	if test "x$ac_compiler_gnu" != "xyes"; then
11
+		AC_MSG_ERROR([coverage testing only works if gcc is used])
12
+	fi
13
+
14
+	CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
15
+	LDFLAGS="$LDFLAGS -lgcov"
16
+	AC_CHECK_PROGS(GCOV, gcov, false)
17
+	AC_CHECK_PROGS(LCOV, lcov, false)
18
+	AC_CHECK_PROGS(GENHTML, genhtml, false)
19
+fi
20
+
21
+AM_CONDITIONAL(ENABLE_COVERAGE, test "x$enable_coverage" = "xyes")
0 22
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+AC_MSG_CHECKING([for ctime_r])
1
+if test "$ac_cv_func_ctime_r" = "yes"; then
2
+    AC_TRY_COMPILE([
3
+	#include <time.h>
4
+    ],[
5
+	char buf[31];
6
+	time_t t;
7
+	ctime_r(&t, buf, 30);
8
+    ],[
9
+	ac_cv_ctime_args=3
10
+	AC_DEFINE([HAVE_CTIME_R_3],1,[ctime_r takes 3 arguments])
11
+    ],[
12
+	ac_cv_ctime_args=2
13
+	AC_DEFINE([HAVE_CTIME_R_2],1,[ctime_r takes 2 arguments])
14
+    ])
15
+
16
+    AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments])
17
+fi
0 18
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+AC_C_DNS
0 1
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+AC_ARG_ENABLE([fanotify],
1
+[  --disable-fanotify	  disable fanotify support (Linux only)],
2
+want_fanotify=$enableval, want_fanotify="yes")
0 3
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+AC_C_FDPASSING
0 1
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+AX_CHECK_UNAME_SYSCALL
1
+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"])
2
+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")])
3
+
4
+AC_CHECK_FUNCS([poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat strcasestr inet_ntop setgroups initgroups ctime_r mkstemp mallinfo madvise])
5
+AC_FUNC_FSEEKO
6
+
7
+dnl Check if anon maps are available, check if we can determine the page size
8
+AC_C_FUNC_MMAP_PRIVATE
9
+AC_C_FUNC_PAGESIZE
10
+AC_C_FUNC_MMAP_ANONYMOUS
11
+
12
+AC_CHECK_FUNCS([enable_extended_FILE_stdio])
0 13
new file mode 100644
... ...
@@ -0,0 +1,32 @@
0
+dnl we need to try to link with iconv, otherwise there could be a 
1
+dnl mismatch between a 32-bit and 64-bit lib. Detect this at configure time.
2
+dnl we need to check after zlib/bzip2, because they can change the include path
3
+AC_ARG_WITH([iconv], [  --with-iconv supports iconv() (default=auto)],
4
+[
5
+ case "$withval" in
6
+	 yes|no) wiconv="$withval";;
7
+	 *) AC_MSG_ERROR([--with-iconv does not take an argument]);;
8
+ esac],
9
+[ wiconv=auto ])
10
+if test "X$wiconv" != "Xno"; then
11
+	AC_CHECK_LIB([iconv], [libiconv_open], LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -liconv")
12
+	AC_MSG_CHECKING([for iconv])
13
+	save_LIBS="$LIBS"
14
+	LIBS="$LIBCLAMAV_LIBS"
15
+	AC_TRY_LINK([
16
+		     #include <iconv.h>
17
+	],[
18
+	char** xin,**xout;
19
+	unsigned long il,ol;
20
+	int rc;
21
+	iconv_t iconv_struct = iconv_open("UTF-16BE","UTF-8");
22
+	rc = iconv(iconv_struct,xin,&il,xout,&ol);
23
+	iconv_close(iconv_struct);
24
+],[
25
+   AC_MSG_RESULT(yes)
26
+   AC_DEFINE([HAVE_ICONV], 1, [iconv() available])
27
+],[
28
+	AC_MSG_RESULT(no)
29
+])
30
+	LIBS="$save_LIBS"
31
+fi
0 32
new file mode 100644
... ...
@@ -0,0 +1,12 @@
0
+dnl check for in_addr_t definition
1
+AC_MSG_CHECKING([for in_addr_t definition])
2
+AC_TRY_COMPILE([
3
+#include <sys/types.h>
4
+#include <netinet/in.h>
5
+],
6
+[ in_addr_t pt; pt = 0; return pt; ],
7
+[
8
+    AC_MSG_RESULT(yes)
9
+    AC_DEFINE([HAVE_IN_ADDR_T],1,[in_addr_t is defined])
10
+],
11
+AC_MSG_RESULT(no))
0 12
new file mode 100644
... ...
@@ -0,0 +1,12 @@
0
+dnl check for in_port_t definition
1
+AC_MSG_CHECKING([whether in_port_t is defined])
2
+AC_TRY_COMPILE([
3
+#include <sys/types.h>
4
+#include <netinet/in.h>
5
+],
6
+[in_port_t pt; pt = 0; return pt;],
7
+[
8
+    AC_MSG_RESULT(yes)
9
+    AC_DEFINE([HAVE_IN_PORT_T],1,[in_port_t is defined])
10
+],
11
+AC_MSG_RESULT(no))
0 12
new file mode 100644
... ...
@@ -0,0 +1,39 @@
0
+AC_ARG_ENABLE([ipv6],
1
+[  --disable-ipv6          disable IPv6 support],
2
+want_ipv6=$enableval, want_ipv6="yes")
3
+
4
+if test "$want_ipv6" = "yes"
5
+then
6
+    AC_MSG_CHECKING([for IPv6 support])
7
+    AC_CACHE_VAL([have_cv_ipv6],[
8
+		AC_TRY_RUN([
9
+		    #include <sys/types.h>
10
+		    #include <sys/socket.h>
11
+		    #include <netdb.h>
12
+		    #include <unistd.h>
13
+		    int main(int argc, char **argv)
14
+		    {
15
+			    struct addrinfo *res, hints;
16
+			    int sd;
17
+
18
+			if((sd = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
19
+			    return 1;
20
+			close(sd);
21
+			/* also check if getaddrinfo() handles AF_UNSPEC -- bb#1196 */
22
+			memset(&hints, 0, sizeof(hints));
23
+			hints.ai_family = AF_UNSPEC;
24
+			if(getaddrinfo("127.0.0.1", NULL, &hints, &res) < 0)
25
+			    return 1;
26
+			freeaddrinfo(res);
27
+			return 0;
28
+		    }
29
+		],
30
+		[have_cv_ipv6=yes],
31
+		[have_cv_ipv6=no],
32
+		[have_cv_ipv6=no])
33
+		])
34
+    AC_MSG_RESULT([$have_cv_ipv6])
35
+    if test "$have_cv_ipv6" = yes; then
36
+	AC_DEFINE(SUPPORT_IPv6, 1, [Support for IPv6])
37
+    fi
38
+fi
0 39
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+AC_ARG_ENABLE([mempool],[  --disable-mempool       disable memory pools], enable_mempool=$enableval, enable_mempool="yes")
1
+have_mempool="no"
2
+if test "$enable_mempool" = "yes"; then
3
+	if test "$ac_cv_c_mmap_private" != "yes"; then
4
+		AC_MSG_NOTICE([****** mempool support disabled (mmap not available or not usable)])
5
+	else
6
+		if test "$ac_cv_c_can_get_pagesize" != "yes"; then
7
+			AC_MSG_NOTICE([****** mempool support disabled (pagesize cannot be determined)])
8
+		else
9
+			if test "$ac_cv_c_mmap_anonymous" = "no"; then
10
+				AC_MSG_NOTICE([****** mempool support disabled (anonymous mmap not available)])
11
+			else
12
+				AC_DEFINE([USE_MPOOL],1,[enable memory pools])
13
+				have_mempool="yes"
14
+			fi
15
+		fi
16
+	fi
17
+fi
0 18
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+if test "$have_pthreads" = "yes"
1
+then
2
+    save_LIBS="$LIBS"
3
+    LIBS="$THREAD_LIBS $LIBS"
4
+    AC_CHECK_FUNCS([sched_yield pthread_yield])
5
+    LIBS="$save_LIBS"
6
+    AC_DEFINE([BUILD_CLAMD], 1, "build clamd")
7
+    dnl define these here, so we don't forget any system
8
+    AC_DEFINE([CL_THREAD_SAFE],1,[thread safe])
9
+    AC_DEFINE([_REENTRANT],1,[thread safe])
10
+fi
0 11
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+AC_ARG_ENABLE([pthreads],
1
+[  --disable-pthreads      disable POSIX threads support],
2
+have_pthreads=$enableval,)
0 3
new file mode 100644
... ...
@@ -0,0 +1,46 @@
0
+dnl Check for readdir_r and number of its arguments
1
+dnl Code from libwww/configure.in
2
+
3
+AC_MSG_CHECKING([for readdir_r])
4
+if test -z "$ac_cv_readdir_args"; then
5
+    AC_TRY_COMPILE(
6
+    [
7
+#include <sys/types.h>
8
+#include <dirent.h>
9
+    ],
10
+    [
11
+    struct dirent dir, *dirp;
12
+    DIR *mydir;
13
+    dirp = readdir_r(mydir, &dir);
14
+    ], ac_cv_readdir_args=2)
15
+fi
16
+if test -z "$ac_cv_readdir_args"; then
17
+    AC_TRY_COMPILE(
18
+        [
19
+#include <sys/types.h>
20
+#include <dirent.h>
21
+    ],
22
+    [
23
+        struct dirent dir, *dirp;
24
+        DIR *mydir;
25
+        int rc;
26
+        rc = readdir_r(mydir, &dir, &dirp);
27
+    ], ac_cv_readdir_args=3)
28
+fi
29
+
30
+AC_ARG_ENABLE([readdir_r],
31
+[  --enable-readdir_r		    enable support for readdir_r],
32
+enable_readdir_r=$enableval, enable_readdir_r="no")
33
+
34
+if test "$enable_readdir_r" = "no"; then
35
+    AC_MSG_RESULT(support disabled)
36
+elif test -z "$ac_cv_readdir_args"; then
37
+    AC_MSG_RESULT(no)
38
+else
39
+    if test "$ac_cv_readdir_args" = 2; then
40
+	AC_DEFINE([HAVE_READDIR_R_2],1,[readdir_r takes 2 arguments])
41
+    elif test "$ac_cv_readdir_args" = 3; then
42
+	AC_DEFINE([HAVE_READDIR_R_3],1,[readdir_r takes 3 arguments])
43
+    fi
44
+    AC_MSG_RESULT([yes, and it takes $ac_cv_readdir_args arguments])
45
+fi
0 46
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+AC_ARG_ENABLE([cr],
1
+[  --disable-cr		  don't link with C reentrant library (BSD) ],
2
+use_cr=$enableval,)
0 3
new file mode 100644
... ...
@@ -0,0 +1,52 @@
0
+dnl Check if <sys/select.h> needs to be included for fd_set
1
+AC_MSG_CHECKING([for fd_set])
2
+AC_HEADER_EGREP([fd_mask], [sys/select.h], [have_fd_set=yes])
3
+if test "$have_fd_set" = yes; then
4
+	AC_DEFINE([HAVE_SYS_SELECT_H], 1, "have <sys/select.h>")
5
+	AC_MSG_RESULT([yes, found in sys/select.h])
6
+else
7
+	AC_TRY_COMPILE([#include <sys/time.h>
8
+			#include <sys/types.h>
9
+			#ifdef HAVE_UNISTD_H
10
+			#include <unistd.h>
11
+			#endif],
12
+		[fd_set readMask, writeMask;], have_fd_set=yes, have_fd_set=no)
13
+	if test "$have_fd_set" = yes; then
14
+		AC_MSG_RESULT([yes, found in sys/types.h])
15
+	else
16
+		AC_DEFINE([NO_FD_SET], 1, "no fd_set")
17
+		AC_MSG_RESULT(no)
18
+	fi
19
+fi
20
+
21
+AC_MSG_CHECKING([default FD_SETSIZE value])
22
+AC_TRY_RUN([
23
+#include <stdio.h>
24
+#include <unistd.h>
25
+#include <sys/time.h>
26
+#ifdef HAVE_SYS_SELECT_H
27
+#include <sys/select.h>
28
+#endif
29
+#ifdef HAVE_SYS_TYPES_H
30
+#include <sys/types.h>
31
+#endif
32
+#include <errno.h>
33
+int main(void) {
34
+        FILE *fp = fopen("conftestval", "w");
35
+	if(fp) {
36
+		if(fprintf (fp, "%d\n", FD_SETSIZE) < 1)  {
37
+			perror("fprintf failed");
38
+			return errno;
39
+		}
40
+	} else {
41
+		perror("fopen failed");
42
+		return errno;
43
+	}
44
+        return 0;
45
+}
46
+],
47
+DEFAULT_FD_SETSIZE=`cat conftestval`,
48
+DEFAULT_FD_SETSIZE=256,
49
+DEFAULT_FD_SETSIZE=256)
50
+AC_MSG_RESULT([$DEFAULT_FD_SETSIZE])
51
+AC_DEFINE_UNQUOTED([DEFAULT_FD_SETSIZE], $DEFAULT_FD_SETSIZE, "default FD_SETSIZE value")
0 52
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+dnl AC_FUNC_SETPGRP does not work when cross compiling
1
+dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
2
+dnl testcase from gdb/configure.ac
3
+if test "$cross_compiling" = no; then
4
+ AC_FUNC_SETPGRP
5
+else
6
+ AC_CACHE_CHECK([whether setpgrp takes no argument], [ac_cv_func_setpgrp_void],
7
+   [AC_TRY_COMPILE([
8
+#include <unistd.h>
9
+], [
10
+ if (setpgrp(1,1) == -1)
11
+   exit (0);
12
+ else
13
+   exit (1);
14
+], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)])
15
+if test $ac_cv_func_setpgrp_void = yes; then
16
+ AC_DEFINE([SETPGRP_VOID], 1)
17
+fi
18
+fi
0 19
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+dnl Check signed right shift implementation
1
+AC_MSG_CHECKING([whether signed right shift is sign extended])
2
+AC_TRY_RUN([int main(void){int a=-1;int b=a>>1;return(a!=b);}],
3
+    [have_signed_rightshift_extended=yes],
4
+    [have_signed_rightshift_extended=no],
5
+    [have_signed_rightshift_extended=no])
6
+if test $have_signed_rightshift_extended = yes; then
7
+    AC_DEFINE([HAVE_SAR], 1, [Define signed right shift implementation])
8
+fi
9
+AC_MSG_RESULT([$have_signed_rightshift_extended]);
0 10
new file mode 100644
... ...
@@ -0,0 +1,41 @@
0
+dnl Determine socklen_t type. Code from lftp.
1
+AC_MSG_CHECKING([for socklen_t])
2
+AC_CACHE_VAL([ac_cv_socklen_t],
3
+[
4
+    ac_cv_socklen_t=no
5
+    AC_TRY_COMPILE([
6
+	#include <sys/types.h>
7
+        #include <sys/socket.h>
8
+    ],
9
+    [
10
+	socklen_t len;
11
+        getpeername(0,0,&len);
12
+    ],
13
+    [
14
+	ac_cv_socklen_t=yes
15
+    ])
16
+])
17
+AC_MSG_RESULT([$ac_cv_socklen_t])
18
+    if test $ac_cv_socklen_t = no; then
19
+    AC_MSG_CHECKING([for socklen_t equivalent])
20
+    AC_CACHE_VAL([ac_cv_socklen_t_equiv],
21
+    [
22
+	ac_cv_socklen_t_equiv=int
23
+        for t in int size_t unsigned long "unsigned long"; do
24
+	    AC_TRY_COMPILE([
25
+		#include <sys/types.h>
26
+		#include <sys/socket.h>
27
+	    ],
28
+            [
29
+		$t len;
30
+		getpeername(0,0,&len);
31
+            ],
32
+            [
33
+		ac_cv_socklen_t_equiv="$t"
34
+		break
35
+            ])
36
+	done
37
+    ])
38
+    AC_MSG_RESULT([$ac_cv_socklen_t_equiv])
39
+    AC_DEFINE_UNQUOTED([socklen_t], $ac_cv_socklen_t_equiv, [Define to "int" if <sys/socket.h> does not define.])
40
+fi
0 41
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+AC_MSG_CHECKING([stat64])
1
+AC_TRY_RUN([
2
+#define _LARGEFILE_SOURCE
3
+#define _LARGEFILE64_SOURCE
4
+#include <stdio.h>
5
+#include <sys/types.h>
6
+#include <sys/stat.h>
7
+#include <unistd.h>
8
+#include <errno.h>
9
+
10
+int main(void) {
11
+    struct stat64 sb;
12
+
13
+    if (stat64(".", &sb) == -1)
14
+        return errno;
15
+
16
+    return 0;
17
+}
18
+],
19
+[enable_stat64=yes],
20
+[enable_stat64=no],
21
+[enable_stat64=no],
22
+)
23
+
24
+if test "$enable_stat64" != "no"; then
25
+AC_DEFINE([HAVE_STAT64],1,[enable stat64])
26
+CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
27
+fi
28
+AC_MSG_RESULT([$enable_stat64])
0 29
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+enable_check_ut=auto
1
+enable_ut_install=no
2
+AC_ARG_ENABLE(check,
3
+[  --enable-check           Enable 'check' unit tests (default=auto)], enable_check_ut=$enableval, enable_check_ut="auto" )
4
+
5
+if test "$enable_check_ut" != "no" ; then
6
+	AC_LIB_FIND([check],[check.h],
7
+			AC_LANG_PROGRAM([#include <check.h>],[srunner_create(0)]),
8
+			[CHECK_CPPFLAGS="$INCCHECK"; CHECK_LIBS="$LTLIBCHECK"],
9
+			[])
10
+fi
11
+AC_SUBST([CHECK_CPPFLAGS])
12
+AC_SUBST([CHECK_LIBS])
13
+AM_CONDITIONAL([HAVE_LIBCHECK],test "X$HAVE_LIBCHECK" = "Xyes")
14
+
15
+if test "x$CHECK_LIBS" = "x" -a "$enable_check_ut" = "yes"; then
16
+    AC_MSG_ERROR([
17
+
18
+ERROR!  Check was configured, but not found.  Get it from http://check.sf.net/
19
+])
20
+fi
0 21
new file mode 100644
... ...
@@ -0,0 +1,285 @@
0
+AC_ARG_ENABLE([gcc-vcheck],
1
+[  --disable-gcc-vcheck	  do not check for buggy gcc version ],
2
+gcc_check=$enableval, gcc_check="yes")
3
+
4
+msg_gcc_check="use --disable-gcc-vcheck to disable this check. Before reporting any bugs check with a supported version of gcc"
5
+VERSION_SUFFIX=
6
+dnl Check for gcc-4.1.0
7
+if test "$gcc_check" = "yes"; then
8
+	if test "x$ac_compiler_gnu" = "xyes"; then
9
+		AC_MSG_CHECKING([for a supported version of gcc])
10
+		gcc_version=`${CC} -dumpversion`
11
+		case "${gcc_version}" in
12
+			4.1.0*)
13
+				AC_MSG_RESULT([no (${gcc_version})])
14
+				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)])
15
+				;;
16
+			*)
17
+				AC_MSG_RESULT([ok (${gcc_version})])
18
+				;;
19
+		esac
20
+		case "${gcc_version}" in
21
+		    [[56789]].* | 4.[[3456789]].*)
22
+			# bb #1581 - temporarely add -fno-strict-aliasing so gcc 4.4.0
23
+			# works correctly
24
+			CFLAGS="$CFLAGS -fno-strict-aliasing"
25
+			;;
26
+		    *)
27
+			;;
28
+		esac
29
+	fi
30
+else
31
+	CFLAGS="$CFLAGS -O0"
32
+	VERSION_SUFFIX="$VERSION_SUFFIX-broken-compiler"
33
+fi
34
+
35
+# add distcheck warning flags
36
+distcheck_enable_flags=0
37
+if test "x$ac_compiler_gnu" = "xyes"; then
38
+	gcc_version=`${CC} -dumpversion`
39
+	case "${gcc_version}" in
40
+		4.[[3456789]]*)
41
+			distcheck_enable_flags=1
42
+			;;
43
+		[[56789]].*)
44
+			distcheck_enable_flags=1
45
+			;;
46
+	esac
47
+fi
48
+
49
+dnl Checks if compiler produces valid code, regardless of compiler
50
+dnl we do these checks here to avoid receiving endless bugreports about
51
+dnl breakages due to compiler bugs.
52
+
53
+dnl Check if compiler produces invalid code on gcc PR27603 (affects upx.c)
54
+dnl testcase from gcc testsuite
55
+AC_MSG_CHECKING([for gcc bug PR27603])
56
+AC_TRY_RUN(
57
+	   [
58
+/* (C) Richard Guenther */	   
59
+void exit (int);
60
+void abort (void);
61
+int a;
62
+int main(void)
63
+{
64
+  int j;
65
+  for (j = 0; j < 6; j++)
66
+  {
67
+    if ((unsigned)j - 3 <= 1)
68
+      exit (0);
69
+    a = 1000 * (6 - j);
70
+  }
71
+  abort ();
72
+}
73
+], [AC_MSG_RESULT([ok, bug not present])],
74
+[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])])
75
+
76
+dnl Check if compiler produces invalid code on gcc PR26763-2 (affects upx.c)
77
+dnl testcase from gcc testsuite
78
+AC_MSG_CHECKING([for gcc bug PR26763-2])
79
+AC_TRY_RUN(
80
+	   [
81
+/* (C) Richard Guenther */	   
82
+extern void abort(void);
83
+
84
+static int try (char *a, int d)
85
+{
86
+  return a + d > a;
87
+}
88
+
89
+int main(void)
90
+{
91
+  char bla[100];
92
+
93
+  if (try (bla + 50, -1))
94
+    abort ();
95
+
96
+  return 0;
97
+}
98
+], [AC_MSG_RESULT([ok, bug not present])],
99
+[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])])
100
+
101
+dnl Check if compiler produces invalid code on own testcase based on upx.c
102
+AC_MSG_CHECKING([for valid code generation of CLI_ISCONTAINED])
103
+AC_TRY_RUN(
104
+	   [
105
+#include <stdio.h>
106
+static struct v{
107
+	char* dst;
108
+	unsigned int dsize;
109
+	unsigned int dcur;
110
+	unsigned int backsize;
111
+	signed int unp_offset;
112
+} values[] = {
113
+	{(char*)0xf78ab008, 0x2e000, 1, 4, -1594},
114
+	{(char*)0xb7af1008, 0x2e000, 1, 4, -1594}
115
+
116
+};
117
+extern void abort(void);
118
+
119
+#define CLI_ISCONTAINED(bb, bb_size, sb, sb_size)	\
120
+  ((bb_size) > 0 && (sb_size) > 0 && (size_t)(sb_size) <= (size_t)(bb_size) \
121
+   && (sb) >= (bb) && ((sb) + (sb_size)) <= ((bb) + (bb_size)) && ((sb) + (sb_size)) > (bb) && (sb) < ((bb) + (bb_size)))
122
+
123
+int crashtest()
124
+{
125
+	unsigned int backsize, dcur;
126
+	int dval=0x12000, unp_offset;
127
+	int* dsize = &dval;
128
+	char* dst = (char*)0x12000;
129
+	while(1) {
130
+		backsize=4;
131
+		dcur=0;
132
+		unp_offset=0x800002c7;
133
+
134
+		if (!CLI_ISCONTAINED(dst, *dsize, dst+dcur+unp_offset, backsize) || !CLI_ISCONTAINED(dst, *dsize, dst+dcur, backsize) || unp_offset >=0)
135
+			return -1;
136
+		abort();
137
+	}
138
+	return 0;
139
+}
140
+
141
+int main(void)
142
+{
143
+	int i;
144
+	for(i=0;i<sizeof(values)/sizeof(values[0]);i++) {
145
+		struct v* v= &values[i];
146
+		char* dst = v->dst;
147
+		unsigned int* dsize = &v->dsize;
148
+		unsigned int dcur = v->dcur;
149
+		unsigned int backsize = v->backsize-1;
150
+		signed int  unp_offset = v->unp_offset;
151
+
152
+		if(!CLI_ISCONTAINED(dst, *dsize, dst+dcur+unp_offset, backsize) ||
153
+				!CLI_ISCONTAINED(dst, *dsize,dst+dcur,backsize) || unp_offset >= 0)  {
154
+			continue;
155
+		}
156
+		abort();
157
+	}
158
+	crashtest();
159
+	return 0;
160
+}
161
+], [AC_MSG_RESULT([ok, bug not present])],
162
+[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])])
163
+
164
+dnl Check if compiler produces invalid code on gcc PR28045 (affects upx.c)
165
+dnl testcase from gcc testsuite
166
+AC_MSG_CHECKING([for gcc bug PR28045])
167
+AC_TRY_RUN(
168
+	   [
169
+/* (C) Andrew Pinski */
170
+extern void abort(void);
171
+struct a
172
+{
173
+   unsigned int bits : 1;
174
+   signed long val : ((sizeof(long) * 8) - 1);
175
+};
176
+static int Fnegate (struct a b)
177
+{
178
+  if ((-((long)b.val)) <= ((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))
179
+      && (-((long)b.val)) >= (-(((long) ((1UL << ((sizeof(long) * 8) - 2)) -1UL))) - 1))
180
+     return 0 ;
181
+  abort ();
182
+}
183
+int main (void)
184
+{
185
+  struct a b = {1, 1};
186
+  Fnegate (b);
187
+  return 0;
188
+}
189
+], [AC_MSG_RESULT([ok, bug not present])],
190
+[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])])
191
+
192
+dnl Check if compiler produces invalid code on gcc PR37573 (affects autoit.c)
193
+dnl this is a bug in gcc 4.4.0, but for some reason it affects gcc 4.1.2 too
194
+dnl gcc 4.1.3 is OK. This bug occurs only at -O3.
195
+AC_MSG_CHECKING([for gcc bug PR37573])
196
+AC_TRY_RUN(
197
+	   [
198
+#include <stdlib.h>
199
+#include <string.h>
200
+struct S
201
+{
202
+  unsigned int *a;
203
+  unsigned int b;
204
+  unsigned int c[624];
205
+};
206
+static unsigned char
207
+foo (struct S *s)
208
+{
209
+  unsigned int r;
210
+  if (!--s->b)
211
+    {
212
+      unsigned int *c = s->c;
213
+      unsigned int i;
214
+      s->a = c;
215
+      for (i = 0; i < 227; i++)
216
+	c[i] =
217
+	  ((((c[i] ^ c[i + 1]) & 0x7ffffffe) ^ c[i]) >> 1) ^
218
+	  ((0 - (c[i + 1] & 1)) & 0x9908b0df) ^ c[i + 397];
219
+      for (; i < 623; i++)
220
+	c[i] =
221
+	  ((((c[i] ^ c[i + 1]) & 0x7ffffffe) ^ c[i]) >> 1) ^
222
+	  ((0 - (c[i + 1] & 1)) & 0x9908b0df) ^ c[i - 227];
223
+      c[623] =
224
+	((((c[623] ^ c[0]) & 0x7ffffffe) ^ c[623]) >> 1) ^ ((0 - (c[0] & 1)) &
225
+							    0x9908b0df) ^ c[i
226
+									    -
227
+									    227];
228
+    }
229
+  r = *(s->a++);
230
+  r ^= (r >> 11);
231
+  r ^= ((r & 0xff3a58ad) << 7);
232
+  r ^= ((r & 0xffffdf8c) << 15);
233
+  r ^= (r >> 18);
234
+  return (unsigned char) (r >> 1);
235
+}
236
+
237
+void
238
+bar (unsigned char *p, unsigned int q, unsigned int r)
239
+{
240
+  struct S s;
241
+  unsigned int i;
242
+  unsigned int *c = s.c;
243
+  *c = r;
244
+  for (i = 1; i < 624; i++)
245
+    c[i] = i + 0x6c078965 * ((c[i - 1] >> 30) ^ c[i - 1]);
246
+  s.b = 1;
247
+  while (q--)
248
+    *p++ ^= foo (&s);
249
+};
250
+
251
+static unsigned char p[23] = {
252
+  0xc0, 0x49, 0x17, 0x32, 0x62, 0x1e, 0x2e, 0xd5, 0x4c, 0x19, 0x28, 0x49,
253
+    0x91, 0xe4, 0x72, 0x83, 0x91, 0x3d, 0x93, 0x83, 0xb3, 0x61, 0x38
254
+};
255
+
256
+static unsigned char q[23] = {
257
+  0x3e, 0x41, 0x55, 0x54, 0x4f, 0x49, 0x54, 0x20, 0x55, 0x4e, 0x49, 0x43,
258
+    0x4f, 0x44, 0x45, 0x20, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x3c
259
+};
260
+
261
+int
262
+main (void)
263
+{
264
+  unsigned int s;
265
+  s = 23;
266
+  bar (p, s, s + 0xa25e);
267
+  if (memcmp (p, q, s) != 0)
268
+	abort ();
269
+  return 0;
270
+}
271
+
272
+], [AC_MSG_RESULT([ok, bug not present])],
273
+[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])])
274
+
275
+# It's not fatal if gperf is missing
276
+AM_MISSING_PROG(GPERF, gperf)
277
+AC_SUBST(GPERF)
278
+
279
+AC_TYPE_OFF_T
280
+AC_COMPILE_CHECK_SIZEOF([short])
281
+AC_COMPILE_CHECK_SIZEOF([int])
282
+AC_COMPILE_CHECK_SIZEOF([long])
283
+AC_COMPILE_CHECK_SIZEOF([long long])
284
+AC_COMPILE_CHECK_SIZEOF([void *])
0 285
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+AC_ARG_WITH([version], 
1
+[  --with-version=STR    use custom version string (dev only)],
2
+VERSION="$withval", )
0 3
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+AC_ARG_WITH([dbdir], 
1
+[  --with-dbdir=path	  path to virus database directory],
2
+db_dir="$withval", db_dir="_default_")
3
+
4
+dnl I had problems with $pkgdatadir thus these funny checks
5
+if test "$db_dir" = "_default_"
6
+then
7
+    if test "$prefix" = "NONE"
8
+    then
9
+	db_dir="$ac_default_prefix/share/clamav"
10
+    else
11
+	db_dir="$prefix/share/clamav"
12
+    fi
13
+fi
14
+
15
+AC_DEFINE_UNQUOTED([DATADIR],"$db_dir", [Path to virus database directory.])
16
+DBDIR="$db_dir"
17
+AC_SUBST([DBDIR])
0 18
new file mode 100644
... ...
@@ -0,0 +1,6 @@
0
+if test "$enable_debug" = "yes"; then
1
+  VERSION_SUFFIX="$VERSION_SUFFIX-debug"
2
+  AC_DEFINE([CL_DEBUG],1,[enable debugging])
3
+else
4
+  AC_DEFINE([NDEBUG],1,[disable assertions])
5
+fi
0 6
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+AC_ARG_ENABLE([distcheck-werror],
1
+	      AC_HELP_STRING([--enable-distcheck-werror],
2
+			     [enable warnings as error for distcheck
3
+			      @<:@default=no@:>@]),
4
+[enable_distcheckwerror=$enableval],[enable_distcheckwerror="no"])
5
+
6
+# Enable distcheck warnings and Werror only for gcc versions that support them,
7
+# and only after we've run the configure tests.
8
+# Some configure tests fail (like checking for cos in -lm) if we enable these
9
+# Werror flags for configure too (for example -Wstrict-prototypes makes
10
+# configure think that -lm doesn't have cos, hence its in libc).
11
+WERR_CFLAGS=
12
+WERR_CFLAGS_MILTER=
13
+if test "x$enable_distcheckwerror" = "xyes"; then
14
+    if test "$distcheck_enable_flags" = "1"; then
15
+	WERR_COMMON="-Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wno-error=strict-aliasing -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 -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-but-set-variable -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"
16
+	WERR_CFLAGS="$WERR_COMMON -Wwrite-strings"
17
+	WERR_CFLAGS_MILTER="$WERR_COMMON -Wno-error=format-nonliteral"
18
+    fi
19
+fi
20
+AC_SUBST([WERR_CFLAGS])
21
+AC_SUBST([WERR_CFLAGS_MILTER])
0 22
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+AC_ARG_ENABLE([dns-fix],
1
+[  --enable-dns-fix	  enable workaround for broken DNS servers (as in SpeedTouch 510)],
2
+enable_dnsfix=$enableval, enable_dnsfix="no")
3
+
4
+if test "$enable_dnsfix" = "yes"; then
5
+  AC_DEFINE([FRESHCLAM_DNS_FIX],1,[enable workaround for broken DNS servers])
6
+fi
0 7
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+AC_INCLUDES_DEFAULT
1
+
2
+AC_CHECK_HEADERS([stdint.h unistd.h sys/int_types.h dlfcn.h inttypes.h sys/inttypes.h sys/times.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])
3
+AC_CHECK_HEADER([syslog.h],AC_DEFINE([USE_SYSLOG],1,[use syslog]),)
4
+
5
+have_pthreads=no
6
+AC_CHECK_HEADER([pthread.h],[have_pthreads=yes])
7
+if test "$have_pthreads" = "yes"; then
8
+    AC_DEFINE([HAVE_PTHREAD_H],1,[Define to 1 if you have the <pthread.h> header file])
9
+fi
0 10
new file mode 100644
... ...
@@ -0,0 +1,82 @@
0
+
1
+AC_ARG_ENABLE([bzip2],
2
+[  --disable-bzip2	  disable bzip2 support],
3
+want_bzip2=$enableval, want_bzip2="yes")
4
+
5
+bzip_check="ok"
6
+if test "$want_bzip2" = "yes"
7
+then
8
+    AC_LIB_LINKFLAGS([bz2])
9
+    save_LDFLAGS="$LDFLAGS"
10
+    # Only add -L if prefix is not empty
11
+    test -z "$LIBBZ2_PREFIX" || LDFLAGS="$LDFLAGS -L$LIBBZ2_PREFIX/$acl_libdirstem";
12
+
13
+    have_bzprefix="no"
14
+    AC_CHECK_LIB([bz2], [BZ2_bzDecompressInit], [have_bzprefix="yes"])
15
+    if test "x$have_bzprefix" = "xno"; then
16
+        AC_DEFINE([NOBZ2PREFIX],1,[bzip funtions do not have bz2 prefix])
17
+    fi
18
+    LDFLAGS="$save_LDFLAGS"
19
+    if test "$HAVE_LIBBZ2" = "yes"; then
20
+	AC_CHECK_HEADER([bzlib.h],
21
+			[AC_C_CVE_2008_1372],
22
+			[ac_cv_c_cve_2008_1372="no"])
23
+	if test "$ac_cv_c_cve_2008_1372" = "bugged"; then
24
+		AC_MSG_WARN([****** bzip2 libraries are affected by the CVE-2008-1372 bug])
25
+		AC_MSG_WARN([****** We strongly suggest you to update to bzip2 1.0.5.])
26
+		AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
27
+		bzip_check="bugged (CVE-2008-1372)"
28
+	fi
29
+	if test "$ac_cv_c_cve_2008_1372" = "linkfailed"; then
30
+		dnl This shouldn't happen
31
+		dnl We failed to link but libtool may still be able to link, so don't disable bzip2 just yet
32
+		AC_MSG_WARN([****** Unable to link bzip2 testcase])
33
+		AC_MSG_WARN([****** You may be affected by CVE-2008-1372 bug, but I need to be able to link a testcase to verify])
34
+		AC_MSG_WARN([****** It is recommended to fix your build environment so that we can run the testcase!])
35
+		AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
36
+		bzip_check="link failed (CVE-2008-1372)"
37
+	fi
38
+
39
+	case "$ac_cv_c_cve_2008_1372" in
40
+	ok|bugged|linkfailed)
41
+		;;
42
+	*)
43
+		HAVE_LIBBZ2=no
44
+		;;
45
+	esac
46
+    fi
47
+
48
+    if test "$HAVE_LIBBZ2" = "yes"; then
49
+	AC_C_CVE_2010_0405
50
+	if test "$ac_cv_c_cve_2010_0405" = "bugged"; then
51
+		AC_MSG_WARN([****** bzip2 libraries are affected by the CVE-2010-0405 bug])
52
+		AC_MSG_WARN([****** We strongly suggest you to update bzip2])
53
+		AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
54
+		bzip_check="bugged (CVE-2010-0405)"
55
+	fi
56
+	if test "$ac_cv_c_cve_2010_0405" = "linkfailed"; then
57
+		dnl This shouldn't happen
58
+		dnl We failed to link but libtool may still be able to link, so don't disable bzip2 just yet
59
+		AC_MSG_WARN([****** Unable to link bzip2 testcase])
60
+		AC_MSG_WARN([****** You may be affected by CVE-2010-0405 bug, but I need to be able to link a testcase to verify])
61
+		AC_MSG_WARN([****** It is recommended to fix your build environment so that we can run the testcase!])
62
+		AC_MSG_WARN([****** Please do not report stability problems to the ClamAV developers!])
63
+		bzip_check="link failed (CVE-2010-0405)"
64
+	fi
65
+
66
+	case "$ac_cv_c_cve_2010_0405" in
67
+	ok|bugged|linkfailed)
68
+		LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $LTLIBBZ2"
69
+		AC_DEFINE([HAVE_BZLIB_H],1,[have bzip2])
70
+		;;
71
+	*)
72
+		AC_MSG_WARN([****** bzip2 support disabled])
73
+		;;
74
+	esac
75
+
76
+    else
77
+	AC_MSG_WARN([****** bzip2 support disabled])
78
+    fi
79
+fi
80
+
81
+AM_CONDITIONAL([HAVE_LIBBZ2], test "x$HAVE_LIBBZ2" = "xyes")
0 82
new file mode 100644
... ...
@@ -0,0 +1,41 @@
0
+have_curl="no"
1
+curl_msg="Please use the web interface for submitting FPs/FNs."
2
+AC_MSG_CHECKING([for libcurl installation])
3
+
4
+AC_ARG_WITH([libcurl],
5
+[  --with-libcurl=DIR   path to directory containing libcurl (default=
6
+    /usr/local or /usr if not found in /usr/local)],
7
+[
8
+if test "$withval"; then
9
+    LIBCURL_HOME="$withval"
10
+fi
11
+], [
12
+LIBCURL_HOME=/usr/local
13
+if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
14
+then
15
+    LIBCURL_HOME=/usr
16
+fi
17
+AC_MSG_RESULT([$LIBCURL_HOME])
18
+])
19
+
20
+if test ! -f "$LIBCURL_HOME/include/curl/curl.h"
21
+then
22
+    AC_MSG_WARN([libcurl not found. Please use the web interface for submitting FPs/FNs.])
23
+else
24
+    if test -f "$LIBCURL_HOME/bin/curl-config"; then
25
+        CURL_LDFLAGS=$($LIBCURL_HOME/bin/curl-config --libs)
26
+        CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags)
27
+    else
28
+        CURL_LDFLAGS="-L$LIBCURL_HOME/lib -lcurl"
29
+        CURL_CPPFLAGS="-I$LIBCURL_HOME/include"
30
+    fi
31
+
32
+    save_LDFLAGS="$LDFLAGS"
33
+    LDFLAGS="-L$LIBCURL_HOME/lib -lcurl"
34
+    AC_CHECK_LIB([curl], [curl_easy_init], [curl_msg="";have_curl="yes";CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS";CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"],
35
+            [AC_MSG_WARN([Your libcurl is misconfigured. Please use the web interface for submitting FPs/FNs.])])
36
+    LDFLAGS="$save_LDFLAGS"
37
+fi
38
+
39
+AC_SUBST([CLAMSUBMIT_LIBS])
40
+AC_SUBST([CLAMSUBMIT_CFLAGS])
0 41
new file mode 100644
... ...
@@ -0,0 +1,51 @@
0
+dnl Check for libconfig
1
+AC_MSG_CHECKING([for libconfig installation])
2
+
3
+AC_ARG_WITH([libconfig],
4
+[  --with-libconfig=DIR   path to directory containing libconfig (default=
5
+    /usr/local or /usr if not found in /usr/local)],
6
+[
7
+if test "$withval"; then
8
+    LIBCONFIG_HOME="$withval"
9
+fi
10
+], [
11
+LIBCONFIG_HOME=/usr/local
12
+if test ! -f "$LIBCONFIG_HOME/include/libconfig.h"
13
+then
14
+    LIBCONFIG_HOME=/usr
15
+fi
16
+AC_MSG_RESULT([$LIBCONFIG_HOME])
17
+])
18
+
19
+if test ! -f "$LIBCONFIG_HOME/include/libconfig.h"
20
+then
21
+    AC_MSG_ERROR([libconfig not found.])
22
+fi
23
+
24
+save_LDFLAGS="$LDFLAGS"
25
+LDFLAGS="-L$LIBCONFIG_HOME/lib -lconfig"
26
+AC_CHECK_LIB([config], [config_init], [FRESHCLAM_LIBS="$FRESHCLAM_LIBS -L$LIBCONFIG_HOME/lib -lconfig"],
27
+        [AC_MSG_ERROR([Your libconfig installation is misconfigured])])
28
+
29
+CLAMSCAN_LIBS="$CLAMSCAN_LIBS -L$LIBCONFIG_HOME/lib -lconfig"
30
+CLAMDSCAN_LIBS="$CLAMDSCAN_LIBS -L$LIBCONFIG_HOME/lib -lconfig"
31
+CLAMD_LIBS="$CLAMD_LIBS -L$LIBCONFIG_HOME/lib -lconfig"
32
+CLAMMEM_LIBS="$CLAMMEM_LIBS -L$LIBCONFIG_HOME/lib -lconfig"
33
+CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -L$LIBCONFIG_HOME/lib -lconfig"
34
+LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -L$LIBCONFIG_HOME/lib -lconfig"
35
+CLAMDTOP_LIBS="$CLAMDTOP_LIBS -L$LIBCONFIG_HOME/lib -lconfig"
36
+CLAMBC_LIBS="$CLAMBC_LIBS -L$LIBCONFIG_HOME/lib -lconfig"
37
+
38
+CLAMSCAN_CPPFLAGS="$FRESHCLAM_CPPFLAGS -I$LIBCONFIG_HOME/include"
39
+CLAMDSCAN_CPPFLAGS="$CLAMDSCAN_CPPFLAGS -I$LIBCONFIG_HOME/include"
40
+CLAMD_CPPFLAGS="$CLAMD_CPPFLAGS -I$LIBCONFIG_HOME/include"
41
+CLAMMEM_CPPFLAGS="$CLAMMEM_CPPFLAGS -I$LIBCONFIG_HOME/include"
42
+CLAMAV_MILTER_CPPFLAGS="$CLAMAV_MILTER_CPPFLAGS -I$LIBCONFIG_HOME/include"
43
+LIBCLAMAV_CPPFLAGS="$LIBCLAMAV_CPPFLAGS -I$LIBCONFIG_HOME/include"
44
+LIBCLAMSHARED_CPPFLAGS="$LIBCLAMSHARED_CPPFLAGS -I$LIBCONFIG_HOME/include"
45
+SIGTOOL_CPPFLAGS="$SIGTOOL_CPPFLAGS -I$LIBCONFIG_HOME/include"
46
+CLAMCONF_CPPFLAGS="$CLAMCONF_CPPFLAGS -I$LIBCONFIG_HOME/include"
47
+CLAMDTOP_CPPFLAGS="$CLAMDTOP_CPPFLAGS -I$LIBCONFIG_HOME/include"
48
+CLAMBC_CPPFLAGS="$CLAMBC_CPPFLAGS -I$LIBCONFIG_HOME/include"
49
+
50
+LDFLAGS="$save_ldflags"
0 51
new file mode 100644
... ...
@@ -0,0 +1,60 @@
0
+
1
+dnl Check for zlib
2
+AC_MSG_CHECKING([for zlib installation])
3
+AC_ARG_WITH([zlib],
4
+[  --with-zlib=DIR	  path to directory containing zlib library (default=
5
+			  /usr/local or /usr if not found in /usr/local)],
6
+[
7
+if test "$withval"; then
8
+  ZLIB_HOME="$withval"
9
+  AC_MSG_RESULT([using $ZLIB_HOME])
10
+fi
11
+], [
12
+ZLIB_HOME=/usr/local
13
+if test ! -f "$ZLIB_HOME/include/zlib.h"
14
+then
15
+  ZLIB_HOME=/usr
16
+fi
17
+AC_MSG_RESULT([$ZLIB_HOME])
18
+])
19
+
20
+CLAMDSCAN_LIBS="$FRESHCLAM_LIBS"
21
+
22
+AC_ARG_ENABLE([zlib-vcheck],
23
+[  --disable-zlib-vcheck	  do not check for buggy zlib version ],
24
+zlib_check=$enableval, zlib_check="yes")
25
+
26
+if test ! -f "$ZLIB_HOME/include/zlib.h"
27
+then
28
+    AC_MSG_ERROR([Please install zlib and zlib-devel packages])
29
+else
30
+
31
+    vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
32
+    if test -z "$vuln"; then
33
+	vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
34
+    fi
35
+
36
+    if test -n "$vuln"; then
37
+	if test "$zlib_check" = "yes"; then
38
+	    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!)
39
+	else
40
+	    AC_MSG_WARN([****** This ClamAV installation may be linked against])
41
+	    AC_MSG_WARN([****** a broken zlib version. Please DO NOT report any])
42
+	    AC_MSG_WARN([****** stability problems to the ClamAV developers!])
43
+	fi
44
+    fi
45
+
46
+    save_LIBS="$LIBS"
47
+    if test "$ZLIB_HOME" != "/usr"; then
48
+	CPPFLAGS="$CPPFLAGS -I$ZLIB_HOME/include"
49
+	save_LDFLAGS="$LDFLAGS"
50
+    LDFLAGS="$LDFLAGS -L$ZLIB_HOME/lib"
51
+    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]))
52
+	AC_CHECK_LIB([z], [gzopen], [], AC_MSG_ERROR([Your zlib is missing gzopen()]))
53
+	LDFLAGS="$save_LDFLAGS"
54
+    else
55
+	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]))
56
+	AC_CHECK_LIB([z], [gzopen],[], AC_MSG_ERROR([Your zlib is missing gzopen()]))
57
+    fi
58
+    LIBS="$save_LIBS"
59
+fi
0 60
new file mode 100644
... ...
@@ -0,0 +1,37 @@
0
+dnl Check for OpenSSL
1
+AC_MSG_CHECKING([for OpenSSL installation])
2
+
3
+AC_ARG_WITH([openssl],
4
+[  --with-openssl=DIR   path to directory containing openssl (default=
5
+    /usr/local or /usr if not found in /usr/local)],
6
+[
7
+if test "$withval"; then
8
+    LIBSSL_HOME="$withval"
9
+fi
10
+], [
11
+LIBSSL_HOME=/usr/local
12
+if test ! -f "$LIBSSL_HOME/include/openssl/ssl.h"
13
+then
14
+    LIBSSL_HOME=/usr
15
+fi
16
+AC_MSG_RESULT([$LIBSSL_HOME])
17
+])
18
+
19
+if test ! -f "$LIBSSL_HOME/include/openssl/ssl.h"
20
+then
21
+    AC_MSG_ERROR([OpenSSL not found.])
22
+fi
23
+
24
+SSL_LDFLAGS="-L$LIBSSL_HOME/lib -lssl"
25
+SSL_CPPFLAGS="-I$LIBSSL_HOME/include"
26
+
27
+save_LDFLAGS="$LDFLAGS"
28
+LDFLAGS="-L$LIBSSL_HOME/lib -lssl"
29
+AC_CHECK_LIB([ssl], [SSL_library_init], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS $SSL_LDFLAGS"],
30
+        [AC_MSG_ERROR([Your OpenSSL is misconfigured])])
31
+
32
+LDFLAGS="-L$LIBSSL_HOME/lib -lcrypto"
33
+AC_CHECK_LIB([crypto], [EVP_EncryptInit], [LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lcrypto"],
34
+        [AC_MSG_ERROR([Your OpenSSL installation is misconfigured])])
35
+
36
+LDFLAGS="$save_LDFLAGS"
0 37
new file mode 100644
... ...
@@ -0,0 +1,39 @@
0
+AC_ARG_ENABLE([unrar],
1
+[  --disable-unrar	  don't build libclamunrar and libclamunrar_iface ],
2
+want_unrar=$enableval, want_unrar="yes")
3
+AM_CONDITIONAL([ENABLE_UNRAR],[test "$want_unrar" = "yes"])
4
+
5
+AC_ARG_ENABLE([getaddrinfo],
6
+[  --disable-getaddrinfo          disable support for getaddrinfo],
7
+want_getaddrinfo=$enableval, want_getaddrinfo="yes")
8
+
9
+if test "$want_getaddrinfo" = "yes"
10
+then
11
+    AC_MSG_CHECKING([for getaddrinfo])
12
+    AC_CACHE_VAL([have_cv_gai],[
13
+		AC_TRY_RUN([
14
+		    #include <sys/types.h>
15
+		    #include <sys/socket.h>
16
+		    #include <netdb.h>
17
+		    #include <unistd.h>
18
+		    int main(int argc, char **argv)
19
+		    {
20
+			    struct addrinfo *res;
21
+			    int sd;
22
+
23
+			if(getaddrinfo("127.0.0.1", NULL, NULL, &res) < 0)
24
+			    return 1;
25
+			freeaddrinfo(res);
26
+
27
+			return 0;
28
+		    }
29
+		],
30
+		[have_cv_gai=yes],
31
+		[have_cv_gai=no],
32
+		[have_cv_gai=no])
33
+		])
34
+    AC_MSG_RESULT([$have_cv_gai])
35
+    if test "$have_cv_gai" = yes; then
36
+	AC_DEFINE(HAVE_GETADDRINFO, 1, [have getaddrinfo()])
37
+    fi
38
+fi
0 39
new file mode 100644
... ...
@@ -0,0 +1,95 @@
0
+
1
+want_xml="auto"
2
+AC_ARG_ENABLE([xml],
3
+[  --disable-xml	  disable DMG and XAR support],
4
+want_xml=$enableval, want_xml="auto")
5
+
6
+XML_HOME=""
7
+if test "X$want_xml" != "Xno"; then
8
+  AC_MSG_CHECKING([for libxml2 installation])
9
+  AC_ARG_WITH([xml],
10
+  [  --with-xml=DIR	  path to directory containing libxml2 library (default=
11
+			  /usr/local or /usr if not found in /usr/local)],
12
+  [
13
+  if test "$withval"
14
+  then
15
+    XML_HOME="$withval"
16
+    AC_MSG_RESULT([using $XML_HOME])
17
+  else
18
+    AC_MSG_ERROR([cannot assign blank value to --with-xml])
19
+  fi
20
+  ], [
21
+  XML_HOME=/usr/local
22
+  if test ! -x "$XML_HOME/bin/xml2-config"
23
+  then
24
+    XML_HOME=/usr
25
+    if test ! -x "$XML_HOME/bin/xml2-config"
26
+    then
27
+      XML_HOME=""
28
+    fi
29
+  fi
30
+  if test "x$XML_HOME" != "x"; then
31
+    AC_MSG_RESULT([$XML_HOME])
32
+  else
33
+    AC_MSG_RESULT([not found])
34
+  fi
35
+  ])
36
+fi
37
+
38
+found_xml="no"
39
+XMLCONF_VERSION=""
40
+XML_CPPFLAGS=""
41
+XML_LIBS=""
42
+if test "x$XML_HOME" != "x"; then
43
+  AC_MSG_CHECKING([xml2-config version])
44
+  XMLCONF_VERSION="`$XML_HOME/bin/xml2-config --version`"
45
+  if test "x%XMLCONF_VERSION" != "x"; then
46
+    AC_MSG_RESULT([$XMLCONF_VERSION])
47
+    found_xml="yes"
48
+    XML_CPPFLAGS="`$XML_HOME/bin/xml2-config --cflags`"
49
+    XML_LIBS="`$XML_HOME/bin/xml2-config --libs`"
50
+  else
51
+    AC_MSG_ERROR([xml2-config failed])
52
+  fi
53
+fi
54
+
55
+working_xml="no"
56
+if test "X$found_xml" != "Xno"; then
57
+  AC_MSG_CHECKING([for xmlreader.h in $XML_HOME])
58
+
59
+  if test ! -f "$XML_HOME/include/libxml2/libxml/xmlreader.h"; then
60
+    AC_MSG_RESULT([not found])
61
+  else
62
+    AC_MSG_RESULT([found])
63
+    save_LIBS="$LIBS"
64
+    save_CPPFLAGS="$CPPFLAGS"
65
+    CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
66
+    save_LDFLAGS="$LDFLAGS"
67
+    LDFLAGS="$LDFLAGS $XML_LIBS"
68
+
69
+    AC_CHECK_LIB([xml2], [xmlTextReaderRead], [working_xml="yes"], [working_xml="no"])
70
+
71
+    CPPFLAGS="$save_CPPFLAGS"
72
+    LDFLAGS="$save_LDFLAGS"
73
+    LIBS="$save_LIBS"
74
+  fi
75
+fi
76
+
77
+if test "$working_xml" = "yes"; then
78
+  AC_DEFINE([HAVE_LIBXML2],1,[Define to 1 if you have the 'libxml2' library (-lxml2).])
79
+  AC_SUBST(XML_CPPFLAGS)
80
+  AC_SUBST(XML_LIBS)
81
+  AC_MSG_NOTICE([Compiling and linking with libxml2 from $XML_HOME])
82
+else
83
+  if test "$want_xml" = "yes"; then
84
+     AC_MSG_ERROR([****** Please install libxml2 packages!])
85
+  else
86
+    if test "$want_xml" != "no"; then
87
+      AC_MSG_NOTICE([****** libxml2 support unavailable])
88
+    fi
89
+  fi
90
+  XML_CPPFLAGS=""
91
+  XML_LIBS=""
92
+  AC_SUBST(XML_CPPFLAGS)
93
+  AC_SUBST(XML_LIBS)
94
+fi
0 95
new file mode 100644
... ...
@@ -0,0 +1,47 @@
0
+dnl Linker feature checks
1
+dnl check for version script support in the linker (GNU ld, or Solaris ld style)
2
+AC_CACHE_CHECK([for ld --version-script], [ac_cv_ld_version_script], [dnl
3
+  cat > conftest.c <<EOF
4
+void cl_symbol1(void) {}
5
+void cli_symbol2(void) {}
6
+EOF
7
+  cat > conftest.map <<EOF
8
+RELEASE
9
+{
10
+	global:
11
+		cl_*;
12
+	local:
13
+		*;
14
+};
15
+PRIVATE
16
+{
17
+	global:
18
+		cli_*;
19
+	local:
20
+		*;
21
+};
22
+EOF
23
+  dnl check for GNU ld style linker version script
24
+  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
25
+				-o conftest.so conftest.c
26
+				-Wl,--version-script,conftest.map
27
+		       1>&AS_MESSAGE_LOG_FD]);
28
+  then
29
+      VERSIONSCRIPTFLAG=--version-script
30
+      ac_cv_ld_version_script=yes
31
+  else
32
+	dnl check for Solaris ld style linker version script
33
+	if AC_TRY_COMMAND([${CC-cc} $CFLAGS $pic_flag $LDFLAGS -shared
34
+				-o conftest.so conftest.c
35
+				-Wl,-M,conftest.map
36
+			1>&AS_MESSAGE_LOG_FD]);
37
+	then
38
+		VERSIONSCRIPTFLAG=-M
39
+		ac_cv_ld_version_script=yes;
40
+	else
41
+		ac_cv_ld_version_script=no
42
+	fi
43
+  fi
44
+ rm -f conftest*])
45
+AC_SUBST([VERSIONSCRIPTFLAG])
46
+AM_CONDITIONAL([VERSIONSCRIPT], test "x$ac_cv_ld_version_script" = "xyes")
0 47
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+AC_ARG_ENABLE([llvm],AC_HELP_STRING([--enable-llvm],
1
+				    [Enable 'llvm' JIT/verifier support @<:@default=auto@:>@]),
2
+				    [enable_llvm=$enableval], [enable_llvm="auto"])
3
+
4
+if test "$enable_llvm" != "no"; then
5
+    dnl Try to configure subdir, optionally
6
+    AC_CONFIG_SUBDIRS_OPTIONAL([libclamav/c++])
7
+fi
0 8
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+dnl --enable-milter
1
+if test "$have_milter" = "yes"; then
2
+    dnl libmilter checking code adapted from spamass-milter by
3
+    dnl Tom G. Christensen <tgc@statsbiblioteket.dk>
4
+
5
+    dnl Check for libmilter and it's header files in the usual locations
6
+    save_LIBS="$LIBS"
7
+    CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lpthread"
8
+    if test -d /usr/lib/libmilter ; then
9
+	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -L/usr/lib/libmilter"
10
+    fi
11
+    LIBS="$LIBS -lmilter $CLAMAV_MILTER_LIBS"
12
+    AC_CHECK_LIB([milter],[mi_stop],[CLAMAV_MILTER_LIBS="-lmilter $CLAMAV_MILTER_LIBS"],[
13
+	dnl Older sendmails require libsm or libsmutil for support functions
14
+	AC_SEARCH_LIBS([strlcpy], [sm smutil], [test "$ac_cv_search_strlcpy" = "none required" || CLAMAV_MILTER_XLIB="$ac_cv_search_strlcpy"])
15
+	LIBS="$save_LIBS $CLAMAV_MILTER_LIBS $CLAMAV_MILTER_XLIB"
16
+	$as_unset ac_cv_lib_milter_mi_stop
17
+	AC_CHECK_LIB([milter],[mi_stop],[CLAMAV_MILTER_LIBS="-lmilter $CLAMAV_MILTER_XLIB $CLAMAV_MILTER_LIBS"],[
18
+	    AC_MSG_ERROR([Cannot find libmilter])
19
+	])
20
+    ])
21
+    LIBS="$save_LIBS"
22
+    AC_CHECK_HEADERS([libmilter/mfapi.h],[have_milter="yes"],[
23
+	AC_MSG_ERROR([Please install mfapi.h from the sendmail distribution])
24
+    ])
25
+fi
26
+
27
+AM_CONDITIONAL([BUILD_CLAMD],[test "$have_pthreads" = "yes"])
28
+AM_CONDITIONAL([HAVE_MILTER],[test "$have_milter" = "yes"])
0 29
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+AC_ARG_ENABLE([milter],
1
+[  --enable-milter	  build clamav-milter],
2
+have_milter=$enableval, have_milter="no")
0 3
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+AC_ARG_ENABLE([no-cache],
1
+[  --enable-no-cache	  use "Cache-Control: no-cache" in freshclam],
2
+enable_nocache=$enableval, enable_nocache="no")
3
+
4
+if test "$enable_nocache" = "yes"; then
5
+  AC_DEFINE([FRESHCLAM_NO_CACHE],1,[use "Cache-Control: no-cache" in freshclam])
6
+fi
7
+
0 8
new file mode 100644
... ...
@@ -0,0 +1,168 @@
0
+case "$target_os" in
1
+linux*)
2
+    AC_DEFINE([C_LINUX],1,[target is linux])
3
+    if test "$have_pthreads" = "yes"; then
4
+	THREAD_LIBS="-lpthread"
5
+	TH_SAFE="-thread-safe"
6
+	if test "$want_fanotify" = "yes"; then
7
+	    AC_CHECK_HEADER([sys/fanotify.h],AC_DEFINE([FANOTIFY],1,[use fanotify]),)
8
+	fi
9
+    fi
10
+    ;;
11
+kfreebsd*-gnu)
12
+    AC_DEFINE([C_KFREEBSD_GNU],1,[target is kfreebsd-gnu])
13
+    if test "$have_pthreads" = "yes"; then
14
+       THREAD_LIBS="-lpthread"
15
+       TH_SAFE="-thread-safe"
16
+    fi
17
+    ;;
18
+solaris*)
19
+    CLAMDSCAN_LIBS="$CLAMDSCAN_LIBS -lresolv"
20
+    FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lresolv"
21
+    if test "$have_pthreads" = "yes"; then
22
+	THREAD_LIBS="-lpthread"
23
+	CLAMD_LIBS="$CLAMD_LIBS -lresolv"
24
+	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lresolv"
25
+	TH_SAFE="-thread-safe"
26
+    fi
27
+    AC_DEFINE([C_SOLARIS],1,[os is solaris])
28
+    ;;
29
+freebsd[[45]]*)
30
+    if test "$have_pthreads" = "yes"; then
31
+	THREAD_LIBS="-pthread -lc_r"
32
+	TH_SAFE="-thread-safe"
33
+    fi
34
+    AC_DEFINE([C_BSD],1,[os is freebsd 4 or 5])
35
+    ;;
36
+freebsd*)
37
+    if test "$have_pthreads" = "yes"; then
38
+	THREAD_LIBS="-lthr"
39
+	TH_SAFE="-thread-safe"
40
+    fi
41
+    AC_DEFINE([C_BSD],1,[os is freebsd 6])
42
+    ;;
43
+dragonfly*)
44
+    if test "$have_pthreads" = "yes"; then
45
+	THREAD_LIBS="-pthread"
46
+	TH_SAFE="-thread-safe"
47
+    fi
48
+    AC_DEFINE([C_BSD],1,[os is dragonfly])
49
+    ;;
50
+openbsd*)
51
+    if test "$have_pthreads" = "yes"; then
52
+	THREAD_LIBS="-pthread"
53
+	CLAMD_LIBS="$CLAMD_LIBS -pthread"
54
+	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
55
+	TH_SAFE="-thread-safe"
56
+    fi
57
+    AC_DEFINE([C_BSD],1,[os is OpenBSD])
58
+    ;;
59
+bsdi*)
60
+    if test "$have_pthreads" = "yes"; then
61
+	THREAD_LIBS="-pthread"
62
+	TH_SAFE="-thread-safe"
63
+    fi
64
+    AC_DEFINE([C_BSD],1,[os is BSDI BSD/OS])
65
+    ;;
66
+netbsd*)
67
+     if test "$have_pthreads" = "yes"; then
68
+	THREAD_LIBS="-lpthread"
69
+     fi
70
+    AC_DEFINE([C_BSD],1,[os is NetBSD])
71
+    ;;
72
+bsd*)
73
+    AC_MSG_RESULT([Unknown BSD detected. Disabling thread support.])
74
+    have_pthreads="no"
75
+    AC_DEFINE([C_BSD],1,[os is bsd flavor])
76
+    ;;
77
+beos*)
78
+    AC_MSG_RESULT([BeOS detected. Disabling thread support.])
79
+    have_pthreads="no"
80
+    AC_DEFINE([C_BEOS],1,[os is beos])
81
+    ;;
82
+x86:Interix*)
83
+    AC_DEFINE([C_INTERIX],1,[os is Interix])
84
+    ;;
85
+darwin*)
86
+    AC_DEFINE([C_BSD],1,[os is bsd flavor])
87
+    AC_DEFINE([C_DARWIN],1,[os is darwin])
88
+    AC_DEFINE([BIND_8_COMPAT],1,[enable bind8 compatibility])
89
+    AC_DEFINE([CLAMAUTH],1,[use ClamAuth])
90
+    use_netinfo="yes"
91
+    ;;
92
+os2*)
93
+    CLAMDSCAN_LIBS="$CLAMDSCAN_LIBS -lsyslog"
94
+    FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsyslog"
95
+    CLAMD_LIBS="$CLAMD_LIBS -lsyslog"
96
+    CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsyslog"
97
+    if test "$have_pthreads" = "yes"; then
98
+	THREAD_LIBS="-lpthread"
99
+	TH_SAFE="-thread-safe"
100
+    fi
101
+    AC_DEFINE([C_OS2],1,[os is OS/2])
102
+    ;;
103
+sco*)
104
+    dnl njh@bandsman.sco.uk: SCO Unix port
105
+    dnl FRESHCLAM_LIBS="-lsocket"
106
+    dnl CLAMD_LIBS="-lsocket"
107
+    dnl CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"
108
+    ;;
109
+hpux*)
110
+    if test "$have_pthreads" = "yes"; then
111
+	THREAD_LIBS="-lpthread"
112
+	TH_SAFE="-thread-safe"
113
+    fi
114
+    AC_DEFINE([C_HPUX],1,[os is hpux])
115
+    if test "$have_mempool" = "yes"; then
116
+	LDFLAGS="$LDFLAGS -Wl,+pd,1M"
117
+    fi
118
+    ;;
119
+aix*)
120
+    if test "$have_pthreads" = "yes"; then
121
+	THREAD_LIBS="-lpthread"
122
+	TH_SAFE="-thread-safe"
123
+	AC_DEFINE([_THREAD_SAFE],1,[thread safe])
124
+    fi
125
+    AC_DEFINE([C_AIX],1,[os is aix])
126
+    ;;
127
+*-*-osf*)
128
+    if test "$have_pthreads" = "yes"; then
129
+	THREAD_LIBS="-pthread"
130
+	TH_SAFE="-thread-safe"
131
+	AC_DEFINE([_POSIX_PII_SOCKET],1,[POSIX compatibility])
132
+    fi
133
+    AC_DEFINE([C_OSF],1,[os is osf/tru64])
134
+    ;;
135
+nto-qnx*)
136
+    AC_DEFINE([C_QNX6],1,[os is QNX 6.x.x])
137
+    ;;
138
+irix*)
139
+    if test "$have_pthreads" = "yes"; then
140
+	THREAD_LIBS="-lpthread"
141
+	TH_SAFE="-thread-safe"
142
+    fi
143
+    LIBS="$LIBS -lgen"
144
+    AC_DEFINE([C_IRIX],1,[os is irix])
145
+    ;;
146
+interix*)
147
+    AC_DEFINE([C_INTERIX],1,[os is interix])
148
+    if test "$test_clamav" = "yes"; then
149
+	if test ! -r /etc/passwd; then
150
+	   test_clamav="no"
151
+	fi
152
+    fi
153
+    if test "$have_pthreads" = "yes"; then
154
+	THREAD_LIBS="-lpthread"
155
+	TH_SAFE="-thread-safe"
156
+    fi
157
+    ;;
158
+gnu*)
159
+    AC_DEFINE([C_GNU_HURD],1,[target is gnu-hurd])
160
+    if test "$have_pthreads" = "yes"; then
161
+       THREAD_LIBS="-lpthread"
162
+       TH_SAFE="-thread-safe"
163
+    fi
164
+    ;;
165
+*)
166
+    ;;
167
+esac
0 168
new file mode 100644
... ...
@@ -0,0 +1,4 @@
0
+AC_ARG_ENABLE([sha-collector-for-internal-use], [], [enable_sha_collector="yes"], [enable_sha_collector="no"])
1
+if test "$enable_sha_collector" != "no"; then
2
+    AC_DEFINE([HAVE__INTERNAL__SHA_COLLECT], 1, [For internal use only - DO NOT DEFINE])
3
+fi
0 4
new file mode 100644
... ...
@@ -0,0 +1,24 @@
0
+AC_SUBST([FRESHCLAM_CPPFLAGS])
1
+AC_SUBST([CLAMSCAN_CPPFLAGS])
2
+AC_SUBST([CLAMDSCAN_CPPFLAGS])
3
+AC_SUBST([CLAMD_CPPFLAGS])
4
+AC_SUBST([CLAMMEM_CPPFLAGS])
5
+AC_SUBST([CLAMAV_MILTER_CPPFLAGS])
6
+AC_SUBST([LIBCLAMAV_CPPFLAGS])
7
+AC_SUBST([SIGTOOL_CPPFLAGS])
8
+AC_SUBST([CLAMCONF_CPPFLAGS])
9
+AC_SUBST([CLAMDTOP_CPPFLAGS])
10
+AC_SUBST([CLAMBC_CPPFLAGS])
11
+AC_SUBST([LIBCLAMSHARED_CPPFLAGS])
12
+
13
+AC_SUBST([LIBCLAMAV_LIBS])
14
+AC_SUBST([CLAMD_LIBS])
15
+AC_SUBST([CLAMMEM_LIBS])
16
+AC_SUBST([CLAMAV_MILTER_LIBS])
17
+AC_SUBST([FRESHCLAM_LIBS])
18
+AC_SUBST([CLAMSCAN_LIBS])
19
+AC_SUBST([CLAMDSCAN_LIBS])
20
+AC_SUBST([TH_SAFE])
21
+AC_SUBST([THREAD_LIBS])
22
+AC_SUBST([CLAMDTOP_LIBS])
23
+AC_SUBST([CLAMBC_LIBS])
0 24
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+AC_ARG_ENABLE([yp-check],
1
+[  --enable-yp-check	  use ypmatch utility instead of /etc/passwd parsing],
2
+use_yp=$enableval, use_yp="no")
3
+
4
+AC_ARG_WITH([user], 
5
+[  --with-user=uid	  name of the clamav user (default=clamav)],
6
+clamav_user="$withval", clamav_user="clamav")
7
+
8
+AC_ARG_WITH([group], 
9
+[  --with-group=gid	  name of the clamav group (default=clamav)],
10
+clamav_group="$withval", clamav_group="clamav")
11
+
12
+AC_DEFINE_UNQUOTED([CLAMAVUSER],"$clamav_user",[name of the clamav user])
13
+AC_DEFINE_UNQUOTED([CLAMAVGROUP],"$clamav_group",[name of the clamav group])
0 14
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+AC_ARG_ENABLE([id-check],
1
+[  --enable-id-check	  use id utility instead of /etc/passwd parsing],
2
+use_id=$enableval, use_id="no")
0 3
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+AC_ARG_ENABLE([yp-check],
1
+[  --enable-yp-check	  use ypmatch utility instead of /etc/passwd parsing],
2
+use_yp=$enableval, use_yp="no")
0 3
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+dnl change this on a release
1
+VERSION="devel-`date +%Y%m%d`"
2
+dnl VERSION="1.0rc1"
3
+
4
+LC_CURRENT=7
5
+LC_REVISION=11
6
+LC_AGE=1
7
+LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
8
+AC_SUBST([LIBCLAMAV_VERSION])
9
+
10
+AC_DEFINE_UNQUOTED([LIBCLAMAV_FULLVER], "$major.$LC_AGE.$LC_REVISION",
11
+        ["Full library version number"])
12
+
13
+AC_DEFINE_UNQUOTED([LIBCLAMAV_MAJORVER], $major, ["Major library version number"])
14
+
15
+AC_DEFINE_UNQUOTED([VERSION],"$VERSION",[Version number of package])
16
+AC_DEFINE_UNQUOTED([VERSION_SUFFIX],"$VERSION_SUFFIX",[Version suffix for package])
... ...
@@ -1,9 +1,9 @@
1
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
1
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
2 2
 # @configure_input@
3 3
 
4 4
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
6
-# Inc.
5
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
6
+# Foundation, Inc.
7 7
 # This Makefile.in is free software; the Free Software Foundation
8 8
 # gives unlimited permission to copy and/or distribute it,
9 9
 # with or without modifications, as long as this notice is preserved.
... ...
@@ -16,6 +16,23 @@
16 16
 @SET_MAKE@
17 17
 
18 18
 VPATH = @srcdir@
19
+am__make_dryrun = \
20
+  { \
21
+    am__dry=no; \
22
+    case $$MAKEFLAGS in \
23
+      *\\[\ \	]*) \
24
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
25
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
26
+      *) \
27
+        for am__flg in $$MAKEFLAGS; do \
28
+          case $$am__flg in \
29
+            *=*|--*) ;; \
30
+            *n*) am__dry=yes; break;; \
31
+          esac; \
32
+        done;; \
33
+    esac; \
34
+    test $$am__dry = yes; \
35
+  }
19 36
 pkgdatadir = $(datadir)/@PACKAGE@
20 37
 pkgincludedir = $(includedir)/@PACKAGE@
21 38
 pkglibdir = $(libdir)/@PACKAGE@
... ...
@@ -48,7 +65,61 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
48 48
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
49 49
 	$(top_srcdir)/m4/lt~obsolete.m4 \
50 50
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
51
-	$(top_srcdir)/configure.in
51
+	$(top_srcdir)/m4/reorganization/version.m4 \
52
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
53
+	$(top_srcdir)/m4/reorganization/headers.m4 \
54
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
55
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
56
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
57
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
58
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
59
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
60
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
61
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
62
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
63
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
64
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
65
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
66
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
67
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
68
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
69
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
70
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
71
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
72
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
73
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
74
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
75
+	$(top_srcdir)/m4/reorganization/debug.m4 \
76
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
77
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
78
+	$(top_srcdir)/m4/reorganization/dns.m4 \
79
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
80
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
81
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
82
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
83
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
84
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
85
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
86
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
87
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
88
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
89
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
90
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
91
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
92
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
96
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
97
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
98
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
99
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
100
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
101
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
102
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
103
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
104
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
105
+	$(top_srcdir)/configure.ac
52 106
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 107
 	$(ACLOCAL_M4)
54 108
 mkinstalldirs = $(install_sh) -d
... ...
@@ -60,8 +131,8 @@ libshared_la_LIBADD =
60 60
 am_libshared_la_OBJECTS = actions.lo cdiff.lo clamdcom.lo getopt.lo \
61 61
 	misc.lo optparser.lo tar.lo
62 62
 libshared_la_OBJECTS = $(am_libshared_la_OBJECTS)
63
-AM_V_lt = $(am__v_lt_$(V))
64
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
63
+AM_V_lt = $(am__v_lt_@AM_V@)
64
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
65 65
 am__v_lt_0 = --silent
66 66
 libshared_minimal_la_DEPENDENCIES = libshared.la
67 67
 am_libshared_minimal_la_OBJECTS = libshared_minimal_la-output.lo
... ...
@@ -95,21 +166,21 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
95 95
 	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
96 96
 	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
97 97
 	$(AM_CFLAGS) $(CFLAGS)
98
-AM_V_CC = $(am__v_CC_$(V))
99
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
98
+AM_V_CC = $(am__v_CC_@AM_V@)
99
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
100 100
 am__v_CC_0 = @echo "  CC    " $@;
101
-AM_V_at = $(am__v_at_$(V))
102
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
101
+AM_V_at = $(am__v_at_@AM_V@)
102
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
103 103
 am__v_at_0 = @
104 104
 CCLD = $(CC)
105 105
 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
106 106
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
107 107
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
108
-AM_V_CCLD = $(am__v_CCLD_$(V))
109
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
108
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
109
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
110 110
 am__v_CCLD_0 = @echo "  CCLD  " $@;
111
-AM_V_GEN = $(am__v_GEN_$(V))
112
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
111
+AM_V_GEN = $(am__v_GEN_@AM_V@)
112
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
113 113
 am__v_GEN_0 = @echo "  GEN   " $@;
114 114
 SOURCES = $(libshared_la_SOURCES) $(libshared_minimal_la_SOURCES) \
115 115
 	$(libshared_minimal_threads_la_SOURCES) \
... ...
@@ -119,6 +190,11 @@ DIST_SOURCES = $(libshared_la_SOURCES) $(libshared_minimal_la_SOURCES) \
119 119
 	$(libshared_minimal_threads_la_SOURCES) \
120 120
 	$(libshared_nothreads_la_SOURCES) \
121 121
 	$(libshared_threads_la_SOURCES)
122
+am__can_run_installinfo = \
123
+  case $$AM_UPDATE_INFO_DIR in \
124
+    n|no|NO) false;; \
125
+    *) (install-info --version) >/dev/null 2>&1;; \
126
+  esac
122 127
 ETAGS = etags
123 128
 CTAGS = ctags
124 129
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
... ...
@@ -140,9 +216,23 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
140 140
 CHECK_LIBS = @CHECK_LIBS@
141 141
 CLAMAVGROUP = @CLAMAVGROUP@
142 142
 CLAMAVUSER = @CLAMAVUSER@
143
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
143 144
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
145
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
146
+CLAMBC_LIBS = @CLAMBC_LIBS@
147
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
148
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
144 149
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
150
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
151
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
152
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
145 153
 CLAMD_LIBS = @CLAMD_LIBS@
154
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
155
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
156
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
157
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
158
+CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
159
+CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
146 160
 CPP = @CPP@
147 161
 CPPFLAGS = @CPPFLAGS@
148 162
 CURSES_CPPFLAGS = @CURSES_CPPFLAGS@
... ...
@@ -160,6 +250,7 @@ ECHO_T = @ECHO_T@
160 160
 EGREP = @EGREP@
161 161
 EXEEXT = @EXEEXT@
162 162
 FGREP = @FGREP@
163
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
163 164
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
164 165
 GCOV = @GCOV@
165 166
 GENHTML = @GENHTML@
... ...
@@ -181,8 +272,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
181 181
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
182 182
 LIBBZ2 = @LIBBZ2@
183 183
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
184
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
184 185
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
185 186
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
187
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
186 188
 LIBLTDL = @LIBLTDL@
187 189
 LIBM = @LIBM@
188 190
 LIBOBJS = @LIBOBJS@
... ...
@@ -220,6 +313,7 @@ RANLIB = @RANLIB@
220 220
 SED = @SED@
221 221
 SET_MAKE = @SET_MAKE@
222 222
 SHELL = @SHELL@
223
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
223 224
 STRIP = @STRIP@
224 225
 THREAD_LIBS = @THREAD_LIBS@
225 226
 TH_SAFE = @TH_SAFE@
... ...
@@ -227,6 +321,8 @@ VERSION = @VERSION@
227 227
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
228 228
 WERR_CFLAGS = @WERR_CFLAGS@
229 229
 WERR_CFLAGS_MILTER = @WERR_CFLAGS_MILTER@
230
+XML_CPPFLAGS = @XML_CPPFLAGS@
231
+XML_LIBS = @XML_LIBS@
230 232
 abs_builddir = @abs_builddir@
231 233
 abs_srcdir = @abs_srcdir@
232 234
 abs_top_builddir = @abs_top_builddir@
... ...
@@ -354,15 +450,15 @@ clean-noinstLTLIBRARIES:
354 354
 	  echo "rm -f \"$${dir}/so_locations\""; \
355 355
 	  rm -f "$${dir}/so_locations"; \
356 356
 	done
357
-libshared.la: $(libshared_la_OBJECTS) $(libshared_la_DEPENDENCIES) 
357
+libshared.la: $(libshared_la_OBJECTS) $(libshared_la_DEPENDENCIES) $(EXTRA_libshared_la_DEPENDENCIES) 
358 358
 	$(AM_V_CCLD)$(LINK)  $(libshared_la_OBJECTS) $(libshared_la_LIBADD) $(LIBS)
359
-libshared_minimal.la: $(libshared_minimal_la_OBJECTS) $(libshared_minimal_la_DEPENDENCIES) 
359
+libshared_minimal.la: $(libshared_minimal_la_OBJECTS) $(libshared_minimal_la_DEPENDENCIES) $(EXTRA_libshared_minimal_la_DEPENDENCIES) 
360 360
 	$(AM_V_CCLD)$(libshared_minimal_la_LINK)  $(libshared_minimal_la_OBJECTS) $(libshared_minimal_la_LIBADD) $(LIBS)
361
-libshared_minimal_threads.la: $(libshared_minimal_threads_la_OBJECTS) $(libshared_minimal_threads_la_DEPENDENCIES) 
361
+libshared_minimal_threads.la: $(libshared_minimal_threads_la_OBJECTS) $(libshared_minimal_threads_la_DEPENDENCIES) $(EXTRA_libshared_minimal_threads_la_DEPENDENCIES) 
362 362
 	$(AM_V_CCLD)$(LINK)  $(libshared_minimal_threads_la_OBJECTS) $(libshared_minimal_threads_la_LIBADD) $(LIBS)
363
-libshared_nothreads.la: $(libshared_nothreads_la_OBJECTS) $(libshared_nothreads_la_DEPENDENCIES) 
363
+libshared_nothreads.la: $(libshared_nothreads_la_OBJECTS) $(libshared_nothreads_la_DEPENDENCIES) $(EXTRA_libshared_nothreads_la_DEPENDENCIES) 
364 364
 	$(AM_V_CCLD)$(libshared_nothreads_la_LINK)  $(libshared_nothreads_la_OBJECTS) $(libshared_nothreads_la_LIBADD) $(LIBS)
365
-libshared_threads.la: $(libshared_threads_la_OBJECTS) $(libshared_threads_la_DEPENDENCIES) 
365
+libshared_threads.la: $(libshared_threads_la_OBJECTS) $(libshared_threads_la_DEPENDENCIES) $(EXTRA_libshared_threads_la_DEPENDENCIES) 
366 366
 	$(AM_V_CCLD)$(LINK)  $(libshared_threads_la_OBJECTS) $(libshared_threads_la_LIBADD) $(LIBS)
367 367
 
368 368
 mostlyclean-compile:
... ...
@@ -385,55 +481,46 @@ distclean-compile:
385 385
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tar.Plo@am__quote@
386 386
 
387 387
 .c.o:
388
-@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
389
-@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
390
-@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
391
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
392
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
388
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
389
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
390
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
393 391
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
394
-@am__fastdepCC_FALSE@	$(COMPILE) -c -o $@ $<
392
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c $<
395 393
 
396 394
 .c.obj:
397
-@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
398
-@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
399
-@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
400
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
401
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
395
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
396
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
397
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
402 398
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
403
-@am__fastdepCC_FALSE@	$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
399
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
404 400
 
405 401
 .c.lo:
406
-@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
407
-@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
408
-@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
409
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
410
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
402
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
403
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
404
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
411 405
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
412
-@am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
406
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
413 407
 
414 408
 libshared_minimal_la-output.lo: output.c
415 409
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_minimal_la_CFLAGS) $(CFLAGS) -MT libshared_minimal_la-output.lo -MD -MP -MF $(DEPDIR)/libshared_minimal_la-output.Tpo -c -o libshared_minimal_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
416 410
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libshared_minimal_la-output.Tpo $(DEPDIR)/libshared_minimal_la-output.Plo
417
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
418
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='output.c' object='libshared_minimal_la-output.lo' libtool=yes @AMDEPBACKSLASH@
411
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='output.c' object='libshared_minimal_la-output.lo' libtool=yes @AMDEPBACKSLASH@
419 412
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
420
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_minimal_la_CFLAGS) $(CFLAGS) -c -o libshared_minimal_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
413
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_minimal_la_CFLAGS) $(CFLAGS) -c -o libshared_minimal_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
421 414
 
422 415
 libshared_nothreads_la-output.lo: output.c
423 416
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -MT libshared_nothreads_la-output.lo -MD -MP -MF $(DEPDIR)/libshared_nothreads_la-output.Tpo -c -o libshared_nothreads_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
424 417
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libshared_nothreads_la-output.Tpo $(DEPDIR)/libshared_nothreads_la-output.Plo
425
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
426
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='output.c' object='libshared_nothreads_la-output.lo' libtool=yes @AMDEPBACKSLASH@
418
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='output.c' object='libshared_nothreads_la-output.lo' libtool=yes @AMDEPBACKSLASH@
427 419
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
428
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -c -o libshared_nothreads_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
420
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -c -o libshared_nothreads_la-output.lo `test -f 'output.c' || echo '$(srcdir)/'`output.c
429 421
 
430 422
 libshared_nothreads_la-misc_libclamav.lo: misc_libclamav.c
431 423
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -MT libshared_nothreads_la-misc_libclamav.lo -MD -MP -MF $(DEPDIR)/libshared_nothreads_la-misc_libclamav.Tpo -c -o libshared_nothreads_la-misc_libclamav.lo `test -f 'misc_libclamav.c' || echo '$(srcdir)/'`misc_libclamav.c
432 424
 @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libshared_nothreads_la-misc_libclamav.Tpo $(DEPDIR)/libshared_nothreads_la-misc_libclamav.Plo
433
-@am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
434
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='misc_libclamav.c' object='libshared_nothreads_la-misc_libclamav.lo' libtool=yes @AMDEPBACKSLASH@
425
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='misc_libclamav.c' object='libshared_nothreads_la-misc_libclamav.lo' libtool=yes @AMDEPBACKSLASH@
435 426
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
436
-@am__fastdepCC_FALSE@	$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -c -o libshared_nothreads_la-misc_libclamav.lo `test -f 'misc_libclamav.c' || echo '$(srcdir)/'`misc_libclamav.c
427
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libshared_nothreads_la_CFLAGS) $(CFLAGS) -c -o libshared_nothreads_la-misc_libclamav.lo `test -f 'misc_libclamav.c' || echo '$(srcdir)/'`misc_libclamav.c
437 428
 
438 429
 mostlyclean-libtool:
439 430
 	-rm -f *.lo
... ...
@@ -537,10 +624,15 @@ install-am: all-am
537 537
 
538 538
 installcheck: installcheck-am
539 539
 install-strip:
540
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
541
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
542
-	  `test -z '$(STRIP)' || \
543
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
540
+	if test -z '$(STRIP)'; then \
541
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
542
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
543
+	      install; \
544
+	else \
545
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
546
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
547
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
548
+	fi
544 549
 mostlyclean-generic:
545 550
 
546 551
 clean-generic:
... ...
@@ -32,10 +32,13 @@
32 32
 #include <unistd.h>
33 33
 #endif
34 34
 
35
+#include <openssl/ssl.h>
36
+#include <openssl/err.h>
37
+#include "libclamav/crypto.h"
38
+
35 39
 #include "shared/misc.h"
36 40
 #include "shared/output.h"
37 41
 #include "shared/cdiff.h"
38
-#include "libclamav/sha256.h"
39 42
 
40 43
 #include "libclamav/str.h"
41 44
 #include "libclamav/others.h"
... ...
@@ -764,7 +767,7 @@ int cdiff_apply(int fd, unsigned short mode)
764 764
 	int end, i, n;
765 765
 	struct stat sb;
766 766
 	int desc;
767
-	SHA256_CTX sha256ctx;
767
+	EVP_MD_CTX sha256ctx;
768 768
 	unsigned char digest[32];
769 769
 	int sum, bread;
770 770
 #define DSIGBUFF 350
... ...
@@ -848,18 +851,18 @@ int cdiff_apply(int fd, unsigned short mode)
848 848
 	    return -1;
849 849
 	}
850 850
 
851
-	sha256_init(&sha256ctx);
851
+	EVP_DigestInit(&sha256ctx, EVP_sha256());
852 852
 	sum = 0;
853 853
 	while((bread = read(desc, buff, FILEBUFF)) > 0) {
854 854
 	    if(sum + bread >= end) {
855
-		sha256_update(&sha256ctx, (unsigned char *) buff, end - sum);
855
+		EVP_DigestUpdate(&sha256ctx, (unsigned char *) buff, end - sum);
856 856
 		break;
857 857
 	    } else {
858
-		sha256_update(&sha256ctx, (unsigned char *) buff, bread);
858
+		EVP_DigestUpdate(&sha256ctx, (unsigned char *) buff, bread);
859 859
 	    }
860 860
 	    sum += bread;
861 861
 	}
862
-	sha256_final(&sha256ctx, digest);
862
+	EVP_DigestFinal(&sha256ctx, digest, NULL);
863 863
 
864 864
 	if(cli_versig2(digest, dsig, PSS_NSTR, PSS_ESTR) != CL_SUCCESS) {
865 865
 	    logg("!cdiff_apply: Incorrect digital signature\n");
... ...
@@ -39,6 +39,10 @@
39 39
 #include <ctype.h>
40 40
 #include <errno.h>
41 41
 
42
+#include <openssl/ssl.h>
43
+#include <openssl/err.h>
44
+#include "libclamav/crypto.h"
45
+
42 46
 #include "shared/optparser.h"
43 47
 #include "shared/output.h"
44 48
 
... ...
@@ -38,6 +38,10 @@
38 38
 #endif
39 39
 #include <ctype.h>
40 40
 
41
+#include <openssl/ssl.h>
42
+#include <openssl/err.h>
43
+#include "libclamav/crypto.h"
44
+
41 45
 #include "shared/optparser.h"
42 46
 #include "shared/misc.h"
43 47
 
... ...
@@ -50,6 +50,10 @@
50 50
 #include <syslog.h>
51 51
 #endif
52 52
 
53
+#include <openssl/ssl.h>
54
+#include <openssl/err.h>
55
+#include "libclamav/crypto.h"
56
+
53 57
 #include "output.h"
54 58
 #include "libclamav/others.h"
55 59
 #include "libclamav/str.h"
... ...
@@ -84,6 +84,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
84 84
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
85 85
 	$(top_srcdir)/m4/lt~obsolete.m4 \
86 86
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
87
+	$(top_srcdir)/m4/reorganization/version.m4 \
88
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
89
+	$(top_srcdir)/m4/reorganization/headers.m4 \
90
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
91
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
92
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
93
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
94
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
95
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
96
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
97
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
98
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
99
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
104
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
108
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
109
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
110
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
111
+	$(top_srcdir)/m4/reorganization/debug.m4 \
112
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
113
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
114
+	$(top_srcdir)/m4/reorganization/dns.m4 \
115
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
116
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
117
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
118
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
119
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
120
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
121
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
122
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
123
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
124
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
125
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
126
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
127
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
128
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
129
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
130
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
131
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
132
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
133
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
134
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
135
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
136
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
137
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
138
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
139
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
140
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
87 141
 	$(top_srcdir)/configure.ac
88 142
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
89 143
 	$(ACLOCAL_M4)
... ...
@@ -155,9 +209,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
155 155
 CHECK_LIBS = @CHECK_LIBS@
156 156
 CLAMAVGROUP = @CLAMAVGROUP@
157 157
 CLAMAVUSER = @CLAMAVUSER@
158
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
158 159
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
160
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
161
+CLAMBC_LIBS = @CLAMBC_LIBS@
162
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
163
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
159 164
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
165
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
166
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
167
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
160 168
 CLAMD_LIBS = @CLAMD_LIBS@
169
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
170
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
171
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
172
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
161 173
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
162 174
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
163 175
 CPP = @CPP@
... ...
@@ -177,6 +243,7 @@ ECHO_T = @ECHO_T@
177 177
 EGREP = @EGREP@
178 178
 EXEEXT = @EXEEXT@
179 179
 FGREP = @FGREP@
180
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
180 181
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
181 182
 GCOV = @GCOV@
182 183
 GENHTML = @GENHTML@
... ...
@@ -198,8 +265,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
198 198
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
199 199
 LIBBZ2 = @LIBBZ2@
200 200
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
201
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
201 202
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
202 203
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
204
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
203 205
 LIBLTDL = @LIBLTDL@
204 206
 LIBM = @LIBM@
205 207
 LIBOBJS = @LIBOBJS@
... ...
@@ -237,6 +306,7 @@ RANLIB = @RANLIB@
237 237
 SED = @SED@
238 238
 SET_MAKE = @SET_MAKE@
239 239
 SHELL = @SHELL@
240
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
240 241
 STRIP = @STRIP@
241 242
 THREAD_LIBS = @THREAD_LIBS@
242 243
 TH_SAFE = @TH_SAFE@
... ...
@@ -24,8 +24,6 @@
24 24
 #include "clamav-config.h"
25 25
 #endif
26 26
 
27
-#define _GNU_SOURCE
28
-
29 27
 #include <stdio.h>
30 28
 #include <stdlib.h>
31 29
 #include <string.h>
... ...
@@ -53,14 +51,16 @@
53 53
 #include <termios.h>
54 54
 #endif
55 55
 
56
+#include <openssl/ssl.h>
57
+#include <openssl/err.h>
58
+#include "libclamav/crypto.h"
59
+
56 60
 #include "vba.h"
57 61
 
58 62
 #include "shared/output.h"
59 63
 #include "shared/optparser.h"
60 64
 #include "shared/misc.h"
61 65
 #include "shared/cdiff.h"
62
-#include "libclamav/sha1.h"
63
-#include "libclamav/sha256.h"
64 66
 #include "shared/tar.h"
65 67
 
66 68
 #include "libclamav/clamav.h"
... ...
@@ -400,10 +400,10 @@ static char *sha256file(const char *file, unsigned int *size)
400 400
 	unsigned int i, bytes;
401 401
 	unsigned char digest[32], buffer[FILEBUFF];
402 402
 	char *sha;
403
-	SHA256_CTX ctx;
403
+	EVP_MD_CTX ctx;
404 404
 
405 405
 
406
-    sha256_init(&ctx);
406
+    EVP_DigestInit(&ctx, EVP_sha256());
407 407
     if(!(fh = fopen(file, "rb"))) {
408 408
 	mprintf("!sha256file: Can't open file %s\n", file);
409 409
 	return NULL;
... ...
@@ -411,11 +411,11 @@ static char *sha256file(const char *file, unsigned int *size)
411 411
     if(size)
412 412
 	*size = 0;
413 413
     while((bytes = fread(buffer, 1, sizeof(buffer), fh))) {
414
-	sha256_update(&ctx, buffer, bytes);
414
+	EVP_DigestUpdate(&ctx, buffer, bytes);
415 415
 	if(size)
416 416
 	    *size += bytes;
417 417
     }
418
-    sha256_final(&ctx, digest);
418
+    EVP_DigestFinal(&ctx, digest, NULL);
419 419
     sha = (char *) malloc(65);
420 420
     if(!sha)
421 421
     {
... ...
@@ -435,7 +435,7 @@ static int writeinfo(const char *dbname, const char *builder, const char *header
435 435
 	unsigned int i, bytes;
436 436
 	char file[32], *pt, dbfile[32];
437 437
 	unsigned char digest[32], buffer[FILEBUFF];
438
-	SHA256_CTX ctx;
438
+	EVP_MD_CTX ctx;
439 439
 
440 440
     snprintf(file, sizeof(file), "%s.info", dbname);
441 441
     if(!access(file, R_OK)) {
... ...
@@ -492,10 +492,10 @@ static int writeinfo(const char *dbname, const char *builder, const char *header
492 492
     }
493 493
     if(!optget(opts, "unsigned")->enabled) {
494 494
 	rewind(fh);
495
-	sha256_init(&ctx);
495
+	EVP_DigestInit(&ctx, EVP_sha256());
496 496
 	while((bytes = fread(buffer, 1, sizeof(buffer), fh)))
497
-	    sha256_update(&ctx, buffer, bytes);
498
-	sha256_final(&ctx, digest);
497
+	    EVP_DigestUpdate(&ctx, buffer, bytes);
498
+	EVP_DigestFinal(&ctx, digest, NULL);
499 499
 	if(!(pt = getdsig(optget(opts, "server")->strarg, builder, digest, 32, 3))) {
500 500
 	    mprintf("!writeinfo: Can't get digital signature from remote server\n");
501 501
 	    fclose(fh);
... ...
@@ -515,7 +515,7 @@ static int script2cdiff(const char *script, const char *builder, const struct op
515 515
 {
516 516
 	char *cdiff, *pt, buffer[FILEBUFF];
517 517
 	unsigned char digest[32];
518
-	SHA256_CTX ctx;
518
+	EVP_MD_CTX ctx;
519 519
 	STATBUF sb;
520 520
 	FILE *scripth, *cdiffh;
521 521
 	gzFile gzh;
... ...
@@ -599,13 +599,13 @@ static int script2cdiff(const char *script, const char *builder, const struct op
599 599
 	return -1;
600 600
     }
601 601
 
602
-    sha256_init(&ctx);
602
+    EVP_DigestInit(&ctx, EVP_sha256());
603 603
 
604 604
     while((bytes = fread(buffer, 1, sizeof(buffer), cdiffh)))
605
-	sha256_update(&ctx, (unsigned char *) buffer, bytes);
605
+	EVP_DigestUpdate(&ctx, (unsigned char *) buffer, bytes);
606 606
 
607 607
     fclose(cdiffh);
608
-    sha256_final(&ctx, digest);
608
+    EVP_DigestFinal(&ctx, digest, NULL);
609 609
 
610 610
     if(!(pt = getdsig(optget(opts, "server")->strarg, builder, digest, 32, 2))) {
611 611
 	mprintf("!script2cdiff: Can't get digital signature from remote server\n");
... ...
@@ -2790,7 +2790,6 @@ static int dumpcerts(const struct optstruct *opts)
2790 2790
     char * filename = NULL;
2791 2791
     STATBUF sb;
2792 2792
     const char * fmptr;
2793
-    SHA1Context sha1;
2794 2793
     struct cl_engine *engine;
2795 2794
     cli_ctx ctx;
2796 2795
     int fd, ret;
... ...
@@ -2871,9 +2870,7 @@ static int dumpcerts(const struct optstruct *opts)
2871 2871
     }
2872 2872
 
2873 2873
     /* Generate SHA1 */
2874
-    SHA1Init(&sha1);
2875
-    SHA1Update(&sha1, fmptr, sb.st_size);
2876
-    SHA1Final(&sha1, shash1);
2874
+    cl_sha1(fmptr, sb.st_size, shash1, NULL);
2877 2875
 
2878 2876
     ret = cli_checkfp_pe(&ctx, shash1, NULL, CL_CHECKFP_PE_FLAG_AUTHENTICODE);
2879 2877
     
... ...
@@ -33,6 +33,10 @@
33 33
 #include <dirent.h>
34 34
 #include <ctype.h>
35 35
 
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
36 40
 #include "libclamav/clamav.h"
37 41
 #include "libclamav/vba_extract.h"
38 42
 #include "libclamav/cltypes.h"
... ...
@@ -65,6 +65,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
65 65
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
66 66
 	$(top_srcdir)/m4/lt~obsolete.m4 \
67 67
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
68
+	$(top_srcdir)/m4/reorganization/version.m4 \
69
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
70
+	$(top_srcdir)/m4/reorganization/headers.m4 \
71
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
72
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
73
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
74
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
75
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
76
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
77
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
78
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
79
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
80
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
81
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
82
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
83
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
84
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
85
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
86
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
87
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
88
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
89
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
90
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
91
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
92
+	$(top_srcdir)/m4/reorganization/debug.m4 \
93
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
94
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
95
+	$(top_srcdir)/m4/reorganization/dns.m4 \
96
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
97
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
98
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
99
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
100
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
101
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
102
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
103
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
104
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
107
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
108
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
109
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
110
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
111
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
112
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
113
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
114
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
115
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
116
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
117
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
118
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
119
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
120
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
121
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
68 122
 	$(top_srcdir)/configure.ac
69 123
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
70 124
 	$(ACLOCAL_M4)
... ...
@@ -104,9 +158,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
104 104
 CHECK_LIBS = @CHECK_LIBS@
105 105
 CLAMAVGROUP = @CLAMAVGROUP@
106 106
 CLAMAVUSER = @CLAMAVUSER@
107
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
107 108
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
109
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
110
+CLAMBC_LIBS = @CLAMBC_LIBS@
111
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
112
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
108 113
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
114
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
115
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
116
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
109 117
 CLAMD_LIBS = @CLAMD_LIBS@
118
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
119
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
120
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
121
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
110 122
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
111 123
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
112 124
 CPP = @CPP@
... ...
@@ -126,6 +192,7 @@ ECHO_T = @ECHO_T@
126 126
 EGREP = @EGREP@
127 127
 EXEEXT = @EXEEXT@
128 128
 FGREP = @FGREP@
129
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
129 130
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
130 131
 GCOV = @GCOV@
131 132
 GENHTML = @GENHTML@
... ...
@@ -147,8 +214,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
147 147
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
148 148
 LIBBZ2 = @LIBBZ2@
149 149
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
150
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
150 151
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
151 152
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
153
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
152 154
 LIBLTDL = @LIBLTDL@
153 155
 LIBM = @LIBM@
154 156
 LIBOBJS = @LIBOBJS@
... ...
@@ -186,6 +255,7 @@ RANLIB = @RANLIB@
186 186
 SED = @SED@
187 187
 SET_MAKE = @SET_MAKE@
188 188
 SHELL = @SHELL@
189
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
189 190
 STRIP = @STRIP@
190 191
 THREAD_LIBS = @THREAD_LIBS@
191 192
 TH_SAFE = @TH_SAFE@
... ...
@@ -67,6 +67,60 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
67 67
 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
68 68
 	$(top_srcdir)/m4/lt~obsolete.m4 \
69 69
 	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
70
+	$(top_srcdir)/m4/reorganization/version.m4 \
71
+	$(top_srcdir)/m4/reorganization/build_tools.m4 \
72
+	$(top_srcdir)/m4/reorganization/headers.m4 \
73
+	$(top_srcdir)/m4/reorganization/c_options.m4 \
74
+	$(top_srcdir)/m4/reorganization/compiler_checks.m4 \
75
+	$(top_srcdir)/m4/reorganization/linker_checks.m4 \
76
+	$(top_srcdir)/m4/reorganization/code_checks/functions.m4 \
77
+	$(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \
78
+	$(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \
79
+	$(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \
80
+	$(top_srcdir)/m4/reorganization/libs/libz.m4 \
81
+	$(top_srcdir)/m4/reorganization/libs/bzip.m4 \
82
+	$(top_srcdir)/m4/reorganization/libs/unrar.m4 \
83
+	$(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \
84
+	$(top_srcdir)/m4/reorganization/code_checks/dns.m4 \
85
+	$(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \
86
+	$(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \
87
+	$(top_srcdir)/m4/reorganization/milter/enable.m4 \
88
+	$(top_srcdir)/m4/reorganization/code_checks/iconv.m4 \
89
+	$(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \
90
+	$(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \
91
+	$(top_srcdir)/m4/reorganization/utility_checks/id.m4 \
92
+	$(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \
93
+	$(top_srcdir)/m4/reorganization/usergroup.m4 \
94
+	$(top_srcdir)/m4/reorganization/debug.m4 \
95
+	$(top_srcdir)/m4/reorganization/customversion.m4 \
96
+	$(top_srcdir)/m4/reorganization/nocache.m4 \
97
+	$(top_srcdir)/m4/reorganization/dns.m4 \
98
+	$(top_srcdir)/m4/reorganization/bigstack.m4 \
99
+	$(top_srcdir)/m4/reorganization/dbdir.m4 \
100
+	$(top_srcdir)/m4/reorganization/cfgdir.m4 \
101
+	$(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \
102
+	$(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \
103
+	$(top_srcdir)/m4/reorganization/os_checks.m4 \
104
+	$(top_srcdir)/m4/reorganization/milter/check.m4 \
105
+	$(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \
106
+	$(top_srcdir)/m4/reorganization/code_checks/readdir.m4 \
107
+	$(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \
108
+	$(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \
109
+	$(top_srcdir)/m4/reorganization/clamav_user.m4 \
110
+	$(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \
111
+	$(top_srcdir)/m4/reorganization/code_checks/select.m4 \
112
+	$(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \
113
+	$(top_srcdir)/m4/reorganization/code_checks/shift.m4 \
114
+	$(top_srcdir)/m4/reorganization/code_checks/features.m4 \
115
+	$(top_srcdir)/m4/reorganization/clamdtop.m4 \
116
+	$(top_srcdir)/m4/reorganization/distcheck.m4 \
117
+	$(top_srcdir)/m4/reorganization/llvm.m4 \
118
+	$(top_srcdir)/m4/reorganization/sha_collect.m4 \
119
+	$(top_srcdir)/m4/reorganization/bsd.m4 \
120
+	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
121
+	$(top_srcdir)/m4/reorganization/libs/xml.m4 \
122
+	$(top_srcdir)/m4/reorganization/libs/openssl.m4 \
123
+	$(top_srcdir)/m4/reorganization/substitutions.m4 \
70 124
 	$(top_srcdir)/configure.ac
71 125
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
72 126
 	$(ACLOCAL_M4)
... ...
@@ -295,9 +349,21 @@ CHECK_CPPFLAGS = @CHECK_CPPFLAGS@
295 295
 CHECK_LIBS = @CHECK_LIBS@
296 296
 CLAMAVGROUP = @CLAMAVGROUP@
297 297
 CLAMAVUSER = @CLAMAVUSER@
298
+CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@
298 299
 CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@
300
+CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@
301
+CLAMBC_LIBS = @CLAMBC_LIBS@
302
+CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@
303
+CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@
299 304
 CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@
305
+CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@
306
+CLAMDTOP_LIBS = @CLAMDTOP_LIBS@
307
+CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@
300 308
 CLAMD_LIBS = @CLAMD_LIBS@
309
+CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@
310
+CLAMMEM_LIBS = @CLAMMEM_LIBS@
311
+CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@
312
+CLAMSCAN_LIBS = @CLAMSCAN_LIBS@
301 313
 CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@
302 314
 CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@
303 315
 CPP = @CPP@
... ...
@@ -317,6 +383,7 @@ ECHO_T = @ECHO_T@
317 317
 EGREP = @EGREP@
318 318
 EXEEXT = @EXEEXT@
319 319
 FGREP = @FGREP@
320
+FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
320 321
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
321 322
 GCOV = @GCOV@
322 323
 GENHTML = @GENHTML@
... ...
@@ -338,8 +405,10 @@ LIBADD_DLOPEN = @LIBADD_DLOPEN@
338 338
 LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
339 339
 LIBBZ2 = @LIBBZ2@
340 340
 LIBBZ2_PREFIX = @LIBBZ2_PREFIX@
341
+LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@
341 342
 LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
342 343
 LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
344
+LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@
343 345
 LIBLTDL = @LIBLTDL@
344 346
 LIBM = @LIBM@
345 347
 LIBOBJS = @LIBOBJS@
... ...
@@ -377,6 +446,7 @@ RANLIB = @RANLIB@
377 377
 SED = @SED@
378 378
 SET_MAKE = @SET_MAKE@
379 379
 SHELL = @SHELL@
380
+SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@
380 381
 STRIP = @STRIP@
381 382
 THREAD_LIBS = @THREAD_LIBS@
382 383
 TH_SAFE = @TH_SAFE@
... ...
@@ -31,6 +31,11 @@
31 31
 #include <check.h>
32 32
 #include <fcntl.h>
33 33
 #include <errno.h>
34
+
35
+#include <openssl/ssl.h>
36
+#include <openssl/err.h>
37
+#include "libclamav/crypto.h"
38
+
34 39
 #include "../libclamav/clamav.h"
35 40
 #include "../libclamav/others.h"
36 41
 #include "../libclamav/bytecode.h"
... ...
@@ -12,12 +12,16 @@
12 12
 #include <sys/types.h>
13 13
 #include <dirent.h>
14 14
 #include <sys/mman.h>
15
+
16
+#include <openssl/ssl.h>
17
+#include <openssl/err.h>
18
+#include "libclamav/crypto.h"
19
+
15 20
 #include "../libclamav/clamav.h"
16 21
 #include "../libclamav/others.h"
17 22
 #include "../libclamav/matcher.h"
18 23
 #include "../libclamav/version.h"
19 24
 #include "../libclamav/dsig.h"
20
-#include "../libclamav/sha256.h"
21 25
 #include "../libclamav/fpu.h"
22 26
 #include "checks.h"
23 27
 
... ...
@@ -790,27 +794,23 @@ static uint8_t res256[3][SHA256_HASH_SIZE] = {
790 790
 
791 791
 START_TEST (test_sha256)
792 792
 {
793
-    SHA256_CTX sha256;
793
+    EVP_MD_CTX sha256;
794 794
     uint8_t hsha256[SHA256_HASH_SIZE];
795 795
     uint8_t buf[1000];
796 796
     int i;
797 797
 
798 798
     memset (buf, 0x61, sizeof (buf));
799 799
 
800
-    sha256_init (&sha256);
801
-    sha256_update (&sha256, tv1, sizeof (tv1));
802
-    sha256_final (&sha256, hsha256);
800
+    cl_sha256(tv1, sizeof(tv1), hsha256, NULL);
803 801
     fail_unless(!memcmp (hsha256, res256[0], sizeof (hsha256)), "sha256 test vector #1 failed");
804 802
 
805
-    sha256_init (&sha256);
806
-    sha256_update (&sha256, tv2, sizeof (tv2));
807
-    sha256_final (&sha256, hsha256);
803
+    cl_sha256(tv2, sizeof(tv2), hsha256, NULL);
808 804
     fail_unless(!memcmp (hsha256, res256[1], sizeof (hsha256)), "sha256 test vector #2 failed");
809 805
 
810
-    sha256_init (&sha256);
806
+    EVP_DigestInit (&sha256, EVP_sha256());
811 807
     for (i = 0; i < 1000; i++)
812
-	sha256_update (&sha256, buf, sizeof (buf));
813
-    sha256_final (&sha256, hsha256);
808
+        EVP_DigestUpdate (&sha256, buf, sizeof (buf));
809
+    EVP_DigestFinal (&sha256, hsha256, NULL);
814 810
     fail_unless(!memcmp (hsha256, res256[2], sizeof (hsha256)), "sha256 test vector #3 failed");
815 811
 }
816 812
 END_TEST
... ...
@@ -32,6 +32,10 @@
32 32
 #include <string.h>
33 33
 #include <sys/stat.h>
34 34
 
35
+#include <openssl/ssl.h>
36
+#include <openssl/err.h>
37
+#include "libclamav/crypto.h"
38
+
35 39
 #include "../libclamav/clamav.h"
36 40
 #include "../libclamav/others.h"
37 41
 #include "../libclamav/disasm.h"
... ...
@@ -22,6 +22,11 @@
22 22
 #include <check.h>
23 23
 #include <fcntl.h>
24 24
 #include <string.h>
25
+
26
+#include <openssl/ssl.h>
27
+#include <openssl/err.h>
28
+#include "libclamav/crypto.h"
29
+
25 30
 #include "checks.h"
26 31
 #include "../libclamav/fmap.h"
27 32
 #include "../libclamav/dconf.h"
... ...
@@ -32,6 +32,11 @@
32 32
 #include <fcntl.h>
33 33
 #include <ctype.h>
34 34
 #include <errno.h>
35
+
36
+#include <openssl/ssl.h>
37
+#include <openssl/err.h>
38
+#include "libclamav/crypto.h"
39
+
35 40
 #include "../libclamav/clamav.h"
36 41
 #include "../libclamav/others.h"
37 42
 #include "../libclamav/dconf.h"
... ...
@@ -25,6 +25,10 @@
25 25
 #include <stdio.h>
26 26
 #include <string.h>
27 27
 
28
+#include <openssl/ssl.h>
29
+#include <openssl/err.h>
30
+#include "libclamav/crypto.h"
31
+
28 32
 #include "../libclamav/clamav.h"
29 33
 #include "../libclamav/readdb.h"
30 34
 #include "../libclamav/matcher.h"
... ...
@@ -28,6 +28,11 @@
28 28
 #include <limits.h>
29 29
 #include <string.h>
30 30
 #include <check.h>
31
+
32
+#include <openssl/ssl.h>
33
+#include <openssl/err.h>
34
+#include "libclamav/crypto.h"
35
+
31 36
 #include "../libclamav/clamav.h"
32 37
 #include "../libclamav/others.h"
33 38
 #include "../libclamav/mbox.h"
... ...
@@ -29,6 +29,11 @@
29 29
 #include <limits.h>
30 30
 #include <string.h>
31 31
 #include <check.h>
32
+
33
+#include <openssl/ssl.h>
34
+#include <openssl/err.h>
35
+#include "libclamav/crypto.h"
36
+
32 37
 #include "../libclamav/clamav.h"
33 38
 #include "../libclamav/others.h"
34 39
 #include "../libclamav/str.h"
... ...
@@ -63,6 +63,12 @@
63 63
         }
64 64
         "Entry"
65 65
         {
66
+        "MsmKey" = "8:_65072ADBBB5441898759117DB2AC41EF"
67
+        "OwnerKey" = "8:_UNDEFINED"
68
+        "MsmSig" = "8:_UNDEFINED"
69
+        }
70
+        "Entry"
71
+        {
66 72
         "MsmKey" = "8:_65C31C39B3E443C4B6EBE65247933F5E"
67 73
         "OwnerKey" = "8:_UNDEFINED"
68 74
         "MsmSig" = "8:_UNDEFINED"
... ...
@@ -117,66 +123,6 @@
117 117
         }
118 118
         "Entry"
119 119
         {
120
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
121
-        "OwnerKey" = "8:_DF09DF52E5014B378FBA8B4CD6C11C3B"
122
-        "MsmSig" = "8:_UNDEFINED"
123
-        }
124
-        "Entry"
125
-        {
126
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
127
-        "OwnerKey" = "8:_65C31C39B3E443C4B6EBE65247933F5E"
128
-        "MsmSig" = "8:_UNDEFINED"
129
-        }
130
-        "Entry"
131
-        {
132
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
133
-        "OwnerKey" = "8:_C0DFAFFC11514B9190D3A585C3E58832"
134
-        "MsmSig" = "8:_UNDEFINED"
135
-        }
136
-        "Entry"
137
-        {
138
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
139
-        "OwnerKey" = "8:_804379F8A48A4F7DBB50D72302559297"
140
-        "MsmSig" = "8:_UNDEFINED"
141
-        }
142
-        "Entry"
143
-        {
144
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
145
-        "OwnerKey" = "8:_71984994A7494BE2965C585DB3EBED1F"
146
-        "MsmSig" = "8:_UNDEFINED"
147
-        }
148
-        "Entry"
149
-        {
150
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
151
-        "OwnerKey" = "8:_335D34A6BB624E7190CFE4E63CD398E8"
152
-        "MsmSig" = "8:_UNDEFINED"
153
-        }
154
-        "Entry"
155
-        {
156
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
157
-        "OwnerKey" = "8:_EB8D0E3AFBC24F9B9845F08708803C2B"
158
-        "MsmSig" = "8:_UNDEFINED"
159
-        }
160
-        "Entry"
161
-        {
162
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
163
-        "OwnerKey" = "8:_FEDD087CC8B64ED3A476664BC5FCAF59"
164
-        "MsmSig" = "8:_UNDEFINED"
165
-        }
166
-        "Entry"
167
-        {
168
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
169
-        "OwnerKey" = "8:_F047B3505FC74D809FB8251423DF4095"
170
-        "MsmSig" = "8:_UNDEFINED"
171
-        }
172
-        "Entry"
173
-        {
174
-        "MsmKey" = "8:_98634933490744AE8DEB5C5DBDC6FE40"
175
-        "OwnerKey" = "8:_5CED7DA1BD104DA5AF2882D6CBA6E313"
176
-        "MsmSig" = "8:_UNDEFINED"
177
-        }
178
-        "Entry"
179
-        {
180 120
         "MsmKey" = "8:_9F0AEFC1E1534D2DAA90E7632ACBD869"
181 121
         "OwnerKey" = "8:_UNDEFINED"
182 122
         "MsmSig" = "8:_UNDEFINED"
... ...
@@ -219,6 +165,12 @@
219 219
         }
220 220
         "Entry"
221 221
         {
222
+        "MsmKey" = "8:_FD5044813135497E957CD988624A985F"
223
+        "OwnerKey" = "8:_UNDEFINED"
224
+        "MsmSig" = "8:_UNDEFINED"
225
+        }
226
+        "Entry"
227
+        {
222 228
         "MsmKey" = "8:_FEDD087CC8B64ED3A476664BC5FCAF59"
223 229
         "OwnerKey" = "8:_UNDEFINED"
224 230
         "MsmSig" = "8:_UNDEFINED"
... ...
@@ -241,6 +193,14 @@
241 241
         "PrivateKeyFile" = "8:"
242 242
         "TimeStampServer" = "8:"
243 243
         "InstallerBootstrapper" = "3:2"
244
+            "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
245
+            {
246
+            "Enabled" = "11:TRUE"
247
+            "PromptEnabled" = "11:TRUE"
248
+            "PrerequisitesLocation" = "2:1"
249
+            "Url" = "8:"
250
+            "ComponentsUrl" = "8:"
251
+            }
244 252
         }
245 253
         "Release"
246 254
         {
... ...
@@ -257,6 +217,14 @@
257 257
         "PrivateKeyFile" = "8:"
258 258
         "TimeStampServer" = "8:"
259 259
         "InstallerBootstrapper" = "3:2"
260
+            "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
261
+            {
262
+            "Enabled" = "11:TRUE"
263
+            "PromptEnabled" = "11:TRUE"
264
+            "PrerequisitesLocation" = "2:1"
265
+            "Url" = "8:"
266
+            "ComponentsUrl" = "8:"
267
+            }
260 268
         }
261 269
     }
262 270
     "Deployable"
... ...
@@ -398,6 +366,26 @@
398 398
             "IsDependency" = "11:FALSE"
399 399
             "IsolateTo" = "8:"
400 400
             }
401
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_65072ADBBB5441898759117DB2AC41EF"
402
+            {
403
+            "SourcePath" = "8:C:\\clamdeps\\win64\\openssl\\lib\\libeay32.dll"
404
+            "TargetName" = "8:libeay32.dll"
405
+            "Tag" = "8:"
406
+            "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
407
+            "Condition" = "8:"
408
+            "Transitive" = "11:FALSE"
409
+            "Vital" = "11:TRUE"
410
+            "ReadOnly" = "11:FALSE"
411
+            "Hidden" = "11:FALSE"
412
+            "System" = "11:FALSE"
413
+            "Permanent" = "11:FALSE"
414
+            "SharedLegacy" = "11:FALSE"
415
+            "PackageAs" = "3:1"
416
+            "Register" = "3:1"
417
+            "Exclude" = "11:FALSE"
418
+            "IsDependency" = "11:FALSE"
419
+            "IsolateTo" = "8:"
420
+            }
401 421
             "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_671D69A7B15349CF8AE7C0075C51AF53"
402 422
             {
403 423
             "SourcePath" = "8:..\\..\\COPYING.regex"
... ...
@@ -578,6 +566,26 @@
578 578
             "IsDependency" = "11:TRUE"
579 579
             "IsolateTo" = "8:"
580 580
             }
581
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FD5044813135497E957CD988624A985F"
582
+            {
583
+            "SourcePath" = "8:C:\\clamdeps\\win64\\openssl\\lib\\ssleay32.dll"
584
+            "TargetName" = "8:ssleay32.dll"
585
+            "Tag" = "8:"
586
+            "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
587
+            "Condition" = "8:"
588
+            "Transitive" = "11:FALSE"
589
+            "Vital" = "11:TRUE"
590
+            "ReadOnly" = "11:FALSE"
591
+            "Hidden" = "11:FALSE"
592
+            "System" = "11:FALSE"
593
+            "Permanent" = "11:FALSE"
594
+            "SharedLegacy" = "11:FALSE"
595
+            "PackageAs" = "3:1"
596
+            "Register" = "3:1"
597
+            "Exclude" = "11:FALSE"
598
+            "IsDependency" = "11:FALSE"
599
+            "IsolateTo" = "8:"
600
+            }
581 601
         }
582 602
         "FileType"
583 603
         {
... ...
@@ -1151,26 +1159,12 @@
1151 1151
         }
1152 1152
         "MergeModule"
1153 1153
         {
1154
-            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_98634933490744AE8DEB5C5DBDC6FE40"
1155
-            {
1156
-            "UseDynamicProperties" = "11:TRUE"
1157
-            "IsDependency" = "11:TRUE"
1158
-            "SourcePath" = "8:Microsoft_VC100_DebugCRT_x64.msm"
1159
-                "Properties"
1160
-                {
1161
-                }
1162
-            "LanguageId" = "3:0"
1163
-            "Exclude" = "11:FALSE"
1164
-            "Folder" = "8:"
1165
-            "Feature" = "8:"
1166
-            "IsolateTo" = "8:"
1167
-            }
1168 1154
         }
1169 1155
         "ProjectOutput"
1170 1156
         {
1171 1157
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_335D34A6BB624E7190CFE4E63CD398E8"
1172 1158
             {
1173
-            "SourcePath" = "8:..\\x64\\Debug\\freshclam.exe"
1159
+            "SourcePath" = "8:..\\Win32\\Release\\freshclam.exe"
1174 1160
             "TargetName" = "8:"
1175 1161
             "Tag" = "8:"
1176 1162
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1198,7 +1192,7 @@
1198 1198
             }
1199 1199
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_5CED7DA1BD104DA5AF2882D6CBA6E313"
1200 1200
             {
1201
-            "SourcePath" = "8:..\\x64\\Debug\\clamconf.exe"
1201
+            "SourcePath" = "8:..\\Win32\\Release\\clamconf.exe"
1202 1202
             "TargetName" = "8:"
1203 1203
             "Tag" = "8:"
1204 1204
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1226,7 +1220,7 @@
1226 1226
             }
1227 1227
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_65C31C39B3E443C4B6EBE65247933F5E"
1228 1228
             {
1229
-            "SourcePath" = "8:..\\x64\\Debug\\sigtool.exe"
1229
+            "SourcePath" = "8:..\\Win32\\Release\\sigtool.exe"
1230 1230
             "TargetName" = "8:"
1231 1231
             "Tag" = "8:"
1232 1232
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1254,7 +1248,7 @@
1254 1254
             }
1255 1255
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_71984994A7494BE2965C585DB3EBED1F"
1256 1256
             {
1257
-            "SourcePath" = "8:..\\x64\\Debug\\libclamav.dll"
1257
+            "SourcePath" = "8:..\\Win32\\Release\\libclamav.dll"
1258 1258
             "TargetName" = "8:"
1259 1259
             "Tag" = "8:"
1260 1260
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1282,7 +1276,7 @@
1282 1282
             }
1283 1283
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_804379F8A48A4F7DBB50D72302559297"
1284 1284
             {
1285
-            "SourcePath" = "8:..\\x64\\Debug\\libclamunrar.dll"
1285
+            "SourcePath" = "8:..\\Win32\\Release\\libclamunrar.dll"
1286 1286
             "TargetName" = "8:"
1287 1287
             "Tag" = "8:"
1288 1288
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1310,7 +1304,7 @@
1310 1310
             }
1311 1311
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_C0DFAFFC11514B9190D3A585C3E58832"
1312 1312
             {
1313
-            "SourcePath" = "8:..\\x64\\Debug\\libclamunrar_iface.dll"
1313
+            "SourcePath" = "8:..\\Win32\\Release\\libclamunrar_iface.dll"
1314 1314
             "TargetName" = "8:"
1315 1315
             "Tag" = "8:"
1316 1316
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1338,7 +1332,7 @@
1338 1338
             }
1339 1339
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_DF09DF52E5014B378FBA8B4CD6C11C3B"
1340 1340
             {
1341
-            "SourcePath" = "8:..\\x64\\Debug\\clambc.exe"
1341
+            "SourcePath" = "8:..\\Win32\\Release\\clambc.exe"
1342 1342
             "TargetName" = "8:"
1343 1343
             "Tag" = "8:"
1344 1344
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1366,7 +1360,7 @@
1366 1366
             }
1367 1367
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_EB8D0E3AFBC24F9B9845F08708803C2B"
1368 1368
             {
1369
-            "SourcePath" = "8:..\\x64\\Debug\\clamscan.exe"
1369
+            "SourcePath" = "8:..\\Win32\\Release\\clamscan.exe"
1370 1370
             "TargetName" = "8:"
1371 1371
             "Tag" = "8:"
1372 1372
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1394,7 +1388,7 @@
1394 1394
             }
1395 1395
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F047B3505FC74D809FB8251423DF4095"
1396 1396
             {
1397
-            "SourcePath" = "8:..\\x64\\Debug\\clamd.exe"
1397
+            "SourcePath" = "8:..\\Win32\\Release\\clamd.exe"
1398 1398
             "TargetName" = "8:"
1399 1399
             "Tag" = "8:"
1400 1400
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -1422,7 +1416,7 @@
1422 1422
             }
1423 1423
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_FEDD087CC8B64ED3A476664BC5FCAF59"
1424 1424
             {
1425
-            "SourcePath" = "8:..\\x64\\Debug\\clamdscan.exe"
1425
+            "SourcePath" = "8:..\\Win32\\Release\\clamdscan.exe"
1426 1426
             "TargetName" = "8:"
1427 1427
             "Tag" = "8:"
1428 1428
             "Folder" = "8:_CEC880DBF61041CCA0B367A8647B2589"
... ...
@@ -69,134 +69,146 @@
69 69
         }
70 70
         "Entry"
71 71
         {
72
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
73
-        "OwnerKey" = "8:_129947045FE24C5AAEE6467547A6FBBB"
72
+        "MsmKey" = "8:_4FC55746B30C48D59E9FE8557C108069"
73
+        "OwnerKey" = "8:_UNDEFINED"
74 74
         "MsmSig" = "8:_UNDEFINED"
75 75
         }
76 76
         "Entry"
77 77
         {
78
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
79
-        "OwnerKey" = "8:_E6AAF8DB843A4CDCBD12F62B44F0D947"
78
+        "MsmKey" = "8:_572E52797C0A4873ACFC45E53ED1FB78"
79
+        "OwnerKey" = "8:_UNDEFINED"
80 80
         "MsmSig" = "8:_UNDEFINED"
81 81
         }
82 82
         "Entry"
83 83
         {
84
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
85
-        "OwnerKey" = "8:_C3F868E2F86F4F22914EBB33174331CF"
84
+        "MsmKey" = "8:_5C115FFB3D1542998DEB88C97B348F59"
85
+        "OwnerKey" = "8:_UNDEFINED"
86 86
         "MsmSig" = "8:_UNDEFINED"
87 87
         }
88 88
         "Entry"
89 89
         {
90
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
91
-        "OwnerKey" = "8:_AA48472048A74261A786515933650C63"
90
+        "MsmKey" = "8:_64B5C4E9452F43349FB4D53DEE15C87D"
91
+        "OwnerKey" = "8:_UNDEFINED"
92 92
         "MsmSig" = "8:_UNDEFINED"
93 93
         }
94 94
         "Entry"
95 95
         {
96
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
97
-        "OwnerKey" = "8:_86FBE3D4BB5F42609082FB54D8079705"
96
+        "MsmKey" = "8:_6D1F45F66466453998A8B163691BAD84"
97
+        "OwnerKey" = "8:_UNDEFINED"
98 98
         "MsmSig" = "8:_UNDEFINED"
99 99
         }
100 100
         "Entry"
101 101
         {
102
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
103
-        "OwnerKey" = "8:_64B5C4E9452F43349FB4D53DEE15C87D"
102
+        "MsmKey" = "8:_6E6776606E994FD99CC36CB5C62935CF"
103
+        "OwnerKey" = "8:_UNDEFINED"
104 104
         "MsmSig" = "8:_UNDEFINED"
105 105
         }
106 106
         "Entry"
107 107
         {
108
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
109
-        "OwnerKey" = "8:_42222ACB125B4398B7BF9C030F7DF8FB"
108
+        "MsmKey" = "8:_70FC345C7A6C47D799FD1EC7CD5F20D9"
109
+        "OwnerKey" = "8:_UNDEFINED"
110 110
         "MsmSig" = "8:_UNDEFINED"
111 111
         }
112 112
         "Entry"
113 113
         {
114
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
115
-        "OwnerKey" = "8:_4053CC7DC75C48E98893BCEA2D692E55"
114
+        "MsmKey" = "8:_86FBE3D4BB5F42609082FB54D8079705"
115
+        "OwnerKey" = "8:_UNDEFINED"
116 116
         "MsmSig" = "8:_UNDEFINED"
117 117
         }
118 118
         "Entry"
119 119
         {
120
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
121
-        "OwnerKey" = "8:_32F4158C158142089DB13F5F29F91589"
120
+        "MsmKey" = "8:_893ED45A96044D8B94FDF0BF5DD2476B"
121
+        "OwnerKey" = "8:_UNDEFINED"
122 122
         "MsmSig" = "8:_UNDEFINED"
123 123
         }
124 124
         "Entry"
125 125
         {
126
-        "MsmKey" = "8:_59DC2980739C4FDAA8EC96CD313429EF"
127
-        "OwnerKey" = "8:_29583B2B37A44A71864FFD88DFED2C8F"
126
+        "MsmKey" = "8:_9365183139E941EA8C13A61D5EA82D2C"
127
+        "OwnerKey" = "8:_UNDEFINED"
128 128
         "MsmSig" = "8:_UNDEFINED"
129 129
         }
130 130
         "Entry"
131 131
         {
132
-        "MsmKey" = "8:_5C115FFB3D1542998DEB88C97B348F59"
132
+        "MsmKey" = "8:_AA48472048A74261A786515933650C63"
133 133
         "OwnerKey" = "8:_UNDEFINED"
134 134
         "MsmSig" = "8:_UNDEFINED"
135 135
         }
136 136
         "Entry"
137 137
         {
138
-        "MsmKey" = "8:_64B5C4E9452F43349FB4D53DEE15C87D"
139
-        "OwnerKey" = "8:_UNDEFINED"
138
+        "MsmKey" = "8:_B15174FB733CFDB87929A99EF031FE60"
139
+        "OwnerKey" = "8:_29583B2B37A44A71864FFD88DFED2C8F"
140 140
         "MsmSig" = "8:_UNDEFINED"
141 141
         }
142 142
         "Entry"
143 143
         {
144
-        "MsmKey" = "8:_6D1F45F66466453998A8B163691BAD84"
144
+        "MsmKey" = "8:_C3F868E2F86F4F22914EBB33174331CF"
145 145
         "OwnerKey" = "8:_UNDEFINED"
146 146
         "MsmSig" = "8:_UNDEFINED"
147 147
         }
148 148
         "Entry"
149 149
         {
150
-        "MsmKey" = "8:_6E6776606E994FD99CC36CB5C62935CF"
150
+        "MsmKey" = "8:_C53272351C914F09989E6CB992D9BE44"
151 151
         "OwnerKey" = "8:_UNDEFINED"
152 152
         "MsmSig" = "8:_UNDEFINED"
153 153
         }
154 154
         "Entry"
155 155
         {
156
-        "MsmKey" = "8:_70FC345C7A6C47D799FD1EC7CD5F20D9"
157
-        "OwnerKey" = "8:_UNDEFINED"
156
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
157
+        "OwnerKey" = "8:_129947045FE24C5AAEE6467547A6FBBB"
158 158
         "MsmSig" = "8:_UNDEFINED"
159 159
         }
160 160
         "Entry"
161 161
         {
162
-        "MsmKey" = "8:_86FBE3D4BB5F42609082FB54D8079705"
163
-        "OwnerKey" = "8:_UNDEFINED"
162
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
163
+        "OwnerKey" = "8:_E6AAF8DB843A4CDCBD12F62B44F0D947"
164 164
         "MsmSig" = "8:_UNDEFINED"
165 165
         }
166 166
         "Entry"
167 167
         {
168
-        "MsmKey" = "8:_893ED45A96044D8B94FDF0BF5DD2476B"
169
-        "OwnerKey" = "8:_UNDEFINED"
168
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
169
+        "OwnerKey" = "8:_C3F868E2F86F4F22914EBB33174331CF"
170 170
         "MsmSig" = "8:_UNDEFINED"
171 171
         }
172 172
         "Entry"
173 173
         {
174
-        "MsmKey" = "8:_9365183139E941EA8C13A61D5EA82D2C"
175
-        "OwnerKey" = "8:_UNDEFINED"
174
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
175
+        "OwnerKey" = "8:_AA48472048A74261A786515933650C63"
176 176
         "MsmSig" = "8:_UNDEFINED"
177 177
         }
178 178
         "Entry"
179 179
         {
180
-        "MsmKey" = "8:_AA48472048A74261A786515933650C63"
181
-        "OwnerKey" = "8:_UNDEFINED"
180
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
181
+        "OwnerKey" = "8:_86FBE3D4BB5F42609082FB54D8079705"
182 182
         "MsmSig" = "8:_UNDEFINED"
183 183
         }
184 184
         "Entry"
185 185
         {
186
-        "MsmKey" = "8:_B15174FB733CFDB87929A99EF031FE60"
187
-        "OwnerKey" = "8:_29583B2B37A44A71864FFD88DFED2C8F"
186
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
187
+        "OwnerKey" = "8:_64B5C4E9452F43349FB4D53DEE15C87D"
188 188
         "MsmSig" = "8:_UNDEFINED"
189 189
         }
190 190
         "Entry"
191 191
         {
192
-        "MsmKey" = "8:_C3F868E2F86F4F22914EBB33174331CF"
193
-        "OwnerKey" = "8:_UNDEFINED"
192
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
193
+        "OwnerKey" = "8:_42222ACB125B4398B7BF9C030F7DF8FB"
194 194
         "MsmSig" = "8:_UNDEFINED"
195 195
         }
196 196
         "Entry"
197 197
         {
198
-        "MsmKey" = "8:_C53272351C914F09989E6CB992D9BE44"
199
-        "OwnerKey" = "8:_UNDEFINED"
198
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
199
+        "OwnerKey" = "8:_4053CC7DC75C48E98893BCEA2D692E55"
200
+        "MsmSig" = "8:_UNDEFINED"
201
+        }
202
+        "Entry"
203
+        {
204
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
205
+        "OwnerKey" = "8:_32F4158C158142089DB13F5F29F91589"
206
+        "MsmSig" = "8:_UNDEFINED"
207
+        }
208
+        "Entry"
209
+        {
210
+        "MsmKey" = "8:_E26F0CDAA61C437B9CC7EF502F84731E"
211
+        "OwnerKey" = "8:_29583B2B37A44A71864FFD88DFED2C8F"
200 212
         "MsmSig" = "8:_UNDEFINED"
201 213
         }
202 214
         "Entry"
... ...
@@ -223,6 +235,66 @@
223 223
         "OwnerKey" = "8:_42222ACB125B4398B7BF9C030F7DF8FB"
224 224
         "MsmSig" = "8:_UNDEFINED"
225 225
         }
226
+        "Entry"
227
+        {
228
+        "MsmKey" = "8:_UNDEFINED"
229
+        "OwnerKey" = "8:_129947045FE24C5AAEE6467547A6FBBB"
230
+        "MsmSig" = "8:_UNDEFINED"
231
+        }
232
+        "Entry"
233
+        {
234
+        "MsmKey" = "8:_UNDEFINED"
235
+        "OwnerKey" = "8:_E6AAF8DB843A4CDCBD12F62B44F0D947"
236
+        "MsmSig" = "8:_UNDEFINED"
237
+        }
238
+        "Entry"
239
+        {
240
+        "MsmKey" = "8:_UNDEFINED"
241
+        "OwnerKey" = "8:_C3F868E2F86F4F22914EBB33174331CF"
242
+        "MsmSig" = "8:_UNDEFINED"
243
+        }
244
+        "Entry"
245
+        {
246
+        "MsmKey" = "8:_UNDEFINED"
247
+        "OwnerKey" = "8:_AA48472048A74261A786515933650C63"
248
+        "MsmSig" = "8:_UNDEFINED"
249
+        }
250
+        "Entry"
251
+        {
252
+        "MsmKey" = "8:_UNDEFINED"
253
+        "OwnerKey" = "8:_86FBE3D4BB5F42609082FB54D8079705"
254
+        "MsmSig" = "8:_UNDEFINED"
255
+        }
256
+        "Entry"
257
+        {
258
+        "MsmKey" = "8:_UNDEFINED"
259
+        "OwnerKey" = "8:_64B5C4E9452F43349FB4D53DEE15C87D"
260
+        "MsmSig" = "8:_UNDEFINED"
261
+        }
262
+        "Entry"
263
+        {
264
+        "MsmKey" = "8:_UNDEFINED"
265
+        "OwnerKey" = "8:_42222ACB125B4398B7BF9C030F7DF8FB"
266
+        "MsmSig" = "8:_UNDEFINED"
267
+        }
268
+        "Entry"
269
+        {
270
+        "MsmKey" = "8:_UNDEFINED"
271
+        "OwnerKey" = "8:_4053CC7DC75C48E98893BCEA2D692E55"
272
+        "MsmSig" = "8:_UNDEFINED"
273
+        }
274
+        "Entry"
275
+        {
276
+        "MsmKey" = "8:_UNDEFINED"
277
+        "OwnerKey" = "8:_32F4158C158142089DB13F5F29F91589"
278
+        "MsmSig" = "8:_UNDEFINED"
279
+        }
280
+        "Entry"
281
+        {
282
+        "MsmKey" = "8:_UNDEFINED"
283
+        "OwnerKey" = "8:_29583B2B37A44A71864FFD88DFED2C8F"
284
+        "MsmSig" = "8:_UNDEFINED"
285
+        }
226 286
     }
227 287
     "Configurations"
228 288
     {
... ...
@@ -248,6 +320,19 @@
248 248
             "PrerequisitesLocation" = "2:1"
249 249
             "Url" = "8:"
250 250
             "ComponentsUrl" = "8:"
251
+                "Items"
252
+                {
253
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client"
254
+                    {
255
+                    "Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)"
256
+                    "ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client"
257
+                    }
258
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
259
+                    {
260
+                    "Name" = "8:Windows Installer 3.1"
261
+                    "ProductCode" = "8:Microsoft.Windows.Installer.3.1"
262
+                    }
263
+                }
251 264
             }
252 265
         }
253 266
         "Release"
... ...
@@ -272,6 +357,19 @@
272 272
             "PrerequisitesLocation" = "2:1"
273 273
             "Url" = "8:"
274 274
             "ComponentsUrl" = "8:"
275
+                "Items"
276
+                {
277
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client"
278
+                    {
279
+                    "Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)"
280
+                    "ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client"
281
+                    }
282
+                    "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
283
+                    {
284
+                    "Name" = "8:Windows Installer 3.1"
285
+                    "ProductCode" = "8:Microsoft.Windows.Installer.3.1"
286
+                    }
287
+                }
275 288
             }
276 289
         }
277 290
     }
... ...
@@ -290,6 +388,14 @@
290 290
         {
291 291
             "LaunchCondition"
292 292
             {
293
+                "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_C692B08A77FF4D50B94635F349068667"
294
+                {
295
+                "Name" = "8:.NET Framework"
296
+                "Message" = "8:[VSDNETMSG]"
297
+                "FrameworkVersion" = "8:.NETFramework,Version=v4.0,Profile=Client"
298
+                "AllowLaterVersions" = "11:FALSE"
299
+                "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=131000"
300
+                }
293 301
             }
294 302
         }
295 303
         "File"
... ...
@@ -374,6 +480,46 @@
374 374
             "IsDependency" = "11:FALSE"
375 375
             "IsolateTo" = "8:"
376 376
             }
377
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_4FC55746B30C48D59E9FE8557C108069"
378
+            {
379
+            "SourcePath" = "8:C:\\clamdeps\\win32\\openssl\\lib\\ssleay32.dll"
380
+            "TargetName" = "8:ssleay32.dll"
381
+            "Tag" = "8:"
382
+            "Folder" = "8:_C751D6577C584B05A32BF01390F14B9F"
383
+            "Condition" = "8:"
384
+            "Transitive" = "11:FALSE"
385
+            "Vital" = "11:TRUE"
386
+            "ReadOnly" = "11:FALSE"
387
+            "Hidden" = "11:FALSE"
388
+            "System" = "11:FALSE"
389
+            "Permanent" = "11:FALSE"
390
+            "SharedLegacy" = "11:FALSE"
391
+            "PackageAs" = "3:1"
392
+            "Register" = "3:1"
393
+            "Exclude" = "11:FALSE"
394
+            "IsDependency" = "11:FALSE"
395
+            "IsolateTo" = "8:"
396
+            }
397
+            "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_572E52797C0A4873ACFC45E53ED1FB78"
398
+            {
399
+            "SourcePath" = "8:C:\\clamdeps\\win32\\openssl\\lib\\libeay32.dll"
400
+            "TargetName" = "8:libeay32.dll"
401
+            "Tag" = "8:"
402
+            "Folder" = "8:_C751D6577C584B05A32BF01390F14B9F"
403
+            "Condition" = "8:"
404
+            "Transitive" = "11:FALSE"
405
+            "Vital" = "11:TRUE"
406
+            "ReadOnly" = "11:FALSE"
407
+            "Hidden" = "11:FALSE"
408
+            "System" = "11:FALSE"
409
+            "Permanent" = "11:FALSE"
410
+            "SharedLegacy" = "11:FALSE"
411
+            "PackageAs" = "3:1"
412
+            "Register" = "3:1"
413
+            "Exclude" = "11:FALSE"
414
+            "IsDependency" = "11:FALSE"
415
+            "IsolateTo" = "8:"
416
+            }
377 417
             "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_5C115FFB3D1542998DEB88C97B348F59"
378 418
             {
379 419
             "SourcePath" = "8:..\\..\\COPYING.unrar"
... ...
@@ -651,7 +797,7 @@
651 651
         "Name" = "8:Microsoft Visual Studio"
652 652
         "ProductName" = "8:ClamAV"
653 653
         "ProductCode" = "8:{088E38E4-6B8C-4603-8AB2-1E0762440E11}"
654
-        "PackageCode" = "8:{BD0C7A7A-99CC-4995-9B9C-CEFDD48B9A47}"
654
+        "PackageCode" = "8:{9A34A1A1-9677-44FC-BC23-3B168131B094}"
655 655
         "UpgradeCode" = "8:{B65ED295-87F7-4870-8017-E3A594DDADF8}"
656 656
         "AspNetVersion" = "8:4.0.30319.0"
657 657
         "RestartWWWService" = "11:FALSE"
... ...
@@ -1167,7 +1313,7 @@
1167 1167
         }
1168 1168
         "MergeModule"
1169 1169
         {
1170
-            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_59DC2980739C4FDAA8EC96CD313429EF"
1170
+            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_E26F0CDAA61C437B9CC7EF502F84731E"
1171 1171
             {
1172 1172
             "UseDynamicProperties" = "11:TRUE"
1173 1173
             "IsDependency" = "11:TRUE"
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
1
+<?xml version="1.0" encoding="utf-8"?>
3 2
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 3
   <ItemGroup Label="ProjectConfigurations">
5 4
     <ProjectConfiguration Include="Debug|Win32">
... ...
@@ -24,7 +23,7 @@
24 24
     <Keyword>Win32Proj</Keyword>
25 25
     <RootNamespace>clambc</RootNamespace>
26 26
   </PropertyGroup>
27
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
27
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 28
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29 29
     <ConfigurationType>Application</ConfigurationType>
30 30
     <UseDebugLibraries>true</UseDebugLibraries>
... ...
@@ -47,22 +46,22 @@
47 47
     <WholeProgramOptimization>true</WholeProgramOptimization>
48 48
     <CharacterSet>MultiByte</CharacterSet>
49 49
   </PropertyGroup>
50
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
50
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
51 51
   <ImportGroup Label="ExtensionSettings">
52 52
   </ImportGroup>
53 53
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
54
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
54
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
55 55
   </ImportGroup>
56 56
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
57
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
57
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
58 58
   </ImportGroup>
59 59
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
60
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
60
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
61 61
   </ImportGroup>
62 62
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
63
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
63
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
64 64
   </ImportGroup>
65
-  <PropertyGroup Label="UserMacros"/>
65
+  <PropertyGroup Label="UserMacros" />
66 66
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
67 67
     <LinkIncremental>true</LinkIncremental>
68 68
     <IntDir>$(SolutionDir)build\$(PlatformName)\$(ProjectName)\$(Configuration)\</IntDir>
... ...
@@ -89,13 +88,14 @@
89 89
       <WarningLevel>Level3</WarningLevel>
90 90
       <Optimization>Disabled</Optimization>
91 91
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
92
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
93 93
       <CompileAs>CompileAsC</CompileAs>
94 94
       <DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
95 95
     </ClCompile>
96 96
     <Link>
97 97
       <SubSystem>Console</SubSystem>
98 98
       <GenerateDebugInformation>true</GenerateDebugInformation>
99
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
99 100
     </Link>
100 101
   </ItemDefinitionGroup>
101 102
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
... ...
@@ -104,13 +104,14 @@
104 104
       <WarningLevel>Level3</WarningLevel>
105 105
       <Optimization>Disabled</Optimization>
106 106
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
107
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
108 108
       <CompileAs>CompileAsC</CompileAs>
109 109
       <DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
110 110
     </ClCompile>
111 111
     <Link>
112 112
       <SubSystem>Console</SubSystem>
113 113
       <GenerateDebugInformation>true</GenerateDebugInformation>
114
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
114 115
     </Link>
115 116
   </ItemDefinitionGroup>
116 117
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
... ...
@@ -121,7 +122,7 @@
121 121
       <FunctionLevelLinking>true</FunctionLevelLinking>
122 122
       <IntrinsicFunctions>true</IntrinsicFunctions>
123 123
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
124
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
125 125
       <CompileAs>CompileAsC</CompileAs>
126 126
       <DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
127 127
     </ClCompile>
... ...
@@ -130,6 +131,7 @@
130 130
       <GenerateDebugInformation>true</GenerateDebugInformation>
131 131
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
132 132
       <OptimizeReferences>true</OptimizeReferences>
133
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
133 134
     </Link>
134 135
   </ItemDefinitionGroup>
135 136
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
... ...
@@ -140,7 +142,7 @@
140 140
       <FunctionLevelLinking>true</FunctionLevelLinking>
141 141
       <IntrinsicFunctions>true</IntrinsicFunctions>
142 142
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
143
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
144 144
       <CompileAs>CompileAsC</CompileAs>
145 145
       <DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
146 146
     </ClCompile>
... ...
@@ -149,21 +151,22 @@
149 149
       <GenerateDebugInformation>true</GenerateDebugInformation>
150 150
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
151 151
       <OptimizeReferences>true</OptimizeReferences>
152
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
152 153
     </Link>
153 154
   </ItemDefinitionGroup>
154 155
   <ItemGroup>
155
-    <ClCompile Include="..\clambc\bcrun.c"/>
156
-    <ClCompile Include="..\shared\misc.c"/>
156
+    <ClCompile Include="..\clambc\bcrun.c" />
157
+    <ClCompile Include="..\shared\misc.c" />
157 158
   </ItemGroup>
158 159
   <ItemGroup>
159
-    <ResourceCompile Include="res\clambc.rc"/>
160
+    <ResourceCompile Include="res\clambc.rc" />
160 161
   </ItemGroup>
161 162
   <ItemGroup>
162 163
     <ProjectReference Include="libclamav.vcxproj">
163 164
       <Project>{09d341e9-7372-46e9-b0d7-caaf77984190}</Project>
164 165
     </ProjectReference>
165 166
   </ItemGroup>
166
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
167
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
167 168
   <ImportGroup Label="ExtensionTargets">
168 169
   </ImportGroup>
169
-</Project>
170
+</Project>
170 171
\ No newline at end of file
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
1
+<?xml version="1.0" encoding="utf-8"?>
3 2
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 3
   <ItemGroup Label="ProjectConfigurations">
5 4
     <ProjectConfiguration Include="Debug|Win32">
... ...
@@ -24,7 +23,7 @@
24 24
     <Keyword>Win32Proj</Keyword>
25 25
     <RootNamespace>clamconf</RootNamespace>
26 26
   </PropertyGroup>
27
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
27
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 28
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29 29
     <ConfigurationType>Application</ConfigurationType>
30 30
     <UseDebugLibraries>true</UseDebugLibraries>
... ...
@@ -47,22 +46,22 @@
47 47
     <WholeProgramOptimization>true</WholeProgramOptimization>
48 48
     <CharacterSet>MultiByte</CharacterSet>
49 49
   </PropertyGroup>
50
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
50
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
51 51
   <ImportGroup Label="ExtensionSettings">
52 52
   </ImportGroup>
53 53
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
54
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
54
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
55 55
   </ImportGroup>
56 56
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
57
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
57
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
58 58
   </ImportGroup>
59 59
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
60
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
60
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
61 61
   </ImportGroup>
62 62
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
63
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
63
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
64 64
   </ImportGroup>
65
-  <PropertyGroup Label="UserMacros"/>
65
+  <PropertyGroup Label="UserMacros" />
66 66
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
67 67
     <LinkIncremental>true</LinkIncremental>
68 68
     <IntDir>$(SolutionDir)build\$(PlatformName)\$(ProjectName)\$(Configuration)\</IntDir>
... ...
@@ -89,13 +88,14 @@
89 89
       <WarningLevel>Level3</WarningLevel>
90 90
       <Optimization>Disabled</Optimization>
91 91
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
92
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
93 93
       <CompileAs>CompileAsC</CompileAs>
94 94
       <DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
95 95
     </ClCompile>
96 96
     <Link>
97 97
       <SubSystem>Console</SubSystem>
98 98
       <GenerateDebugInformation>true</GenerateDebugInformation>
99
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
99 100
     </Link>
100 101
   </ItemDefinitionGroup>
101 102
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
... ...
@@ -104,13 +104,14 @@
104 104
       <WarningLevel>Level3</WarningLevel>
105 105
       <Optimization>Disabled</Optimization>
106 106
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
107
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
108 108
       <CompileAs>CompileAsC</CompileAs>
109 109
       <DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
110 110
     </ClCompile>
111 111
     <Link>
112 112
       <SubSystem>Console</SubSystem>
113 113
       <GenerateDebugInformation>true</GenerateDebugInformation>
114
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
114 115
     </Link>
115 116
   </ItemDefinitionGroup>
116 117
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
... ...
@@ -121,7 +122,7 @@
121 121
       <FunctionLevelLinking>true</FunctionLevelLinking>
122 122
       <IntrinsicFunctions>true</IntrinsicFunctions>
123 123
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
124
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
125 125
       <CompileAs>CompileAsC</CompileAs>
126 126
       <DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
127 127
     </ClCompile>
... ...
@@ -130,6 +131,7 @@
130 130
       <GenerateDebugInformation>true</GenerateDebugInformation>
131 131
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
132 132
       <OptimizeReferences>true</OptimizeReferences>
133
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
133 134
     </Link>
134 135
   </ItemDefinitionGroup>
135 136
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
... ...
@@ -140,7 +142,7 @@
140 140
       <FunctionLevelLinking>true</FunctionLevelLinking>
141 141
       <IntrinsicFunctions>true</IntrinsicFunctions>
142 142
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
143
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
144 144
       <CompileAs>CompileAsC</CompileAs>
145 145
       <DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
146 146
     </ClCompile>
... ...
@@ -149,21 +151,22 @@
149 149
       <GenerateDebugInformation>true</GenerateDebugInformation>
150 150
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
151 151
       <OptimizeReferences>true</OptimizeReferences>
152
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
152 153
     </Link>
153 154
   </ItemDefinitionGroup>
154 155
   <ItemGroup>
155
-    <ClCompile Include="..\clamconf\clamconf.c"/>
156
-    <ClCompile Include="..\shared\misc.c"/>
156
+    <ClCompile Include="..\clamconf\clamconf.c" />
157
+    <ClCompile Include="..\shared\misc.c" />
157 158
   </ItemGroup>
158 159
   <ItemGroup>
159
-    <ResourceCompile Include="res\clamconf.rc"/>
160
+    <ResourceCompile Include="res\clamconf.rc" />
160 161
   </ItemGroup>
161 162
   <ItemGroup>
162 163
     <ProjectReference Include="libclamav.vcxproj">
163 164
       <Project>{09d341e9-7372-46e9-b0d7-caaf77984190}</Project>
164 165
     </ProjectReference>
165 166
   </ItemGroup>
166
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
167
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
167 168
   <ImportGroup Label="ExtensionTargets">
168 169
   </ImportGroup>
169
-</Project>
170
+</Project>
170 171
\ No newline at end of file
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
1
+<?xml version="1.0" encoding="utf-8"?>
3 2
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 3
   <ItemGroup Label="ProjectConfigurations">
5 4
     <ProjectConfiguration Include="Debug|Win32">
... ...
@@ -24,7 +23,7 @@
24 24
     <Keyword>Win32Proj</Keyword>
25 25
     <RootNamespace>clamd</RootNamespace>
26 26
   </PropertyGroup>
27
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
27
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 28
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29 29
     <ConfigurationType>Application</ConfigurationType>
30 30
     <UseDebugLibraries>true</UseDebugLibraries>
... ...
@@ -47,22 +46,22 @@
47 47
     <WholeProgramOptimization>true</WholeProgramOptimization>
48 48
     <CharacterSet>MultiByte</CharacterSet>
49 49
   </PropertyGroup>
50
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
50
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
51 51
   <ImportGroup Label="ExtensionSettings">
52 52
   </ImportGroup>
53 53
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
54
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
54
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
55 55
   </ImportGroup>
56 56
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
57
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
57
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
58 58
   </ImportGroup>
59 59
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
60
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
60
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
61 61
   </ImportGroup>
62 62
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
63
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
63
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
64 64
   </ImportGroup>
65
-  <PropertyGroup Label="UserMacros"/>
65
+  <PropertyGroup Label="UserMacros" />
66 66
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
67 67
     <LinkIncremental>true</LinkIncremental>
68 68
     <IntDir>$(SolutionDir)build\$(PlatformName)\$(ProjectName)\$(Configuration)\</IntDir>
... ...
@@ -89,13 +88,14 @@
89 89
       <WarningLevel>Level3</WarningLevel>
90 90
       <Optimization>Disabled</Optimization>
91 91
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
92
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
93 93
       <CompileAs>CompileAsC</CompileAs>
94 94
       <DisableSpecificWarnings>4996;4244;4090;4018;4101</DisableSpecificWarnings>
95 95
     </ClCompile>
96 96
     <Link>
97 97
       <SubSystem>Console</SubSystem>
98 98
       <GenerateDebugInformation>true</GenerateDebugInformation>
99
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
99 100
     </Link>
100 101
   </ItemDefinitionGroup>
101 102
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
... ...
@@ -104,13 +104,14 @@
104 104
       <WarningLevel>Level3</WarningLevel>
105 105
       <Optimization>Disabled</Optimization>
106 106
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
107
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
108 108
       <CompileAs>CompileAsC</CompileAs>
109 109
       <DisableSpecificWarnings>4996;4244;4090;4018;4101;4267</DisableSpecificWarnings>
110 110
     </ClCompile>
111 111
     <Link>
112 112
       <SubSystem>Console</SubSystem>
113 113
       <GenerateDebugInformation>true</GenerateDebugInformation>
114
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
114 115
     </Link>
115 116
   </ItemDefinitionGroup>
116 117
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
... ...
@@ -121,7 +122,7 @@
121 121
       <FunctionLevelLinking>true</FunctionLevelLinking>
122 122
       <IntrinsicFunctions>true</IntrinsicFunctions>
123 123
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
124
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
125 125
       <CompileAs>CompileAsC</CompileAs>
126 126
       <DisableSpecificWarnings>4996;4244;4090;4018;4101</DisableSpecificWarnings>
127 127
     </ClCompile>
... ...
@@ -130,6 +131,7 @@
130 130
       <GenerateDebugInformation>true</GenerateDebugInformation>
131 131
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
132 132
       <OptimizeReferences>true</OptimizeReferences>
133
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
133 134
     </Link>
134 135
   </ItemDefinitionGroup>
135 136
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
... ...
@@ -140,7 +142,7 @@
140 140
       <FunctionLevelLinking>true</FunctionLevelLinking>
141 141
       <IntrinsicFunctions>true</IntrinsicFunctions>
142 142
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
143
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
144 144
       <CompileAs>CompileAsC</CompileAs>
145 145
       <DisableSpecificWarnings>4996;4244;4090;4018;4101;4267</DisableSpecificWarnings>
146 146
     </ClCompile>
... ...
@@ -149,30 +151,31 @@
149 149
       <GenerateDebugInformation>true</GenerateDebugInformation>
150 150
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
151 151
       <OptimizeReferences>true</OptimizeReferences>
152
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
152 153
     </Link>
153 154
   </ItemDefinitionGroup>
154 155
   <ItemGroup>
155
-    <ResourceCompile Include="res\clamd.rc"/>
156
+    <ResourceCompile Include="res\clamd.rc" />
156 157
   </ItemGroup>
157 158
   <ItemGroup>
158
-    <ClCompile Include="..\clamd\fan.c"/>
159
-    <ClCompile Include="..\clamd\clamd.c"/>
160
-    <ClCompile Include="..\clamd\localserver.c"/>
161
-    <ClCompile Include="..\clamd\others.c"/>
162
-    <ClCompile Include="..\clamd\scanner.c"/>
163
-    <ClCompile Include="..\clamd\server-th.c"/>
164
-    <ClCompile Include="..\clamd\session.c"/>
165
-    <ClCompile Include="..\clamd\tcpserver.c"/>
166
-    <ClCompile Include="..\clamd\thrmgr.c"/>
167
-    <ClCompile Include="..\shared\misc.c"/>
168
-    <ClCompile Include="..\shared\output.c"/>
159
+    <ClCompile Include="..\clamd\fan.c" />
160
+    <ClCompile Include="..\clamd\clamd.c" />
161
+    <ClCompile Include="..\clamd\localserver.c" />
162
+    <ClCompile Include="..\clamd\others.c" />
163
+    <ClCompile Include="..\clamd\scanner.c" />
164
+    <ClCompile Include="..\clamd\server-th.c" />
165
+    <ClCompile Include="..\clamd\session.c" />
166
+    <ClCompile Include="..\clamd\tcpserver.c" />
167
+    <ClCompile Include="..\clamd\thrmgr.c" />
168
+    <ClCompile Include="..\shared\misc.c" />
169
+    <ClCompile Include="..\shared\output.c" />
169 170
   </ItemGroup>
170 171
   <ItemGroup>
171 172
     <ProjectReference Include="libclamav.vcxproj">
172 173
       <Project>{09d341e9-7372-46e9-b0d7-caaf77984190}</Project>
173 174
     </ProjectReference>
174 175
   </ItemGroup>
175
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
176
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
176 177
   <ImportGroup Label="ExtensionTargets">
177 178
   </ImportGroup>
178
-</Project>
179
+</Project>
179 180
\ No newline at end of file
... ...
@@ -49,5 +49,8 @@
49 49
     <ClCompile Include="..\shared\misc.c">
50 50
       <Filter>Source Files\shared</Filter>
51 51
     </ClCompile>
52
+    <ClCompile Include="..\clamd\fan.c">
53
+      <Filter>Source Files</Filter>
54
+    </ClCompile>
52 55
   </ItemGroup>
53 56
 </Project>
54 57
\ No newline at end of file
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
1
+<?xml version="1.0" encoding="utf-8"?>
3 2
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 3
   <ItemGroup Label="ProjectConfigurations">
5 4
     <ProjectConfiguration Include="Debug|Win32">
... ...
@@ -24,7 +23,7 @@
24 24
     <Keyword>Win32Proj</Keyword>
25 25
     <RootNamespace>clamdscan</RootNamespace>
26 26
   </PropertyGroup>
27
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
27
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 28
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29 29
     <ConfigurationType>Application</ConfigurationType>
30 30
     <UseDebugLibraries>true</UseDebugLibraries>
... ...
@@ -47,22 +46,22 @@
47 47
     <WholeProgramOptimization>true</WholeProgramOptimization>
48 48
     <CharacterSet>MultiByte</CharacterSet>
49 49
   </PropertyGroup>
50
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
50
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
51 51
   <ImportGroup Label="ExtensionSettings">
52 52
   </ImportGroup>
53 53
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
54
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
54
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
55 55
   </ImportGroup>
56 56
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
57
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
57
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
58 58
   </ImportGroup>
59 59
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
60
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
60
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
61 61
   </ImportGroup>
62 62
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
63
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
63
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
64 64
   </ImportGroup>
65
-  <PropertyGroup Label="UserMacros"/>
65
+  <PropertyGroup Label="UserMacros" />
66 66
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
67 67
     <LinkIncremental>true</LinkIncremental>
68 68
     <IntDir>$(SolutionDir)build\$(PlatformName)\$(ProjectName)\$(Configuration)\</IntDir>
... ...
@@ -89,13 +88,14 @@
89 89
       <WarningLevel>Level3</WarningLevel>
90 90
       <Optimization>Disabled</Optimization>
91 91
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
92
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
93 93
       <CompileAs>CompileAsC</CompileAs>
94 94
       <DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
95 95
     </ClCompile>
96 96
     <Link>
97 97
       <SubSystem>Console</SubSystem>
98 98
       <GenerateDebugInformation>true</GenerateDebugInformation>
99
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
99 100
     </Link>
100 101
   </ItemDefinitionGroup>
101 102
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
... ...
@@ -104,13 +104,14 @@
104 104
       <WarningLevel>Level3</WarningLevel>
105 105
       <Optimization>Disabled</Optimization>
106 106
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
107
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
108 108
       <CompileAs>CompileAsC</CompileAs>
109 109
       <DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
110 110
     </ClCompile>
111 111
     <Link>
112 112
       <SubSystem>Console</SubSystem>
113 113
       <GenerateDebugInformation>true</GenerateDebugInformation>
114
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
114 115
     </Link>
115 116
   </ItemDefinitionGroup>
116 117
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
... ...
@@ -121,7 +122,7 @@
121 121
       <FunctionLevelLinking>true</FunctionLevelLinking>
122 122
       <IntrinsicFunctions>true</IntrinsicFunctions>
123 123
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
124
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
125 125
       <CompileAs>CompileAsC</CompileAs>
126 126
       <DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
127 127
     </ClCompile>
... ...
@@ -130,6 +131,7 @@
130 130
       <GenerateDebugInformation>true</GenerateDebugInformation>
131 131
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
132 132
       <OptimizeReferences>true</OptimizeReferences>
133
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
133 134
     </Link>
134 135
   </ItemDefinitionGroup>
135 136
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
... ...
@@ -140,7 +142,7 @@
140 140
       <FunctionLevelLinking>true</FunctionLevelLinking>
141 141
       <IntrinsicFunctions>true</IntrinsicFunctions>
142 142
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
143
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
144 144
       <CompileAs>CompileAsC</CompileAs>
145 145
       <DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
146 146
     </ClCompile>
... ...
@@ -149,26 +151,27 @@
149 149
       <GenerateDebugInformation>true</GenerateDebugInformation>
150 150
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
151 151
       <OptimizeReferences>true</OptimizeReferences>
152
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
152 153
     </Link>
153 154
   </ItemDefinitionGroup>
154 155
   <ItemGroup>
155
-    <ResourceCompile Include="res\clamdscan.rc"/>
156
+    <ResourceCompile Include="res\clamdscan.rc" />
156 157
   </ItemGroup>
157 158
   <ItemGroup>
158
-    <ClCompile Include="..\shared\clamdcom.c"/>
159
-    <ClCompile Include="..\clamdscan\clamdscan.c"/>
160
-    <ClCompile Include="..\clamdscan\client.c"/>
161
-    <ClCompile Include="..\clamdscan\proto.c"/>
162
-    <ClCompile Include="..\shared\actions.c"/>
163
-    <ClCompile Include="..\shared\misc.c"/>
164
-    <ClCompile Include="..\shared\output.c"/>
159
+    <ClCompile Include="..\shared\clamdcom.c" />
160
+    <ClCompile Include="..\clamdscan\clamdscan.c" />
161
+    <ClCompile Include="..\clamdscan\client.c" />
162
+    <ClCompile Include="..\clamdscan\proto.c" />
163
+    <ClCompile Include="..\shared\actions.c" />
164
+    <ClCompile Include="..\shared\misc.c" />
165
+    <ClCompile Include="..\shared\output.c" />
165 166
   </ItemGroup>
166 167
   <ItemGroup>
167 168
     <ProjectReference Include="libclamav.vcxproj">
168 169
       <Project>{09d341e9-7372-46e9-b0d7-caaf77984190}</Project>
169 170
     </ProjectReference>
170 171
   </ItemGroup>
171
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
172
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
172 173
   <ImportGroup Label="ExtensionTargets">
173 174
   </ImportGroup>
174
-</Project>
175
+</Project>
175 176
\ No newline at end of file
... ...
@@ -37,5 +37,8 @@
37 37
     <ClCompile Include="..\shared\misc.c">
38 38
       <Filter>Source Files\shared</Filter>
39 39
     </ClCompile>
40
+    <ClCompile Include="..\shared\clamdcom.c">
41
+      <Filter>Source Files</Filter>
42
+    </ClCompile>
40 43
   </ItemGroup>
41 44
 </Project>
42 45
\ No newline at end of file
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
1
+<?xml version="1.0" encoding="utf-8"?>
3 2
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 3
   <ItemGroup Label="ProjectConfigurations">
5 4
     <ProjectConfiguration Include="Debug|Win32">
... ...
@@ -24,7 +23,7 @@
24 24
     <Keyword>Win32Proj</Keyword>
25 25
     <RootNamespace>clamscan</RootNamespace>
26 26
   </PropertyGroup>
27
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
27
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 28
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29 29
     <ConfigurationType>Application</ConfigurationType>
30 30
     <UseDebugLibraries>true</UseDebugLibraries>
... ...
@@ -47,22 +46,22 @@
47 47
     <WholeProgramOptimization>true</WholeProgramOptimization>
48 48
     <CharacterSet>MultiByte</CharacterSet>
49 49
   </PropertyGroup>
50
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
50
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
51 51
   <ImportGroup Label="ExtensionSettings">
52 52
   </ImportGroup>
53 53
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
54
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
54
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
55 55
   </ImportGroup>
56 56
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
57
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
57
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
58 58
   </ImportGroup>
59 59
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
60
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
60
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
61 61
   </ImportGroup>
62 62
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
63
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
63
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
64 64
   </ImportGroup>
65
-  <PropertyGroup Label="UserMacros"/>
65
+  <PropertyGroup Label="UserMacros" />
66 66
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
67 67
     <LinkIncremental>true</LinkIncremental>
68 68
     <IntDir>$(SolutionDir)build\$(PlatformName)\$(ProjectName)\$(Configuration)\</IntDir>
... ...
@@ -89,7 +88,7 @@
89 89
       <WarningLevel>Level3</WarningLevel>
90 90
       <Optimization>Disabled</Optimization>
91 91
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
92
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
93 93
       <CompileAs>CompileAsC</CompileAs>
94 94
       <DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
95 95
     </ClCompile>
... ...
@@ -104,13 +103,14 @@
104 104
       <WarningLevel>Level3</WarningLevel>
105 105
       <Optimization>Disabled</Optimization>
106 106
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
107
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
108 108
       <CompileAs>CompileAsC</CompileAs>
109 109
       <DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
110 110
     </ClCompile>
111 111
     <Link>
112 112
       <SubSystem>Console</SubSystem>
113 113
       <GenerateDebugInformation>true</GenerateDebugInformation>
114
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
114 115
     </Link>
115 116
   </ItemDefinitionGroup>
116 117
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
... ...
@@ -121,7 +121,7 @@
121 121
       <FunctionLevelLinking>true</FunctionLevelLinking>
122 122
       <IntrinsicFunctions>true</IntrinsicFunctions>
123 123
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
124
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
125 125
       <CompileAs>CompileAsC</CompileAs>
126 126
       <DisableSpecificWarnings>4996;4244</DisableSpecificWarnings>
127 127
     </ClCompile>
... ...
@@ -130,6 +130,7 @@
130 130
       <GenerateDebugInformation>true</GenerateDebugInformation>
131 131
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
132 132
       <OptimizeReferences>true</OptimizeReferences>
133
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
133 134
     </Link>
134 135
   </ItemDefinitionGroup>
135 136
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
... ...
@@ -140,7 +141,7 @@
140 140
       <FunctionLevelLinking>true</FunctionLevelLinking>
141 141
       <IntrinsicFunctions>true</IntrinsicFunctions>
142 142
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
143
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
144 144
       <CompileAs>CompileAsC</CompileAs>
145 145
       <DisableSpecificWarnings>4996;4244;4267</DisableSpecificWarnings>
146 146
     </ClCompile>
... ...
@@ -149,24 +150,25 @@
149 149
       <GenerateDebugInformation>true</GenerateDebugInformation>
150 150
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
151 151
       <OptimizeReferences>true</OptimizeReferences>
152
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
152 153
     </Link>
153 154
   </ItemDefinitionGroup>
154 155
   <ItemGroup>
155
-    <ResourceCompile Include="res\clamscan.rc"/>
156
+    <ResourceCompile Include="res\clamscan.rc" />
156 157
   </ItemGroup>
157 158
   <ItemGroup>
158
-    <ClCompile Include="..\clamscan\clamscan.c"/>
159
-    <ClCompile Include="..\clamscan\manager.c"/>
160
-    <ClCompile Include="..\shared\actions.c"/>
161
-    <ClCompile Include="..\shared\misc.c"/>
162
-    <ClCompile Include="..\shared\output.c"/>
159
+    <ClCompile Include="..\clamscan\clamscan.c" />
160
+    <ClCompile Include="..\clamscan\manager.c" />
161
+    <ClCompile Include="..\shared\actions.c" />
162
+    <ClCompile Include="..\shared\misc.c" />
163
+    <ClCompile Include="..\shared\output.c" />
163 164
   </ItemGroup>
164 165
   <ItemGroup>
165 166
     <ProjectReference Include="libclamav.vcxproj">
166 167
       <Project>{09d341e9-7372-46e9-b0d7-caaf77984190}</Project>
167 168
     </ProjectReference>
168 169
   </ItemGroup>
169
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
170
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
170 171
   <ImportGroup Label="ExtensionTargets">
171 172
   </ImportGroup>
172
-</Project>
173
+</Project>
173 174
\ No newline at end of file
... ...
@@ -19,9 +19,6 @@
19 19
     </ResourceCompile>
20 20
   </ItemGroup>
21 21
   <ItemGroup>
22
-    <ClCompile Include="..\clamscan\others.c">
23
-      <Filter>Source Files</Filter>
24
-    </ClCompile>
25 22
     <ClCompile Include="..\clamscan\clamscan.c">
26 23
       <Filter>Source Files</Filter>
27 24
     </ClCompile>
... ...
@@ -19,6 +19,11 @@
19 19
  */
20 20
 
21 21
 #include <errno.h>
22
+
23
+#include <openssl/ssl.h>
24
+#include <openssl/err.h>
25
+#include "libclamav/crypto.h"
26
+
22 27
 #include "others.h"
23 28
 #include "dirent.h"
24 29
 #include "w32_stat.h"
... ...
@@ -100,4 +105,4 @@ int closedir(DIR *dirp) {
100 100
     rewinddir(dirp);
101 101
     free(dirp);
102 102
     return 0;
103
-}
104 103
\ No newline at end of file
104
+}
... ...
@@ -24,6 +24,10 @@
24 24
 #include <fcntl.h>
25 25
 #include <io.h>
26 26
 
27
+#include <openssl/ssl.h>
28
+#include <openssl/err.h>
29
+#include "libclamav/crypto.h"
30
+
27 31
 #include "others.h"
28 32
 #include "shared/misc.h"
29 33
 
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
1
+<?xml version="1.0" encoding="utf-8"?>
3 2
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 3
   <ItemGroup Label="ProjectConfigurations">
5 4
     <ProjectConfiguration Include="Debug|Win32">
... ...
@@ -24,7 +23,7 @@
24 24
     <Keyword>Win32Proj</Keyword>
25 25
     <RootNamespace>freshclam</RootNamespace>
26 26
   </PropertyGroup>
27
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
27
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 28
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29 29
     <ConfigurationType>Application</ConfigurationType>
30 30
     <UseDebugLibraries>true</UseDebugLibraries>
... ...
@@ -47,22 +46,22 @@
47 47
     <WholeProgramOptimization>true</WholeProgramOptimization>
48 48
     <CharacterSet>MultiByte</CharacterSet>
49 49
   </PropertyGroup>
50
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
50
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
51 51
   <ImportGroup Label="ExtensionSettings">
52 52
   </ImportGroup>
53 53
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
54
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
54
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
55 55
   </ImportGroup>
56 56
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
57
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
57
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
58 58
   </ImportGroup>
59 59
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
60
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
60
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
61 61
   </ImportGroup>
62 62
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
63
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
63
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
64 64
   </ImportGroup>
65
-  <PropertyGroup Label="UserMacros"/>
65
+  <PropertyGroup Label="UserMacros" />
66 66
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
67 67
     <LinkIncremental>true</LinkIncremental>
68 68
     <IntDir>$(SolutionDir)build\$(PlatformName)\$(ProjectName)\$(Configuration)\</IntDir>
... ...
@@ -89,7 +88,7 @@
89 89
       <WarningLevel>Level3</WarningLevel>
90 90
       <Optimization>Disabled</Optimization>
91 91
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
92
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
93 93
       <CompileAs>CompileAsC</CompileAs>
94 94
       <DisableSpecificWarnings>4996;4244;4101;4102;4018</DisableSpecificWarnings>
95 95
     </ClCompile>
... ...
@@ -97,6 +96,7 @@
97 97
       <SubSystem>Console</SubSystem>
98 98
       <GenerateDebugInformation>true</GenerateDebugInformation>
99 99
       <AdditionalDependencies>dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
100
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
100 101
     </Link>
101 102
   </ItemDefinitionGroup>
102 103
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
... ...
@@ -105,7 +105,7 @@
105 105
       <WarningLevel>Level3</WarningLevel>
106 106
       <Optimization>Disabled</Optimization>
107 107
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
108
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
108
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
109 109
       <CompileAs>CompileAsC</CompileAs>
110 110
       <DisableSpecificWarnings>4996;4244;4101;4102;4018;4267</DisableSpecificWarnings>
111 111
     </ClCompile>
... ...
@@ -113,6 +113,7 @@
113 113
       <SubSystem>Console</SubSystem>
114 114
       <GenerateDebugInformation>true</GenerateDebugInformation>
115 115
       <AdditionalDependencies>dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
116
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
116 117
     </Link>
117 118
   </ItemDefinitionGroup>
118 119
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
... ...
@@ -123,7 +124,7 @@
123 123
       <FunctionLevelLinking>true</FunctionLevelLinking>
124 124
       <IntrinsicFunctions>true</IntrinsicFunctions>
125 125
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
126
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
126
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
127 127
       <CompileAs>CompileAsC</CompileAs>
128 128
       <DisableSpecificWarnings>4996;4244;4101;4102;4018</DisableSpecificWarnings>
129 129
     </ClCompile>
... ...
@@ -133,6 +134,7 @@
133 133
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
134 134
       <OptimizeReferences>true</OptimizeReferences>
135 135
       <AdditionalDependencies>dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
136
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
136 137
     </Link>
137 138
   </ItemDefinitionGroup>
138 139
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
... ...
@@ -143,7 +145,7 @@
143 143
       <FunctionLevelLinking>true</FunctionLevelLinking>
144 144
       <IntrinsicFunctions>true</IntrinsicFunctions>
145 145
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
146
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
146
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
147 147
       <CompileAs>CompileAsC</CompileAs>
148 148
       <DisableSpecificWarnings>4996;4244;4101;4102;4018;4267</DisableSpecificWarnings>
149 149
     </ClCompile>
... ...
@@ -153,33 +155,38 @@
153 153
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
154 154
       <OptimizeReferences>true</OptimizeReferences>
155 155
       <AdditionalDependencies>dnsapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
156
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
156 157
     </Link>
157 158
   </ItemDefinitionGroup>
158 159
   <ItemGroup>
159
-    <ResourceCompile Include="res\freshclam.rc"/>
160
+    <ResourceCompile Include="res\freshclam.rc" />
160 161
   </ItemGroup>
161 162
   <ItemGroup>
162
-    <ClCompile Include="..\shared\clamdcom.c"/>
163
-    <ClCompile Include="..\freshclam\dns.c"/>
164
-    <ClCompile Include="..\freshclam\execute.c"/>
165
-    <ClCompile Include="..\freshclam\freshclam.c"/>
166
-    <ClCompile Include="..\freshclam\manager.c"/>
167
-    <ClCompile Include="..\freshclam\mirman.c"/>
168
-    <ClCompile Include="..\freshclam\nonblock.c"/>
169
-    <ClCompile Include="..\freshclam\notify.c"/>
170
-    <ClCompile Include="..\shared\cdiff.c"/>
171
-    <ClCompile Include="..\shared\misc.c"/>
172
-    <ClCompile Include="..\shared\output.c"/>
173
-    <ClCompile Include="..\shared\tar.c"/>
174
-    <ClCompile Include="compat\resolv.c"/>
175
-    <ClCompile Include="compat\strptime.c"/>
163
+    <ClCompile Include="..\shared\clamdcom.c" />
164
+    <ClCompile Include="..\freshclam\dns.c" />
165
+    <ClCompile Include="..\freshclam\execute.c" />
166
+    <ClCompile Include="..\freshclam\freshclam.c" />
167
+    <ClCompile Include="..\freshclam\manager.c" />
168
+    <ClCompile Include="..\freshclam\mirman.c" />
169
+    <ClCompile Include="..\freshclam\nonblock.c" />
170
+    <ClCompile Include="..\freshclam\notify.c" />
171
+    <ClCompile Include="..\shared\cdiff.c" />
172
+    <ClCompile Include="..\shared\misc.c" />
173
+    <ClCompile Include="..\shared\output.c" />
174
+    <ClCompile Include="..\shared\tar.c" />
175
+    <ClCompile Include="compat\resolv.c" />
176
+    <ClCompile Include="compat\strptime.c" />
176 177
   </ItemGroup>
177 178
   <ItemGroup>
178 179
     <ProjectReference Include="libclamav.vcxproj">
179 180
       <Project>{09d341e9-7372-46e9-b0d7-caaf77984190}</Project>
180 181
     </ProjectReference>
181 182
   </ItemGroup>
182
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
183
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
183 184
   <ImportGroup Label="ExtensionTargets">
184 185
   </ImportGroup>
185
-</Project>
186
+  <ItemGroup>
187
+    <Library Include="libeay32.lib" />
188
+    <Library Include="ssleay32.lib" />
189
+  </ItemGroup>
190
+</Project>
186 191
\ No newline at end of file
... ...
@@ -61,5 +61,12 @@
61 61
     <ClCompile Include="compat\resolv.c">
62 62
       <Filter>Source Files\compat</Filter>
63 63
     </ClCompile>
64
+    <ClCompile Include="..\shared\clamdcom.c">
65
+      <Filter>Source Files</Filter>
66
+    </ClCompile>
67
+  </ItemGroup>
68
+  <ItemGroup>
69
+    <Library Include="libeay32.lib" />
70
+    <Library Include="ssleay32.lib" />
64 71
   </ItemGroup>
65 72
 </Project>
66 73
\ No newline at end of file
... ...
@@ -51,7 +51,25 @@ EXPORTS cl_engine_set_clcb_stats_flush @43
51 51
 EXPORTS cl_engine_set_clcb_stats_get_num @44
52 52
 EXPORTS cl_engine_set_clcb_stats_get_size @45
53 53
 EXPORTS cl_engine_set_clcb_stats_get_hostid @46
54
-
54
+EXPORTS cl_hash_data @47
55
+EXPORTS cl_initialize_crypto @48
56
+EXPORTS cl_cleanup_crypto @49
57
+EXPORTS cl_hash_file_fd @50
58
+EXPORTS cl_hash_file_fp @51
59
+EXPORTS cl_sha256 @52
60
+EXPORTS cl_sha1 @53
61
+EXPORTS cl_verify_signature @54
62
+EXPORTS cl_verify_signature_x509_keyfile @55
63
+EXPORTS cl_verify_signature_x509 @56
64
+EXPORTS cl_sign_data_keyfile @57
65
+EXPORTS cl_sign_data @58
66
+EXPORTS cl_sign_file_fd @59
67
+EXPORTS cl_sign_file_fp @60
68
+EXPORTS cl_get_x509_from_mem @61
69
+EXPORTS cl_validate_certificate_chain @62
70
+EXPORTS cl_load_cert @63
71
+EXPORTS cl_ASN1_GetTimeT @64
72
+EXPORTS cl_load_crl @65
55 73
 
56 74
 ; path variables
57 75
 ; --------------
... ...
@@ -150,13 +168,6 @@ EXPORTS readdir @44273 NONAME
150 150
 EXPORTS closedir @44274 NONAME
151 151
 EXPORTS safe_open @44275 NONAME
152 152
 EXPORTS snprintf @44276 NONAME
153
-; SHA1 numbers reused from mp_* functions
154
-EXPORTS SHA1Init @44277 NONAME
155
-EXPORTS SHA1Update @44278 NONAME
156
-EXPORTS SHA1Final @44279 NONAME
157
-EXPORTS sha256_init @44280 NONAME
158
-EXPORTS sha256_update @44281 NONAME
159
-EXPORTS sha256_final @44282 NONAME
160 153
 EXPORTS optget @44283 NONAME
161 154
 EXPORTS optparse @44284 NONAME
162 155
 EXPORTS optfree @44285 NONAME
... ...
@@ -88,7 +88,7 @@
88 88
       <WarningLevel>Level3</WarningLevel>
89 89
       <Optimization>Disabled</Optimization>
90 90
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;PTW32_STATIC_LIB;THIS_IS_LIBCLAMAV;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCLAMAV_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
91
-      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)3rdparty\libxml2;$(SolutionDir)3rdparty\libxml2\include;$(SolutionDir)..</AdditionalIncludeDirectories>
91
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)3rdparty\libxml2;$(SolutionDir)3rdparty\libxml2\include;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
92 92
       <CompileAs>CompileAsC</CompileAs>
93 93
       <DisableSpecificWarnings>4996;4090;4244;4018;4101;4333;4146</DisableSpecificWarnings>
94 94
     </ClCompile>
... ...
@@ -97,6 +97,7 @@
97 97
       <GenerateDebugInformation>true</GenerateDebugInformation>
98 98
       <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
99 99
       <ModuleDefinitionFile>$(SolutionDir)libclamav.def</ModuleDefinitionFile>
100
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
100 101
     </Link>
101 102
   </ItemDefinitionGroup>
102 103
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
... ...
@@ -105,7 +106,7 @@
105 105
       <WarningLevel>Level3</WarningLevel>
106 106
       <Optimization>Disabled</Optimization>
107 107
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;PTW32_STATIC_LIB;THIS_IS_LIBCLAMAV;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCLAMAV_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
108
-      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)3rdparty\libxml2;$(SolutionDir)3rdparty\libxml2\include;$(SolutionDir)..</AdditionalIncludeDirectories>
108
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)3rdparty\libxml2;$(SolutionDir)3rdparty\libxml2\include;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
109 109
       <CompileAs>CompileAsC</CompileAs>
110 110
       <DisableSpecificWarnings>4996;4090;4244;4018;4101;4333;4146;4267;4334</DisableSpecificWarnings>
111 111
     </ClCompile>
... ...
@@ -114,6 +115,7 @@
114 114
       <GenerateDebugInformation>true</GenerateDebugInformation>
115 115
       <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
116 116
       <ModuleDefinitionFile>$(SolutionDir)libclamav.def</ModuleDefinitionFile>
117
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
117 118
     </Link>
118 119
   </ItemDefinitionGroup>
119 120
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
... ...
@@ -124,7 +126,7 @@
124 124
       <FunctionLevelLinking>true</FunctionLevelLinking>
125 125
       <IntrinsicFunctions>true</IntrinsicFunctions>
126 126
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;PTW32_STATIC_LIB;THIS_IS_LIBCLAMAV;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCLAMAV_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
127
-      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)3rdparty\libxml2;$(SolutionDir)3rdparty\libxml2\include;$(SolutionDir)..</AdditionalIncludeDirectories>
127
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)3rdparty\libxml2;$(SolutionDir)3rdparty\libxml2\include;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
128 128
       <CompileAs>CompileAsC</CompileAs>
129 129
       <DisableSpecificWarnings>4996;4090;4244;4018;4101;4333;4146</DisableSpecificWarnings>
130 130
     </ClCompile>
... ...
@@ -135,6 +137,7 @@
135 135
       <OptimizeReferences>true</OptimizeReferences>
136 136
       <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
137 137
       <ModuleDefinitionFile>$(SolutionDir)libclamav.def</ModuleDefinitionFile>
138
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
138 139
     </Link>
139 140
   </ItemDefinitionGroup>
140 141
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
... ...
@@ -145,7 +148,7 @@
145 145
       <FunctionLevelLinking>true</FunctionLevelLinking>
146 146
       <IntrinsicFunctions>true</IntrinsicFunctions>
147 147
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;PTW32_STATIC_LIB;THIS_IS_LIBCLAMAV;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCLAMAV_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
148
-      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)3rdparty\libxml2;$(SolutionDir)3rdparty\libxml2\include;$(SolutionDir)..</AdditionalIncludeDirectories>
148
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)3rdparty\libxml2;$(SolutionDir)3rdparty\libxml2\include;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
149 149
       <CompileAs>CompileAsC</CompileAs>
150 150
       <DisableSpecificWarnings>4996;4090;4244;4018;4101;4333;4146;4267;4334</DisableSpecificWarnings>
151 151
     </ClCompile>
... ...
@@ -156,6 +159,7 @@
156 156
       <OptimizeReferences>true</OptimizeReferences>
157 157
       <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
158 158
       <ModuleDefinitionFile>$(SolutionDir)libclamav.def</ModuleDefinitionFile>
159
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
159 160
     </Link>
160 161
   </ItemDefinitionGroup>
161 162
   <ItemGroup>
... ...
@@ -173,6 +177,8 @@
173 173
     <ClCompile Include="..\libclamav\7z\XzCrc64.c" />
174 174
     <ClCompile Include="..\libclamav\7z\XzDec.c" />
175 175
     <ClCompile Include="..\libclamav\7z\XzIn.c" />
176
+    <ClCompile Include="..\libclamav\conv.c" />
177
+    <ClCompile Include="..\libclamav\crypto.c" />
176 178
     <ClCompile Include="..\libclamav\fpu.c" />
177 179
     <ClCompile Include="..\libclamav\hostid.c" />
178 180
     <ClCompile Include="..\libclamav\json.c" />
... ...
@@ -276,7 +282,6 @@
276 276
     <ClCompile Include="..\libclamav\jpeg.c" />
277 277
     <ClCompile Include="..\libclamav\swf.c" />
278 278
     <ClCompile Include="..\libclamav\matcher-hash.c" />
279
-    <ClCompile Include="..\libclamav\sha1.c" />
280 279
     <ClCompile Include="..\libclamav\events.c" />
281 280
     <ClCompile Include="..\libclamav\bytecode_detect.c" />
282 281
     <ClCompile Include="..\libclamav\regex_list.c" />
... ...
@@ -343,7 +348,6 @@
343 343
     <ClCompile Include="..\libclamav\matcher.c" />
344 344
     <ClCompile Include="..\libclamav\mbox.c" />
345 345
     <ClCompile Include="..\libclamav\mbr.c" />
346
-    <ClCompile Include="..\libclamav\md5.c" />
347 346
     <ClCompile Include="..\libclamav\message.c" />
348 347
     <ClCompile Include="..\libclamav\mew.c" />
349 348
     <ClCompile Include="..\libclamav\mpool.c" />
... ...
@@ -375,7 +379,6 @@
375 375
     <ClCompile Include="..\libclamav\regex\regexec.c" />
376 376
     <ClCompile Include="..\libclamav\regex\regfree.c" />
377 377
     <ClCompile Include="..\libclamav\regex\strlcpy.c" />
378
-    <ClCompile Include="..\libclamav\sha256.c" />
379 378
     <ClCompile Include="..\libclamav\sis.c" />
380 379
     <ClCompile Include="..\libclamav\special.c" />
381 380
     <ClCompile Include="..\libclamav\spin.c" />
... ...
@@ -475,6 +478,7 @@
475 475
     <ClCompile Include="compat\net.c" />
476 476
     <ClCompile Include="compat\random.c" />
477 477
     <ClCompile Include="compat\snprintf.c" />
478
+    <ClCompile Include="compat\strptime.c" />
478 479
     <ClCompile Include="compat\utf8_util.c" />
479 480
     <ClCompile Include="compat\w32_errno.c" />
480 481
     <ClCompile Include="compat\w32_stat.c" />
... ...
@@ -497,6 +501,8 @@
497 497
     </ProjectReference>
498 498
   </ItemGroup>
499 499
   <ItemGroup>
500
+    <ClInclude Include="..\libclamav\conv.h" />
501
+    <ClInclude Include="..\libclamav\crypto.h" />
500 502
     <ClInclude Include="..\libclamav\hostid.h" />
501 503
     <ClInclude Include="..\libclamav\json.h" />
502 504
     <ClInclude Include="..\libclamav\stats.h" />
... ...
@@ -505,4 +511,8 @@
505 505
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
506 506
   <ImportGroup Label="ExtensionTargets">
507 507
   </ImportGroup>
508
+  <ItemGroup>
509
+    <Library Include="libeay32.lib" />
510
+    <Library Include="ssleay32.lib" />
511
+  </ItemGroup>
508 512
 </Project>
... ...
@@ -180,9 +180,6 @@
180 180
     <ClCompile Include="..\libclamav\mbr.c">
181 181
       <Filter>Source Files</Filter>
182 182
     </ClCompile>
183
-    <ClCompile Include="..\libclamav\md5.c">
184
-      <Filter>Source Files</Filter>
185
-    </ClCompile>
186 183
     <ClCompile Include="..\libclamav\message.c">
187 184
       <Filter>Source Files</Filter>
188 185
     </ClCompile>
... ...
@@ -303,9 +300,6 @@
303 303
     <ClCompile Include="..\libclamav\xar.c">
304 304
       <Filter>Source Files</Filter>
305 305
     </ClCompile>
306
-    <ClCompile Include="..\libclamav\sha256.c">
307
-      <Filter>Source Files</Filter>
308
-    </ClCompile>
309 306
     <ClCompile Include="3rdparty\zlib\zutil.c">
310 307
       <Filter>Source Files\zlib</Filter>
311 308
     </ClCompile>
... ...
@@ -495,9 +489,6 @@
495 495
     <ClCompile Include="..\libclamav\matcher-hash.c">
496 496
       <Filter>Source Files</Filter>
497 497
     </ClCompile>
498
-    <ClCompile Include="..\libclamav\sha1.c">
499
-      <Filter>Source Files</Filter>
500
-    </ClCompile>
501 498
     <ClCompile Include="..\libclamav\events.c">
502 499
       <Filter>Source Files</Filter>
503 500
     </ClCompile>
... ...
@@ -897,6 +888,15 @@
897 897
     <ClCompile Include="..\libclamav\www.c">
898 898
       <Filter>Source Files</Filter>
899 899
     </ClCompile>
900
+    <ClCompile Include="..\libclamav\conv.c">
901
+      <Filter>Source Files</Filter>
902
+    </ClCompile>
903
+    <ClCompile Include="..\libclamav\crypto.c">
904
+      <Filter>Source Files</Filter>
905
+    </ClCompile>
906
+    <ClCompile Include="compat\strptime.c">
907
+      <Filter>Source Files\compat</Filter>
908
+    </ClCompile>
900 909
   </ItemGroup>
901 910
   <ItemGroup>
902 911
     <ClInclude Include="..\libclamav\hostid.h">
... ...
@@ -911,5 +911,15 @@
911 911
     <ClInclude Include="..\libclamav\www.h">
912 912
       <Filter>Source Files</Filter>
913 913
     </ClInclude>
914
+    <ClInclude Include="..\libclamav\conv.h">
915
+      <Filter>Source Files</Filter>
916
+    </ClInclude>
917
+    <ClInclude Include="..\libclamav\crypto.h">
918
+      <Filter>Source Files</Filter>
919
+    </ClInclude>
920
+  </ItemGroup>
921
+  <ItemGroup>
922
+    <Library Include="libeay32.lib" />
923
+    <Library Include="ssleay32.lib" />
914 924
   </ItemGroup>
915 925
 </Project>
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
1
+<?xml version="1.0" encoding="utf-8"?>
3 2
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 3
   <ItemGroup Label="ProjectConfigurations">
5 4
     <ProjectConfiguration Include="Debug|Win32">
... ...
@@ -20,17 +19,17 @@
20 20
     </ProjectConfiguration>
21 21
   </ItemGroup>
22 22
   <ItemGroup>
23
-    <ClCompile Include="..\libclamav\c++\PointerTracking.cpp"/>
24
-    <ClCompile Include="..\libclamav\c++\detect.cpp"/>
25
-    <ClCompile Include="..\libclamav\c++\bytecode2llvm.cpp"/>
26
-    <ClCompile Include="..\libclamav\c++\ClamBCRTChecks.cpp"/>
23
+    <ClCompile Include="..\libclamav\c++\PointerTracking.cpp" />
24
+    <ClCompile Include="..\libclamav\c++\detect.cpp" />
25
+    <ClCompile Include="..\libclamav\c++\bytecode2llvm.cpp" />
26
+    <ClCompile Include="..\libclamav\c++\ClamBCRTChecks.cpp" />
27 27
   </ItemGroup>
28 28
   <PropertyGroup Label="Globals">
29 29
     <ProjectGuid>{3AE8051D-A188-4B11-95A4-14B8F0C290CB}</ProjectGuid>
30 30
     <Keyword>Win32Proj</Keyword>
31 31
     <RootNamespace>libclamavcxx</RootNamespace>
32 32
   </PropertyGroup>
33
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
33
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
34 34
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
35 35
     <ConfigurationType>StaticLibrary</ConfigurationType>
36 36
     <UseDebugLibraries>true</UseDebugLibraries>
... ...
@@ -53,22 +52,22 @@
53 53
     <WholeProgramOptimization>true</WholeProgramOptimization>
54 54
     <CharacterSet>MultiByte</CharacterSet>
55 55
   </PropertyGroup>
56
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
56
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
57 57
   <ImportGroup Label="ExtensionSettings">
58 58
   </ImportGroup>
59 59
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
60
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
60
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
61 61
   </ImportGroup>
62 62
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
63
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
63
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
64 64
   </ImportGroup>
65 65
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
66
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
66
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
67 67
   </ImportGroup>
68 68
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
69
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
69
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
70 70
   </ImportGroup>
71
-  <PropertyGroup Label="UserMacros"/>
71
+  <PropertyGroup Label="UserMacros" />
72 72
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
73 73
     <IntDir>$(SolutionDir)build\$(PlatformName)\$(ProjectName)\$(Configuration)\</IntDir>
74 74
     <OutDir>$(SolutionDir)$(PlatformName)\$(Configuration)\</OutDir>
... ...
@@ -91,7 +90,7 @@
91 91
       <WarningLevel>Level3</WarningLevel>
92 92
       <Optimization>Disabled</Optimization>
93 93
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav\c++\llvm\include";"$(SolutionDir)llvmbuild\include";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)..";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\zlib"</AdditionalIncludeDirectories>
94
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav\c++\llvm\include;$(SolutionDir)llvmbuild\include;$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)..;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\zlib;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
95 95
       <CompileAs>CompileAsCpp</CompileAs>
96 96
       <DisableSpecificWarnings>4146;4800;4244;4996;4355</DisableSpecificWarnings>
97 97
     </ClCompile>
... ...
@@ -106,7 +105,7 @@
106 106
       <WarningLevel>Level3</WarningLevel>
107 107
       <Optimization>Disabled</Optimization>
108 108
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
109
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav\c++\llvm\include";"$(SolutionDir)llvmbuild\include";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)..";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\zlib"</AdditionalIncludeDirectories>
109
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav\c++\llvm\include;$(SolutionDir)llvmbuild\include;$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)..;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\zlib;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
110 110
       <CompileAs>CompileAsCpp</CompileAs>
111 111
       <DisableSpecificWarnings>4146;4800;4244;4996;4355;4267</DisableSpecificWarnings>
112 112
     </ClCompile>
... ...
@@ -123,7 +122,7 @@
123 123
       <FunctionLevelLinking>true</FunctionLevelLinking>
124 124
       <IntrinsicFunctions>true</IntrinsicFunctions>
125 125
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
126
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav\c++\llvm\include";"$(SolutionDir)llvmbuild\include";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)..";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\zlib"</AdditionalIncludeDirectories>
126
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav\c++\llvm\include;$(SolutionDir)llvmbuild\include;$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)..;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\zlib;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
127 127
       <CompileAs>CompileAsCpp</CompileAs>
128 128
       <DisableSpecificWarnings>4146;4800;4244;4996;4355</DisableSpecificWarnings>
129 129
     </ClCompile>
... ...
@@ -142,7 +141,7 @@
142 142
       <FunctionLevelLinking>true</FunctionLevelLinking>
143 143
       <IntrinsicFunctions>true</IntrinsicFunctions>
144 144
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
145
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav\c++\llvm\include";"$(SolutionDir)llvmbuild\include";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)..";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\zlib"</AdditionalIncludeDirectories>
145
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav\c++\llvm\include;$(SolutionDir)llvmbuild\include;$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)..;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\zlib;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
146 146
       <CompileAs>CompileAsCpp</CompileAs>
147 147
       <DisableSpecificWarnings>4146;4800;4244;4996;4355;4267</DisableSpecificWarnings>
148 148
     </ClCompile>
... ...
@@ -153,7 +152,7 @@
153 153
       <OptimizeReferences>true</OptimizeReferences>
154 154
     </Link>
155 155
   </ItemDefinitionGroup>
156
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
156
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
157 157
   <ImportGroup Label="ExtensionTargets">
158 158
   </ImportGroup>
159
-</Project>
159
+</Project>
160 160
\ No newline at end of file
... ...
@@ -13,5 +13,11 @@
13 13
     <ClCompile Include="..\libclamav\c++\ClamBCRTChecks.cpp">
14 14
       <Filter>Source Files</Filter>
15 15
     </ClCompile>
16
+    <ClCompile Include="..\libclamav\c++\PointerTracking.cpp">
17
+      <Filter>Source Files</Filter>
18
+    </ClCompile>
19
+    <ClCompile Include="..\libclamav\c++\detect.cpp">
20
+      <Filter>Source Files</Filter>
21
+    </ClCompile>
16 22
   </ItemGroup>
17 23
 </Project>
18 24
\ No newline at end of file
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-
1
+<?xml version="1.0" encoding="utf-8"?>
3 2
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 3
   <ItemGroup Label="ProjectConfigurations">
5 4
     <ProjectConfiguration Include="Debug|Win32">
... ...
@@ -24,7 +23,7 @@
24 24
     <Keyword>Win32Proj</Keyword>
25 25
     <RootNamespace>sigtool</RootNamespace>
26 26
   </PropertyGroup>
27
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
27
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 28
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
29 29
     <ConfigurationType>Application</ConfigurationType>
30 30
     <UseDebugLibraries>true</UseDebugLibraries>
... ...
@@ -47,22 +46,22 @@
47 47
     <WholeProgramOptimization>true</WholeProgramOptimization>
48 48
     <CharacterSet>MultiByte</CharacterSet>
49 49
   </PropertyGroup>
50
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
50
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
51 51
   <ImportGroup Label="ExtensionSettings">
52 52
   </ImportGroup>
53 53
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
54
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
54
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
55 55
   </ImportGroup>
56 56
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
57
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
57
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
58 58
   </ImportGroup>
59 59
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
60
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
60
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
61 61
   </ImportGroup>
62 62
   <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
63
-    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
63
+    <Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
64 64
   </ImportGroup>
65
-  <PropertyGroup Label="UserMacros"/>
65
+  <PropertyGroup Label="UserMacros" />
66 66
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
67 67
     <LinkIncremental>true</LinkIncremental>
68 68
     <OutDir>$(SolutionDir)$(PlatformName)\$(Configuration)\</OutDir>
... ...
@@ -89,13 +88,14 @@
89 89
       <WarningLevel>Level3</WarningLevel>
90 90
       <Optimization>Disabled</Optimization>
91 91
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
92
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
93 93
       <CompileAs>CompileAsC</CompileAs>
94 94
       <DisableSpecificWarnings>4996;4101;4244;4018</DisableSpecificWarnings>
95 95
     </ClCompile>
96 96
     <Link>
97 97
       <SubSystem>Console</SubSystem>
98 98
       <GenerateDebugInformation>true</GenerateDebugInformation>
99
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
99 100
     </Link>
100 101
   </ItemDefinitionGroup>
101 102
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
... ...
@@ -104,13 +104,14 @@
104 104
       <WarningLevel>Level3</WarningLevel>
105 105
       <Optimization>Disabled</Optimization>
106 106
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
107
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
107
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
108 108
       <CompileAs>CompileAsC</CompileAs>
109 109
       <DisableSpecificWarnings>4996;4101;4244;4018;4267</DisableSpecificWarnings>
110 110
     </ClCompile>
111 111
     <Link>
112 112
       <SubSystem>Console</SubSystem>
113 113
       <GenerateDebugInformation>true</GenerateDebugInformation>
114
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
114 115
     </Link>
115 116
   </ItemDefinitionGroup>
116 117
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
... ...
@@ -121,7 +122,7 @@
121 121
       <FunctionLevelLinking>true</FunctionLevelLinking>
122 122
       <IntrinsicFunctions>true</IntrinsicFunctions>
123 123
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
124
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
124
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win32\openssl\include</AdditionalIncludeDirectories>
125 125
       <CompileAs>CompileAsC</CompileAs>
126 126
       <DisableSpecificWarnings>4996;4101;4244;4018</DisableSpecificWarnings>
127 127
     </ClCompile>
... ...
@@ -130,6 +131,7 @@
130 130
       <GenerateDebugInformation>true</GenerateDebugInformation>
131 131
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
132 132
       <OptimizeReferences>true</OptimizeReferences>
133
+      <AdditionalLibraryDirectories>C:\clamdeps\win32\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
133 134
     </Link>
134 135
   </ItemDefinitionGroup>
135 136
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
... ...
@@ -140,7 +142,7 @@
140 140
       <FunctionLevelLinking>true</FunctionLevelLinking>
141 141
       <IntrinsicFunctions>true</IntrinsicFunctions>
142 142
       <PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
143
-      <AdditionalIncludeDirectories>"$(SolutionDir)";"$(SolutionDir)..\libclamav";"$(SolutionDir)compat";"$(SolutionDir)3rdparty\zlib";"$(SolutionDir)3rdparty\pthreads";"$(SolutionDir)3rdparty\bzip2";"$(SolutionDir).."</AdditionalIncludeDirectories>
143
+      <AdditionalIncludeDirectories>$(SolutionDir);$(SolutionDir)..\libclamav;$(SolutionDir)compat;$(SolutionDir)3rdparty\zlib;$(SolutionDir)3rdparty\pthreads;$(SolutionDir)3rdparty\bzip2;$(SolutionDir)..;C:\clamdeps\win64\openssl\include</AdditionalIncludeDirectories>
144 144
       <CompileAs>CompileAsC</CompileAs>
145 145
       <DisableSpecificWarnings>4996;4101;4244;4018;4267</DisableSpecificWarnings>
146 146
     </ClCompile>
... ...
@@ -149,25 +151,30 @@
149 149
       <GenerateDebugInformation>true</GenerateDebugInformation>
150 150
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
151 151
       <OptimizeReferences>true</OptimizeReferences>
152
+      <AdditionalLibraryDirectories>C:\clamdeps\win64\openssl\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
152 153
     </Link>
153 154
   </ItemDefinitionGroup>
154 155
   <ItemGroup>
155
-    <ResourceCompile Include="res\sigtool.rc"/>
156
+    <ResourceCompile Include="res\sigtool.rc" />
156 157
   </ItemGroup>
157 158
   <ItemGroup>
158
-    <ClCompile Include="..\shared\cdiff.c"/>
159
-    <ClCompile Include="..\shared\misc.c"/>
160
-    <ClCompile Include="..\shared\output.c"/>
161
-    <ClCompile Include="..\shared\tar.c"/>
162
-    <ClCompile Include="..\sigtool\sigtool.c"/>
163
-    <ClCompile Include="..\sigtool\vba.c"/>
159
+    <ClCompile Include="..\shared\cdiff.c" />
160
+    <ClCompile Include="..\shared\misc.c" />
161
+    <ClCompile Include="..\shared\output.c" />
162
+    <ClCompile Include="..\shared\tar.c" />
163
+    <ClCompile Include="..\sigtool\sigtool.c" />
164
+    <ClCompile Include="..\sigtool\vba.c" />
164 165
   </ItemGroup>
165 166
   <ItemGroup>
166 167
     <ProjectReference Include="libclamav.vcxproj">
167 168
       <Project>{09d341e9-7372-46e9-b0d7-caaf77984190}</Project>
168 169
     </ProjectReference>
169 170
   </ItemGroup>
170
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
171
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
171 172
   <ImportGroup Label="ExtensionTargets">
172 173
   </ImportGroup>
173
-</Project>
174
+  <ItemGroup>
175
+    <Library Include="libeay32.lib" />
176
+    <Library Include="ssleay32.lib" />
177
+  </ItemGroup>
178
+</Project>
174 179
\ No newline at end of file
... ...
@@ -38,4 +38,8 @@
38 38
       <Filter>Source Files\shared</Filter>
39 39
     </ClCompile>
40 40
   </ItemGroup>
41
+  <ItemGroup>
42
+	<Library Include="libeay32.lib" />
43
+	<Library Include="ssleay32.lib" />
44
+  </ItemGroup>
41 45
 </Project>
42 46
\ No newline at end of file