From 395e75bc5de02a1bc73847212caeb2bd713ae13d Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Fri, 25 Jul 2008 12:36:34 +0000 Subject: [PATCH] MFH: Fixed a minor problem in not enabling c++/g++ when not needed. --- configure.in | 12 ++++++++---- scripts/phpize.m4 | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 560310c7d1..e6a8870469 100644 --- a/configure.in +++ b/configure.in @@ -1340,10 +1340,14 @@ 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], [])]) +dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are 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], [], [ + undefine([AC_PROG_CXX]) + AC_DEFUN([AC_PROG_CXX], []) + undefine([AC_PROG_CXXCPP]) + AC_DEFUN([AC_PROG_CXXCPP], []) +]) AC_PROG_LIBTOOL if test "$enable_debug" != "yes"; then diff --git a/scripts/phpize.m4 b/scripts/phpize.m4 index c8a8102942..9ce50b6c4d 100644 --- a/scripts/phpize.m4 +++ b/scripts/phpize.m4 @@ -70,10 +70,14 @@ 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], [])]) +dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are 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], [], [ + undefine([AC_PROG_CXX]) + AC_DEFUN([AC_PROG_CXX], []) + undefine([AC_PROG_CXXCPP]) + AC_DEFUN([AC_PROG_CXXCPP], []) +]) AC_PROG_LIBTOOL all_targets='$(PHP_MODULES)' -- 2.40.0