Skip to content

Commit

Permalink
Merge branch 'PHP-7.4'
Browse files Browse the repository at this point in the history
* PHP-7.4:
  Move acinclude.m4 to build/php.m4
  • Loading branch information
petk committed Apr 23, 2019
2 parents fe54a66 + 4e7064d commit 028ffdd
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 33 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
# Standard object files generated during build process
*.o

# Generated by `./buildconf` or `phpize`
aclocal.m4

# Cache directories generated by Autoconf tools - autoconf, autoreconf...
autom4te.cache/

Expand Down Expand Up @@ -180,7 +177,6 @@ php
/ext/opcache/minilua

# Generated by `cd ext/name && phpize && ./configure`
/ext/*/acinclude.m4
/ext/*/build/
/ext/*/configure.ac
/ext/*/run-tests.php
Expand Down
6 changes: 1 addition & 5 deletions build/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,11 @@ all: $(stamp) configure $(config_h_in)
$(stamp): build/buildcheck.sh
@build/buildcheck.sh $@

configure: aclocal.m4 configure.ac $(PHP_M4_FILES)
configure: configure.ac $(PHP_M4_FILES)
@echo rebuilding $@
@rm -f $@
@$(PHP_AUTOCONF) $(PHP_AUTOCONF_FLAGS)

aclocal.m4: configure.ac acinclude.m4
@echo rebuilding $@
@cat acinclude.m4 ./build/libtool.m4 > $@

$(config_h_in): configure
# Explicitly remove target since autoheader does not seem to work correctly
# otherwise (timestamps are not updated). Also disable PACKAGE_* symbols in the
Expand Down
10 changes: 0 additions & 10 deletions acinclude.m4 → build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2751,13 +2751,3 @@ int main() {
AC_DEFINE_UNQUOTED(AS_TR_CPP([PHP_HAVE_$1_INSTRUCTIONS]),
[$have_ext_instructions], [Whether the compiler supports $1 instructions])
])

dnl Load the AX_CHECK_COMPILE_FLAG macro from the autoconf archive.
m4_include([build/ax_check_compile_flag.m4])

m4_include([build/ax_gcc_func_attribute.m4])

m4_include([build/php_cxx_compile_stdcxx.m4])

dnl Load pkg-config macros
m4_include([build/pkg.m4])
14 changes: 7 additions & 7 deletions buildconf
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ while test $# -gt 0; do
PHP buildconf
A wrapper around the autoconf and autoheader that generate files for building
PHP on *nix systems (configure, main/php_config.h.in, aclocal.m4...). The
configure script is used to customize the PHP build based on the provided
options and system. PHP releases downloaded from PHP.net already include the
configure script so installing Autoconf and running buildconf is not needed. For
the PHP sources from the Git repository, buildconf is used for generating a new
configure script and required files.
PHP on *nix systems (configure and main/php_config.h.in). The configure script
is used to customize the PHP build based on the provided options and system. PHP
releases downloaded from PHP.net already include the configure script so
installing Autoconf and running buildconf is not needed. For the PHP sources
from the Git repository, buildconf is used for generating a new configure script
and required files.
SYNOPSIS:
buildconf [<options>]
Expand Down Expand Up @@ -103,4 +103,4 @@ $MAKE -s -f build/build.mk \
PHP_AUTOCONF="$PHP_AUTOCONF" \
PHP_AUTOHEADER="$PHP_AUTOHEADER" \
PHP_AUTOCONF_FLAGS="$autoconf_flags" \
PHP_M4_FILES="$(echo TSRM/*.m4 Zend/Zend.m4 ext/*/config*.m4 sapi/*/config*.m4)"
PHP_M4_FILES="$(echo TSRM/*.m4 Zend/Zend.m4 build/*.m4 ext/*/config*.m4 sapi/*/config*.m4)"
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
dnl ## Process this file with autoconf to produce a configure script.

dnl Include external macro definitions before the AC_INIT to also remove
dnl comments starting with # and empty newlines from the included files.
dnl -------------------------------------------------------------------------
m4_include([build/ax_check_compile_flag.m4])
m4_include([build/ax_gcc_func_attribute.m4])
m4_include([build/libtool.m4])
m4_include([build/php_cxx_compile_stdcxx.m4])
m4_include([build/php.m4])
m4_include([build/pkg.m4])

dnl Basic autoconf initialization, generation of config.nice.
dnl -------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions docs/unix-build-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The full syntax:
PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])
```

Please have a look at `acinclude.m4` for the gory details and meanings of the
Please have a look at `build/php.m4` for the gory details and meanings of the
other parameters.

And that's basically it for the extension side.
Expand Down Expand Up @@ -118,4 +118,4 @@ contexts. With the help of macros you can define special flags for each
source-file, where it is located, in which target context it can work, etc.

Have a look at the well documented macros `PHP_ADD_SOURCES(_X)` in
`acinclude.m4`.
`build/php.m4`.
2 changes: 1 addition & 1 deletion scripts/Makefile.frag
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BUILD_FILES = \
build/php_cxx_compile_stdcxx.m4 \
build/pkg.m4 \
build/Makefile.global \
acinclude.m4 \
build/php.m4 \
run-tests.php

BUILD_FILES_EXEC = \
Expand Down
7 changes: 3 additions & 4 deletions scripts/phpize.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ includedir="`eval echo @includedir@`/php"
builddir="`pwd`"
SED="@SED@"

FILES_BUILD="shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attribute.m4 php_cxx_compile_stdcxx.m4 pkg.m4 config.guess config.sub ltmain.sh Makefile.global"
FILES="acinclude.m4 run-tests*.php"
FILES_BUILD="php.m4 shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attribute.m4 php_cxx_compile_stdcxx.m4 pkg.m4 config.guess config.sub ltmain.sh Makefile.global"
FILES="run-tests*.php"
CLEAN_FILES="$FILES *.o *.lo *.la .libs/ build/ modules/ \
config.nice configure configure.ac \
aclocal.m4 config.h config.h.in conftest* libtool config.cache autom4te.cache/ \
config.h config.h.in conftest* libtool config.cache autom4te.cache/ \
config.log config.status Makefile Makefile.fragments Makefile.objects confdefs.h \
run-tests*.php tests/*.diff tests/*.exp tests/*.log tests/*.out tests/*.php"

Expand Down Expand Up @@ -146,7 +146,6 @@ phpize_copy_files()

(cd "$phpdir" && cp $FILES_BUILD "$builddir"/build)
(cd "$phpdir" && cp $FILES "$builddir")
(cd "$builddir" && cat acinclude.m4 ./build/libtool.m4 > aclocal.m4)
}

phpize_replace_prefix()
Expand Down
9 changes: 9 additions & 0 deletions scripts/phpize.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
dnl This file becomes configure.ac for self-contained extensions.

dnl Include external macro definitions before the AC_INIT to also remove
dnl comments starting with # and empty newlines from the included files.
m4_include([build/ax_check_compile_flag.m4])
m4_include([build/ax_gcc_func_attribute.m4])
m4_include([build/libtool.m4])
m4_include([build/php_cxx_compile_stdcxx.m4])
m4_include([build/php.m4])
m4_include([build/pkg.m4])

AC_PREREQ([2.68])
AC_INIT
AC_CONFIG_SRCDIR([config.m4])
Expand Down

0 comments on commit 028ffdd

Please sign in to comment.