Skip to content

Commit 20c4328

Browse files
author
foobar
committed
- Fixed bug: php#13561 (--without-pear prevents install of phpize, php-config)
1 parent 41d6e9a commit 20c4328

File tree

12 files changed

+98
-75
lines changed

12 files changed

+98
-75
lines changed

Makefile.frag

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2+
#
3+
# Zend
4+
#
5+
16
$(builddir)/zend_language_scanner.lo: $(builddir)/zend_language_parser.h
27
$(builddir)/zend_ini_scanner.lo: $(builddir)/zend_ini_parser.h
38

File renamed without changes.

configure.in

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ SAPI_LIBTOOL=libphp4.la
231231

232232
PHP_CONFIGURE_PART(Configuring SAPI modules)
233233

234-
esyscmd(./scripts/config-stubs sapi)
234+
esyscmd(./build/config-stubs sapi)
235235

236236
dnl Show which main SAPI was selected
237237
AC_MSG_CHECKING([for chosen SAPI module])
@@ -617,7 +617,7 @@ PHP_ARG_WITH(pear, [whether to install PEAR, and where],
617617
--without-pear Do not install PEAR], DEFAULT, no)
618618
619619
if test "$PHP_PEAR" != "no" && test "$PHP_SAPI_CLI" != "no"; then
620-
install_pear="install-pear install-build install-headers install-programs"
620+
install_pear="install-pear"
621621
PEAR_INSTALLDIR=$PHP_PEAR
622622
fi
623623
@@ -778,7 +778,7 @@ AC_ARG_ENABLE(all,
778778
])
779779
780780
# reading config stubs
781-
esyscmd(./scripts/config-stubs ext)
781+
esyscmd(./build/config-stubs ext)
782782
783783
784784
dnl Other settings.
@@ -1084,7 +1084,7 @@ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
10841084
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
10851085

10861086
all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
1087-
install_targets="install-sapi install-modules $install_pear"
1087+
install_targets="install-sapi install-modules $install_pear install-build install-headers install-programs"
10881088
if test "$PHP_SAPI" != "cgi"; then
10891089
install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
10901090
fi
@@ -1103,7 +1103,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
11031103
PHP_ADD_SOURCES(/main, internal_functions.c,, sapi)
11041104
PHP_ADD_SOURCES(/main, internal_functions_cli.c,, cli)
11051105

1106-
PHP_ADD_SOURCES(/Zend, zend_language_parser.c zend_language_scanner.c \
1106+
PHP_ADD_SOURCES(/Zend, zend_language_parser.c zend_language_scanner.c \
11071107
zend_ini_parser.c zend_ini_scanner.c)
11081108

11091109
PHP_ADD_SOURCES(Zend, \
@@ -1134,7 +1134,7 @@ PHP_ADD_BUILD_DIR(sapi/$PHP_SAPI sapi/cli)
11341134
PHP_ADD_BUILD_DIR(TSRM)
11351135
PHP_ADD_BUILD_DIR(Zend)
11361136

1137-
1137+
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts)
11381138
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
11391139
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.frag,$abs_srcdir/Zend,Zend)
11401140

@@ -1144,8 +1144,10 @@ PHP_GEN_GLOBAL_MAKEFILE
11441144
AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
11451145

11461146
$php_shtool mkdir -p pear/scripts
1147+
$php_shtool mkdir -p scripts
1148+
11471149
ALL_OUTPUT_FILES="php4.spec main/build-defs.h \
1148-
pear/scripts/phpize pear/scripts/php-config \
1150+
scripts/phpize scripts/php-config \
11491151
$PHP_OUTPUT_FILES"
11501152

11511153
AC_OUTPUT($ALL_OUTPUT_FILES, [], [

pear/Makefile.frag

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# -*- makefile -*-
22

3-
pear_install_targets = \
4-
install-pear \
5-
install-headers \
6-
install-build \
7-
install-programs
8-
93
peardir=$(PEAR_INSTALLDIR)
104

115
# Skip all php.ini files altogether
@@ -26,69 +20,9 @@ install-pear:
2620
exit 5; \
2721
fi
2822

29-
phpincludedir = $(includedir)/php
30-
phpbuilddir = $(prefix)/lib/php/build
31-
32-
BUILD_FILES = \
33-
pear/pear.m4 \
34-
build/mkdep.awk \
35-
build/shtool \
36-
Makefile.global \
37-
scan_makefile_in.awk \
38-
acinclude.m4
39-
40-
bin_SCRIPTS = phpize php-config
41-
bin_src_SCRIPTS = phpextdist
42-
43-
install-build:
44-
@echo "Installing build environment: $(INSTALL_ROOT)$(phpbuilddir)/"
45-
@$(mkinstalldirs) $(INSTALL_ROOT)$(phpbuilddir) $(INSTALL_ROOT)$(bindir) && \
46-
(cd $(top_srcdir) && cp $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir))
47-
48-
install-programs:
49-
@echo "Installing helper programs: $(INSTALL_ROOT)$(bindir)/"
50-
@for prog in $(bin_SCRIPTS); do \
51-
echo " program: $$prog"; \
52-
$(INSTALL) -m 755 $(builddir)/scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
53-
done
54-
@for prog in $(bin_src_SCRIPTS); do \
55-
echo " program: $$prog"; \
56-
$(INSTALL) -m 755 $(srcdir)/scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
57-
done
58-
59-
HEADER_DIRS = \
60-
/ \
61-
Zend \
62-
TSRM \
63-
ext/standard \
64-
ext/session \
65-
ext/xml \
66-
ext/xml/expat \
67-
main \
68-
ext/mbstring \
69-
ext/pgsql \
70-
regex
71-
72-
install-headers:
73-
-@for i in $(HEADER_DIRS); do \
74-
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
75-
done; \
76-
$(mkinstalldirs) $$paths && \
77-
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
78-
for i in $(HEADER_DIRS); do \
79-
(cd $(top_srcdir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
80-
cd $(top_builddir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
81-
done; \
82-
cd $(top_srcdir)/sapi/embed && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/main
83-
8423
#$(builddir)/scripts/pear: $(srcdir)/scripts/pear.in $(top_builddir)/config.status
8524
# (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
8625

87-
$(builddir)/scripts/phpize: $(srcdir)/scripts/phpize.in $(top_builddir)/config.status
88-
(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
89-
9026
#$(builddir)/scripts/phptar: $(srcdir)/scripts/phptar.in $(top_builddir)/config.status
9127
# (CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
9228

93-
$(builddir)/scripts/php-config: $(srcdir)/scripts/php-config.in $(top_builddir)/config.status
94-
(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)

scripts/Makefile.frag

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
2+
#
3+
# Build environment install
4+
#
5+
6+
phpincludedir = $(includedir)/php
7+
phpbuilddir = $(prefix)/lib/php/build
8+
9+
BUILD_FILES = \
10+
scripts/phpize.m4 \
11+
build/mkdep.awk \
12+
build/shtool \
13+
Makefile.global \
14+
scan_makefile_in.awk \
15+
acinclude.m4
16+
17+
bin_SCRIPTS = phpize php-config
18+
bin_src_SCRIPTS = phpextdist
19+
20+
install-build:
21+
@echo "Installing build environment: $(INSTALL_ROOT)$(phpbuilddir)/"
22+
@$(mkinstalldirs) $(INSTALL_ROOT)$(phpbuilddir) $(INSTALL_ROOT)$(bindir) && \
23+
(cd $(top_srcdir) && cp $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir))
24+
25+
HEADER_DIRS = \
26+
/ \
27+
Zend \
28+
TSRM \
29+
ext/standard \
30+
ext/session \
31+
ext/xml \
32+
ext/xml/expat \
33+
main \
34+
ext/mbstring \
35+
ext/pgsql \
36+
regex
37+
38+
install-headers:
39+
-@for i in $(HEADER_DIRS); do \
40+
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
41+
done; \
42+
$(mkinstalldirs) $$paths && \
43+
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
44+
for i in $(HEADER_DIRS); do \
45+
(cd $(top_srcdir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
46+
cd $(top_builddir)/$$i && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
47+
done; \
48+
cd $(top_srcdir)/sapi/embed && cp -p *.h $(INSTALL_ROOT)$(phpincludedir)/main
49+
50+
install-programs:
51+
@echo "Installing helper programs: $(INSTALL_ROOT)$(bindir)/"
52+
@for prog in $(bin_SCRIPTS); do \
53+
echo " program: $$prog"; \
54+
$(INSTALL) -m 755 $(builddir)/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
55+
done
56+
@for prog in $(bin_src_SCRIPTS); do \
57+
echo " program: $$prog"; \
58+
$(INSTALL) -m 755 $(top_srcdir)/scripts/$$prog $(INSTALL_ROOT)$(bindir)/$$prog; \
59+
done
60+
61+
$(builddir)/phpize: $(srcdir)/phpize.in $(top_builddir)/config.status
62+
(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
63+
64+
$(builddir)/php-config: $(srcdir)/php-config.in $(top_builddir)/config.status
65+
(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
File renamed without changes.
File renamed without changes.
File renamed without changes.

pear/scripts/php-config.in renamed to scripts/php-config.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ prefix="@prefix@"
44
version="@PHP_VERSION@"
55
includedir="@includedir@/php"
66
includes="-I$includedir -I$includedir/main -I$includedir/Zend"
7+
ldflags="@PHP_LDFLAGS@"
78
libs="@EXTRA_LIBS@"
89
if test '@TSRM_DIR@' != ''; then
910
includes="$includes -I$includedir/TSRM"
@@ -15,14 +16,16 @@ case "$1" in
1516
echo $prefix;;
1617
--includes)
1718
echo $includes;;
19+
--ldflags)
20+
echo $ldflags;;
1821
--libs)
1922
echo $libs;;
2023
--extension-dir)
2124
echo $extension_dir;;
2225
--version)
2326
echo $version;;
2427
*)
25-
echo "Usage: $0 [--prefix|--includes|--libs|--extension-dir|--version]"
28+
echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--version]"
2629
exit 1;;
2730
esac
2831

File renamed without changes.

pear/scripts/phpize.in renamed to scripts/phpize.in

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,37 @@ prefix='@prefix@'
44
phpdir="$prefix/lib/php/build"
55
includedir="$prefix/include/php"
66
builddir="`pwd`"
7+
78
FILES_BUILD="mkdep.awk shtool"
89
FILES="acinclude.m4 Makefile.global scan_makefile_in.awk"
10+
CLEAN_FILES="$FILES *.lo *.la *.o .deps .libs/ build/ include/ modules/ install-sh \
11+
mkinstalldirs missing config.nice config.sub config.guess configure configure.in \
12+
aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache \
13+
config.log config.status Makefile Makefile.fragments Makefile.objects"
914

1015
if test ! -r config.m4; then
1116
echo "Cannot find config.m4. "
1217
echo "Make sure that you run $0 in the top level source directory of the module"
1318
exit 1
1419
fi
1520

21+
# Cleanup
22+
if test "$1" = "--clean"; then
23+
echo "Cleaning.."
24+
for i in $CLEAN_FILES; do
25+
test -e && rm -rf $i
26+
done
27+
exit 0
28+
fi
29+
1630
test -d build || mkdir build
1731

1832
(cd $phpdir && cp $FILES_BUILD "$builddir"/build)
1933
(cd $phpdir && cp $FILES "$builddir")
2034

2135
sed \
2236
-e "s#@prefix@#$prefix#" \
23-
< $phpdir/pear.m4 > configure.in
37+
< $phpdir/phpize.m4 > configure.in
2438

2539
touch install-sh mkinstalldirs missing
2640

File renamed without changes.

0 commit comments

Comments
 (0)