[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:11:52 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 5b5e4e6ef097da6b0b70fd5d1b1cc94e04e4e2ad
Merge: a295207b81fc4e641dcc897b37046799eec0ebde 1b2396cabb09c2d5ab2079cafe1f11b43bfb9e5e
Author: Török Edvin <edwin at clamav.net>
Date:   Fri Dec 11 18:21:04 2009 +0200

    Merge branch 'bytecode'
    
    * bytecode: (99 commits)
      Update to autoconf 2.65, and libtool 2.2.6b.
      Disable LLVM's make check for now.
      Output trace messages to stderr, to ensure its flushed.
      Support for bytecode lines >8k.
      Print llvm's version too when printing clambc's.
      Fix global initializer bitcasts.
      Allow controlling trace level from cmdline.
      Refactor trace API, so that trace printing happens in clambc.
      Add support for null constant.
      Trace formatting fixes.
      Add support for tracing (if bytecode compiled with support).
      Drop extra {} and "".
      Fix compiler version check for C++: autoconf needs [] to be escaped.
      change bytecode format to allow structs with more than 16 fields.
      Fix after merge: update to fmap API.
      Support for scanning files created by bytecode.
      read optional debug metadata.
      Sync headers with clamav bytecode compiler.
      Print better error message when wrong function is called.
      Update to new LLVM API.
      ...
    
    Conflicts:
    	Makefile.am
    	Makefile.in
    	configure
    	configure.in
    	libclamav/Makefile.am
    	libclamav/Makefile.in
    	libclamav/pe.h

diff --combined ChangeLog
index 8ee9845,aeaac0b..b6e00fe
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,19 -1,3 +1,19 @@@
 +Fri Dec 11 00:54:52 CET 2009 (acab)
 +---------------------------------
 + * libclamav: merge icon extraction and matching branch(exeicons)
 +
 +Wed Dec  9 23:31:54 CET 2009 (tk)
 +---------------------------------
 + * sigtool: add --test-sigs (basic functionality) (bb#1246)
 +
 +Fri Dec  4 15:55:51 CET 2009 (tk)
 +---------------------------------
 + * freshclam/manager.c: improve handling of problematic mirrors (bb#1758)
 +
 +Fri Dec  4 14:19:23 CET 2009 (tk)
 +---------------------------------
 + * clamscan: properly describe --include/exclude (bb#1765)
 +
  Wed Dec  2 23:17:27 CET 2009 (tk)
  ---------------------------------
   * libclamav/qsort.c: fix CMP1 macro (bb#1769)
@@@ -253,6 -237,10 +253,10 @@@ Fri Oct  2 14:33:09 CEST 2009 (tk
  ----------------------------------
   * libclamav/scanners.c: fix whitelisting of scripts (bb#1706)
  
+ Fri Oct 30 14:04:43 EET 2009 (edwin)
+ ------------------------------------
+  * configure, m4/acinclude.m4: Avoid trailing slash in libdir for old gcc (#1738).
+ 
  Wed Sep 30 19:41:43 EEST 2009 (edwin)
  -------------------------------------
   * configure{.in,}: Only use -fno-strict-aliasing for gcc-4.3+ to avoid bugs
diff --combined Makefile.am
index 230ad60,4ab7618..73c2029
--- a/Makefile.am
+++ b/Makefile.am
@@@ -29,8 -29,13 +29,9 @@@ pkgconfig_DATA = libclamav.p
  # don't complain that configuration files and databases are not removed, this is intended
  distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
  DISTCLEANFILES = target.h
- DISTCHECK_CONFIGURE_FLAGS=--enable-milter --disable-clamav --enable-distcheck-werror
 -if DISTCHECK_ENABLE_FLAGS
 -DISTCHECK_CONFIGURE_FLAGS=--enable-milter --enable-llvm=yes --enable-all-jit-targets --disable-clamav CFLAGS="-Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-function -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=aggregate-return"
 -else
 -DISTCHECK_CONFIGURE_FLAGS=--enable-milter --enable-llvm=yes --enable-all-jit-targets --disable-clamav
 -endif
++DISTCHECK_CONFIGURE_FLAGS=--enable-milter --disable-clamav --enable-distcheck-werror --enable-all-jit-targets --enable-llvm=yes
  lcov:
  	($(MAKE); cd unit_tests; $(MAKE) lcov)
  quick-check:
  	($(MAKE); cd unit_tests; $(MAKE) quick-check)
+ 
diff --combined Makefile.in
index 8edee49,0c7253e..34b3475
--- a/Makefile.in
+++ b/Makefile.in
@@@ -77,9 -77,9 +77,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -235,7 -235,6 +235,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -324,6 -323,7 +324,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
@@@ -344,7 -344,51 +345,7 @@@ pkgconfig_DATA = libclamav.p
  # don't complain that configuration files and databases are not removed, this is intended
  distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
  DISTCLEANFILES = target.h
- DISTCHECK_CONFIGURE_FLAGS = --enable-milter --disable-clamav --enable-distcheck-werror
 - at DISTCHECK_ENABLE_FLAGS_FALSE@DISTCHECK_CONFIGURE_FLAGS = --enable-milter --enable-llvm=yes --enable-all-jit-targets --disable-clamav
 - at DISTCHECK_ENABLE_FLAGS_TRUE@DISTCHECK_CONFIGURE_FLAGS =  \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	--enable-milter --enable-llvm=yes \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	--enable-all-jit-targets \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	--disable-clamav \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	CFLAGS="-Wno-pointer-sign \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Werror-implicit-function-declaration \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Werror -Wextra -Wall \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wbad-function-cast -Wcast-align \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wendif-labels -Wfloat-equal \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wformat=2 -Wformat-security \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wmissing-declarations \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wmissing-prototypes \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=missing-prototypes \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wnested-externs \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=nested-externs \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wpointer-arith \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wstrict-prototypes \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=strict-prototypes \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-switch -Wno-switch-enum \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wundef -Wwrite-strings \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wstrict-overflow=1 -Winit-self \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wmissing-include-dirs \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wstrict-aliasing \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wdeclaration-after-statement \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Waggregate-return \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wmissing-format-attribute \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=missing-format-attribute \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=type-limits \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=unused-function \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=unused-value \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=unused-variable \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wcast-qual -Wno-error=cast-qual \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=sign-compare -Wshadow \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=shadow \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=uninitialized \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-fdiagnostics-show-option \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-unused-parameter \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=unreachable-code \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Winvalid-pch \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=invalid-pch -O2 \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-D_FORTIFY_SOURCE=2 \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-fstack-protector-all \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wstack-protector \
 - at DISTCHECK_ENABLE_FLAGS_TRUE@	-Wno-error=aggregate-return"
++DISTCHECK_CONFIGURE_FLAGS = --enable-milter --disable-clamav --enable-distcheck-werror --enable-all-jit-targets --enable-llvm=yes
  all: clamav-config.h
  	$(MAKE) $(AM_MAKEFLAGS) all-recursive
  
diff --combined clamav-milter/Makefile.in
index 484d616,9471f79..0373f1b
--- a/clamav-milter/Makefile.in
+++ b/clamav-milter/Makefile.in
@@@ -62,9 -62,9 +62,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -211,7 -211,6 +211,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = $(top_builddir)/libclamav/libclamav_internal_utils.la @CLAMAV_MILTER_LIBS@ @THREAD_LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -300,6 -299,7 +300,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined clambc/Makefile.in
index fde191c,81526db..0020746
--- a/clambc/Makefile.in
+++ b/clambc/Makefile.in
@@@ -43,9 -43,9 +43,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -153,7 -153,6 +153,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -242,6 -241,7 +242,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined clamconf/Makefile.in
index 9c3b279,89cb0d1..36bfeb0
--- a/clamconf/Makefile.in
+++ b/clamconf/Makefile.in
@@@ -61,9 -61,9 +61,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -171,7 -171,6 +171,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -260,6 -259,7 +260,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined clamd/Makefile.in
index 6b292b6,c907d5c..7d1ed00
--- a/clamd/Makefile.in
+++ b/clamd/Makefile.in
@@@ -61,9 -61,9 +61,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -189,7 -189,6 +189,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -278,6 -277,7 +278,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined clamdscan/Makefile.in
index 118b5de,9f1e22b..4c0cf10
--- a/clamdscan/Makefile.in
+++ b/clamdscan/Makefile.in
@@@ -61,9 -61,9 +61,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -182,7 -182,6 +182,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = $(top_builddir)/libclamav/libclamav_internal_utils_nothreads.la  @FRESHCLAM_LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -271,6 -270,7 +271,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined clamdtop/Makefile.in
index 6cf5b63,661f9e8..3047af4
--- a/clamdtop/Makefile.in
+++ b/clamdtop/Makefile.in
@@@ -43,9 -43,9 +43,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -182,7 -182,6 +182,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -271,6 -270,7 +271,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined clamscan/Makefile.in
index 384608a,4f28044..77a8794
--- a/clamscan/Makefile.in
+++ b/clamscan/Makefile.in
@@@ -62,9 -62,9 +62,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -173,7 -173,6 +173,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -262,6 -261,7 +262,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined configure
index 2188244,131f8a7..05f0151
--- a/configure
+++ b/configure
@@@ -745,12 -745,16 +745,16 @@@ ac_includes_default="
  # include <unistd.h>
  #endif"
  
- ac_subst_vars='ltdl_LTLIBOBJS
+ enable_option_checking=no
+ ac_subst_vars='ENABLE_LLVM_FALSE
+ ENABLE_LLVM_TRUE
+ ltdl_LTLIBOBJS
  ltdl_LIBOBJS
  am__EXEEXT_FALSE
  am__EXEEXT_TRUE
  LTLIBOBJS
  LIBOBJS
+ subdirs
  HAVE_CURSES_FALSE
  HAVE_CURSES_TRUE
  CURSES_LIBS
@@@ -793,7 -797,8 +797,7 @@@ GPER
  VERSIONSCRIPT_FALSE
  VERSIONSCRIPT_TRUE
  VERSIONSCRIPTFLAG
 -DISTCHECK_ENABLE_FLAGS_FALSE
 -DISTCHECK_ENABLE_FLAGS_TRUE
 +LIBM
  LTDLOPEN
  LT_CONFIG_H
  CONVENIENCE_LTDL_FALSE
@@@ -928,8 -933,8 +932,8 @@@ ac_subst_files='
  ac_user_opts='
  enable_option_checking
  enable_silent_rules
- enable_shared
  enable_static
+ enable_shared
  with_pic
  enable_fast_install
  enable_dependency_tracking
@@@ -977,7 -982,7 +981,8 @@@ enable_fdpassin
  enable_clamdtop
  with_libncurses_prefix
  with_libpdcurses_prefix
 +enable_distcheck_werror
+ enable_llvm
  '
        ac_precious_vars='build_alias
  host_alias
@@@ -988,7 -993,8 +993,8 @@@ LDFLAG
  LIBS
  CPPFLAGS
  CPP'
- 
+ ac_subdirs_all='
+ libclamav/c++'
  
  # Initialize some variables set by options.
  ac_init_help=
@@@ -1610,8 -1616,8 +1616,8 @@@ Optional Features
    --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
    --enable-silent-rules          less verbose build output (undo: `make V=1')
    --disable-silent-rules         verbose build output (undo: `make V=0')
+   --enable-static[=PKGS]  build static libraries [default=no]
    --enable-shared[=PKGS]  build shared libraries [default=yes]
-   --enable-static[=PKGS]  build static libraries [default=yes]
    --enable-fast-install[=PKGS]
                            optimize for fast installation [default=yes]
    --disable-dependency-tracking  speeds up one-time build
@@@ -1647,8 -1653,7 +1653,9 @@@
    --enable-readdir_r		    enable support for readdir_r
    --disable-fdpassing        don't build file descriptor passing support
    --enable-clamdtop       Enable 'clamdtop' tool [default=auto]
 +  --enable-distcheck-werror
 +                          enable warnings as error for distcheck [default=no]
+   --enable-llvm           Enable 'llvm' JIT/verifier support [default=auto]
  
  Optional Packages:
    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@@ -5157,13 -5162,13 +5164,13 @@@ if test "${lt_cv_nm_interface+set}" = s
  else
    lt_cv_nm_interface="BSD nm"
    echo "int some_variable = 0;" > conftest.$ac_ext
-   (eval echo "\"\$as_me:5160: $ac_compile\"" >&5)
 -  (eval echo "\"\$as_me:5165: $ac_compile\"" >&5)
++  (eval echo "\"\$as_me:5167: $ac_compile\"" >&5)
    (eval "$ac_compile" 2>conftest.err)
    cat conftest.err >&5
-   (eval echo "\"\$as_me:5163: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
 -  (eval echo "\"\$as_me:5168: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
++  (eval echo "\"\$as_me:5170: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
    (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
    cat conftest.err >&5
-   (eval echo "\"\$as_me:5166: output\"" >&5)
 -  (eval echo "\"\$as_me:5171: output\"" >&5)
++  (eval echo "\"\$as_me:5173: output\"" >&5)
    cat conftest.out >&5
    if $GREP 'External.*some_variable' conftest.out > /dev/null; then
      lt_cv_nm_interface="MS dumpbin"
@@@ -6358,7 -6363,7 +6365,7 @@@ ia64-*-hpux*
    ;;
  *-*-irix6*)
    # Find out which ABI we are using.
-   echo '#line 6361 "configure"' > conftest.$ac_ext
 -  echo '#line 6366 "configure"' > conftest.$ac_ext
++  echo '#line 6368 "configure"' > conftest.$ac_ext
    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    (eval $ac_compile) 2>&5
    ac_status=$?
@@@ -7390,34 -7395,27 +7397,27 @@@ don
  
  # Set options
  enable_dlopen=yes
- 
- 
- 
- 
-   enable_win32_dll=no
- 
- 
-             # Check whether --enable-shared was given.
- if test "${enable_shared+set}" = set; then :
-   enableval=$enable_shared; p=${PACKAGE-default}
+ # Check whether --enable-static was given.
+ if test "${enable_static+set}" = set; then :
+   enableval=$enable_static; p=${PACKAGE-default}
      case $enableval in
-     yes) enable_shared=yes ;;
-     no) enable_shared=no ;;
+     yes) enable_static=yes ;;
+     no) enable_static=no ;;
      *)
-       enable_shared=no
+      enable_static=no
        # Look at the argument we got.  We use all the common list separators.
        lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
        for pkg in $enableval; do
  	IFS="$lt_save_ifs"
  	if test "X$pkg" = "X$p"; then
- 	  enable_shared=yes
+ 	  enable_static=yes
  	fi
        done
        IFS="$lt_save_ifs"
        ;;
      esac
  else
-   enable_shared=yes
+   enable_static=no
  fi
  
  
@@@ -7428,27 -7426,32 +7428,32 @@@
  
  
  
-   # Check whether --enable-static was given.
- if test "${enable_static+set}" = set; then :
-   enableval=$enable_static; p=${PACKAGE-default}
+ 
+ 
+   enable_win32_dll=no
+ 
+ 
+             # Check whether --enable-shared was given.
+ if test "${enable_shared+set}" = set; then :
+   enableval=$enable_shared; p=${PACKAGE-default}
      case $enableval in
-     yes) enable_static=yes ;;
-     no) enable_static=no ;;
+     yes) enable_shared=yes ;;
+     no) enable_shared=no ;;
      *)
-      enable_static=no
+       enable_shared=no
        # Look at the argument we got.  We use all the common list separators.
        lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
        for pkg in $enableval; do
  	IFS="$lt_save_ifs"
  	if test "X$pkg" = "X$p"; then
- 	  enable_static=yes
+ 	  enable_shared=yes
  	fi
        done
        IFS="$lt_save_ifs"
        ;;
      esac
  else
-   enable_static=yes
+   enable_shared=yes
  fi
  
  
@@@ -7460,6 -7463,7 +7465,7 @@@
  
  
  
+ 
  # Check whether --with-pic was given.
  if test "${with_pic+set}" = set; then :
    withval=$with_pic; pic_mode="$withval"
@@@ -7887,11 -7891,11 +7893,11 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:7890: $lt_compile\"" >&5)
 -   (eval echo "\"\$as_me:7894: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:7896: $lt_compile\"" >&5)
     (eval "$lt_compile" 2>conftest.err)
     ac_status=$?
     cat conftest.err >&5
-    echo "$as_me:7894: \$? = $ac_status" >&5
 -   echo "$as_me:7898: \$? = $ac_status" >&5
++   echo "$as_me:7900: \$? = $ac_status" >&5
     if (exit $ac_status) && test -s "$ac_outfile"; then
       # The compiler can only warn and ignore the option if not recognized
       # So say no if there are warnings other than the usual output.
@@@ -8226,11 -8230,11 +8232,11 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:8229: $lt_compile\"" >&5)
 -   (eval echo "\"\$as_me:8233: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:8235: $lt_compile\"" >&5)
     (eval "$lt_compile" 2>conftest.err)
     ac_status=$?
     cat conftest.err >&5
-    echo "$as_me:8233: \$? = $ac_status" >&5
 -   echo "$as_me:8237: \$? = $ac_status" >&5
++   echo "$as_me:8239: \$? = $ac_status" >&5
     if (exit $ac_status) && test -s "$ac_outfile"; then
       # The compiler can only warn and ignore the option if not recognized
       # So say no if there are warnings other than the usual output.
@@@ -8331,11 -8335,11 +8337,11 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:8334: $lt_compile\"" >&5)
 -   (eval echo "\"\$as_me:8338: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:8340: $lt_compile\"" >&5)
     (eval "$lt_compile" 2>out/conftest.err)
     ac_status=$?
     cat out/conftest.err >&5
-    echo "$as_me:8338: \$? = $ac_status" >&5
 -   echo "$as_me:8342: \$? = $ac_status" >&5
++   echo "$as_me:8344: \$? = $ac_status" >&5
     if (exit $ac_status) && test -s out/conftest2.$ac_objext
     then
       # The compiler can only warn and ignore the option if not recognized
@@@ -8386,11 -8390,11 +8392,11 @@@ els
     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
     -e 's:$: $lt_compiler_flag:'`
-    (eval echo "\"\$as_me:8389: $lt_compile\"" >&5)
 -   (eval echo "\"\$as_me:8393: $lt_compile\"" >&5)
++   (eval echo "\"\$as_me:8395: $lt_compile\"" >&5)
     (eval "$lt_compile" 2>out/conftest.err)
     ac_status=$?
     cat out/conftest.err >&5
-    echo "$as_me:8393: \$? = $ac_status" >&5
 -   echo "$as_me:8397: \$? = $ac_status" >&5
++   echo "$as_me:8399: \$? = $ac_status" >&5
     if (exit $ac_status) && test -s out/conftest2.$ac_objext
     then
       # The compiler can only warn and ignore the option if not recognized
@@@ -10770,7 -10774,7 +10776,7 @@@ els
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
- #line 10773 "configure"
 -#line 10777 "configure"
++#line 10779 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
@@@ -10866,7 -10870,7 +10872,7 @@@ els
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
- #line 10869 "configure"
 -#line 10873 "configure"
++#line 10875 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
@@@ -11538,7 -11542,7 +11544,7 @@@ els
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
- #line 11541 "configure"
 -#line 11545 "configure"
++#line 11547 "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
@@@ -12759,139 -12763,6 +12765,139 @@@ if test $ac_cv_c_bigendian = no; the
  
  fi
  
 +LIBM=
 +case $host in
 +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 +  # These system don't have libm, or don't need it
 +  ;;
 +*-ncr-sysv4.3*)
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5
 +$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; }
 +if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lmw  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +
 +/* Override any GCC internal prototype to avoid an error.
 +   Use char because int might match the return type of a GCC
 +   builtin and then its argument prototype would still apply.  */
 +#ifdef __cplusplus
 +extern "C"
 +#endif
 +char _mwvalidcheckl ();
 +int
 +main ()
 +{
 +return _mwvalidcheckl ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_mw__mwvalidcheckl=yes
 +else
 +  ac_cv_lib_mw__mwvalidcheckl=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
 +$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
 +if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then :
 +  LIBM="-lmw"
 +fi
 +
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
 +$as_echo_n "checking for cos in -lm... " >&6; }
 +if test "${ac_cv_lib_m_cos+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lm  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +
 +/* Override any GCC internal prototype to avoid an error.
 +   Use char because int might match the return type of a GCC
 +   builtin and then its argument prototype would still apply.  */
 +#ifdef __cplusplus
 +extern "C"
 +#endif
 +char cos ();
 +int
 +main ()
 +{
 +return cos ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_m_cos=yes
 +else
 +  ac_cv_lib_m_cos=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
 +$as_echo "$ac_cv_lib_m_cos" >&6; }
 +if test "x$ac_cv_lib_m_cos" = x""yes; then :
 +  LIBM="$LIBM -lm"
 +fi
 +
 +  ;;
 +*)
 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
 +$as_echo_n "checking for cos in -lm... " >&6; }
 +if test "${ac_cv_lib_m_cos+set}" = set; then :
 +  $as_echo_n "(cached) " >&6
 +else
 +  ac_check_lib_save_LIBS=$LIBS
 +LIBS="-lm  $LIBS"
 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 +/* end confdefs.h.  */
 +
 +/* Override any GCC internal prototype to avoid an error.
 +   Use char because int might match the return type of a GCC
 +   builtin and then its argument prototype would still apply.  */
 +#ifdef __cplusplus
 +extern "C"
 +#endif
 +char cos ();
 +int
 +main ()
 +{
 +return cos ();
 +  ;
 +  return 0;
 +}
 +_ACEOF
 +if ac_fn_c_try_link "$LINENO"; then :
 +  ac_cv_lib_m_cos=yes
 +else
 +  ac_cv_lib_m_cos=no
 +fi
 +rm -f core conftest.err conftest.$ac_objext \
 +    conftest$ac_exeext conftest.$ac_ext
 +LIBS=$ac_check_lib_save_LIBS
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
 +$as_echo "$ac_cv_lib_m_cos" >&6; }
 +if test "x$ac_cv_lib_m_cos" = x""yes; then :
 +  LIBM="-lm"
 +fi
 +
 +  ;;
 +esac
 +
 +
 +
  # Check whether --enable-gcc-vcheck was given.
  if test "${enable_gcc_vcheck+set}" = set; then :
    enableval=$enable_gcc_vcheck; gcc_check=$enableval
@@@ -12946,6 -12817,14 +12952,6 @@@ if test "x$ac_compiler_gnu" = "xyes"; t
  			;;
  	esac
  fi
 - if test "x$distcheck_enable_flags" = "x1"; then
 -  DISTCHECK_ENABLE_FLAGS_TRUE=
 -  DISTCHECK_ENABLE_FLAGS_FALSE='#'
 -else
 -  DISTCHECK_ENABLE_FLAGS_TRUE='#'
 -  DISTCHECK_ENABLE_FLAGS_FALSE=
 -fi
 -
  
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc bug PR27603" >&5
@@@ -19790,26 -19669,29 +19796,48 @@@ els
  fi
  
  
 +# Check whether --enable-distcheck-werror was given.
 +if test "${enable_distcheck_werror+set}" = set; then :
 +  enableval=$enable_distcheck_werror; enable_distcheckwerror=$enableval
 +else
 +  enable_distcheckwerror="no"
 +fi
 +
 +
 +# Enable distcheck warnings and Werror only for gcc versions that support them,
 +# and only after we've run the configure tests.
 +# Some configure tests fail (like checking for cos in -lm) if we enable these
 +# Werror flags for configure too (for example -Wstrict-prototypes makes
 +# configure think that -lm doesn't have cos, hence its in libc).
 +if test "x$enable_distcheckwerror" = "xyes"; then
 +    if test "$distcheck_enable_flags" = "1"; then
 +	CFLAGS="$CFLAGS -Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wno-error=bad-function-cast -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-function -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=aggregate-return"
 +    fi
 +fi
 +
- ac_config_files="$ac_config_files libclamav/Makefile clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamdscan/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/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"
+ # Check whether --enable-llvm was given.
+ if test "${enable_llvm+set}" = set; then :
+   enableval=$enable_llvm; enable_llvm=$enableval
+ else
+   enable_llvm="auto"
+ fi
+ 
+ 
+ if test "$enable_llvm" != "no"; then
+ 
+ 
+ subdirs="$subdirs "
+ 
+ 
+ 
+ subdirfailed=no
+ subdirs="$subdirs libclamav/c++"
+ 
+ 
+ 
+ fi
+ 
+ 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 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/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"
  
  cat >confcache <<\_ACEOF
  # This file is a shell script that caches the results of configure
@@@ -19950,6 -19832,10 +19978,6 @@@ LT_CONFIG_H=clamav-config.
  
  
  
 -if test -z "${DISTCHECK_ENABLE_FLAGS_TRUE}" && test -z "${DISTCHECK_ENABLE_FLAGS_FALSE}"; then
 -  as_fn_error "conditional \"DISTCHECK_ENABLE_FLAGS\" was never defined.
 -Usually this means the macro was only invoked conditionally." "$LINENO" 5
 -fi
  if test -z "${VERSIONSCRIPT_TRUE}" && test -z "${VERSIONSCRIPT_FALSE}"; then
    as_fn_error "conditional \"VERSIONSCRIPT\" was never defined.
  Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@@ -20586,8 -20472,8 +20614,8 @@@ double_quote_subst='$double_quote_subst
  delay_variable_subst='$delay_variable_subst'
  macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
  macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
- enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
  enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+ enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
  pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
  enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
  host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
@@@ -20843,7 -20729,6 +20871,6 @@@ d
      "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
      "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
      "libltdl/Makefile") CONFIG_FILES="$CONFIG_FILES libltdl/Makefile" ;;
-     "libclamav/Makefile") CONFIG_FILES="$CONFIG_FILES libclamav/Makefile" ;;
      "clamscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamscan/Makefile" ;;
      "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
      "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
@@@ -21608,12 -21493,2601 +21635,2597 @@@ available_tags="
  macro_version=$macro_version
  macro_revision=$macro_revision
  
+ # Whether or not to build static libraries.
+ build_old_libs=$enable_static
+ 
  # Whether or not to build shared libraries.
  build_libtool_libs=$enable_shared
  
+ # What type of objects to build.
+ pic_mode=$pic_mode
+ 
+ # Whether or not to optimize for fast installation.
+ fast_install=$enable_fast_install
+ 
+ # The host system.
+ host_alias=$host_alias
+ host=$host
+ host_os=$host_os
+ 
+ # The build system.
+ build_alias=$build_alias
+ build=$build
+ build_os=$build_os
+ 
+ # A sed program that does not truncate output.
+ SED=$lt_SED
+ 
+ # Sed that helps us avoid accidentally triggering echo(1) options like -n.
+ Xsed="\$SED -e 1s/^X//"
+ 
+ # A grep program that handles long lines.
+ GREP=$lt_GREP
+ 
+ # An ERE matcher.
+ EGREP=$lt_EGREP
+ 
+ # A literal string matcher.
+ FGREP=$lt_FGREP
+ 
+ # A BSD- or MS-compatible name lister.
+ NM=$lt_NM
+ 
+ # Whether we need soft or hard links.
+ LN_S=$lt_LN_S
+ 
+ # What is the maximum length of a command?
+ max_cmd_len=$max_cmd_len
+ 
+ # Object file suffix (normally "o").
+ objext=$ac_objext
+ 
+ # Executable file suffix (normally "").
+ exeext=$exeext
+ 
+ # whether the shell understands "unset".
+ lt_unset=$lt_unset
+ 
+ # turn spaces into newlines.
+ SP2NL=$lt_lt_SP2NL
+ 
+ # turn newlines into spaces.
+ NL2SP=$lt_lt_NL2SP
+ 
+ # How to create reloadable object files.
+ reload_flag=$lt_reload_flag
+ reload_cmds=$lt_reload_cmds
+ 
+ # An object symbol dumper.
+ OBJDUMP=$lt_OBJDUMP
+ 
+ # Method to check whether dependent libraries are shared objects.
+ deplibs_check_method=$lt_deplibs_check_method
+ 
+ # Command to use when deplibs_check_method == "file_magic".
+ file_magic_cmd=$lt_file_magic_cmd
+ 
+ # The archiver.
+ AR=$lt_AR
+ AR_FLAGS=$lt_AR_FLAGS
+ 
+ # A symbol stripping program.
+ STRIP=$lt_STRIP
+ 
+ # Commands used to install an old-style archive.
+ RANLIB=$lt_RANLIB
+ old_postinstall_cmds=$lt_old_postinstall_cmds
+ old_postuninstall_cmds=$lt_old_postuninstall_cmds
+ 
+ # A C compiler.
+ LTCC=$lt_CC
+ 
+ # LTCC compiler flags.
+ LTCFLAGS=$lt_CFLAGS
+ 
+ # Take the output of nm and produce a listing of raw symbols and C names.
+ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+ 
+ # Transform the output of nm in a proper C declaration.
+ global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+ 
+ # Transform the output of nm in a C name address pair.
+ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+ 
+ # Transform the output of nm in a C name address pair when lib prefix is needed.
+ global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+ 
+ # The name of the directory that contains temporary libtool files.
+ objdir=$objdir
+ 
+ # Shell to use when invoking shell scripts.
+ SHELL=$lt_SHELL
+ 
+ # An echo program that does not interpret backslashes.
+ ECHO=$lt_ECHO
+ 
+ # Used to examine libraries when file_magic_cmd begins with "file".
+ MAGIC_CMD=$MAGIC_CMD
+ 
+ # Must we lock files when doing compilation?
+ need_locks=$lt_need_locks
+ 
+ # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+ DSYMUTIL=$lt_DSYMUTIL
+ 
+ # Tool to change global to local symbols on Mac OS X.
+ NMEDIT=$lt_NMEDIT
+ 
+ # Tool to manipulate fat objects and archives on Mac OS X.
+ LIPO=$lt_LIPO
+ 
+ # ldd/readelf like tool for Mach-O binaries on Mac OS X.
+ OTOOL=$lt_OTOOL
+ 
+ # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+ OTOOL64=$lt_OTOOL64
+ 
+ # Old archive suffix (normally "a").
+ libext=$libext
+ 
+ # Shared library suffix (normally ".so").
+ shrext_cmds=$lt_shrext_cmds
+ 
+ # The commands to extract the exported symbol list from a shared archive.
+ extract_expsyms_cmds=$lt_extract_expsyms_cmds
+ 
+ # Variables whose values should be saved in libtool wrapper scripts and
+ # restored at link time.
+ variables_saved_for_relink=$lt_variables_saved_for_relink
+ 
+ # Do we need the "lib" prefix for modules?
+ need_lib_prefix=$need_lib_prefix
+ 
+ # Do we need a version for libraries?
+ need_version=$need_version
+ 
+ # Library versioning type.
+ version_type=$version_type
+ 
+ # Shared library runtime path variable.
+ runpath_var=$runpath_var
+ 
+ # Shared library path variable.
+ shlibpath_var=$shlibpath_var
+ 
+ # Is shlibpath searched before the hard-coded library search path?
+ shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+ 
+ # Format of library name prefix.
+ libname_spec=$lt_libname_spec
+ 
+ # List of archive names.  First name is the real one, the rest are links.
+ # The last name is the one that the linker finds with -lNAME
+ library_names_spec=$lt_library_names_spec
+ 
+ # The coded name of the library, if different from the real name.
+ soname_spec=$lt_soname_spec
+ 
+ # Command to use after installation of a shared archive.
+ postinstall_cmds=$lt_postinstall_cmds
+ 
+ # Command to use after uninstallation of a shared archive.
+ postuninstall_cmds=$lt_postuninstall_cmds
+ 
+ # Commands used to finish a libtool library installation in a directory.
+ finish_cmds=$lt_finish_cmds
+ 
+ # As "finish_cmds", except a single script fragment to be evaled but
+ # not shown.
+ finish_eval=$lt_finish_eval
+ 
+ # Whether we should hardcode library paths into libraries.
+ hardcode_into_libs=$hardcode_into_libs
+ 
+ # Compile-time system search path for libraries.
+ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+ 
+ # Run-time system search path for libraries.
+ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+ 
+ # Whether dlopen is supported.
+ dlopen_support=$enable_dlopen
+ 
+ # Whether dlopen of programs is supported.
+ dlopen_self=$enable_dlopen_self
+ 
+ # Whether dlopen of statically linked programs is supported.
+ dlopen_self_static=$enable_dlopen_self_static
+ 
+ # Commands to strip libraries.
+ old_striplib=$lt_old_striplib
+ striplib=$lt_striplib
+ 
+ 
+ # The linker used to build libraries.
+ LD=$lt_LD
+ 
+ # Commands used to build an old-style archive.
+ old_archive_cmds=$lt_old_archive_cmds
+ 
+ # A language specific compiler.
+ CC=$lt_compiler
+ 
+ # Is the compiler the GNU compiler?
+ with_gcc=$GCC
+ 
+ # Compiler flag to turn off builtin functions.
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+ 
+ # How to pass a linker flag through the compiler.
+ wl=$lt_lt_prog_compiler_wl
+ 
+ # Additional compiler flags for building library objects.
+ pic_flag=$lt_lt_prog_compiler_pic
+ 
+ # Compiler flag to prevent dynamic linking.
+ link_static_flag=$lt_lt_prog_compiler_static
+ 
+ # Does compiler simultaneously support -c and -o options?
+ compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+ 
+ # Whether or not to add -lc for building shared libraries.
+ build_libtool_need_lc=$archive_cmds_need_lc
+ 
+ # Whether or not to disallow shared libs when runtime libs are static.
+ allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+ 
+ # Compiler flag to allow reflexive dlopens.
+ export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+ 
+ # Compiler flag to generate shared objects directly from archives.
+ whole_archive_flag_spec=$lt_whole_archive_flag_spec
+ 
+ # Whether the compiler copes with passing no objects directly.
+ compiler_needs_object=$lt_compiler_needs_object
+ 
+ # Create an old-style archive from a shared archive.
+ old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+ 
+ # Create a temporary old-style archive to link instead of a shared archive.
+ old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+ 
+ # Commands used to build a shared archive.
+ archive_cmds=$lt_archive_cmds
+ archive_expsym_cmds=$lt_archive_expsym_cmds
+ 
+ # Commands used to build a loadable module if different from building
+ # a shared archive.
+ module_cmds=$lt_module_cmds
+ module_expsym_cmds=$lt_module_expsym_cmds
+ 
+ # Whether we are building with GNU ld or not.
+ with_gnu_ld=$lt_with_gnu_ld
+ 
+ # Flag that allows shared libraries with undefined symbols to be built.
+ allow_undefined_flag=$lt_allow_undefined_flag
+ 
+ # Flag that enforces no undefined symbols.
+ no_undefined_flag=$lt_no_undefined_flag
+ 
+ # Flag to hardcode \$libdir into a binary during linking.
+ # This must work even if \$libdir does not exist
+ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+ 
+ # If ld is used when linking, flag to hardcode \$libdir into a binary
+ # during linking.  This must work even if \$libdir does not exist.
+ hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+ 
+ # Whether we need a single "-rpath" flag with a separated argument.
+ hardcode_libdir_separator=$lt_hardcode_libdir_separator
+ 
+ # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+ # DIR into the resulting binary.
+ hardcode_direct=$hardcode_direct
+ 
+ # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+ # DIR into the resulting binary and the resulting library dependency is
+ # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+ # library is relocated.
+ hardcode_direct_absolute=$hardcode_direct_absolute
+ 
+ # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ # into the resulting binary.
+ hardcode_minus_L=$hardcode_minus_L
+ 
+ # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ # into the resulting binary.
+ hardcode_shlibpath_var=$hardcode_shlibpath_var
+ 
+ # Set to "yes" if building a shared library automatically hardcodes DIR
+ # into the library and all subsequent libraries and executables linked
+ # against it.
+ hardcode_automatic=$hardcode_automatic
+ 
+ # Set to yes if linker adds runtime paths of dependent libraries
+ # to runtime path list.
+ inherit_rpath=$inherit_rpath
+ 
+ # Whether libtool must link a program against all its dependency libraries.
+ link_all_deplibs=$link_all_deplibs
+ 
+ # Fix the shell variable \$srcfile for the compiler.
+ fix_srcfile_path=$lt_fix_srcfile_path
+ 
+ # Set to "yes" if exported symbols are required.
+ always_export_symbols=$always_export_symbols
+ 
+ # The commands to list exported symbols.
+ export_symbols_cmds=$lt_export_symbols_cmds
+ 
+ # Symbols that should not be listed in the preloaded symbols.
+ exclude_expsyms=$lt_exclude_expsyms
+ 
+ # Symbols that must always be exported.
+ include_expsyms=$lt_include_expsyms
+ 
+ # Commands necessary for linking programs (against libraries) with templates.
+ prelink_cmds=$lt_prelink_cmds
+ 
+ # Specify filename containing input files.
+ file_list_spec=$lt_file_list_spec
+ 
+ # How to hardcode a shared library path into an executable.
+ hardcode_action=$hardcode_action
+ 
+ # ### END LIBTOOL CONFIG
+ 
+ _LT_EOF
+ 
+   case $host_os in
+   aix3*)
+     cat <<\_LT_EOF >> "$cfgfile"
+ # AIX sometimes has problems with the GCC collect2 program.  For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+   COLLECT_NAMES=
+   export COLLECT_NAMES
+ fi
+ _LT_EOF
+     ;;
+   esac
+ 
+ 
+ ltmain="$ac_aux_dir/ltmain.sh"
+ 
+ 
+   # We use sed instead of cat because bash on DJGPP gets confused if
+   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+   # text mode, it properly converts lines to CR/LF.  This bash problem
+   # is reportedly fixed, but why not run on old versions too?
+   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+ 
+   case $xsi_shell in
+   yes)
+     cat << \_LT_EOF >> "$cfgfile"
+ 
+ # func_dirname file append nondir_replacement
+ # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+ # otherwise set result to NONDIR_REPLACEMENT.
+ func_dirname ()
+ {
+   case ${1} in
+     */*) func_dirname_result="${1%/*}${2}" ;;
+     *  ) func_dirname_result="${3}" ;;
+   esac
+ }
+ 
+ # func_basename file
+ func_basename ()
+ {
+   func_basename_result="${1##*/}"
+ }
+ 
+ # func_dirname_and_basename file append nondir_replacement
+ # perform func_basename and func_dirname in a single function
+ # call:
+ #   dirname:  Compute the dirname of FILE.  If nonempty,
+ #             add APPEND to the result, otherwise set result
+ #             to NONDIR_REPLACEMENT.
+ #             value returned in "$func_dirname_result"
+ #   basename: Compute filename of FILE.
+ #             value retuned in "$func_basename_result"
+ # Implementation must be kept synchronized with func_dirname
+ # and func_basename. For efficiency, we do not delegate to
+ # those functions but instead duplicate the functionality here.
+ func_dirname_and_basename ()
+ {
+   case ${1} in
+     */*) func_dirname_result="${1%/*}${2}" ;;
+     *  ) func_dirname_result="${3}" ;;
+   esac
+   func_basename_result="${1##*/}"
+ }
+ 
+ # func_stripname prefix suffix name
+ # strip PREFIX and SUFFIX off of NAME.
+ # PREFIX and SUFFIX must not contain globbing or regex special
+ # characters, hashes, percent signs, but SUFFIX may contain a leading
+ # dot (in which case that matches only a dot).
+ func_stripname ()
+ {
+   # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+   # positional parameters, so assign one to ordinary parameter first.
+   func_stripname_result=${3}
+   func_stripname_result=${func_stripname_result#"${1}"}
+   func_stripname_result=${func_stripname_result%"${2}"}
+ }
+ 
+ # func_opt_split
+ func_opt_split ()
+ {
+   func_opt_split_opt=${1%%=*}
+   func_opt_split_arg=${1#*=}
+ }
+ 
+ # func_lo2o object
+ func_lo2o ()
+ {
+   case ${1} in
+     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+     *)    func_lo2o_result=${1} ;;
+   esac
+ }
+ 
+ # func_xform libobj-or-source
+ func_xform ()
+ {
+   func_xform_result=${1%.*}.lo
+ }
+ 
+ # func_arith arithmetic-term...
+ func_arith ()
+ {
+   func_arith_result=$(( $* ))
+ }
+ 
+ # func_len string
+ # STRING may not start with a hyphen.
+ func_len ()
+ {
+   func_len_result=${#1}
+ }
+ 
+ _LT_EOF
+     ;;
+   *) # Bourne compatible functions.
+     cat << \_LT_EOF >> "$cfgfile"
+ 
+ # func_dirname file append nondir_replacement
+ # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+ # otherwise set result to NONDIR_REPLACEMENT.
+ func_dirname ()
+ {
+   # Extract subdirectory from the argument.
+   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+   if test "X$func_dirname_result" = "X${1}"; then
+     func_dirname_result="${3}"
+   else
+     func_dirname_result="$func_dirname_result${2}"
+   fi
+ }
+ 
+ # func_basename file
+ func_basename ()
+ {
+   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+ }
+ 
+ 
+ # func_stripname prefix suffix name
+ # strip PREFIX and SUFFIX off of NAME.
+ # PREFIX and SUFFIX must not contain globbing or regex special
+ # characters, hashes, percent signs, but SUFFIX may contain a leading
+ # dot (in which case that matches only a dot).
+ # func_strip_suffix prefix name
+ func_stripname ()
+ {
+   case ${2} in
+     .*) func_stripname_result=`$ECHO "X${3}" \
+            | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+     *)  func_stripname_result=`$ECHO "X${3}" \
+            | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+   esac
+ }
+ 
+ # sed scripts:
+ my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+ my_sed_long_arg='1s/^-[^=]*=//'
+ 
+ # func_opt_split
+ func_opt_split ()
+ {
+   func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+   func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+ }
+ 
+ # func_lo2o object
+ func_lo2o ()
+ {
+   func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+ }
+ 
+ # func_xform libobj-or-source
+ func_xform ()
+ {
+   func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+ }
+ 
+ # func_arith arithmetic-term...
+ func_arith ()
+ {
+   func_arith_result=`expr "$@"`
+ }
+ 
+ # func_len string
+ # STRING may not start with a hyphen.
+ func_len ()
+ {
+   func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+ 
+ _LT_EOF
+ esac
+ 
+ case $lt_shell_append in
+   yes)
+     cat << \_LT_EOF >> "$cfgfile"
+ 
+ # func_append var value
+ # Append VALUE to the end of shell variable VAR.
+ func_append ()
+ {
+   eval "$1+=\$2"
+ }
+ _LT_EOF
+     ;;
+   *)
+     cat << \_LT_EOF >> "$cfgfile"
+ 
+ # func_append var value
+ # Append VALUE to the end of shell variable VAR.
+ func_append ()
+ {
+   eval "$1=\$$1\$2"
+ }
+ 
+ _LT_EOF
+     ;;
+   esac
+ 
+ 
+   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+ 
+   mv -f "$cfgfile" "$ofile" ||
+     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+   chmod +x "$ofile"
+ 
+  ;;
+ 
+   esac
+ done # for ac_tag
+ 
+ 
+ as_fn_exit 0
+ _ACEOF
+ ac_clean_files=$ac_clean_files_save
+ 
+ test $ac_write_fail = 0 ||
+   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ 
+ 
+ # configure is writing to config.log, and then calls config.status.
+ # config.status does its own redirection, appending to config.log.
+ # Unfortunately, on DOS this fails, as config.log is still kept open
+ # by configure, so config.status won't be able to write to it; its
+ # output is simply discarded.  So we exec the FD to /dev/null,
+ # effectively closing config.log, so it can be properly (re)opened and
+ # appended to by config.status.  When coming back to configure, we
+ # need to make the FD available again.
+ if test "$no_create" != yes; then
+   ac_cs_success=:
+   ac_config_status_args=
+   test "$silent" = yes &&
+     ac_config_status_args="$ac_config_status_args --quiet"
+   exec 5>/dev/null
+   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+   exec 5>>config.log
+   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+   # would make configure fail if this is the last instruction.
+   $ac_cs_success || as_fn_exit $?
+ fi
+ 
+ 
+ 
+ #
+ # CONFIG_SUBDIRS section.
+ #
+ if test "$no_recursion" != yes; then
+ 
+   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+   # so they do not pile up.
+   ac_sub_configure_args=
+   ac_prev=
+   eval "set x $ac_configure_args"
+   shift
+   for ac_arg
+   do
+     if test -n "$ac_prev"; then
+       ac_prev=
+       continue
+     fi
+     case $ac_arg in
+     -cache-file | --cache-file | --cache-fil | --cache-fi \
+     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+       ac_prev=cache_file ;;
+     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+     | --c=*)
+       ;;
+     --config-cache | -C)
+       ;;
+     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+       ac_prev=srcdir ;;
+     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+       ;;
+     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+       ac_prev=prefix ;;
+     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+       ;;
+     --disable-option-checking)
+       ;;
+     *)
+       case $ac_arg in
+       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+       esac
+       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+     esac
+   done
+ 
+   # Always prepend --prefix to ensure using the same prefix
+   # in subdir configurations.
+   ac_arg="--prefix=$prefix"
+   case $ac_arg in
+   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+   esac
+   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+ 
+   # Pass --silent
+   if test "$silent" = yes; then
+     ac_sub_configure_args="--silent $ac_sub_configure_args"
+   fi
+ 
+   # Always prepend --disable-option-checking to silence warnings, since
+   # different subdirs can have different --enable and --with options.
+   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+ 
+   ac_popdir=`pwd`
+   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+ 
+     # Do not complain, so a configure script can configure whichever
+     # parts of a large source tree are present.
+     test -d "$srcdir/$ac_dir" || continue
+ 
+     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+     $as_echo "$ac_msg" >&6
+     as_dir="$ac_dir"; as_fn_mkdir_p
+     ac_builddir=.
+ 
+ case "$ac_dir" in
+ .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *)
+   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+   # A ".." for each directory in $ac_dir_suffix.
+   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+   case $ac_top_builddir_sub in
+   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+   esac ;;
+ esac
+ ac_abs_top_builddir=$ac_pwd
+ ac_abs_builddir=$ac_pwd$ac_dir_suffix
+ # for backward compatibility:
+ ac_top_builddir=$ac_top_build_prefix
+ 
+ case $srcdir in
+   .)  # We are building in place.
+     ac_srcdir=.
+     ac_top_srcdir=$ac_top_builddir_sub
+     ac_abs_top_srcdir=$ac_pwd ;;
+   [\\/]* | ?:[\\/]* )  # Absolute name.
+     ac_srcdir=$srcdir$ac_dir_suffix;
+     ac_top_srcdir=$srcdir
+     ac_abs_top_srcdir=$srcdir ;;
+   *) # Relative name.
+     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+     ac_top_srcdir=$ac_top_build_prefix$srcdir
+     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ esac
+ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+ 
+ 
+     cd "$ac_dir"
+ 
+     # Check for guested configure; otherwise get Cygnus style configure.
+     if test -f "$ac_srcdir/configure.gnu"; then
+       ac_sub_configure=$ac_srcdir/configure.gnu
+     elif test -f "$ac_srcdir/configure"; then
+       ac_sub_configure=$ac_srcdir/configure
+     elif test -f "$ac_srcdir/configure.in"; then
+       # This should be Cygnus configure.
+       ac_sub_configure=$ac_aux_dir/configure
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+       ac_sub_configure=
+     fi
+ 
+     # The recursion is here.
+     if test -n "$ac_sub_configure"; then
+       # Make the cache file name correct relative to the subdirectory.
+       case $cache_file in
+       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+       *) # Relative name.
+ 	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+       esac
+ 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+       # The eval makes quoting arguments work.
+       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ 	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ 	subdirfailed=yes
+     fi
+ 
+     cd "$ac_popdir"
+   done
+ fi
+ 
+ 	  if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+ fi
+ 
+ 
+ if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then
+     as_fn_error "Failed to configure LLVM, and LLVM was explicitly requested" "$LINENO" 5
+ fi
+  if test "$subdirfailed" != "yes" && test "$enable_llvm" != "no"; then
+   ENABLE_LLVM_TRUE=
+   ENABLE_LLVM_FALSE='#'
+ else
+   ENABLE_LLVM_TRUE='#'
+   ENABLE_LLVM_FALSE=
+ fi
+ 
+ no_recursion="yes";
+ ac_config_files="$ac_config_files libclamav/Makefile"
+ 
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+ # scripts and configure runs, see configure's option --config-cache.
+ # It is not useful on other systems.  If it contains results you don't
+ # want to keep, you may remove or edit it.
+ #
+ # config.status only pays attention to the cache file if you give it
+ # the --recheck option to rerun configure.
+ #
+ # `ac_cv_env_foo' variables (set or unset) will be overridden when
+ # loading this file, other *unset* `ac_cv_foo' will be assigned the
+ # following values.
+ 
+ _ACEOF
+ 
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+ # So, we kill variables containing newlines.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+ (
+   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+     eval ac_val=\$$ac_var
+     case $ac_val in #(
+     *${as_nl}*)
+       case $ac_var in #(
+       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+       esac
+       case $ac_var in #(
+       _ | IFS | as_nl) ;; #(
+       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+       *) { eval $ac_var=; unset $ac_var;} ;;
+       esac ;;
+     esac
+   done
+ 
+   (set) 2>&1 |
+     case $as_nl`(ac_space=' '; set) 2>&1` in #(
+     *${as_nl}ac_space=\ *)
+       # `set' does not quote correctly, so add quotes: double-quote
+       # substitution turns \\\\ into \\, and sed turns \\ into \.
+       sed -n \
+ 	"s/'/'\\\\''/g;
+ 	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+       ;; #(
+     *)
+       # `set' quotes correctly as required by POSIX, so do not add quotes.
+       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+       ;;
+     esac |
+     sort
+ ) |
+   sed '
+      /^ac_cv_env_/b end
+      t clear
+      :clear
+      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+      t end
+      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+      :end' >>confcache
+ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+   if test -w "$cache_file"; then
+     test "x$cache_file" != "x/dev/null" &&
+       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+ $as_echo "$as_me: updating cache $cache_file" >&6;}
+     cat confcache >$cache_file
+   else
+     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+   fi
+ fi
+ rm -f confcache
+ 
+ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ # Let make expand exec_prefix.
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ 
+ DEFS=-DHAVE_CONFIG_H
+ 
+ ac_libobjs=
+ ac_ltlibobjs=
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+   # 1. Remove the extension, and $U if already installed.
+   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+   #    will be set to the directory where LIBOBJS objects are built.
+   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+ done
+ LIBOBJS=$ac_libobjs
+ 
+ LTLIBOBJS=$ac_ltlibobjs
+ 
+ 
+  if test -n "$EXEEXT"; then
+   am__EXEEXT_TRUE=
+   am__EXEEXT_FALSE='#'
+ else
+   am__EXEEXT_TRUE='#'
+   am__EXEEXT_FALSE=
+ fi
+ 
+ if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+   as_fn_error "conditional \"AMDEP\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+   as_fn_error "conditional \"am__fastdepCC\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then
+   as_fn_error "conditional \"INSTALL_LTDL\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then
+   as_fn_error "conditional \"CONVENIENCE_LTDL\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ LT_CONFIG_H=clamav-config.h
+ 
+     _ltdl_libobjs=
+     _ltdl_ltlibobjs=
+     if test -n "$_LT_LIBOBJS"; then
+       # Remove the extension.
+       _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
+       for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
+         _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
+         _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
+       done
+     fi
+     ltdl_LIBOBJS=$_ltdl_libobjs
+ 
+     ltdl_LTLIBOBJS=$_ltdl_ltlibobjs
+ 
+ 
+ 
 -if test -z "${DISTCHECK_ENABLE_FLAGS_TRUE}" && test -z "${DISTCHECK_ENABLE_FLAGS_FALSE}"; then
 -  as_fn_error "conditional \"DISTCHECK_ENABLE_FLAGS\" was never defined.
 -Usually this means the macro was only invoked conditionally." "$LINENO" 5
 -fi
+ if test -z "${VERSIONSCRIPT_TRUE}" && test -z "${VERSIONSCRIPT_FALSE}"; then
+   as_fn_error "conditional \"VERSIONSCRIPT\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${HAVE_LIBCHECK_TRUE}" && test -z "${HAVE_LIBCHECK_FALSE}"; then
+   as_fn_error "conditional \"HAVE_LIBCHECK\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${ENABLE_COVERAGE_TRUE}" && test -z "${ENABLE_COVERAGE_FALSE}"; then
+   as_fn_error "conditional \"ENABLE_COVERAGE\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${ENABLE_UNRAR_TRUE}" && test -z "${ENABLE_UNRAR_FALSE}"; then
+   as_fn_error "conditional \"ENABLE_UNRAR\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${LINK_TOMMATH_TRUE}" && test -z "${LINK_TOMMATH_FALSE}"; then
+   as_fn_error "conditional \"LINK_TOMMATH\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${BUILD_CLAMD_TRUE}" && test -z "${BUILD_CLAMD_FALSE}"; then
+   as_fn_error "conditional \"BUILD_CLAMD\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${HAVE_MILTER_TRUE}" && test -z "${HAVE_MILTER_FALSE}"; then
+   as_fn_error "conditional \"HAVE_MILTER\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${HAVE_CURSES_TRUE}" && test -z "${HAVE_CURSES_FALSE}"; then
+   as_fn_error "conditional \"HAVE_CURSES\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${am__EXEEXT_TRUE}" && test -z "${am__EXEEXT_FALSE}"; then
+   as_fn_error "conditional \"am__EXEEXT\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${ENABLE_LLVM_TRUE}" && test -z "${ENABLE_LLVM_FALSE}"; then
+   as_fn_error "conditional \"ENABLE_LLVM\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ 
+ : ${CONFIG_STATUS=./config.status}
+ ac_write_fail=0
+ ac_clean_files_save=$ac_clean_files
+ ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+ $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+ as_write_fail=0
+ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+ #! $SHELL
+ # Generated by $as_me.
+ # Run this file to recreate the current configuration.
+ # Compiler output produced by configure, useful for debugging
+ # configure, is in config.log if it exists.
+ 
+ debug=false
+ ac_cs_recheck=false
+ ac_cs_silent=false
+ 
+ SHELL=\${CONFIG_SHELL-$SHELL}
+ export SHELL
+ _ASEOF
+ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+ ## -------------------- ##
+ ## M4sh Initialization. ##
+ ## -------------------- ##
+ 
+ # Be more Bourne compatible
+ DUALCASE=1; export DUALCASE # for MKS sh
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+   emulate sh
+   NULLCMD=:
+   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+   # is contrary to our usage.  Disable this feature.
+   alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
+ else
+   case `(set -o) 2>/dev/null` in #(
+   *posix*) :
+     set -o posix ;; #(
+   *) :
+      ;;
+ esac
+ fi
+ 
+ 
+ as_nl='
+ '
+ export as_nl
+ # Printing a long string crashes Solaris 7 /usr/bin/printf.
+ as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+ as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+ # Prefer a ksh shell builtin over an external printf program on Solaris,
+ # but without wasting forks for bash or zsh.
+ if test -z "$BASH_VERSION$ZSH_VERSION" \
+     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+   as_echo='print -r --'
+   as_echo_n='print -rn --'
+ elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+   as_echo='printf %s\n'
+   as_echo_n='printf %s'
+ else
+   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+     as_echo_n='/usr/ucb/echo -n'
+   else
+     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+     as_echo_n_body='eval
+       arg=$1;
+       case $arg in #(
+       *"$as_nl"*)
+ 	expr "X$arg" : "X\\(.*\\)$as_nl";
+ 	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+       esac;
+       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+     '
+     export as_echo_n_body
+     as_echo_n='sh -c $as_echo_n_body as_echo'
+   fi
+   export as_echo_body
+   as_echo='sh -c $as_echo_body as_echo'
+ fi
+ 
+ # The user is always right.
+ if test "${PATH_SEPARATOR+set}" != set; then
+   PATH_SEPARATOR=:
+   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+       PATH_SEPARATOR=';'
+   }
+ fi
+ 
+ 
+ # IFS
+ # We need space, tab and new line, in precisely that order.  Quoting is
+ # there to prevent editors from complaining about space-tab.
+ # (If _AS_PATH_WALK were called with IFS unset, it would disable word
+ # splitting by setting IFS to empty value.)
+ IFS=" ""	$as_nl"
+ 
+ # Find who we are.  Look in the path if we contain no directory separator.
+ case $0 in #((
+   *[\\/]* ) as_myself=$0 ;;
+   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in $PATH
+ do
+   IFS=$as_save_IFS
+   test -z "$as_dir" && as_dir=.
+     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+   done
+ IFS=$as_save_IFS
+ 
+      ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+   as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+   exit 1
+ fi
+ 
+ # Unset variables that we do not need and which cause bugs (e.g. in
+ # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+ # suppresses any "Segmentation fault" message there.  '((' could
+ # trigger a bug in pdksh 5.2.14.
+ for as_var in BASH_ENV ENV MAIL MAILPATH
+ do eval test x\${$as_var+set} = xset \
+   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+ done
+ PS1='$ '
+ PS2='> '
+ PS4='+ '
+ 
+ # NLS nuisances.
+ LC_ALL=C
+ export LC_ALL
+ LANGUAGE=C
+ export LANGUAGE
+ 
+ # CDPATH.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+ 
+ 
+ # as_fn_error ERROR [LINENO LOG_FD]
+ # ---------------------------------
+ # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+ # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+ # script with status $?, using 1 if that was 0.
+ as_fn_error ()
+ {
+   as_status=$?; test $as_status -eq 0 && as_status=1
+   if test "$3"; then
+     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+   fi
+   $as_echo "$as_me: error: $1" >&2
+   as_fn_exit $as_status
+ } # as_fn_error
+ 
+ 
+ # as_fn_set_status STATUS
+ # -----------------------
+ # Set $? to STATUS, without forking.
+ as_fn_set_status ()
+ {
+   return $1
+ } # as_fn_set_status
+ 
+ # as_fn_exit STATUS
+ # -----------------
+ # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+ as_fn_exit ()
+ {
+   set +e
+   as_fn_set_status $1
+   exit $1
+ } # as_fn_exit
+ 
+ # as_fn_unset VAR
+ # ---------------
+ # Portably unset VAR.
+ as_fn_unset ()
+ {
+   { eval $1=; unset $1;}
+ }
+ as_unset=as_fn_unset
+ # as_fn_append VAR VALUE
+ # ----------------------
+ # Append the text in VALUE to the end of the definition contained in VAR. Take
+ # advantage of any shell optimizations that allow amortized linear growth over
+ # repeated appends, instead of the typical quadratic growth present in naive
+ # implementations.
+ if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+   eval 'as_fn_append ()
+   {
+     eval $1+=\$2
+   }'
+ else
+   as_fn_append ()
+   {
+     eval $1=\$$1\$2
+   }
+ fi # as_fn_append
+ 
+ # as_fn_arith ARG...
+ # ------------------
+ # Perform arithmetic evaluation on the ARGs, and store the result in the
+ # global $as_val. Take advantage of shells that can avoid forks. The arguments
+ # must be portable across $(()) and expr.
+ if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+   eval 'as_fn_arith ()
+   {
+     as_val=$(( $* ))
+   }'
+ else
+   as_fn_arith ()
+   {
+     as_val=`expr "$@" || test $? -eq 1`
+   }
+ fi # as_fn_arith
+ 
+ 
+ if expr a : '\(a\)' >/dev/null 2>&1 &&
+    test "X`expr 00001 : '.*\(...\)'`" = X001; then
+   as_expr=expr
+ else
+   as_expr=false
+ fi
+ 
+ if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+   as_basename=basename
+ else
+   as_basename=false
+ fi
+ 
+ if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+   as_dirname=dirname
+ else
+   as_dirname=false
+ fi
+ 
+ as_me=`$as_basename -- "$0" ||
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ 	 X"$0" : 'X\(//\)$' \| \
+ 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+ $as_echo X/"$0" |
+     sed '/^.*\/\([^/][^/]*\)\/*$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\/\(\/\/\)$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\/\(\/\).*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  s/.*/./; q'`
+ 
+ # Avoid depending upon Character Ranges.
+ as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+ as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+ as_cr_digits='0123456789'
+ as_cr_alnum=$as_cr_Letters$as_cr_digits
+ 
+ ECHO_C= ECHO_N= ECHO_T=
+ case `echo -n x` in #(((((
+ -n*)
+   case `echo 'xy\c'` in
+   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+   xy)  ECHO_C='\c';;
+   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+        ECHO_T='	';;
+   esac;;
+ *)
+   ECHO_N='-n';;
+ esac
+ 
+ rm -f conf$$ conf$$.exe conf$$.file
+ if test -d conf$$.dir; then
+   rm -f conf$$.dir/conf$$.file
+ else
+   rm -f conf$$.dir
+   mkdir conf$$.dir 2>/dev/null
+ fi
+ if (echo >conf$$.file) 2>/dev/null; then
+   if ln -s conf$$.file conf$$ 2>/dev/null; then
+     as_ln_s='ln -s'
+     # ... but there are two gotchas:
+     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+     # In both cases, we have to default to `cp -p'.
+     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+       as_ln_s='cp -p'
+   elif ln conf$$.file conf$$ 2>/dev/null; then
+     as_ln_s=ln
+   else
+     as_ln_s='cp -p'
+   fi
+ else
+   as_ln_s='cp -p'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+ 
+ 
+ # as_fn_mkdir_p
+ # -------------
+ # Create "$as_dir" as a directory, including parents if necessary.
+ as_fn_mkdir_p ()
+ {
+ 
+   case $as_dir in #(
+   -*) as_dir=./$as_dir;;
+   esac
+   test -d "$as_dir" || eval $as_mkdir_p || {
+     as_dirs=
+     while :; do
+       case $as_dir in #(
+       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+       *) as_qdir=$as_dir;;
+       esac
+       as_dirs="'$as_qdir' $as_dirs"
+       as_dir=`$as_dirname -- "$as_dir" ||
+ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ 	 X"$as_dir" : 'X\(//\)[^/]' \| \
+ 	 X"$as_dir" : 'X\(//\)$' \| \
+ 	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+ $as_echo X"$as_dir" |
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)[^/].*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\).*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  s/.*/./; q'`
+       test -d "$as_dir" && break
+     done
+     test -z "$as_dirs" || eval "mkdir $as_dirs"
+   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ 
+ 
+ } # as_fn_mkdir_p
+ if mkdir -p . 2>/dev/null; then
+   as_mkdir_p='mkdir -p "$as_dir"'
+ else
+   test -d ./-p && rmdir ./-p
+   as_mkdir_p=false
+ fi
+ 
+ if test -x / >/dev/null 2>&1; then
+   as_test_x='test -x'
+ else
+   if ls -dL / >/dev/null 2>&1; then
+     as_ls_L_option=L
+   else
+     as_ls_L_option=
+   fi
+   as_test_x='
+     eval sh -c '\''
+       if test -d "$1"; then
+ 	test -d "$1/.";
+       else
+ 	case $1 in #(
+ 	-*)set "./$1";;
+ 	esac;
+ 	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ 	???[sx]*):;;*)false;;esac;fi
+     '\'' sh
+   '
+ fi
+ as_executable_p=$as_test_x
+ 
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+ 
+ # Sed expression to map a string onto a valid variable name.
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+ 
+ 
+ exec 6>&1
+ ## ----------------------------------- ##
+ ## Main body of $CONFIG_STATUS script. ##
+ ## ----------------------------------- ##
+ _ASEOF
+ test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+ 
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ # Save the log message, to keep $0 and so on meaningful, and to
+ # report actual input values of CONFIG_FILES etc. instead of their
+ # values after options handling.
+ ac_log="
+ This file was extended by ClamAV $as_me devel, which was
+ generated by GNU Autoconf 2.65.  Invocation command line was
+ 
+   CONFIG_FILES    = $CONFIG_FILES
+   CONFIG_HEADERS  = $CONFIG_HEADERS
+   CONFIG_LINKS    = $CONFIG_LINKS
+   CONFIG_COMMANDS = $CONFIG_COMMANDS
+   $ $0 $@
+ 
+ on `(hostname || uname -n) 2>/dev/null | sed 1q`
+ "
+ 
+ _ACEOF
+ 
+ case $ac_config_files in *"
+ "*) set x $ac_config_files; shift; ac_config_files=$*;;
+ esac
+ 
+ case $ac_config_headers in *"
+ "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+ esac
+ 
+ 
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ # Files that config.status was made for.
+ config_files="$ac_config_files"
+ config_headers="$ac_config_headers"
+ config_commands="$ac_config_commands"
+ 
+ _ACEOF
+ 
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ ac_cs_usage="\
+ \`$as_me' instantiates files and other configuration actions
+ from templates according to the current configuration.  Unless the files
+ and actions are specified as TAGs, all are instantiated by default.
+ 
+ Usage: $0 [OPTION]... [TAG]...
+ 
+   -h, --help       print this help, then exit
+   -V, --version    print version number and configuration settings, then exit
+       --config     print configuration, then exit
+   -q, --quiet, --silent
+                    do not print progress messages
+   -d, --debug      don't remove temporary files
+       --recheck    update $as_me by reconfiguring in the same conditions
+       --file=FILE[:TEMPLATE]
+                    instantiate the configuration file FILE
+       --header=FILE[:TEMPLATE]
+                    instantiate the configuration header FILE
+ 
+ Configuration files:
+ $config_files
+ 
+ Configuration headers:
+ $config_headers
+ 
+ Configuration commands:
+ $config_commands
+ 
+ Report bugs to <http://bugs.clamav.net/>.
+ ClamAV home page: <http://www.clamav.net/>."
+ 
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ ClamAV config.status devel
+ configured by $0, generated by GNU Autoconf 2.65,
+   with options \\"\$ac_cs_config\\"
+ 
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+ 
+ ac_pwd='$ac_pwd'
+ srcdir='$srcdir'
+ INSTALL='$INSTALL'
+ MKDIR_P='$MKDIR_P'
+ AWK='$AWK'
+ test -n "\$AWK" || AWK=awk
+ _ACEOF
+ 
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ # The default lists apply if the user does not specify any file.
+ ac_need_defaults=:
+ while test $# != 0
+ do
+   case $1 in
+   --*=*)
+     ac_option=`expr "X$1" : 'X\([^=]*\)='`
+     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+     ac_shift=:
+     ;;
+   *)
+     ac_option=$1
+     ac_optarg=$2
+     ac_shift=shift
+     ;;
+   esac
+ 
+   case $ac_option in
+   # Handling of the options.
+   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+     ac_cs_recheck=: ;;
+   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+     $as_echo "$ac_cs_version"; exit ;;
+   --config | --confi | --conf | --con | --co | --c )
+     $as_echo "$ac_cs_config"; exit ;;
+   --debug | --debu | --deb | --de | --d | -d )
+     debug=: ;;
+   --file | --fil | --fi | --f )
+     $ac_shift
+     case $ac_optarg in
+     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+     esac
+     as_fn_append CONFIG_FILES " '$ac_optarg'"
+     ac_need_defaults=false;;
+   --header | --heade | --head | --hea )
+     $ac_shift
+     case $ac_optarg in
+     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+     esac
+     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+     ac_need_defaults=false;;
+   --he | --h)
+     # Conflict between --help and --header
+     as_fn_error "ambiguous option: \`$1'
+ Try \`$0 --help' for more information.";;
+   --help | --hel | -h )
+     $as_echo "$ac_cs_usage"; exit ;;
+   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+   | -silent | --silent | --silen | --sile | --sil | --si | --s)
+     ac_cs_silent=: ;;
+ 
+   # This is an error.
+   -*) as_fn_error "unrecognized option: \`$1'
+ Try \`$0 --help' for more information." ;;
+ 
+   *) as_fn_append ac_config_targets " $1"
+      ac_need_defaults=false ;;
+ 
+   esac
+   shift
+ done
+ 
+ ac_configure_extra_args=
+ 
+ if $ac_cs_silent; then
+   exec 6>/dev/null
+   ac_configure_extra_args="$ac_configure_extra_args --silent"
+ fi
+ 
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ if \$ac_cs_recheck; then
+   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+   shift
+   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+   CONFIG_SHELL='$SHELL'
+   export CONFIG_SHELL
+   exec "\$@"
+ fi
+ 
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ exec 5>>config.log
+ {
+   echo
+   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+ ## Running $as_me. ##
+ _ASBOX
+   $as_echo "$ac_log"
+ } >&5
+ 
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ #
+ # INIT-COMMANDS
+ #
+ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+ 
+ 
+ # The HP-UX ksh and POSIX shell print the target directory to stdout
+ # if CDPATH is set.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+ 
+ sed_quote_subst='$sed_quote_subst'
+ double_quote_subst='$double_quote_subst'
+ delay_variable_subst='$delay_variable_subst'
+ macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+ macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+ enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+ enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+ pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+ enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+ host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+ host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+ host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+ build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+ build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+ build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+ SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+ Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+ GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+ EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+ FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+ LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+ NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+ LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+ max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+ exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+ reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+ reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+ deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+ file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+ AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+ AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+ STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+ RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+ old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+ CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+ compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+ GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+ objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+ SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+ MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+ lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+ need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+ DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+ NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+ LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+ OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+ OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+ libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+ shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+ enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+ export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+ old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+ allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+ no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+ inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+ link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+ fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+ always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+ export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+ include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+ prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+ need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+ need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+ version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+ runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+ shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+ shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+ libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+ finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+ sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+ hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+ enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+ enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+ enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+ old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+ striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+ 
+ LTCC='$LTCC'
+ LTCFLAGS='$LTCFLAGS'
+ compiler='$compiler_DEFAULT'
+ 
+ # Quote evaled strings.
+ for var in SED \
+ GREP \
+ EGREP \
+ FGREP \
+ LD \
+ NM \
+ LN_S \
+ lt_SP2NL \
+ lt_NL2SP \
+ reload_flag \
+ OBJDUMP \
+ deplibs_check_method \
+ file_magic_cmd \
+ AR \
+ AR_FLAGS \
+ STRIP \
+ RANLIB \
+ CC \
+ CFLAGS \
+ compiler \
+ lt_cv_sys_global_symbol_pipe \
+ lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
+ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+ SHELL \
+ ECHO \
+ lt_prog_compiler_no_builtin_flag \
+ lt_prog_compiler_wl \
+ lt_prog_compiler_pic \
+ lt_prog_compiler_static \
+ lt_cv_prog_compiler_c_o \
+ need_locks \
+ DSYMUTIL \
+ NMEDIT \
+ LIPO \
+ OTOOL \
+ OTOOL64 \
+ shrext_cmds \
+ export_dynamic_flag_spec \
+ whole_archive_flag_spec \
+ compiler_needs_object \
+ with_gnu_ld \
+ allow_undefined_flag \
+ no_undefined_flag \
+ hardcode_libdir_flag_spec \
+ hardcode_libdir_flag_spec_ld \
+ hardcode_libdir_separator \
+ fix_srcfile_path \
+ exclude_expsyms \
+ include_expsyms \
+ file_list_spec \
+ variables_saved_for_relink \
+ libname_spec \
+ library_names_spec \
+ soname_spec \
+ finish_eval \
+ old_striplib \
+ striplib; do
+     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+     *[\\\\\\\`\\"\\\$]*)
+       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+       ;;
+     *)
+       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+       ;;
+     esac
+ done
+ 
+ # Double-quote double-evaled strings.
+ for var in reload_cmds \
+ old_postinstall_cmds \
+ old_postuninstall_cmds \
+ old_archive_cmds \
+ extract_expsyms_cmds \
+ old_archive_from_new_cmds \
+ old_archive_from_expsyms_cmds \
+ archive_cmds \
+ archive_expsym_cmds \
+ module_cmds \
+ module_expsym_cmds \
+ export_symbols_cmds \
+ prelink_cmds \
+ postinstall_cmds \
+ postuninstall_cmds \
+ finish_cmds \
+ sys_lib_search_path_spec \
+ sys_lib_dlsearch_path_spec; do
+     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+     *[\\\\\\\`\\"\\\$]*)
+       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+       ;;
+     *)
+       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+       ;;
+     esac
+ done
+ 
+ # Fix-up fallback echo if it was mangled by the above quoting rules.
+ case \$lt_ECHO in
+ *'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+   ;;
+ esac
+ 
+ ac_aux_dir='$ac_aux_dir'
+ xsi_shell='$xsi_shell'
+ lt_shell_append='$lt_shell_append'
+ 
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes INIT.
+ if test -n "\${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+ fi
+ 
+ 
+     PACKAGE='$PACKAGE'
+     VERSION='$VERSION'
+     TIMESTAMP='$TIMESTAMP'
+     RM='$RM'
+     ofile='$ofile'
+ 
+ ac_aux_dir='$ac_aux_dir'
+ 
+ 
+ 
+ _ACEOF
+ 
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ 
+ # Handling of arguments.
+ for ac_config_target in $ac_config_targets
+ do
+   case $ac_config_target in
+     "clamav-config.h") CONFIG_HEADERS="$CONFIG_HEADERS clamav-config.h" ;;
+     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+     "libltdl/Makefile") CONFIG_FILES="$CONFIG_FILES libltdl/Makefile" ;;
+     "clamscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamscan/Makefile" ;;
+     "database/Makefile") CONFIG_FILES="$CONFIG_FILES database/Makefile" ;;
+     "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
+     "clamd/Makefile") CONFIG_FILES="$CONFIG_FILES clamd/Makefile" ;;
+     "clamdscan/Makefile") CONFIG_FILES="$CONFIG_FILES clamdscan/Makefile" ;;
+     "clamav-milter/Makefile") CONFIG_FILES="$CONFIG_FILES clamav-milter/Makefile" ;;
+     "freshclam/Makefile") CONFIG_FILES="$CONFIG_FILES freshclam/Makefile" ;;
+     "sigtool/Makefile") CONFIG_FILES="$CONFIG_FILES sigtool/Makefile" ;;
+     "clamconf/Makefile") CONFIG_FILES="$CONFIG_FILES clamconf/Makefile" ;;
+     "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
+     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+     "unit_tests/Makefile") CONFIG_FILES="$CONFIG_FILES unit_tests/Makefile" ;;
+     "clamdtop/Makefile") CONFIG_FILES="$CONFIG_FILES clamdtop/Makefile" ;;
+     "clambc/Makefile") CONFIG_FILES="$CONFIG_FILES clambc/Makefile" ;;
+     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+     "clamav-config") CONFIG_FILES="$CONFIG_FILES clamav-config" ;;
+     "libclamav.pc") CONFIG_FILES="$CONFIG_FILES libclamav.pc" ;;
+     "platform.h") CONFIG_FILES="$CONFIG_FILES platform.h" ;;
+     "docs/man/clamav-milter.8") CONFIG_FILES="$CONFIG_FILES docs/man/clamav-milter.8" ;;
+     "docs/man/clamconf.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamconf.1" ;;
+     "docs/man/clamd.8") CONFIG_FILES="$CONFIG_FILES docs/man/clamd.8" ;;
+     "docs/man/clamd.conf.5") CONFIG_FILES="$CONFIG_FILES docs/man/clamd.conf.5" ;;
+     "docs/man/clamdscan.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamdscan.1" ;;
+     "docs/man/clamscan.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamscan.1" ;;
+     "docs/man/freshclam.1") CONFIG_FILES="$CONFIG_FILES docs/man/freshclam.1" ;;
+     "docs/man/freshclam.conf.5") CONFIG_FILES="$CONFIG_FILES docs/man/freshclam.conf.5" ;;
+     "docs/man/sigtool.1") CONFIG_FILES="$CONFIG_FILES docs/man/sigtool.1" ;;
+     "docs/man/clamdtop.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamdtop.1" ;;
+     "libclamav/Makefile") CONFIG_FILES="$CONFIG_FILES libclamav/Makefile" ;;
+ 
+   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+   esac
+ done
+ 
+ 
+ # If the user did not use the arguments to specify the items to instantiate,
+ # then the envvar interface is used.  Set only those that are not.
+ # We use the long form for the default assignment because of an extremely
+ # bizarre bug on SunOS 4.1.3.
+ if $ac_need_defaults; then
+   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+ fi
+ 
+ # Have a temporary directory for convenience.  Make it in the build tree
+ # simply because there is no reason against having it here, and in addition,
+ # creating and moving files from /tmp can sometimes cause problems.
+ # Hook for its removal unless debugging.
+ # Note that there is a small window in which the directory will not be cleaned:
+ # after its creation but before its name has been assigned to `$tmp'.
+ $debug ||
+ {
+   tmp=
+   trap 'exit_status=$?
+   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ ' 0
+   trap 'as_fn_exit 1' 1 2 13 15
+ }
+ # Create a (secure) tmp directory for tmp files.
+ 
+ {
+   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+   test -n "$tmp" && test -d "$tmp"
+ }  ||
+ {
+   tmp=./conf$$-$RANDOM
+   (umask 077 && mkdir "$tmp")
+ } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+ 
+ # Set up the scripts for CONFIG_FILES section.
+ # No need to generate them if there are no CONFIG_FILES.
+ # This happens for instance with `./config.status config.h'.
+ if test -n "$CONFIG_FILES"; then
+ 
+ 
+ ac_cr=`echo X | tr X '\015'`
+ # On cygwin, bash can eat \r inside `` if the user requested igncr.
+ # But we know of no other shell where ac_cr would be empty at this
+ # point, so we can use a bashism as a fallback.
+ if test "x$ac_cr" = x; then
+   eval ac_cr=\$\'\\r\'
+ fi
+ ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+ if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+   ac_cs_awk_cr='\r'
+ else
+   ac_cs_awk_cr=$ac_cr
+ fi
+ 
+ echo 'BEGIN {' >"$tmp/subs1.awk" &&
+ _ACEOF
+ 
+ 
+ {
+   echo "cat >conf$$subs.awk <<_ACEOF" &&
+   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+   echo "_ACEOF"
+ } >conf$$subs.sh ||
+   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+   . ./conf$$subs.sh ||
+     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ 
+   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+   if test $ac_delim_n = $ac_delim_num; then
+     break
+   elif $ac_last_try; then
+     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+   else
+     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+   fi
+ done
+ rm -f conf$$subs.sh
+ 
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+ _ACEOF
+ sed -n '
+ h
+ s/^/S["/; s/!.*/"]=/
+ p
+ g
+ s/^[^!]*!//
+ :repl
+ t repl
+ s/'"$ac_delim"'$//
+ t delim
+ :nl
+ h
+ s/\(.\{148\}\)..*/\1/
+ t more1
+ s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+ p
+ n
+ b repl
+ :more1
+ s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+ p
+ g
+ s/.\{148\}//
+ t nl
+ :delim
+ h
+ s/\(.\{148\}\)..*/\1/
+ t more2
+ s/["\\]/\\&/g; s/^/"/; s/$/"/
+ p
+ b
+ :more2
+ s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+ p
+ g
+ s/.\{148\}//
+ t delim
+ ' <conf$$subs.awk | sed '
+ /^[^""]/{
+   N
+   s/\n//
+ }
+ ' >>$CONFIG_STATUS || ac_write_fail=1
+ rm -f conf$$subs.awk
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ _ACAWK
+ cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+   for (key in S) S_is_set[key] = 1
+   FS = ""
+ 
+ }
+ {
+   line = $ 0
+   nfields = split(line, field, "@")
+   substed = 0
+   len = length(field[1])
+   for (i = 2; i < nfields; i++) {
+     key = field[i]
+     keylen = length(key)
+     if (S_is_set[key]) {
+       value = S[key]
+       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+       len += length(value) + length(field[++i])
+       substed = 1
+     } else
+       len += 1 + keylen
+   }
+ 
+   print line
+ }
+ 
+ _ACAWK
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+ else
+   cat
+ fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+   || as_fn_error "could not setup config files machinery" "$LINENO" 5
+ _ACEOF
+ 
+ # VPATH may cause trouble with some makes, so we remove $(srcdir),
+ # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+ # trailing colons and then remove the whole line if VPATH becomes empty
+ # (actually we leave an empty line to preserve line numbers).
+ if test "x$srcdir" = x.; then
+   ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+ s/:*\$(srcdir):*/:/
+ s/:*\${srcdir}:*/:/
+ s/:*@srcdir@:*/:/
+ s/^\([^=]*=[	 ]*\):*/\1/
+ s/:*$//
+ s/^[^=]*=[	 ]*$//
+ }'
+ fi
+ 
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ fi # test -n "$CONFIG_FILES"
+ 
+ # Set up the scripts for CONFIG_HEADERS section.
+ # No need to generate them if there are no CONFIG_HEADERS.
+ # This happens for instance with `./config.status Makefile'.
+ if test -n "$CONFIG_HEADERS"; then
+ cat >"$tmp/defines.awk" <<\_ACAWK ||
+ BEGIN {
+ _ACEOF
+ 
+ # Transform confdefs.h into an awk script `defines.awk', embedded as
+ # here-document in config.status, that substitutes the proper values into
+ # config.h.in to produce config.h.
+ 
+ # Create a delimiter string that does not exist in confdefs.h, to ease
+ # handling of long lines.
+ ac_delim='%!_!# '
+ for ac_last_try in false false :; do
+   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+   if test -z "$ac_t"; then
+     break
+   elif $ac_last_try; then
+     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+   else
+     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+   fi
+ done
+ 
+ # For the awk script, D is an array of macro values keyed by name,
+ # likewise P contains macro parameters if any.  Preserve backslash
+ # newline sequences.
+ 
+ ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+ sed -n '
+ s/.\{148\}/&'"$ac_delim"'/g
+ t rset
+ :rset
+ s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+ t def
+ d
+ :def
+ s/\\$//
+ t bsnl
+ s/["\\]/\\&/g
+ s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+ D["\1"]=" \3"/p
+ s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+ d
+ :bsnl
+ s/["\\]/\\&/g
+ s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+ D["\1"]=" \3\\\\\\n"\\/p
+ t cont
+ s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+ t cont
+ d
+ :cont
+ n
+ s/.\{148\}/&'"$ac_delim"'/g
+ t clear
+ :clear
+ s/\\$//
+ t bsnlc
+ s/["\\]/\\&/g; s/^/"/; s/$/"/p
+ d
+ :bsnlc
+ s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+ b cont
+ ' <confdefs.h | sed '
+ s/'"$ac_delim"'/"\\\
+ "/g' >>$CONFIG_STATUS || ac_write_fail=1
+ 
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+   for (key in D) D_is_set[key] = 1
+   FS = ""
+ }
+ /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+   line = \$ 0
+   split(line, arg, " ")
+   if (arg[1] == "#") {
+     defundef = arg[2]
+     mac1 = arg[3]
+   } else {
+     defundef = substr(arg[1], 2)
+     mac1 = arg[2]
+   }
+   split(mac1, mac2, "(") #)
+   macro = mac2[1]
+   prefix = substr(line, 1, index(line, defundef) - 1)
+   if (D_is_set[macro]) {
+     # Preserve the white space surrounding the "#".
+     print prefix "define", macro P[macro] D[macro]
+     next
+   } else {
+     # Replace #undef with comments.  This is necessary, for example,
+     # in the case of _POSIX_SOURCE, which is predefined and required
+     # on some systems where configure will not decide to define it.
+     if (defundef == "undef") {
+       print "/*", prefix defundef, macro, "*/"
+       next
+     }
+   }
+ }
+ { print }
+ _ACAWK
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+   as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ fi # test -n "$CONFIG_HEADERS"
+ 
+ 
+ eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+ shift
+ for ac_tag
+ do
+   case $ac_tag in
+   :[FHLC]) ac_mode=$ac_tag; continue;;
+   esac
+   case $ac_mode$ac_tag in
+   :[FHL]*:*);;
+   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+   :[FH]-) ac_tag=-:-;;
+   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+   esac
+   ac_save_IFS=$IFS
+   IFS=:
+   set x $ac_tag
+   IFS=$ac_save_IFS
+   shift
+   ac_file=$1
+   shift
+ 
+   case $ac_mode in
+   :L) ac_source=$1;;
+   :[FH])
+     ac_file_inputs=
+     for ac_f
+     do
+       case $ac_f in
+       -) ac_f="$tmp/stdin";;
+       *) # Look for the file first in the build tree, then in the source tree
+ 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+ 	 # because $ac_f cannot contain `:'.
+ 	 test -f "$ac_f" ||
+ 	   case $ac_f in
+ 	   [\\/$]*) false;;
+ 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ 	   esac ||
+ 	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+       esac
+       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+       as_fn_append ac_file_inputs " '$ac_f'"
+     done
+ 
+     # Let's still pretend it is `configure' which instantiates (i.e., don't
+     # use $as_me), people would be surprised to read:
+     #    /* config.h.  Generated by config.status.  */
+     configure_input='Generated from '`
+ 	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ 	`' by configure.'
+     if test x"$ac_file" != x-; then
+       configure_input="$ac_file.  $configure_input"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+ $as_echo "$as_me: creating $ac_file" >&6;}
+     fi
+     # Neutralize special characters interpreted by sed in replacement strings.
+     case $configure_input in #(
+     *\&* | *\|* | *\\* )
+        ac_sed_conf_input=`$as_echo "$configure_input" |
+        sed 's/[\\\\&|]/\\\\&/g'`;; #(
+     *) ac_sed_conf_input=$configure_input;;
+     esac
+ 
+     case $ac_tag in
+     *:-:* | *:-) cat >"$tmp/stdin" \
+       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+     esac
+     ;;
+   esac
+ 
+   ac_dir=`$as_dirname -- "$ac_file" ||
+ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ 	 X"$ac_file" : 'X\(//\)[^/]' \| \
+ 	 X"$ac_file" : 'X\(//\)$' \| \
+ 	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+ $as_echo X"$ac_file" |
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)[^/].*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\).*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  s/.*/./; q'`
+   as_dir="$ac_dir"; as_fn_mkdir_p
+   ac_builddir=.
+ 
+ case "$ac_dir" in
+ .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *)
+   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+   # A ".." for each directory in $ac_dir_suffix.
+   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+   case $ac_top_builddir_sub in
+   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+   esac ;;
+ esac
+ ac_abs_top_builddir=$ac_pwd
+ ac_abs_builddir=$ac_pwd$ac_dir_suffix
+ # for backward compatibility:
+ ac_top_builddir=$ac_top_build_prefix
+ 
+ case $srcdir in
+   .)  # We are building in place.
+     ac_srcdir=.
+     ac_top_srcdir=$ac_top_builddir_sub
+     ac_abs_top_srcdir=$ac_pwd ;;
+   [\\/]* | ?:[\\/]* )  # Absolute name.
+     ac_srcdir=$srcdir$ac_dir_suffix;
+     ac_top_srcdir=$srcdir
+     ac_abs_top_srcdir=$srcdir ;;
+   *) # Relative name.
+     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+     ac_top_srcdir=$ac_top_build_prefix$srcdir
+     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ esac
+ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+ 
+ 
+   case $ac_mode in
+   :F)
+   #
+   # CONFIG_FILE
+   #
+ 
+   case $INSTALL in
+   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+   esac
+   ac_MKDIR_P=$MKDIR_P
+   case $MKDIR_P in
+   [\\/$]* | ?:[\\/]* ) ;;
+   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+   esac
+ _ACEOF
+ 
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ # If the template does not know about datarootdir, expand it.
+ # FIXME: This hack should be removed a few years after 2.60.
+ ac_datarootdir_hack=; ac_datarootdir_seen=
+ ac_sed_dataroot='
+ /datarootdir/ {
+   p
+   q
+ }
+ /@datadir@/p
+ /@docdir@/p
+ /@infodir@/p
+ /@localedir@/p
+ /@mandir@/p'
+ case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+ *datarootdir*) ac_datarootdir_seen=yes;;
+ *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+ $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+   ac_datarootdir_hack='
+   s&@datadir@&$datadir&g
+   s&@docdir@&$docdir&g
+   s&@infodir@&$infodir&g
+   s&@localedir@&$localedir&g
+   s&@mandir@&$mandir&g
+   s&\\\${datarootdir}&$datarootdir&g' ;;
+ esac
+ _ACEOF
+ 
+ # Neutralize VPATH when `$srcdir' = `.'.
+ # Shell code in configure.ac might set extrasub.
+ # FIXME: do we really want to maintain this feature?
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_sed_extra="$ac_vpsub
+ $extrasub
+ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ :t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+ s|@configure_input@|$ac_sed_conf_input|;t t
+ s&@top_builddir@&$ac_top_builddir_sub&;t t
+ s&@top_build_prefix@&$ac_top_build_prefix&;t t
+ s&@srcdir@&$ac_srcdir&;t t
+ s&@abs_srcdir@&$ac_abs_srcdir&;t t
+ s&@top_srcdir@&$ac_top_srcdir&;t t
+ s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+ s&@builddir@&$ac_builddir&;t t
+ s&@abs_builddir@&$ac_abs_builddir&;t t
+ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+ s&@INSTALL@&$ac_INSTALL&;t t
+ s&@MKDIR_P@&$ac_MKDIR_P&;t t
+ $ac_datarootdir_hack
+ "
+ eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+   || as_fn_error "could not create $ac_file" "$LINENO" 5
+ 
+ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ which seems to be undefined.  Please make sure it is defined." >&5
+ $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ which seems to be undefined.  Please make sure it is defined." >&2;}
+ 
+   rm -f "$tmp/stdin"
+   case $ac_file in
+   -) cat "$tmp/out" && rm -f "$tmp/out";;
+   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+   esac \
+   || as_fn_error "could not create $ac_file" "$LINENO" 5
+  ;;
+   :H)
+   #
+   # CONFIG_HEADER
+   #
+   if test x"$ac_file" != x-; then
+     {
+       $as_echo "/* $configure_input  */" \
+       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+     } >"$tmp/config.h" \
+       || as_fn_error "could not create $ac_file" "$LINENO" 5
+     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+ $as_echo "$as_me: $ac_file is unchanged" >&6;}
+     else
+       rm -f "$ac_file"
+       mv "$tmp/config.h" "$ac_file" \
+ 	|| as_fn_error "could not create $ac_file" "$LINENO" 5
+     fi
+   else
+     $as_echo "/* $configure_input  */" \
+       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+       || as_fn_error "could not create -" "$LINENO" 5
+   fi
+ # Compute "$ac_file"'s index in $config_headers.
+ _am_arg="$ac_file"
+ _am_stamp_count=1
+ for _am_header in $config_headers :; do
+   case $_am_header in
+     $_am_arg | $_am_arg:* )
+       break ;;
+     * )
+       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+   esac
+ done
+ echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ 	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+ 	 X"$_am_arg" : 'X\(//\)$' \| \
+ 	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+ $as_echo X"$_am_arg" |
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)[^/].*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\).*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  s/.*/./; q'`/stamp-h$_am_stamp_count
+  ;;
+ 
+   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+ $as_echo "$as_me: executing $ac_file commands" >&6;}
+  ;;
+   esac
+ 
+ 
+   case $ac_file$ac_mode in
+     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+   # Autoconf 2.62 quotes --file arguments for eval, but not when files
+   # are listed without --file.  Let's play safe and only enable the eval
+   # if we detect the quoting.
+   case $CONFIG_FILES in
+   *\'*) eval set x "$CONFIG_FILES" ;;
+   *)   set x $CONFIG_FILES ;;
+   esac
+   shift
+   for mf
+   do
+     # Strip MF so we end up with the name of the file.
+     mf=`echo "$mf" | sed -e 's/:.*$//'`
+     # Check whether this is an Automake generated Makefile or not.
+     # We used to match only the files named `Makefile.in', but
+     # some people rename them; so instead we look at the file content.
+     # Grep'ing the first line is not enough: some people post-process
+     # each Makefile.in and add a new line on top of each file to say so.
+     # Grep'ing the whole file is not good either: AIX grep has a line
+     # limit of 2048, but all sed's we know have understand at least 4000.
+     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+       dirpart=`$as_dirname -- "$mf" ||
+ $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ 	 X"$mf" : 'X\(//\)[^/]' \| \
+ 	 X"$mf" : 'X\(//\)$' \| \
+ 	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+ $as_echo X"$mf" |
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)[^/].*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\).*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  s/.*/./; q'`
+     else
+       continue
+     fi
+     # Extract the definition of DEPDIR, am__include, and am__quote
+     # from the Makefile without running `make'.
+     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+     test -z "$DEPDIR" && continue
+     am__include=`sed -n 's/^am__include = //p' < "$mf"`
+     test -z "am__include" && continue
+     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+     # When using ansi2knr, U may be empty or an underscore; expand it
+     U=`sed -n 's/^U = //p' < "$mf"`
+     # Find all dependency output files, they are included files with
+     # $(DEPDIR) in their names.  We invoke sed twice because it is the
+     # simplest approach to changing $(DEPDIR) to its actual value in the
+     # expansion.
+     for file in `sed -n "
+       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ 	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+       # Make sure the directory exists.
+       test -f "$dirpart/$file" && continue
+       fdir=`$as_dirname -- "$file" ||
+ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ 	 X"$file" : 'X\(//\)[^/]' \| \
+ 	 X"$file" : 'X\(//\)$' \| \
+ 	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+ $as_echo X"$file" |
+     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)[^/].*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\/\)$/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  /^X\(\/\).*/{
+ 	    s//\1/
+ 	    q
+ 	  }
+ 	  s/.*/./; q'`
+       as_dir=$dirpart/$fdir; as_fn_mkdir_p
+       # echo "creating $dirpart/$file"
+       echo '# dummy' > "$dirpart/$file"
+     done
+   done
+ }
+  ;;
+     "libtool":C)
+ 
+     # See if we are running on zsh, and set the options which allow our
+     # commands through without removal of \ escapes.
+     if test -n "${ZSH_VERSION+set}" ; then
+       setopt NO_GLOB_SUBST
+     fi
+ 
+     cfgfile="${ofile}T"
+     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+     $RM "$cfgfile"
+ 
+     cat <<_LT_EOF >> "$cfgfile"
+ #! $SHELL
+ 
+ # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+ # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+ # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ #
+ #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+ #                 2006, 2007, 2008 Free Software Foundation, Inc.
+ #   Written by Gordon Matzigkeit, 1996
+ #
+ #   This file is part of GNU Libtool.
+ #
+ # GNU Libtool is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License as
+ # published by the Free Software Foundation; either version 2 of
+ # the License, or (at your option) any later version.
+ #
+ # As a special exception to the GNU General Public License,
+ # if you distribute this file as part of a program or library that
+ # is built using GNU Libtool, you may include this file under the
+ # same distribution terms that you use for the rest of that program.
+ #
+ # GNU Libtool is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with GNU Libtool; see the file COPYING.  If not, a copy
+ # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+ # obtained by writing to the Free Software Foundation, Inc.,
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ 
+ 
+ # The names of the tagged configurations supported by this script.
+ available_tags=""
+ 
+ # ### BEGIN LIBTOOL CONFIG
+ 
+ # Which release of libtool.m4 was used?
+ macro_version=$macro_version
+ macro_revision=$macro_revision
+ 
  # Whether or not to build static libraries.
  build_old_libs=$enable_static
  
+ # Whether or not to build shared libraries.
+ build_libtool_libs=$enable_shared
+ 
  # What type of objects to build.
  pic_mode=$pic_mode
  
@@@ -22219,7 -24693,155 +24831,155 @@@ if test "$no_create" != yes; the
    # would make configure fail if this is the last instruction.
    $ac_cs_success || as_fn_exit $?
  fi
- if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ 
+ 
+ 
+ #
+ # CONFIG_SUBDIRS section.
+ #
+ if test "$no_recursion" != yes; then
+ 
+   # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+   # so they do not pile up.
+   ac_sub_configure_args=
+   ac_prev=
+   eval "set x $ac_configure_args"
+   shift
+   for ac_arg
+   do
+     if test -n "$ac_prev"; then
+       ac_prev=
+       continue
+     fi
+     case $ac_arg in
+     -cache-file | --cache-file | --cache-fil | --cache-fi \
+     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+       ac_prev=cache_file ;;
+     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+     | --c=*)
+       ;;
+     --config-cache | -C)
+       ;;
+     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+       ac_prev=srcdir ;;
+     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+       ;;
+     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+       ac_prev=prefix ;;
+     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+       ;;
+     --disable-option-checking)
+       ;;
+     *)
+       case $ac_arg in
+       *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+       esac
+       as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+     esac
+   done
+ 
+   # Always prepend --prefix to ensure using the same prefix
+   # in subdir configurations.
+   ac_arg="--prefix=$prefix"
+   case $ac_arg in
+   *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+   esac
+   ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+ 
+   # Pass --silent
+   if test "$silent" = yes; then
+     ac_sub_configure_args="--silent $ac_sub_configure_args"
+   fi
+ 
+   # Always prepend --disable-option-checking to silence warnings, since
+   # different subdirs can have different --enable and --with options.
+   ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+ 
+   ac_popdir=`pwd`
+   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+ 
+     # Do not complain, so a configure script can configure whichever
+     # parts of a large source tree are present.
+     test -d "$srcdir/$ac_dir" || continue
+ 
+     ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+     $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+     $as_echo "$ac_msg" >&6
+     as_dir="$ac_dir"; as_fn_mkdir_p
+     ac_builddir=.
+ 
+ case "$ac_dir" in
+ .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *)
+   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+   # A ".." for each directory in $ac_dir_suffix.
+   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+   case $ac_top_builddir_sub in
+   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+   esac ;;
+ esac
+ ac_abs_top_builddir=$ac_pwd
+ ac_abs_builddir=$ac_pwd$ac_dir_suffix
+ # for backward compatibility:
+ ac_top_builddir=$ac_top_build_prefix
+ 
+ case $srcdir in
+   .)  # We are building in place.
+     ac_srcdir=.
+     ac_top_srcdir=$ac_top_builddir_sub
+     ac_abs_top_srcdir=$ac_pwd ;;
+   [\\/]* | ?:[\\/]* )  # Absolute name.
+     ac_srcdir=$srcdir$ac_dir_suffix;
+     ac_top_srcdir=$srcdir
+     ac_abs_top_srcdir=$srcdir ;;
+   *) # Relative name.
+     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+     ac_top_srcdir=$ac_top_build_prefix$srcdir
+     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ esac
+ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+ 
+ 
+     cd "$ac_dir"
+ 
+     # Check for guested configure; otherwise get Cygnus style configure.
+     if test -f "$ac_srcdir/configure.gnu"; then
+       ac_sub_configure=$ac_srcdir/configure.gnu
+     elif test -f "$ac_srcdir/configure"; then
+       ac_sub_configure=$ac_srcdir/configure
+     elif test -f "$ac_srcdir/configure.in"; then
+       # This should be Cygnus configure.
+       ac_sub_configure=$ac_aux_dir/configure
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+       ac_sub_configure=
+     fi
+ 
+     # The recursion is here.
+     if test -n "$ac_sub_configure"; then
+       # Make the cache file name correct relative to the subdirectory.
+       case $cache_file in
+       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+       *) # Relative name.
+ 	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+       esac
+ 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+       # The eval makes quoting arguments work.
+       eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ 	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ 	subdirfailed=yes
+     fi
+ 
+     cd "$ac_popdir"
+   done
+ fi
+ 
+ 	  if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
  $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
  fi
diff --combined configure.in
index 5c7284e,18166ba..c0f8c08
--- a/configure.in
+++ b/configure.in
@@@ -58,7 -58,7 +58,7 @@@ AC_PROG_LN_
  AC_PROG_MAKE_SET
  
  LT_CONFIG_LTDL_DIR([libltdl])
- LT_INIT([dlopen])
+ LT_INIT([dlopen disable-static])
  LTDL_INIT([recursive])
  AC_CONFIG_FILES([libltdl/Makefile])
  
@@@ -82,8 -82,6 +82,8 @@@ if test $ac_cv_c_bigendian = no; the
      m4_default([], [AC_DEFINE([WORDS_BIGENDIAN], 0)])
  fi
  
 +LT_LIB_M
 +
  AC_ARG_ENABLE([gcc-vcheck],
  [  --disable-gcc-vcheck	  do not check for buggy gcc version ],
  gcc_check=$enableval, gcc_check="yes")
@@@ -132,6 -130,7 +132,6 @@@ if test "x$ac_compiler_gnu" = "xyes"; t
  			;;
  	esac
  fi
 -AM_CONDITIONAL([DISTCHECK_ENABLE_FLAGS], test "x$distcheck_enable_flags" = "x1")
  
  dnl Checks if compiler produces valid code, regardless of compiler
  dnl we do these checks here to avoid receiving endless bugreports about
@@@ -1513,25 -1512,16 +1513,33 @@@ AC_SUBST([CURSES_LIBS]
  AM_CONDITIONAL([HAVE_CURSES],
  	       [test "X$HAVE_LIBNCURSES" = "Xyes" || test "X$HAVE_LIBPDCURSES" = "Xyes"])
  
 +AC_ARG_ENABLE([distcheck-werror],
 +	      AC_HELP_STRING([--enable-distcheck-werror],
 +			     [enable warnings as error for distcheck
 +			      @<:@default=no@:>@]),
 +[enable_distcheckwerror=$enableval],[enable_distcheckwerror="no"])
 +
 +# Enable distcheck warnings and Werror only for gcc versions that support them,
 +# and only after we've run the configure tests.
 +# Some configure tests fail (like checking for cos in -lm) if we enable these
 +# Werror flags for configure too (for example -Wstrict-prototypes makes
 +# configure think that -lm doesn't have cos, hence its in libc).
 +if test "x$enable_distcheckwerror" = "xyes"; then
 +    if test "$distcheck_enable_flags" = "1"; then
 +	CFLAGS="$CFLAGS -Wno-pointer-sign -Werror-implicit-function-declaration -Werror -Wextra -Wall -Wno-error=bad-function-cast -Wbad-function-cast -Wcast-align -Wendif-labels -Wfloat-equal -Wformat=2 -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wno-error=missing-prototypes -Wnested-externs -Wno-error=nested-externs -Wpointer-arith -Wstrict-prototypes -Wno-error=strict-prototypes -Wno-switch -Wno-switch-enum -Wundef -Wwrite-strings -Wstrict-overflow=1 -Winit-self -Wmissing-include-dirs -Wstrict-aliasing -Wdeclaration-after-statement -Waggregate-return -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=type-limits -Wno-error=unused-function -Wno-error=unused-value -Wno-error=unused-variable -Wcast-qual -Wno-error=cast-qual -Wno-error=sign-compare -Wshadow -Wno-error=shadow -Wno-error=uninitialized -fdiagnostics-show-option -Wno-unused-parameter -Wno-error=unreachable-code -Winvalid-pch -Wno-error=invalid-pch -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector -Wno-error=aggregate-return"
 +    fi
 +fi
 +
+ AC_ARG_ENABLE([llvm],AC_HELP_STRING([--enable-llvm],
+ 				    [Enable 'llvm' JIT/verifier support @<:@default=auto@:>@]),
+ 				    [enable_llvm=$enableval], [enable_llvm="auto"])
+ 
+ if test "$enable_llvm" != "no"; then
+     dnl Try to configure subdir, optionally
+     AC_CONFIG_SUBDIRS_OPTIONAL([libclamav/c++])
+ fi
+ 
  AC_OUTPUT([
- libclamav/Makefile
  clamscan/Makefile
  database/Makefile
  docs/Makefile
@@@ -1562,6 -1552,14 +1570,14 @@@ docs/man/sigtool.
  docs/man/clamdtop.1
  ])
  
+ if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then
+     AC_MSG_ERROR([Failed to configure LLVM, and LLVM was explicitly requested])
+ fi
+ AM_CONDITIONAL([ENABLE_LLVM],
+ 	       [test "$subdirfailed" != "yes" && test "$enable_llvm" != "no"])
+ no_recursion="yes";
+ AC_OUTPUT([libclamav/Makefile])
+ 
  # Yep, downgrading the compiler avoids the bug too:
  # 4.0.x, and 4.1.0 are the known buggy versions
  # 3.4 doesn't have the bug
diff --combined database/Makefile.in
index 13dc844,bf5a39f..6ffb997
--- a/database/Makefile.in
+++ b/database/Makefile.in
@@@ -60,9 -60,9 +60,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -139,7 -139,6 +139,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -228,6 -227,7 +228,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined docs/Makefile.in
index 7d9ade2,623d1c1..b9c977f
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@@ -59,9 -59,9 +59,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -166,7 -166,6 +166,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -255,6 -254,7 +255,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined etc/Makefile.in
index 7d85dcf,e01ce4e..64f3abf
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@@ -59,9 -59,9 +59,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -138,7 -138,6 +138,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -227,6 -226,7 +227,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined freshclam/Makefile.in
index ac74f88,4d354cd..072f11d
--- a/freshclam/Makefile.in
+++ b/freshclam/Makefile.in
@@@ -62,9 -62,9 +62,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -175,7 -175,6 +175,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -264,6 -263,7 +264,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined libclamav/Makefile.am
index 564c593,17f236f..c846f50
--- a/libclamav/Makefile.am
+++ b/libclamav/Makefile.am
@@@ -17,11 -17,8 +17,8 @@@
  #  MA 02110-1301, USA.
  
  AM_CPPFLAGS = -I$(top_srcdir) -I at srcdir@/nsis $(LTDLINCL)
- 
  lib_LTLIBRARIES =
  EXTRA_DIST =
- 
- 
  if ENABLE_UNRAR
  
  AM_CPPFLAGS += -DWARN_DLOPEN_FAIL
@@@ -114,8 -111,19 +111,19 @@@ libclamav_internal_utils_nothreads_la_S
  libclamav_internal_utils_nothreads_la_LDFLAGS=-static
  libclamav_internal_utils_nothreads_la_CFLAGS=-DCL_NOTHREADS
  
- libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@ @LIBM@
- libclamav_la_DEPENDENCIES =  @LTDLDEPS@ $(IFACEDEP) libclamav_internal_utils.la
+ if ENABLE_LLVM
+ LLVMLIBADD=c++/libclamavcxx.la -lstdc++ -lm
+ LLVMDEP=c++/libclamavcxx.la
+ SUBDIRS=c++
+ else
+ LLVMLIBADD=libclamav_nocxx.la
+ LLVMDEP=libclamav_nocxx.la
+ endif
+ 
+ libclamav_nocxx_la_SOURCES = bytecode_nojit.c
+ 
 -libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@
++libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@ @LIBM@
+ libclamav_la_DEPENDENCIES =  @LTDLDEPS@ $(IFACEDEP) $(LLVMDEP) libclamav_internal_utils.la
  libclamav_la_CFLAGS = -DSEARCH_LIBDIR=\"$(libdir)\"
  libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
  
@@@ -169,8 -177,6 +177,8 @@@ libclamav_la_SOURCES = 
  	msexpand.h \
  	pe.c \
  	pe.h \
 +	pe_icons.c \
 +	pe_icons.h \
  	disasm.c \
  	disasm.h \
  	disasmpriv.h \
@@@ -331,9 -337,12 +339,12 @@@
  	ishield.c \
  	ishield.h \
  	type_desc.h \
+ 	bcfeatures.h \
  	bytecode_api.c \
  	bytecode_api_decl.c \
- 	bytecode_api.h
+ 	bytecode_api.h \
+ 	bytecode_api_impl.h \
+ 	bytecode_hooks.h
  
  if !LINK_TOMMATH
  libclamav_la_SOURCES += bignum.c \
@@@ -366,7 -375,7 +377,7 @@@ version.h.tmp
  	fi
  
  lib_LTLIBRARIES += libclamav.la
- noinst_LTLIBRARIES = libclamav_internal_utils.la libclamav_internal_utils_nothreads.la
+ noinst_LTLIBRARIES = libclamav_internal_utils.la libclamav_internal_utils_nothreads.la libclamav_nocxx.la
  EXTRA_DIST += regex/engine.c libclamav.map \
  	     jsparse/generated/operators.h jsparse/generated/keywords.h jsparse/future_reserved_words.list\
  	     jsparse/keywords.list jsparse/special_keywords.list jsparse/operators.gperf
diff --combined libclamav/Makefile.in
index 2bf842d,e5dbdb0..4a428cf
--- a/libclamav/Makefile.in
+++ b/libclamav/Makefile.in
@@@ -74,9 -74,9 +74,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -109,6 -109,8 +109,8 @@@ am__base_list = 
  am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
  LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
  @ENABLE_UNRAR_TRUE at am__DEPENDENCIES_1 = libclamunrar_iface.la
+ @ENABLE_LLVM_FALSE at am__DEPENDENCIES_2 = libclamav_nocxx.la
+ @ENABLE_LLVM_TRUE at am__DEPENDENCIES_2 = c++/libclamavcxx.la
  am__libclamav_la_SOURCES_DIST = clamav.h matcher-ac.c matcher-ac.h \
  	matcher-bm.c matcher-bm.h matcher.c matcher.h others.c \
  	others.h readdb.c readdb.h cvd.c cvd.h dsig.c dsig.h \
@@@ -116,29 -118,29 +118,29 @@@
  	filetypes.h filetypes_int.h rtf.c rtf.h blob.c blob.h mbox.c \
  	mbox.h message.c message.h table.c table.h text.c text.h \
  	ole2_extract.c ole2_extract.h vba_extract.c vba_extract.h \
 -	cltypes.h msexpand.c msexpand.h pe.c pe.h disasm.c disasm.h \
 -	disasmpriv.h upx.c upx.h htmlnorm.c htmlnorm.h chmunpack.c \
 -	chmunpack.h rebuildpe.c rebuildpe.h petite.c petite.h \
 -	wwunpack.c wwunpack.h unsp.c unsp.h aspack.c aspack.h \
 -	packlibs.c packlibs.h fsg.c fsg.h mew.c mew.h upack.c upack.h \
 -	line.c line.h untar.c untar.h unzip.c unzip.h inflate64.c \
 -	inflate64.h inffixed64.h inflate64_priv.h special.c special.h \
 -	binhex.c binhex.h is_tar.c is_tar.h tnef.c tnef.h autoit.c \
 -	autoit.h unarj.c unarj.h nsis/bzlib.c nsis/bzlib_private.h \
 -	nsis/nsis_bzlib.h nsis/nulsft.c nsis/nulsft.h nsis/infblock.c \
 -	nsis/nsis_zconf.h nsis/nsis_zlib.h nsis/nsis_zutil.h pdf.c \
 -	pdf.h spin.c spin.h yc.c yc.h elf.c elf.h execs.h sis.c sis.h \
 -	uuencode.c uuencode.h phishcheck.c phishcheck.h \
 -	phish_domaincheck_db.c phish_domaincheck_db.h \
 -	phish_whitelist.c phish_whitelist.h iana_cctld.h iana_tld.h \
 -	regex_list.c regex_list.h regex_suffix.c regex_suffix.h \
 -	mspack.c mspack.h cab.c cab.h entconv.c entconv.h entitylist.h \
 -	encoding_aliases.h hashtab.c hashtab.h dconf.c dconf.h \
 -	7z/LzmaDec.c 7z/LzmaDec.h 7z/Types.h lzma_iface.c lzma_iface.h \
 -	7z.c 7z.h 7z/7zFile.c 7z/7zFile.h 7z/7zStream.c 7z/CpuArch.h \
 -	7z/7zCrc.c 7z/7zCrc.h 7z/7zBuf.c 7z/7zBuf.h 7z/Bcj2.c \
 -	7z/Bcj2.h 7z/Bra.c 7z/Bra.h 7z/Bra86.c 7z/BraIA64.c \
 -	7z/Archive/7z/7zIn.c 7z/Archive/7z/7zIn.h \
 +	cltypes.h msexpand.c msexpand.h pe.c pe.h pe_icons.c \
 +	pe_icons.h disasm.c disasm.h disasmpriv.h upx.c upx.h \
 +	htmlnorm.c htmlnorm.h chmunpack.c chmunpack.h rebuildpe.c \
 +	rebuildpe.h petite.c petite.h wwunpack.c wwunpack.h unsp.c \
 +	unsp.h aspack.c aspack.h packlibs.c packlibs.h fsg.c fsg.h \
 +	mew.c mew.h upack.c upack.h line.c line.h untar.c untar.h \
 +	unzip.c unzip.h inflate64.c inflate64.h inffixed64.h \
 +	inflate64_priv.h special.c special.h binhex.c binhex.h \
 +	is_tar.c is_tar.h tnef.c tnef.h autoit.c autoit.h unarj.c \
 +	unarj.h nsis/bzlib.c nsis/bzlib_private.h nsis/nsis_bzlib.h \
 +	nsis/nulsft.c nsis/nulsft.h nsis/infblock.c nsis/nsis_zconf.h \
 +	nsis/nsis_zlib.h nsis/nsis_zutil.h pdf.c pdf.h spin.c spin.h \
 +	yc.c yc.h elf.c elf.h execs.h sis.c sis.h uuencode.c \
 +	uuencode.h phishcheck.c phishcheck.h phish_domaincheck_db.c \
 +	phish_domaincheck_db.h phish_whitelist.c phish_whitelist.h \
 +	iana_cctld.h iana_tld.h regex_list.c regex_list.h \
 +	regex_suffix.c regex_suffix.h mspack.c mspack.h cab.c cab.h \
 +	entconv.c entconv.h entitylist.h encoding_aliases.h hashtab.c \
 +	hashtab.h dconf.c dconf.h 7z/LzmaDec.c 7z/LzmaDec.h 7z/Types.h \
 +	lzma_iface.c lzma_iface.h 7z.c 7z.h 7z/7zFile.c 7z/7zFile.h \
 +	7z/7zStream.c 7z/CpuArch.h 7z/7zCrc.c 7z/7zCrc.h 7z/7zBuf.c \
 +	7z/7zBuf.h 7z/Bcj2.c 7z/Bcj2.h 7z/Bra.c 7z/Bra.h 7z/Bra86.c \
 +	7z/BraIA64.c 7z/Archive/7z/7zIn.c 7z/Archive/7z/7zIn.h \
  	7z/Archive/7z/7zDecode.c 7z/Archive/7z/7zDecode.h \
  	7z/Archive/7z/7zItem.c 7z/Archive/7z/7zItem.h \
  	7z/Archive/7z/7zHeader.c 7z/Archive/7z/7zHeader.h \
@@@ -148,8 -150,9 +150,9 @@@
  	uniq.h version.c version.h mpool.c mpool.h fmap.c fmap.h \
  	default.h sha256.c sha256.h bignum.h bytecode.c bytecode.h \
  	bytecode_vm.c bytecode_priv.h clambc.h cpio.c cpio.h macho.c \
- 	macho.h ishield.c ishield.h type_desc.h bytecode_api.c \
- 	bytecode_api_decl.c bytecode_api.h bignum.c bignum_class.h
+ 	macho.h ishield.c ishield.h type_desc.h bcfeatures.h \
+ 	bytecode_api.c bytecode_api_decl.c bytecode_api.h \
+ 	bytecode_api_impl.h bytecode_hooks.h bignum.c bignum_class.h
  @LINK_TOMMATH_FALSE at am__objects_1 = libclamav_la-bignum.lo
  am_libclamav_la_OBJECTS = libclamav_la-matcher-ac.lo \
  	libclamav_la-matcher-bm.lo libclamav_la-matcher.lo \
@@@ -161,8 -164,7 +164,8 @@@
  	libclamav_la-message.lo libclamav_la-table.lo \
  	libclamav_la-text.lo libclamav_la-ole2_extract.lo \
  	libclamav_la-vba_extract.lo libclamav_la-msexpand.lo \
 -	libclamav_la-pe.lo libclamav_la-disasm.lo libclamav_la-upx.lo \
 +	libclamav_la-pe.lo libclamav_la-pe_icons.lo \
 +	libclamav_la-disasm.lo libclamav_la-upx.lo \
  	libclamav_la-htmlnorm.lo libclamav_la-chmunpack.lo \
  	libclamav_la-rebuildpe.lo libclamav_la-petite.lo \
  	libclamav_la-wwunpack.lo libclamav_la-unsp.lo \
@@@ -241,6 -243,9 +244,9 @@@ libclamav_internal_utils_nothreads_la_L
  	$(CCLD) $(libclamav_internal_utils_nothreads_la_CFLAGS) \
  	$(CFLAGS) $(libclamav_internal_utils_nothreads_la_LDFLAGS) \
  	$(LDFLAGS) -o $@
+ libclamav_nocxx_la_LIBADD =
+ am_libclamav_nocxx_la_OBJECTS = bytecode_nojit.lo
+ libclamav_nocxx_la_OBJECTS = $(am_libclamav_nocxx_la_OBJECTS)
  libclamunrar_la_LIBADD =
  am__libclamunrar_la_SOURCES_DIST = ../libclamunrar/unrar15.c \
  	../libclamunrar/unrar20.h ../libclamunrar/unrar.h \
@@@ -301,16 -306,56 +307,56 @@@ am__v_GEN_0 = @echo "  GEN   " $@
  SOURCES = $(libclamav_la_SOURCES) \
  	$(libclamav_internal_utils_la_SOURCES) \
  	$(libclamav_internal_utils_nothreads_la_SOURCES) \
- 	$(libclamunrar_la_SOURCES) $(libclamunrar_iface_la_SOURCES)
+ 	$(libclamav_nocxx_la_SOURCES) $(libclamunrar_la_SOURCES) \
+ 	$(libclamunrar_iface_la_SOURCES)
  DIST_SOURCES = $(am__libclamav_la_SOURCES_DIST) \
  	$(libclamav_internal_utils_la_SOURCES) \
  	$(libclamav_internal_utils_nothreads_la_SOURCES) \
+ 	$(libclamav_nocxx_la_SOURCES) \
  	$(am__libclamunrar_la_SOURCES_DIST) \
  	$(am__libclamunrar_iface_la_SOURCES_DIST)
+ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ 	html-recursive info-recursive install-data-recursive \
+ 	install-dvi-recursive install-exec-recursive \
+ 	install-html-recursive install-info-recursive \
+ 	install-pdf-recursive install-ps-recursive install-recursive \
+ 	installcheck-recursive installdirs-recursive pdf-recursive \
+ 	ps-recursive uninstall-recursive
  HEADERS = $(include_HEADERS)
+ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+   distclean-recursive maintainer-clean-recursive
+ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ 	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ 	distdir
  ETAGS = etags
  CTAGS = ctags
+ DIST_SUBDIRS = c++
  DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ am__relativize = \
+   dir0=`pwd`; \
+   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+   sed_rest='s,^[^/]*/*,,'; \
+   sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+   sed_butlast='s,/*[^/]*$$,,'; \
+   while test -n "$$dir1"; do \
+     first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+     if test "$$first" != "."; then \
+       if test "$$first" = ".."; then \
+         dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+         dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+       else \
+         first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+         if test "$$first2" = "$$first"; then \
+           dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+         else \
+           dir2="../$$dir2"; \
+         fi; \
+         dir0="$$dir0"/"$$first"; \
+       fi; \
+     fi; \
+     dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+   done; \
+   reldir="$$dir2"
  ACLOCAL = @ACLOCAL@
  AMTAR = @AMTAR@
  AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
@@@ -370,7 -415,6 +416,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -459,6 -503,7 +505,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
@@@ -548,8 -593,14 +595,14 @@@ libclamav_internal_utils_nothreads_la_S
  
  libclamav_internal_utils_nothreads_la_LDFLAGS = -static
  libclamav_internal_utils_nothreads_la_CFLAGS = -DCL_NOTHREADS
- libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@ @LIBM@
- libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) libclamav_internal_utils.la
+ @ENABLE_LLVM_FALSE at LLVMLIBADD = libclamav_nocxx.la
+ @ENABLE_LLVM_TRUE at LLVMLIBADD = c++/libclamavcxx.la -lstdc++ -lm
+ @ENABLE_LLVM_FALSE at LLVMDEP = libclamav_nocxx.la
+ @ENABLE_LLVM_TRUE at LLVMDEP = c++/libclamavcxx.la
+ @ENABLE_LLVM_TRUE at SUBDIRS = c++
+ libclamav_nocxx_la_SOURCES = bytecode_nojit.c
 -libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@
++libclamav_la_LIBADD = @LIBLTDL@ $(IFACELIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @LIBCLAMAV_LIBS@ @THREAD_LIBS@ @LIBM@
+ libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) $(LLVMDEP) libclamav_internal_utils.la
  libclamav_la_CFLAGS = -DSEARCH_LIBDIR=\"$(libdir)\"
  libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ \
  	-no-undefined $(am__append_6)
@@@ -561,29 -612,28 +614,29 @@@ libclamav_la_SOURCES = clamav.h matcher
  	rtf.c rtf.h blob.c blob.h mbox.c mbox.h message.c message.h \
  	table.c table.h text.c text.h ole2_extract.c ole2_extract.h \
  	vba_extract.c vba_extract.h cltypes.h msexpand.c msexpand.h \
 -	pe.c pe.h disasm.c disasm.h disasmpriv.h upx.c upx.h \
 -	htmlnorm.c htmlnorm.h chmunpack.c chmunpack.h rebuildpe.c \
 -	rebuildpe.h petite.c petite.h wwunpack.c wwunpack.h unsp.c \
 -	unsp.h aspack.c aspack.h packlibs.c packlibs.h fsg.c fsg.h \
 -	mew.c mew.h upack.c upack.h line.c line.h untar.c untar.h \
 -	unzip.c unzip.h inflate64.c inflate64.h inffixed64.h \
 -	inflate64_priv.h special.c special.h binhex.c binhex.h \
 -	is_tar.c is_tar.h tnef.c tnef.h autoit.c autoit.h unarj.c \
 -	unarj.h nsis/bzlib.c nsis/bzlib_private.h nsis/nsis_bzlib.h \
 -	nsis/nulsft.c nsis/nulsft.h nsis/infblock.c nsis/nsis_zconf.h \
 -	nsis/nsis_zlib.h nsis/nsis_zutil.h pdf.c pdf.h spin.c spin.h \
 -	yc.c yc.h elf.c elf.h execs.h sis.c sis.h uuencode.c \
 -	uuencode.h phishcheck.c phishcheck.h phish_domaincheck_db.c \
 -	phish_domaincheck_db.h phish_whitelist.c phish_whitelist.h \
 -	iana_cctld.h iana_tld.h regex_list.c regex_list.h \
 -	regex_suffix.c regex_suffix.h mspack.c mspack.h cab.c cab.h \
 -	entconv.c entconv.h entitylist.h encoding_aliases.h hashtab.c \
 -	hashtab.h dconf.c dconf.h 7z/LzmaDec.c 7z/LzmaDec.h 7z/Types.h \
 -	lzma_iface.c lzma_iface.h 7z.c 7z.h 7z/7zFile.c 7z/7zFile.h \
 -	7z/7zStream.c 7z/CpuArch.h 7z/7zCrc.c 7z/7zCrc.h 7z/7zBuf.c \
 -	7z/7zBuf.h 7z/Bcj2.c 7z/Bcj2.h 7z/Bra.c 7z/Bra.h 7z/Bra86.c \
 -	7z/BraIA64.c 7z/Archive/7z/7zIn.c 7z/Archive/7z/7zIn.h \
 +	pe.c pe.h pe_icons.c pe_icons.h disasm.c disasm.h disasmpriv.h \
 +	upx.c upx.h htmlnorm.c htmlnorm.h chmunpack.c chmunpack.h \
 +	rebuildpe.c rebuildpe.h petite.c petite.h wwunpack.c \
 +	wwunpack.h unsp.c unsp.h aspack.c aspack.h packlibs.c \
 +	packlibs.h fsg.c fsg.h mew.c mew.h upack.c upack.h line.c \
 +	line.h untar.c untar.h unzip.c unzip.h inflate64.c inflate64.h \
 +	inffixed64.h inflate64_priv.h special.c special.h binhex.c \
 +	binhex.h is_tar.c is_tar.h tnef.c tnef.h autoit.c autoit.h \
 +	unarj.c unarj.h nsis/bzlib.c nsis/bzlib_private.h \
 +	nsis/nsis_bzlib.h nsis/nulsft.c nsis/nulsft.h nsis/infblock.c \
 +	nsis/nsis_zconf.h nsis/nsis_zlib.h nsis/nsis_zutil.h pdf.c \
 +	pdf.h spin.c spin.h yc.c yc.h elf.c elf.h execs.h sis.c sis.h \
 +	uuencode.c uuencode.h phishcheck.c phishcheck.h \
 +	phish_domaincheck_db.c phish_domaincheck_db.h \
 +	phish_whitelist.c phish_whitelist.h iana_cctld.h iana_tld.h \
 +	regex_list.c regex_list.h regex_suffix.c regex_suffix.h \
 +	mspack.c mspack.h cab.c cab.h entconv.c entconv.h entitylist.h \
 +	encoding_aliases.h hashtab.c hashtab.h dconf.c dconf.h \
 +	7z/LzmaDec.c 7z/LzmaDec.h 7z/Types.h lzma_iface.c lzma_iface.h \
 +	7z.c 7z.h 7z/7zFile.c 7z/7zFile.h 7z/7zStream.c 7z/CpuArch.h \
 +	7z/7zCrc.c 7z/7zCrc.h 7z/7zBuf.c 7z/7zBuf.h 7z/Bcj2.c \
 +	7z/Bcj2.h 7z/Bra.c 7z/Bra.h 7z/Bra86.c 7z/BraIA64.c \
 +	7z/Archive/7z/7zIn.c 7z/Archive/7z/7zIn.h \
  	7z/Archive/7z/7zDecode.c 7z/Archive/7z/7zDecode.h \
  	7z/Archive/7z/7zItem.c 7z/Archive/7z/7zItem.h \
  	7z/Archive/7z/7zHeader.c 7z/Archive/7z/7zHeader.h \
@@@ -593,16 -643,17 +646,17 @@@
  	uniq.h version.c version.h mpool.c mpool.h fmap.c fmap.h \
  	default.h sha256.c sha256.h bignum.h bytecode.c bytecode.h \
  	bytecode_vm.c bytecode_priv.h clambc.h cpio.c cpio.h macho.c \
- 	macho.h ishield.c ishield.h type_desc.h bytecode_api.c \
- 	bytecode_api_decl.c bytecode_api.h $(am__append_7)
- noinst_LTLIBRARIES = libclamav_internal_utils.la libclamav_internal_utils_nothreads.la
+ 	macho.h ishield.c ishield.h type_desc.h bcfeatures.h \
+ 	bytecode_api.c bytecode_api_decl.c bytecode_api.h \
+ 	bytecode_api_impl.h bytecode_hooks.h $(am__append_7)
+ noinst_LTLIBRARIES = libclamav_internal_utils.la libclamav_internal_utils_nothreads.la libclamav_nocxx.la
  COMMON_CLEANFILES = version.h version.h.tmp *.gcda *.gcno
  @MAINTAINER_MODE_TRUE at BUILT_SOURCES = jsparse/generated/operators.h jsparse/generated/keywords.h jsparse-keywords.gperf
  @MAINTAINER_MODE_TRUE at GPERF_FLAGS = -E -t -L ANSI-C -C -F ', TOK_ERROR' -c
  @MAINTAINER_MODE_FALSE at CLEANFILES = $(COMMON_CLEANFILES)
  @MAINTAINER_MODE_TRUE at CLEANFILES = $(COMMON_CLEANFILES) @srcdir@/jsparse/generated/operators.h @srcdir@/jsparse/generated/keywords.h
  all: $(BUILT_SOURCES)
- 	$(MAKE) $(AM_MAKEFLAGS) all-am
+ 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
  
  .SUFFIXES:
  .SUFFIXES: .c .lo .o .obj
@@@ -682,6 -733,8 +736,8 @@@ libclamav_internal_utils.la: $(libclama
  	$(AM_V_CCLD)$(libclamav_internal_utils_la_LINK)  $(libclamav_internal_utils_la_OBJECTS) $(libclamav_internal_utils_la_LIBADD) $(LIBS)
  libclamav_internal_utils_nothreads.la: $(libclamav_internal_utils_nothreads_la_OBJECTS) $(libclamav_internal_utils_nothreads_la_DEPENDENCIES) 
  	$(AM_V_CCLD)$(libclamav_internal_utils_nothreads_la_LINK)  $(libclamav_internal_utils_nothreads_la_OBJECTS) $(libclamav_internal_utils_nothreads_la_LIBADD) $(LIBS)
+ libclamav_nocxx.la: $(libclamav_nocxx_la_OBJECTS) $(libclamav_nocxx_la_DEPENDENCIES) 
+ 	$(AM_V_CCLD)$(LINK)  $(libclamav_nocxx_la_OBJECTS) $(libclamav_nocxx_la_LIBADD) $(LIBS)
  libclamunrar.la: $(libclamunrar_la_OBJECTS) $(libclamunrar_la_DEPENDENCIES) 
  	$(AM_V_CCLD)$(libclamunrar_la_LINK) $(am_libclamunrar_la_rpath) $(libclamunrar_la_OBJECTS) $(libclamunrar_la_LIBADD) $(LIBS)
  libclamunrar_iface.la: $(libclamunrar_iface_la_OBJECTS) $(libclamunrar_iface_la_DEPENDENCIES) 
@@@ -693,6 -746,7 +749,7 @@@ mostlyclean-compile
  distclean-compile:
  	-rm -f *.tab.c
  
+ @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bytecode_nojit.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_internal_utils_la-md5.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_internal_utils_la-others_common.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_internal_utils_la-qsort.Plo at am__quote@
@@@ -775,7 -829,6 +832,7 @@@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_la-packlibs.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_la-pdf.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_la-pe.Plo at am__quote@
 + at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_la-pe_icons.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_la-petite.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_la-phish_domaincheck_db.Plo at am__quote@
  @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamav_la-phish_whitelist.Plo at am__quote@
@@@ -1001,14 -1054,6 +1058,14 @@@ libclamav_la-pe.lo: pe.
  @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
  @am__fastdepCC_FALSE@	$(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-pe.lo `test -f 'pe.c' || echo '$(srcdir)/'`pe.c
  
 +libclamav_la-pe_icons.lo: pe_icons.c
 + at 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-pe_icons.lo -MD -MP -MF $(DEPDIR)/libclamav_la-pe_icons.Tpo -c -o libclamav_la-pe_icons.lo `test -f 'pe_icons.c' || echo '$(srcdir)/'`pe_icons.c
 + at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-pe_icons.Tpo $(DEPDIR)/libclamav_la-pe_icons.Plo
 + at am__fastdepCC_FALSE@	$(AM_V_CC) @AM_BACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='pe_icons.c' object='libclamav_la-pe_icons.lo' libtool=yes @AMDEPBACKSLASH@
 + at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 + at am__fastdepCC_FALSE@	$(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-pe_icons.lo `test -f 'pe_icons.c' || echo '$(srcdir)/'`pe_icons.c
 +
  libclamav_la-disasm.lo: disasm.c
  @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-disasm.lo -MD -MP -MF $(DEPDIR)/libclamav_la-disasm.Tpo -c -o libclamav_la-disasm.lo `test -f 'disasm.c' || echo '$(srcdir)/'`disasm.c
  @am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-disasm.Tpo $(DEPDIR)/libclamav_la-disasm.Plo
@@@ -1851,6 -1896,76 +1908,76 @@@ uninstall-includeHEADERS
  	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
  	cd "$(DESTDIR)$(includedir)" && rm -f $$files
  
+ # This directory's subdirectories are mostly independent; you can cd
+ # into them and run `make' without going through this Makefile.
+ # To change the values of `make' variables: instead of editing Makefiles,
+ # (1) if the variable is set in `config.status', edit `config.status'
+ #     (which will cause the Makefiles to be regenerated when you run `make');
+ # (2) otherwise, pass the desired values on the `make' command line.
+ $(RECURSIVE_TARGETS):
+ 	@failcom='exit 1'; \
+ 	for f in x $$MAKEFLAGS; do \
+ 	  case $$f in \
+ 	    *=* | --[!k]*);; \
+ 	    *k*) failcom='fail=yes';; \
+ 	  esac; \
+ 	done; \
+ 	dot_seen=no; \
+ 	target=`echo $@ | sed s/-recursive//`; \
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+ 	  echo "Making $$target in $$subdir"; \
+ 	  if test "$$subdir" = "."; then \
+ 	    dot_seen=yes; \
+ 	    local_target="$$target-am"; \
+ 	  else \
+ 	    local_target="$$target"; \
+ 	  fi; \
+ 	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ 	  || eval $$failcom; \
+ 	done; \
+ 	if test "$$dot_seen" = "no"; then \
+ 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ 	fi; test -z "$$fail"
+ 
+ $(RECURSIVE_CLEAN_TARGETS):
+ 	@failcom='exit 1'; \
+ 	for f in x $$MAKEFLAGS; do \
+ 	  case $$f in \
+ 	    *=* | --[!k]*);; \
+ 	    *k*) failcom='fail=yes';; \
+ 	  esac; \
+ 	done; \
+ 	dot_seen=no; \
+ 	case "$@" in \
+ 	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ 	  *) list='$(SUBDIRS)' ;; \
+ 	esac; \
+ 	rev=''; for subdir in $$list; do \
+ 	  if test "$$subdir" = "."; then :; else \
+ 	    rev="$$subdir $$rev"; \
+ 	  fi; \
+ 	done; \
+ 	rev="$$rev ."; \
+ 	target=`echo $@ | sed s/-recursive//`; \
+ 	for subdir in $$rev; do \
+ 	  echo "Making $$target in $$subdir"; \
+ 	  if test "$$subdir" = "."; then \
+ 	    local_target="$$target-am"; \
+ 	  else \
+ 	    local_target="$$target"; \
+ 	  fi; \
+ 	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ 	  || eval $$failcom; \
+ 	done && test -z "$$fail"
+ tags-recursive:
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+ 	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ 	done
+ ctags-recursive:
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+ 	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ 	done
+ 
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
  	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
  	unique=`for i in $$list; do \
@@@ -1861,10 -1976,23 +1988,23 @@@
  	mkid -fID $$unique
  tags: TAGS
  
- TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
  		$(TAGS_FILES) $(LISP)
  	set x; \
  	here=`pwd`; \
+ 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ 	  include_option=--etags-include; \
+ 	  empty_fix=.; \
+ 	else \
+ 	  include_option=--include; \
+ 	  empty_fix=; \
+ 	fi; \
+ 	list='$(SUBDIRS)'; for subdir in $$list; do \
+ 	  if test "$$subdir" = .; then :; else \
+ 	    test ! -f $$subdir/TAGS || \
+ 	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ 	  fi; \
+ 	done; \
  	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
  	unique=`for i in $$list; do \
  	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
@@@ -1883,7 -2011,7 +2023,7 @@@
  	  fi; \
  	fi
  ctags: CTAGS
- CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+ CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
  		$(TAGS_FILES) $(LISP)
  	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
  	unique=`for i in $$list; do \
@@@ -1933,24 -2061,53 +2073,53 @@@ distdir: $(DISTFILES
  	    || exit 1; \
  	  fi; \
  	done
+ 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ 	  if test "$$subdir" = .; then :; else \
+ 	    test -d "$(distdir)/$$subdir" \
+ 	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+ 	    || exit 1; \
+ 	  fi; \
+ 	done
+ 	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ 	  if test "$$subdir" = .; then :; else \
+ 	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ 	    $(am__relativize); \
+ 	    new_distdir=$$reldir; \
+ 	    dir1=$$subdir; dir2="$(top_distdir)"; \
+ 	    $(am__relativize); \
+ 	    new_top_distdir=$$reldir; \
+ 	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ 	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ 	    ($(am__cd) $$subdir && \
+ 	      $(MAKE) $(AM_MAKEFLAGS) \
+ 	        top_distdir="$$new_top_distdir" \
+ 	        distdir="$$new_distdir" \
+ 		am__remove_distdir=: \
+ 		am__skip_length_check=: \
+ 		am__skip_mode_fix=: \
+ 	        distdir) \
+ 	      || exit 1; \
+ 	  fi; \
+ 	done
  check-am: all-am
  check: $(BUILT_SOURCES)
- 	$(MAKE) $(AM_MAKEFLAGS) check-am
+ 	$(MAKE) $(AM_MAKEFLAGS) check-recursive
  all-am: Makefile $(LTLIBRARIES) $(HEADERS)
- installdirs:
+ installdirs: installdirs-recursive
+ installdirs-am:
  	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
  	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
  	done
  install: $(BUILT_SOURCES)
- 	$(MAKE) $(AM_MAKEFLAGS) install-am
- install-exec: install-exec-am
- install-data: install-data-am
- uninstall: uninstall-am
+ 	$(MAKE) $(AM_MAKEFLAGS) install-recursive
+ install-exec: install-exec-recursive
+ install-data: install-data-recursive
+ uninstall: uninstall-recursive
  
  install-am: all-am
  	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
  
- installcheck: installcheck-am
+ installcheck: installcheck-recursive
  install-strip:
  	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
  	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
@@@ -1969,94 -2126,97 +2138,97 @@@ maintainer-clean-generic
  	@echo "This command is intended for maintainers to use"
  	@echo "it deletes files that may require special tools to rebuild."
  	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
- clean: clean-am
+ clean: clean-recursive
  
  clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
  	clean-noinstLTLIBRARIES mostlyclean-am
  
- distclean: distclean-am
+ distclean: distclean-recursive
  	-rm -rf ./$(DEPDIR)
  	-rm -f Makefile
  distclean-am: clean-am distclean-compile distclean-generic \
  	distclean-tags
  
- dvi: dvi-am
+ dvi: dvi-recursive
  
  dvi-am:
  
- html: html-am
+ html: html-recursive
  
  html-am:
  
- info: info-am
+ info: info-recursive
  
  info-am:
  
  install-data-am: install-includeHEADERS
  
- install-dvi: install-dvi-am
+ install-dvi: install-dvi-recursive
  
  install-dvi-am:
  
  install-exec-am: install-libLTLIBRARIES
  
- install-html: install-html-am
+ install-html: install-html-recursive
  
  install-html-am:
  
- install-info: install-info-am
+ install-info: install-info-recursive
  
  install-info-am:
  
  install-man:
  
- install-pdf: install-pdf-am
+ install-pdf: install-pdf-recursive
  
  install-pdf-am:
  
- install-ps: install-ps-am
+ install-ps: install-ps-recursive
  
  install-ps-am:
  
  installcheck-am:
  
- maintainer-clean: maintainer-clean-am
+ maintainer-clean: maintainer-clean-recursive
  	-rm -rf ./$(DEPDIR)
  	-rm -f Makefile
  maintainer-clean-am: distclean-am maintainer-clean-generic
  
- mostlyclean: mostlyclean-am
+ mostlyclean: mostlyclean-recursive
  
  mostlyclean-am: mostlyclean-compile mostlyclean-generic \
  	mostlyclean-libtool
  
- pdf: pdf-am
+ pdf: pdf-recursive
  
  pdf-am:
  
- ps: ps-am
+ ps: ps-recursive
  
  ps-am:
  
  uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
  
- .MAKE: all check install install-am install-strip
+ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ 	ctags-recursive install install-am install-strip \
+ 	tags-recursive
  
- .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ 	all all-am check check-am clean clean-generic \
  	clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
- 	ctags distclean distclean-compile distclean-generic \
- 	distclean-libtool distclean-tags distdir dvi dvi-am html \
- 	html-am info info-am install install-am install-data \
- 	install-data-am install-dvi install-dvi-am install-exec \
- 	install-exec-am install-html install-html-am \
+ 	ctags ctags-recursive distclean distclean-compile \
+ 	distclean-generic distclean-libtool distclean-tags distdir dvi \
+ 	dvi-am html html-am info info-am install install-am \
+ 	install-data install-data-am install-dvi install-dvi-am \
+ 	install-exec install-exec-am install-html install-html-am \
  	install-includeHEADERS install-info install-info-am \
  	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
  	install-ps install-ps-am install-strip installcheck \
- 	installcheck-am installdirs maintainer-clean \
+ 	installcheck-am installdirs installdirs-am maintainer-clean \
  	maintainer-clean-generic mostlyclean mostlyclean-compile \
  	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- 	tags uninstall uninstall-am uninstall-includeHEADERS \
- 	uninstall-libLTLIBRARIES
+ 	tags tags-recursive uninstall uninstall-am \
+ 	uninstall-includeHEADERS uninstall-libLTLIBRARIES
  
  
  .PHONY: version.h.tmp
diff --combined libclamav/libclamav.map
index 4aa27d7,fca7f42..48cfc49
--- a/libclamav/libclamav.map
+++ b/libclamav/libclamav.map
@@@ -123,7 -123,6 +123,7 @@@ CLAMAV_PRIVATE 
      cli_bm_init;
      cli_bm_scanbuff;
      cli_bm_free;
 +    cli_initroots;
      html_screnc_decode;
      mpool_create;
      mpool_destroy;
@@@ -147,6 -146,7 +147,7 @@@
      messageDestroy;
      base64Flush;
      have_rar;
+     have_clamjit;
      cli_bytecode_load;
      cli_bytecode_prepare;
      cli_bytecode_run;
@@@ -156,11 -156,17 +157,17 @@@
      cli_bytecode_context_setfuncid;
      cli_bytecode_context_setparam_int;
      cli_bytecode_context_setparam_ptr;
+     cli_bytecode_context_setfile;
      cli_bytecode_context_getresult_int;
      cli_bytecode_context_clear;
+     cli_bytecode_init;
+     cli_bytecode_done;
+     cli_bytecode_debug;
      cli_hex2ui;
      fmap;
      funmap;
+     cli_bytecode_context_set_trace;
+     cli_bytecode_debug_printsrc;
    local:
      *;
  };
diff --combined libclamav/others.h
index dc2f907,6b1340b..22d1063
--- a/libclamav/others.h
+++ b/libclamav/others.h
@@@ -41,6 -41,8 +41,8 @@@
  #include "fmap.h"
  #include "libclamunrar_iface/unrar_iface.h"
  #include "regex/regex.h"
+ #include "bytecode.h"
+ #include "bytecode_api.h"
  
  /*
   * CL_FLEVEL is the signature f-level specific to the current code and
@@@ -113,40 -115,6 +115,40 @@@ typedef struct 
      fmap_t **fmap;
  } cli_ctx;
  
 +struct icomtr {
 +    uint32_t group[2];
 +    unsigned int color_avg[3];
 +    unsigned int color_x[3];
 +    unsigned int color_y[3];
 +    unsigned int gray_avg[3];
 +    unsigned int gray_x[3];
 +    unsigned int gray_y[3];
 +    unsigned int bright_avg[3];
 +    unsigned int bright_x[3];
 +    unsigned int bright_y[3];
 +    unsigned int dark_avg[3];
 +    unsigned int dark_x[3];
 +    unsigned int dark_y[3];
 +    unsigned int edge_avg[3];
 +    unsigned int edge_x[3];
 +    unsigned int edge_y[3];
 +    unsigned int noedge_avg[3];
 +    unsigned int noedge_x[3];
 +    unsigned int noedge_y[3];
 +    unsigned int rsum;
 +    unsigned int gsum;
 +    unsigned int bsum;
 +    unsigned int ccount;
 +    char *name;
 +};
 +
 +struct icon_matcher {
 +    char **group_names[2];
 +    unsigned int group_counts[2];
 +    struct icomtr *icons[3];
 +    unsigned int icon_counts[3];
 +};
 +
  struct cl_engine {
      uint32_t refcount; /* reference counter */
      uint32_t sdb;
@@@ -211,11 -179,13 +213,16 @@@
      /* PUA categories (to be included or excluded) */
      char *pua_cats;
  
 +    /* Icon reference storage */
 +    struct icon_matcher *iconcheck;
 +
      /* Used for memory pools */
      mpool_t *mempool;
+ 
+     /* Used for bytecode */
+     struct cli_all_bc bcs;
+     unsigned *hooks[_BC_LAST_HOOK - _BC_START_HOOKS];
+     unsigned hooks_cnt[_BC_LAST_HOOK - _BC_START_HOOKS];
  };
  
  struct cl_settings {
@@@ -270,6 -240,20 +277,20 @@@ extern int have_rar
  		     (((v) & 0xff00000000000000ULL) >> 56))
  
  
+ union unaligned_64 {
+ 	uint64_t una_u64;
+ 	int64_t una_s64;
+ } __attribute__((packed));
+ 
+ union unaligned_32 {
+ 	uint32_t una_u32;
+ 	int32_t una_s32;
+ } __attribute__((packed));
+ 
+ union unaligned_16 {
+ 	uint16_t una_u16;
+ 	int16_t una_s16;
+ } __attribute__((packed));
  #if WORDS_BIGENDIAN == 0
  
  #ifndef HAVE_ATTRIB_PACKED 
@@@ -282,14 -266,6 +303,6 @@@
  #pragma pack 1
  #endif
  
- union unaligned_32 {
- 	uint32_t una_u32;
- 	int32_t una_s32;
- } __attribute__((packed));
- 
- union unaligned_16 {
- 	int16_t una_s16;
- } __attribute__((packed));
  
  #ifdef HAVE_PRAGMA_PACK
  #pragma pack()
@@@ -377,8 -353,10 +390,10 @@@ void cli_errmsg(const char *str, ...)
   * such as debug paths, and error paths */
  #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  #define UNLIKELY(cond) __builtin_expect(!!(cond), 0)
+ #define LIKELY(cond) __builtin_expect(!!(cond), 1)
  #else
  #define UNLIKELY(cond) (cond)
+ #define LIKELY(cond) (cond)
  #endif
  
  #ifdef __GNUC__
diff --combined libclamav/pe.c
index b6df349,930242d..b5d137f
--- a/libclamav/pe.c
+++ b/libclamav/pe.c
@@@ -58,7 -58,6 +58,7 @@@
  #include "disasm.h"
  #include "special.h"
  #include "ishield.h"
 +#include "pe_icons.h"
  
  #define DCONF ctx->dconf->pe
  
@@@ -193,7 -192,7 +193,7 @@@ static void cli_multifree(void *f, ...
      va_end(ap);
  }
  
 -static uint32_t cli_rawaddr(uint32_t rva, struct cli_exe_section *shp, uint16_t nos, unsigned int *err,	size_t fsize, uint32_t hdr_size)
 +uint32_t cli_rawaddr(uint32_t rva, struct cli_exe_section *shp, uint16_t nos, unsigned int *err, size_t fsize, uint32_t hdr_size)
  {
      int i, found = 0;
      uint32_t ret;
@@@ -278,89 -277,6 +278,89 @@@ static int cli_ddump(int desc, int offs
  }
  */
  
 +
 +/* 
 +   void findres(uint32_t by_type, uint32_t by_name, uint32_t res_rva, cli_ctx *ctx, struct cli_exe_section *exe_sections, uint16_t nsections, uint32_t hdr_size, int (*cb)(void *, uint32_t, uint32_t, uint32_t, uint32_t), void *opaque)
 +   callback based res lookup
 +
 +   by_type: lookup type
 +   by_name: lookup name or (unsigned)-1 to look for any name
 +   res_rva: base resource rva (i.e. dirs[2].VirtualAddress)
 +   ctx, exe_sections, nsections, hdr_size: same as in scanpe
 +   cb: the callback function executed on each successful match
 +   opaque: an opaque pointer passed to the callback
 +
 +   the callback proto is
 +   int pe_res_cballback (void *opaque, uint32_t type, uint32_t name, uint32_t lang, uint32_t rva);
 +   the callback shall return 0 to continue the lookup or 1 to abort
 +*/
 +void findres(uint32_t by_type, uint32_t by_name, uint32_t res_rva, cli_ctx *ctx, struct cli_exe_section *exe_sections, uint16_t nsections, uint32_t hdr_size, int (*cb)(void *, uint32_t, uint32_t, uint32_t, uint32_t), void *opaque) {
 +    unsigned int err = 0;
 +    uint32_t type, type_offs, name, name_offs, lang, lang_offs;
 +    uint8_t *resdir, *type_entry, *name_entry, *lang_entry ;
 +    uint16_t type_cnt, name_cnt, lang_cnt;
 +    fmap_t *map = *ctx->fmap;
 +
 +    if (!(resdir = fmap_need_off_once(map, cli_rawaddr(res_rva, exe_sections, nsections, &err, map->len, hdr_size), 16)) || err)
 +	return;
 +
 +    type_cnt = (uint16_t)cli_readint16(resdir+12);
 +    type_entry = resdir+16;
 +    if(!(by_type>>31)) {
 +	type_entry += type_cnt * 8;
 +	type_cnt = (uint16_t)cli_readint16(resdir+14);
 +    }
 +
 +    while(type_cnt--) {
 +	if(!fmap_need_ptr_once(map, type_entry, 8))
 +	    return;
 +	type = cli_readint32(type_entry);
 +	type_offs = cli_readint32(type_entry+4);
 +	if(type == by_type && (type_offs>>31)) {
 +	    type_offs &= 0x7fffffff;
 +	    if (!(resdir = fmap_need_off_once(map, cli_rawaddr(res_rva + type_offs, exe_sections, nsections, &err, map->len, hdr_size), 16)) || err)
 +		return;
 +
 +	    name_cnt = (uint16_t)cli_readint16(resdir+12);
 +	    name_entry = resdir+16;
 +	    if(by_name == 0xffffffff)
 +		name_cnt += (uint16_t)cli_readint16(resdir+14);
 +	    else if(!(by_name>>31)) {
 +		name_entry += name_cnt * 8;
 +		name_cnt = (uint16_t)cli_readint16(resdir+14);
 +	    }
 +	    while(name_cnt--) {
 +		if(!fmap_need_ptr_once(map, name_entry, 8))
 +		    return;
 +		name = cli_readint32(name_entry);
 +		name_offs = cli_readint32(name_entry+4);
 +		if((by_name == 0xffffffff || name == by_name) && (name_offs>>31)) {
 +		    name_offs &= 0x7fffffff;
 +		    if (!(resdir = fmap_need_off_once(map, cli_rawaddr(res_rva + name_offs, exe_sections, nsections, &err, map->len, hdr_size), 16)) || err)
 +			return;
 +		    
 +		    lang_cnt = (uint16_t)cli_readint16(resdir+12) + (uint16_t)cli_readint16(resdir+14);
 +		    lang_entry = resdir+16;
 +		    while(lang_cnt--) {
 +			if(!fmap_need_ptr_once(map, lang_entry, 8))
 +			    return;
 +			lang = cli_readint32(lang_entry);
 +			lang_offs = cli_readint32(lang_entry+4);
 +			if(!(lang_offs >>31)) {
 +			    if(cb(opaque, type, name, lang, res_rva + lang_offs))
 +				return;
 +			}
 +			lang_entry += 8;
 +		    }
 +		}
 +		name_entry += 8;
 +	    }
 +	    return; /* FIXME: unless we want to find ALL types */
 +	}
 +	type_entry += 8;
 +    }
 +}
 +
  static unsigned int cli_md5sect(fmap_t *map, struct cli_exe_section *s, unsigned char *digest) {
      void *hashme;
      cli_md5_ctx md5;
@@@ -471,7 -387,7 +471,7 @@@ static void cli_parseres_special(uint32
      fmap_unneed_ptr(map, oentry, entries*8);
  }
  
 -int cli_scanpe(cli_ctx *ctx)
 +int cli_scanpe(cli_ctx *ctx, unsigned int *icongrps1, unsigned int *icongrps2)
  {
  	uint16_t e_magic; /* DOS signature ("MZ") */
  	uint16_t nsections;
@@@ -494,19 -410,20 +494,20 @@@
  	char *src = NULL, *dest = NULL;
  	int ndesc, ret = CL_CLEAN, upack = 0, native=0;
  	size_t fsize;
- 	uint32_t valign, falign, hdr_size, j;
+ 	uint32_t valign, falign, hdr_size, j, offset;
  	struct cli_exe_section *exe_sections;
  	struct cli_matcher *md5_sect;
  	char timestr[32];
  	struct pe_image_data_dir *dirs;
+ 	struct cli_bc_ctx *bc_ctx;
  	fmap_t *map;
+ 	struct cli_pe_hook_data pedata;
  
  
      if(!ctx) {
  	cli_errmsg("cli_scanpe: ctx == NULL\n");
  	return CL_ENULLARG;
      }
- 
      map = *ctx->fmap;
      if(fmap_readn(map, &e_magic, 0, sizeof(e_magic)) != sizeof(e_magic)) {
  	cli_dbgmsg("Can't read DOS signature\n");
@@@ -1042,15 -959,6 +1043,15 @@@
  
      cli_dbgmsg("EntryPoint offset: 0x%x (%d)\n", ep, ep);
  
 +    if(icongrps1 || icongrps2){
 +	if(!dll && dirs[2].Size && scanicon(icongrps1, icongrps2, EC32(dirs[2].VirtualAddress), ctx, exe_sections, nsections, hdr_size) == CL_VIRUS) {
 +	    free(exe_sections);
 +	    return CL_VIRUS;
 +	}
 +	free(exe_sections);
 +	return CL_CLEAN;
 +    }
 +
      if(pe_plus) { /* Do not continue for PE32+ files */
  	free(exe_sections);
  	return CL_CLEAN;
@@@ -2041,6 -1949,7 +2042,7 @@@
  	    return CL_EREAD;
  	}
  
+ 	cli_dbgmsg("%d,%d,%d,%d\n", nsections-1, e_lfanew, ecx, offset);
  	CLI_UNPTEMP("yC",(spinned,exe_sections,0));
  	CLI_UNPRESULTS("yC",(yc_decrypt(spinned, fsize, exe_sections, nsections-1, e_lfanew, ndesc, ecx, offset)),0,(spinned,0));
  	}
@@@ -2203,6 -2112,40 +2205,40 @@@
  
      /* to be continued ... */
  
+     /* Bytecode */
+     bc_ctx = cli_bytecode_context_alloc();
+     if (!bc_ctx) {
+ 	cli_errmsg("cli_scanpe: can't allocate memory for bc_ctx\n");
+ 	return CL_EMEM;
+     }
+     pedata.exe_info.section = exe_sections;
+     pedata.exe_info.nsections = nsections;
+     pedata.exe_info.ep = ep;
+     pedata.exe_info.offset = offset;
+     pedata.file_hdr = &file_hdr;
+     pedata.opt32 = &pe_opt.opt32;
+     pedata.opt64 = &pe_opt.opt64;
+     pedata.dirs = dirs;
+     pedata.e_lfanew = e_lfanew;
+     pedata.overlays = overlays;
+     pedata.overlays_sz = fsize - overlays;
+     cli_bytecode_context_setpe(bc_ctx, &pedata);
+     cli_bytecode_context_setctx(bc_ctx, ctx);
+     ret = cli_bytecode_runhook(ctx->engine, bc_ctx, BC_PE_UNPACKER, map, ctx->virname);
+     switch (ret) {
+ 	case CL_VIRUS:
+ 	    return CL_VIRUS;
+ 	case CL_SUCCESS:
+ 	    ndesc = cli_bytecode_context_getresult_file(bc_ctx, &tempfile);
+ 	    cli_bytecode_context_destroy(bc_ctx);
+ 	    if (ndesc != -1) {
+ 		CLI_UNPRESULTS("bytecode PE hook", 1, 1, (0));
+ 	    }
+ 	    break;
+ 	default:
+ 	    cli_bytecode_context_destroy(bc_ctx);
+     }
+ 
      free(exe_sections);
      return CL_CLEAN;
  }
diff --combined libclamav/pe.h
index bfe416d,2eb2aa4..406b9b7
--- a/libclamav/pe.h
+++ b/libclamav/pe.h
@@@ -26,46 -26,50 +26,50 @@@
  #include "others.h"
  #include "cltypes.h"
  #include "fmap.h"
- 
+ #include "bcfeatures.h"
+ /** @file */
+ /** Header for this PE file */
  struct pe_image_file_hdr {
-     uint32_t Magic;
-     uint16_t Machine;
-     uint16_t NumberOfSections;
-     uint32_t TimeDateStamp;		    /* unreliable */
-     uint32_t PointerToSymbolTable;	    /* debug */
-     uint32_t NumberOfSymbols;		    /* debug */
-     uint16_t SizeOfOptionalHeader;	    /* == 224 */
+     uint32_t Magic;  /**< PE magic header: PE\\0\\0 */
+     uint16_t Machine;/**< CPU this executable runs on, see libclamav/pe.c for possible values */
+     uint16_t NumberOfSections;/**< Number of sections in this executable */
+     uint32_t TimeDateStamp;   /**< Unreliable */
+     uint32_t PointerToSymbolTable;	    /**< debug */
+     uint32_t NumberOfSymbols;		    /**< debug */
+     uint16_t SizeOfOptionalHeader;	    /**< == 224 */
      uint16_t Characteristics;
  };
  
+ /** PE data directory header */
  struct pe_image_data_dir {
      uint32_t VirtualAddress;
      uint32_t Size;
  };
  
+ /** 32-bit PE optional header */
  struct pe_image_optional_hdr32 {
      uint16_t Magic;
-     uint8_t  MajorLinkerVersion;		    /* unreliable */
-     uint8_t  MinorLinkerVersion;		    /* unreliable */
-     uint32_t SizeOfCode;			    /* unreliable */
-     uint32_t SizeOfInitializedData;		    /* unreliable */
-     uint32_t SizeOfUninitializedData;		    /* unreliable */
+     uint8_t  MajorLinkerVersion;		    /**< unreliable */
+     uint8_t  MinorLinkerVersion;		    /**< unreliable */
+     uint32_t SizeOfCode;			    /**< unreliable */
+     uint32_t SizeOfInitializedData;		    /**< unreliable */
+     uint32_t SizeOfUninitializedData;		    /**< unreliable */
      uint32_t AddressOfEntryPoint;
      uint32_t BaseOfCode;
      uint32_t BaseOfData;
-     uint32_t ImageBase;				    /* multiple of 64 KB */
-     uint32_t SectionAlignment;			    /* usually 32 or 4096 */
-     uint32_t FileAlignment;			    /* usually 32 or 512 */
-     uint16_t MajorOperatingSystemVersion;	    /* not used */
-     uint16_t MinorOperatingSystemVersion;	    /* not used */
-     uint16_t MajorImageVersion;			    /* unreliable */
-     uint16_t MinorImageVersion;			    /* unreliable */
+     uint32_t ImageBase;				    /**< multiple of 64 KB */
+     uint32_t SectionAlignment;			    /**< usually 32 or 4096 */
+     uint32_t FileAlignment;			    /**< usually 32 or 512 */
+     uint16_t MajorOperatingSystemVersion;	    /**< not used */
+     uint16_t MinorOperatingSystemVersion;	    /**< not used */
+     uint16_t MajorImageVersion;			    /** unreliable */
+     uint16_t MinorImageVersion;			    /** unreliable */
      uint16_t MajorSubsystemVersion;
      uint16_t MinorSubsystemVersion;
      uint32_t Win32VersionValue;			    /* ? */
      uint32_t SizeOfImage;
      uint32_t SizeOfHeaders;
-     uint32_t CheckSum;				    /* NT drivers only */
+     uint32_t CheckSum;				    /**< NT drivers only */
      uint16_t Subsystem;
      uint16_t DllCharacteristics;
      uint32_t SizeOfStackReserve;
@@@ -73,32 -77,33 +77,33 @@@
      uint32_t SizeOfHeapReserve;
      uint32_t SizeOfHeapCommit;
      uint32_t LoaderFlags;			    /* ? */
-     uint32_t NumberOfRvaAndSizes;		    /* unreliable */
+     uint32_t NumberOfRvaAndSizes;		    /**< unreliable */
      struct pe_image_data_dir DataDirectory[16];
  };
  
+ /** PE 64-bit optional header */
  struct pe_image_optional_hdr64 {
      uint16_t Magic;
-     uint8_t  MajorLinkerVersion;		    /* unreliable */
-     uint8_t  MinorLinkerVersion;		    /* unreliable */
-     uint32_t SizeOfCode;			    /* unreliable */
-     uint32_t SizeOfInitializedData;		    /* unreliable */
-     uint32_t SizeOfUninitializedData;		    /* unreliable */
+     uint8_t  MajorLinkerVersion;		    /**< unreliable */
+     uint8_t  MinorLinkerVersion;		    /**< unreliable */
+     uint32_t SizeOfCode;			    /**< unreliable */
+     uint32_t SizeOfInitializedData;		    /**< unreliable */
+     uint32_t SizeOfUninitializedData;		    /**< unreliable */
      uint32_t AddressOfEntryPoint;
      uint32_t BaseOfCode;
-     uint64_t ImageBase;				    /* multiple of 64 KB */
-     uint32_t SectionAlignment;			    /* usually 32 or 4096 */
-     uint32_t FileAlignment;			    /* usually 32 or 512 */
-     uint16_t MajorOperatingSystemVersion;	    /* not used */
-     uint16_t MinorOperatingSystemVersion;	    /* not used */
-     uint16_t MajorImageVersion;			    /* unreliable */
-     uint16_t MinorImageVersion;			    /* unreliable */
+     uint64_t ImageBase;				    /**< multiple of 64 KB */
+     uint32_t SectionAlignment;			    /**< usually 32 or 4096 */
+     uint32_t FileAlignment;			    /**< usually 32 or 512 */
+     uint16_t MajorOperatingSystemVersion;	    /**< not used */
+     uint16_t MinorOperatingSystemVersion;	    /**< not used */
+     uint16_t MajorImageVersion;			    /**< unreliable */
+     uint16_t MinorImageVersion;			    /**< unreliable */
      uint16_t MajorSubsystemVersion;
      uint16_t MinorSubsystemVersion;
      uint32_t Win32VersionValue;			    /* ? */
      uint32_t SizeOfImage;
      uint32_t SizeOfHeaders;
-     uint32_t CheckSum;				    /* NT drivers only */
+     uint32_t CheckSum;				    /**< NT drivers only */
      uint16_t Subsystem;
      uint16_t DllCharacteristics;
      uint64_t SizeOfStackReserve;
@@@ -106,12 -111,13 +111,13 @@@
      uint64_t SizeOfHeapReserve;
      uint64_t SizeOfHeapCommit;
      uint32_t LoaderFlags;			    /* ? */
-     uint32_t NumberOfRvaAndSizes;		    /* unreliable */
+     uint32_t NumberOfRvaAndSizes;		    /**< unreliable */
      struct pe_image_data_dir DataDirectory[16];
  };
  
+ /** PE section header */
  struct pe_image_section_hdr {
-     uint8_t Name[8];			    /* may not end with NULL */
+     uint8_t Name[8];			    /**< may not end with NULL */
      /*
      union {
  	uint32_t PhysicalAddress;
@@@ -120,20 -126,32 +126,35 @@@
      */
      uint32_t VirtualSize;
      uint32_t VirtualAddress;
-     uint32_t SizeOfRawData;		    /* multiple of FileAlignment */
-     uint32_t PointerToRawData;		    /* offset to the section's data */
-     uint32_t PointerToRelocations;	    /* object files only */
-     uint32_t PointerToLinenumbers;	    /* object files only */
-     uint16_t NumberOfRelocations;	    /* object files only */
-     uint16_t NumberOfLinenumbers;	    /* object files only */
+     uint32_t SizeOfRawData;		    /**< multiple of FileAlignment */
+     uint32_t PointerToRawData;		    /**< offset to the section's data */
+     uint32_t PointerToRelocations;	    /**< object files only */
+     uint32_t PointerToLinenumbers;	    /**< object files only */
+     uint16_t NumberOfRelocations;	    /**< object files only */
+     uint16_t NumberOfLinenumbers;	    /**< object files only */
      uint32_t Characteristics;
  };
  
+ /** Data for the bytecode PE hook */
+ struct cli_pe_hook_data {
+     struct cli_exe_info exe_info;
+     struct pe_image_file_hdr *file_hdr;
+     struct pe_image_optional_hdr32 *opt32;
+     struct pe_image_optional_hdr64 *opt64;
+     struct pe_image_data_dir *dirs;
+     uint32_t e_lfanew;/**< address of new exe header */
+     uint32_t overlays;/**< number of overlays */
+     int32_t overlays_sz;/**< size of overlays */
+     /* FIXME: these should not be necessary (they are for now) */
+     uint8_t dummyn;
+     uint8_t *dummy EBOUNDS(dummyn);
+ };
+ 
 -int cli_scanpe(cli_ctx *ctx);
 +int cli_scanpe(cli_ctx *ctx, unsigned int *icongrp1, unsigned int *icongrp2);
  
  int cli_peheader(fmap_t *map, struct cli_exe_info *peinfo);
  
 +uint32_t cli_rawaddr(uint32_t, struct cli_exe_section *, uint16_t, unsigned int *, size_t, uint32_t);
 +void findres(uint32_t, uint32_t, uint32_t, cli_ctx *, struct cli_exe_section *, uint16_t, uint32_t, int (*)(void *, uint32_t, uint32_t, uint32_t, uint32_t), void *);
 +
  #endif
diff --combined libclamav/readdb.c
index 706725f,5545857..6d88aaf
--- a/libclamav/readdb.c
+++ b/libclamav/readdb.c
@@@ -69,7 -69,9 +69,9 @@@
  #endif
  
  #include "mpool.h"
- 
+ #include "bytecode.h"
+ #include "bytecode_api.h"
+ #include "bytecode_priv.h"
  #ifdef CL_THREAD_SAFE
  #  include <pthread.h>
  static pthread_mutex_t cli_ref_mutex = PTHREAD_MUTEX_INITIALIZER;
@@@ -258,8 -260,9 +260,9 @@@ int cli_parse_add(struct cli_matcher *r
  	    return CL_EMEM;
  	}
  
- 	if(bm_new->length > root->maxpatlen)
+ 	if(bm_new->length > root->maxpatlen) {
  	    root->maxpatlen = bm_new->length;
+ 	}
  
  	if((ret = cli_bm_addpatt(root, bm_new, offset))) {
  	    cli_errmsg("cli_parse_add(): Problem adding signature (4).\n");
@@@ -273,7 -276,7 +276,7 @@@
      return CL_SUCCESS;
  }
  
 -static int cli_initroots(struct cl_engine *engine, unsigned int options)
 +int cli_initroots(struct cl_engine *engine, unsigned int options)
  {
  	int i, ret;
  	struct cli_matcher *root;
@@@ -521,224 -524,6 +524,224 @@@ static int cli_loaddb(FILE *fs, struct 
      return CL_SUCCESS;
  }
  
 +#define ICO_TOKENS 4
 +static int cli_loadidb(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigned int options, struct cli_dbio *dbio)
 +{
 +        const char *tokens[ICO_TOKENS + 1];
 +	char buffer[FILEBUFF], *buffer_cpy;
 +	uint8_t *hash;
 +	int ret = CL_SUCCESS;
 +	unsigned int line = 0, sigs = 0, tokens_count, i, size, enginesize;
 +	struct icomtr *metric;
 +	struct icon_matcher *matcher;
 +
 +
 +    if(!(matcher = (struct icon_matcher *)mpool_calloc(engine->mempool, sizeof(*matcher),1))) 
 +	return CL_EMEM;
 +    
 +    if(engine->ignored)
 +	if(!(buffer_cpy = cli_malloc(FILEBUFF)))
 +	    return CL_EMEM;
 +
 +    while(cli_dbgets(buffer, FILEBUFF, fs, dbio)) {
 +	line++;
 +	if(buffer[0] == '#')
 +	    continue;
 +
 +	cli_chomp(buffer);
 +	if(engine->ignored)
 +	    strcpy(buffer_cpy, buffer);
 +
 +	tokens_count = cli_strtokenize(buffer, ':', ICO_TOKENS + 1, tokens);
 +	if(tokens_count != ICO_TOKENS) {
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	if(strlen(tokens[3]) != 124) {
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	if(engine->ignored && cli_chkign(engine->ignored, tokens[0], buffer_cpy))
 +	    continue;
 +
 +	hash = (uint8_t *)tokens[3];
 +	if(cli_hexnibbles((char *)hash, 124)) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad chars)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +	size = (hash[0] << 4) + hash[1];
 +	if(size != 32 && size != 24 && size != 16) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad size)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +	enginesize = (size >> 3) - 2;
 +	hash+=2;
 +
 +	metric = (struct icomtr *)mpool_realloc(engine->mempool, matcher->icons[enginesize], sizeof(struct icomtr) * (matcher->icon_counts[enginesize] + 1));
 +	if(!metric) {
 +	    ret = CL_EMEM;
 +	    break;
 +	}
 +
 +	matcher->icons[enginesize] = metric;
 +	metric += matcher->icon_counts[enginesize];
 +	matcher->icon_counts[enginesize]++;
 +
 +	for(i=0; i<3; i++) {
 +	    if((metric->color_avg[i] = (hash[0] << 8) | (hash[1] << 4) | hash[2]) > 4072)
 +		break;
 +	    if((metric->color_x[i] = (hash[3] << 4) | hash[4]) > size - size / 8)
 +		break;
 +	    if((metric->color_y[i] = (hash[5] << 4) | hash[6]) > size - size / 8)
 +		break;
 +	    hash += 7;
 +	}
 +	if(i!=3) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad color data)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	for(i=0; i<3; i++) {
 +	    if((metric->gray_avg[i] = (hash[0] << 8) | (hash[1] << 4) | hash[2]) > 4072)
 +		break;
 +	    if((metric->gray_x[i] = (hash[3] << 4) | hash[4]) > size - size / 8)
 +		break;
 +	    if((metric->gray_y[i] = (hash[5] << 4) | hash[6]) > size - size / 8)
 +		break;
 +	    hash += 7;
 +	}
 +	if(i!=3) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad gray data)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	for(i=0; i<3; i++) {
 +	    metric->bright_avg[i] = (hash[0] << 4) | hash[1];
 +	    if((metric->bright_x[i] = (hash[2] << 4) | hash[3]) > size - size / 8)
 +		break;
 +	    if((metric->bright_y[i] = (hash[4] << 4) | hash[5]) > size - size / 8)
 +		break;
 +	    hash += 6;
 +	}
 +	if(i!=3) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad bright data)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	for(i=0; i<3; i++) {
 +	    metric->dark_avg[i] = (hash[0] << 4) | hash[1];
 +	    if((metric->dark_x[i] = (hash[2] << 4) | hash[3]) > size - size / 8)
 +		break;
 +	    if((metric->dark_y[i] = (hash[4] << 4) | hash[5]) > size - size / 8)
 +		break;
 +	    hash += 6;
 +	}
 +	if(i!=3) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad dark data)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	for(i=0; i<3; i++) {
 +	    metric->edge_avg[i] = (hash[0] << 4) | hash[1];
 +	    if((metric->edge_x[i] = (hash[2] << 4) | hash[3]) > size - size / 8)
 +		break;
 +	    if((metric->edge_y[i] = (hash[4] << 4) | hash[5]) > size - size / 8)
 +		break;
 +	    hash += 6;
 +	}
 +	if(i!=3) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad edge data)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	for(i=0; i<3; i++) {
 +	    metric->noedge_avg[i] = (hash[0] << 4) | hash[1];
 +	    if((metric->noedge_x[i] = (hash[2] << 4) | hash[3]) > size - size / 8)
 +		break;
 +	    if((metric->noedge_y[i] = (hash[4] << 4) | hash[5]) > size - size / 8)
 +		break;
 +	    hash += 6;
 +	}
 +	if(i!=3) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad noedge data)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	metric->rsum = (hash[0] << 4) | hash[1];
 +	metric->gsum = (hash[2] << 4) | hash[3];
 +	metric->bsum = (hash[4] << 4) | hash[5];
 +	metric->ccount = (hash[6] << 4) | hash[7];
 +	if(metric->rsum + metric->gsum + metric->bsum > 103 || metric->ccount > 100) {
 +	    cli_errmsg("cli_loadidb: Malformed hash at line %u (bad spread data)\n", line);
 +	    ret = CL_EMALFDB;
 +	    break;
 +	}
 +
 +	if(!(metric->name = cli_mpool_strdup(engine->mempool, tokens[0]))) {
 +	    ret = CL_EMEM;
 +	    break;
 +	}
 +
 +	for(i=0; i<matcher->group_counts[0]; i++) {
 +	    if(!strcmp(tokens[1], matcher->group_names[0][i]))
 +		break;
 +	}
 +	if(i==matcher->group_counts[0]) {
 +	    if(!(matcher->group_names[0] = mpool_realloc(engine->mempool, matcher->group_names[0], sizeof(char *) * (i + 1))) ||
 +	       !(matcher->group_names[0][i] = cli_mpool_strdup(engine->mempool, tokens[1]))) {
 +		ret = CL_EMEM;
 +		break;
 +	    }
 +	    matcher->group_counts[0]++;
 +	}
 +	metric->group[0] = i;
 +
 +	for(i=0; i<matcher->group_counts[1]; i++) {
 +	    if(!strcmp(tokens[2], matcher->group_names[1][i]))
 +		break;
 +	}
 +	if(i==matcher->group_counts[1]) {
 +	    if(!(matcher->group_names[1] = mpool_realloc(engine->mempool, matcher->group_names[1], sizeof(char *) * (i + 1))) ||
 +	       !(matcher->group_names[1][i] = cli_mpool_strdup(engine->mempool, tokens[2]))) {
 +		ret = CL_EMALFDB;
 +		break;
 +	    }
 +	    matcher->group_counts[1]++;
 +	}
 +	metric->group[1] = i;
 +
 +	sigs++;
 +    }
 +    if(engine->ignored)
 +	free(buffer_cpy);
 +
 +    if(!line) {
 +	cli_errmsg("cli_loadidb: Empty database file\n");
 +	return CL_EMALFDB;
 +    }
 +
 +    if(ret) {
 +	cli_errmsg("cli_loadidb: Problem parsing database at line %u\n", line);
 +	return ret;
 +    }
 +
 +    if(signo)
 +	*signo += sigs;
 +
 +    engine->iconcheck = matcher;
 +    return CL_SUCCESS;
 +}
 +
  static int cli_loadwdb(FILE *fs, struct cl_engine *engine, unsigned int options, struct cli_dbio *dbio)
  {
  	int ret = 0;
@@@ -1072,160 -857,165 +1075,165 @@@ static int lsigattribs(char *attribs, s
    } while(0);
  
  #define LDB_TOKENS 67
- static int cli_loadldb(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigned int options, struct cli_dbio *dbio, const char *dbname)
+ static int load_oneldb(char *buffer, int chkpua, int chkign, struct cl_engine *engine, unsigned int options, const char *dbname, unsigned line, unsigned *sigs, struct cli_bc *bc, const char *buffer_cpy)
  {
- 	char *tokens[LDB_TOKENS + 1];
- 	char buffer[CLI_DEFAULT_LSIG_BUFSIZE + 1], *buffer_cpy, *pt;
- 	const char *sig, *virname, *offset, *logic;
- 	struct cli_matcher *root;
- 	unsigned int line = 0, sigs = 0;
- 	unsigned short target = 0;
- 	struct cli_ac_lsig **newtable, *lsig;
- 	uint32_t lsigid[2];
- 	int ret = CL_SUCCESS, i, subsigs, tokens_count;
- 	struct cli_lsig_tdb tdb;
+     const char *sig, *virname, *offset, *logic;
+     struct cli_ac_lsig **newtable, *lsig;
+     char *tokens[LDB_TOKENS], *pt;
+     int i, subsigs, tokens_count;
+     unsigned short target = 0;
+     struct cli_matcher *root;
+     struct cli_lsig_tdb tdb;
+     uint32_t lsigid[2];
+     int ret;
  
+ 	tokens_count = cli_strtokenize(buffer, ';', LDB_TOKENS + 1, (const char **) tokens);
+     if(tokens_count < 4) {
+ 	return CL_EMALFDB;
+     }
+     virname = tokens[0];
+     logic = tokens[2];
  
-     if((ret = cli_initroots(engine, options)))
- 	return ret;
- 
-     if(engine->ignored)
- 	if(!(buffer_cpy = cli_malloc(sizeof(buffer))))
- 	    return CL_EMEM;
+     if (chkpua && cli_chkpua(virname, engine->pua_cats, options))
+ 	    return CL_SUCCESS;
  
-     while(cli_dbgets(buffer, sizeof(buffer), fs, dbio)) {
- 	line++;
- 	sigs++;
- 	cli_chomp(buffer);
- 	if(engine->ignored)
- 	    strcpy(buffer_cpy, buffer);
+     if (chkign && cli_chkign(engine->ignored, virname, buffer_cpy))
+ 	return CL_SUCCESS;
  
- 	tokens_count = cli_strtokenize(buffer, ';', LDB_TOKENS + 1, (const char **) tokens);
- 	if(tokens_count < 4) {
- 	    ret = CL_EMALFDB;
- 	    break;
+     subsigs = cli_ac_chklsig(logic, logic + strlen(logic), NULL, NULL, NULL, 1);
+     if(subsigs == -1) {
+ 	return CL_EMALFDB;
+     }
+     subsigs++;
+     if(subsigs > 64) {
+ 	cli_errmsg("cli_loadldb: Broken logical expression or too many subsignatures\n");
+ 	return CL_EMALFDB;
+     }
+     if (!line) {
+ 	/* This is a logical signature from the bytecode, we need all
+ 	 * subsignatures, even if not referenced from the logical expression */
+ 	if (subsigs > tokens_count-3) {
+ 	    cli_errmsg("load_oneldb: Too many subsignatures: %u (max %u)\n",
+ 		       subsigs, tokens_count-3);
+ 	    return CL_EMALFDB;
  	}
+ 	subsigs = tokens_count-3;
+     } else if(subsigs != tokens_count - 3) {
+ 	cli_errmsg("cli_loadldb: The number of subsignatures (== %u) doesn't match the IDs in the logical expression (== %u)\n", tokens_count - 3, subsigs);
+ 	return CL_EMALFDB;
+     }
  
- 	virname = tokens[0];
- 	logic = tokens[2];
+     /* TDB */
+     memset(&tdb, 0, sizeof(tdb));
+ #ifdef USE_MPOOL
+     tdb.mempool = engine->mempool;
+ #endif
+     if(lsigattribs(tokens[1], &tdb) == -1) {
+ 	FREE_TDB(tdb);
+ 	return CL_EMALFDB;
+     }
+     if(!tdb.target) {
+ 	cli_errmsg("cli_loadldb: No target specified in TDB\n");
+ 	FREE_TDB(tdb);
+ 	return CL_EMALFDB;
+     } else if(tdb.target[0] >= CLI_MTARGETS) {
+ 	cli_dbgmsg("cli_loadldb: Not supported target type in logical signature for %s\n", virname);
+ 	FREE_TDB(tdb);
+ 	*sigs--;
+ 	return CL_SUCCESS;
+     }
  
- 	if(engine->pua_cats && (options & CL_DB_PUA_MODE) && (options & (CL_DB_PUA_INCLUDE | CL_DB_PUA_EXCLUDE)))
- 	    if(cli_chkpua(virname, engine->pua_cats, options))
- 		continue;
+     root = engine->root[tdb.target[0]];
  
- 	if(engine->ignored && cli_chkign(engine->ignored, virname, buffer_cpy))
- 	    continue;
+     lsig = (struct cli_ac_lsig *) mpool_calloc(engine->mempool, 1, sizeof(struct cli_ac_lsig));
+     if(!lsig) {
+ 	cli_errmsg("cli_loadldb: Can't allocate memory for lsig\n");
+ 	FREE_TDB(tdb);
+ 	return CL_EMEM;
+     }
  
- 	subsigs = cli_ac_chklsig(logic, logic + strlen(logic), NULL, NULL, NULL, 1);
- 	if(subsigs == -1) {
- 	    ret = CL_EMALFDB;
- 	    break;
- 	}
- 	subsigs++;
+     lsig->logic = cli_mpool_strdup(engine->mempool, logic);
+     if(!lsig->logic) {
+ 	cli_errmsg("cli_loadldb: Can't allocate memory for lsig->logic\n");
+ 	FREE_TDB(tdb);
+ 	mpool_free(engine->mempool, lsig);
+ 	return CL_EMEM;
+     }
  
- 	if(subsigs > 64) {
- 	    cli_errmsg("cli_loadldb: Broken logical expression or too many subsignatures\n");
- 	    ret = CL_EMALFDB;
- 	    break;
- 	}
+     lsigid[0] = lsig->id = root->ac_lsigs;
+     memcpy(&lsig->tdb, &tdb, sizeof(tdb));
  
- 	if(subsigs != tokens_count - 3) {
- 	    cli_errmsg("cli_loadldb: The number of subsignatures (== %u) doesn't match the IDs in the logical expression (== %u)\n", tokens_count - 3, subsigs);
- 	    ret = CL_EMALFDB;
- 	    break;
- 	}
+     root->ac_lsigs++;
+     newtable = (struct cli_ac_lsig **) mpool_realloc(engine->mempool, root->ac_lsigtable, root->ac_lsigs * sizeof(struct cli_ac_lsig *));
+     if(!newtable) {
+ 	root->ac_lsigs--;
+ 	cli_errmsg("cli_loadldb: Can't realloc root->ac_lsigtable\n");
+ 	FREE_TDB(tdb);
+ 	mpool_free(engine->mempool, lsig);
+ 	return CL_EMEM;
+     }
+     lsig->bc = bc;
+     newtable[root->ac_lsigs - 1] = lsig;
+     root->ac_lsigtable = newtable;
  
- 	/* TDB */
- 	memset(&tdb, 0, sizeof(tdb));
- #ifdef USE_MPOOL
- 	tdb.mempool = engine->mempool;
- #endif
+     for(i = 0; i < subsigs; i++) {
+ 	lsigid[1] = i;
+ 	sig = tokens[3 + i];
  
- 	if(lsigattribs(tokens[1], &tdb) == -1) {
- 	    FREE_TDB(tdb);
- 	    ret = CL_EMALFDB;
- 	    break;
+ 	if((pt = strchr(tokens[3 + i], ':'))) {
+ 	    *pt = 0;
+ 	    sig = ++pt;
+ 	    offset = tokens[3 + i];
+ 	} else {
+ 	    offset = "*";
+ 	    sig = tokens[3 + i];
+ 	}
+ 
+ 	if((ret = cli_parse_add(root, virname, sig, 0, 0, offset, target, lsigid, options))) {
+ 	    return CL_EMALFDB;
  	}
  
  	if(tdb.engine) {
  	    if(tdb.engine[0] > cl_retflevel()) {
  		cli_dbgmsg("cli_loadldb: Signature for %s not loaded (required f-level: %u)\n", virname, tdb.engine[0]);
  		FREE_TDB(tdb);
- 		sigs--;
- 		continue;
+ 		*sigs--;
+ 		return CL_SUCCESS;
  	    } else if(tdb.engine[1] < cl_retflevel()) {
  		FREE_TDB(tdb);
- 		sigs--;
- 		continue;
+ 		*sigs--;
+ 		return CL_SUCCESS;
  	    }
  	}
+     }
+     return CL_SUCCESS;
+ }
  
- 	if(!tdb.target) {
- 	    cli_errmsg("cli_loadldb: No target specified in TDB\n");
- 	    FREE_TDB(tdb);
- 	    ret = CL_EMALFDB;
- 	    break;
- 	} else if(tdb.target[0] >= CLI_MTARGETS) {
- 	    cli_dbgmsg("cli_loadldb: Not supported target type in logical signature for %s\n", virname);
- 	    FREE_TDB(tdb);
- 	    sigs--;
- 	    continue;
- 	}
- 
- 	root = engine->root[tdb.target[0]];
- 
- 	lsig = (struct cli_ac_lsig *) mpool_calloc(engine->mempool, 1, sizeof(struct cli_ac_lsig));
- 	if(!lsig) {
- 	    cli_errmsg("cli_loadldb: Can't allocate memory for lsig\n");
- 	    FREE_TDB(tdb);
- 	    ret = CL_EMEM;
- 	    break;
- 	}
- 
- 	lsig->logic = cli_mpool_strdup(engine->mempool, logic);
- 	if(!lsig->logic) {
- 	    cli_errmsg("cli_loadldb: Can't allocate memory for lsig->logic\n");
- 	    FREE_TDB(tdb);
- 	    ret = CL_EMEM;
- 	    mpool_free(engine->mempool, lsig);
- 	    break;
- 	}
+ static int cli_loadldb(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigned int options, struct cli_dbio *dbio, const char *dbname)
+ {
+ 	char buffer[CLI_DEFAULT_LSIG_BUFSIZE + 1], *buffer_cpy;
+ 	unsigned int line = 0, sigs = 0;
+ 	int ret;
  
- 	lsigid[0] = lsig->id = root->ac_lsigs;
- 	memcpy(&lsig->tdb, &tdb, sizeof(tdb));
  
- 	root->ac_lsigs++;
- 	newtable = (struct cli_ac_lsig **) mpool_realloc(engine->mempool, root->ac_lsigtable, root->ac_lsigs * sizeof(struct cli_ac_lsig *));
- 	if(!newtable) {
- 	    root->ac_lsigs--;
- 	    cli_errmsg("cli_loadldb: Can't realloc root->ac_lsigtable\n");
- 	    FREE_TDB(tdb);
- 	    mpool_free(engine->mempool, lsig);
- 	    ret = CL_EMEM;
- 	    break;
- 	}
- 	newtable[root->ac_lsigs - 1] = lsig;
- 	root->ac_lsigtable = newtable;
- 
- 	for(i = 0; i < subsigs; i++) {
- 	    lsigid[1] = i;
- 	    sig = tokens[3 + i];
+     if((ret = cli_initroots(engine, options)))
+ 	return ret;
  
- 	    if((pt = strchr(tokens[3 + i], ':'))) {
- 		*pt = 0;
- 		sig = ++pt;
- 		offset = tokens[3 + i];
- 	    } else {
- 		offset = "*";
- 		sig = tokens[3 + i];
- 	    }
+     if(engine->ignored)
+ 	if(!(buffer_cpy = cli_malloc(sizeof(buffer))))
+ 	    return CL_EMEM;
+     while(cli_dbgets(buffer, sizeof(buffer), fs, dbio)) {
+ 	line++;
+ 	sigs++;
+ 	cli_chomp(buffer);
  
- 	    if((ret = cli_parse_add(root, virname, sig, 0, 0, offset, target, lsigid, options))) {
- 		ret = CL_EMALFDB;
- 		break;
- 	    }
- 	}
- 	if(ret)
+ 	if(engine->ignored)
+ 	    strcpy(buffer_cpy, buffer);
+ 	ret = load_oneldb(buffer,
+ 			  engine->pua_cats && (options & CL_DB_PUA_MODE) && (options & (CL_DB_PUA_INCLUDE | CL_DB_PUA_EXCLUDE)),
+ 			  !!engine->ignored,
+ 			  engine, options, dbname, line, &sigs, NULL, buffer_cpy);
+ 	if (ret)
  	    break;
      }
      if(engine->ignored)
@@@ -1247,6 -1037,71 +1255,71 @@@
      return CL_SUCCESS;
  }
  
+ static int cli_loadcbc(FILE *fs, struct cl_engine *engine, unsigned int *signo, unsigned int options, struct cli_dbio *dbio, const char *dbname)
+ {
+     int rc;
+     struct cli_all_bc *bcs = &engine->bcs;
+     struct cli_bc *bc;
+     unsigned sigs = 0;
+ 
+     /* TODO: virusname have a common prefix, and whitelist by that */
+     if((rc = cli_initroots(engine, options)))
+ 	return rc;
+ 
+     if(!(engine->dconf->bytecode & BYTECODE_ENGINE_MASK)) {
+ 	return CL_SUCCESS;
+     }
+     bcs->all_bcs = cli_realloc2(bcs->all_bcs, sizeof(*bcs->all_bcs)*(bcs->count+1));
+     if (!bcs->all_bcs) {
+ 	cli_errmsg("cli_loadcbc: Can't allocate memory for bytecode entry\n");
+ 	return CL_EMEM;
+     }
+     bcs->count++;
+     bc = &bcs->all_bcs[bcs->count-1];
+     rc = cli_bytecode_load(bc, fs, dbio);
+     if (rc != CL_SUCCESS) {
+ 	cli_errmsg("Unable to load %s bytecode: %s\n", dbname, cl_strerror(rc));
+ 	return rc;
+     }
+     sigs += 2;/* the bytecode itself and the logical sig */
+     if (bc->kind == BC_LOGICAL) {
+ 	if (!bc->lsig) {
+ 	    cli_errmsg("Bytecode %s has logical kind, but missing logical signature!\n", dbname);
+ 	    return CL_EMALFDB;
+ 	}
+ 	cli_dbgmsg("Bytecode %s has logical signature: %s\n", dbname, bc->lsig);
+ 	rc = load_oneldb(bc->lsig, 0, 0, engine, options, dbname, 0, &sigs, bc, NULL);
+ 	if (rc != CL_SUCCESS) {
+ 	    cli_errmsg("Problem parsing logical signature %s for bytecode %s: %s\n",
+ 		       bc->lsig, dbname, cl_strerror(rc));
+ 	    return rc;
+ 	}
+     } else {
+ 	if (bc->lsig) {
+ 	    cli_errmsg("Bytecode %s has logical signature but is not logical kind!\n", dbname);
+ 	    return CL_EMALFDB;
+ 	}
+ 	if (bc->kind >= _BC_START_HOOKS && bc->kind < _BC_LAST_HOOK) {
+ 	    unsigned hook = bc->kind - _BC_START_HOOKS;
+ 	    unsigned cnt = ++engine->hooks_cnt[hook];
+ 	    engine->hooks[hook] = cli_realloc2(engine->hooks[hook],
+ 					       sizeof(*engine->hooks[0])*cnt);
+ 	    if (!engine->hooks[hook]) {
+ 		cli_errmsg("Out of memory allocating memory for hook %u", hook);
+ 		return CL_EMEM;
+ 	    }
+ 	    engine->hooks[hook][cnt-1] = bcs->count-1;
+ 	} else switch (bc->kind) {
+ 	    default:
+ 		cli_errmsg("Bytecode: unhandled bytecode kind %u\n", bc->kind);
+ 		return CL_EMALFDB;
+ 	}
+     }
+     if (signo)
+ 	*signo += sigs;
+     return CL_SUCCESS;
+ }
+ 
  #define FTM_TOKENS 8
  static int cli_loadftm(FILE *fs, struct cl_engine *engine, unsigned int options, unsigned int internal, struct cli_dbio *dbio)
  {
@@@ -1845,7 -1700,11 +1918,11 @@@ int cli_load(const char *filename, stru
  	    ret = cli_loadldb(fs, engine, signo, options | CL_DB_PUA_MODE, dbio, dbname);
  	else
  	    skipped = 1;
- 
+     } else if(cli_strbcasestr(filename, ".cbc")) {
+ 	if(options & CL_DB_BYTECODE)
+ 	    ret = cli_loadcbc(fs, engine, signo, options, dbio, dbname);
+ 	else
+ 	    skipped = 1;
      } else if(cli_strbcasestr(dbname, ".sdb")) {
  	ret = cli_loadndb(fs, engine, signo, 1, options, dbio, dbname);
  
@@@ -1874,9 -1733,6 +1951,9 @@@
      } else if(cli_strbcasestr(dbname, ".ign") || cli_strbcasestr(dbname, ".ign2")) {
  	ret = cli_loadign(fs, engine, options, dbio);
  
 +    } else if(cli_strbcasestr(dbname, ".idb")) {
 +    	ret = cli_loadidb(fs, engine, signo, options, dbio);
 +
      } else {
  	cli_dbgmsg("cli_load: unknown extension - assuming old database format\n");
  	ret = cli_loaddb(fs, engine, signo, options, dbio, dbname);
@@@ -2078,10 -1934,17 +2155,17 @@@ int cl_load(const char *path, struct cl
  	if((ret = phishing_init(engine)))
  	    return ret;
  
+     if((dboptions & CL_DB_BYTECODE) && !engine->bcs.engine && (engine->dconf->bytecode & BYTECODE_ENGINE_MASK)) {
+ 	if((ret = cli_bytecode_init(&engine->bcs)))
+ 	    return ret;
+     } else {
+ 	cli_dbgmsg("Bytecode engine disabled\n");
+     }
+ 
      engine->dboptions |= dboptions;
  
      switch(sb.st_mode & S_IFMT) {
- 	case S_IFREG: 
+ 	case S_IFREG:
  	    ret = cli_load(path, engine, signo, dboptions, NULL);
  	    break;
  
@@@ -2384,6 -2247,17 +2468,17 @@@ int cl_engine_free(struct cl_engine *en
  	mpool_free(engine->mempool, metah);
      }
  
+     if(engine->dconf->bytecode & BYTECODE_ENGINE_MASK) {
+ 	unsigned i;
+ 	if (engine->bcs.all_bcs)
+ 	    for(i=0;i<engine->bcs.count;i++)
+ 		cli_bytecode_destroy(&engine->bcs.all_bcs[i]);
+ 	cli_bytecode_done(&engine->bcs);
+ 	free(engine->bcs.all_bcs);
+ 	for (i=0;i<_BC_LAST_HOOK - _BC_START_HOOKS;i++) {
+ 	    free (engine->hooks[i]);
+ 	}
+     }
      if(engine->dconf->phishing & PHISHING_CONF_ENGINE)
  	phishing_done(engine);
      if(engine->dconf)
@@@ -2392,27 -2266,6 +2487,27 @@@
      if(engine->pua_cats)
  	mpool_free(engine->mempool, engine->pua_cats);
  
 +    if(engine->iconcheck) {
 +	struct icon_matcher *iconcheck = engine->iconcheck;
 +	for(i=0; i<3; i++) {
 +	    if(iconcheck->icons[i]) {
 +		mpool_free(engine->mempool, iconcheck->icons[i]->name);
 +		mpool_free(engine->mempool, iconcheck->icons[i]);
 +	    }
 +	}
 +	if(iconcheck->group_names[0]) {
 +	    for(i=0; i<iconcheck->group_counts[0]; i++)
 +		mpool_free(engine->mempool, iconcheck->group_names[0][i]);
 +	    mpool_free(engine->mempool, iconcheck->group_names[0]);
 +	}
 +	if(iconcheck->group_names[1]) {
 +	    for(i=0; i<iconcheck->group_counts[1]; i++)
 +		mpool_free(engine->mempool, iconcheck->group_names[1][i]);
 +	    mpool_free(engine->mempool, iconcheck->group_names[1]);
 +	}
 +	mpool_free(engine->mempool, iconcheck);
 +    }	
 +
      if(engine->tmpdir)
  	mpool_free(engine->mempool, engine->tmpdir);
  
@@@ -2470,7 -2323,7 +2565,7 @@@ int cl_engine_compile(struct cl_engine 
  	if((root = engine->root[i])) {
  	    if((ret = cli_ac_buildtrie(root)))
  		return ret;
- 	    cli_dbgmsg("matcher[%u]: %s: AC sigs: %u (reloff: %u, absoff: %u) BM sigs: %u (reloff: %u, absoff: %u) %s\n", i, cli_mtargets[i].name, root->ac_patterns, root->ac_reloff_num, root->ac_absoff_num, root->bm_patterns, root->bm_reloff_num, root->bm_absoff_num, root->ac_only ? "(ac_only mode)" : "");
+ 	    cli_dbgmsg("matcher[%u]: %s: AC sigs: %u (reloff: %u, absoff: %u) BM sigs: %u (reloff: %u, absoff: %u) maxpatlen %u %s\n", i, cli_mtargets[i].name, root->ac_patterns, root->ac_reloff_num, root->ac_absoff_num, root->bm_patterns, root->bm_reloff_num, root->bm_absoff_num, root->maxpatlen, root->ac_only ? "(ac_only mode)" : "");
  	}
      }
  
@@@ -2489,6 -2342,12 +2584,12 @@@
      cli_dconf_print(engine->dconf);
      mpool_flush(engine->mempool);
  
+     /* Compile bytecode */
+     if((ret = cli_bytecode_prepare(&engine->bcs))) {
+ 	cli_errmsg("Unable to compile/load bytecode: %s\n", cl_strerror(ret));
+ 	return ret;
+     }
+ 
      engine->dboptions |= CL_DB_COMPILED;
      return CL_SUCCESS;
  }
diff --combined libclamav/readdb.h
index 8322f89,abc7382..730541f
--- a/libclamav/readdb.h
+++ b/libclamav/readdb.h
@@@ -47,11 -47,11 +47,12 @@@
  	cli_strbcasestr(ext, ".pdb")   ||	\
  	cli_strbcasestr(ext, ".gdb")   ||	\
  	cli_strbcasestr(ext, ".wdb")   ||	\
+ 	cli_strbcasestr(ext, ".cbc")   ||	\
  	cli_strbcasestr(ext, ".ftm")   ||	\
  	cli_strbcasestr(ext, ".cfg")   ||	\
  	cli_strbcasestr(ext, ".cvd")   ||	\
 -	cli_strbcasestr(ext, ".cld")		\
 +	cli_strbcasestr(ext, ".cld")   ||	\
 +	cli_strbcasestr(ext, ".idb")		\
      )
  
  char *cli_virname(char *virname, unsigned int official);
@@@ -62,6 -62,4 +63,6 @@@ int cli_load(const char *filename, stru
  
  char *cli_dbgets(char *buff, unsigned int size, FILE *fs, struct cli_dbio *dbio);
  
 +int cli_initroots(struct cl_engine *engine, unsigned int options);
 +
  #endif
diff --combined libltdl/Makefile.in
index 783b687,d626187..a8eb9f0
--- a/libltdl/Makefile.in
+++ b/libltdl/Makefile.in
@@@ -50,9 -50,9 +50,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -247,7 -247,6 +247,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -336,6 -335,7 +336,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined shared/optparser.c
index ff4e8c7,2947af7..d84cace
--- a/shared/optparser.c
+++ b/shared/optparser.c
@@@ -108,7 -108,6 +108,7 @@@ const struct clam_option __clam_options
      { NULL, "list-sigs", 'l', TYPE_STRING, NULL, -1, DATADIR, 0, OPT_SIGTOOL, "", "" },
      { NULL, "find-sigs", 'f', TYPE_STRING, NULL, -1, DATADIR, FLAG_REQUIRED, OPT_SIGTOOL, "", "" },
      { NULL, "decode-sigs", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_SIGTOOL, "", "" },
 +    { NULL, "test-sigs", 0, TYPE_STRING, NULL, -1, NULL, 0, OPT_SIGTOOL, "", "" },
      { NULL, "vba", 0, TYPE_STRING, NULL, -1, NULL, 0, OPT_SIGTOOL, "", "" },
      { NULL, "vba-hex", 0, TYPE_STRING, NULL, -1, NULL, 0, OPT_SIGTOOL, "", "" },
      { NULL, "diff", 'd', TYPE_STRING, NULL, -1, NULL, 0, OPT_SIGTOOL, "", "" },
@@@ -120,6 -119,11 +120,11 @@@
      { NULL, "non-default", 'n', TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMCONF, "", "" },
      { NULL, "generate-config", 'g', TYPE_STRING, NULL, -1, NULL, 0, OPT_CLAMCONF, "", "" },
  
+     { NULL, "force-interpreter", 'f', TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMBC, "Force using the interpreter instead of the JIT", "" },
+     { NULL, "input", 'i', TYPE_STRING, NULL, -1, NULL, 0, OPT_CLAMBC, "Input file to run the bytecode n", ""},
+     { NULL, "trace", 't', TYPE_NUMBER, MATCH_NUMBER, 7, NULL, 0, OPT_CLAMBC, "bytecode trace level",""},
+     { NULL, "no-trace-showsource", 's', TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMBC, "Don't show source line during tracing",""},
+ 
      /* cmdline only - deprecated */
      { NULL, "http-proxy", 0, TYPE_STRING, NULL, 0, NULL, 0, OPT_FRESHCLAM | OPT_DEPRECATED, "", "" },
      { NULL, "proxy-user", 0, TYPE_STRING, NULL, 0, NULL, 0, OPT_FRESHCLAM | OPT_DEPRECATED, "", "" },
@@@ -234,7 -238,7 +239,7 @@@
      { "AllowSupplementaryGroups", NULL, 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER, "Initialize a supplementary group access (the process must be started by root).", "no" },
  
      /* Scan options */
- 
+     { "Bytecode", "bytecode", 0, TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "With this option enabled ClamAV will load bytecode from the database. It is highly recommended you keep this option on, otherwise you'll miss detections for many new viruses.", "yes" },
      { "DetectPUA", "detect-pua", 0, TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Detect Potentially Unwanted Applications.", "yes" },
  
      { "ExcludePUA", "exclude-pua", 0, TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD | OPT_CLAMSCAN, "Exclude a specific PUA category. This directive can be used multiple times.\nSee http://www.clamav.net/support/pua for the complete list of PUA\ncategories.", "NetTool\nPWTool" },
diff --combined sigtool/Makefile.in
index 04e8fe3,c35c4c4..d933b80
--- a/sigtool/Makefile.in
+++ b/sigtool/Makefile.in
@@@ -61,9 -61,9 +61,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -172,7 -172,6 +172,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -261,6 -260,7 +261,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined test/Makefile.in
index e9354ba,62c47a8..fd5c768
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@@ -41,9 -41,9 +41,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -120,7 -120,6 +120,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -209,6 -208,7 +209,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@
diff --combined unit_tests/Makefile.in
index 656d554,df936dc..9bdf9ab
--- a/unit_tests/Makefile.in
+++ b/unit_tests/Makefile.in
@@@ -44,9 -44,9 +44,9 @@@ am__aclocal_m4_deps = $(top_srcdir)/m4/
  	$(top_srcdir)/m4/argz.m4 $(top_srcdir)/m4/fdpassing.m4 \
  	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
  	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
- 	$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
- 	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- 	$(top_srcdir)/m4/lt~obsolete.m4 \
+ 	$(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltdl.m4 \
+ 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
  	$(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \
  	$(top_srcdir)/configure.in
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@@ -263,7 -263,6 +263,7 @@@ LIBBZ2_PREFIX = @LIBBZ2_PREFIX
  LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@
  LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@
  LIBLTDL = @LIBLTDL@
 +LIBM = @LIBM@
  LIBOBJS = @LIBOBJS@
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
@@@ -352,6 -351,7 +352,7 @@@ psdir = @psdir
  sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
  srcdir = @srcdir@
+ subdirs = @subdirs@
  sys_symbol_underscore = @sys_symbol_underscore@
  sysconfdir = @sysconfdir@
  target = @target@

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list