./configure: request pkg-config to provide private libs when static linking
Added wrapper around pkg-config to allow: - safe options injection via ${QEMU_PKG_CONFIG_FLAGS} - spaces in path to pkg-config Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> CC: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1d84950234
commit
17884d7b64
|
@ -234,7 +234,11 @@ ld="${LD-${cross_prefix}ld}"
|
||||||
libtool="${LIBTOOL-${cross_prefix}libtool}"
|
libtool="${LIBTOOL-${cross_prefix}libtool}"
|
||||||
strip="${STRIP-${cross_prefix}strip}"
|
strip="${STRIP-${cross_prefix}strip}"
|
||||||
windres="${WINDRES-${cross_prefix}windres}"
|
windres="${WINDRES-${cross_prefix}windres}"
|
||||||
pkg_config="${PKG_CONFIG-${cross_prefix}pkg-config}"
|
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
|
||||||
|
query_pkg_config() {
|
||||||
|
"${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
|
||||||
|
}
|
||||||
|
pkg_config=query_pkg_config
|
||||||
sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
|
sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
|
||||||
|
|
||||||
# default flags for all hosts
|
# default flags for all hosts
|
||||||
|
@ -553,6 +557,7 @@ for opt do
|
||||||
--static)
|
--static)
|
||||||
static="yes"
|
static="yes"
|
||||||
LDFLAGS="-static $LDFLAGS"
|
LDFLAGS="-static $LDFLAGS"
|
||||||
|
QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
|
||||||
;;
|
;;
|
||||||
--mandir=*) mandir="$optarg"
|
--mandir=*) mandir="$optarg"
|
||||||
;;
|
;;
|
||||||
|
@ -1449,8 +1454,8 @@ fi
|
||||||
##########################################
|
##########################################
|
||||||
# pkg-config probe
|
# pkg-config probe
|
||||||
|
|
||||||
if ! has $pkg_config; then
|
if ! has "$pkg_config_exe"; then
|
||||||
echo "Error: pkg-config binary '$pkg_config' not found"
|
echo "Error: pkg-config binary '$pkg_config_exe' not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue