From patchwork Thu Sep 1 09:23:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timo Rothenpieler X-Patchwork-Id: 382 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp806893vsd; Thu, 1 Sep 2016 02:23:49 -0700 (PDT) X-Received: by 10.28.52.135 with SMTP id b129mr14572890wma.107.1472721829327; Thu, 01 Sep 2016 02:23:49 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id re8si4681894wjb.225.2016.09.01.02.23.48; Thu, 01 Sep 2016 02:23:49 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@rothenpieler.org; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C669689C34; Thu, 1 Sep 2016 12:23:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from btbn.de (btbn.de [5.9.118.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C7BC689C34 for ; Thu, 1 Sep 2016 12:23:33 +0300 (EEST) Received: from localhost.localdomain (ip4d1666ad.dynamic.kabel-deutschland.de [77.22.102.173]) by btbn.de (Postfix) with ESMTPSA id E7E273C404; Thu, 1 Sep 2016 11:23:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rothenpieler.org; s=mail; t=1472721820; bh=C9PhsVg7jnnD6EiCIGM4ctz3uGpzkkmSEmGXsr++eVQ=; h=From:To:Cc:Subject:Date; b=fyJ4GIm2QVoLKA5kgrWoNFnsCeVSxoZTfysOyjA3zEJChqH+1XFyG4U2t7BdQiSls 4b8SegE28A7kedyZln9Htro+KnDIg5f+vpyoJwVb9rEBLQzoccLr/AmN1S6Lchcejd ZSs9N7syzLZy6ObMeGVjsgIyxqJOtwEJfY0fX3WI= From: Timo Rothenpieler To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2016 11:23:33 +0200 Message-Id: <20160901092333.19238-1-timo@rothenpieler.org> X-Mailer: git-send-email 2.9.2 Subject: [FFmpeg-devel] [PATCH] configure: check for dlsym as well X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Timo Rothenpieler MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" For some reason, when compiling with gcc-asan and a recent enough gcc version(seen on 5.3+ so far), linking dlopen works without -ldl, but dlsym fails with: undefined reference to symbol 'dlsym@@GLIBC_2.2.5' So this patchs checks for both dlopen and dlsym to work for determining if -ldl is needed. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 6741f83..a78edfa 100755 --- a/configure +++ b/configure @@ -5378,9 +5378,9 @@ check_code cc arm_neon.h "int16x8_t test = vdupq_n_s16(0)" && enable intrinsics_ check_ldflags -Wl,--as-needed check_ldflags -Wl,-z,noexecstack -if check_func dlopen; then +if check_func dlopen && check_func dlsym; then ldl= -elif check_func dlopen -ldl; then +elif check_func dlopen -ldl && check_func dlsym -ldl; then ldl=-ldl fi