Conversation
aa80bd6 to
10f3dff
Compare
|
Updating it to 2.71 instead since 2.71 was released only one month after 2.70 and it includes some important bug fixes. Edit: If anyone would like to review this, more than welcome. I've added for now only those that have changed build system files semi-recently... |
|
Seems to work fine on macOS/arm and linux/ppc64. Testing this PR on AIX (had to upgrade from 2.69...) and it seems OK so far, but builds are pretty slow on that system. |
10f3dff to
27e3ee6
Compare
Yes, I'm now also worried how this might affect building extensions. When building PHP extension on a system where some old Autoconf is installed by default this will cause issues. For php-src it shouldn't be so much of a problem. I can also wait with this update for another year or two or go with two separate versions (like it was once already done in the past). Requiring 2.71 for php-src and 2.68 for extensions (in that phpize.m4 file). I'm also rechecking all systems and their Autoconf versions... |
This updates the minimum required Autoconf version to 2.71. - Autoconf versions 2.70 started supporting C11 standards. - Autoconf 2.71 was released soon after 2.70 providing some bugfixes. Changes: - Removed obsolete AC_PROG_CC_C99 macro. In Autoconf 2.70 and later this is done by the AC_PROG_CC macro. - m4_normalize is not needed for AC_CHECK_HEADERS and AC_CHECK_FUNCTIONS macros anymore, as the argument is normalized internally by Autoconf in these newer versions. - Adjusted C11 check in configure.ac and added check also in phpize mode. Extensions using PHP headers should be also built with some C11-compliant compiler. - Removed ac_cv_header_sys_types_h_makedev hack for AC_HEADER_MAJOR macro when using Autoconf versions prior to 2.70. This also enables using --runstatedir configure option in the future.
b5e0b07 to
aa16914
Compare
|
Added here now also C11 check in phpize because when PHP extensions use PHP headers they should also be built with some C11-compliant compiler. |
TimWolla
left a comment
There was a problem hiding this comment.
No strong feeling regarding my comment, I'm happy either way.
iluuu1994
left a comment
There was a problem hiding this comment.
No technical review, but I'm happy officially enforcing C11.
|
I'm just adding a note here in case Autoconf 2.71 version will be too much for some system that we're unaware at this point. Instead of this PR, the following can be done to make the C11 check working when Autoconf 2.70+ is installed but skipped if Autoconf 2.69 or lower is installed: --- a/configure.ac
+++ b/configure.ac
@@ -120,6 +120,10 @@ dnl ----------------------------------------------------------------------------
PKG_PROG_PKG_CONFIG
AC_PROG_CC([cc gcc])
+
+m4_version_prereq([2.70], [AS_CASE([$ac_prog_cc_stdc], [c99|c89|no],
+ [AC_MSG_ERROR([C compiler would not accept C11 code.])])])
+
PHP_DETECT_ICC
PHP_DETECT_SUNCCHowever, with this, exactly those old problematic compilers are most likely used on a system, where Autoconf 2.69 is used so the user won't notice that C11 is needed then. Edit: Or, if such case will pop up, this trick can be also used in phpize. For example: building and installing PHP with Autoconf 2.71+ but using "phpize" on the same system where default Autoconf is 2.69. |
|
Isn't 2.69 still default on RHEL 8? If so or if it's still anywhere on any supported distro, then I'm -1 on this. |
So, I'm also -1 |
This updates the minimum required Autoconf version to 2.71.
Changes:
mode. Extensions using PHP headers should be also built with some
C11-compliant compiler.
This also enables using --runstatedir configure option in the future.