[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:03:08 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 2c7d5adc1509717eff71e4987a6b1001757ba00c
Author: Török Edvin <edwin at clamav.net>
Date: Mon Aug 31 15:49:41 2009 +0300
If C++ compiler is not available, don't build LLVM.
This is tricky, because autoconf provides no way to do this automatically
(AC_PROG_CXX fails if no C++ compiler).
One could override AC_MSG_ERROR/FAILURE for AC_PROG_CXX, but that causes all
sorts of problems later (like sys/types.h not found).
So instead create yet another configure in libclamav/c++,
but teach autoconf not to fail if the subconfigure fails
(by overriding AC_MSG_ERROR to set a variable instead of exiting).
This seems to work with shared and static builds, "-all-static" builds
don't work yet, will fix that later.
diff --git a/configure.in b/configure.in
index 5f42d62..c92a31b 100644
--- a/configure.in
+++ b/configure.in
@@ -56,8 +56,6 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
-AC_CONFIG_LLVM
-
LT_CONFIG_LTDL_DIR([libltdl])
LT_INIT([dlopen])
LTDL_INIT([recursive])
@@ -809,12 +807,9 @@ enable_debug=$enableval, enable_debug="no")
if test "$enable_debug" = "yes"; then
AC_DEFINE([CL_DEBUG],1,[enable debugging])
- ac_configure_args="$ac_configure_args --disable-optimized"
else
AC_DEFINE([NDEBUG],1,[disable assertions])
- ac_configure_args="$ac_configure_args --enable-optimized"
fi
-AM_CONDITIONAL([DEBUG_BUILD], test "x$enable_debug" = "xyes")
AC_ARG_ENABLE([no-cache],
[ --enable-no-cache use "Cache-Control: no-cache" in freshclam],
@@ -1585,10 +1580,16 @@ AC_SUBST([CURSES_LIBS])
AM_CONDITIONAL([HAVE_CURSES],
[test "X$HAVE_LIBNCURSES" = "Xyes" || test "X$HAVE_LIBPDCURSES" = "Xyes"])
+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
-libclamav/c++/Makefile
-libclamav/c++/GNUmakefile
clamscan/Makefile
database/Makefile
docs/Makefile
@@ -1618,6 +1619,11 @@ docs/man/sigtool.1
docs/man/clamdtop.1
])
+AM_CONDITIONAL([ENABLE_LLVM],
+ [test "$subdirfailed" != "yes" && test "$enable_llvm" != "noi"])
+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 --git a/libclamav/Makefile.am b/libclamav/Makefile.am
index d5b1c15..5d01d1c 100644
--- a/libclamav/Makefile.am
+++ b/libclamav/Makefile.am
@@ -19,7 +19,6 @@
AM_CPPFLAGS = -I$(top_srcdir) -I at srcdir@/nsis $(LTDLINCL)
lib_LTLIBRARIES =
EXTRA_DIST =
-
if ENABLE_UNRAR
AM_CPPFLAGS += -DWARN_DLOPEN_FAIL
@@ -110,8 +109,17 @@ libclamav_internal_utils_nothreads_la_SOURCES=str.c\
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@
-libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) libclamav_internal_utils.la
+if ENABLE_LLVM
+LLVMLIBADD=c++/libclamavcxx.la -lstdc++ -lm
+SUBDIRS=c++
+else
+LLVMLIBADD=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_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) libclamav_internal_utils.la
libclamav_la_CFLAGS = -DSEARCH_LIBDIR=\"$(libdir)\"
libclamav_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined
@@ -332,25 +340,6 @@ libclamav_la_SOURCES += bignum.c \
bignum_class.h
endif
-if ENABLE_LLVM
-
-SUBDIRS = c++
-if DEBUG_BUILD
-LLVM_CONFIG=llvm/llvm/Debug/bin/llvm-config
-else
-LLVM_CONFIG=llvm/llvm/Release/bin/llvm-config
-endif
-libclamav_la_CPPFLAGS = $(AM_CPPFLAGS) `$(LLVM_CONFIG) --cppflags`
-libclamav_la_LDFLAGS += `$(LLVM_CONFIG) --ldflags --libs jit nativecodegen`
-libclamav_la_SOURCES += bytecode2llvm.cpp
-
-else
-
-libclamav_la_CPPFLAGS = $(AM_CPPFLAGS)
-libclamav_la_SOURCES += bytecode_nojit.c
-
-endif
-
.PHONY: version.h.tmp
version.c: version.h
version.h: version.h.tmp
@@ -377,7 +366,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 --git a/libclamav/c++/GNUmakefile.in b/libclamav/c++/GNUmakefile.in
deleted file mode 100644
index 311726a..0000000
--- a/libclamav/c++/GNUmakefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-all: build-llvm
-
-build-llvm:
- $(MAKE) -C llvm OPTIMIZE_OPTION=-O2 libs-only
-
-build-llvm-for-check:
- $(MAKE) -C llvm OPTIMIZE_OPTION=-O2 tools-only
-
-install:
-clean:
- $(MAKE) -C llvm clean
-
-check:
-check-llvm: build-llvm-for-check
- $(MAKE) -C llvm check
- $(MAKE) -C llvm unittests
diff --git a/libclamav/c++/Makefile.am b/libclamav/c++/Makefile.am
new file mode 100644
index 0000000..581ac30
--- /dev/null
+++ b/libclamav/c++/Makefile.am
@@ -0,0 +1,44 @@
+# This program 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.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+AM_CPPFLAGS = -I$(top_srcdir)/../.. -I$(top_srcdir)/..
+ACLOCAL_AMFLAGS=-I m4
+if DEBUG_BUILD
+LLVM_CONFIG=llvm/Debug/bin/llvm-config
+else
+LLVM_CONFIG=llvm/Release/bin/llvm-config
+endif
+
+$(LLVM_CONFIG): build-llvm
+
+libclamavcxx_la_CPPFLAGS = $(AM_CPPFLAGS) `$(LLVM_CONFIG) --cppflags`
+libclamavcxx_la_LDFLAGS = `$(LLVM_CONFIG) --ldflags --libs jit nativecodegen`
+libclamavcxx_la_SOURCES = bytecode2llvm.cpp dummy.h
+noinst_LTLIBRARIES = libclamavcxx.la
+bytecode2llvm.cpp: build-llvm
+
+build-llvm:
+ +$(GMAKE) -C llvm OPTIMIZE_OPTION=-O2 libs-only
+
+build-llvm-for-check:
+ +$(GMAKE) -C llvm OPTIMIZE_OPTION=-O2 tools-only
+
+clean-local:
+ +$(GMAKE) -C llvm clean
+
+check-llvm: build-llvm-for-check
+ +$(GMAKE) -C llvm check
+ +$(GMAKE) -C llvm unittests
+
diff --git a/libclamav/c++/Makefile.in b/libclamav/c++/Makefile.in
index f3ae4bd..60722fa 100644
--- a/libclamav/c++/Makefile.in
+++ b/libclamav/c++/Makefile.in
@@ -1,5 +1,728 @@
-# Run LLVM build with GNU make
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# This program 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.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = .
+DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/clamavcxx-config.h.in \
+ $(top_srcdir)/configure config/config.guess config/config.sub \
+ config/depcomp config/install-sh config/ltmain.sh \
+ config/missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/check_gnu_make.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = clamavcxx-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libclamavcxx_la_LIBADD =
+am_libclamavcxx_la_OBJECTS = libclamavcxx_la-bytecode2llvm.lo
+libclamavcxx_la_OBJECTS = $(am_libclamavcxx_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libclamavcxx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(AM_CXXFLAGS) $(CXXFLAGS) $(libclamavcxx_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo " CXX " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libclamavcxx_la_SOURCES)
+DIST_SOURCES = $(libclamavcxx_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
GMAKE = @GMAKE@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+ifGNUmake = @ifGNUmake@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = -I$(top_srcdir)/../.. -I$(top_srcdir)/..
+ACLOCAL_AMFLAGS = -I m4
+ at DEBUG_BUILD_FALSE@LLVM_CONFIG = llvm/Release/bin/llvm-config
+ at DEBUG_BUILD_TRUE@LLVM_CONFIG = llvm/Debug/bin/llvm-config
+libclamavcxx_la_CPPFLAGS = $(AM_CPPFLAGS) `$(LLVM_CONFIG) --cppflags`
+libclamavcxx_la_LDFLAGS = `$(LLVM_CONFIG) --ldflags --libs jit nativecodegen`
+libclamavcxx_la_SOURCES = bytecode2llvm.cpp dummy.h
+noinst_LTLIBRARIES = libclamavcxx.la
+all: clamavcxx-config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clamavcxx-config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/clamavcxx-config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status clamavcxx-config.h
+$(srcdir)/clamavcxx-config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f clamavcxx-config.h stamp-h1
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libclamavcxx.la: $(libclamavcxx_la_OBJECTS) $(libclamavcxx_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(libclamavcxx_la_LINK) $(libclamavcxx_la_OBJECTS) $(libclamavcxx_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/libclamavcxx_la-bytecode2llvm.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libclamavcxx_la-bytecode2llvm.lo: bytecode2llvm.cpp
+ at am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclamavcxx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libclamavcxx_la-bytecode2llvm.lo -MD -MP -MF $(DEPDIR)/libclamavcxx_la-bytecode2llvm.Tpo -c -o libclamavcxx_la-bytecode2llvm.lo `test -f 'bytecode2llvm.cpp' || echo '$(srcdir)/'`bytecode2llvm.cpp
+ at am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamavcxx_la-bytecode2llvm.Tpo $(DEPDIR)/libclamavcxx_la-bytecode2llvm.Plo
+ at am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='bytecode2llvm.cpp' object='libclamavcxx_la-bytecode2llvm.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclamavcxx_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libclamavcxx_la-bytecode2llvm.lo `test -f 'bytecode2llvm.cpp' || echo '$(srcdir)/'`bytecode2llvm.cpp
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) clamavcxx-config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) clamavcxx-config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) clamavcxx-config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) clamavcxx-config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @$(am__cd) '$(distuninstallcheck_dir)' \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) clamavcxx-config.h
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: all install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-generic clean-libtool clean-local \
+ clean-noinstLTLIBRARIES ctags dist dist-all dist-bzip2 \
+ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+ distcheck distclean distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags distcleancheck \
+ distdir distuninstallcheck 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-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+$(LLVM_CONFIG): build-llvm
+bytecode2llvm.cpp: build-llvm
+
+build-llvm:
+ +$(GMAKE) -C llvm OPTIMIZE_OPTION=-O2 libs-only
+
+build-llvm-for-check:
+ +$(GMAKE) -C llvm OPTIMIZE_OPTION=-O2 tools-only
+
+clean-local:
+ +$(GMAKE) -C llvm clean
+
+check-llvm: build-llvm-for-check
+ +$(GMAKE) -C llvm check
+ +$(GMAKE) -C llvm unittests
-.DEFAULT:
- $(GMAKE) $@
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libclamav/bytecode2llvm.cpp b/libclamav/c++/bytecode2llvm.cpp
similarity index 99%
rename from libclamav/bytecode2llvm.cpp
rename to libclamav/c++/bytecode2llvm.cpp
index 4b3dc39..a01af44 100644
--- a/libclamav/bytecode2llvm.cpp
+++ b/libclamav/c++/bytecode2llvm.cpp
@@ -51,6 +51,10 @@
#include <csetjmp>
#include <new>
+#include "llvm/Config/config.h"
+#ifndef LLVM_MULTITHREADED
+#error "Multithreading support must be available to LLVM!"
+#endif
#include "clamav.h"
#include "clambc.h"
#include "bytecode_priv.h"
diff --git a/libclamav/c++/configure.ac b/libclamav/c++/configure.ac
new file mode 100644
index 0000000..dd3ecc2
--- /dev/null
+++ b/libclamav/c++/configure.ac
@@ -0,0 +1,90 @@
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+dnl MA 02110-1301, USA.
+
+AC_PREREQ([2.59])
+AC_INIT([libclamavc++],[devel],[http://bugs.clamav.net])
+AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_SRCDIR([llvm/configure])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADER([clamavcxx-config.h])
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE([-Wall -Wportability -Werror foreign no-define])
+AM_SILENT_RULES([yes])
+
+AC_PROG_CXX
+LT_INIT
+if test "$GXX" != "yes"; then
+ AC_MSG_ERROR([GNU C++ compiler not found, not building LLVM])
+fi
+
+AC_CHECK_GNU_MAKE
+if test -z "$llvm_cv_gnu_make_command"; then
+ AC_MSG_ERROR([GNU make not found])
+fi
+GMAKE="$llvm_cv_gnu_make_command"
+AC_SUBST([GMAKE])
+AC_CONFIG_SUBDIRS([llvm])
+AC_ARG_ENABLE([llvm],AC_HELP_STRING([-enable-llvm],
+ [Enable 'llvm' JIT/verifier support @<:@default=auto@:>@]),
+ [enable_llvm=$enableval], [enable_llvm="auto"])
+
+AC_ARG_ENABLE(optimized, AC_HELP_STRING([-enable-optimized],
+ [Compile with optimizations enabled (default is YES)]),
+ enable_optimized=$enableval, enable_optimized=default)
+AM_CONDITIONAL(DEBUG_BUILD,[test "x$enable_optimized" == "xno"])
+
+dnl Set configure args for subdir
+if test "$enable_optimized" = "default"; then
+ ac_configure_args="$ac_configure_args --enable-optimized"
+fi
+ac_configure_args="$ac_configure_args --enable-targets=host-only --enable-bindings=none --enable-libffi=no --without-llvmgcc --without-llvmgxx"
+
+if test "$enable_llvm" = "auto"; then
+ dnl Do some sanity checks, and don't automatically build on platforms
+ dnl that are not supported or have broken compilers.
+ dnl The user can override this by specifying --enable-llvm=yes.
+ gxx_version=`${CXX} -dumpversion` ||
+ AC_MSG_ERROR([Unable to get GNU C++ compiler version])
+ case "${gxx_version}" in
+ [012].*|3.[0123].*)
+ AC_MSG_ERROR([C++ compiler too old (${gxx_version})])
+ ;;
+ 3.4.[012]*|4.0.1*|4.1.[12]*)
+ AC_MSG_ERROR([C++ compiler is buggy])
+ ;;
+ esac
+
+ case "$target_cpu" in
+ i?86|amd64|x86_64|powerpc*)
+ case "$target_os" in
+ darwin*|freebsd*|openbsd*|netbsd*|dragonfly*|linux*|solaris*|win32*|mingw*)
+ ;;
+ *)
+ AC_MSG_ERROR([OS is not supported, not building LLVM])
+ ;;
+ esac
+ ;;
+ alpha*|arm*)
+ AC_MSG_ERROR([CPU support is untested, not building LLVM])
+ ;;
+ *)
+ AC_MSG_ERROR([Unsupported CPU for JIT: $target_cpu, not building LLVM])
+ ;;
+ esac
+fi
+
+AC_OUTPUT([
+ Makefile
+])
diff --git a/m4/check_gnu_make.m4 b/libclamav/c++/m4/check_gnu_make.m4
similarity index 100%
rename from m4/check_gnu_make.m4
rename to libclamav/c++/m4/check_gnu_make.m4
diff --git a/m4/llvm.m4 b/m4/llvm.m4
index eb49887..d4081ba 100644
--- a/m4/llvm.m4
+++ b/m4/llvm.m4
@@ -1,70 +1,11 @@
-AC_DEFUN([AC_CONFIG_LLVM],[
-AC_REQUIRE([AC_PROG_CXX])
-dnl automatically enable LLVM if host environment is supported, and automatically
-dnl disable it if not, unless the user explicitly enables or disables LLVM.
-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" = "auto"; then
- AC_MSG_NOTICE([Checking whether we can build LLVM])
- AC_PROG_CXX([g++])
- if test "$GXX" != "yes"; then
- enable_llvm="no";
- AC_MSG_NOTICE([GNU C++ compiler not found, not building LLVM])
- fi
- gxx_version=`${CXX} -dumpversion`
- if test "$?" -ne 0; then
- enable_llvm="no";
- AC_MSG_NOTICE([Unable to get GNU C++ compiler version, not building LLVM])
- else
- case "${gxx_version}" in
- [012].*|3.[0123].*)
- enable_llvm="no"
- AC_MSG_NOTICE([C++ compiler too old, not building LLVM])
- ;;
- 3.4.[012]*|4.0.1*|4.1.[12]*)
- enable_llvm="no"
- AC_MSG_NOTICE([C++ compiler is buggy, not building LLVM])
- ;;
- *)
- AC_CHECK_GNU_MAKE
- if test -z "$llvm_cv_gnu_make_command"; then
- enable_llvm="no"
- AC_MSG_NOTICE([GNU make not found, not building LLVM])
- else
- case "$target_cpu" in
- i?86|amd64|x86_64|powerpc*)
- case "$target_os" in
- darwin*|freebsd*|openbsd*|netbsd*|dragonfly*|linux*|solaris*|win32*|mingw*)
- enable_llvm="yes"
- AC_MSG_NOTICE([Building LLVM])
- ;;
- *)
- enable_llvm="no"
- AC_MSG_NOTICE([OS is not supported, not building LLVM])
- ;;
- esac
- ;;
- alpha*|arm*)
- enable_llvm="no"
- AC_MSG_NOTICE([CPU support is untested, not building LLVM])
- ;;
- *)
- enable_llvm="no"
- AC_MSG_NOTICE([Unsupported CPU for JIT: $target_cpu, not building LLVM])
- esac
- fi
- esac
- fi
- if test "$enable_llvm" != "yes"; then
- AC_MSG_WARN([LLVM is not supported on your platform, JIT not built])
- fi
-fi
-AM_CONDITIONAL([ENABLE_LLVM],[test "$enable_llvm" = "yes"])
-if test "$enable_llvm" = "yes"; then
- AC_CONFIG_SUBDIRS([./libclamav/c++/llvm])
- GMAKE="$llvm_cv_gnu_make_command"
- AC_SUBST([GMAKE])
- ac_configure_args="$ac_configure_args --enable-targets=host-only --enable-bindings=none --enable-libffi=no --without-llvmgcc --without-llvmgxx --enable-optimized"
-fi
+AC_DEFUN_ONCE([AC_CONFIG_SUBDIRS_OPTIONAL],
+[
+AC_REQUIRE([AC_CONFIG_SUBDIRS])
+subdirfailed=no
+AC_CONFIG_SUBDIRS([$1])
+m4_define([_AC_OUTPUT_SUBDIRS],
+ [
+ m4_pushdef([AC_MSG_ERROR],[subdirfailed=yes])
+ ]m4_defn([_AC_OUTPUT_SUBDIRS])[
+ m4_popdef([AC_MSG_ERROR])])
])
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list