diff options
-rw-r--r-- | acinclude.m4 | 6 | ||||
-rw-r--r-- | pear/Makefile.in | 5 | ||||
-rw-r--r-- | pear/pear.m4 | 10 | ||||
-rw-r--r-- | pear/php-config.in | 5 |
4 files changed, 19 insertions, 7 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index d5ac7d73f1..9d91db8206 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -36,6 +36,12 @@ no) ;; esac +if test "$php_always_shared"; then + ext_output="yes, shared" + ext_shared=yes + test "[$]$1" = "no" && $1=yes +fi + AC_MSG_RESULT($ext_output) ]) diff --git a/pear/Makefile.in b/pear/Makefile.in index eee0959b33..9cb637144c 100644 --- a/pear/Makefile.in +++ b/pear/Makefile.in @@ -48,6 +48,7 @@ install-build: sed \ -e 's#@PREFIX@#$(prefix)#' \ -e 's#@PHPINCLUDEDIR@#$(phpincludedir)#g' \ + -e 's#@EXTENSION_DIR@#$(EXTENSION_DIR)#g' \ < $(srcdir)/php-config.in > $(bindir)/php-config.tmp && \ chmod +x $(bindir)/php-config.tmp && \ mv $(bindir)/php-config.tmp $(bindir)/php-config && \ @@ -67,6 +68,6 @@ install-headers: $(mkinstalldirs) $$paths && \ echo "creating header file hierarchy" && \ for i in $(HEADER_DIRS); do \ - cd $(top_srcdir)/$$i && cp -p *.h $(phpincludedir)/$$i; \ - cd $(top_builddir)/$$i && cp -p *.h $(phpincludedir)/$$i; \ + (cd $(top_srcdir)/$$i && cp -p *.h $(phpincludedir)/$$i; \ + cd $(top_builddir)/$$i && cp -p *.h $(phpincludedir)/$$i) 2>/dev/null || true; \ done diff --git a/pear/pear.m4 b/pear/pear.m4 index 12ec94f6e6..5c2b9f2725 100644 --- a/pear/pear.m4 +++ b/pear/pear.m4 @@ -11,14 +11,17 @@ AC_DEFUN(PHP_WITH_PHP_CONFIG,[ prefix=`$PHP_CONFIG --prefix 2>/dev/null` INCLUDES=`$PHP_CONFIG --includes 2>/dev/null` + EXTENSION_DIR=`$PHP_CONFIG --extension-dir` if test -z "$prefix"; then AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=[PATH]) fi - AC_MSG_CHECKING(PHP prefix) + AC_MSG_CHECKING(for PHP prefix) AC_MSG_RESULT($prefix) - AC_MSG_CHECKING(PHP includes) + AC_MSG_CHECKING(for PHP includes) AC_MSG_RESULT($INCLUDES) + AC_MSG_CHECKING(for PHP extension directory) + AC_MSG_RESULT($EXTENSION_DIR) ]) php_always_shared=yes @@ -44,8 +47,6 @@ phplibdir="`pwd`/modules" test "$prefix" = "NONE" && prefix="/usr/local" test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)' -EXTENSION_DIR="$prefix/lib/php/modules" - PHP_SUBST(prefix) PHP_SUBST(exec_prefix) PHP_SUBST(libdir) @@ -75,6 +76,7 @@ PHP_FAST_OUTPUT(Makefile) PHP_FAST_GENERATE test -d modules || mkdir modules +touch .deps AC_CONFIG_HEADER(php_config.h) diff --git a/pear/php-config.in b/pear/php-config.in index 5058c75e1c..cdd375b2dc 100644 --- a/pear/php-config.in +++ b/pear/php-config.in @@ -2,14 +2,17 @@ prefix='@PREFIX@' includes='-I@PHPINCLUDEDIR@ -I@PHPINCLUDEDIR@/Zend -I@PHPINCLUDEDIR@/TSRM' +extension_dir='@EXTENSION_DIR@' case "$1" in --prefix) echo $prefix;; --includes) echo $includes;; +--extension-dir) + echo $extension_dir;; *) - echo "Usage: $0 [--prefix|--includes]" + echo "Usage: $0 [--prefix|--includes|--extension-dir]" exit 1;; esac |