File tree Expand file tree Collapse file tree 5 files changed +10
-16
lines changed Expand file tree Collapse file tree 5 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,20 @@ targets = configure $(config_h_in)
2222
2323PHP_AUTOCONF ?= 'autoconf'
2424PHP_AUTOHEADER ?= 'autoheader'
25+ SED ?= 'sed'
2526
2627SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used)'||true)
2728
2829all : $(targets )
2930
3031$(config_h_in ) : configure
31- # explicitly remove target since autoheader does not seem to work
32- # correctly otherwise (timestamps are not updated)
32+ # Explicitly remove target since autoheader does not seem to work correctly
33+ # otherwise (timestamps are not updated).
34+ # Also disable PACKAGE_* symbols in php_config.h.in
3335 @echo rebuilding $@
3436 @rm -f $@
3537 $(PHP_AUTOHEADER) $(SUPPRESS_WARNINGS)
38+ $(SED) -e 's/^# undef PACKAGE_[^ ]*/\/\* && \*\//g' < $@ > $@.tmp && mv $@.tmp $@
3639
3740aclocal.m4 : configure.ac acinclude.m4
3841 @echo rebuilding $@
Original file line number Diff line number Diff line change 33# A wrapper around Autoconf that generates files to build PHP on *nix systems.
44
55MAKE=${MAKE:- make}
6+ SED=${SED:- sed}
67force=0
78debug=0
89
Original file line number Diff line number Diff line change @@ -1727,11 +1727,4 @@ Check '[$]0 --help' for available options
17271727fi
17281728] )
17291729
1730- AC_CONFIG_COMMANDS_POST ( [
1731- # Disable PACKAGE_* symbols in main/php_config.h.in
1732- $SED -e 's/^#undef PACKAGE_[ ^ ] */\/\* & \*\//g' < $srcdir/main/php_config.h.in \
1733- > $srcdir/main/php_config.h.in.tmp && \
1734- mv $srcdir/main/php_config.h.in.tmp $srcdir/main/php_config.h.in
1735- ] )
1736-
17371730AC_OUTPUT
Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ phpize_autotools()
160160{
161161 $PHP_AUTOCONF || exit 1
162162 $PHP_AUTOHEADER || exit 1
163+
164+ # Disable PACKAGE_* symbols in config.h.in
165+ $SED -e ' s/^#undef PACKAGE_[^ ]*/\/\* & \*\//g' < config.h.in > config.h.in.tmp
166+ mv config.h.in.tmp config.h.in
163167}
164168
165169# Main script
Original file line number Diff line number Diff line change @@ -205,11 +205,4 @@ test -d modules || $php_shtool mkdir modules
205205
206206AC_CONFIG_HEADERS ( [ config.h] )
207207
208- AC_CONFIG_COMMANDS_POST ( [
209- # Disable PACKAGE_* symbols in config.h.in
210- $SED -e 's/^#undef PACKAGE_[ ^ ] */\/\* & \*\//g' < $srcdir/config.h.in \
211- > $srcdir/config.h.in.tmp && \
212- mv $srcdir/config.h.in.tmp $srcdir/config.h.in
213- ] )
214-
215208AC_OUTPUT
You can’t perform that action at this time.
0 commit comments