X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=rebuild;fp=rebuild;h=569b3fccd09edb36fee2a0e9e694fcbbf030c8de;hp=2506a9b6a50d6afa2ce549b5a0b6e72229aad6a3;hb=86508dbae5f9296485820e654f07af59be55003f;hpb=8d25696948ed61d50c417275222117f43069ddd1 diff --git a/rebuild b/rebuild index 2506a9b..569b3fc 100755 --- a/rebuild +++ b/rebuild @@ -1,8 +1,16 @@ #!/bin/bash rm -f warnings +if test -d "$1"; then + PREFIX=$1 +else + PREFIX=/usr +fi + +echo "Using prefix '$PREFIX' for phpize and php-config!" + echo -n "executing phpize... " -phpize 2>&1 >/dev/null +${PREFIX}/bin/phpize 2>&1 >/dev/null if test $? -ne 0 ; then echo "FAILED!" exit 1 @@ -11,7 +19,7 @@ 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 $@ >/dev/null + ./configure --with-php-config=${PREFIX}/bin/php-config $2 >/dev/null if test $? -ne 0 ; then echo "FAILED!" exit 1 @@ -19,7 +27,7 @@ fi echo "DONE" echo -n "building... " -make clean install 2>warnings >/dev/null +make clean all 2>warnings >/dev/null if test $? -ne 0 ; then echo "FAILED!" else