if test -d "$1"; then
PREFIX=$1
+ shift
else
- PREFIX=/opt
+ PREFIX=`dirname $(dirname $(which php-config))`
fi
echo "Using prefix '$PREFIX' for phpize and php-config!"
echo -n "configuring... "
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 $2 >/dev/null
+ ./configure --with-php-config=${PREFIX}/bin/php-config $@ >/dev/null
if test $? -ne 0 ; then
echo "FAILED!"
exit 1