Skip to content

Commit

Permalink
- Fixed bug: php#13561 (--without-pear prevents install of phpize, ph…
Browse files Browse the repository at this point in the history
…p-config)
  • Loading branch information
foobar committed Jan 28, 2003
1 parent 41d6e9a commit 20c4328
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 75 deletions.
5 changes: 5 additions & 0 deletions Makefile.frag
Original file line number Diff line number Diff line change
@@ -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

Expand Down
File renamed without changes.
16 changes: 9 additions & 7 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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 "$PHP_SAPI_CLI" != "no"; then
install_pear="install-pear install-build install-headers install-programs"
install_pear="install-pear"
PEAR_INSTALLDIR=$PHP_PEAR
fi
Expand Down Expand Up @@ -778,7 +778,7 @@ AC_ARG_ENABLE(all,
])
# reading config stubs
esyscmd(./scripts/config-stubs ext)
esyscmd(./build/config-stubs ext)
dnl Other settings.
Expand Down Expand Up @@ -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
Expand All @@ -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, \
Expand Down Expand Up @@ -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)

Expand All @@ -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, [], [
Expand Down
66 changes: 0 additions & 66 deletions pear/Makefile.frag
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
65 changes: 65 additions & 0 deletions scripts/Makefile.frag
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

#
# Build environment install
#

phpincludedir = $(includedir)/php
phpbuilddir = $(prefix)/lib/php/build

BUILD_FILES = \
scripts/phpize.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))

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

install-programs:
@echo "Installing helper programs: $(INSTALL_ROOT)$(bindir)/"
@for prog in $(bin_SCRIPTS); do \
echo " program: $$prog"; \
$(INSTALL) -m 755 $(builddir)/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
done
@for prog in $(bin_src_SCRIPTS); do \
echo " program: $$prog"; \
$(INSTALL) -m 755 $(top_srcdir)/scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
done

$(builddir)/phpize: $(srcdir)/phpize.in $(top_builddir)/config.status
(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)

$(builddir)/php-config: $(srcdir)/php-config.in $(top_builddir)/config.status
(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion pear/scripts/php-config.in → scripts/php-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ prefix="@prefix@"
version="@PHP_VERSION@"
includedir="@includedir@/php"
includes="-I$includedir -I$includedir/main -I$includedir/Zend"
ldflags="@PHP_LDFLAGS@"
libs="@EXTRA_LIBS@"
if test '@TSRM_DIR@' != ''; then
includes="$includes -I$includedir/TSRM"
Expand All @@ -15,14 +16,16 @@ case "$1" in
echo $prefix;;
--includes)
echo $includes;;
--ldflags)
echo $ldflags;;
--libs)
echo $libs;;
--extension-dir)
echo $extension_dir;;
--version)
echo $version;;
*)
echo "Usage: $0 [--prefix|--includes|--libs|--extension-dir|--version]"
echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--version]"
exit 1;;
esac

Expand Down
File renamed without changes.
16 changes: 15 additions & 1 deletion pear/scripts/phpize.in → scripts/phpize.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,37 @@ 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"
CLEAN_FILES="$FILES *.lo *.la *.o .deps .libs/ build/ include/ modules/ install-sh \
mkinstalldirs missing config.nice config.sub config.guess configure configure.in \
aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache \
config.log config.status Makefile Makefile.fragments Makefile.objects"

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

# Cleanup
if test "$1" = "--clean"; then
echo "Cleaning.."
for i in $CLEAN_FILES; do
test -e && rm -rf $i
done
exit 0
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
< $phpdir/phpize.m4 > configure.in

touch install-sh mkinstalldirs missing

Expand Down
File renamed without changes.

0 comments on commit 20c4328

Please sign in to comment.