Skip to contentSkip to conversation

./configure: request pkg-config to provide private libs when static linking

PATCH RESEND Applied Sergei Trofimovich 2 participants 2 messages Jan 31, 2012 – Feb 1, 2012

lore
Share & tools
lore
#0 lore raw

PATCH RESEND v3 1/1 ./configure: request pkg-config to provide private libs when static linking

From: Sergei Trofimovich <[email protected]>

Added wrapper around pkg-config to allow:
- safe options injection via ${QEMU_PKG_CONFIG_FLAGS}
- spaces in path to pkg-config

---
 configure |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
configure +8 -3
index f69e08f..8fd5404 100755
@@ -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
 
Signature · 1 line
1.7.8.4
#1 lore raw
Quoted 8 lines · Sergei Trofimovich

From: Sergei Trofimovich<[email protected]>

Added wrapper around pkg-config to allow:
- safe options injection via ${QEMU_PKG_CONFIG_FLAGS}
- spaces in path to pkg-config

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 40 lines
---
  configure |   11 ++++++++---
  1 files changed, 8 insertions(+), 3 deletions(-)
configure +8 -3
index f69e08f..8fd5404 100755
@@ -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