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 \
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;
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
#!/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
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
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