branch off v1 as R_1_7
[m6w6/ext-http] / rebuild
diff --git a/rebuild b/rebuild
index 569b3fccd09edb36fee2a0e9e694fcbbf030c8de..e32fd35e55754396d7b4c356c86db9e42dfccb52 100755 (executable)
--- a/rebuild
+++ b/rebuild
@@ -3,8 +3,9 @@ rm -f warnings
 
 if test -d "$1"; then
     PREFIX=$1
+    shift
 else
-    PREFIX=/usr
+    PREFIX=`dirname $(dirname $(which php-config))`
 fi
 
 echo "Using prefix '$PREFIX' for phpize and php-config!"
@@ -18,8 +19,8 @@ fi
 echo "DONE"
 
 echo -n "configuring... "
-CFLAGS="-W -Wchar-subscripts -Wformat=2 -Wno-format-y2k -Wimplicit -Wmissing-braces -Wunused-variable  -Wbad-function-cast -Wpointer-arith -Wsign-compare -Winline" \
-    ./configure --with-php-config=${PREFIX}/bin/php-config $2 >/dev/null
+CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wfloat-equal -Wdeclaration-after-statement -Wundef -Wbad-function-cast -Wcast-align -Wmissing-field-initializers -Wnested-externs" \
+    ./configure --with-php-config=${PREFIX}/bin/php-config $@ >/dev/null
 if test $? -ne 0 ; then
     echo "FAILED!"
     exit 1
@@ -35,6 +36,6 @@ else
 fi
 
 if test -s warnings; then
-    cat warnings
+    grep -E "^/.+http" warnings
 fi