@@ -1087,22 +1087,30 @@ else
10871087 if test "x$use_swig" != "xYes"; then
10881088 use_php="No (swig not available)"
10891089 else
1090- if test `$SWIG -php5 2>&1 | $EGREP -c 'Unable'` -eq 1; then
1091- SWIG_PHP_OPT='-php'
1090+ if test `$SWIG -php7 2>&1 | $EGREP -c 'Unable'` -eq 1; then
1091+ if test `$SWIG -php5 2>&1 | $EGREP -c 'Unable'` -eq 1; then
1092+ SWIG_PHP_OPT='-php'
1093+ else
1094+ SWIG_PHP_OPT='-php5'
1095+ fi
10921096 else
1093- SWIG_PHP_OPT='-php5 '
1097+ SWIG_PHP_OPT='-php7 '
10941098 fi
10951099 if test `$SWIG -help 2>&1 | $EGREP -c '\-php5* *- Generate'` = 0 ; then
10961100 use_php="No (swig does not support -php or -php5 option)"
10971101 else
1098- AC_CHECK_PROGS ( PHP ,php5 php )
1102+ AC_CHECK_PROGS ( PHP ,php7 , php , php5 )
10991103 if test "x$PHP" = "x"; then
11001104 use_php="No (php not available)"
11011105 else
1102- if test -d /usr/include/php5 ; then
1103- PHP_INCLUDES="-I/usr/include/php5 -I/usr/include/php5 /main -I/usr/include/php5 /Zend -I/usr/include/php5 /TSRM"
1106+ if test -d /usr/include/php7 ; then
1107+ PHP_INCLUDES="-I/usr/include/php7 -I/usr/include/php7 /main -I/usr/include/php7 /Zend -I/usr/include/php7 /TSRM"
11041108 else
1105- PHP_INCLUDES="-I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib"
1109+ if test -d /usr/include/php5; then
1110+ PHP_INCLUDES="-I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/Zend -I/usr/include/php5/TSRM"
1111+ else
1112+ PHP_INCLUDES="-I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib"
1113+ fi
11061114 fi
11071115 PHP_INSTALL_DIR="/usr/lib${LIBPOSTFIX}/php/modules"
11081116 PHP_INSTALL_DATADIR="/usr/share/php"
0 commit comments