clamav/m4/llvm.m4
Török Edvin 2c7d5adc15 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.
2009-08-31 15:49:41 +03:00

11 lines
280 B
Text

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])])
])