Disable use of build system pkg-config files when cross-compiling
Using build system libraries for a different host doesn't make sense and can be actively harmful, so set PKG_CONFIG_LIBDIR to prevent pkg-config from finding them (it, or PKG_CONFIG_PATH, can still be set to some host-appropriate directory manually before/when running configure). This obviates the need for the changes in the previous commit, so revert it.
This commit is contained in:
12
configure
vendored
12
configure
vendored
@@ -21642,6 +21642,15 @@ $as_echo "no" >&6; }
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$build" != "$host"; 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
|
||||||
@@ -23004,8 +23013,6 @@ if test "$wxUSE_LIBMSPACK" != "no"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "$wxUSE_OSX_IPHONE" != 1; then
|
|
||||||
|
|
||||||
if test "$wxUSE_LIBCURL" != "no"; then
|
if test "$wxUSE_LIBCURL" != "no"; then
|
||||||
|
|
||||||
pkg_failed=no
|
pkg_failed=no
|
||||||
@@ -23101,7 +23108,6 @@ $as_echo "$as_me: WARNING: libcurl not found, wxWebRequest won't be available" >
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
TOOLKIT=
|
TOOLKIT=
|
||||||
TOOLKIT_INCLUDE=
|
TOOLKIT_INCLUDE=
|
||||||
|
24
configure.in
24
configure.in
@@ -2383,6 +2383,23 @@ fi dnl End of pre-C++11 only checks section
|
|||||||
dnl Find pkg-config outside of any conditional. Done before any PKG_* call.
|
dnl Find pkg-config outside of any conditional. Done before any PKG_* call.
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
|
dnl When cross-compiling, don't use .pc files on the build system, they are at
|
||||||
|
dnl best useless and can be harmful (e.g. they may define options inappropriate
|
||||||
|
dnl for the cross-build, resulting in the failure of all the subsequent tests).
|
||||||
|
if test "$build" != "$host"; 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
|
||||||
@@ -2928,11 +2945,6 @@ dnl ------------------------------------------------------------------------
|
|||||||
dnl Check for libcurl
|
dnl Check for libcurl
|
||||||
dnl ------------------------------------------------------------------------
|
dnl ------------------------------------------------------------------------
|
||||||
|
|
||||||
dnl Using libcurl on iOS doesn't make much sense and currently breaks the
|
|
||||||
dnl build, probably because it finds a wrong (native) libcurl.pc file, so just
|
|
||||||
dnl disable it for now.
|
|
||||||
if test "$wxUSE_OSX_IPHONE" != 1; then
|
|
||||||
|
|
||||||
if test "$wxUSE_LIBCURL" != "no"; then
|
if test "$wxUSE_LIBCURL" != "no"; then
|
||||||
PKG_CHECK_MODULES(LIBCURL, [libcurl],
|
PKG_CHECK_MODULES(LIBCURL, [libcurl],
|
||||||
[
|
[
|
||||||
@@ -2957,8 +2969,6 @@ if test "$wxUSE_LIBCURL" != "no"; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi dnl wxUSE_OSX_IPHONE != 1
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
dnl search for toolkit (widget sets)
|
dnl search for toolkit (widget sets)
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user