Skip to content

Commit a5bcd0c

Browse files
committed
Fix nits and add note to UPGRADING.INTERNALS
1 parent 7996604 commit a5bcd0c

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

UPGRADING.INTERNALS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ PHP 8.4 INTERNALS UPGRADE NOTES
183183
used instead of the pkg-config search.
184184
- Added pkg-config support to find unixODBC and iODBC for the pdo_odbc
185185
extension.
186+
- Added pkg-config support to find GNU MP library. As a fallback default
187+
system paths are searched. When a directory argument is provided
188+
(--with-gmp=DIR), it will be used instead of the pkg-config.
186189
- Removed BC enable_pear variable check due to --enable-pear configure option
187190
once used (use with_pear variable name).
188191
- Cache variables synced to php_cv_* naming scheme. If you use them for

ext/gmp/config.m4

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
PHP_ARG_WITH([gmp],
22
[for GNU MP support],
33
[AS_HELP_STRING([[--with-gmp[=DIR]]],
4-
[Include GNU MP support. Optional DIR is the library installation directory.
5-
Also, the GMP_CFLAGS and GMP_LIBS environment variables can be used instead
6-
of the DIR argument to customize the GMP paths.])])
4+
[Include GNU MP support. Use PKG_CONFIG_PATH (or GMP_CFLAGS and GMP_LIBS)
5+
environment variables, or alternatively the optional DIR argument to
6+
customize where to look for the GNU MP library.])])
77

88
if test "$PHP_GMP" != "no"; then
99
gmp_found=no
@@ -20,14 +20,13 @@ if test "$PHP_GMP" != "no"; then
2020
LIBS_SAVED=$LIBS
2121
CFLAGS="$CFLAGS $GMP_CFLAGS"
2222
LIBS="$LIBS $GMP_LIBS"
23-
gmp_check=
24-
AC_CHECK_HEADER([gmp.h], [AC_CHECK_FUNC([__gmpz_rootrem], [gmp_check=ok])])
23+
gmp_check=no
24+
AC_CHECK_HEADER([gmp.h], [AC_CHECK_FUNC([__gmpz_rootrem], [gmp_check=yes])])
2525
CFLAGS=$CFLAGS_SAVED
2626
LIBS=$LIBS_SAVED
2727

28-
AS_VAR_IF([gmp_check], [ok],, [AC_MSG_ERROR([
29-
GNU MP library check failed. GNU MP Library version 4.2 or greater required.
30-
Please, check config.log for details.
28+
AS_VAR_IF([gmp_check], [no], [AC_MSG_FAILURE([
29+
The required GNU MP library version 4.2 or greater not found.
3130
])])
3231

3332
PHP_EVAL_LIBLINE([$GMP_LIBS], [GMP_SHARED_LIBADD])

0 commit comments

Comments
 (0)