- Fixed ZTS build
[m6w6/ext-http] / rebuild
1 #!/bin/bash
2 rm -f warnings
3
4 if test -d "$1"; then
5 PREFIX=$1
6 shift
7 else
8 PREFIX=`dirname $(dirname $(which php-config))`
9 fi
10
11 echo "Using prefix '$PREFIX' for phpize and php-config!"
12
13 echo -n "executing phpize... "
14 ${PREFIX}/bin/phpize 2>&1 >/dev/null
15 if test $? -ne 0 ; then
16 echo "FAILED!"
17 exit 1
18 fi
19 echo "DONE"
20
21 echo -n "configuring... "
22 CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wfloat-equal -Wdeclaration-after-statement -Wundef -Wbad-function-cast -Wcast-align -Wmissing-field-initializers -Wnested-externs" \
23 ./configure --with-php-config=${PREFIX}/bin/php-config $@ >/dev/null
24 if test $? -ne 0 ; then
25 echo "FAILED!"
26 exit 1
27 fi
28 echo "DONE"
29
30 echo -n "building... "
31 make clean all 2>warnings >/dev/null
32 if test $? -ne 0 ; then
33 echo "FAILED!"
34 else
35 echo "DONE"
36 fi
37
38 if test -s warnings; then
39 grep -E "^/.+http" warnings
40 fi
41