aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2008-05-09 11:26:37 +0000
committerOlly Betts <olly@survex.com>2008-05-09 11:26:37 +0000
commit136f2c70413d5ae0499339ac420552b3b654977b (patch)
tree798a3aa0689c8a242965e047dc6401990d070da6 /configure.in
parent1f38f3db674e35b55e3e1e375141d3fd6eaf6056 (diff)
downloadswig-136f2c70413d5ae0499339ac420552b3b654977b.tar.gz
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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in26
1 files changed, 16 insertions, 10 deletions
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)