From 136f2c70413d5ae0499339ac420552b3b654977b Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Fri, 9 May 2008 11:26:37 +0000 Subject: SWIG now runs the PHP testsuite using PHP5, not PHP4. PHP4 is essentially obsolete now, so we care much more about solid PHP5 support. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10428 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- configure.in | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 8c4453a8a..82d83a4f0 100644 --- a/configure.in +++ b/configure.in @@ -1236,7 +1236,7 @@ if test x"${PHP4BIN}" = xno -o x"${with_alllang}" = xno ; then else if test "x$PHP4BIN" = xyes; then - AC_CHECK_PROGS(PHP4, php5 php php4) + AC_CHECK_PROGS(PHP4, [php5 php]) else PHP4=$PHP4BIN fi @@ -1244,18 +1244,24 @@ else AC_MSG_CHECKING(for PHP header files) dnl /usr/bin/php5 -> /usr/bin/php-config5 case $PHP4 in - *[[45]]) - PHP4CONFIG=`echo "$PHP4"|sed 's/\([[45]]\)$/-config\1/'` ;; + *5) + PHP4CONFIG=`echo "$PHP4"|sed 's/5$/-config5/'` ;; *) PHP4CONFIG=$PHP4-config ;; esac - PHP4INC=`$PHP4CONFIG --includes 2>/dev/null` - if test -n "$PHP4INC"; then - AC_MSG_RESULT($PHP4INC) - else - AC_MSG_RESULT(not found) - fi - + php_version=`$PHP4CONFIG --version 2>/dev/null` + case $php_version in + 5*) + PHP4INC=`$PHP4CONFIG --includes 2>/dev/null` + if test -n "$PHP4INC"; then + AC_MSG_RESULT($PHP4INC) + else + AC_MSG_RESULT(not found) + fi + ;; + *) + AC_MSG_RESULT([found PHP $version, but only PHP 5 is supported]) ;; + esac fi AC_SUBST(PHP4) AC_SUBST(PHP4INC) -- cgit v1.2.3