1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

build: make iconv build configurable.

This commit is contained in:
Clément Bœsch 2013-02-28 00:45:51 +01:00
parent 4a8fc1d83b
commit 7b2d50f81e
3 changed files with 8 additions and 8 deletions

5
configure vendored
View File

@ -188,6 +188,7 @@ External library support:
--enable-fontconfig enable fontconfig --enable-fontconfig enable fontconfig
--enable-frei0r enable frei0r video filtering --enable-frei0r enable frei0r video filtering
--enable-gnutls enable gnutls [no] --enable-gnutls enable gnutls [no]
--enable-iconv enable iconv [autodetect]
--enable-libaacplus enable AAC+ encoding via libaacplus [no] --enable-libaacplus enable AAC+ encoding via libaacplus [no]
--enable-libass enable libass subtitles rendering [no] --enable-libass enable libass subtitles rendering [no]
--enable-libbluray enable BluRay reading using libbluray [no] --enable-libbluray enable BluRay reading using libbluray [no]
@ -1122,6 +1123,7 @@ EXTERNAL_LIBRARY_LIST="
fontconfig fontconfig
frei0r frei0r
gnutls gnutls
iconv
libaacplus libaacplus
libass libass
libbluray libbluray
@ -1406,7 +1408,6 @@ HAVE_LIST="
gnu_as gnu_as
gsm_h gsm_h
ibm_asm ibm_asm
iconv
inet_aton inet_aton
io_h io_h
isatty isatty
@ -3765,7 +3766,6 @@ check_func getopt
check_func getrusage check_func getrusage
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
check_func gettimeofday check_func gettimeofday
check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv
check_func inet_aton $network_extralibs check_func inet_aton $network_extralibs
check_func isatty check_func isatty
check_func localtime_r check_func localtime_r
@ -3821,6 +3821,7 @@ check_header asm/types.h
disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib
disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv
if ! disabled w32threads && ! enabled pthreads; then if ! disabled w32threads && ! enabled pthreads; then
check_func_headers "windows.h process.h" _beginthreadex && enable w32threads check_func_headers "windows.h process.h" _beginthreadex && enable w32threads

View File

@ -48,7 +48,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <limits.h> #include <limits.h>
#include <float.h> #include <float.h>
#if HAVE_ICONV #if CONFIG_ICONV
# include <iconv.h> # include <iconv.h>
#endif #endif
@ -1116,7 +1116,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
if (avctx->sub_charenc_mode == FF_SUB_CHARENC_MODE_AUTOMATIC) if (avctx->sub_charenc_mode == FF_SUB_CHARENC_MODE_AUTOMATIC)
avctx->sub_charenc_mode = FF_SUB_CHARENC_MODE_PRE_DECODER; avctx->sub_charenc_mode = FF_SUB_CHARENC_MODE_PRE_DECODER;
if (!HAVE_ICONV && avctx->sub_charenc_mode == FF_SUB_CHARENC_MODE_PRE_DECODER) { if (!CONFIG_ICONV && avctx->sub_charenc_mode == FF_SUB_CHARENC_MODE_PRE_DECODER) {
av_log(avctx, AV_LOG_ERROR, "Character encoding subtitles " av_log(avctx, AV_LOG_ERROR, "Character encoding subtitles "
"conversion needs a libavcodec built with iconv support " "conversion needs a libavcodec built with iconv support "
"for this codec\n"); "for this codec\n");
@ -1887,7 +1887,7 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
static int recode_subtitle(AVCodecContext *avctx, static int recode_subtitle(AVCodecContext *avctx,
AVPacket *outpkt, const AVPacket *inpkt) AVPacket *outpkt, const AVPacket *inpkt)
{ {
#if HAVE_ICONV #if CONFIG_ICONV
iconv_t cd = (iconv_t)-1; iconv_t cd = (iconv_t)-1;
int ret = 0; int ret = 0;
char *inb, *outb; char *inb, *outb;
@ -1898,7 +1898,7 @@ static int recode_subtitle(AVCodecContext *avctx,
if (avctx->sub_charenc_mode != FF_SUB_CHARENC_MODE_PRE_DECODER) if (avctx->sub_charenc_mode != FF_SUB_CHARENC_MODE_PRE_DECODER)
return 0; return 0;
#if HAVE_ICONV #if CONFIG_ICONV
cd = iconv_open("UTF-8", avctx->sub_charenc); cd = iconv_open("UTF-8", avctx->sub_charenc);
if (cd == (iconv_t)-1) { if (cd == (iconv_t)-1) {
av_log(avctx, AV_LOG_ERROR, "Unable to open iconv context " av_log(avctx, AV_LOG_ERROR, "Unable to open iconv context "

View File

@ -52,8 +52,7 @@ fate-sub-vplayer: CMD = md5 -i $(SAMPLES)/sub/VPlayer_capability_tester.txt -f a
FATE_SUBTITLES_ASS-$(call DEMDEC, WEBVTT, WEBVTT) += fate-sub-webvtt FATE_SUBTITLES_ASS-$(call DEMDEC, WEBVTT, WEBVTT) += fate-sub-webvtt
fate-sub-webvtt: CMD = md5 -i $(SAMPLES)/sub/WebVTT_capability_tester.vtt -f ass fate-sub-webvtt: CMD = md5 -i $(SAMPLES)/sub/WebVTT_capability_tester.vtt -f ass
FATE_SUBTITLES_CHARENC-$(HAVE_ICONV) = fate-sub-charenc FATE_SUBTITLES_ASS-$(call ALLYES, MICRODVD_DEMUXER MICRODVD_DECODER ICONV) += fate-sub-charenc
FATE_SUBTITLES_ASS-$(call DEMDEC, MICRODVD, MICRODVD) += $(FATE_SUBTITLES_CHARENC-yes)
fate-sub-charenc: CMD = md5 -sub_charenc cp1251 -i $(SAMPLES)/sub/cp1251-subtitles.sub -f ass fate-sub-charenc: CMD = md5 -sub_charenc cp1251 -i $(SAMPLES)/sub/cp1251-subtitles.sub -f ass
FATE_SUBTITLES-$(call ENCMUX, ASS, ASS) += $(FATE_SUBTITLES_ASS-yes) FATE_SUBTITLES-$(call ENCMUX, ASS, ASS) += $(FATE_SUBTITLES_ASS-yes)