X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=2f283859d639213a047514452140c4045d88c2e0;hb=8c9e80fb1f9c848e61105a304a74c26664383311;hp=b3e365dd3904eadc940f4bcc44c5e81b8de25ba4;hpb=9b0de3ea1895dd52e520d8d1b25e0371e7088d3f;p=vlc diff --git a/configure.ac b/configure.ac index b3e365dd39..2f283859d6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Autoconf settings for vlc -AC_COPYRIGHT([Copyright 2002-2013 VLC authors and VideoLAN]) +AC_COPYRIGHT([Copyright 2002-2014 VLC authors and VideoLAN]) AC_INIT(vlc, 2.2.0-git) VERSION_MAJOR=2 @@ -14,7 +14,7 @@ AC_SUBST(PKGDIR) CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`" CODENAME="Weatherwax" -COPYRIGHT_YEARS="1996-2013" +COPYRIGHT_YEARS="1996-2014" AC_CONFIG_SRCDIR(src/libvlc.c) AC_CONFIG_AUX_DIR(autotools) @@ -73,6 +73,7 @@ AM_PROG_AS AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files]) AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :) +AC_CHECK_PROGS(YASM, yasm) dnl Check for compiler properties AC_C_CONST @@ -96,6 +97,20 @@ dnl dnl Check the operating system dnl HAVE_WIN64="0" +HAVE_IOS="0" +HAVE_OSX="0" + +YASMFLAGS="" +case "${host}" in + i?86*) + YASMFLAGS="-f elf32" + ;; + x86_64*) + YASMFLAGS="-f elf64" + ;; +esac + + case "${host_os}" in "") SYS=unknown @@ -131,6 +146,7 @@ case "${host_os}" in case "${host}" in i?86*) ARCH_flag="-arch i386" + YASMFLAGS="-f macho32" ;; ppc64*) ARCH_flag="-arch ppc64" @@ -140,6 +156,7 @@ case "${host_os}" in ;; x86_64*) ARCH_flag="-arch x86_64" + YASMFLAGS="-f macho64" ;; arm*) ac_cv_c_bigendian="no" @@ -155,7 +172,15 @@ case "${host_os}" in LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names ${ARCH_flag}" VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit]) VLC_ADD_LIBS([avcodec access_avio swscale postproc i420_rgb_mmx x262 x264 x26410b],[-Wl,-read_only_relocs,suppress]) - VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,SystemConfiguration]) + VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,CoreServices]) + + AC_EGREP_CPP(yes, + [#import + #if TARGET_OS_IPHONE + yes + #endif], + [HAVE_IOS="1"], + [HAVE_OSX="1"]) dnl Allow binaries created on Lion to run on earlier releases AC_EGREP_CPP(yes, @@ -186,16 +211,11 @@ case "${host_os}" in [AS_HELP_STRING([--with-macosx-version-min=VERSION], [compile for Mac OS X VERSION and above])]) if test "${with_macosx_version_min}" != "" ; then - MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min} CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}" CC="${CC} -mmacosx-version-min=${with_macosx_version_min}" CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}" OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}" LD="${LD} -mmacosx_version_min=${with_macosx_version_min}" - CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}" - CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}" - OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}" - export MACOSX_DEPLOYMENT_TARGET fi ;; *mingw32* | *cygwin* | *wince* | *mingwce*) @@ -242,10 +262,12 @@ case "${host_os}" in HAVE_WIN64="1" WINDOWS_ARCH="x64" PROGRAMFILES="PROGRAMFILES64" + YASMFLAGS="-f win64" ;; *) WINDOWS_ARCH="x86" PROGRAMFILES="PROGRAMFILES" + YASMFLAGS="-f win32" ;; esac AC_SUBST(WINDOWS_ARCH) @@ -267,7 +289,7 @@ case "${host_os}" in ;; *os2*) SYS=os2 - LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild" + LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild -Zhigh-mem" ;; *) SYS="${host_os}" @@ -279,6 +301,10 @@ AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2") AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32") AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1") AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian") +AM_CONDITIONAL(HAVE_IOS, test "${HAVE_IOS}" = "1") +AM_CONDITIONAL(HAVE_OSX, test "${HAVE_OSX}" = "1") + +AC_SUBST(YASMFLAGS) dnl dnl Sadly autoconf does not think about testing foo.exe when ask to test @@ -361,11 +387,7 @@ AS_IF([test -n "${CONTRIB_DIR}"], [ CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include" CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include" OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include" - AS_IF([test "$build" = "$host" -o "$PKG_CONFIG_LIBDIR"], [ - export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH" - ], [ - export PKG_CONFIG_LIBDIR="${CONTRIB_DIR}/lib/pkgconfig" - ]) + export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH" LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib" AS_IF([test "${SYS}" = "darwin"], [ @@ -473,6 +495,7 @@ AS_IF([test "${SYS}" = "mingw32" -a "${enable_winstore_app}" = "yes"], [ VLC_ADD_LIBS([libvlccore], [-lole32 -lruntimeobject]) ]) AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps]) +AM_CONDITIONAL([HAVE_WINSTORE], [test "$vlc_winstore_app" = "1"]) dnl @@ -578,7 +601,7 @@ AC_SEARCH_LIBS(connect, [socket], [ ]) ]) -AC_SEARCH_LIBS([getaddrinfo], [nsl], [ +AC_SEARCH_LIBS([inet_pton], [nsl], [ AS_IF([test "$ac_cv_search_getaddrinfo" != "none required"], [ SOCKET_LIBS="$ac_cv_search_getaddrinfo $SOCKET_LIBS" ]) @@ -602,7 +625,7 @@ AC_CHECK_FUNCS([if_nameindex if_nametoindex]) VLC_RESTORE_FLAGS AS_IF([test -n "$SOCKET_LIBS"], [ - VLC_ADD_LIBS([access_rtmp access_output_udp access_output_shout sap stream_out_standard stream_out_rtp stream_out_raop vod_rtsp rtp oldrc netsync gnutls ts audioscrobbler lua remoteosd audiobargraph_a],[${SOCKET_LIBS}]) + VLC_ADD_LIBS([access_rtmp access_output_shout sap stream_out_standard stream_out_rtp stream_out_raop vod_rtsp oldrc netsync gnutls ts remoteosd audiobargraph_a],[${SOCKET_LIBS}]) ]) AC_SUBST(SOCKET_LIBS) @@ -651,7 +674,7 @@ AC_CHECK_FUNC(getopt_long,, [ AC_SUBST(GNUGETOPT_LIBS) AC_CHECK_LIB(m,cos,[ - VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom noise grain scene lua chorus_flanger freetype swscale postproc equalizer spatializer param_eq samplerate freetype mpc qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v mono colorthres extract ball hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum],[-lm]) + VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom noise grain scene chorus_flanger freetype swscale postproc equalizer spatializer param_eq samplerate freetype mpc qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v mono colorthres extract ball hotkeys mosaic gaussianblur x262 x26410b hqdn3d anaglyph oldrc ncurses oldmovie glspectrum],[-lm]) LIBM="-lm" ], [ LIBM="" @@ -687,7 +710,6 @@ AS_IF([test "${enable_shared}" = "no"], [ AM_CONDITIONAL(HAVE_DYNAMIC_PLUGINS, [test "${have_dynamic_objects}" != "no"]) AC_SUBST(LIBDL) -VLC_ADD_LIBS([lua],[$LIBDL]) dnl Check for thread library LIBPTHREAD="" @@ -1017,24 +1039,6 @@ VLC_RESTORE_FLAGS SYMBOLIC_LDFLAGS="${ac_cv_ld_bsymbolic}" AC_SUBST(SYMBOLIC_LDFLAGS) -dnl Check for Darwin plugin linking flags -AS_IF([test "${SYS}" = "darwin"], [ - VLC_SAVE_FLAGS - CFLAGS="${CFLAGS} -bundle -undefined error" - AC_CACHE_CHECK([if $CC accepts -bundle -undefined error], - [ac_cv_ld_darwin], [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ - ac_cv_ld_darwin=yes - ], [ - ac_cv_ld_darwin=no - ]) - ]) - AS_IF([test "${ac_cv_ld_darwin}" != "no"], [ - VLC_ADD_LDFLAGS([plugin],[-bundle -undefined error]) - ]) - VLC_RESTORE_FLAGS -]) - dnl Checks for __attribute__(aligned()) directive VLC_SAVE_FLAGS CFLAGS="${CFLAGS} -Werror" @@ -1411,53 +1415,18 @@ AS_IF([test "${enable_altivec}" = "yes"], [ have_altivec="yes" ]) -dnl The AltiVec C extensions -dnl -dnl There are several possible cases: -dnl - OS X PPC, gcc 4.x: use -mpim-altivec -force_cpusubtype_ALL, don't -dnl need -dnl - OS X PPC, gcc 3.x: need -faltivec, don't need -dnl - Linux PPC, gcc 3.4, 4.x: need which requires -maltivec -dnl - Linux PPC, gcc 3.3: need and -maltivec -mabi=altivec -dnl - Linux PPC, gcc 3.x: need and -fvec -dnl - Others: test should fail VLC_SAVE_FLAGS AC_CACHE_CHECK([if \$CC groks AltiVec C extensions], - [ac_cv_c_altivec], - [# OS X/PPC test (gcc 4.x) - CFLAGS="${CFLAGS} -mpim-altivec -force_cpusubtype_ALL" - AC_TRY_COMPILE([vector unsigned char foo;], - [vec_ld(0, (unsigned char *)0);], - [ac_cv_c_altivec="-mpim-altivec -force_cpusubtype_ALL"], - [# OS X/PPC test (gcc 3.x) - CFLAGS="${CFLAGS} -faltivec" - AC_TRY_COMPILE([vector unsigned char foo;], - [vec_ld(1 * sizeof(vector float), (unsigned char *)0);], - [ac_cv_c_altivec="-faltivec"], - dnl Below this are the Linux tests - [# Linux/PPC test (gcc 4.x) - CFLAGS="${CFLAGS} -maltivec" - AC_TRY_COMPILE([#include ], - [vec_ld(0, (unsigned char *)0);], - [ac_cv_c_altivec="-maltivec"], - [# Linux/PPC test (gcc 3.3) - CFLAGS="${CFLAGS} -maltivec -mabi=altivec" - AC_TRY_COMPILE([#include ], - [vec_ld(0, (unsigned char *)0);], - [ac_cv_c_altivec="" - ac_cv_c_altivec_abi="-maltivec -mabi=altivec"], - [# Linux/PPC test (gcc 3.3) - CFLAGS="${CFLAGS} -fvec" - AC_TRY_COMPILE([#include ], - [vec_ld(0, (unsigned char *)0);], - [ac_cv_c_altivec="-fvec"], - [ac_cv_c_altivec=no]) - ]) - ]) - ]) - ]) + [ac_cv_c_altivec], [ + CFLAGS="${CFLAGS} -maltivec" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +[#include ]], [ +[vec_ld(0, (unsigned char *)0);]])], [ + ac_cv_c_altivec="-maltivec" + ], [ + ac_cv_c_altivec="no" + ]) ]) - VLC_RESTORE_FLAGS AS_IF([test "${ac_cv_c_altivec}" != "no"], [ CPPFLAGS="${CPPFLAGS} ${ac_cv_c_altivec}" @@ -1551,10 +1520,7 @@ then ]) ]) ]) - if test "x${have_lua}" = "xyes" ; then - VLC_ADD_LIBS([lua],[$LUA_LIBS]) - VLC_ADD_CFLAGS([lua],[$LUA_CFLAGS]) - else + if test "x${have_lua}" != "xyes" ; then AC_MSG_ERROR([Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.]) fi AC_ARG_VAR([LUAC], [LUA byte compiler]) @@ -1562,7 +1528,7 @@ then AS_IF([test "${LUAC}" = "false"], [ AC_MSG_ERROR([Could not find the LUA byte compiler.]) ]) - AS_IF([test -d ${CONTRIB_DIR} -a -f ${CONTRIB_DIR}/lib/liblua.a -a `echo|${LUAC} -o - -|od -j 8 -N 2 -t x2|head -n 1|cut -d' ' -f2` != 0404], [ + AS_IF([test -d "${CONTRIB_DIR}" -a -f "${CONTRIB_DIR}"/lib/liblua.a -a `echo|${LUAC} -o - -|od -j 8 -N 2 -t x2|head -n 1|tr -s ' '|cut -d' ' -f2` != 0404], [ AC_MSG_ERROR([You need 32-bits luac when using using lua from contrib.]) ]) fi @@ -1598,6 +1564,19 @@ AS_IF([test "${enable_vlm}" != "no"], [ AM_CONDITIONAL([ENABLE_VLM], [test "${enable_vlm}" != "no"]) +dnl +dnl Addons manager storage and repositories modules +dnl +AC_ARG_ENABLE(addonmanagermodules, + [AS_HELP_STRING([--disable-addonmanagermodules], + [disable the addons manager modules (default enabled)])]) +if test "${enable_addonmanagermodules}" != "no" +then + AC_DEFINE(ENABLE_ADDONMANAGERMODULES, 1, [Define if you want the addons manager modules]) +fi +AM_CONDITIONAL([ENABLE_ADDONMANAGERMODULES], [test "${enable_addonmanagermodules}" != "no"]) + + dnl dnl Input plugins dnl @@ -1715,30 +1694,17 @@ AS_IF([test "$SYS" = "linux" -a "${enable_linsys}" != "no"], [ dnl dnl dvdread module: check for libdvdread dnl -PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread], [dvdread input module], [auto]) +PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread > 4.9.0], [dvdread input module], [auto]) dnl dnl libdvdnav plugin dnl -AC_ARG_ENABLE(dvdnav, - [AS_HELP_STRING([--disable-dvdnav], - [disable DVD navigation with libdvdnav (default auto)])]) -AS_IF([test "${enable_dvdnav}" != "no"], [ - PKG_CHECK_MODULES(DVDNAV, dvdnav, [ - VLC_ADD_PLUGIN([dvdnav]) - AC_CHECK_LIB(dvdnav, dvdnav_get_video_resolution, - AC_DEFINE(HAVE_DVDNAV_GET_VIDEO_RESOLUTION, 1, [Define if you have dvdnav_get_video_resolution.]), - [], [${LIBS_dvdnav}]) - AC_CHECK_LIB(dvdnav, dvdnav_describe_title_chapters, - AC_DEFINE(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS, 1, [Define if you have dvdnav_describe_title_chapters.]), - [], [${LIBS_dvdnav}])], - [AC_MSG_WARN([${DVDNAV_PKG_ERRORS}.])]) -]) +PKG_ENABLE_MODULES_VLC([DVDNAV], [], [dvdnav >= 4.2.1], [DVD with navigation input module (dvdnav)], [auto]) dnl dnl Blu-ray Disc Support with libbluray dnl -PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2.1], (libbluray for Blu-ray disc support ) ) +PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.3.0], (libbluray for Blu-ray disc support ) ) dnl dnl OpenCV wrapper and example filters @@ -1960,6 +1926,12 @@ then fi AM_CONDITIONAL(HAVE_AVFOUNDATION, [test "${have_avfoundation}" != "no"]) +dnl +dnl DCP plugin (using asdcplib) +dnl +PKG_WITH_MODULES([ASDCP], [asdcplib], [have_asdcp="yes"]) +AM_CONDITIONAL(HAVE_ASDCP, [test "${have_asdcp}" = "yes"]) + dnl dnl Demux plugins dnl @@ -2027,6 +1999,10 @@ dnl dnl ogg demux plugin dnl PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto]) +PKG_CHECK_MODULES(LIBVORBIS, [vorbis >= 1.1], [ + AC_DEFINE(HAVE_LIBVORBIS, 1, [Define to 1 if you have the libvorbis]) +],[]) +PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto], [${LIBVORBIS_CFLAGS}], [${LIBVORBIS_LIBS}]) if test "${enable_sout}" != "no"; then PKG_ENABLE_MODULES_VLC([MUX_OGG], [], [ogg >= 1.0], [Ogg mux support], [auto]) dnl Check for libshout @@ -2134,14 +2110,10 @@ then fi dnl -dnl shine fixed point mp3 encoder +dnl shine encoder plugin dnl -AC_ARG_ENABLE(shine, - [ --enable-shine shine mp3 encoding module (default disabled)]) -if test "${enable_shine}" = "yes" -then - VLC_ADD_PLUGIN([shine]) -fi +PKG_ENABLE_MODULES_VLC([SHINE], [], [shine >= 3.0.0], [MPEG Audio Layer 3 encoder], [auto], [], [], []) + dnl dnl openmax il codec plugin @@ -2269,6 +2241,20 @@ AC_ARG_ENABLE(merge-ffmpeg, ]) AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"]) +AC_MSG_CHECKING([for libavutil variant]) +PKG_CHECK_EXISTS([libavutil], [ + libavutil_version="$(${PKG_CONFIG} --modversion libavutil)" + libavutil_micro="${libavutil_version##*.}" + AS_IF([test ${libavutil_micro} -le 99], [ + avfork="libav" + ], [ + avfork="ffmpeg" + ]) +], [ + avfork="none" +]) +AC_MSG_RESULT([${avfork}]) + dnl dnl avcodec decoder/encoder plugin dnl @@ -2303,30 +2289,50 @@ AC_ARG_ENABLE(libva, AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [ AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.]) ]) -have_avcodec_vaapi="no" -AS_IF([test "${enable_libva}" != "no" -a "${have_avcodec}" = "yes"], [ - PKG_CHECK_MODULES(LIBVA, [libva libva-x11], [ - VLC_SAVE_FLAGS - CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" - CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}" - AC_CHECK_HEADERS(libavcodec/vaapi.h, [ - AC_MSG_NOTICE([VAAPI acceleration activated]) - have_avcodec_vaapi="yes" - ],[ - AS_IF([test -n "${enable_libva}"], [ - AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing]) - ], [ - AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ]) - ]) - ]) - VLC_RESTORE_FLAGS - ],[ + +have_vaapi="no" +have_vaapi_drm="no" +have_vaapi_x11="no" +AS_IF([test "${enable_libva}" != "no"], [ + PKG_CHECK_EXISTS([libva], [ + have_vaapi="yes" + ], [ AS_IF([test -n "${enable_libva}"], [ AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.]) ], [ AC_MSG_WARN([${LIBVA_PKG_ERRORS}.]) ]) ]) + PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm], [ + have_vaapi_drm="yes" + ], [ + AC_MSG_WARN([${LIBVA_DRM_PKG_ERRORS}.]) + ]) + PKG_CHECK_MODULES(LIBVA_X11, [libva-x11], [ + have_vaapi_x11="yes" + ], [ + AC_MSG_WARN([${LIBVA_X11_PKG_ERRORS}.]) + ]) +]) +AM_CONDITIONAL([HAVE_VAAPI_DRM], [test "${have_vaapi_drm}" = "yes"]) +AM_CONDITIONAL([HAVE_VAAPI_X11], [test "${have_vaapi_x11}" = "yes"]) + +have_avcodec_vaapi="no" +AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [ + VLC_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" + CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}" + AC_CHECK_HEADERS([libavcodec/vaapi.h], [ + AC_MSG_NOTICE([VAAPI acceleration activated]) + have_avcodec_vaapi="yes" + ],[ + AS_IF([test -n "${enable_libva}"], [ + AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing]) + ], [ + AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ]) + ]) + ]) + VLC_RESTORE_FLAGS ]) AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"]) @@ -2377,24 +2383,24 @@ AS_IF([test "${enable_vda}" != "no"], [ if test "${SYS}" = "darwin"; then AS_IF([test "x${have_avcodec}" = "xyes"], [ AC_CHECK_HEADERS(VideoDecodeAcceleration/VDADecoder.h, - [ - PKG_CHECK_EXISTS([libavcodec >= 55.19.0], [ - have_avcodec_vda="yes" - ],[ - AS_IF([test "${enable_vda}" = "yes"], - [AC_MSG_ERROR([libavcodec >= 55.19.0 is required for VDA decoding])], - [AC_MSG_WARN([libavcodec >= 55.19.0 is required for VDA decoding])]) - ]) - ],[ + [ + AC_CHECK_HEADERS(libavcodec/vda.h, [ + have_avcodec_vda="yes" + ],[ AS_IF([test "${enable_vda}" = "yes"], - [AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])], - [AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])]) - ]) + [AC_MSG_ERROR([vda is present but libavcodec/vda.h is missing])], + [AC_MSG_WARN([vda is present but libavcodec/vda.h is missing ])]) + ]) + ],[ + AS_IF([test "${enable_vda}" = "yes"], + [AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])], + [AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])]) + ]) ],[ AS_IF([test "x${enable_vda}" != "x"], [ AC_MSG_ERROR([--enable-vda and --disable-avcodec options are mutually exclusive.]) ]) - ]) + ]) fi ]) AM_CONDITIONAL([HAVE_AVCODEC_VDA], [test "${have_avcodec_vda}" = "yes"]) @@ -2415,6 +2421,7 @@ AS_IF([test "${enable_avformat}" != "no"], [ CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}" CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}" AC_CHECK_HEADERS(libavformat/avformat.h libavformat/avio.h) + AC_CHECK_HEADERS(libavcodec/avcodec.h) AC_CHECK_HEADERS(libavutil/avutil.h) AS_IF([test "$enable_merge_ffmpeg" = "no"], [ have_avformat="no" @@ -2523,6 +2530,28 @@ if test "${enable_faad}" != "no"; then fi fi +dnl +dnl libvpx decoder plugin +dnl +AC_ARG_ENABLE(vpx, + AS_HELP_STRING([--enable-vpx],[libvpx VP8/VP9 decoder (default auto)])) +AS_IF([test "${enable_vpx}" != "no"],[ + PKG_CHECK_MODULES([VPX], [vpx] , [ + VLC_ADD_PLUGIN([vpx]) + VLC_ADD_CPPFLAGS([vpx], [${VPX_CFLAGS}]) + VLC_ADD_LIBS([vpx], [${VPX_LIBS}]) + AC_CHECK_LIB([vpx],[vpx_codec_vp8_dx], [ + VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_DECODER]) + ], [], [${VPX_LIBS}]) + AC_CHECK_LIB([vpx],[vpx_codec_vp9_dx], [ + VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_DECODER]) + ], [], [${VPX_LIBS}]) + ], [ + AS_IF([test "${enable_vpx}" = "yes"],[ + AC_MSG_ERROR([libvpx was not found]) + ])]) +]) + dnl dnl twolame encoder plugin dnl @@ -2670,18 +2699,13 @@ AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"]) dnl dnl Opus plugin dnl -PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus], [Opus support], [auto]) +PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus >= 1.0.3], [Opus support], [auto]) dnl dnl theora decoder plugin dnl PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto]) -dnl -dnl dirac encoder plugin -dnl -PKG_ENABLE_MODULES_VLC([DIRAC], [], [dirac >= 0.10.0], [dirac encoder], [auto]) - dnl dnl schroedinger decoder plugin (for dirac format video) dnl @@ -2703,6 +2727,17 @@ AC_CHECK_HEADERS(png.h, [ ]) ]) +dnl +dnl JPEG decoder module +dnl +AC_ARG_ENABLE(jpeg, + [ --enable-jpeg JPEG support (default enabled)]) +AS_IF([test "${enable_jpeg}" != "no"], [ +AC_CHECK_HEADERS(jpeglib.h, [ + VLC_ADD_PLUGIN([jpeg]) + ]) +]) + dnl dnl H262 encoder plugin (lib262) dnl @@ -2749,23 +2784,7 @@ AC_ARG_WITH(x262-tree, fi dnl x265 encoder -AC_ARG_ENABLE(x265, - AS_HELP_STRING([--enable-x265],[H265 / HEVC encoding support with libx265 (default enabled)])) -AS_IF( [test "${enable_x265}" != "no"],[ - AC_CHECK_HEADER([x265.h], [ - AC_CHECK_LIB([x265],[x265_encoder_open], [ - VLC_ADD_PLUGIN([x265]) - VLC_ADD_LIBS([x265], [-lx265 -lstdc++ -lm -lpthread]) - ], [ - AC_MSG_ERROR([x265 library not found]) - ], [-lstdc++ -lm -lpthread]) - ], [ - AS_IF([test "${enable_x265}" = "yes"], [ - AC_MSG_ERROR([x265.h not found]) - ]) - ]) -]) - +PKG_ENABLE_MODULES_VLC([X265],, [x265], [HEVC/H.265 encoder], [auto]) dnl dnl H264 encoder plugin (10-bit lib264) @@ -2967,23 +2986,32 @@ EXTEND_HELP_STRING([Video plugins:]) dnl dnl OpenGL dnl +PKG_CHECK_MODULES([EGL], [egl], [ + have_egl="yes" +], [ + have_egl="no" +]) +AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"]) + +have_gl="no" PKG_CHECK_MODULES([GL], [gl], [ have_gl="yes" ], [ - AC_CHECK_HEADER([GL/gl.h], [ - have_gl="yes" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifdef _WIN32 +# include +#endif +#include +]], [ + [int t0 = GL_TEXTURE0;]]) + ], [ GL_CFLAGS="" - AS_IF([test "${SYS}" = "mingw32"], [ - AC_CHECK_HEADER([GL/glew.h], [ - ], [ - have_gl="no" - ]) - GL_LIBS="-lopengl32" - ], [ + have_gl="yes" + AS_IF([test "${SYS}" != "mingw32"], [ GL_LIBS="-lGL" + ], [ + GL_LIBS="-lopengl32" ]) - ], [ - have_gl="no" ]) ]) AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"]) @@ -2993,16 +3021,6 @@ PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled] dnl OpenGL ES 1: depends on EGL 1.0 PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [disabled]) -AC_ARG_ENABLE(egl, - [ --enable-egl OpenGL support through EGL (default disabled)],, [ - enable_egl="no" -]) -AS_IF([test "$enable_egl" != "no"], [ - PKG_CHECK_MODULES([EGL], [egl], [ - VLC_ADD_PLUGIN([egl]) - ]) -]) - dnl dnl Xlib dnl @@ -3081,14 +3099,18 @@ AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"]) have_avcodec_vdpau="no" AS_IF([test "${have_vdpau}" = "yes" -a "${have_avcodec}" = "yes"], [ - PKG_CHECK_EXISTS([libavutil >= 0.52.4 libavcodec >= 54.36.0], [ + case "${avfork}" in + libav) av_vdpau_ver="55.26.0" ;; + ffmpeg) av_vdpau_ver="55.42.100" ;; + esac + PKG_CHECK_EXISTS([libavutil >= 0.52.4 libavcodec >= ${av_vdpau_ver}], [ have_avcodec_vdpau="yes" AC_MSG_NOTICE([VDPAU decoding acceleration activated]) ], [ AS_IF([test -n "${enable_vdpau}"], [ - AC_MSG_ERROR([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.]) + AC_MSG_ERROR([libavutil >= 0.52.4 and libavcodec >= 55.26.0 are required for VDPAU decoding.]) ], [ - AC_MSG_WARN([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.]) + AC_MSG_WARN([libavutil >= 0.52.4 and libavcodec >= 55.26.0 are required for VDPAU decoding.]) ]) ]) ]) @@ -3127,29 +3149,6 @@ then ]) fi - -dnl -dnl Mac Vout -AC_ARG_ENABLE(macosx-vout, - [ --enable-macosx-vout Mac OS X video output module (default enabled on Mac OS X)]) -if test "x${enable_macosx_vout}" != "xno" && - (test "${SYS}" = "darwin" || test "${enable_macosx_vout}" = "yes") -then - VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,Cocoa]) - VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,OpenGL]) - VLC_ADD_PLUGIN([vout_macosx]) -fi - -dnl -dnl Mac CoreGraphics Layer Vout -AC_ARG_ENABLE(coregraphicslayer-vout, - [ --enable-coregraphicslayer-vout CoreGraphics layered video output module (default disabled)]) -if test "${enable_coregraphicslayer_vout}" = "yes"; then - VLC_ADD_LIBS([vout_coregraphicslayer],[-Wl,-framework,Cocoa]) - VLC_ADD_LIBS([vout_coregraphicslayer],[-Wl,-framework,QuartzCore]) - VLC_ADD_PLUGIN([vout_coregraphicslayer]) -fi - dnl dnl freetype module dnl @@ -3250,33 +3249,11 @@ if test "${enable_android_surface}" = "yes"; then if test "${HAVE_ANDROID}" = "1"; then VLC_ADD_PLUGIN([android_surface]) VLC_ADD_LIBS([android_surface], [-ldl]) + VLC_ADD_PLUGIN([android_opaque]) + VLC_ADD_LIBS([android_opaque], [-ldl]) fi fi - -dnl -dnl iOS vout module -dnl -AC_ARG_ENABLE(ios-vout, - [ --enable-ios-vout iOS video output module (default disabled)]) -if test "${enable_ios_vout}" = "yes" -then - VLC_ADD_PLUGIN([vout_ios]) - VLC_ADD_LIBS([vout_ios], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit,-framework,Foundation]) -fi - -dnl -dnl iOS ES2 vout module -dnl -AC_ARG_ENABLE(ios-vout2, - [ --enable-ios-vout2 iOS video output module (default disabled)]) -if test "${enable_ios_vout2}" = "yes" -then - VLC_ADD_PLUGIN([vout_ios2]) - VLC_ADD_LIBS([vout_ios2], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit]) -fi - - dnl dnl Windows DirectX module dnl @@ -3555,31 +3532,6 @@ AS_IF([test "$enable_wasapi" != "no"], [ ]) AM_CONDITIONAL([HAVE_WASAPI], [test "${have_wasapi}" = "yes"]) -dnl -dnl CoreAudio plugin -dnl -AC_ARG_ENABLE(macosx-audio, - [ --enable-macosx-audio Mac OS X audio module (default enabled on MacOS X)]) -if test "x${enable_macosx_audio}" != "xno" && - (test "${SYS}" = "darwin" || test "${enable_macosx_audio}" = "yes") -then - AC_CHECK_HEADER([CoreAudio/CoreAudio.h], - [ VLC_ADD_PLUGIN([auhal]) - ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ]) -fi - -dnl -dnl iOS CoreAudio plugin -dnl -AC_ARG_ENABLE(ios-audio, - [ --enable-ios-audio Audio module for iOS (default disabled)]) -if test "${enable_ios_audio}" = "yes" -then - AC_CHECK_HEADER([AudioUnit/AudioUnit.h], - [ VLC_ADD_PLUGIN([audiounit_ios]) - ], [ AC_MSG_ERROR([cannot find AudioUnit headers]) ]) -fi - dnl dnl AudioQueue plugin dnl @@ -3660,10 +3612,9 @@ dnl chromaprint audio track fingerprinter dnl m4_pushdef([libchromaprint_version], 0.6.0) PKG_WITH_MODULES([CHROMAPRINT],[libchromaprint >= libchromaprint_version], - VLC_ADD_PLUGIN([stream_out_chromaprint fingerprinter]) + VLC_ADD_PLUGIN([stream_out_chromaprint]) VLC_ADD_CFLAGS([stream_out_chromaprint],[${CHROMAPRINT_CFLAGS}] [-I./webservices -I../stream_out]) - VLC_ADD_LIBS([stream_out_chromaprint],[${CHROMAPRINT_LIBS}]) - VLC_ADD_LIBS([fingerprinter],[-lm]), + VLC_ADD_LIBS([stream_out_chromaprint],[${CHROMAPRINT_LIBS}]), AS_IF([test "${enable_chromaprint}" = "yes"], [AC_MSG_ERROR(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)], [AC_MSG_WARN(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)] @@ -3908,9 +3859,7 @@ AS_IF([test "${enable_projectm}" != "no"], PKG_CHECK_MODULES(PROJECTM, libprojectM, [ VLC_ADD_PLUGIN([projectm]) - VLC_ADD_CXXFLAGS([projectm],[$PROJECTM_CFLAGS]) - VLC_ADD_LIBS([projectm],[$PROJECTM_LIBS]) - PKG_CHECK_MODULES(PROJECTM2, [libprojectM >= 2.0.0], + PKG_CHECK_EXISTS([libprojectM >= 2.0.0], [ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ], [ AC_MSG_WARN( [Using libprojectM version 1] ) ]) @@ -4001,10 +3950,10 @@ AS_IF([test "${enable_libgcrypt}" != "no"], [ GCRYPT_CFLAGS="`libgcrypt-config --cflags`" GCRYPT_LIBS="`libgcrypt-config --libs`" ], [ - AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.]) + AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or pass --disable-libgcrypt.]) ], [`libgcrypt-config --libs`]) ], [ - AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.]) + AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or pass --disable-libgcrypt.]) ], [#include ] ) ]) @@ -4036,7 +3985,7 @@ AC_ARG_ENABLE(taglib, [AS_HELP_STRING([--disable-taglib], [do not use TagLib (default enabled)])]) AS_IF([test "${enable_taglib}" != "no"], [ - PKG_CHECK_MODULES(TAGLIB, taglib >= 1.6.1, [ + PKG_CHECK_MODULES(TAGLIB, taglib >= 1.9, [ VLC_ADD_PLUGIN([taglib]) ], [ AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])]) @@ -4193,31 +4142,24 @@ AC_CONFIG_FILES([ lib/Makefile bin/Makefile test/Makefile - modules/access/rtp/Makefile modules/access_output/Makefile modules/audio_filter/Makefile - modules/audio_mixer/Makefile modules/control/Makefile modules/gui/Makefile + modules/gui/ios_dialog_provider/Makefile modules/gui/macosx/Makefile modules/gui/minimal_macosx/Makefile modules/gui/macosx_dialog_provider/Makefile modules/gui/qt4/Makefile modules/gui/skins2/Makefile - modules/lua/Makefile modules/misc/Makefile modules/mux/Makefile - modules/notify/Makefile modules/packetizer/Makefile - modules/stream_filter/Makefile modules/stream_out/Makefile modules/text_renderer/Makefile - modules/video_chroma/Makefile modules/video_filter/Makefile modules/video_output/Makefile - modules/video_splitter/Makefile modules/visualization/Makefile - modules/arm_neon/Makefile modules/hw/vdpau/Makefile ])