* [Qemu-devel] [PATCH v3 resend] ./configure: request pkg-config to provide private libs when static linking
@ 2012-01-31 19:03 Sergei Trofimovich
2012-02-01 22:11 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: Sergei Trofimovich @ 2012-01-31 19:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Sergei Trofimovich
From: Sergei Trofimovich <slyfox@gentoo.org>
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>
---
configure | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index f69e08f..8fd5404 100755
--- a/configure
+++ b/configure
@@ -234,7 +234,11 @@ ld="${LD-${cross_prefix}ld}"
libtool="${LIBTOOL-${cross_prefix}libtool}"
strip="${STRIP-${cross_prefix}strip}"
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}"
# default flags for all hosts
@@ -553,6 +557,7 @@ for opt do
--static)
static="yes"
LDFLAGS="-static $LDFLAGS"
+ QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
;;
--mandir=*) mandir="$optarg"
;;
@@ -1449,8 +1454,8 @@ fi
##########################################
# pkg-config probe
-if ! has $pkg_config; then
- echo "Error: pkg-config binary '$pkg_config' not found"
+if ! has "$pkg_config_exe"; then
+ echo "Error: pkg-config binary '$pkg_config_exe' not found"
exit 1
fi
--
1.7.8.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v3 resend] ./configure: request pkg-config to provide private libs when static linking
2012-01-31 19:03 [Qemu-devel] [PATCH v3 resend] ./configure: request pkg-config to provide private libs when static linking Sergei Trofimovich
@ 2012-02-01 22:11 ` Anthony Liguori
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2012-02-01 22:11 UTC (permalink / raw)
To: Sergei Trofimovich; +Cc: Peter Maydell, qemu-devel, Sergei Trofimovich
On 01/31/2012 01:03 PM, Sergei Trofimovich wrote:
> From: Sergei Trofimovich<slyfox@gentoo.org>
>
> 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>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> configure | 11 ++++++++---
> 1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index f69e08f..8fd5404 100755
> --- a/configure
> +++ b/configure
> @@ -234,7 +234,11 @@ ld="${LD-${cross_prefix}ld}"
> libtool="${LIBTOOL-${cross_prefix}libtool}"
> strip="${STRIP-${cross_prefix}strip}"
> 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}"
>
> # default flags for all hosts
> @@ -553,6 +557,7 @@ for opt do
> --static)
> static="yes"
> LDFLAGS="-static $LDFLAGS"
> + QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
> ;;
> --mandir=*) mandir="$optarg"
> ;;
> @@ -1449,8 +1454,8 @@ fi
> ##########################################
> # pkg-config probe
>
> -if ! has $pkg_config; then
> - echo "Error: pkg-config binary '$pkg_config' not found"
> +if ! has "$pkg_config_exe"; then
> + echo "Error: pkg-config binary '$pkg_config_exe' not found"
> exit 1
> fi
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-01 22:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-31 19:03 [Qemu-devel] [PATCH v3 resend] ./configure: request pkg-config to provide private libs when static linking Sergei Trofimovich
2012-02-01 22:11 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).