1 dnl Autoconf settings for vlc
3 AC_COPYRIGHT([Copyright 1999-2017 VLC authors and VideoLAN])
5 AC_INIT(vlc, 3.0.0-git)
15 CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
17 COPYRIGHT_YEARS="1996-2017"
19 AC_CONFIG_SRCDIR(src/libvlc.c)
20 AC_CONFIG_AUX_DIR(autotools)
21 AC_CONFIG_MACRO_DIR(m4)
22 AC_CONFIG_LIBOBJ_DIR(compat)
25 AC_PRESERVE_HELP_ORDER
27 AM_INIT_AUTOMAKE(tar-ustar color-tests foreign)
28 AC_CONFIG_HEADERS([config.h])
30 AM_SILENT_RULES([yes])
31 AM_MAINTAINER_MODE([enable])
36 dnl vlcincludedir="\${includedir}/\${PKGDIR}"
37 dnl AC_SUBST(vlcincludedir)
38 vlcdatadir="\${datadir}/\${PKGDIR}"
40 vlclibdir="\${libdir}/\${PKGDIR}"
47 AC_USE_SYSTEM_EXTENSIONS
49 AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.])
50 AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
56 AC_DEFINE([_THREAD_SAFE],, [Same as _REENTANT for some other OSes.])
57 AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
58 AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
64 _AM_DEPENDENCIES([OBJC])
70 AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
71 AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
72 AC_ARG_VAR([BUILDCC], [Build system C11 or C99 compiler command])
73 AC_CHECK_PROGS(BUILDCC, [c11-gcc c11 c99-gcc c99], [false])
74 AS_IF([test "$BUILDCC" = "false"], [
75 AC_MSG_ERROR([Cannot find native C99 compiler: please define BUILDCC.])
78 dnl Check for compiler properties
82 AX_CXX_COMPILE_STDCXX_11(noext, mandatory)
84 dnl Extend the --help string at the current spot.
85 AC_DEFUN([EXTEND_HELP_STRING], [m4_divert_once([HELP_ENABLE], [$1])])
87 dnl Allow binary package maintainer to pass a custom string to avoid
89 AC_ARG_WITH(binary-version,
90 AS_HELP_STRING([--with-binary-version=STRING],
91 [To avoid plugins cache problem between binary version]),[],[])
92 AS_IF([test -n "${with_binary_version}"],[
93 AC_DEFINE_UNQUOTED([DISTRO_VERSION],["${with_binary_version}"],
94 [Binary specific version])
98 dnl Check the operating system
114 CFLAGS="${CFLAGS} -pthread"
118 CFLAGS="${CFLAGS} -pthread"
119 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
120 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
125 CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/usr/X11R6/include"
126 LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/X11R6/lib/"
136 dnl Force gcc "-arch" flag
140 ARCH_flag="-arch i386"
143 ARCH_flag="-arch ppc64"
146 ARCH_flag="-arch ppc"
149 ARCH_flag="-arch x86_64"
152 ac_cv_c_bigendian="no"
153 ac_cv_c_attribute_packed="no"
158 CFLAGS="${CFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu11 ${ARCH_flag}"
159 CXX="${CXX} -stdlib=libc++ -std=c++11"
160 CXXFLAGS="${CXXFLAGS} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"
161 CPPFLAGS="${CPPFLAGS} ${ARCH_flag}"
162 OBJCFLAGS="${OBJCFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu11 ${ARCH_flag} -Werror=partial-availability"
163 LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names ${ARCH_flag}"
164 VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit])
165 VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,CoreServices])
168 [#import <TargetConditionals.h>
176 [#import <TargetConditionals.h>
185 dnl Allow binaries created on Lion to run on earlier releases
187 [#import <Cocoa/Cocoa.h>
188 #ifdef MAC_OS_X_VERSION_10_7
191 [AC_MSG_RESULT([yes])
192 AC_LIBOBJ([getdelim])
194 AC_LIBOBJ([strnlen])],)
197 dnl Handle Mac OS X SDK flags
199 AC_ARG_WITH(macosx-sdk,
200 [AS_HELP_STRING([--with-macosx-sdk=DIR],
201 [compile using the SDK in DIR])])
202 if test "${with_macosx_sdk}" != "" ; then
203 test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
204 CPP="${CPP} -isysroot ${with_macosx_sdk}"
205 CC="${CC} -isysroot ${with_macosx_sdk}"
206 CXX="${CXX} -isysroot ${with_macosx_sdk}"
207 OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
208 LD="${LD} -syslibroot ${with_macosx_sdk}"
210 AC_ARG_WITH(macosx-version-min,
211 [AS_HELP_STRING([--with-macosx-version-min=VERSION],
212 [compile for Mac OS X VERSION and above])])
213 if test "${with_macosx_version_min}" != "" ; then
214 CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
215 CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
216 CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
217 OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
218 LD="${LD} -mmacosx_version_min=${with_macosx_version_min}"
221 *mingw32* | *cygwin* | *wince* | *mingwce*)
222 dnl Force libtool to not link to (shared) libgcc_s when detecting C++ dependencies
223 dnl When doing this test with -static-libgcc it will link on (static) libgcc_eh
224 CXXFLAGS="${CXXFLAGS} -static-libgcc"
225 AC_CHECK_TOOL(WINDRES, windres, :)
226 AC_CHECK_TOOL(OBJCOPY, objcopy, :)
227 AH_TOP([#if defined(_WIN32) && !defined(_WIN32_WINNT)])
228 AH_TOP([# define _WIN32_WINNT 0x0502 /* Windows XP SP2 */])
230 AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
231 AC_DEFINE([_UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
232 AC_DEFINE([UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
233 AC_DEFINE([_ISOC99_SOURCE], [1], [Extensions to ISO C89 from ISO C99.])
234 AC_DEFINE([_ISOC11_SOURCE], [1], [Extensions to ISO C99 from ISO C11.])
235 AC_DEFINE([_POSIX_SOURCE], [1], [IEEE Std 1003.1.])
236 AC_DEFINE([_POSIX_C_SOURCE], [200809L], [IEEE Std 1003.1.])
237 AC_DEFINE([_XOPEN_SOURCE], [700], [POSIX and XPG 7th edition])
238 AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1], [XPG things and X/Open Unix extensions.])
239 AC_DEFINE([_BSD_SOURCE], [1], [ISO C, POSIX, and 4.3BSD things.])
240 AC_DEFINE([_SVID_SOURCE], [1], [ISO C, POSIX, and SVID things.])
247 dnl Check if we are using the mno-cygwin mode in which case we are
248 dnl actually dealing with a mingw32 compiler.
253 SYS=mingw32, AC_MSG_ERROR([VLC requires -mno-cygwin]))
257 if test "${SYS}" = "mingw32"; then
259 LDFLAGS="${LDFLAGS} -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase"
261 AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
262 ac_default_prefix="`pwd`/_win32"
263 DESTDIR="`pwd`/_win32/"
266 dnl NSIS/MSI Installer prefix and WIN64
272 PROGRAMFILES="PROGRAMFILES64"
273 LDFLAGS="${LDFLAGS} -Wl,--high-entropy-va -Wl,--image-base,0x140000000"
277 PROGRAMFILES="PROGRAMFILES"
280 AC_SUBST(WINDOWS_ARCH)
281 AC_SUBST(PROGRAMFILES)
296 LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild -Zhigh-mem"
297 AC_LIBOBJ([freeaddrinfo])
298 AC_LIBOBJ([gai_strerror])
306 AC_ARG_ENABLE(winstore_app,
307 AS_HELP_STRING([--enable-winstore-app],
308 [Build targetted for Windows Store apps (default disabled)]))
311 AS_IF([test "${SYS}" = "mingw32"],[
313 AS_IF([test "${enable_winstore_app}" = "yes"], [
316 VLC_ADD_LIBS([libvlccore], [-lruntimeobject])
317 AC_LIBOBJ([gai_strerror])
321 AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
323 AM_CONDITIONAL(HAVE_LINUX, test "${SYS}" = "linux")
324 AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2")
326 AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
327 AM_CONDITIONAL(HAVE_IOS, test "${HAVE_IOS}" = "1")
328 AM_CONDITIONAL(HAVE_OSX, test "${HAVE_OSX}" = "1")
329 AM_CONDITIONAL(HAVE_TVOS, test "${HAVE_TVOS}" = "1")
331 AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
332 AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1") dnl Only used for the packaging
333 AM_CONDITIONAL([HAVE_WINSTORE], [test "$vlc_winstore_app" = "1"])
334 AM_CONDITIONAL([HAVE_WIN32_DESKTOP], [test "${SYS}" = "mingw32" -a "$vlc_winstore_app" = "0"])
337 dnl Sadly autoconf does not think about testing foo.exe when ask to test
338 dnl for program foo on win32
339 case "${build_os}" in
341 ac_executable_extensions=".exe"
350 AC_SUBST(BUILDEXEEXT)
352 dnl Android is linux, but a bit different
353 AS_IF([test "$SYS" = linux],[
354 AC_MSG_CHECKING([for an Android system])
355 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
356 [[#ifndef __ANDROID__
367 AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1")
369 dnl Tizen (minimum SDK version: 2.3)
370 AS_IF([test "$SYS" = linux],[
371 AC_MSG_CHECKING([for Tizen])
372 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
377 AC_DEFINE([HAVE_TIZEN_SDK], [1], [Define to 1 if vlc is built against Tizen SDK])
383 AM_CONDITIONAL(HAVE_TIZEN, test "${HAVE_TIZEN}" = "1")
386 dnl Check for the contrib directory
389 [AS_HELP_STRING([--with-contrib[=DIR]],
390 [search for 3rd party libraries in DIR/include and DIR/lib])
392 AC_MSG_CHECKING([for 3rd party libraries path])
393 AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
394 CONTRIB_DIR="${srcdir}/contrib/${host}"
395 AS_IF([test ! -d "${CONTRIB_DIR}"], [
396 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
397 CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
398 AS_IF([test ! -d "${CONTRIB_DIR}"], [
399 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
401 AC_MSG_RESULT([not found])
405 AS_IF([test "${with_contrib}" != "no"], [
406 CONTRIB_DIR="${with_contrib}"
409 AC_MSG_RESULT([disabled])
412 AS_IF([test -n "${CONTRIB_DIR}"], [
413 AS_IF([test -d "${CONTRIB_DIR}/lib"],[
414 CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
416 echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
418 AC_MSG_RESULT([not usable])
422 AS_IF([test -n "${CONTRIB_DIR}"], [
423 AC_MSG_RESULT([${CONTRIB_DIR}])
424 CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
425 CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
426 CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
427 OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include -F${CONTRIB_DIR} -F${CONTRIB_DIR}/Frameworks"
428 export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
429 LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
431 AS_IF([test -z "$LUAC"], [
432 dnl Old contribs mixed cross-tools and cross-compiled executables
433 AS_IF([test -x "${CONTRIB_DIR}/bin/luac${BUILDEXEEXT}"], [
434 LUAC="${CONTRIB_DIR}/bin/luac${BUILDEXEEXT}"
437 dnl Newer contribs follow usual name space rules
438 AS_IF([test -x "${CONTRIB_DIR}/../bin/${host_alias}-luac${BUILDEXEEXT}"], [
439 LUAC="${CONTRIB_DIR}/../bin/${host_alias}-luac${BUILDEXEEXT}"
443 AS_IF([test "${SYS}" = "darwin"], [
444 export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
445 export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
448 AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
449 AC_MSG_ERROR([Third party libraries not found!])
452 AC_SUBST(CONTRIB_DIR)
454 dnl Add extras/tools to the PATH
455 TOOLS_DIR="${srcdir}/extras/tools/build/bin"
456 AS_IF([test -d "${TOOLS_DIR}"], [
457 TOOLS_DIR=`cd "${TOOLS_DIR}" && pwd`
458 export PATH="${TOOLS_DIR}":$PATH
463 dnl It's very bad, but our former custom system was worst
467 dnl override platform specific check for dependent libraries
468 dnl otherwise libtool linking of shared libraries will
469 dnl fail on anything other than pass_all.
470 AC_CACHE_VAL(lt_cv_deplibs_check_method,
471 [lt_cv_deplibs_check_method=pass_all])
473 LT_INIT([dlopen win32-dll shared disable-static])
475 LT_LANG([Windows Resource])
479 lt_cv_deplibs_check_method=pass_all
481 AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
482 AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
488 AM_GNU_GETTEXT_VERSION([0.19.8])
489 AM_GNU_GETTEXT([external], [need-formatstring-macros])
498 AS_IF([test "${SYS}" = "mingw32"], [
500 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
501 #if !defined(__MINGW32__)
502 # error Not compiling with mingw
506 dnl Check for broken versions of mingw-runtime compatability library
507 AC_MSG_CHECKING(for broken mingw-runtime)
508 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
510 #if defined(__MINGW64_VERSION_MAJOR)
511 # if __MINGW64_VERSION_MAJOR < 3
512 # error Attempting to use mingw-runtime with broken vsnprintf support
514 #elif __MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 15
515 # error Attempting to use mingw-runtime with broken vsnprintf support
520 AC_MSG_RESULT([present])
521 AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher, or mingw-w64 version 3.0 or higher!])
524 dnl force use of mingw provided c99 *printf over msvcrt
525 CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
527 dnl Add WinMainCRTStartup entry point to show it's a WinMain application
528 VLC_ADD_LDFLAGS([vlc],[-mwindows])
530 dnl Check for the need to include the mingwex lib for mingw32
532 AC_CHECK_LIB(mingwex,opendir,
533 AC_CHECK_LIB(mingw32,opendir,,
534 [VLC_ADD_LIBS([libvlccore],[-lmingwex])])
538 AC_MSG_RESULT([Not compiling with mingw])
541 dnl Check for fnative-struct or mms-bitfields support for mingw32
543 CFLAGS="${CFLAGS} -mms-bitfields"
544 CXXFLAGS="${CXXFLAGS} -mms-bitfields"
545 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
546 [ac_cv_c_mms_bitfields],
547 [AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
548 if test "${ac_cv_c_mms_bitfields}" = "no"; then
550 CFLAGS="${CFLAGS} -fnative-struct"
551 CXXFLAGS="${CXXFLAGS} -fnative-struct"
552 AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
553 [ac_cv_c_fnative_struct],
554 [AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
555 "${ac_cv_c_fnative_struct}" = "no" && VLC_RESTORE_FLAGS
561 dnl Buggy glibc prevention. Purposedly not cached.
562 dnl See sourceware.org bugs 5058 and 5443.
563 dnl Ubuntu alone has 20 bug numbers for this...
565 AC_MSG_CHECKING(for buggy GNU/libc versions)
566 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
568 #if defined (__GLIBC__) && (__GLIBC__ == 2) \
569 && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7)
570 # error GNU/libc with dcgettext killer bug!
573 AC_MSG_RESULT([not present])
575 AC_MSG_RESULT([found])
576 AS_IF([test "x${enable_nls}" != "xno"], [
577 AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable
578 work-around for this. Check with your distribution vendor on how to update the
579 glibc run-time. Alternatively, build with --disable-nls.])
583 dnl Plugin compilation stuff
587 dnl Check for system libs needed
590 dnl Check for usual libc functions
591 AC_CHECK_FUNCS([daemon fcntl flock fstatvfs fork getenv getpwuid_r isatty lstat memalign mkostemp mmap open_memstream openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime tdestroy uselocale pthread_cond_timedwait_monotonic_np pthread_condattr_setclock])
592 AC_REPLACE_FUNCS([atof atoll dirfd fdopendir ffsll flockfile fsync getdelim getpid lldiv memrchr nrand48 poll posix_memalign recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tfind timegm timespec_get strverscmp])
593 AC_REPLACE_FUNCS([gettimeofday])
594 AC_CHECK_FUNC(fdatasync,,
595 [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
598 VLC_REPLACE_DECL([realpath], [#include <stdlib.h>])
600 dnl mingw64 implements those as static inline, not functions with C linkage
601 VLC_REPLACE_DECL([asprintf], [#include <stdio.h>])
602 VLC_REPLACE_DECL([vasprintf], [#include <stdio.h>])
603 VLC_REPLACE_DECL([gmtime_r], [#include <time.h>])
604 VLC_REPLACE_DECL([localtime_r], [#include <time.h>])
606 dnl C11 static_assert()
607 AC_MSG_CHECKING([for static_assert in assert.h])
608 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <assert.h>], [
609 static_assert(1, "The impossible happened.");
612 AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define to 1 if <assert.h> defines static_assert.])
617 # Windows CE does not have strcoll()
620 dnl Check for non-standard system calls
623 AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity recvmmsg])
626 AC_CHECK_FUNCS([_lock_file])
630 AH_BOTTOM([#include <vlc_fixups.h>])
632 dnl Check for struct pollfd
633 AC_CHECK_TYPES([struct pollfd],,,
634 [#include <sys/types.h>
637 #elif defined (_WIN32)
638 # include <winsock2.h>
642 dnl Check for struct timespec
643 AC_CHECK_TYPES([struct timespec],,,
646 dnl Check for max_align_t
647 AC_CHECK_TYPES([max_align_t],,,
648 [#include <stddef.h>])
650 dnl Checks for socket stuff
653 AC_SEARCH_LIBS(connect, [socket], [
654 AS_IF([test "$ac_cv_search_connect" != "none required"], [
655 SOCKET_LIBS="$ac_cv_search_connect"
658 AS_IF([test "${SYS}" = "mingw32"], [
659 SOCKET_LIBS="-lws2_32"
663 AC_SEARCH_LIBS([inet_pton], [nsl], [
664 AS_IF([test "$ac_cv_search_inet_pton" != "none required"], [
665 SOCKET_LIBS="$ac_cv_search_inet_pton $SOCKET_LIBS"
667 ],, [${SOCKET_LIBS}])
669 LIBS="${LIBS} ${SOCKET_LIBS}"
671 AC_LANG_PROGRAM([#ifdef _WIN32
672 # if _WIN32_WINNT < 0x600
675 #include <ws2tcpip.h>
677 #include <sys/socket.h>
678 #include <arpa/inet.h>
680 char dst[[sizeof(struct in_addr)]];
681 inet_pton(AF_INET, "127.0.0.1", dst);
682 ])],[AC_DEFINE([HAVE_INET_PTON],[1],[Define to 1 if you have inet_pton function])],[AC_LIBOBJ([inet_pton])])
683 AC_CHECK_FUNCS([if_nameindex if_nametoindex])
685 AC_SUBST(SOCKET_LIBS)
687 dnl Check for socklen_t
688 AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
689 AC_CACHE_CHECK([for socklen_t in sys/socket.h], dnl ` (fix VIM syntax highlight
690 ac_cv_type_socklen_t,
691 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
692 [#include <sys/types.h>
694 # include <winsock2.h>
695 # include <ws2tcpip.h>
697 # include <sys/socket.h>
698 #endif]], [[socklen_t len; len = 0;]])],
699 ac_cv_type_socklen_t=yes,
700 ac_cv_type_socklen_t=no)])
701 AS_IF([test "$ac_cv_type_socklen_t" = no],
702 [AC_DEFINE(socklen_t, int)])
704 dnl Check for struct sockaddr_storage
705 AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
706 AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
707 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
709 [#include <sys/types.h>
710 #if defined( _WIN32 )
711 # include <winsock2.h>
713 # include <sys/socket.h>
714 #endif], [struct sockaddr_storage addr;],
715 ac_cv_struct_sockaddr_storage=yes,
716 ac_cv_struct_sockaddr_storage=no)])
717 AS_IF([test "${ac_cv_struct_sockaddr_storage}" = no], [
718 AC_DEFINE(sockaddr_storage, sockaddr)
719 AC_DEFINE(ss_family, sa_family)
722 dnl FreeBSD has a gnugetopt library for this:
724 AC_CHECK_FUNC(getopt_long,, [
725 AC_CHECK_LIB([gnugetopt],[getopt_long], [
726 GNUGETOPT_LIBS="-lgnugetopt"
729 AC_SUBST(GNUGETOPT_LIBS)
738 AC_CHECK_LIB(m,lrintf, [
739 AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])
740 VLC_ADD_LIBS([skins2],[-lm])
743 AC_DEFINE(HAVE_NANF, 1, [Define to 1 if you have the NANF function])
745 AC_CHECK_LIB(m,sincos, [
746 AC_DEFINE(HAVE_SINCOS, 1, [Define to 1 if you have the sincos function.])
751 dnl Check for dynamic plugins
753 have_dynamic_objects="no"
755 AC_SEARCH_LIBS(dlsym, [dl svld], [
756 AS_IF([test "$ac_cv_search_dlsym" != "none required"], [
757 LIBDL="$ac_cv_search_dlsym"
759 have_dynamic_objects="yes"
764 AS_IF([test "${SYS}" = "mingw32"], [
766 have_dynamic_objects="yes" #assume we can use shared objects
769 AS_IF([test "${enable_shared}" = "no"], [
770 have_dynamic_objects=no
772 AM_CONDITIONAL(HAVE_DYNAMIC_PLUGINS, [test "${have_dynamic_objects}" != "no"])
776 dnl Check for thread library
778 AS_IF([test "${SYS}" != "mingw32"], [
781 AC_SEARCH_LIBS(pthread_rwlock_init, pthread pthreads c_r, [
782 AS_IF([test "$ac_cv_search_pthread_rwlock_init" != "none required"], [
783 LIBPTHREAD="$ac_cv_search_pthread_rwlock_init"
790 AC_SEARCH_LIBS([clock_nanosleep], [rt pthread], [
791 AS_IF([test "$ac_cv_search_clock_nanosleep" != "none required"], [
792 LIBRT="$ac_cv_search_clock_nanosleep"
795 AC_SEARCH_LIBS([nanosleep], [rt pthread posix4], [
796 AS_IF([test "$ac_cv_search_nanosleep" != "none required"], [
797 LIBRT="$ac_cv_search_nanosleep"
804 dnl Check for headers
808 AC_CHECK_HEADERS([arpa/inet.h pthread.h search.h sys/shm.h sys/socket.h sys/uio.h])
809 AC_CHECK_HEADERS([net/if.h], [], [],
811 #include <sys/types.h>
812 #include <sys/socket.h>
814 AC_CHECK_HEADER([syslog.h], [have_syslog="yes"], [have_syslog="no"])
815 AM_CONDITIONAL([HAVE_SYSLOG], [test "$have_syslog" = "yes"])
818 AC_CHECK_HEADERS([netinet/tcp.h netinet/udplite.h sys/param.h sys/mount.h])
821 AC_CHECK_HEADERS([features.h getopt.h linux/dccp.h linux/magic.h mntent.h sys/eventfd.h])
824 AC_CHECK_HEADERS([xlocale.h])
826 dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
827 AH_TEMPLATE(ssize_t, [Define to `int' if <stddef.h> does not define.]) dnl ` (fix VIM syntax highlight
828 AC_CHECK_TYPE(ssize_t,, [
829 AC_DEFINE(ssize_t, int)
832 dnl It seems that autoconf detects pkg-config only during the first
833 dnl PKG_CHECK_MODULES from configure.ac - which makes sense. But in our case,
834 dnl it is nested within a conditional block, so it was not working right.
835 dnl Make PKG_CONFIG_PATH precious so that it appears in the help and get saved
836 AC_ARG_VAR(PKG_CONFIG_PATH,
837 [Paths where to find .pc not at the default location])
838 PKG_PROG_PKG_CONFIG()
840 dnl On some OS we need static linking
841 AS_IF([test -n "${PKG_CONFIG}" ],[
842 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[
843 PKG_CONFIG="${PKG_CONFIG} --static"
849 dnl Check for zlib.h and -lz along with system -lminizip if available
851 AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ])
852 AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ])
853 if test "${have_zlib}" = "yes"
855 VLC_ADD_LIBS([sap],[-lz])
856 PKG_CHECK_MODULES([MINIZIP], [minizip] , [ have_minizip=yes ], [
857 AC_CHECK_HEADERS([unzip.h], [
859 MINIZIP_LIBS="-lminizip -lz"
865 AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
869 dnl Domain name i18n support via GNU libidn
871 PKG_CHECK_MODULES([IDN], [libidn], [
873 AC_DEFINE([HAVE_IDN], 1, [Define to 1 if you have GNU libidn.])
881 [AS_HELP_STRING([--enable-dbus],
882 [compile D-Bus message bus support (default enabled)])])
884 AS_IF([test "${enable_dbus}" != "no"], [
885 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.6.0], [
888 AS_IF([test -n "${enable_dbus}"], [
889 AC_MSG_ERROR([${DBUS_PKG_ERRORS}.])
891 AC_MSG_WARN([${DBUS_PKG_ERRORS}.])
895 AM_CONDITIONAL([HAVE_DBUS], [test "${have_dbus}" = "yes"])
898 dnl Check for systemd
899 PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [
902 AC_MSG_WARN([${SYSTEMD_PKG_ERRORS}.])
904 AM_CONDITIONAL([HAVE_SYSTEMD], [test "${have_systemd}" = "yes"])
907 dnl Check for ntohl, etc.
909 CFLAGS="${CFLAGS} -Wall -Werror"
910 AC_CACHE_CHECK([for ntohl in sys/param.h],
911 [ac_cv_c_ntohl_sys_param_h],
912 [ AC_TRY_COMPILE([#include <sys/param.h>],
913 [int meuh; ntohl(meuh);],
914 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
915 if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then
916 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
920 EXTEND_HELP_STRING([Optimization options:])
922 dnl Compiler warnings
925 RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var error-implicit-function-declaration init-self logical-op format-security])
926 RDC_PROG_CC_FLAGS([-pipe])
928 RDC_PROG_CXX_WFLAGS([all extra sign-compare undef pointer-arith volatile-register-var format-security])
935 [AS_HELP_STRING([--enable-debug],
936 [build with run-time assertions (default disabled)])],,
939 [Define to 1 if debug code should NOT be compiled])
940 AS_IF([test "${enable_debug}" != "no"], [
941 AC_CHECK_HEADERS([valgrind/valgrind.h])
950 [AS_HELP_STRING([--enable-gprof],[profile with gprof (default disabled)])],,
952 AS_IF([test "${enable_gprof}" != "no"], [
953 CFLAGS="${CFLAGS} -pg"
954 CXXFLAGS="${CXXFLAGS} -pg"
955 OBJCFLAGS="${OBJCFLAGS} -pg"
956 LDFLAGS="${LDFLAGS} -pg"
960 [AS_HELP_STRING([--enable-cprof],[profile with cprof (default disabled)])],,
962 AS_IF([test "${enable_gprof}" != "no"], [
963 CFLAGS="${CFLAGS} -finstrument-functions"
964 CXXFLAGS="${CXXFLAGS} -finstrument-functions"
965 OBJCFLAGS="${OBJCFLAGS} -finstrument-functions"
966 LDFLAGS="${LDFLAGS} -finstrument-functions"
972 AC_ARG_ENABLE(coverage,
973 [AS_HELP_STRING([--enable-coverage],
974 [build for test coverage (default disabled)])],,
975 [enable_coverage="no"])
976 AS_IF([test "${enable_coverage}" != "no"], [
977 CFLAGS="-fprofile-arcs -ftest-coverage ${CFLAGS}"
978 CXXFLAGS="-fprofile-arcs -ftest-coverage ${CXXFLAGS}"
979 LDFLAGS="-lgcov ${LDFLAGS}"
982 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "os2"], [
984 CFLAGS="${CFLAGS} -fvisibility=hidden"
985 CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
986 OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden"
987 AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden],
988 [ac_cv_c_visibility_hidden], [
989 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
990 ac_cv_c_visibility_hidden=yes
992 ac_cv_c_visibility_hidden=no
995 AS_IF([test "${ac_cv_c_visibility_hidden}" = "no"], [VLC_RESTORE_FLAGS])
1000 dnl Enable/disable optimizations
1002 AC_ARG_ENABLE(optimizations,
1003 [AS_HELP_STRING([--disable-optimizations],
1004 [disable compiler optimizations (default enabled)])],,
1005 [enable_optimizations="yes"])
1007 dnl Check for various optimization flags
1008 AS_IF([test "${enable_optimizations}" != "no"], [
1010 dnl -O3 only in production builds
1011 AS_IF([test "${enable_debug}" = "no"], [
1013 CFLAGS="${CFLAGS} -O3"
1014 CXXFLAGS="${CXXFLAGS} -O3"
1015 OBJCFLAGS="${OBJCFLAGS} -O3"
1016 AC_CACHE_CHECK([if $CC accepts -O3], [ac_cv_c_o3], [
1017 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1023 AS_IF([test "${ac_cv_c_o3}" = "no"], [VLC_RESTORE_FLAGS])
1026 dnl Check for fast maths
1027 RDC_PROG_CC_FFLAGS([no-math-errno unsafe-math-optimizations no-rounding-math no-signaling-nans cx-limited-range])
1029 RDC_PROG_CXX_FFLAGS([no-math-errno unsafe-math-optimizations no-rounding-math no-signaling-nans cx-limited-range])
1033 #if defined(_MSC_VER) && !defined(__clang__)
1034 # pragma fenv_access(off)
1035 # pragma fp_contract(on)
1036 #elif defined(__GNUC__)
1037 /* Not supported so far */
1039 # pragma STDC FENV_ACCESS OFF
1040 # pragma STDC FP_CONTRACT ON
1044 dnl Check for -funroll-loops
1046 CFLAGS="${CFLAGS} -funroll-loops"
1047 CXXFLAGS="${CXXFLAGS} -funroll-loops"
1048 OBJCFLAGS="${OBJCFLAGS} -funroll-loops"
1049 AC_CACHE_CHECK([if $CC accepts -funroll-loops], [ac_cv_c_unroll_loops], [
1050 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1051 ac_cv_c_unroll_loops=yes
1053 ac_cv_c_unroll_loops=no
1056 AS_IF([test "${ac_cv_c_unroll_loops}" = "no"], [VLC_RESTORE_FLAGS])
1058 AS_IF([test "$enable_debug" = "no"], [
1059 dnl Check for -fomit-frame-pointer
1061 CFLAGS="${CFLAGS} -fomit-frame-pointer"
1062 CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer"
1063 OBJCFLAGS="${OBJCFLAGS} -fomit-frame-pointer"
1064 AC_CACHE_CHECK([if $CC accepts -fomit-frame-pointer],
1065 [ac_cv_c_omit_frame_pointer], [
1066 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1067 ac_cv_c_omit_frame_pointer=yes
1069 ac_cv_c_omit_frame_pointer=no
1072 AS_IF([test "${ac_cv_c_omit_frame_pointer}" = "no"], [VLC_RESTORE_FLAGS])
1077 LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic"
1078 AC_CACHE_CHECK([if linker supports -Bsymbolic], [ac_cv_ld_bsymbolic], [
1080 ac_cv_ld_bsymbolic="-Wl,-Bsymbolic"
1082 ac_cv_ld_bsymbolic=""
1086 SYMBOLIC_LDFLAGS="${ac_cv_ld_bsymbolic}"
1087 AC_SUBST(SYMBOLIC_LDFLAGS)
1090 LDFLAGS="${LDFLAGS} -Wl,-z,defs"
1091 AC_CACHE_CHECK([if linker supports -z,defs], [ac_cv_ld_z_defs], [
1093 ac_cv_ld_z_defs="yes"
1095 ac_cv_ld_z_defs="no"
1098 AS_IF([test "${ac_cv_ld_z_defs}" = "no"], [VLC_RESTORE_FLAGS])
1100 dnl Check for __attribute__((packed))
1101 AC_CACHE_CHECK([for __attribute__((packed))],
1102 [ac_cv_c_attribute_packed],
1103 [ac_cv_c_attribute_packed=no
1104 AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b; (void)b;],
1105 [ac_cv_c_attribute_packed=yes])])
1106 if test "${ac_cv_c_attribute_packed}" != "no"; then
1107 AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
1113 case "${host_cpu}" in
1122 dnl Check for backtrace() support
1123 AC_CHECK_HEADERS(execinfo.h)
1124 AC_CHECK_FUNCS(backtrace)
1129 ALIASES="${ALIASES} cvlc rvlc"
1132 dnl Accelerated modules
1135 dnl Check for fully working MMX intrinsics
1136 dnl We need support for -mmmx, we need <mmintrin.h>, and we also need a
1137 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1139 [AS_HELP_STRING([--disable-mmx],
1140 [disable MMX optimizations (default auto)])],,[
1141 case "${host_cpu}" in
1152 AS_IF([test "${enable_mmx}" != "no"], [
1155 CFLAGS="${CFLAGS} -mmmx"
1156 AC_CACHE_CHECK([if $CC groks MMX intrinsics], [ac_cv_c_mmx_intrinsics], [
1157 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1158 [#include <mmintrin.h>
1160 uint64_t frobzor;]], [
1162 a = b = c = (__m64)frobzor;
1163 a = _mm_slli_pi16(a, 3);
1164 a = _mm_adds_pi16(a, b);
1165 c = _mm_srli_pi16(c, 8);
1166 c = _mm_slli_pi16(c, 3);
1167 b = _mm_adds_pi16(b, c);
1168 a = _mm_unpacklo_pi8(a, b);
1169 frobzor = (uint64_t)a;]])], [
1170 ac_cv_c_mmx_intrinsics=yes
1172 ac_cv_c_mmx_intrinsics=no
1176 AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
1177 AC_DEFINE(HAVE_MMX_INTRINSICS, 1, [Define to 1 if MMX intrinsics are available.])
1181 CFLAGS="${CFLAGS} -mmmx"
1182 AC_CACHE_CHECK([if $CC groks MMX inline assembly], [ac_cv_mmx_inline], [
1183 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1185 asm volatile("packuswb %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1188 ac_cv_mmx_inline=yes
1193 AS_IF([test "${ac_cv_mmx_inline}" != "no"], [
1194 AC_DEFINE(CAN_COMPILE_MMX, 1, [Define to 1 inline MMX assembly is available.])
1198 AC_CACHE_CHECK([if $CC groks MMX EXT inline assembly],
1199 [ac_cv_mmxext_inline], [
1200 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1202 asm volatile("maskmovq %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1205 ac_cv_mmxext_inline=yes
1207 ac_cv_mmxext_inline=no
1211 AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
1212 AC_DEFINE(CAN_COMPILE_MMXEXT, 1, [Define to 1 if MMX EXT inline assembly is available.])
1216 AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
1217 AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
1219 dnl Check for fully workin SSE2 intrinsics
1220 dnl We need support for -mmmx, we need <emmintrin.h>, and we also need a
1221 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1223 [AS_HELP_STRING([--disable-sse],
1224 [disable SSE (1-4) optimizations (default auto)])],, [
1225 case "${host_cpu}" in
1235 AS_IF([test "${enable_sse}" != "no"], [
1236 ARCH="${ARCH} sse sse2"
1239 CFLAGS="${CFLAGS} -msse2"
1240 AC_CACHE_CHECK([if $CC groks SSE2 intrinsics], [ac_cv_c_sse2_intrinsics], [
1241 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1242 [#include <emmintrin.h>
1244 uint64_t frobzor;]], [
1246 a = b = c = _mm_set1_epi64((__m64)frobzor);
1247 a = _mm_slli_epi16(a, 3);
1248 a = _mm_adds_epi16(a, b);
1249 c = _mm_srli_epi16(c, 8);
1250 c = _mm_slli_epi16(c, 3);
1251 b = _mm_adds_epi16(b, c);
1252 a = _mm_unpacklo_epi8(a, b);
1253 frobzor = (uint64_t)_mm_movepi64_pi64(a);]])], [
1254 ac_cv_c_sse2_intrinsics=yes
1256 ac_cv_c_sse2_intrinsics=no
1260 AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
1261 AC_DEFINE(HAVE_SSE2_INTRINSICS, 1, [Define to 1 if SSE2 intrinsics are available.])
1265 CFLAGS="${CFLAGS} -msse"
1266 AC_CACHE_CHECK([if $CC groks SSE inline assembly], [ac_cv_sse_inline], [
1267 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1269 asm volatile("xorps %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1272 ac_cv_sse_inline=yes
1278 AS_IF([test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "solaris"], [
1279 AC_DEFINE(CAN_COMPILE_SSE, 1, [Define to 1 if SSE inline assembly is available.])
1282 AC_CACHE_CHECK([if $CC groks SSE2 inline assembly], [ac_cv_sse2_inline], [
1283 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1285 asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1288 ac_cv_sse2_inline=yes
1290 ac_cv_sse2_inline=no
1293 AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [
1294 AC_DEFINE(CAN_COMPILE_SSE2, 1, [Define to 1 if SSE2 inline assembly is available.])
1299 AC_CACHE_CHECK([if $CC groks SSE3 inline assembly], [ac_cv_sse3_inline], [
1300 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1302 asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1305 ac_cv_sse3_inline=yes
1307 ac_cv_sse3_inline=no
1311 AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
1312 AC_DEFINE(CAN_COMPILE_SSE3, 1, [Define to 1 if SSE3 inline assembly is available.]) ])
1314 AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly], [ac_cv_ssse3_inline], [
1315 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1317 asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p):"xmm0");
1320 ac_cv_ssse3_inline=yes
1322 ac_cv_ssse3_inline=no
1326 AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
1327 AC_DEFINE(CAN_COMPILE_SSSE3, 1, [Define to 1 if SSSE3 inline assembly is available.]) ])
1330 AC_CACHE_CHECK([if $CC groks SSE4.1 inline assembly],
1331 [ac_cv_sse4_1_inline], [
1332 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1334 asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1337 ac_cv_sse4_1_inline=yes
1339 ac_cv_sse4_1_inline=no
1343 AS_IF([test "${ac_cv_sse4_1_inline}" != "no"], [
1344 AC_DEFINE(CAN_COMPILE_SSE4_1, 1, [Define to 1 if SSE4_1 inline assembly is available.]) ])
1347 AC_CACHE_CHECK([if $CC groks SSE4.2 inline assembly],
1348 [ac_cv_sse4_2_inline], [
1349 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1351 asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1354 ac_cv_sse4_2_inline=yes
1356 ac_cv_sse4_2_inline=no
1360 AS_IF([test "${ac_cv_sse4_2_inline}" != "no"], [
1361 AC_DEFINE(CAN_COMPILE_SSE4_2, 1, [Define to 1 if SSE4_2 inline assembly is available.]) ])
1364 AC_CACHE_CHECK([if $CC groks SSE4A inline assembly], [ac_cv_sse4a_inline], [
1365 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1367 asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1370 ac_cv_sse4a_inline=yes
1372 ac_cv_sse4a_inline=no
1376 AS_IF([test "${ac_cv_sse4a_inline}" != "no"], [
1377 AC_DEFINE(CAN_COMPILE_SSE4A, 1, [Define to 1 if SSE4A inline assembly is available.]) ])
1379 AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
1382 CFLAGS="${CFLAGS} -mmmx"
1384 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], [
1385 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1387 asm volatile("pfadd %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1390 ac_cv_3dnow_inline=yes
1392 ac_cv_3dnow_inline=no
1396 AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
1397 AC_DEFINE(CAN_COMPILE_3DNOW, 1,
1398 [Define to 1 if 3D Now! inline assembly is available.])
1401 AM_CONDITIONAL([HAVE_3DNOW], [test "$have_3dnow" = "yes"])
1405 [AS_HELP_STRING([--disable-neon],
1406 [disable NEON optimizations (default auto)])],, [
1407 AS_IF([test "${host_cpu}" = "arm"], [enable_neon="yes"] ,[enable_neon="no"])
1409 AS_IF([test "${enable_neon}" != "no"], [
1411 CFLAGS="${CFLAGS} -mfpu=neon -mhard-float"
1412 AC_CACHE_CHECK([if $CCAS groks ARM NEON assembly], [ac_cv_arm_neon], [
1415 asm volatile("vqmovun.s64 d0, q1":::"d0");
1418 ac_cv_arm_neon="yes"
1425 AM_CONDITIONAL(HAVE_NEON, [test "${ac_cv_arm_neon}" = "yes"])
1427 AC_ARG_ENABLE(arm64,
1428 [AS_HELP_STRING([--disable-arm64],
1429 [disable arm 64-bit optimizations (default auto)])],, [
1430 AS_IF([test "${host_cpu}" = "aarch64"], [enable_arm64="yes"] ,[enable_arm64="no"])
1432 AS_IF([test "${enable_arm64}" != "no"], [
1433 AC_CACHE_CHECK([if $CCAS groks ARM 64 SIMD assembly], [ac_cv_arm64], [
1436 asm volatile("uhadd v0.8b, v0.8b, v1.8b":::"v0");
1445 AM_CONDITIONAL(HAVE_ARM64, [test "${ac_cv_arm64}" = "yes"])
1448 AC_ARG_ENABLE(altivec,
1449 [AS_HELP_STRING([--disable-altivec],
1450 [disable AltiVec optimizations (default auto)])],, [
1451 AS_CASE("${host_cpu}", [powerpc*],
1452 [enable_altivec=yes], [enable_altivec=no])
1456 AS_IF([test "${enable_altivec}" = "yes"], [
1457 ARCH="${ARCH} altivec";
1459 AC_CACHE_CHECK([if $CC groks AltiVec inline assembly],
1460 [ac_cv_altivec_inline],
1461 [AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1462 ac_cv_altivec_inline="yes",
1463 [CFLAGS="${CFLAGS} -Wa,-maltivec"
1464 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1465 [ac_cv_altivec_inline="-Wa,-maltivec"],
1466 ac_cv_altivec_inline=no)
1469 AS_IF([test "${ac_cv_altivec_inline}" != "no"], [
1470 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1,
1471 [Define to 1 if AltiVec inline assembly is available.])
1472 AS_IF([test "${ac_cv_altivec_inline}" != "yes"], [
1473 ALTIVEC_CFLAGS="${ac_cv_altivec_inline}"
1474 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}])
1480 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
1481 [ac_cv_c_altivec], [
1482 CFLAGS="${CFLAGS} -maltivec"
1483 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1484 [#include <altivec.h>]], [
1485 [vec_ld(0, (unsigned char *)0);]])], [
1486 ac_cv_c_altivec="-maltivec"
1488 ac_cv_c_altivec="no"
1492 AS_IF([test "${ac_cv_c_altivec}" != "no"], [
1493 CPPFLAGS="${CPPFLAGS} ${ac_cv_c_altivec}"
1494 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, [Define to 1 if C AltiVec extensions are available.])
1495 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_c_altivec}])
1496 ALTIVEC_CFLAGS="$ALTIVEC_CFLAGS ${ac_cv_c_altivec}"
1497 VLC_ADD_CFLAGS([deinterlace],[${ac_cv_c_altivec}])
1500 AC_CHECK_HEADERS(altivec.h)
1503 LDFLAGS="${LDFLAGS} -Wl,-framework,vecLib"
1504 AC_CACHE_CHECK([if linker needs -framework vecLib],
1506 [AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)])
1508 AS_IF([test "${ac_cv_ld_altivec}" != "no"], [
1509 VLC_ADD_LIBS([libvlccore],[-Wl,-framework,vecLib])
1512 AC_SUBST(ALTIVEC_CFLAGS)
1513 AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])
1518 AC_ARG_ENABLE(optimize-memory,
1519 [AS_HELP_STRING([--enable-optimize-memory],
1520 [optimize memory usage over performance])])
1521 if test "${enable_optimize_memory}" = "yes"; then
1522 AC_DEFINE(OPTIMIZE_MEMORY, 1, Define if you want to optimize memory usage over performance)
1526 dnl Allow running as root (useful for people running on embedded platforms)
1528 AC_ARG_ENABLE(run-as-root,
1529 [AS_HELP_STRING([--enable-run-as-root],
1530 [allow running VLC as root (default disabled)])])
1531 AS_IF([test "${enable_run_as_root}" = "yes"],[
1532 AC_DEFINE(ALLOW_RUN_AS_ROOT, 1,
1533 [Define to 1 to allow running VLC as root (uid 0).])
1540 [AS_HELP_STRING([--disable-sout],
1541 [disable streaming output (default enabled)])])
1542 AS_IF([test "${enable_sout}" != "no"], [
1543 AC_DEFINE(ENABLE_SOUT, 1, [Define to 1 for stream output support.])
1545 AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"])
1549 [AS_HELP_STRING([--disable-lua],
1550 [disable LUA scripting support (default enabled)])])
1551 if test "${enable_lua}" != "no"
1553 PKG_CHECK_MODULES(LUA, lua5.2,
1556 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead])
1558 PKG_CHECK_MODULES(LUA, lua5.1,
1561 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
1562 PKG_CHECK_MODULES(LUA, lua >= 5.1,
1565 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
1567 AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
1570 AC_CHECK_LIB( lua5.2 , luaL_newstate,
1571 [LUA_LIBS="-llua5.2"],
1572 AC_CHECK_LIB( lua5.1 , luaL_newstate,
1573 [LUA_LIBS="-llua5.1"],
1574 AC_CHECK_LIB( lua51 , luaL_newstate,
1575 [LUA_LIBS="-llua51"],
1576 AC_CHECK_LIB( lua , luaL_newstate,
1584 if test "x${have_lua}" != "xyes" ; then
1585 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.])
1587 AC_ARG_VAR([LUAC], [LUA byte compiler])
1588 AS_IF([test -z "$LUAC"], [
1589 AC_CHECK_TOOL(LUAC, [luac], [false])
1591 AS_IF([test "${LUAC}" = "false"], [
1592 AC_MSG_ERROR([Could not find the LUA byte compiler.])
1594 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], [
1595 AC_MSG_ERROR([You need 32-bits luac when using lua from contrib.])
1598 AM_CONDITIONAL(BUILD_LUA, [test "${have_lua}" = "yes"])
1604 AC_ARG_ENABLE(httpd,
1605 [AS_HELP_STRING([--disable-httpd],
1606 [disable the built-in HTTP server (default enabled)])])
1607 if test "${enable_httpd}" != "no"
1609 AC_DEFINE(ENABLE_HTTPD, 1, Define if you want the HTTP daemon support)
1611 AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"])
1615 dnl VideoLAN manager
1618 [AS_HELP_STRING([--disable-vlm],
1619 [disable the stream manager (default enabled)])],,
1620 [enable_vlm="${enable_sout}"])
1621 AS_IF([test "${enable_vlm}" != "no"], [
1622 AS_IF([test "${enable_sout}" = "no"], [
1623 AC_MSG_ERROR([VLM requires the stream output. Do not use --disable-sout.])
1625 AC_DEFINE(ENABLE_VLM, 1, [Define if you want the VideoLAN manager support])
1627 AM_CONDITIONAL([ENABLE_VLM], [test "${enable_vlm}" != "no"])
1631 dnl Addons manager storage and repositories modules
1633 AC_ARG_ENABLE(addonmanagermodules,
1634 [AS_HELP_STRING([--disable-addonmanagermodules],
1635 [disable the addons manager modules (default enabled)])])
1636 if test "${enable_addonmanagermodules}" != "no"
1638 AC_DEFINE(ENABLE_ADDONMANAGERMODULES, 1, [Define if you want the addons manager modules])
1640 AM_CONDITIONAL([ENABLE_ADDONMANAGERMODULES], [test "${enable_addonmanagermodules}" != "no"])
1647 EXTEND_HELP_STRING([Input plugins:])
1650 dnl libarchive access module
1652 PKG_ENABLE_MODULES_VLC([ARCHIVE], [archive], [libarchive >= 3.1.0], (libarchive support), [auto])
1657 AC_ARG_ENABLE(live555,
1658 [AS_HELP_STRING([--enable-live555],
1659 [enable RTSP input through live555 (default enabled)])])
1661 AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
1662 PKG_CHECK_MODULES(LIVE555, live555, [
1663 VLC_ADD_PLUGIN([live555])
1664 VLC_ADD_CXXFLAGS([live555], [$LIVE555_CFLAGS])
1665 VLC_ADD_LIBS([live555],[$LIVE555_LIBS])
1667 AC_MSG_WARN([${LIVE555_PKG_ERRORS}.])
1672 dnl detect include paths
1673 AS_IF([test -f "${CONTRIB_DIR}/include/UsageEnvironment/UsageEnvironment.hh"], [
1674 CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
1676 AS_IF([test "${SYS}" != "os2"], [
1677 LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"}
1678 CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment"
1680 LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"}
1681 CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include"
1682 LDFLAGS_live555="-L${LIVE555_PREFIX}/liveMedia -L${LIVE555_PREFIX}/groupsock -L${LIVE555_PREFIX}/BasicUsageEnvironment -L${LIVE555_PREFIX}/UsageEnvironment"
1687 AS_IF([test "${SYS}" = "solaris"], [
1688 CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
1690 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
1691 LDFLAGS="${LDFLAGS} ${LDFLAGS_live555}"
1694 AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [
1695 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
1696 [#include <liveMedia_version.hh>
1697 #if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1324598400)
1707 AS_IF([test "$ac_cv_live555" = "no"], [
1708 AC_MSG_WARN([live555 is missing or its installed version is too old:
1709 Version 2011.12.23 or later is required to proceed.
1710 You can get an updated one from http://www.live555.com/liveMedia .])
1711 AS_IF([test -n "${enable_live555}"], [
1712 AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
1715 other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
1716 other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
1717 AS_IF([test "${SYS}" = "mingw32"], [
1718 # add ws2_32 for closesocket, select, recv
1719 other_libs="$other_libs -lws2_32"
1722 dnl We need to check for pic because live555 don't provide shared libs
1723 dnl and we want to build a plugins so we need -fPIC on some arch.
1724 VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
1725 VLC_ADD_LDFLAGS([live555], [${LDFLAGS_live555}])
1726 AC_CHECK_LIB(liveMedia_pic, main, [
1727 VLC_ADD_PLUGIN([live555])
1728 VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
1730 AC_CHECK_LIB(liveMedia, main, [
1731 VLC_ADD_PLUGIN([live555])
1732 VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
1733 ],[],[${other_libs}])
1734 ],[${other_libs_pic}])
1742 dnl IIDC and DV FireWire input modules
1744 PKG_ENABLE_MODULES_VLC([DC1394], [], [libdc1394-2 >= 2.1.0], [IIDC FireWire input module], [auto])
1745 PKG_ENABLE_MODULES_VLC([DV1394], [], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV FireWire input module], [auto])
1748 dnl - linsys modules: access module check for libzvbi
1750 AC_ARG_ENABLE(linsys,
1751 [AS_HELP_STRING([--enable-linsys],
1752 [Linux Linear Systems Ltd. SDI and HD-SDI input cards (default enabled)])])
1753 AS_IF([test "$SYS" = "linux" -a "${enable_linsys}" != "no"], [
1754 VLC_ADD_PLUGIN([linsys_hdsdi])
1755 PKG_CHECK_MODULES(LINSYS_SDI, [zvbi-0.2 >= 0.2.28], [
1756 VLC_ADD_PLUGIN([linsys_sdi])
1758 AC_MSG_WARN([${LINSYS_SDI_PKG_ERRORS}.])
1763 dnl dvdread module: check for libdvdread
1765 PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread > 4.9.0], [dvdread input module], [auto])
1768 dnl libdvdnav plugin
1770 PKG_ENABLE_MODULES_VLC([DVDNAV], [], [dvdnav > 4.9.0], [DVD with navigation input module (dvdnav)], [auto])
1771 AS_IF([test "${enable_dvdnav}" != "no"], [
1772 AC_MSG_CHECKING(for dvdnav_stream_cb in dvdnav/dvdnav.h)
1773 AC_EGREP_HEADER(dvdnav_stream_cb,dvdnav/dvdnav.h,[
1775 AC_DEFINE(HAVE_STREAM_CB_IN_DVDNAV_H, 1, For dvdnav demux support)
1782 dnl Blu-ray Disc Support with libbluray
1784 PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.6.2], (libbluray for Blu-ray disc support ) )
1787 dnl OpenCV wrapper and example filters
1789 PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv > 2.0], (OpenCV (computer vision) filter), [auto])
1793 dnl libsmbclient plugin
1795 PKG_ENABLE_MODULES_VLC([SMBCLIENT], [smb], [smbclient], (SMB/CIFS support), [auto])
1796 AS_IF([test "${SYS}" = "mingw32" -a "${enable_winstore_app}" != "yes"], [ VLC_ADD_PLUGIN([smb]) ])
1799 dnl liBDSM access module
1801 PKG_ENABLE_MODULES_VLC([DSM], [dsm], [libdsm >= 0.2.0], [libdsm SMB/CIFS access/sd module], [auto])
1804 dnl sftp access support
1806 PKG_ENABLE_MODULES_VLC([SFTP], [sftp], [libssh2], (support SFTP file transfer via libssh2), [auto])
1809 dnl nfs access support
1811 PKG_ENABLE_MODULES_VLC([NFS], [nfs], [libnfs >= 1.10.0], (support nfs protocol via libnfs), [auto])
1816 AC_ARG_ENABLE(v4l2, [AS_HELP_STRING([--disable-v4l2],
1817 [disable Video4Linux version 2 (default auto)])])
1819 AS_IF([test "$enable_v4l2" != "no"], [
1820 AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
1824 AM_CONDITIONAL(HAVE_V4L2, [test "${have_v4l2}" != "no"])
1827 dnl special access module for Blackmagic SDI cards
1829 AC_ARG_ENABLE(decklink,
1830 [AS_HELP_STRING([--disable-decklink],
1831 [disable Blackmagic DeckLink SDI input (default auto)])])
1832 AC_ARG_WITH(decklink_sdk,
1833 [AS_HELP_STRING[--with-decklink-sdk=DIR],
1834 [ location of Blackmagic DeckLink SDI SDK])])
1836 if test "${enable_decklink}" != "no"
1838 if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}"
1840 VLC_ADD_CPPFLAGS([decklink decklinkoutput],[-I${with_decklink_sdk}/include])
1843 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_decklink}"
1845 AC_CHECK_HEADERS(DeckLinkAPIDispatch.cpp, [
1848 AC_MSG_WARN(Blackmagic DeckLink SDI include files not found, decklink disabled)
1853 AM_CONDITIONAL(HAVE_DECKLINK, [ test "${have_decklink}" != "no" ])
1857 dnl Built-in CD-DA and VCD module
1860 [AS_HELP_STRING([--disable-vcd],
1861 [disable built-in VCD and CD-DA support (default enabled)])])
1863 AC_ARG_ENABLE(libcddb,
1864 [AS_HELP_STRING([--disable-libcddb],
1865 [disable CDDB for Audio CD (default enabled)])])
1867 if test "${enable_vcd}" != "no"
1869 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
1870 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1872 VLC_ADD_PLUGIN([vcd cdda])
1877 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
1878 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1880 VLC_ADD_PLUGIN([vcd cdda])
1881 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1886 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
1887 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1889 VLC_ADD_PLUGIN([vcd cdda])
1890 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1895 if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32" -o "${SYS}" = "os2" -o "${SYS}" = "darwin"
1897 VLC_ADD_PLUGIN([vcd cdda])
1900 if test "$enable_libcddb" != "no"; then
1901 PKG_CHECK_MODULES(LIBCDDB, [libcddb >= 0.9.5], [
1903 AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed])
1904 VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS])
1905 VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
1907 [AC_MSG_WARN([${LIBCDDB_PKG_ERRORS}: CDDB access disabled.])
1915 AC_CACHE_CHECK([for Linux DVB version 5.1], [ac_cv_linux_dvb_5_1], [
1916 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
1917 [#include <linux/dvb/version.h>
1918 #if (DVB_API_VERSION < 5)
1919 # error Linux DVB API v3.2 and older are not supported.
1921 #if (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR < 1)
1922 # error Linux DVB API v5.0 is unsupported. Please update.
1925 ac_cv_linux_dvb_5_1=yes
1927 ac_cv_linux_dvb_5_1=no
1929 AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_dvb_5_1" = "yes"])
1932 dnl Screen capture module
1934 AC_ARG_ENABLE(screen,
1935 [AS_HELP_STRING([--enable-screen],
1936 [disable screen capture (default enabled)])])
1937 if test "${enable_screen}" != "no"; then
1938 if test "${SYS}" = "darwin"; then
1939 AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, [
1940 VLC_ADD_PLUGIN([screen])
1944 AM_CONDITIONAL(HAVE_MAC_SCREEN, [test "${SYS}" = "darwin" -a "x${enable_screen}" != "xno"])
1947 dnl VNC/RFB access module
1949 PKG_ENABLE_MODULES_VLC([VNC], [vnc], [libvncclient >= 0.9.9], (VNC/rfb client support), [auto])
1951 dnl RDP/Remote Desktop access module
1953 PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp >= 1.0.1], (RDP/Remote Desktop client support) )
1956 dnl Real RTSP plugin
1958 AC_ARG_ENABLE(realrtsp,
1959 [ --enable-realrtsp Real RTSP module (default disabled)])
1960 if test "${enable_realrtsp}" = "yes"; then
1961 VLC_ADD_PLUGIN([access_realrtsp])
1966 AC_ARG_ENABLE(macosx-qtkit,
1967 [ --enable-macosx-qtkit Mac OS X qtsound (audio) module (default enabled on Mac OS X <= v10.11)])
1968 if test "x${enable_macosx_qtkit}" != "xno" &&
1969 (test "${SYS}" = "darwin" || test "${enable_macosx_qtkit}" = "yes")
1971 AC_CHECK_HEADERS(QTKit/QTKit.h, [
1972 VLC_ADD_PLUGIN([qtsound])
1978 AC_SUBST(have_avfoundation, ["no"])
1979 AC_ARG_ENABLE(macosx-avfoundation,
1980 [ --enable-macosx-avfoundation Mac OS X avcapture (video) module (default enabled on Mac OS X)])
1981 if test "x${enable_macosx_avfoundation}" != "xno" &&
1982 (test "${SYS}" = "darwin" || test "${enable_macosx_avfoundation}" = "yes")
1984 SAVED_LIBS="${LIBS}"
1985 LIBS="-framework AVFoundation"
1986 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[have_avfoundation=yes],[have_avfoundation=no])
1987 LIBS="${SAVED_LIBS}"
1988 if test "${have_avfoundation}" != "no"
1990 VLC_ADD_PLUGIN([avcapture])
1993 AM_CONDITIONAL(HAVE_AVFOUNDATION, [test "${have_avfoundation}" != "no"])
1996 dnl DCP plugin (using asdcplib)
1998 PKG_WITH_MODULES([ASDCP], [asdcplib], [have_asdcp="yes"])
1999 AM_CONDITIONAL(HAVE_ASDCP, [test "${have_asdcp}" = "yes"])
2005 EXTEND_HELP_STRING([Mux/Demux plugins:])
2008 dnl libdvbpsi check for ts mux/demux
2011 PKG_WITH_MODULES([DVBPSI], [libdvbpsi >= 1.2.0], [have_dvbpsi="yes"])
2012 AM_CONDITIONAL(HAVE_DVBPSI, [test "${have_dvbpsi}" = "yes"])
2016 dnl GME demux plugin
2019 [AS_HELP_STRING([--enable-gme],
2020 [use Game Music Emu (default auto)])])
2021 AS_IF([test "${enable_gme}" != "no"], [
2022 AC_CHECK_HEADER([gme/gme.h], [
2023 VLC_ADD_LIBS([gme], [-lgme])
2024 VLC_ADD_PLUGIN([gme])
2026 AS_IF([test "x${enable_gme}" != "x"], [
2027 AC_MSG_ERROR([GME cannot be found. Please install the development files.])
2037 [AS_HELP_STRING([--enable-sid],[C64 sid demux support (default auto)])])
2038 AS_IF([test "${enable_sid}" != "no"], [
2039 PKG_CHECK_MODULES(SID, [libsidplay2], [
2041 oldCPPFLAGS="$CPPFLAGS"
2042 CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
2043 AC_CHECK_HEADER([sidplay/builders/resid.h], [
2044 VLC_ADD_PLUGIN([sid])
2045 VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
2046 VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
2048 AS_IF([test -n "${enable_sid}"],
2049 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2050 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2053 CPPFLAGS="$oldCPPFLAGS"
2056 AS_IF([test "x${enable_sid}" = "xyes"],
2057 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2058 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2065 dnl ogg demux plugin
2067 PKG_ENABLE_MODULES_VLC([OGG], [mux_ogg], [ogg >= 1.0], [Ogg demux support], [auto])
2068 PKG_CHECK_MODULES(LIBVORBIS, [vorbis >= 1.1], [
2069 AC_DEFINE(HAVE_LIBVORBIS, 1, [Define to 1 if you have the libvorbis])
2071 PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto], [${LIBVORBIS_CFLAGS}], [${LIBVORBIS_LIBS}])
2072 if test "${enable_sout}" != "no"; then
2073 dnl Check for libshout
2074 PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
2078 dnl matroska demux plugin
2080 PKG_ENABLE_MODULES_VLC([MATROSKA], [mkv], [libebml libmatroska], [MKV format support], [auto])
2083 dnl modplug demux plugin
2086 [AS_HELP_STRING([--disable-mod],
2087 [do not use libmodplug (default auto)])])
2088 if test "${enable_mod}" != "no" ; then
2089 PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [
2090 VLC_ADD_PLUGIN([mod])
2091 VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
2092 VLC_ADD_CFLAGS([mod],[$LIBMODPLUG_CFLAGS]) #modules/demux/mod.c needs CFLAGS_mod, not CXXFLAGS_mod
2093 VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
2095 AS_IF([test -n "${enable_mod}"],
2096 [AC_MSG_ERROR([${LIBMODPLUG_PKG_ERRORS}.])],
2097 [AC_MSG_WARN([${LIBMODPLUG_PKG_ERRORS}.])])
2102 dnl mpc demux plugin
2105 [AS_HELP_STRING([--disable-mpc], [do not use libmpcdec (default auto)])])
2106 if test "${enable_mpc}" != "no"
2108 AC_CHECK_HEADERS([mpc/mpcdec.h], [
2109 VLC_ADD_PLUGIN([mpc])
2110 VLC_ADD_LIBS([mpc],[-lmpcdec])],
2111 [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
2112 VLC_ADD_PLUGIN([mpc])
2113 VLC_ADD_LIBS([mpc],[-lmpcdec])])])
2120 EXTEND_HELP_STRING([Codec plugins:])
2125 AC_ARG_ENABLE(wma-fixed,
2126 [ --enable-wma-fixed libwma-fixed module (default disabled)])
2127 if test "${enable_wma_fixed}" = "yes"
2129 VLC_ADD_PLUGIN([wma_fixed])
2133 dnl shine encoder plugin
2135 PKG_ENABLE_MODULES_VLC([SHINE], [], [shine >= 3.0.0], [MPEG Audio Layer 3 encoder], [auto], [], [], [])
2139 dnl openmax il codec plugin
2141 AC_ARG_ENABLE(omxil,
2142 [ --enable-omxil openmax il codec module (default disabled)])
2143 if test "${enable_omxil}" = "yes"
2145 VLC_ADD_PLUGIN([omxil])
2149 dnl openmax il vout plugin
2151 AC_ARG_ENABLE(omxil-vout,
2152 [ --enable-omxil-vout openmax il video output module (default disabled)])
2153 if test "${enable_omxil_vout}" = "yes"
2155 VLC_ADD_PLUGIN([omxil_vout])
2159 dnl raspberry pi openmax il configuration
2161 AC_ARG_ENABLE(rpi-omxil,
2162 [ --enable-rpi-omxil openmax il configured for raspberry pi (default disabled)])
2163 if test "${enable_rpi_omxil}" = "yes"
2165 VLC_ADD_PLUGIN([omxil omxil_vout])
2166 VLC_ADD_CFLAGS([omxil omxil_vout],[-DRPI_OMX])
2170 dnl CrystalHD codec plugin
2172 AC_ARG_ENABLE(crystalhd,
2173 [ --enable-crystalhd crystalhd codec plugin (default auto)])
2174 if test "${enable_crystalhd}" != "no"; then
2175 AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [
2176 VLC_ADD_PLUGIN([crystalhd])
2177 VLC_ADD_LIBS([crystalhd], [-lcrystalhd])
2179 if test "${SYS}" = "mingw32" ; then
2180 AC_CHECK_HEADERS(libcrystalhd/bc_dts_defs.h, [
2181 VLC_ADD_PLUGIN([crystalhd])
2182 AC_CHECK_HEADERS(libcrystalhd/bc_drv_if.h, [
2183 VLC_ADD_LIBS([crystalhd], [-lbcmDIL])
2186 AS_IF([test x"${enable_crystalhd}" = "xyes"],
2187 [AC_MSG_ERROR("Could not find CrystalHD development headers")],
2188 [AC_MSG_WARN("Could not find CrystalHD development headers")])
2189 ],[#define __LINUX_USER__
2190 #include <libcrystalhd/bc_dts_types.h>
2194 #include <libcrystalhd/bc_dts_types.h>
2205 AC_ARG_WITH(mad, [ --with-mad=PATH path to libmad], [
2210 AS_IF([test "${with_mad}" != "no"], [
2211 MAD_CFLAGS="-I${with_mad}/include"
2212 MAD_LIBS="-L${with_mad}/lib"
2216 [ --enable-mad libmad module (default enabled)])
2217 AS_IF([test "${enable_mad}" != "no"], [
2219 CPPFLAGS="${CPPFLAGS} ${MAD_CFLAGS}"
2220 LDFLAGS="${LDFLAGS} ${MAD_LIBS}"
2221 AC_CHECK_HEADERS(mad.h, [
2222 AC_CHECK_LIB(mad, mad_bit_init, [
2224 MAD_LIBS="${MAD_LIBS} -lmad"
2228 AS_IF([test -n "$enable_mad" -a "${have_mad}" = "no"], [
2229 AC_MSG_ERROR([Could not find libmad. Install it or pass --disable-mad to disable it.])
2232 AC_SUBST(MAD_CFLAGS)
2234 AM_CONDITIONAL([HAVE_MAD], [test "${have_mad}" = "yes"])
2239 PKG_ENABLE_MODULES_VLC([MPG123], [mpg123], [libmpg123], [libmpg123 decoder support], [auto])
2244 AC_ARG_ENABLE(gst-decode,
2245 [ --enable-gst-decode GStreamer based decoding support (currently supports only video decoding) (default auto)])
2247 have_gst_decode="no"
2248 AS_IF([test "${enable_gst_decode}" != "no"], [
2249 PKG_CHECK_MODULES([GST_APP], [gstreamer-app-1.0], [
2250 PKG_CHECK_MODULES([GST_VIDEO], [gstreamer-video-1.0], [
2251 have_gst_decode="yes"
2253 AC_MSG_WARN([${GST_VIDEO_PKG_ERRORS}. GStreamer decoder module will not be built.])
2256 AC_MSG_WARN([${GST_APP_PKG_ERRORS}. GStreamer modules will not be built.])
2259 AM_CONDITIONAL([HAVE_GST_DECODE], [test "${have_gst_decode}" = "yes"])
2262 dnl avcodec decoder/encoder plugin
2264 AC_ARG_ENABLE(merge-ffmpeg,
2265 [ --enable-merge-ffmpeg merge FFmpeg-based plugins (default disabled)],, [
2266 enable_merge_ffmpeg="no"
2268 AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
2270 AC_MSG_CHECKING([for libavutil variant])
2271 PKG_CHECK_EXISTS([libavutil], [
2272 libavutil_version="$(${PKG_CONFIG} --modversion libavutil)"
2273 libavutil_micro="${libavutil_version##*.}"
2274 AS_IF([test ${libavutil_micro} -le 99], [
2282 AC_MSG_RESULT([${avfork}])
2284 AC_ARG_ENABLE(avcodec,
2285 [ --enable-avcodec libavcodec codec (default enabled)])
2286 AS_IF([test "${enable_avcodec}" != "no"], [
2287 dnl We need >=57.16.0 from libav or >=57.37.100 from ffmpeg
2289 libav) av_codec_ver="57.16.0" ;;
2290 ffmpeg) av_codec_ver="57.37.100" ;;
2291 *) AC_MSG_ERROR([Missing libav or FFmpeg])
2293 PKG_CHECK_MODULES(AVCODEC,[libavcodec >= ${av_codec_ver} libavutil >= 52.0.0], [
2295 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2296 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2297 AC_CHECK_HEADERS(libavcodec/avcodec.h)
2298 AC_CHECK_HEADERS(libavutil/avutil.h)
2302 AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
2307 AM_CONDITIONAL([HAVE_AVCODEC], [test "${have_avcodec}" != "no"])
2310 dnl libva needs avcodec
2312 AC_ARG_ENABLE(libva,
2313 [ --enable-libva VAAPI GPU decoding support (libVA) (default auto)])
2315 AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
2316 AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
2322 AS_IF([test "${enable_libva}" != "no"], [
2323 PKG_CHECK_MODULES([LIBVA], [libva >= 0.38], [
2326 AS_IF([test -n "${enable_libva}"], [
2327 AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
2329 AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
2332 PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm], [
2333 have_vaapi_drm="yes"
2335 AC_MSG_WARN([${LIBVA_DRM_PKG_ERRORS}.])
2337 PKG_CHECK_MODULES(LIBVA_X11, [libva-x11], [
2338 have_vaapi_x11="yes"
2340 AC_MSG_WARN([${LIBVA_X11_PKG_ERRORS}.])
2343 AM_CONDITIONAL([HAVE_VAAPI_DRM], [test "${have_vaapi_drm}" = "yes"])
2344 AM_CONDITIONAL([HAVE_VAAPI_X11], [test "${have_vaapi_x11}" = "yes"])
2346 have_avcodec_vaapi="no"
2347 AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
2349 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2350 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2351 AC_CHECK_HEADERS([libavcodec/vaapi.h], [
2352 AC_MSG_NOTICE([VA API acceleration activated])
2353 have_avcodec_vaapi="yes"
2355 AS_IF([test -n "${enable_libva}"], [
2356 AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
2358 AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
2363 AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"])
2366 dnl dxva2 needs avcodec
2368 AC_ARG_ENABLE(dxva2,
2369 [ --enable-dxva2 DxVA2 GPU decoding support (default auto)])
2371 have_avcodec_dxva2="no"
2372 AS_IF([test "${enable_dxva2}" != "no"], [
2373 if test "${SYS}" = "mingw32"; then
2374 AS_IF([test "x${have_avcodec}" = "xyes"], [
2375 AC_CHECK_HEADERS(dxva2api.h,
2377 AC_CHECK_HEADERS(libavcodec/dxva2.h, [
2378 AC_MSG_NOTICE([DxVA2 acceleration activated])
2379 have_avcodec_dxva2="yes"
2381 AS_IF([test "${enable_dxva2}" = "yes"],
2382 [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
2383 [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
2384 ], [#undef _WIN32_WINNT
2385 /* DXVA2 is only available in Vista and above */
2386 #define _WIN32_WINNT 0x600])
2388 AS_IF([test "${enable_dxva2}" = "yes"],
2389 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2390 [AC_MSG_WARN([dxva2api.h not found])])
2391 ],[#include <d3d9.h>])
2393 AS_IF([test "x${enable_dxva2}" != "x"], [
2394 AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
2399 AM_CONDITIONAL([HAVE_AVCODEC_DXVA2], [test "${have_avcodec_dxva2}" = "yes"])
2402 dnl d3d11va needs avcodec
2404 AC_ARG_ENABLE(d3d11va,
2405 [ --enable-d3d11va D3D11 GPU decoding support (default auto)])
2407 have_avcodec_d3d11va="no"
2408 AS_IF([test "${enable_d3d11va}" != "no"], [
2409 if test "${SYS}" = "mingw32"; then
2410 AS_IF([test "x${have_avcodec}" = "xyes"], [
2411 AC_CHECK_TYPES([ID3D11VideoDecoder],
2413 AC_CHECK_HEADERS(dxva2api.h,
2415 AC_CHECK_HEADERS(libavcodec/d3d11va.h, [
2416 AC_MSG_NOTICE([D3D11 acceleration activated])
2417 AC_DEFINE(HAVE_AVCODEC_D3D11VA, 1, [Define if the d3d11va module is built])
2418 have_avcodec_d3d11va="yes"
2420 AS_IF([test "${enable_d3d11va}" = "yes"],
2421 [AC_MSG_ERROR([d3d11va is present but libavcodec/d3d11va.h is missing])],
2422 [AC_MSG_WARN([d3d11va is present but libavcodec/d3d11va.h is missing ])])
2423 ], [#undef _WIN32_WINNT
2424 /* D3D11 is only available in Vista and above */
2425 #define _WIN32_WINNT 0x600])
2427 AS_IF([test "${enable_d3d11va}" = "yes"],
2428 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2429 [AC_MSG_WARN([dxva2api.h not found])])
2430 ],[#include <d3d9.h>])
2432 AS_IF([test "${enable_d3d11va}" = "yes"],
2433 [AC_MSG_ERROR([Could not find required ID3D11VideoDecoder in d3d11.h])],
2434 [AC_MSG_WARN([ID3D11VideoDecoder not found])])
2435 ], [#include <d3d11.h>])
2437 AS_IF([test "x${enable_d3d11va}" != "x"], [
2438 AC_MSG_ERROR([--enable-d3d11va and --disable-avcodec options are mutually exclusive.])
2443 AM_CONDITIONAL([HAVE_AVCODEC_D3D11VA], [test "${have_avcodec_d3d11va}" = "yes"])
2448 AC_CHECK_HEADERS(dxgidebug.h)
2451 dnl avformat demuxer/muxer plugin
2454 AC_ARG_ENABLE(avformat,
2455 [ --enable-avformat libavformat containers (default enabled)],, [
2456 enable_avformat="${have_avcodec}"
2459 AS_IF([test "${enable_avformat}" != "no"], [
2460 PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil], [
2463 CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
2464 CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
2465 AC_CHECK_HEADERS(libavformat/avformat.h libavformat/avio.h)
2466 AC_CHECK_HEADERS(libavcodec/avcodec.h)
2467 AC_CHECK_HEADERS(libavutil/avutil.h)
2468 AS_IF([test "$enable_merge_ffmpeg" = "no"], [
2473 AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
2476 AM_CONDITIONAL([HAVE_AVFORMAT], [test "${enable_avformat}" != "no"])
2479 dnl swscale image scaling and conversion plugin
2482 AC_ARG_ENABLE(swscale,
2483 AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion
2484 (default enabled)]))
2485 if test "${enable_swscale}" != "no"
2487 PKG_CHECK_MODULES(SWSCALE,[libswscale],
2490 CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
2491 CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
2492 AC_CHECK_HEADERS(libswscale/swscale.h)
2493 AC_CHECK_HEADERS(libavutil/avutil.h)
2494 VLC_ADD_PLUGIN([swscale])
2495 VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
2496 VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
2497 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2498 VLC_ADD_LIBS([swscale],[${ac_cv_ld_bsymbolic}])
2502 AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
2510 AC_ARG_ENABLE(postproc,
2511 [ --enable-postproc libpostproc image post-processing (default auto)])
2512 if test "${enable_postproc}" != "no"
2514 PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
2517 CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
2518 CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
2519 AC_CHECK_HEADERS(postproc/postprocess.h)
2520 VLC_ADD_PLUGIN([postproc])
2523 AC_MSG_WARN([${POSTPROC_PKG_ERRORS}.])
2528 dnl faad decoder plugin
2531 [ --enable-faad faad codec (default auto)])
2533 AS_IF([test "${enable_faad}" != "no"], [
2534 AC_CHECK_HEADERS([neaacdec.h], [
2535 AC_CHECK_LIB(faad, NeAACDecOpen, [have_faad="yes"],, [$LIBM])
2537 AS_IF([test "${have_faad}" = "yes"], [
2538 VLC_ADD_PLUGIN([faad])
2539 VLC_ADD_LIBS([faad],[-lfaad])
2541 AS_IF([test "${enable_faad}" = "yes"], [
2542 AC_MSG_ERROR([cannot find FAAD library])
2544 AC_MSG_WARN([cannot find FAAD library])
2551 dnl AOM decoder plugin
2553 PKG_ENABLE_MODULES_VLC([AOM], [], [aom], [experimental AV1 codec], [disabled])
2556 dnl libvpx decoder plugin
2559 AS_HELP_STRING([--enable-vpx],[libvpx VP8/VP9 encoder and decoder (default auto)]))
2560 AS_IF([test "${enable_vpx}" != "no"],[
2561 PKG_CHECK_MODULES([VPX], [vpx >= 1.5.0], [
2562 VLC_ADD_PLUGIN([vpx])
2563 VLC_ADD_CPPFLAGS([vpx], [${VPX_CFLAGS}])
2564 VLC_ADD_LIBS([vpx], [${VPX_LIBS}])
2565 AC_CHECK_LIB([vpx],[vpx_codec_vp8_dx], [
2566 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_DECODER])
2567 ], [], [${VPX_LIBS}])
2568 AC_CHECK_LIB([vpx],[vpx_codec_vp9_dx], [
2569 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_DECODER])
2570 ], [], [${VPX_LIBS}])
2571 AC_CHECK_LIB([vpx],[vpx_codec_vp8_cx], [
2572 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_ENCODER])
2573 ], [], [${VPX_LIBS}])
2574 AC_CHECK_LIB([vpx],[vpx_codec_vp9_cx], [
2575 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_ENCODER])
2576 ], [], [${VPX_LIBS}])
2578 AS_IF([test "${enable_vpx}" = "yes"],[
2579 AC_MSG_ERROR([libvpx 1.5.0 or higher was not found])
2584 dnl twolame encoder plugin
2586 PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])
2589 dnl fdk-aac encoder plugin
2591 PKG_ENABLE_MODULES_VLC([FDKAAC], [], [fdk-aac], [FDK-AAC encoder], [disabled])
2595 dnl A52/AC3 decoder plugin
2598 [ --enable-a52 A/52 support with liba52 (default enabled)])
2599 if test "${enable_a52}" != "no"
2602 [ --with-a52=PATH a52 headers and libraries])
2603 if test -z "${with_a52}"
2608 LDFLAGS_test="-L${with_a52}/lib"
2609 CPPFLAGS_test="-I${with_a52}/include"
2612 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_test} ${CPPFLAGS_a52}"
2613 LDFLAGS="${LDFLAGS} ${LDFLAGS_test} ${LIBS_a52}"
2614 AC_CHECK_HEADERS(a52dec/a52.h, [
2615 AC_CHECK_LIB(a52, a52_free, [
2616 VLC_ADD_PLUGIN([a52])
2617 VLC_ADD_LIBS([a52],[${LDFLAGS_test} -la52 $LIBM])
2618 VLC_ADD_CPPFLAGS([a52],[${CPPFLAGS_test}])
2620 AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
2623 AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
2629 dnl DTS Coherent Acoustics decoder plugin
2631 PKG_ENABLE_MODULES_VLC([DCA], [dca], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
2636 PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])
2641 PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])
2646 PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
2651 AC_ARG_ENABLE(tremor,
2652 [ --enable-tremor Tremor decoder support (default disabled)])
2653 if test "${enable_tremor}" = "yes"
2655 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
2656 VLC_ADD_PLUGIN([tremor])
2663 PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex support], [auto])
2665 AS_IF([test "${enable_speex}" != "no"], [
2666 PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
2669 AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
2672 AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
2677 PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus >= 1.0.3], [Opus support], [auto])
2680 dnl theora decoder plugin
2682 PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto])
2685 dnl OggSpots decoder plugin
2687 PKG_ENABLE_MODULES_VLC([OGGSPOTS], [], [ogg], [experimental OggSpots codec], [auto])
2690 dnl Daala decoder plugin
2692 PKG_ENABLE_MODULES_VLC([DAALA], [], [daaladec daalaenc], [experimental daala codec], [disabled])
2695 dnl schroedinger decoder plugin (for dirac format video)
2697 PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
2700 dnl PNG decoder module
2703 [ --enable-png PNG support (default enabled)])
2704 AS_IF([test "${enable_png}" != "no"], [
2705 AC_CHECK_HEADERS(png.h, [
2707 LDFLAGS="${LDFLAGS} -lz $LIBM"
2708 AC_CHECK_LIB(png, png_set_rows, [
2709 VLC_ADD_PLUGIN([png])
2716 dnl JPEG decoder module
2719 [ --enable-jpeg JPEG support (default enabled)])
2720 AS_IF([test "${enable_jpeg}" != "no"], [
2721 AC_CHECK_HEADERS(jpeglib.h, [
2722 VLC_ADD_PLUGIN([jpeg])
2727 dnl BPG decoder module
2730 [ --enable-bpg BPG support (default disabled)])
2731 AS_IF([test "${enable_bpg}" != "no"], [
2732 AC_CHECK_HEADERS(libbpg.h, [
2733 VLC_ADD_PLUGIN([bpg])
2738 dnl H262 encoder plugin (lib262)
2741 [ --enable-x262 H262 encoding support with static libx262 (default disabled)])
2742 if test "${enable_x262}" != "no"; then
2743 PKG_CHECK_MODULES(X262, x262, [
2744 VLC_ADD_PLUGIN([x262])
2745 VLC_ADD_LDFLAGS([x262],[${X262_LIBS}])
2746 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2747 VLC_ADD_LIBS([x262],[${av_cv_ld_bsymbolic}])
2749 VLC_ADD_CFLAGS([x262],[${X262_CFLAGS}])
2750 if echo ${X262_LIBS} |grep -q 'pthreadGC2'; then
2751 VLC_ADD_CFLAGS([x262], [-DPTW32_STATIC_LIB])
2754 if test "${enable_x262}" = "yes"; then
2755 AC_MSG_ERROR([x262 module doesn't work without staticly compiled libx262.a])
2761 PKG_ENABLE_MODULES_VLC([X265],, [x265], [HEVC/H.265 encoder], [auto])
2764 dnl H264 encoder plugin (10-bit lib264)
2766 AC_ARG_ENABLE(x26410b,
2767 [ --enable-x26410b H264 10-bit encoding support with static libx264 (default disabled)])
2768 if test "${enable_x26410b}" != "no"; then
2769 PKG_CHECK_MODULES(X26410B, x26410b, [
2770 VLC_ADD_PLUGIN([x26410b])
2771 VLC_ADD_LIBS([x26410b],[${X26410B_LIBS}])
2772 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2773 VLC_ADD_LDFLAGS([x26410b],[${ac_cv_ld_bsymbolic}])
2775 VLC_ADD_CFLAGS([x26410b],[${X26410B_CFLAGS}])
2776 if echo ${X26410B_LIBS} |grep -q 'pthreadGC2'; then
2777 VLC_ADD_CFLAGS([x26410b], [-DPTW32_STATIC_LIB])
2780 if test "${enable_x26410b}" = "yes"; then
2781 AC_MSG_ERROR([x26410b module doesn't work without staticly compiled libx264.a])
2788 dnl H264 encoder plugin (using libx264)
2791 [ --enable-x264 H264 encoding support with libx264 (default enabled)])
2792 if test "${enable_x264}" != "no"; then
2793 PKG_CHECK_MODULES(X264,x264 >= 0.86, [
2794 VLC_ADD_PLUGIN([x264])
2795 VLC_ADD_LIBS([x264],[${X264_LIBS}])
2797 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2798 VLC_ADD_LDFLAGS([x264],[${ac_cv_ld_bsymbolic}])
2801 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2802 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2803 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2806 if test "${enable_x264}" = "yes"; then
2807 AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
2813 dnl Intel QuickSync (aka MediaSDK) H264/H262 encoder
2815 PKG_ENABLE_MODULES_VLC([MFX], [qsv], [libmfx], [Intel QuickSync MPEG4-Part10/MPEG2 (aka H.264/H.262) encoder], [auto])
2818 dnl libfluidsynth (MIDI synthetizer) plugin
2820 PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.2], [MIDI synthetiser with libfluidsynth], [auto])
2821 PKG_ENABLE_MODULES_VLC([FLUIDLITE], [fluidsynth], [fluidlite], [MIDI synthetiser with libfluidsynth], [auto])
2822 AC_CHECK_HEADERS(fluidlite.h, [AC_SUBST([FLUIDSYNTH_LIBS], ${FLUIDLITE_LIBS})])
2825 dnl Teletext Modules
2826 dnl vbi decoder plugin (using libzbvi)
2831 AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
2832 libzvbi (default enabled)]))
2834 AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
2835 zvbi) (default enabled if zvbi is absent)]))
2837 AS_IF( [test "${enable_zvbi}" != "no"],[
2838 PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.28],
2840 VLC_ADD_PLUGIN([zvbi])
2841 AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built])
2842 AS_IF( [test "${enable_telx}" = "yes"],[
2843 AC_MSG_WARN([The zvbi and telx modules are incompatible. Using zvbi.])
2846 AC_MSG_WARN([${ZVBI_PKG_ERRORS}. Enabling the telx module instead.])
2849 AS_IF( [test "${enable_telx}" != "no" ],[
2850 VLC_ADD_PLUGIN([telx])
2854 dnl libass subtitle rendering module
2856 AC_ARG_ENABLE(libass,
2857 [ --enable-libass Subtitle support using libass (default enabled)])
2858 AS_IF( [test "${enable_libass}" != "no"], [
2859 PKG_CHECK_MODULES(LIBASS, [libass >= 0.9.8],
2861 VLC_ADD_PLUGIN([libass])
2863 AC_CHECK_HEADERS(fontconfig/fontconfig.h,
2864 [VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
2865 VLC_ADD_LIBS([libass],[-lfontconfig])
2868 AC_MSG_WARN([${LIBASS_PKG_ERRORS}.])
2873 dnl ARIB subtitles rendering module
2875 AC_ARG_ENABLE(aribsub,
2876 [ --enable-aribsub ARIB Subtitles support (default enabled)])
2877 AS_IF( [test "${enable_aribsub}" != "no" ],[
2878 PKG_CHECK_MODULES(ARIBB24, [aribb24 >= 1.0.1], [
2880 VLC_ADD_PLUGIN([aribsub])
2881 VLC_ADD_LIBS([aribsub],[-laribb24])
2882 AC_DEFINE(HAVE_ARIBB24, 1, [Define if libaribb24 is available.])
2884 AC_MSG_WARN(Library [aribb24] needed for [aribsub] was not found)
2888 AM_CONDITIONAL([HAVE_ARIBB24], [test x"${have_aribb24}" = x"yes"])
2893 PKG_ENABLE_MODULES_VLC([ARIBB25], [aribcam], [aribb25 >= 0.2.6], [ARIB STD-B25], [auto])
2896 dnl kate decoder plugin
2898 PKG_ENABLE_MODULES_VLC([KATE], [], [kate >= 0.3.0], [kate codec], [auto])
2901 dnl tiger rendering for kate decoder plugin
2903 AC_ARG_ENABLE(tiger,
2904 [ --enable-tiger Tiger rendering library for Kate streams (default auto)])
2905 AS_IF([test "${enable_tiger}" != "no"], [
2906 PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
2907 AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])],[
2908 AS_IF([test -n "${enable_tiger}"], [
2909 AC_MSG_ERROR([${TIGER_PKG_ERRORS}.])
2919 EXTEND_HELP_STRING([Video plugins:])
2924 PKG_CHECK_MODULES([EGL], [egl], [
2929 AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
2932 PKG_CHECK_MODULES([GL], [gl], [
2935 AC_MSG_CHECKING([for OpenGL])
2936 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2938 # include <GL/glew.h>
2942 [int t0 = GL_TEXTURE0;]])
2946 AS_IF([test "${SYS}" != "mingw32"], [
2949 GL_LIBS="-lopengl32"
2952 AC_MSG_RESULT([${have_gl}])
2954 AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
2956 dnl OpenGL ES 2: depends on EGL 1.1
2957 PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
2964 AC_CHECK_HEADERS(X11/Xlib.h)
2967 dnl X C Bindings modules
2970 [ --enable-xcb X11 support with XCB (default enabled)],, [
2971 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "darwin"], [
2977 AC_ARG_ENABLE(xvideo,
2978 [ --enable-xvideo XVideo support (default enabled)],, [
2979 enable_xvideo="$enable_xcb"
2983 have_xcb_keysyms="no"
2985 have_xcb_xvideo="no"
2986 AS_IF([test "${enable_xcb}" != "no"], [
2988 PKG_CHECK_MODULES(XCB, [xcb >= 1.6])
2990 PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
2991 PKG_CHECK_MODULES(XCB_COMPOSITE, [xcb-composite])
2992 PKG_CHECK_MODULES(XPROTO, [xproto])
2994 AS_IF([test "${enable_xvideo}" != "no"], [
2995 PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [have_xcb_xvideo="yes"])
2998 PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [have_xcb_randr="yes"])
3001 PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [have_xcb_keysyms="yes"], [
3002 AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.])
3005 AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
3006 AM_CONDITIONAL([HAVE_XCB_KEYSYMS], [test "${have_xcb_keysyms}" = "yes"])
3007 AM_CONDITIONAL([HAVE_XCB_RANDR], [test "${have_xcb_randr}" = "yes"])
3008 AM_CONDITIONAL([HAVE_XCB_XVIDEO], [test "${have_xcb_xvideo}" = "yes"])
3014 AC_ARG_ENABLE(vdpau,
3015 [AS_HELP_STRING([--enable-vdpau], [VDPAU hardware support (default auto)])])
3017 AS_IF([test "${enable_vdpau}" != "no"], [
3018 PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.6], [
3020 AS_IF([test "${no_x}" = "yes"], [
3021 AC_MSG_ERROR([VDPAU requires Xlib (X11).])
3024 AS_IF([test -n "${enable_vdpau}"], [
3025 AC_MSG_ERROR([${VDPAU_PKG_ERRORS}.])
3029 AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"])
3031 have_avcodec_vdpau="no"
3032 AS_IF([test "${have_vdpau}" = "yes" -a "${have_avcodec}" = "yes"], [
3034 libav) av_vdpau_ver="56.10.0" ;;
3035 ffmpeg) av_vdpau_ver="56.19.100" ;;
3037 PKG_CHECK_EXISTS([libavcodec >= ${av_vdpau_ver}], [
3038 have_avcodec_vdpau="yes"
3039 AC_MSG_NOTICE([VDPAU decoding acceleration activated])
3041 AS_IF([test -n "${enable_vdpau}"], [
3042 AC_MSG_ERROR([libavcodec >= 56.10.0 is required for VDPAU decoding.])
3044 AC_MSG_WARN([libavcodec >= 56.10.0 are required for VDPAU decoding.])
3048 AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" = "yes"])
3054 AC_ARG_ENABLE(wayland,
3055 [AS_HELP_STRING([--enable-wayland], [Wayland support (default auto)])])
3057 have_wayland_egl="no"
3059 AS_IF([test "${enable_wayland}" != "no"], [
3060 PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= 1.5.91], [
3061 AC_MSG_CHECKING([for the Wayland protocols])
3062 PKG_CHECK_EXISTS([wayland-protocols >= 1.4], [
3063 WAYLAND_PROTOCOLS="$(${PKG_CONFIG} wayland-protocols --variable pkgdatadir)"
3064 AC_MSG_RESULT([${WAYLAND_PROTOCOLS}])
3066 AC_MSG_RESULT([not found])
3067 AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors 'wayland-protocols >= 1.4')])
3070 AC_MSG_CHECKING([for the Wayland scanner])
3071 PKG_CHECK_EXISTS([wayland-scanner], [
3072 WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
3073 AC_MSG_RESULT([${WAYLAND_SCANNER}])
3075 AC_MSG_RESULT([not found])
3076 AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors wayland-scanner)])
3081 AS_IF([test "${have_egl}" = "yes"], [
3082 PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl], [
3083 have_wayland_egl="yes"
3085 AC_MSG_ERROR([${WAYLAND_EGL_PKG_ERRORS}.])
3089 AS_IF([test -n "${enable_wayland}"], [
3090 AC_MSG_ERROR([${WAYLAND_CLIENT_PKG_ERRORS}.])
3094 AC_SUBST([WAYLAND_PROTOCOLS])
3095 AC_SUBST([WAYLAND_SCANNER])
3096 AM_CONDITIONAL([HAVE_WAYLAND], [test "${have_wayland}" = "yes"])
3097 AM_CONDITIONAL([HAVE_WAYLAND_EGL], [test "${have_wayland_egl}" = "yes"])
3104 [ --enable-sdl SDL support (default enabled)])
3105 AC_ARG_ENABLE(sdl-image,
3106 [ --enable-sdl-image SDL image support (default enabled)])
3107 if test "${enable_sdl}" != "no"
3109 PKG_CHECK_MODULES(SDL, [sdl >= 1.2.10], [
3110 # SDL on Darwin is heavily patched and can only run SDL_image
3111 if test "${SYS}" != "darwin"; then
3112 VLC_ADD_PLUGIN([vout_sdl])
3116 AS_IF([ test "${enable_sdl_image}" != "no"],[
3117 PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
3118 VLC_ADD_PLUGIN([sdl_image])],
3119 [ AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
3123 AC_MSG_WARN([${SDL_PKG_ERRORS}.])
3130 AC_ARG_ENABLE(freetype,
3131 [ --enable-freetype freetype support (default auto)])
3132 AC_ARG_ENABLE(fribidi,
3133 [ --enable-fribidi fribidi support (default auto)])
3134 AC_ARG_ENABLE(harfbuzz,
3135 [ --enable-harfbuzz harfbuzz support (default auto)])
3136 AC_ARG_ENABLE(fontconfig,
3137 [ --enable-fontconfig fontconfig support (default auto)])
3139 AC_ARG_WITH([default-font],
3140 AS_HELP_STRING([--with-default-font=PATH],
3141 [Path to the default font]),
3142 [AC_DEFINE_UNQUOTED([DEFAULT_FONT_FILE],
3143 "$withval", [Default font])])
3144 AC_ARG_WITH([default-monospace-font],
3145 AS_HELP_STRING([--with-default-monospace-font=PATH],
3146 [Path to the default font]),
3147 [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FONT_FILE],
3148 "$withval", [Default monospace font])])
3150 AC_ARG_WITH([default-font-family],
3151 AS_HELP_STRING([--with-default-font-family=NAME],
3152 [Path to the default font family]),
3153 [AC_DEFINE_UNQUOTED([DEFAULT_FAMILY],
3154 "$withval", [Default font family])])
3155 AC_ARG_WITH([default-monospace-font-family],
3156 AS_HELP_STRING([--with-default-monospace-font-family=NAME],
3157 [Path to the default font family]),
3158 [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FAMILY],
3159 "$withval", [Default monospace font family])])
3162 have_fontconfig="no"
3166 if test "${enable_freetype}" != "no"; then
3167 PKG_CHECK_MODULES(FREETYPE, freetype2, [
3169 VLC_ADD_CPPFLAGS([skins2],[${FREETYPE_CFLAGS}])
3170 VLC_ADD_LIBS([skins2],[${FREETYPE_LIBS}])
3172 dnl fontconfig support
3173 if test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ; then
3174 if test "${enable_fontconfig}" != "no"; then
3175 AC_CHECK_HEADERS(fontconfig/fontconfig.h, [
3176 have_fontconfig="yes"
3177 ],[AC_MSG_WARN([library fontconfig not found. Styles will be disabled in freetype])])
3182 if test "${enable_fribidi}" != "no"; then
3183 PKG_CHECK_MODULES(FRIBIDI, fribidi, [
3185 VLC_ADD_CPPFLAGS([skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
3186 VLC_ADD_LIBS([skins2], [${FRIBIDI_LIBS}])
3187 ],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional text and complex scripts (Arabic, Farsi, Thai...) will be disabled in FreeType.])])
3190 dnl harfbuzz support
3191 if test "${have_fribidi}" != "no"; then
3192 if test "${enable_harfbuzz}" != "no"; then
3193 PKG_CHECK_MODULES(HARFBUZZ, harfbuzz, [
3195 VLC_ADD_CPPFLAGS([skins2], [${HARFBUZZ_CFLAGS} -DHAVE_HARFBUZZ])
3196 VLC_ADD_LIBS([skins2], [${HARFBUZZ_LIBS}])
3197 ],[AC_MSG_WARN([${HARFBUZZ_PKG_ERRORS}. Support for complex scripts (Arabic, Farsi, Thai...) will be disabled in FreeType.])])
3201 AS_IF([test -n "${enable_freetype}"],[
3202 AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
3207 AM_CONDITIONAL([HAVE_FREETYPE], [test "${have_freetype}" = "yes"])
3208 AM_CONDITIONAL([HAVE_FONTCONFIG], [test "${have_fontconfig}" = "yes"])
3209 AM_CONDITIONAL([HAVE_FRIBIDI], [test "${have_fribidi}" = "yes"])
3210 AM_CONDITIONAL([HAVE_HARFBUZZ], [test "${have_harfbuzz}" = "yes"])
3213 dnl SAPI (text to Speech renderer for Windows)
3216 AC_CHECK_TYPES([ISpObjectToken],[
3218 ],[AC_MSG_WARN([sapi.h not found. Text to Speech renderer for Windows disabled])],
3219 [#include <windows.h>
3221 #include <sphelper.h>])
3222 AM_CONDITIONAL([HAVE_SAPI], [test "${have_sapi}" = "yes"])
3226 dnl SVG module (text rendering and image decoding)
3228 PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
3229 PKG_ENABLE_MODULES_VLC([SVGDEC], [], [librsvg-2.0 >= 2.9.0 cairo >= 1.13.1], [SVG image decoder library],[auto])
3232 dnl Windows DirectX module
3235 AC_ARG_ENABLE(directx,
3236 [AS_HELP_STRING([--enable-directx],
3237 [Microsoft DirectX support (default enabled on Windows)])],, [
3238 AS_IF([test "${SYS}" = "mingw32"], [
3239 enable_directx="yes"
3244 AS_IF([test "${enable_directx}" != "no"], [
3246 AC_CHECK_HEADERS(ddraw.h, [
3247 VLC_ADD_PLUGIN([directdraw])
3251 AC_CHECK_HEADERS(GL/wglew.h, [
3252 VLC_ADD_PLUGIN([glwin32 wgl])
3254 #include <windows.h>
3259 AC_CHECK_HEADERS(d3d11.h, [
3260 VLC_ADD_PLUGIN([direct3d11])
3264 AC_CHECK_HEADERS(d3d9.h, [
3265 VLC_ADD_PLUGIN([direct3d9])
3271 dnl Linux framebuffer module
3273 AC_CHECK_HEADER([linux/fb.h], [
3274 VLC_ADD_PLUGIN([fb])
3280 dnl try to find using: 1 - given location; 2 - directfb-config; 3 - pkg-config
3281 dnl TODO: support for static linking
3283 AC_ARG_ENABLE(directfb,
3284 [ --enable-directfb DirectFB support (default disabled)])
3285 AC_ARG_WITH(directfb,
3286 [ --with-directfb=PATH path to DirectFB headers and libraries])
3288 if test "${enable_directfb}" = "yes"; then
3289 have_directfb="false"
3290 CPPFLAGS_mydirectfb=
3292 if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
3293 dnl Trying the given location
3296 CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
3297 LIBS_new="-L${with_directfb}/lib/fusion/.libs/ -L${with_directfb}/lib/direct/.libs/ -L${with_directfb}/src/.libs/"
3299 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
3300 LIBS="${LIBS} ${LIBS_new}"
3302 dnl FIXME: too obscure
3303 AC_CHECK_HEADER([directfb.h], [
3304 AC_CHECK_LIB([direct],[direct_initialize], [
3305 AC_CHECK_LIB([fusion], [fusion_enter], [
3306 AC_CHECK_LIB([directfb], [DirectFBInit], have_directfb="true", have_directfb="false")
3307 ], have_directfb="false")
3308 ], have_directfb="false")
3309 ], have_directfb="false")
3313 if test "${have_directfb}" = "true"; then
3314 LIBS_mydirectfb="${LIBS_new} -lz $LIBDL -ldirectfb -lfusion -ldirect -lpthread"
3315 CPPFLAGS_mydirectfb="${CPPFLAGS_new}"
3318 dnl Look for directfb-config
3319 AC_CHECK_PROG(DIRECTFB_CONFIG, [directfb-config], [false])
3320 AS_IF(["${DIRECTFB_CONFIG}" != "false"], [
3321 CPPFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --cflags`"
3322 LIBS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
3323 have_directfb="true"
3325 dnl Trying with pkg-config
3326 PKG_CHECK_MODULES(DIRECTFB, directfb, [
3327 CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
3328 LIBS_mydirectfb="${DIRECTFB_LIBS}"
3329 have_directfb="true"
3330 ], [have_directfb="false"])
3333 if test "${have_directfb}" = "true"; then
3334 VLC_ADD_PLUGIN([directfb])
3335 VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
3336 VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}])
3338 AC_MSG_ERROR([${DIRECTFB_PKG_ERRORS}.])
3346 [ --enable-aa aalib output (default disabled)])
3347 if test "${enable_aa}" = "yes"
3349 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
3350 if test "${have_aa}" = "true"
3352 VLC_ADD_PLUGIN([aa])
3359 PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3365 [AS_HELP_STRING([--enable-kva],
3366 [support the K Video Accelerator KVA (default enabled on OS/2)])],, [
3367 AS_IF([test "$SYS" = "os2"], [
3373 AS_IF([test "$enable_kva" != "no"], [
3374 AC_CHECK_HEADERS([kva.h], [
3376 AC_CHECK_LIB(kva, main, [
3382 AM_CONDITIONAL([HAVE_KVA], [test "${have_kva}" = "yes"])
3388 AS_HELP_STRING([--enable-mmal],
3389 [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)]))
3390 if test "${enable_mmal}" != "no"; then
3392 LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif"
3393 CPPFLAGS="${CPPFLAGS} -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
3394 AC_CHECK_HEADERS(interface/mmal/mmal.h,
3395 [ AC_CHECK_LIB(bcm_host, vc_tv_unregister_callback_full, [
3397 VLC_ADD_PLUGIN([mmal])
3398 VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ])
3399 VLC_ADD_CFLAGS([mmal],[ -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux ])
3400 VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lvchostif ]) ], [
3401 AS_IF([test "${enable_mmal}" = "yes"],
3402 [ AC_MSG_ERROR([Cannot find bcm library...]) ],
3403 [ AC_MSG_WARN([Cannot find bcm library...]) ])
3406 ] , [ AS_IF([test "${enable_mmal}" = "yes"],
3407 [ AC_MSG_ERROR([Cannot find development headers for mmal...]) ],
3408 [ AC_MSG_WARN([Cannot find development headers for mmal...]) ]) ])
3411 AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"])
3417 [AS_HELP_STRING([--enable-evas],
3418 [use evas output module (default disabled)])])
3420 AS_IF([test "${enable_evas}" = "yes"], [
3421 PKG_CHECK_MODULES(EVAS, [evas >= 1.15.99 ecore >= 1.15.99], [
3423 AC_DEFINE([HAVE_EVAS], [1], [Define to 1 if evas is enabled.])
3425 AS_IF([test "x${enable_evas}" != "x"], [
3426 AC_MSG_ERROR([$EVAS_PKG_ERRORS. libevas and libecore 1.15.99 or later required.])
3430 AM_CONDITIONAL([HAVE_EVAS], [test "${have_evas}" = "yes"])
3436 EXTEND_HELP_STRING([Audio plugins:])
3439 dnl Pulseaudio module
3441 AC_ARG_ENABLE(pulse,
3442 [AS_HELP_STRING([--enable-pulse],
3443 [use the PulseAudio client library (default auto)])])
3445 AS_IF([test "${enable_pulse}" != "no"], [
3446 PKG_CHECK_MODULES([PULSE], [libpulse >= 1.0], [
3449 AS_IF([test "x${enable_pulse}" != "x"], [
3450 AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 1.0 or later required.])
3454 AM_CONDITIONAL([HAVE_PULSE], [test "${have_pulse}" = "yes"])
3460 [AS_HELP_STRING([--enable-alsa],
3461 [support the Advanced Linux Sound Architecture (default auto)])],, [
3462 AS_IF([test "$SYS" = "linux" -a "${have_pulse}" = "no"], [
3467 AS_IF([test "${enable_alsa}" != "no"], [
3468 PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.24], [
3471 AS_IF([test "x${enable_alsa}" != "x"], [
3472 AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.24 or later required.])
3476 AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
3479 dnl Open Sound System module
3482 [AS_HELP_STRING([--enable-oss],
3483 [support the Open Sound System OSS (default enabled on FreeBSD/NetBSD/DragonFlyBSD)])],, [
3484 AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "linux" -o "$SYS" = "openbsd"], [
3490 AS_IF([test "$enable_oss" != "no"], [
3491 AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
3493 AC_CHECK_LIB(ossaudio, main, [
3494 OSS_LIBS="-lossaudio"
3499 AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
3502 dnl OpenBSD sndio module
3504 AC_ARG_ENABLE([sndio],
3505 [AS_HELP_STRING([--disable-sndio],
3506 [support the OpenBSD sndio (default auto)])],, [
3507 AS_IF([test "$SYS" = "openbsd"], [
3512 AS_IF([test "$enable_sndio" != "no"], [
3513 AC_CHECK_HEADER([sndio.h], [
3517 AM_CONDITIONAL([HAVE_SNDIO], [test "${have_sndio}" = "yes"])
3520 dnl Windows Audio Session plugin
3522 AC_ARG_ENABLE([wasapi],
3523 [AS_HELP_STRING([--enable-wasapi],
3524 [use the Windows Audio Session API (default auto)])
3527 AS_IF([test "$enable_wasapi" != "no"], [
3528 AC_CHECK_HEADER([audioclient.h], [
3531 AS_IF([test "x${enable_wasapi}" != "x"], [
3532 AC_MSG_ERROR([Windows Audio Session API not found.])
3536 AM_CONDITIONAL([HAVE_WASAPI], [test "${have_wasapi}" = "yes"])
3542 [AS_HELP_STRING([--disable-jack],
3543 [do not use jack (default auto)])])
3545 AS_IF([test "${enable_jack}" != "no"], [
3546 PKG_CHECK_MODULES(JACK, jack >= 1.9.7,
3549 AC_MSG_WARN([${JACK_PKG_ERRORS}, trying jack1 instead])
3551 PKG_CHECK_MODULES(JACK, jack >= 0.120.1 jack < 1.0,
3554 AS_IF([test -n "${enable_jack}"],
3555 [AC_MSG_ERROR([${JACK_PKG_ERRORS}.])],
3556 [AC_MSG_WARN([${JACK_PKG_ERRORS}.])])
3560 AM_CONDITIONAL([HAVE_JACK], [test "${have_jack}" != "no"])
3563 dnl OpenSLES Android
3565 AC_ARG_ENABLE(opensles,
3566 [ --enable-opensles Android OpenSL ES audio module (default disabled)])
3567 if test "${HAVE_ANDROID}" = "1"; then
3568 if test "${enable_opensles}" = "yes"; then
3569 AC_CHECK_HEADERS(SLES/OpenSLES.h,
3570 [ VLC_ADD_PLUGIN([opensles_android]) ],
3571 [ AC_MSG_ERROR([cannot find OpenSLES headers])] )
3578 AC_ARG_ENABLE(tizen_audio,
3579 [AS_HELP_STRING([--enable-tizen-audio],
3580 [Tizen audio module (default enabled on Tizen)])],, [
3581 AS_IF([test "$HAVE_TIZEN" = "1"], [
3582 enable_tizen_audio="yes"
3585 if test "${enable_tizen_audio}" = "yes"; then
3586 AC_CHECK_HEADERS(audio_io.h,
3587 [ VLC_ADD_PLUGIN([tizen_audio]) ],
3588 [ AC_MSG_ERROR([cannot find Tizen audio_io headers])] )
3592 dnl libsamplerate plugin
3594 PKG_ENABLE_MODULES_VLC([SAMPLERATE], [], [samplerate], [Resampler with libsamplerate], [auto])
3599 PKG_ENABLE_MODULES_VLC([SOXR], [], [soxr >= 0.1.2], [SoX Resampler library], [auto])
3605 [AS_HELP_STRING([--enable-kai],
3606 [support the K Audio Interface KAI (default enabled on OS/2)])],, [
3607 AS_IF([test "$SYS" = "os2"], [
3613 AS_IF([test "$enable_kai" != "no"], [
3614 AC_CHECK_HEADERS([kai.h], [
3616 AC_CHECK_LIB(kai, main, [
3622 AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"])
3625 dnl chromaprint audio track fingerprinter
3627 m4_pushdef([libchromaprint_version], 0.6.0)
3628 PKG_WITH_MODULES([CHROMAPRINT],[libchromaprint >= libchromaprint_version],
3629 VLC_ADD_PLUGIN([stream_out_chromaprint]),
3630 AS_IF([test "${enable_chromaprint}" = "yes"],
3631 [AC_MSG_ERROR(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)],
3632 [AC_MSG_WARN(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)]
3634 [(Chromaprint based audio fingerprinter)],[auto])
3635 m4_popdef([libchromaprint_version])
3638 dnl Chromecast streaming support
3640 m4_pushdef([protobuf_lite_version], 2.5.0)
3641 AC_ARG_VAR(PROTOC, [protobuf compiler])
3642 AC_CHECK_PROGS(PROTOC, protoc, no)
3643 PKG_WITH_MODULES([CHROMECAST],[protobuf-lite >= protobuf_lite_version], [
3644 AS_IF([test "x${PROTOC}" != "xno"], [
3645 build_chromecast="yes"
3647 AC_MSG_ERROR(protoc compiler needed for [chromecast] was not found)
3650 AS_IF([test "${enable_chromecast}" = "yes"],
3651 AC_MSG_ERROR(Library [protobuf-lite >= protobuf_lite_version] needed for [chromecast] was not found),
3652 AC_MSG_WARN(Library [protobuf-lite >= protobuf_lite_version] needed for [chromecast] was not found)
3654 enable_chromecast="no"
3655 ], [(Chromecast streaming support)], [auto])
3656 AM_CONDITIONAL([BUILD_CHROMECAST], [test "${build_chromecast}" = "yes"])
3657 m4_popdef([protobuf_lite_version])
3660 dnl Interface plugins
3663 EXTEND_HELP_STRING([Interface plugins:])
3669 AS_HELP_STRING([--disable-qt], [Qt UI support (default enabled)])],, [
3670 AS_IF([test "${SYS}" = "darwin"], [
3675 AS_IF([test "${enable_qt}" != "no"], [
3676 PKG_CHECK_MODULES([QT], [Qt5Core >= 5.2.0 Qt5Widgets Qt5Gui], [
3677 PKG_CHECK_MODULES([QT5_X11], [Qt5X11Extras], [
3680 AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
3682 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
3683 QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
3684 QT_VERSION="$(eval $PKG_CONFIG --modversion Qt5Gui)"
3685 AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3686 AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3687 AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3689 PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.8.0],, [
3690 AS_IF([test -n "${enable_qt}"],[
3691 AC_MSG_ERROR([${QT_PKG_ERRORS}.])
3693 AC_MSG_WARN([${QT_PKG_ERRORS}.])
3697 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
3698 AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin"])
3699 AC_PATH_PROG(RCC, rcc, rcc, ["${QT_PATH}/bin"])
3700 AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin"])
3703 AS_IF([test "${enable_qt}" != "no"], [
3704 VLC_ADD_PLUGIN([qt])
3705 ALIASES="${ALIASES} qvlc"
3707 AC_SUBST(QT_VERSION)
3708 AM_CONDITIONAL(ENABLE_QT, [test "$enable_qt" != "no"])
3709 AM_CONDITIONAL([HAVE_QT5_X11], [test "${have_qt5_x11}" = "yes"])
3712 dnl detect kde4-config patch (used for kde solids).
3714 AC_ARG_VAR([KDE4_CONFIG], [kde4-config utility])
3715 AS_IF([test "x$KDE4_CONFIG" = "x"], [
3716 KDE4_CONFIG="kde4-config"
3720 dnl Simple test for skins2 dependency
3722 AS_IF([test "$enable_qt" = "no"], [
3723 AS_IF([test "${enable_skins2}" = "yes"], [
3724 AC_MSG_ERROR([The skins2 module depends on the Qt interface. Without it you will not be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt development package or alternatively you can also configure with: --disable-qt --disable-skins2.])
3727 AC_MSG_WARN([The skins2 module depends on the Qt interface, Qt is not built so skins2 is disabled.])
3734 AC_ARG_ENABLE(skins2,
3735 [AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)])])
3736 AS_IF([test "${enable_skins2}" != "no"], [
3737 have_skins_deps="yes"
3740 AS_IF([test "${SYS}" = "mingw32"], [
3741 VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -DWIN32_SKINS])
3742 VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
3744 ], [test "${SYS}" = "os2"], [
3745 VLC_ADD_CPPFLAGS([skins2],[ -DOS2_SKINS])
3748 PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
3749 PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
3750 PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
3751 VLC_ADD_CPPFLAGS([skins2],[${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
3752 VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
3755 dnl we need freetype
3756 AS_IF([test "${have_freetype}" != "yes"], [
3757 have_skins_deps="no"
3760 AS_IF([test "${have_skins_deps}" = "no"], [
3761 AS_IF([test "x${enable_skins2}" = "x"], [
3762 AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
3764 AC_MSG_ERROR([Skins2 interface requires FreeType, libxpm, libxext and libxinerama])
3768 ALIASES="${ALIASES} svlc"
3772 AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
3774 AC_ARG_ENABLE(libtar,
3775 [ --enable-libtar libtar support for skins2 (default auto)])
3776 AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
3777 AC_CHECK_HEADERS(libtar.h, [
3778 VLC_ADD_LIBS([skins2],[-ltar])
3783 dnl MacOS X gui module
3785 AC_ARG_ENABLE(macosx,
3786 [ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)])
3787 if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
3789 VLC_ADD_PLUGIN([macosx])
3790 AC_PATH_PROGS(XIB, [ibtool], ibtool, ["/usr/bin"])
3792 AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "no" -a "${SYS}" = "darwin"])
3795 dnl MacOS X sparkle update support
3797 AC_ARG_ENABLE(sparkle,
3798 [ --enable-sparkle Sparkle update support for OS X (default enabled on Mac OS X)])
3799 if test "x${enable_sparkle}" != "xno" -a "${HAVE_OSX}" = "1"
3801 if test ! -d ${CONTRIB_DIR}/Sparkle.framework -a ! -d ${CONTRIB_DIR}/Frameworks/Sparkle.framework
3803 AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}])
3806 AC_DEFINE([HAVE_SPARKLE], [1], [Define to 1 if sparkle is enabled.])
3808 AM_CONDITIONAL(HAVE_SPARKLE, [test "$enable_sparkle" != "no"])
3811 dnl MacOS X breakpad creash reporter support
3813 AC_ARG_ENABLE(breakpad,
3814 [ --enable-breakpad Breakpad crash reporter support for OS X (default enabled on Mac OS X)])
3815 if test "x${enable_breakpad}" != "xno" -a "${HAVE_OSX}" = "1"
3817 if test ! -d ${CONTRIB_DIR}/Breakpad.framework -a ! -d ${CONTRIB_DIR}/Frameworks/Breakpad.framework
3819 AC_MSG_ERROR([Breakpad framework is required and was not found in ${CONTRIB_DIR}])
3822 AC_DEFINE([HAVE_BREAKPAD], [1], [Define to 1 if breakpad is enabled.])
3824 AM_CONDITIONAL(HAVE_BREAKPAD, [test "$enable_breakpad" != "no"])
3828 dnl Minimal Mac OS X module
3830 AC_ARG_ENABLE(minimal-macosx,
3831 [ --enable-minimal-macosx Minimal Mac OS X support (default disabled)])
3832 if test "${enable_minimal_macosx}" = "yes" -a "${SYS}" = "darwin"
3834 VLC_ADD_PLUGIN([minimal_macosx])
3838 dnl Mac OS X fancy dmg build tool
3840 if test "${HAVE_OSX}" = "1"
3842 AC_PATH_PROG(DMGBUILD, dmgbuild, no)
3843 AS_IF([test "x${DMGBUILD}" = "xno"], [
3844 AC_MSG_WARN([dmgbuild not found -- unable to build fancy DMGs])
3847 AM_CONDITIONAL(HAVE_DMGBUILD, [test "x$DMGBUILD" != "xno" -a "${HAVE_OSX}" = "1"])
3850 dnl VideoToolbox plugins
3851 AC_CHECK_HEADERS(VideoToolbox/VideoToolbox.h, [
3852 VLC_ADD_PLUGIN([videotoolbox])
3853 VLC_ADD_PLUGIN([cvpx_i420])
3859 AC_ARG_ENABLE(ncurses,
3860 [AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)])])
3862 AS_IF([test "${enable_ncurses}" != "no"] ,[
3863 PKG_CHECK_MODULES([NCURSES], [ncursesw], [
3865 ALIASES="${ALIASES} nvlc"
3867 AS_IF([test -n "${enable_ncurses}"], [
3868 AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
3872 AM_CONDITIONAL([HAVE_NCURSES], [test "${have_ncurses}" = "yes"])
3878 [ --enable-lirc lirc support (default disabled)])
3880 AS_IF([test "${enable_lirc}" = "yes"], [
3881 AC_CHECK_HEADER(lirc/lirc_client.h, [
3882 AC_CHECK_LIB(lirc_client, lirc_init, [
3887 AM_CONDITIONAL([HAVE_LIRC], [test "${have_lirc}" = "yes"])
3889 EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
3891 dnl goom visualization plugin
3893 PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [auto])
3896 dnl libprojectM visualization plugin
3898 AC_ARG_ENABLE(projectm,
3899 [ --enable-projectm projectM visualization plugin (default enabled)])
3900 AS_IF([test "${enable_projectm}" != "no"],
3902 PKG_CHECK_MODULES(PROJECTM, libprojectM,
3904 VLC_ADD_PLUGIN([projectm])
3905 PKG_CHECK_EXISTS([libprojectM >= 2.0.0],
3906 [ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ],
3907 [ AC_MSG_WARN( [Using libprojectM version 1] )
3910 AC_MSG_WARN([${PROJECTM_PKG_ERRORS}.])
3915 dnl Vovoid VSXu visualization plugin
3918 [ --enable-vsxu Vovoid VSXu visualization plugin (default auto)])
3919 AS_IF([test "${enable_vsxu}" != "no"],
3921 PKG_CHECK_MODULES(VSXU, libvsxu,
3923 VLC_ADD_PLUGIN([vsxu])
3925 AC_MSG_WARN([${VSXU_PKG_ERRORS}.])
3929 EXTEND_HELP_STRING([Service Discovery plugins:])
3931 dnl Avahi-Zeroconf services discovery
3932 PKG_ENABLE_MODULES_VLC([AVAHI], [], [avahi-client >= 0.6], [Zeroconf services discovery], [auto])
3935 dnl libudev services discovery
3936 PKG_ENABLE_MODULES_VLC([UDEV], [], [libudev >= 142], [Linux udev services discovery], [auto])
3939 dnl MTP devices services discovery
3940 PKG_ENABLE_MODULES_VLC([MTP], [mtp access_mtp], [libmtp >= 1.0.0], [MTP devices support], [auto])
3943 dnl UPnP Plugin (Intel SDK)
3945 PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto])
3948 dnl mDNS using libmicrodns
3950 PKG_ENABLE_MODULES_VLC([MICRODNS], [], [microdns], [mDNS services discovery], [auto])
3953 EXTEND_HELP_STRING([Misc options:])
3958 PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
3964 AC_ARG_ENABLE(libgcrypt,
3965 [ --disable-libgcrypt gcrypt support (default enabled)])
3966 AC_ARG_VAR([GCRYPT_CFLAGS], [C compiler flags for gcrypt])
3967 AC_ARG_VAR([GCRYPT_LIBS], [linker flags flags for gcrypt])
3969 # require libgcrypt >= 1.6.0
3970 AS_IF([test "${enable_libgcrypt}" != "no"], [
3971 AC_CACHE_CHECK([for gcrypt 1.6.0 or later], [ac_cv_lib_gcrypt], [
3973 CFLAGS="${CFLAGS} ${GCRYPT_CFLAGS}"
3974 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
3975 [#include <gcrypt.h>
3976 #if GCRYPT_VERSION_NUMBER < 0x010600
3979 ac_cv_lib_gcrypt=yes
3986 AS_IF([test "${ac_cv_lib_gcrypt}" = "yes"], [
3987 AC_DEFINE([HAVE_GCRYPT], 1, [Defined if having gcrypt])
3989 AS_IF([test "${enable_libgcrypt}" = "yes"], [
3990 AC_MSG_ERROR([libgcrypt version 1.6.0 or higher not found. Install libgcrypt or pass --disable-libgcrypt.])
3995 AS_IF([test -z "$GCRYPT_LIBS"], [
3996 GCRYPT_LIBS="-lgcrypt -lgpg-error"
3999 AC_SUBST(GCRYPT_CFLAGS)
4000 AC_SUBST(GCRYPT_LIBS)
4001 AM_CONDITIONAL([HAVE_GCRYPT], [test "${ac_cv_lib_gcrypt}" = "yes"])
4006 AC_ARG_ENABLE(gnutls,
4007 [ --enable-gnutls GNU TLS TLS/SSL support (default enabled)])
4008 AS_IF([test "${enable_gnutls}" != "no"], [
4009 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.3.6], [
4010 VLC_ADD_PLUGIN([gnutls])
4012 AS_IF([test -n "${enable_gnutls}"], [
4013 AC_MSG_ERROR([${GNUTLS_PKG_ERRORS}.)])
4022 AC_ARG_ENABLE(taglib,
4023 [AS_HELP_STRING([--disable-taglib],
4024 [do not use TagLib (default enabled)])])
4025 AS_IF([test "${enable_taglib}" != "no"], [
4026 PKG_CHECK_MODULES(TAGLIB, taglib >= 1.9, [
4027 VLC_ADD_PLUGIN([taglib])
4029 AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])])
4035 PKG_ENABLE_MODULES_VLC([SECRET], [], [libsecret-1 >= 0.18], [use libsecret for keystore], [auto])
4040 AC_ARG_ENABLE(kwallet,
4041 [AS_HELP_STRING([--enable-kwallet],
4042 [use kwallet (via D-Bus) for keystore (default enabled)])])
4043 AS_IF([test "${enable_kwallet}" != "no" -a "${have_dbus}" = "yes"], [
4044 VLC_ADD_PLUGIN([kwallet])
4048 dnl Developers helper modules (should be hidden from configure help)
4050 AC_ARG_ENABLE(devtools, [], [], [enable_devtools="no"])
4051 AS_IF([test "${enable_devtools}" != "no"], [
4052 VLC_ADD_PLUGIN([accesstweaks])
4056 dnl update checking system
4058 AC_ARG_ENABLE(update-check,
4059 [ --enable-update-check update checking system (default disabled)])
4060 if test "${enable_update_check}" = "yes"
4062 AS_IF([test "${ac_cv_lib_gcrypt}" != "yes"],[
4063 AC_MSG_ERROR([libgcrypt is required for update checking system]) ])
4065 AM_CONDITIONAL(UPDATE_CHECK, [test "${enable_update_check}" = "yes"])
4068 dnl OS X notification plugin
4070 AC_ARG_ENABLE(osx_notifications,
4071 [ --enable-osx-notifications osx notification plugin (default disabled)],,
4072 [enable_osx_notifications=no])
4073 AS_IF([test "${enable_osx_notifications}" != "no"], [
4074 if test ! -d ${CONTRIB_DIR}/Growl.framework -a ! -d ${CONTRIB_DIR}/Frameworks/Growl.framework
4076 VLC_ADD_PLUGIN([osx_notifications])
4077 VLC_ADD_LIBS([osx_notifications], [-Wl,-framework,Growl,-framework,Foundation])
4078 VLC_ADD_OBJCFLAGS([osx_notifications], [-fobjc-exceptions] )
4083 dnl Libnotify notification plugin
4085 PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-2.0], [libnotify notification], [auto])
4088 dnl Endianness check
4091 AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [
4092 DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1"
4096 AC_SUBST(DEFS_BIGENDIAN)
4099 dnl Where to install KDE solid .desktop
4101 AC_ARG_WITH(kde-solid,
4102 AS_HELP_STRING([--with-kde-solid=PATH],
4103 [KDE Solid actions directory (auto)]),, [
4105 if test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ; then
4106 with_kde_solid="yes"
4110 AS_IF([test "${with_kde_solid}" != "no"], [
4111 AS_IF([test "${with_kde_solid}" = "yes"], [
4112 kde4datadir="`${KDE4_CONFIG} --install data`"
4113 AS_IF([test "x$kde4datadir" = "x"], [kde4datadir='${datadir}/kde4/apps'])
4114 soliddatadir="${kde4datadir}/solid/actions"
4116 soliddatadir="${with_kde_solid}"
4119 AC_SUBST(soliddatadir)
4120 AM_CONDITIONAL(KDE_SOLID, [test "x${soliddatadir}" != "x"])
4123 dnl Check wether we have the PROCESS_MITIGATION_IMAGE_LOAD_POLICY
4124 dnl It should only be available when building for win10, but some SDKs define it unconditionnaly
4126 if test "${SYS}" = "mingw32"; then
4127 AC_CHECK_TYPES([PROCESS_MITIGATION_IMAGE_LOAD_POLICY],,,[#include <windows.h>])
4130 EXTEND_HELP_STRING([Components:])
4136 [ --enable-vlc build the VLC media player (default enabled)])
4137 AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"])
4140 dnl Stuff used by the program
4142 VERSION_MESSAGE="${VERSION} ${CODENAME}"
4143 COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
4144 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION_MESSAGE}", [Simple version string])
4145 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "${COPYRIGHT_MESSAGE}", [Copyright string])
4146 AC_DEFINE_UNQUOTED(COPYRIGHT_YEARS, "${COPYRIGHT_YEARS}", [The copyright years])
4147 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
4148 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,${VERSION_MAJOR}, [version major number])
4149 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,${VERSION_MINOR}, [version minor number])
4150 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_REVISION,${VERSION_REVISION}, [version revision number])
4151 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_EXTRA,${VERSION_EXTRA}, [version extra number])
4152 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_DEV,"${VERSION_DEV}", [version development string])
4153 AC_SUBST(COPYRIGHT_MESSAGE)
4154 AC_SUBST(VERSION_MESSAGE)
4155 AC_SUBST(VERSION_MAJOR)
4156 AC_SUBST(VERSION_MINOR)
4157 AC_SUBST(VERSION_REVISION)
4158 AC_SUBST(VERSION_EXTRA)
4159 AC_SUBST(COPYRIGHT_YEARS)
4160 AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami|sed -e 's/\\\/\\\\\\\/g'`", [user who ran configure])
4161 AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -f 2>/dev/null || hostname`", [host which ran configure])
4162 AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1 | sed -e 's/ *$//'`", [compiler])
4164 dnl Handle substvars that use $(top_srcdir)
4166 CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include ${CPPFLAGS}"
4169 dnl Configuration is finished
4179 AC_SUBST(WINE_SDK_PATH)
4181 AC_SUBST(AM_CPPFLAGS)
4182 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
4183 AC_SUBST(FILE_LIBVLCCORE_DLL)
4184 AC_SUBST(FILE_LIBVLC_DLL)
4198 modules/gui/macosx/Makefile
4199 modules/gui/qt/Makefile
4200 modules/hw/mmal/Makefile
4201 share/vlc.appdata.xml.in
4204 AM_COND_IF([HAVE_WIN32], [
4206 extras/package/win32/NSIS/spad.nsi
4207 extras/package/win32/NSIS/vlc.win32.nsi
4208 extras/package/win32/msi/config.wxi
4212 AM_COND_IF([HAVE_DARWIN], [
4214 modules/gui/macosx/UI/InfoPlist.strings:modules/gui/macosx/Resources/InfoPlist.strings.in
4215 share/macosx/Info.plist:share/Info.plist.in
4219 dnl Generate makefiles
4222 dnl Do we have to use make or gmake ?
4223 if make --version 2>&1|grep -q GNU
4225 # GNU make, all seems good
4228 # Known GNU make alias (on BSD)
4231 dnl Shortcut to nice compile message
4232 if test -n $SHELL; then
4233 SHELL=${CONFIG_SHELL-/bin/sh}
4236 compile_top_srcdir=`sed -ne "s/^top_srcdir *= *//p" < Makefile`
4240 export PATH=\"$PATH\" LANG=C
4241 ($MAKE V=1 \$@ 2>&1 || touch .error\$\$)| $compile_top_srcdir/extras/buildsystem/make.pl
4242 test -f .error\$\$ && ERROR=1
4244 exit \$ERROR" >compile
4248 libvlc configuration
4249 --------------------
4250 version : ${VERSION}
4252 architecture : ${ARCH}
4253 optimizations : ${enable_optimizations}"
4254 if test "${enable_vlc}" != "no"; then
4255 echo "vlc aliases :${ALIASES}"
4257 echo "build vlc executable : no"
4260 To build vlc and its plugins, type \`$MAKE', or \`./compile' if you like nice colors."