From c1743bfdcb21ed30c09ae75e14f28c20351065c0 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 25 Sep 2024 20:18:38 +0200 Subject: [PATCH] Sync exif dependency on mbstring extension as optional When decoding multibyte data in EXIF tags, the mbstring extension needs to be enabled. In Autotools this is now synced with ZEND_MOD_OPTIONAL in the C code, and on Windows it is now also optional. The required dependency on mbstring extension was removed via 755c2cd0d85b65f35abb2d54204fa7d38b820268 which made the mbstring extension optional dependency. --- ext/exif/config.m4 | 1 + ext/exif/config.w32 | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ext/exif/config.m4 b/ext/exif/config.m4 index 5d096cb4c16b7..6824ba2c3453a 100644 --- a/ext/exif/config.m4 +++ b/ext/exif/config.m4 @@ -10,4 +10,5 @@ if test "$PHP_EXIF" != "no"; then [exif.c], [$ext_shared],, [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) + PHP_ADD_EXTENSION_DEP(exif, mbstring, true) fi diff --git a/ext/exif/config.w32 b/ext/exif/config.w32 index 52adaef5b12f7..81b9dd818f426 100644 --- a/ext/exif/config.w32 +++ b/ext/exif/config.w32 @@ -2,12 +2,8 @@ ARG_ENABLE('exif', 'Exchangeable image information (EXIF) Support', 'no'); -if(PHP_EXIF != 'no') -{ - if(ADD_EXTENSION_DEP('exif', 'mbstring')) - { - AC_DEFINE('HAVE_EXIF', 1, "Define to 1 if the PHP extension 'exif' is available."); - - EXTENSION('exif', 'exif.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1'); - } +if(PHP_EXIF != 'no') { + AC_DEFINE('HAVE_EXIF', 1, "Define to 1 if the PHP extension 'exif' is available."); + EXTENSION('exif', 'exif.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1'); + ADD_EXTENSION_DEP('exif', 'mbstring', true); }