summaryrefslogtreecommitdiff
path: root/bindings/swig/package/php4.m4
blob: 3b5ea8b16879bb3505938e628ea3840cf02cc19e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#-------------------------------------------------------------------------
# Look for Php4
#-------------------------------------------------------------------------

AC_DEFUN([SW_FIND_PHP4],
[

PHP4BIN=

AC_ARG_WITH(php4,[  --with-php4=path	  Set location of PHP4 executable],[ PHP4BIN="$withval"], [PHP4BIN=])

if test -z "$PHP4BIN"; then
AC_PATH_PROGS(PHP4, php php4)
else
PHP4="$PHP4BIN"
fi
AC_MSG_CHECKING(for PHP4 header files)
dirs="/usr/include/php /usr/local/include/php /usr/local/apache/php /usr/include/php4 /usr/local/include/php4 /usr/local/apache/php4"
for i in $dirs; do
	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
if test -z "$PHP4INC"; then
	AC_MSG_RESULT(not found)
fi

AC_SUBST(PHP4INC)
	
])