mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-11-10 04:51:03 +00:00
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.
11 lines
280 B
Text
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])])
|
|
])
|