From b7a05cc3657861879fb0e19f94a54b9e9b310130 Mon Sep 17 00:00:00 2001 From: gemmaro Date: Sat, 12 Jul 2025 08:15:49 +0900 Subject: [PATCH] Add optional zlib support detection via libxml2 in extconf. This defines HAVE_ZLIB_H macro when zlib is available through libxml2 dependency. --- ext/libxml/extconf.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/libxml/extconf.rb b/ext/libxml/extconf.rb index 21c802ac..91a9238d 100644 --- a/ext/libxml/extconf.rb +++ b/ext/libxml/extconf.rb @@ -63,5 +63,10 @@ def crash(str) EOL end +# Optional zlib support via libxml2; defines HAVE_ZLIB_H if available. +unless have_header("zlib.h") + message "zlib not found: building without compression support\n" +end + create_header() create_makefile('libxml_ruby')