summaryrefslogtreecommitdiff
path: root/Zend/Zend.m4
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-8.0'Nikita Popov2020-11-251-6/+0
|\ | | | | | | | | * PHP-8.0: Fixed bug #80377
| * Fixed bug #80377Nikita Popov2020-11-251-6/+0
| | | | | | | | | | | | | | | | | | | | | | Make sure the $PHP_THREAD_SAFETY variable is always available when configuring extensions. It was previously available for phpized extensions, but for in-tree builds it was being set too late. Then, use $PHP_THREAD_SAFETY instead of $enable_zts to check for ZTS in bundled extensions, which makes sure these checks also work for phpize builds.
* | Add compiler flags which aren't included in -Wall or -WextraGeorge Peter Banyard2020-10-101-0/+4
|/ | | | | | | | | | Adds the following compiler flags: . -Wduplicated-cond . -Wlogical-op . -Wformat-truncation . -fno-common Closes GH-6199
* Merge branch 'PHP-7.4'Nikita Popov2020-10-051-4/+4
|\ | | | | | | | | * PHP-7.4: Fix -Wimplicit-function-declaration in configure
| * Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-10-051-4/+4
| |\ | | | | | | | | | | | | * PHP-7.3: Fix -Wimplicit-function-declaration in configure
| | * Fix -Wimplicit-function-declaration in configureNikita Popov2020-10-051-4/+5
| | | | | | | | | | | | As this is an error with xcode 12, see bug #80171.
* | | Prepend compiler warning flags to CFLAG instead to append themGeorge Peter Banyard2020-09-011-2/+2
| | | | | | | | | | | | | | | | | | Credit to @bwoebi for the idea Closes GH-6057
* | | Clean up some unused code (and fix some comments) in build scriptsAlex Dowad2020-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix typo in build/php.m4 - Nothing uses HAVE_INTTYPES_H; so remove check for header file - Nothing defines ZEND_ACCONFIG_H_NO_C_PROTOS; so remove #ifndef - `format_money` was removed in 2019, so <monetary.h> no longer needed - Nothing uses HAVE_NETDB_H; so remove check for header file - Nothing checks HAVE_TERMIOS_H; so remove check for header file (This was actually added when Wez Furlong was adding the original implementation of PTY support in `proc_open`, since replaced.) - Nothing checks HAVE_SYS_AUXV_H; so remove check for header file - PHP_BUILD_DATE variable is not used for anything, so remove it This variable was added to the Makefile, but from there, was not used for anything. The comments suggest it was intended to allow 'reproducible builds'. Presumably, this means that if a bug is found in a PHP binary somewhere, one could look at the Makefile which it was built from, see the date, and then could check the same code version out from source control. But... there can easily be multiple commits to the repo in the same day. Also, what makes us think that the Makefile which a binary was built from will be easily available? Besides, ext/standard/info.c already embeds the build date and time in each binary... but it does it using `__DATE__` and `__TIME__` (see `php_print_info`). - Nothing checks HAVE_FINITE; so don't check for function - Grammar fix to comment in build/php.m4 - Nothing sets $php_ldflags_add_usr_lib variable in configure, so remove conditional This was added in 2002, when Rasmus was having difficulty building PHP on some host and needed to have /usr/lib in the rpath. It was never documented and probably has never been used by anyone else.
* | | Remove unneeded --disable-inline-optimization build parameterAlex Dowad2020-06-171-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 1999, inline optimization was turned off by default. The commit log indicates this was done because GCC was running out of memory on some hosts when building the Zend executor. In 2003, inline optimization was re-enabled by default, but a build option was added to turn it off if one runs out of memory when building. Computing hardware has come a long way since 2003 and I doubt that anyone is running out of memory when building PHP now. Interestingly, this code set an unused variable called `INLINE_CFLAGS`. It actually disabled inline optimization by adding -O0 to the build command, not using `INLINE_CFLAGS`. Just to see how much memory GCC/Make are using when building PHP, I tried building with successively higher values of `ulimit -v` until it succeeded. Interestingly, while most of the codebase can be built with about 400MB of memory, ext/fileinfo/libmagic/apprentice.c requires 1.2GB, doubtless because it includes ext/fileinfo/data_file.c, which is more than 350,000 lines long. That is with GCC 7.5.0. Most users get PHP as a binary package anyways, so the question is, are *packagers* of PHP trying to build on machines with just 1GB RAM? And would they want to package a PHP interpreter built with *no optimizations*? I can't imagine either being true.
* | | Add -Wextra compiler warnings and exclude the trigger happy onesGeorge Peter Banyard2020-04-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compile warnings which are explicitly suppressed are: * -Wno-implicit-fallthrough * -Wno-unused-parameter * -Wno-sign-compare * -Wno-clobbered, only with GCC Closes GH-5151
* | | Remove obsolete configure checks for isinf, isnan, and isfiniteGeorge Peter Banyard2019-12-041-2/+0
| | |
* | | Remove now obsolete configure checks for INFINITY and NAN.George Peter Banyard2019-12-041-129/+0
| | |
* | | Port various autoconf bits to C99 compilersFlorian Weimer2019-09-101-0/+2
| | | | | | | | | | | | | | | | | | C99 no longer has implicit function declarations and implicit ints. Current GCC versions enable them as an extension, but this will change in a future GCC version.
* | | Merge branch 'PHP-7.4'Peter Kokot2019-07-171-4/+2
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.4: Fix typo Simplify functions checks in m4
| * | Simplify functions checks in m4Peter Kokot2019-07-171-4/+2
| | | | | | | | | | | | | | | - AC_CHECK_FUNCS already automatically defines belonging HAVE_function symbols and executes given shell code.
* | | Merge branch 'PHP-7.4'Peter Kokot2019-06-301-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Sync functions checks
| * | Sync functions checksPeter Kokot2019-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed unused checks: - mbsinit check removed, HAVE_MBSINIT removed (not used in php-src) - mempcpy check removed, HAVE_MEMPCPY removed (not used in php-src anymore since 560ed89bfbb56526251e9bd2fbcb27e5932641d8 which uses PHP's own implementation) - strpncpy check removed, added via a8c9e893b6911c785f698d724b2ff61e7aebb737 and not used. - setpgid check removed since HAVE_SETPGID is not used Moved to a central configure.ac: - fpclass - mbrlen moved to configure.ac (since the HAVE_MBRLEN is used accross the php-src) - sigprocmask - getcwd - getwd - glob - strfmon - nice Duplicated checks removed: - gethostname - getlogin - getpwuid_r - socketpair - mprotect check simplified
* | | Merge branch 'PHP-7.4'Peter Kokot2019-06-301-8/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove HAVE_DEV_ARANDOM
| * | Remove HAVE_DEV_ARANDOMPeter Kokot2019-06-301-8/+0
| | | | | | | | | | | | | | | | | | | | | The arandom check is not needed anymore since the implementations of: 3467526a65bfb15eaf9ec49a0b5673b84e26bca4 and 6554f721f770c99037f07d465a7d610568576ce4
* | | Merge branch 'PHP-7.4'Peter Kokot2019-06-271-10/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Clean headers checks
| * | Clean headers checksPeter Kokot2019-06-271-10/+1
| | | | | | | | | | | | | | | | | | | | | Some headers were checked multiple times in the main configure.ac file and in the bundled extensions or SAPIs themselves. Also many of these checks are then used accross other extensions or SAPIs so a central configure.ac makes most sense for these checks.
* | | Merge branch 'PHP-7.4'Peter Kokot2019-06-261-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove HAVE_STRTOD and strtod check
| * | Remove HAVE_STRTOD and strtod checkPeter Kokot2019-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | There is no need to check for the strtod function. It is part of C89 standard which PHP-7.4+ supports. http://port70.net/~nsz/c/c89/c89-draft.html#4.10.1.4
* | | Merge branch 'PHP-7.4'Peter Kokot2019-05-121-22/+24
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Normalize comments in *nix build system m4 files
| * | Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* | | Merge branch 'PHP-7.4'Peter Kokot2019-05-111-2/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove dead DEBUG_CFLAGS setting
| * | Remove dead DEBUG_CFLAGS settingPeter Kokot2019-05-111-2/+0
| | | | | | | | | | | | | | | | | | The USE_MAINTAINER_MODE has been removed via a4c484a4d85e01874653570b7829a248330eb9fb and 43ed9039494a7484c2e3997ceae191ed6b640a62
* | | Merge branch 'PHP-7.4'Dmitry Stogov2019-04-221-0/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add gcc global register for aarch64
| * | Add gcc global register for aarch64CrazyMiaoo2019-04-221-0/+3
| | |
* | | Merge branch 'PHP-7.4'Peter Kokot2019-04-211-0/+114
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Refactor Zend/acinclude.m4 local macro
| * | Refactor Zend/acinclude.m4 local macroPeter Kokot2019-04-211-0/+114
| | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-04-151-1/+1
|\ \ \ | |/ /
| * | Disable strict aliasing warningsNikita Popov2019-04-151-1/+1
| | | | | | | | | | | | | | | | | | It seems like GCC 5 likes to warn about exactly those trivial strict aliasing violations that it's not going to miscompile anyway and the warnings are gone in newer versions. Just disable the noise.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-04-121-1/+1
|\ \ \ | |/ /
| * | Enable -Wall on release builds for GCCNikita Popov2019-04-121-1/+1
| | | | | | | | | | | | | | | -Wall was already enabled for debug builds, enable it for release builds as well.
* | | Merge branch 'PHP-7.4'Peter Kokot2019-04-071-1/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove HAVE_SIGNAL_H
| * | Remove HAVE_SIGNAL_HPeter Kokot2019-04-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `<signal.h>` header file is part of the standard C89 headers [1] and on current systems can be included unconditionally. Since file requires at least C89 or greater, the `HAVE_SIGNAL_H` symbol defined by Autoconf in Zend.m4 [2] can be ommitted and simplifed. The bundled libmagic (file) also ommits the usage of HAVE_SIGNAL_H since 5.35 however current version in PHP is very modified 5.34 version and will be refactored separately. Check for HAVE_SIGNAL_H is therefore still done in the configure.ac. Refs: [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
* | | Merge branch 'PHP-7.4'Peter Kokot2019-04-071-1/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove HAVE_LIMITS_H
| * | Remove HAVE_LIMITS_HPeter Kokot2019-04-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `<limits.h>` header file is part of the standard C89 headers [1] and on current systems can be included unconditionally. Since PHP requires at least C89 or greater, the `HAVE_LIMITS_H` symbol defined by Autoconf in configure.ac [2] can be ommitted and simplifed however due to bundled file library (libmagic) and timelib still using it, the removal there was omitted and done only in Zend.m4 file. Current bundled libraries libtime, oniguruma, and libmagic still include partial `HAVE_LIMITS_H` usage and will be more refactored when this is possible. Refs: [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
* | | Merge branch 'PHP-7.4'Peter Kokot2019-03-301-3/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Refactor PHP_PROG_BISON and PHP_PROG_RE2C
| * | Refactor PHP_PROG_BISON and PHP_PROG_RE2CPeter Kokot2019-03-301-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | For consistency with Windows, and because ZTS is not experimental or a ↵Joe Watkins2019-03-231-7/+7
|/ / | | | | | | "maintainer" feature, this commits renames --enable-maintainer-zts to --enable-zts in the autotools build, and related documentation
* | remove unneeded AC_REQUIRE([AC_PROG_YACC])Nuno Lopes2019-03-171-1/+0
| | | | | | | | thanks Peter Kokot for noticing
* | Clean build systemPeter Kokot2019-03-141-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add AS_HELP_STRING to *nix build configure optionsPeter Kokot2019-03-071-28/+22
| | | | | | | | | | | | | | | | 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
* | Remove legacy AC_CHECK_TYPE calls for uint and ulongPeter Kokot2019-03-061-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove outdated hack for AIX 4Peter Kokot2019-03-031-6/+0
| | | | | | | | | | AIX 4 is not supported anymore for a while. This hack was added very long time ago into PHP and is not needed anymore.
* | Remove AC_PROG_CC_C_OPeter Kokot2019-03-031-1/+0
| | | | | | | | | | | | 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.
* | Remove LIBZEND_CHECK_INT_TYPE and PHP_CHECK_TYPESPeter Kokot2019-03-021-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | Checking for int32_t and uint32_t types is already done by the PHP_CHECK_STDINT_TYPES m4 macro. The PHP_CHECK_TYPES m4 macro has been once used by the mysqlnd and has been removed via 14caf174ff219376e4f1234bd297ffe973cc416e and additionally, the internal unused macro _PHP_DEF_HAVE_FILE has been removed. Additionally, the unused PHP_HAVE_STDINT_TYPES symbol has been removed.
* | Remove obsolescent AC_HEADER_STDC and memcpy checkPeter Kokot2019-03-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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