From: Michael Wallner Date: Tue, 8 Nov 2005 21:24:16 +0000 (+0000) Subject: install tweaks X-Git-Tag: RELEASE_0_18_0~23 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=86508dbae5f9296485820e654f07af59be55003f;p=m6w6%2Fext-http install tweaks --- diff --git a/Makefile.frag b/Makefile.frag index 65547b8..4801986 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -3,7 +3,7 @@ phpincludedir=$(prefix)/include/php install-http-headers: @echo "Installing HTTP headers: $(INSTALL_ROOT)$(phpincludedir)/ext/http/" @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/http - @for f in $(HTTP_HEADER_FILES); do \ + @for f in $(PHP_HTTP_HEADERS); do \ if test -f "$(top_srcdir)/$$f"; then \ $(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/http; \ elif test -f "$(top_builddir)/$$f"; then \ @@ -13,7 +13,7 @@ install-http-headers: elif test -f "$(top_builddir)/ext/http/$$f"; then \ $(INSTALL_DATA) $(top_builddir)/ext/http/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/http; \ else \ - echo "WTF? $f $$f"; \ + echo "WTF? $$f"; \ fi \ done; diff --git a/config.m4 b/config.m4 index 7582cd9..403fafa 100644 --- a/config.m4 +++ b/config.m4 @@ -195,19 +195,16 @@ dnl ---- PHP_ADD_BUILD_DIR($ext_builddir/phpstr, 1) PHP_SUBST([HTTP_SHARED_LIBADD]) - HTTP_HEADER_FILES="php_http_std_defs.h php_http.h php_http_api.h php_http_cache_api.h \ + PHP_HTTP_HEADERS="php_http_std_defs.h php_http.h php_http_api.h php_http_cache_api.h \ php_http_date_api.h php_http_headers_api.h php_http_info_api.h php_http_message_api.h \ php_http_request_api.h php_http_request_method_api.h php_http_send_api.h php_http_url_api.h \ - php_http_encodig_api.h" - PHP_SUBST([HTTP_HEADER_FILES]) + php_http_encoding_api.h phpstr/phpstr.h" + PHP_SUBST([PHP_HTTP_HEADERS]) - ifdef([PHP_INSTALL_HEADERS], - [ - PHP_INSTALL_HEADERS(ext/http, $HTTP_HEADER_FILES) - PHP_INSTALL_HEADERS(ext/http/phpstr, [phpstr/phpstr.h]) - ], [ - PHP_ADD_MAKEFILE_FRAGMENT - ]) + dnl outside src dir + PHP_ADD_MAKEFILE_FRAGMENT + dnl within src dir + ifdef([PHP_INSTALL_HEADERS], [PHP_INSTALL_HEADERS(ext/http, $PHP_HTTP_HEADER_FILES)], [ ]) AC_DEFINE([HAVE_HTTP], [1], [Have extended HTTP support]) fi 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