summaryrefslogtreecommitdiff
path: root/scripts/phpize.m4
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/phpize.m4')
-rw-r--r--scripts/phpize.m44
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/phpize.m4 b/scripts/phpize.m4
index be7f436fd2..6e7a131c37 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)'