From 162d55bed707580cfc8b9eb856c6f6f7041c8319 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 28 Aug 2024 17:08:30 +0200 Subject: [PATCH] Fix GREP_HEADER on Windows This fixes the libxml version check when the libxml/xmlversion.h is located elsewhere than libxml2 include directory. --- win32/build/confutils.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 95a4e5ce3c136..ff35f0664f4bc 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -965,14 +965,19 @@ function GREP_HEADER(header_name, regex, path_to_check) if (!c) { /* look in the include path */ + if (path_to_check == null) { + path_to_check = php_usual_include_suspects; + } else { + path_to_check += ";" + php_usual_include_suspects; + } var p = search_paths(header_name, path_to_check, "INCLUDE"); if (typeof(p) == "string") { - c = file_get_contents(p); + c = file_get_contents(p + "\\" + header_name); } else if (p == false) { p = search_paths(header_name, PHP_EXTRA_INCLUDES, null); if (typeof(p) == "string") { - c = file_get_contents(p); + c = file_get_contents(p + "\\" + header_name); } } if (!c) {