Unverified Commit 2a349006 authored by eighthave's avatar eighthave Committed by teor
Browse files

force pkg-config to only use --prefix when cross-compiling

The current pkg-config setup has no sense of whether it is cross-compiling,
so it will detect things on the build system that are not present or are
wrong for the host system.  This forces the cross-compiling build to only
look for pkg-config .pc files in --prefix.

A version of this has been the setup for many years with the Android builds.

Fixes #32191

Signed-off-by: eighthave's avatarHans-Christoph Steiner <hans@eds.org>
parent 2395800d
o Minor features (build system):
- force pkg-config to only use --prefix when cross-compiling.
Closes ticket 32191.
......@@ -37,6 +37,16 @@ else
pkg_config_user_action="check the PKG_CONFIG_PATH environment variable"
if test "x$PKG_CONFIG_PATH" = "x" && test "x$prefix" != "xNONE" && test "$host" != "$build"; then
export PKG_CONFIG_PATH=$prefix/lib/pkgconfig
AC_MSG_NOTICE([set PKG_CONFIG_PATH=$PKG_CONFIG_PATH to support cross-compiling])
if test -f "$PKG_CONFIG_PATH/libevent.pc"; then
echo "checking for $PKG_CONFIG_PATH/libevent.pc... yes"
AC_MSG_ERROR([$PKG_CONFIG_PATH/libevent.pc not found!])
AS_HELP_STRING(--enable-openbsd-malloc, [use malloc code from OpenBSD. Linux only. Deprecated: see --with-malloc]))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment