[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:01:44 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 441eaf95d08aeb5d2b50f46f97275a858842cb46
Author: Török Edvin <edwin at clamav.net>
Date: Mon Aug 24 19:39:25 2009 +0300
Add llvm autoconf glue.
diff --git a/configure.in b/configure.in
index 7fbcfc2..6bbcea7 100644
--- a/configure.in
+++ b/configure.in
@@ -351,6 +351,8 @@ main (void)
], [AC_MSG_RESULT([ok, bug not present])],
[AC_MSG_ERROR([your compiler has gcc PR37573 bug, use a lower optimization level (-O1 or -O2), see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37573])], [AC_MSG_RESULT([cross-compiling, assumed ok])])
+AC_CONFIG_LLVM
+
dnl Linker feature checks
dnl check for version script support in the linker (GNU ld, or Solaris ld style)
AC_CACHE_CHECK([for ld --version-script], [ac_cv_ld_version_script], [dnl
@@ -1582,6 +1584,8 @@ AM_CONDITIONAL([HAVE_CURSES],
AC_OUTPUT([
libclamav/Makefile
+libclamav/llvm/Makefile
+libclamav/llvm/GNUmakefile
clamscan/Makefile
database/Makefile
docs/Makefile
diff --git a/libclamav/llvm/GNUmakefile.in b/libclamav/llvm/GNUmakefile.in
new file mode 100644
index 0000000..cde2dc8
--- /dev/null
+++ b/libclamav/llvm/GNUmakefile.in
@@ -0,0 +1,11 @@
+all: build-llvm
+
+build-llvm:
+ $(MAKE) -C llvm ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2 libs-only
+
+build-llvm-for-check:
+ $(MAKE) -C llvm ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2 tools-only
+
+check: build-llvm-for-check
+ $(MAKE) -C llvm check
+ $(MAKE) -C llvm unittests
diff --git a/libclamav/llvm/Makefile.in b/libclamav/llvm/Makefile.in
new file mode 100644
index 0000000..f3ae4bd
--- /dev/null
+++ b/libclamav/llvm/Makefile.in
@@ -0,0 +1,5 @@
+# Run LLVM build with GNU make
+GMAKE = @GMAKE@
+
+.DEFAULT:
+ $(GMAKE) $@
diff --git a/libclamav/llvm/TODO.CLAMAV b/libclamav/llvm/TODO.CLAMAV
new file mode 100644
index 0000000..c1f5324
--- /dev/null
+++ b/libclamav/llvm/TODO.CLAMAV
@@ -0,0 +1 @@
+Convert to clamav's build system.
diff --git a/libclamav/llvm/llvm/autoconf/m4/check_gnu_make.m4 b/m4/check_gnu_make.m4
similarity index 100%
copy from libclamav/llvm/llvm/autoconf/m4/check_gnu_make.m4
copy to m4/check_gnu_make.m4
diff --git a/m4/llvm.m4 b/m4/llvm.m4
new file mode 100644
index 0000000..bb292fc
--- /dev/null
+++ b/m4/llvm.m4
@@ -0,0 +1,69 @@
+AC_DEFUN([AC_CONFIG_LLVM],[
+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])
+ if test -z "$CXX"; then
+ AC_CHECK_TOOLS(GXX,[g++ c++ cxx])
+ else
+ GXX="$CXX";
+ fi
+ gxx_version=`${GXX} -dumpversion`
+ if test "$?" -ne 0; then
+ enable_llvm="no";
+ AC_MSG_NOTICE([GNU C++ compiler not found, 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/llvm/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
+])
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list