install tweaks
authorMichael Wallner <mike@php.net>
Tue, 8 Nov 2005 21:24:16 +0000 (21:24 +0000)
committerMichael Wallner <mike@php.net>
Tue, 8 Nov 2005 21:24:16 +0000 (21:24 +0000)
Makefile.frag
config.m4
rebuild

index 65547b8654b9ff6262437988d145a469bea53a23..480198627ffed62911ab0155654d21e13e024552 100644 (file)
@@ -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;
 
index 7582cd9d76d1b446d2f15e3579335834d4fa83d7..403fafa5765519cd221e43c8ff7232af4f9622aa 100644 (file)
--- 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 2506a9b6a50d6afa2ce549b5a0b6e72229aad6a3..569b3fccd09edb36fee2a0e9e694fcbbf030c8de 100755 (executable)
--- 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