diff options
author | Sascha Schumann <sas@php.net> | 2000-05-02 20:10:46 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-05-02 20:10:46 +0000 |
commit | 5989ae5dc15ad6823d702b3545f623d30ec90449 (patch) | |
tree | 16b5bb2acb5ac41751bf7322c58512c1974a8cec /pear | |
parent | 733d94909f44954f95ac2e49a2eb4bac4ae1bf7f (diff) | |
download | php-git-5989ae5dc15ad6823d702b3545f623d30ec90449.tar.gz |
Fix building external extensions.
Diffstat (limited to 'pear')
-rw-r--r-- | pear/Makefile.in | 32 | ||||
-rw-r--r-- | pear/pear.m4 | 9 | ||||
-rw-r--r-- | pear/phpize.in | 19 |
3 files changed, 25 insertions, 35 deletions
diff --git a/pear/Makefile.in b/pear/Makefile.in index 77a20bd132..eee0959b33 100644 --- a/pear/Makefile.in +++ b/pear/Makefile.in @@ -32,6 +32,7 @@ BUILD_FILES = \ build/rules_pear.mk \ build/dynlib.mk \ build/shtool \ + dynlib.m4 \ acinclude.m4 install-build: @@ -52,27 +53,8 @@ install-build: mv $(bindir)/php-config.tmp $(bindir)/php-config && \ cp $(srcdir)/phpextdist $(bindir)/phpextdist -SRC_HEADERS = \ - php.h \ - php_regex.h \ - php3_compat.h \ - safe_mode.h \ - fopen-wrappers.h \ - php_version.h \ - php_globals.h \ - php_reentrancy.h \ - php_ini.h \ - SAPI.h - -BUILD_HEADERS = \ - php_config.h \ - Zend/zend_config.h \ - build-defs.h - -STANDARD_HEADERS = \ - php_output.h - HEADER_DIRS = \ + / \ Zend \ TSRM \ ext/standard \ @@ -84,9 +66,7 @@ install-headers: done; \ $(mkinstalldirs) $$paths && \ echo "creating header file hierarchy" && \ - (cd $(top_srcdir) && cp $(SRC_HEADERS) $(phpincludedir)) && \ - (cd $(top_srcdir)/ext/standard && cp *.h $(phpincludedir)/ext/standard) && \ - (cd $(top_srcdir) && cp regex/regex.h regex/regex_extra.h $(phpincludedir)/regex) && \ - (cd $(top_srcdir) && cp TSRM/TSRM.h $(phpincludedir)/TSRM) && \ - (cd $(top_srcdir)/Zend && cp *.h $(phpincludedir)/Zend) && \ - (cd $(top_builddir) && cp $(BUILD_HEADERS) $(phpincludedir)) + for i in $(HEADER_DIRS); do \ + cd $(top_srcdir)/$$i && cp -p *.h $(phpincludedir)/$$i; \ + cd $(top_builddir)/$$i && cp -p *.h $(phpincludedir)/$$i; \ + done diff --git a/pear/pear.m4 b/pear/pear.m4 index fc552e4acb..12ec94f6e6 100644 --- a/pear/pear.m4 +++ b/pear/pear.m4 @@ -37,13 +37,15 @@ enable_shared=yes AC_PROG_LIBTOOL -SHLIBTOOL='$(LIBTOOL)' +SHARED_LIBTOOL='$(LIBTOOL)' PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<' 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) @@ -57,13 +59,14 @@ PHP_SUBST(CPP) PHP_SUBST(CPPFLAGS) PHP_SUBST(CXX) PHP_SUBST(DEFS) +PHP_SUBST(EXTENSION_DIR) PHP_SUBST(EXTRA_LDFLAGS) PHP_SUBST(EXTRA_LIBS) PHP_SUBST(INCLUDES) PHP_SUBST(LEX) PHP_SUBST(LEX_OUTPUT_ROOT) PHP_SUBST(LFLAGS) -PHP_SUBST(SHLIBTOOL) +PHP_SUBST(SHARED_LIBTOOL) PHP_SUBST(LIBTOOL) PHP_SUBST(SHELL) @@ -71,6 +74,8 @@ PHP_FAST_OUTPUT(Makefile) PHP_FAST_GENERATE +test -d modules || mkdir modules + AC_CONFIG_HEADER(php_config.h) AC_OUTPUT() diff --git a/pear/phpize.in b/pear/phpize.in index ac4424dd1c..ac29166a7e 100644 --- a/pear/phpize.in +++ b/pear/phpize.in @@ -1,24 +1,29 @@ #! /bin/sh prefix='@PREFIX@' - phpdir="$prefix/lib/php/build" +builddir="`pwd`" +FILES_BUILD="dynlib.mk fastgen.sh library.mk ltlib.mk program.mk rules.mk rules_pear.mk shtool" +FILES="acinclude.m4 dynlib.m4" + +if test ! -r config.m4; then + echo "Cannot find config.m4. " + echo "Make sure that you run $0 in the top level source directory of the module" + exit 1 +fi test -d build || mkdir build -for i in fastgen.sh library.mk ltlib.mk program.mk rules.mk rules_pear.mk shtool; do - cp $phpdir/$i build -done +(cd $phpdir && cp $FILES_BUILD $builddir/build) +(cd $phpdir && cp $FILES $builddir) mv build/rules_pear.mk build/rules.mk -cp $phpdir/acinclude.m4 . - sed \ -e "s#@prefix@#$prefix#" \ < $phpdir/pear.m4 > configure.in -touch .deps install-sh mkinstalldirs missing +touch install-sh mkinstalldirs missing aclocal autoconf |