summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-11-21 23:08:02 +0000
committerfoobar <sniper@php.net>2005-11-21 23:08:02 +0000
commit7243d31ae025ee68fd19dc916f30d0e691a3293e (patch)
tree099c1835aa8881ab9aaadd8f7d3ec58e69d45b37 /scripts
parent19ea8abd0979399878703c2f894dd82ee96907db (diff)
downloadphp-git-7243d31ae025ee68fd19dc916f30d0e691a3293e.tar.gz
MFH: - Fixed header installing under phpize builds
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.frag19
-rw-r--r--scripts/man1/php-config.1.in4
-rw-r--r--scripts/php-config.in4
-rw-r--r--scripts/phpize.m47
4 files changed, 13 insertions, 21 deletions
diff --git a/scripts/Makefile.frag b/scripts/Makefile.frag
index 61783d777d..632cbb00d7 100644
--- a/scripts/Makefile.frag
+++ b/scripts/Makefile.frag
@@ -31,25 +31,6 @@ install-build:
$(INSTALL) $(BUILD_FILES_EXEC) $(INSTALL_ROOT)$(phpbuilddir) && \
$(INSTALL_DATA) $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir))
-install-headers:
- -@for i in $(INSTALL_HEADERS); do \
- i=`$(top_srcdir)/build/shtool path -d $$i`; \
- paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
- done; \
- $(mkinstalldirs) $$paths && \
- echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
- for i in $(INSTALL_HEADERS); do \
- if test -f "$(top_srcdir)/$$i"; then \
- $(INSTALL_DATA) $(top_srcdir)/$$i $(INSTALL_ROOT)$(phpincludedir)/$$i; \
- elif test -f "$(top_builddir)/$$i"; then \
- $(INSTALL_DATA) $(top_builddir)/$$i $(INSTALL_ROOT)$(phpincludedir)/$$i; \
- else \
- (cd $(top_srcdir)/$$i && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
- cd $(top_builddir)/$$i && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
- fi \
- done; \
- cd $(top_srcdir)/sapi/embed && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/main
-
install-programs: $(builddir)/phpize $(builddir)/php-config
@echo "Installing helper programs: $(INSTALL_ROOT)$(bindir)/"
@for prog in $(bin_SCRIPTS); do \
diff --git a/scripts/man1/php-config.1.in b/scripts/man1/php-config.1.in
index bdc5654785..c4a6998f9a 100644
--- a/scripts/man1/php-config.1.in
+++ b/scripts/man1/php-config.1.in
@@ -51,6 +51,10 @@ Extra libraries which PHP was compiled with
Directory where extensions are searched by default
.TP
.PD 0
+.B \-\-include-dir
+Directory prefix where header files are installed by default
+.TP
+.PD 0
.B \-\-php-binary
Full path to php CLI/CGI binary
.TP
diff --git a/scripts/php-config.in b/scripts/php-config.in
index 8c5a0a55df..593f28edca 100644
--- a/scripts/php-config.in
+++ b/scripts/php-config.in
@@ -24,12 +24,14 @@ case "$1" in
echo $libs;;
--extension-dir)
echo $extension_dir;;
+--include-dir)
+ echo $includedir;;
--php-binary)
echo $php_binary;;
--version)
echo $version;;
*)
- echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--php-binary|--version]"
+ echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--include-dir|--php-binary|--version]"
exit 1;;
esac
diff --git a/scripts/phpize.m4 b/scripts/phpize.m4
index 87531ca675..62618f7ee7 100644
--- a/scripts/phpize.m4
+++ b/scripts/phpize.m4
@@ -16,6 +16,7 @@ AC_DEFUN([PHP_WITH_PHP_CONFIG],[
])
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
+ phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null`
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
PHP_EXECUTABLE=`$PHP_CONFIG --php-binary`
@@ -33,6 +34,8 @@ AC_DEFUN([PHP_WITH_PHP_CONFIG],[
AC_MSG_RESULT($INCLUDES)
AC_MSG_CHECKING(for PHP extension directory)
AC_MSG_RESULT($EXTENSION_DIR)
+ AC_MSG_CHECKING(for PHP installed headers prefix)
+ AC_MSG_RESULT($phpincludedir)
])
dnl
AC_DEFUN([PHP_EXT_BUILDDIR],[.])dnl
@@ -74,7 +77,7 @@ enable_shared=yes
AC_PROG_LIBTOOL
all_targets='$(PHP_MODULES)'
-install_targets=install-modules
+install_targets="install-modules install-headers"
phplibdir="`pwd`/modules"
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
CFLAGS_CLEAN='$(CFLAGS)'
@@ -91,6 +94,7 @@ PHP_SUBST(exec_prefix)
PHP_SUBST(libdir)
PHP_SUBST(prefix)
PHP_SUBST(phplibdir)
+PHP_SUBST(phpincludedir)
PHP_SUBST(CC)
PHP_SUBST(CFLAGS)
@@ -109,6 +113,7 @@ PHP_SUBST(LDFLAGS)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(LIBTOOL)
PHP_SUBST(SHELL)
+PHP_SUBST(INSTALL_HEADERS)
PHP_GEN_BUILD_DIRS
PHP_GEN_GLOBAL_MAKEFILE