1 dnl Autoconf settings for vlc
3 AC_COPYRIGHT([Copyright 1999-2019 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-2019"
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 AH_VERBATIM([FORTIFY_SOURCE],
40 [/* Enable compile-time and run-time bounds-checking, and some warnings,
41 without upsetting glibc 2.15+ or toolchains predefining _FORTIFY_SOURCE */
42 #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
43 # define _FORTIFY_SOURCE 2
45 AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
46 AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
47 AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
59 AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
60 AC_CHECK_PROGS([DESKTOP_FILE_VALIDATE], [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
61 AC_ARG_VAR([BUILDCC], [Build system C11 or C99 compiler command])
62 AC_CHECK_PROGS([BUILDCC], [c11-gcc c11 c99-gcc c99], [false])
63 AS_IF([test "$BUILDCC" = "false"], [
64 AC_MSG_ERROR([Cannot find native C99 compiler: please define BUILDCC.])
67 dnl Check for compiler properties
71 AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
73 dnl Extend the --help string at the current spot.
74 AC_DEFUN([EXTEND_HELP_STRING], [m4_divert_once([HELP_ENABLE], [$1])])
76 dnl Allow binary package maintainer to pass a custom string to avoid
78 AC_ARG_WITH([binary-version],
79 AS_HELP_STRING([--with-binary-version=STRING],
80 [To avoid plugins cache problem between binary version]),[],[])
81 AS_IF([test -n "${with_binary_version}"],[
82 AC_DEFINE_UNQUOTED([DISTRO_VERSION],["${with_binary_version}"],
83 [Binary specific version])
86 dnl Prevent clang from accepting unknown flags with a mere warning
87 AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument], [CFLAGS])
88 AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument], [CXXFLAGS])
91 dnl Check the operating system
104 CFLAGS="${CFLAGS} -pthread"
108 CFLAGS="${CFLAGS} -pthread"
112 CFLAGS="${CFLAGS} -pthread"
113 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
114 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
119 CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/usr/X11R6/include"
120 LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/X11R6/lib/"
130 dnl Force gcc "-arch" flag
132 case "${host_cpu}" in
134 ARCH_flag="-arch i386"
137 ARCH_flag="-arch ppc64"
140 ARCH_flag="-arch ppc"
143 ARCH_flag="-arch x86_64"
146 ac_cv_c_bigendian="no"
147 ac_cv_c_attribute_packed="no"
152 CFLAGS="${CFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu11 ${ARCH_flag}"
153 CXX="${CXX} -stdlib=libc++ -std=c++11"
154 CXXFLAGS="${CXXFLAGS} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"
155 CPPFLAGS="${CPPFLAGS} ${ARCH_flag}"
156 OBJCFLAGS="${OBJCFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu11 ${ARCH_flag} -Werror=partial-availability"
157 LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names ${ARCH_flag}"
158 VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit])
159 VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,CoreServices])
162 [#import <TargetConditionals.h>
170 [#import <TargetConditionals.h>
180 dnl Handle Mac OS X SDK flags
182 AC_ARG_WITH(macosx-sdk,
183 AS_HELP_STRING([--with-macosx-sdk=DIR],
184 [compile using the SDK in DIR]))
185 if test "${with_macosx_sdk}" != "" ; then
186 test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
187 CPP="${CPP} -isysroot ${with_macosx_sdk}"
188 CC="${CC} -isysroot ${with_macosx_sdk}"
189 CXX="${CXX} -isysroot ${with_macosx_sdk}"
190 OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
191 LD="${LD} -syslibroot ${with_macosx_sdk}"
193 AC_ARG_WITH(macosx-version-min,
194 AS_HELP_STRING([--with-macosx-version-min=VERSION],
195 [compile for Mac OS X VERSION and above]))
196 if test "${with_macosx_version_min}" != "" ; then
197 CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
198 CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
199 CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
200 OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
201 LD="${LD} -mmacosx_version_min=${with_macosx_version_min}"
204 *mingw32* | *cygwin* | *wince* | *mingwce*)
205 dnl Force libtool to not link to (shared) libgcc_s when detecting C++ dependencies
206 dnl When doing this test with -static-libgcc it will link on (static) libgcc_eh
207 CXXFLAGS="${CXXFLAGS} -static-libgcc"
208 AC_CHECK_TOOL(WINDRES, windres, :)
209 AC_CHECK_TOOL(OBJCOPY, objcopy, :)
210 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
211 [[#ifdef _WIN32_WINNT
212 # error _WIN32_WINNT already defined
216 AC_DEFINE([_WIN32_WINNT], 0x0601, [Define to '0x0601' for Windows 7 APIs.])
218 AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
219 AC_DEFINE([_UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
220 AC_DEFINE([UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
221 AC_DEFINE([_ISOC99_SOURCE], [1], [Extensions to ISO C89 from ISO C99.])
222 AC_DEFINE([_ISOC11_SOURCE], [1], [Extensions to ISO C99 from ISO C11.])
223 AC_DEFINE([_POSIX_SOURCE], [1], [IEEE Std 1003.1.])
224 AC_DEFINE([_POSIX_C_SOURCE], [200809L], [IEEE Std 1003.1.])
225 AC_DEFINE([_XOPEN_SOURCE], [700], [POSIX and XPG 7th edition])
226 AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1], [XPG things and X/Open Unix extensions.])
227 AC_DEFINE([_BSD_SOURCE], [1], [ISO C, POSIX, and 4.3BSD things.])
228 AC_DEFINE([_SVID_SOURCE], [1], [ISO C, POSIX, and SVID things.])
235 dnl Check if we are using the mno-cygwin mode in which case we are
236 dnl actually dealing with a mingw32 compiler.
241 SYS=mingw32, AC_MSG_ERROR([VLC requires -mno-cygwin]))
245 if test "${SYS}" = "mingw32"; then
247 LDFLAGS="${LDFLAGS} -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase"
249 AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
250 ac_default_prefix="`pwd`/_win32"
251 DESTDIR="`pwd`/_win32/"
254 dnl NSIS/MSI Installer prefix and WIN64
256 case "${host_cpu}" in
257 amd64|x86_64|aarch64)
260 PROGRAMFILES="PROGRAMFILES64"
261 LDFLAGS="${LDFLAGS} -Wl,--high-entropy-va -Wl,--image-base,0x140000000"
265 PROGRAMFILES="PROGRAMFILES"
268 AC_SUBST([WINDOWS_ARCH])
269 AC_SUBST([PROGRAMFILES])
284 LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild -Zhigh-mem"
285 AC_LIBOBJ([freeaddrinfo])
286 AC_LIBOBJ([gai_strerror])
287 AC_CHECK_FUNCS([if_nametoindex])
291 AC_DEFINE([_XOPEN_SOURCE], [700], [POSIX and XPG 7th edition])
302 AC_ARG_ENABLE([winstore_app],
303 AS_HELP_STRING([--enable-winstore-app],
304 [Build targetted for Windows Store apps (default disabled)]))
307 AS_IF([test "${SYS}" = "mingw32"],[
309 AS_IF([test "${enable_winstore_app}" = "yes"], [
312 VLC_ADD_LIBS([libvlccore], [-lruntimeobject])
313 AC_LIBOBJ([gai_strerror])
317 AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
319 AM_CONDITIONAL([HAVE_LINUX], [test "${SYS}" = "linux"])
320 AM_CONDITIONAL([HAVE_OS2], [test "${SYS}" = "os2"])
322 AM_CONDITIONAL([HAVE_DARWIN], [test "${SYS}" = "darwin"])
323 AM_CONDITIONAL([HAVE_IOS], [test "${HAVE_IOS}" = "1"])
324 AM_CONDITIONAL([HAVE_OSX], [test "${HAVE_OSX}" = "1"])
325 AM_CONDITIONAL([HAVE_TVOS], [test "${HAVE_TVOS}" = "1"])
327 AM_CONDITIONAL([HAVE_NACL], [test "${SYS}" = "nacl"])
328 AM_CONDITIONAL([HAVE_LIBANL], [test "${HAVE_LIBANL}" = "1"])
330 AM_CONDITIONAL([HAVE_WIN32], [test "${SYS}" = "mingw32"])
331 AM_CONDITIONAL([HAVE_WIN64], [test "${HAVE_WIN64}" = "1"]) dnl Only used for the packaging
332 AM_CONDITIONAL([HAVE_WINSTORE], [test "$vlc_winstore_app" = "1"])
333 AM_CONDITIONAL([HAVE_WIN32_DESKTOP], [test "${SYS}" = "mingw32" -a "$vlc_winstore_app" = "0"])
336 dnl Sadly autoconf does not think about testing foo.exe when ask to test
337 dnl for program foo on win32
338 case "${build_os}" in
340 ac_executable_extensions=".exe"
349 AC_SUBST([BUILDEXEEXT])
351 dnl Android is linux, but a bit different
352 AS_IF([test "$SYS" = linux],[
353 AC_MSG_CHECKING([for an Android system])
354 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
355 [[#ifndef __ANDROID__
366 AM_CONDITIONAL([HAVE_ANDROID], [test "${HAVE_ANDROID}" = "1"])
368 dnl Tizen (minimum SDK version: 2.3)
369 AS_IF([test "$SYS" = linux],[
370 AC_MSG_CHECKING([for Tizen])
371 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
376 AC_DEFINE([HAVE_TIZEN_SDK], [1], [Define to 1 if vlc is built against Tizen SDK])
382 AM_CONDITIONAL([HAVE_TIZEN], [test "${HAVE_TIZEN}" = "1"])
385 dnl Check for the contrib directory
388 AS_HELP_STRING([--with-contrib[=DIR]],
389 [search for 3rd party libraries in DIR/include and DIR/lib])
391 AC_MSG_CHECKING([for 3rd party libraries path])
392 AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
393 CONTRIB_DIR="${srcdir}/contrib/${host}"
394 AS_IF([test ! -d "${CONTRIB_DIR}"], [
395 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
396 CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
397 AS_IF([test ! -d "${CONTRIB_DIR}"], [
398 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
400 AC_MSG_RESULT([not found])
404 AS_IF([test "${with_contrib}" != "no"], [
405 CONTRIB_DIR="${with_contrib}"
408 AC_MSG_RESULT([disabled])
411 AS_IF([test -n "${CONTRIB_DIR}"], [
412 AS_IF([test -d "${CONTRIB_DIR}/lib"],[
413 CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
415 echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
417 AC_MSG_RESULT([not usable])
421 AS_IF([test -n "${CONTRIB_DIR}"], [
422 AC_MSG_RESULT([${CONTRIB_DIR}])
423 CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
424 CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
425 CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
426 OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include -F${CONTRIB_DIR} -F${CONTRIB_DIR}/Frameworks"
427 export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:${CONTRIB_DIR}/share/pkgconfig:$PKG_CONFIG_PATH"
428 LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
430 AS_IF([test -z "$LUAC"], [
431 dnl Old contribs mixed cross-tools and cross-compiled executables
432 AS_IF([test -x "${CONTRIB_DIR}/bin/luac${BUILDEXEEXT}"], [
433 LUAC="${CONTRIB_DIR}/bin/luac${BUILDEXEEXT}"
436 dnl Newer contribs follow usual name space rules
437 AS_IF([test -x "${CONTRIB_DIR}/../bin/${host_alias}-luac${BUILDEXEEXT}"], [
438 LUAC="${CONTRIB_DIR}/../bin/${host_alias}-luac${BUILDEXEEXT}"
442 AS_IF([test "${SYS}" = "darwin"], [
443 export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
444 export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
447 AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
448 AC_MSG_ERROR([Third party libraries not found!])
451 AC_SUBST([CONTRIB_DIR])
453 dnl Add extras/tools to the PATH
454 TOOLS_DIR="${srcdir}/extras/tools/build/bin"
455 AS_IF([test -d "${TOOLS_DIR}"], [
456 TOOLS_DIR=`cd "${TOOLS_DIR}" && pwd`
457 export PATH="${TOOLS_DIR}":$PATH
462 dnl It's very bad, but our former custom system was worst
466 dnl override platform specific check for dependent libraries
467 dnl otherwise libtool linking of shared libraries will
468 dnl fail on anything other than pass_all.
469 AC_CACHE_VAL(lt_cv_deplibs_check_method,
470 [lt_cv_deplibs_check_method=pass_all])
472 LT_INIT([dlopen win32-dll shared disable-static])
474 LT_LANG([Windows Resource])
478 lt_cv_deplibs_check_method=pass_all
480 AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
481 AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
487 AM_GNU_GETTEXT_VERSION([0.19.8])
488 AM_GNU_GETTEXT([external], [need-formatstring-macros])
497 AS_IF([test "${SYS}" = "mingw32"], [
499 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
500 #if !defined(__MINGW32__)
501 # error Not compiling with mingw
505 dnl Check for broken versions of mingw-runtime compatability library
506 AC_MSG_CHECKING(for broken mingw-runtime)
507 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
509 #if defined(__MINGW64_VERSION_MAJOR)
510 # if __MINGW64_VERSION_MAJOR < 5
511 # error Update your mingw-w64! This one is too old.
514 # error You cannot compile with Mingw. Use Mingw-w64!
519 AC_MSG_RESULT([present])
520 AC_MSG_ERROR([LibVLC requires Mingw-w64 version 5.0 or higher!])
523 dnl force use of mingw provided c99 *printf over msvcrt
524 CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
526 dnl Check for the need to include the mingwex lib for mingw32
528 AC_CHECK_LIB([mingwex], [opendir],
529 AC_CHECK_LIB([mingw32], [opendir],,
530 [VLC_ADD_LIBS([libvlccore],[-lmingwex])])
534 AC_MSG_RESULT([Not compiling with mingw])
537 dnl Check for fnative-struct or mms-bitfields support for mingw32
538 AX_CHECK_COMPILE_FLAG([-mms-bitfields], [
539 AX_APPEND_FLAG([-mms-bitfields], [CFLAGS])
540 AX_APPEND_FLAG([-mms-bitfields], [CXXFLAGS])
541 # Check for the warning flag without "-Wno-", GCC accepts
542 # -Wno-<anything> for unsupported warnings, which can trigger
543 # other warnings instead.
544 AX_CHECK_COMPILE_FLAG([-Wincompatible-ms-struct], [
545 AX_APPEND_FLAG([-Wno-incompatible-ms-struct], [CFLAGS])
546 AX_APPEND_FLAG([-Wno-incompatible-ms-struct], [CXXFLAGS])
549 AX_CHECK_COMPILE_FLAG([-fnative-struct], [
550 AX_APPEND_FLAG([-fnative-struct], [CFLAGS])
551 AX_APPEND_FLAG([-fnative-struct], [CXXFLAGS])
558 dnl Buggy glibc prevention. Purposedly not cached.
559 dnl See sourceware.org bugs 5058 and 5443.
560 dnl Ubuntu alone has 20 bug numbers for this...
562 AC_MSG_CHECKING(for buggy GNU/libc versions)
563 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
565 #if defined (__GLIBC__) && (__GLIBC__ == 2) \
566 && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7)
567 # error GNU/libc with dcgettext killer bug!
570 AC_MSG_RESULT([not present])
572 AC_MSG_RESULT([found])
573 AS_IF([test "x${enable_nls}" != "xno"], [
574 AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable
575 work-around for this. Check with your distribution vendor on how to update the
576 glibc run-time. Alternatively, build with --disable-nls.])
580 dnl Plugin compilation stuff
584 dnl Check for system libs needed
587 dnl Check for usual libc functions
588 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])
589 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])
590 AC_REPLACE_FUNCS([gettimeofday])
591 AC_CHECK_FUNC(fdatasync,,
592 [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
595 VLC_REPLACE_DECL([realpath], [#include <stdlib.h>])
597 dnl mingw64 implements those as static inline, not functions with C linkage
598 VLC_REPLACE_DECL([asprintf], [#include <stdio.h>])
599 VLC_REPLACE_DECL([vasprintf], [#include <stdio.h>])
600 VLC_REPLACE_DECL([gmtime_r], [#include <time.h>])
601 VLC_REPLACE_DECL([localtime_r], [#include <time.h>])
603 dnl C11 static_assert()
604 AC_MSG_CHECKING([for static_assert in assert.h])
605 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <assert.h>], [
606 static_assert(1, "The impossible happened.");
609 AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define to 1 if <assert.h> defines static_assert.])
614 # Windows CE does not have strcoll()
617 dnl Check for non-standard system calls
620 AC_CHECK_FUNCS([eventfd vmsplice sched_getaffinity recvmmsg memfd_create])
623 AC_CHECK_FUNCS([_lock_file])
627 AH_BOTTOM([#include <vlc_fixups.h>])
629 dnl Check for struct pollfd
630 AC_CHECK_TYPES([struct pollfd],,,
631 [#include <sys/types.h>
634 #elif defined (_WIN32)
635 # include <winsock2.h>
639 dnl Check for struct timespec
640 AC_CHECK_TYPES([struct timespec],,,
643 dnl Check for max_align_t
644 AC_CHECK_TYPES([max_align_t],,,
645 [#include <stddef.h>])
647 dnl Checks for socket stuff
650 AC_SEARCH_LIBS(connect, [socket], [
651 AS_IF([test "$ac_cv_search_connect" != "none required"], [
652 SOCKET_LIBS="$ac_cv_search_connect"
655 AS_IF([test "${SYS}" = "mingw32"], [
656 SOCKET_LIBS="-lws2_32 -liphlpapi"
660 AC_SEARCH_LIBS([inet_pton], [nsl], [
661 AS_IF([test "$ac_cv_search_inet_pton" != "none required"], [
662 SOCKET_LIBS="$ac_cv_search_inet_pton $SOCKET_LIBS"
664 ],, [${SOCKET_LIBS}])
666 LIBS="${LIBS} ${SOCKET_LIBS}"
668 AC_LANG_PROGRAM([#ifdef _WIN32
669 #include <ws2tcpip.h>
671 # if _WIN32_WINNT < 0x600
675 #include <sys/socket.h>
676 #include <arpa/inet.h>
678 char dst[[sizeof(struct in_addr)]];
679 inet_pton(AF_INET, "127.0.0.1", dst);
680 ])],[AC_DEFINE([HAVE_INET_PTON],[1],[Define to 1 if you have inet_pton function])],[AC_LIBOBJ([inet_pton])])
681 AC_CHECK_TYPES([struct if_nameindex],,,[#include <net/if.h>])
682 AC_CHECK_FUNCS([if_nameindex])
684 AC_SUBST([SOCKET_LIBS])
686 dnl Check for socklen_t
687 AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
688 AC_CACHE_CHECK([for socklen_t in sys/socket.h], dnl ` (fix VIM syntax highlight
689 ac_cv_type_socklen_t,
690 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
691 [#include <sys/types.h>
693 # include <winsock2.h>
694 # include <ws2tcpip.h>
696 # include <sys/socket.h>
697 #endif]], [[socklen_t len; len = 0;]])],
698 ac_cv_type_socklen_t=yes,
699 ac_cv_type_socklen_t=no)])
700 AS_IF([test "$ac_cv_type_socklen_t" = no],
701 [AC_DEFINE(socklen_t, int)])
703 dnl Check for struct sockaddr_storage
704 AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
705 AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
706 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
708 [#include <sys/types.h>
709 #if defined( _WIN32 )
710 # include <winsock2.h>
712 # include <sys/socket.h>
713 #endif], [struct sockaddr_storage addr;],
714 ac_cv_struct_sockaddr_storage=yes,
715 ac_cv_struct_sockaddr_storage=no)])
716 AS_IF([test "${ac_cv_struct_sockaddr_storage}" = no], [
717 AC_DEFINE(sockaddr_storage, sockaddr)
718 AC_DEFINE(ss_family, sa_family)
721 dnl FreeBSD has a gnugetopt library for this:
723 AC_CHECK_FUNC(getopt_long,, [
724 AC_CHECK_LIB([gnugetopt],[getopt_long], [
725 GNUGETOPT_LIBS="-lgnugetopt"
728 AC_SUBST([GNUGETOPT_LIBS])
730 AC_CHECK_LIB([m], [cos], [
737 AC_CHECK_LIB([m], [lrintf], [
738 AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])
739 VLC_ADD_LIBS([skins2],[-lm])
741 AC_CHECK_LIB([m], [nanf],
742 AC_DEFINE(HAVE_NANF, 1, [Define to 1 if you have the NANF function])
744 AC_CHECK_LIB([m], [sincos], [
745 AC_DEFINE(HAVE_SINCOS, 1, [Define to 1 if you have the sincos function.])
750 AC_MSG_CHECKING([_Thread_local support])
751 AC_COMPILE_IFELSE([AC_LANG_SOURCE([_Thread_local int foo = 0;
754 AC_DEFINE(HAVE_THREAD_LOCAL, 1, [Defined to 1 if C11 _Thread_local storage qualifier is supported])
755 ],[ AC_MSG_RESULT([no])])
757 dnl __STDC_NO_THREADS__ can't be trusted on some platforms.
758 dnl check for its availability explicitely
759 AC_CHECK_HEADERS([threads.h])
761 AC_CHECK_LIB([anl],[getaddrinfo_a],[
762 AC_DEFINE(HAVE_LIBANL, 1, [Define to 1 if you have the anl library])
765 dnl Check for dynamic plugins
767 have_dynamic_objects="no"
769 AC_SEARCH_LIBS(dlsym, [dl svld], [
770 AS_IF([test "$ac_cv_search_dlsym" != "none required"], [
771 LIBDL="$ac_cv_search_dlsym"
773 have_dynamic_objects="yes"
778 AS_IF([test "${SYS}" = "mingw32"], [
780 have_dynamic_objects="yes" #assume we can use shared objects
783 AC_ARG_WITH([libfuzzer],
784 AS_HELP_STRING([--with-libfuzzer=DIR],
785 [use libFuzzer library from DIR and triggers sanitize coverage (default disabled)]),
788 AS_VAR_IF(with_libfuzzer, no, [], [
793 AM_CONDITIONAL([HAVE_LIBFUZZER], [test "${with_libfuzzer}" != "no"])
795 AS_IF([test "${enable_shared}" = "no"], [
796 have_dynamic_objects=no
798 AM_CONDITIONAL([HAVE_DYNAMIC_PLUGINS], [test "${have_dynamic_objects}" != "no"])
802 AS_IF([test "${SYS}" != "mingw32"], [
803 AC_SEARCH_LIBS([clock_nanosleep], [rt pthread], [
804 AS_IF([test "$ac_cv_search_clock_nanosleep" != "none required"], [
805 LIBRT="$ac_cv_search_clock_nanosleep"
808 AC_SEARCH_LIBS([nanosleep], [rt pthread posix4], [
809 AS_IF([test "$ac_cv_search_nanosleep" != "none required"], [
810 LIBRT="$ac_cv_search_nanosleep"
818 dnl Check for headers
822 AC_CHECK_HEADERS([arpa/inet.h pthread.h search.h sys/shm.h sys/socket.h sys/uio.h])
823 AC_CHECK_HEADERS([net/if.h], [], [],
825 #include <sys/types.h>
826 #include <sys/socket.h>
828 AC_CHECK_HEADER([syslog.h], [have_syslog="yes"], [have_syslog="no"])
829 AM_CONDITIONAL([HAVE_SYSLOG], [test "$have_syslog" = "yes"])
832 AC_CHECK_HEADERS([netinet/tcp.h netinet/udplite.h sys/param.h sys/mount.h])
835 AC_CHECK_HEADERS([features.h getopt.h linux/dccp.h linux/magic.h mntent.h sys/eventfd.h])
838 AC_CHECK_HEADERS([xlocale.h])
840 dnl Check if C++ headers define locale_t
842 AC_CACHE_CHECK([if C++ headers define locale_t],
843 [ac_cv_cxx_locale_t],
844 [ac_cv_cxx_locale_t=no
845 AC_TRY_COMPILE([#include <locale>], [locale_t loc;],
846 [ac_cv_cxx_locale_t=yes])])
847 if test "${ac_cv_cxx_locale_t}" != "no"; then
848 AC_DEFINE(HAVE_CXX_LOCALE_T, 1, Define to 1 if C++ headers define locale_t)
852 dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
853 AH_TEMPLATE(ssize_t, [Define to `int' if <stddef.h> does not define.]) dnl ` (fix VIM syntax highlight
854 AC_CHECK_TYPE(ssize_t,, [
855 AC_DEFINE(ssize_t, int)
858 dnl It seems that autoconf detects pkg-config only during the first
859 dnl PKG_CHECK_MODULES from configure.ac - which makes sense. But in our case,
860 dnl it is nested within a conditional block, so it was not working right.
861 dnl Make PKG_CONFIG_PATH precious so that it appears in the help and get saved
862 AC_ARG_VAR(PKG_CONFIG_PATH,
863 [Paths where to find .pc not at the default location])
864 PKG_PROG_PKG_CONFIG()
866 dnl On some OS we need static linking
867 AS_IF([test -n "${PKG_CONFIG}" ],[
868 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[
869 PKG_CONFIG="${PKG_CONFIG} --static"
875 dnl Check for zlib.h and -lz if available
877 AC_CHECK_HEADERS([zlib.h], [ have_zlib=yes ], [ have_zlib=no ])
878 AM_CONDITIONAL([HAVE_ZLIB], [ test "${have_zlib}" = "yes" ])
879 if test "${have_zlib}" = "yes"
881 VLC_ADD_LIBS([sap],[-lz])
886 dnl Domain name i18n support via GNU libidn
888 PKG_CHECK_MODULES([IDN], [libidn], [
890 AC_DEFINE([HAVE_IDN], 1, [Define to 1 if you have GNU libidn.])
897 AC_ARG_ENABLE([dbus],
898 AS_HELP_STRING([--enable-dbus],
899 [compile D-Bus message bus support (default enabled)]))
901 AS_IF([test "${enable_dbus}" != "no"], [
902 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.6.0], [
905 AS_IF([test -n "${enable_dbus}"], [
906 AC_MSG_ERROR([${DBUS_PKG_ERRORS}.])
908 AC_MSG_WARN([${DBUS_PKG_ERRORS}.])
912 AM_CONDITIONAL([HAVE_DBUS], [test "${have_dbus}" = "yes"])
915 dnl Check for systemd
916 PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [
919 AC_MSG_WARN([${SYSTEMD_PKG_ERRORS}.])
921 AM_CONDITIONAL([HAVE_SYSTEMD], [test "${have_systemd}" = "yes"])
924 EXTEND_HELP_STRING([Optimization options:])
926 dnl Compiler warnings
929 AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wduplicated-branches -Wduplicated-cond], [CFLAGS])
930 AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wduplicated-branches -Wduplicated-cond], [CXXFLAGS])
932 AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -Wlogical-op -Wshadow=local -Wmultistatement-macros], [CFLAGS])
933 AX_APPEND_COMPILE_FLAGS([-pipe], [CFLAGS])
938 AC_ARG_ENABLE([debug],
939 AS_HELP_STRING([--enable-debug],
940 [build with run-time assertions (default disabled)]),,
943 [Define to 1 if debug code should NOT be compiled])
944 AS_IF([test "${enable_debug}" != "no"], [
945 AC_CHECK_HEADERS([valgrind/valgrind.h])
953 AC_ARG_ENABLE([gprof],
954 AS_HELP_STRING([--enable-gprof],[profile with gprof (default disabled)]),,
956 AS_IF([test "${enable_gprof}" != "no"], [
957 CFLAGS="${CFLAGS} -pg"
958 CXXFLAGS="${CXXFLAGS} -pg"
959 OBJCFLAGS="${OBJCFLAGS} -pg"
960 LDFLAGS="${LDFLAGS} -pg"
963 AC_ARG_ENABLE([cprof],
964 AS_HELP_STRING([--enable-cprof],[profile with cprof (default disabled)]),,
966 AS_IF([test "${enable_gprof}" != "no"], [
967 CFLAGS="${CFLAGS} -finstrument-functions"
968 CXXFLAGS="${CXXFLAGS} -finstrument-functions"
969 OBJCFLAGS="${OBJCFLAGS} -finstrument-functions"
970 LDFLAGS="${LDFLAGS} -finstrument-functions"
976 AC_ARG_ENABLE([coverage],
977 AS_HELP_STRING([--enable-coverage],
978 [build for test coverage (default disabled)]),,
979 [enable_coverage="no"])
980 AS_IF([test "${enable_coverage}" != "no"], [
981 CFLAGS="-fprofile-arcs -ftest-coverage ${CFLAGS}"
982 CXXFLAGS="-fprofile-arcs -ftest-coverage ${CXXFLAGS}"
983 LDFLAGS="-lgcov ${LDFLAGS}"
986 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "os2"], [
988 CFLAGS="${CFLAGS} -fvisibility=hidden"
989 CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
990 OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden"
991 AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden],
992 [ac_cv_c_visibility_hidden], [
993 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
994 ac_cv_c_visibility_hidden=yes
996 ac_cv_c_visibility_hidden=no
999 AS_IF([test "${ac_cv_c_visibility_hidden}" = "no"], [VLC_RESTORE_FLAGS])
1005 AC_ARG_WITH([sanitizer],
1006 AS_HELP_STRING([--with-sanitizer=(address/memory/undefined/thread)],
1007 [build with sanitizer flags (default disabled)]),
1009 [with_sanitizer=no])
1011 AS_VAR_IF(with_sanitizer, no, [], [
1012 AX_CHECK_COMPILE_FLAG([-fsanitize=${with_sanitizer}], [
1013 AX_APPEND_FLAG([-fsanitize=${with_sanitizer}])
1014 AX_APPEND_FLAG([-fsanitize=${with_sanitizer}], [CXXFLAGS])
1015 AX_APPEND_FLAG([-fsanitize=${with_sanitizer}], [LDFLAGS])
1017 AC_MSG_ERROR(["-fsanitize=${with_sanitizer} not supported!"])
1019 AX_APPEND_FLAG([-g])
1020 AX_APPEND_FLAG([-g], [CXXFLAGS])
1022 AS_IF([test -z "${with_sanitizer##*address*}" ], [
1023 AX_APPEND_COMPILE_FLAGS([-fsanitize-address-use-after-scope -fno-omit-frame-pointer -fsanitize=pointer-compare -fsanitize=pointer-subtract])
1024 AX_APPEND_COMPILE_FLAGS([-fsanitize-address-use-after-scope -fno-omit-frame-pointer -fsanitize=pointer-compare -fsanitize=pointer-subtract], [CXXFLAGS])
1026 AS_IF([test -z "${with_sanitizer##*memory*}" ], [
1027 AX_APPEND_COMPILE_FLAGS([-fPIE -pie])
1028 AX_APPEND_COMPILE_FLAGS([-fPIE -pie], [CXXFLAGS])
1030 AS_IF([test -z "${with_sanitizer##*thread*}" ], [
1031 AX_APPEND_COMPILE_FLAGS([-fPIE -pie])
1032 AX_APPEND_COMPILE_FLAGS([-fPIE -pie], [CXXFLAGS])
1037 dnl Enable/disable optimizations
1039 AC_ARG_ENABLE([optimizations],
1040 AS_HELP_STRING([--disable-optimizations],
1041 [disable compiler optimizations (default enabled)]),,
1042 [enable_optimizations="yes"])
1044 dnl Check for various optimization flags
1045 AS_IF([test "${enable_optimizations}" != "no"], [
1047 dnl -O3 only in production builds
1048 AS_IF([test "${enable_debug}" = "no"], [
1050 CFLAGS="${CFLAGS} -O3"
1051 CXXFLAGS="${CXXFLAGS} -O3"
1052 OBJCFLAGS="${OBJCFLAGS} -O3"
1053 AC_CACHE_CHECK([if $CC accepts -O3], [ac_cv_c_o3], [
1054 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1060 AS_IF([test "${ac_cv_c_o3}" = "no"], [VLC_RESTORE_FLAGS])
1063 dnl Check for fast maths
1064 AX_APPEND_COMPILE_FLAGS([-fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range], [CFLAGS])
1065 AX_APPEND_COMPILE_FLAGS([-fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range], [CXXFLAGS])
1068 #if defined(_MSC_VER) && !defined(__clang__)
1069 # pragma fenv_access(off)
1070 # pragma fp_contract(on)
1071 #elif defined(__GNUC__)
1072 /* Not supported so far */
1074 # pragma STDC FENV_ACCESS OFF
1075 # pragma STDC FP_CONTRACT ON
1079 dnl Check for -funroll-loops
1081 CFLAGS="${CFLAGS} -funroll-loops"
1082 CXXFLAGS="${CXXFLAGS} -funroll-loops"
1083 OBJCFLAGS="${OBJCFLAGS} -funroll-loops"
1084 AC_CACHE_CHECK([if $CC accepts -funroll-loops], [ac_cv_c_unroll_loops], [
1085 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1086 ac_cv_c_unroll_loops=yes
1088 ac_cv_c_unroll_loops=no
1091 AS_IF([test "${ac_cv_c_unroll_loops}" = "no"], [VLC_RESTORE_FLAGS])
1093 AS_IF([test "$enable_debug" = "no"], [
1094 dnl Check for -fomit-frame-pointer
1096 CFLAGS="${CFLAGS} -fomit-frame-pointer"
1097 CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer"
1098 OBJCFLAGS="${OBJCFLAGS} -fomit-frame-pointer"
1099 AC_CACHE_CHECK([if $CC accepts -fomit-frame-pointer],
1100 [ac_cv_c_omit_frame_pointer], [
1101 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1102 ac_cv_c_omit_frame_pointer=yes
1104 ac_cv_c_omit_frame_pointer=no
1107 AS_IF([test "${ac_cv_c_omit_frame_pointer}" = "no"], [VLC_RESTORE_FLAGS])
1112 AC_ARG_ENABLE([ssp],
1113 AS_HELP_STRING([--disable-ssp],
1114 [disable stack smashing protection (default enabled for optimized builds)]), [],
1117 AS_IF([test "${enable_ssp}" != "no" -a "${enable_optimizations}" != "no"], [
1119 AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong])
1120 AX_APPEND_COMPILE_FLAGS([-fstack-protector-strong], [CXXFLAGS])
1121 dnl Win32 requires linking to ssp for stack-protection
1122 AS_IF([test "${SYS}" = "mingw32"], [
1123 LDFLAGS="${LDFLAGS} -lssp"
1124 AC_CACHE_CHECK([if linker supports stack protectors], [ac_cv_ld_ssp], [
1125 AC_TRY_LINK([#include <stdio.h>],[char buf[100]; fgets(buf, sizeof(buf), stdin);], [
1131 AS_IF([test "${ac_cv_ld_ssp}" = "no"], [VLC_RESTORE_FLAGS])
1135 AS_IF([test "${SYS}" = "mingw32"], [
1136 dnl library for BCrypt APIs
1137 AS_IF([test "${vlc_winstore_app}" = 1],
1138 [LDFLAGS="${LDFLAGS} -lbcrypt"])
1142 LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic"
1143 AC_CACHE_CHECK([if linker supports -Bsymbolic], [ac_cv_ld_bsymbolic], [
1145 ac_cv_ld_bsymbolic="-Wl,-Bsymbolic"
1147 ac_cv_ld_bsymbolic=""
1151 SYMBOLIC_LDFLAGS="${ac_cv_ld_bsymbolic}"
1152 AC_SUBST([SYMBOLIC_LDFLAGS])
1155 LDFLAGS="${LDFLAGS} -Wl,-z,defs"
1156 AC_CACHE_CHECK([if linker supports -z,defs], [ac_cv_ld_z_defs], [
1158 ac_cv_ld_z_defs="yes"
1160 ac_cv_ld_z_defs="no"
1163 AS_IF([test "${ac_cv_ld_z_defs}" = "no"], [VLC_RESTORE_FLAGS])
1165 dnl Check for __attribute__((packed))
1166 AC_CACHE_CHECK([for __attribute__((packed))],
1167 [ac_cv_c_attribute_packed],
1168 [ac_cv_c_attribute_packed=no
1169 AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b; (void)b;],
1170 [ac_cv_c_attribute_packed=yes])])
1171 if test "${ac_cv_c_attribute_packed}" != "no"; then
1172 AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
1178 case "${host_cpu}" in
1191 dnl Check for backtrace() support
1192 AC_CHECK_HEADERS([execinfo.h])
1193 AC_CHECK_FUNCS([backtrace])
1198 ALIASES="${ALIASES} cvlc rvlc"
1201 dnl Accelerated modules
1204 dnl Check for fully working MMX intrinsics
1205 dnl We need support for -mmmx, we need <mmintrin.h>, and we also need a
1206 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1207 AC_ARG_ENABLE([mmx],
1208 AS_HELP_STRING([--disable-mmx],
1209 [disable MMX optimizations (default auto)]),,[
1210 case "${host_cpu}" in
1221 AS_IF([test "${enable_mmx}" != "no"], [
1224 CFLAGS="${CFLAGS} -mmmx"
1225 AC_CACHE_CHECK([if $CC groks MMX intrinsics], [ac_cv_c_mmx_intrinsics], [
1226 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1227 [#include <mmintrin.h>
1229 uint64_t frobzor;]], [
1231 a = b = c = (__m64)frobzor;
1232 a = _mm_slli_pi16(a, 3);
1233 a = _mm_adds_pi16(a, b);
1234 c = _mm_srli_pi16(c, 8);
1235 c = _mm_slli_pi16(c, 3);
1236 b = _mm_adds_pi16(b, c);
1237 a = _mm_unpacklo_pi8(a, b);
1238 frobzor = (uint64_t)a;]])], [
1239 ac_cv_c_mmx_intrinsics=yes
1241 ac_cv_c_mmx_intrinsics=no
1245 AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
1246 AC_DEFINE(HAVE_MMX_INTRINSICS, 1, [Define to 1 if MMX intrinsics are available.])
1250 CFLAGS="${CFLAGS} -mmmx"
1251 AC_CACHE_CHECK([if $CC groks MMX inline assembly], [ac_cv_mmx_inline], [
1252 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1254 asm volatile("packuswb %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1257 ac_cv_mmx_inline=yes
1262 AS_IF([test "${ac_cv_mmx_inline}" != "no"], [
1263 AC_DEFINE(CAN_COMPILE_MMX, 1, [Define to 1 inline MMX assembly is available.])
1267 AC_CACHE_CHECK([if $CC groks MMX EXT inline assembly],
1268 [ac_cv_mmxext_inline], [
1269 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1271 asm volatile("maskmovq %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1274 ac_cv_mmxext_inline=yes
1276 ac_cv_mmxext_inline=no
1280 AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
1281 AC_DEFINE(CAN_COMPILE_MMXEXT, 1, [Define to 1 if MMX EXT inline assembly is available.])
1285 AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
1286 AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
1288 dnl Check for fully workin SSE2 intrinsics
1289 dnl We need support for -mmmx, we need <emmintrin.h>, and we also need a
1290 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1291 AC_ARG_ENABLE([sse],
1292 AS_HELP_STRING([--disable-sse],
1293 [disable SSE (1-4) optimizations (default auto)]),, [
1294 case "${host_cpu}" in
1304 AS_IF([test "${enable_sse}" != "no"], [
1305 ARCH="${ARCH} sse sse2"
1308 CFLAGS="${CFLAGS} -msse2"
1309 AC_CACHE_CHECK([if $CC groks SSE2 intrinsics], [ac_cv_c_sse2_intrinsics], [
1310 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1311 [#include <emmintrin.h>
1313 uint64_t frobzor;]], [
1315 a = b = c = _mm_set1_epi64((__m64)frobzor);
1316 a = _mm_slli_epi16(a, 3);
1317 a = _mm_adds_epi16(a, b);
1318 c = _mm_srli_epi16(c, 8);
1319 c = _mm_slli_epi16(c, 3);
1320 b = _mm_adds_epi16(b, c);
1321 a = _mm_unpacklo_epi8(a, b);
1322 frobzor = (uint64_t)_mm_movepi64_pi64(a);]])], [
1323 ac_cv_c_sse2_intrinsics=yes
1325 ac_cv_c_sse2_intrinsics=no
1329 AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
1330 AC_DEFINE(HAVE_SSE2_INTRINSICS, 1, [Define to 1 if SSE2 intrinsics are available.])
1334 CFLAGS="${CFLAGS} -msse"
1335 AC_CACHE_CHECK([if $CC groks SSE inline assembly], [ac_cv_sse_inline], [
1336 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1338 asm volatile("xorps %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1341 ac_cv_sse_inline=yes
1347 AS_IF([test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "solaris"], [
1348 AC_DEFINE(CAN_COMPILE_SSE, 1, [Define to 1 if SSE inline assembly is available.])
1351 AC_CACHE_CHECK([if $CC groks SSE2 inline assembly], [ac_cv_sse2_inline], [
1352 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1354 asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1357 ac_cv_sse2_inline=yes
1359 ac_cv_sse2_inline=no
1362 AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [
1363 AC_DEFINE(CAN_COMPILE_SSE2, 1, [Define to 1 if SSE2 inline assembly is available.])
1368 AC_CACHE_CHECK([if $CC groks SSE3 inline assembly], [ac_cv_sse3_inline], [
1369 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1371 asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1374 ac_cv_sse3_inline=yes
1376 ac_cv_sse3_inline=no
1380 AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
1381 AC_DEFINE(CAN_COMPILE_SSE3, 1, [Define to 1 if SSE3 inline assembly is available.]) ])
1383 AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly], [ac_cv_ssse3_inline], [
1384 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1386 asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p):"xmm0");
1389 ac_cv_ssse3_inline=yes
1391 ac_cv_ssse3_inline=no
1395 AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
1396 AC_DEFINE(CAN_COMPILE_SSSE3, 1, [Define to 1 if SSSE3 inline assembly is available.]) ])
1399 AC_CACHE_CHECK([if $CC groks SSE4.1 inline assembly],
1400 [ac_cv_sse4_1_inline], [
1401 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1403 asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1406 ac_cv_sse4_1_inline=yes
1408 ac_cv_sse4_1_inline=no
1412 AS_IF([test "${ac_cv_sse4_1_inline}" != "no"], [
1413 AC_DEFINE(CAN_COMPILE_SSE4_1, 1, [Define to 1 if SSE4_1 inline assembly is available.]) ])
1416 AC_CACHE_CHECK([if $CC groks SSE4.2 inline assembly],
1417 [ac_cv_sse4_2_inline], [
1418 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1420 asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1423 ac_cv_sse4_2_inline=yes
1425 ac_cv_sse4_2_inline=no
1429 AS_IF([test "${ac_cv_sse4_2_inline}" != "no"], [
1430 AC_DEFINE(CAN_COMPILE_SSE4_2, 1, [Define to 1 if SSE4_2 inline assembly is available.]) ])
1433 AC_CACHE_CHECK([if $CC groks SSE4A inline assembly], [ac_cv_sse4a_inline], [
1434 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1436 asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1439 ac_cv_sse4a_inline=yes
1441 ac_cv_sse4a_inline=no
1445 AS_IF([test "${ac_cv_sse4a_inline}" != "no"], [
1446 AC_DEFINE([CAN_COMPILE_SSE4A], [1], [Define to 1 if SSE4A inline assembly is available.]) ])
1448 AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
1451 CFLAGS="${CFLAGS} -mmmx"
1453 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], [
1454 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1456 asm volatile("pfadd %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1459 ac_cv_3dnow_inline=yes
1461 ac_cv_3dnow_inline=no
1465 AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
1466 AC_DEFINE([CAN_COMPILE_3DNOW], 1,
1467 [Define to 1 if 3D Now! inline assembly is available.])
1470 AM_CONDITIONAL([HAVE_3DNOW], [test "$have_3dnow" = "yes"])
1473 AC_ARG_ENABLE([neon],
1474 AS_HELP_STRING([--disable-neon],
1475 [disable ARM NEON optimizations (default auto)]),, [
1476 case "${host_cpu}" in
1488 AS_IF([test "${enable_neon}" != "no"], [
1490 AC_CACHE_CHECK([if $CCAS groks ARM NEON assembly], [ac_cv_arm_neon], [
1491 AS_IF([test "${enable_neon}" != "64"], [
1492 CFLAGS="${CFLAGS} -mfpu=neon -mhard-float"
1495 asm volatile("vqmovun.s64 d0, q1":::"d0");
1503 CFLAGS="${CFLAGS} -march=armv8-a+simd"
1506 asm volatile("uhadd v0.8b, v0.8b, v1.8b":::"v0");
1517 AM_CONDITIONAL([HAVE_NEON], [test "${ac_cv_arm_neon}" = "32"])
1518 AM_CONDITIONAL([HAVE_ARM64], [test "${ac_cv_arm_neon}" = "64"])
1520 AC_ARG_ENABLE([sve],
1521 AS_HELP_STRING([--disable-sve],
1522 [disable ARM SVE optimizations (default auto)]),, [
1523 AS_IF([test "${host_cpu}" = "aarch64"], [enable_sve="yes"] ,[enable_sve="no"])
1525 AS_IF([test "${enable_sve}" != "no"], [
1527 CFLAGS="${CFLAGS} -march=armv8-a+sve"
1528 AC_CACHE_CHECK([if $CCAS groks ARM SVE assembly], [ac_cv_arm_sve], [
1531 asm volatile("ptrue p0.s" ::: "p0");
1541 AM_CONDITIONAL([HAVE_SVE], [test "${ac_cv_arm_sve}" = "yes"])
1544 AC_ARG_ENABLE([altivec],
1545 AS_HELP_STRING([--disable-altivec],
1546 [disable AltiVec optimizations (default auto)]),, [
1547 AS_CASE("${host_cpu}", [powerpc*],
1548 [enable_altivec=yes], [enable_altivec=no])
1552 AS_IF([test "${enable_altivec}" = "yes"], [
1553 ARCH="${ARCH} altivec";
1555 AC_CACHE_CHECK([if $CC groks AltiVec inline assembly],
1556 [ac_cv_altivec_inline],
1557 [AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1558 ac_cv_altivec_inline="yes",
1559 [CFLAGS="${CFLAGS} -Wa,-maltivec"
1560 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1561 [ac_cv_altivec_inline="-Wa,-maltivec"],
1562 ac_cv_altivec_inline=no)
1565 AS_IF([test "${ac_cv_altivec_inline}" != "no"], [
1566 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1,
1567 [Define to 1 if AltiVec inline assembly is available.])
1568 AS_IF([test "${ac_cv_altivec_inline}" != "yes"], [
1569 ALTIVEC_CFLAGS="${ac_cv_altivec_inline}"
1570 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}])
1576 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
1577 [ac_cv_c_altivec], [
1578 CFLAGS="${CFLAGS} -maltivec"
1579 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1580 [#include <altivec.h>]], [
1581 [vec_ld(0, (unsigned char *)0);]])], [
1582 ac_cv_c_altivec="-maltivec"
1584 ac_cv_c_altivec="no"
1588 AS_IF([test "${ac_cv_c_altivec}" != "no"], [
1589 CPPFLAGS="${CPPFLAGS} ${ac_cv_c_altivec}"
1590 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, [Define to 1 if C AltiVec extensions are available.])
1591 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_c_altivec}])
1592 ALTIVEC_CFLAGS="$ALTIVEC_CFLAGS ${ac_cv_c_altivec}"
1593 VLC_ADD_CFLAGS([deinterlace],[${ac_cv_c_altivec}])
1596 AC_CHECK_HEADERS([altivec.h])
1599 LDFLAGS="${LDFLAGS} -Wl,-framework,vecLib"
1600 AC_CACHE_CHECK([if linker needs -framework vecLib],
1602 [AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)])
1604 AS_IF([test "${ac_cv_ld_altivec}" != "no"], [
1605 VLC_ADD_LIBS([libvlccore],[-Wl,-framework,vecLib])
1608 AC_SUBST([ALTIVEC_CFLAGS])
1609 AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])
1614 AC_ARG_ENABLE([optimize-memory],
1615 AS_HELP_STRING([--enable-optimize-memory],
1616 [optimize memory usage over performance]))
1617 if test "${enable_optimize_memory}" = "yes"; then
1618 AC_DEFINE(OPTIMIZE_MEMORY, 1, Define if you want to optimize memory usage over performance)
1622 dnl Allow running as root (useful for people running on embedded platforms)
1624 AC_ARG_ENABLE([run-as-root],
1625 AS_HELP_STRING([--enable-run-as-root],
1626 [allow running VLC as root (default disabled)]))
1627 AS_IF([test "${enable_run_as_root}" = "yes"],[
1628 AC_DEFINE(ALLOW_RUN_AS_ROOT, 1,
1629 [Define to 1 to allow running VLC as root (uid 0).])
1635 AC_ARG_ENABLE([sout],
1636 AS_HELP_STRING([--disable-sout],
1637 [disable streaming output (default enabled)]))
1638 AS_IF([test "${enable_sout}" != "no"], [
1639 AC_DEFINE(ENABLE_SOUT, 1, [Define to 1 for stream output support.])
1641 AM_CONDITIONAL([ENABLE_SOUT], [test "${enable_sout}" != "no"])
1644 AC_ARG_ENABLE([lua],
1645 AS_HELP_STRING([--disable-lua],
1646 [disable LUA scripting support (default enabled)]))
1647 if test "${enable_lua}" != "no"
1649 PKG_CHECK_MODULES(LUA, lua5.2,
1652 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead])
1654 PKG_CHECK_MODULES(LUA, lua5.1,
1657 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
1658 PKG_CHECK_MODULES(LUA, lua >= 5.1,
1661 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
1663 AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
1666 AC_CHECK_LIB( lua5.2 , luaL_newstate,
1667 [LUA_LIBS="-llua5.2"],
1668 AC_CHECK_LIB( lua5.1 , luaL_newstate,
1669 [LUA_LIBS="-llua5.1"],
1670 AC_CHECK_LIB( lua51 , luaL_newstate,
1671 [LUA_LIBS="-llua51"],
1672 AC_CHECK_LIB( lua , luaL_newstate,
1680 if test "x${have_lua}" != "xyes" ; then
1681 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.])
1683 AC_ARG_VAR([LUAC], [LUA byte compiler])
1684 AS_IF([test -z "$LUAC"], [
1685 AC_CHECK_TOOL(LUAC, [luac], [false])
1687 AS_IF([test "${LUAC}" = "false"], [
1688 AC_MSG_ERROR([Could not find the LUA byte compiler.])
1690 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], [
1691 AC_MSG_ERROR([You need 32-bits luac when using lua from contrib.])
1694 AM_CONDITIONAL([BUILD_LUA], [test "${have_lua}" = "yes"])
1698 dnl VideoLAN manager
1700 AC_ARG_ENABLE([vlm],
1701 AS_HELP_STRING([--disable-vlm],
1702 [disable the stream manager (default enabled)]),,
1703 [enable_vlm="${enable_sout}"])
1704 AS_IF([test "${enable_vlm}" != "no"], [
1705 AS_IF([test "${enable_sout}" = "no"], [
1706 AC_MSG_ERROR([VLM requires the stream output. Do not use --disable-sout.])
1708 AC_DEFINE(ENABLE_VLM, 1, [Define if you want the VideoLAN manager support])
1710 AM_CONDITIONAL([ENABLE_VLM], [test "${enable_vlm}" != "no"])
1714 dnl Addons manager storage and repositories modules
1716 AC_ARG_ENABLE([addonmanagermodules],
1717 AS_HELP_STRING([--disable-addonmanagermodules],
1718 [disable the addons manager modules (default enabled)]))
1719 if test "${enable_addonmanagermodules}" != "no"
1721 AC_DEFINE(ENABLE_ADDONMANAGERMODULES, 1, [Define if you want the addons manager modules])
1723 AM_CONDITIONAL([ENABLE_ADDONMANAGERMODULES], [test "${enable_addonmanagermodules}" != "no"])
1730 EXTEND_HELP_STRING([Input plugins:])
1733 dnl libarchive access module
1735 PKG_ENABLE_MODULES_VLC([ARCHIVE], [archive], [libarchive >= 3.1.0], (libarchive support), [auto])
1740 AC_ARG_ENABLE([live555],
1741 AS_HELP_STRING([--enable-live555],
1742 [enable RTSP input through live555 (default enabled)]))
1744 AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
1745 PKG_CHECK_MODULES(LIVE555, live555, [
1746 VLC_ADD_PLUGIN([live555])
1747 VLC_ADD_CXXFLAGS([live555], [$LIVE555_CFLAGS])
1748 VLC_ADD_LIBS([live555],[$LIVE555_LIBS])
1750 AC_MSG_WARN([${LIVE555_PKG_ERRORS}.])
1755 dnl detect include paths
1756 AS_IF([test -f "${CONTRIB_DIR}/include/UsageEnvironment/UsageEnvironment.hh"], [
1757 CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
1759 AS_IF([test "${SYS}" != "os2"], [
1760 LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"}
1761 CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment"
1763 LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"}
1764 CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include"
1765 LDFLAGS_live555="-L${LIVE555_PREFIX}/liveMedia -L${LIVE555_PREFIX}/groupsock -L${LIVE555_PREFIX}/BasicUsageEnvironment -L${LIVE555_PREFIX}/UsageEnvironment"
1770 AS_IF([test "${SYS}" = "solaris"], [
1771 CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
1773 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
1774 LDFLAGS="${LDFLAGS} ${LDFLAGS_live555}"
1777 AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [
1778 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
1779 [#include <liveMedia_version.hh>
1780 #if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1324598400)
1790 AS_IF([test "$ac_cv_live555" = "no"], [
1791 AC_MSG_WARN([live555 is missing or its installed version is too old:
1792 Version 2011.12.23 or later is required to proceed.
1793 You can get an updated one from http://www.live555.com/liveMedia .])
1794 AS_IF([test -n "${enable_live555}"], [
1795 AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
1798 other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
1799 other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
1800 AS_IF([test "${SYS}" = "mingw32"], [
1801 # add ws2_32 for closesocket, select, recv
1802 other_libs="$other_libs -lws2_32"
1805 dnl We need to check for pic because live555 don't provide shared libs
1806 dnl and we want to build a plugins so we need -fPIC on some arch.
1807 VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
1808 VLC_ADD_LDFLAGS([live555], [${LDFLAGS_live555}])
1809 AC_CHECK_LIB([liveMedia_pic], [main], [
1810 VLC_ADD_PLUGIN([live555])
1811 VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
1813 AC_CHECK_LIB([liveMedia], [main], [
1814 VLC_ADD_PLUGIN([live555])
1815 VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
1816 ],[],[${other_libs}])
1817 ],[${other_libs_pic}])
1825 dnl IIDC and DV FireWire input modules
1827 PKG_ENABLE_MODULES_VLC([DC1394], [], [libdc1394-2 >= 2.1.0], [IIDC FireWire input module], [auto])
1828 PKG_ENABLE_MODULES_VLC([DV1394], [], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV FireWire input module], [auto])
1831 dnl - linsys modules: access module check for libzvbi
1833 AC_ARG_ENABLE([linsys],
1834 AS_HELP_STRING([--enable-linsys],
1835 [Linux Linear Systems Ltd. SDI and HD-SDI input cards (default enabled)]))
1836 AS_IF([test "$SYS" = "linux" -a "${enable_linsys}" != "no"], [
1837 VLC_ADD_PLUGIN([linsys_hdsdi])
1838 PKG_CHECK_MODULES(LINSYS_SDI, [zvbi-0.2 >= 0.2.28], [
1839 VLC_ADD_PLUGIN([linsys_sdi])
1841 AC_MSG_WARN([${LINSYS_SDI_PKG_ERRORS}.])
1846 dnl dvdread module: check for libdvdread
1848 PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread > 4.9.0], [dvdread input module], [auto])
1851 dnl libdvdnav plugin
1853 PKG_ENABLE_MODULES_VLC([DVDNAV], [], [dvdnav > 4.9.0], [DVD with navigation input module (dvdnav)], [auto])
1854 AS_IF([test "${enable_dvdnav}" != "no"], [
1855 AC_MSG_CHECKING(for dvdnav_stream_cb in dvdnav/dvdnav.h)
1856 AC_EGREP_HEADER(dvdnav_stream_cb,dvdnav/dvdnav.h,[
1858 AC_DEFINE(HAVE_STREAM_CB_IN_DVDNAV_H, 1, For dvdnav demux support)
1865 dnl Blu-ray Disc Support with libbluray
1867 PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.6.2], (libbluray for Blu-ray disc support ) )
1870 dnl OpenCV wrapper and example filters
1872 PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv > 2.0], (OpenCV (computer vision) filter), [auto])
1876 dnl libsmbclient plugin
1878 PKG_ENABLE_MODULES_VLC([SMBCLIENT], [smbc], [smbclient], (SMB/CIFS support), [auto])
1881 dnl liBDSM access module
1883 AM_CONDITIONAL([HAVE_DSM], [test "$AS_TR_SH(with_dsm)" = "yes"])
1884 PKG_WITH_MODULES([DSM], [libdsm >= 0.2.0], [
1885 VLC_ADD_PLUGIN([dsm])
1886 VLC_ADD_CFLAGS([dsm], [$DSM_CFLAGS])
1887 VLC_ADD_LIBS([dsm], [$DSM_LIBS])
1889 ],,[libdsm SMB/CIFS access/sd module], [auto])
1890 AM_CONDITIONAL([HAVE_DSM], [test "${have_dsm}" = "yes"])
1893 dnl sftp access support
1895 PKG_ENABLE_MODULES_VLC([SFTP], [sftp], [libssh2], (support SFTP file transfer via libssh2), [auto])
1898 dnl nfs access support
1900 PKG_ENABLE_MODULES_VLC([NFS], [nfs], [libnfs >= 1.10.0], (support nfs protocol via libnfs), [auto])
1903 dnl smb2 access support
1905 PKG_ENABLE_MODULES_VLC([SMB2], [smb2], [libsmb2 >= 2.0.0], (support smb2 protocol via libsmb2), [auto])
1910 AC_ARG_ENABLE([v4l2], AS_HELP_STRING([--disable-v4l2],
1911 [disable Video4Linux version 2 (default auto)]))
1913 AS_IF([test "$enable_v4l2" != "no"], [
1914 AC_CHECK_HEADERS([linux/videodev2.h], [
1918 AM_CONDITIONAL([HAVE_V4L2], [test "${have_v4l2}" != "no"])
1921 dnl special access module for Blackmagic SDI cards
1923 AC_ARG_ENABLE([decklink],
1924 AS_HELP_STRING([--disable-decklink],
1925 [disable Blackmagic DeckLink SDI input (default auto)]))
1926 AC_ARG_WITH([decklink_sdk],
1927 AS_HELP_STRING([--with-decklink-sdk=DIR],
1928 [location of Blackmagic DeckLink SDI SDK]))
1930 if test "${enable_decklink}" != "no"
1932 if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}"
1934 VLC_ADD_CPPFLAGS([decklink decklinkoutput stream_out_sdi],[-I${with_decklink_sdk}/include])
1937 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_decklink}"
1939 AC_CHECK_HEADERS([DeckLinkAPIDispatch.cpp], [
1941 AS_IF([test "${SYS}" = "darwin"], [
1942 VLC_ADD_LIBS([decklink decklinkoutput],[-Wl,-framework,CoreFoundation])
1945 AS_IF([test "${enable_decklink}" = "yes"], [
1946 AC_MSG_ERROR([Blackmagic DeckLink SDI include files not found!])
1948 AC_MSG_WARN([Blackmagic DeckLink SDI include files not found, decklink disabled])
1954 AM_CONDITIONAL([HAVE_DECKLINK], [ test "${have_decklink}" != "no" ])
1958 dnl Built-in CD-DA and VCD module
1960 AC_ARG_ENABLE([vcd],
1961 AS_HELP_STRING([--disable-vcd],
1962 [disable built-in VCD and CD-DA support (default enabled)]))
1964 AC_ARG_ENABLE([libcddb],
1965 AS_HELP_STRING([--disable-libcddb],
1966 [disable CDDB for Audio CD (default enabled)]))
1968 if test "${enable_vcd}" != "no"
1970 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
1971 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1973 VLC_ADD_PLUGIN([vcd cdda])
1978 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
1979 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1981 VLC_ADD_PLUGIN([vcd cdda])
1982 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1987 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
1988 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1990 VLC_ADD_PLUGIN([vcd cdda])
1991 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1996 if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32" -o "${SYS}" = "os2" -o "${SYS}" = "darwin"
1998 VLC_ADD_PLUGIN([vcd cdda])
2001 if test "$enable_libcddb" != "no"; then
2002 PKG_CHECK_MODULES(LIBCDDB, [libcddb >= 0.9.5], [
2004 AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed])
2005 VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS])
2006 VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
2008 [AC_MSG_WARN([${LIBCDDB_PKG_ERRORS}: CDDB access disabled.])
2016 AC_CACHE_CHECK([for Linux DVB version 5.1], [ac_cv_linux_dvb_5_1], [
2017 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
2018 [#include <linux/dvb/version.h>
2019 #if (DVB_API_VERSION < 5)
2020 # error Linux DVB API v3.2 and older are not supported.
2022 #if (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR < 1)
2023 # error Linux DVB API v5.0 is unsupported. Please update.
2026 ac_cv_linux_dvb_5_1=yes
2028 ac_cv_linux_dvb_5_1=no
2030 AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_dvb_5_1" = "yes"])
2033 dnl Screen capture module
2035 AC_ARG_ENABLE([screen],
2036 AS_HELP_STRING([--enable-screen],
2037 [disable screen capture (default enabled)]))
2038 if test "${enable_screen}" != "no"; then
2039 if test "${SYS}" = "darwin"; then
2040 AC_CHECK_HEADERS([ApplicationServices/ApplicationServices.h], [
2041 VLC_ADD_PLUGIN([screen])
2045 AM_CONDITIONAL([HAVE_MAC_SCREEN], [test "${SYS}" = "darwin" -a "x${enable_screen}" != "xno"])
2048 dnl VNC/RFB access module
2050 PKG_ENABLE_MODULES_VLC([VNC], [vnc], [libvncclient >= 0.9.9], (VNC/rfb client support), [auto])
2052 dnl RDP/Remote Desktop access module
2054 PKG_ENABLE_MODULES_VLC([FREERDP], [rdp], [freerdp >= 1.0.1], (RDP/Remote Desktop client support) )
2058 AC_SUBST([have_avfoundation], ["no"])
2059 AC_ARG_ENABLE([macosx-avfoundation],
2060 AS_HELP_STRING([--enable-macosx-avfoundation], [Mac OS X avcapture (video) module (default enabled on Mac OS X)]))
2061 if test "x${enable_macosx_avfoundation}" != "xno" &&
2062 (test "${SYS}" = "darwin" || test "${enable_macosx_avfoundation}" = "yes")
2064 SAVED_LIBS="${LIBS}"
2065 LIBS="-framework AVFoundation"
2066 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[have_avfoundation=yes],[have_avfoundation=no])
2067 LIBS="${SAVED_LIBS}"
2068 if test "${have_avfoundation}" != "no"
2070 VLC_ADD_PLUGIN([avcapture])
2073 AM_CONDITIONAL([HAVE_AVFOUNDATION], [test "${have_avfoundation}" != "no"])
2076 dnl DCP plugin (using asdcplib)
2078 PKG_WITH_MODULES([ASDCP], [asdcplib], [have_asdcp="yes"])
2079 AM_CONDITIONAL([HAVE_ASDCP], [test "${have_asdcp}" = "yes"])
2085 EXTEND_HELP_STRING([Mux/Demux plugins:])
2088 dnl libdvbpsi check for ts mux/demux
2091 PKG_WITH_MODULES([DVBPSI], [libdvbpsi >= 1.2.0], [have_dvbpsi="yes"])
2092 AM_CONDITIONAL([HAVE_DVBPSI], [test "${have_dvbpsi}" = "yes"])
2096 dnl GME demux plugin
2098 AC_ARG_ENABLE([gme],
2099 AS_HELP_STRING([--enable-gme],
2100 [use Game Music Emu (default auto)]))
2101 AS_IF([test "${enable_gme}" != "no"], [
2102 AC_CHECK_HEADER([gme/gme.h], [
2103 AC_CHECK_LIB([gme], [gme_identify_header], [
2104 VLC_ADD_PLUGIN([gme])
2106 AC_CHECK_LIB([gme], [gme_identify_extension], [
2107 VLC_ADD_LIBS([gme], [-lstdc++ $LIBM])
2108 VLC_ADD_PLUGIN([gme])
2109 ],, [-lstdc++ $LIBM])
2111 VLC_ADD_LIBS([gme], [-lgme])
2113 AS_IF([test "x${enable_gme}" != "x"], [
2114 AC_MSG_ERROR([GME cannot be found. Please install the development files.])
2123 AC_ARG_ENABLE([sid],
2124 AS_HELP_STRING([--enable-sid],[C64 sid demux support (default auto)]))
2125 AS_IF([test "${enable_sid}" != "no"], [
2126 PKG_CHECK_MODULES(SID, [libsidplay2], [
2128 oldCPPFLAGS="$CPPFLAGS"
2129 CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
2130 AC_CHECK_HEADER([sidplay/builders/resid.h], [
2131 VLC_ADD_PLUGIN([sid])
2132 VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
2133 VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
2135 AS_IF([test -n "${enable_sid}"],
2136 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2137 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2140 CPPFLAGS="$oldCPPFLAGS"
2143 AS_IF([test "x${enable_sid}" = "xyes"],
2144 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2145 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2152 dnl ogg demux plugin
2154 PKG_ENABLE_MODULES_VLC([OGG], [mux_ogg], [ogg >= 1.0], [Ogg demux support], [auto])
2155 PKG_CHECK_MODULES(LIBVORBIS, [vorbis >= 1.1], [
2156 AC_DEFINE(HAVE_LIBVORBIS, 1, [Define to 1 if you have the libvorbis])
2158 PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto], [${LIBVORBIS_CFLAGS}], [${LIBVORBIS_LIBS}])
2159 if test "${enable_sout}" != "no"; then
2160 dnl Check for libshout
2161 PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
2165 dnl matroska demux plugin
2167 PKG_WITH_MODULES([MATROSKA], [libebml libmatroska], [
2168 VLC_ADD_PLUGIN([mkv])
2169 VLC_ADD_CFLAGS([mkv], [$MATROSKA_CFLAGS])
2170 VLC_ADD_LIBS([mkv], [$MATROSKA_LIBS])
2172 ],,[MKV format support], [auto])
2173 AM_CONDITIONAL([HAVE_MATROSKA], [test "${have_matroska}" = "yes"])
2176 dnl modplug demux plugin
2178 AC_ARG_ENABLE([mod],
2179 AS_HELP_STRING([--disable-mod],
2180 [do not use libmodplug (default auto)]))
2181 if test "${enable_mod}" != "no" ; then
2182 PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [
2183 VLC_ADD_PLUGIN([mod])
2184 VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
2185 VLC_ADD_CFLAGS([mod],[$LIBMODPLUG_CFLAGS]) #modules/demux/mod.c needs CFLAGS_mod, not CXXFLAGS_mod
2186 VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
2188 AS_IF([test -n "${enable_mod}"],
2189 [AC_MSG_ERROR([${LIBMODPLUG_PKG_ERRORS}.])],
2190 [AC_MSG_WARN([${LIBMODPLUG_PKG_ERRORS}.])])
2195 dnl mpc demux plugin
2197 AC_ARG_ENABLE([mpc],
2198 AS_HELP_STRING([--disable-mpc], [do not use libmpcdec (default auto)]))
2199 if test "${enable_mpc}" != "no"
2201 AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
2202 VLC_ADD_PLUGIN([mpc])
2203 VLC_ADD_LIBS([mpc],[-lmpcdec])])
2210 EXTEND_HELP_STRING([Codec plugins:])
2215 AC_ARG_ENABLE([wma-fixed],
2216 AS_HELP_STRING([--enable-wma-fixed], [libwma-fixed module (default disabled)]))
2217 if test "${enable_wma_fixed}" = "yes"
2219 VLC_ADD_PLUGIN([wma_fixed])
2223 dnl shine encoder plugin
2225 PKG_ENABLE_MODULES_VLC([SHINE], [], [shine >= 3.0.0], [MPEG Audio Layer 3 encoder], [auto], [], [], [])
2229 dnl openmax il codec plugin
2231 AC_ARG_ENABLE([omxil],
2232 AS_HELP_STRING([--enable-omxil], [openmax il codec module (default disabled)]))
2233 if test "${enable_omxil}" = "yes"
2235 VLC_ADD_PLUGIN([omxil])
2239 dnl raspberry pi openmax il configuration
2241 AC_ARG_ENABLE([rpi-omxil],
2242 AS_HELP_STRING([--enable-rpi-omxil], [openmax il configured for raspberry pi (default disabled)]))
2243 if test "${enable_rpi_omxil}" = "yes"
2245 VLC_ADD_PLUGIN([omxil])
2246 VLC_ADD_CFLAGS([omxil],[-DRPI_OMX])
2250 dnl CrystalHD codec plugin
2252 AC_ARG_ENABLE([crystalhd],
2253 AS_HELP_STRING([--enable-crystalhd], [crystalhd codec plugin (default auto)]))
2254 if test "${enable_crystalhd}" != "no"; then
2255 AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [
2256 VLC_ADD_PLUGIN([crystalhd])
2257 VLC_ADD_LIBS([crystalhd], [-lcrystalhd])
2259 if test "${SYS}" = "mingw32" ; then
2260 AC_CHECK_HEADERS([libcrystalhd/bc_dts_defs.h], [
2261 VLC_ADD_PLUGIN([crystalhd])
2262 AC_CHECK_HEADERS([libcrystalhd/bc_drv_if.h], [
2263 VLC_ADD_LIBS([crystalhd], [-lbcmDIL])
2266 AS_IF([test x"${enable_crystalhd}" = "xyes"],
2267 [AC_MSG_ERROR("Could not find CrystalHD development headers")],
2268 [AC_MSG_WARN("Could not find CrystalHD development headers")])
2269 ],[#define __LINUX_USER__
2270 #include <libcrystalhd/bc_dts_types.h>
2274 #include <libcrystalhd/bc_dts_types.h>
2285 AC_ARG_WITH(mad, AS_HELP_STRING([--with-mad=PATH], [path to libmad]), [
2290 AS_IF([test "${with_mad}" != "no"], [
2291 MAD_CFLAGS="-I${with_mad}/include"
2292 MAD_LIBS="-L${with_mad}/lib"
2295 AC_ARG_ENABLE([mad],
2296 AS_HELP_STRING([--enable-mad], [libmad module (default enabled)]))
2297 AS_IF([test "${enable_mad}" != "no"], [
2299 CPPFLAGS="${CPPFLAGS} ${MAD_CFLAGS}"
2300 LDFLAGS="${LDFLAGS} ${MAD_LIBS}"
2301 AC_CHECK_HEADERS([mad.h], [
2302 AC_CHECK_LIB([mad], [mad_bit_init], [
2304 MAD_LIBS="${MAD_LIBS} -lmad"
2308 AS_IF([test -n "$enable_mad" -a "${have_mad}" = "no"], [
2309 AC_MSG_ERROR([Could not find libmad. Install it or pass --disable-mad to disable it.])
2312 AC_SUBST([MAD_CFLAGS])
2313 AC_SUBST([MAD_LIBS])
2314 AM_CONDITIONAL([HAVE_MAD], [test "${have_mad}" = "yes"])
2319 PKG_ENABLE_MODULES_VLC([MPG123], [mpg123], [libmpg123], [libmpg123 decoder support], [auto])
2324 AC_ARG_ENABLE([gst-decode],
2325 AS_HELP_STRING([--enable-gst-decode], [GStreamer based decoding support (currently supports only video decoding) (default auto)]))
2327 have_gst_decode="no"
2328 AS_IF([test "${enable_gst_decode}" != "no"], [
2329 PKG_CHECK_MODULES([GST_APP], [gstreamer-app-1.0], [
2330 PKG_CHECK_MODULES([GST_VIDEO], [gstreamer-video-1.0], [
2331 have_gst_decode="yes"
2333 AC_MSG_WARN([${GST_VIDEO_PKG_ERRORS}. GStreamer decoder module will not be built.])
2336 AC_MSG_WARN([${GST_APP_PKG_ERRORS}. GStreamer modules will not be built.])
2339 AM_CONDITIONAL([HAVE_GST_DECODE], [test "${have_gst_decode}" = "yes"])
2342 dnl avcodec decoder/encoder plugin
2344 AC_ARG_ENABLE([merge-ffmpeg],
2345 AS_HELP_STRING([--enable-merge-ffmpeg], [merge FFmpeg-based plugins (default disabled)]),, [
2346 enable_merge_ffmpeg="no"
2348 AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
2350 AC_MSG_CHECKING([for libavutil variant])
2351 PKG_CHECK_EXISTS([libavutil], [
2352 libavutil_version="$(${PKG_CONFIG} --modversion libavutil)"
2353 libavutil_micro="${libavutil_version##*.}"
2354 AS_IF([test ${libavutil_micro} -le 99], [
2362 AC_MSG_RESULT([${avfork}])
2364 AC_ARG_ENABLE([avcodec],
2365 AS_HELP_STRING([--enable-avcodec], [libavcodec codec (default enabled)]))
2366 AS_IF([test "${enable_avcodec}" != "no"], [
2367 dnl We need >=57.16.0 from libav or >=57.37.100 from ffmpeg
2369 libav) av_codec_ver="57.16.0" ;;
2370 dnl 05f66706d182eb0c36af54d72614bf4c33e957a9 includes libavutil 55.9.0
2371 ffmpeg) av_codec_ver="57.37.100" ;;
2372 dnl 7fc329e2dd6226dfecaa4a1d7adf353bf2773726 include libavutil 55.22.101
2373 *) AC_MSG_ERROR([Missing libav or FFmpeg. Pass --disable-avcodec to ignore this error.])
2375 PKG_CHECK_MODULES(AVCODEC,[libavcodec >= ${av_codec_ver} libavutil >= 55.9.0], [
2377 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2378 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2379 AC_CHECK_HEADERS([libavcodec/avcodec.h])
2380 AC_CHECK_HEADERS([libavutil/avutil.h])
2384 AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
2389 AM_CONDITIONAL([HAVE_AVCODEC], [test "${have_avcodec}" != "no"])
2392 dnl libva needs avcodec
2394 AC_ARG_ENABLE([libva],
2395 AS_HELP_STRING([--enable-libva], [VAAPI GPU decoding support (libVA) (default auto)]))
2397 AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
2398 AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
2405 AS_IF([test "${enable_libva}" != "no"], [
2406 PKG_CHECK_MODULES([LIBVA], [libva >= 0.38], [
2409 AS_IF([test -n "${enable_libva}"], [
2410 AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
2412 AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
2415 PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm], [
2416 have_vaapi_drm="yes"
2418 AC_MSG_WARN([${LIBVA_DRM_PKG_ERRORS}.])
2420 PKG_CHECK_MODULES(LIBVA_X11, [libva-x11], [
2421 have_vaapi_x11="yes"
2423 AC_MSG_WARN([${LIBVA_X11_PKG_ERRORS}.])
2425 PKG_CHECK_MODULES(LIBVA_WL, [libva-wayland], [
2428 AC_MSG_WARN([${LIBVA_WL_PKG_ERRORS}.])
2431 AM_CONDITIONAL([HAVE_VAAPI], [test "${have_vaapi}" = "yes"])
2432 AM_CONDITIONAL([HAVE_VAAPI_DRM], [test "${have_vaapi_drm}" = "yes"])
2433 AM_CONDITIONAL([HAVE_VAAPI_X11], [test "${have_vaapi_x11}" = "yes"])
2434 AM_CONDITIONAL([HAVE_VAAPI_WL], [test "${have_vaapi_wl}" = "yes"])
2436 have_avcodec_vaapi="no"
2437 AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
2439 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2440 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2441 AC_CHECK_HEADERS([libavcodec/vaapi.h], [
2442 AC_MSG_NOTICE([VA API acceleration activated])
2443 have_avcodec_vaapi="yes"
2445 AS_IF([test -n "${enable_libva}"], [
2446 AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
2448 AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
2453 AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"])
2456 dnl dxva2 needs avcodec
2458 AC_ARG_ENABLE([dxva2],
2459 AS_HELP_STRING([--enable-dxva2], [DxVA2 GPU decoding support (default auto)]))
2461 have_avcodec_dxva2="no"
2462 AS_IF([test "${enable_dxva2}" != "no"], [
2463 if test "${SYS}" = "mingw32"; then
2464 AS_IF([test "x${have_avcodec}" = "xyes"], [
2465 AC_CHECK_HEADERS([dxva2api.h],
2467 AC_CHECK_HEADERS([libavcodec/dxva2.h], [
2468 AC_MSG_NOTICE([DxVA2 acceleration activated])
2469 have_avcodec_dxva2="yes"
2471 AS_IF([test "${enable_dxva2}" = "yes"],
2472 [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
2473 [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
2474 ], [#undef _WIN32_WINNT
2475 /* DXVA2 is only available in Vista and above */
2476 #define _WIN32_WINNT 0x600])
2478 AS_IF([test "${enable_dxva2}" = "yes"],
2479 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2480 [AC_MSG_WARN([dxva2api.h not found])])
2481 ],[#include <d3d9.h>])
2483 AS_IF([test "x${enable_dxva2}" != "x"], [
2484 AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
2489 AM_CONDITIONAL([HAVE_AVCODEC_DXVA2], [test "${have_avcodec_dxva2}" = "yes"])
2492 dnl d3d11va needs avcodec
2494 AC_ARG_ENABLE([d3d11va],
2495 AS_HELP_STRING([--enable-d3d11va], [D3D11 GPU decoding support (default auto)]))
2497 have_avcodec_d3d11va="no"
2498 AS_IF([test "${enable_d3d11va}" != "no"], [
2499 if test "${SYS}" = "mingw32"; then
2500 AS_IF([test "x${have_avcodec}" = "xyes"], [
2501 AC_CHECK_TYPES([ID3D11VideoDecoder],
2503 AC_CHECK_HEADERS([dxva2api.h],
2505 AC_CHECK_HEADERS([libavcodec/d3d11va.h], [
2506 AC_MSG_NOTICE([D3D11 acceleration activated])
2507 AC_DEFINE([HAVE_AVCODEC_D3D11VA], [1], [Define if the d3d11va module is built])
2508 have_avcodec_d3d11va="yes"
2510 AS_IF([test "${enable_d3d11va}" = "yes"],
2511 [AC_MSG_ERROR([d3d11va is present but libavcodec/d3d11va.h is missing])],
2512 [AC_MSG_WARN([d3d11va is present but libavcodec/d3d11va.h is missing ])])
2513 ], [#undef _WIN32_WINNT
2514 /* D3D11 is only available in Vista and above */
2515 #define _WIN32_WINNT 0x600])
2517 AS_IF([test "${enable_d3d11va}" = "yes"],
2518 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2519 [AC_MSG_WARN([dxva2api.h not found])])
2520 ],[#include <d3d9.h>])
2522 AS_IF([test "${enable_d3d11va}" = "yes"],
2523 [AC_MSG_ERROR([Could not find required ID3D11VideoDecoder in d3d11.h])],
2524 [AC_MSG_WARN([ID3D11VideoDecoder not found])])
2525 ], [#include <d3d11.h>])
2527 AS_IF([test "x${enable_d3d11va}" != "x"], [
2528 AC_MSG_ERROR([--enable-d3d11va and --disable-avcodec options are mutually exclusive.])
2533 AM_CONDITIONAL([HAVE_AVCODEC_D3D11VA], [test "${have_avcodec_d3d11va}" = "yes"])
2538 AC_CHECK_HEADERS([dxgidebug.h dxgi1_6.h])
2541 dnl avformat demuxer/muxer plugin
2544 AC_ARG_ENABLE([avformat],
2545 AS_HELP_STRING([--enable-avformat], [libavformat containers (default enabled)]),, [
2546 enable_avformat="${have_avcodec}"
2549 AS_IF([test "${enable_avformat}" != "no"], [
2550 PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil], [
2553 CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
2554 CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
2555 AC_CHECK_HEADERS([libavformat/avformat.h libavformat/avio.h])
2556 AC_CHECK_HEADERS([libavcodec/avcodec.h])
2557 AC_CHECK_HEADERS([libavutil/avutil.h])
2558 AS_IF([test "$enable_merge_ffmpeg" = "no"], [
2563 AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
2566 AM_CONDITIONAL([HAVE_AVFORMAT], [test "${enable_avformat}" != "no"])
2569 dnl swscale image scaling and conversion plugin
2572 AC_ARG_ENABLE([swscale],
2573 AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion
2574 (default enabled)]))
2575 if test "${enable_swscale}" != "no"
2577 PKG_CHECK_MODULES(SWSCALE,[libswscale],
2580 CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
2581 CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
2582 AC_CHECK_HEADERS([libswscale/swscale.h])
2583 AC_CHECK_HEADERS([libavutil/avutil.h])
2584 VLC_ADD_PLUGIN([swscale])
2585 VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
2586 VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
2587 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2588 VLC_ADD_LIBS([swscale],[${ac_cv_ld_bsymbolic}])
2592 AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
2600 AC_ARG_ENABLE([postproc],
2601 AS_HELP_STRING([--enable-postproc], [libpostproc image post-processing (default auto)]))
2602 if test "${enable_postproc}" != "no"
2604 PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
2607 CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
2608 CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
2609 AC_CHECK_HEADERS([postproc/postprocess.h])
2610 VLC_ADD_PLUGIN([postproc])
2613 AC_MSG_WARN([${POSTPROC_PKG_ERRORS}.])
2618 dnl faad decoder plugin
2620 AC_ARG_ENABLE([faad],
2621 AS_HELP_STRING([--enable-faad], [faad codec (default auto)]))
2623 AS_IF([test "${enable_faad}" != "no"], [
2624 AC_CHECK_HEADERS([neaacdec.h], [
2625 AC_CHECK_LIB([faad], [NeAACDecOpen], [have_faad="yes"],, [$LIBM])
2627 AS_IF([test "${have_faad}" = "yes"], [
2628 VLC_ADD_PLUGIN([faad])
2629 VLC_ADD_LIBS([faad],[-lfaad])
2631 AS_IF([test "${enable_faad}" = "yes"], [
2632 AC_MSG_ERROR([cannot find FAAD library])
2634 AC_MSG_WARN([cannot find FAAD library])
2641 dnl AOM decoder plugin
2643 PKG_ENABLE_MODULES_VLC([AOM], [], [aom], [experimental AV1 codec (default auto)])
2646 dnl Dav1d decoder plugin
2648 PKG_ENABLE_MODULES_VLC([DAV1D], [], [dav1d], [AV1 decoder (default auto)])
2651 dnl libvpx decoder plugin
2653 AC_ARG_ENABLE([vpx],
2654 AS_HELP_STRING([--enable-vpx],[libvpx VP8/VP9 encoder and decoder (default auto)]))
2655 AS_IF([test "${enable_vpx}" != "no"],[
2656 PKG_CHECK_MODULES([VPX], [vpx >= 1.5.0], [
2657 VLC_ADD_PLUGIN([vpx])
2658 VLC_ADD_CPPFLAGS([vpx], [${VPX_CFLAGS}])
2659 VLC_ADD_LIBS([vpx], [${VPX_LIBS}])
2660 AC_CHECK_LIB([vpx],[vpx_codec_vp8_dx], [
2661 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_DECODER])
2662 ], [], [${VPX_LIBS}])
2663 AC_CHECK_LIB([vpx],[vpx_codec_vp9_dx], [
2664 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_DECODER])
2665 ], [], [${VPX_LIBS}])
2666 AC_CHECK_LIB([vpx],[vpx_codec_vp8_cx], [
2667 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP8_ENCODER])
2668 ], [], [${VPX_LIBS}])
2669 AC_CHECK_LIB([vpx],[vpx_codec_vp9_cx], [
2670 VLC_ADD_CPPFLAGS([vpx], [-DENABLE_VP9_ENCODER])
2671 ], [], [${VPX_LIBS}])
2673 AS_IF([test "${enable_vpx}" = "yes"],[
2674 AC_MSG_ERROR([libvpx 1.5.0 or higher was not found])
2679 dnl twolame encoder plugin
2681 PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])
2684 dnl fdk-aac encoder plugin
2686 PKG_ENABLE_MODULES_VLC([FDKAAC], [], [fdk-aac], [FDK-AAC encoder], [disabled])
2690 dnl A52/AC3 decoder plugin
2692 AC_ARG_ENABLE([a52],
2693 AS_HELP_STRING([--enable-a52], [A/52 support with liba52 (default enabled)]))
2694 if test "${enable_a52}" != "no"
2697 AS_HELP_STRING([--with-a52=PATH], [a52 headers and libraries]))
2698 if test -z "${with_a52}"
2703 LDFLAGS_test="-L${with_a52}/lib"
2704 CPPFLAGS_test="-I${with_a52}/include"
2707 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_test} ${CPPFLAGS_a52}"
2708 LDFLAGS="${LDFLAGS} ${LDFLAGS_test} ${LIBS_a52}"
2709 AC_CHECK_HEADERS([a52dec/a52.h], [
2710 AC_CHECK_LIB([a52], [a52_free], [
2711 VLC_ADD_PLUGIN([a52])
2712 VLC_ADD_LIBS([a52],[${LDFLAGS_test} -la52 $LIBM])
2713 VLC_ADD_CPPFLAGS([a52],[${CPPFLAGS_test}])
2715 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.])
2718 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.])
2724 dnl DTS Coherent Acoustics decoder plugin
2726 PKG_ENABLE_MODULES_VLC([DCA], [dca], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
2731 PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])
2736 PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])
2741 PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
2746 AC_ARG_ENABLE([tremor],
2747 AS_HELP_STRING([--enable-tremor], [Tremor decoder support (default disabled)]))
2748 if test "${enable_tremor}" = "yes"
2750 AC_CHECK_HEADERS([tremor/ivorbiscodec.h], [
2751 VLC_ADD_PLUGIN([tremor])
2758 PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex support], [auto])
2760 AS_IF([test "${enable_speex}" != "no"], [
2761 PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
2764 AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
2767 AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
2772 PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus >= 1.0.3], [Opus support], [auto])
2775 dnl Ambisonic channel mixer and binauralizer plugin
2777 PKG_ENABLE_MODULES_VLC([SPATIALAUDIO], [], [spatialaudio], [Ambisonic channel mixer and binauralizer], [auto])
2780 dnl theora decoder plugin
2782 PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto])
2785 dnl OggSpots decoder plugin
2787 PKG_ENABLE_MODULES_VLC([OGGSPOTS], [], [ogg], [experimental OggSpots codec], [auto])
2790 dnl Daala decoder plugin
2792 PKG_ENABLE_MODULES_VLC([DAALA], [], [daaladec daalaenc], [experimental daala codec], [disabled])
2795 dnl schroedinger decoder plugin (for dirac format video)
2797 PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
2800 dnl PNG decoder module
2802 AC_ARG_ENABLE([png],
2803 AS_HELP_STRING([--enable-png], [PNG support (default enabled)]))
2804 AS_IF([test "${enable_png}" != "no"], [
2805 AC_CHECK_HEADERS([png.h], [
2807 LDFLAGS="${LDFLAGS} -lz $LIBM"
2808 AC_CHECK_LIB([png], [png_set_alpha_mode], [
2809 VLC_ADD_PLUGIN([png])
2816 dnl JPEG decoder module
2818 AC_ARG_ENABLE([jpeg],
2819 AS_HELP_STRING([--enable-jpeg], [JPEG support (default enabled)]))
2820 AS_IF([test "${enable_jpeg}" != "no"], [
2821 AC_CHECK_HEADERS([jpeglib.h], [
2822 VLC_ADD_PLUGIN([jpeg])
2827 dnl BPG decoder module
2829 AC_ARG_ENABLE([bpg],
2830 AS_HELP_STRING([--enable-bpg], [BPG support (default disabled)]))
2831 AS_IF([test "${enable_bpg}" != "no"], [
2832 AC_CHECK_HEADERS([libbpg.h], [
2833 VLC_ADD_PLUGIN([bpg])
2838 dnl H262 encoder plugin (lib262)
2840 AC_ARG_ENABLE([x262],
2841 AS_HELP_STRING([--enable-x262], [H262 encoding support with static libx262 (default disabled)]))
2842 if test "${enable_x262}" != "no"; then
2843 PKG_CHECK_MODULES(X262, x262, [
2844 VLC_ADD_PLUGIN([x262])
2845 VLC_ADD_LDFLAGS([x262],[${X262_LIBS}])
2846 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2847 VLC_ADD_LIBS([x262],[${av_cv_ld_bsymbolic}])
2849 VLC_ADD_CFLAGS([x262],[${X262_CFLAGS}])
2850 if echo ${X262_LIBS} |grep -q 'pthreadGC2'; then
2851 VLC_ADD_CFLAGS([x262], [-DPTW32_STATIC_LIB])
2854 if test "${enable_x262}" = "yes"; then
2855 AC_MSG_ERROR([x262 module doesn't work without staticly compiled libx262.a])
2861 PKG_ENABLE_MODULES_VLC([X265],, [x265], [HEVC/H.265 encoder], [auto])
2864 dnl H264 encoder plugin (using libx264)
2866 AC_ARG_ENABLE([x264],
2867 AS_HELP_STRING([--enable-x264], [H264 encoding support with libx264 (default enabled)]))
2868 if test "${enable_x264}" != "no"; then
2869 PKG_CHECK_MODULES(X264,x264 >= 0.148, [
2870 VLC_ADD_PLUGIN([x264])
2871 VLC_ADD_LIBS([x264],[${X264_LIBS}])
2873 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2874 VLC_ADD_LDFLAGS([x264],[${ac_cv_ld_bsymbolic}])
2877 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2878 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2879 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2882 if test "${enable_x264}" = "yes"; then
2883 AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
2889 dnl H264 encoder plugin (libx264 > 153)
2891 AC_ARG_ENABLE([x26410b],
2892 AS_HELP_STRING([--enable-x26410b], [H264 10-bit encoding support with libx264 (default enabled)]))
2893 if test "${enable_x26410b}" != "no"; then
2894 PKG_CHECK_MODULES(X26410b,x264 >= 0.153, [
2895 VLC_ADD_PLUGIN([x26410b])
2896 VLC_ADD_LIBS([x26410b],[${X264_LIBS}])
2898 AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
2899 VLC_ADD_LDFLAGS([x26410b],[${ac_cv_ld_bsymbolic}])
2902 VLC_ADD_CFLAGS([x26410b],[${X264_CFLAGS}])
2903 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2904 VLC_ADD_CFLAGS([x26410b], [-DPTW32_STATIC_LIB])
2907 if test "${enable_x26410b}" = "yes"; then
2908 AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
2915 dnl Intel QuickSync (aka MediaSDK) H264/H262 encoder
2917 PKG_ENABLE_MODULES_VLC([MFX], [qsv], [libmfx], [Intel QuickSync MPEG4-Part10/MPEG2 (aka H.264/H.262) encoder], [auto])
2920 dnl libfluidsynth (MIDI synthetizer) plugin
2922 PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.2], [MIDI synthetiser with libfluidsynth], [auto])
2923 PKG_ENABLE_MODULES_VLC([FLUIDLITE], [fluidsynth], [fluidlite], [MIDI synthetiser with libfluidsynth], [auto])
2924 AC_CHECK_HEADERS([fluidlite.h], [AC_SUBST([FLUIDSYNTH_LIBS], ${FLUIDLITE_LIBS})])
2927 dnl Teletext Modules
2928 dnl vbi decoder plugin (using libzbvi)
2932 AC_ARG_ENABLE([zvbi],
2933 AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
2934 libzvbi (default enabled)]))
2935 AC_ARG_ENABLE([telx],
2936 AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
2937 zvbi) (default enabled if zvbi is absent)]))
2939 AS_IF( [test "${enable_zvbi}" != "no"],[
2940 PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.28],
2942 VLC_ADD_PLUGIN([zvbi])
2943 AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built])
2944 AS_IF( [test "${enable_telx}" = "yes"],[
2945 AC_MSG_WARN([The zvbi and telx modules are incompatible. Using zvbi.])
2948 AC_MSG_WARN([${ZVBI_PKG_ERRORS}. Enabling the telx module instead.])
2951 AS_IF( [test "${enable_telx}" != "no" ],[
2952 VLC_ADD_PLUGIN([telx])
2956 dnl ARIB subtitles rendering module
2958 AC_ARG_ENABLE([aribsub],
2959 AS_HELP_STRING([--enable-aribsub],[ARIB Subtitles support (default enabled)]))
2960 AS_IF( [test "${enable_aribsub}" != "no" ],[
2961 PKG_CHECK_MODULES(ARIBB24, [aribb24 >= 1.0.1], [
2963 VLC_ADD_PLUGIN([aribsub])
2964 VLC_ADD_LIBS([aribsub],[-laribb24])
2965 AC_DEFINE(HAVE_ARIBB24, 1, [Define if libaribb24 is available.])
2967 AC_MSG_WARN(Library [aribb24] needed for [aribsub] was not found)
2971 AM_CONDITIONAL([HAVE_ARIBB24], [test x"${have_aribb24}" = x"yes"])
2976 PKG_ENABLE_MODULES_VLC([ARIBB25], [aribcam], [aribb25 >= 0.2.6], [ARIB STD-B25], [auto])
2979 dnl kate decoder plugin
2981 PKG_ENABLE_MODULES_VLC([KATE], [], [kate >= 0.3.0], [kate codec], [auto])
2984 dnl tiger rendering for kate decoder plugin
2986 AC_ARG_ENABLE([tiger],
2987 AS_HELP_STRING([--enable-tiger], [Tiger rendering library for Kate streams (default auto)]))
2988 AS_IF([test "${enable_tiger}" != "no"], [
2989 PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
2990 AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])],[
2991 AS_IF([test -n "${enable_tiger}"], [
2992 AC_MSG_ERROR([${TIGER_PKG_ERRORS}.])
2998 dnl check if we can build the css selector engine
3000 AC_ARG_ENABLE([css],
3001 AS_HELP_STRING([--enable-css], [CSS selector engine (default auto)]))
3002 AS_IF([test "${enable_css}" != "no"], [
3004 AC_DEFINE(HAVE_CSS, 1, [Define if CSS engine is built])
3006 AM_CONDITIONAL([ENABLE_CSS], [test "${with_css}" = "yes"])
3013 EXTEND_HELP_STRING([Video plugins:])
3016 dnl libplacebo support
3018 AC_ARG_ENABLE([libplacebo],
3019 AS_HELP_STRING([--disable-libplacebo],
3020 [disable libplacebo support (default auto)]))
3022 AS_IF([test "$enable_libplacebo" != "no"], [
3023 PKG_CHECK_MODULES([LIBPLACEBO], [libplacebo >= 0.5], [
3024 AC_DEFINE([HAVE_LIBPLACEBO], [1], [Define to 1 if libplacebo is enabled.])
3025 PKG_CHECK_MODULES([LIBPLACEBO], [libplacebo >= 1.7],
3026 [have_libplacebo_vk="yes"], [have_libplacebo_vk="no"])
3028 AS_IF([test -n "${enable_libplacebo}"], [
3029 AC_MSG_ERROR([${LIBPLACEBO_PKG_ERRORS}.])
3031 enable_libplacebo="no"
3034 AM_CONDITIONAL([HAVE_LIBPLACEBO], [test "$enable_libplacebo" != "no"])
3039 PKG_CHECK_MODULES([EGL], [egl], [
3044 AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
3047 PKG_CHECK_MODULES([GL], [gl], [
3050 AC_MSG_CHECKING([for OpenGL])
3051 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3053 # include <GL/glew.h>
3057 [int t0 = GL_TEXTURE0;]])
3061 AS_IF([test "${SYS}" != "mingw32"], [
3064 GL_LIBS="-lopengl32"
3067 AC_MSG_RESULT([${have_gl}])
3069 AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
3070 AS_IF([test "${have_gl}" = "yes"], [
3071 AC_DEFINE([HAVE_GL], 1, [Defined if having OpenGL])
3074 dnl OpenGL ES 2: depends on EGL 1.1
3075 PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
3080 AC_ARG_ENABLE(vulkan,
3081 [AS_HELP_STRING([--disable-vulkan],
3082 [disable Vulkan support (default auto)])])
3084 AS_IF([test "$enable_vulkan" != "no"], [
3085 AS_IF([test "$have_libplacebo_vk" = "yes"], [
3086 PKG_CHECK_MODULES([VULKAN], [vulkan >= 1.0.26], [
3087 AC_DEFINE([HAVE_VULKAN], [1], [Define to 1 if vulkan is enabled.])
3089 AS_IF([test -n "${enable_vulkan}"], [
3090 AC_MSG_ERROR([${VULKAN_PKG_ERRORS}.])
3095 AS_IF([test -n "${enable_vulkan}"], [
3096 AC_MSG_ERROR([Vulkan support requires libplacebo 1.7 as well. Do not use --disable-libplacebo.])
3101 AM_CONDITIONAL(HAVE_VULKAN, [test "$enable_vulkan" != "no"])
3108 AC_CHECK_HEADERS([X11/Xlib.h])
3111 dnl X C Bindings modules
3113 AC_ARG_ENABLE([xcb],
3114 AS_HELP_STRING([--enable-xcb], [X11 support with XCB (default enabled)]),, [
3115 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "darwin"], [
3123 have_xkbcommon_x11="no"
3124 have_xcb_keysyms="no"
3125 AS_IF([test "${enable_xcb}" != "no"], [
3129 PKG_CHECK_MODULES([XCB], [xcb >= 1.6],, [
3130 xcb_err="$xcb_err ${XCB_PKG_ERRORS}."])
3131 PKG_CHECK_MODULES([XCB_COMPOSITE], [xcb-composite],, [
3132 xcb_err="$xcb_err ${XCB_COMPOSITE_PKG_ERRORS}."])
3133 PKG_CHECK_MODULES([XCB_RANDR], [xcb-randr >= 1.3],, [
3134 xcb_err="$xcb_err ${XCB_RANDR_PKG_ERRORS}."])
3135 PKG_CHECK_MODULES([XCB_RENDER], [xcb-render],, [
3136 xcb_err="$xcb_err ${XCB_RENDER_PKG_ERRORS}."])
3137 PKG_CHECK_MODULES([XCB_SHM], [xcb-shm >= 1.9.2],, [
3138 xcb_err="$xcb_err ${XCB_SHM_PKG_ERRORS}."])
3139 PKG_CHECK_MODULES([XCB_XKB], [xcb-xkb],, [
3140 xcb_err="$xcb_err ${XCB_XKB_PKG_ERRORS}."])
3141 PKG_CHECK_MODULES([XCB_XV], [xcb-xv >= 1.1.90.1],, [
3142 xcb_err="$xcb_err ${XCB_XV_PKG_ERRORS}."])
3145 PKG_CHECK_MODULES(XPROTO, [xproto],, [
3146 xcb_err="$xcb_err ${XPROTO_PKG_ERRORS}."])
3148 AS_IF([test -n "$xcb_err"], [
3149 AC_MSG_ERROR([$xcb_err Pass --disable-xcb to skip X11 support.])
3153 PKG_CHECK_MODULES([XKBCOMMON_X11], [xkbcommon-x11], [
3154 have_xkbcommon_x11="yes"
3156 AC_MSG_WARN([${XKBCOMMON_X11_PKG_ERRORS}. Hotkeys are disabled.])
3160 PKG_CHECK_MODULES([XCB_KEYSYMS], [xcb-keysyms >= 0.3.4], [
3161 have_xcb_keysyms="yes"
3163 AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Global hotkeys are disabled.])
3168 AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
3169 AM_CONDITIONAL([HAVE_XKBCOMMON_X11], [test "${have_xkbcommon_x11}" = "yes"])
3170 AM_CONDITIONAL([HAVE_XCB_KEYSYMS], [test "${have_xcb_keysyms}" = "yes"])
3176 AC_ARG_ENABLE([vdpau],
3177 [AS_HELP_STRING([--enable-vdpau], [VDPAU hardware support (default auto)])])
3179 AS_IF([test "${enable_vdpau}" != "no"], [
3180 PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.6], [
3182 AS_IF([test "${no_x}" = "yes"], [
3183 AC_MSG_ERROR([VDPAU requires Xlib (X11).])
3186 AS_IF([test -n "${enable_vdpau}"], [
3187 AC_MSG_ERROR([${VDPAU_PKG_ERRORS}.])
3191 AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"])
3193 have_avcodec_vdpau="no"
3194 AS_IF([test "${have_vdpau}" = "yes" -a "${have_avcodec}" = "yes"], [
3196 libav) av_vdpau_ver="56.10.0" ;;
3197 ffmpeg) av_vdpau_ver="56.19.100" ;;
3199 PKG_CHECK_EXISTS([libavcodec >= ${av_vdpau_ver}], [
3200 have_avcodec_vdpau="yes"
3201 AC_MSG_NOTICE([VDPAU decoding acceleration activated])
3203 AS_IF([test -n "${enable_vdpau}"], [
3204 AC_MSG_ERROR([libavcodec >= 56.10.0 is required for VDPAU decoding.])
3206 AC_MSG_WARN([libavcodec >= 56.10.0 are required for VDPAU decoding.])
3210 AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" = "yes"])
3216 AC_ARG_ENABLE([wayland],
3217 AS_HELP_STRING([--enable-wayland], [Wayland support (default auto)]))
3220 AS_IF([test "${enable_wayland}" != "no"], [
3224 PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= 1.5.91],, [
3225 wl_err="$wl_err ${WAYLAND_CLIENT_PKG_ERRORS}."
3227 PKG_CHECK_MODULES([WAYLAND_CURSOR], [wayland-cursor],, [
3228 wl_err="$wl_err ${WAYLAND_CURSOR_PKG_ERRORS}."
3230 PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl],, [
3231 wl_err="$wl_err ${WAYLAND_EGL_PKG_ERRORS}."
3233 PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner >= 1.15], [
3234 WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
3236 wl_err="$wl_err ${WAYLAND_SCANNER_PKG_ERRORS}."
3239 dnl wayland-protocols
3240 PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= 1.15], [
3241 WAYLAND_PROTOCOLS="$(${PKG_CONFIG} wayland-protocols --variable pkgdatadir)"
3243 wl_err="$wl_err ${WAYLAND_PROTOCOLS_PKG_ERRORS}."
3246 AS_IF([test -n "$wl_err"], [
3247 AS_IF([test -n "$enable_wayland"], [
3248 AC_MSG_ERROR([$wl_err])
3250 AC_MSG_WARN([$wl_err])
3257 PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon], [
3258 have_xkbcommon="yes"
3260 AC_MSG_WARN([${XKBCOMMON_PKG_ERRORS}. Hotkeys are disabled.])
3263 AM_CONDITIONAL([HAVE_WAYLAND], [test "${have_wayland}" = "yes"])
3264 AC_SUBST([WAYLAND_PROTOCOLS])
3265 AC_SUBST([WAYLAND_SCANNER])
3266 AM_CONDITIONAL([HAVE_XKBCOMMON], [test "${have_xkbcommon}" = "yes"])
3270 dnl SDL image decoder module
3272 AC_ARG_ENABLE([sdl-image],
3273 AS_HELP_STRING([--enable-sdl-image], [SDL image support (default enabled)]))
3274 AS_IF([test "${enable_sdl_image}" != "no"],[
3275 PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
3276 VLC_ADD_PLUGIN([sdl_image])
3278 AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
3285 AC_ARG_ENABLE([freetype],
3286 AS_HELP_STRING([--enable-freetype], [freetype support (default auto)]))
3287 AC_ARG_ENABLE([fribidi],
3288 AS_HELP_STRING([--enable-fribidi], [fribidi support (default auto)]))
3289 AC_ARG_ENABLE([harfbuzz],
3290 AS_HELP_STRING([--enable-harfbuzz], [harfbuzz support (default auto)]))
3291 AC_ARG_ENABLE([fontconfig],
3292 AS_HELP_STRING([--enable-fontconfig], [fontconfig support (default auto)]))
3294 AC_ARG_WITH([default-font],
3295 AS_HELP_STRING([--with-default-font=PATH],
3296 [Path to the default font]),
3297 [AC_DEFINE_UNQUOTED([DEFAULT_FONT_FILE],
3298 "$withval", [Default font])])
3299 AC_ARG_WITH([default-monospace-font],
3300 AS_HELP_STRING([--with-default-monospace-font=PATH],
3301 [Path to the default font]),
3302 [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FONT_FILE],
3303 "$withval", [Default monospace font])])
3305 AC_ARG_WITH([default-font-family],
3306 AS_HELP_STRING([--with-default-font-family=NAME],
3307 [Name of the default font family]),
3308 [AC_DEFINE_UNQUOTED([DEFAULT_FAMILY],
3309 "$withval", [Default font family])])
3310 AC_ARG_WITH([default-monospace-font-family],
3311 AS_HELP_STRING([--with-default-monospace-font-family=NAME],
3312 [Name of the default font family]),
3313 [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FAMILY],
3314 "$withval", [Default monospace font family])])
3317 have_fontconfig="no"
3321 if test "${enable_freetype}" != "no"; then
3322 PKG_CHECK_MODULES(FREETYPE, freetype2, [
3324 VLC_ADD_CPPFLAGS([skins2],[${FREETYPE_CFLAGS}])
3325 VLC_ADD_LIBS([skins2],[${FREETYPE_LIBS}])
3327 dnl fontconfig support
3328 AS_IF([test "${enable_fontconfig}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "darwin"], [
3329 PKG_CHECK_MODULES(FONTCONFIG, [fontconfig >= 2.11], [
3330 have_fontconfig="yes"
3332 AC_MSG_WARN([${FONTCONFIG_PKG_ERRORS}. Styles will be disabled in FreeType.])
3337 if test "${enable_fribidi}" != "no"; then
3338 PKG_CHECK_MODULES(FRIBIDI, fribidi, [
3340 VLC_ADD_CPPFLAGS([skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
3341 VLC_ADD_LIBS([skins2], [${FRIBIDI_LIBS}])
3342 ],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional text and complex scripts (Arabic, Farsi, Thai...) will be disabled in FreeType.])])
3345 dnl harfbuzz support
3346 if test "${have_fribidi}" != "no"; then
3347 if test "${enable_harfbuzz}" != "no"; then
3348 PKG_CHECK_MODULES(HARFBUZZ, harfbuzz, [
3350 VLC_ADD_CPPFLAGS([skins2], [${HARFBUZZ_CFLAGS} -DHAVE_HARFBUZZ])
3351 VLC_ADD_LIBS([skins2], [${HARFBUZZ_LIBS}])
3352 ],[AC_MSG_WARN([${HARFBUZZ_PKG_ERRORS}. Support for complex scripts (Arabic, Farsi, Thai...) will be disabled in FreeType.])])
3356 AS_IF([test -n "${enable_freetype}"],[
3357 AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
3362 AM_CONDITIONAL([HAVE_FREETYPE], [test "${have_freetype}" = "yes"])
3363 AM_CONDITIONAL([HAVE_FONTCONFIG], [test "${have_fontconfig}" = "yes"])
3364 AM_CONDITIONAL([HAVE_FRIBIDI], [test "${have_fribidi}" = "yes"])
3365 AM_CONDITIONAL([HAVE_HARFBUZZ], [test "${have_harfbuzz}" = "yes"])
3368 dnl libass subtitle rendering module
3370 AC_ARG_ENABLE([libass],
3371 AS_HELP_STRING([--enable-libass], [Subtitle support using libass (default enabled)]))
3372 AS_IF( [test "${enable_libass}" != "no"], [
3373 PKG_CHECK_MODULES(LIBASS, [libass >= 0.9.8],
3375 VLC_ADD_PLUGIN([libass])
3377 if test "${have_fontconfig}" != "no"; then
3378 VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
3379 VLC_ADD_LIBS([libass],[${FONTCONFIG_LIBS}])
3382 AC_MSG_WARN([${LIBASS_PKG_ERRORS}.])
3387 dnl SAPI (text to Speech renderer for Windows)
3390 AC_CHECK_TYPES([ISpObjectToken],[
3392 ],[AC_MSG_WARN([sapi.h not found. Text to Speech renderer for Windows disabled])],
3393 [#include <windows.h>
3395 #include <sphelper.h>])
3396 AM_CONDITIONAL([HAVE_SAPI], [test "${have_sapi}" = "yes"])
3400 dnl SVG module (text rendering and image decoding)
3402 PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
3403 PKG_ENABLE_MODULES_VLC([SVGDEC], [], [librsvg-2.0 >= 2.9.0 cairo >= 1.13.1], [SVG image decoder library],[auto])
3406 dnl Windows DirectX module
3409 AC_ARG_ENABLE([directx],
3410 AS_HELP_STRING([--enable-directx],
3411 [Microsoft DirectX support (default enabled on Windows)]),, [
3412 AS_IF([test "${SYS}" = "mingw32"], [
3413 enable_directx="yes"
3418 AS_IF([test "${enable_directx}" != "no"], [
3420 AC_CHECK_HEADERS([ddraw.h], [
3421 VLC_ADD_PLUGIN([directdraw])
3425 AC_CHECK_HEADERS([GL/wglew.h], [
3426 VLC_ADD_PLUGIN([glwin32 wgl])
3428 #include <windows.h>
3433 AC_CHECK_HEADERS([d3d11.h], [
3434 VLC_ADD_PLUGIN([direct3d11 direct3d11_filters])
3438 AC_CHECK_HEADERS([d3d9.h], [
3439 VLC_ADD_PLUGIN([direct3d9])
3440 AC_CHECK_HEADERS([d3dx9effect.h])
3442 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
3443 [[#define COBJMACROS
3445 #include <dxva2api.h>
3446 #ifndef IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids
3447 # error dxva2 too old
3451 VLC_ADD_PLUGIN([direct3d9_filters])
3453 [AC_MSG_WARN([Could not find required IDirectXVideoDecoder in dxva2api.h])])
3459 dnl Linux framebuffer module
3461 AC_CHECK_HEADER([linux/fb.h], [
3462 VLC_ADD_PLUGIN([fb])
3466 dnl Linux kernel mode setting module
3468 PKG_ENABLE_MODULES_VLC([KMS], [], [libdrm >= 2.4.83], [Linux kernel mode setting output], [auto])
3473 PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3478 AC_ARG_ENABLE([kva],
3479 AS_HELP_STRING([--enable-kva],
3480 [support the K Video Accelerator KVA (default enabled on OS/2)]),, [
3481 AS_IF([test "$SYS" = "os2"], [
3487 AS_IF([test "$enable_kva" != "no"], [
3488 AC_CHECK_HEADERS([kva.h], [
3490 AC_CHECK_LIB([kva], [main], [
3495 AC_SUBST([KVA_LIBS])
3496 AM_CONDITIONAL([HAVE_KVA], [test "${have_kva}" = "yes"])
3501 AC_ARG_ENABLE([mmal],
3502 AS_HELP_STRING([--enable-mmal],
3503 [Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)]))
3504 if test "${enable_mmal}" != "no"; then
3506 LDFLAGS="${LDFLAGS} -L/opt/vc/lib -lvchostif"
3507 CPPFLAGS="${CPPFLAGS} -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux"
3508 AC_CHECK_HEADERS([interface/mmal/mmal.h],
3509 [ AC_CHECK_LIB([bcm_host], [vc_tv_unregister_callback_full], [
3511 VLC_ADD_PLUGIN([mmal])
3512 VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ])
3513 VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ])
3514 VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lmmal_core -lmmal_components -lmmal_util -lvchostif ]) ], [
3515 AS_IF([test "${enable_mmal}" = "yes"],
3516 [ AC_MSG_ERROR([Cannot find bcm library...]) ],
3517 [ AC_MSG_WARN([Cannot find bcm library...]) ])
3520 ] , [ AS_IF([test "${enable_mmal}" = "yes"],
3521 [ AC_MSG_ERROR([Cannot find development headers for mmal...]) ],
3522 [ AC_MSG_WARN([Cannot find development headers for mmal...]) ]) ])
3525 AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"])
3531 EXTEND_HELP_STRING([Audio plugins:])
3534 dnl Pulseaudio module
3536 AC_ARG_ENABLE([pulse],
3537 AS_HELP_STRING([--enable-pulse],
3538 [use the PulseAudio client library (default auto)]))
3540 AS_IF([test "${enable_pulse}" != "no"], [
3541 PKG_CHECK_MODULES([PULSE], [libpulse >= 1.0], [
3544 AS_IF([test "x${enable_pulse}" != "x"], [
3545 AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 1.0 or later required.])
3549 AM_CONDITIONAL([HAVE_PULSE], [test "${have_pulse}" = "yes"])
3554 AC_ARG_ENABLE([alsa],
3555 AS_HELP_STRING([--enable-alsa],
3556 [support the Advanced Linux Sound Architecture (default auto)]),, [
3557 AS_IF([test "$SYS" = "linux" -a "${have_pulse}" = "no"], [
3562 AS_IF([test "${enable_alsa}" != "no"], [
3563 PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.24], [
3566 AS_IF([test "x${enable_alsa}" != "x"], [
3567 AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.24 or later required. Pass --disable-alsa to ignore this error.])
3571 AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
3574 dnl Open Sound System module
3576 AC_ARG_ENABLE([oss],
3577 AS_HELP_STRING([--enable-oss],
3578 [support the Open Sound System OSS (default enabled on FreeBSD/NetBSD/DragonFlyBSD)]),, [
3579 AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "linux" -o "$SYS" = "openbsd"], [
3585 AS_IF([test "$enable_oss" != "no"], [
3586 AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
3588 AC_CHECK_LIB([ossaudio], [main], [
3589 OSS_LIBS="-lossaudio"
3593 AC_SUBST([OSS_LIBS])
3594 AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
3597 dnl OpenBSD sndio module
3599 AC_ARG_ENABLE([sndio],
3600 AS_HELP_STRING([--disable-sndio],
3601 [support the OpenBSD sndio (default auto)]),, [
3602 AS_IF([test "$SYS" = "openbsd"], [
3607 AS_IF([test "$enable_sndio" != "no"], [
3608 AC_CHECK_HEADER([sndio.h], [
3612 AM_CONDITIONAL([HAVE_SNDIO], [test "${have_sndio}" = "yes"])
3615 dnl Windows Audio Session plugin
3617 AC_ARG_ENABLE([wasapi],
3618 AS_HELP_STRING([--enable-wasapi],
3619 [use the Windows Audio Session API (default auto)])
3622 AS_IF([test "$enable_wasapi" != "no"], [
3623 AC_CHECK_HEADER([audioclient.h], [
3626 AS_IF([test "x${enable_wasapi}" != "x"], [
3627 AC_MSG_ERROR([Windows Audio Session API not found.])
3631 AM_CONDITIONAL([HAVE_WASAPI], [test "${have_wasapi}" = "yes"])
3636 AC_ARG_ENABLE([jack],
3637 AS_HELP_STRING([--disable-jack],
3638 [do not use jack (default auto)]))
3640 AS_IF([test "${enable_jack}" != "no"], [
3641 PKG_CHECK_MODULES(JACK, jack >= 1.9.7,
3644 AC_MSG_WARN([${JACK_PKG_ERRORS}, trying jack1 instead])
3646 PKG_CHECK_MODULES(JACK, jack >= 0.120.1 jack < 1.0,
3649 AS_IF([test -n "${enable_jack}"],
3650 [AC_MSG_ERROR([${JACK_PKG_ERRORS}.])],
3651 [AC_MSG_WARN([${JACK_PKG_ERRORS}.])])
3655 AM_CONDITIONAL([HAVE_JACK], [test "${have_jack}" != "no"])
3658 dnl OpenSLES Android
3660 AC_ARG_ENABLE([opensles],
3661 AS_HELP_STRING([--enable-opensles], [Android OpenSL ES audio module (default disabled)]))
3662 if test "${HAVE_ANDROID}" = "1"; then
3663 if test "${enable_opensles}" = "yes"; then
3664 AC_CHECK_HEADERS([SLES/OpenSLES.h],
3665 [ VLC_ADD_PLUGIN([opensles_android]) ],
3666 [ AC_MSG_ERROR([cannot find OpenSLES headers])] )
3673 AC_ARG_ENABLE([tizen_audio],
3674 AS_HELP_STRING([--enable-tizen-audio],
3675 [Tizen audio module (default enabled on Tizen)]),, [
3676 AS_IF([test "$HAVE_TIZEN" = "1"], [
3677 enable_tizen_audio="yes"
3680 if test "${enable_tizen_audio}" = "yes"; then
3681 AC_CHECK_HEADERS([audio_io.h],
3682 [ VLC_ADD_PLUGIN([tizen_audio]) ],
3683 [ AC_MSG_ERROR([cannot find Tizen audio_io headers])] )
3687 dnl libsamplerate plugin
3689 PKG_ENABLE_MODULES_VLC([SAMPLERATE], [], [samplerate], [Resampler with libsamplerate], [auto])
3694 PKG_ENABLE_MODULES_VLC([SOXR], [], [soxr >= 0.1.2], [SoX Resampler library], [auto])
3699 AC_ARG_ENABLE([kai],
3700 AS_HELP_STRING([--enable-kai],
3701 [support the K Audio Interface KAI (default enabled on OS/2)]),, [
3702 AS_IF([test "$SYS" = "os2"], [
3708 AS_IF([test "$enable_kai" != "no"], [
3709 AC_CHECK_HEADERS([kai.h], [
3711 AC_CHECK_LIB([kai], [main], [
3716 AC_SUBST([KAI_LIBS])
3717 AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"])
3720 dnl chromaprint audio track fingerprinter
3722 m4_pushdef([libchromaprint_version], 0.6.0)
3723 PKG_WITH_MODULES([CHROMAPRINT],[libchromaprint >= libchromaprint_version],
3724 VLC_ADD_PLUGIN([stream_out_chromaprint]),
3725 AS_IF([test "${enable_chromaprint}" = "yes"],
3726 [AC_MSG_ERROR(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)],
3727 [AC_MSG_WARN(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)]
3729 [(Chromaprint based audio fingerprinter)],[auto])
3730 m4_popdef([libchromaprint_version])
3733 dnl Chromecast streaming support
3735 m4_pushdef([protobuf_lite_version], 2.5.0)
3736 AC_ARG_VAR(PROTOC, [protobuf compiler])
3737 AC_CHECK_PROGS(PROTOC, protoc, no)
3738 PKG_WITH_MODULES([CHROMECAST],[protobuf-lite >= protobuf_lite_version], [
3739 AS_IF([test "x${PROTOC}" != "xno"], [
3740 build_chromecast="yes"
3742 AC_MSG_ERROR(protoc compiler needed for [chromecast] was not found)
3745 AS_IF([test "${enable_chromecast}" = "yes"],
3746 AC_MSG_ERROR(Library [protobuf-lite >= protobuf_lite_version] needed for [chromecast] was not found),
3747 AC_MSG_WARN(Library [protobuf-lite >= protobuf_lite_version] needed for [chromecast] was not found)
3749 enable_chromecast="no"
3750 ], [(Chromecast streaming support)], [auto])
3751 AM_CONDITIONAL([BUILD_CHROMECAST], [test "${build_chromecast}" = "yes"])
3752 m4_popdef([protobuf_lite_version])
3755 dnl Interface plugins
3758 EXTEND_HELP_STRING([Interface plugins:])
3764 AS_HELP_STRING([--disable-qt], [Qt UI support (default enabled)]),, [
3765 AS_IF([test "${enable_vlc}" != "no"], [enable_qt="yes"])
3766 AS_IF([test "${SYS}" = "darwin"], [
3771 AS_IF([test "${enable_qt}" != "no"], [
3772 PKG_CHECK_MODULES([QT], [Qt5Core >= 5.9.0 Qt5Widgets Qt5Gui Qt5Svg], [
3773 PKG_CHECK_MODULES([QT5_X11], [Qt5X11Extras], [
3776 AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
3778 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
3779 QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
3780 QT_VERSION="$(eval $PKG_CONFIG --modversion Qt5Gui)"
3781 AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3782 AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3783 AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
3785 AS_IF([test -n "${enable_qt}"],[
3786 AC_MSG_ERROR([${QT_PKG_ERRORS}. If you want to build VLC without GUI, pass --disable-qt.])
3788 AC_MSG_WARN([${QT_PKG_ERRORS}.])
3794 AS_IF([test "${enable_qt}" != "no"], [
3795 ALIASES="${ALIASES} qvlc"
3797 AC_SUBST([QT_VERSION])
3798 AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" != "no"])
3799 AM_CONDITIONAL([HAVE_QT5_X11], [test "${have_qt5_x11}" = "yes"])
3802 dnl detect kde4-config patch (used for kde solids).
3804 AC_ARG_VAR([KDE4_CONFIG], [kde4-config utility])
3805 AS_IF([test "x$KDE4_CONFIG" = "x"], [
3806 KDE4_CONFIG="kde4-config"
3810 dnl Simple test for skins2 dependency
3812 AS_IF([test "$enable_qt" = "no"], [
3813 AS_IF([test "${enable_skins2}" = "yes"], [
3814 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.])
3817 AC_MSG_WARN([The skins2 module depends on the Qt interface, Qt is not built so skins2 is disabled.])
3824 AC_ARG_ENABLE([skins2],
3825 AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)]))
3826 AS_IF([test "${enable_skins2}" != "no"], [
3827 have_skins_deps="yes"
3830 AS_IF([test "${SYS}" = "mingw32"], [
3831 VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -DWIN32_SKINS])
3832 VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
3834 ], [test "${SYS}" = "os2"], [
3835 VLC_ADD_CPPFLAGS([skins2],[ -DOS2_SKINS])
3838 PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
3839 PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
3840 PKG_CHECK_MODULES([XCURSOR], [xcursor],, [have_skins_deps="no"])
3841 PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
3842 VLC_ADD_CPPFLAGS([skins2],[${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
3843 VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} ${XCURSOR_LIBS} -lX11])
3846 dnl we need freetype
3847 AS_IF([test "${have_freetype}" != "yes"], [
3848 have_skins_deps="no"
3851 AS_IF([test "${have_skins_deps}" = "no"], [
3852 AS_IF([test "x${enable_skins2}" = "x"], [
3853 AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
3855 AC_MSG_ERROR([Skins2 interface requires FreeType, libxcursor, libxpm, libxext and libxinerama])
3859 ALIASES="${ALIASES} svlc"
3863 AM_CONDITIONAL([BUILD_SKINS], [test "${enable_skins2}" = "yes"])
3865 AC_ARG_ENABLE([libtar],
3866 AS_HELP_STRING([--enable-libtar], [libtar support for skins2 (default auto)]))
3867 AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
3868 AC_CHECK_HEADERS([libtar.h], [
3869 VLC_ADD_LIBS([skins2],[-ltar])
3874 dnl MacOS X gui module
3876 AC_ARG_ENABLE([macosx],
3877 AS_HELP_STRING([--enable-macosx], [Mac OS X gui support (default enabled on Mac OS X)]))
3878 if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
3882 dnl If possible, use xcrun to find the right ibtool
3885 AC_PATH_PROG([XCRUN], [xcrun], [no])
3886 AS_IF([test ! "x${XCRUN}" = "xno"], [
3887 AC_MSG_CHECKING([for ibtool (using xcrun)])
3888 XIB="$(eval $XCRUN -f ibtool 2>/dev/null || echo no)"
3889 AC_MSG_RESULT([${XIB}])
3891 AC_MSG_WARN([Looking for tools without using xcrun])
3894 AS_IF([test "x${XIB}" = "xno"], [
3895 AC_PATH_PROG(XIB, [ibtool], [no])
3896 AS_IF([test "x${XIB}" = "xno"], [
3897 AC_MSG_ERROR([ibtool was not found, but is required for --enable-macosx])
3901 AM_CONDITIONAL([ENABLE_MACOSX_UI], [test "$enable_macosx" != "no" -a "${SYS}" = "darwin"])
3904 dnl MacOS X sparkle update support
3906 AC_ARG_ENABLE([sparkle],
3907 AS_HELP_STRING([--enable-sparkle], [Sparkle update support for OS X (default enabled on Mac OS X)]))
3908 if test "x${enable_sparkle}" != "xno" -a "${HAVE_OSX}" = "1"
3910 if test ! -d ${CONTRIB_DIR}/Sparkle.framework -a ! -d ${CONTRIB_DIR}/Frameworks/Sparkle.framework
3912 AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}])
3915 AC_DEFINE([HAVE_SPARKLE], [1], [Define to 1 if sparkle is enabled.])
3917 AM_CONDITIONAL([HAVE_SPARKLE], [test "$enable_sparkle" != "no"])
3920 dnl MacOS X breakpad creash reporter support
3922 AC_ARG_WITH([breakpad],
3923 AS_HELP_STRING([--with-breakpad=URL], [Enable Breakpad reporter using given URL]), [], [with_breakpad=no])
3925 AS_IF([test "$with_breakpad" != "no"], [
3927 AS_IF([test "$with_breakpad" = "yes"], [
3928 AC_MSG_ERROR([You need to supply the CrashDragon Server URL as value for --with-breakpad])
3931 AS_IF([test "$HAVE_OSX" = "1"], [
3932 AC_MSG_CHECKING([for Breakpad framework])
3933 AS_IF([test ! -d ${CONTRIB_DIR}/Breakpad.framework -a \
3934 ! -d ${CONTRIB_DIR}/Frameworks/Breakpad.framework], [
3937 AC_MSG_ERROR([Breakpad framework is required and was not found in ${CONTRIB_DIR}])
3939 AC_MSG_RESULT([yes])
3942 PKG_CHECK_MODULES([BREAKPAD], [breakpad-client], [
3943 LDFLAGS="${LDFLAGS} -Wl,--build-id"
3945 AC_MSG_ERROR(["breakpad not found"])
3950 AM_CONDITIONAL([HAVE_BREAKPAD], [test "$with_breakpad" != "no"])
3951 AS_IF([test "$with_breakpad" != "no"], [
3952 AC_SUBST([BREAKPAD_URL], ["${with_breakpad}"])
3956 dnl Minimal Mac OS X module
3958 AC_ARG_ENABLE([minimal-macosx],
3959 AS_HELP_STRING([--enable-minimal-macosx], [Minimal Mac OS X support (default disabled)]))
3960 if test "${enable_minimal_macosx}" = "yes" -a "${SYS}" = "darwin"
3962 VLC_ADD_PLUGIN([minimal_macosx])
3966 dnl Mac OS X fancy dmg build tool
3968 if test "${HAVE_OSX}" = "1"
3970 AC_PATH_PROG(DMGBUILD, dmgbuild, no)
3971 AS_IF([test "x${DMGBUILD}" = "xno"], [
3972 AC_MSG_WARN([dmgbuild not found -- unable to build fancy DMGs])
3975 AM_CONDITIONAL([HAVE_DMGBUILD], [test "x$DMGBUILD" != "xno" -a "${HAVE_OSX}" = "1"])
3978 dnl VideoToolbox plugins
3979 AC_CHECK_HEADERS([VideoToolbox/VideoToolbox.h], [
3980 VLC_ADD_PLUGIN([videotoolbox])
3981 VLC_ADD_PLUGIN([cvpx])
3985 dnl AudioToolbox MIDI plugin
3986 AC_CHECK_HEADERS([AudioToolbox/AudioToolbox.h], [
3987 VLC_ADD_PLUGIN([audiotoolboxmidi])
3993 AC_ARG_ENABLE([ncurses],
3994 AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)]))
3996 AS_IF([test "${enable_ncurses}" != "no"] ,[
3997 PKG_CHECK_MODULES([NCURSES], [ncursesw], [
3999 ALIASES="${ALIASES} nvlc"
4001 AS_IF([test -n "${enable_ncurses}"], [
4002 AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
4006 AM_CONDITIONAL([HAVE_NCURSES], [test "${have_ncurses}" = "yes"])
4011 AC_ARG_ENABLE([lirc],
4012 AS_HELP_STRING([--enable-lirc], [lirc support (default disabled)]))
4014 AS_IF([test "${enable_lirc}" = "yes"], [
4015 AC_CHECK_HEADER(lirc/lirc_client.h, [
4016 AC_CHECK_LIB([lirc_client], [lirc_init], [
4021 AM_CONDITIONAL([HAVE_LIRC], [test "${have_lirc}" = "yes"])
4026 PKG_CHECK_MODULES([BITSTREAM], [bitstream > 1.4],[have_bitstream="yes"], [have_bitstream="no"])
4027 AM_CONDITIONAL([HAVE_BITSTREAM], [test "${have_bitstream}" = "yes"])
4032 PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT])
4034 EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
4036 dnl goom visualization plugin
4038 PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [auto])
4041 dnl libprojectM visualization plugin
4043 AC_ARG_ENABLE([projectm],
4044 AS_HELP_STRING([--enable-projectm], [projectM visualization plugin (default enabled)]))
4045 AS_IF([test "${enable_projectm}" != "no"],
4047 PKG_CHECK_MODULES(PROJECTM, libprojectM,
4049 VLC_ADD_PLUGIN([projectm])
4050 PKG_CHECK_EXISTS([libprojectM >= 2.0.0],
4051 [ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ],
4052 [ AC_MSG_WARN( [Using libprojectM version 1] )
4055 AC_MSG_WARN([${PROJECTM_PKG_ERRORS}.])
4060 dnl Vovoid VSXu visualization plugin
4062 AC_ARG_ENABLE([vsxu],
4063 AS_HELP_STRING([--enable-vsxu], [Vovoid VSXu visualization plugin (default auto)]))
4064 AS_IF([test "${enable_vsxu}" != "no"],
4066 PKG_CHECK_MODULES(VSXU, libvsxu,
4068 VLC_ADD_PLUGIN([vsxu])
4070 AC_MSG_WARN([${VSXU_PKG_ERRORS}.])
4074 EXTEND_HELP_STRING([Service Discovery plugins:])
4076 dnl Avahi-Zeroconf services discovery
4077 PKG_ENABLE_MODULES_VLC([AVAHI], [], [avahi-client >= 0.6], [Zeroconf services discovery], [auto])
4080 dnl libudev services discovery
4081 PKG_ENABLE_MODULES_VLC([UDEV], [], [libudev >= 142], [Linux udev services discovery], [auto])
4084 dnl MTP devices services discovery
4085 PKG_ENABLE_MODULES_VLC([MTP], [mtp access_mtp], [libmtp >= 1.0.0], [MTP devices support], [auto])
4088 dnl UPnP Plugin (Intel SDK)
4090 PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto])
4093 dnl mDNS using libmicrodns
4095 PKG_ENABLE_MODULES_VLC([MICRODNS], [], [microdns], [mDNS services discovery], [auto])
4098 EXTEND_HELP_STRING([Misc options:])
4103 PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
4109 AC_ARG_ENABLE([libgcrypt],
4110 AS_HELP_STRING([--disable-libgcrypt], [gcrypt support (default enabled)]))
4111 AC_ARG_VAR([GCRYPT_CFLAGS], [C compiler flags for gcrypt])
4112 AC_ARG_VAR([GCRYPT_LIBS], [linker flags flags for gcrypt])
4114 # require libgcrypt >= 1.6.0
4115 AS_IF([test "${enable_libgcrypt}" != "no"], [
4116 AC_CACHE_CHECK([for gcrypt 1.6.0 or later], [ac_cv_lib_gcrypt], [
4118 CFLAGS="${CFLAGS} ${GCRYPT_CFLAGS}"
4119 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
4120 [#include <gcrypt.h>
4121 #if GCRYPT_VERSION_NUMBER < 0x010600
4124 ac_cv_lib_gcrypt=yes
4131 AS_IF([test "${ac_cv_lib_gcrypt}" = "yes"], [
4132 AC_DEFINE([HAVE_GCRYPT], 1, [Defined if having gcrypt])
4134 AS_IF([test "${enable_libgcrypt}" = "yes"], [
4135 AC_MSG_ERROR([libgcrypt version 1.6.0 or higher not found. Install libgcrypt or pass --disable-libgcrypt.])
4140 AS_IF([test -z "$GCRYPT_LIBS"], [
4141 GCRYPT_LIBS="-lgcrypt -lgpg-error"
4144 AC_SUBST([GCRYPT_CFLAGS])
4145 AC_SUBST([GCRYPT_LIBS])
4146 AM_CONDITIONAL([HAVE_GCRYPT], [test "${ac_cv_lib_gcrypt}" = "yes"])
4151 AC_ARG_ENABLE([gnutls],
4152 AS_HELP_STRING([--enable-gnutls], [GNU TLS TLS/SSL support (default enabled)]))
4153 AS_IF([test "${enable_gnutls}" != "no"], [
4154 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.3.6], [
4155 VLC_ADD_PLUGIN([gnutls])
4157 AS_IF([test -n "${enable_gnutls}"], [
4158 AC_MSG_ERROR([${GNUTLS_PKG_ERRORS}.)])
4167 AC_ARG_ENABLE([taglib],
4168 AS_HELP_STRING([--disable-taglib],
4169 [do not use TagLib (default enabled)]))
4170 AS_IF([test "${enable_taglib}" != "no"], [
4171 PKG_CHECK_MODULES(TAGLIB, taglib >= 1.9, [
4172 VLC_ADD_PLUGIN([taglib])
4174 AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])])
4180 PKG_ENABLE_MODULES_VLC([SECRET], [], [libsecret-1 >= 0.18], [use libsecret for keystore], [auto])
4185 AC_ARG_ENABLE([kwallet],
4186 AS_HELP_STRING([--enable-kwallet],
4187 [use kwallet (via D-Bus) for keystore (default enabled)]))
4188 AS_IF([test "${enable_kwallet}" != "no" -a "${have_dbus}" = "yes"], [
4189 VLC_ADD_PLUGIN([kwallet])
4193 dnl update checking system
4195 AC_ARG_ENABLE([update-check],
4196 AS_HELP_STRING([--enable-update-check], [update checking system (default disabled)]))
4197 if test "${enable_update_check}" = "yes"
4199 AS_IF([test "${ac_cv_lib_gcrypt}" != "yes"],[
4200 AC_MSG_ERROR([libgcrypt is required for update checking system]) ])
4202 AM_CONDITIONAL([UPDATE_CHECK], [test "${enable_update_check}" = "yes"])
4205 dnl OS X notification plugin
4207 AC_ARG_ENABLE([osx_notifications],
4208 AS_HELP_STRING([--enable-osx-notifications],
4209 [macOS notification plugin (default disabled)]),,
4210 [enable_osx_notifications=no])
4211 AS_IF([test "${enable_osx_notifications}" != "no"], [
4212 VLC_ADD_PLUGIN([osx_notifications])
4216 dnl Libnotify notification plugin
4218 PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-3.0], [libnotify notification], [auto])
4220 PKG_ENABLE_MODULES_VLC([MEDIALIBRARY], [medialibrary], [medialibrary], (medialibrary support), [auto])
4223 dnl Endianness check
4226 AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [
4227 DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1"
4231 AC_SUBST([DEFS_BIGENDIAN])
4234 dnl Where to install KDE solid .desktop
4236 AC_ARG_WITH(kde-solid,
4237 AS_HELP_STRING([--with-kde-solid=PATH],
4238 [KDE Solid actions directory (auto)]),, [
4240 if test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ; then
4241 with_kde_solid="yes"
4245 AS_IF([test "${with_kde_solid}" != "no"], [
4246 AS_IF([test "${with_kde_solid}" = "yes"], [
4247 kde4datadir="`${KDE4_CONFIG} --install data`"
4248 AS_IF([test "x$kde4datadir" = "x"], [kde4datadir='${datadir}/kde4/apps'])
4249 soliddatadir="${kde4datadir}/solid/actions"
4251 soliddatadir="${with_kde_solid}"
4254 AC_SUBST([soliddatadir])
4255 AM_CONDITIONAL([KDE_SOLID], [test "x${soliddatadir}" != "x"])
4258 dnl Find tools for win32 packaging
4260 AS_IF([test "${SYS}" = "mingw32"], [
4262 dnl Find makensis required to build the NSIS installer
4264 nsis_major_required="3"
4265 nsis_version_ok="no"
4266 AC_PATH_PROG([MAKENSIS], [makensis], [no])
4267 AS_IF([test "$MAKENSIS" != "no"], [
4269 AC_MSG_CHECKING([makensis version])
4270 nsis_version=$($MAKENSIS -VERSION)
4271 AC_MSG_RESULT([$nsis_version])
4272 nsis_version_major=$(echo "$nsis_version" | awk -F \. '{print $1}' | sed 's/v//')
4273 # Check if major version is a valid number
4274 AS_IF([test -n "$nsis_version_major" && \
4275 test "$nsis_version_major" -eq "$nsis_version_major" 2> /dev/null], [
4276 # Do the version check using major version
4277 AS_IF([test "$nsis_version_major" -lt "$nsis_major_required"], [
4278 AC_MSG_WARN([makensis too old, (needs ${nsis_major_required}.x, have ${nsis_version_major}.x)])
4280 nsis_version_ok="yes"
4283 AC_MSG_WARN([failed to check the makensis version])
4289 AC_PATH_PROG([SEVENZIP], [7z], [7z])
4291 AM_CONDITIONAL([HAVE_MAKENSIS], [test "x$MAKENSIS" != "xno" && test "$nsis_version_ok" = "yes"])
4294 dnl Check wether we have the PROCESS_MITIGATION_IMAGE_LOAD_POLICY
4295 dnl It should only be available when building for win10, but some SDKs define it unconditionnaly
4297 if test "${SYS}" = "mingw32"; then
4298 AC_CHECK_TYPES([PROCESS_MITIGATION_IMAGE_LOAD_POLICY],,,[#include <windows.h>])
4301 EXTEND_HELP_STRING([Components:])
4306 AC_ARG_ENABLE([vlc],
4307 AS_HELP_STRING([--enable-vlc], [build the VLC media player (default enabled)]))
4308 AM_CONDITIONAL([BUILD_VLC], [test "${enable_vlc}" != "no"])
4311 dnl Fuzzer (at the end in order to don't mess dependencies FLAGS)
4313 AS_VAR_IF(with_libfuzzer, no, [], [
4314 LIBS="-lstdc++ ${LIBM} -L${with_libfuzzer} -lFuzzer"
4315 AX_CHECK_COMPILE_FLAG(-fsanitize-coverage=trace-pc-guard, [
4316 AX_APPEND_FLAG([-fsanitize-coverage=trace-pc-guard])
4317 AX_APPEND_FLAG([-fsanitize-coverage=trace-pc-guard], [CXXFLAGS])
4318 AX_APPEND_COMPILE_FLAGS([-fsanitize-coverage=trace-cmp])
4319 AX_APPEND_COMPILE_FLAGS([-fsanitize-coverage=trace-cmp], [CXXFLAGS])
4321 AX_CHECK_COMPILE_FLAG(-fsanitize-coverage=trace-pc, [
4322 AX_APPEND_FLAG([-fsanitize-coverage=trace-pc])
4323 AX_APPEND_FLAG([-fsanitize-coverage=trace-pc], [CXXFLAGS])
4325 AC_MSG_ERROR([Sanitizer coverage not supported by your compiler])
4331 dnl Stuff used by the program
4333 VERSION_MESSAGE="${VERSION} ${CODENAME}"
4334 COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
4335 AC_DEFINE_UNQUOTED([VERSION_MESSAGE], "${VERSION_MESSAGE}", [Simple version string])
4336 AC_DEFINE_UNQUOTED([COPYRIGHT_MESSAGE], "${COPYRIGHT_MESSAGE}", [Copyright string])
4337 AC_DEFINE_UNQUOTED([COPYRIGHT_YEARS], "${COPYRIGHT_YEARS}", [The copyright years])
4338 AC_DEFINE_UNQUOTED([CONFIGURE_LINE], "${CONFIGURE_LINE}", [The ./configure command line])
4339 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],${VERSION_MAJOR}, [version major number])
4340 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],${VERSION_MINOR}, [version minor number])
4341 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_REVISION],${VERSION_REVISION}, [version revision number])
4342 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_EXTRA],${VERSION_EXTRA}, [version extra number])
4343 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_DEV],"${VERSION_DEV}", [version development string])
4344 AC_SUBST([COPYRIGHT_MESSAGE])
4345 AC_SUBST([VERSION_MESSAGE])
4346 AC_SUBST([VERSION_MAJOR])
4347 AC_SUBST([VERSION_MINOR])
4348 AC_SUBST([VERSION_REVISION])
4349 AC_SUBST([VERSION_EXTRA])
4350 AC_SUBST([COPYRIGHT_YEARS])
4351 AC_DEFINE_UNQUOTED([VLC_COMPILE_BY], "`whoami|sed -e 's/\\\/\\\\\\\/g'`", [user who ran configure])
4352 AC_DEFINE_UNQUOTED([VLC_COMPILE_HOST], "`hostname -f 2>/dev/null || hostname`", [host which ran configure])
4353 AC_DEFINE_UNQUOTED([VLC_COMPILER], "`$CC -v 2>&1 | tail -n 1 | sed -e 's/ *$//'`", [compiler])
4355 dnl Handle substvars that use $(top_srcdir)
4357 CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include ${CPPFLAGS}"
4360 dnl Configuration is finished
4370 AC_SUBST([WINE_SDK_PATH])
4372 AC_SUBST([AM_CPPFLAGS])
4373 AC_SUBST([MACOSX_DEPLOYMENT_TARGET])
4374 AC_SUBST([FILE_LIBVLCCORE_DLL])
4375 AC_SUBST([FILE_LIBVLC_DLL])
4389 modules/hw/mmal/Makefile
4390 share/vlc.appdata.xml.in
4393 AM_COND_IF([HAVE_WIN32], [
4395 extras/package/win32/NSIS/spad.nsi
4396 extras/package/win32/NSIS/vlc.win32.nsi
4397 extras/package/win32/msi/config.wxi
4401 AM_COND_IF([HAVE_DARWIN], [
4403 modules/gui/macosx/UI/InfoPlist.strings:modules/gui/macosx/Resources/InfoPlist.strings.in
4404 share/macosx/Info.plist:share/Info.plist.in
4408 dnl Generate makefiles
4411 dnl Do we have to use make or gmake ?
4412 if make --version 2>&1|grep -q GNU
4414 # GNU make, all seems good
4417 # Known GNU make alias (on BSD)
4420 dnl Shortcut to nice compile message
4421 if test -n $SHELL; then
4422 SHELL=${CONFIG_SHELL-/bin/sh}
4425 compile_top_srcdir=`sed -ne "s/^top_srcdir *= *//p" < Makefile`
4429 export PATH=\"$PATH\" LANG=C
4430 ($MAKE V=1 \$@ 2>&1 || touch .error\$\$)| $compile_top_srcdir/extras/buildsystem/make.pl
4431 test -f .error\$\$ && ERROR=1
4433 exit \$ERROR" >compile
4437 libvlc configuration
4438 --------------------
4439 version : ${VERSION}
4441 architecture : ${ARCH}
4442 optimizations : ${enable_optimizations}"
4443 if test "${enable_vlc}" != "no"; then
4444 echo "vlc aliases :${ALIASES}"
4446 echo "build vlc executable : no"
4449 To build vlc and its plugins, type \`$MAKE', or \`./compile' if you like nice colors."