Skip to content

Commit 0c89eda

Browse files
Jan-Ecmb69
authored andcommitted
Windows: allow GD ext without avif.dll
Closes GH-7200.
1 parent ff98313 commit 0c89eda

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/gd/config.w32

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ if (PHP_GD != "no") {
3232
}
3333
}
3434
if (PHP_LIBAVIF != "no") {
35-
if (CHECK_LIB("avif.lib", "gd", PHP_GD) &&
35+
if (CHECK_LIB("avif_a.lib", "gd", PHP_GD) &&
36+
CHECK_LIB("aom_a.lib", "gd", PHP_GD) &&
37+
CHECK_HEADER_ADD_INCLUDE("avif.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\avif")) {
38+
ADD_FLAG("CFLAGS_GD", "/D HAVE_LIBAVIF /D HAVE_GD_AVIF");
39+
} else if (CHECK_LIB("avif.lib", "gd", PHP_GD) &&
3640
CHECK_HEADER_ADD_INCLUDE("avif.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\avif")) {
3741
ADD_FLAG("CFLAGS_GD", "/D HAVE_LIBAVIF /D HAVE_GD_AVIF");
3842
} else {

0 commit comments

Comments
 (0)