Skip to content

Update preprocessor macros help texts for enchant and snmp extensions #15255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions ext/enchant/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ if test "$PHP_ENCHANT" != "no"; then
PHP_EVAL_INCLINE([$ENCHANT2_CFLAGS])
PHP_EVAL_LIBLINE([$ENCHANT2_LIBS], [ENCHANT_SHARED_LIBADD])
AC_DEFINE([HAVE_ENCHANT_GET_VERSION], [1],
[enchant_get_version since 1.6.0])
[Define to 1 if Enchant library has the 'enchant_get_version' function
(available since 1.6.0).])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems enchant is the only extension having this kind of info.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is kind of useful info to know in which version the function was added without the need to browse the library changelog...

], [
AC_MSG_WARN([libenchant-2 not found trying with old libenchant])
PKG_CHECK_MODULES([ENCHANT], [enchant >= 1.4.2])
Expand All @@ -21,14 +22,14 @@ if test "$PHP_ENCHANT" != "no"; then
PHP_EVAL_LIBLINE([$ENCHANT_LIBS], [ENCHANT_SHARED_LIBADD])

PHP_CHECK_LIBRARY([enchant], [enchant_get_version],
[AC_DEFINE([HAVE_ENCHANT_GET_VERSION], [1],
[enchant_get_version since 1.6.0])],
[AC_DEFINE([HAVE_ENCHANT_GET_VERSION], [1])],
[],
[$ENCHANT_LIBS])

PHP_CHECK_LIBRARY([enchant], [enchant_broker_set_param],
[AC_DEFINE([HAVE_ENCHANT_BROKER_SET_PARAM], [1],
[enchant_broker_set_param since 1.5.0 and removed in 2.x])],
[Define to 1 if Enchant library has the 'enchant_broker_set_param'
function (available since 1.5.0 and removed in 2.x).])],
[],
[$ENCHANT_LIBS])
])
Expand Down
4 changes: 2 additions & 2 deletions ext/enchant/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ if (PHP_ENCHANT == "yes") {
have_enchant = true;
} else if (CHECK_LIB("libenchant.lib", "enchant", PHP_ENCHANT)) {
have_enchant = true;
AC_DEFINE('HAVE_ENCHANT_BROKER_SET_PARAM', 1);
AC_DEFINE('HAVE_ENCHANT_BROKER_SET_PARAM', 1, "Define to 1 if Enchant library has the 'enchant_broker_set_param' function (available since 1.5.0 and removed in 2.x).");
} else {
have_enchant = false;
WARNING('Could not find libenchant.lib; skipping');
}
if (have_enchant) {
EXTENSION("enchant", "enchant.c");
AC_DEFINE('HAVE_ENCHANT', 1, "Define to 1 if the PHP extension 'enchant' is available.");
AC_DEFINE('HAVE_ENCHANT_GET_VERSION', 1);
AC_DEFINE('HAVE_ENCHANT_GET_VERSION', 1, "Define to 1 if Enchant library has the 'enchant_get_version' function (available since 1.6.0).");
}
} else {
WARNING('Could not find enchant.h; skipping');
Expand Down
11 changes: 8 additions & 3 deletions ext/snmp/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,24 @@ if test "$PHP_SNMP" != "no"; then

dnl Check whether shutdown_snmp_logging() exists.
PHP_CHECK_LIBRARY([$SNMP_LIBNAME], [shutdown_snmp_logging],
[AC_DEFINE([HAVE_SHUTDOWN_SNMP_LOGGING], [1], [ ])],
[AC_DEFINE([HAVE_SHUTDOWN_SNMP_LOGGING], [1],
[Define to 1 if SNMP library has the 'shutdown_snmp_logging' function.])],
[],
[$SNMP_SHARED_LIBADD])

dnl Check whether usmHMAC192SHA256AuthProtocol exists.
PHP_CHECK_LIBRARY([$SNMP_LIBNAME], [usmHMAC192SHA256AuthProtocol],
[AC_DEFINE([HAVE_SNMP_SHA256], [1], [ ])],
[AC_DEFINE([HAVE_SNMP_SHA256], [1],
[Define to 1 if SNMP library has the 'usmHMAC192SHA256AuthProtocol'
array.])],
[],
[$SNMP_SHARED_LIBADD])

dnl Check whether usmHMAC384SHA512AuthProtocol exists.
PHP_CHECK_LIBRARY([$SNMP_LIBNAME], [usmHMAC384SHA512AuthProtocol],
[AC_DEFINE([HAVE_SNMP_SHA512], [1], [ ])],
[AC_DEFINE([HAVE_SNMP_SHA512], [1],
[Define to 1 if SNMP library has the 'usmHMAC384SHA512AuthProtocol'
array.])],
[],
[$SNMP_SHARED_LIBADD])

Expand Down