diff mbox

[FFmpeg-devel,12/16] build: make sure a disabled autodetect still pick the libc's iconv

Message ID 20170830120915.13050-13-u@pkh.me
State Accepted
Commit fe9c85e4e2650dc9537b54b1eabb4f9be7b628ed
Headers show

Commit Message

Clément Bœsch Aug. 30, 2017, 12:09 p.m. UTC
From: Clément Bœsch <cboesch@gopro.com>

---
 configure | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/configure b/configure
index a6bcee9466..0a961842df 100755
--- a/configure
+++ b/configure
@@ -3592,6 +3592,11 @@  for e in $env; do
 done
 
 if disabled autodetect; then
+
+    # Unless iconv is explicitely disabled by the user, we still want to probe
+    # for the iconv from the libc.
+    disabled iconv || enable libc_iconv
+
     disable_weak $EXTERNAL_AUTODETECT_LIBRARY_LIST
     disable_weak $HWACCEL_AUTODETECT_LIBRARY_LIST
 fi
@@ -6192,7 +6197,11 @@  int main(void) { return 0; }
 EOF
 
 # Funny iconv installations are not unusual, so check it after all flags have been set
-enabled iconv && check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv
+if enabled libc_iconv; then
+    check_func_headers iconv.h iconv
+elif enabled iconv; then
+    check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv
+fi
 
 enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"