summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-03-05 22:24:57 +0100
committerwm4 <wm4@mplayer2.org>2012-03-05 22:24:57 +0100
commit8dc0743571630a08fd40fa88aa09b12b4ce65bf2 (patch)
treee1c4465768635d77954b5fd21ae726444ee4f48a
parentaebdf4f153438497b9310bd1417b5216f07e043b (diff)
parentafecdb681bed81b5df0ed18a300c68be603dfdf9 (diff)
downloadmpv-8dc0743571630a08fd40fa88aa09b12b4ce65bf2.tar.bz2
mpv-8dc0743571630a08fd40fa88aa09b12b4ce65bf2.tar.xz
Merge remote-tracking branch 'origin/master' into my_master
Conflicts: mplayer.c screenshot.c
-rw-r--r--Makefile9
-rw-r--r--av_log.c5
-rw-r--r--av_opts.c6
-rw-r--r--cfg-mplayer.h4
-rwxr-xr-xconfigure406
-rw-r--r--defaultopts.c1
-rw-r--r--ffmpeg_files/arm/bswap.h72
-rw-r--r--ffmpeg_files/bfin/bswap.h45
-rw-r--r--ffmpeg_files/bswap.h103
-rw-r--r--ffmpeg_files/intreadwrite.h226
-rw-r--r--ffmpeg_files/sh4/bswap.h48
-rw-r--r--ffmpeg_files/taglists.c367
-rw-r--r--ffmpeg_files/taglists.h9
-rw-r--r--ffmpeg_files/x86/bswap.h61
-rw-r--r--libaf/af_lavcac3enc.c26
-rw-r--r--libao2/ao_alsa.c21
-rw-r--r--libao2/ao_alsa5.c383
-rw-r--r--libao2/audio_out.c4
-rw-r--r--libmpcodecs/ad_dk3adpcm.c3
-rw-r--r--libmpcodecs/ad_ffmpeg.c27
-rw-r--r--libmpcodecs/ad_hwac3.c5
-rw-r--r--libmpcodecs/ad_imaadpcm.c3
-rw-r--r--libmpcodecs/ad_msadpcm.c5
-rw-r--r--libmpcodecs/vd_ffmpeg.c43
-rw-r--r--libmpcodecs/vd_mtga.c3
-rw-r--r--libmpcodecs/vd_realvid.c3
-rw-r--r--libmpcodecs/vd_sgi.c3
-rw-r--r--libmpcodecs/vd_theora.c3
-rw-r--r--libmpcodecs/vf.c2
-rw-r--r--libmpcodecs/vf_lavc.c4
-rw-r--r--libmpcodecs/vf_uspp.c7
-rw-r--r--libmpdemux/asfheader.c5
-rw-r--r--libmpdemux/aviheader.c6
-rw-r--r--libmpdemux/demux_asf.c3
-rw-r--r--libmpdemux/demux_audio.c11
-rw-r--r--libmpdemux/demux_lavf.c47
-rw-r--r--libmpdemux/demux_mkv.c22
-rw-r--r--libmpdemux/demux_mov.c21
-rw-r--r--libmpdemux/demux_ogg.c3
-rw-r--r--libmpdemux/demux_real.c5
-rw-r--r--libmpdemux/demux_rtp_codec.cpp2
-rw-r--r--libmpdemux/demux_ty.c5
-rw-r--r--libmpdemux/demux_vqf.c5
-rw-r--r--libmpdemux/demuxer.c2
-rw-r--r--libmpdemux/ebml.c10
-rw-r--r--libmpdemux/mp_taglists.c54
-rw-r--r--libmpdemux/mp_taglists.h10
-rw-r--r--libvo/video_out.c4
-rw-r--r--libvo/video_out.h1
-rw-r--r--libvo/vo_png.c33
-rw-r--r--libvo/vo_sdl.c2
-rw-r--r--mpbswap.h14
-rw-r--r--mplayer.c19
-rw-r--r--screenshot.c34
-rw-r--r--stream/ai_alsa.c184
-rw-r--r--stream/asf_streaming.c4
-rw-r--r--stream/pnm.c8
-rw-r--r--stream/realrtsp/real.c14
-rw-r--r--stream/realrtsp/rmff.c3
-rw-r--r--stream/stream.c6
-rw-r--r--stream/stream_dvd_common.c7
-rw-r--r--stream/stream_ffmpeg.c4
-rw-r--r--stream/vcd_read.h4
-rw-r--r--stream/vcd_read_fbsd.h4
-rw-r--r--sub/av_sub.c9
-rw-r--r--sub/spudec.c14
66 files changed, 387 insertions, 2099 deletions
diff --git a/Makefile b/Makefile
index 67b018d5b9..1a693f1603 100644
--- a/Makefile
+++ b/Makefile
@@ -23,8 +23,7 @@ include config.mak
###### variable declarations #######
-SRCS_AUDIO_INPUT-$(ALSA1X) += stream/ai_alsa1x.c
-SRCS_AUDIO_INPUT-$(ALSA9) += stream/ai_alsa.c
+SRCS_AUDIO_INPUT-$(ALSA) += stream/ai_alsa1x.c
SRCS_AUDIO_INPUT-$(OSS) += stream/ai_oss.c
SRCS_COMMON-$(AUDIO_INPUT) += $(SRCS_AUDIO_INPUT-yes)
SRCS_COMMON-$(BITMAP_FONT) += sub/font_load.c
@@ -93,6 +92,7 @@ SRCS_COMMON-$(LIBMAD) += libmpcodecs/ad_libmad.c
SRCS_COMMON-$(LIBNEMESI) += libmpdemux/demux_nemesi.c \
stream/stream_nemesi.c
SRCS_COMMON-$(LIBNUT) += libmpdemux/demux_nut.c
+SRCS_COMMON-$(LIBPOSTPROC) += libmpcodecs/vf_pp.c
SRCS_COMMON-$(LIBSMBCLIENT) += stream/stream_smb.c
SRCS_COMMON-$(LIBTHEORA) += libmpcodecs/vd_theora.c
@@ -331,7 +331,6 @@ SRCS_COMMON = asxparser.c \
libmpcodecs/vf_palette.c \
libmpcodecs/vf_perspective.c \
libmpcodecs/vf_phase.c \
- libmpcodecs/vf_pp.c \
libmpcodecs/vf_pp7.c \
libmpcodecs/vf_pullup.c \
libmpcodecs/vf_qp.c \
@@ -434,9 +433,7 @@ SRCS_COMMON = asxparser.c \
SRCS_MPLAYER-$(3DFX) += libvo/vo_3dfx.c
SRCS_MPLAYER-$(AA) += libvo/vo_aa.c
-SRCS_MPLAYER-$(ALSA1X) += libao2/ao_alsa.c
-SRCS_MPLAYER-$(ALSA5) += libao2/ao_alsa5.c
-SRCS_MPLAYER-$(ALSA9) += libao2/ao_alsa.c
+SRCS_MPLAYER-$(ALSA) += libao2/ao_alsa.c
SRCS_MPLAYER-$(APPLE_IR) += input/appleir.c
SRCS_MPLAYER-$(APPLE_REMOTE) += input/ar.c
SRCS_MPLAYER-$(ARTS) += libao2/ao_arts.c
diff --git a/av_log.c b/av_log.c
index bccbff54de..63f8fd7dc3 100644
--- a/av_log.c
+++ b/av_log.c
@@ -32,7 +32,6 @@
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
-#include <libpostproc/postprocess.h>
static int av_log_level_to_mp_level(int av_level)
{
@@ -111,10 +110,7 @@ static void mp_msg_av_log_callback(void *ptr, int level, const char *fmt,
void init_libav(void)
{
av_log_set_callback(mp_msg_av_log_callback);
-
- avcodec_init();
avcodec_register_all();
-
av_register_all();
}
@@ -137,5 +133,4 @@ void print_libav_versions(void)
print_version("libavcodec", LIBAVCODEC_VERSION_INT, avcodec_version());
print_version("libavformat", LIBAVFORMAT_VERSION_INT, avformat_version());
print_version("libswscale", LIBSWSCALE_VERSION_INT, swscale_version());
- print_version("libpostproc", LIBPOSTPROC_VERSION_INT, postproc_version());
}
diff --git a/av_opts.c b/av_opts.c
index 59f47edf52..bc2e392c5f 100644
--- a/av_opts.c
+++ b/av_opts.c
@@ -21,8 +21,10 @@
#include <stdlib.h>
#include <string.h>
+
+#include <libavutil/opt.h>
+
#include "av_opts.h"
-#include "libavcodec/opt.h"
int parse_avopts(void *v, char *str){
char *start;
@@ -37,7 +39,7 @@ int parse_avopts(void *v, char *str){
arg = strchr(str, '=');
if(arg) *arg++= 0;
- if (av_set_string3(v, str, arg, 0, NULL) < 0) {
+ if (av_opt_set(v, str, arg, AV_OPT_SEARCH_CHILDREN) < 0) {
free(start);
return -1;
}
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index a8f485c7c9..790a1d1503 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -86,7 +86,7 @@ extern int audio_substream_id;
extern off_t ps_probe;
extern int sws_flags;
-extern char* pp_help;
+extern const char pp_help[];
#ifdef CONFIG_RADIO
const m_option_t radioopts_conf[]={
@@ -599,7 +599,9 @@ const m_option_t common_opts[] = {
// postprocessing:
{"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL},
+#ifdef CONFIG_LIBPOSTPROC
{"pphelp", &pp_help, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+#endif
// scaling:
{"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, NULL},
diff --git a/configure b/configure
index 83782c9349..4a1f9ddd9c 100755
--- a/configure
+++ b/configure
@@ -165,6 +165,21 @@ yasm_check() {
return "$TMPRES"
}
+pkg_config_add() {
+ echo >> "$TMPLOG"
+ echo "$_pkg_config --cflags $@" >> "$TMPLOG"
+ ctmp=$($_pkg_config --cflags "$@" 2>> "$TMPLOG") || return $?
+ echo >> "$TMPLOG"
+ echo "$_pkg_config --libs $@" >> "$TMPLOG"
+ ltmp=$($_pkg_config --libs "$@" 2>> "$TMPLOG") || return $?
+ echo >> "$TMPLOG"
+ echo "cflags: $ctmp" >> "$TMPLOG"
+ echo "libs: $ltmp" >> "$TMPLOG"
+ echo >> "$TMPLOG"
+ extra_cflags="$extra_cflags $ctmp"
+ extra_ldflags="$extra_ldflags $ltmp"
+}
+
tmp_run() {
"$TMPEXE" >> "$TMPLOG" 2>&1
}
@@ -348,6 +363,7 @@ Optional features:
--disable-w32threads disable Win32 threads support [autodetect]
--disable-libass disable subtitle rendering with libass [autodetect]
--enable-rpath enable runtime linker path for extra libs [disabled]
+ --disable-libpostproc disable postprocess filter (vf_pp) [autodetect]
Codecs:
--enable-gif enable GIF support [autodetect]
@@ -502,7 +518,6 @@ Use these options if autodetection fails:
--extra-libs=FLAGS extra linker flags
--extra-libs-mplayer=FLAGS extra linker flags for MPlayer
- --with-freetype-config=PATH path to freetype-config
--with-sdl-config=PATH path to sdl*-config
--with-dvdnav-config=PATH path to dvdnav-config
--with-dvdread-config=PATH path to dvdread-config
@@ -534,7 +549,6 @@ _armv6t2=auto
_armvfp=auto
neon=auto
_iwmmxt=auto
-_mtrr=auto
_altivec=auto
_install=install
_ranlib=ranlib
@@ -687,7 +701,6 @@ quicktime=auto
_macosx_finder=no
_macosx_bundle=auto
_sortsub=yes
-_freetypeconfig='freetype-config'
_fribidi=auto
_enca=auto
_inet6=auto
@@ -699,6 +712,7 @@ _pthreads=auto
_w32threads=auto
_ass=auto
_rpath=no
+libpostproc=auto
_asmalign_pot=auto
_stream_cache=yes
_priority=no
@@ -744,9 +758,6 @@ for ac_option do
--with-sdl-config=*)
_sdlconfig=$(echo $ac_option | cut -d '=' -f 2)
;;
- --with-freetype-config=*)
- _freetypeconfig=$(echo $ac_option | cut -d '=' -f 2)
- ;;
--with-dvdnav-config=*)
_dvdnavconfig=$(echo $ac_option | cut -d '=' -f 2)
;;
@@ -1059,8 +1070,6 @@ for ac_option do
--disable-directfb) _directfb=no ;;
--enable-bl) _bl=yes ;;
--disable-bl) _bl=no ;;
- --enable-mtrr) _mtrr=yes ;;
- --disable-mtrr) _mtrr=no ;;
--enable-shm) _shm=yes ;;
--disable-shm) _shm=no ;;
--enable-select) _select=yes ;;
@@ -1091,6 +1100,8 @@ for ac_option do
--disable-libass) _ass=no ;;
--enable-rpath) _rpath=yes ;;
--disable-rpath) _rpath=no ;;
+ --enable-libpostproc) libpostproc=yes ;;
+ --disable-libpostproc) libpostproc=no ;;
--enable-fribidi) _fribidi=yes ;;
--disable-fribidi) _fribidi=no ;;
@@ -1525,8 +1536,7 @@ if x86 ; then
exts=$($_cpuinfo | egrep 'features|flags' | cut -d ':' -f 2 | head -n 1)
- pparam=$(echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
- -e s/xmm/sse/ -e s/kni/sse/)
+ pparam=$(echo $exts | sed -e s/xmm/sse/ -e s/kni/sse/)
# SSE implies MMX2, but not all SSE processors report the mmxext CPU flag.
pparam=$(echo $pparam | sed -e 's/sse/sse mmxext/')
@@ -1582,13 +1592,6 @@ EOF
extcheck $_ssse3 "ssse3" "pabsd %%xmm0, %%xmm0"
extcheck $_cmov "cmov" "cmovb %%eax, %%ebx"
- echocheck "mtrr support"
- if test "$_mtrr" = kernel_check ; then
- _mtrr="yes"
- _optimizing="$_optimizing mtrr"
- fi
- echores "$_mtrr"
-
if test "$_gcc3_ext" != ""; then
# if we had to disable sse/sse2 because the active kernel does not
# support this instruction set extension, we also have to tell
@@ -2220,7 +2223,6 @@ if test "$_runtime_cpudetection" = yes ; then
test "$_sse" != no && _sse=yes
test "$_sse2" != no && _sse2=yes
test "$_ssse3" != no && _ssse3=yes
- test "$_mtrr" != no && _mtrr=yes
fi
if ppc; then
_altivec=yes
@@ -4875,8 +4877,7 @@ echores "$_nas"
echocheck "pulse"
if test "$_pulse" = auto ; then
_pulse=no
- if $_pkg_config --exists 'libpulse >= 0.9' ; then
- header_check pulse/pulseaudio.h $($_pkg_config --libs --cflags libpulse) &&
+ if pkg_config_add 'libpulse >= 0.9' ; then
_pulse=yes
fi
fi
@@ -4885,8 +4886,6 @@ echores "$_pulse"
if test "$_pulse" = yes ; then
def_pulse='#define CONFIG_PULSE 1'
aomodules="pulse $aomodules"
- libs_mplayer="$libs_mplayer $($_pkg_config --libs libpulse)"
- extra_cflags="$extra_cflags $($_pkg_config --cflags libpulse)"
else
def_pulse='#undef CONFIG_PULSE'
noaomodules="pulse $noaomodules"
@@ -4895,14 +4894,9 @@ fi
echocheck "JACK"
if test "$_jack" = auto ; then
- _jack=yes
- if statement_check jack/jack.h 'jack_client_open("test", JackUseExactName, NULL)' -ljack ; then
- libs_mplayer="$libs_mplayer -ljack"
- elif statement_check jack/jack.h 'jack_client_open("test", JackUseExactName, NULL)' $($_pkg_config --libs --cflags --silence-errors jack) ; then
- libs_mplayer="$libs_mplayer $($_pkg_config --libs jack)"
- extra_cflags="$extra_cflags "$($_pkg_config --cflags jack)""
- else
- _jack=no
+ _jack=no
+ if pkg_config_add jack ; then
+ _jack=yes
fi
fi
@@ -4948,100 +4942,18 @@ if test "$_alloca" != yes ; then
_alsa=no
res_comment="alloca missing"
fi
-if test "$_alsa" != no ; then
- _alsa=no
- cat > $TMPC << EOF
-#include <sys/asoundlib.h>
-#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5))
-#error "alsa version != 0.5.x"
-#endif
-int main(void) { return 0; }
-EOF
- cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.5.x'
-
- cat > $TMPC << EOF
-#include <sys/asoundlib.h>
-#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
-#error "alsa version != 0.9.x"
-#endif
-int main(void) { return 0; }
-EOF
- cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.9.x-sys'
- cat > $TMPC << EOF
-#include <alsa/asoundlib.h>
-#if !((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9))
-#error "alsa version != 0.9.x"
-#endif
-int main(void) { return 0; }
-EOF
- cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='0.9.x-alsa'
-
- cat > $TMPC << EOF
-#include <sys/asoundlib.h>
-#if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
-#error "alsa version != 1.0.x"
-#endif
-int main(void) { return 0; }
-EOF
- cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='1.0.x-sys'
- cat > $TMPC << EOF
-#include <alsa/asoundlib.h>
-#if !((SND_LIB_MAJOR == 1) && (SND_LIB_MINOR == 0))
-#error "alsa version != 1.0.x"
-#endif
-int main(void) { return 0; }
-EOF
- cc_check -lasound $_ld_dl $_ld_pthread && _alsaver='1.0.x-alsa'
+if test "$_alsa" = auto ; then
+ _alsa=no
+ if pkg_config_add "alsa >= 1.0.9" ; then
+ _alsa=yes
+ fi
fi
def_alsa='#undef CONFIG_ALSA'
-def_alsa5='#undef CONFIG_ALSA5'
-def_alsa9='#undef CONFIG_ALSA9'
-def_alsa1x='#undef CONFIG_ALSA1X'
-def_sys_asoundlib_h='#undef HAVE_SYS_ASOUNDLIB_H'
-def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H'
-if test "$_alsaver" ; then
- _alsa=yes
- if test "$_alsaver" = '0.5.x' ; then
- _alsa5=yes
- aomodules="alsa5 $aomodules"
- def_alsa5='#define CONFIG_ALSA5 1'
- def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
- res_comment="using alsa 0.5.x and sys/asoundlib.h"
- elif test "$_alsaver" = '0.9.x-sys' ; then
- _alsa9=yes
- aomodules="alsa $aomodules"
- def_alsa='#define CONFIG_ALSA 1'
- def_alsa9='#define CONFIG_ALSA9 1'
- def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
- res_comment="using alsa 0.9.x and sys/asoundlib.h"
- elif test "$_alsaver" = '0.9.x-alsa' ; then
- _alsa9=yes
+if test "$_alsa" = yes ; then
aomodules="alsa $aomodules"
def_alsa='#define CONFIG_ALSA 1'
- def_alsa9='#define CONFIG_ALSA9 1'
- def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
- res_comment="using alsa 0.9.x and alsa/asoundlib.h"
- elif test "$_alsaver" = '1.0.x-sys' ; then
- _alsa1x=yes
- aomodules="alsa $aomodules"
- def_alsa='#define CONFIG_ALSA 1'
- def_alsa1x="#define CONFIG_ALSA1X 1"
- def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
- res_comment="using alsa 1.0.x and sys/asoundlib.h"
- elif test "$_alsaver" = '1.0.x-alsa' ; then
- _alsa1x=yes
- aomodules="alsa $aomodules"
- def_alsa='#define CONFIG_ALSA 1'
- def_alsa1x="#define CONFIG_ALSA1X 1"
- def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
- res_comment="using alsa 1.0.x and alsa/asoundlib.h"
- else
- _alsa=no
- res_comment="unknown version"
- fi
- extra_ldflags="$extra_ldflags -lasound $_ld_dl $_ld_pthread"
else
- noaomodules="alsa $noaomodules"
+ noaomodules="alsa $noaomodules"
fi
echores "$_alsa"
@@ -5308,28 +5220,9 @@ echores "$_cdparanoia"
echocheck "libcdio"
if test "$_libcdio" = auto && test "$_cdparanoia" = no ; then
- cat > $TMPC << EOF
-#include <stdio.h>
-#include <cdio/version.h>
-#include <cdio/cdda.h>
-#include <cdio/paranoia.h>
-int main(void) {
- void *test = cdda_verbose_set;
- printf("%s\n", CDIO_VERSION);
- return test == (void *)1;
-}
-EOF
- _libcdio=no
- for _ld_tmp in "" "-lwinmm" ; do
- _ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
- cc_check $_ld_tmp $_ld_lm && _libcdio=yes &&
- extra_ldflags="$extra_ldflags $_ld_tmp" && break
- done
- if test "$_libcdio" = no && $_pkg_config --exists libcdio_paranoia ; then
- _inc_tmp=$($_pkg_config --cflags libcdio_paranoia)
- _ld_tmp=$($_pkg_config --libs libcdio_paranoia)
- cc_check $_inc_tmp $_ld_tmp $_ld_lm && _libcdio=yes &&
- extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_tmp"
+ _libcdio=no
+ if pkg_config_add libcdio_paranoia ; then
+ _libcdio=yes
fi
fi
if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then
@@ -5382,33 +5275,14 @@ if test "$_iconv" = no ; then
fi
if test "$_freetype" = auto ; then
- if ( $_freetypeconfig --version ) >/dev/null 2>&1 ; then
- cat > $TMPC << EOF
-#include <stdio.h>
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#if ((FREETYPE_MAJOR < 2) || ((FREETYPE_MINOR == 0) && (FREETYPE_PATCH < 9)))
-#error "Need FreeType 2.0.9 or newer"
-#endif
-int main(void) {
- FT_Library library;
- FT_Init_FreeType(&library);
- return 0;
-}
-EOF
- _freetype=no
- cc_check $($_freetypeconfig --cflags) $($_freetypeconfig --libs) && _freetype=yes
+ if pkg_config_add freetype2 ; then
+ _freetype=yes
else
- _freetype=no
- fi
- if test "$_freetype" != yes ; then
- die "Unable to find development files for libfreetype. Aborting. If you really mean to compile without FreeType support use --disable-freetype."
+ die "Unable to find development files for libfreetype. Aborting. If you really mean to compile without FreeType support use --disable-freetype."
fi
fi
if test "$_freetype" = yes ; then
def_freetype='#define CONFIG_FREETYPE 1'
- extra_cflags="$extra_cflags $($_freetypeconfig --cflags)"
- extra_ldflags="$extra_ldflags $($_freetypeconfig --libs)"
else
def_freetype='#undef CONFIG_FREETYPE'
fi
@@ -5420,36 +5294,11 @@ if test "$_freetype" = no ; then
fi
echocheck "fontconfig"
if test "$_fontconfig" = auto ; then
- cat > $TMPC << EOF
-#include <stdio.h>
-#include <stdlib.h>
-#include <fontconfig/fontconfig.h>
-#if FC_VERSION < 20402
-#error At least version 2.4.2 of fontconfig required
-#endif
-int main(void) {
- int err = FcInit();
- if (err == FcFalse) {
- printf("Couldn't initialize fontconfig lib\n");
- exit(err);
- }
- return 0;
-}
-EOF
- _fontconfig=no
- for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" "-lexpat -lfreetype -lz -liconv" ; do
- _ld_tmp="-lfontconfig $_ld_tmp"
- cc_check $_ld_tmp && _fontconfig=yes && extra_ldflags="$extra_ldflags $_ld_tmp" && break
- done
- if test "$_fontconfig" = no && $_pkg_config --exists fontconfig ; then
- _inc_tmp=$($_pkg_config --cflags fontconfig)
- _ld_tmp=$($_pkg_config --libs fontconfig)
- cc_check $_inc_tmp $_ld_tmp && _fontconfig=yes &&
- extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_tmp"
- fi
- if test "$_fontconfig" != yes ; then
- die "Unable to find development files for libfontconfig. Aborting. If you really mean to compile without fontconfig support use --disable-fontconfig."
- fi
+ if pkg_config_add 'fontconfig >= 2.4.2' ; then
+ _fontconfig=yes
+ else
+ die "Unable to find development files for libfontconfig. Aborting. If you really mean to compile without fontconfig support use --disable-fontconfig."
+ fi
fi
if test "$_fontconfig" = yes ; then
def_fontconfig='#define CONFIG_FONTCONFIG 1'
@@ -5460,15 +5309,13 @@ echores "$_fontconfig"
echocheck "SSA/ASS support"
-if test "$_ass" = auto -o "$_ass" = yes ; then
- if $_pkg_config libass; then
- _ass=yes
- def_ass='#define CONFIG_ASS 1'
- extra_ldflags="$extra_ldflags $($_pkg_config --libs libass)"
- extra_cflags="$extra_cflags $($_pkg_config --cflags libass)"
- else
- die "Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass."
- fi
+if test "$_ass" = auto ; then
+ if pkg_config_add libass ; then
+ _ass=yes
+ def_ass='#define CONFIG_ASS 1'
+ else
+ die "Unable to find development files for libass. Aborting. If you really mean to compile without libass support use --disable-libass."
+ fi
else
def_ass='#undef CONFIG_ASS'
fi
@@ -5476,35 +5323,14 @@ echores "$_ass"
echocheck "fribidi with charsets"
-_inc_tmp=""
-_ld_tmp=""
if test "$_fribidi" = auto ; then
- cat > $TMPC << EOF
-#include <stdlib.h>
-/* workaround for fribidi 0.10.4 and below */
-#define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
-#include <fribidi/fribidi.h>
-int main(void) {
- if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8)
- exit(1);
- return 0;
-}
-EOF
_fribidi=no
- _inc_tmp=""
- _ld_tmp="-lfribidi"
- cc_check $_inc_tmp $_ld_tmp && _fribidi=yes
- if $_pkg_config --exists fribidi > /dev/null 2>&1 &&