configure.ac | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit f63f00c6118bf65ba711e068380ac94bb9418e4e
Author: Tor Lillqvist <[email protected]>
AuthorDate: Tue Jan 13 13:52:02 2026 +0200
Commit: Noel Grandin <[email protected]>
CommitDate: Sun Jan 18 11:27:08 2026 +0100
Set up pkg-config environment variables when cross-compiling to Linux
Otherwise we won't find the .pc files. Tested by running configury on
arm64 Ubuntu, for cross-compiling to amd64 Ubuntu. Note: No idea yet
whether such a cross-build will run successfully to completion, or the
result work.
Change-Id: I517c1674d1230f91341b240f02b1b65d3ceaaef2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197207
Tested-by: Jenkins
Reviewed-by: Noel Grandin <[email protected]>
diff --git a/configure.ac b/configure.ac
index 5a3c91dedbd4..99801f68b0ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4323,6 +4323,14 @@ fi
if test "$cross_compiling" = "yes"; then
export CROSS_COMPILING=TRUE
+ if test "$_os" = "Linux"; then
+ if test -d /usr/lib/$host_cpu-$host_os/pkgconfig; then
+ export PKG_CONFIG_LIBDIR=/usr/lib/$host_cpu-$host_os/pkgconfig
+ if test -d /usr/share/pkgconfig; then
+ export PKG_CONFIG_PATH=/usr/share/pkgconfig
+ fi
+ fi
+ fi
if test "$enable_dynamic_loading" != yes -a "$enable_wasm_strip" = yes;
then
ENABLE_WASM_STRIP=TRUE
fi