autodetect pkgconf-2.4.3.exe on windows/not everyone uses distro-config

without using the distro-config that sets PKG_CONFIG, configure won't
pick the windows version of pkgconf and the harfbuzz build then fails
beause the graphite and icu .pc files cannot be found.

Add an autodetection similar to the one for MESON as a convenience for
building on windows. With that it is enough to have it in PATH or
installed into $LODE_HOME/opt/bin
Can always be overridden by explicitly adding PKG_CONFIG=/path/to/file
into autogen.input

Change-Id: Ia8ea0dffd34e7a97fb28c99ac3f6b561c5dab193
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184221
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
This commit is contained in:
Christian Lohmaier
2025-04-15 17:37:46 +02:00
parent 6fda947ee3
commit d107b16848
9 changed files with 11 additions and 8 deletions
+11
View File
@@ -684,6 +684,17 @@ if test -z "$SED"; then
AC_MSG_ERROR([install sed to run this script])
fi
if test "$build_os" = "cygwin" -o -n "$WSL_ONLY_AS_HELPER"; then
# convenience check for a custom pkgconf used by meson - needs to be a version that uses windows
# style paths. Needs to be checked before the configure-switches that use PKG_CHECK_MODULES as
# that would already set the PKG_CONFIG var and then bypass/skip this autoselection
AC_PATH_PROG(PKG_CONFIG,pkgconf-2.4.3.exe,,[$PATH:$LODE_HOME/opt/bin])
if test -z "$PKG_CONFIG"; then
AC_MSG_WARN([pkgconf-2.4.3.exe not found - A windows version of pkgconf is required to build harfbuzz])
add_warning "please add PKG_CONFIG=/path/to/pkgconf-2.4.3.exe to autogen.input or put it in PATH, a windows version of pkgconf is required to build harfbuzz"
fi
fi
# Set the ENABLE_LTO variable
# ===================================================================
AC_MSG_CHECKING([whether to use link-time optimization])
@@ -2,4 +2,3 @@
--enable-dbgutil
--enable-odk
--disable-online-update
PKG_CONFIG=pkgconf-2.4.3.exe
@@ -1,4 +1,3 @@
--host=i686-pc-cygwin
--enable-odk
--disable-online-update
PKG_CONFIG=pkgconf-2.4.3.exe
@@ -1,4 +1,3 @@
--enable-dbgutil
--enable-odk
--disable-online-update
PKG_CONFIG=pkgconf-2.4.3.exe
@@ -1,3 +1,2 @@
--enable-odk
--disable-online-update
PKG_CONFIG=pkgconf-2.4.3.exe
@@ -3,4 +3,3 @@
--disable-dependency-tracking
--enable-odk
--disable-online-update
PKG_CONFIG=pkgconf-2.4.3.exe
-1
View File
@@ -14,4 +14,3 @@
--enable-mergelibs
--enable-lto
--enable-odk
PKG_CONFIG=pkgconf-2.4.3.exe
-1
View File
@@ -15,4 +15,3 @@
--enable-mergelibs=more
--enable-lto
--enable-odk
PKG_CONFIG=pkgconf-2.4.3.exe
-1
View File
@@ -13,4 +13,3 @@
--enable-mergelibs
--enable-lto
--enable-odk
PKG_CONFIG=pkgconf-2.4.3.exe