From patchwork Tue Sep 11 20:29:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 10294 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp4067091jap; Tue, 11 Sep 2018 13:29:44 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYmgARevWi63UFWA5AMjexyI5lI4/K/Sc61rlh0/D2kN1vs/qFx49+59LtxhYSvvk97DB+f X-Received: by 2002:a1c:5c4:: with SMTP id 187-v6mr2585563wmf.10.1536697784054; Tue, 11 Sep 2018 13:29:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536697784; cv=none; d=google.com; s=arc-20160816; b=sp0UE9akZkxc+3WayKwrNFOmy20pchJ5x5ZFDPpmZZ3+eKu+dBWLzkGHH59k0Sy3ls c18K/UdPpMy386nmx02OGUfnchsaYLwdObjjSall7O+c6G0kUy5Rir/YH1IrBV3iuYQq 5+f41m5vO1gqq6cTMWh8ea/wsL8kaOsqfGZID7Ey1QZWYNn5+ARfH/co0GUmVvvYqMTw lp3XTseZbESKnZEAfPy54tR0iB0k0O2kmf1ebjWqsoPmOax4sZfWJnP+ufYIhEUWJnuS bbJ0TusWdP9GLQx5DY7N8mFbUd7Y75tvDsnI/5SeIjn+W/e1ZeJLNtr9aueokH9DPajm DwqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=4am1acULDzXn0ui5pwNUnf05ILOUHj8kI0Llm1/r728=; b=muh4Gqp7X0uAy4oWD4dWIsZIUpBeXM2tF9NqxPfK5rSVKmnsySfwo3EcVP7lmd2aVo RZ478lbvEeSHXhn0w1KpHhpdJ2oo+adrjY6KLKcw6rHdDTKl84YSJyHfz5emN3/9aBxl 2bw2g9hNFTQCxxdrwVZWdNlJZf0c69YQfPka8d1py1Kvir9+dbAEPGL3i3DucAwtc71m PzxbitSZGVXuutquOERQDmlJP1H8h9t09nnmnihcm284i5VdUPf+BoXg/nnj/c8DFXBT cCT8fJYNaHhkVJ9vTh5Arksk/J5r2QX/0yoOyvI9NqBZ3Cv6QdU56xr7lwzW0pTy4ykK a1PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@micronovasrl.com header.s=dkim header.b=uq0o5SSD; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j7-v6si1482196wmd.131.2018.09.11.13.29.43; Tue, 11 Sep 2018 13:29:44 -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=@micronovasrl.com header.s=dkim header.b=uq0o5SSD; 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 8236B68A42A; Tue, 11 Sep 2018 23:29:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.micronovasrl.com (mail.micronovasrl.com [212.103.203.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5357B689FA9 for ; Tue, 11 Sep 2018 23:29:25 +0300 (EEST) Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id F1FA5B0093D for ; Tue, 11 Sep 2018 22:29:34 +0200 (CEST) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=x-mailer:message-id:date:date:subject:subject:to:from:from; s=dkim; t=1536697774; x=1537561775; bh=OMRq6e3QP6xsFNKT6tTJbqmD +j5nXMMEB7uuZhN2dy0=; b=uq0o5SSDfz4vBCiTq44EoFmen4WvJaa+yIlqb/Lf BHeBqqspNt96XshcWsmhLlb75aVmk9yH4+PgjWtv+rTJt13ezhZ7CBPC+TksQ4Wt EGG5QivtZq/Xd2U7CYq8nHMJ7jB51ejwpX7BG4aZfXu9jgi8azAn0+MDIjXyLF3/ +HA= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Wp-5067YvLpT for ; Tue, 11 Sep 2018 22:29:34 +0200 (CEST) Received: from ubuntu.localdomain (5-157-103-91.v4.ngi.it [5.157.103.91]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 4EAD8B002BD; Tue, 11 Sep 2018 22:29:34 +0200 (CEST) From: Giulio Benetti To: ffmpeg-devel@ffmpeg.org Date: Tue, 11 Sep 2018 22:29:32 +0200 Message-Id: <20180911202932.14724-1-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH] configure: add LIBDRM to extralibs_avutil 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: Giulio Benetti MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" When static linking programs using ffmpeg libraries, if linking against libavutil, -ldrm is listed before -lavutil. This leads to linking failure due to undefined reference of drmGetVersion() and drmFreeVersion(). This is why when pkg-config create libavutil.pc doesn't append -ldrm after -lavutil. Create LIBDRM=-ldrm in case libdrm is enabled and add $LIBDRM to extralibs_avutil. Signed-off-by: Giulio Benetti --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index ef97c6b500..28bc3481bc 100755 --- a/configure +++ b/configure @@ -6057,7 +6057,7 @@ enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_ enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2 enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.5.115" davs2.h davs2_decoder_open enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new -enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion +enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion && LIBDRM="-ldrm" enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && warn "using libfdk without pkg-config"; } } @@ -7347,7 +7347,7 @@ rpath=$(enabled rpath && echo "-Wl,-rpath,\${libdir}") source_path=${source_path} LIBPREF=${LIBPREF} LIBSUF=${LIBSUF} -extralibs_avutil="$avutil_extralibs" +extralibs_avutil="$avutil_extralibs $LIBDRM" extralibs_avcodec="$avcodec_extralibs" extralibs_avformat="$avformat_extralibs" extralibs_avdevice="$avdevice_extralibs"