From patchwork Wed Jul 12 13:37:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 9836771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7D5CB602D8 for ; Wed, 12 Jul 2017 13:53:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D85E1FF73 for ; Wed, 12 Jul 2017 13:53:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61E091FFAE; Wed, 12 Jul 2017 13:53:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E26AC25404 for ; Wed, 12 Jul 2017 13:53:27 +0000 (UTC) Received: from localhost ([::1]:53233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI51-0004cF-5k for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Jul 2017 09:53:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqN-0008UW-Er for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHqJ-0005KO-Cw for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:19 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:56061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqJ-0005Jh-4J; Wed, 12 Jul 2017 09:38:15 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 626AC40F64; Wed, 12 Jul 2017 16:38:13 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id CB282ACD; Wed, 12 Jul 2017 16:38:12 +0300 (MSK) Received: (nullmailer pid 29036 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:37:59 +0300 Message-Id: <5f37e6d4a7b22ccf1bb8fa4eb35784d90ff78fbc.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 03/13] configure: Fix build with pkg-config and --static --enable-sdl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Thomas Huth , Michael Tokarev Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Thomas Huth The configure script prefers pkg-config over sdl-config, but the "--static-libs" parameter only exists for the latter. With pkg-config, "--static --libs" have to be used instead. Buglink: https://bugs.launchpad.net/qemu/+bug/984516 Signed-off-by: Thomas Huth Signed-off-by: Michael Tokarev --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 806658c98b..ce7e8aa842 100755 --- a/configure +++ b/configure @@ -2733,7 +2733,11 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF sdl_cflags=$($sdlconfig --cflags 2>/dev/null) if test "$static" = "yes" ; then - sdl_libs=$($sdlconfig --static-libs 2>/dev/null) + if $pkg_config $sdlname --exists; then + sdl_libs=$($pkg_config $sdlname --static --libs 2>/dev/null) + else + sdl_libs=$($sdlconfig --static-libs 2>/dev/null) + fi else sdl_libs=$($sdlconfig --libs 2>/dev/null) fi