Commit Graph

155 Commits

Author SHA1 Message Date
Peter Kokot
d2e6c1aff1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move Autoconf Archive macros to a common m4 dir
2019-04-23 20:38:57 +02:00
Peter Kokot
beb58ca128 Move Autoconf Archive macros to a common m4 dir
In PHP the build dir is used as a directory for external macros
including Autoconf Archive macros.
2019-04-23 20:37:31 +02:00
Peter Kokot
028ffddf69 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move acinclude.m4 to build/php.m4
2019-04-23 20:32:03 +02:00
Peter Kokot
4e7064d173 Move acinclude.m4 to build/php.m4
The acinclude.m4 file is in a usual Autotools build processed with
Automake's aclocal tool. Since PHP currently doesn't use Automake and
aclocal this file can be moved into the build directory. PHP build
system currently generates a combined aclocal.m4 file that Autoconf
can processes automatically.

However, a newer practice is writing all local macros in separate
dedicated files prefixed with package name, in PHP's case PHP_MACRO_NAME
and putting them in a common `m4` directory. PHP uses currently `build`
directory for this purpose.

Name `php.m4` probably most resembles such file for PHP's case.

PHP manually created the aclocal.m4 file from acinclude.m4 and
build/libtool.m4. Which is also not a particularly good practice [1], so
this patch also removes the generated alocal.m4 usage and uses
m4_include() calls manually in the configure.ac and phpize.m4 files
manually.

- sort order is not important but can be alphabetical
- list of *.m4 files prerequisites for configure script generation
  updated
- Moving m4_include() before AC_INIT also removes all comments starting
  with hash character (`#`) in the included files.

[1] https://autotools.io/autoconf/macros.html
2019-04-23 20:28:45 +02:00
Peter Kokot
7eb8913e04 Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor Zend/acinclude.m4 local macro
2019-04-21 15:53:44 +02:00
Peter Kokot
b1d3509e8c Refactor Zend/acinclude.m4 local macro
There is now only a single M4 macro in the legacy acinclude.m4 file. A
separate acinclude file was once used with a standalone Zend engine
building but with current build system this can be simplified a bit.
2019-04-21 15:53:19 +02:00
Peter Kokot
57cfd706e4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_READDIR_R_TYPE
2019-04-13 04:51:03 +02:00
Peter Kokot
769db42341 Remove PHP_READDIR_R_TYPE
The PHP_READDIR_R_TYPE m4 macro has been removed via
2b28f71891.

HAVE_POSIX_READDIR_R in windows header file is also not needed anymore.
2019-04-13 04:50:05 +02:00
Peter Kokot
8afb3e6856 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove duplicated substitude for Makefile
2019-04-09 02:11:57 +02:00
Peter Kokot
8021d52fb6 Remove duplicated substitude for Makefile
The substitution is already done in the CLI's config.m4 file. Current
SAPIs only provide one PHP_EXECUTABLE variable, i.e. PHP CLI so the one
in the configure.ac can be removed.
2019-04-09 02:09:42 +02:00
Peter Kokot
e6f86fb17c Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove checks for locale.h, setlocale, localeconv
2019-04-07 18:34:02 +02:00
Peter Kokot
e06836a1a3 Remove checks for locale.h, setlocale, localeconv
The `<loccale.h>` header file, setlocale, and localeconv are part of the
standard C89 [1] and on current systems can be used unconditionally.

Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`,
`HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in
configure.ac [2] can be ommitted and simplifed.

The bundled libmagic (file) has also been patched already in version
5.35 and up in upstream location so when it will be patched also in
php-src the check for locale.h header is still left in the configure.ac
and in windows headers definition file.

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4

Omit the bundled libmagic files
2019-04-07 18:32:54 +02:00
Peter Kokot
06fc66ed7c Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor AC_INIT in configure.ac and PHP versions
2019-04-07 05:54:12 +02:00
Peter Kokot
afd52f9d99 Refactor AC_INIT in configure.ac and PHP versions
Since Autoconf 2.53 the AC_INIT call with only a single argument has
been made obsolete and now includes several other optional arguments to
make installation experience a bit better by providing program version
and links to the project in the `./configure -h` output. This patch also
updates win build version. The phpize.m4 AC_INIT has been updated with
the call without arguments.
2019-04-07 05:52:14 +02:00
Dmitry Stogov
9a06876072 Added JIT compiler for x86 and x86_64 2019-04-01 10:27:11 +03:00
Peter Kokot
d31a40dbcd Merge branch 'PHP-7.4'
* PHP-7.4:
  Join README.GIT-RULES and CONTRIBUTING.md
2019-03-30 16:01:53 +01:00
Peter Kokot
a8e879c53f Join README.GIT-RULES and CONTRIBUTING.md
This patch joins two very much related pieces of docs together in a
single file dedicated to all sorts of contributing info.

Some more changes:
- Branches info copied from the current master branch
- LXR and bonsai info removed
- Duplicated info reduced a bit
- Security branch updated to 7.1
- Refactor intro for Git commit rules
- Updated README.GIT-RULES file usage in win32/build/confutils.js
- Refactored configure.ac
2019-03-30 15:58:23 +01:00
Peter Kokot
b49022b3dc Merge branch 'PHP-7.4'
* PHP-7.4:
  Refactor PHP_PROG_BISON and PHP_PROG_RE2C
2019-03-30 02:02:14 +01:00
Peter Kokot
3207741df0 Refactor PHP_PROG_BISON and PHP_PROG_RE2C
This patch refactors these macros to also checks for the required given
versions of bison and re2c.

- PHP_PROG_RE2C and PHP_PROG_BISON take optional args - minmimum version
  required, and bison also excluded versions.
- Instead of caching values this uses manual checking and messaging
  outputs.
- It looks like the minimum version of RE2C 0.13.4 is working ok so far.

The genfiles script improvements:
- Add make override in genfiles
- Move checkings from makedist to genfiles
- Refactored output messages
- Various minor enhancements
2019-03-30 02:01:02 +01:00
Peter Kokot
011c935ae3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove php7.spec.in file
2019-03-28 17:45:02 +01:00
Peter Kokot
5e16f5b8d8 Remove php7.spec.in file
RPM specification file was introduced via
7c2f1384d4 for PHP to include official
RPM packages long time agon. With removal of the makerpm script via
3d51d4c90c and Linux repositories to
manage such updated and customized info in their repositories this file
is most likely not needed anymore.
2019-03-28 17:42:11 +01:00
Joe Watkins
f43ce705fe
remove last enable-maintainer-zts mention from source 2019-03-26 18:28:18 +01:00
Joe Watkins
bd73607b9e
TSRM cleanup for PHP8 2019-03-25 08:00:17 +01:00
Joe Watkins
161adfff3f
For consistency with Windows, and because ZTS is not experimental or a "maintainer" feature, this commits renames --enable-maintainer-zts to --enable-zts in the autotools build, and related documentation 2019-03-23 07:34:54 +01:00
Peter Kokot
347128a12b Merge branch 'PHP-7.4'
* PHP-7.4:
  Sync AC_CHECK_SIZEOF m4 macro calls
2019-03-18 02:13:12 +01:00
Peter Kokot
ccc29473ec Sync AC_CHECK_SIZEOF m4 macro calls
- AC_CHECK_SIZEOF is now called mostly only in PHP_CHECK_STDINT_TYPES()
  macro except for some parts checking for the 32 or 64 bit architecture.
- SIZEOF_CHAR removed since it is always 1
- ZEND_BIN_ID is now of a more logical pattern `BIN_48888` on 64bit
  architectures and `BIN_44444` on 32bit instead of literal string
  `BIN_SIZEOF_CHAR48888` on 64bit and `BIN_SIZEOF_CHAR44444` on 32bit.
  The unneeded SIZEOF_CHAR part has been removed.
- XMLRPC_TYPE_CHECKS removed
- The `long long int` is the same as `long long` and redundant checks
  removed accordingly.
- Removed PHP_CHECK_64BIT macro. Checking if current platform is 64bit
  or not can be also done simply by using a check of the long type on
  place. This removes redundant m4 macro PHP_CHECK_64BIT.
2019-03-18 02:11:23 +01:00
Peter Kokot
160f3636db Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean build system
2019-03-14 20:21:30 +01:00
Peter Kokot
97d25c87d2 Clean build system
Changes:
- AC_TYPE_SIZE_T called on only one place (configure.ac)
- AC_FUNC_ALLOCA called on only one place (configure.ac)
- AC_TYPE_UID_T called on only one place (configure.ac)
- HAVE_STRSTR removed since strstr is part of C89 standard [1]
- Remove checks for strtol and strpbrk
- Checking for the presence of perror function is not needed anymore
  since it is part of C89 standard and PHP calls it unconditionally.
- Checking for functions strdup, setenv, strerror, and memmove done only
  on one place (configure.ac)
- outdated check for snprintf removed

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 20:20:12 +01:00
Peter Kokot
4b3da12363 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove HAVE_STRFTIME
2019-03-14 19:43:45 +01:00
Peter Kokot
3a857852a8 Remove HAVE_STRFTIME
Function strftime is part of the C89 standard [1] and current systems
don't need to check for its presence anymore.

Additionally, checks for strftime function in tests have been removed
since the PHP strftime function is now always available.

1: https://port70.net/~nsz/c/c89/c89-draft.html
2019-03-14 19:42:29 +01:00
Remi Collet
f9f422659c Merge branch 'PHP-7.4'
* PHP-7.4:
  add --enable-rtld-now in upgrade info
  use DL_LOAD in litespeed
  add --enable-rtld-now build option to change dlopen behavior
2019-03-12 08:26:36 +01:00
Remi Collet
d633cbac1c add --enable-rtld-now build option to change dlopen behavior 2019-03-12 08:23:06 +01:00
Joe Watkins
99230784f5
Merge branch 'PHP-7.4'
* PHP-7.4:
  zend_weakrefs
2019-03-12 00:37:28 +01:00
Joe Watkins
6529d7acd9
zend_weakrefs 2019-03-12 00:35:35 +01:00
Peter Kokot
80bebdd0e1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean *nix build system
2019-03-07 21:00:36 +01:00
Peter Kokot
f5fa9ddbd5 Clean *nix build system
- remove some outdated and not used macro calls
- remove some unused variables
- Remove not needed comment from tokenizer config.m4
- Remove not needed comment
- remove not needed local variables for editors and syntax highlighting
2019-03-07 20:58:14 +01:00
Peter Kokot
d0fd9fe977 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add AS_HELP_STRING to *nix build configure options
2019-03-07 20:38:04 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot
2968a1d7f2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove legacy AC_CHECK_TYPE calls for uint and ulong
2019-03-06 22:50:46 +01:00
Peter Kokot
bebcdcc745 Remove legacy AC_CHECK_TYPE calls for uint and ulong
The AC_CHECK_TYPE was refactored in more recent versions of Autoconf
and the call with two arguments is obsolete and not recommended anymore.

This patch also refactors some leftovers of using ulong and uint which
are not standard nor common usages of types in C.

The ulong can be used as zend_ulong and uint usage is actually
`unsigned int`.

The usage of HAVE_ULONG removed since it is not used in current code
base.

Legacy edgecase for some legacy HPUX systems removed:
- sys/stream.h header is not checked and the HAVE_SYS_STREAM_H is
  not defined with current build system.

- flags are unsigned int
- max_allowed_packet changed to unsigned int
2019-03-06 22:49:16 +01:00
Peter Kokot
e624c596a5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Move Makefile.global and Makefile.gcov to build directory
2019-03-04 12:32:39 +01:00
Peter Kokot
2957651c5c Move Makefile.global and Makefile.gcov to build directory
These files can be stored in the build directory instead of bloating the
project root directory.
2019-03-04 12:30:42 +01:00
Peter Kokot
f3fad10d33 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
2019-03-04 12:13:22 +01:00
Peter Kokot
a8c3e22d23 Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
Changes:
- PHP_TM_GMTOFF removed
- HAVE_TM_GMTOFF replaced with HAVE_STRUCT_TM_TM_GMTOFF
- HAVE_TM_ZONE replaced with HAVE_STRUCT_TM_TM_ZONE
- HAVE_TZNAME removed

The PHP_TM_GMTOFF macro can be replaced with Autoconf's AC_CHECK_MEMBERS
that defines the HAVE_STRUCT_TM_TM_GMTOFF symbol instead of the
HAVE_TM_ZONE.

The HAVE_TZNAME symbol is not used in current code. The obsolete
HAVE_TM_ZONE symbol has been replaced with more proper
HAVE_STRUCT_TM_TM_ZONE. These are defined by the AC_STRUCT_TIMEZONE
macro.
2019-03-04 12:13:12 +01:00
Peter Kokot
b68c6db7ee Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove AC_PROG_CC_C_O
2019-03-03 14:49:10 +01:00
Peter Kokot
6bb657fc34 Remove AC_PROG_CC_C_O
The AC_PROG_CC_C_O macro checks if compiler can use both -c and -o
options together and if not it defines the NO_MINUS_C_MINUS_O symbol.
It is not used in current codebase and therefore removed.
2019-03-03 14:47:49 +01:00
Peter Kokot
ac6b9b0b7f Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove obsolescent AC_HEADER_STDC and memcpy check
2019-03-01 19:24:06 +01:00
Peter Kokot
a700451706 Remove obsolescent AC_HEADER_STDC and memcpy check
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_STDC`.

This macro checks if given system has C89 compliant header files such
as `<string.h>`, `<stdlib.h>`, `<stdarg.h>`, `<float.h>`,... and defines
the `STDC_HEADERS` symbol [2]. Case is that current systems should be
well supported with at least C89 standard headers [3].

Given headers are still additionally checked with the `AC_PROG_CC`
macro, yet not needed anyway.

Additionally, the HAVE_MEMCPY check has been removed. The memcpy
function is standardized by C89 and later.

Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
[3] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
2019-03-01 19:22:44 +01:00
Peter Kokot
f1b8c30174 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove PHP_DECLARED_TIMEZONE and HAVE_DECLARED_TIMEZONE
2019-02-28 21:18:06 +01:00
Peter Kokot
f64ae64f52 Remove PHP_DECLARED_TIMEZONE and HAVE_DECLARED_TIMEZONE
The HAVE_DECLARED_TIMEZONE symbol usage has been introduced in
2fd8cbff2a
and then removed via
667a9b9bce.
2019-02-28 21:17:49 +01:00