From patchwork Mon Jan 23 17:44:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Trofimovich X-Patchwork-Id: 137442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D0CE7B6FBD for ; Tue, 24 Jan 2012 04:40:25 +1100 (EST) Received: from localhost ([::1]:55837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpNsV-00053T-VC for incoming@patchwork.ozlabs.org; Mon, 23 Jan 2012 12:40:23 -0500 Received: from eggs.gnu.org ([140.186.70.92]:60400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpNsO-00052c-SV for qemu-devel@nongnu.org; Mon, 23 Jan 2012 12:40:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpNsK-0003j6-Ol for qemu-devel@nongnu.org; Mon, 23 Jan 2012 12:40:16 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:33632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpNsK-0003it-K4 for qemu-devel@nongnu.org; Mon, 23 Jan 2012 12:40:12 -0500 Received: from sf.home (unknown [178.125.150.85]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id 7E4131B402A; Mon, 23 Jan 2012 17:40:05 +0000 (UTC) Received: by sf.home (Postfix, from userid 1000) id B3FEF124923C; Mon, 23 Jan 2012 20:44:17 +0300 (FET) From: Sergei Trofimovich To: qemu-devel@nongnu.org Date: Mon, 23 Jan 2012 20:44:03 +0300 Message-Id: <1327340643-15446-1-git-send-email-slyfox@inbox.ru> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 140.211.166.183 Cc: Peter Maydell , Sergei Trofimovich Subject: [Qemu-devel] [PATCH v2 1/2] ./configure: request pkg-config to provide private libs when static linking X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Sergei Trofimovich 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 --- configure | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 467e87b..97d51a7 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 # TODO: sed 's/$pkg_config/pkg_config/g' 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" ;; @@ -1445,8 +1450,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