X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=5f426078e324ce10d127c2e6f3955090dceedb68;hb=8d19eace8daccfce7d79d8f3a0cf9275fc1d88e3;hp=4747d2612a2423e5b970e3aa9e03f26c62330ee2;hpb=4d1cee9e23f4f8249299752eb0f5909c2c8b21c3;p=vlc diff --git a/configure.ac b/configure.ac index 4747d2612a..5f426078e3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,20 +1,20 @@ dnl Autoconf settings for vlc -AC_COPYRIGHT([Copyright 2002-2012 VLC authors and VideoLAN]) +AC_COPYRIGHT([Copyright 2002-2013 VLC authors and VideoLAN]) -AC_INIT(vlc, 2.1.0-git) +AC_INIT(vlc, 2.1.0-pre1) VERSION_MAJOR=2 VERSION_MINOR=1 VERSION_REVISION=0 VERSION_EXTRA=0 -VERSION_DEV=git +VERSION_DEV=pre1 PKGDIR="vlc" AC_SUBST(PKGDIR) CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`" CODENAME="Rincewind" -COPYRIGHT_YEARS="1996-2012" +COPYRIGHT_YEARS="1996-2013" AC_CONFIG_SRCDIR(src/libvlc.c) AC_CONFIG_AUX_DIR(autotools) @@ -24,8 +24,8 @@ AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_PRESERVE_HELP_ORDER -AM_INIT_AUTOMAKE(tar-ustar color-tests) -AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(tar-ustar color-tests foreign) +AC_CONFIG_HEADERS([config.h]) # Disable with "./configure --disable-silent-rules" or "make V=1" AM_SILENT_RULES([yes]) @@ -143,7 +143,6 @@ case "${host_os}" in ARCH_flag="-arch x86_64" ;; arm*) - ARCH_flag="-arch armv7" ac_cv_c_bigendian="no" ac_cv_c_attribute_packed="no" ;; @@ -155,11 +154,11 @@ case "${host_os}" in CPPFLAGS="${CPPFLAGS} ${ARCH_flag}" OBJCFLAGS="${OBJCFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu99 ${ARCH_flag}" LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names ${ARCH_flag}" - VLC_ADD_LIBS([mkv mp4 motion], [-Wl,-framework,IOKit,-framework,CoreFoundation]) - VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,Appkit]) - VLC_ADD_LIBS([avcodec avformat access_avio swscale postproc i420_rgb_mmx x264 x26410b],[-Wl,-read_only_relocs,suppress]) - VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings]) - VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation]) + VLC_ADD_LIBS([motion rotate], [-Wl,-framework,IOKit,-framework,CoreFoundation]) + VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit]) + VLC_ADD_LIBS([avcodec access_avio swscale postproc i420_rgb_mmx x264 x26410b],[-Wl,-read_only_relocs,suppress]) + VLC_ADD_CFLAGS([motion rotate],[-fconstant-cfstrings]) + VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,SystemConfiguration]) dnl Allow binaries created on Lion to run on earlier releases AC_EGREP_CPP(yes, @@ -205,8 +204,12 @@ case "${host_os}" in *mingw32* | *cygwin* | *wince* | *mingwce*) AC_CHECK_TOOL(WINDRES, windres, :) AC_CHECK_TOOL(OBJCOPY, objcopy, :) - AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows XP SP2 APIs.]) + AH_TOP([#if defined(_WIN32) && !defined(_WIN32_WINNT)]) + AH_TOP([# define _WIN32_WINNT 0x0502 /* Windows XP SP2 */]) + AH_TOP([#endif]) AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.]) + AC_DEFINE([_UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.]) + AC_DEFINE([UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.]) case "${host_os}" in *mingw32*) @@ -216,7 +219,7 @@ case "${host_os}" in dnl Check if we are using the mno-cygwin mode in which case we are dnl actually dealing with a mingw32 compiler. AC_EGREP_CPP(yes, - [#ifdef WIN32 + [#ifdef _WIN32 yes #endif], SYS=mingw32, AC_MSG_ERROR([VLC requires -mno-cygwin])) @@ -224,6 +227,9 @@ case "${host_os}" in esac if test "${SYS}" = "mingw32"; then + # DEP, ASLR, NO SEH + LDFLAGS="${LDFLAGS} -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase" + VLC_ADD_LIBS([libvlccore],[-lwinmm]) VLC_ADD_LDFLAGS([vlc],[-mwindows]) VLC_ADD_LIBS([win32text],[-lgdi32]) @@ -233,17 +239,20 @@ case "${host_os}" in DESTDIR="`pwd`/_win32/" dnl - dnl NSIS Installer prefix and WIN64 + dnl NSIS/MSI Installer prefix and WIN64 dnl case "${host}" in amd64*|x86_64*) HAVE_WIN64="1" + WINDOWS_ARCH="x64" PROGRAMFILES="PROGRAMFILES64" ;; *) + WINDOWS_ARCH="x86" PROGRAMFILES="PROGRAMFILES" ;; esac + AC_SUBST(WINDOWS_ARCH) AC_SUBST(PROGRAMFILES) fi @@ -275,6 +284,35 @@ AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32") AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1") AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian") +dnl +dnl Sadly autoconf does not think about testing foo.exe when ask to test +dnl for program foo on win32 +case "${build_os}" in + cygwin|msys) + ac_executable_extensions=".exe" + ;; + *) + ;; +esac + +dnl Android is linux, but a bit different +AS_IF([test "$SYS" = linux],[ + AC_MSG_CHECKING([for an Android system]) + AC_PREPROC_IFELSE([AC_LANG_PROGRAM( + [[#ifndef __ANDROID__ + # error Not Android + #endif + ]],[[;]]) + ],[ + HAVE_ANDROID="1" + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + ]) +]) +AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1") + + dnl dnl Check for the contrib directory dnl @@ -345,35 +383,6 @@ AS_IF([test -n "${CONTRIB_DIR}"], [ ]) AC_SUBST(CONTRIB_DIR) -dnl -dnl Sadly autoconf does not think about testing foo.exe when ask to test -dnl for program foo on win32 - -case "${build_os}" in - cygwin|msys) - ac_executable_extensions=".exe" - ;; - *) - ;; -esac - -dnl Android is linux, but a bit different -AS_IF([test "$SYS" = linux],[ - AC_MSG_CHECKING([for an Android system]) - AC_PREPROC_IFELSE([AC_LANG_PROGRAM( - [[#ifndef __ANDROID__ - # error Not Android - #endif - ]],[[;]]) - ],[ - HAVE_ANDROID="1" - AC_MSG_RESULT([yes]) - ],[ - AC_MSG_RESULT([no]) - ]) -]) -AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1") - dnl dnl Libtool dnl It's very bad, but our former custom system was worst @@ -404,7 +413,7 @@ AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [ dnl dnl Gettext stuff dnl -AM_GNU_GETTEXT_VERSION([0.18.1]) +AM_GNU_GETTEXT_VERSION([0.18.2]) AM_GNU_GETTEXT([external], [need-ngettext]) dnl @@ -412,8 +421,10 @@ dnl Iconv stuff dnl AM_ICONV -dnl Check for broken versions of mingw-runtime compatability library +dnl +dnl checks for mingw AS_IF([test "${SYS}" = "mingw32"], [ +dnl Check for broken versions of mingw-runtime compatability library AC_MSG_CHECKING(for broken mingw-runtime) AC_PREPROC_IFELSE([AC_LANG_SOURCE([ #include <_mingw.h> @@ -432,18 +443,16 @@ AS_IF([test "${SYS}" = "mingw32"], [ ]) dnl force use of mingw provided c99 *printf over msvcrt CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1" -]) dnl Check for the need to include the mingwex lib for mingw32 -if test "${SYS}" = "mingw32" ; then + VLC_SAVE_FLAGS AC_CHECK_LIB(mingwex,opendir, AC_CHECK_LIB(mingw32,opendir,, [VLC_ADD_LIBS([libvlccore],[-lmingwex])]) ) -fi + VLC_RESTORE_FLAGS dnl Check for fnative-struct or mms-bitfields support for mingw32 -if test "${SYS}" = "mingw32" ; then VLC_SAVE_FLAGS CFLAGS="${CFLAGS} -mms-bitfields" CXXFLAGS="${CXXFLAGS} -mms-bitfields" @@ -459,7 +468,16 @@ if test "${SYS}" = "mingw32" ; then [AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)]) "${ac_cv_c_fnative_struct}" = "no" && VLC_RESTORE_FLAGS fi -fi +]) + +AC_ARG_ENABLE(winstore_app, + AS_HELP_STRING([--enable-winstore-app], + [Build targetted for Windows Store apps (default disabled)])) + +vlc_winstore_app=0 +AS_IF([test "${SYS}" = "mingw32" -a "${enable_winstore_app}" = "yes"], [vlc_winstore_app=1]) +AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps]) + dnl dnl Buggy glibc prevention. Purposedly not cached. @@ -494,7 +512,7 @@ need_libc=false dnl Check for usual libc functions AC_CHECK_DECLS([nanosleep],,,[#include ]) AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale]) -AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp]) +AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp]) AC_CHECK_FUNCS(fdatasync,, [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.]) ]) @@ -517,11 +535,8 @@ AC_LINK_IFELSE([ dnl C11 static_assert() AC_MSG_CHECKING([for static_assert in assert.h]) -AC_PREPROC_IFELSE([AC_LANG_SOURCE([ -#include -#ifndef static_assert -# error BOOM! -#endif +AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [ +static_assert(1, "The impossible happened."); ])], [ AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define to 1 if defines static_assert.]) @@ -533,7 +548,14 @@ AC_PREPROC_IFELSE([AC_LANG_SOURCE([ AC_FUNC_STRCOLL dnl Check for non-standard system calls -AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity]) +case "$SYS" in + "linux") + AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity]) + ;; + "mingw32") + AC_CHECK_FUNCS([_lock_file]) + ;; +esac AH_BOTTOM([#include ]) @@ -542,7 +564,7 @@ AC_CHECK_TYPES([struct pollfd],,, [#include #if HAVE_POLL # include -#elif defined (WIN32) +#elif defined (_WIN32) # include #endif ]) @@ -566,11 +588,25 @@ AC_SEARCH_LIBS([getaddrinfo], [nsl], [ ]) ],, [${SOCKET_LIBS}]) +LIBS="${LIBS} ${SOCKET_LIBS}" +AC_LINK_IFELSE([ + AC_LANG_PROGRAM([#ifdef _WIN32 + # if _WIN32_WINNT < 0x600 + # error Needs vista+ + # endif + #include + #else + #include + #include + #endif], [ + char dst[[sizeof(struct in_addr)]]; + inet_pton(AF_INET, "127.0.0.1", dst); + ])],[AC_DEFINE([HAVE_INET_PTON],[1],[Define to 1 if you have inet_pton function])],[AC_LIBOBJ([inet_pton])]) AC_CHECK_FUNCS([if_nameindex if_nametoindex]) VLC_RESTORE_FLAGS AS_IF([test -n "$SOCKET_LIBS"], [ - VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout sap stream_out_select stream_out_standard stream_out_rtp stream_out_raop vod_rtsp rtp oldrc netsync gnutls flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync stream_filter_dash],[${SOCKET_LIBS}]) + VLC_ADD_LIBS([access_http access_udp access_tcp access_ftp 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 zvbi audiobargraph_a],[${SOCKET_LIBS}]) ]) AC_SUBST(SOCKET_LIBS) @@ -580,7 +616,7 @@ AC_CACHE_CHECK([for socklen_t in sys/socket.h], dnl ` (fix VIM syntax highlight ac_cv_type_socklen_t, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ [#include -#ifdef WIN32 +#ifdef _WIN32 # include # include #else @@ -597,7 +633,7 @@ AH_TEMPLATE(ss_family, [Define to `sa_family' if does not define. AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage, [AC_TRY_COMPILE( [#include - #if defined( WIN32 ) + #if defined( _WIN32 ) # include #else # include @@ -619,7 +655,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 visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mpc dmo mp4 quicktime qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex opus mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x26410b hqdn3d anaglyph oldrc ncurses],[-lm]) + VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom panoramix rotate noise grain scene kate lua chorus_flanger freetype avcodec access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mpc dmo quicktime qt4 compressor headphone_channel_mixer normvol audiobargraph_a audiobargraph_v speex opus mono colorthres extract ball access_imem hotkeys mosaic gaussianblur x26410b hqdn3d anaglyph oldrc ncurses],[-lm]) LIBM="-lm" ], [ LIBM="" @@ -658,12 +694,14 @@ AC_SUBST(LIBDL) VLC_ADD_LIBS([lua],[$LIBDL]) dnl Check for thread library -if test "${SYS}" != "mingw32"; then - +LIBPTHREAD="" +AS_IF([test "${SYS}" != "mingw32"], [ VLC_SAVE_FLAGS LIBS="" AC_SEARCH_LIBS(pthread_rwlock_init, pthread pthreads c_r, [ - VLC_ADD_LIBS([libvlccore libvlc vlc plugin],[${LIBS}]) + AS_IF([test "$ac_cv_search_pthread_rwlock_init" != "none required"], [ + LIBPTHREAD="$ac_cv_search_pthread_rwlock_init" + ]) ]) VLC_RESTORE_FLAGS @@ -682,7 +720,8 @@ if test "${SYS}" != "mingw32"; then dnl HP/UX port AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])]) ]) -fi # end "${SYS}" != "mingw32" +]) +AC_SUBST(LIBPTHREAD) dnl Check for headers AC_CHECK_HEADERS([search.h]) @@ -739,15 +778,15 @@ AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ]) AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ]) if test "${have_zlib}" = "yes" then - VLC_ADD_LIBS([access_http mp4 skins2 sap mkv unzip zip],[-lz]) + VLC_ADD_LIBS([access_http skins2 sap unzip zip],[-lz]) PKG_CHECK_MODULES([MINIZIP], [minizip] , [ have_minizip=yes ], [ AC_CHECK_HEADERS([unzip.h], [ have_minizip=yes MINIZIP_LIBS="-lminizip -lz" ], [ + VLC_ADD_CPPFLAGS([skins2], [-I\\\$(top_srcdir)/modules/access/zip/unzip]) + VLC_ADD_LIBS([skins2], [\\\$(top_builddir)/modules/access/libunzip.la]) have_minizip=no - MINIZIP_CFLAGS="-I\\\${top_srcdir}/modules/access/zip/unzip" - MINIZIP_LIBS="\\\${top_builddir}/modules/access/zip/unzip/libunzip.la" ]) ]) VLC_ADD_CPPFLAGS([skins2],[$MINIZIP_CFLAGS]) @@ -771,35 +810,19 @@ dnl Check for dbus AC_ARG_ENABLE(dbus, [AS_HELP_STRING([--enable-dbus], [compile D-Bus message bus support (default enabled)])]) -case "${SYS}" in - linux*|*bsd*) -if test "${enable_dbus}" != "no" -a "${SYS}" != "mingw32" -then - dnl api stable dbus - PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0.0], - [ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] ) - VLC_ADD_LIBS([libvlccore],[$DBUS_LIBS]) - VLC_ADD_CFLAGS([libvlccore],[$DBUS_CFLAGS]) - dnl Check for dbus control interface - AC_ARG_ENABLE(dbus-control, - [AS_HELP_STRING([--disable-dbus-control], - [D-Bus control interface (default enabled)])]) - if test "${enable_dbus_control}" != "no" - then - VLC_ADD_PLUGIN([dbus]) - VLC_ADD_LIBS([dbus],[$DBUS_LIBS]) - VLC_ADD_CFLAGS([dbus],[$DBUS_CFLAGS]) - fi - dnl Power Management Inhibiter - VLC_ADD_PLUGIN([inhibit]) - VLC_ADD_LIBS([inhibit],[$DBUS_LIBS]) - VLC_ADD_CFLAGS([inhibit],[$DBUS_CFLAGS]) - ], - [AC_MSG_ERROR([${DBUS_PKG_ERRORS}.])] - ) -fi -;; -esac +have_dbus="no" +AS_IF([test "${enable_dbus}" != "no"], [ + PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0.0], [ + have_dbus="yes" + ], [ + AS_IF([test -n "${enable_dbus}"], [ + AC_MSG_ERROR([${DBUS_PKG_ERRORS}.]) + ], [ + AC_MSG_WARN([${DBUS_PKG_ERRORS}.]) + ]) + ]) +]) +AM_CONDITIONAL([HAVE_DBUS], [test "${have_dbus}" = "yes"]) dnl Check for ntohl, etc. VLC_SAVE_FLAGS @@ -876,7 +899,7 @@ AS_IF([test "${enable_coverage}" != "no"], [ LDFLAGS="-lgcov ${LDFLAGS}" ]) -AS_IF([test "${SYS}" != "mingw32"], [ +AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "os2"], [ VLC_SAVE_FLAGS CFLAGS="${CFLAGS} -fvisibility=hidden" CXXFLAGS="${CXXFLAGS} -fvisibility=hidden" @@ -1051,17 +1074,6 @@ dnl default modules dnl ALIASES="${ALIASES} cvlc rvlc" -dnl -dnl Some plugins aren't useful on some platforms -dnl -if test "${SYS}" = "os2"; then - VLC_ADD_PLUGIN([dynamicoverlay]) -elif test "${SYS}" != "mingw32"; then - VLC_ADD_PLUGIN([dynamicoverlay access_shm]) -elif test "${SYS}" = "darwin"; then - VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices]) -fi - dnl dnl Accelerated modules dnl @@ -1497,28 +1509,35 @@ AC_ARG_ENABLE(lua, [disable LUA scripting support (default enabled)])]) if test "${enable_lua}" != "no" then - PKG_CHECK_MODULES(LUA, lua5.1, + PKG_CHECK_MODULES(LUA, lua5.2, [ have_lua=yes ], [ - AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead]) - PKG_CHECK_MODULES(LUA, lua >= 5.1, + AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead]) + + PKG_CHECK_MODULES(LUA, lua5.1, [ have_lua=yes ], [ - AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead]) - have_lua=yes - AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h], - [], - [ have_lua=no ] ) - AC_CHECK_LIB( lua5.1 , luaL_newstate, - [LUA_LIBS="-llua5.1"], - AC_CHECK_LIB( lua51 , luaL_newstate, - [LUA_LIBS="-llua51"], - AC_CHECK_LIB( lua , luaL_newstate, - [LUA_LIBS="-llua"], - [ have_lua=no - ], [-lm]) - ) - ) + AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead]) + PKG_CHECK_MODULES(LUA, lua >= 5.1, + [ have_lua=yes ], + [ + AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead]) + have_lua=yes + AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h], + [], + [ have_lua=no ] ) + AC_CHECK_LIB( lua5.2 , luaL_newstate, + [LUA_LIBS="-llua5.2"], + AC_CHECK_LIB( lua5.1 , luaL_newstate, + [LUA_LIBS="-llua5.1"], + AC_CHECK_LIB( lua51 , luaL_newstate, + [LUA_LIBS="-llua51"], + AC_CHECK_LIB( lua , luaL_newstate, + [LUA_LIBS="-llua"], + [ have_lua=no + ], [-lm]) + ))) + ]) ]) ]) if test "x${have_lua}" = "xyes" ; then @@ -1532,6 +1551,9 @@ then AS_IF([test "${LUAC}" = "false"], [ AC_MSG_ERROR([Could not find the LUA byte compiler.]) ]) + AS_IF([test -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 AM_CONDITIONAL(BUILD_LUA, [test "${have_lua}" = "yes"]) @@ -1571,102 +1593,102 @@ dnl EXTEND_HELP_STRING([Input plugins:]) -dnl -dnl libproxy support -dnl -AC_ARG_ENABLE(libproxy, - [AS_HELP_STRING([--enable-libproxy],[support libproxy (default auto)])]) -AS_IF([test "${enable_libproxy}" != "no"], [ - PKG_CHECK_MODULES(LIBPROXY, libproxy-1.0, [ - AC_DEFINE(HAVE_LIBPROXY, 1, [Define if libproxy is available]) - VLC_ADD_CFLAGS([access_http],[$LIBPROXY_CFLAGS]) - VLC_ADD_LIBS([access_http],[$LIBPROXY_LIBS]) - ], [ - AS_IF([test -n "${enable_libproxy}"], [ - AC_MSG_ERROR([${LIBPROXY_PKG_ERRORS}.]) - ]) - ]) -]) - dnl dnl live555 input dnl AC_ARG_ENABLE(live555, [AS_HELP_STRING([--enable-live555], [enable RTSP input through live555 (default enabled)])]) + AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [ - AC_LANG_PUSH(C++) - VLC_SAVE_FLAGS - AS_IF([test -z "${CONTRIB_DIR}"], [ - AS_IF([test ${SYS} != "os2"], [ - LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"} - CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment" + PKG_CHECK_MODULES(LIVE555, live555, [ + VLC_ADD_PLUGIN([live555]) + VLC_ADD_CXXFLAGS([live555], [$LIVE555_CFLAGS]) + VLC_ADD_LIBS([live555],[$LIVE555_LIBS]) + ], [ + AC_MSG_WARN([${LIVE555_PKG_ERRORS}.]) + + AC_LANG_PUSH(C++) + VLC_SAVE_FLAGS + + dnl detect include paths + AS_IF([test -f "${CONTRIB_DIR}/include/UsageEnvironment.hh"], [ + CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment" ], [ - LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"} - CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include" - LDFLAGS_live555="-L${LIVE555_PREFIX}/liveMedia -L${LIVE555_PREFIX}/groupsock -L${LIVE555_PREFIX}/BasicUsageEnvironment -L${LIVE555_PREFIX}/UsageEnvironment" + AS_IF([test "${SYS}" != "os2"], [ + LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"} + CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment" + ], [ + LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"} + CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include" + LDFLAGS_live555="-L${LIVE555_PREFIX}/liveMedia -L${LIVE555_PREFIX}/groupsock -L${LIVE555_PREFIX}/BasicUsageEnvironment -L${LIVE555_PREFIX}/UsageEnvironment" + ]) ]) - ], [ - CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment" - ]) - AS_IF([test "${SYS}" = "solaris"], [ - CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS" - ]) - CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}" - LDFLAGS="${LDFLAGS} ${LDFLAGS_live555}" - AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [ - AC_PREPROC_IFELSE([AC_LANG_PROGRAM([ + dnl CPP Flags + AS_IF([test "${SYS}" = "solaris"], [ + CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS" + ]) + CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}" + LDFLAGS="${LDFLAGS} ${LDFLAGS_live555}" + + dnl version check + AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [ + AC_PREPROC_IFELSE([AC_LANG_PROGRAM([ [#include #if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1324598400) # error BOOM #endif]]) - ], [ - ac_cv_live555="yes" - ], [ - ac_cv_live555="no" + ], [ + ac_cv_live555="yes" + ], [ + ac_cv_live555="no" + ]) ]) - ]) - AS_IF([test "$ac_cv_live555" = "no"], [ - AC_MSG_WARN([liveMedia is missing or its installed version is too old: + + AS_IF([test "$ac_cv_live555" = "no"], [ + AC_MSG_WARN([live555 is missing or its installed version is too old: Version 2011.12.23 or later is required to proceed. You can get an updated one from http://www.live555.com/liveMedia .]) - AS_IF([test -n "${enable_live555}"], [ - AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.]) - ]) - ], [ - other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment" - other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic" - AS_IF([test "${SYS}" = "mingw32"], [ - # add ws2_32 for closesocket, select, recv - other_libs="$other_libs -lws2_32" - ]) + AS_IF([test -n "${enable_live555}"], [ + AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.]) + ]) + ], [ + other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment" + other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic" + AS_IF([test "${SYS}" = "mingw32"], [ + # add ws2_32 for closesocket, select, recv + other_libs="$other_libs -lws2_32" + ]) - dnl We need to check for pic because live555 don't provide shared libs - dnl and we want to build a plugins so we need -fPIC on some arch. - VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}]) - VLC_ADD_LDFLAGS([live555], [${LDFLAGS_live555}]) - AC_CHECK_LIB(liveMedia_pic, main, [ - VLC_ADD_PLUGIN([live555]) - VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}]) - ],[ - AC_CHECK_LIB(liveMedia, main, [ + dnl We need to check for pic because live555 don't provide shared libs + dnl and we want to build a plugins so we need -fPIC on some arch. + VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}]) + VLC_ADD_LDFLAGS([live555], [${LDFLAGS_live555}]) + AC_CHECK_LIB(liveMedia_pic, main, [ VLC_ADD_PLUGIN([live555]) - VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}]) - ],[],[${other_libs}])],[${other_libs_pic}]) + VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}]) + ],[ + AC_CHECK_LIB(liveMedia, main, [ + VLC_ADD_PLUGIN([live555]) + VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}]) + ],[],[${other_libs}]) + ],[${other_libs_pic}]) + ]) + VLC_RESTORE_FLAGS + AC_LANG_POP(C++) ]) - VLC_RESTORE_FLAGS - AC_LANG_POP(C++) ]) dnl -dnl - special access module for dc1394 input -dnl - dv module: digital video module check for libraw1394 -dnl - linsys modules: access module check for libzvbi +dnl IIDC and DV FireWire input modules dnl PKG_ENABLE_MODULES_VLC([DC1394], [], [libdc1394-2 >= 2.1.0], [IIDC FireWire input module], [auto]) PKG_ENABLE_MODULES_VLC([DV1394], [], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV FireWire input module], [auto]) +dnl +dnl - linsys modules: access module check for libzvbi +dnl AC_ARG_ENABLE(linsys, [AS_HELP_STRING([--enable-linsys], [Linux Linear Systems Ltd. SDI and HD-SDI input cards (default enabled)])]) @@ -1720,49 +1742,25 @@ PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv > 2.0] dnl dnl libsmbclient plugin dnl -AC_ARG_ENABLE(smb, - [AS_HELP_STRING([--disable-smb], [disable SMB/CIFS support (default auto)])]) -if test "${enable_smb}" != "no"; then - AC_CHECK_HEADERS(libsmbclient.h, - [ VLC_ADD_PLUGIN([access_smb]) - VLC_ADD_LIBS([access_smb],[-lsmbclient]) ], - [ if test -n "${enable_smb}"; then - AC_MSG_ERROR([cannot find libsmbclient headers]) - fi ]) -fi +PKG_ENABLE_MODULES_VLC([SMBCLIENT], [access_smb], [smbclient], (SMB/CIFS support), [auto]) dnl dnl sftp access support dnl -AC_ARG_ENABLE(sftp, - [AS_HELP_STRING([--enable-sftp], - [support SFTP file transfer via libssh2 (default disabled)])]) -if test "${enable_sftp}" = "yes"; then - AC_CHECK_HEADERS(libssh2.h, [ - VLC_ADD_PLUGIN([access_sftp]) - VLC_ADD_LIBS([access_sftp], [-lssh2]) - ]) -fi +PKG_ENABLE_MODULES_VLC([SFTP], [access_sftp], [libssh2], (support SFTP file transfer via libssh2), [auto]) dnl dnl Video4Linux 2 dnl AC_ARG_ENABLE(v4l2, [AS_HELP_STRING([--disable-v4l2], [disable Video4Linux version 2 (default auto)])]) -AC_ARG_ENABLE(pvr, [AS_HELP_STRING([--enable-pvr], - [support PVR V4L2 cards (default disabled)])]) have_v4l2="no" AS_IF([test "$enable_v4l2" != "no"], [ AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [ have_v4l2="yes" ]) ]) -AS_IF([test "$have_v4l2" = "yes"], [ - AS_IF([test "${enable_pvr}" = "yes"], [ - VLC_ADD_PLUGIN([pvr]) - ]) -]) AM_CONDITIONAL(HAVE_V4L2, [test "${have_v4l2}" != "no"]) dnl @@ -1774,21 +1772,25 @@ AC_ARG_ENABLE(decklink, AC_ARG_WITH(decklink_sdk, [AS_HELP_STRING[--with-decklink-sdk=DIR], [ location of Blackmagic DeckLink SDI SDK])]) +have_decklink=no if test "${enable_decklink}" != "no" then if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}" then - VLC_ADD_CPPFLAGS([decklink],[-I${with_decklink_sdk}/include]) + VLC_ADD_CPPFLAGS([decklink decklinkoutput],[-I${with_decklink_sdk}/include]) fi VLC_SAVE_FLAGS CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_decklink}" AC_LANG_PUSH(C++) AC_CHECK_HEADERS(DeckLinkAPIDispatch.cpp, [ - VLC_ADD_PLUGIN([decklink]) - ],[AC_MSG_WARN(Blackmagic DeckLink SDI include files not found, decklink disabled)]) + have_decklink=yes + ], [ + AC_MSG_WARN(Blackmagic DeckLink SDI include files not found, decklink disabled) + ]) AC_LANG_POP(C++) VLC_RESTORE_FLAGS fi +AM_CONDITIONAL(HAVE_DECKLINK, [ test "${have_decklink}" != "no" ]) dnl @@ -1799,21 +1801,7 @@ PKG_ENABLE_MODULES_VLC([GNOMEVFS], [access_gnomevfs], [gnome-vfs-2.0], [GnomeVFS dnl dnl VCDX modules dnl -AC_ARG_ENABLE(vcdx, - [AS_HELP_STRING([--enable-vcdx], - [navigate VCD with libvcdinfo (default disabled)])]) -if test "${enable_vcdx}" = "yes" -then - PKG_CHECK_MODULES(LIBCDIO, [libcdio >= 0.78.2 libiso9660 >= 0.72], - [VLC_ADD_LIBS([vcdx],[$LIBCDIO_LIBS]) - VLC_ADD_CFLAGS([vcdx],[$LIBCDIO_CFLAGS])], - [AC_MSG_ERROR([${LIBCDIO_PKG_ERRORS} (required for vcdx plugin).])]) - PKG_CHECK_MODULES(LIBVCDINFO, libvcdinfo >= 0.7.22, - [VLC_ADD_LIBS([vcdx],[$LIBVCDINFO_LIBS]) - VLC_ADD_CFLAGS([vcdx],[$LIBVCDINFO_CFLAGS])], - [AC_MSG_ERROR([${LIBVCDINFO_PKG_ERRORS} (required for vcdx plugin).])]) - VLC_ADD_PLUGIN([vcdx]) -fi +PKG_ENABLE_MODULES_VLC([VCDX], [vcdx], [libcdio >= 0.78.2 libiso9660 >= 0.72 libvcdinfo >= 0.7.22], [navigate VCD with libvcdinfo], [no]) dnl dnl Built-in CD-DA and VCD module @@ -1905,14 +1893,21 @@ AC_ARG_ENABLE(screen, [disable screen capture (default enabled)])]) if test "${enable_screen}" != "no"; then if test "${SYS}" = "darwin"; then - AC_CHECK_HEADERS(OpenGL/gl.h, [ - AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, [ - VLC_ADD_PLUGIN([screen]) - VLC_ADD_LIBS([screen],[-Wl,-framework,OpenGL,-framework,ApplicationServices]) - ]) + AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, [ + VLC_ADD_PLUGIN([screen]) ]) fi fi +AM_CONDITIONAL(HAVE_MAC_SCREEN, [test "${SYS}" = "darwin" -a "x${enable_screen}" != "xno"]) + +dnl +dnl VNC/RFB access module +dnl +PKG_ENABLE_MODULES_VLC([LIBVNC], [libvnc], [libvncclient >= 0.9.9], (VNC/rfb client support), [auto]) + +dnl RDP/Remote Desktop access module +dnl +PKG_ENABLE_MODULES_VLC([LIBFREERDP], [rdp], [freerdp >= 1.0.1], (RDP/Remote Desktop client support) ) dnl dnl Real RTSP plugin @@ -1946,6 +1941,24 @@ then fi AM_CONDITIONAL(HAVE_QTKIT, [test "${SYS}" = "darwin" -a "x${enable_macosx_qtkit}" != "xno"]) +dnl +dnl AVFoundation +AC_SUBST(have_avfoundation, ["no"]) +AC_ARG_ENABLE(macosx-avfoundation, + [ --enable-macosx-avfoundation Mac OS X avcapture (video) module (default enabled on Mac OS X)]) +if test "x${enable_macosx_avfoundation}" != "xno" && + (test "${SYS}" = "darwin" || test "${enable_macosx_avfoundation}" = "yes") +then + SAVED_LIBS="${LIBS}" + LIBS="-framework AVFoundation" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[have_avfoundation=yes],[have_avfoundation=no]) + LIBS="${SAVED_LIBS}" + if test "${have_avfoundation}" != "no" + then + VLC_ADD_PLUGIN([avcapture]) + fi +fi +AM_CONDITIONAL(HAVE_AVFOUNDATION, [test "${have_avfoundation}" != "no"]) dnl dnl Demux plugins @@ -2139,17 +2152,27 @@ AC_ARG_ENABLE(omxil, if test "${enable_omxil}" = "yes" then VLC_ADD_PLUGIN([omxil]) - VLC_ADD_LIBS([omxil], [$LIBDL]) fi dnl -dnl iomx codec plugin +dnl openmax il vout plugin +dnl +AC_ARG_ENABLE(omxil-vout, + [ --enable-omxil-vout openmax il video output module (default disabled)]) +if test "${enable_omxil_vout}" = "yes" +then + VLC_ADD_PLUGIN([omxil_vout]) +fi + +dnl +dnl raspberry pi openmax il configuration dnl -AC_ARG_ENABLE(iomx, - [ --enable-iomx iomx codec module (default disabled)]) -if test "${enable_iomx}" = "yes" +AC_ARG_ENABLE(rpi-omxil, + [ --enable-rpi-omxil openmax il configured for raspberry pi (default disabled)]) +if test "${enable_rpi_omxil}" = "yes" then - VLC_ADD_PLUGIN([iomx]) + VLC_ADD_PLUGIN([omxil omxil_vout]) + VLC_ADD_CFLAGS([omxil omxil_vout],[-DRPI_OMX]) fi dnl @@ -2260,23 +2283,25 @@ dnl AC_ARG_ENABLE(avcodec, [ --enable-avcodec libavcodec codec (default enabled)]) AS_IF([test "${enable_avcodec}" != "no"], [ - PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.25.0 libavutil >= 49.5.0], - [ - VLC_SAVE_FLAGS - CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" - CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}" - AC_CHECK_HEADERS(libavcodec/avcodec.h) - AC_CHECK_HEADERS(libavutil/avutil.h) - VLC_ADD_PLUGIN([avcodec]) - VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS]) - AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [ - VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic]) - ]) - VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS]) - VLC_RESTORE_FLAGS - have_avcodec="yes" - ],[ - AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.]) + PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [ + PKG_CHECK_EXISTS([libavcodec < 56],, [ + AC_MSG_ERROR([libavcodec versions 56 and later are not supported yet.]) + ]) + VLC_SAVE_FLAGS + CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}" + CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}" + AC_CHECK_HEADERS(libavcodec/avcodec.h) + AC_CHECK_HEADERS(libavutil/avutil.h) + VLC_ADD_PLUGIN([avcodec]) + VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS]) + AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [ + VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic]) + ]) + VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS]) + VLC_RESTORE_FLAGS + have_avcodec="yes" + ],[ + AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.]) ]) ], [ have_avcodec="no" @@ -2291,16 +2316,15 @@ 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.]) ]) -AS_IF([test "${enable_libva}" != "no"], [ +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, [ - VLC_ADD_LIBS([avcodec],[$LIBVA_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11]) - VLC_ADD_CFLAGS([avcodec],[$LIBVA_CFLAGS ${X_CFLAGS}]) - AC_DEFINE(HAVE_AVCODEC_VAAPI, 1, [Define if avcodec has to be built with VAAPI support.]) 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]) @@ -2317,6 +2341,7 @@ AS_IF([test "${enable_libva}" != "no"], [ ]) ]) ]) +AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"]) dnl dnl dxva2 needs avcodec @@ -2324,15 +2349,15 @@ dnl AC_ARG_ENABLE(dxva2, [ --enable-dxva2 DxVA2 GPU decoding support (default auto)]) +have_avcodec_dxva2="no" AS_IF([test "${enable_dxva2}" != "no"], [ if test "${SYS}" = "mingw32"; then AS_IF([test "x${have_avcodec}" = "xyes"], [ AC_CHECK_HEADERS(dxva2api.h, [ AC_CHECK_HEADERS(libavcodec/dxva2.h, [ - VLC_ADD_LIBS([avcodec],[-lole32 -lshlwapi -luuid]) - AC_DEFINE(HAVE_AVCODEC_DXVA2, 1, [Define if avcodec has to be built with DxVA2 support.]) - echo "DxVA2 acceleration activated" + AC_MSG_NOTICE([DxVA2 acceleration activated]) + have_avcodec_dxva2="yes" ],[ AS_IF([test "${enable_dxva2}" = "yes"], [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])], @@ -2352,6 +2377,7 @@ AS_IF([test "${enable_dxva2}" != "no"], [ ]) fi ]) +AM_CONDITIONAL([HAVE_AVCODEC_DXVA2], [test "${have_avcodec_dxva2}" = "yes"]) dnl dnl vda needs avcodec @@ -2359,22 +2385,21 @@ dnl AC_ARG_ENABLE(vda, [ --enable-vda VDA support (default auto)]) +have_avcodec_vda="no" AS_IF([test "${enable_vda}" != "no"], [ if test "${SYS}" = "darwin"; then AS_IF([test "x${have_avcodec}" = "xyes"], [ AC_CHECK_HEADERS(VideoDecodeAcceleration/VDADecoder.h, [ AC_CHECK_HEADERS(libavcodec/vda.h, [ - VLC_ADD_LIBS([avcodec],[-Wl,-framework,CoreFoundation,-framework,VideoDecodeAcceleration,-framework,QuartzCore]) - VLC_ADD_LDFLAGS([vda],[-Wl,-framework,CoreFoundation,-framework,VideoDecodeAcceleration,-framework,QuartzCore]) - AC_DEFINE(HAVE_AVCODEC_VDA, 1, [Define if avcodec has to be built with VDA support.]) + have_avcodec_vda="yes" ],[ - AS_IF([test "${enable_vda}" == "yes"], + AS_IF([test "${enable_vda}" = "yes"], [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"], + AS_IF([test "${enable_vda}" = "yes"], [AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])], [AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])]) ]) @@ -2385,21 +2410,7 @@ AS_IF([test "${enable_vda}" != "no"], [ ]) fi ]) - -dnl -dnl stream_out switcher needs libavcodec -dnl -AC_ARG_ENABLE(switcher, - [ --enable-switcher Stream-out switcher plugin (default disabled)]) -AS_IF([test "${enable_switcher}" = "yes"], [ - AS_IF([test "x${have_avcodec}" = "xyes"], [ - VLC_ADD_PLUGIN([stream_out_switcher]) - VLC_ADD_LIBS([stream_out_switcher],[$AVCODEC_LIBS $AVUTIL_LIBS $LIBM]) - VLC_ADD_CFLAGS([stream_out_switcher],[$AVCODEC_CFLAGS $AVUTIL_CFLAGS]) - ],[AC_MSG_ERROR([Stream_out switcher depends on avcodec]) - ]) -]) - +AM_CONDITIONAL([HAVE_AVCODEC_VDA], [test "${have_avcodec_vda}" = "yes"]) dnl dnl avformat demuxer/muxer plugin @@ -2411,7 +2422,7 @@ AC_ARG_ENABLE(avformat, ]) if test "${enable_avformat}" != "no" then - PKG_CHECK_MODULES(AVFORMAT,[libavformat > 52.30.0 libavcodec libavutil], + PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil], [ VLC_SAVE_FLAGS CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}" @@ -2420,10 +2431,10 @@ then AC_CHECK_HEADERS(libavutil/avutil.h) AS_IF([test "$enable_merge_ffmpeg" = "no"], [ VLC_ADD_PLUGIN([avformat access_avio]) - VLC_ADD_LIBS([avformat access_avio],[$AVFORMAT_LIBS $AVUTIL_LIBS]) - VLC_ADD_CFLAGS([avformat access_avio],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS]) + VLC_ADD_LIBS([access_avio],[$AVFORMAT_LIBS $AVUTIL_LIBS]) + VLC_ADD_CFLAGS([access_avio],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS]) AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [ - VLC_ADD_LIBS([avformat access_avio],[-Wl,-Bsymbolic]) + VLC_ADD_LDFLAGS([avformat access_avio],[-Wl,-Bsymbolic]) ]) ], [ VLC_ADD_LIBS([avcodec],[$AVFORMAT_LIBS $AVUTIL_LIBS]) @@ -2467,7 +2478,7 @@ dnl postproc plugin dnl AC_ARG_ENABLE(postproc, -[ --enable-postproc libpostproc image post-processing (default enabled)]) +[ --enable-postproc libpostproc image post-processing (default auto)]) if test "${enable_postproc}" != "no" then PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil], @@ -2481,7 +2492,7 @@ then VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS]) VLC_RESTORE_FLAGS ],[ - AC_MSG_ERROR([${POSTPROC_PKG_ERRORS}. Pass --disable-postproc to ignore this error.]) + AC_MSG_WARN([${POSTPROC_PKG_ERRORS}.]) ]) fi @@ -2537,6 +2548,11 @@ dnl twolame encoder plugin dnl PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC]) +dnl +dnl fdk-aac encoder plugin +dnl +PKG_ENABLE_MODULES_VLC([FDKAAC], [], [fdk-aac], [FDK-AAC encoder], [disabled]) + dnl dnl QuickTime plugin dnl @@ -2625,11 +2641,6 @@ then fi fi -AC_ARG_WITH(a52-fixed, - [ --with-a52-fixed specify if liba52 has been compiled with fixed point support], - [ - VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ]) - dnl dnl DTS Coherent Acoustics decoder plugin dnl @@ -2702,18 +2713,17 @@ dnl PNG decoder module dnl AC_ARG_ENABLE(png, [ --enable-png PNG support (default enabled)]) -if test "${enable_png}" != "no"; then +AS_IF([test "${enable_png}" != "no"], [ AC_CHECK_HEADERS(png.h, [ VLC_SAVE_FLAGS LDFLAGS="${LDFLAGS} -lz $LIBM" AC_CHECK_LIB(png, png_set_rows, [ VLC_ADD_LIBS([png],[-lpng -lz $LIBM]) - VLC_ADD_PLUGIN([png osdmenu osd_parser])], - [],[-lz $LIBM] ) + VLC_ADD_PLUGIN([png]) + ], [], [-lz $LIBM]) VLC_RESTORE_FLAGS ]) -fi -AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_png}" != "no"]) +]) dnl dnl H264 encoder plugin (10-bit lib264) @@ -2828,6 +2838,11 @@ if test "${enable_x264}" != "no"; then fi fi +dnl +dnl Intel QuickSync (aka MediaSDK) H264/H262 encoder +dnl +PKG_ENABLE_MODULES_VLC([QUICKSYNC], [qsv], [libmfx], [Intel QuickSync MPEG4-Part10/MPEG2 (aka H.264/H.262) encoder], [auto]) + dnl dnl libfluidsynth (MIDI synthetizer) plugin dnl @@ -2931,10 +2946,10 @@ PKG_CHECK_MODULES([GL], [gl], [ ]) ]) -dnl OpenGL ES 2: depends on EGL 1.1 and is currently unfinished -dnl PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [auto]) -dnl OpenGL ES 1: depends on EGL 1.0 and is currently broken -dnl PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [auto]) +dnl OpenGL ES 2: depends on EGL 1.1 +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)],, [ @@ -2996,15 +3011,18 @@ AS_IF([test "${enable_xcb}" != "no"], [ AC_MSG_WARN([${XCB_RANDR_PKG_ERRORS}. Panoramix filter will not be supported.]) ]) - dnl xcb-utils - PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [ - PKG_CHECK_MODULES(XPROTO, [xproto]) - VLC_ADD_PLUGIN([globalhotkeys]) - VLC_ADD_CFLAGS([globalhotkeys], [${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}]) - VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}]) - VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS]) + PKG_CHECK_MODULES(XPROTO, [xproto], [ + VLC_ADD_PLUGIN([xwd]) + + dnl xcb-utils + PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [ + VLC_ADD_PLUGIN([globalhotkeys]) + VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS]) + ], [ + AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.]) + ]) ], [ - AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.]) + AC_MSG_WARN([${XPROTO_PKG_ERRORS}. Hotkeys and XWD will not work.]) ]) AS_IF([test "${enable_glx}" != "no"], [ @@ -3012,10 +3030,50 @@ AS_IF([test "${enable_xcb}" != "no"], [ AC_MSG_ERROR([${GL_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.]) ]) VLC_ADD_PLUGIN([xcb_glx]) + VLC_ADD_PLUGIN([glx]) + VLC_ADD_PLUGIN([gl]) ]) ]) AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"]) + +dnl +dnl VDPAU needs X11 and avcodec +dnl +AC_ARG_ENABLE(vdpau, + [AS_HELP_STRING([--enable-vdpau], + [VDPAU hardware decoder support (default auto)])]) +have_vdpau="no" +AS_IF([test "${enable_vdpau}" != "no" -a "${have_avcodec}" = "yes"], [ + PKG_CHECK_MODULES([VDPAU], [vdpau], [ + have_vdpau="yes" + AS_IF([test "${no_x}" = "yes"], [ + AC_MSG_ERROR([VDPAU requires Xlib (X11).]) + ]) + AC_MSG_NOTICE([VDPAU acceleration activated]) + ], [ + AS_IF([test -n "${enable_vdpau}"], [ + AC_MSG_ERROR([${VDPAU_PKG_ERRORS}.]) + ]) + ]) +]) +dnl AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"]) + +have_avcodec_vdpau="no" +AS_IF([test "${have_vdpau}" = "yes"], [ + PKG_CHECK_EXISTS([libavutil >= 0.52.4 libavcodec >= 54.36.0], [ + have_avcodec_vdpau="yes" + ], [ + 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_WARN([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.]) + ]) + ]) +]) +AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" = "yes"]) + + dnl dnl SDL module dnl @@ -3074,6 +3132,28 @@ AC_ARG_ENABLE(fribidi, AC_ARG_ENABLE(fontconfig, [ --enable-fontconfig fontconfig support (default auto)]) +AC_ARG_WITH([default-font], + AS_HELP_STRING([--with-default-font=PATH], + [Path to the default font]), + [AC_DEFINE_UNQUOTED([DEFAULT_FONT_FILE], + "$withval", [Default font])]) +AC_ARG_WITH([default-monospace-font], + AS_HELP_STRING([--with-default-monospace-font=PATH], + [Path to the default font]), + [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FONT_FILE], + "$withval", [Default monospace font])]) + +AC_ARG_WITH([default-font-family], + AS_HELP_STRING([--with-default-font-family=NAME], + [Path to the default font family]), + [AC_DEFINE_UNQUOTED([DEFAULT_FAMILY], + "$withval", [Default font family])]) +AC_ARG_WITH([default-monospace-font-family], + AS_HELP_STRING([--with-default-monospace-font-family=NAME], + [Path to the default font family]), + [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FAMILY], + "$withval", [Default monospace font family])]) + if test "${enable_freetype}" != "no"; then PKG_CHECK_MODULES(FREETYPE, freetype2, [ have_freetype=yes @@ -3154,10 +3234,21 @@ AC_ARG_ENABLE(ios-vout, if test "${enable_ios_vout}" = "yes" then VLC_ADD_PLUGIN([vout_ios]) - VLC_ADD_CFLAGS([vout_ios], [-DUSE_OPENGL_ES=1]) 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 @@ -3188,51 +3279,22 @@ AS_IF([test "${enable_directx}" != "no"], [ dnl OpenGL AC_CHECK_HEADERS(GL/wglew.h, [ VLC_ADD_PLUGIN([glwin32]) - VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32]) - ],, [ - #include - #include - ]) - - dnl Direct3D - AC_CHECK_HEADERS(d3d9.h, [ - VLC_ADD_PLUGIN([direct3d]) - VLC_ADD_LIBS([direct3d],[-lgdi32]) - ]) - VLC_ADD_LIBS([direct3d glwin32],[-lole32 -luuid]) -]) -AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"]) + ],, [ + #include + #include + ]) -dnl -dnl Windows Direct2D plugin -dnl -AC_ARG_ENABLE(direct2d, - [ --enable-direct2d Win7/VistaPU Direct2D support (default auto on Win32)],, [ - AS_IF([test "${SYS}" != "mingw32"], [ - enable_direct2d="no" + dnl Direct3D + AC_CHECK_HEADERS(d3d9.h, [ + VLC_ADD_PLUGIN([direct3d]) ]) -]) -AS_IF([test "${enable_direct2d}" != "no"], [ + + dnl Direct2D AC_CHECK_HEADERS(d2d1.h, [ VLC_ADD_PLUGIN([direct2d]) - VLC_ADD_LIBS([direct2d],[-lgdi32 -lole32 -luuid]) - ], [ - AC_MSG_WARN([Cannot find Direct2D headers!]) ]) ]) - -dnl -dnl win32 GDI plugin -dnl -AC_ARG_ENABLE(wingdi, - [ --enable-wingdi Win32 GDI module (default enabled on Win32)]) -if test "${enable_wingdi}" != "no"; then - if test "${SYS}" = "mingw32"; then - VLC_ADD_PLUGIN([wingdi]) - VLC_ADD_LIBS([wingdi],[-lgdi32 -lole32 -luuid]) - fi -fi - +AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"]) dnl dnl Linux framebuffer module @@ -3400,11 +3462,11 @@ AC_ARG_ENABLE(alsa, ]) have_alsa="no" AS_IF([test "${enable_alsa}" != "no"], [ - PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.16], [ + PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.24], [ have_alsa="yes" ], [ AS_IF([test "x${enable_alsa}" != "x"], [ - AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.16 or later required.]) + AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.24 or later required.]) ]) ]) ]) @@ -3439,7 +3501,7 @@ dnl AC_ARG_ENABLE([sndio], [AS_HELP_STRING([--disable-sndio], [support the OpenBSD sndio (default auto)])],, [ - AS_IF([test "$SYS" = "opensd"], [ + AS_IF([test "$SYS" = "openbsd"], [ enable_sndio="yes" ]) ]) @@ -3492,10 +3554,23 @@ if test "x${enable_macosx_audio}" != "xno" && then AC_CHECK_HEADERS(CoreAudio/CoreAudio.h, [ VLC_ADD_PLUGIN([auhal]) - VLC_ADD_LIBS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,Carbon]) + VLC_ADD_LIBS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,CoreServices]) ], [ 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_HEADERS(AudioUnit/AudioUnit.h, + [ VLC_ADD_PLUGIN([audiounit_ios]) + VLC_ADD_LIBS([audiounit_ios],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,CoreServices]) + ], [ AC_MSG_ERROR([cannot find AudioUnit headers]) ]) +fi + dnl dnl AudioQueue plugin dnl @@ -3510,7 +3585,29 @@ fi dnl dnl JACK modules dnl -PKG_ENABLE_MODULES_VLC([JACK], [jack access_jack], [jack], [JACK audio I/O modules],[auto]) +AC_ARG_ENABLE(jack, + [AS_HELP_STRING([--disable-jack], + [do not use jack (default auto)])]) +if test "${enable_jack}" != "no" ; then + PKG_CHECK_MODULES(JACK, jack >= 1.9.7, + [ have_jack=yes ], + [ + AC_MSG_WARN([${JACK_PKG_ERRORS}, trying jack1 instead]) + + PKG_CHECK_MODULES(JACK, jack >= 0.120.1 jack < 1.0, + [ have_jack=yes ], + [ + AS_IF([test -n "${enable_jack}"], + [AC_MSG_ERROR([${JACK_PKG_ERRORS}.])], + [AC_MSG_WARN([${JACK_PKG_ERRORS}.])]) + ]) + ]) + if test "x${have_jack}" = "xyes" ; then + VLC_ADD_PLUGIN([jack access_jack]) + VLC_ADD_LIBS([jack access_jack],[$JACK_LIBS]) + VLC_ADD_CFLAGS([jack access_jack],[$JACK_CFLAGS]) + fi +fi dnl dnl OpenSLES Android @@ -3553,6 +3650,22 @@ AS_IF([test "$enable_kai" != "no"], [ AC_SUBST(KAI_LIBS) AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"]) +dnl +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_CFLAGS([stream_out_chromaprint],[${CHROMAPRINT_CFLAGS}] [-I./webservices -I../stream_out]) + VLC_ADD_LIBS([stream_out_chromaprint],[${CHROMAPRINT_LIBS}]) + VLC_ADD_LIBS([fingerprinter],[-lm]), + 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)] + ), + [(Chromaprint based audio fingerprinter)],[auto]) +m4_popdef([libchromaprint_version]) + dnl dnl Interface plugins dnl @@ -3615,9 +3728,9 @@ AS_IF([test "${enable_qt}" != "no"], [ ]) QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)" - AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, [${QT_PATH}/bin]) - AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin]) - AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, [${QT_PATH}/bin]) + AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin]) + AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin]) + AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, [${QT_PATH}/bin ${CONTRIB_DIR}/bin]) ]) AM_CONDITIONAL(ENABLE_QT4, [test "$enable_qt" != "no"]) @@ -3649,6 +3762,9 @@ AS_IF([test "${enable_skins2}" != "no"], [ ], [test "${SYS}" = "darwin"], [ VLC_ADD_CPPFLAGS([skins2],[ -DMACOSX_SKINS]) VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon]) + dnl OS/2 + ], [test "${SYS}" = "os2"], [ + VLC_ADD_CPPFLAGS([skins2],[ -DOS2_SKINS]) dnl Linux/Unix ], [ PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"]) @@ -3696,11 +3812,11 @@ AC_ARG_ENABLE(macosx, [ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)]) if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin" then - VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,Cocoa -Wl,-framework,OpenGL -Wl,-framework,Carbon -Wl,-framework,CoreServices -Wl,-framework,AGL]) - VLC_ADD_OBJCFLAGS([macosx minimal_macosx], [-fobjc-exceptions] ) - VLC_ADD_PLUGIN([macosx minimal_macosx]) + VLC_ADD_LIBS([macosx], [-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,CoreServices]) + VLC_ADD_OBJCFLAGS([macosx], [-fobjc-exceptions] ) + VLC_ADD_PLUGIN([macosx]) - VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit -Wl,-framework,CoreAudio -Wl,-framework,SystemConfiguration]) + VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit -Wl,-framework,CoreAudio -Wl,-framework,SystemConfiguration -Wl,-framework,ScriptingBridge]) if test ! -d ${CONTRIB_DIR}/Sparkle.framework then @@ -3715,11 +3831,24 @@ then fi VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,BGHUDAppKit]) VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}]) +fi +AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "no"]) +dnl +dnl Minimal Mac OS X module +dnl +AC_ARG_ENABLE(minimal-macosx, + [ --enable-minimal-macosx Minimal Mac OS X support (default disabled)]) +if test "${enable_minimal_macosx}" = "yes" -a "${SYS}" = "darwin" +then + VLC_ADD_LIBS([minimal_macosx], [-Wl,-framework,Cocoa]) + VLC_ADD_OBJCFLAGS([minimal_macosx], [-fobjc-exceptions] ) + VLC_ADD_PLUGIN([minimal_macosx]) fi +AM_CONDITIONAL(ENABLE_MINIMAL_MACOSX, [test "$enable_minimal_macosx" != "no"]) dnl -dnl MacOS X dialor provider +dnl MacOS X dialog provider dnl AC_ARG_ENABLE(macosx-dialog-provider, [ --enable-macosx-dialog-provider Mac OS X dialog module (default enabled on Mac OS X)]) @@ -3729,6 +3858,7 @@ then VLC_ADD_LIBS([macosx_dialog_provider],[-Wl,-framework,Cocoa]) VLC_ADD_PLUGIN([macosx_dialog_provider]) fi +AM_CONDITIONAL(ENABLE_MACOSX_DIALOG_PROVIDER, [test "$enable_macosx_dialog_provider" != "no"]) dnl dnl ncurses module @@ -3764,16 +3894,6 @@ then fi EXTEND_HELP_STRING([Visualisations and Video filter plugins:]) -dnl -dnl Visualisation plugin -dnl -AC_ARG_ENABLE(visual, - [ --enable-visual visualisation plugin (default enabled)]) -if test "${enable_visual}" != "no" -then - VLC_ADD_PLUGIN([visual]) -fi - dnl dnl goom visualization plugin dnl @@ -3831,6 +3951,7 @@ AS_IF([test "${enable_atmo}" != no], [ ]) ]) + EXTEND_HELP_STRING([Service Discovery plugins:]) dnl dnl Bonjour services discovery @@ -3889,15 +4010,8 @@ dnl TLS/SSL dnl AC_ARG_ENABLE(gnutls, [ --enable-gnutls GNU TLS TLS/SSL support (default enabled)]) - -AS_IF([test "${have_libgcrypt}" != "yes"], [ - AS_IF([test "${enable_gnutls}" = "yes"], [ - AC_MSG_ERROR([--enable-gnutls and --disable-libgcrypt are mutually exclusive.]) - ]) - enable_gnutls="no" -]) AS_IF([test "${enable_gnutls}" != "no"], [ - PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.6.6], [ + PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.0.20], [ VLC_ADD_PLUGIN([gnutls]) ], [ AS_IF([test -n "${enable_gnutls}"], [ @@ -3907,17 +4021,6 @@ AS_IF([test "${enable_gnutls}" != "no"], [ ]) -dnl -dnl Nokia MCE plugin (Maemo screen unblanking) -dnl -PKG_CHECK_MODULES([MCE], [dbus-1 mce], [VLC_ADD_PLUGIN([mce])], [true]) - - -AS_IF([test -f "/etc/maemo_version"], [ - AC_DEFINE([HAVE_MAEMO], 1, [Define to 1 if building for the Maemo platform.]) -]) - - dnl dnl Taglib plugin dnl @@ -3971,34 +4074,6 @@ dnl Libnotify notification plugin dnl PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-2.0], [libnotify notification], [auto]) -dnl -dnl media library -dnl -AC_ARG_ENABLE(media-library, - [ --enable-media-library media library (default disabled)]) -AS_IF([test "${enable_media_library}" = "yes"], [ - AC_DEFINE([MEDIA_LIBRARY], 1, [Define if you want to use the VLC media library]) - VLC_ADD_CPPFLAGS([qt4],"-DMEDIA_LIBRARY") - VLC_ADD_PLUGIN([media_library]) - -dnl -dnl SQLite -dnl - AS_IF([test "${SYS}" != "darwin"], [ - PKG_ENABLE_MODULES_VLC([SQLITE], [], [sqlite3 >= 3.6.0], [sqlite3], [auto]) - ], [ - AS_IF([test "${enable_sqlite}" != "no"], [ - AC_CHECK_HEADERS(sqlite3.h, [ - VLC_ADD_PLUGIN([sqlite]) - VLC_ADD_LIBS([sqlite], [-lsqlite3]) - ], [ - AC_MSG_ERROR([sqlite3 is required for the media library]) - ]) - ]) - ]) -]) - - dnl dnl Endianness check dnl @@ -4040,19 +4115,8 @@ AC_SUBST(soliddatadir) AM_CONDITIONAL(KDE_SOLID, [test "x${soliddatadir}" != "x"]) dnl -dnl DLL loader copied from MPlayer copied from somewhere else (WINE ?) -dnl -loader=false -AC_ARG_ENABLE(loader, - AS_HELP_STRING([--enable-loader],[build DLL loader for ELF i386 platforms - (default disabled)])) -AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"]) -AS_IF([test "${enable_loader}" = "yes"], - [ VLC_ADD_PLUGIN([dmo]) - VLC_ADD_CPPFLAGS([dmo quicktime ],[-I\\\${top_srcdir}/modules/codec/loader]) - VLC_ADD_LIBS([dmo quicktime ],[\\\${top_builddir}/modules/codec/loader/libloader.la]) - VLC_ADD_LIBS([dmo quicktime], [-lpthread]) - ]) +dnl DMO codec +AS_IF([test "${SYS}" = "mingw32"], [VLC_ADD_PLUGIN([dmo]) VLC_ADD_LIBS([dmo],[-lole32 -luuid]) ]) EXTEND_HELP_STRING([Components:]) @@ -4128,34 +4192,14 @@ AC_CONFIG_FILES([ bin/Makefile test/Makefile modules/access/Makefile - modules/access/mms/Makefile modules/access/rtp/Makefile - modules/access/vcdx/Makefile - modules/access/zip/Makefile - modules/access/zip/unzip/Makefile modules/access_output/Makefile modules/audio_filter/Makefile modules/audio_mixer/Makefile modules/audio_output/Makefile modules/codec/Makefile - modules/codec/avcodec/Makefile - modules/codec/dmo/Makefile - modules/codec/loader/Makefile - modules/codec/omxil/Makefile - modules/codec/shine/Makefile - modules/codec/spudec/Makefile - modules/codec/wmafixed/Makefile modules/control/Makefile - modules/control/dbus/Makefile - modules/control/globalhotkeys/Makefile modules/demux/Makefile - modules/demux/asf/Makefile - modules/demux/avformat/Makefile - modules/demux/avi/Makefile - modules/demux/mkv/Makefile - modules/demux/mp4/Makefile - modules/demux/mpeg/Makefile - modules/demux/playlist/Makefile modules/gui/Makefile modules/gui/macosx/Makefile modules/gui/minimal_macosx/Makefile @@ -4165,27 +4209,17 @@ AC_CONFIG_FILES([ modules/lua/Makefile modules/meta_engine/Makefile modules/misc/Makefile - modules/misc/playlist/Makefile - modules/misc/osd/Makefile - modules/misc/stats/Makefile - modules/media_library/Makefile modules/mux/Makefile - modules/mux/mpeg/Makefile modules/notify/Makefile modules/packetizer/Makefile modules/services_discovery/Makefile modules/stream_filter/Makefile - modules/stream_filter/dash/Makefile modules/stream_out/Makefile - modules/stream_out/transcode/Makefile modules/text_renderer/Makefile modules/video_chroma/Makefile modules/video_filter/Makefile - modules/video_filter/dynamicoverlay/Makefile modules/video_output/Makefile - modules/video_output/msw/Makefile modules/visualization/Makefile - modules/visualization/visual/Makefile modules/mmx/Makefile modules/sse2/Makefile modules/altivec/Makefile @@ -4194,8 +4228,9 @@ AC_CONFIG_FILES([ AM_COND_IF([HAVE_WIN32], [ AC_CONFIG_FILES([ - extras/package/win32/spad.nsi - extras/package/win32/vlc.win32.nsi + extras/package/win32/NSIS/spad.nsi + extras/package/win32/NSIS/vlc.win32.nsi + extras/package/win32/msi/config.wxi ]) ])