1 dnl Autoconf settings for vlc
3 AC_COPYRIGHT([Copyright 2002-2011 the VideoLAN team])
5 AC_INIT(vlc, 1.2.0-pre1)
15 CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
17 COPYRIGHT_YEARS="1996-2011"
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)
28 AM_CONFIG_HEADER(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.])
67 _AM_DEPENDENCIES([OBJC])
73 AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
74 AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
76 dnl Check for compiler properties
86 dnl Extend the --help string at the current spot.
87 AC_DEFUN([EXTEND_HELP_STRING], [m4_divert_once([HELP_ENABLE], [$1])])
89 dnl Allow binary package maintainer to pass a custom string to avoid
91 AC_ARG_WITH(binary-version,
92 AS_HELP_STRING([--with-binary-version=STRING],
93 [To avoid plugins cache problem between binary version]),[],[])
94 AS_IF([test -n "${with_binary_version}"],[
95 AC_DEFINE_UNQUOTED([DISTRO_VERSION],["${with_binary_version}"],
96 [Binary specific version])
100 dnl Check the operating system
112 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
113 VLC_ADD_LIBS([vcd cdda vcdx],[-ldvd])
117 CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
120 CPPFLAGS_save="${CPPFLAGS_save} -I/usr/local/include"
121 CPPFLAGS="${CPPFLAGS_save}"
122 LDFLAGS_save="${LDFLAGS_save} -L/usr/local/lib"
123 LDFLAGS="${LDFLAGS_save}"
126 CPPFLAGS_save="${CPPFLAGS_save} -I/usr/local/include -I/usr/X11R6/include"
127 CPPFLAGS="${CPPFLAGS_save}"
128 LDFLAGS_save="${LDFLAGS_save} -L/usr/local/lib -L/usr/X11R6/lib/"
129 LDFLAGS="${LDFLAGS_save}"
135 dnl Force gcc "-arch" flag
139 ARCH_flag="-arch i386"
142 ARCH_flag="-arch ppc64"
145 ARCH_flag="-arch ppc"
148 ARCH_flag="-arch x86_64"
153 CFLAGS_save="${CFLAGS_save} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"; CFLAGS="${CFLAGS_save}"
154 CXXFLAGS_save="${CXXFLAGS_save} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"; CXXFLAGS="${CXXFLAGS_save}"
155 CPPFLAGS_save="${CPPFLAGS_save} ${ARCH_flag}"; CPPFLAGS="${CPPFLAGS_save}"
156 OBJCFLAGS_save="${OBJCFLAGS_save} -D_INTL_REDIRECT_MACROS -std=gnu99 ${ARCH_flag}"; OBJCFLAGS="${OBJCFLAGS_save}"
157 LDFLAGS_save="${LDFLAGS_save} -Wl,-headerpad_max_install_names ${ARCH_flag}"; LDFLAGS="${LDFLAGS_save}"
158 VLC_ADD_LIBS([mkv mp4 motion], [-Wl,-framework,IOKit,-framework,CoreFoundation])
159 VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup])
160 VLC_ADD_LIBS([avcodec avformat access_avio swscale postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
161 VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings])
162 VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation])
163 AC_ARG_ENABLE(macosx-defaults,
164 AS_HELP_STRING([--enable-macosx-defaults],[Build the default configuration on Mac OS X (default enabled)]))
165 if test "x${enable_macosx_defaults}" != "xno"
168 echo "Building with Mac OS X defaults:"
170 echo " Assuming --prefix=${build_dir}/vlc_install_dir"
171 ac_default_prefix="${build_dir}/vlc_install_dir"
173 echo " Assuming --enable-faad"
175 echo " Assuming --enable-flac"
177 echo " Assuming --enable-theora"
179 echo " Assuming --enable-shout"
181 echo " Assuming --enable-vcdx"
183 echo " Assuming --enable-caca"
185 echo " Assuming --enable-ncurses"
187 echo " Assuming --enable-twolame"
188 enable_realrtsp="yes"
189 echo " Assuming --enable-realrtsp"
191 echo " Assuming --enable-libass"
194 echo " Assuming --disable-skins2"
196 echo " Assuming --disable-xcb"
199 dnl Check for Mac OS X SDK settings
201 AC_ARG_WITH(macosx-sdk,
202 [AS_HELP_STRING([--with-macosx-sdk=DIR],
203 [compile using the SDK in DIR])])
204 if test "${with_macosx_sdk}" != "" ; then
205 CPP="${CPP} -isysroot ${with_macosx_sdk}"
206 CC="${CC} -isysroot ${with_macosx_sdk}"
207 CXX="${CXX} -isysroot ${with_macosx_sdk}"
208 OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
209 LD="${LD} -syslibroot ${with_macosx_sdk}"
211 echo " No desired SDK version given, falling back to 10.5"
212 CPP="${CPP} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
213 CC="${CC} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
214 CXX="${CXX} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
215 OBJC="${OBJC} -isysroot /Developer/SDKs/MacOSX10.5.sdk"
216 LD="${LD} -syslibroot /Developer/SDKs/MacOSX10.5.sdk"
217 with_macosx_version_min="10.5"
218 echo " Assuming --with-macosx-version-min=10.5"
220 AC_ARG_WITH(macosx-version-min,
221 [AS_HELP_STRING([--with-macosx-version-min=VERSION],
222 [compile for MacOS X VERSION and above])])
223 if test "${with_macosx_version_min}" != "" ; then
224 CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
225 CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
226 CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
227 OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
228 LD="${LD} -macosx_version_min=${with_macosx_version_min}"
229 CFLAGS_save="${CFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"; CFLAGS="${CFLAGS_save}"
230 CXXFLAGS_save="${CXXFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"; CXXFLAGS="${CXXFLAGS_save}"
231 OBJCFLAGS_save="${OBJCFLAGS_save} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"; OBJCFLAGS="${OBJCFLAGS_save}"
232 MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
233 export MACOSX_DEPLOYMENT_TARGET
236 *mingw32* | *cygwin* | *wince* | *mingwce*)
237 AC_CHECK_TOOL(WINDRES, windres, :)
238 AC_CHECK_TOOL(OBJCOPY, objcopy, :)
239 AC_DEFINE([_WIN32_WINNT], 0x0502, [Define to '0x0502' for Windows XP SP2 APIs.])
240 AC_DEFINE([_WIN32_IE], 0x0600, [Define to '0x0600' for IE 6.0 (and shell) APIs.])
243 *wince* | *mingwce* | *mingw32ce*)
245 dnl Sadly CeGCC still needs non-wince macros
251 dnl Check if we are using the mno-cygwin mode in which case we are
252 dnl actually dealing with a mingw32 compiler.
257 SYS=mingw32, AC_MSG_ERROR([VLC requires -mno-cygwin]))
261 if test "${SYS}" = "mingw32"; then
262 VLC_ADD_LIBS([libvlccore],[-lnetapi32 -lwinmm])
263 VLC_ADD_LDFLAGS([vlc],[-mwindows])
264 VLC_ADD_LIBS([win32text],[-lgdi32])
265 VLC_ADD_LIBS([cdda vcdx sdl_image vout_sdl],[-lwinmm])
266 AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
267 ac_default_prefix="`pwd`/_win32"
268 DESTDIR="`pwd`/_win32/"
271 dnl NSIS Installer prefix and WIN64
276 PROGRAMFILES="PROGRAMFILES64"
279 PROGRAMFILES="PROGRAMFILES"
282 AC_SUBST(PROGRAMFILES)
285 if test "${SYS}" = "mingwce"; then
286 VLC_ADD_LIBS([libvlccore],[-lmmtimer])
287 AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
288 ac_default_prefix="`pwd`/_wince"
289 DESTDIR="`pwd`/_wince/"
306 LDFLAGS_save="${LDFLAGS_save} -Zomf -Zbin-files -Zargs-wild"; LDFLAGS="${LDFLAGS_save}"
312 AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
313 AM_CONDITIONAL(HAVE_LINUX, test "${SYS}" = "linux")
314 AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2")
315 AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
316 AM_CONDITIONAL(HAVE_WIN64, test "${HAVE_WIN64}" = "1")
317 AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce")
318 AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian")
321 dnl Check for the contrib directory
324 [AS_HELP_STRING([--with-contrib[=DIR]],
325 [search for 3rd party libraries in DIR/include and DIR/lib])
327 AC_MSG_CHECKING([for 3rd party libraries path])
328 AS_IF([test -z "${with_contrib}" || test "${with_contrib}" = "yes"], [
329 CONTRIB_DIR="${srcdir}/contrib/${host}"
330 AS_IF([test ! -d "${CONTRIB_DIR}"], [
331 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
332 CONTRIB_DIR="${srcdir}/contrib/`$CC -dumpmachine`"
333 AS_IF([test ! -d "${CONTRIB_DIR}"], [
334 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
335 CONTRIB_DIR="${srcdir}/extras/contrib/hosts/${host}"
336 AS_IF([test ! -d "${CONTRIB_DIR}"], [
337 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
338 CONTRIB_DIR="${srcdir}/extras/contrib/hosts/`$CC -dumpmachine`"
339 AS_IF([test ! -d "${CONTRIB_DIR}"], [
340 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
341 AS_IF([test "${SYS}" = "mingw32"], [
342 if test "${HAVE_WIN64}" = "1"
344 CONTRIB_DIR="/usr/win64"
346 CONTRIB_DIR="/usr/win32"
348 AS_IF([test ! -d "${CONTRIB_DIR}"], [
349 echo "${CONTRIB_DIR} not found" >&AS_MESSAGE_LOG_FD
351 AC_MSG_RESULT([not found])
354 AC_MSG_RESULT([not found])
361 AS_IF([test "${with_contrib}" != "no"], [
362 CONTRIB_DIR="${with_contrib}"
365 AC_MSG_RESULT([disabled])
369 AS_IF([test -n "${CONTRIB_DIR}"], [
370 AS_IF([test -d "${CONTRIB_DIR}/lib"],[
371 CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
373 echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
375 AC_MSG_RESULT([not usable])
380 AS_IF([test -n "${CONTRIB_DIR}"], [
381 AC_MSG_RESULT([${CONTRIB_DIR}])
382 export PATH=${CONTRIB_DIR}/bin:$PATH
383 CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
384 CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
385 CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
386 CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include"
387 CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
388 CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
389 OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
390 OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
391 AS_IF([test "$build" = "$host" -o "$PKG_CONFIG_LIBDIR"], [
392 export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
394 export PKG_CONFIG_LIBDIR="${CONTRIB_DIR}/lib/pkgconfig"
396 LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
397 LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
399 AS_IF([test "${SYS}" = "darwin"], [
400 export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
401 export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
404 AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
405 AC_MSG_ERROR([Third party libraries not found!])
408 AC_SUBST(CONTRIB_DIR)
411 dnl Sadly autoconf does not think about testing foo.exe when ask to test
412 dnl for program foo on win32
414 case "${build_os}" in
416 ac_executable_extensions=".exe"
422 dnl Android is linux, but a bit different
423 AS_IF([test "$SYS" = linux],[
424 AC_MSG_CHECKING([for an Android system])
425 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
426 [[#ifndef __ANDROID__
437 AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1")
441 dnl It's very bad, but our former custom system was worst
445 dnl override platform specific check for dependent libraries
446 dnl otherwise libtool linking of shared libraries will
447 dnl fail on anything other than pass_all.
448 AC_CACHE_VAL(lt_cv_deplibs_check_method,
449 [lt_cv_deplibs_check_method=pass_all])
451 LT_INIT([dlopen win32-dll shared disable-static])
453 LT_LANG([Windows Resource])
455 m4_undefine([AC_DEPLIBS_CHECK_METHOD])
456 m4_defun([AC_DEPLIBS_CHECK_METHOD],[])
458 lt_cv_deplibs_check_method=pass_all
460 AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
461 AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
467 AM_GNU_GETTEXT_VERSION([0.18.1])
468 AM_GNU_GETTEXT([external])
475 dnl Check for broken versions of mingw-runtime compatability library
476 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
477 AC_MSG_CHECKING(for broken mingw-runtime)
478 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
480 #if (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 15)
481 #ifndef __MINGW64_VERSION_MAJOR
482 # error Attempting to use mingw-runtime with broken vsnprintf support
488 AC_MSG_RESULT([present])
489 AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher!])
491 dnl force use of mingw provided c99 *printf over msvcrt
492 CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
493 CPPFLAGS_save="${CPPFLAGS_save} -D__USE_MINGW_ANSI_STDIO=1"
496 dnl Check for the need to include the mingwex lib for mingw32
497 if test "${SYS}" = "mingw32" ; then
498 AC_CHECK_LIB(mingwex,opendir,
499 AC_CHECK_LIB(mingw32,opendir,,
500 [VLC_ADD_LIBS([libvlccore],[-lmingwex])])
504 dnl Check for fnative-struct or mms-bitfields support for mingw32
505 if test "${SYS}" = "mingw32" ; then
506 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
507 [ac_cv_c_mms_bitfields],
508 [CFLAGS="${CFLAGS_save} -mms-bitfields"
509 AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
510 if test "${ac_cv_c_mms_bitfields}" != "no"; then
511 CFLAGS_save="${CFLAGS_save} -mms-bitfields";
512 CXXFLAGS_save="${CXXFLAGS_save} -mms-bitfields";
514 AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
515 [ac_cv_c_fnative_struct],
516 [CFLAGS="${CFLAGS_save} -fnative-struct"
517 AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
518 if test "${ac_cv_c_fnative_struct}" != "no"; then
519 CFLAGS_save="${CFLAGS_save} -fnative-struct";
520 CXXFLAGS_save="${CXXFLAGS_save} -fnative-struct";
524 CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
528 dnl Buggy glibc prevention. Purposedly not cached.
529 dnl See sourceware.org bugs 5058 and 5443.
530 dnl Ubuntu alone has 20 bug numbers for this...
532 AC_MSG_CHECKING(for buggy GNU/libc versions)
533 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
535 #if defined (__GLIBC__) && (__GLIBC__ == 2) \
536 && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7)
537 # error GNU/libc with dcgettext killer bug!
540 AC_MSG_RESULT([not present])
542 AC_MSG_RESULT([found])
543 AS_IF([test "x${enable_nls}" != "xno"], [
544 AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable
545 work-around for this. Check with your distribution vendor on how to update the
546 glibc run-time. Alternatively, build with --disable-nls.])
548 AC_DEFINE(DISABLE_BUGGY_GLIBC_CHECK, 1, [Disables runtime check for buggy glibc.])
552 dnl Plugin compilation stuff
556 dnl Check for system libs needed
559 dnl Check for usual libc functions
560 AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
561 AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp uselocale])
562 AC_REPLACE_FUNCS([asprintf atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
563 AC_CHECK_FUNCS(fdatasync,,
564 [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
567 # Windows CE does not have strcoll()
570 dnl Check for non-standard system calls
571 AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity])
573 AH_BOTTOM([#include <vlc_fixups.h>])
576 AC_SEARCH_LIBS(poll, [poll], [
577 AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS has poll().])
579 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "os2"], [
580 AC_MSG_ERROR([poll() is required.])
584 dnl Check for struct pollfd
585 AC_CHECK_TYPES([struct pollfd],,,
586 [#include <sys/types.h>
589 #elif defined (WIN32)
590 # include <winsock2.h>
594 dnl Check for connect
597 AC_SEARCH_LIBS(connect, [socket], [
598 AS_IF([test "$ac_cv_search_connect" != "none required"], [
599 SOCKET_LIBS="$ac_cv_search_connect"
602 AS_IF([test "${SYS}" = "mingw32"], [
603 SOCKET_LIBS="-lws2_32"
605 AS_IF([test "${SYS}" = "mingwce"], [
610 AS_IF([test -n "$SOCKET_LIBS"], [
611 VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout sap stream_out_select stream_out_standard stream_out_rtp stream_out_raop vod_rtsp access_realrtsp rtp oldrc netsync gnutls flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync],[${SOCKET_LIBS}])
613 AC_SUBST(SOCKET_LIBS)
615 dnl Check for socklen_t
616 AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
617 AC_CACHE_CHECK([for socklen_t in sys/socket.h],
618 ac_cv_type_socklen_t,
619 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
620 [#include <sys/types.h>
622 # include <winsock2.h>
623 # include <ws2tcpip.h>
625 # include <sys/socket.h>
626 #endif]], [[socklen_t len; len = 0;]])],
627 ac_cv_type_socklen_t=yes,
628 ac_cv_type_socklen_t=no)])
629 AS_IF([test "$ac_cv_type_socklen_t" = no],
630 [AC_DEFINE(socklen_t, int)])
632 dnl Check for struct sockaddr_storage
633 AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.])
634 AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.])
635 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
637 [#include <sys/types.h>
638 #if defined( UNDER_CE )
639 # include <winsock2.h>
640 #elif defined( WIN32 )
641 # include <winsock2.h>
643 # include <sys/socket.h>
644 #endif], [struct sockaddr_storage addr;],
645 ac_cv_struct_sockaddr_storage=yes,
646 ac_cv_struct_sockaddr_storage=no)])
647 AS_IF([test "${ac_cv_struct_sockaddr_storage}" = no], [
648 AC_DEFINE(sockaddr_storage, sockaddr)
649 AC_DEFINE(ss_family, sa_family)
652 dnl getaddrinfo, getnameinfo and gai_strerror check
653 dnl -lnsl and -lsocket are needed on Solaris;
654 dnl we purposedly make the test fail on Windows
656 AC_SEARCH_LIBS([getaddrinfo], [nsl],,, [${SOCKET_LIBS}])
659 dnl FreeBSD has a gnugetopt library for this:
661 AC_CHECK_FUNC(getopt_long,, [
662 AC_CHECK_LIB([gnugetopt],[getopt_long], [
663 GNUGETOPT_LIBS="-lgnugetopt"
666 AC_SUBST(GNUGETOPT_LIBS)
669 VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mod mpc dmo quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264],[-lm])
676 AC_CHECK_LIB(m,lrintf, [
677 AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])
678 VLC_ADD_LIBS([skins2],[-lm])
681 dnl Check for dynamic plugins
683 have_dynamic_objects="no"
685 AC_SEARCH_LIBS(dlopen, [dl svld], [
686 AS_IF([test "$ac_cv_search_dlopen" != "none required"], [
687 LIBDL="$ac_cv_search_dlopen"
689 have_dynamic_objects="yes"
694 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
696 have_dynamic_objects="yes" #assume we can use shared objects
699 test "${enable_shared}" = "no" && have_dynamic_objects=no
701 AS_IF([test "${have_dynamic_objects}" != "no"], [
702 AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1,
703 [Define to 1 if dynamic plugins are supported.])
705 dnl Clear $LIBDL so as not to break linking
708 AM_CONDITIONAL(HAVE_DYNAMIC_PLUGINS, [test "${have_dynamic_objects}" != "no"])
711 VLC_ADD_LIBS([realvideo lua],[$LIBDL])
713 dnl Check for thread library
714 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
715 dnl Check for pthreads - borrowed from XMMS
717 if test "${THREAD_LIB}" = "error"; then
718 AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
720 if test "${THREAD_LIB}" = "error"; then
721 AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
723 if test "${THREAD_LIB}" = "error"; then
724 AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
726 if test "${THREAD_LIB}" = "error"; then
727 AC_CHECK_FUNCS(pthread_mutex_lock)
731 VLC_ADD_LIBS([libvlccore libvlc vlc plugin],[${THREAD_LIB}])
733 AC_CHECK_LIB(rt, clock_nanosleep, [
734 VLC_ADD_LIBS([libvlccore],[-lrt])
736 AC_CHECK_FUNC(nanosleep,,[
737 AC_CHECK_LIB(rt,nanosleep, [
738 VLC_ADD_LIBS([libvlccore],[-lrt])
740 AC_CHECK_LIB(posix4,nanosleep, [
741 VLC_ADD_LIBS([libvlccore],[-lposix4])
746 AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])])
748 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
750 dnl Check for misc headers
751 AC_MSG_CHECKING(for strncasecmp in strings.h)
752 AC_EGREP_HEADER(strncasecmp,strings.h,[
754 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
755 Define if <strings.h> defines strncasecmp.)],[
758 dnl Check for headers
759 AC_CHECK_HEADERS([search.h])
760 AC_CHECK_HEADERS(getopt.h strings.h locale.h xlocale.h)
761 AC_CHECK_HEADERS(fcntl.h sys/time.h sys/ioctl.h sys/stat.h)
762 AC_CHECK_HEADERS([arpa/inet.h netinet/udplite.h sys/eventfd.h])
763 AC_CHECK_HEADERS([net/if.h], [], [],
765 #include <sys/types.h>
766 #include <sys/socket.h>
768 AC_CHECK_HEADERS([sys/mount.h], [], [],
770 #include <sys/param.h>
773 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
774 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
775 AC_CHECK_HEADERS([linux/version.h linux/dccp.h scsi/scsi.h linux/magic.h])
776 AC_CHECK_HEADERS(syslog.h)
777 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
779 dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
780 AH_TEMPLATE(ssize_t, [Define to `int' if <stddef.h> does not define.])
781 AC_CHECK_TYPE(ssize_t,, [
782 AC_DEFINE(ssize_t, int)
785 dnl Check for threads library
786 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
787 AC_CHECK_HEADERS(pthread.h)
788 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
790 dnl It seems that autoconf detects pkg-config only during the first
791 dnl PKG_CHECK_MODULES from configure.ac - which makes sense. But in our case,
792 dnl it is nested within a conditional block, so it was not working right.
793 dnl Make PKG_CONFIG_PATH precious so that it appears in the help and get saved
794 AC_ARG_VAR(PKG_CONFIG_PATH,
795 [Paths where to find .pc not at the default location])
796 PKG_PROG_PKG_CONFIG()
798 dnl On some OS we need static linking
799 AS_IF([test -n "${PKG_CONFIG}" ],[
800 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[
801 PKG_CONFIG="${PKG_CONFIG} --static"
807 dnl Check for zlib.h and -lz along with system -lminizip if available
809 AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ])
810 AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ])
811 if test "${have_zlib}" = "yes"
813 VLC_ADD_LIBS([access_http mp4 skins2 sap mkv unzip zip],[-lz])
814 PKG_CHECK_MODULES([MINIZIP], [minizip] , [ have_minizip=yes ], [
815 AC_CHECK_HEADERS([unzip.h], [
817 MINIZIP_LIBS="-lminizip -lz"
820 MINIZIP_CFLAGS="-I\\\${top_srcdir}/modules/access/zip/unzip"
821 MINIZIP_LIBS="\\\${top_builddir}/modules/access/zip/unzip/libunzip.la"
824 VLC_ADD_CPPFLAGS([skins2],[$MINIZIP_CFLAGS])
825 VLC_ADD_LIBS([skins2],[$MINIZIP_LIBS])
827 AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
830 dnl Manual switch for UTF-8
831 AC_ARG_ENABLE(non-utf8,
832 [AS_HELP_STRING([--enable-non-utf8],
833 [support legacy non-UTF-8 systems (default disabled)])],, [
834 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "os2"], [
838 AS_IF([test "${enable_non_utf8}" != "no"], [
839 AC_DEFINE([ASSUME_UTF8], [1],
840 [Define to 1 if the operating system uses UTF-8 internally])
846 [AS_HELP_STRING([--enable-dbus],
847 [compile D-Bus message bus support (default enabled)])])
850 if test "${enable_dbus}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
853 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0.0],
854 [ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
855 VLC_ADD_LIBS([libvlccore],[$DBUS_LIBS])
856 VLC_ADD_CFLAGS([libvlccore],[$DBUS_CFLAGS])
857 dnl Check for dbus control interface
858 AC_ARG_ENABLE(dbus-control,
859 [AS_HELP_STRING([--disable-dbus-control],
860 [D-Bus control interface (default enabled)])])
861 if test "${enable_dbus_control}" != "no"
863 VLC_ADD_PLUGIN([dbus])
864 VLC_ADD_LIBS([dbus],[$DBUS_LIBS])
865 VLC_ADD_CFLAGS([dbus],[$DBUS_CFLAGS])
867 dnl Check for Telepathy
868 AC_ARG_ENABLE(telepathy,
869 AS_HELP_STRING([--enable-telepathy],[Telepathy Presence plugin through DBus(default enabled)]))
870 if test "${enable_telepathy}" != "no"; then
871 VLC_ADD_PLUGIN([telepathy])
872 VLC_ADD_LIBS([telepathy],[$DBUS_LIBS])
873 VLC_ADD_CFLAGS([telepathy],[$DBUS_CFLAGS])
875 dnl Power Management Inhibiter
876 VLC_ADD_PLUGIN([inhibit])
877 VLC_ADD_LIBS([inhibit],[$DBUS_LIBS])
878 VLC_ADD_CFLAGS([inhibit],[$DBUS_CFLAGS])
880 [AC_MSG_ERROR([${DBUS_PKG_ERRORS}.])]
886 dnl Check for ntohl, etc.
887 AC_CACHE_CHECK([for ntohl in sys/param.h],
888 [ac_cv_c_ntohl_sys_param_h],
889 [CFLAGS="${CFLAGS_save} -Wall -Werror"
890 AC_TRY_COMPILE([#include <sys/param.h>],
891 [int meuh; ntohl(meuh);],
892 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
893 if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then
894 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
897 EXTEND_HELP_STRING([Optimization options:])
900 dnl Compiler warnings
903 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])
904 RDC_PROG_CC_FLAGS([-pipe])
906 RDC_PROG_CXX_WFLAGS([all extra sign-compare undef pointer-arith volatile-register-var])
913 [AS_HELP_STRING([--enable-debug],
914 [build with run-time assertions (default disabled)])],,
917 [Define to 1 if debug code should NOT be compiled])
918 AS_IF([test "${enable_debug}" != "no"], [
919 AC_CHECK_HEADERS([valgrind/valgrind.h])
928 [AS_HELP_STRING([--enable-gprof],[profile with gprof (default disabled)])],,
930 AS_IF([test "${enable_gprof}" != "no"], [
931 CFLAGS="${CFLAGS} -pg"
932 CXXFLAGS="${CXXFLAGS} -pg"
933 OBJCFLAGS="${OBJCFLAGS} -pg"
934 LDFLAGS="${LDFLAGS} -pg"
938 [AS_HELP_STRING([--enable-cprof],[profile with cprof (default disabled)])],,
940 AS_IF([test "${enable_gprof}" != "no"], [
941 CFLAGS="${CFLAGS} -finstrument-functions"
942 CXXFLAGS="${CXXFLAGS} -finstrument-functions"
943 OBJCFLAGS="${OBJCFLAGS} -finstrument-functions"
944 LDFLAGS="${LDFLAGS} -finstrument-functions"
950 AC_ARG_ENABLE(coverage,
951 [AS_HELP_STRING([--enable-coverage],
952 [build for test coverage (default disabled)])],,
953 [enable_coverage="no"])
954 AS_IF([test "${enable_coverage}" != "no"], [
955 CFLAGS="-fprofile-arcs -ftest-coverage ${CFLAGS}"
956 CXXFLAGS="-fprofile-arcs -ftest-coverage ${CXXFLAGS}"
957 LDFLAGS="-lgcov ${LDFLAGS}"
962 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
963 AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden],
964 [ac_cv_c_visibility_hidden], [
965 CFLAGS="${CFLAGS_save} -fvisibility=hidden"
966 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
967 ac_cv_c_visibility_hidden=yes
969 ac_cv_c_visibility_hidden=no
972 AS_IF([test "${ac_cv_c_visibility_hidden}" != "no"], [
974 CFLAGS="${CFLAGS} -fvisibility=hidden"
975 CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
976 OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden"
983 dnl Enable/disable optimizations
985 AC_ARG_ENABLE(optimizations,
986 [AS_HELP_STRING([--disable-optimizations],
987 [disable compiler optimizations (default enabled)])],,
988 [enable_optimizations="yes"])
990 dnl Check for various optimization flags
991 AS_IF([test "${enable_optimizations}" != "no"], [
994 dnl -O4 and -O3 only in production builds
995 AS_IF([test "{enable_debug}" = "no"], [
996 AC_CACHE_CHECK([if $CC accepts -O4], [ac_cv_c_o4], [
997 CFLAGS="${CFLAGS_save} -O4"
998 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1004 AS_IF([test "${ac_cv_c_o4}" != "no"], [
1007 AC_CACHE_CHECK([if $CC accepts -O3], [ac_cv_c_o3], [
1008 CFLAGS="${CFLAGS_save} -O3"
1009 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1015 AS_IF([test "${ac_cv_c_o3}" != "no"], [
1022 CFLAGS="${CFLAGS} ${C_O}"
1023 CXXFLAGS="${CXXFLAGS} ${C_O}"
1024 OBJCFLAGS="${OBJCFLAGS} ${C_O}"
1027 dnl Check for -ffast-math
1028 AC_CACHE_CHECK([if $CC accepts -ffast-math], [ac_cv_c_fast_math], [
1029 CFLAGS="${CFLAGS_save} -ffast-math"
1030 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1031 ac_cv_c_fast_math=yes
1033 ac_cv_c_fast_math=no
1036 AS_IF([test "${ac_cv_c_fast_math}" != "no"], [
1038 CFLAGS="${CFLAGS} -ffast-math"
1039 CXXFLAGS="${CXXFLAGS} -ffast-math"
1040 OBJCFLAGS="${OBJCFLAGS} -ffast-math"
1044 dnl Check for -funroll-loops
1045 AC_CACHE_CHECK([if $CC accepts -funroll-loops], [ac_cv_c_unroll_loops], [
1046 CFLAGS="${CFLAGS_save} -funroll-loops"
1047 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1048 ac_cv_c_unroll_loops=yes
1050 ac_cv_c_unroll_loops=no
1053 AS_IF([test "${ac_cv_c_unroll_loops}" != "no"], [
1055 CFLAGS="${CFLAGS} -funroll-loops"
1056 CXXFLAGS="${CXXFLAGS} -funroll-loops"
1057 OBJCFLAGS="${OBJCFLAGS} -funroll-loops"
1061 AS_IF([test "$enable_debug" = "no"], [
1062 dnl Check for -fomit-frame-pointer
1063 AC_CACHE_CHECK([if $CC accepts -fomit-frame-pointer],
1064 [ac_cv_c_omit_frame_pointer], [
1065 CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
1066 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1067 ac_cv_c_omit_frame_pointer=yes
1069 ac_cv_c_omit_frame_pointer=no
1072 AS_IF([test "${ac_cv_c_omit_frame_pointer}" != "no"], [
1074 CFLAGS="${CFLAGS} -fomit-frame-pointer"
1075 CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer"
1076 OBJCFLAGS="${OBJCFLAGS} -fomit-frame-pointer"
1082 dnl Check for Darwin plugin linking flags
1083 AS_IF([test "${SYS}" = "darwin"], [
1084 AC_CACHE_CHECK([if $CC accepts -bundle -undefined error],
1085 [ac_cv_ld_darwin], [
1086 CFLAGS="${CFLAGS_save} -bundle -undefined error"
1087 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1093 AS_IF([test "${ac_cv_ld_darwin}" != "no"], [
1094 VLC_ADD_LDFLAGS([plugin],[-bundle -undefined error])
1098 dnl Checks for __attribute__(aligned()) directive
1099 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
1100 [ac_cv_c_attribute_aligned],
1101 [ac_cv_c_attribute_aligned=0
1102 CFLAGS="${CFLAGS_save} -Werror"
1103 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
1105 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
1106 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
1108 CFLAGS="${CFLAGS_save}"])
1109 if test "${ac_cv_c_attribute_aligned}" != "0"; then
1110 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
1111 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
1114 dnl Check for __attribute__((packed))
1115 AC_CACHE_CHECK([for __attribute__((packed))],
1116 [ac_cv_c_attribute_packed],
1117 [ac_cv_c_attribute_packed=no
1118 AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b; (void)b;],
1119 [ac_cv_c_attribute_packed=yes])])
1120 if test "${ac_cv_c_attribute_packed}" != "no"; then
1121 AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
1127 case "${host_cpu}" in
1136 dnl Check for backtrace() support
1137 AC_CHECK_HEADERS(execinfo.h)
1138 AC_CHECK_FUNCS(backtrace)
1143 ALIASES="${ALIASES} cvlc rvlc"
1146 dnl Some plugins aren't useful on some platforms
1148 if test "${SYS}" = "os2"; then
1149 VLC_ADD_PLUGIN([dynamicoverlay])
1150 elif test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
1151 VLC_ADD_PLUGIN([dynamicoverlay access_shm])
1152 elif test "${SYS}" != "mingwce"; then
1153 VLC_ADD_PLUGIN([access_smb dmo globalhotkeys])
1154 VLC_ADD_LIBS([dmo],[-lole32 -luuid])
1156 if test "${SYS}" = "darwin"; then
1157 VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices])
1161 dnl Accelerated modules
1164 dnl Check for fully working MMX intrinsics
1165 dnl We need support for -mmmx, we need <mmintrin.h>, and we also need a
1166 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1168 [AS_HELP_STRING([--disable-mmx],
1169 [disable MMX optimizations (default auto)])],,[
1170 case "${host_cpu}" in
1181 AS_IF([test "${enable_mmx}" != "no"], [
1184 AC_CACHE_CHECK([if $CC groks MMX intrinsics], [ac_cv_c_mmx_intrinsics], [
1185 CFLAGS="${CFLAGS_save} -O -mmmx"
1186 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1187 [#include <mmintrin.h>
1189 uint64_t frobzor;]], [
1191 a = b = c = (__m64)frobzor;
1192 a = _mm_slli_pi16(a, 3);
1193 a = _mm_adds_pi16(a, b);
1194 c = _mm_srli_pi16(c, 8);
1195 c = _mm_slli_pi16(c, 3);
1196 b = _mm_adds_pi16(b, c);
1197 a = _mm_unpacklo_pi8(a, b);
1198 frobzor = (uint64_t)a;]])], [
1199 ac_cv_c_mmx_intrinsics=yes
1201 ac_cv_c_mmx_intrinsics=no
1203 CFLAGS="${CFLAGS_save}"
1205 AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
1206 AC_DEFINE(HAVE_MMX_INTRINSICS, 1,
1207 [Define to 1 if MMX intrinsics are available.])
1210 AC_CACHE_CHECK([if $CC groks MMX inline assembly], [ac_cv_mmx_inline], [
1211 CFLAGS="${CFLAGS_save} -mmmx"
1212 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1214 asm volatile("packuswb %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1217 ac_cv_mmx_inline=yes
1221 CFLAGS="${CFLAGS_save}"
1223 AS_IF([test "${ac_cv_mmx_inline}" != "no"], [
1224 AC_DEFINE(CAN_COMPILE_MMX, 1,
1225 [Define to 1 inline MMX assembly is available.])
1229 AC_CACHE_CHECK([if $CC groks MMX EXT inline assembly],
1230 [ac_cv_mmxext_inline], [
1231 CFLAGS="${CFLAGS_save} -mmmx"
1232 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1234 asm volatile("maskmovq %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1237 ac_cv_mmxext_inline=yes
1239 ac_cv_mmxext_inline=no
1241 CFLAGS="${CFLAGS_save}"
1243 AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
1244 AC_DEFINE(CAN_COMPILE_MMXEXT, 1,
1245 [Define to 1 if MMX EXT inline assembly is available.])
1249 AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
1250 AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
1252 dnl Check for fully workin SSE2 intrinsics
1253 dnl We need support for -mmmx, we need <emmintrin.h>, and we also need a
1254 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1256 [AS_HELP_STRING([--disable-sse],
1257 [disable SSE (1-4) optimizations (default auto)])],, [
1258 case "${host_cpu}" in
1268 AS_IF([test "${enable_sse}" != "no"], [
1269 ARCH="${ARCH} sse sse2"
1271 AC_CACHE_CHECK([if $CC groks SSE2 intrinsics], [ac_cv_c_sse2_intrinsics], [
1272 CFLAGS="${CFLAGS_save} -O -msse2"
1273 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1274 [#include <emmintrin.h>
1276 uint64_t frobzor;]], [
1278 a = b = c = _mm_set1_epi64((__m64)frobzor);
1279 a = _mm_slli_epi16(a, 3);
1280 a = _mm_adds_epi16(a, b);
1281 c = _mm_srli_epi16(c, 8);
1282 c = _mm_slli_epi16(c, 3);
1283 b = _mm_adds_epi16(b, c);
1284 a = _mm_unpacklo_epi8(a, b);
1285 frobzor = (uint64_t)_mm_movepi64_pi64(a);]])], [
1286 ac_cv_c_sse2_intrinsics=yes
1288 ac_cv_c_sse2_intrinsics=no
1290 CFLAGS="${CFLAGS_save}"
1292 AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
1293 AC_DEFINE(HAVE_SSE2_INTRINSICS, 1,
1294 [Define to 1 if SSE2 intrinsics are available.])
1297 AC_CACHE_CHECK([if $CC groks SSE inline assembly], [ac_cv_sse_inline], [
1298 CFLAGS="${CFLAGS_save} -msse"
1299 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1301 asm volatile("xorps %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1304 ac_cv_sse_inline=yes
1308 CFLAGS="${CFLAGS_save}"
1310 AS_IF([test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "solaris"], [
1311 AC_DEFINE(CAN_COMPILE_SSE, 1,
1312 [Define to 1 if SSE inline assembly is available.])
1315 AC_CACHE_CHECK([if $CC groks SSE2 inline assembly], [ac_cv_sse2_inline], [
1316 CFLAGS="${CFLAGS_save} -msse"
1317 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1319 asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1322 ac_cv_sse2_inline=yes
1324 ac_cv_sse2_inline=no
1326 CFLAGS="${CFLAGS_save}"
1328 AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [
1329 AC_DEFINE(CAN_COMPILE_SSE2, 1,
1330 [Define to 1 if SSE2 inline assembly is available.])
1335 AC_CACHE_CHECK([if $CC groks SSE3 inline assembly], [ac_cv_sse3_inline], [
1336 CFLAGS="${CFLAGS_save} -msse"
1337 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1339 asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1342 ac_cv_sse3_inline=yes
1344 ac_cv_sse3_inline=no
1346 CFLAGS="${CFLAGS_save}"
1348 AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
1349 AC_DEFINE(CAN_COMPILE_SSE3, 1,
1350 [Define to 1 if SSE3 inline assembly is available.]) ])
1352 AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly], [ac_cv_ssse3_inline], [
1353 CFLAGS="${CFLAGS_save} -msse"
1354 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1356 asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p):"xmm0");
1359 ac_cv_ssse3_inline=yes
1361 ac_cv_ssse3_inline=no
1363 CFLAGS="${CFLAGS_save}"
1365 AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
1366 AC_DEFINE(CAN_COMPILE_SSSE3, 1,
1367 [Define to 1 if SSSE3 inline assembly is available.]) ])
1370 AC_CACHE_CHECK([if $CC groks SSE4.1 inline assembly],
1371 [ac_cv_sse4_1_inline], [
1372 CFLAGS="${CFLAGS_save} -msse"
1373 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1375 asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1378 ac_cv_sse4_1_inline=yes
1380 ac_cv_sse4_1_inline=no
1382 CFLAGS="${CFLAGS_save}"
1384 AS_IF([test "${ac_cv_sse4_1_inline}" != "no"], [
1385 AC_DEFINE(CAN_COMPILE_SSE4_1, 1,
1386 [Define to 1 if SSE4_1 inline assembly is available.]) ])
1389 AC_CACHE_CHECK([if $CC groks SSE4.2 inline assembly],
1390 [ac_cv_sse4_2_inline], [
1391 CFLAGS="${CFLAGS_save} -msse"
1392 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1394 asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1397 ac_cv_sse4_2_inline=yes
1399 ac_cv_sse4_2_inline=no
1401 CFLAGS="${CFLAGS_save}"
1403 AS_IF([test "${ac_cv_sse4_2_inline}" != "no"], [
1404 AC_DEFINE(CAN_COMPILE_SSE4_2, 1,
1405 [Define to 1 if SSE4_2 inline assembly is available.]) ])
1408 AC_CACHE_CHECK([if $CC groks SSE4A inline assembly], [ac_cv_sse4a_inline], [
1409 CFLAGS="${CFLAGS_save} -msse"
1410 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1412 asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1415 ac_cv_sse4a_inline=yes
1417 ac_cv_sse4a_inline=no
1419 CFLAGS="${CFLAGS_save}"
1421 AS_IF([test "${ac_cv_sse4a_inline}" != "no"], [
1422 AC_DEFINE(CAN_COMPILE_SSE4A, 1,
1423 [Define to 1 if SSE4A inline assembly is available.]) ])
1425 AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
1428 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], [
1429 CFLAGS="${CFLAGS_save} -mmmx"
1430 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1432 asm volatile("pfadd %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1435 ac_cv_3dnow_inline=yes
1437 ac_cv_3dnow_inline=no
1439 CFLAGS="${CFLAGS_save}"
1441 AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
1442 AC_DEFINE(CAN_COMPILE_3DNOW, 1,
1443 [Define to 1 if 3D Now! inline assembly is available.])
1446 AM_CONDITIONAL([HAVE_3DNOW], [test "$have_3dnow" = "yes"])
1450 [AS_HELP_STRING([--disable-neon],
1451 [disable NEON optimizations (default auto)])],, [
1452 AS_IF([test "${host_cpu}" = "arm"], [enable_neon="yes"] ,[enable_neon="no"])
1454 AS_IF([test "${enable_neon}" != "no"], [
1455 AC_CACHE_CHECK([if $CC groks NEON inline assembly], [ac_cv_neon_inline], [
1456 CFLAGS="${CFLAGS_save} -mfpu=neon"
1459 asm volatile("vqmovun.s64 d0, q1":::"d0");
1460 asm volatile("ssat r0, #1, r0":::"r0"); /* assume ARMv6 */
1463 ac_cv_neon_inline="-mfpu=neon"
1465 ac_cv_neon_inline="no"
1467 CFLAGS="${CFLAGS_save}"
1469 AS_IF([test "$ac_cv_neon_inline" != "no"], [
1470 NEON_CFLAGS="$ac_cv_neon_inline"
1471 AC_DEFINE([CAN_COMPILE_NEON], 1,
1472 [Define to 1 if NEON (and ARMv6) assembly is available with NEON_CFLAGS.])
1475 ac_cv_neon_inline="no"
1477 AC_SUBST(NEON_CFLAGS)
1478 AM_CONDITIONAL(HAVE_NEON, [test "${ac_cv_neon_inline}" != "no"])
1481 AC_ARG_ENABLE(altivec,
1482 [AS_HELP_STRING([--disable-altivec],
1483 [disable AltiVec optimizations (default auto)])],, [
1484 AS_IF([test "${host_cpu}" = "powerpc"],
1485 [enable_altivec=yes], [enable_altivec=no])
1488 AS_IF([test "${enable_altivec}" = "yes"], [
1489 ARCH="${ARCH} altivec";
1490 AC_CACHE_CHECK([if $CC groks AltiVec inline assembly],
1491 [ac_cv_altivec_inline],
1492 [CFLAGS="${CFLAGS_save}"
1493 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1494 ac_cv_altivec_inline="yes",
1495 [CFLAGS="${CFLAGS_save} -Wa,-m7400"
1496 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1497 [ac_cv_altivec_inline="-Wa,-m7400"],
1498 ac_cv_altivec_inline=no)
1500 AS_IF([test "${ac_cv_altivec_inline}" != "no"], [
1501 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1,
1502 [Define to 1 if AltiVec inline assembly is available.])
1503 AS_IF([test "${ac_cv_altivec_inline}" != "yes"], [
1504 VLC_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}])
1505 VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}])
1506 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}])
1511 dnl The AltiVec C extensions
1513 dnl There are several possible cases:
1514 dnl - OS X PPC, gcc 4.x: use -mpim-altivec -force_cpusubtype_ALL, don't
1515 dnl need <altivec.h>
1516 dnl - OS X PPC, gcc 3.x: need -faltivec, don't need <altivec.h>
1517 dnl - Linux PPC, gcc 3.4, 4.x: need <altivec.h> which requires -maltivec
1518 dnl - Linux PPC, gcc 3.3: need <altivec.h> and -maltivec -mabi=altivec
1519 dnl - Linux PPC, gcc 3.x: need <altivec.h> and -fvec
1520 dnl - Others: test should fail
1521 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
1523 [# OS X/PPC test (gcc 4.x)
1524 CFLAGS="${CFLAGS_save} -mpim-altivec -force_cpusubtype_ALL"
1525 AC_TRY_COMPILE([vector unsigned char foo;],
1526 [vec_ld(0, (unsigned char *)0);],
1527 [ac_cv_c_altivec="-mpim-altivec -force_cpusubtype_ALL"],
1528 [# OS X/PPC test (gcc 3.x)
1529 CFLAGS="${CFLAGS_save} -faltivec"
1530 AC_TRY_COMPILE([vector unsigned char foo;],
1531 [vec_ld(1 * sizeof(vector float), (unsigned char *)0);],
1532 [ac_cv_c_altivec="-faltivec"],
1533 dnl Below this are the Linux tests
1534 [# Linux/PPC test (gcc 4.x)
1535 CFLAGS="${CFLAGS_save} -maltivec"
1536 AC_TRY_COMPILE([#include <altivec.h>],
1537 [vec_ld(0, (unsigned char *)0);],
1538 [ac_cv_c_altivec="-maltivec"],
1539 [# Linux/PPC test (gcc 3.3)
1540 CFLAGS="${CFLAGS_save} -maltivec -mabi=altivec"
1541 AC_TRY_COMPILE([#include <altivec.h>],
1542 [vec_ld(0, (unsigned char *)0);],
1544 ac_cv_c_altivec_abi="-maltivec -mabi=altivec"],
1545 [# Linux/PPC test (gcc 3.3)
1546 CFLAGS="${CFLAGS_save} -fvec"
1547 AC_TRY_COMPILE([#include <altivec.h>],
1548 [vec_ld(0, (unsigned char *)0);],
1549 [ac_cv_c_altivec="-fvec"],
1550 [ac_cv_c_altivec=no])
1555 CFLAGS="${CFLAGS_save}"
1557 AS_IF([test "${ac_cv_c_altivec}" != "no"], [
1558 CPPFLAGS="${CPPFLAGS_save} ${ac_cv_c_altivec}"
1561 AC_CHECK_HEADERS(altivec.h)
1562 CPPFLAGS="${CPPFLAGS_save}"
1564 AS_IF([test "${ac_cv_c_altivec}" != "no"], [
1565 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1,
1566 [Define to 1 if C AltiVec extensions are available.])
1567 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_c_altivec}])
1568 VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
1572 AC_CACHE_CHECK([if linker needs -framework vecLib],
1574 [LDFLAGS="${LDFLAGS} -Wl,-framework,vecLib"
1575 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
1576 LDFLAGS="${LDFLAGS_save}"
1578 AS_IF([test "${ac_cv_ld_altivec}" != "no"], [
1579 VLC_ADD_LIBS([libvlccore memcpyaltivec],[-Wl,-framework,vecLib])
1582 AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])
1585 dnl Special arch tuning
1588 [AS_HELP_STRING([--with-tuning=ARCH],
1589 [tune compilation for an architecture (default varies)])])
1590 if test -n "${with_tuning}"; then
1591 if test "${with_tuning}" != "no"; then
1592 CFLAGS_TUNING="-mtune=${with_tuning}"
1595 if test "${SYS}" = "darwin" -a "${host_cpu}" = "i686"; then
1596 CFLAGS_TUNING="-march=prescott -mtune=generic"
1597 elif test "${SYS}" = "darwin" -a "${host_cpu}" = "x86_64"; then
1598 CFLAGS_TUNING="-march=core2 -mtune=core2"
1599 elif test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "i486" -o "${host_cpu}" = "i386"; then
1600 CFLAGS_TUNING="-mtune=pentium2"
1601 elif test "${host_cpu}" = "x86_64"; then
1602 CFLAGS_TUNING="-mtune=athlon64"
1603 elif test "${host_cpu}" = "powerpc"; then
1604 CFLAGS_TUNING="-mtune=G4";
1608 dnl NOTE: this can't be cached cleanly
1609 AS_IF([test -n "${CFLAGS_TUNING}"], [
1610 AC_MSG_CHECKING([whether $CC accepts ${CFLAGS_TUNING}])
1611 CFLAGS="${CFLAGS_save} ${CFLAGS_TUNING}"
1612 AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], [
1615 CFLAGS_TUNING=""; tuning="no"
1616 AS_IF([test "${with_tuning}"], [
1617 AC_MSG_ERROR([requested tuning not supported])
1620 CFLAGS="${CFLAGS_save}"
1621 AC_MSG_RESULT([$tuning])
1623 CFLAGS="${CFLAGS} ${CFLAGS_TUNING}"
1630 AC_ARG_ENABLE(optimize-memory,
1631 [AS_HELP_STRING([--enable-optimize-memory],
1632 [optimize memory usage over performance])])
1633 if test "${enable_optimize_memory}" = "yes"; then
1634 AC_DEFINE(OPTIMIZE_MEMORY, 1, Define if you want to optimize memory usage over performance)
1638 dnl Allow running as root (useful for people running on embedded platforms)
1640 AC_ARG_ENABLE(run-as-root,
1641 [AS_HELP_STRING([--enable-run-as-root],
1642 [allow running VLC as root (default disabled)])])
1643 AS_IF([test "${enable_run_as_root}" = "yes"],[
1644 AC_DEFINE(ALLOW_RUN_AS_ROOT, 1,
1645 [Define to 1 to allow running VLC as root (uid 0).])
1652 [AS_HELP_STRING([--disable-sout],
1653 [disable streaming output (default enabled)])])
1654 AS_IF([test "${enable_sout}" != "no"], [
1655 AC_DEFINE(ENABLE_SOUT, 1, [Define to 1 for stream output support.])
1657 AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"])
1661 [AS_HELP_STRING([--disable-lua],
1662 [disable LUA scripting support (default enabled)])])
1663 if test "${enable_lua}" != "no"
1665 PKG_CHECK_MODULES(LUA, lua5.1,
1668 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
1669 PKG_CHECK_MODULES(LUA, lua >= 5.1,
1672 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
1674 AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
1677 AC_CHECK_LIB( lua5.1 , luaL_newstate,
1678 [LUA_LIBS="-llua5.1"],
1679 AC_CHECK_LIB( lua51 , luaL_newstate,
1680 [LUA_LIBS="-llua51"],
1681 AC_CHECK_LIB( lua , luaL_newstate,
1689 if test "x${have_lua}" = "xyes" ; then
1690 VLC_ADD_LIBS([lua],[$LUA_LIBS])
1691 VLC_ADD_CFLAGS([lua],[$LUA_CFLAGS])
1693 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.])
1695 AC_ARG_VAR([LUAC], [LUA byte compiler])
1696 AC_PATH_PROGS(LUAC,[${LUAC} luac], [false])
1697 AS_IF([test "${LUAC}" = "false"], [
1698 AC_MSG_ERROR([Could not find the LUA byte compiler.])
1701 AM_CONDITIONAL(BUILD_LUA, [test "${have_lua}" = "yes"])
1707 AC_ARG_ENABLE(httpd,
1708 [AS_HELP_STRING([--disable-httpd],
1709 [disable the built-in HTTP server (default enabled)])])
1710 if test "${enable_httpd}" != "no"
1712 AC_DEFINE(ENABLE_HTTPD, 1, Define if you want the HTTP daemon support)
1714 AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"])
1718 dnl VideoLAN manager
1721 [AS_HELP_STRING([--disable-vlm],
1722 [disable the stream manager (default enabled)])],,
1723 [enable_vlm="${enable_sout}"])
1724 AS_IF([test "${enable_vlm}" != "no"], [
1725 AS_IF([test "${enable_sout}" = "no"], [
1726 AC_MSG_ERROR([VLM requires the stream output. Do not use --disable-sout.])
1728 AC_DEFINE(ENABLE_VLM, 1, [Define if you want the VideoLAN manager support])
1730 AM_CONDITIONAL([ENABLE_VLM], [test "${enable_vlm}" != "no"])
1737 EXTEND_HELP_STRING([Input plugins:])
1740 dnl libproxy support
1742 AC_ARG_ENABLE(libproxy,
1743 [AS_HELP_STRING([--enable-libproxy],[support libproxy (default auto)])])
1744 AS_IF([test "${enable_libproxy}" != "no"], [
1745 PKG_CHECK_MODULES(LIBPROXY, libproxy-1.0, [
1746 AC_DEFINE(HAVE_LIBPROXY, 1, [Define if libproxy is available])
1747 VLC_ADD_CFLAGS([access_http],[$LIBPROXY_CFLAGS])
1748 VLC_ADD_LIBS([access_http],[$LIBPROXY_LIBS])
1750 AS_IF([test -n "${enable_libproxy}"], [
1751 AC_MSG_ERROR([${LIBPROXY_PKG_ERRORS}.])
1759 AC_ARG_ENABLE(live555,
1760 [AS_HELP_STRING([--enable-live555],
1761 [enable RTSP input through live555 (default enabled)])])
1762 AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
1764 CPPFLAGS_save="${CPPFLAGS}"
1765 AS_IF([test -z "${CONTRIB_DIR}"], [
1766 CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
1768 CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
1770 AS_IF([test "${SYS}" = "solaris"], [
1771 CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
1773 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
1775 AC_CACHE_CHECK([for live555 version 1275091200 or later], [ac_cv_live555], [
1776 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
1777 [#include <liveMedia_version.hh>
1778 #if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200)
1787 AS_IF([test "$ac_cv_live555" = "no"], [
1788 AC_MSG_WARN([liveMedia is missing or its installed version is too old:
1789 Version 2010.05.29 or later is required to proceed.
1790 You can get an updated one from http://www.live555.com/liveMedia .])
1791 AS_IF([test -n "${enable_live555}"], [
1792 AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
1794 ac_cv_live555_usable=""
1796 dnl Check that live555 is patched correctly.
1797 AC_CACHE_CHECK([for live555 usability], [ac_cv_live555_usable], [
1798 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1799 [#include <locale.h>
1801 # include <xlocale.h>
1806 #include <Locale.hh>
1808 #include <GroupsockHelper.hh>]], [
1809 [struct in_addr addr;
1810 our_inet_ntoa(addr, NULL);]])
1812 ac_cv_live555_usable="yes"
1814 ac_cv_live555_usable="no"
1817 AS_IF([test "$ac_cv_live555_usable" = "no"], [
1818 AC_MSG_ERROR([liveMedia lacks patches and is not usable.
1819 Please apply our patches from the VLC contrib (contrib/src/live555/).
1820 You can also disable RTSP input with --disable-live555. You were warned.])
1822 other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
1823 other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
1824 AS_IF([test "${SYS}" = "mingw32"], [
1825 # add ws2_32 for closesocket, select, recv
1826 other_libs="$other_libs -lws2_32"
1827 ], [test "${SYS}" = "mingwce"], [
1828 # add ws2 for closesocket, select, recv
1829 other_libs="$other_libs -lws2"
1832 dnl We need to check for pic because live555 don't provide shared libs
1833 dnl and we want to build a plugins so we need -fPIC on some arch.
1834 VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
1835 AC_CHECK_LIB(liveMedia_pic, main, [
1836 VLC_ADD_PLUGIN([live555])
1837 VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
1839 AC_CHECK_LIB(liveMedia, main, [
1840 VLC_ADD_PLUGIN([live555])
1841 VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
1842 ],[],[${other_libs}])],[${other_libs_pic}])
1844 CPPFLAGS="${CPPFLAGS_save}"
1849 dnl - special access module for dc1394 input
1850 dnl - dv module: digital video module check for libraw1394
1851 dnl - linsys modules: access module check for libzvbi
1853 PKG_ENABLE_MODULES_VLC([DC1394], [], [libraw1394 >= 2.0.1 libdc1394-2 >= 2.1.0], [dc1394 access module], [auto])
1854 PKG_ENABLE_MODULES_VLC([DV], [access_dv], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV input module], [auto])
1856 AC_ARG_ENABLE(linsys,
1857 [AS_HELP_STRING([--enable-linsys],
1858 [Linux Linear Systems Ltd. SDI and HD-SDI input cards (default enabled)])])
1859 if test "$SYS" = "linux" -a "${enable_linsys}" != "no"; then
1860 VLC_ADD_PLUGIN([linsys_hdsdi])
1861 PKG_CHECK_MODULES(LINSYS_SDI, [zvbi-0.2 >= 0.2.28],
1862 [ VLC_ADD_LIBS([linsys_sdi],[$LINSYS_SDI_LIBS])
1863 VLC_ADD_CFLAGS([linsys_sdi],[$LINSYS_SDI_CFLAGS])
1864 VLC_ADD_PLUGIN([linsys_sdi]) ],
1865 [AC_MSG_WARN([${LINSYS_SDI_PKG_ERRORS}.])]
1870 dnl dvdread module: check for libdvdread
1872 dnl prepend -ldvdcss on OS that need it
1873 AS_CASE(["${SYS}"], [mingw32|darwin], [VLC_ADD_LIBS([dvdread], [-ldvdcss])])
1874 PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread], [dvdread input module], [auto])
1877 dnl libdvdnav plugin
1879 AC_ARG_ENABLE(dvdnav,
1880 [AS_HELP_STRING([--disable-dvdnav],
1881 [disable DVD navigation with libdvdnav (default auto)])])
1882 if test "${enable_dvdnav}" != "no"
1884 dnl prepend -ldvdcss on OS that need it
1885 AS_CASE(["${SYS}"], [mingw32|darwin], [VLC_ADD_LIBS([dvdnav], [-ldvdcss])])
1887 PKG_CHECK_MODULES(DVDNAV, dvdnav, [
1888 VLC_ADD_PLUGIN([dvdnav])
1889 VLC_ADD_CFLAGS([dvdnav],[${DVDNAV_CFLAGS}])
1890 VLC_ADD_LIBS([dvdnav],[${DVDNAV_LIBS}])
1891 AC_CHECK_LIB(dvdnav, dvdnav_get_video_resolution,
1892 AC_DEFINE(HAVE_DVDNAV_GET_VIDEO_RESOLUTION, 1, [Define if you have dvdnav_get_video_resolution.]),
1893 [], [${LIBS_dvdnav}])
1894 AC_CHECK_LIB(dvdnav, dvdnav_describe_title_chapters,
1895 AC_DEFINE(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS, 1, [Define if you have dvdnav_describe_title_chapters.]),
1896 [], [${LIBS_dvdnav}])],
1897 [AC_MSG_WARN([${DVDNAV_PKG_ERRORS}.])])
1901 dnl Windows DirectShow access module
1903 AC_ARG_ENABLE(dshow,
1904 [AS_HELP_STRING([--disable-dshow],
1905 [support DirectShow (default auto)])])
1906 if test "${enable_dshow}" != "no"
1908 if test "${SYS}" = "mingw32"
1911 AC_CHECK_HEADERS(dshow.h,
1912 [ VLC_ADD_PLUGIN([dshow])
1913 VLC_ADD_CXXFLAGS([dshow],[])
1914 VLC_ADD_LIBS([dshow],[-lole32 -loleaut32 -luuid]) ])
1920 dnl Blu-ray Disc Support with libbluray
1922 PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2 libxml-2.0 >= 2.6 ], (libbluray for Blu-ray disc support ) )
1925 dnl OpenCV wrapper and example filters
1927 PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv], (OpenCV (computer vision) filter), [off])
1931 dnl libsmbclient plugin
1934 [AS_HELP_STRING([--disable-smb], [disable SMB/CIFS support (default auto)])])
1935 if test "${enable_smb}" != "no"; then
1936 AC_CHECK_HEADERS(libsmbclient.h,
1937 [ VLC_ADD_PLUGIN([access_smb])
1938 VLC_ADD_LIBS([access_smb],[-lsmbclient]) ],
1939 [ if test -n "${enable_smb}"; then
1940 AC_MSG_ERROR([cannot find libsmbclient headers])
1946 dnl sftp access support
1949 [AS_HELP_STRING([--enable-sftp],
1950 [support SFTP file transfer via libssh2 (default disabled)])])
1951 if test "${enable_sftp}" = "yes"; then
1952 AC_CHECK_HEADERS(libssh2.h, [
1953 VLC_ADD_PLUGIN([access_sftp])
1954 VLC_ADD_LIBS([access_sftp], [-lssh2])
1961 AC_ARG_ENABLE(libv4l2, [AS_HELP_STRING([--disable-libv4l2],
1962 [disable userspace V4L2 library (default auto)])])
1963 AC_ARG_ENABLE(pvr, [AS_HELP_STRING([--enable-pvr],
1964 [support PVR V4L2 cards (default disabled)])])
1966 AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
1969 AS_IF([test "$have_v4l2" = "yes"], [
1970 AS_IF([test "${enable_libv4l2}" != "no"], [
1971 PKG_CHECK_MODULES(LIBV4L2, libv4l2, [
1972 AC_DEFINE(HAVE_LIBV4L2, 1, [Define to 1 if libv4l2 is available])
1974 AC_MSG_WARN([${LIBV4L2_PKG_ERRORS}.])
1977 AS_IF([test "${enable_pvr}" = "yes"], [
1978 VLC_ADD_PLUGIN([pvr])
1981 AM_CONDITIONAL(HAVE_V4L2, [test "${have_v4l2}" != "no"])
1984 dnl special access module for Blackmagic SDI cards
1986 AC_ARG_ENABLE(decklink,
1987 [AS_HELP_STRING([--disable-decklink],
1988 [disable Blackmagic DeckLink SDI input (default auto)])])
1989 AC_ARG_WITH(decklink_sdk,
1990 [AS_HELP_STRING[--with-decklink-sdk=DIR],
1991 [ location of Blackmagic DeckLink SDI SDK])])
1992 if test "${enable_decklink}" != "no"
1994 if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}"
1996 VLC_ADD_CPPFLAGS([decklink],[-I${with_decklink_sdk}/include])
1998 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_decklink}"
2000 AC_CHECK_HEADERS(DeckLinkAPIDispatch.cpp, [
2001 VLC_ADD_PLUGIN([decklink])
2002 ],[AC_MSG_WARN(Blackmagic DeckLink SDI include files not found, decklink disabled)])
2004 CPPFLAGS="${CPPFLAGS_save}"
2009 dnl gnomeVFS access module
2011 PKG_ENABLE_MODULES_VLC([GNOMEVFS], [access_gnomevfs], [gnome-vfs-2.0], [GnomeVFS access module], [auto])
2017 [AS_HELP_STRING([--enable-vcdx],
2018 [navigate VCD with libvcdinfo (default disabled)])])
2019 if test "${enable_vcdx}" = "yes"
2021 PKG_CHECK_MODULES(LIBCDIO, [libcdio >= 0.78.2 libiso9660 >= 0.72],
2022 [VLC_ADD_LIBS([vcdx],[$LIBCDIO_LIBS])
2023 VLC_ADD_CFLAGS([vcdx],[$LIBCDIO_CFLAGS])],
2024 [AC_MSG_ERROR([${LIBCDIO_PKG_ERRORS} (required for vcdx plugin).])])
2025 PKG_CHECK_MODULES(LIBVCDINFO, libvcdinfo >= 0.7.22,
2026 [VLC_ADD_LIBS([vcdx],[$LIBVCDINFO_LIBS])
2027 VLC_ADD_CFLAGS([vcdx],[$LIBVCDINFO_CFLAGS])],
2028 [AC_MSG_ERROR([${LIBVCDINFO_PKG_ERRORS} (required for vcdx plugin).])])
2029 VLC_ADD_PLUGIN([vcdx])
2033 dnl Built-in CD-DA and VCD module
2036 [AS_HELP_STRING([--disable-vcd],
2037 [disable built-in VCD and CD-DA support (default enabled)])])
2039 AC_ARG_ENABLE(libcddb,
2040 [AS_HELP_STRING([--disable-libcddb],
2041 [disable CDDB for Audio CD (default enabled)])])
2043 if test "${enable_vcd}" != "no"
2045 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
2046 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
2048 VLC_ADD_PLUGIN([vcd cdda])
2053 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
2054 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
2056 VLC_ADD_PLUGIN([vcd cdda])
2057 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
2062 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
2063 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
2065 VLC_ADD_PLUGIN([vcd cdda])
2066 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
2071 if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32" -o "${SYS}" = "os2"
2073 VLC_ADD_PLUGIN([vcd cdda])
2076 if test "${SYS}" = "darwin"
2078 VLC_ADD_PLUGIN([vcd cdda])
2079 VLC_ADD_LIBS([vcd vcdx cdda],[-Wl,-framework,IOKit,-framework,CoreFoundation])
2080 VLC_ADD_LIBS([vcdx cdda],[-liconv])
2083 if test "$enable_libcddb" != "no"; then
2084 PKG_CHECK_MODULES(LIBCDDB, [libcddb >= 0.9.5], [
2086 AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed])
2087 VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS])
2088 VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
2090 [AC_MSG_WARN([${LIBCDDB_PKG_ERRORS}: CDDB access disabled.])
2098 AC_CACHE_CHECK([for Linux DVB version 5], [ac_cv_linux_s2api], [
2099 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
2100 [#include <linux/dvb/version.h>
2101 #if (DVB_API_VERSION < 5)
2104 ac_cv_linux_s2api=yes
2106 ac_cv_linux_s2api=no
2108 AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_s2api" = "yes"])
2111 dnl Screen capture module
2113 AC_ARG_ENABLE(screen,
2114 [AS_HELP_STRING([--enable-screen],
2115 [disable screen capture (default enabled)])])
2116 if test "${enable_screen}" != "no"; then
2117 if test "${SYS}" = "darwin"; then
2118 AC_CHECK_HEADERS(OpenGL/gl.h, [
2119 AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, [
2120 VLC_ADD_PLUGIN([screen])
2121 VLC_ADD_LIBS([screen],[-Wl,-framework,OpenGL,-framework,ApplicationServices])
2124 elif test "${SYS}" = "mingw32"; then
2125 VLC_ADD_PLUGIN([screen])
2126 VLC_ADD_LIBS([screen],[-lgdi32])
2127 elif test "${SYS}" = "mingwce"; then
2128 CPPFLAGS="${CPPFLAGS_save}"
2133 dnl Real RTSP plugin
2135 AC_ARG_ENABLE(realrtsp,
2136 [ --enable-realrtsp Real RTSP module (default disabled)])
2137 if test "${enable_realrtsp}" = "yes"; then
2138 VLC_ADD_PLUGIN([access_realrtsp])
2143 AC_ARG_ENABLE(macosx-eyetv,
2144 [ --enable-macosx-eyetv Mac OS X EyeTV (TNT Tuner) module (default enabled on Mac OS X)])
2145 if test "x${enable_macosx_eyetv}" != "xno" &&
2146 (test "${SYS}" = "darwin" || test "${enable_macosx_eyetv}" = "yes")
2148 VLC_ADD_LIBS([access_eyetv], [-Wl,-framework,Foundation])
2149 VLC_ADD_PLUGIN([access_eyetv])
2154 AC_ARG_ENABLE(macosx-qtkit,
2155 [ --enable-macosx-qtkit Mac OS X qtcapture (video) and qtsound (audio) module (default enabled on Mac OS X)])
2156 if test "x${enable_macosx_qtkit}" != "xno" &&
2157 (test "${SYS}" = "darwin" || test "${enable_macosx_qtkit}" = "yes")
2159 VLC_ADD_PLUGIN([qtcapture])
2160 VLC_ADD_PLUGIN([qtsound])
2162 AM_CONDITIONAL(HAVE_QTKIT, [test "${SYS}" = "darwin" && "x${enable_macosx_qtkit}" != "xno"])
2169 EXTEND_HELP_STRING([Mux/Demux plugins:])
2172 dnl libdvbpsi check for ts mux/demux
2175 PKG_WITH_MODULES([DVBPSI], [libdvbpsi], [have_dvbpsi="yes"])
2176 AM_CONDITIONAL(HAVE_DVBPSI, [test "${have_dvbpsi}" = "yes"])
2180 dnl GME demux plugin
2183 [AS_HELP_STRING([--enable-gme],
2184 [use Game Music Emu (default auto)])])
2185 AS_IF([test "${enable_gme}" != "no"], [
2186 AC_CHECK_HEADER([gme/gme.h], [
2187 VLC_ADD_LIBS([gme], [-lgme])
2188 VLC_ADD_PLUGIN([gme])
2190 AS_IF([test "x${enable_gme}" != "x"], [
2191 AC_MSG_ERROR([GME cannot be found. Please install the development files.])
2201 [AS_HELP_STRING([--enable-sid],[C64 sid demux support (default auto)])])
2202 AS_IF([test "${enable_sid}" != "no"], [
2203 PKG_CHECK_MODULES(SID, [libsidplay2], [
2205 oldCPPFLAGS="$CPPFLAGS"
2206 CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
2207 AC_CHECK_HEADER([sidplay/builders/resid.h], [
2208 VLC_ADD_PLUGIN([sid])
2209 VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
2210 VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
2212 AS_IF([test -n "${enable_sid}"],
2213 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2214 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2217 CPPFLAGS="$oldCPPFLAGS"
2220 AS_IF([test "x${enable_sid}" = "xyes"],
2221 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2222 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2229 dnl ogg demux plugin
2231 PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
2232 if test "${enable_sout}" != "no"; then
2233 PKG_ENABLE_MODULES_VLC([MUX_OGG], [], [ogg >= 1.0], [Ogg mux support], [auto])
2234 dnl Check for libshout
2235 PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
2239 dnl matroska demux plugin
2242 [AS_HELP_STRING([--disable-mkv],
2243 [do not use libmatroska (default auto)])])
2244 if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
2246 AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
2247 AC_MSG_CHECKING(for libebml version >= 1.0.0)
2249 [#include <ebml/EbmlVersion.h>
2250 #ifdef LIBEBML_VERSION
2251 #if LIBEBML_VERSION >= 0x010000
2255 [AC_MSG_RESULT([yes])
2256 AC_CHECK_HEADERS(matroska/KaxVersion.h, [
2257 AC_MSG_CHECKING(for libmatroska version >= 1.0.0)
2259 [#include <matroska/KaxVersion.h>
2260 #ifdef LIBMATROSKA_VERSION
2261 #if LIBMATROSKA_VERSION >= 0x010000
2265 [AC_MSG_RESULT([yes])
2266 AC_CHECK_HEADERS(matroska/KaxAttachments.h)
2267 VLC_ADD_CXXFLAGS([mkv],[])
2268 if test "${SYS}" = "darwin"; then
2269 VLC_ADD_CXXFLAGS([mkv],[-O1])
2271 AC_CHECK_LIB(ebml_pic, main, [
2272 VLC_ADD_PLUGIN([mkv])
2273 VLC_ADD_LIBS([mkv],[-lmatroska -lebml_pic])
2275 AC_CHECK_LIB(ebml, main, [
2276 VLC_ADD_PLUGIN([mkv])
2277 VLC_ADD_LIBS([mkv],[-lmatroska -lebml])
2282 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.])
2286 [AC_MSG_RESULT([no])
2287 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.])
2294 dnl modplug demux plugin
2297 [AS_HELP_STRING([--disable-mod],
2298 [do not use libmodplug (default auto)])])
2299 if test "${enable_mod}" != "no" ; then
2300 PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [
2301 VLC_ADD_PLUGIN([mod])
2302 VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
2303 VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
2305 AS_IF([test -n "${enable_mod}"],
2306 [AC_MSG_ERROR([${LIBMODPLUG_PKG_ERRORS}.])],
2307 [AC_MSG_WARN([${LIBMODPLUG_PKG_ERRORS}.])])
2312 dnl mpc demux plugin
2315 [AS_HELP_STRING([--disable-mpc], [do not use libmpcdec (default auto)])])
2316 if test "${enable_mpc}" != "no"
2318 AC_CHECK_HEADERS([mpc/mpcdec.h], [
2319 VLC_ADD_PLUGIN([mpc])
2320 VLC_ADD_LIBS([mpc],[-lmpcdec])],
2321 [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
2322 VLC_ADD_PLUGIN([mpc])
2323 VLC_ADD_LIBS([mpc],[-lmpcdec])])])
2330 EXTEND_HELP_STRING([Codec plugins:])
2335 AC_ARG_ENABLE(wma-fixed,
2336 [ --enable-wma-fixed libwma-fixed module (default disabled)])
2337 if test "${enable_wma_fixed}" = "yes"
2339 VLC_ADD_PLUGIN([wma_fixed])
2343 dnl shine fixed point mp3 encoder
2345 AC_ARG_ENABLE(shine,
2346 [ --enable-shine shine mp3 encoding module (default disabled)])
2347 if test "${enable_shine}" = "yes"
2349 VLC_ADD_PLUGIN([shine])
2353 dnl openmax il codec plugin
2355 AC_ARG_ENABLE(omxil,
2356 [ --enable-omxil openmax il codec module (default disabled)])
2357 if test "${enable_omxil}" = "yes"
2359 VLC_ADD_PLUGIN([omxil])
2360 VLC_ADD_LIBS([omxil], [$LIBDL])
2364 dnl iomx codec plugin
2367 [ --enable-iomx iomx codec module (default disabled)])
2368 if test "${enable_iomx}" = "yes"
2370 CPPFLAGS_save="${CPPFLAGS}"
2371 CPPFLAGS="${CPPFLAGS} -I${srcdir}/modules/codec/omxil" # For the OMX headers
2373 AC_CHECK_HEADER(media/stagefright/OMXClient.h, [
2374 VLC_ADD_PLUGIN([iomx])
2375 VLC_ADD_CXXFLAGS([iomx], [-fno-exceptions -fno-rtti])
2376 VLC_ADD_LIBS([iomx], [-lstagefright -lmedia -lutils -lbinder])
2378 AC_MSG_ERROR("Could not find IOMX headers")
2381 CPPFLAGS="${CPPFLAGS_save}"
2385 dnl CrystalHD codec plugin
2387 AC_ARG_ENABLE(crystalhd,
2388 [ --enable-crystalhd crystalhd codec plugin (default auto)])
2389 if test "${enable_crystalhd}" != "no"; then
2390 AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [
2391 VLC_ADD_PLUGIN([crystalhd])
2392 VLC_ADD_LIBS([crystalhd], [-lcrystalhd])
2394 if test "${SYS}" = "mingw32" ; then
2395 AC_CHECK_HEADERS(libcrystalhd/bc_dts_defs.h, [
2396 VLC_ADD_PLUGIN([crystalhd])
2397 AC_CHECK_HEADERS(libcrystalhd/bc_drv_if.h, [
2398 VLC_ADD_LIBS([crystalhd], [-lbcmDIL])
2401 AS_IF([test x"${enable_crystalhd}" = "xyes"],
2402 [AC_MSG_ERROR("Could not find CrystalHD development headers")],
2403 [AC_MSG_WARN("Could not find CrystalHD development headers")])
2404 ],[#define __LINUX_USER__
2405 #include <libcrystalhd/bc_dts_types.h>
2409 #include <libcrystalhd/bc_dts_types.h>
2417 [ --enable-mad libmad module (default enabled)])
2418 if test "${enable_mad}" != "no"
2421 [ --with-mad=PATH path to libmad],[],[])
2422 if test "${with_mad}" != "no" -a -n "${with_mad}"
2424 VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
2425 VLC_ADD_LIBS([mpgatofixed32],[-L${with_mad}/lib])
2428 AC_ARG_WITH(mad-tree,
2429 [ --with-mad-tree=PATH mad tree for static linking],[],[])
2430 if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
2432 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
2433 if test -z "${real_mad_tree}"
2435 dnl The given directory can't be found
2437 AC_MSG_ERROR([${with_mad_tree} directory does not exist])
2439 dnl Use a custom libmad
2440 AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
2441 if test -f ${real_mad_tree}/mad.h
2444 VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
2445 VLC_ADD_LIBS([mpgatofixed32],[-L${real_mad_tree}/.libs])
2446 LDFLAGS="${LDFLAGS_save} ${LIBS_mpgatofixed32}"
2447 AC_CHECK_LIB(mad, mad_bit_init, [
2448 VLC_ADD_PLUGIN([mpgatofixed32])
2449 VLC_ADD_LIBS([mpgatofixed32],[-lmad])
2450 ],[ AC_MSG_ERROR([the specified tree has not been compiled ])
2452 LDFLAGS="${LDFLAGS_save}"
2455 AC_MSG_ERROR([the specified tree does not have mad.h])
2458 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
2459 LDFLAGS="${LDFLAGS_save} ${LIBS_mpgatofixed32}"
2460 AC_CHECK_HEADERS(mad.h, ,
2461 [ 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.]) ])
2462 AC_CHECK_LIB(mad, mad_bit_init, [
2463 VLC_ADD_PLUGIN([mpgatofixed32])
2464 VLC_ADD_LIBS([mpgatofixed32],[-lmad])],
2465 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
2466 CPPFLAGS="${CPPFLAGS_save}"
2467 LDFLAGS="${LDFLAGS_save}"
2472 AC_ARG_ENABLE(merge-ffmpeg,
2473 [ --enable-merge-ffmpeg merge FFmpeg-based plugins (default disabled)],, [
2474 enable_merge_ffmpeg="no"
2476 AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
2478 AC_CACHE_CHECK([if linker supports -Bsymbolic],
2479 [ac_cv_ld_bsymbolic],
2480 [LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic"
2481 AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no)
2482 LDFLAGS="${LDFLAGS_save}"
2486 dnl avcodec decoder/encoder plugin
2488 AC_ARG_ENABLE(avcodec,
2489 [ --enable-avcodec libavcodec codec (default enabled)])
2490 AS_IF([test "${enable_avcodec}" != "no"], [
2491 PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.25.0 libavutil],
2494 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2495 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2496 AC_CHECK_HEADERS(libavcodec/avcodec.h)
2497 AC_CHECK_HEADERS(libavutil/avutil.h)
2498 VLC_ADD_PLUGIN([avcodec])
2499 VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
2500 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2501 VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic])
2503 VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
2507 AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
2514 dnl libva needs avcodec
2516 AC_ARG_ENABLE(libva,
2517 [ --enable-libva VAAPI GPU decoding support (libVA) (default auto)])
2519 AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
2520 AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
2522 AS_IF([test "${enable_libva}" != "no"], [
2523 PKG_CHECK_MODULES(LIBVA, [libva libva-x11], [
2525 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2526 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2527 AC_CHECK_HEADERS(libavcodec/vaapi.h, [
2528 VLC_ADD_LIBS([avcodec],[$LIBVA_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11])
2529 VLC_ADD_CFLAGS([avcodec],[$LIBVA_CFLAGS ${X_CFLAGS}])
2530 AC_DEFINE(HAVE_AVCODEC_VAAPI, 1, [Define if avcodec has to be built with VAAPI support.])
2531 AC_MSG_NOTICE([VAAPI acceleration activated])
2533 AS_IF([test -n "${enable_libva}"], [
2534 AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
2536 AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
2541 AS_IF([test -n "${enable_libva}"], [
2542 AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
2544 AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
2550 dnl dxva2 needs avcodec
2552 AC_ARG_ENABLE(dxva2,
2553 [ --enable-dxva2 DxVA2 GPU decoding support (default auto)])
2555 AS_IF([test "${enable_dxva2}" != "no"], [
2556 if test "${SYS}" = "mingw32"; then
2557 AS_IF([test "x${have_avcodec}" = "xyes"], [
2558 AC_CHECK_HEADERS(dxva2api.h,
2560 AC_CHECK_HEADERS(libavcodec/dxva2.h, [
2561 VLC_ADD_LIBS([avcodec],[-lole32 -lshlwapi -luuid])
2562 AC_DEFINE(HAVE_AVCODEC_DXVA2, 1, [Define if avcodec has to be built with DxVA2 support.])
2563 echo "DxVA2 acceleration activated"
2565 AS_IF([test "${enable_dxva2}" = "yes"],
2566 [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
2567 [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
2570 AS_IF([test "${enable_dxva2}" = "yes"],
2571 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2572 [AC_MSG_WARN([dxva2api.h not found])])
2575 AS_IF([test "x${enable_dxva2}" != "x"], [
2576 AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
2584 dnl stream_out switcher needs libavcodec
2586 AC_ARG_ENABLE(switcher,
2587 [ --enable-switcher Stream-out switcher plugin (default disabled)])
2588 AS_IF([test "${enable_switcher}" = "yes"], [
2589 AS_IF([test "x${have_avcodec}" = "xyes"], [
2590 VLC_ADD_PLUGIN([stream_out_switcher])
2591 VLC_ADD_LIBS([stream_out_switcher],[$AVCODEC_LIBS $AVUTIL_LIBS])
2592 VLC_ADD_CFLAGS([stream_out_switcher],[$AVCODEC_CFLAGS $AVUTIL_CFLAGS])
2593 ],[AC_MSG_ERROR([Stream_out switcher depends on avcodec])
2599 dnl avformat demuxer/muxer plugin
2602 AC_ARG_ENABLE(avformat,
2603 [ --enable-avformat libavformat containers (default enabled)],, [
2604 enable_avformat="${have_avcodec}"
2606 if test "${enable_avformat}" != "no"
2608 PKG_CHECK_MODULES(AVFORMAT,[libavformat > 52.30.0 libavcodec libavutil],
2611 CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
2612 CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
2613 AC_CHECK_HEADERS(libavformat/avformat.h libavformat/avio.h)
2614 AC_CHECK_HEADERS(libavutil/avutil.h)
2615 AS_IF([test "$enable_merge_ffmpeg" = "no"], [
2616 VLC_ADD_PLUGIN([avformat access_avio])
2617 VLC_ADD_LIBS([avformat access_avio],[$AVFORMAT_LIBS $AVUTIL_LIBS])
2618 VLC_ADD_CFLAGS([avformat access_avio],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
2619 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2620 VLC_ADD_LIBS([avformat access_avio],[-Wl,-Bsymbolic])
2623 VLC_ADD_LIBS([avcodec],[$AVFORMAT_LIBS $AVUTIL_LIBS])
2624 VLC_ADD_CFLAGS([avcodec],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
2628 AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
2633 dnl swscale image scaling and conversion plugin
2636 AC_ARG_ENABLE(swscale,
2637 AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion
2638 (default enabled)]))
2639 if test "${enable_swscale}" != "no"
2641 PKG_CHECK_MODULES(SWSCALE,[libswscale],
2644 CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
2645 CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
2646 AC_CHECK_HEADERS(libswscale/swscale.h)
2647 VLC_ADD_PLUGIN([swscale])
2648 VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
2649 VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
2650 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2651 VLC_ADD_LIBS([swscale],[-Wl,-Bsymbolic])
2655 AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
2663 AC_ARG_ENABLE(postproc,
2664 [ --enable-postproc libpostproc image post-processing (default enabled)])
2665 if test "${enable_postproc}" != "no"
2667 PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
2670 CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
2671 CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
2672 AC_CHECK_HEADERS(postproc/postprocess.h)
2673 VLC_ADD_PLUGIN([postproc])
2674 VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS $AVUTIL_LIBS])
2675 VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS])
2678 AC_MSG_ERROR([${POSTPROC_PKG_ERRORS}. Pass --disable-postproc to ignore this error.])
2683 dnl faad decoder plugin
2686 [ --enable-faad faad codec (default disabled)])
2687 if test "${enable_faad}" = "yes"
2689 AC_ARG_WITH(faad-tree,
2690 [ --with-faad-tree=PATH faad tree for static linking])
2691 if test -n "${with_faad_tree}"
2693 AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
2694 real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
2695 if test -z "${real_faad_tree}"
2697 dnl The given directory can't be found
2699 AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
2701 if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
2703 dnl Use a custom faad
2704 AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
2705 VLC_ADD_PLUGIN([faad])
2706 VLC_ADD_LIBS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
2707 VLC_ADD_CPPFLAGS([faad],[-I${real_faad_tree}/include])
2709 dnl The given libfaad wasn't built
2711 AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
2714 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
2715 LDFLAGS="${LDFLAGS_save} ${LIBS_faad}"
2716 AC_CHECK_HEADERS(faad.h, ,
2717 [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
2718 AC_CHECK_LIB(faad, faacDecOpen, [
2719 VLC_ADD_PLUGIN([faad])
2720 VLC_ADD_LIBS([faad],[-lfaad]) ],
2721 AC_CHECK_LIB(faad, NeAACDecOpen, [
2722 VLC_ADD_PLUGIN([faad])
2723 VLC_ADD_LIBS([faad],[-lfaad]) ],
2724 [ AC_MSG_ERROR([Cannot find libfaad library...]) ]))
2725 LDFLAGS="${LDFLAGS_save}"
2726 CPPFLAGS="${CPPFLAGS_save}"
2731 dnl twolame encoder plugin
2733 PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])
2736 dnl QuickTime plugin
2738 AC_ARG_ENABLE(quicktime,
2739 [ --enable-quicktime QuickTime module (deprecated)])
2740 if test "${enable_quicktime}" = "yes"; then
2741 if test "${SYS}" = "mingw32"; then
2742 VLC_ADD_PLUGIN([quicktime])
2744 AC_CHECK_HEADERS(QuickTime/QuickTime.h,
2745 [ VLC_ADD_PLUGIN([quicktime])
2746 VLC_ADD_LIBS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
2747 ], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
2755 [ --enable-real Real video decoder module (default disabled)])
2756 if test "${enable_real}" = "yes"; then
2757 VLC_ADD_PLUGIN([realvideo])
2761 dnl A52/AC3 decoder plugin
2764 [ --enable-a52 A/52 support with liba52 (default enabled)])
2765 if test "${enable_a52}" != "no"
2768 [ --with-a52=PATH a52 headers and libraries])
2769 AC_ARG_WITH(a52-tree,
2770 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
2771 if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
2773 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
2774 if test -z "${real_a52_tree}"
2776 dnl The given directory can't be found
2778 AC_MSG_ERROR([${with_a52_tree} directory does not exist])
2780 dnl Use a custom a52dec
2781 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
2782 if test -f ${real_a52_tree}/include/a52.h
2785 VLC_ADD_CPPFLAGS([a52tofloat32],[-I${real_a52_tree}])
2786 VLC_ADD_LIBS([a52tofloat32],[-L${real_a52_tree}/liba52/.libs])
2787 LDFLAGS="${LDFLAGS_save} ${LIBS_a52tofloat32}"
2788 AC_CHECK_LIB(a52, a52_free, [
2789 VLC_ADD_PLUGIN([a52tofloat32])
2790 VLC_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
2791 VLC_ADD_LIBS([a52tofloat32],[-la52])
2793 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
2795 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3 ($real_a52_tree)])
2797 AC_MSG_ERROR([the specified tree has not been compiled])
2800 LDFLAGS="${LDFLAGS_save}"
2803 AC_MSG_ERROR([the specified tree does not have a52.h])
2806 if test -z "${with_a52}"
2811 LDFLAGS_test="-L${with_a52}/lib"
2812 CPPFLAGS_test="-I${with_a52}/include"
2814 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
2815 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test} ${LIBS_a52tofloat32}"
2816 AC_CHECK_HEADERS(a52dec/a52.h, [
2817 AC_CHECK_LIB(a52, a52_free, [
2818 VLC_ADD_PLUGIN([a52tofloat32])
2819 VLC_ADD_LIBS([a52tofloat32],[${LDFLAGS_test} -la52])
2820 VLC_ADD_CPPFLAGS([a52tofloat32],[${CPPFLAGS_test}])
2822 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.])
2825 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.])
2827 CPPFLAGS="${CPPFLAGS_save}"
2828 LDFLAGS="${LDFLAGS_save}"
2832 AC_ARG_WITH(a52-fixed,
2833 [ --with-a52-fixed specify if liba52 has been compiled with fixed point support],
2835 VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ])
2838 dnl DTS Coherent Acoustics decoder plugin
2840 PKG_ENABLE_MODULES_VLC([DCA], [dtstofloat32], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
2845 PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])
2850 PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])
2855 PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
2860 AC_ARG_ENABLE(tremor,
2861 [ --enable-tremor Tremor decoder support (default disabled)])
2862 if test "${enable_tremor}" = "yes"
2864 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
2865 VLC_ADD_PLUGIN([tremor])
2866 VLC_ADD_LIBS([tremor],[-lvorbisidec -logg])
2873 PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex support], [auto])
2875 AS_IF([test "${enable_speex}" != "no"], [
2876 PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
2879 AS_IF([test -n "${enable_speex}"], [
2880 AC_MSG_ERROR([${SPEEXDSP_PKG_ERRORS}.])
2882 AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
2886 AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
2889 dnl theora decoder plugin
2891 PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theora >= 1.0], [experimental theora codec], [auto])
2894 dnl dirac encoder plugin
2896 PKG_ENABLE_MODULES_VLC([DIRAC], [], [dirac >= 0.10.0], [dirac encoder], [auto])
2899 dnl schroedinger decoder plugin (for dirac format video)
2901 PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
2904 dnl PNG decoder module
2907 [ --enable-png PNG support (default enabled)])
2908 if test "${enable_png}" != "no"; then
2909 AC_CHECK_HEADERS(png.h, [
2910 LDFLAGS="${LDFLAGS_save} -lz"
2911 AC_CHECK_LIB(png, png_set_rows, [
2912 VLC_ADD_LIBS([png],[-lpng -lz -lm])
2913 VLC_ADD_PLUGIN([png osdmenu osd_parser])],
2915 LDFLAGS="${LDFLAGS_save}"
2918 AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_png}" != "no"])
2921 dnl H264 encoder plugin (using libx264)
2924 [ --enable-x264 H264 encoding support with libx264 (default enabled)])
2925 if test "${enable_x264}" != "no"; then
2926 AC_ARG_WITH(x264-tree,
2927 [ --with-x264-tree=PATH x264 tree for static linking ],[],[])
2928 if test "${with_x264_tree}" != "no" -a -n "${with_x264_tree}"
2930 real_x264_tree="`cd ${with_x264_tree} 2>/dev/null && pwd`"
2931 if test -z "${real_x264_tree}"
2933 dnl The given directory can't be found
2935 AC_MSG_ERROR([${with_x264_tree} directory does not exist])
2937 dnl Use a custom libx264
2938 AC_MSG_CHECKING(for x264.h in ${real_x264_tree})
2939 if test -f ${real_x264_tree}/x264.h
2942 VLC_ADD_CPPFLAGS([x264],[-I${real_x264_tree}])
2943 VLC_ADD_LIBS([x264],[-L${real_x264_tree}])
2944 PKG_CHECK_MODULES(X264,x264, [
2945 VLC_ADD_PLUGIN([x264])
2946 VLC_ADD_LIBS([x264],[${X264_LIBS}])
2947 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2948 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2949 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2952 AC_MSG_ERROR([the specified tree has not been compiled])
2954 LDFLAGS="${LDFLAGS_save}"
2957 AC_MSG_ERROR([the specified tree does not have x264.h])
2960 PKG_CHECK_MODULES(X264,x264 >= 0.86, [
2961 VLC_ADD_PLUGIN([x264])
2962 VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
2964 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2965 VLC_ADD_LIBS([x264],[-Wl,-Bsymbolic])
2968 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2969 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2970 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2973 if test "${enable_x264}" = "yes"; then
2974 AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
2977 LDFLAGS="${LDFLAGS_save}"
2982 dnl libfluidsynth (MIDI synthetizer) plugin
2984 PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth], [MIDI synthetiser with libfluidsynth], [auto])
2987 dnl Teletext Modules
2988 dnl vbi decoder plugin (using libzbvi)
2993 AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
2994 libzvbi (default enabled)]))
2996 AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
2997 zvbi) (default enabled if zvbi is absent)]))
2999 AS_IF( [test "${enable_zvbi}" != "no"],[
3000 PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.28],
3002 VLC_ADD_LIBS([zvbi],[$ZVBI_LIBS])
3003 if test "${SYS}" = "mingw32"; then
3004 VLC_ADD_LIBS([zvbi],[ -lpthreadGC2])
3006 VLC_ADD_CFLAGS([zvbi],[$ZVBI_CFLAGS])
3007 VLC_ADD_PLUGIN([zvbi])
3008 AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built])
3009 AS_IF( [test "${enable_telx}" = "yes"],[
3010 AC_MSG_WARN([The zvbi and telx modules are incompatible. Using zvbi.])
3013 AC_MSG_WARN([${ZVBI_PKG_ERRORS}. Enabling the telx module instead.])
3016 AS_IF( [test "${enable_telx}" != "no" ],[
3017 VLC_ADD_PLUGIN([telx])
3021 dnl libass subtitle rendering module
3023 AC_ARG_ENABLE(libass,
3024 [ --enable-libass Subtitle support using libass (default enabled)])
3025 AS_IF( [test "${enable_libass}" != "no"], [
3026 PKG_CHECK_MODULES(LIBASS, [libass >= 0.9.8],
3028 VLC_ADD_LIBS([libass],[$LIBASS_LIBS])
3029 VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
3030 VLC_ADD_PLUGIN([libass])
3032 AC_CHECK_HEADERS(fontconfig/fontconfig.h,
3033 [VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
3034 VLC_ADD_LIBS([libass],[-lfontconfig])
3037 AC_MSG_WARN([${LIBASS_PKG_ERRORS}.])
3042 dnl kate decoder plugin
3044 PKG_ENABLE_MODULES_VLC([KATE], [], [kate >= 0.3.0], [kate codec], [auto])
3047 dnl tiger rendering for kate decoder plugin
3049 AC_ARG_ENABLE(tiger,
3050 [ --enable-tiger Tiger rendering library for Kate streams (default auto)])
3051 AS_IF([test "${enable_tiger}" != "no"], [
3052 PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
3053 AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])
3054 VLC_ADD_CFLAGS([kate],[$TIGER_CFLAGS])
3055 VLC_ADD_LIBS([kate],[$TIGER_LIBS]) ],[
3056 AS_IF([test -n "${enable_tiger}"], [
3057 AC_MSG_ERROR([${TIGER_PKG_ERRORS}.])
3067 EXTEND_HELP_STRING([Video plugins:])
3072 PKG_CHECK_MODULES([GL], [gl], [
3075 AC_CHECK_HEADER([GL/gl.h], [
3084 dnl OpenGL ES 2: depends on EGL 1.1 and is currently unfinished
3085 dnl PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [auto])
3086 dnl OpenGL ES 1: depends on EGL 1.0 and is currently broken
3087 dnl PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [auto])
3090 [ --enable-egl OpenGL support through EGL (default disabled)],, [
3093 AS_IF([test "$enable_egl" != "no"], [
3094 PKG_CHECK_MODULES([EGL], [egl], [
3095 VLC_ADD_PLUGIN([gl])
3096 VLC_ADD_PLUGIN([egl])
3105 AC_CHECK_HEADERS(X11/Xlib.h)
3108 dnl X C Bindings modules
3111 [ --enable-xcb X11 support with XCB (default enabled)],, [
3112 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin" -a "${SYS}" != "symbian"], [
3118 AC_ARG_ENABLE(xvideo,
3119 [ --enable-xvideo XVideo support (default enabled)],, [
3120 enable_xvideo="$enable_xcb"
3123 [ --enable-glx OpenGL support through GLX (default enabled)],, [
3124 enable_glx="$enable_xcb"
3128 AS_IF([test "${enable_xcb}" != "no"], [
3130 PKG_CHECK_MODULES(XCB, [xcb >= 1.6])
3132 PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
3133 PKG_CHECK_MODULES(XCB_COMPOSITE, [xcb-composite])
3135 AS_IF([test "${enable_xvideo}" != "no"], [
3136 PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
3137 VLC_ADD_PLUGIN([xcb_xv])
3141 PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [
3142 VLC_ADD_PLUGIN([panoramix])
3143 VLC_ADD_LIBS([panoramix],[${XCB_RANDR_LIBS} ${XCB_LIBS}])
3144 VLC_ADD_CFLAGS([panoramix],[${XCB_RANDR_CFLAGS} ${XCB_CFLAGS}])
3146 AC_MSG_WARN([${XCB_RANDR_PKG_ERRORS}. Panoramix filter will not be supported.])
3150 PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [
3151 PKG_CHECK_MODULES(XPROTO, [xproto])
3152 VLC_ADD_PLUGIN([globalhotkeys])
3153 VLC_ADD_CFLAGS([globalhotkeys], [${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}])
3154 VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}])
3155 VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
3157 AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.])
3160 AS_IF([test "${enable_glx}" != "no"], [
3161 AS_IF([test "${have_gl}" != "yes"], [
3162 AC_MSG_ERROR([${GL_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
3164 PKG_CHECK_MODULES(XLIB_XCB, [x11-xcb], [
3165 VLC_ADD_PLUGIN([xcb_glx])
3167 AC_MSG_ERROR([${XLIB_XCB_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
3171 AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
3177 [ --enable-sdl SDL support (default enabled)])
3178 AC_ARG_ENABLE(sdl-image,
3179 [ --enable-sdl-image SDL image support (default enabled)])
3180 if test "${enable_sdl}" != "no"
3182 PKG_CHECK_MODULES(SDL, [sdl >= 1.2.10], [
3183 # SDL on Darwin is heavily patched and can only run SDL_image
3184 if test "${SYS}" != "darwin"; then
3185 VLC_ADD_PLUGIN([vout_sdl])
3187 if test "${SYS}" != "mingw32" -a "${SYS}" != "os2"; then
3188 VLC_ADD_LIBS([vout_sdl],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3190 VLC_ADD_CFLAGS([vout_sdl],[${SDL_CFLAGS}])
3191 VLC_ADD_LIBS([vout_sdl],[${SDL_LIBS}])
3194 AS_IF([ test "${enable_sdl_image}" != "no"],[
3195 PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
3196 VLC_ADD_PLUGIN([sdl_image])
3197 VLC_ADD_LIBS([sdl_image],[${SDL_IMAGE_LIBS}])
3198 VLC_ADD_CFLAGS([sdl_image], [${SDL_IMAGE_CFLAGS}])],
3199 [ AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
3203 AC_MSG_WARN([${SDL_PKG_ERRORS}.])
3210 AC_ARG_ENABLE(macosx-vout,
3211 [ --enable-macosx-vout Mac OS X video output module (default enabled on Mac OS X)])
3212 if test "x${enable_macosx_vout}" != "xno" &&
3213 (test "${SYS}" = "darwin" || test "${enable_macosx_vout}" = "yes")
3215 VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,Cocoa])
3216 VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,OpenGL])
3217 VLC_ADD_PLUGIN([vout_macosx])
3224 AC_ARG_ENABLE(freetype,
3225 [ --enable-freetype freetype support (default auto)])
3226 AC_ARG_ENABLE(fribidi,
3227 [ --enable-fribidi fribidi support (default auto)])
3228 AC_ARG_ENABLE(fontconfig,
3229 [ --enable-fontconfig fontconfig support (default auto)])
3231 if test "${enable_freetype}" != "no"; then
3232 PKG_CHECK_MODULES(FREETYPE, freetype2, [
3234 VLC_ADD_PLUGIN([freetype])
3235 VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
3236 if test "${SYS}" = "mingw32"; then
3237 VLC_ADD_LIBS([freetype],[-liconv -lz])
3239 VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
3241 AC_CHECK_HEADERS(Carbon/Carbon.h,
3242 [VLC_ADD_LIBS([freetype],[-Wl,-framework,Carbon])])
3244 dnl fontconfig support
3245 if test "${SYS}" != "mingw32"; then
3246 if test "${enable_fontconfig}" != "no"; then
3247 AC_CHECK_HEADERS(fontconfig/fontconfig.h, [
3248 VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
3249 VLC_ADD_LIBS([freetype],[-lfontconfig])
3250 ],[AC_MSG_WARN([library fontconfig not found. Styles will be disabled in freetype])])
3253 VLC_ADD_LIBS([freetype],[-lgdi32])
3257 if test "${enable_fribidi}" != "no"; then
3258 PKG_CHECK_MODULES(FRIBIDI, fribidi, [
3259 VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
3260 VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
3261 ],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional support will be disabled in FreeType.])])
3266 AS_IF([test -n "${enable_freetype}"],[
3267 AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
3274 dnl QuartzText vout module (iOS/Mac OS)
3276 AC_ARG_ENABLE(macosx-quartztext,
3277 [ --enable-macosx-quartztext Mac OS X quartz text module (default enabled on Mac OS X)])
3278 if test "x${enable_macosx_quartztext}" != "xno" &&
3279 (test "${SYS}" = "darwin" || test "${enable_macosx_quartztext}" = "yes")
3281 VLC_ADD_PLUGIN([quartztext])
3282 VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices])
3288 PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
3291 dnl android surface module
3293 AC_ARG_ENABLE(android-surface,
3294 [ --enable-android-surface Android Surface video output module (default disabled)])
3295 if test "${enable_android_surface}" = "yes"; then
3296 if test "${HAVE_ANDROID}" = "1"; then
3297 VLC_ADD_PLUGIN([android_surface])
3298 VLC_ADD_LDFLAGS([android_surface], [-ldl])
3306 AC_ARG_ENABLE(ios-vout,
3307 [ --enable-ios-vout iOS video output module (default disabled)])
3308 if test "${enable_ios_vout}" = "yes"
3310 VLC_ADD_PLUGIN([vout_ios])
3311 VLC_ADD_CFLAGS([vout_ios], [-DUSE_OPENGL_ES=1])
3312 VLC_ADD_LIBS([vout_ios], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit,-framework,Foundation])
3316 dnl Windows DirectX module
3319 if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"
3321 VLC_ADD_PLUGIN([panoramix])
3324 AC_ARG_ENABLE(directx,
3325 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
3326 if test "${enable_directx}" != "no"; then
3327 if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
3329 AC_CHECK_HEADERS(ddraw.h,
3330 [ VLC_ADD_PLUGIN([directx aout_directx])
3331 VLC_ADD_LIBS([directx],[-luser32 -lgdi32])
3332 ],[AC_MSG_ERROR([Cannot find DirectX headers!])]
3336 AC_CHECK_HEADERS(GL/wglew.h,
3337 [ VLC_ADD_PLUGIN([glwin32])
3338 VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
3340 #include <windows.h>
3345 AC_CHECK_HEADERS(d3d9.h,
3346 [ VLC_ADD_PLUGIN([direct3d])
3347 VLC_ADD_LIBS([direct3d],[-lgdi32])
3349 VLC_ADD_LIBS([direct3d directx glwin32],[-lole32])
3354 dnl Windows Direct2D plugin
3356 AC_ARG_ENABLE(direct2d,
3357 [ --enable-direct2d Win7/VistaPU Direct2D support (default auto on Win32)],, [
3358 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
3359 enable_direct2d="no"
3362 AS_IF([test "${enable_direct2d}" != "no"], [
3363 AC_CHECK_HEADERS(d2d1.h, [
3364 VLC_ADD_PLUGIN([direct2d])
3365 VLC_ADD_LIBS([direct2d],[-lgdi32 -lole32])
3367 AC_MSG_WARN([Cannot find Direct2D headers!])
3372 dnl win32 GDI plugin
3374 AC_ARG_ENABLE(wingdi,
3375 [ --enable-wingdi Win32 GDI module (default enabled on Win32)])
3376 if test "${enable_wingdi}" != "no"; then
3377 if test "${SYS}" = "mingw32"; then
3378 VLC_ADD_PLUGIN([wingdi])
3379 VLC_ADD_LIBS([wingdi],[-lgdi32 -lole32])
3381 if test "${SYS}" = "mingwce"; then
3382 VLC_ADD_PLUGIN([wingdi wingapi])
3383 VLC_ADD_LIBS([wingdi],[-laygshell])
3384 VLC_ADD_LIBS([wingapi],[-laygshell])
3390 dnl Linux framebuffer module
3392 AC_CHECK_HEADER([linux/fb.h], [
3393 VLC_ADD_PLUGIN([fb])
3399 dnl try to find using: 1 - given location; 2 - directfb-config; 3 - pkg-config
3400 dnl TODO: support for static linking
3402 AC_ARG_ENABLE(directfb,
3403 [ --enable-directfb DirectFB support (default disabled)])
3404 AC_ARG_WITH(directfb,
3405 [ --with-directfb=PATH path to DirectFB headers and libraries])
3407 if test "${enable_directfb}" = "yes"; then
3408 have_directfb="false"
3409 CPPFLAGS_mydirectfb=
3411 if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
3412 dnl Trying the given location
3413 CPPFLAGS_save="${CPPFLAGS}"
3416 CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
3417 LIBS_new="-L${with_directfb}/lib/fusion/.libs/ -L${with_directfb}/lib/direct/.libs/"
3418 LIBS_new="${LIBS_new} -L${with_directfb}/src/.libs/"
3420 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
3421 LIBS="${LIBS} ${LIBS_new}"
3423 dnl FIXME: too obscure
3424 AC_CHECK_HEADER([directfb.h], [
3425 AC_CHECK_LIB([direct],[direct_initialize], [
3426 AC_CHECK_LIB([fusion], [fusion_enter], [
3427 AC_CHECK_LIB([directfb], [DirectFBInit], have_directfb="true", have_directfb="false")
3428 ], have_directfb="false")
3429 ], have_directfb="false")
3430 ], have_directfb="false")
3433 CPPFLAGS="${CPPFLAGS_save}"
3436 if test "${have_directfb}" = "true"; then
3437 LIBS_mydirectfb="${LIBS_new} -lz $LIBDL -ldirectfb -lfusion -ldirect -lpthread"
3438 CPPFLAGS_mydirectfb="${CPPFLAGS_new}"
3441 dnl Look for directfb-config
3442 AC_PATH_PROG(DIRECTFB_CONFIG, directfb-config, no, ${PATH})
3443 if test "${DIRECTFB_CONFIG}" != "no"; then
3444 CPPFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --cflags`"
3445 LIBS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
3446 have_directfb="true"
3448 dnl Trying with pkg-config
3449 PKG_CHECK_MODULES(DIRECTFB, directfb, [
3450 CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
3451 LIBS_mydirectfb="${DIRECTFB_LIBS}"
3452 have_directfb="true"
3453 ], [have_directfb="false"])
3456 if test "${have_directfb}" = "true"; then
3457 VLC_ADD_PLUGIN([directfb])
3458 VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
3459 VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}])
3461 AC_MSG_ERROR([${DIRECTFB_PKG_ERRORS}.])
3469 [ --enable-aa aalib output (default disabled)])
3470 if test "${enable_aa}" = "yes"
3472 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
3473 if test "${have_aa}" = "true"
3475 VLC_ADD_PLUGIN([aa])
3476 VLC_ADD_LIBS([aa],[-laa])
3477 if test "${SYS}" != "mingw32"; then
3478 VLC_ADD_LIBS([aa],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3486 PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3492 EXTEND_HELP_STRING([Audio plugins:])
3495 dnl Pulseaudio module
3497 AC_ARG_ENABLE(pulse,
3498 [AS_HELP_STRING([--enable-pulse],
3499 [use the PulseAudio client library (default auto)])])
3501 AS_IF([test "${enable_pulse}" != "no"], [
3502 PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.22], [
3505 PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.16], [
3506 AS_IF([test "${no_x}" != "yes"], [
3508 PULSE_LIBS="$PULSE_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11"
3510 AS_IF([test "${enable_pulse}" = "yes"], [
3511 AC_MSG_ERROR([Xlib is required with PulseAudio pre-0.9.22 versions
3512 (see http://www.pulseaudio.org/ticket/799 for further reference).])
3516 AS_IF([test "x${enable_pulse}" != "x"], [
3517 AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 0.9.22 or later required.])
3522 AM_CONDITIONAL([HAVE_PULSE], [test "${have_pulse}" = "yes"])
3528 [AS_HELP_STRING([--enable-alsa],
3529 [support the Advanced Linux Sound Architecture (default auto)])],, [
3530 AS_IF([test "$SYS" = "linux" -a "${have_pulse}" = "no"], [
3535 AS_IF([test "${enable_alsa}" != "no"], [
3536 PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.16], [
3539 AS_IF([test "x${enable_alsa}" != "x"], [
3540 AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.16 or later required.])
3544 AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
3547 dnl Open Sound System module
3550 [AS_HELP_STRING([--enable-oss],
3551 [support the Open Sound System OSS (default enabled on BSD)])],, [
3552 AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "mingwce" -o "$SYS" = "linux"], [
3558 AS_IF([test "$enable_oss" != "no"], [
3559 AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
3561 AC_CHECK_LIB(ossaudio, main, [
3562 OSS_LIBS="-lossaudio"
3567 AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
3570 dnl Portaudio module
3572 PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library support], [auto])
3575 dnl win32 waveOut plugin
3577 AC_ARG_ENABLE(waveout,
3578 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
3579 if test "${enable_waveout}" != "no"; then
3580 if test "${SYS}" = "mingw32"; then
3581 VLC_ADD_PLUGIN([waveout])
3582 VLC_ADD_LIBS([waveout],[-lwinmm])
3584 if test "${SYS}" = "mingwce"; then
3585 VLC_ADD_PLUGIN([waveout])
3590 dnl CoreAudio plugin
3592 AC_ARG_ENABLE(macosx-audio,
3593 [ --enable-macosx-audio Mac OS X audio module (default enabled on MacOS X)])
3594 if test "x${enable_macosx_audio}" != "xno" &&
3595 (test "${SYS}" = "darwin" || test "${enable_macosx_audio}" = "yes")
3597 AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
3598 [ VLC_ADD_PLUGIN([auhal])
3599 VLC_ADD_LIBS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,Carbon])
3600 ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
3604 dnl AudioQueue plugin
3606 AC_ARG_ENABLE(audioqueue,
3607 [ --enable-audioqueue AudioQueue audio module (default disabled)])
3608 if test "${enable_audioqueue}" = "yes"
3610 VLC_ADD_PLUGIN([audioqueue])
3611 VLC_ADD_LIBS([audioqueue], [-Wl,-framework,AudioToolbox,-framework,CoreFoundation])
3617 PKG_ENABLE_MODULES_VLC([JACK], [jack access_jack], [jack], [JACK audio I/O modules],[auto])
3620 dnl OpenSLES Android
3622 AC_ARG_ENABLE(opensles,
3623 [ --enable-opensles Android OpenSL ES audio module (default disabled)])
3624 if test "${HAVE_ANDROID}" = "1"; then
3625 if test "${enable_opensles}" = "yes"; then
3626 AC_CHECK_HEADERS(SLES/OpenSLES.h,
3627 [ VLC_ADD_PLUGIN([opensles_android]) ],
3628 [ AC_MSG_ERROR([cannot find OpenSLES headers])] )
3633 dnl libsamplerate plugin
3635 PKG_ENABLE_MODULES_VLC([SAMPLERATE], [], [samplerate], [Resampler with libsamplerate], [auto])
3641 [AS_HELP_STRING([--enable-kai],
3642 [support the K Audio Interface KAI (default enabled on OS/2)])],, [
3643 AS_IF([test "$SYS" = "os2"], [
3649 AS_IF([test "$enable_kai" != "no"], [
3650 AC_CHECK_HEADERS([kai.h], [
3652 AC_CHECK_LIB(kai, main, [
3658 AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"])
3661 dnl Interface plugins
3664 EXTEND_HELP_STRING([Interface plugins:])
3669 AC_ARG_ENABLE(skins2,
3670 [AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)])])
3671 AS_IF([test "${enable_skins2}" != "no"], [
3672 have_skins_deps="yes"
3673 AS_IF([test "${SYS}" = "mingw32"], [
3674 VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
3675 VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
3676 VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
3678 ], [test "${SYS}" = "darwin"], [
3679 VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
3680 VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
3681 VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon])
3684 PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
3685 PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
3686 PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
3687 VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
3688 VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
3689 VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
3692 AS_IF([test "${have_freetype}" != "yes"], [
3693 have_skins_deps="no"
3696 AS_IF([test "${have_skins_deps}" = "no"], [
3697 AS_IF([test "x${enable_skins2}" = "x"], [
3698 AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
3700 AC_MSG_ERROR([Skins2 interface requires FreeType, libxpm, libxext and libxinerama])
3704 VLC_ADD_PLUGIN([skins2])
3705 ALIASES="${ALIASES} svlc"
3708 AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
3710 AC_ARG_ENABLE(libtar,
3711 [ --enable-libtar libtar support for skins2 (default auto)])
3712 AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
3713 AC_CHECK_HEADERS(libtar.h, [
3714 VLC_ADD_LIBS([skins2],[-ltar])
3721 AC_ARG_ENABLE(hildon,
3722 [ --enable-hildon Hildon touchscreen UI (default disabled)])
3723 AS_IF([test "${enable_hildon}" = "yes"], [
3724 PKG_CHECK_MODULES(HILDON, [hildon-1], [
3725 PKG_CHECK_MODULES(HILDON_FM, hildon-fm-2, [
3726 VLC_ADD_CFLAGS([hildon],[${HILDON_FM_CFLAGS} -DHAVE_HILDON_FM])
3727 VLC_ADD_LIBS([hildon],[${HILDON_FM_LIBS}])
3729 AC_MSG_WARN([${HILDON_FM_PKG_ERRORS}.])
3731 VLC_ADD_CFLAGS([hildon],[${HILDON_CFLAGS} ${X_CFLAGS}])
3732 VLC_ADD_LIBS([hildon],[${HILDON_LIBS} ${X_LIBS} ${X_PRE_LIBS} -lX11])
3733 VLC_ADD_PLUGIN([hildon])
3734 ALIASES="${ALIASES} mvlc"
3736 AS_IF([test "${enable_hildon}" = "yes"],[
3737 AC_MSG_ERROR([${HILDON_PKG_ERRORS}.])
3742 AM_CONDITIONAL(BUILD_HILDON, [test "${enable_hildon}" = "yes"])
3748 [ --enable-qt4 Qt 4 support (default enabled) ],, [
3749 AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
3751 AS_IF([test "${enable_qt4}" != "no"], [
3752 PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.6.0], [
3753 VLC_ADD_PLUGIN([qt4])
3754 VLC_ADD_LIBS([qt4],[${QT4_LIBS}])
3755 VLC_ADD_CXXFLAGS([qt4],[${QT4_CFLAGS}])
3756 ALIASES="${ALIASES} qvlc"
3759 CPPFLAGS_save="${CPPFLAGS}"
3761 AC_MSG_CHECKING([whether Qt uses X11])
3762 CPPFLAGS="${CPPFLAGS} ${QT4_CFLAGS}"
3763 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
3765 #if !defined (Q_WS_X11)
3769 AC_MSG_RESULT([yes])
3770 VLC_ADD_LIBS([qt4],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3771 VLC_ADD_CXXFLAGS([qt4],[${X_CFLAGS}])
3776 CPPFLAGS="${CPPFLAGS_save}"
3779 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
3780 VLC_ADD_LIBS([qt4],[-lole32])
3782 AS_IF([test "${SYS}" = "darwin" ],[
3783 VLC_ADD_LIBS([qt4], [-Wl,-framework,Cocoa])
3785 AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
3786 AC_PATH_PROG(RCC, rcc, rcc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
3787 AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
3789 AS_IF([test -n "${enable_qt4}"],[
3790 AC_MSG_ERROR([${QT4_PKG_ERRORS}.])
3792 AC_MSG_WARN([${QT4_PKG_ERRORS}.])
3797 AM_CONDITIONAL(ENABLE_QT4, [test "x$enable_qt4" != "xno"])
3800 dnl Simple test for skins2 dependency
3802 AS_IF([test "${enable_skins2}" != "no" && test "x$enable_qt4" = "xno"], [
3803 AC_MSG_ERROR([The skins2 module depends on a the Qt4 development package. 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.])
3807 dnl MacOS X gui module
3809 AC_ARG_ENABLE(macosx,
3810 [ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)])
3811 if test "x${enable_macosx}" != "xno" &&
3812 (test "${SYS}" = "darwin" || test "${enable_macosx}" = "yes")
3814 VLC_ADD_LIBS([macosx minimal_macosx],[-Wl,-framework,Cocoa])
3815 VLC_ADD_LIBS([macosx minimal_macosx],[-Wl,-framework,OpenGL])
3816 VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,Carbon])
3817 VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,CoreServices])
3818 VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,AGL])
3819 VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit])
3820 VLC_ADD_LIBS([macosx], [-Wl,-framework,IOKit])
3821 VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
3822 VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle])
3823 VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit -Wl,-framework,BGHUDAppKit])
3824 VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit])
3826 VLC_ADD_LIBS([macosx], [-Wl,-framework,AddressBook])
3827 VLC_ADD_LIBS([macosx], [-Wl,-framework,WebKit])
3828 VLC_ADD_OBJCFLAGS([macosx minimal_macosx], [-fobjc-exceptions] )
3830 VLC_ADD_PLUGIN([macosx minimal_macosx])
3834 dnl MacOS X dialor provider
3836 AC_ARG_ENABLE(macosx-dialog-provider,
3837 [ --enable-macosx-dialog-provider Mac OS X dialog module (default enabled on Mac OS X)])
3838 if test "x${enable_macosx_dialog_provider}" != "xno" &&
3839 (test "${SYS}" = "darwin" || test "${enable_macosx_dialog_provider}" = "yes")
3841 VLC_ADD_LIBS([macosx_dialog_provider],[-Wl,-framework,Cocoa])
3842 VLC_ADD_PLUGIN([macosx_dialog_provider])
3848 AC_ARG_ENABLE(ncurses,
3849 [ --disable-ncurses ncurses interface support (default disabled)],
3850 [if test "${enable_ncurses}" != "no"; then
3851 AC_CHECK_HEADER(ncurses.h,
3852 [AC_CHECK_LIB(ncursesw, mvprintw,
3853 [VLC_ADD_PLUGIN([ncurses])
3854 VLC_ADD_LIBS([ncurses],[-lncursesw])
3855 ALIASES="${ALIASES} nvlc"
3856 AC_CHECK_LIB(ncursesw, tgetent, [],
3857 AC_CHECK_LIB(tinfow, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfow])],
3858 [AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])],
3859 [AS_IF([test "${enable_ncurses}" = "yes"],
3860 [AC_MSG_ERROR([tgetent not found in ncursesw tinfow tinfo]
3866 [AS_IF([test "${enable_ncurses}" = "yes"], [
3867 AC_MSG_ERROR([libncursesw not found])])]
3869 [AS_IF([test "${enable_ncurses}" = "yes"], [
3870 AC_MSG_ERROR([ncurses.h not found])])]
3879 [ --enable-xosd xosd interface support (default disabled)])
3880 if test "${enable_xosd}" = "yes"
3882 AC_CHECK_HEADERS(xosd.h,
3883 AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
3884 VLC_ADD_PLUGIN([xosd])
3885 VLC_ADD_LIBS([xosd],[-lxosd])
3891 dnl Framebuffer (overlay) plugin
3893 AC_ARG_ENABLE(fbosd,
3894 [ --enable-fbosd fbosd interface support (default disabled)])
3895 if test "${enable_fbosd}" = "yes"
3897 AC_CHECK_HEADERS(linux/fb.h, [
3898 VLC_ADD_PLUGIN([fbosd])
3906 [ --enable-lirc lirc support (default disabled)])
3907 if test "${enable_lirc}" = "yes"
3909 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
3910 if test "${have_lirc}" = "true"
3912 VLC_ADD_PLUGIN([lirc])
3913 VLC_ADD_LIBS([lirc],[-llirc_client])
3917 EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
3919 dnl Visualisation plugin
3921 AC_ARG_ENABLE(visual,
3922 [ --enable-visual visualisation plugin (default enabled)])
3923 if test "${enable_visual}" != "no"
3925 VLC_ADD_PLUGIN([visual])
3929 dnl goom visualization plugin
3931 PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [auto])
3934 dnl libprojectM visualization plugin
3936 AC_ARG_ENABLE(projectm,
3937 [ --enable-projectm projectM visualization plugin (default enabled)])
3938 AS_IF([test "${enable_projectm}" != "no"],
3940 PKG_CHECK_MODULES(PROJECTM, libprojectM,
3942 VLC_ADD_PLUGIN([projectm])
3943 VLC_ADD_CXXFLAGS([projectm],[$PROJECTM_CFLAGS])
3944 VLC_ADD_LIBS([projectm],[$PROJECTM_LIBS])
3945 PKG_CHECK_MODULES(PROJECTM2, [libprojectM >= 2.0.0],
3946 [ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ],
3947 [ AC_MSG_WARN( [Using libprojectM version 1] )
3950 AC_MSG_WARN([${PROJECTM_PKG_ERRORS}.])
3955 dnl AtmoLight (homemade Philips Ambilight clone)
3958 AS_HELP_STRING([--disable-atmo],[AtmoLight (homemade Philips Ambilight clone)
3959 (default enabled)]),, [enable_atmo="yes"])
3960 AS_IF([test "${enable_atmo}" != no], [
3961 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "linux"], [
3963 VLC_ADD_PLUGIN([atmo])
3968 EXTEND_HELP_STRING([Service Discovery plugins:])
3970 dnl Bonjour services discovery
3971 PKG_ENABLE_MODULES_VLC([BONJOUR], [], [avahi-client >= 0.6], [Bonjour services discovery], [auto])
3974 dnl libudev services discovery
3975 PKG_ENABLE_MODULES_VLC([UDEV], [], [libudev >= 142], [Linux udev services discovery], [auto])
3978 dnl MTP devices services discovery
3979 PKG_ENABLE_MODULES_VLC([MTP], [mtp access_mtp], [libmtp >= 1.0.0], [MTP devices support], [auto])
3982 dnl UPnP Plugin (Intel SDK)
3984 PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto])
3985 VLC_ADD_CXXFLAGS([upnp],[${UPNP_CFLAGS}])
3987 EXTEND_HELP_STRING([Misc options:])
3992 PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
3998 AC_ARG_ENABLE(libgcrypt,
3999 [ --disable-libgcrypt gcrypt support (default enabled)])
4000 AS_IF([test "${enable_libgcrypt}" != "no"], [
4001 AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [
4002 libgcrypt-config --version >/dev/null || \
4003 AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found])
4004 AC_CHECK_LIB(gcrypt, gcry_control, [
4005 have_libgcrypt="yes"
4006 GCRYPT_CFLAGS="`libgcrypt-config --cflags`"
4007 GCRYPT_LIBS="`libgcrypt-config --libs`"
4009 AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
4010 ], [`libgcrypt-config --libs`])
4012 AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
4013 ], [#include <gcrypt.h>]
4017 if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
4018 AS_IF([test "${have_libgcrypt}" = "yes"],[
4019 VLC_ADD_LIBS([rtp stream_out_rtp], [${GCRYPT_LIBS}])
4022 AC_SUBST(GCRYPT_CFLAGS)
4023 AC_SUBST(GCRYPT_LIBS)
4024 AM_CONDITIONAL([HAVE_GCRYPT], [test "${have_libgcrypt}" = "yes"])
4029 AC_ARG_ENABLE(gnutls,
4030 [ --enable-gnutls GNU TLS TLS/SSL support (default enabled)])
4032 AS_IF([test "${have_libgcrypt}" != "yes"], [
4033 AS_IF([test "${enable_gnutls}" = "yes"], [
4034 AC_MSG_ERROR([--enable-gnutls and --disable-libgcrypt are mutually exclusive.])
4038 AS_IF([test "${enable_gnutls}" != "no"], [
4039 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.0.0], [
4040 VLC_ADD_PLUGIN([gnutls])
4041 VLC_ADD_CFLAGS([gnutls], [$GNUTLS_CFLAGS])
4042 AS_IF([test "${SYS}" = "mingw32"], [
4043 dnl pkg-config --libs gnutls omits these
4044 VLC_ADD_LIBS([gnutls], [-lz ${LTLIBINTL} -lcrypt32])
4046 VLC_ADD_LIBS([gnutls], [${GCRYPT_LIBS}])
4047 VLC_ADD_CFLAGS([gnutls], [${GCRYPT_CFLAGS}])
4048 VLC_ADD_LIBS([gnutls], [$GNUTLS_LIBS])
4050 AS_IF([test -n "${enable_gnutls}"], [
4051 AC_MSG_ERROR([${GNUTLS_PKG_ERRORS}.)])
4058 dnl RemoteOSD plugin (VNC client as video filter)
4060 AC_MSG_CHECKING([whether to enable the RemoteOSD plugin])
4061 AS_IF([test "${have_libgcrypt}" = "yes"],[
4063 VLC_ADD_PLUGIN([remoteosd])
4064 VLC_ADD_LIBS([remoteosd], ${GCRYPT_LIBS})
4065 VLC_ADD_CFLAGS([remoteosd], ${GCRYPT_CFLAGS})
4068 AC_MSG_WARN([libgcrypt support required for RemoteOSD plugin])
4075 AC_MSG_CHECKING([whether to enable the RAOP plugin])
4076 AS_IF([test "${have_libgcrypt}" = "yes"], [
4078 VLC_ADD_PLUGIN([stream_out_raop])
4079 VLC_ADD_LIBS([stream_out_raop], [${GCRYPT_LIBS} -lgpg-error])
4080 VLC_ADD_CFLAGS([stream_out_raop], [${GCRYPT_CFLAGS}])
4083 AC_MSG_WARN([libgcrypt support required for RAOP plugin])
4088 dnl Nokia MCE plugin (Maemo screen unblanking)
4090 PKG_CHECK_MODULES([MCE], [dbus-1 mce], [VLC_ADD_PLUGIN([mce])], [true])
4093 AS_IF([test -f "/etc/maemo_version"], [
4094 AC_DEFINE([HAVE_MAEMO], 1, [Define to 1 if building for the Maemo platform.])
4101 AC_ARG_ENABLE(taglib,
4102 [AS_HELP_STRING([--disable-taglib],
4103 [do not use TagLib (default enabled)])])
4104 AS_IF([test "${enable_taglib}" != "no"], [
4105 PKG_CHECK_MODULES(TAGLIB, taglib >= 1.5, [
4106 VLC_ADD_PLUGIN([taglib])
4107 VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz])
4108 VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS])
4110 AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])])
4115 dnl update checking system
4117 AC_ARG_ENABLE(update-check,
4118 [ --enable-update-check update checking system (default disabled)])
4119 if test "${enable_update_check}" = "yes"
4121 if test "${have_libgcrypt}" != "yes"
4123 AC_MSG_ERROR([libgcrypt is required for update checking system])
4125 VLC_ADD_LIBS([libvlccore], [${GCRYPT_LIBS}])
4126 VLC_ADD_CFLAGS([libvlccore], [${GCRYPT_CFLAGS}])
4127 AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
4131 dnl Growl notification plugin
4133 AC_ARG_ENABLE(growl,
4134 [ --enable-growl growl notification plugin (default disabled)],,
4136 AS_IF([test "${enable_growl}" != "no"], [
4137 AC_CHECK_HEADERS(${CONTRIB_DIR}/Growl/Growl.framework/Versions/A/Headers/GrowlDefines.h, [
4138 VLC_ADD_PLUGIN([growl])
4139 VLC_ADD_LIBS([growl], [-F${CONTRIB_DIR}/Growl -Wl,-framework,Growl,-framework,CoreFoundation])
4140 VLC_ADD_OBJCFLAGS([growl], [-F${CONTRIB_DIR}/Growl])
4141 VLC_ADD_OBJCFLAGS([growl], [-fobjc-exceptions] )
4147 dnl Libnotify notification plugin
4149 PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-2.0], [libnotify notification], [auto])
4154 AC_ARG_ENABLE(media-library,
4155 [ --enable-media-library media library (default disabled)])
4156 AS_IF([test "${enable_media_library}" = "yes"], [
4157 AC_DEFINE([MEDIA_LIBRARY], 1, [Define if you want to use the VLC media library])
4158 VLC_ADD_CPPFLAGS([qt4],"-DMEDIA_LIBRARY")
4159 VLC_ADD_PLUGIN([media_library])
4164 AS_IF([test "${SYS}" != "darwin"], [
4165 PKG_ENABLE_MODULES_VLC([SQLITE], [], [sqlite3 >= 3.6.0], [sqlite3], [auto])
4167 AS_IF([test "${enable_sqlite}" != "no"], [
4168 AC_CHECK_HEADERS(sqlite3.h, [
4169 VLC_ADD_PLUGIN([sqlite])
4170 VLC_ADD_LIBS([sqlite], [-lsqlite3])
4172 AC_MSG_ERROR([sqlite3 is required for the media library])
4180 dnl Endianness check
4183 AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [
4184 DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1"
4188 AC_SUBST(DEFS_BIGENDIAN)
4191 dnl Where to install KDE solid .desktop
4193 AC_ARG_VAR([KDE4_CONFIG], [kde4-config utility])
4194 AS_IF([test "x$KDE4_CONFIG" = "x"], [
4195 KDE4_CONFIG="kde4-config"
4198 AC_ARG_WITH(kde-solid,
4199 AS_HELP_STRING([--with-kde-solid=PATH],
4200 [KDE Solid actions directory (auto)]),, [
4202 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ; then
4203 with_kde_solid="yes"
4207 AS_IF([test "${with_kde_solid}" != "no"], [
4208 AS_IF([test "${with_kde_solid}" = "yes"], [
4209 kde4datadir="`${KDE4_CONFIG} --install data`"
4210 AS_IF([test "x$kde4datadir" = "x"], [kde4datadir='${datadir}/kde4/apps'])
4211 soliddatadir="${kde4datadir}/solid/actions"
4213 soliddatadir="${with_kde_solid}"
4216 AC_SUBST(soliddatadir)
4217 AM_CONDITIONAL(KDE_SOLID, [test "x${soliddatadir}" != "x"])
4220 dnl DLL loader copied from MPlayer copied from somewhere else (WINE ?)
4223 AC_ARG_ENABLE(loader,
4224 AS_HELP_STRING([--enable-loader],[build DLL loader for ELF i386 platforms
4225 (default disabled)]))
4226 AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
4227 AS_IF([test "${enable_loader}" = "yes"],
4228 [ VLC_ADD_PLUGIN([dmo])
4229 VLC_ADD_CPPFLAGS([dmo quicktime realvideo],[-I\\\${top_srcdir}/modules/codec/loader])
4230 VLC_ADD_LIBS([dmo quicktime realvideo],[\\\${top_builddir}/modules/codec/loader/libloader.la])
4231 VLC_ADD_CPPFLAGS([realvideo], [-DLOADER])
4232 VLC_ADD_LIBS([dmo quicktime], [-lpthread])
4235 EXTEND_HELP_STRING([Components:])
4241 [ --enable-vlc build the VLC media player (default enabled)])
4242 AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"])
4244 AC_ARG_ENABLE(macosx-vlc-app,
4245 [ --enable-macosx-vlc-app build the VLC media player (default enabled on Mac OS X)])
4246 AM_CONDITIONAL(BUILD_MACOSX_VLC_APP, [test "${enable_macosx_vlc_app}" != "no" &&
4247 (test "${SYS}" = "darwin" || test "${enable_macosx_vlc_app}" = "yes") ])
4250 dnl Stuff used by the program
4252 VERSION_MESSAGE="${VERSION} ${CODENAME}"
4253 COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
4254 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION_MESSAGE}", [Simple version string])
4255 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "${COPYRIGHT_MESSAGE}", [Copyright string])
4256 AC_DEFINE_UNQUOTED(COPYRIGHT_YEARS, "${COPYRIGHT_YEARS}", [The copyright years])
4257 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
4258 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,${VERSION_MAJOR}, [version major number])
4259 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,${VERSION_MINOR}, [version minor number])
4260 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_REVISION,${VERSION_REVISION}, [version revision number])
4261 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_EXTRA,${VERSION_EXTRA}, [version extra number])
4262 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_DEV,"${VERSION_DEV}", [version development string])
4263 AC_SUBST(COPYRIGHT_MESSAGE)
4264 AC_SUBST(VERSION_MESSAGE)
4265 AC_SUBST(VERSION_MAJOR)
4266 AC_SUBST(VERSION_MINOR)
4267 AC_SUBST(VERSION_REVISION)
4268 AC_SUBST(VERSION_EXTRA)
4269 AC_SUBST(COPYRIGHT_YEARS)
4270 AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure])
4271 AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -f 2>/dev/null || hostname`", [host which ran configure])
4272 AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler])
4274 dnl Handle substvars that use $(top_srcdir)
4276 CPPFLAGS_save="-I\$(top_srcdir)/include -I\$(top_builddir)/include ${CPPFLAGS_save}"
4284 dnl Sort the modules list
4286 PLUGINS=$( (for i in `echo $PLUGINS`; do echo $i; done)|sort|xargs )
4289 dnl Configuration is finished
4299 AC_SUBST(WINE_SDK_PATH)
4301 AC_SUBST(AM_CPPFLAGS)
4302 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
4303 AC_SUBST(FILE_LIBVLCCORE_DLL)
4304 AC_SUBST(FILE_LIBVLC_DLL)
4319 modules/access/Makefile
4320 modules/access/bd/Makefile
4321 modules/access/dshow/Makefile
4322 modules/access/mms/Makefile
4323 modules/access/rtp/Makefile
4324 modules/access/rtsp/Makefile
4325 modules/access/vcd/Makefile
4326 modules/access/vcdx/Makefile
4327 modules/access/screen/Makefile
4328 modules/access/zip/Makefile
4329 modules/access/zip/unzip/Makefile
4330 modules/access_output/Makefile
4331 modules/audio_filter/Makefile
4332 modules/audio_mixer/Makefile
4333 modules/audio_output/Makefile
4334 modules/codec/Makefile
4335 modules/codec/avcodec/Makefile
4336 modules/codec/dmo/Makefile
4337 modules/codec/loader/Makefile
4338 modules/codec/omxil/Makefile
4339 modules/codec/shine/Makefile
4340 modules/codec/spudec/Makefile
4341 modules/codec/wmafixed/Makefile
4342 modules/control/Makefile
4343 modules/control/dbus/Makefile
4344 modules/control/globalhotkeys/Makefile
4345 modules/demux/Makefile
4346 modules/demux/asf/Makefile
4347 modules/demux/avformat/Makefile
4348 modules/demux/avi/Makefile
4349 modules/demux/mkv/Makefile
4350 modules/demux/mp4/Makefile
4351 modules/demux/mpeg/Makefile
4352 modules/demux/playlist/Makefile
4353 modules/gui/Makefile
4354 modules/gui/macosx/Makefile
4355 modules/gui/hildon/Makefile
4356 modules/gui/minimal_macosx/Makefile
4357 modules/gui/macosx_dialog_provider/Makefile
4358 modules/gui/qt4/Makefile
4359 modules/gui/skins2/Makefile
4360 modules/lua/Makefile
4361 modules/meta_engine/Makefile
4362 modules/misc/Makefile
4363 modules/misc/playlist/Makefile
4364 modules/misc/osd/Makefile
4365 modules/misc/stats/Makefile
4366 modules/media_library/Makefile
4367 modules/mux/Makefile
4368 modules/mux/mpeg/Makefile
4369 modules/notify/Makefile
4370 modules/packetizer/Makefile
4371 modules/services_discovery/Makefile
4372 modules/stream_filter/Makefile
4373 modules/stream_filter/dash/Makefile
4374 modules/stream_out/Makefile
4375 modules/stream_out/transcode/Makefile
4376 modules/text_renderer/Makefile
4377 modules/video_chroma/Makefile
4378 modules/video_filter/Makefile
4379 modules/video_filter/dynamicoverlay/Makefile
4380 modules/video_output/Makefile
4381 modules/video_output/msw/Makefile
4382 modules/visualization/Makefile
4383 modules/visualization/visual/Makefile
4384 modules/mmx/Makefile
4385 modules/mmxext/Makefile
4386 modules/3dnow/Makefile
4387 modules/sse2/Makefile
4388 modules/altivec/Makefile
4389 modules/arm_neon/Makefile
4392 AM_COND_IF([HAVE_WIN32], [
4394 extras/package/win32/spad.nsi
4395 extras/package/win32/vlc.win32.nsi
4399 AM_COND_IF([HAVE_DARWIN], [
4401 extras/package/macosx/Info.plist
4402 extras/package/macosx/Resources/English.lproj/InfoPlist.strings
4406 dnl Generate makefiles
4409 dnl Do we have to use make or gmake ?
4410 USE_MAKE_OR_GMAKE=`case "${SYS}" in openbsd*) echo "gmake";; *) echo "make";; esac`
4411 dnl Shortcut to nice compile message
4413 if test -n $SHELL; then
4414 SHELL=${CONFIG_SHELL-/bin/sh}
4416 echo '#! '$SHELL >compile
4417 echo rm -f .error\$\$ >>compile
4418 echo ERROR=0 >>compile
4419 echo export PATH=$PATH LANG=C >>compile
4420 echo "($USE_MAKE_OR_GMAKE V=1 \$@ 2>&1 || touch .error\$\$)| \\" >>compile
4421 echo '`sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/buildsystem/make.pl' >>compile
4422 echo test -f .error\$\$ \&\& ERROR=1 >>compile
4423 echo rm -f .error\$\$ >>compile
4424 echo exit \$ERROR >>compile
4428 libvlc configuration
4429 --------------------
4430 version : ${VERSION}
4432 architecture : ${ARCH}
4433 optimizations : ${enable_optimizations}"
4434 if test "${enable_vlc}" != "no"; then
4435 echo "vlc aliases :${ALIASES}"
4437 echo "build vlc executable : no"
4440 To build vlc and its plugins, type \`./compile' or \`$USE_MAKE_OR_GMAKE'."