Do use host-specific pkg-config when cross-compiling
This re-enables the use of $host-pkg-config after it was disabled again
by d6ddfe87e1 (Disable build system pkg-config when cross-compiling to
non-Linux, 2022-11-30).
Closes #23037.
This commit is contained in:
parent
cf661f9293
commit
7899850496
2 changed files with 30 additions and 36 deletions
26
configure
vendored
26
configure
vendored
|
|
@ -25052,25 +25052,23 @@ $as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$build" != "$host"; then
|
if test "$build" != "$host"; then
|
||||||
case "${host}" in
|
case "$PKG_CONFIG" in
|
||||||
*-linux-*)
|
*/$host-pkg-config )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
* )
|
||||||
disable_build_system_pkg_config=1
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Not using native pkg-config when cross-compiling." >&5
|
||||||
;;
|
$as_echo "$as_me: WARNING: Not using native pkg-config when cross-compiling." >&2;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if test -z "$PKG_CONFIG_LIBDIR"; then
|
||||||
|
PKG_CONFIG_LIBDIR=/dev/null
|
||||||
|
export PKG_CONFIG_LIBDIR
|
||||||
|
fi
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$disable_build_system_pkg_config" = 1; then
|
|
||||||
|
|
||||||
|
|
||||||
if test -z "$PKG_CONFIG_LIBDIR"; then
|
|
||||||
PKG_CONFIG_LIBDIR=/dev/null
|
|
||||||
export PKG_CONFIG_LIBDIR
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test "$wxUSE_REGEX" != "no"; then
|
if test "$wxUSE_REGEX" != "no"; then
|
||||||
|
|
|
||||||
40
configure.in
40
configure.in
|
|
@ -2098,34 +2098,30 @@ dnl the build system, they are at best useless and can be harmful (e.g. they
|
||||||
dnl may define options inappropriate for the cross-build, resulting in the
|
dnl may define options inappropriate for the cross-build, resulting in the
|
||||||
dnl failure of all the subsequent tests).
|
dnl failure of all the subsequent tests).
|
||||||
dnl
|
dnl
|
||||||
dnl Note that we only do it in this particular case because in other cases we
|
dnl However do use .pc files for the host libraries that can be found by the
|
||||||
dnl may want to use .pc files on the build system, e.g. it's common to have
|
dnl host-specific pkg-config if it was found by PKG_PROG_PKG_CONFIG above.
|
||||||
dnl them when cross-compiling from x86_64 Linux to ARM Linux.
|
|
||||||
if test "$build" != "$host"; then
|
if test "$build" != "$host"; then
|
||||||
case "${host}" in
|
case "$PKG_CONFIG" in
|
||||||
*-linux-*)
|
*/$host-pkg-config )
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
* )
|
||||||
disable_build_system_pkg_config=1
|
AC_MSG_WARN([Not using native pkg-config when cross-compiling.])
|
||||||
;;
|
|
||||||
|
dnl pkg.m4 forbids the use of PKG_XXX, so undo it here to avoid autoconf
|
||||||
|
dnl errors.
|
||||||
|
m4_pattern_allow([PKG_CONFIG_LIBDIR])
|
||||||
|
|
||||||
|
dnl If pkg-config libdir is already defined, we suppose that they know what
|
||||||
|
dnl they're doing and leave it alone, but if not, set it to a path in which
|
||||||
|
dnl no .pc files will be found.
|
||||||
|
if test -z "$PKG_CONFIG_LIBDIR"; then
|
||||||
|
PKG_CONFIG_LIBDIR=/dev/null
|
||||||
|
export PKG_CONFIG_LIBDIR
|
||||||
|
fi
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$disable_build_system_pkg_config" = 1; then
|
|
||||||
dnl pkg.m4 forbids the use of PKG_XXX, so undo it here to avoid autoconf
|
|
||||||
dnl errors.
|
|
||||||
m4_pattern_allow([PKG_CONFIG_LIBDIR])
|
|
||||||
|
|
||||||
dnl If pkg-config libdir is already defined, we suppose that they know what
|
|
||||||
dnl they're doing and leave it alone, but if not, set it to a path in which
|
|
||||||
dnl no .pc files will be found.
|
|
||||||
if test -z "$PKG_CONFIG_LIBDIR"; then
|
|
||||||
PKG_CONFIG_LIBDIR=/dev/null
|
|
||||||
export PKG_CONFIG_LIBDIR
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl Optional libraries
|
dnl Optional libraries
|
||||||
dnl
|
dnl
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue