diff options
| author | Sascha Schumann <sas@php.net> | 1999-12-30 02:59:53 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 1999-12-30 02:59:53 +0000 |
| commit | f2f8d38efa3ccbaa05affaf8fcab24786ef452de (patch) | |
| tree | c546807d61a77a191f89056212a4c40c63f0e83b /pear | |
| parent | 6bf3529919cf60389797a107cab16c826df3e68f (diff) | |
| download | php-git-f2f8d38efa3ccbaa05affaf8fcab24786ef452de.tar.gz | |
Integration of -ng changes. Changes:
- added support for externally built modules,
- improved support for in-tree shared modules,
- fixed diversion bugs,
- configure displays some informative messages,
- faster static build
(libtool isn't used anymore for compiling non-PIC objects),
- dependencies comparable to automake's without requiring GNU make or GCC,
- working make clean for non-GNU makes.
Diffstat (limited to 'pear')
| -rw-r--r-- | pear/Makefile.am | 10 | ||||
| -rw-r--r-- | pear/Makefile.in | 89 | ||||
| -rw-r--r-- | pear/pear.m4 | 76 | ||||
| -rw-r--r-- | pear/php-config.in | 16 | ||||
| -rw-r--r-- | pear/phpize.in | 26 |
5 files changed, 207 insertions, 10 deletions
diff --git a/pear/Makefile.am b/pear/Makefile.am deleted file mode 100644 index cf92330f7d..0000000000 --- a/pear/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -peardir=$(prefix)/lib/php -pear_DBdir=$(prefix)/lib/php/DB - -install-data-local: - -$(mkinstalldirs) $(peardir) $(pear_DBdir) && \ - $(INSTALL_DATA) $(srcdir)/DB.php $(peardir) && \ - $(INSTALL_DATA) $(srcdir)/DB/common.php $(pear_DBdir) && \ - $(INSTALL_DATA) $(srcdir)/DB/odbc.php $(pear_DBdir) && \ - $(INSTALL_DATA) $(srcdir)/DB/mysql.php $(pear_DBdir) diff --git a/pear/Makefile.in b/pear/Makefile.in new file mode 100644 index 0000000000..3074fc69d1 --- /dev/null +++ b/pear/Makefile.in @@ -0,0 +1,89 @@ + +DEPTH = .. +topsrcdir = @topsrcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +install_targets = install-data-local install-headers install-build + +include $(topsrcdir)/build/rules.mk + +peardir=$(prefix)/lib/php +pear_DBdir=$(prefix)/lib/php/DB + + +install-data-local: + -@$(mkinstalldirs) $(peardir) $(pear_DBdir) && \ + $(INSTALL_DATA) $(srcdir)/DB.php $(peardir) && \ + $(INSTALL_DATA) $(srcdir)/DB/common.php $(pear_DBdir) && \ + $(INSTALL_DATA) $(srcdir)/DB/odbc.php $(pear_DBdir) && \ + $(INSTALL_DATA) $(srcdir)/DB/mysql.php $(pear_DBdir) + +phpincludedir = $(includedir)/php +builddir = $(prefix)/lib/php/build + +BUILD_FILES = \ + pear/pear.m4 \ + build/fastgen.sh \ + build/library.mk \ + build/ltlib.mk \ + build/program.mk \ + build/rules.mk \ + build/rules_pear.mk \ + build/shtool \ + acinclude.m4 + +install-build: + -@$(mkinstalldirs) $(builddir) $(bindir) && \ + (cd $(topsrcdir) && cp $(BUILD_FILES) $(builddir)) && \ + echo "creating phpize" && \ + sed \ + -e 's#@PREFIX@#$(prefix)#' \ + < $(srcdir)/phpize.in > $(bindir)/phpize && \ + chmod +x $(bindir)/phpize && \ + echo "creating php-config" && \ + sed \ + -e 's#@PREFIX@#$(prefix)#' \ + -e 's#@PHPINCLUDEDIR@#$(phpincludedir)#g' \ + < $(srcdir)/php-config.in > $(bindir)/php-config && \ + chmod +x $(bindir)/php-config + +SRC_HEADERS = \ + php.h \ + php_regex.h \ + request_info.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 \ + regex + +install-headers: + -@for i in $(HEADER_DIRS); do \ + paths="$$paths $(phpincludedir)/$$i"; \ + done; \ + $(mkinstalldirs) $$paths && \ + echo "creating header file hierarchy" && \ + (cd $(topsrcdir) && cp $(SRC_HEADERS) $(phpincludedir)) && \ + (cd $(topsrcdir)/ext/standard && cp *.h $(phpincludedir)/ext/standard) && \ + (cd $(topsrcdir) && cp regex/regex.h regex/regex_extra.h $(phpincludedir)/regex) && \ + (cd $(topsrcdir) && cp TSRM/TSRM.h $(phpincludedir)/TSRM) && \ + (cd $(topsrcdir)/Zend && cp *.h $(phpincludedir)/Zend) && \ + (cd $(DEPTH) && cp $(BUILD_HEADERS) $(phpincludedir)) diff --git a/pear/pear.m4 b/pear/pear.m4 new file mode 100644 index 0000000000..fc552e4acb --- /dev/null +++ b/pear/pear.m4 @@ -0,0 +1,76 @@ + +AC_INIT(Makefile.in) + +AC_DEFUN(PHP_WITH_PHP_CONFIG,[ + AC_ARG_WITH(php-config, +[ --with-php-config=[PATH]],[ + PHP_CONFIG=$withval +],[ + PHP_CONFIG=php-config +]) + + prefix=`$PHP_CONFIG --prefix 2>/dev/null` + INCLUDES=`$PHP_CONFIG --includes 2>/dev/null` + + 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_RESULT($prefix) + AC_MSG_CHECKING(PHP includes) + AC_MSG_RESULT($INCLUDES) +]) + +php_always_shared=yes + +AC_PROG_CC +AC_PROG_CC_C_O + +PHP_WITH_PHP_CONFIG + +AC_PREFIX_DEFAULT() + +sinclude(config.m4) + +enable_static=no +enable_shared=yes + +AC_PROG_LIBTOOL + +SHLIBTOOL='$(LIBTOOL)' +PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<' +phplibdir="`pwd`/modules" + +test "$prefix" = "NONE" && prefix="/usr/local" +test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)' + +PHP_SUBST(prefix) +PHP_SUBST(exec_prefix) +PHP_SUBST(libdir) +PHP_SUBST(prefix) +PHP_SUBST(phplibdir) + +PHP_SUBST(PHP_COMPILE) +PHP_SUBST(CC) +PHP_SUBST(CFLAGS) +PHP_SUBST(CPP) +PHP_SUBST(CPPFLAGS) +PHP_SUBST(CXX) +PHP_SUBST(DEFS) +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(LIBTOOL) +PHP_SUBST(SHELL) + +PHP_FAST_OUTPUT(Makefile) + +PHP_FAST_GENERATE + +AC_CONFIG_HEADER(php_config.h) + +AC_OUTPUT() diff --git a/pear/php-config.in b/pear/php-config.in new file mode 100644 index 0000000000..5058c75e1c --- /dev/null +++ b/pear/php-config.in @@ -0,0 +1,16 @@ +#! /bin/sh + +prefix='@PREFIX@' +includes='-I@PHPINCLUDEDIR@ -I@PHPINCLUDEDIR@/Zend -I@PHPINCLUDEDIR@/TSRM' + +case "$1" in +--prefix) + echo $prefix;; +--includes) + echo $includes;; +*) + echo "Usage: $0 [--prefix|--includes]" + exit 1;; +esac + +exit 0 diff --git a/pear/phpize.in b/pear/phpize.in new file mode 100644 index 0000000000..ac4424dd1c --- /dev/null +++ b/pear/phpize.in @@ -0,0 +1,26 @@ +#! /bin/sh + +prefix='@PREFIX@' + +phpdir="$prefix/lib/php/build" + +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 + +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 + +aclocal +autoconf +autoheader +libtoolize -f -c |
