Skip to content

Commit 395e75b

Browse files
author
Jani Taskinen
committed
MFH: Fixed a minor problem in not enabling c++/g++ when not needed.
1 parent fd3b5bc commit 395e75b

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

configure.in

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,10 +1340,14 @@ PHP_CONFIGURE_PART(Configuring libtool)
13401340

13411341
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
13421342

1343-
dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX)
1344-
dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler
1345-
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX])
1346-
AC_DEFUN([AC_PROG_CXX], [])])
1343+
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
1344+
dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
1345+
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
1346+
undefine([AC_PROG_CXX])
1347+
AC_DEFUN([AC_PROG_CXX], [])
1348+
undefine([AC_PROG_CXXCPP])
1349+
AC_DEFUN([AC_PROG_CXXCPP], [])
1350+
])
13471351
AC_PROG_LIBTOOL
13481352

13491353
if test "$enable_debug" != "yes"; then

scripts/phpize.m4

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,14 @@ sinclude(config.m4)
7070
enable_static=no
7171
enable_shared=yes
7272

73-
dnl Only allow AC_PROG_CXX if it's explicitly called (by PHP_REQUIRE_CXX)
74-
dnl otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler
75-
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [AC_PROG_CXX], [undefine([AC_PROG_CXX])
76-
AC_DEFUN([AC_PROG_CXX], [])])
73+
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
74+
dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
75+
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
76+
undefine([AC_PROG_CXX])
77+
AC_DEFUN([AC_PROG_CXX], [])
78+
undefine([AC_PROG_CXXCPP])
79+
AC_DEFUN([AC_PROG_CXXCPP], [])
80+
])
7781
AC_PROG_LIBTOOL
7882

7983
all_targets='$(PHP_MODULES)'

0 commit comments

Comments
 (0)