diff options
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | scripts/phpize.m4 | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 02c6f28c9c..64abaac54e 100644 --- a/configure.in +++ b/configure.in @@ -1156,7 +1156,13 @@ PHP_HELP_SEPARATOR([Libtool:]) PHP_CONFIGURE_PART(Configuring libtool) LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS" + +dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX) +dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler +AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX]) +AC_DEFUN([AC_PROG_CXX], [])]) AC_PROG_LIBTOOL + if test "$enable_debug" != "yes"; then PHP_SET_LIBTOOL_VARIABLE([--silent]) fi diff --git a/scripts/phpize.m4 b/scripts/phpize.m4 index 28f6913b84..a46dc8bc85 100644 --- a/scripts/phpize.m4 +++ b/scripts/phpize.m4 @@ -68,6 +68,10 @@ sinclude(config.m4) enable_static=no enable_shared=yes +dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX) +dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler +AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX]) +AC_DEFUN([AC_PROG_CXX], [])]) AC_PROG_LIBTOOL all_targets='$(PHP_MODULES)' |