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
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)
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
dnl Check the operating system
dnl
HAVE_WIN64="0"
+
+YASMFLAGS=""
+case "${host}" in
+ i?86*)
+ YASMFLAGS="-f elf32"
+ ;;
+ x86_64*)
+ YASMFLAGS="-f elf64"
+ ;;
+esac
+
+
case "${host_os}" in
"")
SYS=unknown
case "${host}" in
i?86*)
ARCH_flag="-arch i386"
+ YASMFLAGS="-f macho32"
;;
ppc64*)
ARCH_flag="-arch ppc64"
;;
x86_64*)
ARCH_flag="-arch x86_64"
+ YASMFLAGS="-f macho64"
;;
arm*)
ac_cv_c_bigendian="no"
HAVE_WIN64="1"
WINDOWS_ARCH="x64"
PROGRAMFILES="PROGRAMFILES64"
+ YASMFLAGS="-f win64"
;;
*)
WINDOWS_ARCH="x86"
PROGRAMFILES="PROGRAMFILES"
+ YASMFLAGS="-f win32"
;;
esac
AC_SUBST(WINDOWS_ARCH)
AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1")
AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian")
+AC_SUBST(YASMFLAGS)
+
dnl
dnl Sadly autoconf does not think about testing foo.exe when ask to test
dnl for program foo on win32
])
])
-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"
])
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 <altivec.h>
-dnl - OS X PPC, gcc 3.x: need -faltivec, don't need <altivec.h>
-dnl - Linux PPC, gcc 3.4, 4.x: need <altivec.h> which requires -maltivec
-dnl - Linux PPC, gcc 3.3: need <altivec.h> and -maltivec -mabi=altivec
-dnl - Linux PPC, gcc 3.x: need <altivec.h> 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 <altivec.h>],
- [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 <altivec.h>],
- [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 <altivec.h>],
- [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 <altivec.h>]], [
+[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}"
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|cut -d' ' -f2` != 0404], [
AC_MSG_ERROR([You need 32-bits luac when using using lua from contrib.])
])
fi
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
fi
AM_CONDITIONAL(HAVE_AVFOUNDATION, [test "${have_avfoundation}" != "no"])
+dnl
+dnl DCP plugin (using asdcplib)
+dnl
+AC_ARG_ENABLE(dcp,
+ AS_HELP_STRING([--enable-dcp],[Digital Cinema Package support using asdcplib (default auto)]))
+have_asdcp="no"
+AS_IF([test "x${enable_dcp}" != "no"], [
+ AC_LANG_PUSH(C++)
+ AC_CHECK_HEADERS( [[AS@&t@_DCP.h]],
+ [have_asdcp="yes"],
+ [AS_IF( [test "x${enable_dcp}" = "yes"],
+ [AC_MSG_ERROR( [ ASDCP library cannot be found (needed for dcp module). Either use --enable-dcp=no or install asdcp library: http://www.cinecert.com/asdcplib/download/] )])
+ ])
+ AC_LANG_POP(C++)
+])
+AM_CONDITIONAL(HAVE_ASDCP, [test "${have_asdcp}" != "no"])
+
dnl
dnl Demux plugins
dnl
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
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"])
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"
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}])
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
])
])
+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
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_PREPROC_IFELSE([AC_LANG_SOURCE([
-#include <x265.h>
-#if X265_BUILD != 1
-# error Fail
-#endif
- ])], [
- AC_CHECK_LIB([x265],[x265_encoder_open_1], [
- 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)
dnl
dnl OpenGL
dnl
+PKG_CHECK_MODULES([EGL], [egl], [
+ have_egl="yes"
+], [
+ have_egl="no"
+])
+AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
+
PKG_CHECK_MODULES([GL], [gl], [
have_gl="yes"
], [
- AC_CHECK_HEADER([GL/gl.h], [
- have_gl="yes"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ [#include <GL/gl.h>]], [
+ [int t0 = GL_TEXTURE0;]])
+ ], [
GL_CFLAGS=""
- AS_IF([test "${SYS}" = "mingw32"], [
+ AS_IF([test "${SYS}" != "mingw32"], [
+ have_gl="yes"
+ GL_LIBS="-lGL"
+ ], [
AC_CHECK_HEADER([GL/glew.h], [
+ have_gl="yes"
], [
have_gl="no"
])
GL_LIBS="-lopengl32"
- ], [
- GL_LIBS="-lGL"
])
], [
have_gl="no"
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
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