From: foobar Date: Tue, 28 Jan 2003 15:02:08 +0000 (+0000) Subject: - MFH: Fixed bug #13561 (--without-pear prevents install of php-config, phpize) X-Git-Tag: php-4.3.2RC1~391 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03caef107ae81018d95e1d5e59585001852299cb;p=php - MFH: Fixed bug #13561 (--without-pear prevents install of php-config, phpize) - MFH: Added --ldflags option to php-config - MFH: Added --clean option to phpize --- diff --git a/Makefile.frag b/Makefile.frag index ff6bf06234..2a4aa1c7f8 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -1,3 +1,8 @@ + +# +# Zend +# + $(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h $(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h diff --git a/configure.in b/configure.in index e9923d2e50..149a31f324 100644 --- a/configure.in +++ b/configure.in @@ -231,7 +231,7 @@ SAPI_LIBTOOL=libphp4.la PHP_CONFIGURE_PART(Configuring SAPI modules) -esyscmd(./scripts/config-stubs sapi) +esyscmd(./build/config-stubs sapi) dnl Show which main SAPI was selected AC_MSG_CHECKING([for chosen SAPI module]) @@ -617,7 +617,7 @@ PHP_ARG_WITH(pear, [whether to install PEAR, and where], --without-pear Do not install PEAR], DEFAULT, no) if test "$PHP_PEAR" != "no" && test "$disable_cli" != "1"; then - install_pear="install-pear install-build install-headers install-programs" + install_pear="install-pear" PEAR_INSTALLDIR=$PHP_PEAR fi @@ -778,7 +778,7 @@ AC_ARG_ENABLE(all, ]) # reading config stubs -esyscmd(./scripts/config-stubs ext) +esyscmd(./build/config-stubs ext) dnl Other settings. @@ -1084,7 +1084,7 @@ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" CXXFLAGS="$CXXFLAGS $standard_libtool_flag" all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)' -install_targets="install-sapi install-modules $install_pear" +install_targets="install-sapi install-modules $install_pear install-build install-headers install-programs" if test "$PHP_SAPI" != "cgi"; then install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" fi @@ -1103,7 +1103,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \ PHP_ADD_SOURCES(/main, internal_functions.c,, sapi) PHP_ADD_SOURCES(/main, internal_functions_cli.c,, cli) -PHP_ADD_SOURCES(/Zend, zend_language_parser.c zend_language_scanner.c \ +PHP_ADD_SOURCES(/Zend, zend_language_parser.c zend_language_scanner.c \ zend_ini_parser.c zend_ini_scanner.c) PHP_ADD_SOURCES(Zend, \ @@ -1134,7 +1134,7 @@ PHP_ADD_BUILD_DIR(sapi/$PHP_SAPI sapi/cli) PHP_ADD_BUILD_DIR(TSRM) PHP_ADD_BUILD_DIR(Zend) - +PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts) PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear) PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend) @@ -1144,8 +1144,10 @@ PHP_GEN_GLOBAL_MAKEFILE AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ]) $php_shtool mkdir -p pear/scripts +$php_shtool mkdir -p scripts + ALL_OUTPUT_FILES="php4.spec main/build-defs.h \ -pear/scripts/phpize pear/scripts/php-config \ +scripts/phpize scripts/php-config \ $PHP_OUTPUT_FILES" AC_OUTPUT($ALL_OUTPUT_FILES, [], [ diff --git a/pear/Makefile.frag b/pear/Makefile.frag index 2b02b50109..4168c75a7b 100644 --- a/pear/Makefile.frag +++ b/pear/Makefile.frag @@ -1,11 +1,5 @@ # -*- makefile -*- -pear_install_targets = \ - install-pear \ - install-headers \ - install-build \ - install-programs - peardir=$(PEAR_INSTALLDIR) # Skip all php.ini files altogether @@ -26,69 +20,9 @@ install-pear: exit 5; \ fi -phpincludedir = $(includedir)/php -phpbuilddir = $(prefix)/lib/php/build - -BUILD_FILES = \ - pear/pear.m4 \ - build/mkdep.awk \ - build/shtool \ - Makefile.global \ - scan_makefile_in.awk \ - acinclude.m4 - -bin_SCRIPTS = phpize php-config -bin_src_SCRIPTS = phpextdist - -install-build: - @echo "Installing build environment: $(INSTALL_ROOT)$(phpbuilddir)/" - @$(mkinstalldirs) $(INSTALL_ROOT)$(phpbuilddir) $(INSTALL_ROOT)$(bindir) && \ - (cd $(top_srcdir) && cp $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir)) - -install-programs: - @echo "Installing helper programs: $(INSTALL_ROOT)$(bindir)/" - @for prog in $(bin_SCRIPTS); do \ - echo " program: $$prog"; \ - $(INSTALL) -m 755 $(builddir)/scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \ - done - @for prog in $(bin_src_SCRIPTS); do \ - echo " program: $$prog"; \ - $(INSTALL) -m 755 $(srcdir)/scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \ - done - -HEADER_DIRS = \ - / \ - Zend \ - TSRM \ - ext/standard \ - ext/session \ - ext/xml \ - ext/xml/expat \ - main \ - ext/mbstring \ - ext/pgsql \ - regex - -install-headers: - -@for i in $(HEADER_DIRS); do \ - paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \ - done; \ - $(mkinstalldirs) $$paths && \ - echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \ - for i in $(HEADER_DIRS); do \ - (cd $(top_srcdir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \ - cd $(top_builddir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \ - done; \ - cd $(top_srcdir)/sapi/embed && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/main - #$(builddir)/scripts/pear: $(srcdir)/scripts/pear.in $(top_builddir)/config.status # (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status) -$(builddir)/scripts/phpize: $(srcdir)/scripts/phpize.in $(top_builddir)/config.status - (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status) - #$(builddir)/scripts/phptar: $(srcdir)/scripts/phptar.in $(top_builddir)/config.status # (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status) -$(builddir)/scripts/php-config: $(srcdir)/scripts/php-config.in $(top_builddir)/config.status - (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status) diff --git a/pear/pear.m4 b/pear/pear.m4 deleted file mode 100644 index 1a3cdec894..0000000000 --- a/pear/pear.m4 +++ /dev/null @@ -1,121 +0,0 @@ -dnl This file becomes configure.in for self-contained extensions. - -AC_INIT(config.m4) - -PHP_INIT_BUILD_SYSTEM - -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` - 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(for PHP prefix) - AC_MSG_RESULT($prefix) - AC_MSG_CHECKING(for PHP includes) - AC_MSG_RESULT($INCLUDES) - AC_MSG_CHECKING(for PHP extension directory) - AC_MSG_RESULT($EXTENSION_DIR) -]) -dnl -AC_DEFUN(PHP_EXT_BUILDDIR,[.])dnl -AC_DEFUN(PHP_EXT_DIR,[""])dnl -AC_DEFUN(PHP_EXT_SRCDIR,[$abs_srcdir])dnl -AC_DEFUN(PHP_ALWAYS_SHARED,[ - ext_output="yes, shared" - ext_shared=yes - test "[$]$1" = "no" && $1=yes -])dnl -dnl -abs_srcdir=`(cd $srcdir && pwd)` -abs_builddir=`pwd` - -PHP_CONFIG_NICE(config.nice) - -AC_PROG_CC -AC_PROG_CC_C_O - -PHP_RUNPATH_SWITCH -PHP_SHLIB_SUFFIX_NAME -PHP_WITH_PHP_CONFIG - -PHP_BUILD_SHARED - -AC_PREFIX_DEFAULT() - -AC_ARG_WITH(openssl, -[ --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.5) ], -[ - if test "$withval" != "no"; then - PHP_WITH_SHARED - PHP_OPENSSL=$withval - ext_openssl_shared=yes - ext_shared=yes - PHP_SETUP_OPENSSL - fi -]) - -sinclude(config.m4) - -enable_static=no -enable_shared=yes - -AC_PROG_LIBTOOL -AC_PROG_AWK - -all_targets='$(PHP_MODULES)' -install_targets=install-modules -phplibdir="`pwd`/modules" -CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H" - -test "$prefix" = "NONE" && prefix="/usr/local" -test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)' - -PHP_SUBST(PHP_MODULES) -PHP_SUBST(all_targets) -PHP_SUBST(install_targets) - -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(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(LDFLAGS) -PHP_SUBST(SHARED_LIBTOOL) -PHP_SUBST(LIBTOOL) -PHP_SUBST(SHELL) -PHP_SUBST(AWK) - -PHP_GEN_BUILD_DIRS -PHP_GEN_GLOBAL_MAKEFILE - -test -d modules || mkdir modules -touch .deps - -AC_CONFIG_HEADER(config.h) - -AC_OUTPUT() diff --git a/pear/scripts/php-config.in b/pear/scripts/php-config.in deleted file mode 100644 index 5978ff2885..0000000000 --- a/pear/scripts/php-config.in +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh - -prefix="@prefix@" -version="@PHP_VERSION@" -includedir="@includedir@/php" -includes="-I$includedir -I$includedir/main -I$includedir/Zend" -libs="@EXTRA_LIBS@" -if test '@TSRM_DIR@' != ''; then - includes="$includes -I$includedir/TSRM" -fi -extension_dir='@EXTENSION_DIR@' - -case "$1" in ---prefix) - echo $prefix;; ---includes) - echo $includes;; ---libs) - echo $libs;; ---extension-dir) - echo $extension_dir;; ---version) - echo $version;; -*) - echo "Usage: $0 [--prefix|--includes|--libs|--extension-dir|--version]" - exit 1;; -esac - -exit 0 diff --git a/pear/scripts/phpextdist b/pear/scripts/phpextdist deleted file mode 100755 index 97df70020d..0000000000 --- a/pear/scripts/phpextdist +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh -if test $# -lt 2; then - echo "usage: phpextdist "; - exit 1 -fi - -phpize=`php-config --prefix`/bin/phpize -distname="$1-$2" - -if test ! -f Makefile.in || test ! -f config.m4; then - echo "Did not find required files in current directory" - exit 1 -fi - -rm -rf modules *.lo *.o *.la config.status config.cache \ -config.log libtool php_config.h config_vars.mk Makefile - -myname=`basename \`pwd\`` -cd .. -cp -rp $myname $distname -cd $distname -$phpize -cd .. -tar cf $distname.tar $distname -rm -rf $distname $distname.tar.* -gzip --best $distname.tar -mv $distname.tar.gz $myname diff --git a/pear/scripts/phpize.in b/pear/scripts/phpize.in deleted file mode 100644 index c77694f8c3..0000000000 --- a/pear/scripts/phpize.in +++ /dev/null @@ -1,42 +0,0 @@ -#! /bin/sh - -prefix='@prefix@' -phpdir="$prefix/lib/php/build" -includedir="$prefix/include/php" -builddir="`pwd`" -FILES_BUILD="mkdep.awk shtool" -FILES="acinclude.m4 Makefile.global scan_makefile_in.awk" - -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 - -(cd $phpdir && cp $FILES_BUILD "$builddir"/build) -(cd $phpdir && cp $FILES "$builddir") - -sed \ --e "s#@prefix@#$prefix#" \ -< $phpdir/pear.m4 > configure.in - -touch install-sh mkinstalldirs missing - -aclocal -autoconf -autoheader -libtoolize -f -c - -# dumping API NOs: -PHP_API_VERSION=`grep -E '#define PHP_API_VERSION' $includedir/main/php.h|sed 's/#define PHP_API_VERSION//'` -ZEND_MODULE_API_NO=`grep -E '#define ZEND_MODULE_API_NO' $includedir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO//'` -ZEND_EXTENSION_API_NO=`grep -E '#define ZEND_EXTENSION_API_NO' $includedir/Zend/zend_extensions.h|sed 's/#define ZEND_EXTENSION_API_NO//'` - -echo "Configuring for:" -echo " PHP Api Version: "$PHP_API_VERSION -echo " Zend Module Api No: "$ZEND_MODULE_API_NO -echo " Zend Extension Api No: "$ZEND_EXTENSION_API_NO - -exit 0 diff --git a/scripts/config-stubs b/scripts/config-stubs deleted file mode 100755 index 28208085a7..0000000000 --- a/scripts/config-stubs +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# $Id$ - -dir=$1; shift -for stubfile in $dir/*/config0.m4 $dir/*/config.m4 $dir/*/config9.m4; do - echo "sinclude($stubfile)" -done diff --git a/scripts/conv_proto b/scripts/conv_proto deleted file mode 100755 index fad9cfaa83..0000000000 --- a/scripts/conv_proto +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh -# -# do some automatic conversion of prototypes -# - -if test "$1" = "" ; then - echo "usage: $0 list-of-files" - exit 1 -fi - -tmpfile=`mktemp -q /tmp/asd.XXXXXX` - -if test "$?" != "0" ; then - echo "$0: cannot create temporary file" - exit 1 -fi - -for file in ${1+"$@"} ; do - echo "working on $file" - cat $file | \ - sed -e \ - 's/void php3_\(.*\)(INTERNAL_FUNCTION_PARAMETERS)/PHP_FUNCTION(\1)/' \ - -e 's/^extern void /void /' \ - -e 's/^extern PHP_FUNCTION/PHP_FUNCTION/' > $tmpfile - cp $tmpfile $file -done - -rm -f $tmpfile - -exit 0 diff --git a/scripts/conv_z_macros b/scripts/conv_z_macros deleted file mode 100755 index 7d15c71202..0000000000 --- a/scripts/conv_z_macros +++ /dev/null @@ -1,61 +0,0 @@ -#! /bin/sh -# -# +----------------------------------------------------------------------+ -# | PHP Version 4 | -# +----------------------------------------------------------------------+ -# | Copyright (c) 1997-2002 The PHP Group | -# +----------------------------------------------------------------------+ -# | This source file is subject to version 2.02 of the PHP license, | -# | that is bundled with this package in the file LICENSE, and is | -# | available at through the world-wide-web at | -# | http://www.php.net/license/2_02.txt. | -# | If you did not receive a copy of the PHP license and are unable to | -# | obtain it through the world-wide-web, please send a note to | -# | license@php.net so we can mail you a copy immediately. | -# +----------------------------------------------------------------------+ -# | Author: Sascha Schumann | -# +----------------------------------------------------------------------+ -# -# $Id$ - -for i in $@; do - echo -n "Processing $i... " - sed \ - -e 's/(\*\([^()]\+\))->type/Z_TYPE_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->type/Z_TYPE_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.type/Z_TYPE(\1)/g' \ - -e 's/(\*\([^()]\+\))->value\.dval/Z_DVAL_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.dval/Z_DVAL_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.dval/Z_DVAL(\1)/g' \ - -e 's/(\*\([^()]\+\))->value\.lval/Z_LVAL_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.lval/Z_LVAL_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.lval/Z_LVAL(\1)/g' \ - -e 's/(\*\([^()]\+\))->value\.ht/Z_ARRVAL_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.ht/Z_ARRVAL_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.ht/Z_ARRVAL(\1)/g' \ - -e 's/(\*\([^()]\+\))->value\.str\.val/Z_STRVAL_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.str\.val/Z_STRVAL_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.str\.val/Z_STRVAL(\1)/g' \ - -e 's/(\*\([^()]\+\))->value\.str\.len/Z_STRLEN_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.str\.len/Z_STRLEN_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.str\.len/Z_STRLEN(\1)/g' \ - -e 's/(\*\([^()]\+\))->value\.obj\.properties/Z_OBJPROP_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.obj\.properties/Z_OBJPROP_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.obj\.properties/Z_OBJPROP(\1)/g' \ - -e 's/(\*\([^()]\+\))->value\.obj\.ce/Z_OBJCE_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.obj\.ce/Z_OBJCE_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.obj\.ce/Z_OBJCE(\1)/g' \ - -e 's/(\*\([^()]\+\))->value\.obj/Z_OBJ_PP(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)->value\.obj/Z_OBJ_P(\1)/g' \ - -e 's/\([a-z_][]a-z_0-9\[]*\)\.value\.obj/Z_OBJ(\1)/g' \ - -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)->Z_\([A-Z_]\+\)(/Z_\2(\1->/g' \ - -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)->Z_\([A-Z_]\+\)(/Z_\2(\1->/g' \ - -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)->Z_\([A-Z_]\+\)(/Z_\2(\1->/g' \ - -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)\.Z_\([A-Z_]\+\)(/Z_\2(\1./g' \ - -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)\.Z_\([A-Z_]\+\)(/Z_\2(\1./g' \ - -e 's/\([a-zA-Z_][a-zA-Z_0-9]*\)\.Z_\([A-Z_]\+\)(/Z_\2(\1./g' \ - < $i > tmp && cp tmp $i - echo "DONE" -done - -rm -f tmp diff --git a/scripts/credits b/scripts/credits deleted file mode 100755 index 658580cdd7..0000000000 --- a/scripts/credits +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -awkprog=' -BEGIN { FS = "\n"; RS = "" } -{ print "CREDIT_LINE(\""$1"\", \""$2"\");" }' - -for what in ext sapi -do - file=ext/standard/credits_$what.h - cat >$file <> $file -done diff --git a/scripts/dev/credits b/scripts/dev/credits index b76fb311df..658580cdd7 100755 --- a/scripts/dev/credits +++ b/scripts/dev/credits @@ -22,5 +22,5 @@ do END # Do not process skeleton # files=`find "$what" -name CREDITS | grep -v "$what"/skeleton/CREDITS` - awk "$awkprog" $files | sort -f | uniq >> $file + awk "$awkprog" $files | sort -f >> $file done