[FFmpeg-devel] configure: Add libmodplug cppflags in 'configure' to prevent the use of '--extra-cflags'

Submitted by Reino Wijnsma on June 12, 2017, 11:46 p.m.

Details

Message ID 593F27CC.1090505@xs4all.nl
State New
Headers show

Commit Message

Reino Wijnsma June 12, 2017, 11:46 p.m.
This patch adds libmodplug cppflags in 'configure' to prevent the use of
'--extra-cflags'. This is all that's needed to successfully
cross-compile FFmpeg with LibModplug.
From 7fe7113ccc79f46610b2a89f8ab17e94c348e568 Mon Sep 17 00:00:00 2001
From: Reino17 <rwijnsma@xs4all.nl>
Date: Tue, 13 Jun 2017 01:43:09 +0200
Subject: [PATCH] Add libmodplug cppflags in 'configure' to prevent the use of
 '--extra-cflags'

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Reino Wijnsma June 13, 2017, 1:35 a.m.
I just tried to build a shared LibTwoLAME, but it gave me errors.
Building a shared LibModplug proved more successful.
FFmpeg's 'configure' didn't have any problems with it and finished
without errors.

LibOpenJPEG
<https://github.com/FFmpeg/FFmpeg/blob/master/configure#L5834-L5839> was
the reason for me to submit these patches as it already has added cppflags.

Patch hide | download patch | download mbox

diff --git a/configure b/configure
index e3941f9..6df1cfaa 100755
--- a/configure
+++ b/configure
@@ -5820,7 +5820,7 @@  enabled libkvazaar        && require_pkg_config "kvazaar >= 0.8.1" kvazaar.h kvz
 # can find the libraries and headers through other means.
 enabled libmfx            && { use_pkg_config libmfx "mfx/mfxvideo.h" MFXInit ||
                                { require libmfx "mfx/mfxvideo.h" MFXInit -llibmfx && warn "using libmfx without pkg-config"; } }
-enabled libmodplug        && require_pkg_config libmodplug libmodplug/modplug.h ModPlug_Load
+enabled libmodplug        && require_pkg_config libmodplug libmodplug/modplug.h ModPlug_Load -DMODPLUG_STATIC && add_cppflags -DMODPLUG_STATIC
 enabled libmp3lame        && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
 enabled libmysofa         && require libmysofa "mysofa.h" mysofa_load -lmysofa
 enabled libnpp            && require libnpp npp.h nppGetLibVersion -lnppi -lnppc