1 dnl Autoconf settings for vlc
3 AC_COPYRIGHT([Copyright 1999-2018 VLC authors and VideoLAN])
5 AC_INIT([vlc], [4.0.0-dev])
15 CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
16 CODENAME="Otto Chriek"
17 COPYRIGHT_YEARS="1996-2018"
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])
37 AC_USE_SYSTEM_EXTENSIONS
39 AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.])
40 AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
41 AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
42 AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
54 AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
55 AC_CHECK_PROGS([DESKTOP_FILE_VALIDATE], [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
56 AC_ARG_VAR([BUILDCC], [Build system C11 or C99 compiler command])
57 AC_CHECK_PROGS([BUILDCC], [c11-gcc c11 c99-gcc c99], [false])
58 AS_IF([test "$BUILDCC" = "false"], [
59 AC_MSG_ERROR([Cannot find native C99 compiler: please define BUILDCC.])
62 dnl Check for compiler properties
66 AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
68 dnl Extend the --help string at the current spot.
69 AC_DEFUN([EXTEND_HELP_STRING], [m4_divert_once([HELP_ENABLE], [$1])])
71 dnl Allow binary package maintainer to pass a custom string to avoid
73 AC_ARG_WITH([binary-version],
74 AS_HELP_STRING([--with-binary-version=STRING],
75 [To avoid plugins cache problem between binary version]),[],[])
76 AS_IF([test -n "${with_binary_version}"],[
77 AC_DEFINE_UNQUOTED([DISTRO_VERSION],["${with_binary_version}"],
78 [Binary specific version])
81 dnl Prevent clang from accepting unknown flags with a mere warning
82 AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument], [CFLAGS])
83 AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument], [CXXFLAGS])
86 dnl Check the operating system
99 CFLAGS="${CFLAGS} -pthread"
103 CFLAGS="${CFLAGS} -pthread"
107 CFLAGS="${CFLAGS} -pthread"
108 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
109 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
114 CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/usr/X11R6/include"
115 LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/X11R6/lib/"
125 dnl Force gcc "-arch" flag
127 case "${host_cpu}" in
129 ARCH_flag="-arch i386"
132 ARCH_flag="-arch ppc64"
135 ARCH_flag="-arch ppc"
138 ARCH_flag="-arch x86_64"
141 ac_cv_c_bigendian="no"
142 ac_cv_c_attribute_packed="no"
147 CFLAGS="${CFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu11 ${ARCH_flag}"
148 CXX="${CXX} -stdlib=libc++ -std=c++11"
149 CXXFLAGS="${CXXFLAGS} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"
150 CPPFLAGS="${CPPFLAGS} ${ARCH_flag}"
151 OBJCFLAGS="${OBJCFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu11 ${ARCH_flag} -Werror=partial-availability"
152 LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names ${ARCH_flag}"
153 VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit])
154 VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,CoreServices])
157 [#import <TargetConditionals.h>
165 [#import <TargetConditionals.h>
175 dnl Handle Mac OS X SDK flags
177 AC_ARG_WITH(macosx-sdk,
178 AS_HELP_STRING([--with-macosx-sdk=DIR],
179 [compile using the SDK in DIR]))
180 if test "${with_macosx_sdk}" != "" ; then
181 test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
182 CPP="${CPP} -isysroot ${with_macosx_sdk}"
183 CC="${CC} -isysroot ${with_macosx_sdk}"
184 CXX="${CXX} -isysroot ${with_macosx_sdk}"
185 OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
186 LD="${LD} -syslibroot ${with_macosx_sdk}"
188 AC_ARG_WITH(macosx-version-min,
189 AS_HELP_STRING([--with-macosx-version-min=VERSION],
190 [compile for Mac OS X VERSION and above]))
191 if test "${with_macosx_version_min}" != "" ; then
192 CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
193 CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
194 CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
195 OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
196 LD="${LD} -mmacosx_version_min=${with_macosx_version_min}"
199 *mingw32* | *cygwin* | *wince* | *mingwce*)
200 dnl Force libtool to not link to (shared) libgcc_s when detecting C++ dependencies
201 dnl When doing this test with -static-libgcc it will link on (static) libgcc_eh
202 CXXFLAGS="${CXXFLAGS} -static-libgcc"
203 AC_CHECK_TOOL(WINDRES, windres, :)
204 AC_CHECK_TOOL(OBJCOPY, objcopy, :)
205 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
206 [[#ifdef _WIN32_WINNT
207 # error _WIN32_WINNT already defined
211 AC_DEFINE([_WIN32_WINNT], 0x0601, [Define to '0x0601' for Windows 7 APIs.])
213 AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
214 AC_DEFINE([_UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
215 AC_DEFINE([UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
216 AC_DEFINE([_ISOC99_SOURCE], [1], [Extensions to ISO C89 from ISO C99.])
217 AC_DEFINE([_ISOC11_SOURCE], [1], [Extensions to ISO C99 from ISO C11.])
218 AC_DEFINE([_POSIX_SOURCE], [1], [IEEE Std 1003.1.])
219 AC_DEFINE([_POSIX_C_SOURCE], [200809L], [IEEE Std 1003.1.])
220 AC_DEFINE([_XOPEN_SOURCE], [700], [POSIX and XPG 7th edition])
221 AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1], [XPG things and X/Open Unix extensions.])
222 AC_DEFINE([_BSD_SOURCE], [1], [ISO C, POSIX, and 4.3BSD things.])
223 AC_DEFINE([_SVID_SOURCE], [1], [ISO C, POSIX, and SVID things.])
230 dnl Check if we are using the mno-cygwin mode in which case we are
231 dnl actually dealing with a mingw32 compiler.
236 SYS=mingw32, AC_MSG_ERROR([VLC requires -mno-cygwin]))
240 if test "${SYS}" = "mingw32"; then
242 LDFLAGS="${LDFLAGS} -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase"
244 AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
245 ac_default_prefix="`pwd`/_win32"
246 DESTDIR="`pwd`/_win32/"
249 dnl NSIS/MSI Installer prefix and WIN64
251 case "${host_cpu}" in
252 amd64|x86_64|aarch64)
255 PROGRAMFILES="PROGRAMFILES64"
256 LDFLAGS="${LDFLAGS} -Wl,--high-entropy-va -Wl,--image-base,0x140000000"
260 PROGRAMFILES="PROGRAMFILES"
263 AC_SUBST([WINDOWS_ARCH])
264 AC_SUBST([PROGRAMFILES])
279 LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild -Zhigh-mem"
280 AC_LIBOBJ([freeaddrinfo])
281 AC_LIBOBJ([gai_strerror])
282 AC_CHECK_FUNCS([if_nametoindex])
286 AC_DEFINE([_XOPEN_SOURCE], [700], [POSIX and XPG 7th edition])
297 AC_ARG_ENABLE([winstore_app],
298 AS_HELP_STRING([--enable-winstore-app],
299 [Build targetted for Windows Store apps (default disabled)]))
302 AS_IF([test "${SYS}" = "mingw32"],[
304 AS_IF([test "${enable_winstore_app}" = "yes"], [
307 VLC_ADD_LIBS([libvlccore], [-lruntimeobject])
308 AC_LIBOBJ([gai_strerror])
312 AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
314 AM_CONDITIONAL([HAVE_LINUX], [test "${SYS}" = "linux"])
315 AM_CONDITIONAL([HAVE_OS2], [test "${SYS}" = "os2"])
317 AM_CONDITIONAL([HAVE_DARWIN], [test "${SYS}" = "darwin"])
318 AM_CONDITIONAL([HAVE_IOS], [test "${HAVE_IOS}" = "1"])
319 AM_CONDITIONAL([HAVE_OSX], [test "${HAVE_OSX}" = "1"])
320 AM_CONDITIONAL([HAVE_TVOS], [test "${HAVE_TVOS}" = "1"])
322 AM_CONDITIONAL([HAVE_NACL], [test "${SYS}" = "nacl"])
323 AM_CONDITIONAL([HAVE_LIBANL], [test "${HAVE_LIBANL}" = "1"])
325 AM_CONDITIONAL([HAVE_WIN32], [test "${SYS}" = "mingw32"])
326 AM_CONDITIONAL([HAVE_WIN64], [test "${HAVE_WIN64}" = "1"]) dnl Only used for the packaging
327 AM_CONDITIONAL([HAVE_WINSTORE], [test "$vlc_winstore_app" = "1"])
328 AM_CONDITIONAL([HAVE_WIN32_DESKTOP], [test "${SYS}" = "mingw32" -a "$vlc_winstore_app" = "0"])
331 dnl Sadly autoconf does not think about testing foo.exe when ask to test
332 dnl for program foo on win32
333 case "${build_os}" in
335 ac_executable_extensions=".exe"
344 AC_SUBST([BUILDEXEEXT])
346 dnl Android is linux, but a bit different
347 AS_IF([test "$SYS" = linux],[
348 AC_MSG_CHECKING([for an Android system])
349 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
350 [[#ifndef __ANDROID__
361 AM_CONDITIONAL([HAVE_ANDROID], [test "${HAVE_ANDROID}" = "1"])
363 dnl Tizen (minimum SDK version: 2.3)
364 AS_IF([test "$SYS" = linux],[
365 AC_MSG_CHECKING([for Tizen])
366 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
371 AC_DEFINE([HAVE_TIZEN_SDK], [1], [Define to 1 if vlc is built against Tizen SDK])
377 AM_CONDITIONAL([HAVE_TIZEN], [test "${HAVE_TIZEN}" = "1"])
380 dnl Check for the contrib directory
383 AS_HELP_STRING([--with-contrib[=DIR]],
384 [search for 3rd party libraries in DIR/include and DIR/lib])
386 AC_MSG_CHECKING([for 3rd party libraries path])
387 AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
388 CONTRIB_DIR="${srcdir}/contrib/${host}"
389 AS_IF([test ! -d "${CONTRIB_DIR}"], [
390 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
391 CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
392 AS_IF([test ! -d "${CONTRIB_DIR}"], [
393 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
395 AC_MSG_RESULT([not found])
399 AS_IF([test "${with_contrib}" != "no"], [
400 CONTRIB_DIR="${with_contrib}"
403 AC_MSG_RESULT([disabled])
406 AS_IF([test -n "${CONTRIB_DIR}"], [
407 AS_IF([test -d "${CONTRIB_DIR}/lib"],[
408 CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
410 echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
412 AC_MSG_RESULT([not usable])
416 AS_IF([test -n "${CONTRIB_DIR}"], [
417 AC_MSG_RESULT([${CONTRIB_DIR}])
418 CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
419 CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
420 CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
421 OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include -F${CONTRIB_DIR} -F${CONTRIB_DIR}/Frameworks"
422 export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:${CONTRIB_DIR}/share/pkgconfig:$PKG_CONFIG_PATH"
423 LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
425 AS_IF([test -z "$LUAC"], [
426 dnl Old contribs mixed cross-tools and cross-compiled executables
427 AS_IF([test -x "${CONTRIB_DIR}/bin/luac${BUILDEXEEXT}"], [
428 LUAC="${CONTRIB_DIR}/bin/luac${BUILDEXEEXT}"
431 dnl Newer contribs follow usual name space rules
432 AS_IF([test -x "${CONTRIB_DIR}/../bin/${host_alias}-luac${BUILDEXEEXT}"], [
433 LUAC="${CONTRIB_DIR}/../bin/${host_alias}-luac${BUILDEXEEXT}"
437 AS_IF([test "${SYS}" = "darwin"], [
438 export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
439 export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
442 AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
443 AC_MSG_ERROR([Third party libraries not found!])
446 AC_SUBST([CONTRIB_DIR])
448 dnl Add extras/tools to the PATH
449 TOOLS_DIR="${srcdir}/extras/tools/build/bin"
450 AS_IF([test -d "${TOOLS_DIR}"], [
451 TOOLS_DIR=`cd "${TOOLS_DIR}" && pwd`
452 export PATH="${TOOLS_DIR}":$PATH
457 dnl It's very bad, but our former custom system was worst
461 dnl override platform specific check for dependent libraries
462 dnl otherwise libtool linking of shared libraries will
463 dnl fail on anything other than pass_all.
464 AC_CACHE_VAL(lt_cv_deplibs_check_method,
465 [lt_cv_deplibs_check_method=pass_all])
467 LT_INIT([dlopen win32-dll shared disable-static])
469 LT_LANG([Windows Resource])
473 lt_cv_deplibs_check_method=pass_all
475 AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
476 AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
482 AM_GNU_GETTEXT_VERSION([0.19.8])
483 AM_GNU_GETTEXT([external], [need-formatstring-macros])
492 AS_IF([test "${SYS}" = "mingw32"], [
494 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
495 #if !defined(__MINGW32__)
496 # error Not compiling with mingw
500 dnl Check for broken versions of mingw-runtime compatability library
501 AC_MSG_CHECKING(for broken mingw-runtime)
502 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
504 #if defined(__MINGW64_VERSION_MAJOR)
505 # if __MINGW64_VERSION_MAJOR < 5
506 # error Update your mingw-w64! This one is too old.
509 # error You cannot compile with Mingw. Use Mingw-w64!
514 AC_MSG_RESULT([present])
515 AC_MSG_ERROR([LibVLC requires Mingw-w64 version 5.0 or higher!])
518 dnl force use of mingw provided c99 *printf over msvcrt
519 CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
521 dnl Check for the need to include the mingwex lib for mingw32
523 AC_CHECK_LIB([mingwex], [opendir],
524 AC_CHECK_LIB([mingw32], [opendir],,
525 [VLC_ADD_LIBS([libvlccore],[-lmingwex])])
529 AC_MSG_RESULT([Not compiling with mingw])
532 dnl Check for fnative-struct or mms-bitfields support for mingw32
533 AX_CHECK_COMPILE_FLAG([-mms-bitfields], [
534 AX_APPEND_FLAG([-mms-bitfields], [CFLAGS])
535 AX_APPEND_FLAG([-mms-bitfields], [CXXFLAGS])
536 # Check for the warning flag without "-Wno-", GCC accepts
537 # -Wno-<anything> for unsupported warnings, which can trigger
538 # other warnings instead.
539 AX_CHECK_COMPILE_FLAG([-Wincompatible-ms-struct], [
540 AX_APPEND_FLAG([-Wno-incompatible-ms-struct], [CFLAGS])
541 AX_APPEND_FLAG([-Wno-incompatible-ms-struct], [CXXFLAGS])
544 AX_CHECK_COMPILE_FLAG([-fnative-struct], [
545 AX_APPEND_FLAG([-fnative-struct], [CFLAGS])
546 AX_APPEND_FLAG([-fnative-struct], [CXXFLAGS])
553 dnl Buggy glibc prevention. Purposedly not cached.
554 dnl See sourceware.org bugs 5058 and 5443.
555 dnl Ubuntu alone has 20 bug numbers for this...
557 AC_MSG_CHECKING(for buggy GNU/libc versions)
558 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
560 #if defined (__GLIBC__) && (__GLIBC__ == 2) \
561 && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7)
562 # error GNU/libc with dcgettext killer bug!
565 AC_MSG_RESULT([not present])
567 AC_MSG_RESULT([found])
568 AS_IF([test "x${enable_nls}" != "xno"], [
569 AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable
570 work-around for this. Check with your distribution vendor on how to update the
571 glibc run-time. Alternatively, build with --disable-nls.])
575 dnl Plugin compilation stuff
579 dnl Check for system libs needed
582 dnl Check for usual libc functions
583 AC_CHECK_FUNCS([accept4 daemon fcntl flock fstatvfs fork getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale openat pipe2 pread posix_fadvise posix_madvise posix_memalign setlocale stricmp strnicmp strptime uselocale])
584 AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir flockfile fsync getdelim getpid lfind lldiv memrchr nrand48 poll qsort_r recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp pathconf])
585 AC_REPLACE_FUNCS([gettimeofday])
586 AC_CHECK_FUNC(fdatasync,,
587 [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
590 VLC_REPLACE_DECL([realpath], [#include <stdlib.h>])
592 dnl mingw64 implements those as static inline, not functions with C linkage
593 VLC_REPLACE_DECL([asprintf], [#include <stdio.h>])
594 VLC_REPLACE_DECL([vasprintf], [#include <stdio.h>])
595 VLC_REPLACE_DECL([gmtime_r], [#include <time.h>])
596 VLC_REPLACE_DECL([localtime_r], [#include <time.h>])
598 dnl C11 static_assert()
599 AC_MSG_CHECKING([for static_assert in assert.h])
600 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <assert.h>], [
601 static_assert(1, "The impossible happened.");
604 AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define to 1 if <assert.h> defines static_assert.])
609 # Windows CE does not have strcoll()
612 dnl Check for non-standard system calls
615 AC_CHECK_FUNCS([eventfd vmsplice sched_getaffinity recvmmsg memfd_create])
618 AC_CHECK_FUNCS([_lock_file])
622 AH_BOTTOM([#include <vlc_fixups.h>])
624 dnl Check for struct pollfd
625 AC_CHECK_TYPES([struct pollfd],,,
626 [#include <sys/types.h>
629 #elif defined (_WIN32)
630 # include <winsock2.h>
634 dnl Check for struct timespec
635 AC_CHECK_TYPES([struct timespec],,,
638 dnl Check for max_align_t
639 AC_CHECK_TYPES([max_align_t],,,
640 [#include <stddef.h>])
642 dnl Checks for socket stuff
645 AC_SEARCH_LIBS(connect, [socket], [
646 AS_IF([test "$ac_cv_search_connect" != "none required"], [
647 SOCKET_LIBS="$ac_cv_search_connect"
650 AS_IF([test "${SYS}" = "mingw32"], [
651 SOCKET_LIBS="-lws2_32 -liphlpapi"
655 AC_SEARCH_LIBS([inet_pton], [nsl], [
656 AS_IF([test "$ac_cv_search_inet_pton" != "none required"], [
657 SOCKET_LIBS="$ac_cv_search_inet_pton $SOCKET_LIBS"
659 ],, [${SOCKET_LIBS}])
661 LIBS="${LIBS} ${SOCKET_LIBS}"
663 AC_LANG_PROGRAM([#ifdef _WIN32
664 #include <ws2tcpip.h>
666 # if _WIN32_WINNT < 0x600
670 #include <sys/socket.h>
671 #include <arpa/inet.h>
673 char dst[[sizeof(struct in_addr)]];
674 inet_pton(AF_INET, "127.0.0.1", dst);
675 ])],[AC_DEFINE([HAVE_INET_PTON],[1],[Define to 1 if you have inet_pton function])],[AC_LIBOBJ([inet_pton])])
676 AC_CHECK_TYPES([struct if_nameindex],,,[#include <net/if.h>])
677 AC_CHECK_FUNCS([if_nameindex])
679 AC_SUBST([SOCKET_LIBS])
681 dnl Check for socklen_t
682 AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
683 AC_CACHE_CHECK([for socklen_t in sys/socket.h], dnl ` (fix VIM syntax highlight
684 ac_cv_type_socklen_t,
685 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
686 [#include <sys/types.h>
688 # include <winsock2.h>
689 # include <ws2tcpip.h>
691 # include <sys/socket.h>
692 #endif]], [[socklen_t len; len = 0;]])],
693 ac_cv_type_socklen_t=yes,
694 ac_cv_type_socklen_t=no)])
695 AS_IF([test "$ac_cv_type_socklen_t" = no],
696 [AC_DEFINE(socklen_t, int)])
698 dnl Check for struct sockaddr_storage
699 AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
700 AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
701 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
703 [#include <sys/types.h>
704 #if defined( _WIN32 )
705 # include <winsock2.h>
707 # include <sys/socket.h>
708 #endif], [struct sockaddr_storage addr;],
709 ac_cv_struct_sockaddr_storage=yes,
710 ac_cv_struct_sockaddr_storage=no)])
711 AS_IF([test "${ac_cv_struct_sockaddr_storage}" = no], [
712 AC_DEFINE(sockaddr_storage, sockaddr)
713 AC_DEFINE(ss_family, sa_family)
716 dnl FreeBSD has a gnugetopt library for this:
718 AC_CHECK_FUNC(getopt_long,, [
719 AC_CHECK_LIB([gnugetopt],[getopt_long], [
720 GNUGETOPT_LIBS="-lgnugetopt"
723 AC_SUBST([GNUGETOPT_LIBS])
725 AC_CHECK_LIB([m], [cos], [
732 AC_CHECK_LIB([m], [lrintf], [
733 AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])
734 VLC_ADD_LIBS([skins2],[-lm])
736 AC_CHECK_LIB([m], [nanf],
737 AC_DEFINE(HAVE_NANF, 1, [Define to 1 if you have the NANF function])
739 AC_CHECK_LIB([m], [sincos], [
740 AC_DEFINE(HAVE_SINCOS, 1, [Define to 1 if you have the sincos function.])
745 AC_MSG_CHECKING([_Thread_local support])
746 AC_COMPILE_IFELSE([AC_LANG_SOURCE([_Thread_local int foo = 0;
749 AC_DEFINE(HAVE_THREAD_LOCAL, 1, [Defined to 1 if C11 _Thread_local storage qualifier is supported])
750 ],[ AC_MSG_RESULT([no])])
752 dnl __STDC_NO_THREADS__ can't be trusted on some platforms.
753 dnl check for its availability explicitely
754 AC_CHECK_HEADERS([threads.h])
756 AC_CHECK_LIB([anl],[getaddrinfo_a],[
757 AC_DEFINE(HAVE_LIBANL, 1, [Define to 1 if you have the anl library])
760 dnl Check for dynamic plugins
762 have_dynamic_objects="no"
764 AC_SEARCH_LIBS(dlsym, [dl svld], [
765 AS_IF([test "$ac_cv_search_dlsym" != "none required"], [
766 LIBDL="$ac_cv_search_dlsym"
768 have_dynamic_objects="yes"
773 AS_IF([test "${SYS}" = "mingw32"], [
775 have_dynamic_objects="yes" #assume we can use shared objects
778 AC_ARG_WITH([libfuzzer],
779 AS_HELP_STRING([--with-libfuzzer=DIR],
780 [use libFuzzer library from DIR and triggers sanitize coverage (default disabled)]),
783 AS_VAR_IF(with_libfuzzer, no, [], [
788 AM_CONDITIONAL([HAVE_LIBFUZZER], [test "${with_libfuzzer}" != "no"])
790 AS_IF([test "${enable_shared}" = "no"], [
791 have_dynamic_objects=no
793 AM_CONDITIONAL([HAVE_DYNAMIC_PLUGINS], [test "${have_dynamic_objects}" != "no"])
797 AC_SEARCH_LIBS([clock_nanosleep], [rt pthread], [
798 AS_IF([test "$ac_cv_search_clock_nanosleep" != "none required"], [
799 LIBRT="$ac_cv_search_clock_nanosleep"
802 AC_SEARCH_LIBS([nanosleep], [rt pthread posix4], [
803 AS_IF([test "$ac_cv_search_nanosleep" != "none required"], [
804 LIBRT="$ac_cv_search_nanosleep"
811 dnl Check for headers
815 AC_CHECK_HEADERS([arpa/inet.h pthread.h search.h sys/shm.h sys/socket.h sys/uio.h])
816 AC_CHECK_HEADERS([net/if.h], [], [],
818 #include <sys/types.h>
819 #include <sys/socket.h>
821 AC_CHECK_HEADER([syslog.h], [have_syslog="yes"], [have_syslog="no"])
822 AM_CONDITIONAL([HAVE_SYSLOG], [test "$have_syslog" = "yes"])
825 AC_CHECK_HEADERS([netinet/tcp.h netinet/udplite.h sys/param.h sys/mount.h])
828 AC_CHECK_HEADERS([features.h getopt.h linux/dccp.h linux/magic.h mntent.h sys/eventfd.h])
831 AC_CHECK_HEADERS([xlocale.h])
833 dnl Check if C++ headers define locale_t
835 AC_CACHE_CHECK([if C++ headers define locale_t],
836 [ac_cv_cxx_locale_t],
837 [ac_cv_cxx_locale_t=no
838 AC_TRY_COMPILE([#include <locale>], [locale_t loc;],
839 [ac_cv_cxx_locale_t=yes])])
840 if test "${ac_cv_cxx_locale_t}" != "no"; then
841 AC_DEFINE(HAVE_CXX_LOCALE_T, 1, Define to 1 if C++ headers define locale_t)
845 dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
846 AH_TEMPLATE(ssize_t, [Define to `int' if <stddef.h> does not define.]) dnl ` (fix VIM syntax highlight
847 AC_CHECK_TYPE(ssize_t,, [
848 AC_DEFINE(ssize_t, int)
851 dnl It seems that autoconf detects pkg-config only during the first
852 dnl PKG_CHECK_MODULES from configure.ac - which makes sense. But in our case,
853 dnl it is nested within a conditional block, so it was not working right.
854 dnl Make PKG_CONFIG_PATH precious so that it appears in the help and get saved
855 AC_ARG_VAR(PKG_CONFIG_PATH,
856 [Paths where to find .pc not at the default location])
857 PKG_PROG_PKG_CONFIG()
859 dnl On some OS we need static linking
860 AS_IF([test -n "${PKG_CONFIG}" ],[
861 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[
862 PKG_CONFIG="${PKG_CONFIG} --static"
868 dnl Check for zlib.h and -lz if available
870 AC_CHECK_HEADERS([zlib.h], [ have_zlib=yes ], [ have_zlib=no ])
871 AM_CONDITIONAL([HAVE_ZLIB], [ test "${have_zlib}" = "yes" ])
872 if test "${have_zlib}" = "yes"
874 VLC_ADD_LIBS([sap],[-lz])
879 dnl Domain name i18n support via GNU libidn
881 PKG_CHECK_MODULES([IDN], [libidn], [
883 AC_DEFINE([HAVE_IDN], 1, [Define to 1 if you have GNU libidn.])
890 AC_ARG_ENABLE([dbus],
891 AS_HELP_STRING([--enable-dbus],
892 [compile D-Bus message bus support (default enabled)]))
894 AS_IF([test "${enable_dbus}" != "no"], [
895 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.6.0], [
898 AS_IF([test -n "${enable_dbus}"], [
899 AC_MSG_ERROR([${DBUS_PKG_ERRORS}.])
901 AC_MSG_WARN([${DBUS_PKG_ERRORS}.])
905 AM_CONDITIONAL([HAVE_DBUS], [test "${have_dbus}" = "yes"])
908 dnl Check for systemd
909 PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [
912 AC_MSG_WARN([${SYSTEMD_PKG_ERRORS}.])
914 AM_CONDITIONAL([HAVE_SYSTEMD], [test "${have_systemd}" = "yes"])
917 EXTEND_HELP_STRING([Optimization options:])
919 dnl Compiler warnings
922 AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wduplicated-branches -Wduplicated-cond], [CFLAGS])
923 AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wduplicated-branches -Wduplicated-cond], [CXXFLAGS])
925 AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -Wlogical-op -Wshadow=local -Wmultistatement-macros], [CFLAGS])
926 AX_APPEND_COMPILE_FLAGS([-pipe], [CFLAGS])
931 AC_ARG_ENABLE([debug],
932 AS_HELP_STRING([--enable-debug],
933 [build with run-time assertions (default disabled)]),,
936 [Define to 1 if debug code should NOT be compiled])
937 AS_IF([test "${enable_debug}" != "no"], [
938 AC_CHECK_HEADERS([valgrind/valgrind.h])
946 AC_ARG_ENABLE([gprof],
947 AS_HELP_STRING([--enable-gprof],[profile with gprof (default disabled)]),,
949 AS_IF([test "${enable_gprof}" != "no"], [
950 CFLAGS="${CFLAGS} -pg"
951 CXXFLAGS="${CXXFLAGS} -pg"
952 OBJCFLAGS="${OBJCFLAGS} -pg"
953 LDFLAGS="${LDFLAGS} -pg"
956 AC_ARG_ENABLE([cprof],
957 AS_HELP_STRING([--enable-cprof],[profile with cprof (default disabled)]),,
959 AS_IF([test "${enable_gprof}" != "no"], [
960 CFLAGS="${CFLAGS} -finstrument-functions"
961 CXXFLAGS="${CXXFLAGS} -finstrument-functions"
962 OBJCFLAGS="${OBJCFLAGS} -finstrument-functions"
963 LDFLAGS="${LDFLAGS} -finstrument-functions"
969 AC_ARG_ENABLE([coverage],
970 AS_HELP_STRING([--enable-coverage],
971 [build for test coverage (default disabled)]),,
972 [enable_coverage="no"])
973 AS_IF([test "${enable_coverage}" != "no"], [
974 CFLAGS="-fprofile-arcs -ftest-coverage ${CFLAGS}"
975 CXXFLAGS="-fprofile-arcs -ftest-coverage ${CXXFLAGS}"
976 LDFLAGS="-lgcov ${LDFLAGS}"
979 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "os2"], [
981 CFLAGS="${CFLAGS} -fvisibility=hidden"
982 CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
983 OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden"
984 AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden],
985 [ac_cv_c_visibility_hidden], [
986 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
987 ac_cv_c_visibility_hidden=yes
989 ac_cv_c_visibility_hidden=no
992 AS_IF([test "${ac_cv_c_visibility_hidden}" = "no"], [VLC_RESTORE_FLAGS])
998 AC_ARG_WITH([sanitizer],
999 AS_HELP_STRING([--with-sanitizer=(address/memory/undefined/thread)],
1000 [build with sanitizer flags (default disabled)]),
1002 [with_sanitizer=no])
1004 AS_VAR_IF(with_sanitizer, no, [], [
1005 AX_CHECK_COMPILE_FLAG([-fsanitize=${with_sanitizer}], [
1006 AX_APPEND_FLAG([-fsanitize=${with_sanitizer}])
1007 AX_APPEND_FLAG([-fsanitize=${with_sanitizer}], [CXXFLAGS])
1008 AX_APPEND_FLAG([-fsanitize=${with_sanitizer}], [LDFLAGS])
1010 AC_MSG_ERROR(["-fsanitize=${with_sanitizer} not supported!"])
1012 AX_APPEND_FLAG([-g])
1013 AX_APPEND_FLAG([-g], [CXXFLAGS])
1015 AS_IF([test -z "${with_sanitizer##*address*}" ], [
1016 AX_APPEND_COMPILE_FLAGS([-fsanitize-address-use-after-scope -fno-omit-frame-pointer -fsanitize=pointer-compare -fsanitize=pointer-subtract])
1017 AX_APPEND_COMPILE_FLAGS([-fsanitize-address-use-after-scope -fno-omit-frame-pointer -fsanitize=pointer-compare -fsanitize=pointer-subtract], [CXXFLAGS])
1019 AS_IF([test -z "${with_sanitizer##*memory*}" ], [
1020 AX_APPEND_COMPILE_FLAGS([-fPIE -pie])
1021 AX_APPEND_COMPILE_FLAGS([-fPIE -pie], [CXXFLAGS])
1023 AS_IF([test -z "${with_sanitizer##*thread*}" ], [
1024 AX_APPEND_COMPILE_FLAGS([-fPIE -pie])
1025 AX_APPEND_COMPILE_FLAGS([-fPIE -pie], [CXXFLAGS])
1030 dnl Enable/disable optimizations
1032 AC_ARG_ENABLE([optimizations],
1033 AS_HELP_STRING([--disable-optimizations],
1034 [disable compiler optimizations (default enabled)]),,
1035 [enable_optimizations="yes"])
1037 dnl Check for various optimization flags
1038 AS_IF([test "${enable_optimizations}" != "no"], [
1040 dnl -O3 only in production builds
1041 AS_IF([test "${enable_debug}" = "no"], [
1043 CFLAGS="${CFLAGS} -O3"
1044 CXXFLAGS="${CXXFLAGS} -O3"
1045 OBJCFLAGS="${OBJCFLAGS} -O3"
1046 AC_CACHE_CHECK([if $CC accepts -O3], [ac_cv_c_o3], [
1047 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1053 AS_IF([test "${ac_cv_c_o3}" = "no"], [VLC_RESTORE_FLAGS])
1056 dnl Check for fast maths
1057 AX_APPEND_COMPILE_FLAGS([-fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range], [CFLAGS])
1058 AX_APPEND_COMPILE_FLAGS([-fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range], [CXXFLAGS])
1061 #if defined(_MSC_VER) && !defined(__clang__)
1062 # pragma fenv_access(off)
1063 # pragma fp_contract(on)
1064 #elif defined(__GNUC__)
1065 /* Not supported so far */
1067 # pragma STDC FENV_ACCESS OFF
1068 # pragma STDC FP_CONTRACT ON
1072 dnl Check for -funroll-loops
1074 CFLAGS="${CFLAGS} -funroll-loops"
1075 CXXFLAGS="${CXXFLAGS} -funroll-loops"
1076 OBJCFLAGS="${OBJCFLAGS} -funroll-loops"
1077 AC_CACHE_CHECK([if $CC accepts -funroll-loops], [ac_cv_c_unroll_loops], [
1078 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1079 ac_cv_c_unroll_loops=yes
1081 ac_cv_c_unroll_loops=no
1084 AS_IF([test "${ac_cv_c_unroll_loops}" = "no"], [VLC_RESTORE_FLAGS])
1086 AS_IF([test "$enable_debug" = "no"], [
1087 dnl Check for -fomit-frame-pointer
1089 CFLAGS="${CFLAGS} -fomit-frame-pointer"
1090 CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer"
1091 OBJCFLAGS="${OBJCFLAGS} -fomit-frame-pointer"
1092 AC_CACHE_CHECK([if $CC accepts -fomit-frame-pointer],
1093 [ac_cv_c_omit_frame_pointer], [
1094 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1095 ac_cv_c_omit_frame_pointer=yes
1097 ac_cv_c_omit_frame_pointer=no
1100 AS_IF([test "${ac_cv_c_omit_frame_pointer}" = "no"], [VLC_RESTORE_FLAGS])
1105 AC_ARG_ENABLE([ssp],
1106 AS_HELP_STRING([--disable-ssp],
1107 [disable stack smashing protection (default enabled for optimized builds)]), [],
1110 AS_IF([test "${enable_ssp}" != "no" -a "${enable_optimizations}" != "no"], [
1112 AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])
1113 AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong], [CXXFLAGS])
1114 dnl Win32 requires linking to ssp for stack-protection
1115 AS_IF([test "${SYS}" = "mingw32"], [
1116 LDFLAGS="${LDFLAGS} -lssp"
1117 AC_CACHE_CHECK([if linker supports stack protectors], [ac_cv_ld_ssp], [
1118 AC_TRY_LINK([#include <stdio.h>],[char buf[100]; fgets(buf, sizeof(buf), stdin);], [
1124 AS_IF([test "${ac_cv_ld_ssp}" = "no"], [VLC_RESTORE_FLAGS])
1128 AS_IF([test "${SYS}" = "mingw32"], [
1129 dnl library for BCrypt APIs
1130 AS_IF([test "${vlc_winstore_app}" = 1],
1131 [LDFLAGS="${LDFLAGS} -lbcrypt"])
1135 LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic"
1136 AC_CACHE_CHECK([if linker supports -Bsymbolic], [ac_cv_ld_bsymbolic], [
1138 ac_cv_ld_bsymbolic="-Wl,-Bsymbolic"
1140 ac_cv_ld_bsymbolic=""
1144 SYMBOLIC_LDFLAGS="${ac_cv_ld_bsymbolic}"
1145 AC_SUBST([SYMBOLIC_LDFLAGS])
1148 LDFLAGS="${LDFLAGS} -Wl,-z,defs"
1149 AC_CACHE_CHECK([if linker supports -z,defs], [ac_cv_ld_z_defs], [
1151 ac_cv_ld_z_defs="yes"
1153 ac_cv_ld_z_defs="no"
1156 AS_IF([test "${ac_cv_ld_z_defs}" = "no"], [VLC_RESTORE_FLAGS])
1158 dnl Check for __attribute__((packed))
1159 AC_CACHE_CHECK([for __attribute__((packed))],
1160 [ac_cv_c_attribute_packed],
1161 [ac_cv_c_attribute_packed=no
1162 AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b; (void)b;],
1163 [ac_cv_c_attribute_packed=yes])])
1164 if test "${ac_cv_c_attribute_packed}" != "no"; then
1165 AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
1171 case "${host_cpu}" in
1184 dnl Check for backtrace() support
1185 AC_CHECK_HEADERS([execinfo.h])
1186 AC_CHECK_FUNCS([backtrace])
1191 ALIASES="${ALIASES} cvlc rvlc"
1194 dnl Accelerated modules
1197 dnl Check for fully working MMX intrinsics
1198 dnl We need support for -mmmx, we need <mmintrin.h>, and we also need a
1199 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1200 AC_ARG_ENABLE([mmx],
1201 AS_HELP_STRING([--disable-mmx],
1202 [disable MMX optimizations (default auto)]),,[
1203 case "${host_cpu}" in
1214 AS_IF([test "${enable_mmx}" != "no"], [
1217 CFLAGS="${CFLAGS} -mmmx"
1218 AC_CACHE_CHECK([if $CC groks MMX intrinsics], [ac_cv_c_mmx_intrinsics], [
1219 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1220 [#include <mmintrin.h>
1222 uint64_t frobzor;]], [
1224 a = b = c = (__m64)frobzor;
1225 a = _mm_slli_pi16(a, 3);
1226 a = _mm_adds_pi16(a, b);
1227 c = _mm_srli_pi16(c, 8);
1228 c = _mm_slli_pi16(c, 3);
1229 b = _mm_adds_pi16(b, c);
1230 a = _mm_unpacklo_pi8(a, b);
1231 frobzor = (uint64_t)a;]])], [
1232 ac_cv_c_mmx_intrinsics=yes
1234 ac_cv_c_mmx_intrinsics=no
1238 AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
1239 AC_DEFINE(HAVE_MMX_INTRINSICS, 1, [Define to 1 if MMX intrinsics are available.])
1243 CFLAGS="${CFLAGS} -mmmx"
1244 AC_CACHE_CHECK([if $CC groks MMX inline assembly], [ac_cv_mmx_inline], [
1245 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1247 asm volatile("packuswb %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1250 ac_cv_mmx_inline=yes
1255 AS_IF([test "${ac_cv_mmx_inline}" != "no"], [
1256 AC_DEFINE(CAN_COMPILE_MMX, 1, [Define to 1 inline MMX assembly is available.])
1260 AC_CACHE_CHECK([if $CC groks MMX EXT inline assembly],
1261 [ac_cv_mmxext_inline], [
1262 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1264 asm volatile("maskmovq %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1267 ac_cv_mmxext_inline=yes
1269 ac_cv_mmxext_inline=no
1273 AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
1274 AC_DEFINE(CAN_COMPILE_MMXEXT, 1, [Define to 1 if MMX EXT inline assembly is available.])
1278 AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
1279 AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
1281 dnl Check for fully workin SSE2 intrinsics
1282 dnl We need support for -mmmx, we need <emmintrin.h>, and we also need a
1283 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1284 AC_ARG_ENABLE([sse],
1285 AS_HELP_STRING([--disable-sse],
1286 [disable SSE (1-4) optimizations (default auto)]),, [
1287 case "${host_cpu}" in
1297 AS_IF([test "${enable_sse}" != "no"], [
1298 ARCH="${ARCH} sse sse2"
1301 CFLAGS="${CFLAGS} -msse2"
1302 AC_CACHE_CHECK([if $CC groks SSE2 intrinsics], [ac_cv_c_sse2_intrinsics], [
1303 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1304 [#include <emmintrin.h>
1306 uint64_t frobzor;]], [
1308 a = b = c = _mm_set1_epi64((__m64)frobzor);
1309 a = _mm_slli_epi16(a, 3);
1310 a = _mm_adds_epi16(a, b);
1311 c = _mm_srli_epi16(c, 8);
1312 c = _mm_slli_epi16(c, 3);
1313 b = _mm_adds_epi16(b, c);
1314 a = _mm_unpacklo_epi8(a, b);
1315 frobzor = (uint64_t)_mm_movepi64_pi64(a);]])], [
1316 ac_cv_c_sse2_intrinsics=yes
1318 ac_cv_c_sse2_intrinsics=no
1322 AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
1323 AC_DEFINE(HAVE_SSE2_INTRINSICS, 1, [Define to 1 if SSE2 intrinsics are available.])
1327 CFLAGS="${CFLAGS} -msse"
1328 AC_CACHE_CHECK([if $CC groks SSE inline assembly], [ac_cv_sse_inline], [
1329 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1331 asm volatile("xorps %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1334 ac_cv_sse_inline=yes
1340 AS_IF([test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "solaris"], [
1341 AC_DEFINE(CAN_COMPILE_SSE, 1, [Define to 1 if SSE inline assembly is available.])
1344 AC_CACHE_CHECK([if $CC groks SSE2 inline assembly], [ac_cv_sse2_inline], [
1345 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1347 asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1350 ac_cv_sse2_inline=yes
1352 ac_cv_sse2_inline=no
1355 AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [
1356 AC_DEFINE(CAN_COMPILE_SSE2, 1, [Define to 1 if SSE2 inline assembly is available.])
1361 AC_CACHE_CHECK([if $CC groks SSE3 inline assembly], [ac_cv_sse3_inline], [
1362 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1364 asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1367 ac_cv_sse3_inline=yes
1369 ac_cv_sse3_inline=no
1373 AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
1374 AC_DEFINE(CAN_COMPILE_SSE3, 1, [Define to 1 if SSE3 inline assembly is available.]) ])
1376 AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly], [ac_cv_ssse3_inline], [
1377 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1379 asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p):"xmm0");
1382 ac_cv_ssse3_inline=yes
1384 ac_cv_ssse3_inline=no
1388 AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
1389 AC_DEFINE(CAN_COMPILE_SSSE3, 1, [Define to 1 if SSSE3 inline assembly is available.]) ])
1392 AC_CACHE_CHECK([if $CC groks SSE4.1 inline assembly],
1393 [ac_cv_sse4_1_inline], [
1394 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1396 asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1399 ac_cv_sse4_1_inline=yes
1401 ac_cv_sse4_1_inline=no
1405 AS_IF([test "${ac_cv_sse4_1_inline}" != "no"], [
1406 AC_DEFINE(CAN_COMPILE_SSE4_1, 1, [Define to 1 if SSE4_1 inline assembly is available.]) ])
1409 AC_CACHE_CHECK([if $CC groks SSE4.2 inline assembly],
1410 [ac_cv_sse4_2_inline], [
1411 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1413 asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1416 ac_cv_sse4_2_inline=yes
1418 ac_cv_sse4_2_inline=no
1422 AS_IF([test "${ac_cv_sse4_2_inline}" != "no"], [
1423 AC_DEFINE(CAN_COMPILE_SSE4_2, 1, [Define to 1 if SSE4_2 inline assembly is available.]) ])
1426 AC_CACHE_CHECK([if $CC groks SSE4A inline assembly], [ac_cv_sse4a_inline], [
1427 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1429 asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1432 ac_cv_sse4a_inline=yes
1434 ac_cv_sse4a_inline=no
1438 AS_IF([test "${ac_cv_sse4a_inline}" != "no"], [
1439 AC_DEFINE([CAN_COMPILE_SSE4A], [1], [Define to 1 if SSE4A inline assembly is available.]) ])
1441 AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
1444 CFLAGS="${CFLAGS} -mmmx"
1446 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], [
1447 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1449 asm volatile("pfadd %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1452 ac_cv_3dnow_inline=yes
1454 ac_cv_3dnow_inline=no
1458 AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
1459 AC_DEFINE([CAN_COMPILE_3DNOW], 1,
1460 [Define to 1 if 3D Now! inline assembly is available.])
1463 AM_CONDITIONAL([HAVE_3DNOW], [test "$have_3dnow" = "yes"])
1466 AC_ARG_ENABLE([neon],
1467 AS_HELP_STRING([--disable-neon],
1468 [disable ARM NEON optimizations (default auto)]),, [
1469 case "${host_cpu}" in
1481 AS_IF([test "${enable_neon}" != "no"], [
1483 AC_CACHE_CHECK([if $CCAS groks ARM NEON assembly], [ac_cv_arm_neon], [
1484 AS_IF([test "${enable_neon}" != "64"], [
1485 CFLAGS="${CFLAGS} -mfpu=neon -mhard-float"
1488 asm volatile("vqmovun.s64 d0, q1":::"d0");
1496 CFLAGS="${CFLAGS} -march=armv8-a+simd"
1499 asm volatile("uhadd v0.8b, v0.8b, v1.8b":::"v0");
1510 AM_CONDITIONAL([HAVE_NEON], [test "${ac_cv_arm_neon}" = "32"])
1511 AM_CONDITIONAL([HAVE_ARM64], [test "${ac_cv_arm_neon}" = "64"])
1513 AC_ARG_ENABLE([sve],
1514 AS_HELP_STRING([--disable-sve],
1515 [disable ARM SVE optimizations (default auto)]),, [
1516 AS_IF([test "${host_cpu}" = "aarch64"], [enable_sve="yes"] ,[enable_sve="no"])
1518 AS_IF([test "${enable_sve}" != "no"], [
1520 CFLAGS="${CFLAGS} -march=armv8-a+sve"
1521 AC_CACHE_CHECK([if $CCAS groks ARM SVE assembly], [ac_cv_arm_sve], [
1524 asm volatile("ptrue p0.s" ::: "p0");
1534 AM_CONDITIONAL([HAVE_SVE], [test "${ac_cv_arm_sve}" = "yes"])
1537 AC_ARG_ENABLE([altivec],
1538 AS_HELP_STRING([--disable-altivec],
1539 [disable AltiVec optimizations (default auto)]),, [
1540 AS_CASE("${host_cpu}", [powerpc*],
1541 [enable_altivec=yes], [enable_altivec=no])
1545 AS_IF([test "${enable_altivec}" = "yes"], [
1546 ARCH="${ARCH} altivec";
1548 AC_CACHE_CHECK([if $CC groks AltiVec inline assembly],
1549 [ac_cv_altivec_inline],
1550 [AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1551 ac_cv_altivec_inline="yes",
1552 [CFLAGS="${CFLAGS} -Wa,-maltivec"
1553 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1554 [ac_cv_altivec_inline="-Wa,-maltivec"],
1555 ac_cv_altivec_inline=no)
1558 AS_IF([test "${ac_cv_altivec_inline}" != "no"], [
1559 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1,
1560 [Define to 1 if AltiVec inline assembly is available.])
1561 AS_IF([test "${ac_cv_altivec_inline}" != "yes"], [
1562 ALTIVEC_CFLAGS="${ac_cv_altivec_inline}"
1563 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}])
1569 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
1570 [ac_cv_c_altivec], [
1571 CFLAGS="${CFLAGS} -maltivec"
1572 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1573 [#include <altivec.h>]], [
1574 [vec_ld(0, (unsigned char *)0);]])], [
1575 ac_cv_c_altivec="-maltivec"
1577 ac_cv_c_altivec="no"
1581 AS_IF([test "${ac_cv_c_altivec}" != "no"], [
1582 CPPFLAGS="${CPPFLAGS} ${ac_cv_c_altivec}"
1583 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, [Define to 1 if C AltiVec extensions are available.])
1584 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_c_altivec}])
1585 ALTIVEC_CFLAGS="$ALTIVEC_CFLAGS ${ac_cv_c_altivec}"
1586 VLC_ADD_CFLAGS([deinterlace],[${ac_cv_c_altivec}])
1589 AC_CHECK_HEADERS([altivec.h])
1592 LDFLAGS="${LDFLAGS} -Wl,-framework,vecLib"
1593 AC_CACHE_CHECK([if linker needs -framework vecLib],
1595 [AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)])
1597 AS_IF([test "${ac_cv_ld_altivec}" != "no"], [
1598 VLC_ADD_LIBS([libvlccore],[-Wl,-framework,vecLib])
1601 AC_SUBST([ALTIVEC_CFLAGS])
1602 AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])
1607 AC_ARG_ENABLE([optimize-memory],
1608 AS_HELP_STRING([--enable-optimize-memory],
1609 [optimize memory usage over performance]))
1610 if test "${enable_optimize_memory}" = "yes"; then
1611 AC_DEFINE(OPTIMIZE_MEMORY, 1, Define if you want to optimize memory usage over performance)
1615 dnl Allow running as root (useful for people running on embedded platforms)
1617 AC_ARG_ENABLE([run-as-root],
1618 AS_HELP_STRING([--enable-run-as-root],
1619 [allow running VLC as root (default disabled)]))
1620 AS_IF([test "${enable_run_as_root}" = "yes"],[
1621 AC_DEFINE(ALLOW_RUN_AS_ROOT, 1,
1622 [Define to 1 to allow running VLC as root (uid 0).])
1628 AC_ARG_ENABLE([sout],
1629 AS_HELP_STRING([--disable-sout],
1630 [disable streaming output (default enabled)]))
1631 AS_IF([test "${enable_sout}" != "no"], [
1632 AC_DEFINE(ENABLE_SOUT, 1, [Define to 1 for stream output support.])
1634 AM_CONDITIONAL([ENABLE_SOUT], [test "${enable_sout}" != "no"])
1637 AC_ARG_ENABLE([lua],
1638 AS_HELP_STRING([--disable-lua],
1639 [disable LUA scripting support (default enabled)]))
1640 if test "${enable_lua}" != "no"
1642 PKG_CHECK_MODULES(LUA, lua5.2,
1645 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead])
1647 PKG_CHECK_MODULES(LUA, lua5.1,
1650 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
1651 PKG_CHECK_MODULES(LUA, lua >= 5.1,
1654 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
1656 AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
1659 AC_CHECK_LIB( lua5.2 , luaL_newstate,
1660 [LUA_LIBS="-llua5.2"],
1661 AC_CHECK_LIB( lua5.1 , luaL_newstate,
1662 [LUA_LIBS="-llua5.1"],
1663 AC_CHECK_LIB( lua51 , luaL_newstate,
1664 [LUA_LIBS="-llua51"],
1665 AC_CHECK_LIB( lua , luaL_newstate,
1673 if test "x${have_lua}" != "xyes" ; then
1674 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.])
1676 AC_ARG_VAR([LUAC], [LUA byte compiler])
1677 AS_IF([test -z "$LUAC"], [
1678 AC_CHECK_TOOL(LUAC, [luac], [false])
1680 AS_IF([test "${LUAC}" = "false"], [
1681 AC_MSG_ERROR([Could not find the LUA byte compiler.])
1683 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], [
1684 AC_MSG_ERROR([You need 32-bits luac when using lua from contrib.])
1687 AM_CONDITIONAL([BUILD_LUA], [test "${have_lua}" = "yes"])
1691 dnl VideoLAN manager
1693 AC_ARG_ENABLE([vlm],
1694 AS_HELP_STRING([--disable-vlm],
1695 [disable the stream manager (default enabled)]),,
1696 [enable_vlm="${enable_sout}"])
1697 AS_IF([test "${enable_vlm}" != "no"], [
1698 AS_IF([test "${enable_sout}" = "no"], [
1699 AC_MSG_ERROR([VLM requires the stream output. Do not use --disable-sout.])
1701 AC_DEFINE(ENABLE_VLM, 1, [Define if you want the VideoLAN manager support])
1703 AM_CONDITIONAL([ENABLE_VLM], [test "${enable_vlm}" != "no"])
1707 dnl Addons manager storage and repositories modules
1709 AC_ARG_ENABLE([addonmanagermodules],
1710 AS_HELP_STRING([--disable-addonmanagermodules],
1711 [disable the addons manager modules (default enabled)]))
1712 if test "${enable_addonmanagermodules}" != "no"
1714 AC_DEFINE(ENABLE_ADDONMANAGERMODULES, 1, [Define if you want the addons manager modules])
1716 AM_CONDITIONAL([ENABLE_ADDONMANAGERMODULES], [test "${enable_addonmanagermodules}" != "no"])
1723 EXTEND_HELP_STRING([Input plugins:])
1726 dnl libarchive access module
1728 PKG_ENABLE_MODULES_VLC([ARCHIVE], [archive], [libarchive >= 3.1.0], (libarchive support), [auto])
1733 AC_ARG_ENABLE([live555],
1734 AS_HELP_STRING([--enable-live555],
1735 [enable RTSP input through live555 (default enabled)]))
1737 AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
1738 PKG_CHECK_MODULES(LIVE555, live555, [
1739 VLC_ADD_PLUGIN([live555])
1740 VLC_ADD_CXXFLAGS([live555], [$LIVE555_CFLAGS])
1741 VLC_ADD_LIBS([live555],[$LIVE555_LIBS])
1743 AC_MSG_WARN([${LIVE555_PKG_ERRORS}.])
1748 dnl detect include paths
1749 AS_IF([test -f "${CONTRIB_DIR}/include/UsageEnvironment/UsageEnvironment.hh"], [
1750 CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
1752 AS_IF([test "${SYS}" != "os2"], [
1753 LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"}
1754 CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment"
1756 LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"}
1757 CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include"
1758 LDFLAGS_live555="-L${LIVE555_PREFIX}/liveMedia -L${LIVE555_PREFIX}/groupsock -L${LIVE555_PREFIX}/BasicUsageEnvironment -L${LIVE555_PREFIX}/UsageEnvironment"
1763 AS_IF([test "${SYS}" = "solaris"], [
1764 CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
1766 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
1767 LDFLAGS="${LDFLAGS} ${LDFLAGS_live555}"
1770 AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [
1771 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
1772 [#include <liveMedia_version.hh>
1773 #if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1324598400)
1783 AS_IF([test "$ac_cv_live555" = "no"], [
1784 AC_MSG_WARN([live555 is missing or its installed version is too old:
1785 Version 2011.12.23 or later is required to proceed.
1786 You can get an updated one from http://www.live555.com/liveMedia .])
1787 AS_IF([test -n "${enable_live555}"], [
1788 AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
1791 other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
1792 other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
1793 AS_IF([test "${SYS}" = "mingw32"], [
1794 # add ws2_32 for closesocket, select, recv
1795 other_libs="$other_libs -lws2_32"
1798 dnl We need to check for pic because live555 don't provide shared libs
1799 dnl and we want to build a plugins so we need -fPIC on some arch.
1800 VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
1801 VLC_ADD_LDFLAGS([live555], [${LDFLAGS_live555}])
1802 AC_CHECK_LIB([liveMedia_pic], [main], [
1803 VLC_ADD_PLUGIN([live555])
1804 VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
1806 AC_CHECK_LIB([liveMedia], [main], [
1807 VLC_ADD_PLUGIN([live555])
1808 VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
1809 ],[],[${other_libs}])
1810 ],[${other_libs_pic}])
1818 dnl IIDC and DV FireWire input modules
1820 PKG_ENABLE_MODULES_VLC([DC1394], [], [libdc1394-2 >= 2.1.0], [IIDC FireWire input module], [auto])
1821 PKG_ENABLE_MODULES_VLC([DV1394], [], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV FireWire input module], [auto])
1824 dnl - linsys modules: access module check for libzvbi
1826 AC_ARG_ENABLE([linsys],
1827 AS_HELP_STRING([--enable-linsys],
1828 [Linux Linear Systems Ltd. SDI and HD-SDI input cards (default enabled)]))
1829 AS_IF([test "$SYS" = "linux" -a "${enable_linsys}" != "no"], [
1830 VLC_ADD_PLUGIN([linsys_hdsdi])
1831 PKG_CHECK_MODULES(LINSYS_SDI, [zvbi-0.2 >= 0.2.28], [
1832 VLC_ADD_PLUGIN([linsys_sdi])
1834 AC_MSG_WARN([${LINSYS_SDI_PKG_ERRORS}.])
1839 dnl dvdread module: check for libdvdread
1841 PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread > 4.9.0], [dvdread input module], [auto])
1844 dnl libdvdnav plugin
1846 PKG_ENABLE_MODULES_VLC([DVDNAV], [], [dvdnav > 4.9.0], [DVD with navigation input module (dvdnav)], [auto])
1847 AS_IF([test "${enable_dvdnav}" != "no"], [
1848 AC_MSG_CHECKING(for dvdnav_stream_cb in dvdnav/dvdnav.h)
1849 AC_EGREP_HEADER(dvdnav_stream_cb,dvdnav/dvdnav.h,[
1851 AC_DEFINE(HAVE_STREAM_CB_IN_DVDNAV_H, 1, For dvdnav demux support)
1858 dnl Blu-ray Disc Support with libbluray
1860 PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.6.2], (libbluray for Blu-ray disc support ) )
1863 dnl OpenCV wrapper and example filters
1865 PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv > 2.0], (OpenCV (computer vision) filter), [auto])
1869 dnl libsmbclient plugin
1871 PKG_ENABLE_MODULES_VLC([SMBCLIENT], [smbc], [smbclient], (SMB/CIFS support), [auto])
1874 dnl liBDSM access module
1876 AM_CONDITIONAL([HAVE_DSM], [test "$AS_TR_SH(with_dsm)" = "yes"])
1877 PKG_WITH_MODULES([DSM], [libdsm >= 0.2.0], [
1878 VLC_ADD_PLUGIN([dsm])
1879 VLC_ADD_CFLAGS([dsm], [$DSM_CFLAGS])
1880 VLC_ADD_LIBS([dsm], [$DSM_LIBS])
1882 ],,[libdsm SMB/CIFS access/sd module], [auto])
1883 AM_CONDITIONAL([HAVE_DSM], [test "${have_dsm}" = "yes"])
1886 dnl sftp access support
1888 PKG_ENABLE_MODULES_VLC([SFTP], [sftp], [libssh2], (support SFTP file transfer via libssh2), [auto])
1891 dnl nfs access support
1893 PKG_ENABLE_MODULES_VLC([NFS], [nfs], [libnfs >= 1.10.0], (support nfs protocol via libnfs), [auto])
1896 dnl smb2 access support
1898 PKG_ENABLE_MODULES_VLC([SMB2], [smb2], [libsmb2 >= 2.0.0], (support smb2 protocol via libsmb2), [auto])
1903 AC_ARG_ENABLE([v4l2], AS_HELP_STRING([--disable-v4l2],
1904 [disable Video4Linux version 2 (default auto)]))
1906 AS_IF([test "$enable_v4l2" != "no"], [
1907 AC_CHECK_HEADERS([linux/videodev2.h], [
1911 AM_CONDITIONAL([HAVE_V4L2], [test "${have_v4l2}" != "no"])
1914 dnl special access module for Blackmagic SDI cards
1916 AC_ARG_ENABLE([decklink],
1917 AS_HELP_STRING([--disable-decklink],
1918 [disable Blackmagic DeckLink SDI input (default auto)]))
1919 AC_ARG_WITH([decklink_sdk],
1920 AS_HELP_STRING([--with-decklink-sdk=DIR],
1921 [location of Blackmagic DeckLink SDI SDK]))
1923 if test "${enable_decklink}" != "no"
1925 if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}"
1927 VLC_ADD_CPPFLAGS([decklink decklinkoutput stream_out_sdi],[-I${with_decklink_sdk}/include])
1930 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_decklink}"
1932 AC_CHECK_HEADERS([DeckLinkAPIDispatch.cpp], [
1934 AS_IF([test "${SYS}" = "darwin"], [
1935 VLC_ADD_LIBS([decklink decklinkoutput],[-Wl,-framework,CoreFoundation])
1938 AS_IF([test "${enable_decklink}" = "yes"], [
1939 AC_MSG_ERROR([Blackmagic DeckLink SDI include files not found!])
1941 AC_MSG_WARN([Blackmagic DeckLink SDI include files not found, decklink disabled])
1947 AM_CONDITIONAL([HAVE_DECKLINK], [ test "${have_decklink}" != "no" ])
1951 dnl Built-in CD-DA and VCD module
1953 AC_ARG_ENABLE([vcd],
1954 AS_HELP_STRING([--disable-vcd],
1955 [disable built-in VCD and CD-DA support (default enabled)]))
1957 AC_ARG_ENABLE([libcddb],
1958 AS_HELP_STRING([--disable-libcddb],
1959 [disable CDDB for Audio CD (default enabled)]))
1961 if test "${enable_vcd}" != "no"
1963 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
1964 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1966 VLC_ADD_PLUGIN([vcd cdda])
1971 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
1972 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1974 VLC_ADD_PLUGIN([vcd cdda])
1975 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1980 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
1981 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1983 VLC_ADD_PLUGIN([vcd cdda])
1984 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1989 if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32" -o "${SYS}" = "os2" -o "${SYS}" = "darwin"
1991 VLC_ADD_PLUGIN([vcd cdda])
1994 if test "$enable_libcddb" != "no"; then
1995 PKG_CHECK_MODULES(LIBCDDB, [libcddb >= 0.9.5], [
1997 AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed])
1998 VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS])
1999 VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
2001 [AC_MSG_WARN([${LIBCDDB_PKG_ERRORS}: CDDB access disabled.])
2009 AC_CACHE_CHECK([for Linux DVB version 5.1], [ac_cv_linux_dvb_5_1], [
2010 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
2011 [#include <linux/dvb/version.h>
2012 #if (DVB_API_VERSION < 5)
2013 # error Linux DVB API v3.2 and older are not supported.
2015 #if (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR < 1)
2016 # error Linux DVB API v5.0 is unsupported. Please update.
2019 ac_cv_linux_dvb_5_1=yes
2021 ac_cv_linux_dvb_5_1=no
2023 AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_dvb_5_1" = "yes"])
2026 dnl Screen capture module
2028 AC_ARG_ENABLE([screen],
2029 AS_HELP_STRING([--enable-screen],
2030 [disable screen capture (default enabled)]))
2031 if test "${enable_screen}" != "no"; then
2032 if test "${SYS}" = "darwin"; then
2033 AC_CHECK_HEADERS([ApplicationServices/ApplicationServices.h], [
2034 VLC_ADD_PLUGIN([screen])
2038 AM_CONDITIONAL([HAVE_MAC_SCREEN], [test "${SYS}" = "darwin" -a "x${enable_screen}" != "xno"])
2041 dnl VNC/RFB access module
2043 PKG_ENABLE_MODULES_VLC([VNC], [vnc], [libvncclient >= 0.9.9], (VNC/rfb client support), [auto])
2045 dnl RDP/Remote Desktop access module
2047 PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp >= 1.0.1], (RDP/Remote Desktop client support) )
2051 AC_SUBST([have_avfoundation], ["no"])
2052 AC_ARG_ENABLE([macosx-avfoundation],
2053 AS_HELP_STRING([--enable-macosx-avfoundation], [Mac OS X avcapture (video) module (default enabled on Mac OS X)]))
2054 if test "x${enable_macosx_avfoundation}" != "xno" &&
2055 (test "${SYS}" = "darwin" || test "${enable_macosx_avfoundation}" = "yes")
2057 SAVED_LIBS="${LIBS}"
2058 LIBS="-framework AVFoundation"
2059 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[have_avfoundation=yes],[have_avfoundation=no])
2060 LIBS="${SAVED_LIBS}"
2061 if test "${have_avfoundation}" != "no"
2063 VLC_ADD_PLUGIN([avcapture])
2066 AM_CONDITIONAL([HAVE_AVFOUNDATION], [test "${have_avfoundation}" != "no"])
2069 dnl DCP plugin (using asdcplib)
2071 PKG_WITH_MODULES([ASDCP], [asdcplib], [have_asdcp="yes"])
2072 AM_CONDITIONAL([HAVE_ASDCP], [test "${have_asdcp}" = "yes"])
2078 EXTEND_HELP_STRING([Mux/Demux plugins:])
2081 dnl libdvbpsi check for ts mux/demux
2084 PKG_WITH_MODULES([DVBPSI], [libdvbpsi >= 1.2.0], [have_dvbpsi="yes"])
2085 AM_CONDITIONAL([HAVE_DVBPSI], [test "${have_dvbpsi}" = "yes"])
2089 dnl GME demux plugin
2091 AC_ARG_ENABLE([gme],
2092 AS_HELP_STRING([--enable-gme],
2093 [use Game Music Emu (default auto)]))
2094 AS_IF([test "${enable_gme}" != "no"], [
2095 AC_CHECK_HEADER([gme/gme.h], [
2096 AC_CHECK_LIB([gme], [gme_identify_header], [
2097 VLC_ADD_PLUGIN([gme])
2099 AC_CHECK_LIB([gme], [gme_identify_extension], [
2100 VLC_ADD_LIBS([gme], [-lstdc++ $LIBM])
2101 VLC_ADD_PLUGIN([gme])
2102 ],, [-lstdc++ $LIBM])
2104 VLC_ADD_LIBS([gme], [-lgme])
2106 AS_IF([test "x${enable_gme}" != "x"], [
2107 AC_MSG_ERROR([GME cannot be found. Please install the development files.])
2116 AC_ARG_ENABLE([sid],
2117 AS_HELP_STRING([--enable-sid],[C64 sid demux support (default auto)]))
2118 AS_IF([test "${enable_sid}" != "no"], [
2119 PKG_CHECK_MODULES(SID, [libsidplay2], [
2121 oldCPPFLAGS="$CPPFLAGS"
2122 CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
2123 AC_CHECK_HEADER([sidplay/builders/resid.h], [
2124 VLC_ADD_PLUGIN([sid])
2125 VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
2126 VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
2128 AS_IF([test -n "${enable_sid}"],
2129 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2130 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2133 CPPFLAGS="$oldCPPFLAGS"
2136 AS_IF([test "x${enable_sid}" = "xyes"],
2137 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2138 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2145 dnl ogg demux plugin
2147 PKG_ENABLE_MODULES_VLC([OGG], [mux_ogg], [ogg >= 1.0], [Ogg demux support], [auto])
2148 PKG_CHECK_MODULES(LIBVORBIS, [vorbis >= 1.1], [
2149 AC_DEFINE(HAVE_LIBVORBIS, 1, [Define to 1 if you have the libvorbis])
2151 PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto], [${LIBVORBIS_CFLAGS}], [${LIBVORBIS_LIBS}])
2152 if test "${enable_sout}" != "no"; then
2153 dnl Check for libshout
2154 PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
2158 dnl matroska demux plugin
2160 PKG_WITH_MODULES([MATROSKA], [libebml libmatroska], [
2161 VLC_ADD_PLUGIN([mkv])
2162 VLC_ADD_CFLAGS([mkv], [$MATROSKA_CFLAGS])
2163 VLC_ADD_LIBS([mkv], [$MATROSKA_LIBS])
2165 ],,[MKV format support], [auto])
2166 AM_CONDITIONAL([HAVE_MATROSKA], [test "${have_matroska}" = "yes"])
2169 dnl modplug demux plugin
2171 AC_ARG_ENABLE([mod],
2172 AS_HELP_STRING([--disable-mod],
2173 [do not use libmodplug (default auto)]))
2174 if test "${enable_mod}" != "no" ; then
2175 PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [
2176 VLC_ADD_PLUGIN([mod])
2177 VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
2178 VLC_ADD_CFLAGS([mod],[$LIBMODPLUG_CFLAGS]) #modules/demux/mod.c needs CFLAGS_mod, not CXXFLAGS_mod
2179 VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
2181 AS_IF([test -n "${enable_mod}"],
2182 [AC_MSG_ERROR([${LIBMODPLUG_PKG_ERRORS}.])],
2183 [AC_MSG_WARN([${LIBMODPLUG_PKG_ERRORS}.])])
2188 dnl mpc demux plugin
2190 AC_ARG_ENABLE([mpc],
2191 AS_HELP_STRING([--disable-mpc], [do not use libmpcdec (default auto)]))
2192 if test "${enable_mpc}" != "no"
2194 AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
2195 VLC_ADD_PLUGIN([mpc])
2196 VLC_ADD_LIBS([mpc],[-lmpcdec])])
2203 EXTEND_HELP_STRING([Codec plugins:])
2208 AC_ARG_ENABLE([wma-fixed],
2209 AS_HELP_STRING([--enable-wma-fixed], [libwma-fixed module (default disabled)]))
2210 if test "${enable_wma_fixed}" = "yes"
2212 VLC_ADD_PLUGIN([wma_fixed])
2216 dnl shine encoder plugin
2218 PKG_ENABLE_MODULES_VLC([SHINE], [], [shine >= 3.0.0], [MPEG Audio Layer 3 encoder], [auto], [], [], [])
2222 dnl openmax il codec plugin
2224 AC_ARG_ENABLE([omxil],
2225 AS_HELP_STRING([--enable-omxil], [openmax il codec module (default disabled)]))
2226 if test "${enable_omxil}" = "yes"
2228 VLC_ADD_PLUGIN([omxil])
2232 dnl raspberry pi openmax il configuration
2234 AC_ARG_ENABLE([rpi-omxil],
2235 AS_HELP_STRING([--enable-rpi-omxil], [openmax il configured for raspberry pi (default disabled)]))
2236 if test "${enable_rpi_omxil}" = "yes"
2238 VLC_ADD_PLUGIN([omxil])
2239 VLC_ADD_CFLAGS([omxil],[-DRPI_OMX])
2243 dnl CrystalHD codec plugin
2245 AC_ARG_ENABLE([crystalhd],
2246 AS_HELP_STRING([--enable-crystalhd], [crystalhd codec plugin (default auto)]))
2247 if test "${enable_crystalhd}" != "no"; then
2248 AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [
2249 VLC_ADD_PLUGIN([crystalhd])
2250 VLC_ADD_LIBS([crystalhd], [-lcrystalhd])
2252 if test "${SYS}" = "mingw32" ; then
2253 AC_CHECK_HEADERS([libcrystalhd/bc_dts_defs.h], [
2254 VLC_ADD_PLUGIN([crystalhd])
2255 AC_CHECK_HEADERS([libcrystalhd/bc_drv_if.h], [
2256 VLC_ADD_LIBS([crystalhd], [-lbcmDIL])
2259 AS_IF([test x"${enable_crystalhd}" = "xyes"],
2260 [AC_MSG_ERROR("Could not find CrystalHD development headers")],
2261 [AC_MSG_WARN("Could not find CrystalHD development headers")])
2262 ],[#define __LINUX_USER__
2263 #include <libcrystalhd/bc_dts_types.h>
2267 #include <libcrystalhd/bc_dts_types.h>
2278 AC_ARG_WITH(mad, AS_HELP_STRING([--with-mad=PATH], [path to libmad]), [
2283 AS_IF([test "${with_mad}" != "no"], [
2284 MAD_CFLAGS="-I${with_mad}/include"
2285 MAD_LIBS="-L${with_mad}/lib"
2288 AC_ARG_ENABLE([mad],
2289 AS_HELP_STRING([--enable-mad], [libmad module (default enabled)]))
2290 AS_IF([test "${enable_mad}" != "no"], [
2292 CPPFLAGS="${CPPFLAGS} ${MAD_CFLAGS}"
2293 LDFLAGS="${LDFLAGS} ${MAD_LIBS}"
2294 AC_CHECK_HEADERS([mad.h], [
2295 AC_CHECK_LIB([mad], [mad_bit_init], [
2297 MAD_LIBS="${MAD_LIBS} -lmad"
2301 AS_IF([test -n "$enable_mad" -a "${have_mad}" = "no"], [
2302 AC_MSG_ERROR([Could not find libmad. Install it or pass --disable-mad to disable it.])
2305 AC_SUBST([MAD_CFLAGS])
2306 AC_SUBST([MAD_LIBS])
2307 AM_CONDITIONAL([HAVE_MAD], [test "${have_mad}" = "yes"])
2312 PKG_ENABLE_MODULES_VLC([MPG123], [mpg123], [libmpg123], [libmpg123 decoder support], [auto])
2317 AC_ARG_ENABLE([gst-decode],
2318 AS_HELP_STRING([--enable-gst-decode], [GStreamer based decoding support (currently supports only video decoding) (default auto)]))
2320 have_gst_decode="no"
2321 AS_IF([test "${enable_gst_decode}" != "no"], [
2322 PKG_CHECK_MODULES([GST_APP], [gstreamer-app-1.0], [
2323 PKG_CHECK_MODULES([GST_VIDEO], [gstreamer-video-1.0], [
2324 have_gst_decode="yes"
2326 AC_MSG_WARN([${GST_VIDEO_PKG_ERRORS}. GStreamer decoder module will not be built.])
2329 AC_MSG_WARN([${GST_APP_PKG_ERRORS}. GStreamer modules will not be built.])
2332 AM_CONDITIONAL([HAVE_GST_DECODE], [test "${have_gst_decode}" = "yes"])
2335 dnl avcodec decoder/encoder plugin
2337 AC_ARG_ENABLE([merge-ffmpeg],
2338 AS_HELP_STRING([--enable-merge-ffmpeg], [merge FFmpeg-based plugins (default disabled)]),, [
2339 enable_merge_ffmpeg="no"
2341 AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
2343 AC_MSG_CHECKING([for libavutil variant])
2344 PKG_CHECK_EXISTS([libavutil], [
2345 libavutil_version="$(${PKG_CONFIG} --modversion libavutil)"
2346 libavutil_micro="${libavutil_version##*.}"
2347 AS_IF([test ${libavutil_micro} -le 99], [
2355 AC_MSG_RESULT([${avfork}])
2357 AC_ARG_ENABLE([avcodec],
2358 AS_HELP_STRING([--enable-avcodec], [libavcodec codec (default enabled)]))
2359 AS_IF([test "${enable_avcodec}" != "no"], [
2360 dnl We need >=57.16.0 from libav or >=57.37.100 from ffmpeg
2362 libav) av_codec_ver="57.16.0" ;;
2363 dnl 05f66706d182eb0c36af54d72614bf4c33e957a9 includes libavutil 55.9.0
2364 ffmpeg) av_codec_ver="57.37.100" ;;
2365 dnl 7fc329e2dd6226dfecaa4a1d7adf353bf2773726 include libavutil 55.22.101
2366 *) AC_MSG_ERROR([Missing libav or FFmpeg. Pass --disable-avcodec to ignore this error.])
2368 PKG_CHECK_MODULES(AVCODEC,[libavcodec >= ${av_codec_ver} libavutil >= 55.9.0], [
2370 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2371 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2372 AC_CHECK_HEADERS([libavcodec/avcodec.h])
2373 AC_CHECK_HEADERS([libavutil/avutil.h])
2377 AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
2382 AM_CONDITIONAL([HAVE_AVCODEC], [test "${have_avcodec}" != "no"])
2385 dnl libva needs avcodec
2387 AC_ARG_ENABLE([libva],
2388 AS_HELP_STRING([--enable-libva], [VAAPI GPU decoding support (libVA) (default auto)]))
2390 AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
2391 AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
2398 AS_IF([test "${enable_libva}" != "no"], [
2399 PKG_CHECK_MODULES([LIBVA], [libva >= 0.38], [
2402 AS_IF([test -n "${enable_libva}"], [
2403 AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
2405 AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
2408 PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm], [
2409 have_vaapi_drm="yes"
2411 AC_MSG_WARN([${LIBVA_DRM_PKG_ERRORS}.])
2413 PKG_CHECK_MODULES(LIBVA_X11, [libva-x11], [
2414 have_vaapi_x11="yes"
2416 AC_MSG_WARN([${LIBVA_X11_PKG_ERRORS}.])
2418 PKG_CHECK_MODULES(LIBVA_WL, [libva-wayland], [
2421 AC_MSG_WARN([${LIBVA_WL_PKG_ERRORS}.])
2424 AM_CONDITIONAL([HAVE_VAAPI], [test "${have_vaapi}" = "yes"])
2425 AM_CONDITIONAL([HAVE_VAAPI_DRM], [test "${have_vaapi_drm}" = "yes"])
2426 AM_CONDITIONAL([HAVE_VAAPI_X11], [test "${have_vaapi_x11}" = "yes"])
2427 AM_CONDITIONAL([HAVE_VAAPI_WL], [test "${have_vaapi_wl}" = "yes"])
2429 have_avcodec_vaapi="no"
2430 AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
2432 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2433 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2434 AC_CHECK_HEADERS([libavcodec/vaapi.h], [
2435 AC_MSG_NOTICE([VA API acceleration activated])
2436 have_avcodec_vaapi="yes"
2438 AS_IF([test -n "${enable_libva}"], [
2439 AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
2441 AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
2446 AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"])
2449 dnl dxva2 needs avcodec
2451 AC_ARG_ENABLE([dxva2],
2452 AS_HELP_STRING([--enable-dxva2], [DxVA2 GPU decoding support (default auto)]))
2454 have_avcodec_dxva2="no"
2455 AS_IF([test "${enable_dxva2}" != "no"], [
2456 if test "${SYS}" = "mingw32"; then
2457 AS_IF([test "x${have_avcodec}" = "xyes"], [
2458 AC_CHECK_HEADERS([dxva2api.h],
2460 AC_CHECK_HEADERS([libavcodec/dxva2.h], [
2461 AC_MSG_NOTICE([DxVA2 acceleration activated])
2462 have_avcodec_dxva2="yes"
2464 AS_IF([test "${enable_dxva2}" = "yes"],
2465 [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
2466 [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
2467 ], [#undef _WIN32_WINNT
2468 /* DXVA2 is only available in Vista and above */
2469 #define _WIN32_WINNT 0x600])
2471 AS_IF([test "${enable_dxva2}" = "yes"],
2472 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2473 [AC_MSG_WARN([dxva2api.h not found])])
2474 ],[#include <d3d9.h>])
2476 AS_IF([test "x${enable_dxva2}" != "x"], [
2477 AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
2482 AM_CONDITIONAL([HAVE_AVCODEC_DXVA2], [test "${have_avcodec_dxva2}" = "yes"])
2485 dnl d3d11va needs avcodec
2487 AC_ARG_ENABLE([d3d11va],
2488 AS_HELP_STRING([--enable-d3d11va], [D3D11 GPU decoding support (default auto)]))
2490 have_avcodec_d3d11va="no"
2491 AS_IF([test "${enable_d3d11va}" != "no"], [
2492 if test "${SYS}" = "mingw32"; then
2493 AS_IF([test "x${have_avcodec}" = "xyes"], [
2494 AC_CHECK_TYPES([ID3D11VideoDecoder],
2496 AC_CHECK_HEADERS([dxva2api.h],
2498 AC_CHECK_HEADERS([libavcodec/d3d11va.h], [
2499 AC_MSG_NOTICE([D3D11 acceleration activated])
2500 AC_DEFINE([HAVE_AVCODEC_D3D11VA], [1], [Define if the d3d11va module is built])
2501 have_avcodec_d3d11va="yes"
2503 AS_IF([test "${enable_d3d11va}" = "yes"],
2504 [AC_MSG_ERROR([d3d11va is present but libavcodec/d3d11va.h is missing])],
2505 [AC_MSG_WARN([d3d11va is present but libavcodec/d3d11va.h is missing ])])
2506 ], [#undef _WIN32_WINNT
2507 /* D3D11 is only available in Vista and above */
2508 #define _WIN32_WINNT 0x600])
2510 AS_IF([test "${enable_d3d11va}" = "yes"],
2511 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2512 [AC_MSG_WARN([dxva2api.h not found])])
2513 ],[#include <d3d9.h>])
2515 AS_IF([test "${enable_d3d11va}" = "yes"],
2516 [AC_MSG_ERROR([Could not find required ID3D11VideoDecoder in d3d11.h])],
2517 [AC_MSG_WARN([ID3D11VideoDecoder not found])])
2518 ], [#include <d3d11.h>])
2520 AS_IF([test "x${enable_d3d11va}" != "x"], [
2521 AC_MSG_ERROR([--enable-d3d11va and --disable-avcodec options are mutually exclusive.])
2526 AM_CONDITIONAL([HAVE_AVCODEC_D3D11VA], [test "${have_avcodec_d3d11va}" = "yes"])
2531 AC_CHECK_HEADERS([dxgidebug.h dxgi1_6.h])
2534 dnl avformat demuxer/muxer plugin
2537 AC_ARG_ENABLE([avformat],
2538 AS_HELP_STRING([--enable-avformat], [libavformat containers (default enabled)]),, [
2539 enable_avformat="${have_avcodec}"
2542 AS_IF([test "${enable_avformat}" != "no"], [
2543 PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil], [
2546 CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
2547 CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
2548 AC_CHECK_HEADERS([libavformat/avformat.h libavformat/avio.h])
2549 AC_CHECK_HEADERS([libavcodec/avcodec.h])
2550 AC_CHECK_HEADERS([libavutil/avutil.h])
2551 AS_IF([test "$enable_merge_ffmpeg" = "no"], [
2556 AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
2559 AM_CONDITIONAL([HAVE_AVFORMAT], [test "${enable_avformat}" != "no"])
2562 dnl swscale image scaling and conversion plugin
2565 AC_ARG_ENABLE([swscale],
2566 AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion
2567 (default enabled)]))
2568 if test "${enable_swscale}" != "no"
2570 PKG_CHECK_MODULES(SWSCALE,[libswscale],
2573 CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
2574 CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
2575 AC_CHECK_HEADERS([libswscale/swscale.h])
2576 AC_CHECK_HEADERS([libavutil/avutil.h])
2577 VLC_ADD_PLUGIN([swscale])
2578 VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
2579 VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
2580 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2581 VLC_ADD_LIBS([swscale],[${ac_cv_ld_bsymbolic}])
2585 AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
2593 AC_ARG_ENABLE([postproc],
2594 AS_HELP_STRING([--enable-postproc], [libpostproc image post-processing (default auto)]))
2595 if test "${enable_postproc}" != "no"
2597 PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
2600 CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
2601 CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
2602 AC_CHECK_HEADERS([postproc/postprocess.h])
2603 VLC_ADD_PLUGIN([postproc])
2606 AC_MSG_WARN([${POSTPROC_PKG_ERRORS}.])
2611 dnl faad decoder plugin
2613 AC_ARG_ENABLE([faad],
2614 AS_HELP_STRING([--enable-faad], [faad codec (default auto)]))
2616 AS_IF([test "${enable_faad}" != "no"], [
2617 AC_CHECK_HEADERS([neaacdec.h], [
2618 AC_CHECK_LIB([faad], [NeAACDecOpen], [have_faad="yes"],, [$LIBM])
2620 AS_IF([test "${have_faad}" = "yes"], [
2621 VLC_ADD_PLUGIN([faad])
2622 VLC_ADD_LIBS([faad],[-lfaad])
2624 AS_IF([test "${enable_faad}" = "yes"], [
2625 AC_MSG_ERROR([cannot find FAAD library])
2627 AC_MSG_WARN([cannot find FAAD library])
2634 dnl AOM decoder plugin
2636 PKG_ENABLE_MODULES_VLC([AOM], [], [aom], [experimental AV1 codec (default auto)])
2639 dnl Dav1d decoder plugin
2641 PKG_ENABLE_MODULES_VLC([DAV1D], [], [dav1d], [AV1 decoder (default auto)])
2644 dnl libvpx decoder plugin
2646 AC_ARG_ENABLE([vpx],
2647 AS_HELP_STRING([--enable-vpx],[libvpx VP8/VP9 encoder and decoder (default auto)]))
2648 AS_IF([test "${enable_vpx}" != "no"],[
2649 PKG_CHECK_MODULES([VPX], [vpx >= 1.5.0], [
2650 VLC_ADD_PLUGIN([vpx])
2651 VLC_ADD_CPPFLAGS([vpx], [${VPX_CFLAGS}])
2652 VLC_ADD_LIBS([vpx], [${VPX_LIBS}])
2653 AC_CHECK_LIB([vpx],[vpx_codec_vp8_dx], [
2654 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_DECODER])
2655 ], [], [${VPX_LIBS}])
2656 AC_CHECK_LIB([vpx],[vpx_codec_vp9_dx], [
2657 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_DECODER])
2658 ], [], [${VPX_LIBS}])
2659 AC_CHECK_LIB([vpx],[vpx_codec_vp8_cx], [
2660 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_ENCODER])
2661 ], [], [${VPX_LIBS}])
2662 AC_CHECK_LIB([vpx],[vpx_codec_vp9_cx], [
2663 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_ENCODER])
2664 ], [], [${VPX_LIBS}])
2666 AS_IF([test "${enable_vpx}" = "yes"],[
2667 AC_MSG_ERROR([libvpx 1.5.0 or higher was not found])
2672 dnl twolame encoder plugin
2674 PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])
2677 dnl fdk-aac encoder plugin
2679 PKG_ENABLE_MODULES_VLC([FDKAAC], [], [fdk-aac], [FDK-AAC encoder], [disabled])
2683 dnl A52/AC3 decoder plugin
2685 AC_ARG_ENABLE([a52],
2686 AS_HELP_STRING([--enable-a52], [A/52 support with liba52 (default enabled)]))
2687 if test "${enable_a52}" != "no"
2690 AS_HELP_STRING([--with-a52=PATH], [a52 headers and libraries]))
2691 if test -z "${with_a52}"
2696 LDFLAGS_test="-L${with_a52}/lib"
2697 CPPFLAGS_test="-I${with_a52}/include"
2700 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_test} ${CPPFLAGS_a52}"
2701 LDFLAGS="${LDFLAGS} ${LDFLAGS_test} ${LIBS_a52}"
2702 AC_CHECK_HEADERS([a52dec/a52.h], [
2703 AC_CHECK_LIB([a52], [a52_free], [
2704 VLC_ADD_PLUGIN([a52])
2705 VLC_ADD_LIBS([a52],[${LDFLAGS_test} -la52 $LIBM])
2706 VLC_ADD_CPPFLAGS([a52],[${CPPFLAGS_test}])
2708 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.])
2711 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.])
2717 dnl DTS Coherent Acoustics decoder plugin
2719 PKG_ENABLE_MODULES_VLC([DCA], [dca], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
2724 PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])
2729 PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])
2734 PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
2739 AC_ARG_ENABLE([tremor],
2740 AS_HELP_STRING([--enable-tremor], [Tremor decoder support (default disabled)]))
2741 if test "${enable_tremor}" = "yes"
2743 AC_CHECK_HEADERS([tremor/ivorbiscodec.h], [
2744 VLC_ADD_PLUGIN([tremor])
2751 PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex support], [auto])
2753 AS_IF([test "${enable_speex}" != "no"], [
2754 PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
2757 AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
2760 AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
2765 PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus >= 1.0.3], [Opus support], [auto])
2768 dnl Ambisonic channel mixer and binauralizer plugin
2770 PKG_ENABLE_MODULES_VLC([SPATIALAUDIO], [], [spatialaudio], [Ambisonic channel mixer and binauralizer], [auto])
2773 dnl theora decoder plugin
2775 PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto])
2778 dnl OggSpots decoder plugin
2780 PKG_ENABLE_MODULES_VLC([OGGSPOTS], [], [ogg], [experimental OggSpots codec], [auto])
2783 dnl Daala decoder plugin
2785 PKG_ENABLE_MODULES_VLC([DAALA], [], [daaladec daalaenc], [experimental daala codec], [disabled])
2788 dnl schroedinger decoder plugin (for dirac format video)
2790 PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
2793 dnl PNG decoder module
2795 AC_ARG_ENABLE([png],
2796 AS_HELP_STRING([--enable-png], [PNG support (default enabled)]))
2797 AS_IF([test "${enable_png}" != "no"], [
2798 AC_CHECK_HEADERS([png.h], [
2800 LDFLAGS="${LDFLAGS} -lz $LIBM"
2801 AC_CHECK_LIB([png], [png_set_alpha_mode], [
2802 VLC_ADD_PLUGIN([png])
2809 dnl JPEG decoder module
2811 AC_ARG_ENABLE([jpeg],
2812 AS_HELP_STRING([--enable-jpeg], [JPEG support (default enabled)]))
2813 AS_IF([test "${enable_jpeg}" != "no"], [
2814 AC_CHECK_HEADERS([jpeglib.h], [
2815 VLC_ADD_PLUGIN([jpeg])
2820 dnl BPG decoder module
2822 AC_ARG_ENABLE([bpg],
2823 AS_HELP_STRING([--enable-bpg], [BPG support (default disabled)]))
2824 AS_IF([test "${enable_bpg}" != "no"], [
2825 AC_CHECK_HEADERS([libbpg.h], [
2826 VLC_ADD_PLUGIN([bpg])
2831 dnl H262 encoder plugin (lib262)
2833 AC_ARG_ENABLE([x262],
2834 AS_HELP_STRING([--enable-x262], [H262 encoding support with static libx262 (default disabled)]))
2835 if test "${enable_x262}" != "no"; then
2836 PKG_CHECK_MODULES(X262, x262, [
2837 VLC_ADD_PLUGIN([x262])
2838 VLC_ADD_LDFLAGS([x262],[${X262_LIBS}])
2839 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2840 VLC_ADD_LIBS([x262],[${av_cv_ld_bsymbolic}])
2842 VLC_ADD_CFLAGS([x262],[${X262_CFLAGS}])
2843 if echo ${X262_LIBS} |grep -q 'pthreadGC2'; then
2844 VLC_ADD_CFLAGS([x262], [-DPTW32_STATIC_LIB])
2847 if test "${enable_x262}" = "yes"; then
2848 AC_MSG_ERROR([x262 module doesn't work without staticly compiled libx262.a])
2854 PKG_ENABLE_MODULES_VLC([X265],, [x265], [HEVC/H.265 encoder], [auto])
2857 dnl H264 encoder plugin (using libx264)
2859 AC_ARG_ENABLE([x264],
2860 AS_HELP_STRING([--enable-x264], [H264 encoding support with libx264 (default enabled)]))
2861 if test "${enable_x264}" != "no"; then
2862 PKG_CHECK_MODULES(X264,x264 >= 0.148, [
2863 VLC_ADD_PLUGIN([x264])
2864 VLC_ADD_LIBS([x264],[${X264_LIBS}])
2866 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2867 VLC_ADD_LDFLAGS([x264],[${ac_cv_ld_bsymbolic}])
2870 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2871 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2872 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2875 if test "${enable_x264}" = "yes"; then
2876 AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
2882 dnl H264 encoder plugin (libx264 > 153)
2884 AC_ARG_ENABLE([x26410b],
2885 AS_HELP_STRING([--enable-x26410b], [H264 10-bit encoding support with libx264 (default enabled)]))
2886 if test "${enable_x26410b}" != "no"; then
2887 PKG_CHECK_MODULES(X26410b,x264 >= 0.153, [
2888 VLC_ADD_PLUGIN([x26410b])
2889 VLC_ADD_LIBS([x26410b],[${X264_LIBS}])
2891 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2892 VLC_ADD_LDFLAGS([x26410b],[${ac_cv_ld_bsymbolic}])
2895 VLC_ADD_CFLAGS([x26410b],[${X264_CFLAGS}])
2896 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2897 VLC_ADD_CFLAGS([x26410b], [-DPTW32_STATIC_LIB])
2900 if test "${enable_x26410b}" = "yes"; then
2901 AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
2908 dnl Intel QuickSync (aka MediaSDK) H264/H262 encoder
2910 PKG_ENABLE_MODULES_VLC([MFX], [qsv], [libmfx], [Intel QuickSync MPEG4-Part10/MPEG2 (aka H.264/H.262) encoder], [auto])
2913 dnl libfluidsynth (MIDI synthetizer) plugin
2915 PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.2], [MIDI synthetiser with libfluidsynth], [auto])
2916 PKG_ENABLE_MODULES_VLC([FLUIDLITE], [fluidsynth], [fluidlite], [MIDI synthetiser with libfluidsynth], [auto])
2917 AC_CHECK_HEADERS([fluidlite.h], [AC_SUBST([FLUIDSYNTH_LIBS], ${FLUIDLITE_LIBS})])
2920 dnl Teletext Modules
2921 dnl vbi decoder plugin (using libzbvi)
2925 AC_ARG_ENABLE([zvbi],
2926 AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
2927 libzvbi (default enabled)]))
2928 AC_ARG_ENABLE([telx],
2929 AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
2930 zvbi) (default enabled if zvbi is absent)]))
2932 AS_IF( [test "${enable_zvbi}" != "no"],[
2933 PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.28],
2935 VLC_ADD_PLUGIN([zvbi])
2936 AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built])
2937 AS_IF( [test "${enable_telx}" = "yes"],[
2938 AC_MSG_WARN([The zvbi and telx modules are incompatible. Using zvbi.])
2941 AC_MSG_WARN([${ZVBI_PKG_ERRORS}. Enabling the telx module instead.])
2944 AS_IF( [test "${enable_telx}" != "no" ],[
2945 VLC_ADD_PLUGIN([telx])
2949 dnl ARIB subtitles rendering module
2951 AC_ARG_ENABLE([aribsub],
2952 AS_HELP_STRING([--enable-aribsub],[ARIB Subtitles support (default enabled)]))
2953 AS_IF( [test "${enable_aribsub}" != "no" ],[
2954 PKG_CHECK_MODULES(ARIBB24, [aribb24 >= 1.0.1], [
2956 VLC_ADD_PLUGIN([aribsub])
2957 VLC_ADD_LIBS([aribsub],[-laribb24])
2958 AC_DEFINE(HAVE_ARIBB24, 1, [Define if libaribb24 is available.])
2960 AC_MSG_WARN(Library [aribb24] needed for [aribsub] was not found)
2964 AM_CONDITIONAL([HAVE_ARIBB24], [test x"${have_aribb24}" = x"yes"])
2969 PKG_ENABLE_MODULES_VLC([ARIBB25], [aribcam], [aribb25 >= 0.2.6], [ARIB STD-B25], [auto])
2972 dnl kate decoder plugin
2974 PKG_ENABLE_MODULES_VLC([KATE], [], [kate >= 0.3.0], [kate codec], [auto])
2977 dnl tiger rendering for kate decoder plugin
2979 AC_ARG_ENABLE([tiger],
2980 AS_HELP_STRING([--enable-tiger], [Tiger rendering library for Kate streams (default auto)]))
2981 AS_IF([test "${enable_tiger}" != "no"], [
2982 PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
2983 AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])],[
2984 AS_IF([test -n "${enable_tiger}"], [
2985 AC_MSG_ERROR([${TIGER_PKG_ERRORS}.])
2991 dnl check if we can build the css selector engine
2993 AC_ARG_ENABLE([css],
2994 AS_HELP_STRING([--enable-css], [CSS selector engine (default auto)]))
2995 AS_IF([test "${enable_css}" != "no"], [
2997 AC_DEFINE(HAVE_CSS, 1, [Define if CSS engine is built])
2999 AM_CONDITIONAL([ENABLE_CSS], [test "${with_css}" = "yes"])
3006 EXTEND_HELP_STRING([Video plugins:])
3009 dnl libplacebo support
3011 AC_ARG_ENABLE([libplacebo],
3012 AS_HELP_STRING([--disable-libplacebo],
3013 [disable libplacebo support (default auto)]))
3015 AS_IF([test "$enable_libplacebo" != "no"], [
3016 PKG_CHECK_MODULES([LIBPLACEBO], [libplacebo >= 0.5], [
3017 AC_DEFINE([HAVE_LIBPLACEBO], [1], [Define to 1 if libplacebo is enabled.])
3018 PKG_CHECK_MODULES([LIBPLACEBO], [libplacebo >= 1.7],
3019 [have_libplacebo_vk="yes"], [have_libplacebo_vk="no"])
3021 AS_IF([test -n "${enable_libplacebo}"], [
3022 AC_MSG_ERROR([${LIBPLACEBO_PKG_ERRORS}.])
3024 enable_libplacebo="no"
3027 AM_CONDITIONAL([HAVE_LIBPLACEBO], [test "$enable_libplacebo" != "no"])
3032 PKG_CHECK_MODULES([EGL], [egl], [
3037 AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
3040 PKG_CHECK_MODULES([GL], [gl], [
3043 AC_MSG_CHECKING([for OpenGL])
3044 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3046 # include <GL/glew.h>
3050 [int t0 = GL_TEXTURE0;]])
3054 AS_IF([test "${SYS}" != "mingw32"], [
3057 GL_LIBS="-lopengl32"
3060 AC_MSG_RESULT([${have_gl}])
3062 AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
3063 AS_IF([test "${have_gl}" = "yes"], [
3064 AC_DEFINE([HAVE_GL], 1, [Defined if having OpenGL])
3067 dnl OpenGL ES 2: depends on EGL 1.1
3068 PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
3073 AC_ARG_ENABLE(vulkan,
3074 [AS_HELP_STRING([--disable-vulkan],
3075 [disable Vulkan support (default auto)])])
3077 AS_IF([test "$enable_vulkan" != "no"], [
3078 AS_IF([test "$have_libplacebo_vk" = "yes"], [
3079 PKG_CHECK_MODULES([VULKAN], [vulkan >= 1.0.26], [
3080 AC_DEFINE([HAVE_VULKAN], [1], [Define to 1 if vulkan is enabled.])
3082 AS_IF([test -n "${enable_vulkan}"], [
3083 AC_MSG_ERROR([${VULKAN_PKG_ERRORS}.])
3088 AS_IF([test -n "${enable_vulkan}"], [
3089 AC_MSG_ERROR([Vulkan support requires libplacebo 1.7 as well. Do not use --disable-libplacebo.])
3094 AM_CONDITIONAL(HAVE_VULKAN, [test "$enable_vulkan" != "no"])
3101 AC_CHECK_HEADERS([X11/Xlib.h])
3104 dnl X C Bindings modules
3106 AC_ARG_ENABLE([xcb],
3107 AS_HELP_STRING([--enable-xcb], [X11 support with XCB (default enabled)]),, [
3108 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "darwin"], [
3116 have_xkbcommon_x11="no"
3117 have_xcb_keysyms="no"
3118 AS_IF([test "${enable_xcb}" != "no"], [
3122 PKG_CHECK_MODULES([XCB], [xcb >= 1.6],, [
3123 xcb_err="$xcb_err ${XCB_PKG_ERRORS}."])
3124 PKG_CHECK_MODULES([XCB_COMPOSITE], [xcb-composite],, [
3125 xcb_err="$xcb_err ${XCB_COMPOSITE_PKG_ERRORS}."])
3126 PKG_CHECK_MODULES([XCB_RANDR], [xcb-randr >= 1.3],, [
3127 xcb_err="$xcb_err ${XCB_RANDR_PKG_ERRORS}."])
3128 PKG_CHECK_MODULES([XCB_RENDER], [xcb-render],, [
3129 xcb_err="$xcb_err ${XCB_RENDER_PKG_ERRORS}."])
3130 PKG_CHECK_MODULES([XCB_SHM], [xcb-shm >= 1.9.2],, [
3131 xcb_err="$xcb_err ${XCB_SHM_PKG_ERRORS}."])
3132 PKG_CHECK_MODULES([XCB_XKB], [xcb-xkb],, [
3133 xcb_err="$xcb_err ${XCB_XKB_PKG_ERRORS}."])
3134 PKG_CHECK_MODULES([XCB_XV], [xcb-xv >= 1.1.90.1],, [
3135 xcb_err="$xcb_err ${XCB_XV_PKG_ERRORS}."])
3138 PKG_CHECK_MODULES(XPROTO, [xproto],, [
3139 xcb_err="$xcb_err ${XPROTO_PKG_ERRORS}."])
3141 AS_IF([test -n "$xcb_err"], [
3142 AC_MSG_ERROR([$xcb_err Pass --disable-xcb to skip X11 support.])
3146 PKG_CHECK_MODULES([XKBCOMMON_X11], [xkbcommon-x11], [
3147 have_xkbcommon_x11="yes"
3149 AC_MSG_WARN([${XKBCOMMON_X11_PKG_ERRORS}. Hotkeys are disabled.])
3153 PKG_CHECK_MODULES([XCB_KEYSYMS], [xcb-keysyms >= 0.3.4], [
3154 have_xcb_keysyms="yes"
3156 AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Global hotkeys are disabled.])
3161 AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
3162 AM_CONDITIONAL([HAVE_XKBCOMMON_X11], [test "${have_xkbcommon_x11}" = "yes"])
3163 AM_CONDITIONAL([HAVE_XCB_KEYSYMS], [test "${have_xcb_keysyms}" = "yes"])
3169 AC_ARG_ENABLE([vdpau],
3170 [AS_HELP_STRING([--enable-vdpau], [VDPAU hardware support (default auto)])])
3172 AS_IF([test "${enable_vdpau}" != "no"], [
3173 PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.6], [
3175 AS_IF([test "${no_x}" = "yes"], [
3176 AC_MSG_ERROR([VDPAU requires Xlib (X11).])
3179 AS_IF([test -n "${enable_vdpau}"], [
3180 AC_MSG_ERROR([${VDPAU_PKG_ERRORS}.])
3184 AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"])
3186 have_avcodec_vdpau="no"
3187 AS_IF([test "${have_vdpau}" = "yes" -a "${have_avcodec}" = "yes"], [
3189 libav) av_vdpau_ver="56.10.0" ;;
3190 ffmpeg) av_vdpau_ver="56.19.100" ;;
3192 PKG_CHECK_EXISTS([libavcodec >= ${av_vdpau_ver}], [
3193 have_avcodec_vdpau="yes"
3194 AC_MSG_NOTICE([VDPAU decoding acceleration activated])
3196 AS_IF([test -n "${enable_vdpau}"], [
3197 AC_MSG_ERROR([libavcodec >= 56.10.0 is required for VDPAU decoding.])
3199 AC_MSG_WARN([libavcodec >= 56.10.0 are required for VDPAU decoding.])
3203 AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" = "yes"])
3209 AC_ARG_ENABLE([wayland],
3210 AS_HELP_STRING([--enable-wayland], [Wayland support (default auto)]))
3213 AS_IF([test "${enable_wayland}" != "no"], [
3217 PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= 1.5.91],, [
3218 wl_err="$wl_err ${WAYLAND_CLIENT_PKG_ERRORS}."
3220 PKG_CHECK_MODULES([WAYLAND_CURSOR], [wayland-cursor],, [
3221 wl_err="$wl_err ${WAYLAND_CURSOR_PKG_ERRORS}."
3223 PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl],, [
3224 wl_err="$wl_err ${WAYLAND_EGL_PKG_ERRORS}."
3226 PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner >= 1.15], [
3227 WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
3229 wl_err="$wl_err ${WAYLAND_SCANNER_PKG_ERRORS}."
3232 dnl wayland-protocols
3233 PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= 1.15], [
3234 WAYLAND_PROTOCOLS="$(${PKG_CONFIG} wayland-protocols --variable pkgdatadir)"
3236 wl_err="$wl_err ${WAYLAND_PROTOCOLS_PKG_ERRORS}."
3239 AS_IF([test -n "$wl_err"], [
3240 AS_IF([test -n "$enable_wayland"], [
3241 AC_MSG_ERROR([$wl_err])
3243 AC_MSG_WARN([$wl_err])
3250 PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon], [
3251 have_xkbcommon="yes"
3253 AC_MSG_WARN([${XKBCOMMON_PKG_ERRORS}. Hotkeys are disabled.])
3256 AM_CONDITIONAL([HAVE_WAYLAND], [test "${have_wayland}" = "yes"])
3257 AC_SUBST([WAYLAND_PROTOCOLS])
3258 AC_SUBST([WAYLAND_SCANNER])
3259 AM_CONDITIONAL([HAVE_XKBCOMMON], [test "${have_xkbcommon}" = "yes"])
3263 dnl SDL image decoder module
3265 AC_ARG_ENABLE([sdl-image],
3266 AS_HELP_STRING([--enable-sdl-image], [SDL image support (default enabled)]))
3267 AS_IF([test "${enable_sdl_image}" != "no"],[
3268 PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
3269 VLC_ADD_PLUGIN([sdl_image])
3271 AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
3278 AC_ARG_ENABLE([freetype],
3279 AS_HELP_STRING([--enable-freetype], [freetype support (default auto)]))
3280 AC_ARG_ENABLE([fribidi],
3281 AS_HELP_STRING([--enable-fribidi], [fribidi support (default auto)]))
3282 AC_ARG_ENABLE([harfbuzz],
3283 AS_HELP_STRING([--enable-harfbuzz], [harfbuzz support (default auto)]))
3284 AC_ARG_ENABLE([fontconfig],
3285 AS_HELP_STRING([--enable-fontconfig], [fontconfig support (default auto)]))
3287 AC_ARG_WITH([default-font],
3288 AS_HELP_STRING([--with-default-font=PATH],
3289 [Path to the default font]),
3290 [AC_DEFINE_UNQUOTED([DEFAULT_FONT_FILE],
3291 "$withval", [Default font])])
3292 AC_ARG_WITH([default-monospace-font],
3293 AS_HELP_STRING([--with-default-monospace-font=PATH],
3294 [Path to the default font]),
3295 [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FONT_FILE],
3296 "$withval", [Default monospace font])])
3298 AC_ARG_WITH([default-font-family],
3299 AS_HELP_STRING([--with-default-font-family=NAME],
3300 [Name of the default font family]),
3301 [AC_DEFINE_UNQUOTED([DEFAULT_FAMILY],
3302 "$withval", [Default font family])])
3303 AC_ARG_WITH([default-monospace-font-family],
3304 AS_HELP_STRING([--with-default-monospace-font-family=NAME],
3305 [Name of the default font family]),
3306 [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FAMILY],
3307 "$withval", [Default monospace font family])])
3310 have_fontconfig="no"
3314 if test "${enable_freetype}" != "no"; then
3315 PKG_CHECK_MODULES(FREETYPE, freetype2, [
3317 VLC_ADD_CPPFLAGS([skins2],[${FREETYPE_CFLAGS}])
3318 VLC_ADD_LIBS([skins2],[${FREETYPE_LIBS}])
3320 dnl fontconfig support
3321 AS_IF([test "${enable_fontconfig}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "darwin"], [
3322 PKG_CHECK_MODULES(FONTCONFIG, [fontconfig >= 2.11], [
3323 have_fontconfig="yes"
3325 AC_MSG_WARN([${FONTCONFIG_PKG_ERRORS}. Styles will be disabled in FreeType.])
3330 if test "${enable_fribidi}" != "no"; then
3331 PKG_CHECK_MODULES(FRIBIDI, fribidi, [
3333 VLC_ADD_CPPFLAGS([skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
3334 VLC_ADD_LIBS([skins2], [${FRIBIDI_LIBS}])
3335 ],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional text and complex scripts (Arabic, Farsi, Thai...) will be disabled in FreeType.])])
3338 dnl harfbuzz support
3339 if test "${have_fribidi}" != "no"; then
3340 if test "${enable_harfbuzz}" != "no"; then
3341 PKG_CHECK_MODULES(HARFBUZZ, harfbuzz, [
3343 VLC_ADD_CPPFLAGS([skins2], [${HARFBUZZ_CFLAGS} -DHAVE_HARFBUZZ])
3344 VLC_ADD_LIBS([skins2], [${HARFBUZZ_LIBS}])
3345 ],[AC_MSG_WARN([${HARFBUZZ_PKG_ERRORS}. Support for complex scripts (Arabic, Farsi, Thai...) will be disabled in FreeType.])])
3349 AS_IF([test -n "${enable_freetype}"],[
3350 AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
3355 AM_CONDITIONAL([HAVE_FREETYPE], [test "${have_freetype}" = "yes"])
3356 AM_CONDITIONAL([HAVE_FONTCONFIG], [test "${have_fontconfig}" = "yes"])
3357 AM_CONDITIONAL([HAVE_FRIBIDI], [test "${have_fribidi}" = "yes"])
3358 AM_CONDITIONAL([HAVE_HARFBUZZ], [test "${have_harfbuzz}" = "yes"])
3361 dnl libass subtitle rendering module
3363 AC_ARG_ENABLE([libass],
3364 AS_HELP_STRING([--enable-libass], [Subtitle support using libass (default enabled)]))
3365 AS_IF( [test "${enable_libass}" != "no"], [
3366 PKG_CHECK_MODULES(LIBASS, [libass >= 0.9.8],
3368 VLC_ADD_PLUGIN([libass])
3370 if test "${have_fontconfig}" != "no"; then
3371 VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
3372 VLC_ADD_LIBS([libass],[${FONTCONFIG_LIBS}])
3375 AC_MSG_WARN([${LIBASS_PKG_ERRORS}.])
3380 dnl SAPI (text to Speech renderer for Windows)
3383 AC_CHECK_TYPES([ISpObjectToken],[
3385 ],[AC_MSG_WARN([sapi.h not found. Text to Speech renderer for Windows disabled])],
3386 [#include <windows.h>
3388 #include <sphelper.h>])
3389 AM_CONDITIONAL([HAVE_SAPI], [test "${have_sapi}" = "yes"])
3393 dnl SVG module (text rendering and image decoding)
3395 PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
3396 PKG_ENABLE_MODULES_VLC([SVGDEC], [], [librsvg-2.0 >= 2.9.0 cairo >= 1.13.1], [SVG image decoder library],[auto])
3399 dnl Windows DirectX module
3402 AC_ARG_ENABLE([directx],
3403 AS_HELP_STRING([--enable-directx],
3404 [Microsoft DirectX support (default enabled on Windows)]),, [
3405 AS_IF([test "${SYS}" = "mingw32"], [
3406 enable_directx="yes"
3411 AS_IF([test "${enable_directx}" != "no"], [
3413 AC_CHECK_HEADERS([ddraw.h], [
3414 VLC_ADD_PLUGIN([directdraw])
3418 AC_CHECK_HEADERS([GL/wglew.h], [
3419 VLC_ADD_PLUGIN([glwin32 wgl])
3421 #include <windows.h>
3426 AC_CHECK_HEADERS([d3d11.h], [
3427 VLC_ADD_PLUGIN([direct3d11 direct3d11_filters])
3431 AC_CHECK_HEADERS([d3d9.h], [
3432 VLC_ADD_PLUGIN([direct3d9])
3433 AC_CHECK_HEADERS([d3dx9effect.h])
3435 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
3436 [[#define COBJMACROS
3438 #include <dxva2api.h>
3439 #ifndef IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids
3440 # error dxva2 too old
3444 VLC_ADD_PLUGIN([direct3d9_filters])
3446 [AC_MSG_WARN([Could not find required IDirectXVideoDecoder in dxva2api.h])])
3452 dnl Linux framebuffer module
3454 AC_CHECK_HEADER([linux/fb.h], [
3455 VLC_ADD_PLUGIN([fb])
3459 dnl Linux kernel mode setting module
3461 PKG_ENABLE_MODULES_VLC([KMS], [], [libdrm >= 2.4.83], [Linux kernel mode setting output], [auto])
3466 PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3471 AC_ARG_ENABLE([kva],
3472 AS_HELP_STRING([--enable-kva],
3473 [support the K Video Accelerator KVA (default enabled on OS/2)]),, [
3474 AS_IF([test "$SYS" = "os2"], [
3480 AS_IF([test "$enable_kva" != "no"], [
3481 AC_CHECK_HEADERS([kva.h], [
3483 AC_CHECK_LIB([kva], [main], [
3488 AC_SUBST([KVA_LIBS])
3489 AM_CONDITIONAL([HAVE_KVA], [test "${have_kva}" = "yes"])
3494 AC_ARG_ENABLE([mmal],
3495 AS_HELP_STRING([--enable-mmal],
3496 [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)]))
3497 if test "${enable_mmal}" != "no"; then
3499 LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif"
3500 CPPFLAGS="${CPPFLAGS} -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux"
3501 AC_CHECK_HEADERS([interface/mmal/mmal.h],
3502 [ AC_CHECK_LIB([bcm_host], [vc_tv_unregister_callback_full], [
3504 VLC_ADD_PLUGIN([mmal])
3505 VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ])
3506 VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ])
3507 VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lmmal_core -lmmal_components -lmmal_util -lvchostif ]) ], [
3508 AS_IF([test "${enable_mmal}" = "yes"],
3509 [ AC_MSG_ERROR([Cannot find bcm library...]) ],
3510 [ AC_MSG_WARN([Cannot find bcm library...]) ])
3513 ] , [ AS_IF([test "${enable_mmal}" = "yes"],
3514 [ AC_MSG_ERROR([Cannot find development headers for mmal...]) ],
3515 [ AC_MSG_WARN([Cannot find development headers for mmal...]) ]) ])
3518 AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"])
3524 EXTEND_HELP_STRING([Audio plugins:])
3527 dnl Pulseaudio module
3529 AC_ARG_ENABLE([pulse],
3530 AS_HELP_STRING([--enable-pulse],
3531 [use the PulseAudio client library (default auto)]))
3533 AS_IF([test "${enable_pulse}" != "no"], [
3534 PKG_CHECK_MODULES([PULSE], [libpulse >= 1.0], [
3537 AS_IF([test "x${enable_pulse}" != "x"], [
3538 AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 1.0 or later required.])
3542 AM_CONDITIONAL([HAVE_PULSE], [test "${have_pulse}" = "yes"])
3547 AC_ARG_ENABLE([alsa],
3548 AS_HELP_STRING([--enable-alsa],
3549 [support the Advanced Linux Sound Architecture (default auto)]),, [
3550 AS_IF([test "$SYS" = "linux" -a "${have_pulse}" = "no"], [
3555 AS_IF([test "${enable_alsa}" != "no"], [
3556 PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.24], [
3559 AS_IF([test "x${enable_alsa}" != "x"], [
3560 AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.24 or later required. Pass --disable-alsa to ignore this error.])
3564 AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
3567 dnl Open Sound System module
3569 AC_ARG_ENABLE([oss],
3570 AS_HELP_STRING([--enable-oss],
3571 [support the Open Sound System OSS (default enabled on FreeBSD/NetBSD/DragonFlyBSD)]),, [
3572 AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "linux" -o "$SYS" = "openbsd"], [
3578 AS_IF([test "$enable_oss" != "no"], [
3579 AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
3581 AC_CHECK_LIB([ossaudio], [main], [
3582 OSS_LIBS="-lossaudio"
3586 AC_SUBST([OSS_LIBS])
3587 AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
3590 dnl OpenBSD sndio module
3592 AC_ARG_ENABLE([sndio],
3593 AS_HELP_STRING([--disable-sndio],
3594 [support the OpenBSD sndio (default auto)]),, [
3595 AS_IF([test "$SYS" = "openbsd"], [
3600 AS_IF([test "$enable_sndio" != "no"], [
3601 AC_CHECK_HEADER([sndio.h], [
3605 AM_CONDITIONAL([HAVE_SNDIO], [test "${have_sndio}" = "yes"])
3608 dnl Windows Audio Session plugin
3610 AC_ARG_ENABLE([wasapi],
3611 AS_HELP_STRING([--enable-wasapi],
3612 [use the Windows Audio Session API (default auto)])
3615 AS_IF([test "$enable_wasapi" != "no"], [
3616 AC_CHECK_HEADER([audioclient.h], [
3619 AS_IF([test "x${enable_wasapi}" != "x"], [
3620 AC_MSG_ERROR([Windows Audio Session API not found.])
3624 AM_CONDITIONAL([HAVE_WASAPI], [test "${have_wasapi}" = "yes"])
3629 AC_ARG_ENABLE([jack],
3630 AS_HELP_STRING([--disable-jack],
3631 [do not use jack (default auto)]))
3633 AS_IF([test "${enable_jack}" != "no"], [
3634 PKG_CHECK_MODULES(JACK, jack >= 1.9.7,
3637 AC_MSG_WARN([${JACK_PKG_ERRORS}, trying jack1 instead])
3639 PKG_CHECK_MODULES(JACK, jack >= 0.120.1 jack < 1.0,
3642 AS_IF([test -n "${enable_jack}"],
3643 [AC_MSG_ERROR([${JACK_PKG_ERRORS}.])],
3644 [AC_MSG_WARN([${JACK_PKG_ERRORS}.])])
3648 AM_CONDITIONAL([HAVE_JACK], [test "${have_jack}" != "no"])
3651 dnl OpenSLES Android
3653 AC_ARG_ENABLE([opensles],
3654 AS_HELP_STRING([--enable-opensles], [Android OpenSL ES audio module (default disabled)]))
3655 if test "${HAVE_ANDROID}" = "1"; then
3656 if test "${enable_opensles}" = "yes"; then
3657 AC_CHECK_HEADERS([SLES/OpenSLES.h],
3658 [ VLC_ADD_PLUGIN([opensles_android]) ],
3659 [ AC_MSG_ERROR([cannot find OpenSLES headers])] )
3666 AC_ARG_ENABLE([tizen_audio],
3667 AS_HELP_STRING([--enable-tizen-audio],
3668 [Tizen audio module (default enabled on Tizen)]),, [
3669 AS_IF([test "$HAVE_TIZEN" = "1"], [
3670 enable_tizen_audio="yes"
3673 if test "${enable_tizen_audio}" = "yes"; then
3674 AC_CHECK_HEADERS([audio_io.h],
3675 [ VLC_ADD_PLUGIN([tizen_audio]) ],
3676 [ AC_MSG_ERROR([cannot find Tizen audio_io headers])] )
3680 dnl libsamplerate plugin
3682 PKG_ENABLE_MODULES_VLC([SAMPLERATE], [], [samplerate], [Resampler with libsamplerate], [auto])
3687 PKG_ENABLE_MODULES_VLC([SOXR], [], [soxr >= 0.1.2], [SoX Resampler library], [auto])
3692 AC_ARG_ENABLE([kai],
3693 AS_HELP_STRING([--enable-kai],
3694 [support the K Audio Interface KAI (default enabled on OS/2)]),, [
3695 AS_IF([test "$SYS" = "os2"], [
3701 AS_IF([test "$enable_kai" != "no"], [
3702 AC_CHECK_HEADERS([kai.h], [
3704 AC_CHECK_LIB([kai], [main], [
3709 AC_SUBST([KAI_LIBS])
3710 AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"])
3713 dnl chromaprint audio track fingerprinter
3715 m4_pushdef([libchromaprint_version], 0.6.0)
3716 PKG_WITH_MODULES([CHROMAPRINT],[libchromaprint >= libchromaprint_version],
3717 VLC_ADD_PLUGIN([stream_out_chromaprint]),
3718 AS_IF([test "${enable_chromaprint}" = "yes"],
3719 [AC_MSG_ERROR(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)],
3720 [AC_MSG_WARN(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)]
3722 [(Chromaprint based audio fingerprinter)],[auto])
3723 m4_popdef([libchromaprint_version])
3726 dnl Chromecast streaming support
3728 m4_pushdef([protobuf_lite_version], 2.5.0)
3729 AC_ARG_VAR(PROTOC, [protobuf compiler])
3730 AC_CHECK_PROGS(PROTOC, protoc, no)
3731 PKG_WITH_MODULES([CHROMECAST],[protobuf-lite >= protobuf_lite_version], [
3732 AS_IF([test "x${PROTOC}" != "xno"], [
3733 build_chromecast="yes"
3735 AC_MSG_ERROR(protoc compiler needed for [chromecast] was not found)
3738 AS_IF([test "${enable_chromecast}" = "yes"],
3739 AC_MSG_ERROR(Library [protobuf-lite >= protobuf_lite_version] needed for [chromecast] was not found),
3740 AC_MSG_WARN(Library [protobuf-lite >= protobuf_lite_version] needed for [chromecast] was not found)
3742 enable_chromecast="no"
3743 ], [(Chromecast streaming support)], [auto])
3744 AM_CONDITIONAL([BUILD_CHROMECAST], [test "${build_chromecast}" = "yes"])
3745 m4_popdef([protobuf_lite_version])
3748 dnl Interface plugins
3751 EXTEND_HELP_STRING([Interface plugins:])
3757 AS_HELP_STRING([--disable-qt], [Qt UI support (default enabled)]),, [
3758 AS_IF([test "${enable_vlc}" != "no"], [enable_qt="yes"])
3759 AS_IF([test "${SYS}" = "darwin"], [
3764 AS_IF([test "${enable_qt}" != "no"], [
3765 PKG_CHECK_MODULES([QT], [Qt5Core >= 5.9.0 Qt5Widgets Qt5Gui Qt5Svg], [
3766 PKG_CHECK_MODULES([QT5_X11], [Qt5X11Extras], [
3769 AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
3771 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
3772 QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
3773 QT_VERSION="$(eval $PKG_CONFIG --modversion Qt5Gui)"
3774 AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3775 AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3776 AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3778 AS_IF([test -n "${enable_qt}"],[
3779 AC_MSG_ERROR([${QT_PKG_ERRORS}. If you want to build VLC without GUI, pass --disable-qt.])
3781 AC_MSG_WARN([${QT_PKG_ERRORS}.])
3787 AS_IF([test "${enable_qt}" != "no"], [
3788 ALIASES="${ALIASES} qvlc"
3790 AC_SUBST([QT_VERSION])
3791 AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" != "no"])
3792 AM_CONDITIONAL([HAVE_QT5_X11], [test "${have_qt5_x11}" = "yes"])
3795 dnl detect kde4-config patch (used for kde solids).
3797 AC_ARG_VAR([KDE4_CONFIG], [kde4-config utility])
3798 AS_IF([test "x$KDE4_CONFIG" = "x"], [
3799 KDE4_CONFIG="kde4-config"
3803 dnl Simple test for skins2 dependency
3805 AS_IF([test "$enable_qt" = "no"], [
3806 AS_IF([test "${enable_skins2}" = "yes"], [
3807 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.])
3810 AC_MSG_WARN([The skins2 module depends on the Qt interface, Qt is not built so skins2 is disabled.])
3817 AC_ARG_ENABLE([skins2],
3818 AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)]))
3819 AS_IF([test "${enable_skins2}" != "no"], [
3820 have_skins_deps="yes"
3823 AS_IF([test "${SYS}" = "mingw32"], [
3824 VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -DWIN32_SKINS])
3825 VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
3827 ], [test "${SYS}" = "os2"], [
3828 VLC_ADD_CPPFLAGS([skins2],[ -DOS2_SKINS])
3831 PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
3832 PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
3833 PKG_CHECK_MODULES([XCURSOR], [xcursor],, [have_skins_deps="no"])
3834 PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
3835 VLC_ADD_CPPFLAGS([skins2],[${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
3836 VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} ${XCURSOR_LIBS} -lX11])
3839 dnl we need freetype
3840 AS_IF([test "${have_freetype}" != "yes"], [
3841 have_skins_deps="no"
3844 AS_IF([test "${have_skins_deps}" = "no"], [
3845 AS_IF([test "x${enable_skins2}" = "x"], [
3846 AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
3848 AC_MSG_ERROR([Skins2 interface requires FreeType, libxcursor, libxpm, libxext and libxinerama])
3852 ALIASES="${ALIASES} svlc"
3856 AM_CONDITIONAL([BUILD_SKINS], [test "${enable_skins2}" = "yes"])
3858 AC_ARG_ENABLE([libtar],
3859 AS_HELP_STRING([--enable-libtar], [libtar support for skins2 (default auto)]))
3860 AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
3861 AC_CHECK_HEADERS([libtar.h], [
3862 VLC_ADD_LIBS([skins2],[-ltar])
3867 dnl MacOS X gui module
3869 AC_ARG_ENABLE([macosx],
3870 AS_HELP_STRING([--enable-macosx], [Mac OS X gui support (default enabled on Mac OS X)]))
3871 if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
3875 dnl If possible, use xcrun to find the right ibtool
3878 AC_PATH_PROG([XCRUN], [xcrun], [no])
3879 AS_IF([test ! "x${XCRUN}" = "xno"], [
3880 AC_MSG_CHECKING([for ibtool (using xcrun)])
3881 XIB="$(eval $XCRUN -f ibtool 2>/dev/null || echo no)"
3882 AC_MSG_RESULT([${XIB}])
3884 AC_MSG_WARN([Looking for tools without using xcrun])
3887 AS_IF([test "x${XIB}" = "xno"], [
3888 AC_PATH_PROG(XIB, [ibtool], [no])
3889 AS_IF([test "x${XIB}" = "xno"], [
3890 AC_MSG_ERROR([ibtool was not found, but is required for --enable-macosx])
3894 AM_CONDITIONAL([ENABLE_MACOSX_UI], [test "$enable_macosx" != "no" -a "${SYS}" = "darwin"])
3897 dnl MacOS X sparkle update support
3899 AC_ARG_ENABLE([sparkle],
3900 AS_HELP_STRING([--enable-sparkle], [Sparkle update support for OS X (default enabled on Mac OS X)]))
3901 if test "x${enable_sparkle}" != "xno" -a "${HAVE_OSX}" = "1"
3903 if test ! -d ${CONTRIB_DIR}/Sparkle.framework -a ! -d ${CONTRIB_DIR}/Frameworks/Sparkle.framework
3905 AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}])
3908 AC_DEFINE([HAVE_SPARKLE], [1], [Define to 1 if sparkle is enabled.])
3910 AM_CONDITIONAL([HAVE_SPARKLE], [test "$enable_sparkle" != "no"])
3913 dnl MacOS X breakpad creash reporter support
3915 AC_ARG_WITH([breakpad],
3916 AS_HELP_STRING([--with-breakpad=URL], [Enable Breakpad reporter using given URL]), [], [with_breakpad=no])
3918 AS_IF([test "$with_breakpad" != "no"], [
3920 AS_IF([test "$with_breakpad" = "yes"], [
3921 AC_MSG_ERROR([You need to supply the CrashDragon Server URL as value for --with-breakpad])
3924 AS_IF([test "$HAVE_OSX" = "1"], [
3925 AC_MSG_CHECKING([for Breakpad framework])
3926 AS_IF([test ! -d ${CONTRIB_DIR}/Breakpad.framework -a \
3927 ! -d ${CONTRIB_DIR}/Frameworks/Breakpad.framework], [
3930 AC_MSG_ERROR([Breakpad framework is required and was not found in ${CONTRIB_DIR}])
3932 AC_MSG_RESULT([yes])
3935 PKG_CHECK_MODULES([BREAKPAD], [breakpad-client], [
3936 LDFLAGS="${LDFLAGS} -Wl,--build-id"
3938 AC_MSG_ERROR(["breakpad not found"])
3943 AM_CONDITIONAL([HAVE_BREAKPAD], [test "$with_breakpad" != "no"])
3944 AS_IF([test "$with_breakpad" != "no"], [
3945 AC_SUBST([BREAKPAD_URL], ["${with_breakpad}"])
3949 dnl Minimal Mac OS X module
3951 AC_ARG_ENABLE([minimal-macosx],
3952 AS_HELP_STRING([--enable-minimal-macosx], [Minimal Mac OS X support (default disabled)]))
3953 if test "${enable_minimal_macosx}" = "yes" -a "${SYS}" = "darwin"
3955 VLC_ADD_PLUGIN([minimal_macosx])
3959 dnl Mac OS X fancy dmg build tool
3961 if test "${HAVE_OSX}" = "1"
3963 AC_PATH_PROG(DMGBUILD, dmgbuild, no)
3964 AS_IF([test "x${DMGBUILD}" = "xno"], [
3965 AC_MSG_WARN([dmgbuild not found -- unable to build fancy DMGs])
3968 AM_CONDITIONAL([HAVE_DMGBUILD], [test "x$DMGBUILD" != "xno" -a "${HAVE_OSX}" = "1"])
3971 dnl VideoToolbox plugins
3972 AC_CHECK_HEADERS([VideoToolbox/VideoToolbox.h], [
3973 VLC_ADD_PLUGIN([videotoolbox])
3974 VLC_ADD_PLUGIN([cvpx])
3978 dnl AudioToolbox MIDI plugin
3979 AC_CHECK_HEADERS([AudioToolbox/AudioToolbox.h], [
3980 VLC_ADD_PLUGIN([audiotoolboxmidi])
3986 AC_ARG_ENABLE([ncurses],
3987 AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)]))
3989 AS_IF([test "${enable_ncurses}" != "no"] ,[
3990 PKG_CHECK_MODULES([NCURSES], [ncursesw], [
3992 ALIASES="${ALIASES} nvlc"
3994 AS_IF([test -n "${enable_ncurses}"], [
3995 AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
3999 AM_CONDITIONAL([HAVE_NCURSES], [test "${have_ncurses}" = "yes"])
4004 AC_ARG_ENABLE([lirc],
4005 AS_HELP_STRING([--enable-lirc], [lirc support (default disabled)]))
4007 AS_IF([test "${enable_lirc}" = "yes"], [
4008 AC_CHECK_HEADER(lirc/lirc_client.h, [
4009 AC_CHECK_LIB([lirc_client], [lirc_init], [
4014 AM_CONDITIONAL([HAVE_LIRC], [test "${have_lirc}" = "yes"])
4019 PKG_CHECK_MODULES([BITSTREAM], [bitstream > 1.4],[have_bitstream="yes"], [have_bitstream="no"])
4020 AM_CONDITIONAL([HAVE_BITSTREAM], [test "${have_bitstream}" = "yes"])
4025 PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT])
4027 EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
4029 dnl goom visualization plugin
4031 PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [auto])
4034 dnl libprojectM visualization plugin
4036 AC_ARG_ENABLE([projectm],
4037 AS_HELP_STRING([--enable-projectm], [projectM visualization plugin (default enabled)]))
4038 AS_IF([test "${enable_projectm}" != "no"],
4040 PKG_CHECK_MODULES(PROJECTM, libprojectM,
4042 VLC_ADD_PLUGIN([projectm])
4043 PKG_CHECK_EXISTS([libprojectM >= 2.0.0],
4044 [ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ],
4045 [ AC_MSG_WARN( [Using libprojectM version 1] )
4048 AC_MSG_WARN([${PROJECTM_PKG_ERRORS}.])
4053 dnl Vovoid VSXu visualization plugin
4055 AC_ARG_ENABLE([vsxu],
4056 AS_HELP_STRING([--enable-vsxu], [Vovoid VSXu visualization plugin (default auto)]))
4057 AS_IF([test "${enable_vsxu}" != "no"],
4059 PKG_CHECK_MODULES(VSXU, libvsxu,
4061 VLC_ADD_PLUGIN([vsxu])
4063 AC_MSG_WARN([${VSXU_PKG_ERRORS}.])
4067 EXTEND_HELP_STRING([Service Discovery plugins:])
4069 dnl Avahi-Zeroconf services discovery
4070 PKG_ENABLE_MODULES_VLC([AVAHI], [], [avahi-client >= 0.6], [Zeroconf services discovery], [auto])
4073 dnl libudev services discovery
4074 PKG_ENABLE_MODULES_VLC([UDEV], [], [libudev >= 142], [Linux udev services discovery], [auto])
4077 dnl MTP devices services discovery
4078 PKG_ENABLE_MODULES_VLC([MTP], [mtp access_mtp], [libmtp >= 1.0.0], [MTP devices support], [auto])
4081 dnl UPnP Plugin (Intel SDK)
4083 PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto])
4086 dnl mDNS using libmicrodns
4088 PKG_ENABLE_MODULES_VLC([MICRODNS], [], [microdns], [mDNS services discovery], [auto])
4091 EXTEND_HELP_STRING([Misc options:])
4096 PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
4102 AC_ARG_ENABLE([libgcrypt],
4103 AS_HELP_STRING([--disable-libgcrypt], [gcrypt support (default enabled)]))
4104 AC_ARG_VAR([GCRYPT_CFLAGS], [C compiler flags for gcrypt])
4105 AC_ARG_VAR([GCRYPT_LIBS], [linker flags flags for gcrypt])
4107 # require libgcrypt >= 1.6.0
4108 AS_IF([test "${enable_libgcrypt}" != "no"], [
4109 AC_CACHE_CHECK([for gcrypt 1.6.0 or later], [ac_cv_lib_gcrypt], [
4111 CFLAGS="${CFLAGS} ${GCRYPT_CFLAGS}"
4112 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
4113 [#include <gcrypt.h>
4114 #if GCRYPT_VERSION_NUMBER < 0x010600
4117 ac_cv_lib_gcrypt=yes
4124 AS_IF([test "${ac_cv_lib_gcrypt}" = "yes"], [
4125 AC_DEFINE([HAVE_GCRYPT], 1, [Defined if having gcrypt])
4127 AS_IF([test "${enable_libgcrypt}" = "yes"], [
4128 AC_MSG_ERROR([libgcrypt version 1.6.0 or higher not found. Install libgcrypt or pass --disable-libgcrypt.])
4133 AS_IF([test -z "$GCRYPT_LIBS"], [
4134 GCRYPT_LIBS="-lgcrypt -lgpg-error"
4137 AC_SUBST([GCRYPT_CFLAGS])
4138 AC_SUBST([GCRYPT_LIBS])
4139 AM_CONDITIONAL([HAVE_GCRYPT], [test "${ac_cv_lib_gcrypt}" = "yes"])
4144 AC_ARG_ENABLE([gnutls],
4145 AS_HELP_STRING([--enable-gnutls], [GNU TLS TLS/SSL support (default enabled)]))
4146 AS_IF([test "${enable_gnutls}" != "no"], [
4147 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.3.6], [
4148 VLC_ADD_PLUGIN([gnutls])
4150 AS_IF([test -n "${enable_gnutls}"], [
4151 AC_MSG_ERROR([${GNUTLS_PKG_ERRORS}.)])
4160 AC_ARG_ENABLE([taglib],
4161 AS_HELP_STRING([--disable-taglib],
4162 [do not use TagLib (default enabled)]))
4163 AS_IF([test "${enable_taglib}" != "no"], [
4164 PKG_CHECK_MODULES(TAGLIB, taglib >= 1.9, [
4165 VLC_ADD_PLUGIN([taglib])
4167 AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])])
4173 PKG_ENABLE_MODULES_VLC([SECRET], [], [libsecret-1 >= 0.18], [use libsecret for keystore], [auto])
4178 AC_ARG_ENABLE([kwallet],
4179 AS_HELP_STRING([--enable-kwallet],
4180 [use kwallet (via D-Bus) for keystore (default enabled)]))
4181 AS_IF([test "${enable_kwallet}" != "no" -a "${have_dbus}" = "yes"], [
4182 VLC_ADD_PLUGIN([kwallet])
4186 dnl update checking system
4188 AC_ARG_ENABLE([update-check],
4189 AS_HELP_STRING([--enable-update-check], [update checking system (default disabled)]))
4190 if test "${enable_update_check}" = "yes"
4192 AS_IF([test "${ac_cv_lib_gcrypt}" != "yes"],[
4193 AC_MSG_ERROR([libgcrypt is required for update checking system]) ])
4195 AM_CONDITIONAL([UPDATE_CHECK], [test "${enable_update_check}" = "yes"])
4198 dnl OS X notification plugin
4200 AC_ARG_ENABLE([osx_notifications],
4201 AS_HELP_STRING([--enable-osx-notifications],
4202 [macOS notification plugin (default disabled)]),,
4203 [enable_osx_notifications=no])
4204 AS_IF([test "${enable_osx_notifications}" != "no"], [
4205 VLC_ADD_PLUGIN([osx_notifications])
4209 dnl Libnotify notification plugin
4211 PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-3.0], [libnotify notification], [auto])
4213 PKG_ENABLE_MODULES_VLC([MEDIALIBRARY], [medialibrary], [medialibrary], (medialibrary support), [auto])
4216 dnl Endianness check
4219 AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [
4220 DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1"
4224 AC_SUBST([DEFS_BIGENDIAN])
4227 dnl Where to install KDE solid .desktop
4229 AC_ARG_WITH(kde-solid,
4230 AS_HELP_STRING([--with-kde-solid=PATH],
4231 [KDE Solid actions directory (auto)]),, [
4233 if test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ; then
4234 with_kde_solid="yes"
4238 AS_IF([test "${with_kde_solid}" != "no"], [
4239 AS_IF([test "${with_kde_solid}" = "yes"], [
4240 kde4datadir="`${KDE4_CONFIG} --install data`"
4241 AS_IF([test "x$kde4datadir" = "x"], [kde4datadir='${datadir}/kde4/apps'])
4242 soliddatadir="${kde4datadir}/solid/actions"
4244 soliddatadir="${with_kde_solid}"
4247 AC_SUBST([soliddatadir])
4248 AM_CONDITIONAL([KDE_SOLID], [test "x${soliddatadir}" != "x"])
4251 dnl Find tools for win32 packaging
4253 AS_IF([test "${SYS}" = "mingw32"], [
4255 dnl Find makensis required to build the NSIS installer
4257 nsis_major_required="3"
4258 nsis_version_ok="no"
4259 AC_PATH_PROG([MAKENSIS], [makensis], [no])
4260 AS_IF([test "$MAKENSIS" != "no"], [
4262 AC_MSG_CHECKING([makensis version])
4263 nsis_version=$($MAKENSIS -VERSION)
4264 AC_MSG_RESULT([$nsis_version])
4265 nsis_version_major=$(echo "$nsis_version" | awk -F \. '{print $1}' | sed 's/v//')
4266 # Check if major version is a valid number
4267 AS_IF([test -n "$nsis_version_major" && \
4268 test "$nsis_version_major" -eq "$nsis_version_major" 2> /dev/null], [
4269 # Do the version check using major version
4270 AS_IF([test "$nsis_version_major" -lt "$nsis_major_required"], [
4271 AC_MSG_WARN([makensis too old, (needs ${nsis_major_required}.x, have ${nsis_version_major}.x)])
4273 nsis_version_ok="yes"
4276 AC_MSG_WARN([failed to check the makensis version])
4282 AC_PATH_PROG([SEVENZIP], [7z], [7z])
4284 AM_CONDITIONAL([HAVE_MAKENSIS], [test "x$MAKENSIS" != "xno" && test "$nsis_version_ok" = "yes"])
4287 dnl Check wether we have the PROCESS_MITIGATION_IMAGE_LOAD_POLICY
4288 dnl It should only be available when building for win10, but some SDKs define it unconditionnaly
4290 if test "${SYS}" = "mingw32"; then
4291 AC_CHECK_TYPES([PROCESS_MITIGATION_IMAGE_LOAD_POLICY],,,[#include <windows.h>])
4294 EXTEND_HELP_STRING([Components:])
4299 AC_ARG_ENABLE([vlc],
4300 AS_HELP_STRING([--enable-vlc], [build the VLC media player (default enabled)]))
4301 AM_CONDITIONAL([BUILD_VLC], [test "${enable_vlc}" != "no"])
4304 dnl Fuzzer (at the end in order to don't mess dependencies FLAGS)
4306 AS_VAR_IF(with_libfuzzer, no, [], [
4307 LIBS="-lstdc++ ${LIBM} -L${with_libfuzzer} -lFuzzer"
4308 AX_CHECK_COMPILE_FLAG(-fsanitize-coverage=trace-pc-guard, [
4309 AX_APPEND_FLAG([-fsanitize-coverage=trace-pc-guard])
4310 AX_APPEND_FLAG([-fsanitize-coverage=trace-pc-guard], [CXXFLAGS])
4311 AX_APPEND_COMPILE_FLAGS([-fsanitize-coverage=trace-cmp])
4312 AX_APPEND_COMPILE_FLAGS([-fsanitize-coverage=trace-cmp], [CXXFLAGS])
4314 AX_CHECK_COMPILE_FLAG(-fsanitize-coverage=trace-pc, [
4315 AX_APPEND_FLAG([-fsanitize-coverage=trace-pc])
4316 AX_APPEND_FLAG([-fsanitize-coverage=trace-pc], [CXXFLAGS])
4318 AC_MSG_ERROR([Sanitizer coverage not supported by your compiler])
4324 dnl Stuff used by the program
4326 VERSION_MESSAGE="${VERSION} ${CODENAME}"
4327 COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
4328 AC_DEFINE_UNQUOTED([VERSION_MESSAGE], "${VERSION_MESSAGE}", [Simple version string])
4329 AC_DEFINE_UNQUOTED([COPYRIGHT_MESSAGE], "${COPYRIGHT_MESSAGE}", [Copyright string])
4330 AC_DEFINE_UNQUOTED([COPYRIGHT_YEARS], "${COPYRIGHT_YEARS}", [The copyright years])
4331 AC_DEFINE_UNQUOTED([CONFIGURE_LINE], "${CONFIGURE_LINE}", [The ./configure command line])
4332 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],${VERSION_MAJOR}, [version major number])
4333 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],${VERSION_MINOR}, [version minor number])
4334 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_REVISION],${VERSION_REVISION}, [version revision number])
4335 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_EXTRA],${VERSION_EXTRA}, [version extra number])
4336 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_DEV],"${VERSION_DEV}", [version development string])
4337 AC_SUBST([COPYRIGHT_MESSAGE])
4338 AC_SUBST([VERSION_MESSAGE])
4339 AC_SUBST([VERSION_MAJOR])
4340 AC_SUBST([VERSION_MINOR])
4341 AC_SUBST([VERSION_REVISION])
4342 AC_SUBST([VERSION_EXTRA])
4343 AC_SUBST([COPYRIGHT_YEARS])
4344 AC_DEFINE_UNQUOTED([VLC_COMPILE_BY], "`whoami|sed -e 's/\\\/\\\\\\\/g'`", [user who ran configure])
4345 AC_DEFINE_UNQUOTED([VLC_COMPILE_HOST], "`hostname -f 2>/dev/null || hostname`", [host which ran configure])
4346 AC_DEFINE_UNQUOTED([VLC_COMPILER], "`$CC -v 2>&1 | tail -n 1 | sed -e 's/ *$//'`", [compiler])
4348 dnl Handle substvars that use $(top_srcdir)
4350 CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include ${CPPFLAGS}"
4353 dnl Configuration is finished
4363 AC_SUBST([WINE_SDK_PATH])
4365 AC_SUBST([AM_CPPFLAGS])
4366 AC_SUBST([MACOSX_DEPLOYMENT_TARGET])
4367 AC_SUBST([FILE_LIBVLCCORE_DLL])
4368 AC_SUBST([FILE_LIBVLC_DLL])
4382 modules/hw/mmal/Makefile
4383 share/vlc.appdata.xml.in
4386 AM_COND_IF([HAVE_WIN32], [
4388 extras/package/win32/NSIS/spad.nsi
4389 extras/package/win32/NSIS/vlc.win32.nsi
4390 extras/package/win32/msi/config.wxi
4394 AM_COND_IF([HAVE_DARWIN], [
4396 modules/gui/macosx/UI/InfoPlist.strings:modules/gui/macosx/Resources/InfoPlist.strings.in
4397 share/macosx/Info.plist:share/Info.plist.in
4401 dnl Generate makefiles
4404 dnl Do we have to use make or gmake ?
4405 if make --version 2>&1|grep -q GNU
4407 # GNU make, all seems good
4410 # Known GNU make alias (on BSD)
4413 dnl Shortcut to nice compile message
4414 if test -n $SHELL; then
4415 SHELL=${CONFIG_SHELL-/bin/sh}
4418 compile_top_srcdir=`sed -ne "s/^top_srcdir *= *//p" < Makefile`
4422 export PATH=\"$PATH\" LANG=C
4423 ($MAKE V=1 \$@ 2>&1 || touch .error\$\$)| $compile_top_srcdir/extras/buildsystem/make.pl
4424 test -f .error\$\$ && ERROR=1
4426 exit \$ERROR" >compile
4430 libvlc configuration
4431 --------------------
4432 version : ${VERSION}
4434 architecture : ${ARCH}
4435 optimizations : ${enable_optimizations}"
4436 if test "${enable_vlc}" != "no"; then
4437 echo "vlc aliases :${ALIASES}"
4439 echo "build vlc executable : no"
4442 To build vlc and its plugins, type \`$MAKE', or \`./compile' if you like nice colors."