1 dnl Autoconf settings for vlc
3 AC_COPYRIGHT([Copyright 2002-2013 VLC authors and VideoLAN])
5 AC_INIT(vlc, 2.1.0-pre1)
15 CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
17 COPYRIGHT_YEARS="1996-2013"
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 # Disable with "./configure --disable-silent-rules" or "make V=1"
31 AM_SILENT_RULES([yes])
33 dnl Too many people are not aware of maintainer mode:
34 dnl If you want to use it, you definitely know what you are doing, so
35 dnl you can specify "--disable-maintainer-mode". But if you want the default
36 dnl automake behavior, you've likely never heard of maintainer mode, so we
37 dnl can't expect you to enable it manually.
38 AS_IF([test "x${enable_maintainer_mode}" != "xno"],
39 [enable_maintainer_mode="yes"])
45 dnl vlcincludedir="\${includedir}/\${PKGDIR}"
46 dnl AC_SUBST(vlcincludedir)
47 vlcdatadir="\${datadir}/\${PKGDIR}"
49 vlclibdir="\${libdir}/\${PKGDIR}"
56 AC_USE_SYSTEM_EXTENSIONS
57 AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.])
58 AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
59 AC_DEFINE([_REENTRANT],, [Define to expose reentrant functions.])
60 AC_DEFINE([_THREAD_SAFE],, [Same as _REENTANT for some other OSes.])
61 AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
62 AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
68 _AM_DEPENDENCIES([OBJC])
74 AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
75 AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
77 dnl Check for compiler properties
82 dnl Extend the --help string at the current spot.
83 AC_DEFUN([EXTEND_HELP_STRING], [m4_divert_once([HELP_ENABLE], [$1])])
85 dnl Allow binary package maintainer to pass a custom string to avoid
87 AC_ARG_WITH(binary-version,
88 AS_HELP_STRING([--with-binary-version=STRING],
89 [To avoid plugins cache problem between binary version]),[],[])
90 AS_IF([test -n "${with_binary_version}"],[
91 AC_DEFINE_UNQUOTED([DISTRO_VERSION],["${with_binary_version}"],
92 [Binary specific version])
96 dnl Check the operating system
108 CFLAGS="${CFLAGS} -pthread"
109 VLC_ADD_LIBS([vcd cdda vcdx],[-ldvd])
113 CFLAGS="${CFLAGS} -pthread"
114 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
115 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
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 ${ARCH_flag}"
153 CXXFLAGS="${CXXFLAGS} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"
154 CPPFLAGS="${CPPFLAGS} ${ARCH_flag}"
155 OBJCFLAGS="${OBJCFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu99 ${ARCH_flag}"
156 LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names ${ARCH_flag}"
157 VLC_ADD_LIBS([motion rotate], [-Wl,-framework,IOKit,-framework,CoreFoundation])
158 VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit])
159 VLC_ADD_LIBS([avcodec access_avio swscale postproc i420_rgb_mmx x264 x26410b],[-Wl,-read_only_relocs,suppress])
160 VLC_ADD_CFLAGS([motion rotate],[-fconstant-cfstrings])
161 VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,SystemConfiguration])
163 dnl Allow binaries created on Lion to run on earlier releases
165 [#import <Cocoa/Cocoa.h>
166 #ifdef MAC_OS_X_VERSION_10_7
169 [AC_MSG_RESULT([yes])
170 AC_LIBOBJ([getdelim])
172 AC_LIBOBJ([strnlen])],)
175 dnl Handle Mac OS X SDK flags
177 AC_ARG_WITH(macosx-sdk,
178 [AS_HELP_STRING([--with-macosx-sdk=DIR],
179 [compile using the SDK in DIR])])
180 if test "${with_macosx_sdk}" != "" ; then
181 test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
182 CPP="${CPP} -isysroot ${with_macosx_sdk}"
183 CC="${CC} -isysroot ${with_macosx_sdk}"
184 CXX="${CXX} -isysroot ${with_macosx_sdk}"
185 OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
186 LD="${LD} -syslibroot ${with_macosx_sdk}"
188 AC_ARG_WITH(macosx-version-min,
189 [AS_HELP_STRING([--with-macosx-version-min=VERSION],
190 [compile for Mac OS X VERSION and above])])
191 if test "${with_macosx_version_min}" != "" ; then
192 MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
193 CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
194 CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
195 CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
196 OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
197 LD="${LD} -mmacosx_version_min=${with_macosx_version_min}"
198 CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
199 CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
200 OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
201 export MACOSX_DEPLOYMENT_TARGET
204 *mingw32* | *cygwin* | *wince* | *mingwce*)
205 AC_CHECK_TOOL(WINDRES, windres, :)
206 AC_CHECK_TOOL(OBJCOPY, objcopy, :)
207 AH_TOP([#if defined(WIN32) && !defined(_WIN32_WINNT)])
208 AH_TOP([# define _WIN32_WINNT 0x0502 /* Windows XP SP2 */])
210 AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
211 AC_DEFINE([_UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
212 AC_DEFINE([UNICODE], [1], [Define to 1 for Unicode (Wide Chars) APIs.])
219 dnl Check if we are using the mno-cygwin mode in which case we are
220 dnl actually dealing with a mingw32 compiler.
225 SYS=mingw32, AC_MSG_ERROR([VLC requires -mno-cygwin]))
229 if test "${SYS}" = "mingw32"; then
230 VLC_ADD_LIBS([libvlccore],[-lwinmm])
231 VLC_ADD_LDFLAGS([vlc],[-mwindows])
232 VLC_ADD_LIBS([win32text],[-lgdi32])
233 VLC_ADD_LIBS([vcdx],[-lwinmm])
234 AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
235 ac_default_prefix="`pwd`/_win32"
236 DESTDIR="`pwd`/_win32/"
239 dnl NSIS/MSI Installer prefix and WIN64
245 PROGRAMFILES="PROGRAMFILES64"
249 PROGRAMFILES="PROGRAMFILES"
252 AC_SUBST(WINDOWS_ARCH)
253 AC_SUBST(PROGRAMFILES)
271 LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild"
277 AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
278 AM_CONDITIONAL(HAVE_LINUX, test "${SYS}" = "linux")
279 AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2")
280 AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
281 AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1")
282 AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian")
285 dnl Sadly autoconf does not think about testing foo.exe when ask to test
286 dnl for program foo on win32
287 case "${build_os}" in
289 ac_executable_extensions=".exe"
295 dnl Android is linux, but a bit different
296 AS_IF([test "$SYS" = linux],[
297 AC_MSG_CHECKING([for an Android system])
298 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
299 [[#ifndef __ANDROID__
310 AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1")
314 dnl Check for the contrib directory
317 [AS_HELP_STRING([--with-contrib[=DIR]],
318 [search for 3rd party libraries in DIR/include and DIR/lib])
320 AC_MSG_CHECKING([for 3rd party libraries path])
321 AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
322 CONTRIB_DIR="${srcdir}/contrib/${host}"
323 AS_IF([test ! -d "${CONTRIB_DIR}"], [
324 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
325 CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
326 AS_IF([test ! -d "${CONTRIB_DIR}"], [
327 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
328 CONTRIB_DIR="${srcdir}/extras/contrib/hosts/${host}"
329 AS_IF([test ! -d "${CONTRIB_DIR}"], [
330 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
331 CONTRIB_DIR="${srcdir}/extras/contrib/hosts/`$CC -dumpmachine`"
332 AS_IF([test ! -d "${CONTRIB_DIR}"], [
333 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
335 AC_MSG_RESULT([not found])
341 AS_IF([test "${with_contrib}" != "no"], [
342 CONTRIB_DIR="${with_contrib}"
345 AC_MSG_RESULT([disabled])
348 AS_IF([test -n "${CONTRIB_DIR}"], [
349 AS_IF([test -d "${CONTRIB_DIR}/lib"],[
350 CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
352 echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
354 AC_MSG_RESULT([not usable])
358 AS_IF([test -n "${CONTRIB_DIR}"], [
359 AC_MSG_RESULT([${CONTRIB_DIR}])
360 export PATH=${CONTRIB_DIR}/bin:$PATH
361 CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
362 CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
363 CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
364 OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
365 AS_IF([test "$build" = "$host" -o "$PKG_CONFIG_LIBDIR"], [
366 export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
368 export PKG_CONFIG_LIBDIR="${CONTRIB_DIR}/lib/pkgconfig"
370 LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
372 AS_IF([test "${SYS}" = "darwin"], [
373 export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
374 export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
377 AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
378 AC_MSG_ERROR([Third party libraries not found!])
381 AC_SUBST(CONTRIB_DIR)
385 dnl It's very bad, but our former custom system was worst
389 dnl override platform specific check for dependent libraries
390 dnl otherwise libtool linking of shared libraries will
391 dnl fail on anything other than pass_all.
392 AC_CACHE_VAL(lt_cv_deplibs_check_method,
393 [lt_cv_deplibs_check_method=pass_all])
395 LT_INIT([dlopen win32-dll shared disable-static])
397 LT_LANG([Windows Resource])
401 m4_undefine([AC_DEPLIBS_CHECK_METHOD])
402 m4_defun([AC_DEPLIBS_CHECK_METHOD],[])
404 lt_cv_deplibs_check_method=pass_all
406 AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
407 AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
413 AM_GNU_GETTEXT_VERSION([0.18.1])
414 AM_GNU_GETTEXT([external], [need-ngettext])
423 AS_IF([test "${SYS}" = "mingw32"], [
424 dnl Check for broken versions of mingw-runtime compatability library
425 AC_MSG_CHECKING(for broken mingw-runtime)
426 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
428 #if defined(__MINGW64_VERSION_MAJOR)
429 # if __MINGW64_VERSION_MAJOR < 3
430 # error Attempting to use mingw-runtime with broken vsnprintf and direct2d support
432 #elif __MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION < 15
433 # error Attempting to use mingw-runtime with broken vsnprintf support
438 AC_MSG_RESULT([present])
439 AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher, or mingw-w64 version 3.0 or higher!])
441 dnl force use of mingw provided c99 *printf over msvcrt
442 CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
444 dnl Check for the need to include the mingwex lib for mingw32
446 AC_CHECK_LIB(mingwex,opendir,
447 AC_CHECK_LIB(mingw32,opendir,,
448 [VLC_ADD_LIBS([libvlccore],[-lmingwex])])
452 dnl Check for fnative-struct or mms-bitfields support for mingw32
454 CFLAGS="${CFLAGS} -mms-bitfields"
455 CXXFLAGS="${CXXFLAGS} -mms-bitfields"
456 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
457 [ac_cv_c_mms_bitfields],
458 [AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
459 if test "${ac_cv_c_mms_bitfields}" = "no"; then
461 CFLAGS="${CFLAGS} -fnative-struct"
462 CXXFLAGS="${CXXFLAGS} -fnative-struct"
463 AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
464 [ac_cv_c_fnative_struct],
465 [AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
466 "${ac_cv_c_fnative_struct}" = "no" && VLC_RESTORE_FLAGS
470 AC_ARG_ENABLE(winstore_app,
471 AS_HELP_STRING([--enable-winstore-app],
472 [Build targetted for Windows Store apps (default disabled)]))
475 AS_IF([test "${SYS}" = "mingw32" -a "${enable_winstore_app}" = "yes"], [vlc_winstore_app=1])
476 AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
480 dnl Buggy glibc prevention. Purposedly not cached.
481 dnl See sourceware.org bugs 5058 and 5443.
482 dnl Ubuntu alone has 20 bug numbers for this...
484 AC_MSG_CHECKING(for buggy GNU/libc versions)
485 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
487 #if defined (__GLIBC__) && (__GLIBC__ == 2) \
488 && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7)
489 # error GNU/libc with dcgettext killer bug!
492 AC_MSG_RESULT([not present])
494 AC_MSG_RESULT([found])
495 AS_IF([test "x${enable_nls}" != "xno"], [
496 AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable
497 work-around for this. Check with your distribution vendor on how to update the
498 glibc run-time. Alternatively, build with --disable-nls.])
502 dnl Plugin compilation stuff
506 dnl Check for system libs needed
509 dnl Check for usual libc functions
510 AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
511 AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
512 AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
513 AC_CHECK_FUNCS(fdatasync,,
514 [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
517 dnl mingw64 implements those as static inline, not functions with C linkage
519 AC_LANG_PROGRAM([#include <stdio.h>], [
521 if (asprintf(&c, "%s %d", "string", 1) == -1)
523 ])],[AC_DEFINE([HAVE_ASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([asprintf])])
525 AC_LANG_PROGRAM([#include <stdio.h>
526 #include <stdarg.h>], [
529 if (vasprintf(&c, "%s %d", ap) == -1)
531 ])],[AC_DEFINE([HAVE_VASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([vasprintf])])
533 dnl C11 static_assert()
534 AC_MSG_CHECKING([for static_assert in assert.h])
535 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <assert.h>], [
536 static_assert(1, "The impossible happened.");
539 AC_DEFINE([HAVE_STATIC_ASSERT], [1], [Define to 1 if <assert.h> defines static_assert.])
544 # Windows CE does not have strcoll()
547 dnl Check for non-standard system calls
550 AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity])
553 AC_CHECK_FUNCS([_lock_file])
557 AH_BOTTOM([#include <vlc_fixups.h>])
559 dnl Check for struct pollfd
560 AC_CHECK_TYPES([struct pollfd],,,
561 [#include <sys/types.h>
564 #elif defined (WIN32)
565 # include <winsock2.h>
569 dnl Checks for socket stuff
572 AC_SEARCH_LIBS(connect, [socket], [
573 AS_IF([test "$ac_cv_search_connect" != "none required"], [
574 SOCKET_LIBS="$ac_cv_search_connect"
577 AS_IF([test "${SYS}" = "mingw32"], [
578 SOCKET_LIBS="-lws2_32"
582 AC_SEARCH_LIBS([getaddrinfo], [nsl], [
583 AS_IF([test "$ac_cv_search_getaddrinfo" != "none required"], [
584 SOCKET_LIBS="$ac_cv_search_getaddrinfo $SOCKET_LIBS"
586 ],, [${SOCKET_LIBS}])
588 LIBS="${LIBS} ${SOCKET_LIBS}"
590 AC_LANG_PROGRAM([#ifdef WIN32
591 # if _WIN32_WINNT < 0x600
594 #include <ws2tcpip.h>
596 #include <sys/socket.h>
597 #include <arpa/inet.h>
599 char dst[[sizeof(struct in_addr)]];
600 inet_pton(AF_INET, "127.0.0.1", dst);
601 ])],[AC_DEFINE([HAVE_INET_PTON],[1],[Define to 1 if you have inet_pton function])],[AC_LIBOBJ([inet_pton])])
602 AC_CHECK_FUNCS([if_nameindex if_nametoindex])
605 AS_IF([test -n "$SOCKET_LIBS"], [
606 VLC_ADD_LIBS([access_http access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout sap stream_out_standard stream_out_rtp stream_out_raop vod_rtsp rtp oldrc netsync gnutls ts audioscrobbler lua remoteosd zvbi audiobargraph_a],[${SOCKET_LIBS}])
608 AC_SUBST(SOCKET_LIBS)
610 dnl Check for socklen_t
611 AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
612 AC_CACHE_CHECK([for socklen_t in sys/socket.h], dnl ` (fix VIM syntax highlight
613 ac_cv_type_socklen_t,
614 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
615 [#include <sys/types.h>
617 # include <winsock2.h>
618 # include <ws2tcpip.h>
620 # include <sys/socket.h>
621 #endif]], [[socklen_t len; len = 0;]])],
622 ac_cv_type_socklen_t=yes,
623 ac_cv_type_socklen_t=no)])
624 AS_IF([test "$ac_cv_type_socklen_t" = no],
625 [AC_DEFINE(socklen_t, int)])
627 dnl Check for struct sockaddr_storage
628 AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
629 AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.]) dnl ` (fix VIM syntax highlight
630 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
632 [#include <sys/types.h>
634 # include <winsock2.h>
636 # include <sys/socket.h>
637 #endif], [struct sockaddr_storage addr;],
638 ac_cv_struct_sockaddr_storage=yes,
639 ac_cv_struct_sockaddr_storage=no)])
640 AS_IF([test "${ac_cv_struct_sockaddr_storage}" = no], [
641 AC_DEFINE(sockaddr_storage, sockaddr)
642 AC_DEFINE(ss_family, sa_family)
645 dnl FreeBSD has a gnugetopt library for this:
647 AC_CHECK_FUNC(getopt_long,, [
648 AC_CHECK_LIB([gnugetopt],[getopt_long], [
649 GNUGETOPT_LIBS="-lgnugetopt"
652 AC_SUBST(GNUGETOPT_LIBS)
655 VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom panoramix rotate noise grain scene kate lua chorus_flanger freetype avcodec access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mpc dmo quicktime qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex opus mono colorthres extract ball access_imem hotkeys mosaic gaussianblur x26410b hqdn3d anaglyph oldrc ncurses],[-lm])
662 AC_CHECK_LIB(m,lrintf, [
663 AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])
664 VLC_ADD_LIBS([skins2],[-lm])
667 dnl Check for dynamic plugins
669 have_dynamic_objects="no"
671 AC_SEARCH_LIBS(dlopen, [dl svld], [
672 AS_IF([test "$ac_cv_search_dlopen" != "none required"], [
673 LIBDL="$ac_cv_search_dlopen"
675 have_dynamic_objects="yes"
680 AS_IF([test "${SYS}" = "mingw32"], [
682 have_dynamic_objects="yes" #assume we can use shared objects
685 AS_IF([test "${enable_shared}" = "no"], [
686 have_dynamic_objects=no
688 AM_CONDITIONAL(HAVE_DYNAMIC_PLUGINS, [test "${have_dynamic_objects}" != "no"])
691 VLC_ADD_LIBS([lua],[$LIBDL])
693 dnl Check for thread library
695 AS_IF([test "${SYS}" != "mingw32"], [
698 AC_SEARCH_LIBS(pthread_rwlock_init, pthread pthreads c_r, [
699 AS_IF([test "$ac_cv_search_pthread_rwlock_init" != "none required"], [
700 LIBPTHREAD="$ac_cv_search_pthread_rwlock_init"
705 AC_CHECK_LIB(rt, clock_nanosleep, [
706 VLC_ADD_LIBS([libvlccore],[-lrt])
708 AC_CHECK_FUNC(nanosleep,,[
709 AC_CHECK_LIB(rt,nanosleep, [
710 VLC_ADD_LIBS([libvlccore],[-lrt])
712 AC_CHECK_LIB(posix4,nanosleep, [
713 VLC_ADD_LIBS([libvlccore],[-lposix4])
718 AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])])
723 dnl Check for headers
724 AC_CHECK_HEADERS([search.h])
725 AC_CHECK_HEADERS(getopt.h locale.h xlocale.h)
726 AC_CHECK_HEADERS([sys/time.h sys/ioctl.h])
727 AC_CHECK_HEADERS([arpa/inet.h netinet/udplite.h sys/eventfd.h])
728 AC_CHECK_HEADERS([net/if.h], [], [],
730 #include <sys/types.h>
731 #include <sys/socket.h>
733 AC_CHECK_HEADERS([sys/mount.h], [], [],
735 #include <sys/param.h>
738 if test "${SYS}" != "mingw32"; then
739 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
740 AC_CHECK_HEADERS([linux/version.h linux/dccp.h scsi/scsi.h linux/magic.h])
741 AC_CHECK_HEADERS(syslog.h mntent.h)
742 fi # end "${SYS}" != "mingw32"
744 dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
745 AH_TEMPLATE(ssize_t, [Define to `int' if <stddef.h> does not define.]) dnl ` (fix VIM syntax highlight
746 AC_CHECK_TYPE(ssize_t,, [
747 AC_DEFINE(ssize_t, int)
750 dnl Check for threads library
751 if test "${SYS}" != "mingw32"; then
752 AC_CHECK_HEADERS(pthread.h)
753 fi # end "${SYS}" != "mingw32"
755 dnl It seems that autoconf detects pkg-config only during the first
756 dnl PKG_CHECK_MODULES from configure.ac - which makes sense. But in our case,
757 dnl it is nested within a conditional block, so it was not working right.
758 dnl Make PKG_CONFIG_PATH precious so that it appears in the help and get saved
759 AC_ARG_VAR(PKG_CONFIG_PATH,
760 [Paths where to find .pc not at the default location])
761 PKG_PROG_PKG_CONFIG()
763 dnl On some OS we need static linking
764 AS_IF([test -n "${PKG_CONFIG}" ],[
765 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[
766 PKG_CONFIG="${PKG_CONFIG} --static"
772 dnl Check for zlib.h and -lz along with system -lminizip if available
774 AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ])
775 AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ])
776 if test "${have_zlib}" = "yes"
778 VLC_ADD_LIBS([access_http skins2 sap unzip zip],[-lz])
779 PKG_CHECK_MODULES([MINIZIP], [minizip] , [ have_minizip=yes ], [
780 AC_CHECK_HEADERS([unzip.h], [
782 MINIZIP_LIBS="-lminizip -lz"
784 VLC_ADD_CPPFLAGS([skins2], [-I\\\$(top_srcdir)/modules/access/zip/unzip])
785 VLC_ADD_LIBS([skins2], [\\\$(top_builddir)/modules/access/libunzip.la])
789 VLC_ADD_CPPFLAGS([skins2],[$MINIZIP_CFLAGS])
790 VLC_ADD_LIBS([skins2],[$MINIZIP_LIBS])
792 AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
796 dnl Domain name i18n support via GNU libidn
798 PKG_CHECK_MODULES([IDN], [libidn], [
800 AC_DEFINE([HAVE_IDN], 1, [Define to 1 if you have GNU libidn.])
808 [AS_HELP_STRING([--enable-dbus],
809 [compile D-Bus message bus support (default enabled)])])
811 AS_IF([test "${enable_dbus}" != "no"], [
812 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0.0], [
815 AS_IF([test -n "${enable_dbus}"], [
816 AC_MSG_ERROR([${DBUS_PKG_ERRORS}.])
818 AC_MSG_WARN([${DBUS_PKG_ERRORS}.])
822 AM_CONDITIONAL([HAVE_DBUS], [test "${have_dbus}" = "yes"])
824 dnl Check for ntohl, etc.
826 CFLAGS="${CFLAGS} -Wall -Werror"
827 AC_CACHE_CHECK([for ntohl in sys/param.h],
828 [ac_cv_c_ntohl_sys_param_h],
829 [ AC_TRY_COMPILE([#include <sys/param.h>],
830 [int meuh; ntohl(meuh);],
831 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
832 if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then
833 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
837 EXTEND_HELP_STRING([Optimization options:])
839 dnl Compiler warnings
842 RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var error-implicit-function-declaration])
843 RDC_PROG_CC_FLAGS([-pipe])
845 RDC_PROG_CXX_WFLAGS([all extra sign-compare undef pointer-arith volatile-register-var])
852 [AS_HELP_STRING([--enable-debug],
853 [build with run-time assertions (default disabled)])],,
856 [Define to 1 if debug code should NOT be compiled])
857 AS_IF([test "${enable_debug}" != "no"], [
858 AC_CHECK_HEADERS([valgrind/valgrind.h])
867 [AS_HELP_STRING([--enable-gprof],[profile with gprof (default disabled)])],,
869 AS_IF([test "${enable_gprof}" != "no"], [
870 CFLAGS="${CFLAGS} -pg"
871 CXXFLAGS="${CXXFLAGS} -pg"
872 OBJCFLAGS="${OBJCFLAGS} -pg"
873 LDFLAGS="${LDFLAGS} -pg"
877 [AS_HELP_STRING([--enable-cprof],[profile with cprof (default disabled)])],,
879 AS_IF([test "${enable_gprof}" != "no"], [
880 CFLAGS="${CFLAGS} -finstrument-functions"
881 CXXFLAGS="${CXXFLAGS} -finstrument-functions"
882 OBJCFLAGS="${OBJCFLAGS} -finstrument-functions"
883 LDFLAGS="${LDFLAGS} -finstrument-functions"
889 AC_ARG_ENABLE(coverage,
890 [AS_HELP_STRING([--enable-coverage],
891 [build for test coverage (default disabled)])],,
892 [enable_coverage="no"])
893 AS_IF([test "${enable_coverage}" != "no"], [
894 CFLAGS="-fprofile-arcs -ftest-coverage ${CFLAGS}"
895 CXXFLAGS="-fprofile-arcs -ftest-coverage ${CXXFLAGS}"
896 LDFLAGS="-lgcov ${LDFLAGS}"
899 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "os2"], [
901 CFLAGS="${CFLAGS} -fvisibility=hidden"
902 CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
903 OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden"
904 AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden],
905 [ac_cv_c_visibility_hidden], [
906 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
907 ac_cv_c_visibility_hidden=yes
909 ac_cv_c_visibility_hidden=no
912 AS_IF([test "${ac_cv_c_visibility_hidden}" = "no"], [VLC_RESTORE_FLAGS])
917 dnl Enable/disable optimizations
919 AC_ARG_ENABLE(optimizations,
920 [AS_HELP_STRING([--disable-optimizations],
921 [disable compiler optimizations (default enabled)])],,
922 [enable_optimizations="yes"])
924 dnl Check for various optimization flags
925 AS_IF([test "${enable_optimizations}" != "no"], [
927 dnl -O4 and -O3 only in production builds
928 AS_IF([test "{enable_debug}" = "no"], [
930 CFLAGS="${CFLAGS} -O4"
931 CXXFLAGS="${CXXFLAGS} -O4"
932 OBJCFLAGS="${OBJCFLAGS} -O4"
933 AC_CACHE_CHECK([if $CC accepts -O4], [ac_cv_c_o4], [
934 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
940 AS_IF([test "${ac_cv_c_o4}" = "no"], [
942 CFLAGS="${CFLAGS} -O3"
943 CXXFLAGS="${CXXFLAGS} -O3"
944 OBJCFLAGS="${OBJCFLAGS} -O3"
945 AC_CACHE_CHECK([if $CC accepts -O3], [ac_cv_c_o3], [
946 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
952 AS_IF([test "${ac_cv_c_o3}" = "no"], [VLC_RESTORE_FLAGS])
956 dnl Check for -ffast-math
958 CFLAGS="${CFLAGS} -ffast-math"
959 CXXFLAGS="${CXXFLAGS} -ffast-math"
960 OBJCFLAGS="${OBJCFLAGS} -ffast-math"
961 AC_CACHE_CHECK([if $CC accepts -ffast-math], [ac_cv_c_fast_math], [
962 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
963 ac_cv_c_fast_math=yes
968 AS_IF([test "${ac_cv_c_fast_math}" = "no"], [VLC_RESTORE_FLAGS])
970 #ifndef __FAST_MATH__
971 # pragma STDC FENV_ACCESS OFF
972 # pragma STDC FP_CONTRACT ON
976 dnl Check for -funroll-loops
978 CFLAGS="${CFLAGS} -funroll-loops"
979 CXXFLAGS="${CXXFLAGS} -funroll-loops"
980 OBJCFLAGS="${OBJCFLAGS} -funroll-loops"
981 AC_CACHE_CHECK([if $CC accepts -funroll-loops], [ac_cv_c_unroll_loops], [
982 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
983 ac_cv_c_unroll_loops=yes
985 ac_cv_c_unroll_loops=no
988 AS_IF([test "${ac_cv_c_unroll_loops}" = "no"], [VLC_RESTORE_FLAGS])
990 AS_IF([test "$enable_debug" = "no"], [
991 dnl Check for -fomit-frame-pointer
993 CFLAGS="${CFLAGS} -fomit-frame-pointer"
994 CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer"
995 OBJCFLAGS="${OBJCFLAGS} -fomit-frame-pointer"
996 AC_CACHE_CHECK([if $CC accepts -fomit-frame-pointer],
997 [ac_cv_c_omit_frame_pointer], [
998 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
999 ac_cv_c_omit_frame_pointer=yes
1001 ac_cv_c_omit_frame_pointer=no
1004 AS_IF([test "${ac_cv_c_omit_frame_pointer}" = "no"], [VLC_RESTORE_FLAGS])
1008 dnl Check for Darwin plugin linking flags
1009 AS_IF([test "${SYS}" = "darwin"], [
1011 CFLAGS="${CFLAGS} -bundle -undefined error"
1012 AC_CACHE_CHECK([if $CC accepts -bundle -undefined error],
1013 [ac_cv_ld_darwin], [
1014 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1020 AS_IF([test "${ac_cv_ld_darwin}" != "no"], [
1021 VLC_ADD_LDFLAGS([plugin],[-bundle -undefined error])
1026 dnl Checks for __attribute__(aligned()) directive
1028 CFLAGS="${CFLAGS} -Werror"
1029 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
1030 [ac_cv_c_attribute_aligned],
1031 [ac_cv_c_attribute_aligned=0
1032 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
1034 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
1035 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
1038 if test "${ac_cv_c_attribute_aligned}" != "0"; then
1039 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
1040 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
1043 dnl Check for __attribute__((packed))
1044 AC_CACHE_CHECK([for __attribute__((packed))],
1045 [ac_cv_c_attribute_packed],
1046 [ac_cv_c_attribute_packed=no
1047 AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b; (void)b;],
1048 [ac_cv_c_attribute_packed=yes])])
1049 if test "${ac_cv_c_attribute_packed}" != "no"; then
1050 AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
1056 case "${host_cpu}" in
1065 dnl Check for backtrace() support
1066 AC_CHECK_HEADERS(execinfo.h)
1067 AC_CHECK_FUNCS(backtrace)
1072 ALIASES="${ALIASES} cvlc rvlc"
1075 dnl Accelerated modules
1078 dnl Check for fully working MMX intrinsics
1079 dnl We need support for -mmmx, we need <mmintrin.h>, and we also need a
1080 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1082 [AS_HELP_STRING([--disable-mmx],
1083 [disable MMX optimizations (default auto)])],,[
1084 case "${host_cpu}" in
1095 AS_IF([test "${enable_mmx}" != "no"], [
1098 CFLAGS="${CFLAGS} -mmmx"
1099 AC_CACHE_CHECK([if $CC groks MMX intrinsics], [ac_cv_c_mmx_intrinsics], [
1100 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1101 [#include <mmintrin.h>
1103 uint64_t frobzor;]], [
1105 a = b = c = (__m64)frobzor;
1106 a = _mm_slli_pi16(a, 3);
1107 a = _mm_adds_pi16(a, b);
1108 c = _mm_srli_pi16(c, 8);
1109 c = _mm_slli_pi16(c, 3);
1110 b = _mm_adds_pi16(b, c);
1111 a = _mm_unpacklo_pi8(a, b);
1112 frobzor = (uint64_t)a;]])], [
1113 ac_cv_c_mmx_intrinsics=yes
1115 ac_cv_c_mmx_intrinsics=no
1119 AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
1120 AC_DEFINE(HAVE_MMX_INTRINSICS, 1, [Define to 1 if MMX intrinsics are available.])
1124 CFLAGS="${CFLAGS} -mmmx"
1125 AC_CACHE_CHECK([if $CC groks MMX inline assembly], [ac_cv_mmx_inline], [
1126 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1128 asm volatile("packuswb %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1131 ac_cv_mmx_inline=yes
1136 AS_IF([test "${ac_cv_mmx_inline}" != "no"], [
1137 AC_DEFINE(CAN_COMPILE_MMX, 1, [Define to 1 inline MMX assembly is available.])
1141 AC_CACHE_CHECK([if $CC groks MMX EXT inline assembly],
1142 [ac_cv_mmxext_inline], [
1143 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1145 asm volatile("maskmovq %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1148 ac_cv_mmxext_inline=yes
1150 ac_cv_mmxext_inline=no
1154 AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
1155 AC_DEFINE(CAN_COMPILE_MMXEXT, 1, [Define to 1 if MMX EXT inline assembly is available.])
1159 AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
1160 AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
1162 dnl Check for fully workin SSE2 intrinsics
1163 dnl We need support for -mmmx, we need <emmintrin.h>, and we also need a
1164 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1166 [AS_HELP_STRING([--disable-sse],
1167 [disable SSE (1-4) optimizations (default auto)])],, [
1168 case "${host_cpu}" in
1178 AS_IF([test "${enable_sse}" != "no"], [
1179 ARCH="${ARCH} sse sse2"
1182 CFLAGS="${CFLAGS} -msse2"
1183 AC_CACHE_CHECK([if $CC groks SSE2 intrinsics], [ac_cv_c_sse2_intrinsics], [
1184 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1185 [#include <emmintrin.h>
1187 uint64_t frobzor;]], [
1189 a = b = c = _mm_set1_epi64((__m64)frobzor);
1190 a = _mm_slli_epi16(a, 3);
1191 a = _mm_adds_epi16(a, b);
1192 c = _mm_srli_epi16(c, 8);
1193 c = _mm_slli_epi16(c, 3);
1194 b = _mm_adds_epi16(b, c);
1195 a = _mm_unpacklo_epi8(a, b);
1196 frobzor = (uint64_t)_mm_movepi64_pi64(a);]])], [
1197 ac_cv_c_sse2_intrinsics=yes
1199 ac_cv_c_sse2_intrinsics=no
1203 AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
1204 AC_DEFINE(HAVE_SSE2_INTRINSICS, 1, [Define to 1 if SSE2 intrinsics are available.])
1208 CFLAGS="${CFLAGS} -msse"
1209 AC_CACHE_CHECK([if $CC groks SSE inline assembly], [ac_cv_sse_inline], [
1210 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1212 asm volatile("xorps %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1215 ac_cv_sse_inline=yes
1221 AS_IF([test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "solaris"], [
1222 AC_DEFINE(CAN_COMPILE_SSE, 1, [Define to 1 if SSE inline assembly is available.])
1225 AC_CACHE_CHECK([if $CC groks SSE2 inline assembly], [ac_cv_sse2_inline], [
1226 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1228 asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1231 ac_cv_sse2_inline=yes
1233 ac_cv_sse2_inline=no
1236 AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [
1237 AC_DEFINE(CAN_COMPILE_SSE2, 1, [Define to 1 if SSE2 inline assembly is available.])
1242 AC_CACHE_CHECK([if $CC groks SSE3 inline assembly], [ac_cv_sse3_inline], [
1243 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1245 asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1248 ac_cv_sse3_inline=yes
1250 ac_cv_sse3_inline=no
1254 AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
1255 AC_DEFINE(CAN_COMPILE_SSE3, 1, [Define to 1 if SSE3 inline assembly is available.]) ])
1257 AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly], [ac_cv_ssse3_inline], [
1258 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1260 asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p):"xmm0");
1263 ac_cv_ssse3_inline=yes
1265 ac_cv_ssse3_inline=no
1269 AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
1270 AC_DEFINE(CAN_COMPILE_SSSE3, 1, [Define to 1 if SSSE3 inline assembly is available.]) ])
1273 AC_CACHE_CHECK([if $CC groks SSE4.1 inline assembly],
1274 [ac_cv_sse4_1_inline], [
1275 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1277 asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1280 ac_cv_sse4_1_inline=yes
1282 ac_cv_sse4_1_inline=no
1286 AS_IF([test "${ac_cv_sse4_1_inline}" != "no"], [
1287 AC_DEFINE(CAN_COMPILE_SSE4_1, 1, [Define to 1 if SSE4_1 inline assembly is available.]) ])
1290 AC_CACHE_CHECK([if $CC groks SSE4.2 inline assembly],
1291 [ac_cv_sse4_2_inline], [
1292 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1294 asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1297 ac_cv_sse4_2_inline=yes
1299 ac_cv_sse4_2_inline=no
1303 AS_IF([test "${ac_cv_sse4_2_inline}" != "no"], [
1304 AC_DEFINE(CAN_COMPILE_SSE4_2, 1, [Define to 1 if SSE4_2 inline assembly is available.]) ])
1307 AC_CACHE_CHECK([if $CC groks SSE4A inline assembly], [ac_cv_sse4a_inline], [
1308 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1310 asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1313 ac_cv_sse4a_inline=yes
1315 ac_cv_sse4a_inline=no
1319 AS_IF([test "${ac_cv_sse4a_inline}" != "no"], [
1320 AC_DEFINE(CAN_COMPILE_SSE4A, 1, [Define to 1 if SSE4A inline assembly is available.]) ])
1322 AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
1325 CFLAGS="${CFLAGS} -mmmx"
1327 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], [
1328 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1330 asm volatile("pfadd %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1333 ac_cv_3dnow_inline=yes
1335 ac_cv_3dnow_inline=no
1339 AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
1340 AC_DEFINE(CAN_COMPILE_3DNOW, 1,
1341 [Define to 1 if 3D Now! inline assembly is available.])
1344 AM_CONDITIONAL([HAVE_3DNOW], [test "$have_3dnow" = "yes"])
1348 [AS_HELP_STRING([--disable-neon],
1349 [disable NEON optimizations (default auto)])],, [
1350 AS_IF([test "${host_cpu}" = "arm"], [enable_neon="yes"] ,[enable_neon="no"])
1352 AS_IF([test "${enable_neon}" != "no"], [
1354 CFLAGS="${CFLAGS} -mfpu=neon -mhard-float"
1355 AC_CACHE_CHECK([if $CCAS groks ARM NEON assembly], [ac_cv_arm_neon], [
1358 asm volatile("vqmovun.s64 d0, q1":::"d0");
1361 ac_cv_arm_neon="yes"
1368 AM_CONDITIONAL(HAVE_NEON, [test "${ac_cv_arm_neon}" = "yes"])
1371 AC_ARG_ENABLE(altivec,
1372 [AS_HELP_STRING([--disable-altivec],
1373 [disable AltiVec optimizations (default auto)])],, [
1374 AS_IF([test "${host_cpu}" = "powerpc"],
1375 [enable_altivec=yes], [enable_altivec=no])
1378 AS_IF([test "${enable_altivec}" = "yes"], [
1379 ARCH="${ARCH} altivec";
1381 AC_CACHE_CHECK([if $CC groks AltiVec inline assembly],
1382 [ac_cv_altivec_inline],
1383 [AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1384 ac_cv_altivec_inline="yes",
1385 [CFLAGS="${CFLAGS} -Wa,-m7400"
1386 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1387 [ac_cv_altivec_inline="-Wa,-m7400"],
1388 ac_cv_altivec_inline=no)
1391 AS_IF([test "${ac_cv_altivec_inline}" != "no"], [
1392 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1,
1393 [Define to 1 if AltiVec inline assembly is available.])
1394 AS_IF([test "${ac_cv_altivec_inline}" != "yes"], [
1395 VLC_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}])
1396 VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}])
1397 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}])
1402 dnl The AltiVec C extensions
1404 dnl There are several possible cases:
1405 dnl - OS X PPC, gcc 4.x: use -mpim-altivec -force_cpusubtype_ALL, don't
1406 dnl need <altivec.h>
1407 dnl - OS X PPC, gcc 3.x: need -faltivec, don't need <altivec.h>
1408 dnl - Linux PPC, gcc 3.4, 4.x: need <altivec.h> which requires -maltivec
1409 dnl - Linux PPC, gcc 3.3: need <altivec.h> and -maltivec -mabi=altivec
1410 dnl - Linux PPC, gcc 3.x: need <altivec.h> and -fvec
1411 dnl - Others: test should fail
1413 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
1415 [# OS X/PPC test (gcc 4.x)
1416 CFLAGS="${CFLAGS} -mpim-altivec -force_cpusubtype_ALL"
1417 AC_TRY_COMPILE([vector unsigned char foo;],
1418 [vec_ld(0, (unsigned char *)0);],
1419 [ac_cv_c_altivec="-mpim-altivec -force_cpusubtype_ALL"],
1420 [# OS X/PPC test (gcc 3.x)
1421 CFLAGS="${CFLAGS} -faltivec"
1422 AC_TRY_COMPILE([vector unsigned char foo;],
1423 [vec_ld(1 * sizeof(vector float), (unsigned char *)0);],
1424 [ac_cv_c_altivec="-faltivec"],
1425 dnl Below this are the Linux tests
1426 [# Linux/PPC test (gcc 4.x)
1427 CFLAGS="${CFLAGS} -maltivec"
1428 AC_TRY_COMPILE([#include <altivec.h>],
1429 [vec_ld(0, (unsigned char *)0);],
1430 [ac_cv_c_altivec="-maltivec"],
1431 [# Linux/PPC test (gcc 3.3)
1432 CFLAGS="${CFLAGS} -maltivec -mabi=altivec"
1433 AC_TRY_COMPILE([#include <altivec.h>],
1434 [vec_ld(0, (unsigned char *)0);],
1436 ac_cv_c_altivec_abi="-maltivec -mabi=altivec"],
1437 [# Linux/PPC test (gcc 3.3)
1438 CFLAGS="${CFLAGS} -fvec"
1439 AC_TRY_COMPILE([#include <altivec.h>],
1440 [vec_ld(0, (unsigned char *)0);],
1441 [ac_cv_c_altivec="-fvec"],
1442 [ac_cv_c_altivec=no])
1450 AS_IF([test "${ac_cv_c_altivec}" != "no"], [
1451 CPPFLAGS="${CPPFLAGS} ${ac_cv_c_altivec}"
1452 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, [Define to 1 if C AltiVec extensions are available.])
1453 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_c_altivec}])
1454 VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
1457 AC_CHECK_HEADERS(altivec.h)
1460 LDFLAGS="${LDFLAGS} -Wl,-framework,vecLib"
1461 AC_CACHE_CHECK([if linker needs -framework vecLib],
1463 [AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)])
1465 AS_IF([test "${ac_cv_ld_altivec}" != "no"], [
1466 VLC_ADD_LIBS([libvlccore memcpyaltivec],[-Wl,-framework,vecLib])
1469 AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])
1474 AC_ARG_ENABLE(optimize-memory,
1475 [AS_HELP_STRING([--enable-optimize-memory],
1476 [optimize memory usage over performance])])
1477 if test "${enable_optimize_memory}" = "yes"; then
1478 AC_DEFINE(OPTIMIZE_MEMORY, 1, Define if you want to optimize memory usage over performance)
1482 dnl Allow running as root (useful for people running on embedded platforms)
1484 AC_ARG_ENABLE(run-as-root,
1485 [AS_HELP_STRING([--enable-run-as-root],
1486 [allow running VLC as root (default disabled)])])
1487 AS_IF([test "${enable_run_as_root}" = "yes"],[
1488 AC_DEFINE(ALLOW_RUN_AS_ROOT, 1,
1489 [Define to 1 to allow running VLC as root (uid 0).])
1496 [AS_HELP_STRING([--disable-sout],
1497 [disable streaming output (default enabled)])])
1498 AS_IF([test "${enable_sout}" != "no"], [
1499 AC_DEFINE(ENABLE_SOUT, 1, [Define to 1 for stream output support.])
1501 AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"])
1505 [AS_HELP_STRING([--disable-lua],
1506 [disable LUA scripting support (default enabled)])])
1507 if test "${enable_lua}" != "no"
1509 PKG_CHECK_MODULES(LUA, lua5.2,
1512 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead])
1514 PKG_CHECK_MODULES(LUA, lua5.1,
1517 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
1518 PKG_CHECK_MODULES(LUA, lua >= 5.1,
1521 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
1523 AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
1526 AC_CHECK_LIB( lua5.2 , luaL_newstate,
1527 [LUA_LIBS="-llua5.2"],
1528 AC_CHECK_LIB( lua5.1 , luaL_newstate,
1529 [LUA_LIBS="-llua5.1"],
1530 AC_CHECK_LIB( lua51 , luaL_newstate,
1531 [LUA_LIBS="-llua51"],
1532 AC_CHECK_LIB( lua , luaL_newstate,
1540 if test "x${have_lua}" = "xyes" ; then
1541 VLC_ADD_LIBS([lua],[$LUA_LIBS])
1542 VLC_ADD_CFLAGS([lua],[$LUA_CFLAGS])
1544 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.])
1546 AC_ARG_VAR([LUAC], [LUA byte compiler])
1547 AC_PATH_PROGS(LUAC,[${LUAC} luac], [false])
1548 AS_IF([test "${LUAC}" = "false"], [
1549 AC_MSG_ERROR([Could not find the LUA byte compiler.])
1551 AS_IF([test -f ${CONTRIB_DIR}/lib/liblua.a -a `echo|${LUAC} -o - -|od -j 8 -N 2 -t x2|head -n 1|cut -d' ' -f2` != 0404], [
1552 AC_MSG_ERROR([You need 32-bits luac when using using lua from contrib.])
1555 AM_CONDITIONAL(BUILD_LUA, [test "${have_lua}" = "yes"])
1561 AC_ARG_ENABLE(httpd,
1562 [AS_HELP_STRING([--disable-httpd],
1563 [disable the built-in HTTP server (default enabled)])])
1564 if test "${enable_httpd}" != "no"
1566 AC_DEFINE(ENABLE_HTTPD, 1, Define if you want the HTTP daemon support)
1568 AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"])
1572 dnl VideoLAN manager
1575 [AS_HELP_STRING([--disable-vlm],
1576 [disable the stream manager (default enabled)])],,
1577 [enable_vlm="${enable_sout}"])
1578 AS_IF([test "${enable_vlm}" != "no"], [
1579 AS_IF([test "${enable_sout}" = "no"], [
1580 AC_MSG_ERROR([VLM requires the stream output. Do not use --disable-sout.])
1582 AC_DEFINE(ENABLE_VLM, 1, [Define if you want the VideoLAN manager support])
1584 AM_CONDITIONAL([ENABLE_VLM], [test "${enable_vlm}" != "no"])
1591 EXTEND_HELP_STRING([Input plugins:])
1596 AC_ARG_ENABLE(live555,
1597 [AS_HELP_STRING([--enable-live555],
1598 [enable RTSP input through live555 (default enabled)])])
1600 AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
1604 dnl detect include paths
1605 AS_IF([test -f "${CONTRIB_DIR}/include/UsageEnvironment.hh"], [
1606 CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
1608 AS_IF([test ${SYS} != "os2"], [
1609 LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"}
1610 CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment"
1612 LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"}
1613 CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include"
1614 LDFLAGS_live555="-L${LIVE555_PREFIX}/liveMedia -L${LIVE555_PREFIX}/groupsock -L${LIVE555_PREFIX}/BasicUsageEnvironment -L${LIVE555_PREFIX}/UsageEnvironment"
1619 AS_IF([test "${SYS}" = "solaris"], [
1620 CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
1622 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
1623 LDFLAGS="${LDFLAGS} ${LDFLAGS_live555}"
1626 AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [
1627 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
1628 [#include <liveMedia_version.hh>
1629 #if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1324598400)
1639 AS_IF([test "$ac_cv_live555" = "no"], [
1640 AC_MSG_WARN([liveMedia is missing or its installed version is too old:
1641 Version 2011.12.23 or later is required to proceed.
1642 You can get an updated one from http://www.live555.com/liveMedia .])
1643 AS_IF([test -n "${enable_live555}"], [
1644 AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
1647 other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
1648 other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
1649 AS_IF([test "${SYS}" = "mingw32"], [
1650 # add ws2_32 for closesocket, select, recv
1651 other_libs="$other_libs -lws2_32"
1654 dnl We need to check for pic because live555 don't provide shared libs
1655 dnl and we want to build a plugins so we need -fPIC on some arch.
1656 VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
1657 VLC_ADD_LDFLAGS([live555], [${LDFLAGS_live555}])
1658 AC_CHECK_LIB(liveMedia_pic, main, [
1659 VLC_ADD_PLUGIN([live555])
1660 VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
1662 AC_CHECK_LIB(liveMedia, main, [
1663 VLC_ADD_PLUGIN([live555])
1664 VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
1665 ],[],[${other_libs}])],[${other_libs_pic}])
1672 dnl IIDC and DV FireWire input modules
1674 PKG_ENABLE_MODULES_VLC([DC1394], [], [libdc1394-2 >= 2.1.0], [IIDC FireWire input module], [auto])
1675 PKG_ENABLE_MODULES_VLC([DV1394], [], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV FireWire input module], [auto])
1678 dnl - linsys modules: access module check for libzvbi
1680 AC_ARG_ENABLE(linsys,
1681 [AS_HELP_STRING([--enable-linsys],
1682 [Linux Linear Systems Ltd. SDI and HD-SDI input cards (default enabled)])])
1683 if test "$SYS" = "linux" -a "${enable_linsys}" != "no"; then
1684 VLC_ADD_PLUGIN([linsys_hdsdi])
1685 PKG_CHECK_MODULES(LINSYS_SDI, [zvbi-0.2 >= 0.2.28],
1686 [ VLC_ADD_LIBS([linsys_sdi],[$LINSYS_SDI_LIBS])
1687 VLC_ADD_CFLAGS([linsys_sdi],[$LINSYS_SDI_CFLAGS])
1688 VLC_ADD_PLUGIN([linsys_sdi]) ],
1689 [AC_MSG_WARN([${LINSYS_SDI_PKG_ERRORS}.])]
1694 dnl dvdread module: check for libdvdread
1696 PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread], [dvdread input module], [auto])
1699 dnl libdvdnav plugin
1701 AC_ARG_ENABLE(dvdnav,
1702 [AS_HELP_STRING([--disable-dvdnav],
1703 [disable DVD navigation with libdvdnav (default auto)])])
1704 if test "${enable_dvdnav}" != "no"
1706 PKG_CHECK_MODULES(DVDNAV, dvdnav, [
1707 VLC_ADD_PLUGIN([dvdnav])
1708 VLC_ADD_CFLAGS([dvdnav],[${DVDNAV_CFLAGS}])
1709 VLC_ADD_LIBS([dvdnav],[${DVDNAV_LIBS}])
1710 AC_CHECK_LIB(dvdnav, dvdnav_get_video_resolution,
1711 AC_DEFINE(HAVE_DVDNAV_GET_VIDEO_RESOLUTION, 1, [Define if you have dvdnav_get_video_resolution.]),
1712 [], [${LIBS_dvdnav}])
1713 AC_CHECK_LIB(dvdnav, dvdnav_describe_title_chapters,
1714 AC_DEFINE(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS, 1, [Define if you have dvdnav_describe_title_chapters.]),
1715 [], [${LIBS_dvdnav}])],
1716 [AC_MSG_WARN([${DVDNAV_PKG_ERRORS}.])])
1720 dnl Blu-ray Disc Support with libbluray
1722 PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2.1], (libbluray for Blu-ray disc support ) )
1725 dnl OpenCV wrapper and example filters
1727 PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv > 2.0], (OpenCV (computer vision) filter), [auto])
1731 dnl libsmbclient plugin
1733 PKG_ENABLE_MODULES_VLC([SMBCLIENT], [access_smb], [smbclient], (SMB/CIFS support), [auto])
1737 dnl sftp access support
1739 PKG_ENABLE_MODULES_VLC([SFTP], [access_sftp], [libssh2], (support SFTP file transfer via libssh2), [auto])
1744 AC_ARG_ENABLE(v4l2, [AS_HELP_STRING([--disable-v4l2],
1745 [disable Video4Linux version 2 (default auto)])])
1747 AS_IF([test "$enable_v4l2" != "no"], [
1748 AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
1752 AM_CONDITIONAL(HAVE_V4L2, [test "${have_v4l2}" != "no"])
1755 dnl special access module for Blackmagic SDI cards
1757 AC_ARG_ENABLE(decklink,
1758 [AS_HELP_STRING([--disable-decklink],
1759 [disable Blackmagic DeckLink SDI input (default auto)])])
1760 AC_ARG_WITH(decklink_sdk,
1761 [AS_HELP_STRING[--with-decklink-sdk=DIR],
1762 [ location of Blackmagic DeckLink SDI SDK])])
1764 if test "${enable_decklink}" != "no"
1766 if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}"
1768 VLC_ADD_CPPFLAGS([decklink decklinkoutput],[-I${with_decklink_sdk}/include])
1771 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_decklink}"
1773 AC_CHECK_HEADERS(DeckLinkAPIDispatch.cpp, [
1776 AC_MSG_WARN(Blackmagic DeckLink SDI include files not found, decklink disabled)
1781 AM_CONDITIONAL(HAVE_DECKLINK, [ test "${have_decklink}" != "no" ])
1785 dnl gnomeVFS access module
1787 PKG_ENABLE_MODULES_VLC([GNOMEVFS], [access_gnomevfs], [gnome-vfs-2.0], [GnomeVFS access module], [auto])
1792 PKG_ENABLE_MODULES_VLC([VCDX], [vcdx], [libcdio >= 0.78.2 libiso9660 >= 0.72 libvcdinfo >= 0.7.22], [navigate VCD with libvcdinfo], [no])
1795 dnl Built-in CD-DA and VCD module
1798 [AS_HELP_STRING([--disable-vcd],
1799 [disable built-in VCD and CD-DA support (default enabled)])])
1801 AC_ARG_ENABLE(libcddb,
1802 [AS_HELP_STRING([--disable-libcddb],
1803 [disable CDDB for Audio CD (default enabled)])])
1805 if test "${enable_vcd}" != "no"
1807 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
1808 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
1810 VLC_ADD_PLUGIN([vcd cdda])
1815 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
1816 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
1818 VLC_ADD_PLUGIN([vcd cdda])
1819 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
1824 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
1825 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
1827 VLC_ADD_PLUGIN([vcd cdda])
1828 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
1833 if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32" -o "${SYS}" = "os2"
1835 VLC_ADD_PLUGIN([vcd cdda])
1838 if test "${SYS}" = "darwin"
1840 VLC_ADD_PLUGIN([vcd cdda])
1841 VLC_ADD_LIBS([vcd vcdx cdda],[-Wl,-framework,IOKit,-framework,CoreFoundation])
1842 VLC_ADD_LIBS([vcdx cdda],[-liconv])
1845 if test "$enable_libcddb" != "no"; then
1846 PKG_CHECK_MODULES(LIBCDDB, [libcddb >= 0.9.5], [
1848 AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed])
1849 VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS])
1850 VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
1852 [AC_MSG_WARN([${LIBCDDB_PKG_ERRORS}: CDDB access disabled.])
1860 AC_CACHE_CHECK([for Linux DVB version 5.1], [ac_cv_linux_dvb_5_1], [
1861 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
1862 [#include <linux/dvb/version.h>
1863 #if (DVB_API_VERSION < 5)
1864 # error Linux DVB API v3.2 and older are not supported.
1866 #if (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR < 1)
1867 # error Linux DVB API v5.0 is unsupported. Please update.
1870 ac_cv_linux_dvb_5_1=yes
1872 ac_cv_linux_dvb_5_1=no
1874 AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_dvb_5_1" = "yes"])
1877 dnl Screen capture module
1879 AC_ARG_ENABLE(screen,
1880 [AS_HELP_STRING([--enable-screen],
1881 [disable screen capture (default enabled)])])
1882 if test "${enable_screen}" != "no"; then
1883 if test "${SYS}" = "darwin"; then
1884 AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, [
1885 VLC_ADD_PLUGIN([screen])
1889 AM_CONDITIONAL(HAVE_MAC_SCREEN, [test "${SYS}" = "darwin" -a "x${enable_screen}" != "xno"])
1892 dnl VNC/RFB access module
1894 PKG_ENABLE_MODULES_VLC([LIBVNC], [libvnc], [libvncclient >= 0.9.9], (VNC/rfb client support), [auto])
1896 dnl RDP/Remote Desktop access module
1898 PKG_ENABLE_MODULES_VLC([LIBFREERDP], [rdp], [freerdp >= 1.0.1], (RDP/Remote Desktop client support) )
1901 dnl Real RTSP plugin
1903 AC_ARG_ENABLE(realrtsp,
1904 [ --enable-realrtsp Real RTSP module (default disabled)])
1905 if test "${enable_realrtsp}" = "yes"; then
1906 VLC_ADD_PLUGIN([realrtsp])
1911 AC_ARG_ENABLE(macosx-eyetv,
1912 [ --enable-macosx-eyetv Mac OS X EyeTV (TNT Tuner) module (default enabled on Mac OS X)])
1913 if test "x${enable_macosx_eyetv}" != "xno" &&
1914 (test "${SYS}" = "darwin" || test "${enable_macosx_eyetv}" = "yes")
1916 VLC_ADD_LIBS([access_eyetv], [-Wl,-framework,Foundation])
1917 VLC_ADD_PLUGIN([access_eyetv])
1922 AC_ARG_ENABLE(macosx-qtkit,
1923 [ --enable-macosx-qtkit Mac OS X qtcapture (video) and qtsound (audio) module (default enabled on Mac OS X)])
1924 if test "x${enable_macosx_qtkit}" != "xno" &&
1925 (test "${SYS}" = "darwin" || test "${enable_macosx_qtkit}" = "yes")
1927 VLC_ADD_PLUGIN([qtcapture])
1928 VLC_ADD_PLUGIN([qtsound])
1930 AM_CONDITIONAL(HAVE_QTKIT, [test "${SYS}" = "darwin" -a "x${enable_macosx_qtkit}" != "xno"])
1934 AC_SUBST(have_avfoundation, ["no"])
1935 AC_ARG_ENABLE(macosx-avfoundation,
1936 [ --enable-macosx-avfoundation Mac OS X avcapture (video) module (default enabled on Mac OS X)])
1937 if test "x${enable_macosx_avfoundation}" != "xno" &&
1938 (test "${SYS}" = "darwin" || test "${enable_macosx_avfoundation}" = "yes")
1940 SAVED_LIBS="${LIBS}"
1941 LIBS="-framework AVFoundation"
1942 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [])],[have_avfoundation=yes],[have_avfoundation=no])
1943 LIBS="${SAVED_LIBS}"
1944 if test "${have_avfoundation}" != "no"
1946 VLC_ADD_LIBS([macosx],[-Wl,-framework,AVFoundation])
1947 VLC_ADD_PLUGIN([avcapture])
1950 AM_CONDITIONAL(HAVE_AVFOUNDATION, [test "${have_avfoundation}" != "no"])
1956 EXTEND_HELP_STRING([Mux/Demux plugins:])
1959 dnl libdvbpsi check for ts mux/demux
1962 PKG_WITH_MODULES([DVBPSI], [libdvbpsi], [have_dvbpsi="yes"])
1963 AM_CONDITIONAL(HAVE_DVBPSI, [test "${have_dvbpsi}" = "yes"])
1967 dnl GME demux plugin
1970 [AS_HELP_STRING([--enable-gme],
1971 [use Game Music Emu (default auto)])])
1972 AS_IF([test "${enable_gme}" != "no"], [
1973 AC_CHECK_HEADER([gme/gme.h], [
1974 VLC_ADD_LIBS([gme], [-lgme])
1975 VLC_ADD_PLUGIN([gme])
1977 AS_IF([test "x${enable_gme}" != "x"], [
1978 AC_MSG_ERROR([GME cannot be found. Please install the development files.])
1988 [AS_HELP_STRING([--enable-sid],[C64 sid demux support (default auto)])])
1989 AS_IF([test "${enable_sid}" != "no"], [
1990 PKG_CHECK_MODULES(SID, [libsidplay2], [
1992 oldCPPFLAGS="$CPPFLAGS"
1993 CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
1994 AC_CHECK_HEADER([sidplay/builders/resid.h], [
1995 VLC_ADD_PLUGIN([sid])
1996 VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
1997 VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
1999 AS_IF([test -n "${enable_sid}"],
2000 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2001 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2004 CPPFLAGS="$oldCPPFLAGS"
2007 AS_IF([test "x${enable_sid}" = "xyes"],
2008 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2009 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2016 dnl ogg demux plugin
2018 PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
2019 if test "${enable_sout}" != "no"; then
2020 PKG_ENABLE_MODULES_VLC([MUX_OGG], [], [ogg >= 1.0], [Ogg mux support], [auto])
2021 dnl Check for libshout
2022 PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
2026 dnl matroska demux plugin
2029 [AS_HELP_STRING([--disable-mkv],
2030 [do not use libmatroska (default auto)])])
2031 if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
2033 AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
2034 AC_MSG_CHECKING(for libebml version >= 1.0.0)
2036 [#include <ebml/EbmlVersion.h>
2037 #ifdef LIBEBML_VERSION
2038 #if LIBEBML_VERSION >= 0x010000
2042 [AC_MSG_RESULT([yes])
2043 AC_CHECK_HEADERS(matroska/KaxVersion.h, [
2044 AC_MSG_CHECKING(for libmatroska version >= 1.0.0)
2046 [#include <matroska/KaxVersion.h>
2047 #ifdef LIBMATROSKA_VERSION
2048 #if LIBMATROSKA_VERSION >= 0x010000
2052 [AC_MSG_RESULT([yes])
2053 AC_CHECK_HEADERS(matroska/KaxAttachments.h)
2054 VLC_ADD_CXXFLAGS([mkv],[])
2055 AC_CHECK_LIB(ebml_pic, main, [
2056 VLC_ADD_PLUGIN([mkv])
2057 VLC_ADD_LIBS([mkv],[-lmatroska -lebml_pic])
2059 AC_CHECK_LIB(ebml, main, [
2060 VLC_ADD_PLUGIN([mkv])
2061 VLC_ADD_LIBS([mkv],[-lmatroska -lebml])
2066 AC_MSG_ERROR([Your libmatroska is too old: you may get a more recent one from http://dl.matroska.org/downloads/libmatroska/. Alternatively you can use --disable-mkv to disable the matroska plugin.])
2070 [AC_MSG_RESULT([no])
2071 AC_MSG_ERROR([Your libebml is too old: you may get a more recent one from http://dl.matroska.org/downloads/libebml/. Alternatively you can use --disable-mkv to disable the matroska plugin.])
2078 dnl modplug demux plugin
2081 [AS_HELP_STRING([--disable-mod],
2082 [do not use libmodplug (default auto)])])
2083 if test "${enable_mod}" != "no" ; then
2084 PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [
2085 VLC_ADD_PLUGIN([mod])
2086 VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
2087 VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
2089 AS_IF([test -n "${enable_mod}"],
2090 [AC_MSG_ERROR([${LIBMODPLUG_PKG_ERRORS}.])],
2091 [AC_MSG_WARN([${LIBMODPLUG_PKG_ERRORS}.])])
2096 dnl mpc demux plugin
2099 [AS_HELP_STRING([--disable-mpc], [do not use libmpcdec (default auto)])])
2100 if test "${enable_mpc}" != "no"
2102 AC_CHECK_HEADERS([mpc/mpcdec.h], [
2103 VLC_ADD_PLUGIN([mpc])
2104 VLC_ADD_LIBS([mpc],[-lmpcdec])],
2105 [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
2106 VLC_ADD_PLUGIN([mpc])
2107 VLC_ADD_LIBS([mpc],[-lmpcdec])])])
2114 EXTEND_HELP_STRING([Codec plugins:])
2119 AC_ARG_ENABLE(wma-fixed,
2120 [ --enable-wma-fixed libwma-fixed module (default disabled)])
2121 if test "${enable_wma_fixed}" = "yes"
2123 VLC_ADD_PLUGIN([wma_fixed])
2127 dnl shine fixed point mp3 encoder
2129 AC_ARG_ENABLE(shine,
2130 [ --enable-shine shine mp3 encoding module (default disabled)])
2131 if test "${enable_shine}" = "yes"
2133 VLC_ADD_PLUGIN([shine])
2137 dnl openmax il codec plugin
2139 AC_ARG_ENABLE(omxil,
2140 [ --enable-omxil openmax il codec module (default disabled)])
2141 if test "${enable_omxil}" = "yes"
2143 VLC_ADD_PLUGIN([omxil])
2147 dnl openmax il vout plugin
2149 AC_ARG_ENABLE(omxil-vout,
2150 [ --enable-omxil-vout openmax il video output module (default disabled)])
2151 if test "${enable_omxil_vout}" = "yes"
2153 VLC_ADD_PLUGIN([omxil_vout])
2157 dnl raspberry pi openmax il configuration
2159 AC_ARG_ENABLE(rpi-omxil,
2160 [ --enable-rpi-omxil openmax il configured for raspberry pi (default disabled)])
2161 if test "${enable_rpi_omxil}" = "yes"
2163 VLC_ADD_PLUGIN([omxil omxil_vout])
2164 VLC_ADD_CFLAGS([omxil omxil_vout],[-DRPI_OMX])
2168 dnl CrystalHD codec plugin
2170 AC_ARG_ENABLE(crystalhd,
2171 [ --enable-crystalhd crystalhd codec plugin (default auto)])
2172 if test "${enable_crystalhd}" != "no"; then
2173 AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [
2174 VLC_ADD_PLUGIN([crystalhd])
2175 VLC_ADD_LIBS([crystalhd], [-lcrystalhd])
2177 if test "${SYS}" = "mingw32" ; then
2178 AC_CHECK_HEADERS(libcrystalhd/bc_dts_defs.h, [
2179 VLC_ADD_PLUGIN([crystalhd])
2180 AC_CHECK_HEADERS(libcrystalhd/bc_drv_if.h, [
2181 VLC_ADD_LIBS([crystalhd], [-lbcmDIL])
2184 AS_IF([test x"${enable_crystalhd}" = "xyes"],
2185 [AC_MSG_ERROR("Could not find CrystalHD development headers")],
2186 [AC_MSG_WARN("Could not find CrystalHD development headers")])
2187 ],[#define __LINUX_USER__
2188 #include <libcrystalhd/bc_dts_types.h>
2192 #include <libcrystalhd/bc_dts_types.h>
2200 [ --enable-mad libmad module (default enabled)])
2201 if test "${enable_mad}" != "no"
2204 [ --with-mad=PATH path to libmad],[],[])
2205 if test "${with_mad}" != "no" -a -n "${with_mad}"
2207 VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
2208 VLC_ADD_LIBS([mpgatofixed32],[-L${with_mad}/lib])
2211 AC_ARG_WITH(mad-tree,
2212 [ --with-mad-tree=PATH mad tree for static linking],[],[])
2213 if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
2215 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
2216 if test -z "${real_mad_tree}"
2218 dnl The given directory can't be found
2220 AC_MSG_ERROR([${with_mad_tree} directory does not exist])
2222 dnl Use a custom libmad
2223 AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
2224 if test -f ${real_mad_tree}/mad.h
2227 VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
2228 VLC_ADD_LIBS([mpgatofixed32],[-L${real_mad_tree}/.libs])
2230 LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
2231 AC_CHECK_LIB(mad, mad_bit_init, [
2232 VLC_ADD_PLUGIN([mpgatofixed32])
2233 VLC_ADD_LIBS([mpgatofixed32],[-lmad])
2234 ],[ AC_MSG_ERROR([the specified tree has not been compiled ])
2239 AC_MSG_ERROR([the specified tree does not have mad.h])
2243 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_mpgatofixed32}"
2244 LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
2245 AC_CHECK_HEADERS(mad.h, ,
2246 [ AC_MSG_ERROR([Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.]) ])
2247 AC_CHECK_LIB(mad, mad_bit_init, [
2248 VLC_ADD_PLUGIN([mpgatofixed32])
2249 VLC_ADD_LIBS([mpgatofixed32],[-lmad])],
2250 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
2256 AC_ARG_ENABLE(merge-ffmpeg,
2257 [ --enable-merge-ffmpeg merge FFmpeg-based plugins (default disabled)],, [
2258 enable_merge_ffmpeg="no"
2260 AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
2263 LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic"
2264 AC_CACHE_CHECK([if linker supports -Bsymbolic],
2265 [ac_cv_ld_bsymbolic],
2266 [AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no)])
2270 dnl avcodec decoder/encoder plugin
2272 AC_ARG_ENABLE(avcodec,
2273 [ --enable-avcodec libavcodec codec (default enabled)])
2274 AS_IF([test "${enable_avcodec}" != "no"], [
2275 PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [
2276 PKG_CHECK_EXISTS([libavcodec < 56],, [
2277 AC_MSG_ERROR([libavcodec versions 56 and later are not supported yet.])
2280 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2281 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2282 AC_CHECK_HEADERS(libavcodec/avcodec.h)
2283 AC_CHECK_HEADERS(libavutil/avutil.h)
2284 VLC_ADD_PLUGIN([avcodec])
2285 VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
2286 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2287 VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic])
2289 VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
2293 AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
2300 dnl libva needs avcodec
2302 AC_ARG_ENABLE(libva,
2303 [ --enable-libva VAAPI GPU decoding support (libVA) (default auto)])
2305 AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
2306 AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
2308 have_avcodec_vaapi="no"
2309 AS_IF([test "${enable_libva}" != "no" -a "${have_avcodec}" = "yes"], [
2310 PKG_CHECK_MODULES(LIBVA, [libva libva-x11], [
2312 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2313 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2314 AC_CHECK_HEADERS(libavcodec/vaapi.h, [
2315 AC_MSG_NOTICE([VAAPI acceleration activated])
2316 have_avcodec_vaapi="yes"
2318 AS_IF([test -n "${enable_libva}"], [
2319 AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
2321 AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
2326 AS_IF([test -n "${enable_libva}"], [
2327 AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
2329 AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
2333 AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"])
2336 dnl dxva2 needs avcodec
2338 AC_ARG_ENABLE(dxva2,
2339 [ --enable-dxva2 DxVA2 GPU decoding support (default auto)])
2341 have_avcodec_dxva2="no"
2342 AS_IF([test "${enable_dxva2}" != "no"], [
2343 if test "${SYS}" = "mingw32"; then
2344 AS_IF([test "x${have_avcodec}" = "xyes"], [
2345 AC_CHECK_HEADERS(dxva2api.h,
2347 AC_CHECK_HEADERS(libavcodec/dxva2.h, [
2348 AC_MSG_NOTICE([DxVA2 acceleration activated])
2349 have_avcodec_dxva2="yes"
2351 AS_IF([test "${enable_dxva2}" = "yes"],
2352 [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
2353 [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
2354 ], [#undef _WIN32_WINNT
2355 /* DXVA2 is only available in Vista and above */
2356 #define _WIN32_WINNT 0x600])
2358 AS_IF([test "${enable_dxva2}" = "yes"],
2359 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2360 [AC_MSG_WARN([dxva2api.h not found])])
2363 AS_IF([test "x${enable_dxva2}" != "x"], [
2364 AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
2369 AM_CONDITIONAL([HAVE_AVCODEC_DXVA2], [test "${have_avcodec_dxva2}" = "yes"])
2372 dnl vda needs avcodec
2375 [ --enable-vda VDA support (default auto)])
2377 have_avcodec_vda="no"
2378 AS_IF([test "${enable_vda}" != "no"], [
2379 if test "${SYS}" = "darwin"; then
2380 AS_IF([test "x${have_avcodec}" = "xyes"], [
2381 AC_CHECK_HEADERS(VideoDecodeAcceleration/VDADecoder.h,
2383 AC_CHECK_HEADERS(libavcodec/vda.h, [
2384 have_avcodec_vda="yes"
2386 AS_IF([test "${enable_vda}" = "yes"],
2387 [AC_MSG_ERROR([vda is present but libavcodec/vda.h is missing])],
2388 [AC_MSG_WARN([vda is present but libavcodec/vda.h is missing ])])
2391 AS_IF([test "${enable_vda}" = "yes"],
2392 [AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])],
2393 [AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])])
2396 AS_IF([test "x${enable_vda}" != "x"], [
2397 AC_MSG_ERROR([--enable-vda and --disable-avcodec options are mutually exclusive.])
2402 AM_CONDITIONAL([HAVE_AVCODEC_VDA], [test "${have_avcodec_vda}" = "yes"])
2405 dnl avformat demuxer/muxer plugin
2408 AC_ARG_ENABLE(avformat,
2409 [ --enable-avformat libavformat containers (default enabled)],, [
2410 enable_avformat="${have_avcodec}"
2412 if test "${enable_avformat}" != "no"
2414 PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil],
2417 CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
2418 CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
2419 AC_CHECK_HEADERS(libavformat/avformat.h libavformat/avio.h)
2420 AC_CHECK_HEADERS(libavutil/avutil.h)
2421 AS_IF([test "$enable_merge_ffmpeg" = "no"], [
2422 VLC_ADD_PLUGIN([avformat access_avio])
2423 VLC_ADD_LIBS([access_avio],[$AVFORMAT_LIBS $AVUTIL_LIBS])
2424 VLC_ADD_CFLAGS([access_avio],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
2425 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2426 VLC_ADD_LDFLAGS([avformat access_avio],[-Wl,-Bsymbolic])
2429 VLC_ADD_LIBS([avcodec],[$AVFORMAT_LIBS $AVUTIL_LIBS])
2430 VLC_ADD_CFLAGS([avcodec],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
2434 AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
2439 dnl swscale image scaling and conversion plugin
2442 AC_ARG_ENABLE(swscale,
2443 AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion
2444 (default enabled)]))
2445 if test "${enable_swscale}" != "no"
2447 PKG_CHECK_MODULES(SWSCALE,[libswscale],
2450 CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
2451 CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
2452 AC_CHECK_HEADERS(libswscale/swscale.h)
2453 VLC_ADD_PLUGIN([swscale])
2454 VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
2455 VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
2456 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2457 VLC_ADD_LIBS([swscale],[-Wl,-Bsymbolic])
2461 AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
2469 AC_ARG_ENABLE(postproc,
2470 [ --enable-postproc libpostproc image post-processing (default auto)])
2471 if test "${enable_postproc}" != "no"
2473 PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
2476 CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
2477 CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
2478 AC_CHECK_HEADERS(postproc/postprocess.h)
2479 VLC_ADD_PLUGIN([postproc])
2480 VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS $AVUTIL_LIBS])
2481 VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS])
2484 AC_MSG_WARN([${POSTPROC_PKG_ERRORS}.])
2489 dnl faad decoder plugin
2492 [ --enable-faad faad codec (default auto)])
2493 if test "${enable_faad}" != "no"; then
2494 AC_ARG_WITH(faad-tree, [ --with-faad-tree=PATH faad tree for static linking])
2495 if test -n "${with_faad_tree}"; then
2496 AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
2497 real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
2498 if test -z "${real_faad_tree}"; then
2499 dnl The given directory can't be found
2501 AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
2503 if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"; then
2504 dnl Use the custom faad
2505 AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
2506 VLC_ADD_PLUGIN([faad])
2507 VLC_ADD_LIBS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
2508 VLC_ADD_CPPFLAGS([faad],[-I${real_faad_tree}/include])
2510 dnl The given libfaad wasn't built
2512 AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
2516 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_faad}"
2517 LDFLAGS="${LDFLAGS} ${LIBS_faad}"
2518 AC_CHECK_HEADERS(faad.h,
2519 [ AC_CHECK_LIB(faad, faacDecOpen, [
2520 VLC_ADD_PLUGIN([faad])
2521 VLC_ADD_LIBS([faad],[-lfaad]) ], [
2522 AC_CHECK_LIB(faad, NeAACDecOpen, [
2523 VLC_ADD_PLUGIN([faad])
2524 VLC_ADD_LIBS([faad],[-lfaad]) ], [
2525 AS_IF([test "${enable_faad}" = "yes"],
2526 [ AC_MSG_ERROR([Cannot find libfaad library...]) ],
2527 [ AC_MSG_WARN([Cannot find libfaad library...]) ]) ]) ])
2528 ] , [ AS_IF([test "${enable_faad}" = "yes"],
2529 [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ],
2530 [ AC_MSG_WARN([Cannot find development headers for libfaad...]) ]) ])
2536 dnl twolame encoder plugin
2538 PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])
2541 dnl fdk-aac encoder plugin
2543 PKG_ENABLE_MODULES_VLC([FDKAAC], [], [fdk-aac], [FDK-AAC encoder], [disabled])
2546 dnl QuickTime plugin
2548 AC_ARG_ENABLE(quicktime,
2549 [ --enable-quicktime QuickTime module (deprecated)])
2550 if test "${enable_quicktime}" = "yes"; then
2551 if test "${SYS}" = "mingw32"; then
2552 VLC_ADD_PLUGIN([quicktime])
2554 AC_CHECK_HEADERS(QuickTime/QuickTime.h,
2555 [ VLC_ADD_PLUGIN([quicktime])
2556 VLC_ADD_LIBS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
2557 ], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
2562 dnl A52/AC3 decoder plugin
2565 [ --enable-a52 A/52 support with liba52 (default enabled)])
2566 if test "${enable_a52}" != "no"
2569 [ --with-a52=PATH a52 headers and libraries])
2570 AC_ARG_WITH(a52-tree,
2571 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
2572 if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
2574 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
2575 if test -z "${real_a52_tree}"
2577 dnl The given directory can't be found
2579 AC_MSG_ERROR([${with_a52_tree} directory does not exist])
2581 dnl Use a custom a52dec
2582 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
2583 if test -f ${real_a52_tree}/include/a52.h
2586 VLC_ADD_CPPFLAGS([a52tofloat32],[-I${real_a52_tree}])
2587 VLC_ADD_LIBS([a52tofloat32],[-L${real_a52_tree}/liba52/.libs])
2589 LDFLAGS="${LDFLAGS} ${LIBS_a52tofloat32}"
2590 AC_CHECK_LIB(a52, a52_free, [
2591 VLC_ADD_PLUGIN([a52tofloat32])
2592 VLC_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
2593 VLC_ADD_LIBS([a52tofloat32],[-la52])
2595 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
2597 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3 ($real_a52_tree)])
2599 AC_MSG_ERROR([the specified tree has not been compiled])
2604 AC_MSG_ERROR([the specified tree does not have a52.h])
2607 if test -z "${with_a52}"
2612 LDFLAGS_test="-L${with_a52}/lib"
2613 CPPFLAGS_test="-I${with_a52}/include"
2616 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
2617 LDFLAGS="${LDFLAGS} ${LDFLAGS_test} ${LIBS_a52tofloat32}"
2618 AC_CHECK_HEADERS(a52dec/a52.h, [
2619 AC_CHECK_LIB(a52, a52_free, [
2620 VLC_ADD_PLUGIN([a52tofloat32])
2621 VLC_ADD_LIBS([a52tofloat32],[${LDFLAGS_test} -la52])
2622 VLC_ADD_CPPFLAGS([a52tofloat32],[${CPPFLAGS_test}])
2624 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.])
2627 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.])
2634 dnl DTS Coherent Acoustics decoder plugin
2636 PKG_ENABLE_MODULES_VLC([DCA], [dtstofloat32], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
2641 PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])
2646 PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])
2651 PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
2656 AC_ARG_ENABLE(tremor,
2657 [ --enable-tremor Tremor decoder support (default disabled)])
2658 if test "${enable_tremor}" = "yes"
2660 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
2661 VLC_ADD_PLUGIN([tremor])
2662 VLC_ADD_LIBS([tremor],[-lvorbisidec -logg])
2669 PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex support], [auto])
2671 AS_IF([test "${enable_speex}" != "no"], [
2672 PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
2675 AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
2678 AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
2683 PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus], [Opus support], [auto])
2686 dnl theora decoder plugin
2688 PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto])
2691 dnl dirac encoder plugin
2693 PKG_ENABLE_MODULES_VLC([DIRAC], [], [dirac >= 0.10.0], [dirac encoder], [auto])
2696 dnl schroedinger decoder plugin (for dirac format video)
2698 PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
2701 dnl PNG decoder module
2704 [ --enable-png PNG support (default enabled)])
2705 AS_IF([test "${enable_png}" != "no"], [
2706 AC_CHECK_HEADERS(png.h, [
2708 LDFLAGS="${LDFLAGS} -lz $LIBM"
2709 AC_CHECK_LIB(png, png_set_rows, [
2710 VLC_ADD_LIBS([png],[-lpng -lz $LIBM])
2711 VLC_ADD_PLUGIN([png])
2718 dnl H264 encoder plugin (10-bit lib264)
2720 AC_ARG_ENABLE(x26410b,
2721 [ --enable-x26410b H264 10-bit encoding support with static libx264 (default disabled)])
2722 if test "${enable_x26410b}" != "no"; then
2723 AC_ARG_WITH(x26410b-tree,
2724 [ --with-x26410b-tree=PATH H264 10-bit encoding module with libx264 (static linking)],[],[])
2725 if test "${with_x26410b_tree}" != "no" -a -n "${with_x26410b_tree}"
2727 real_x26410b_tree="̧`cd ${with_x26410b_tree} 2>/dev/null && pwd`"
2728 if test -z "${real_x26410b_tree}"
2731 AC_MSG_ERROR([${with_x26410b_tree} directory does not exist])
2733 AC_MSG_CHECKING(for x264.h in ${real_x26410b_tree})
2734 if test -f ${with_x26410b_tree}/x264_config.h
2737 AC_MSG_CHECKING(for 10-bit build of x264)
2738 if grep -q "BIT_DEPTH.*10" ${with_x26410b_tree}/x264_config.h ;then
2740 VLC_ADD_PLUGIN([x26410b])
2741 VLC_ADD_CFLAGS([x26410b],[-I${with_x26410b_tree}])
2742 VLC_ADD_LIBS([x26410b],[-L${with_x26410b_tree} -lm -lpthread -lx264])
2745 AC_MSG_ERROR([${with_x26410b_tree} isnt build 10-bit])
2749 AC_MSG_ERROR([${with_x26410b_tree} doesnt have x264_config.h])
2752 PKG_CHECK_MODULES(X26410B, x26410b, [
2753 VLC_ADD_PLUGIN([x26410b])
2754 VLC_ADD_LDFLAGS([x26410b],[${X26410B_LIBS}])
2755 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2756 VLC_ADD_LIBS([x26410b],[-Wl,-Bsymbolic])
2758 VLC_ADD_CFLAGS([x26410b],[${X26410B_CFLAGS}])
2759 if echo ${X26410B_LIBS} |grep -q 'pthreadGC2'; then
2760 VLC_ADD_CFLAGS([x26410b], [-DPTW32_STATIC_LIB])
2763 if test "${enable_x26410b}" = "yes"; then
2764 AC_MSG_ERROR([x26410b module doesn't work without staticly compiled libx264.a])
2772 dnl H264 encoder plugin (using libx264)
2775 [ --enable-x264 H264 encoding support with libx264 (default enabled)])
2776 if test "${enable_x264}" != "no"; then
2777 AC_ARG_WITH(x264-tree,
2778 [ --with-x264-tree=PATH x264 tree for static linking ],[],[])
2779 if test "${with_x264_tree}" != "no" -a -n "${with_x264_tree}"
2781 real_x264_tree="`cd ${with_x264_tree} 2>/dev/null && pwd`"
2782 if test -z "${real_x264_tree}"
2784 dnl The given directory can't be found
2786 AC_MSG_ERROR([${with_x264_tree} directory does not exist])
2788 dnl Use a custom libx264
2789 AC_MSG_CHECKING(for x264.h in ${real_x264_tree})
2790 if test -f ${real_x264_tree}/x264.h
2793 VLC_ADD_CPPFLAGS([x264],[-I${real_x264_tree}])
2794 VLC_ADD_LIBS([x264],[-L${real_x264_tree}])
2795 PKG_CHECK_MODULES(X264,x264, [
2796 VLC_ADD_PLUGIN([x264])
2797 VLC_ADD_LIBS([x264],[${X264_LIBS}])
2798 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2799 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2800 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2803 AC_MSG_ERROR([the specified tree has not been compiled])
2807 AC_MSG_ERROR([the specified tree does not have x264.h])
2810 PKG_CHECK_MODULES(X264,x264 >= 0.86, [
2811 VLC_ADD_PLUGIN([x264])
2812 VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
2814 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2815 VLC_ADD_LIBS([x264],[-Wl,-Bsymbolic])
2818 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2819 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2820 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2823 if test "${enable_x264}" = "yes"; then
2824 AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
2831 dnl libfluidsynth (MIDI synthetizer) plugin
2833 PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.2], [MIDI synthetiser with libfluidsynth], [auto])
2836 dnl Teletext Modules
2837 dnl vbi decoder plugin (using libzbvi)
2842 AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
2843 libzvbi (default enabled)]))
2845 AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
2846 zvbi) (default enabled if zvbi is absent)]))
2848 AS_IF( [test "${enable_zvbi}" != "no"],[
2849 PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.28],
2851 VLC_ADD_LIBS([zvbi],[$ZVBI_LIBS])
2852 if test "${SYS}" = "mingw32"; then
2853 VLC_ADD_LIBS([zvbi],[ -lpthreadGC2])
2855 VLC_ADD_CFLAGS([zvbi],[$ZVBI_CFLAGS])
2856 VLC_ADD_PLUGIN([zvbi])
2857 AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built])
2858 AS_IF( [test "${enable_telx}" = "yes"],[
2859 AC_MSG_WARN([The zvbi and telx modules are incompatible. Using zvbi.])
2862 AC_MSG_WARN([${ZVBI_PKG_ERRORS}. Enabling the telx module instead.])
2865 AS_IF( [test "${enable_telx}" != "no" ],[
2866 VLC_ADD_PLUGIN([telx])
2870 dnl libass subtitle rendering module
2872 AC_ARG_ENABLE(libass,
2873 [ --enable-libass Subtitle support using libass (default enabled)])
2874 AS_IF( [test "${enable_libass}" != "no"], [
2875 PKG_CHECK_MODULES(LIBASS, [libass >= 0.9.8],
2877 VLC_ADD_LIBS([libass],[$LIBASS_LIBS])
2878 VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
2879 VLC_ADD_PLUGIN([libass])
2881 AC_CHECK_HEADERS(fontconfig/fontconfig.h,
2882 [VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
2883 VLC_ADD_LIBS([libass],[-lfontconfig])
2886 AC_MSG_WARN([${LIBASS_PKG_ERRORS}.])
2891 dnl kate decoder plugin
2893 PKG_ENABLE_MODULES_VLC([KATE], [], [kate >= 0.3.0], [kate codec], [auto])
2896 dnl tiger rendering for kate decoder plugin
2898 AC_ARG_ENABLE(tiger,
2899 [ --enable-tiger Tiger rendering library for Kate streams (default auto)])
2900 AS_IF([test "${enable_tiger}" != "no"], [
2901 PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
2902 AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])
2903 VLC_ADD_CFLAGS([kate],[$TIGER_CFLAGS])
2904 VLC_ADD_LIBS([kate],[$TIGER_LIBS]) ],[
2905 AS_IF([test -n "${enable_tiger}"], [
2906 AC_MSG_ERROR([${TIGER_PKG_ERRORS}.])
2916 EXTEND_HELP_STRING([Video plugins:])
2921 PKG_CHECK_MODULES([GL], [gl], [
2924 AC_CHECK_HEADER([GL/gl.h], [
2933 dnl OpenGL ES 2: depends on EGL 1.1
2934 PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
2935 dnl OpenGL ES 1: depends on EGL 1.0
2936 PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [disabled])
2939 [ --enable-egl OpenGL support through EGL (default disabled)],, [
2942 AS_IF([test "$enable_egl" != "no"], [
2943 PKG_CHECK_MODULES([EGL], [egl], [
2944 VLC_ADD_PLUGIN([gl])
2945 VLC_ADD_PLUGIN([egl])
2954 AC_CHECK_HEADERS(X11/Xlib.h)
2957 dnl X C Bindings modules
2960 [ --enable-xcb X11 support with XCB (default enabled)],, [
2961 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" -a "${SYS}" != "symbian"], [
2967 AC_ARG_ENABLE(xvideo,
2968 [ --enable-xvideo XVideo support (default enabled)],, [
2969 enable_xvideo="$enable_xcb"
2972 [ --enable-glx OpenGL support through GLX (default enabled)],, [
2973 enable_glx="$enable_xcb"
2977 AS_IF([test "${enable_xcb}" != "no"], [
2979 PKG_CHECK_MODULES(XCB, [xcb >= 1.6])
2981 PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
2982 PKG_CHECK_MODULES(XCB_COMPOSITE, [xcb-composite])
2984 AS_IF([test "${enable_xvideo}" != "no"], [
2985 PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
2986 VLC_ADD_PLUGIN([xcb_xv])
2990 PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [
2991 VLC_ADD_PLUGIN([panoramix])
2992 VLC_ADD_LIBS([panoramix],[${XCB_RANDR_LIBS} ${XCB_LIBS}])
2993 VLC_ADD_CFLAGS([panoramix],[${XCB_RANDR_CFLAGS} ${XCB_CFLAGS}])
2995 AC_MSG_WARN([${XCB_RANDR_PKG_ERRORS}. Panoramix filter will not be supported.])
2998 PKG_CHECK_MODULES(XPROTO, [xproto], [
2999 VLC_ADD_PLUGIN([xwd])
3002 PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [
3003 VLC_ADD_PLUGIN([globalhotkeys])
3004 VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
3006 AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.])
3009 AC_MSG_WARN([${XPROTO_PKG_ERRORS}. Hotkeys and XWD will not work.])
3012 AS_IF([test "${enable_glx}" != "no"], [
3013 AS_IF([test "${have_gl}" != "yes"], [
3014 AC_MSG_ERROR([${GL_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
3016 VLC_ADD_PLUGIN([xcb_glx])
3017 VLC_ADD_PLUGIN([glx])
3018 VLC_ADD_PLUGIN([gl])
3021 AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
3025 dnl VDPAU needs X11 and avcodec
3027 AC_ARG_ENABLE(vdpau,
3028 [AS_HELP_STRING([--enable-vdpau],
3029 [VDPAU hardware decoder support (default auto)])])
3031 AS_IF([test "${enable_vdpau}" != "no" -a "${have_avcodec}" = "yes"], [
3032 PKG_CHECK_MODULES([VDPAU], [vdpau], [
3034 AS_IF([test "${no_x}" = "yes"], [
3035 AC_MSG_ERROR([VDPAU requires Xlib (X11).])
3037 AC_MSG_NOTICE([VDPAU acceleration activated])
3039 AS_IF([test -n "${enable_vdpau}"], [
3040 AC_MSG_ERROR([${VDPAU_PKG_ERRORS}.])
3044 dnl AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"])
3046 have_avcodec_vdpau="no"
3047 AS_IF([test "${have_vdpau}" = "yes"], [
3048 PKG_CHECK_EXISTS([libavutil >= 0.52.4 libavcodec >= 54.36.0], [
3049 have_avcodec_vdpau="yes"
3051 AS_IF([test -n "${enable_vdpau}"], [
3052 AC_MSG_ERROR([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.])
3054 AC_MSG_WARN([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.])
3058 AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" = "yes"])
3065 [ --enable-sdl SDL support (default enabled)])
3066 AC_ARG_ENABLE(sdl-image,
3067 [ --enable-sdl-image SDL image support (default enabled)])
3068 if test "${enable_sdl}" != "no"
3070 PKG_CHECK_MODULES(SDL, [sdl >= 1.2.10], [
3071 # SDL on Darwin is heavily patched and can only run SDL_image
3072 if test "${SYS}" != "darwin"; then
3073 VLC_ADD_PLUGIN([vout_sdl])
3075 if test "${SYS}" != "mingw32" -a "${SYS}" != "os2"; then
3076 VLC_ADD_LIBS([vout_sdl],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3078 VLC_ADD_CFLAGS([vout_sdl],[${SDL_CFLAGS}])
3079 VLC_ADD_LIBS([vout_sdl],[${SDL_LIBS}])
3082 AS_IF([ test "${enable_sdl_image}" != "no"],[
3083 PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
3084 VLC_ADD_PLUGIN([sdl_image])
3085 VLC_ADD_LIBS([sdl_image],[${SDL_IMAGE_LIBS}])
3086 VLC_ADD_CFLAGS([sdl_image], [${SDL_IMAGE_CFLAGS}])],
3087 [ AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
3091 AC_MSG_WARN([${SDL_PKG_ERRORS}.])
3098 AC_ARG_ENABLE(macosx-vout,
3099 [ --enable-macosx-vout Mac OS X video output module (default enabled on Mac OS X)])
3100 if test "x${enable_macosx_vout}" != "xno" &&
3101 (test "${SYS}" = "darwin" || test "${enable_macosx_vout}" = "yes")
3103 VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,Cocoa])
3104 VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,OpenGL])
3105 VLC_ADD_PLUGIN([vout_macosx])
3112 AC_ARG_ENABLE(freetype,
3113 [ --enable-freetype freetype support (default auto)])
3114 AC_ARG_ENABLE(fribidi,
3115 [ --enable-fribidi fribidi support (default auto)])
3116 AC_ARG_ENABLE(fontconfig,
3117 [ --enable-fontconfig fontconfig support (default auto)])
3119 AC_ARG_WITH([default-font],
3120 AS_HELP_STRING([--with-default-font=PATH],
3121 [Path to the default font]),
3122 [AC_DEFINE_UNQUOTED([DEFAULT_FONT_FILE],
3123 "$withval", [Default font])])
3124 AC_ARG_WITH([default-monospace-font],
3125 AS_HELP_STRING([--with-default-monospace-font=PATH],
3126 [Path to the default font]),
3127 [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FONT_FILE],
3128 "$withval", [Default monospace font])])
3130 AC_ARG_WITH([default-font-family],
3131 AS_HELP_STRING([--with-default-font-family=NAME],
3132 [Path to the default font family]),
3133 [AC_DEFINE_UNQUOTED([DEFAULT_FAMILY],
3134 "$withval", [Default font family])])
3135 AC_ARG_WITH([default-monospace-font-family],
3136 AS_HELP_STRING([--with-default-monospace-font-family=NAME],
3137 [Path to the default font family]),
3138 [AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FAMILY],
3139 "$withval", [Default monospace font family])])
3141 if test "${enable_freetype}" != "no"; then
3142 PKG_CHECK_MODULES(FREETYPE, freetype2, [
3144 VLC_ADD_PLUGIN([freetype])
3145 VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
3146 if test "${SYS}" = "mingw32"; then
3147 VLC_ADD_LIBS([freetype],[-liconv -lz])
3149 VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
3151 AC_CHECK_HEADERS(Carbon/Carbon.h,
3152 [VLC_ADD_LIBS([freetype],[-Wl,-framework,Carbon])])
3154 dnl fontconfig support
3155 if test "${SYS}" != "mingw32"; then
3156 if test "${enable_fontconfig}" != "no"; then
3157 AC_CHECK_HEADERS(fontconfig/fontconfig.h, [
3158 VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
3159 VLC_ADD_LIBS([freetype],[-lfontconfig])
3160 ],[AC_MSG_WARN([library fontconfig not found. Styles will be disabled in freetype])])
3163 VLC_ADD_LIBS([freetype],[-lgdi32])
3167 if test "${enable_fribidi}" != "no"; then
3168 PKG_CHECK_MODULES(FRIBIDI, fribidi, [
3169 VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
3170 VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
3171 ],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional support will be disabled in FreeType.])])
3176 AS_IF([test -n "${enable_freetype}"],[
3177 AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
3184 dnl QuartzText vout module (iOS/Mac OS)
3186 AC_ARG_ENABLE(macosx-quartztext,
3187 [ --enable-macosx-quartztext Mac OS X quartz text module (default enabled on Mac OS X)])
3188 if test "x${enable_macosx_quartztext}" != "xno" &&
3189 (test "${SYS}" = "darwin" || test "${enable_macosx_quartztext}" = "yes")
3191 VLC_ADD_PLUGIN([quartztext])
3192 VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices])
3198 PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
3201 dnl android surface module
3203 AC_ARG_ENABLE(android-surface,
3204 [ --enable-android-surface Android Surface video output module (default disabled)])
3205 if test "${enable_android_surface}" = "yes"; then
3206 if test "${HAVE_ANDROID}" = "1"; then
3207 VLC_ADD_PLUGIN([android_surface])
3208 VLC_ADD_LDFLAGS([android_surface], [-ldl])
3216 AC_ARG_ENABLE(ios-vout,
3217 [ --enable-ios-vout iOS video output module (default disabled)])
3218 if test "${enable_ios_vout}" = "yes"
3220 VLC_ADD_PLUGIN([vout_ios])
3221 VLC_ADD_LIBS([vout_ios], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit,-framework,Foundation])
3225 dnl iOS ES2 vout module
3227 AC_ARG_ENABLE(ios-vout2,
3228 [ --enable-ios-vout2 iOS video output module (default disabled)])
3229 if test "${enable_ios_vout2}" = "yes"
3231 VLC_ADD_PLUGIN([vout_ios2])
3232 VLC_ADD_LIBS([vout_ios2], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit])
3237 dnl Windows DirectX module
3240 if test "${SYS}" = "mingw32"
3242 VLC_ADD_PLUGIN([panoramix])
3245 AC_ARG_ENABLE(directx,
3246 [AS_HELP_STRING([--enable-directx],
3247 [Microsoft DirectX support (default enabled on Windows)])],, [
3248 AS_IF([test "${SYS}" = "mingw32"], [
3249 enable_directx="yes"
3255 AS_IF([test "${enable_directx}" != "no"], [
3257 AC_CHECK_HEADERS(ddraw.h, [
3260 AC_MSG_ERROR([Cannot find DirectX headers!])
3264 AC_CHECK_HEADERS(GL/wglew.h, [
3265 VLC_ADD_PLUGIN([glwin32])
3267 #include <windows.h>
3272 AC_CHECK_HEADERS(d3d9.h, [
3273 VLC_ADD_PLUGIN([direct3d])
3277 AC_CHECK_HEADERS(d2d1.h, [
3278 VLC_ADD_PLUGIN([direct2d])
3281 AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"])
3284 dnl Linux framebuffer module
3286 AC_CHECK_HEADER([linux/fb.h], [
3287 VLC_ADD_PLUGIN([fb])
3293 dnl try to find using: 1 - given location; 2 - directfb-config; 3 - pkg-config
3294 dnl TODO: support for static linking
3296 AC_ARG_ENABLE(directfb,
3297 [ --enable-directfb DirectFB support (default disabled)])
3298 AC_ARG_WITH(directfb,
3299 [ --with-directfb=PATH path to DirectFB headers and libraries])
3301 if test "${enable_directfb}" = "yes"; then
3302 have_directfb="false"
3303 CPPFLAGS_mydirectfb=
3305 if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
3306 dnl Trying the given location
3309 CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
3310 LIBS_new="-L${with_directfb}/lib/fusion/.libs/ -L${with_directfb}/lib/direct/.libs/ -L${with_directfb}/src/.libs/"
3312 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
3313 LIBS="${LIBS} ${LIBS_new}"
3315 dnl FIXME: too obscure
3316 AC_CHECK_HEADER([directfb.h], [
3317 AC_CHECK_LIB([direct],[direct_initialize], [
3318 AC_CHECK_LIB([fusion], [fusion_enter], [
3319 AC_CHECK_LIB([directfb], [DirectFBInit], have_directfb="true", have_directfb="false")
3320 ], have_directfb="false")
3321 ], have_directfb="false")
3322 ], have_directfb="false")
3326 if test "${have_directfb}" = "true"; then
3327 LIBS_mydirectfb="${LIBS_new} -lz $LIBDL -ldirectfb -lfusion -ldirect -lpthread"
3328 CPPFLAGS_mydirectfb="${CPPFLAGS_new}"
3331 dnl Look for directfb-config
3332 AC_PATH_PROG(DIRECTFB_CONFIG, directfb-config, no, ${PATH})
3333 if test "${DIRECTFB_CONFIG}" != "no"; then
3334 CPPFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --cflags`"
3335 LIBS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
3336 have_directfb="true"
3338 dnl Trying with pkg-config
3339 PKG_CHECK_MODULES(DIRECTFB, directfb, [
3340 CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
3341 LIBS_mydirectfb="${DIRECTFB_LIBS}"
3342 have_directfb="true"
3343 ], [have_directfb="false"])
3346 if test "${have_directfb}" = "true"; then
3347 VLC_ADD_PLUGIN([directfb])
3348 VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
3349 VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}])
3351 AC_MSG_ERROR([${DIRECTFB_PKG_ERRORS}.])
3359 [ --enable-aa aalib output (default disabled)])
3360 if test "${enable_aa}" = "yes"
3362 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
3363 if test "${have_aa}" = "true"
3365 VLC_ADD_PLUGIN([aa])
3366 VLC_ADD_LIBS([aa],[-laa])
3367 if test "${SYS}" != "mingw32"; then
3368 VLC_ADD_LIBS([aa],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3376 PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3382 [AS_HELP_STRING([--enable-kva],
3383 [support the K Video Accelerator KVA (default enabled on OS/2)])],, [
3384 AS_IF([test "$SYS" = "os2"], [
3390 AS_IF([test "$enable_kva" != "no"], [
3391 AC_CHECK_HEADERS([kva.h], [
3393 AC_CHECK_LIB(kva, main, [
3399 AM_CONDITIONAL([HAVE_KVA], [test "${have_kva}" = "yes"])
3405 EXTEND_HELP_STRING([Audio plugins:])
3408 dnl Pulseaudio module
3410 AC_ARG_ENABLE(pulse,
3411 [AS_HELP_STRING([--enable-pulse],
3412 [use the PulseAudio client library (default auto)])])
3414 AS_IF([test "${enable_pulse}" != "no"], [
3415 PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.22], [
3418 PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.16], [
3419 AS_IF([test "${no_x}" != "yes"], [
3421 PULSE_LIBS="$PULSE_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11"
3423 AS_IF([test "${enable_pulse}" = "yes"], [
3424 AC_MSG_ERROR([Xlib is required with PulseAudio pre-0.9.22 versions
3425 (see http://www.pulseaudio.org/ticket/799 for further reference).])
3429 AS_IF([test "x${enable_pulse}" != "x"], [
3430 AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 0.9.22 or later required.])
3435 AM_CONDITIONAL([HAVE_PULSE], [test "${have_pulse}" = "yes"])
3441 [AS_HELP_STRING([--enable-alsa],
3442 [support the Advanced Linux Sound Architecture (default auto)])],, [
3443 AS_IF([test "$SYS" = "linux" -a "${have_pulse}" = "no"], [
3448 AS_IF([test "${enable_alsa}" != "no"], [
3449 PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.24], [
3452 AS_IF([test "x${enable_alsa}" != "x"], [
3453 AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.24 or later required.])
3457 AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
3460 dnl Open Sound System module
3463 [AS_HELP_STRING([--enable-oss],
3464 [support the Open Sound System OSS (default enabled on FreeBSD/NetBSD/DragonFlyBSD)])],, [
3465 AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "linux" -o "$SYS" = "openbsd"], [
3471 AS_IF([test "$enable_oss" != "no"], [
3472 AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
3474 AC_CHECK_LIB(ossaudio, main, [
3475 OSS_LIBS="-lossaudio"
3480 AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
3483 dnl OpenBSD sndio module
3485 AC_ARG_ENABLE([sndio],
3486 [AS_HELP_STRING([--disable-sndio],
3487 [support the OpenBSD sndio (default auto)])],, [
3488 AS_IF([test "$SYS" = "openbsd"], [
3493 AS_IF([test "$enable_sndio" != "no"], [
3494 AC_CHECK_HEADER([sndio.h], [
3498 AM_CONDITIONAL([HAVE_SNDIO], [test "${have_sndio}" = "yes"])
3501 dnl Windows Audio Session plugin
3503 AC_ARG_ENABLE([wasapi],
3504 [AS_HELP_STRING([--enable-wasapi],
3505 [use the Windows Audio Session API (default auto)])
3508 AS_IF([test "$enable_wasapi" != "no"], [
3509 AC_CHECK_HEADER([audioclient.h], [
3512 AS_IF([test "x${enable_wasapi}" != "x"], [
3513 AC_MSG_ERROR([Windows Audio Session API not found.])
3517 AM_CONDITIONAL([HAVE_WASAPI], [test "${have_wasapi}" = "yes"])
3520 dnl win32 waveOut plugin
3522 AC_ARG_ENABLE(waveout,
3523 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
3524 if test "${enable_waveout}" != "no"; then
3525 if test "${SYS}" = "mingw32"; then
3526 VLC_ADD_PLUGIN([waveout])
3527 VLC_ADD_LIBS([waveout],[-lwinmm])
3532 dnl CoreAudio plugin
3534 AC_ARG_ENABLE(macosx-audio,
3535 [ --enable-macosx-audio Mac OS X audio module (default enabled on MacOS X)])
3536 if test "x${enable_macosx_audio}" != "xno" &&
3537 (test "${SYS}" = "darwin" || test "${enable_macosx_audio}" = "yes")
3539 AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
3540 [ VLC_ADD_PLUGIN([auhal])
3541 VLC_ADD_LIBS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,CoreServices])
3542 ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
3546 dnl iOS CoreAudio plugin
3548 AC_ARG_ENABLE(ios-audio,
3549 [ --enable-ios-audio Audio module for iOS (default disabled)])
3550 if test "${enable_ios_audio}" = "yes"
3552 AC_CHECK_HEADERS(AudioUnit/AudioUnit.h,
3553 [ VLC_ADD_PLUGIN([audiounit_ios])
3554 VLC_ADD_LIBS([audiounit_ios],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,CoreServices])
3555 ], [ AC_MSG_ERROR([cannot find AudioUnit headers]) ])
3559 dnl AudioQueue plugin
3561 AC_ARG_ENABLE(audioqueue,
3562 [ --enable-audioqueue AudioQueue audio module (default disabled)])
3563 if test "${enable_audioqueue}" = "yes"
3565 VLC_ADD_PLUGIN([audioqueue])
3566 VLC_ADD_LIBS([audioqueue], [-Wl,-framework,AudioToolbox,-framework,CoreFoundation])
3573 [AS_HELP_STRING([--disable-jack],
3574 [do not use jack (default auto)])])
3575 if test "${enable_jack}" != "no" ; then
3576 PKG_CHECK_MODULES(JACK, jack >= 1.9.7,
3579 AC_MSG_WARN([${JACK_PKG_ERRORS}, trying jack1 instead])
3581 PKG_CHECK_MODULES(JACK, jack >= 0.120.1 jack < 1.0,
3584 AS_IF([test -n "${enable_jack}"],
3585 [AC_MSG_ERROR([${JACK_PKG_ERRORS}.])],
3586 [AC_MSG_WARN([${JACK_PKG_ERRORS}.])])
3589 if test "x${have_jack}" = "xyes" ; then
3590 VLC_ADD_PLUGIN([jack access_jack])
3591 VLC_ADD_LIBS([jack access_jack],[$JACK_LIBS])
3592 VLC_ADD_CFLAGS([jack access_jack],[$JACK_CFLAGS])
3597 dnl OpenSLES Android
3599 AC_ARG_ENABLE(opensles,
3600 [ --enable-opensles Android OpenSL ES audio module (default disabled)])
3601 if test "${HAVE_ANDROID}" = "1"; then
3602 if test "${enable_opensles}" = "yes"; then
3603 AC_CHECK_HEADERS(SLES/OpenSLES.h,
3604 [ VLC_ADD_PLUGIN([opensles_android]) ],
3605 [ AC_MSG_ERROR([cannot find OpenSLES headers])] )
3610 dnl libsamplerate plugin
3612 PKG_ENABLE_MODULES_VLC([SAMPLERATE], [], [samplerate], [Resampler with libsamplerate], [auto])
3618 [AS_HELP_STRING([--enable-kai],
3619 [support the K Audio Interface KAI (default enabled on OS/2)])],, [
3620 AS_IF([test "$SYS" = "os2"], [
3626 AS_IF([test "$enable_kai" != "no"], [
3627 AC_CHECK_HEADERS([kai.h], [
3629 AC_CHECK_LIB(kai, main, [
3635 AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"])
3638 dnl chromaprint audio track fingerprinter
3640 m4_pushdef([libchromaprint_version], 0.6.0)
3641 PKG_WITH_MODULES([CHROMAPRINT],[libchromaprint >= libchromaprint_version],
3642 VLC_ADD_PLUGIN([stream_out_chromaprint fingerprinter])
3643 VLC_ADD_CFLAGS([stream_out_chromaprint],[${CHROMAPRINT_CFLAGS}] [-I./webservices -I../stream_out])
3644 VLC_ADD_LIBS([stream_out_chromaprint],[${CHROMAPRINT_LIBS}])
3645 VLC_ADD_LIBS([fingerprinter],[-lm]),
3646 AS_IF([test "${enable_chromaprint}" = "yes"],
3647 [AC_MSG_ERROR(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)],
3648 [AC_MSG_WARN(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)]
3650 [(Chromaprint based audio fingerprinter)],[auto])
3651 m4_popdef([libchromaprint_version])
3654 dnl Interface plugins
3657 EXTEND_HELP_STRING([Interface plugins:])
3663 AS_HELP_STRING([--disable-qt], [Qt UI support (default enabled)])],, [
3664 AS_IF([test "${SYS}" = "darwin"], [
3668 AS_IF([test "${enable_qt}" != "no"], [
3669 PKG_CHECK_MODULES([QT], [QtCore >= 5 QtWidgets QtGui],, [
3670 PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
3671 AS_IF([test -n "${enable_qt}"],[
3672 AC_MSG_ERROR([${QT_PKG_ERRORS}.])
3674 AC_MSG_WARN([${QT_PKG_ERRORS}.])
3680 AS_IF([test "${enable_qt}" != "no"], [
3681 VLC_ADD_PLUGIN([qt4])
3682 VLC_ADD_LIBS([qt4],[${QT_LIBS}])
3683 VLC_ADD_CXXFLAGS([qt4],[${QT_CFLAGS}])
3684 ALIASES="${ALIASES} qvlc"
3689 AC_MSG_CHECKING([whether Qt uses Xlib])
3690 CPPFLAGS="${CPPFLAGS} ${QT_CFLAGS}"
3691 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
3693 #if !defined (Q_WS_X11)
3697 AC_MSG_RESULT([yes])
3698 VLC_ADD_LIBS([qt4],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3699 VLC_ADD_CXXFLAGS([qt4],[${X_CFLAGS}])
3707 AS_IF([test "${SYS}" = "mingw32"], [
3708 VLC_ADD_LIBS([qt4],[-lole32])
3710 AS_IF([test "${SYS}" = "darwin" ],[
3711 VLC_ADD_LIBS([qt4], [-Wl,-framework,Cocoa])
3714 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
3715 AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
3716 AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
3717 AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
3719 AM_CONDITIONAL(ENABLE_QT4, [test "$enable_qt" != "no"])
3722 dnl Simple test for skins2 dependency
3724 AS_IF([test "$enable_qt" = "no"], [
3725 AS_IF([test "${enable_skins2}" = "yes"], [
3726 AC_MSG_ERROR([The skins2 module depends on the Qt4 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 Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
3729 AC_MSG_WARN([The skins2 module depends on the Qt4 interface, Qt4 is not built so skins2 is disabled.])
3736 AC_ARG_ENABLE(skins2,
3737 [AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)])])
3738 AS_IF([test "${enable_skins2}" != "no"], [
3739 have_skins_deps="yes"
3742 AS_IF([test "${SYS}" = "mingw32"], [
3743 VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -DWIN32_SKINS])
3744 VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
3746 ], [test "${SYS}" = "darwin"], [
3747 VLC_ADD_CPPFLAGS([skins2],[ -DMACOSX_SKINS])
3748 VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon])
3751 PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
3752 PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
3753 PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
3754 VLC_ADD_CPPFLAGS([skins2],[${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
3755 VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
3759 VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
3761 dnl we need freetype
3762 AS_IF([test "${have_freetype}" != "yes"], [
3763 have_skins_deps="no"
3766 AS_IF([test "${have_skins_deps}" = "no"], [
3767 AS_IF([test "x${enable_skins2}" = "x"], [
3768 AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
3770 AC_MSG_ERROR([Skins2 interface requires FreeType, libxpm, libxext and libxinerama])
3774 VLC_ADD_PLUGIN([skins2])
3775 ALIASES="${ALIASES} svlc"
3779 AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
3781 AC_ARG_ENABLE(libtar,
3782 [ --enable-libtar libtar support for skins2 (default auto)])
3783 AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
3784 AC_CHECK_HEADERS(libtar.h, [
3785 VLC_ADD_LIBS([skins2],[-ltar])
3790 dnl MacOS X gui module
3792 AC_ARG_ENABLE(macosx,
3793 [ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)])
3794 if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
3796 VLC_ADD_LIBS([macosx], [-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,CoreServices])
3797 VLC_ADD_OBJCFLAGS([macosx], [-fobjc-exceptions] )
3798 VLC_ADD_PLUGIN([macosx])
3800 VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit -Wl,-framework,CoreAudio -Wl,-framework,SystemConfiguration -Wl,-framework,ScriptingBridge])
3802 if test ! -d ${CONTRIB_DIR}/Sparkle.framework
3804 AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}])
3806 VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,Sparkle])
3807 VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}])
3809 if test ! -d ${CONTRIB_DIR}/BGHUDAppKit.framework
3811 AC_MSG_ERROR([BGHUDAppKit framework is required and was not found in ${CONTRIB_DIR}])
3813 VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,BGHUDAppKit])
3814 VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}])
3816 AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "no"])
3819 dnl Minimal Mac OS X module
3821 AC_ARG_ENABLE(minimal-macosx,
3822 [ --enable-minimal-macosx Minimal Mac OS X support (default disabled)])
3823 if test "${enable_minimal_macosx}" = "yes" -a "${SYS}" = "darwin"
3825 VLC_ADD_LIBS([minimal_macosx], [-Wl,-framework,Cocoa])
3826 VLC_ADD_OBJCFLAGS([minimal_macosx], [-fobjc-exceptions] )
3827 VLC_ADD_PLUGIN([minimal_macosx])
3829 AM_CONDITIONAL(ENABLE_MINIMAL_MACOSX, [test "$enable_minimal_macosx" != "no"])
3832 dnl MacOS X dialog provider
3834 AC_ARG_ENABLE(macosx-dialog-provider,
3835 [ --enable-macosx-dialog-provider Mac OS X dialog module (default enabled on Mac OS X)])
3836 if test "x${enable_macosx_dialog_provider}" != "xno" &&
3837 (test "${SYS}" = "darwin" || test "${enable_macosx_dialog_provider}" = "yes")
3839 VLC_ADD_LIBS([macosx_dialog_provider],[-Wl,-framework,Cocoa])
3840 VLC_ADD_PLUGIN([macosx_dialog_provider])
3842 AM_CONDITIONAL(ENABLE_MACOSX_DIALOG_PROVIDER, [test "$enable_macosx_dialog_provider" != "no"])
3847 AC_ARG_ENABLE(ncurses,
3848 [AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)])])
3849 AS_IF([test "${enable_ncurses}" != "no"] ,[
3850 PKG_CHECK_MODULES([NCURSES], [ncursesw], [
3851 VLC_ADD_PLUGIN([ncurses])
3852 VLC_ADD_CFLAGS([ncurses],[${NCURSES_CFLAGS}])
3853 VLC_ADD_LIBS([ncurses],[${NCURSES_LIBS}])
3854 ALIASES="${ALIASES} nvlc"
3856 AS_IF([test -n "${enable_ncurses}"], [
3857 AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
3866 [ --enable-lirc lirc support (default disabled)])
3867 if test "${enable_lirc}" = "yes"
3869 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
3870 if test "${have_lirc}" = "true"
3872 VLC_ADD_PLUGIN([lirc])
3873 VLC_ADD_LIBS([lirc],[-llirc_client])
3877 EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
3879 dnl goom visualization plugin
3881 PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [auto])
3884 dnl libprojectM visualization plugin
3886 AC_ARG_ENABLE(projectm,
3887 [ --enable-projectm projectM visualization plugin (default enabled)])
3888 AS_IF([test "${enable_projectm}" != "no"],
3890 PKG_CHECK_MODULES(PROJECTM, libprojectM,
3892 VLC_ADD_PLUGIN([projectm])
3893 VLC_ADD_CXXFLAGS([projectm],[$PROJECTM_CFLAGS])
3894 VLC_ADD_LIBS([projectm],[$PROJECTM_LIBS])
3895 PKG_CHECK_MODULES(PROJECTM2, [libprojectM >= 2.0.0],
3896 [ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ],
3897 [ AC_MSG_WARN( [Using libprojectM version 1] )
3900 AC_MSG_WARN([${PROJECTM_PKG_ERRORS}.])
3905 dnl Vovoid VSXu visualization plugin
3908 [ --enable-vsxu Vovoid VSXu visualization plugin (default auto)])
3909 AS_IF([test "${enable_vsxu}" != "no"],
3911 PKG_CHECK_MODULES(VSXU, libvsxu,
3913 VLC_ADD_PLUGIN([vsxu])
3914 VLC_ADD_CXXFLAGS([vsxu],[$VSXU_CFLAGS])
3915 VLC_ADD_LIBS([vsxu],[$VSXU_LIBS])
3917 AC_MSG_WARN([${VSXU_PKG_ERRORS}.])
3922 dnl AtmoLight (homemade Philips Ambilight clone)
3925 AS_HELP_STRING([--disable-atmo],[AtmoLight (homemade Philips Ambilight clone)
3926 (default enabled)]),, [enable_atmo="yes"])
3927 AS_IF([test "${enable_atmo}" != no], [
3928 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "linux"], [
3930 VLC_ADD_PLUGIN([atmo])
3936 EXTEND_HELP_STRING([Service Discovery plugins:])
3938 dnl Bonjour services discovery
3939 PKG_ENABLE_MODULES_VLC([BONJOUR], [], [avahi-client >= 0.6], [Bonjour services discovery], [auto])
3942 dnl libudev services discovery
3943 PKG_ENABLE_MODULES_VLC([UDEV], [], [libudev >= 142], [Linux udev services discovery], [auto])
3946 dnl MTP devices services discovery
3947 PKG_ENABLE_MODULES_VLC([MTP], [mtp access_mtp], [libmtp >= 1.0.0], [MTP devices support], [auto])
3950 dnl UPnP Plugin (Intel SDK)
3952 PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto])
3953 VLC_ADD_CXXFLAGS([upnp],[${UPNP_CFLAGS}])
3955 EXTEND_HELP_STRING([Misc options:])
3960 PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
3966 AC_ARG_ENABLE(libgcrypt,
3967 [ --disable-libgcrypt gcrypt support (default enabled)])
3968 AS_IF([test "${enable_libgcrypt}" != "no"], [
3969 AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [
3970 libgcrypt-config --version >/dev/null || \
3971 AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found])
3972 AC_CHECK_LIB(gcrypt, gcry_control, [
3973 have_libgcrypt="yes"
3974 GCRYPT_CFLAGS="`libgcrypt-config --cflags`"
3975 GCRYPT_LIBS="`libgcrypt-config --libs`"
3977 AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
3978 ], [`libgcrypt-config --libs`])
3980 AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
3981 ], [#include <gcrypt.h>]
3985 AC_SUBST(GCRYPT_CFLAGS)
3986 AC_SUBST(GCRYPT_LIBS)
3987 AM_CONDITIONAL([HAVE_GCRYPT], [test "${have_libgcrypt}" = "yes"])
3992 AC_ARG_ENABLE(gnutls,
3993 [ --enable-gnutls GNU TLS TLS/SSL support (default enabled)])
3994 AS_IF([test "${enable_gnutls}" != "no"], [
3995 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.0.20], [
3996 VLC_ADD_PLUGIN([gnutls])
3998 AS_IF([test -n "${enable_gnutls}"], [
3999 AC_MSG_ERROR([${GNUTLS_PKG_ERRORS}.)])
4008 AC_ARG_ENABLE(taglib,
4009 [AS_HELP_STRING([--disable-taglib],
4010 [do not use TagLib (default enabled)])])
4011 AS_IF([test "${enable_taglib}" != "no"], [
4012 PKG_CHECK_MODULES(TAGLIB, taglib >= 1.6.1, [
4013 VLC_ADD_PLUGIN([taglib])
4014 VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz])
4015 VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS])
4017 AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])])
4022 dnl update checking system
4024 AC_ARG_ENABLE(update-check,
4025 [ --enable-update-check update checking system (default disabled)])
4026 if test "${enable_update_check}" = "yes"
4028 if test "${have_libgcrypt}" != "yes"
4030 AC_MSG_ERROR([libgcrypt is required for update checking system])
4032 VLC_ADD_LIBS([libvlccore], [${GCRYPT_LIBS}])
4033 VLC_ADD_CFLAGS([libvlccore], [${GCRYPT_CFLAGS}])
4034 AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
4038 dnl Growl notification plugin
4040 AC_ARG_ENABLE(growl,
4041 [ --enable-growl growl notification plugin (default disabled)],,
4043 AS_IF([test "${enable_growl}" != "no"], [
4044 AC_CHECK_HEADERS(${CONTRIB_DIR}/Growl.framework/Versions/A/Headers/Growl.h, [
4045 VLC_ADD_PLUGIN([growl])
4046 VLC_ADD_LIBS([growl], [-F${CONTRIB_DIR} -Wl,-framework,Growl,-framework,Foundation])
4047 VLC_ADD_OBJCFLAGS([growl], [-F${CONTRIB_DIR}])
4048 VLC_ADD_OBJCFLAGS([growl], [-fobjc-exceptions] )
4054 dnl Libnotify notification plugin
4056 PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-2.0], [libnotify notification], [auto])
4059 dnl Endianness check
4062 AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [
4063 DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1"
4067 AC_SUBST(DEFS_BIGENDIAN)
4070 dnl Where to install KDE solid .desktop
4072 AC_ARG_VAR([KDE4_CONFIG], [kde4-config utility])
4073 AS_IF([test "x$KDE4_CONFIG" = "x"], [
4074 KDE4_CONFIG="kde4-config"
4077 AC_ARG_WITH(kde-solid,
4078 AS_HELP_STRING([--with-kde-solid=PATH],
4079 [KDE Solid actions directory (auto)]),, [
4081 if test "${SYS}" != "mingw32" -a "${SYS}" != "darwin" ; then
4082 with_kde_solid="yes"
4086 AS_IF([test "${with_kde_solid}" != "no"], [
4087 AS_IF([test "${with_kde_solid}" = "yes"], [
4088 kde4datadir="`${KDE4_CONFIG} --install data`"
4089 AS_IF([test "x$kde4datadir" = "x"], [kde4datadir='${datadir}/kde4/apps'])
4090 soliddatadir="${kde4datadir}/solid/actions"
4092 soliddatadir="${with_kde_solid}"
4095 AC_SUBST(soliddatadir)
4096 AM_CONDITIONAL(KDE_SOLID, [test "x${soliddatadir}" != "x"])
4100 AS_IF([test "${SYS}" = "mingw32"], [VLC_ADD_PLUGIN([dmo]) VLC_ADD_LIBS([dmo],[-lole32 -luuid]) ])
4102 EXTEND_HELP_STRING([Components:])
4108 [ --enable-vlc build the VLC media player (default enabled)])
4109 AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"])
4111 AC_ARG_ENABLE(macosx-vlc-app,
4112 [ --enable-macosx-vlc-app build the VLC media player (default enabled on Mac OS X)])
4113 AM_CONDITIONAL(BUILD_MACOSX_VLC_APP, [test "${enable_macosx_vlc_app}" != "no" &&
4114 (test "${SYS}" = "darwin" || test "${enable_macosx_vlc_app}" = "yes") ])
4117 dnl Stuff used by the program
4119 VERSION_MESSAGE="${VERSION} ${CODENAME}"
4120 COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
4121 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION_MESSAGE}", [Simple version string])
4122 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "${COPYRIGHT_MESSAGE}", [Copyright string])
4123 AC_DEFINE_UNQUOTED(COPYRIGHT_YEARS, "${COPYRIGHT_YEARS}", [The copyright years])
4124 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
4125 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,${VERSION_MAJOR}, [version major number])
4126 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,${VERSION_MINOR}, [version minor number])
4127 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_REVISION,${VERSION_REVISION}, [version revision number])
4128 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_EXTRA,${VERSION_EXTRA}, [version extra number])
4129 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_DEV,"${VERSION_DEV}", [version development string])
4130 AC_SUBST(COPYRIGHT_MESSAGE)
4131 AC_SUBST(VERSION_MESSAGE)
4132 AC_SUBST(VERSION_MAJOR)
4133 AC_SUBST(VERSION_MINOR)
4134 AC_SUBST(VERSION_REVISION)
4135 AC_SUBST(VERSION_EXTRA)
4136 AC_SUBST(COPYRIGHT_YEARS)
4137 AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami|sed -e 's/\\\/\\\\\\\/g'`", [user who ran configure])
4138 AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -f 2>/dev/null || hostname`", [host which ran configure])
4139 AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1 | sed -e 's/ *$//'`", [compiler])
4141 dnl Handle substvars that use $(top_srcdir)
4143 CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include ${CPPFLAGS}"
4146 dnl Configuration is finished
4156 AC_SUBST(WINE_SDK_PATH)
4158 AC_SUBST(AM_CPPFLAGS)
4159 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
4160 AC_SUBST(FILE_LIBVLCCORE_DLL)
4161 AC_SUBST(FILE_LIBVLC_DLL)
4175 modules/access/Makefile
4176 modules/access/rtp/Makefile
4177 modules/access_output/Makefile
4178 modules/audio_filter/Makefile
4179 modules/audio_mixer/Makefile
4180 modules/audio_output/Makefile
4181 modules/codec/Makefile
4182 modules/control/Makefile
4183 modules/demux/Makefile
4184 modules/gui/Makefile
4185 modules/gui/macosx/Makefile
4186 modules/gui/minimal_macosx/Makefile
4187 modules/gui/macosx_dialog_provider/Makefile
4188 modules/gui/qt4/Makefile
4189 modules/gui/skins2/Makefile
4190 modules/lua/Makefile
4191 modules/meta_engine/Makefile
4192 modules/misc/Makefile
4193 modules/mux/Makefile
4194 modules/notify/Makefile
4195 modules/packetizer/Makefile
4196 modules/services_discovery/Makefile
4197 modules/stream_filter/Makefile
4198 modules/stream_out/Makefile
4199 modules/text_renderer/Makefile
4200 modules/video_chroma/Makefile
4201 modules/video_filter/Makefile
4202 modules/video_output/Makefile
4203 modules/visualization/Makefile
4204 modules/mmx/Makefile
4205 modules/sse2/Makefile
4206 modules/altivec/Makefile
4207 modules/arm_neon/Makefile
4210 AM_COND_IF([HAVE_WIN32], [
4212 extras/package/win32/NSIS/spad.nsi
4213 extras/package/win32/NSIS/vlc.win32.nsi
4214 extras/package/win32/msi/config.wxi
4218 AM_COND_IF([HAVE_DARWIN], [
4220 extras/package/macosx/Info.plist
4221 extras/package/macosx/Resources/English.lproj/InfoPlist.strings
4225 dnl Generate makefiles
4228 dnl Do we have to use make or gmake ?
4229 if make --version 2>&1|grep -q GNU
4231 # GNU make, all seems good
4234 # Known GNU make alias (on BSD)
4237 dnl Shortcut to nice compile message
4238 if test -n $SHELL; then
4239 SHELL=${CONFIG_SHELL-/bin/sh}
4245 export PATH=\"$PATH\" LANG=C
4246 ($MAKE V=1 \$@ 2>&1 || touch .error\$\$)| `sed -ne \"s/^top_srcdir *= *//p\" < Makefile`/extras/buildsystem/make.pl
4247 test -f .error\$\$ && ERROR=1
4249 exit \$ERROR" >compile
4253 libvlc configuration
4254 --------------------
4255 version : ${VERSION}
4257 architecture : ${ARCH}
4258 optimizations : ${enable_optimizations}"
4259 if test "${enable_vlc}" != "no"; then
4260 echo "vlc aliases :${ALIASES}"
4262 echo "build vlc executable : no"
4265 To build vlc and its plugins, type \`$MAKE', or \`./compile' if you like nice colors."