Fix nonportable sed usage which failed on Mac OS X (and probably

other platforms).  Fixes SF#1903612.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10311 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2008-03-17 00:54:46 +00:00
commit 39ad0f01f6
2 changed files with 24 additions and 27 deletions

View file

@ -1,6 +1,10 @@
Version 1.3.35 (in progress) Version 1.3.35 (in progress)
============================ ============================
03/17/2008: olly
Fix nonportable sed usage which failed on Mac OS X (and probably
other platforms). Fixes SF#1903612.
03/17/2008: olly 03/17/2008: olly
Fix memory leak in SWIG's parser (based on patch from Russell Fix memory leak in SWIG's parser (based on patch from Russell
Bryant in SF#1914023).` Bryant in SF#1914023).`

View file

@ -1238,28 +1238,21 @@ else
if test "x$PHP4BIN" = xyes; then if test "x$PHP4BIN" = xyes; then
AC_CHECK_PROGS(PHP4, php5 php php4) AC_CHECK_PROGS(PHP4, php5 php php4)
else else
PHP4="$PHP4BIN" PHP4=$PHP4BIN
fi fi
AC_MSG_CHECKING(for PHP header files) AC_MSG_CHECKING(for PHP header files)
dnl /usr/bin/php5 -> /usr/bin/php-config5 dnl /usr/bin/php5 -> /usr/bin/php-config5
PHP4CONFIG=`echo "$PHP4"|sed 's/\([[45]]\?\)$/-config\1/'` case $PHP4 in
PHP4INC="`$PHP4CONFIG --includes 2>/dev/null`" *[[45]])
if test "$PHP4INC"; then PHP4CONFIG=`echo "$PHP4"|sed 's/\([[45]]\)$/-config\1/'` ;;
*)
PHP4CONFIG=$PHP4-config ;;
esac
PHP4INC=`$PHP4CONFIG --includes 2>/dev/null`
if test -n "$PHP4INC"; then
AC_MSG_RESULT($PHP4INC) AC_MSG_RESULT($PHP4INC)
else else
dirs="/usr/include/php /usr/local/include/php /usr/include/php5 /usr/local/include/php5 /usr/include/php4 /usr/local/include/php4 /usr/local/apache/php"
for i in $dirs; do
echo $i
if test -r $i/php_config.h -o -r $i/php_version.h; then
AC_MSG_RESULT($i)
PHP4EXT="$i"
PHP4INC="-I$PHP4EXT -I$PHP4EXT/Zend -I$PHP4EXT/main -I$PHP4EXT/TSRM"
break
fi
done
fi
if test -z "$PHP4INC"; then
AC_MSG_RESULT(not found) AC_MSG_RESULT(not found)
fi fi