1 dnl Autoconf settings for vlc
3 AC_COPYRIGHT([Copyright 2002-2011 the VideoLAN team])
5 AC_INIT(vlc, 1.2.0-pre2)
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
342 AC_MSG_RESULT([not found])
348 AS_IF([test "${with_contrib}" != "no"], [
349 CONTRIB_DIR="${with_contrib}"
352 AC_MSG_RESULT([disabled])
355 AS_IF([test -n "${CONTRIB_DIR}"], [
356 AS_IF([test -d "${CONTRIB_DIR}/lib"],[
357 CONTRIB_DIR=`cd "${CONTRIB_DIR}" && pwd`
359 echo "${CONTRIB_DIR}/lib not found" >&AS_MESSAGE_LOG_FD
361 AC_MSG_RESULT([not usable])
365 AS_IF([test -n "${CONTRIB_DIR}"], [
366 AC_MSG_RESULT([${CONTRIB_DIR}])
367 export PATH=${CONTRIB_DIR}/bin:$PATH
368 CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
369 CPPFLAGS_save="${CPPFLAGS_save} -I${CONTRIB_DIR}/include"
370 CFLAGS="${CFLAGS} -I${CONTRIB_DIR}/include"
371 CFLAGS_save="${CFLAGS_save} -I${CONTRIB_DIR}/include"
372 CXXFLAGS="${CXXFLAGS} -I${CONTRIB_DIR}/include"
373 CXXFLAGS_save="${CXXFLAGS_save} -I${CONTRIB_DIR}/include"
374 OBJCFLAGS="${OBJCFLAGS} -I${CONTRIB_DIR}/include"
375 OBJCFLAGS_save="${OBJCFLAGS_save} -I${CONTRIB_DIR}/include"
376 AS_IF([test "$build" = "$host" -o "$PKG_CONFIG_LIBDIR"], [
377 export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
379 export PKG_CONFIG_LIBDIR="${CONTRIB_DIR}/lib/pkgconfig"
381 LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
382 LDFLAGS_save="${LDFLAGS_save} -L${CONTRIB_DIR}/lib"
384 AS_IF([test "${SYS}" = "darwin"], [
385 export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
386 export DYLD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$DYLD_LIBRARY_PATH"
389 AS_IF([test -n "${with_contrib}" && test "${with_contrib}" != "no"], [
390 AC_MSG_ERROR([Third party libraries not found!])
393 AC_SUBST(CONTRIB_DIR)
396 dnl Sadly autoconf does not think about testing foo.exe when ask to test
397 dnl for program foo on win32
399 case "${build_os}" in
401 ac_executable_extensions=".exe"
407 dnl Android is linux, but a bit different
408 AS_IF([test "$SYS" = linux],[
409 AC_MSG_CHECKING([for an Android system])
410 AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
411 [[#ifndef __ANDROID__
422 AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1")
426 dnl It's very bad, but our former custom system was worst
430 dnl override platform specific check for dependent libraries
431 dnl otherwise libtool linking of shared libraries will
432 dnl fail on anything other than pass_all.
433 AC_CACHE_VAL(lt_cv_deplibs_check_method,
434 [lt_cv_deplibs_check_method=pass_all])
436 LT_INIT([dlopen win32-dll shared disable-static])
438 LT_LANG([Windows Resource])
440 m4_undefine([AC_DEPLIBS_CHECK_METHOD])
441 m4_defun([AC_DEPLIBS_CHECK_METHOD],[])
443 lt_cv_deplibs_check_method=pass_all
445 AS_IF([test "${enable_shared}" = "no" -a "${enable_vlc}" != "no"], [
446 AC_MSG_ERROR([VLC is based on plugins. Shared libraries cannot be disabled.])
452 AM_GNU_GETTEXT_VERSION([0.18.1])
453 AM_GNU_GETTEXT([external])
460 dnl Check for broken versions of mingw-runtime compatability library
461 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
462 AC_MSG_CHECKING(for broken mingw-runtime)
463 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
465 #if (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION < 15)
466 #ifndef __MINGW64_VERSION_MAJOR
467 # error Attempting to use mingw-runtime with broken vsnprintf support
473 AC_MSG_RESULT([present])
474 AC_MSG_ERROR([LibVLC requires mingw-runtime version 3.15 or higher!])
476 dnl force use of mingw provided c99 *printf over msvcrt
477 CPPFLAGS="${CPPFLAGS} -D__USE_MINGW_ANSI_STDIO=1"
478 CPPFLAGS_save="${CPPFLAGS_save} -D__USE_MINGW_ANSI_STDIO=1"
481 dnl Check for the need to include the mingwex lib for mingw32
482 if test "${SYS}" = "mingw32" ; then
483 AC_CHECK_LIB(mingwex,opendir,
484 AC_CHECK_LIB(mingw32,opendir,,
485 [VLC_ADD_LIBS([libvlccore],[-lmingwex])])
489 dnl Check for fnative-struct or mms-bitfields support for mingw32
490 if test "${SYS}" = "mingw32" ; then
491 AC_CACHE_CHECK([if \$CC accepts -mms-bitfields],
492 [ac_cv_c_mms_bitfields],
493 [CFLAGS="${CFLAGS_save} -mms-bitfields"
494 AC_TRY_COMPILE([],,ac_cv_c_mms_bitfields=yes, ac_cv_c_mms_bitfields=no)])
495 if test "${ac_cv_c_mms_bitfields}" != "no"; then
496 CFLAGS_save="${CFLAGS_save} -mms-bitfields";
497 CXXFLAGS_save="${CXXFLAGS_save} -mms-bitfields";
499 AC_CACHE_CHECK([if \$CC accepts -fnative-struct],
500 [ac_cv_c_fnative_struct],
501 [CFLAGS="${CFLAGS_save} -fnative-struct"
502 AC_TRY_COMPILE([],,ac_cv_c_fnative_struct=yes, ac_cv_c_fnative_struct=no)])
503 if test "${ac_cv_c_fnative_struct}" != "no"; then
504 CFLAGS_save="${CFLAGS_save} -fnative-struct";
505 CXXFLAGS_save="${CXXFLAGS_save} -fnative-struct";
509 CFLAGS="${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
513 dnl Buggy glibc prevention. Purposedly not cached.
514 dnl See sourceware.org bugs 5058 and 5443.
515 dnl Ubuntu alone has 20 bug numbers for this...
517 AC_MSG_CHECKING(for buggy GNU/libc versions)
518 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
520 #if defined (__GLIBC__) && (__GLIBC__ == 2) \
521 && (__GLIBC_MINOR__ >= 5) && (__GLIBC_MINOR__ <= 7)
522 # error GNU/libc with dcgettext killer bug!
525 AC_MSG_RESULT([not present])
527 AC_MSG_RESULT([found])
528 AS_IF([test "x${enable_nls}" != "xno"], [
529 AC_MSG_ERROR([Buggy GNU/libc (version 2.5 - 2.7) present. VLC would crash; there is no viable
530 work-around for this. Check with your distribution vendor on how to update the
531 glibc run-time. Alternatively, build with --disable-nls.])
533 AC_DEFINE(DISABLE_BUGGY_GLIBC_CHECK, 1, [Disables runtime check for buggy glibc.])
537 dnl Plugin compilation stuff
541 dnl Check for system libs needed
544 dnl Check for usual libc functions
545 AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
546 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])
547 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])
548 AC_CHECK_FUNCS(fdatasync,,
549 [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
552 # Windows CE does not have strcoll()
555 dnl Check for non-standard system calls
556 AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity])
558 AH_BOTTOM([#include <vlc_fixups.h>])
561 AC_SEARCH_LIBS(poll, [poll], [
562 AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS has poll().])
564 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "os2"], [
565 AC_MSG_ERROR([poll() is required.])
569 dnl Check for struct pollfd
570 AC_CHECK_TYPES([struct pollfd],,,
571 [#include <sys/types.h>
574 #elif defined (WIN32)
575 # include <winsock2.h>
579 dnl Check for connect
582 AC_SEARCH_LIBS(connect, [socket], [
583 AS_IF([test "$ac_cv_search_connect" != "none required"], [
584 SOCKET_LIBS="$ac_cv_search_connect"
587 AS_IF([test "${SYS}" = "mingw32"], [
588 SOCKET_LIBS="-lws2_32"
590 AS_IF([test "${SYS}" = "mingwce"], [
595 AS_IF([test -n "$SOCKET_LIBS"], [
596 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}])
598 AC_SUBST(SOCKET_LIBS)
600 dnl Check for socklen_t
601 AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
602 AC_CACHE_CHECK([for socklen_t in sys/socket.h],
603 ac_cv_type_socklen_t,
604 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
605 [#include <sys/types.h>
607 # include <winsock2.h>
608 # include <ws2tcpip.h>
610 # include <sys/socket.h>
611 #endif]], [[socklen_t len; len = 0;]])],
612 ac_cv_type_socklen_t=yes,
613 ac_cv_type_socklen_t=no)])
614 AS_IF([test "$ac_cv_type_socklen_t" = no],
615 [AC_DEFINE(socklen_t, int)])
617 dnl Check for struct sockaddr_storage
618 AH_TEMPLATE(sockaddr_storage, [Define to `sockaddr' if <sys/socket.h> does not define.])
619 AH_TEMPLATE(ss_family, [Define to `sa_family' if <sys/socket.h> does not define.])
620 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
622 [#include <sys/types.h>
623 #if defined( UNDER_CE )
624 # include <winsock2.h>
625 #elif defined( WIN32 )
626 # include <winsock2.h>
628 # include <sys/socket.h>
629 #endif], [struct sockaddr_storage addr;],
630 ac_cv_struct_sockaddr_storage=yes,
631 ac_cv_struct_sockaddr_storage=no)])
632 AS_IF([test "${ac_cv_struct_sockaddr_storage}" = no], [
633 AC_DEFINE(sockaddr_storage, sockaddr)
634 AC_DEFINE(ss_family, sa_family)
637 dnl getaddrinfo, getnameinfo and gai_strerror check
638 dnl -lnsl and -lsocket are needed on Solaris;
639 dnl we purposedly make the test fail on Windows
641 AC_SEARCH_LIBS([getaddrinfo], [nsl],,, [${SOCKET_LIBS}])
644 dnl FreeBSD has a gnugetopt library for this:
646 AC_CHECK_FUNC(getopt_long,, [
647 AC_CHECK_LIB([gnugetopt],[getopt_long], [
648 GNUGETOPT_LIBS="-lgnugetopt"
651 AC_SUBST(GNUGETOPT_LIBS)
654 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 hqdn3d],[-lm])
661 AC_CHECK_LIB(m,lrintf, [
662 AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])
663 VLC_ADD_LIBS([skins2],[-lm])
666 dnl Check for dynamic plugins
668 have_dynamic_objects="no"
670 AC_SEARCH_LIBS(dlopen, [dl svld], [
671 AS_IF([test "$ac_cv_search_dlopen" != "none required"], [
672 LIBDL="$ac_cv_search_dlopen"
674 have_dynamic_objects="yes"
679 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
681 have_dynamic_objects="yes" #assume we can use shared objects
684 test "${enable_shared}" = "no" && have_dynamic_objects=no
686 AS_IF([test "${have_dynamic_objects}" != "no"], [
687 AC_DEFINE(HAVE_DYNAMIC_PLUGINS, 1,
688 [Define to 1 if dynamic plugins are supported.])
690 dnl Clear $LIBDL so as not to break linking
693 AM_CONDITIONAL(HAVE_DYNAMIC_PLUGINS, [test "${have_dynamic_objects}" != "no"])
696 VLC_ADD_LIBS([realvideo lua],[$LIBDL])
698 dnl Check for thread library
699 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
700 dnl Check for pthreads - borrowed from XMMS
702 if test "${THREAD_LIB}" = "error"; then
703 AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
705 if test "${THREAD_LIB}" = "error"; then
706 AC_CHECK_LIB(pthreads,main,THREAD_LIB="-lpthreads")
708 if test "${THREAD_LIB}" = "error"; then
709 AC_CHECK_LIB(c_r,main,THREAD_LIB="-lc_r")
711 if test "${THREAD_LIB}" = "error"; then
712 AC_CHECK_FUNCS(pthread_mutex_lock)
716 VLC_ADD_LIBS([libvlccore libvlc vlc plugin],[${THREAD_LIB}])
718 AC_CHECK_LIB(rt, clock_nanosleep, [
719 VLC_ADD_LIBS([libvlccore],[-lrt])
721 AC_CHECK_FUNC(nanosleep,,[
722 AC_CHECK_LIB(rt,nanosleep, [
723 VLC_ADD_LIBS([libvlccore],[-lrt])
725 AC_CHECK_LIB(posix4,nanosleep, [
726 VLC_ADD_LIBS([libvlccore],[-lposix4])
731 AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])])
733 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
735 dnl Check for misc headers
736 AC_MSG_CHECKING(for strncasecmp in strings.h)
737 AC_EGREP_HEADER(strncasecmp,strings.h,[
739 AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
740 Define if <strings.h> defines strncasecmp.)],[
743 dnl Check for headers
744 AC_CHECK_HEADERS([search.h])
745 AC_CHECK_HEADERS(getopt.h strings.h locale.h xlocale.h)
746 AC_CHECK_HEADERS(fcntl.h sys/time.h sys/ioctl.h sys/stat.h)
747 AC_CHECK_HEADERS([arpa/inet.h netinet/udplite.h sys/eventfd.h])
748 AC_CHECK_HEADERS([net/if.h], [], [],
750 #include <sys/types.h>
751 #include <sys/socket.h>
753 AC_CHECK_HEADERS([sys/mount.h], [], [],
755 #include <sys/param.h>
758 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
759 AC_CHECK_HEADERS(machine/param.h sys/shm.h)
760 AC_CHECK_HEADERS([linux/version.h linux/dccp.h scsi/scsi.h linux/magic.h])
761 AC_CHECK_HEADERS(syslog.h)
762 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
764 dnl LP64 and LLP64 architectures had better define ssize_t by themselves...
765 AH_TEMPLATE(ssize_t, [Define to `int' if <stddef.h> does not define.])
766 AC_CHECK_TYPE(ssize_t,, [
767 AC_DEFINE(ssize_t, int)
770 dnl Check for threads library
771 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
772 AC_CHECK_HEADERS(pthread.h)
773 fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
775 dnl It seems that autoconf detects pkg-config only during the first
776 dnl PKG_CHECK_MODULES from configure.ac - which makes sense. But in our case,
777 dnl it is nested within a conditional block, so it was not working right.
778 dnl Make PKG_CONFIG_PATH precious so that it appears in the help and get saved
779 AC_ARG_VAR(PKG_CONFIG_PATH,
780 [Paths where to find .pc not at the default location])
781 PKG_PROG_PKG_CONFIG()
783 dnl On some OS we need static linking
784 AS_IF([test -n "${PKG_CONFIG}" ],[
785 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "darwin" -o "${SYS}" = "os2" ],[
786 PKG_CONFIG="${PKG_CONFIG} --static"
792 dnl Check for zlib.h and -lz along with system -lminizip if available
794 AC_CHECK_HEADERS(zlib.h, [ have_zlib=yes ], [ have_zlib=no ])
795 AM_CONDITIONAL(HAVE_ZLIB, [ test "${have_zlib}" = "yes" ])
796 if test "${have_zlib}" = "yes"
798 VLC_ADD_LIBS([access_http mp4 skins2 sap mkv unzip zip],[-lz])
799 PKG_CHECK_MODULES([MINIZIP], [minizip] , [ have_minizip=yes ], [
800 AC_CHECK_HEADERS([unzip.h], [
802 MINIZIP_LIBS="-lminizip -lz"
805 MINIZIP_CFLAGS="-I\\\${top_srcdir}/modules/access/zip/unzip"
806 MINIZIP_LIBS="\\\${top_builddir}/modules/access/zip/unzip/libunzip.la"
809 VLC_ADD_CPPFLAGS([skins2],[$MINIZIP_CFLAGS])
810 VLC_ADD_LIBS([skins2],[$MINIZIP_LIBS])
812 AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
815 dnl Manual switch for UTF-8
816 AC_ARG_ENABLE(non-utf8,
817 [AS_HELP_STRING([--enable-non-utf8],
818 [support legacy non-UTF-8 systems (default disabled)])],, [
819 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "os2"], [
823 AS_IF([test "${enable_non_utf8}" != "no"], [
824 AC_DEFINE([ASSUME_UTF8], [1],
825 [Define to 1 if the operating system uses UTF-8 internally])
831 [AS_HELP_STRING([--enable-dbus],
832 [compile D-Bus message bus support (default enabled)])])
835 if test "${enable_dbus}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
838 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0.0],
839 [ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
840 VLC_ADD_LIBS([libvlccore],[$DBUS_LIBS])
841 VLC_ADD_CFLAGS([libvlccore],[$DBUS_CFLAGS])
842 dnl Check for dbus control interface
843 AC_ARG_ENABLE(dbus-control,
844 [AS_HELP_STRING([--disable-dbus-control],
845 [D-Bus control interface (default enabled)])])
846 if test "${enable_dbus_control}" != "no"
848 VLC_ADD_PLUGIN([dbus])
849 VLC_ADD_LIBS([dbus],[$DBUS_LIBS])
850 VLC_ADD_CFLAGS([dbus],[$DBUS_CFLAGS])
852 dnl Check for Telepathy
853 AC_ARG_ENABLE(telepathy,
854 AS_HELP_STRING([--enable-telepathy],[Telepathy Presence plugin through DBus(default enabled)]))
855 if test "${enable_telepathy}" != "no"; then
856 VLC_ADD_PLUGIN([telepathy])
857 VLC_ADD_LIBS([telepathy],[$DBUS_LIBS])
858 VLC_ADD_CFLAGS([telepathy],[$DBUS_CFLAGS])
860 dnl Power Management Inhibiter
861 VLC_ADD_PLUGIN([inhibit])
862 VLC_ADD_LIBS([inhibit],[$DBUS_LIBS])
863 VLC_ADD_CFLAGS([inhibit],[$DBUS_CFLAGS])
865 [AC_MSG_ERROR([${DBUS_PKG_ERRORS}.])]
871 dnl Check for ntohl, etc.
872 AC_CACHE_CHECK([for ntohl in sys/param.h],
873 [ac_cv_c_ntohl_sys_param_h],
874 [CFLAGS="${CFLAGS_save} -Wall -Werror"
875 AC_TRY_COMPILE([#include <sys/param.h>],
876 [int meuh; ntohl(meuh);],
877 ac_cv_c_ntohl_sys_param_h=yes, ac_cv_c_ntohl_sys_param_h=no)])
878 if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then
879 AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
882 EXTEND_HELP_STRING([Optimization options:])
885 dnl Compiler warnings
888 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])
889 RDC_PROG_CC_FLAGS([-pipe])
891 RDC_PROG_CXX_WFLAGS([all extra sign-compare undef pointer-arith volatile-register-var])
898 [AS_HELP_STRING([--enable-debug],
899 [build with run-time assertions (default disabled)])],,
902 [Define to 1 if debug code should NOT be compiled])
903 AS_IF([test "${enable_debug}" != "no"], [
904 AC_CHECK_HEADERS([valgrind/valgrind.h])
913 [AS_HELP_STRING([--enable-gprof],[profile with gprof (default disabled)])],,
915 AS_IF([test "${enable_gprof}" != "no"], [
916 CFLAGS="${CFLAGS} -pg"
917 CXXFLAGS="${CXXFLAGS} -pg"
918 OBJCFLAGS="${OBJCFLAGS} -pg"
919 LDFLAGS="${LDFLAGS} -pg"
923 [AS_HELP_STRING([--enable-cprof],[profile with cprof (default disabled)])],,
925 AS_IF([test "${enable_gprof}" != "no"], [
926 CFLAGS="${CFLAGS} -finstrument-functions"
927 CXXFLAGS="${CXXFLAGS} -finstrument-functions"
928 OBJCFLAGS="${OBJCFLAGS} -finstrument-functions"
929 LDFLAGS="${LDFLAGS} -finstrument-functions"
935 AC_ARG_ENABLE(coverage,
936 [AS_HELP_STRING([--enable-coverage],
937 [build for test coverage (default disabled)])],,
938 [enable_coverage="no"])
939 AS_IF([test "${enable_coverage}" != "no"], [
940 CFLAGS="-fprofile-arcs -ftest-coverage ${CFLAGS}"
941 CXXFLAGS="-fprofile-arcs -ftest-coverage ${CXXFLAGS}"
942 LDFLAGS="-lgcov ${LDFLAGS}"
947 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
948 AC_CACHE_CHECK([if $CC accepts -fvisibility=hidden],
949 [ac_cv_c_visibility_hidden], [
950 CFLAGS="${CFLAGS_save} -fvisibility=hidden"
951 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
952 ac_cv_c_visibility_hidden=yes
954 ac_cv_c_visibility_hidden=no
957 AS_IF([test "${ac_cv_c_visibility_hidden}" != "no"], [
959 CFLAGS="${CFLAGS} -fvisibility=hidden"
960 CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
961 OBJCFLAGS="${OBJCFLAGS} -fvisibility=hidden"
968 dnl Enable/disable optimizations
970 AC_ARG_ENABLE(optimizations,
971 [AS_HELP_STRING([--disable-optimizations],
972 [disable compiler optimizations (default enabled)])],,
973 [enable_optimizations="yes"])
975 dnl Check for various optimization flags
976 AS_IF([test "${enable_optimizations}" != "no"], [
979 dnl -O4 and -O3 only in production builds
980 AS_IF([test "{enable_debug}" = "no"], [
981 AC_CACHE_CHECK([if $CC accepts -O4], [ac_cv_c_o4], [
982 CFLAGS="${CFLAGS_save} -O4"
983 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
989 AS_IF([test "${ac_cv_c_o4}" != "no"], [
992 AC_CACHE_CHECK([if $CC accepts -O3], [ac_cv_c_o3], [
993 CFLAGS="${CFLAGS_save} -O3"
994 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1000 AS_IF([test "${ac_cv_c_o3}" != "no"], [
1007 CFLAGS="${CFLAGS} ${C_O}"
1008 CXXFLAGS="${CXXFLAGS} ${C_O}"
1009 OBJCFLAGS="${OBJCFLAGS} ${C_O}"
1012 dnl Check for -ffast-math
1013 AC_CACHE_CHECK([if $CC accepts -ffast-math], [ac_cv_c_fast_math], [
1014 CFLAGS="${CFLAGS_save} -ffast-math"
1015 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1016 ac_cv_c_fast_math=yes
1018 ac_cv_c_fast_math=no
1021 AS_IF([test "${ac_cv_c_fast_math}" != "no"], [
1023 CFLAGS="${CFLAGS} -ffast-math"
1024 CXXFLAGS="${CXXFLAGS} -ffast-math"
1025 OBJCFLAGS="${OBJCFLAGS} -ffast-math"
1029 dnl Check for -funroll-loops
1030 AC_CACHE_CHECK([if $CC accepts -funroll-loops], [ac_cv_c_unroll_loops], [
1031 CFLAGS="${CFLAGS_save} -funroll-loops"
1032 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1033 ac_cv_c_unroll_loops=yes
1035 ac_cv_c_unroll_loops=no
1038 AS_IF([test "${ac_cv_c_unroll_loops}" != "no"], [
1040 CFLAGS="${CFLAGS} -funroll-loops"
1041 CXXFLAGS="${CXXFLAGS} -funroll-loops"
1042 OBJCFLAGS="${OBJCFLAGS} -funroll-loops"
1046 AS_IF([test "$enable_debug" = "no"], [
1047 dnl Check for -fomit-frame-pointer
1048 AC_CACHE_CHECK([if $CC accepts -fomit-frame-pointer],
1049 [ac_cv_c_omit_frame_pointer], [
1050 CFLAGS="${CFLAGS_save} -fomit-frame-pointer"
1051 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1052 ac_cv_c_omit_frame_pointer=yes
1054 ac_cv_c_omit_frame_pointer=no
1057 AS_IF([test "${ac_cv_c_omit_frame_pointer}" != "no"], [
1059 CFLAGS="${CFLAGS} -fomit-frame-pointer"
1060 CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer"
1061 OBJCFLAGS="${OBJCFLAGS} -fomit-frame-pointer"
1067 dnl Check for Darwin plugin linking flags
1068 AS_IF([test "${SYS}" = "darwin"], [
1069 AC_CACHE_CHECK([if $CC accepts -bundle -undefined error],
1070 [ac_cv_ld_darwin], [
1071 CFLAGS="${CFLAGS_save} -bundle -undefined error"
1072 AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
1078 AS_IF([test "${ac_cv_ld_darwin}" != "no"], [
1079 VLC_ADD_LDFLAGS([plugin],[-bundle -undefined error])
1083 dnl Checks for __attribute__(aligned()) directive
1084 AC_CACHE_CHECK([__attribute__ ((aligned ())) support],
1085 [ac_cv_c_attribute_aligned],
1086 [ac_cv_c_attribute_aligned=0
1087 CFLAGS="${CFLAGS_save} -Werror"
1088 for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
1090 [static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;],
1091 [ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"])
1093 CFLAGS="${CFLAGS_save}"])
1094 if test "${ac_cv_c_attribute_aligned}" != "0"; then
1095 AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX],
1096 [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
1099 dnl Check for __attribute__((packed))
1100 AC_CACHE_CHECK([for __attribute__((packed))],
1101 [ac_cv_c_attribute_packed],
1102 [ac_cv_c_attribute_packed=no
1103 AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b; (void)b;],
1104 [ac_cv_c_attribute_packed=yes])])
1105 if test "${ac_cv_c_attribute_packed}" != "no"; then
1106 AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
1112 case "${host_cpu}" in
1121 dnl Check for backtrace() support
1122 AC_CHECK_HEADERS(execinfo.h)
1123 AC_CHECK_FUNCS(backtrace)
1128 ALIASES="${ALIASES} cvlc rvlc"
1131 dnl Some plugins aren't useful on some platforms
1133 if test "${SYS}" = "os2"; then
1134 VLC_ADD_PLUGIN([dynamicoverlay])
1135 elif test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
1136 VLC_ADD_PLUGIN([dynamicoverlay access_shm])
1137 elif test "${SYS}" != "mingwce"; then
1138 VLC_ADD_PLUGIN([access_smb dmo globalhotkeys])
1139 VLC_ADD_LIBS([dmo],[-lole32 -luuid])
1141 if test "${SYS}" = "darwin"; then
1142 VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices])
1146 dnl Accelerated modules
1149 dnl Check for fully working MMX intrinsics
1150 dnl We need support for -mmmx, we need <mmintrin.h>, and we also need a
1151 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1153 [AS_HELP_STRING([--disable-mmx],
1154 [disable MMX optimizations (default auto)])],,[
1155 case "${host_cpu}" in
1166 AS_IF([test "${enable_mmx}" != "no"], [
1169 AC_CACHE_CHECK([if $CC groks MMX intrinsics], [ac_cv_c_mmx_intrinsics], [
1170 CFLAGS="${CFLAGS_save} -O -mmmx"
1171 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1172 [#include <mmintrin.h>
1174 uint64_t frobzor;]], [
1176 a = b = c = (__m64)frobzor;
1177 a = _mm_slli_pi16(a, 3);
1178 a = _mm_adds_pi16(a, b);
1179 c = _mm_srli_pi16(c, 8);
1180 c = _mm_slli_pi16(c, 3);
1181 b = _mm_adds_pi16(b, c);
1182 a = _mm_unpacklo_pi8(a, b);
1183 frobzor = (uint64_t)a;]])], [
1184 ac_cv_c_mmx_intrinsics=yes
1186 ac_cv_c_mmx_intrinsics=no
1188 CFLAGS="${CFLAGS_save}"
1190 AS_IF([test "${ac_cv_c_mmx_intrinsics}" != "no"], [
1191 AC_DEFINE(HAVE_MMX_INTRINSICS, 1,
1192 [Define to 1 if MMX intrinsics are available.])
1195 AC_CACHE_CHECK([if $CC groks MMX inline assembly], [ac_cv_mmx_inline], [
1196 CFLAGS="${CFLAGS_save} -mmmx"
1197 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1199 asm volatile("packuswb %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1202 ac_cv_mmx_inline=yes
1206 CFLAGS="${CFLAGS_save}"
1208 AS_IF([test "${ac_cv_mmx_inline}" != "no"], [
1209 AC_DEFINE(CAN_COMPILE_MMX, 1,
1210 [Define to 1 inline MMX assembly is available.])
1214 AC_CACHE_CHECK([if $CC groks MMX EXT inline assembly],
1215 [ac_cv_mmxext_inline], [
1216 CFLAGS="${CFLAGS_save} -mmmx"
1217 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1219 asm volatile("maskmovq %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1222 ac_cv_mmxext_inline=yes
1224 ac_cv_mmxext_inline=no
1226 CFLAGS="${CFLAGS_save}"
1228 AS_IF([test "${ac_cv_mmxext_inline}" != "no"], [
1229 AC_DEFINE(CAN_COMPILE_MMXEXT, 1,
1230 [Define to 1 if MMX EXT inline assembly is available.])
1234 AM_CONDITIONAL([HAVE_MMX], [test "${have_mmx}" = "yes"])
1235 AM_CONDITIONAL([HAVE_MMXEXT], [test "${have_mmxext}" = "yes"])
1237 dnl Check for fully workin SSE2 intrinsics
1238 dnl We need support for -mmmx, we need <emmintrin.h>, and we also need a
1239 dnl working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
1241 [AS_HELP_STRING([--disable-sse],
1242 [disable SSE (1-4) optimizations (default auto)])],, [
1243 case "${host_cpu}" in
1253 AS_IF([test "${enable_sse}" != "no"], [
1254 ARCH="${ARCH} sse sse2"
1256 AC_CACHE_CHECK([if $CC groks SSE2 intrinsics], [ac_cv_c_sse2_intrinsics], [
1257 CFLAGS="${CFLAGS_save} -O -msse2"
1258 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1259 [#include <emmintrin.h>
1261 uint64_t frobzor;]], [
1263 a = b = c = _mm_set1_epi64((__m64)frobzor);
1264 a = _mm_slli_epi16(a, 3);
1265 a = _mm_adds_epi16(a, b);
1266 c = _mm_srli_epi16(c, 8);
1267 c = _mm_slli_epi16(c, 3);
1268 b = _mm_adds_epi16(b, c);
1269 a = _mm_unpacklo_epi8(a, b);
1270 frobzor = (uint64_t)_mm_movepi64_pi64(a);]])], [
1271 ac_cv_c_sse2_intrinsics=yes
1273 ac_cv_c_sse2_intrinsics=no
1275 CFLAGS="${CFLAGS_save}"
1277 AS_IF([test "${ac_cv_c_sse2_intrinsics}" != "no"], [
1278 AC_DEFINE(HAVE_SSE2_INTRINSICS, 1,
1279 [Define to 1 if SSE2 intrinsics are available.])
1282 AC_CACHE_CHECK([if $CC groks SSE inline assembly], [ac_cv_sse_inline], [
1283 CFLAGS="${CFLAGS_save} -msse"
1284 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1286 asm volatile("xorps %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1289 ac_cv_sse_inline=yes
1293 CFLAGS="${CFLAGS_save}"
1295 AS_IF([test "${ac_cv_sse_inline}" != "no" -a "${SYS}" != "solaris"], [
1296 AC_DEFINE(CAN_COMPILE_SSE, 1,
1297 [Define to 1 if SSE inline assembly is available.])
1300 AC_CACHE_CHECK([if $CC groks SSE2 inline assembly], [ac_cv_sse2_inline], [
1301 CFLAGS="${CFLAGS_save} -msse"
1302 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1304 asm volatile("punpckhqdq %%xmm1,%%xmm2"::"r"(p):"xmm1", "xmm2");
1307 ac_cv_sse2_inline=yes
1309 ac_cv_sse2_inline=no
1311 CFLAGS="${CFLAGS_save}"
1313 AS_IF([test "${ac_cv_sse2_inline}" != "no" -a "${SYS}" != "solaris"], [
1314 AC_DEFINE(CAN_COMPILE_SSE2, 1,
1315 [Define to 1 if SSE2 inline assembly is available.])
1320 AC_CACHE_CHECK([if $CC groks SSE3 inline assembly], [ac_cv_sse3_inline], [
1321 CFLAGS="${CFLAGS_save} -msse"
1322 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1324 asm volatile("movsldup %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1327 ac_cv_sse3_inline=yes
1329 ac_cv_sse3_inline=no
1331 CFLAGS="${CFLAGS_save}"
1333 AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
1334 AC_DEFINE(CAN_COMPILE_SSE3, 1,
1335 [Define to 1 if SSE3 inline assembly is available.]) ])
1337 AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly], [ac_cv_ssse3_inline], [
1338 CFLAGS="${CFLAGS_save} -msse"
1339 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1341 asm volatile("pabsw %%xmm0,%%xmm0"::"r"(p):"xmm0");
1344 ac_cv_ssse3_inline=yes
1346 ac_cv_ssse3_inline=no
1348 CFLAGS="${CFLAGS_save}"
1350 AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
1351 AC_DEFINE(CAN_COMPILE_SSSE3, 1,
1352 [Define to 1 if SSSE3 inline assembly is available.]) ])
1355 AC_CACHE_CHECK([if $CC groks SSE4.1 inline assembly],
1356 [ac_cv_sse4_1_inline], [
1357 CFLAGS="${CFLAGS_save} -msse"
1358 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1360 asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1363 ac_cv_sse4_1_inline=yes
1365 ac_cv_sse4_1_inline=no
1367 CFLAGS="${CFLAGS_save}"
1369 AS_IF([test "${ac_cv_sse4_1_inline}" != "no"], [
1370 AC_DEFINE(CAN_COMPILE_SSE4_1, 1,
1371 [Define to 1 if SSE4_1 inline assembly is available.]) ])
1374 AC_CACHE_CHECK([if $CC groks SSE4.2 inline assembly],
1375 [ac_cv_sse4_2_inline], [
1376 CFLAGS="${CFLAGS_save} -msse"
1377 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1379 asm volatile("pcmpgtq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1382 ac_cv_sse4_2_inline=yes
1384 ac_cv_sse4_2_inline=no
1386 CFLAGS="${CFLAGS_save}"
1388 AS_IF([test "${ac_cv_sse4_2_inline}" != "no"], [
1389 AC_DEFINE(CAN_COMPILE_SSE4_2, 1,
1390 [Define to 1 if SSE4_2 inline assembly is available.]) ])
1393 AC_CACHE_CHECK([if $CC groks SSE4A inline assembly], [ac_cv_sse4a_inline], [
1394 CFLAGS="${CFLAGS_save} -msse"
1395 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1397 asm volatile("insertq %%xmm1,%%xmm0"::"r"(p):"xmm0", "xmm1");
1400 ac_cv_sse4a_inline=yes
1402 ac_cv_sse4a_inline=no
1404 CFLAGS="${CFLAGS_save}"
1406 AS_IF([test "${ac_cv_sse4a_inline}" != "no"], [
1407 AC_DEFINE(CAN_COMPILE_SSE4A, 1,
1408 [Define to 1 if SSE4A inline assembly is available.]) ])
1410 AM_CONDITIONAL([HAVE_SSE2], [test "$have_sse2" = "yes"])
1413 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly], [ac_cv_3dnow_inline], [
1414 CFLAGS="${CFLAGS_save} -mmmx"
1415 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[
1417 asm volatile("pfadd %%mm1,%%mm2"::"r"(p):"mm1", "mm2");
1420 ac_cv_3dnow_inline=yes
1422 ac_cv_3dnow_inline=no
1424 CFLAGS="${CFLAGS_save}"
1426 AS_IF([test "${ac_cv_3dnow_inline}" != "no"], [
1427 AC_DEFINE(CAN_COMPILE_3DNOW, 1,
1428 [Define to 1 if 3D Now! inline assembly is available.])
1431 AM_CONDITIONAL([HAVE_3DNOW], [test "$have_3dnow" = "yes"])
1435 [AS_HELP_STRING([--disable-neon],
1436 [disable NEON optimizations (default auto)])],, [
1437 AS_IF([test "${host_cpu}" = "arm"], [enable_neon="yes"] ,[enable_neon="no"])
1439 AS_IF([test "${enable_neon}" != "no"], [
1440 AC_CACHE_CHECK([if $CC groks NEON inline assembly], [ac_cv_neon_inline], [
1441 CFLAGS="${CFLAGS_save} -mfpu=neon"
1444 asm volatile("vqmovun.s64 d0, q1":::"d0");
1445 asm volatile("ssat r0, #1, r0":::"r0"); /* assume ARMv6 */
1448 ac_cv_neon_inline="-mfpu=neon"
1450 ac_cv_neon_inline="no"
1452 CFLAGS="${CFLAGS_save}"
1454 AS_IF([test "$ac_cv_neon_inline" != "no"], [
1455 NEON_CFLAGS="$ac_cv_neon_inline"
1456 AC_DEFINE([CAN_COMPILE_NEON], 1,
1457 [Define to 1 if NEON (and ARMv6) assembly is available with NEON_CFLAGS.])
1460 ac_cv_neon_inline="no"
1462 AC_SUBST(NEON_CFLAGS)
1463 AM_CONDITIONAL(HAVE_NEON, [test "${ac_cv_neon_inline}" != "no"])
1466 AC_ARG_ENABLE(altivec,
1467 [AS_HELP_STRING([--disable-altivec],
1468 [disable AltiVec optimizations (default auto)])],, [
1469 AS_IF([test "${host_cpu}" = "powerpc"],
1470 [enable_altivec=yes], [enable_altivec=no])
1473 AS_IF([test "${enable_altivec}" = "yes"], [
1474 ARCH="${ARCH} altivec";
1475 AC_CACHE_CHECK([if $CC groks AltiVec inline assembly],
1476 [ac_cv_altivec_inline],
1477 [CFLAGS="${CFLAGS_save}"
1478 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1479 ac_cv_altivec_inline="yes",
1480 [CFLAGS="${CFLAGS_save} -Wa,-m7400"
1481 AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
1482 [ac_cv_altivec_inline="-Wa,-m7400"],
1483 ac_cv_altivec_inline=no)
1485 AS_IF([test "${ac_cv_altivec_inline}" != "no"], [
1486 AC_DEFINE(CAN_COMPILE_ALTIVEC, 1,
1487 [Define to 1 if AltiVec inline assembly is available.])
1488 AS_IF([test "${ac_cv_altivec_inline}" != "yes"], [
1489 VLC_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}])
1490 VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}])
1491 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_altivec_inline}])
1496 dnl The AltiVec C extensions
1498 dnl There are several possible cases:
1499 dnl - OS X PPC, gcc 4.x: use -mpim-altivec -force_cpusubtype_ALL, don't
1500 dnl need <altivec.h>
1501 dnl - OS X PPC, gcc 3.x: need -faltivec, don't need <altivec.h>
1502 dnl - Linux PPC, gcc 3.4, 4.x: need <altivec.h> which requires -maltivec
1503 dnl - Linux PPC, gcc 3.3: need <altivec.h> and -maltivec -mabi=altivec
1504 dnl - Linux PPC, gcc 3.x: need <altivec.h> and -fvec
1505 dnl - Others: test should fail
1506 AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
1508 [# OS X/PPC test (gcc 4.x)
1509 CFLAGS="${CFLAGS_save} -mpim-altivec -force_cpusubtype_ALL"
1510 AC_TRY_COMPILE([vector unsigned char foo;],
1511 [vec_ld(0, (unsigned char *)0);],
1512 [ac_cv_c_altivec="-mpim-altivec -force_cpusubtype_ALL"],
1513 [# OS X/PPC test (gcc 3.x)
1514 CFLAGS="${CFLAGS_save} -faltivec"
1515 AC_TRY_COMPILE([vector unsigned char foo;],
1516 [vec_ld(1 * sizeof(vector float), (unsigned char *)0);],
1517 [ac_cv_c_altivec="-faltivec"],
1518 dnl Below this are the Linux tests
1519 [# Linux/PPC test (gcc 4.x)
1520 CFLAGS="${CFLAGS_save} -maltivec"
1521 AC_TRY_COMPILE([#include <altivec.h>],
1522 [vec_ld(0, (unsigned char *)0);],
1523 [ac_cv_c_altivec="-maltivec"],
1524 [# Linux/PPC test (gcc 3.3)
1525 CFLAGS="${CFLAGS_save} -maltivec -mabi=altivec"
1526 AC_TRY_COMPILE([#include <altivec.h>],
1527 [vec_ld(0, (unsigned char *)0);],
1529 ac_cv_c_altivec_abi="-maltivec -mabi=altivec"],
1530 [# Linux/PPC test (gcc 3.3)
1531 CFLAGS="${CFLAGS_save} -fvec"
1532 AC_TRY_COMPILE([#include <altivec.h>],
1533 [vec_ld(0, (unsigned char *)0);],
1534 [ac_cv_c_altivec="-fvec"],
1535 [ac_cv_c_altivec=no])
1540 CFLAGS="${CFLAGS_save}"
1542 AS_IF([test "${ac_cv_c_altivec}" != "no"], [
1543 CPPFLAGS="${CPPFLAGS_save} ${ac_cv_c_altivec}"
1546 AC_CHECK_HEADERS(altivec.h)
1547 CPPFLAGS="${CPPFLAGS_save}"
1549 AS_IF([test "${ac_cv_c_altivec}" != "no"], [
1550 AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1,
1551 [Define to 1 if C AltiVec extensions are available.])
1552 VLC_ADD_CFLAGS([libvlccore],[${ac_cv_c_altivec}])
1553 VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
1557 AC_CACHE_CHECK([if linker needs -framework vecLib],
1559 [LDFLAGS="${LDFLAGS} -Wl,-framework,vecLib"
1560 AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
1561 LDFLAGS="${LDFLAGS_save}"
1563 AS_IF([test "${ac_cv_ld_altivec}" != "no"], [
1564 VLC_ADD_LIBS([libvlccore memcpyaltivec],[-Wl,-framework,vecLib])
1567 AM_CONDITIONAL([HAVE_ALTIVEC], [test "$have_altivec" = "yes"])
1570 dnl Special arch tuning
1573 [AS_HELP_STRING([--with-tuning=ARCH],
1574 [tune compilation for an architecture (default varies)])])
1575 if test -n "${with_tuning}"; then
1576 if test "${with_tuning}" != "no"; then
1577 CFLAGS_TUNING="-mtune=${with_tuning}"
1580 if test "${SYS}" = "darwin" -a "${host_cpu}" = "i686"; then
1581 CFLAGS_TUNING="-march=prescott -mtune=generic"
1582 elif test "${SYS}" = "darwin" -a "${host_cpu}" = "x86_64"; then
1583 CFLAGS_TUNING="-march=core2 -mtune=core2"
1584 elif test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "i486" -o "${host_cpu}" = "i386"; then
1585 CFLAGS_TUNING="-mtune=pentium2"
1586 elif test "${host_cpu}" = "x86_64"; then
1587 CFLAGS_TUNING="-mtune=athlon64"
1588 elif test "${host_cpu}" = "powerpc"; then
1589 CFLAGS_TUNING="-mtune=G4";
1593 dnl NOTE: this can't be cached cleanly
1594 AS_IF([test -n "${CFLAGS_TUNING}"], [
1595 AC_MSG_CHECKING([whether $CC accepts ${CFLAGS_TUNING}])
1596 CFLAGS="${CFLAGS_save} ${CFLAGS_TUNING}"
1597 AC_COMPILE_IFELSE([AC_LANG_SOURCE([])], [
1600 CFLAGS_TUNING=""; tuning="no"
1601 AS_IF([test "${with_tuning}"], [
1602 AC_MSG_ERROR([requested tuning not supported])
1605 CFLAGS="${CFLAGS_save}"
1606 AC_MSG_RESULT([$tuning])
1608 CFLAGS="${CFLAGS} ${CFLAGS_TUNING}"
1615 AC_ARG_ENABLE(optimize-memory,
1616 [AS_HELP_STRING([--enable-optimize-memory],
1617 [optimize memory usage over performance])])
1618 if test "${enable_optimize_memory}" = "yes"; then
1619 AC_DEFINE(OPTIMIZE_MEMORY, 1, Define if you want to optimize memory usage over performance)
1623 dnl Allow running as root (useful for people running on embedded platforms)
1625 AC_ARG_ENABLE(run-as-root,
1626 [AS_HELP_STRING([--enable-run-as-root],
1627 [allow running VLC as root (default disabled)])])
1628 AS_IF([test "${enable_run_as_root}" = "yes"],[
1629 AC_DEFINE(ALLOW_RUN_AS_ROOT, 1,
1630 [Define to 1 to allow running VLC as root (uid 0).])
1637 [AS_HELP_STRING([--disable-sout],
1638 [disable streaming output (default enabled)])])
1639 AS_IF([test "${enable_sout}" != "no"], [
1640 AC_DEFINE(ENABLE_SOUT, 1, [Define to 1 for stream output support.])
1642 AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"])
1646 [AS_HELP_STRING([--disable-lua],
1647 [disable LUA scripting support (default enabled)])])
1648 if test "${enable_lua}" != "no"
1650 PKG_CHECK_MODULES(LUA, lua5.1,
1653 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
1654 PKG_CHECK_MODULES(LUA, lua >= 5.1,
1657 AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
1659 AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
1662 AC_CHECK_LIB( lua5.1 , luaL_newstate,
1663 [LUA_LIBS="-llua5.1"],
1664 AC_CHECK_LIB( lua51 , luaL_newstate,
1665 [LUA_LIBS="-llua51"],
1666 AC_CHECK_LIB( lua , luaL_newstate,
1674 if test "x${have_lua}" = "xyes" ; then
1675 VLC_ADD_LIBS([lua],[$LUA_LIBS])
1676 VLC_ADD_CFLAGS([lua],[$LUA_CFLAGS])
1678 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.])
1680 AC_ARG_VAR([LUAC], [LUA byte compiler])
1681 AC_PATH_PROGS(LUAC,[${LUAC} luac], [false])
1682 AS_IF([test "${LUAC}" = "false"], [
1683 AC_MSG_ERROR([Could not find the LUA byte compiler.])
1686 AM_CONDITIONAL(BUILD_LUA, [test "${have_lua}" = "yes"])
1692 AC_ARG_ENABLE(httpd,
1693 [AS_HELP_STRING([--disable-httpd],
1694 [disable the built-in HTTP server (default enabled)])])
1695 if test "${enable_httpd}" != "no"
1697 AC_DEFINE(ENABLE_HTTPD, 1, Define if you want the HTTP daemon support)
1699 AM_CONDITIONAL(BUILD_HTTPD, [test "${enable_httpd}" != "no"])
1703 dnl VideoLAN manager
1706 [AS_HELP_STRING([--disable-vlm],
1707 [disable the stream manager (default enabled)])],,
1708 [enable_vlm="${enable_sout}"])
1709 AS_IF([test "${enable_vlm}" != "no"], [
1710 AS_IF([test "${enable_sout}" = "no"], [
1711 AC_MSG_ERROR([VLM requires the stream output. Do not use --disable-sout.])
1713 AC_DEFINE(ENABLE_VLM, 1, [Define if you want the VideoLAN manager support])
1715 AM_CONDITIONAL([ENABLE_VLM], [test "${enable_vlm}" != "no"])
1722 EXTEND_HELP_STRING([Input plugins:])
1725 dnl libproxy support
1727 AC_ARG_ENABLE(libproxy,
1728 [AS_HELP_STRING([--enable-libproxy],[support libproxy (default auto)])])
1729 AS_IF([test "${enable_libproxy}" != "no"], [
1730 PKG_CHECK_MODULES(LIBPROXY, libproxy-1.0, [
1731 AC_DEFINE(HAVE_LIBPROXY, 1, [Define if libproxy is available])
1732 VLC_ADD_CFLAGS([access_http],[$LIBPROXY_CFLAGS])
1733 VLC_ADD_LIBS([access_http],[$LIBPROXY_LIBS])
1735 AS_IF([test -n "${enable_libproxy}"], [
1736 AC_MSG_ERROR([${LIBPROXY_PKG_ERRORS}.])
1744 AC_ARG_ENABLE(live555,
1745 [AS_HELP_STRING([--enable-live555],
1746 [enable RTSP input through live555 (default enabled)])])
1747 AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
1749 CPPFLAGS_save="${CPPFLAGS}"
1750 AS_IF([test -z "${CONTRIB_DIR}"], [
1751 CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
1753 CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
1755 AS_IF([test "${SYS}" = "solaris"], [
1756 CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
1758 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
1760 AC_CACHE_CHECK([for live555 version 1275091200 or later], [ac_cv_live555], [
1761 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
1762 [#include <liveMedia_version.hh>
1763 #if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200)
1772 AS_IF([test "$ac_cv_live555" = "no"], [
1773 AC_MSG_WARN([liveMedia is missing or its installed version is too old:
1774 Version 2010.05.29 or later is required to proceed.
1775 You can get an updated one from http://www.live555.com/liveMedia .])
1776 AS_IF([test -n "${enable_live555}"], [
1777 AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
1779 ac_cv_live555_usable=""
1781 dnl Check that live555 is patched correctly.
1782 AC_CACHE_CHECK([for live555 usability], [ac_cv_live555_usable], [
1783 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
1784 [#include <locale.h>
1786 # include <xlocale.h>
1791 #include <Locale.hh>
1793 #include <GroupsockHelper.hh>]], [
1794 [struct in_addr addr;
1795 our_inet_ntoa(addr, NULL);]])
1797 ac_cv_live555_usable="yes"
1799 ac_cv_live555_usable="no"
1802 AS_IF([test "$ac_cv_live555_usable" = "no"], [
1803 AC_MSG_ERROR([liveMedia lacks patches and is not usable.
1804 Please apply our patches from the VLC contrib (contrib/src/live555/).
1805 You can also disable RTSP input with --disable-live555. You were warned.])
1807 other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
1808 other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
1809 AS_IF([test "${SYS}" = "mingw32"], [
1810 # add ws2_32 for closesocket, select, recv
1811 other_libs="$other_libs -lws2_32"
1812 ], [test "${SYS}" = "mingwce"], [
1813 # add ws2 for closesocket, select, recv
1814 other_libs="$other_libs -lws2"
1817 dnl We need to check for pic because live555 don't provide shared libs
1818 dnl and we want to build a plugins so we need -fPIC on some arch.
1819 VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
1820 AC_CHECK_LIB(liveMedia_pic, main, [
1821 VLC_ADD_PLUGIN([live555])
1822 VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
1824 AC_CHECK_LIB(liveMedia, main, [
1825 VLC_ADD_PLUGIN([live555])
1826 VLC_ADD_LIBS([live555], [-lliveMedia ${other_libs}])
1827 ],[],[${other_libs}])],[${other_libs_pic}])
1829 CPPFLAGS="${CPPFLAGS_save}"
1834 dnl - special access module for dc1394 input
1835 dnl - dv module: digital video module check for libraw1394
1836 dnl - linsys modules: access module check for libzvbi
1838 PKG_ENABLE_MODULES_VLC([DC1394], [], [libraw1394 >= 2.0.1 libdc1394-2 >= 2.1.0], [dc1394 access module], [auto])
1839 PKG_ENABLE_MODULES_VLC([DV], [access_dv], [libraw1394 >= 2.0.1 libavc1394 >= 0.5.3], [DV input module], [auto])
1841 AC_ARG_ENABLE(linsys,
1842 [AS_HELP_STRING([--enable-linsys],
1843 [Linux Linear Systems Ltd. SDI and HD-SDI input cards (default enabled)])])
1844 if test "$SYS" = "linux" -a "${enable_linsys}" != "no"; then
1845 VLC_ADD_PLUGIN([linsys_hdsdi])
1846 PKG_CHECK_MODULES(LINSYS_SDI, [zvbi-0.2 >= 0.2.28],
1847 [ VLC_ADD_LIBS([linsys_sdi],[$LINSYS_SDI_LIBS])
1848 VLC_ADD_CFLAGS([linsys_sdi],[$LINSYS_SDI_CFLAGS])
1849 VLC_ADD_PLUGIN([linsys_sdi]) ],
1850 [AC_MSG_WARN([${LINSYS_SDI_PKG_ERRORS}.])]
1855 dnl dvdread module: check for libdvdread
1857 dnl prepend -ldvdcss on OS that need it
1858 AS_CASE(["${SYS}"], [mingw32|darwin], [VLC_ADD_LIBS([dvdread], [-ldvdcss])])
1859 PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread], [dvdread input module], [auto])
1862 dnl libdvdnav plugin
1864 AC_ARG_ENABLE(dvdnav,
1865 [AS_HELP_STRING([--disable-dvdnav],
1866 [disable DVD navigation with libdvdnav (default auto)])])
1867 if test "${enable_dvdnav}" != "no"
1869 dnl prepend -ldvdcss on OS that need it
1870 AS_CASE(["${SYS}"], [mingw32|darwin], [VLC_ADD_LIBS([dvdnav], [-ldvdcss])])
1872 PKG_CHECK_MODULES(DVDNAV, dvdnav, [
1873 VLC_ADD_PLUGIN([dvdnav])
1874 VLC_ADD_CFLAGS([dvdnav],[${DVDNAV_CFLAGS}])
1875 VLC_ADD_LIBS([dvdnav],[${DVDNAV_LIBS}])
1876 AC_CHECK_LIB(dvdnav, dvdnav_get_video_resolution,
1877 AC_DEFINE(HAVE_DVDNAV_GET_VIDEO_RESOLUTION, 1, [Define if you have dvdnav_get_video_resolution.]),
1878 [], [${LIBS_dvdnav}])
1879 AC_CHECK_LIB(dvdnav, dvdnav_describe_title_chapters,
1880 AC_DEFINE(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS, 1, [Define if you have dvdnav_describe_title_chapters.]),
1881 [], [${LIBS_dvdnav}])],
1882 [AC_MSG_WARN([${DVDNAV_PKG_ERRORS}.])])
1886 dnl Windows DirectShow access module
1888 AC_ARG_ENABLE(dshow,
1889 [AS_HELP_STRING([--disable-dshow],
1890 [support DirectShow (default auto)])])
1891 if test "${enable_dshow}" != "no"
1893 if test "${SYS}" = "mingw32"
1896 AC_CHECK_HEADERS(dshow.h,
1897 [ VLC_ADD_PLUGIN([dshow])
1898 VLC_ADD_CXXFLAGS([dshow],[])
1899 VLC_ADD_LIBS([dshow],[-lole32 -loleaut32 -luuid]) ])
1905 dnl Blu-ray Disc Support with libbluray
1907 PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2 libxml-2.0 >= 2.6 ], (libbluray for Blu-ray disc support ) )
1910 dnl OpenCV wrapper and example filters
1912 PKG_ENABLE_MODULES_VLC([OPENCV], [opencv_example opencv_wrapper], [opencv], (OpenCV (computer vision) filter), [off])
1916 dnl libsmbclient plugin
1919 [AS_HELP_STRING([--disable-smb], [disable SMB/CIFS support (default auto)])])
1920 if test "${enable_smb}" != "no"; then
1921 AC_CHECK_HEADERS(libsmbclient.h,
1922 [ VLC_ADD_PLUGIN([access_smb])
1923 VLC_ADD_LIBS([access_smb],[-lsmbclient]) ],
1924 [ if test -n "${enable_smb}"; then
1925 AC_MSG_ERROR([cannot find libsmbclient headers])
1931 dnl sftp access support
1934 [AS_HELP_STRING([--enable-sftp],
1935 [support SFTP file transfer via libssh2 (default disabled)])])
1936 if test "${enable_sftp}" = "yes"; then
1937 AC_CHECK_HEADERS(libssh2.h, [
1938 VLC_ADD_PLUGIN([access_sftp])
1939 VLC_ADD_LIBS([access_sftp], [-lssh2])
1946 AC_ARG_ENABLE(libv4l2, [AS_HELP_STRING([--disable-libv4l2],
1947 [disable userspace V4L2 library (default auto)])])
1948 AC_ARG_ENABLE(pvr, [AS_HELP_STRING([--enable-pvr],
1949 [support PVR V4L2 cards (default disabled)])])
1951 AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
1954 AS_IF([test "$have_v4l2" = "yes"], [
1955 AS_IF([test "${enable_libv4l2}" != "no"], [
1956 PKG_CHECK_MODULES(LIBV4L2, libv4l2, [
1957 AC_DEFINE(HAVE_LIBV4L2, 1, [Define to 1 if libv4l2 is available])
1959 AC_MSG_WARN([${LIBV4L2_PKG_ERRORS}.])
1962 AS_IF([test "${enable_pvr}" = "yes"], [
1963 VLC_ADD_PLUGIN([pvr])
1966 AM_CONDITIONAL(HAVE_V4L2, [test "${have_v4l2}" != "no"])
1969 dnl special access module for Blackmagic SDI cards
1971 AC_ARG_ENABLE(decklink,
1972 [AS_HELP_STRING([--disable-decklink],
1973 [disable Blackmagic DeckLink SDI input (default auto)])])
1974 AC_ARG_WITH(decklink_sdk,
1975 [AS_HELP_STRING[--with-decklink-sdk=DIR],
1976 [ location of Blackmagic DeckLink SDI SDK])])
1977 if test "${enable_decklink}" != "no"
1979 if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}"
1981 VLC_ADD_CPPFLAGS([decklink],[-I${with_decklink_sdk}/include])
1983 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_decklink}"
1985 AC_CHECK_HEADERS(DeckLinkAPIDispatch.cpp, [
1986 VLC_ADD_PLUGIN([decklink])
1987 ],[AC_MSG_WARN(Blackmagic DeckLink SDI include files not found, decklink disabled)])
1989 CPPFLAGS="${CPPFLAGS_save}"
1994 dnl gnomeVFS access module
1996 PKG_ENABLE_MODULES_VLC([GNOMEVFS], [access_gnomevfs], [gnome-vfs-2.0], [GnomeVFS access module], [auto])
2002 [AS_HELP_STRING([--enable-vcdx],
2003 [navigate VCD with libvcdinfo (default disabled)])])
2004 if test "${enable_vcdx}" = "yes"
2006 PKG_CHECK_MODULES(LIBCDIO, [libcdio >= 0.78.2 libiso9660 >= 0.72],
2007 [VLC_ADD_LIBS([vcdx],[$LIBCDIO_LIBS])
2008 VLC_ADD_CFLAGS([vcdx],[$LIBCDIO_CFLAGS])],
2009 [AC_MSG_ERROR([${LIBCDIO_PKG_ERRORS} (required for vcdx plugin).])])
2010 PKG_CHECK_MODULES(LIBVCDINFO, libvcdinfo >= 0.7.22,
2011 [VLC_ADD_LIBS([vcdx],[$LIBVCDINFO_LIBS])
2012 VLC_ADD_CFLAGS([vcdx],[$LIBVCDINFO_CFLAGS])],
2013 [AC_MSG_ERROR([${LIBVCDINFO_PKG_ERRORS} (required for vcdx plugin).])])
2014 VLC_ADD_PLUGIN([vcdx])
2018 dnl Built-in CD-DA and VCD module
2021 [AS_HELP_STRING([--disable-vcd],
2022 [disable built-in VCD and CD-DA support (default enabled)])])
2024 AC_ARG_ENABLE(libcddb,
2025 [AS_HELP_STRING([--disable-libcddb],
2026 [disable CDDB for Audio CD (default enabled)])])
2028 if test "${enable_vcd}" != "no"
2030 AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
2031 AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
2033 VLC_ADD_PLUGIN([vcd cdda])
2038 AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
2039 AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
2041 VLC_ADD_PLUGIN([vcd cdda])
2042 AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
2047 AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
2048 AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
2050 VLC_ADD_PLUGIN([vcd cdda])
2051 AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
2056 if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32" -o "${SYS}" = "os2"
2058 VLC_ADD_PLUGIN([vcd cdda])
2061 if test "${SYS}" = "darwin"
2063 VLC_ADD_PLUGIN([vcd cdda])
2064 VLC_ADD_LIBS([vcd vcdx cdda],[-Wl,-framework,IOKit,-framework,CoreFoundation])
2065 VLC_ADD_LIBS([vcdx cdda],[-liconv])
2068 if test "$enable_libcddb" != "no"; then
2069 PKG_CHECK_MODULES(LIBCDDB, [libcddb >= 0.9.5], [
2071 AC_DEFINE(HAVE_LIBCDDB, 1, [Define this if you have libcddb installed])
2072 VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS])
2073 VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
2075 [AC_MSG_WARN([${LIBCDDB_PKG_ERRORS}: CDDB access disabled.])
2083 AC_CACHE_CHECK([for Linux DVB version 5], [ac_cv_linux_s2api], [
2084 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
2085 [#include <linux/dvb/version.h>
2086 #if (DVB_API_VERSION < 5)
2089 ac_cv_linux_s2api=yes
2091 ac_cv_linux_s2api=no
2093 AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_s2api" = "yes"])
2096 dnl Screen capture module
2098 AC_ARG_ENABLE(screen,
2099 [AS_HELP_STRING([--enable-screen],
2100 [disable screen capture (default enabled)])])
2101 if test "${enable_screen}" != "no"; then
2102 if test "${SYS}" = "darwin"; then
2103 AC_CHECK_HEADERS(OpenGL/gl.h, [
2104 AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, [
2105 VLC_ADD_PLUGIN([screen])
2106 VLC_ADD_LIBS([screen],[-Wl,-framework,OpenGL,-framework,ApplicationServices])
2109 elif test "${SYS}" = "mingw32"; then
2110 VLC_ADD_PLUGIN([screen])
2111 VLC_ADD_LIBS([screen],[-lgdi32])
2112 elif test "${SYS}" = "mingwce"; then
2113 CPPFLAGS="${CPPFLAGS_save}"
2118 dnl Real RTSP plugin
2120 AC_ARG_ENABLE(realrtsp,
2121 [ --enable-realrtsp Real RTSP module (default disabled)])
2122 if test "${enable_realrtsp}" = "yes"; then
2123 VLC_ADD_PLUGIN([access_realrtsp])
2128 AC_ARG_ENABLE(macosx-eyetv,
2129 [ --enable-macosx-eyetv Mac OS X EyeTV (TNT Tuner) module (default enabled on Mac OS X)])
2130 if test "x${enable_macosx_eyetv}" != "xno" &&
2131 (test "${SYS}" = "darwin" || test "${enable_macosx_eyetv}" = "yes")
2133 VLC_ADD_LIBS([access_eyetv], [-Wl,-framework,Foundation])
2134 VLC_ADD_PLUGIN([access_eyetv])
2139 AC_ARG_ENABLE(macosx-qtkit,
2140 [ --enable-macosx-qtkit Mac OS X qtcapture (video) and qtsound (audio) module (default enabled on Mac OS X)])
2141 if test "x${enable_macosx_qtkit}" != "xno" &&
2142 (test "${SYS}" = "darwin" || test "${enable_macosx_qtkit}" = "yes")
2144 VLC_ADD_PLUGIN([qtcapture])
2145 VLC_ADD_PLUGIN([qtsound])
2147 AM_CONDITIONAL(HAVE_QTKIT, [test "${SYS}" = "darwin" && "x${enable_macosx_qtkit}" != "xno"])
2154 EXTEND_HELP_STRING([Mux/Demux plugins:])
2157 dnl libdvbpsi check for ts mux/demux
2160 PKG_WITH_MODULES([DVBPSI], [libdvbpsi], [have_dvbpsi="yes"])
2161 AM_CONDITIONAL(HAVE_DVBPSI, [test "${have_dvbpsi}" = "yes"])
2165 dnl GME demux plugin
2168 [AS_HELP_STRING([--enable-gme],
2169 [use Game Music Emu (default auto)])])
2170 AS_IF([test "${enable_gme}" != "no"], [
2171 AC_CHECK_HEADER([gme/gme.h], [
2172 VLC_ADD_LIBS([gme], [-lgme])
2173 VLC_ADD_PLUGIN([gme])
2175 AS_IF([test "x${enable_gme}" != "x"], [
2176 AC_MSG_ERROR([GME cannot be found. Please install the development files.])
2186 [AS_HELP_STRING([--enable-sid],[C64 sid demux support (default auto)])])
2187 AS_IF([test "${enable_sid}" != "no"], [
2188 PKG_CHECK_MODULES(SID, [libsidplay2], [
2190 oldCPPFLAGS="$CPPFLAGS"
2191 CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
2192 AC_CHECK_HEADER([sidplay/builders/resid.h], [
2193 VLC_ADD_PLUGIN([sid])
2194 VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
2195 VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
2197 AS_IF([test -n "${enable_sid}"],
2198 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2199 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2202 CPPFLAGS="$oldCPPFLAGS"
2205 AS_IF([test "x${enable_sid}" = "xyes"],
2206 [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
2207 [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
2214 dnl ogg demux plugin
2216 PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
2217 if test "${enable_sout}" != "no"; then
2218 PKG_ENABLE_MODULES_VLC([MUX_OGG], [], [ogg >= 1.0], [Ogg mux support], [auto])
2219 dnl Check for libshout
2220 PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
2224 dnl matroska demux plugin
2227 [AS_HELP_STRING([--disable-mkv],
2228 [do not use libmatroska (default auto)])])
2229 if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
2231 AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
2232 AC_MSG_CHECKING(for libebml version >= 1.0.0)
2234 [#include <ebml/EbmlVersion.h>
2235 #ifdef LIBEBML_VERSION
2236 #if LIBEBML_VERSION >= 0x010000
2240 [AC_MSG_RESULT([yes])
2241 AC_CHECK_HEADERS(matroska/KaxVersion.h, [
2242 AC_MSG_CHECKING(for libmatroska version >= 1.0.0)
2244 [#include <matroska/KaxVersion.h>
2245 #ifdef LIBMATROSKA_VERSION
2246 #if LIBMATROSKA_VERSION >= 0x010000
2250 [AC_MSG_RESULT([yes])
2251 AC_CHECK_HEADERS(matroska/KaxAttachments.h)
2252 VLC_ADD_CXXFLAGS([mkv],[])
2253 if test "${SYS}" = "darwin"; then
2254 VLC_ADD_CXXFLAGS([mkv],[-O1])
2256 AC_CHECK_LIB(ebml_pic, main, [
2257 VLC_ADD_PLUGIN([mkv])
2258 VLC_ADD_LIBS([mkv],[-lmatroska -lebml_pic])
2260 AC_CHECK_LIB(ebml, main, [
2261 VLC_ADD_PLUGIN([mkv])
2262 VLC_ADD_LIBS([mkv],[-lmatroska -lebml])
2267 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.])
2271 [AC_MSG_RESULT([no])
2272 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.])
2279 dnl modplug demux plugin
2282 [AS_HELP_STRING([--disable-mod],
2283 [do not use libmodplug (default auto)])])
2284 if test "${enable_mod}" != "no" ; then
2285 PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [
2286 VLC_ADD_PLUGIN([mod])
2287 VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
2288 VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
2290 AS_IF([test -n "${enable_mod}"],
2291 [AC_MSG_ERROR([${LIBMODPLUG_PKG_ERRORS}.])],
2292 [AC_MSG_WARN([${LIBMODPLUG_PKG_ERRORS}.])])
2297 dnl mpc demux plugin
2300 [AS_HELP_STRING([--disable-mpc], [do not use libmpcdec (default auto)])])
2301 if test "${enable_mpc}" != "no"
2303 AC_CHECK_HEADERS([mpc/mpcdec.h], [
2304 VLC_ADD_PLUGIN([mpc])
2305 VLC_ADD_LIBS([mpc],[-lmpcdec])],
2306 [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
2307 VLC_ADD_PLUGIN([mpc])
2308 VLC_ADD_LIBS([mpc],[-lmpcdec])])])
2315 EXTEND_HELP_STRING([Codec plugins:])
2320 AC_ARG_ENABLE(wma-fixed,
2321 [ --enable-wma-fixed libwma-fixed module (default disabled)])
2322 if test "${enable_wma_fixed}" = "yes"
2324 VLC_ADD_PLUGIN([wma_fixed])
2328 dnl shine fixed point mp3 encoder
2330 AC_ARG_ENABLE(shine,
2331 [ --enable-shine shine mp3 encoding module (default disabled)])
2332 if test "${enable_shine}" = "yes"
2334 VLC_ADD_PLUGIN([shine])
2338 dnl openmax il codec plugin
2340 AC_ARG_ENABLE(omxil,
2341 [ --enable-omxil openmax il codec module (default disabled)])
2342 if test "${enable_omxil}" = "yes"
2344 VLC_ADD_PLUGIN([omxil])
2345 VLC_ADD_LIBS([omxil], [$LIBDL])
2349 dnl iomx codec plugin
2352 [ --enable-iomx iomx codec module (default disabled)])
2353 if test "${enable_iomx}" = "yes"
2355 CPPFLAGS_save="${CPPFLAGS}"
2356 CPPFLAGS="${CPPFLAGS} -I${srcdir}/modules/codec/omxil" # For the OMX headers
2358 AC_CHECK_HEADER(media/stagefright/OMXClient.h, [
2359 VLC_ADD_PLUGIN([iomx])
2360 VLC_ADD_CXXFLAGS([iomx], [-fno-exceptions -fno-rtti])
2361 VLC_ADD_LIBS([iomx], [-lstagefright -lmedia -lutils -lbinder])
2363 AC_MSG_ERROR("Could not find IOMX headers")
2366 CPPFLAGS="${CPPFLAGS_save}"
2370 dnl CrystalHD codec plugin
2372 AC_ARG_ENABLE(crystalhd,
2373 [ --enable-crystalhd crystalhd codec plugin (default auto)])
2374 if test "${enable_crystalhd}" != "no"; then
2375 AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [
2376 VLC_ADD_PLUGIN([crystalhd])
2377 VLC_ADD_LIBS([crystalhd], [-lcrystalhd])
2379 if test "${SYS}" = "mingw32" ; then
2380 AC_CHECK_HEADERS(libcrystalhd/bc_dts_defs.h, [
2381 VLC_ADD_PLUGIN([crystalhd])
2382 AC_CHECK_HEADERS(libcrystalhd/bc_drv_if.h, [
2383 VLC_ADD_LIBS([crystalhd], [-lbcmDIL])
2386 AS_IF([test x"${enable_crystalhd}" = "xyes"],
2387 [AC_MSG_ERROR("Could not find CrystalHD development headers")],
2388 [AC_MSG_WARN("Could not find CrystalHD development headers")])
2389 ],[#define __LINUX_USER__
2390 #include <libcrystalhd/bc_dts_types.h>
2394 #include <libcrystalhd/bc_dts_types.h>
2402 [ --enable-mad libmad module (default enabled)])
2403 if test "${enable_mad}" != "no"
2406 [ --with-mad=PATH path to libmad],[],[])
2407 if test "${with_mad}" != "no" -a -n "${with_mad}"
2409 VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
2410 VLC_ADD_LIBS([mpgatofixed32],[-L${with_mad}/lib])
2413 AC_ARG_WITH(mad-tree,
2414 [ --with-mad-tree=PATH mad tree for static linking],[],[])
2415 if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
2417 real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
2418 if test -z "${real_mad_tree}"
2420 dnl The given directory can't be found
2422 AC_MSG_ERROR([${with_mad_tree} directory does not exist])
2424 dnl Use a custom libmad
2425 AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
2426 if test -f ${real_mad_tree}/mad.h
2429 VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
2430 VLC_ADD_LIBS([mpgatofixed32],[-L${real_mad_tree}/.libs])
2431 LDFLAGS="${LDFLAGS_save} ${LIBS_mpgatofixed32}"
2432 AC_CHECK_LIB(mad, mad_bit_init, [
2433 VLC_ADD_PLUGIN([mpgatofixed32])
2434 VLC_ADD_LIBS([mpgatofixed32],[-lmad])
2435 ],[ AC_MSG_ERROR([the specified tree has not been compiled ])
2437 LDFLAGS="${LDFLAGS_save}"
2440 AC_MSG_ERROR([the specified tree does not have mad.h])
2443 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
2444 LDFLAGS="${LDFLAGS_save} ${LIBS_mpgatofixed32}"
2445 AC_CHECK_HEADERS(mad.h, ,
2446 [ 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.]) ])
2447 AC_CHECK_LIB(mad, mad_bit_init, [
2448 VLC_ADD_PLUGIN([mpgatofixed32])
2449 VLC_ADD_LIBS([mpgatofixed32],[-lmad])],
2450 [ AC_MSG_ERROR([Cannot find libmad library...]) ])
2451 CPPFLAGS="${CPPFLAGS_save}"
2452 LDFLAGS="${LDFLAGS_save}"
2457 AC_ARG_ENABLE(merge-ffmpeg,
2458 [ --enable-merge-ffmpeg merge FFmpeg-based plugins (default disabled)],, [
2459 enable_merge_ffmpeg="no"
2461 AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])
2463 AC_CACHE_CHECK([if linker supports -Bsymbolic],
2464 [ac_cv_ld_bsymbolic],
2465 [LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic"
2466 AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no)
2467 LDFLAGS="${LDFLAGS_save}"
2471 dnl avcodec decoder/encoder plugin
2473 AC_ARG_ENABLE(avcodec,
2474 [ --enable-avcodec libavcodec codec (default enabled)])
2475 AS_IF([test "${enable_avcodec}" != "no"], [
2476 PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.25.0 libavutil],
2479 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2480 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2481 AC_CHECK_HEADERS(libavcodec/avcodec.h)
2482 AC_CHECK_HEADERS(libavutil/avutil.h)
2483 VLC_ADD_PLUGIN([avcodec])
2484 VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
2485 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2486 VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic])
2488 VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
2492 AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
2499 dnl libva needs avcodec
2501 AC_ARG_ENABLE(libva,
2502 [ --enable-libva VAAPI GPU decoding support (libVA) (default auto)])
2504 AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
2505 AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
2507 AS_IF([test "${enable_libva}" != "no"], [
2508 PKG_CHECK_MODULES(LIBVA, [libva libva-x11], [
2510 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
2511 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
2512 AC_CHECK_HEADERS(libavcodec/vaapi.h, [
2513 VLC_ADD_LIBS([avcodec],[$LIBVA_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11])
2514 VLC_ADD_CFLAGS([avcodec],[$LIBVA_CFLAGS ${X_CFLAGS}])
2515 AC_DEFINE(HAVE_AVCODEC_VAAPI, 1, [Define if avcodec has to be built with VAAPI support.])
2516 AC_MSG_NOTICE([VAAPI acceleration activated])
2518 AS_IF([test -n "${enable_libva}"], [
2519 AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
2521 AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
2526 AS_IF([test -n "${enable_libva}"], [
2527 AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
2529 AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
2535 dnl dxva2 needs avcodec
2537 AC_ARG_ENABLE(dxva2,
2538 [ --enable-dxva2 DxVA2 GPU decoding support (default auto)])
2540 AS_IF([test "${enable_dxva2}" != "no"], [
2541 if test "${SYS}" = "mingw32"; then
2542 AS_IF([test "x${have_avcodec}" = "xyes"], [
2543 AC_CHECK_HEADERS(dxva2api.h,
2545 AC_CHECK_HEADERS(libavcodec/dxva2.h, [
2546 VLC_ADD_LIBS([avcodec],[-lole32 -lshlwapi -luuid])
2547 AC_DEFINE(HAVE_AVCODEC_DXVA2, 1, [Define if avcodec has to be built with DxVA2 support.])
2548 echo "DxVA2 acceleration activated"
2550 AS_IF([test "${enable_dxva2}" = "yes"],
2551 [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
2552 [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
2555 AS_IF([test "${enable_dxva2}" = "yes"],
2556 [AC_MSG_ERROR([Could not find required dxva2api.h])],
2557 [AC_MSG_WARN([dxva2api.h not found])])
2560 AS_IF([test "x${enable_dxva2}" != "x"], [
2561 AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
2569 dnl stream_out switcher needs libavcodec
2571 AC_ARG_ENABLE(switcher,
2572 [ --enable-switcher Stream-out switcher plugin (default disabled)])
2573 AS_IF([test "${enable_switcher}" = "yes"], [
2574 AS_IF([test "x${have_avcodec}" = "xyes"], [
2575 VLC_ADD_PLUGIN([stream_out_switcher])
2576 VLC_ADD_LIBS([stream_out_switcher],[$AVCODEC_LIBS $AVUTIL_LIBS])
2577 VLC_ADD_CFLAGS([stream_out_switcher],[$AVCODEC_CFLAGS $AVUTIL_CFLAGS])
2578 ],[AC_MSG_ERROR([Stream_out switcher depends on avcodec])
2584 dnl avformat demuxer/muxer plugin
2587 AC_ARG_ENABLE(avformat,
2588 [ --enable-avformat libavformat containers (default enabled)],, [
2589 enable_avformat="${have_avcodec}"
2591 if test "${enable_avformat}" != "no"
2593 PKG_CHECK_MODULES(AVFORMAT,[libavformat > 52.30.0 libavcodec libavutil],
2596 CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
2597 CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
2598 AC_CHECK_HEADERS(libavformat/avformat.h libavformat/avio.h)
2599 AC_CHECK_HEADERS(libavutil/avutil.h)
2600 AS_IF([test "$enable_merge_ffmpeg" = "no"], [
2601 VLC_ADD_PLUGIN([avformat access_avio])
2602 VLC_ADD_LIBS([avformat access_avio],[$AVFORMAT_LIBS $AVUTIL_LIBS])
2603 VLC_ADD_CFLAGS([avformat access_avio],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
2604 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2605 VLC_ADD_LIBS([avformat access_avio],[-Wl,-Bsymbolic])
2608 VLC_ADD_LIBS([avcodec],[$AVFORMAT_LIBS $AVUTIL_LIBS])
2609 VLC_ADD_CFLAGS([avcodec],[$AVFORMAT_CFLAGS $AVUTIL_CFLAGS])
2613 AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
2618 dnl swscale image scaling and conversion plugin
2621 AC_ARG_ENABLE(swscale,
2622 AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion
2623 (default enabled)]))
2624 if test "${enable_swscale}" != "no"
2626 PKG_CHECK_MODULES(SWSCALE,[libswscale],
2629 CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
2630 CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
2631 AC_CHECK_HEADERS(libswscale/swscale.h)
2632 VLC_ADD_PLUGIN([swscale])
2633 VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
2634 VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
2635 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2636 VLC_ADD_LIBS([swscale],[-Wl,-Bsymbolic])
2640 AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
2648 AC_ARG_ENABLE(postproc,
2649 [ --enable-postproc libpostproc image post-processing (default enabled)])
2650 if test "${enable_postproc}" != "no"
2652 PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
2655 CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
2656 CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
2657 AC_CHECK_HEADERS(postproc/postprocess.h)
2658 VLC_ADD_PLUGIN([postproc])
2659 VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS $AVUTIL_LIBS])
2660 VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS])
2663 AC_MSG_ERROR([${POSTPROC_PKG_ERRORS}. Pass --disable-postproc to ignore this error.])
2668 dnl faad decoder plugin
2671 [ --enable-faad faad codec (default disabled)])
2672 if test "${enable_faad}" = "yes"
2674 AC_ARG_WITH(faad-tree,
2675 [ --with-faad-tree=PATH faad tree for static linking])
2676 if test -n "${with_faad_tree}"
2678 AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
2679 real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
2680 if test -z "${real_faad_tree}"
2682 dnl The given directory can't be found
2684 AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
2686 if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
2688 dnl Use a custom faad
2689 AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
2690 VLC_ADD_PLUGIN([faad])
2691 VLC_ADD_LIBS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
2692 VLC_ADD_CPPFLAGS([faad],[-I${real_faad_tree}/include])
2694 dnl The given libfaad wasn't built
2696 AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
2699 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
2700 LDFLAGS="${LDFLAGS_save} ${LIBS_faad}"
2701 AC_CHECK_HEADERS(faad.h, ,
2702 [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
2703 AC_CHECK_LIB(faad, faacDecOpen, [
2704 VLC_ADD_PLUGIN([faad])
2705 VLC_ADD_LIBS([faad],[-lfaad]) ],
2706 AC_CHECK_LIB(faad, NeAACDecOpen, [
2707 VLC_ADD_PLUGIN([faad])
2708 VLC_ADD_LIBS([faad],[-lfaad]) ],
2709 [ AC_MSG_ERROR([Cannot find libfaad library...]) ]))
2710 LDFLAGS="${LDFLAGS_save}"
2711 CPPFLAGS="${CPPFLAGS_save}"
2716 dnl twolame encoder plugin
2718 PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])
2721 dnl QuickTime plugin
2723 AC_ARG_ENABLE(quicktime,
2724 [ --enable-quicktime QuickTime module (deprecated)])
2725 if test "${enable_quicktime}" = "yes"; then
2726 if test "${SYS}" = "mingw32"; then
2727 VLC_ADD_PLUGIN([quicktime])
2729 AC_CHECK_HEADERS(QuickTime/QuickTime.h,
2730 [ VLC_ADD_PLUGIN([quicktime])
2731 VLC_ADD_LIBS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
2732 ], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
2740 [ --enable-real Real video decoder module (default disabled)])
2741 if test "${enable_real}" = "yes"; then
2742 VLC_ADD_PLUGIN([realvideo])
2746 dnl A52/AC3 decoder plugin
2749 [ --enable-a52 A/52 support with liba52 (default enabled)])
2750 if test "${enable_a52}" != "no"
2753 [ --with-a52=PATH a52 headers and libraries])
2754 AC_ARG_WITH(a52-tree,
2755 [ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
2756 if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
2758 real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
2759 if test -z "${real_a52_tree}"
2761 dnl The given directory can't be found
2763 AC_MSG_ERROR([${with_a52_tree} directory does not exist])
2765 dnl Use a custom a52dec
2766 AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
2767 if test -f ${real_a52_tree}/include/a52.h
2770 VLC_ADD_CPPFLAGS([a52tofloat32],[-I${real_a52_tree}])
2771 VLC_ADD_LIBS([a52tofloat32],[-L${real_a52_tree}/liba52/.libs])
2772 LDFLAGS="${LDFLAGS_save} ${LIBS_a52tofloat32}"
2773 AC_CHECK_LIB(a52, a52_free, [
2774 VLC_ADD_PLUGIN([a52tofloat32])
2775 VLC_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
2776 VLC_ADD_LIBS([a52tofloat32],[-la52])
2778 if test -f ${real_a52_tree}/liba52/.libs/liba52.a
2780 AC_MSG_ERROR([make sure you have at least a52dec-0.7.3 ($real_a52_tree)])
2782 AC_MSG_ERROR([the specified tree has not been compiled])
2785 LDFLAGS="${LDFLAGS_save}"
2788 AC_MSG_ERROR([the specified tree does not have a52.h])
2791 if test -z "${with_a52}"
2796 LDFLAGS_test="-L${with_a52}/lib"
2797 CPPFLAGS_test="-I${with_a52}/include"
2799 CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
2800 LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test} ${LIBS_a52tofloat32}"
2801 AC_CHECK_HEADERS(a52dec/a52.h, [
2802 AC_CHECK_LIB(a52, a52_free, [
2803 VLC_ADD_PLUGIN([a52tofloat32])
2804 VLC_ADD_LIBS([a52tofloat32],[${LDFLAGS_test} -la52])
2805 VLC_ADD_CPPFLAGS([a52tofloat32],[${CPPFLAGS_test}])
2807 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.])
2810 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.])
2812 CPPFLAGS="${CPPFLAGS_save}"
2813 LDFLAGS="${LDFLAGS_save}"
2817 AC_ARG_WITH(a52-fixed,
2818 [ --with-a52-fixed specify if liba52 has been compiled with fixed point support],
2820 VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ])
2823 dnl DTS Coherent Acoustics decoder plugin
2825 PKG_ENABLE_MODULES_VLC([DCA], [dtstofloat32], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
2830 PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])
2835 PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])
2840 PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
2845 AC_ARG_ENABLE(tremor,
2846 [ --enable-tremor Tremor decoder support (default disabled)])
2847 if test "${enable_tremor}" = "yes"
2849 AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
2850 VLC_ADD_PLUGIN([tremor])
2851 VLC_ADD_LIBS([tremor],[-lvorbisidec -logg])
2858 PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex support], [auto])
2860 AS_IF([test "${enable_speex}" != "no"], [
2861 PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
2864 AS_IF([test -n "${enable_speex}"], [
2865 AC_MSG_ERROR([${SPEEXDSP_PKG_ERRORS}.])
2867 AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
2871 AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
2874 dnl theora decoder plugin
2876 PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theora >= 1.0], [experimental theora codec], [auto])
2879 dnl dirac encoder plugin
2881 PKG_ENABLE_MODULES_VLC([DIRAC], [], [dirac >= 0.10.0], [dirac encoder], [auto])
2884 dnl schroedinger decoder plugin (for dirac format video)
2886 PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
2889 dnl PNG decoder module
2892 [ --enable-png PNG support (default enabled)])
2893 if test "${enable_png}" != "no"; then
2894 AC_CHECK_HEADERS(png.h, [
2895 LDFLAGS="${LDFLAGS_save} -lz"
2896 AC_CHECK_LIB(png, png_set_rows, [
2897 VLC_ADD_LIBS([png],[-lpng -lz -lm])
2898 VLC_ADD_PLUGIN([png osdmenu osd_parser])],
2900 LDFLAGS="${LDFLAGS_save}"
2903 AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_png}" != "no"])
2906 dnl H264 encoder plugin (using libx264)
2909 [ --enable-x264 H264 encoding support with libx264 (default enabled)])
2910 if test "${enable_x264}" != "no"; then
2911 AC_ARG_WITH(x264-tree,
2912 [ --with-x264-tree=PATH x264 tree for static linking ],[],[])
2913 if test "${with_x264_tree}" != "no" -a -n "${with_x264_tree}"
2915 real_x264_tree="`cd ${with_x264_tree} 2>/dev/null && pwd`"
2916 if test -z "${real_x264_tree}"
2918 dnl The given directory can't be found
2920 AC_MSG_ERROR([${with_x264_tree} directory does not exist])
2922 dnl Use a custom libx264
2923 AC_MSG_CHECKING(for x264.h in ${real_x264_tree})
2924 if test -f ${real_x264_tree}/x264.h
2927 VLC_ADD_CPPFLAGS([x264],[-I${real_x264_tree}])
2928 VLC_ADD_LIBS([x264],[-L${real_x264_tree}])
2929 PKG_CHECK_MODULES(X264,x264, [
2930 VLC_ADD_PLUGIN([x264])
2931 VLC_ADD_LIBS([x264],[${X264_LIBS}])
2932 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2933 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2934 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2937 AC_MSG_ERROR([the specified tree has not been compiled])
2939 LDFLAGS="${LDFLAGS_save}"
2942 AC_MSG_ERROR([the specified tree does not have x264.h])
2945 PKG_CHECK_MODULES(X264,x264 >= 0.86, [
2946 VLC_ADD_PLUGIN([x264])
2947 VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
2949 AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
2950 VLC_ADD_LIBS([x264],[-Wl,-Bsymbolic])
2953 VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
2954 if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
2955 VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
2958 if test "${enable_x264}" = "yes"; then
2959 AC_MSG_ERROR([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
2962 LDFLAGS="${LDFLAGS_save}"
2967 dnl libfluidsynth (MIDI synthetizer) plugin
2969 PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth], [MIDI synthetiser with libfluidsynth], [auto])
2972 dnl Teletext Modules
2973 dnl vbi decoder plugin (using libzbvi)
2978 AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
2979 libzvbi (default enabled)]))
2981 AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
2982 zvbi) (default enabled if zvbi is absent)]))
2984 AS_IF( [test "${enable_zvbi}" != "no"],[
2985 PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.28],
2987 VLC_ADD_LIBS([zvbi],[$ZVBI_LIBS])
2988 if test "${SYS}" = "mingw32"; then
2989 VLC_ADD_LIBS([zvbi],[ -lpthreadGC2])
2991 VLC_ADD_CFLAGS([zvbi],[$ZVBI_CFLAGS])
2992 VLC_ADD_PLUGIN([zvbi])
2993 AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built])
2994 AS_IF( [test "${enable_telx}" = "yes"],[
2995 AC_MSG_WARN([The zvbi and telx modules are incompatible. Using zvbi.])
2998 AC_MSG_WARN([${ZVBI_PKG_ERRORS}. Enabling the telx module instead.])
3001 AS_IF( [test "${enable_telx}" != "no" ],[
3002 VLC_ADD_PLUGIN([telx])
3006 dnl libass subtitle rendering module
3008 AC_ARG_ENABLE(libass,
3009 [ --enable-libass Subtitle support using libass (default enabled)])
3010 AS_IF( [test "${enable_libass}" != "no"], [
3011 PKG_CHECK_MODULES(LIBASS, [libass >= 0.9.8],
3013 VLC_ADD_LIBS([libass],[$LIBASS_LIBS])
3014 VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
3015 VLC_ADD_PLUGIN([libass])
3017 AC_CHECK_HEADERS(fontconfig/fontconfig.h,
3018 [VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
3019 VLC_ADD_LIBS([libass],[-lfontconfig])
3022 AC_MSG_WARN([${LIBASS_PKG_ERRORS}.])
3027 dnl kate decoder plugin
3029 PKG_ENABLE_MODULES_VLC([KATE], [], [kate >= 0.3.0], [kate codec], [auto])
3032 dnl tiger rendering for kate decoder plugin
3034 AC_ARG_ENABLE(tiger,
3035 [ --enable-tiger Tiger rendering library for Kate streams (default auto)])
3036 AS_IF([test "${enable_tiger}" != "no"], [
3037 PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
3038 AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])
3039 VLC_ADD_CFLAGS([kate],[$TIGER_CFLAGS])
3040 VLC_ADD_LIBS([kate],[$TIGER_LIBS]) ],[
3041 AS_IF([test -n "${enable_tiger}"], [
3042 AC_MSG_ERROR([${TIGER_PKG_ERRORS}.])
3052 EXTEND_HELP_STRING([Video plugins:])
3057 PKG_CHECK_MODULES([GL], [gl], [
3060 AC_CHECK_HEADER([GL/gl.h], [
3069 dnl OpenGL ES 2: depends on EGL 1.1 and is currently unfinished
3070 dnl PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [auto])
3071 dnl OpenGL ES 1: depends on EGL 1.0 and is currently broken
3072 dnl PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [auto])
3075 [ --enable-egl OpenGL support through EGL (default disabled)],, [
3078 AS_IF([test "$enable_egl" != "no"], [
3079 PKG_CHECK_MODULES([EGL], [egl], [
3080 VLC_ADD_PLUGIN([gl])
3081 VLC_ADD_PLUGIN([egl])
3090 AC_CHECK_HEADERS(X11/Xlib.h)
3093 dnl X C Bindings modules
3096 [ --enable-xcb X11 support with XCB (default enabled)],, [
3097 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin" -a "${SYS}" != "symbian"], [
3103 AC_ARG_ENABLE(xvideo,
3104 [ --enable-xvideo XVideo support (default enabled)],, [
3105 enable_xvideo="$enable_xcb"
3108 [ --enable-glx OpenGL support through GLX (default enabled)],, [
3109 enable_glx="$enable_xcb"
3113 AS_IF([test "${enable_xcb}" != "no"], [
3115 PKG_CHECK_MODULES(XCB, [xcb >= 1.6])
3117 PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
3118 PKG_CHECK_MODULES(XCB_COMPOSITE, [xcb-composite])
3120 AS_IF([test "${enable_xvideo}" != "no"], [
3121 PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
3122 VLC_ADD_PLUGIN([xcb_xv])
3126 PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [
3127 VLC_ADD_PLUGIN([panoramix])
3128 VLC_ADD_LIBS([panoramix],[${XCB_RANDR_LIBS} ${XCB_LIBS}])
3129 VLC_ADD_CFLAGS([panoramix],[${XCB_RANDR_CFLAGS} ${XCB_CFLAGS}])
3131 AC_MSG_WARN([${XCB_RANDR_PKG_ERRORS}. Panoramix filter will not be supported.])
3135 PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [
3136 PKG_CHECK_MODULES(XPROTO, [xproto])
3137 VLC_ADD_PLUGIN([globalhotkeys])
3138 VLC_ADD_CFLAGS([globalhotkeys], [${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}])
3139 VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}])
3140 VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
3142 AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.])
3145 AS_IF([test "${enable_glx}" != "no"], [
3146 AS_IF([test "${have_gl}" != "yes"], [
3147 AC_MSG_ERROR([${GL_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
3149 PKG_CHECK_MODULES(XLIB_XCB, [x11-xcb], [
3150 VLC_ADD_PLUGIN([xcb_glx])
3152 AC_MSG_ERROR([${XLIB_XCB_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
3156 AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
3162 [ --enable-sdl SDL support (default enabled)])
3163 AC_ARG_ENABLE(sdl-image,
3164 [ --enable-sdl-image SDL image support (default enabled)])
3165 if test "${enable_sdl}" != "no"
3167 PKG_CHECK_MODULES(SDL, [sdl >= 1.2.10], [
3168 # SDL on Darwin is heavily patched and can only run SDL_image
3169 if test "${SYS}" != "darwin"; then
3170 VLC_ADD_PLUGIN([vout_sdl])
3172 if test "${SYS}" != "mingw32" -a "${SYS}" != "os2"; then
3173 VLC_ADD_LIBS([vout_sdl],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3175 VLC_ADD_CFLAGS([vout_sdl],[${SDL_CFLAGS}])
3176 VLC_ADD_LIBS([vout_sdl],[${SDL_LIBS}])
3179 AS_IF([ test "${enable_sdl_image}" != "no"],[
3180 PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
3181 VLC_ADD_PLUGIN([sdl_image])
3182 VLC_ADD_LIBS([sdl_image],[${SDL_IMAGE_LIBS}])
3183 VLC_ADD_CFLAGS([sdl_image], [${SDL_IMAGE_CFLAGS}])],
3184 [ AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
3188 AC_MSG_WARN([${SDL_PKG_ERRORS}.])
3195 AC_ARG_ENABLE(macosx-vout,
3196 [ --enable-macosx-vout Mac OS X video output module (default enabled on Mac OS X)])
3197 if test "x${enable_macosx_vout}" != "xno" &&
3198 (test "${SYS}" = "darwin" || test "${enable_macosx_vout}" = "yes")
3200 VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,Cocoa])
3201 VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,OpenGL])
3202 VLC_ADD_PLUGIN([vout_macosx])
3209 AC_ARG_ENABLE(freetype,
3210 [ --enable-freetype freetype support (default auto)])
3211 AC_ARG_ENABLE(fribidi,
3212 [ --enable-fribidi fribidi support (default auto)])
3213 AC_ARG_ENABLE(fontconfig,
3214 [ --enable-fontconfig fontconfig support (default auto)])
3216 if test "${enable_freetype}" != "no"; then
3217 PKG_CHECK_MODULES(FREETYPE, freetype2, [
3219 VLC_ADD_PLUGIN([freetype])
3220 VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
3221 if test "${SYS}" = "mingw32"; then
3222 VLC_ADD_LIBS([freetype],[-liconv -lz])
3224 VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
3226 AC_CHECK_HEADERS(Carbon/Carbon.h,
3227 [VLC_ADD_LIBS([freetype],[-Wl,-framework,Carbon])])
3229 dnl fontconfig support
3230 if test "${SYS}" != "mingw32"; then
3231 if test "${enable_fontconfig}" != "no"; then
3232 AC_CHECK_HEADERS(fontconfig/fontconfig.h, [
3233 VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
3234 VLC_ADD_LIBS([freetype],[-lfontconfig])
3235 ],[AC_MSG_WARN([library fontconfig not found. Styles will be disabled in freetype])])
3238 VLC_ADD_LIBS([freetype],[-lgdi32])
3242 if test "${enable_fribidi}" != "no"; then
3243 PKG_CHECK_MODULES(FRIBIDI, fribidi, [
3244 VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
3245 VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
3246 ],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional support will be disabled in FreeType.])])
3251 AS_IF([test -n "${enable_freetype}"],[
3252 AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
3259 dnl QuartzText vout module (iOS/Mac OS)
3261 AC_ARG_ENABLE(macosx-quartztext,
3262 [ --enable-macosx-quartztext Mac OS X quartz text module (default enabled on Mac OS X)])
3263 if test "x${enable_macosx_quartztext}" != "xno" &&
3264 (test "${SYS}" = "darwin" || test "${enable_macosx_quartztext}" = "yes")
3266 VLC_ADD_PLUGIN([quartztext])
3267 VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices])
3273 PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
3276 dnl android surface module
3278 AC_ARG_ENABLE(android-surface,
3279 [ --enable-android-surface Android Surface video output module (default disabled)])
3280 if test "${enable_android_surface}" = "yes"; then
3281 if test "${HAVE_ANDROID}" = "1"; then
3282 VLC_ADD_PLUGIN([android_surface])
3283 VLC_ADD_LDFLAGS([android_surface], [-ldl])
3291 AC_ARG_ENABLE(ios-vout,
3292 [ --enable-ios-vout iOS video output module (default disabled)])
3293 if test "${enable_ios_vout}" = "yes"
3295 VLC_ADD_PLUGIN([vout_ios])
3296 VLC_ADD_CFLAGS([vout_ios], [-DUSE_OPENGL_ES=1])
3297 VLC_ADD_LIBS([vout_ios], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit,-framework,Foundation])
3301 dnl Windows DirectX module
3304 if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"
3306 VLC_ADD_PLUGIN([panoramix])
3309 AC_ARG_ENABLE(directx,
3310 [ --enable-directx Win32 DirectX support (default enabled on Win32)])
3311 if test "${enable_directx}" != "no"; then
3312 if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
3314 AC_CHECK_HEADERS(ddraw.h,
3315 [ VLC_ADD_PLUGIN([directx aout_directx])
3316 VLC_ADD_LIBS([directx],[-luser32 -lgdi32])
3317 ],[AC_MSG_ERROR([Cannot find DirectX headers!])]
3321 AC_CHECK_HEADERS(GL/wglew.h,
3322 [ VLC_ADD_PLUGIN([glwin32])
3323 VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
3325 #include <windows.h>
3330 AC_CHECK_HEADERS(d3d9.h,
3331 [ VLC_ADD_PLUGIN([direct3d])
3332 VLC_ADD_LIBS([direct3d],[-lgdi32])
3334 VLC_ADD_LIBS([direct3d directx glwin32],[-lole32])
3339 dnl Windows Direct2D plugin
3341 AC_ARG_ENABLE(direct2d,
3342 [ --enable-direct2d Win7/VistaPU Direct2D support (default auto on Win32)],, [
3343 AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
3344 enable_direct2d="no"
3347 AS_IF([test "${enable_direct2d}" != "no"], [
3348 AC_CHECK_HEADERS(d2d1.h, [
3349 VLC_ADD_PLUGIN([direct2d])
3350 VLC_ADD_LIBS([direct2d],[-lgdi32 -lole32])
3352 AC_MSG_WARN([Cannot find Direct2D headers!])
3357 dnl win32 GDI plugin
3359 AC_ARG_ENABLE(wingdi,
3360 [ --enable-wingdi Win32 GDI module (default enabled on Win32)])
3361 if test "${enable_wingdi}" != "no"; then
3362 if test "${SYS}" = "mingw32"; then
3363 VLC_ADD_PLUGIN([wingdi])
3364 VLC_ADD_LIBS([wingdi],[-lgdi32 -lole32])
3366 if test "${SYS}" = "mingwce"; then
3367 VLC_ADD_PLUGIN([wingdi wingapi])
3368 VLC_ADD_LIBS([wingdi],[-laygshell])
3369 VLC_ADD_LIBS([wingapi],[-laygshell])
3375 dnl Linux framebuffer module
3377 AC_CHECK_HEADER([linux/fb.h], [
3378 VLC_ADD_PLUGIN([fb])
3384 dnl try to find using: 1 - given location; 2 - directfb-config; 3 - pkg-config
3385 dnl TODO: support for static linking
3387 AC_ARG_ENABLE(directfb,
3388 [ --enable-directfb DirectFB support (default disabled)])
3389 AC_ARG_WITH(directfb,
3390 [ --with-directfb=PATH path to DirectFB headers and libraries])
3392 if test "${enable_directfb}" = "yes"; then
3393 have_directfb="false"
3394 CPPFLAGS_mydirectfb=
3396 if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
3397 dnl Trying the given location
3398 CPPFLAGS_save="${CPPFLAGS}"
3401 CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
3402 LIBS_new="-L${with_directfb}/lib/fusion/.libs/ -L${with_directfb}/lib/direct/.libs/"
3403 LIBS_new="${LIBS_new} -L${with_directfb}/src/.libs/"
3405 CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
3406 LIBS="${LIBS} ${LIBS_new}"
3408 dnl FIXME: too obscure
3409 AC_CHECK_HEADER([directfb.h], [
3410 AC_CHECK_LIB([direct],[direct_initialize], [
3411 AC_CHECK_LIB([fusion], [fusion_enter], [
3412 AC_CHECK_LIB([directfb], [DirectFBInit], have_directfb="true", have_directfb="false")
3413 ], have_directfb="false")
3414 ], have_directfb="false")
3415 ], have_directfb="false")
3418 CPPFLAGS="${CPPFLAGS_save}"
3421 if test "${have_directfb}" = "true"; then
3422 LIBS_mydirectfb="${LIBS_new} -lz $LIBDL -ldirectfb -lfusion -ldirect -lpthread"
3423 CPPFLAGS_mydirectfb="${CPPFLAGS_new}"
3426 dnl Look for directfb-config
3427 AC_PATH_PROG(DIRECTFB_CONFIG, directfb-config, no, ${PATH})
3428 if test "${DIRECTFB_CONFIG}" != "no"; then
3429 CPPFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --cflags`"
3430 LIBS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
3431 have_directfb="true"
3433 dnl Trying with pkg-config
3434 PKG_CHECK_MODULES(DIRECTFB, directfb, [
3435 CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
3436 LIBS_mydirectfb="${DIRECTFB_LIBS}"
3437 have_directfb="true"
3438 ], [have_directfb="false"])
3441 if test "${have_directfb}" = "true"; then
3442 VLC_ADD_PLUGIN([directfb])
3443 VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
3444 VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}])
3446 AC_MSG_ERROR([${DIRECTFB_PKG_ERRORS}.])
3454 [ --enable-aa aalib output (default disabled)])
3455 if test "${enable_aa}" = "yes"
3457 AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
3458 if test "${have_aa}" = "true"
3460 VLC_ADD_PLUGIN([aa])
3461 VLC_ADD_LIBS([aa],[-laa])
3462 if test "${SYS}" != "mingw32"; then
3463 VLC_ADD_LIBS([aa],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3471 PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3477 EXTEND_HELP_STRING([Audio plugins:])
3480 dnl Pulseaudio module
3482 AC_ARG_ENABLE(pulse,
3483 [AS_HELP_STRING([--enable-pulse],
3484 [use the PulseAudio client library (default auto)])])
3486 AS_IF([test "${enable_pulse}" != "no"], [
3487 PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.22], [
3490 PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.16], [
3491 AS_IF([test "${no_x}" != "yes"], [
3493 PULSE_LIBS="$PULSE_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11"
3495 AS_IF([test "${enable_pulse}" = "yes"], [
3496 AC_MSG_ERROR([Xlib is required with PulseAudio pre-0.9.22 versions
3497 (see http://www.pulseaudio.org/ticket/799 for further reference).])
3501 AS_IF([test "x${enable_pulse}" != "x"], [
3502 AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 0.9.22 or later required.])
3507 AM_CONDITIONAL([HAVE_PULSE], [test "${have_pulse}" = "yes"])
3513 [AS_HELP_STRING([--enable-alsa],
3514 [support the Advanced Linux Sound Architecture (default auto)])],, [
3515 AS_IF([test "$SYS" = "linux" -a "${have_pulse}" = "no"], [
3520 AS_IF([test "${enable_alsa}" != "no"], [
3521 PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.16], [
3524 AS_IF([test "x${enable_alsa}" != "x"], [
3525 AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.16 or later required.])
3529 AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
3532 dnl Open Sound System module
3535 [AS_HELP_STRING([--enable-oss],
3536 [support the Open Sound System OSS (default enabled on BSD)])],, [
3537 AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "mingwce" -o "$SYS" = "linux"], [
3543 AS_IF([test "$enable_oss" != "no"], [
3544 AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
3546 AC_CHECK_LIB(ossaudio, main, [
3547 OSS_LIBS="-lossaudio"
3552 AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
3555 dnl Portaudio module
3557 PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library support], [auto])
3560 dnl win32 waveOut plugin
3562 AC_ARG_ENABLE(waveout,
3563 [ --enable-waveout Win32 waveOut module (default enabled on Win32)])
3564 if test "${enable_waveout}" != "no"; then
3565 if test "${SYS}" = "mingw32"; then
3566 VLC_ADD_PLUGIN([waveout])
3567 VLC_ADD_LIBS([waveout],[-lwinmm])
3569 if test "${SYS}" = "mingwce"; then
3570 VLC_ADD_PLUGIN([waveout])
3575 dnl CoreAudio plugin
3577 AC_ARG_ENABLE(macosx-audio,
3578 [ --enable-macosx-audio Mac OS X audio module (default enabled on MacOS X)])
3579 if test "x${enable_macosx_audio}" != "xno" &&
3580 (test "${SYS}" = "darwin" || test "${enable_macosx_audio}" = "yes")
3582 AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
3583 [ VLC_ADD_PLUGIN([auhal])
3584 VLC_ADD_LIBS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,Carbon])
3585 ], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
3589 dnl AudioQueue plugin
3591 AC_ARG_ENABLE(audioqueue,
3592 [ --enable-audioqueue AudioQueue audio module (default disabled)])
3593 if test "${enable_audioqueue}" = "yes"
3595 VLC_ADD_PLUGIN([audioqueue])
3596 VLC_ADD_LIBS([audioqueue], [-Wl,-framework,AudioToolbox,-framework,CoreFoundation])
3602 PKG_ENABLE_MODULES_VLC([JACK], [jack access_jack], [jack], [JACK audio I/O modules],[auto])
3605 dnl OpenSLES Android
3607 AC_ARG_ENABLE(opensles,
3608 [ --enable-opensles Android OpenSL ES audio module (default disabled)])
3609 if test "${HAVE_ANDROID}" = "1"; then
3610 if test "${enable_opensles}" = "yes"; then
3611 AC_CHECK_HEADERS(SLES/OpenSLES.h,
3612 [ VLC_ADD_PLUGIN([opensles_android]) ],
3613 [ AC_MSG_ERROR([cannot find OpenSLES headers])] )
3618 dnl libsamplerate plugin
3620 PKG_ENABLE_MODULES_VLC([SAMPLERATE], [], [samplerate], [Resampler with libsamplerate], [auto])
3626 [AS_HELP_STRING([--enable-kai],
3627 [support the K Audio Interface KAI (default enabled on OS/2)])],, [
3628 AS_IF([test "$SYS" = "os2"], [
3634 AS_IF([test "$enable_kai" != "no"], [
3635 AC_CHECK_HEADERS([kai.h], [
3637 AC_CHECK_LIB(kai, main, [
3643 AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"])
3646 dnl Interface plugins
3649 EXTEND_HELP_STRING([Interface plugins:])
3654 AC_ARG_ENABLE(skins2,
3655 [AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)])])
3656 AS_IF([test "${enable_skins2}" != "no"], [
3657 have_skins_deps="yes"
3658 AS_IF([test "${SYS}" = "mingw32"], [
3659 VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
3660 VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
3661 VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
3663 ], [test "${SYS}" = "darwin"], [
3664 VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
3665 VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
3666 VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon])
3669 PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
3670 PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
3671 PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
3672 VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
3673 VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
3674 VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
3677 AS_IF([test "${have_freetype}" != "yes"], [
3678 have_skins_deps="no"
3681 AS_IF([test "${have_skins_deps}" = "no"], [
3682 AS_IF([test "x${enable_skins2}" = "x"], [
3683 AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
3685 AC_MSG_ERROR([Skins2 interface requires FreeType, libxpm, libxext and libxinerama])
3689 VLC_ADD_PLUGIN([skins2])
3690 ALIASES="${ALIASES} svlc"
3693 AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
3695 AC_ARG_ENABLE(libtar,
3696 [ --enable-libtar libtar support for skins2 (default auto)])
3697 AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
3698 AC_CHECK_HEADERS(libtar.h, [
3699 VLC_ADD_LIBS([skins2],[-ltar])
3706 AC_ARG_ENABLE(hildon,
3707 [ --enable-hildon Hildon touchscreen UI (default disabled)])
3708 AS_IF([test "${enable_hildon}" = "yes"], [
3709 PKG_CHECK_MODULES(HILDON, [hildon-1], [
3710 PKG_CHECK_MODULES(HILDON_FM, hildon-fm-2, [
3711 VLC_ADD_CFLAGS([hildon],[${HILDON_FM_CFLAGS} -DHAVE_HILDON_FM])
3712 VLC_ADD_LIBS([hildon],[${HILDON_FM_LIBS}])
3714 AC_MSG_WARN([${HILDON_FM_PKG_ERRORS}.])
3716 VLC_ADD_CFLAGS([hildon],[${HILDON_CFLAGS} ${X_CFLAGS}])
3717 VLC_ADD_LIBS([hildon],[${HILDON_LIBS} ${X_LIBS} ${X_PRE_LIBS} -lX11])
3718 VLC_ADD_PLUGIN([hildon])
3719 ALIASES="${ALIASES} mvlc"
3721 AS_IF([test "${enable_hildon}" = "yes"],[
3722 AC_MSG_ERROR([${HILDON_PKG_ERRORS}.])
3727 AM_CONDITIONAL(BUILD_HILDON, [test "${enable_hildon}" = "yes"])
3733 [ --enable-qt4 Qt 4 support (default enabled) ],, [
3734 AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
3736 AS_IF([test "${enable_qt4}" != "no"], [
3737 PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.6.0], [
3738 VLC_ADD_PLUGIN([qt4])
3739 VLC_ADD_LIBS([qt4],[${QT4_LIBS}])
3740 VLC_ADD_CXXFLAGS([qt4],[${QT4_CFLAGS}])
3741 ALIASES="${ALIASES} qvlc"
3744 CPPFLAGS_save="${CPPFLAGS}"
3746 AC_MSG_CHECKING([whether Qt uses X11])
3747 CPPFLAGS="${CPPFLAGS} ${QT4_CFLAGS}"
3748 AC_PREPROC_IFELSE([AC_LANG_SOURCE([
3750 #if !defined (Q_WS_X11)
3754 AC_MSG_RESULT([yes])
3755 VLC_ADD_LIBS([qt4],[${X_LIBS} ${X_PRE_LIBS} -lX11])
3756 VLC_ADD_CXXFLAGS([qt4],[${X_CFLAGS}])
3761 CPPFLAGS="${CPPFLAGS_save}"
3764 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
3765 VLC_ADD_LIBS([qt4],[-lole32])
3767 AS_IF([test "${SYS}" = "darwin" ],[
3768 VLC_ADD_LIBS([qt4], [-Wl,-framework,Cocoa])
3770 AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
3771 AC_PATH_PROG(RCC, rcc, rcc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
3772 AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
3774 AS_IF([test -n "${enable_qt4}"],[
3775 AC_MSG_ERROR([${QT4_PKG_ERRORS}.])
3777 AC_MSG_WARN([${QT4_PKG_ERRORS}.])
3782 AM_CONDITIONAL(ENABLE_QT4, [test "x$enable_qt4" != "xno"])
3785 dnl Simple test for skins2 dependency
3787 AS_IF([test "${enable_skins2}" != "no" && test "x$enable_qt4" = "xno"], [
3788 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.])
3792 dnl MacOS X gui module
3794 AC_ARG_ENABLE(macosx,
3795 [ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)])
3796 if test "x${enable_macosx}" != "xno" &&
3797 (test "${SYS}" = "darwin" || test "${enable_macosx}" = "yes")
3799 VLC_ADD_LIBS([macosx minimal_macosx],[-Wl,-framework,Cocoa])
3800 VLC_ADD_LIBS([macosx minimal_macosx],[-Wl,-framework,OpenGL])
3801 VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,Carbon])
3802 VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,CoreServices])
3803 VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,AGL])
3804 VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit])
3805 VLC_ADD_LIBS([macosx], [-Wl,-framework,IOKit])
3806 VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
3807 VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle])
3808 VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit -Wl,-framework,BGHUDAppKit])
3809 VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit])
3811 VLC_ADD_LIBS([macosx], [-Wl,-framework,AddressBook])
3812 VLC_ADD_LIBS([macosx], [-Wl,-framework,WebKit])
3813 VLC_ADD_OBJCFLAGS([macosx minimal_macosx], [-fobjc-exceptions] )
3815 VLC_ADD_PLUGIN([macosx minimal_macosx])
3819 dnl MacOS X dialor provider
3821 AC_ARG_ENABLE(macosx-dialog-provider,
3822 [ --enable-macosx-dialog-provider Mac OS X dialog module (default enabled on Mac OS X)])
3823 if test "x${enable_macosx_dialog_provider}" != "xno" &&
3824 (test "${SYS}" = "darwin" || test "${enable_macosx_dialog_provider}" = "yes")
3826 VLC_ADD_LIBS([macosx_dialog_provider],[-Wl,-framework,Cocoa])
3827 VLC_ADD_PLUGIN([macosx_dialog_provider])
3833 AC_ARG_ENABLE(ncurses,
3834 [ --disable-ncurses ncurses interface support (default disabled)],
3835 [if test "${enable_ncurses}" != "no"; then
3836 AC_CHECK_HEADER(ncurses.h,
3837 [AC_CHECK_LIB(ncursesw, mvprintw,
3838 [VLC_ADD_PLUGIN([ncurses])
3839 VLC_ADD_LIBS([ncurses],[-lncursesw])
3840 ALIASES="${ALIASES} nvlc"
3841 AC_CHECK_LIB(ncursesw, tgetent, [],
3842 AC_CHECK_LIB(tinfow, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfow])],
3843 [AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])],
3844 [AS_IF([test "${enable_ncurses}" = "yes"],
3845 [AC_MSG_ERROR([tgetent not found in ncursesw tinfow tinfo]
3851 [AS_IF([test "${enable_ncurses}" = "yes"], [
3852 AC_MSG_ERROR([libncursesw not found])])]
3854 [AS_IF([test "${enable_ncurses}" = "yes"], [
3855 AC_MSG_ERROR([ncurses.h not found])])]
3864 [ --enable-xosd xosd interface support (default disabled)])
3865 if test "${enable_xosd}" = "yes"
3867 AC_CHECK_HEADERS(xosd.h,
3868 AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
3869 VLC_ADD_PLUGIN([xosd])
3870 VLC_ADD_LIBS([xosd],[-lxosd])
3876 dnl Framebuffer (overlay) plugin
3878 AC_ARG_ENABLE(fbosd,
3879 [ --enable-fbosd fbosd interface support (default disabled)])
3880 if test "${enable_fbosd}" = "yes"
3882 AC_CHECK_HEADERS(linux/fb.h, [
3883 VLC_ADD_PLUGIN([fbosd])
3891 [ --enable-lirc lirc support (default disabled)])
3892 if test "${enable_lirc}" = "yes"
3894 AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
3895 if test "${have_lirc}" = "true"
3897 VLC_ADD_PLUGIN([lirc])
3898 VLC_ADD_LIBS([lirc],[-llirc_client])
3902 EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
3904 dnl Visualisation plugin
3906 AC_ARG_ENABLE(visual,
3907 [ --enable-visual visualisation plugin (default enabled)])
3908 if test "${enable_visual}" != "no"
3910 VLC_ADD_PLUGIN([visual])
3914 dnl goom visualization plugin
3916 PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [auto])
3919 dnl libprojectM visualization plugin
3921 AC_ARG_ENABLE(projectm,
3922 [ --enable-projectm projectM visualization plugin (default enabled)])
3923 AS_IF([test "${enable_projectm}" != "no"],
3925 PKG_CHECK_MODULES(PROJECTM, libprojectM,
3927 VLC_ADD_PLUGIN([projectm])
3928 VLC_ADD_CXXFLAGS([projectm],[$PROJECTM_CFLAGS])
3929 VLC_ADD_LIBS([projectm],[$PROJECTM_LIBS])
3930 PKG_CHECK_MODULES(PROJECTM2, [libprojectM >= 2.0.0],
3931 [ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ],
3932 [ AC_MSG_WARN( [Using libprojectM version 1] )
3935 AC_MSG_WARN([${PROJECTM_PKG_ERRORS}.])
3940 dnl AtmoLight (homemade Philips Ambilight clone)
3943 AS_HELP_STRING([--disable-atmo],[AtmoLight (homemade Philips Ambilight clone)
3944 (default enabled)]),, [enable_atmo="yes"])
3945 AS_IF([test "${enable_atmo}" != no], [
3946 AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "linux"], [
3948 VLC_ADD_PLUGIN([atmo])
3953 EXTEND_HELP_STRING([Service Discovery plugins:])
3955 dnl Bonjour services discovery
3956 PKG_ENABLE_MODULES_VLC([BONJOUR], [], [avahi-client >= 0.6], [Bonjour services discovery], [auto])
3959 dnl libudev services discovery
3960 PKG_ENABLE_MODULES_VLC([UDEV], [], [libudev >= 142], [Linux udev services discovery], [auto])
3963 dnl MTP devices services discovery
3964 PKG_ENABLE_MODULES_VLC([MTP], [mtp access_mtp], [libmtp >= 1.0.0], [MTP devices support], [auto])
3967 dnl UPnP Plugin (Intel SDK)
3969 PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto])
3970 VLC_ADD_CXXFLAGS([upnp],[${UPNP_CFLAGS}])
3972 EXTEND_HELP_STRING([Misc options:])
3977 PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
3983 AC_ARG_ENABLE(libgcrypt,
3984 [ --disable-libgcrypt gcrypt support (default enabled)])
3985 AS_IF([test "${enable_libgcrypt}" != "no"], [
3986 AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [
3987 libgcrypt-config --version >/dev/null || \
3988 AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found])
3989 AC_CHECK_LIB(gcrypt, gcry_control, [
3990 have_libgcrypt="yes"
3991 GCRYPT_CFLAGS="`libgcrypt-config --cflags`"
3992 GCRYPT_LIBS="`libgcrypt-config --libs`"
3994 AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
3995 ], [`libgcrypt-config --libs`])
3997 AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
3998 ], [#include <gcrypt.h>]
4002 if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
4003 AS_IF([test "${have_libgcrypt}" = "yes"],[
4004 VLC_ADD_LIBS([rtp stream_out_rtp], [${GCRYPT_LIBS}])
4007 AC_SUBST(GCRYPT_CFLAGS)
4008 AC_SUBST(GCRYPT_LIBS)
4009 AM_CONDITIONAL([HAVE_GCRYPT], [test "${have_libgcrypt}" = "yes"])
4014 AC_ARG_ENABLE(gnutls,
4015 [ --enable-gnutls GNU TLS TLS/SSL support (default enabled)])
4017 AS_IF([test "${have_libgcrypt}" != "yes"], [
4018 AS_IF([test "${enable_gnutls}" = "yes"], [
4019 AC_MSG_ERROR([--enable-gnutls and --disable-libgcrypt are mutually exclusive.])
4023 AS_IF([test "${enable_gnutls}" != "no"], [
4024 PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.0.0], [
4025 VLC_ADD_PLUGIN([gnutls])
4026 VLC_ADD_CFLAGS([gnutls], [$GNUTLS_CFLAGS])
4027 AS_IF([test "${SYS}" = "mingw32"], [
4028 dnl pkg-config --libs gnutls omits these
4029 VLC_ADD_LIBS([gnutls], [-lz ${LTLIBINTL} -lcrypt32])
4031 VLC_ADD_LIBS([gnutls], [${GCRYPT_LIBS}])
4032 VLC_ADD_CFLAGS([gnutls], [${GCRYPT_CFLAGS}])
4033 VLC_ADD_LIBS([gnutls], [$GNUTLS_LIBS])
4035 AS_IF([test -n "${enable_gnutls}"], [
4036 AC_MSG_ERROR([${GNUTLS_PKG_ERRORS}.)])
4043 dnl RemoteOSD plugin (VNC client as video filter)
4045 AC_MSG_CHECKING([whether to enable the RemoteOSD plugin])
4046 AS_IF([test "${have_libgcrypt}" = "yes"],[
4048 VLC_ADD_PLUGIN([remoteosd])
4049 VLC_ADD_LIBS([remoteosd], ${GCRYPT_LIBS})
4050 VLC_ADD_CFLAGS([remoteosd], ${GCRYPT_CFLAGS})
4053 AC_MSG_WARN([libgcrypt support required for RemoteOSD plugin])
4060 AC_MSG_CHECKING([whether to enable the RAOP plugin])
4061 AS_IF([test "${have_libgcrypt}" = "yes"], [
4063 VLC_ADD_PLUGIN([stream_out_raop])
4064 VLC_ADD_LIBS([stream_out_raop], [${GCRYPT_LIBS} -lgpg-error])
4065 VLC_ADD_CFLAGS([stream_out_raop], [${GCRYPT_CFLAGS}])
4068 AC_MSG_WARN([libgcrypt support required for RAOP plugin])
4073 dnl Nokia MCE plugin (Maemo screen unblanking)
4075 PKG_CHECK_MODULES([MCE], [dbus-1 mce], [VLC_ADD_PLUGIN([mce])], [true])
4078 AS_IF([test -f "/etc/maemo_version"], [
4079 AC_DEFINE([HAVE_MAEMO], 1, [Define to 1 if building for the Maemo platform.])
4086 AC_ARG_ENABLE(taglib,
4087 [AS_HELP_STRING([--disable-taglib],
4088 [do not use TagLib (default enabled)])])
4089 AS_IF([test "${enable_taglib}" != "no"], [
4090 PKG_CHECK_MODULES(TAGLIB, taglib >= 1.5, [
4091 VLC_ADD_PLUGIN([taglib])
4092 VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz])
4093 VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS])
4095 AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])])
4100 dnl update checking system
4102 AC_ARG_ENABLE(update-check,
4103 [ --enable-update-check update checking system (default disabled)])
4104 if test "${enable_update_check}" = "yes"
4106 if test "${have_libgcrypt}" != "yes"
4108 AC_MSG_ERROR([libgcrypt is required for update checking system])
4110 VLC_ADD_LIBS([libvlccore], [${GCRYPT_LIBS}])
4111 VLC_ADD_CFLAGS([libvlccore], [${GCRYPT_CFLAGS}])
4112 AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
4116 dnl Growl notification plugin
4118 AC_ARG_ENABLE(growl,
4119 [ --enable-growl growl notification plugin (default disabled)],,
4121 AS_IF([test "${enable_growl}" != "no"], [
4122 AC_CHECK_HEADERS(${CONTRIB_DIR}/Growl/Growl.framework/Versions/A/Headers/GrowlDefines.h, [
4123 VLC_ADD_PLUGIN([growl])
4124 VLC_ADD_LIBS([growl], [-F${CONTRIB_DIR}/Growl -Wl,-framework,Growl,-framework,CoreFoundation])
4125 VLC_ADD_OBJCFLAGS([growl], [-F${CONTRIB_DIR}/Growl])
4126 VLC_ADD_OBJCFLAGS([growl], [-fobjc-exceptions] )
4132 dnl Libnotify notification plugin
4134 PKG_ENABLE_MODULES_VLC([NOTIFY], [], [libnotify gtk+-2.0], [libnotify notification], [auto])
4139 AC_ARG_ENABLE(media-library,
4140 [ --enable-media-library media library (default disabled)])
4141 AS_IF([test "${enable_media_library}" = "yes"], [
4142 AC_DEFINE([MEDIA_LIBRARY], 1, [Define if you want to use the VLC media library])
4143 VLC_ADD_CPPFLAGS([qt4],"-DMEDIA_LIBRARY")
4144 VLC_ADD_PLUGIN([media_library])
4149 AS_IF([test "${SYS}" != "darwin"], [
4150 PKG_ENABLE_MODULES_VLC([SQLITE], [], [sqlite3 >= 3.6.0], [sqlite3], [auto])
4152 AS_IF([test "${enable_sqlite}" != "no"], [
4153 AC_CHECK_HEADERS(sqlite3.h, [
4154 VLC_ADD_PLUGIN([sqlite])
4155 VLC_ADD_LIBS([sqlite], [-lsqlite3])
4157 AC_MSG_ERROR([sqlite3 is required for the media library])
4165 dnl Endianness check
4168 AS_IF([test "${ac_cv_c_bigendian}" = "yes"], [
4169 DEFS_BIGENDIAN="-DWORDS_BIGENDIAN=1"
4173 AC_SUBST(DEFS_BIGENDIAN)
4176 dnl Where to install KDE solid .desktop
4178 AC_ARG_VAR([KDE4_CONFIG], [kde4-config utility])
4179 AS_IF([test "x$KDE4_CONFIG" = "x"], [
4180 KDE4_CONFIG="kde4-config"
4183 AC_ARG_WITH(kde-solid,
4184 AS_HELP_STRING([--with-kde-solid=PATH],
4185 [KDE Solid actions directory (auto)]),, [
4187 if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ; then
4188 with_kde_solid="yes"
4192 AS_IF([test "${with_kde_solid}" != "no"], [
4193 AS_IF([test "${with_kde_solid}" = "yes"], [
4194 kde4datadir="`${KDE4_CONFIG} --install data`"
4195 AS_IF([test "x$kde4datadir" = "x"], [kde4datadir='${datadir}/kde4/apps'])
4196 soliddatadir="${kde4datadir}/solid/actions"
4198 soliddatadir="${with_kde_solid}"
4201 AC_SUBST(soliddatadir)
4202 AM_CONDITIONAL(KDE_SOLID, [test "x${soliddatadir}" != "x"])
4205 dnl DLL loader copied from MPlayer copied from somewhere else (WINE ?)
4208 AC_ARG_ENABLE(loader,
4209 AS_HELP_STRING([--enable-loader],[build DLL loader for ELF i386 platforms
4210 (default disabled)]))
4211 AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
4212 AS_IF([test "${enable_loader}" = "yes"],
4213 [ VLC_ADD_PLUGIN([dmo])
4214 VLC_ADD_CPPFLAGS([dmo quicktime realvideo],[-I\\\${top_srcdir}/modules/codec/loader])
4215 VLC_ADD_LIBS([dmo quicktime realvideo],[\\\${top_builddir}/modules/codec/loader/libloader.la])
4216 VLC_ADD_CPPFLAGS([realvideo], [-DLOADER])
4217 VLC_ADD_LIBS([dmo quicktime], [-lpthread])
4220 EXTEND_HELP_STRING([Components:])
4226 [ --enable-vlc build the VLC media player (default enabled)])
4227 AM_CONDITIONAL(BUILD_VLC, [test "${enable_vlc}" != "no"])
4229 AC_ARG_ENABLE(macosx-vlc-app,
4230 [ --enable-macosx-vlc-app build the VLC media player (default enabled on Mac OS X)])
4231 AM_CONDITIONAL(BUILD_MACOSX_VLC_APP, [test "${enable_macosx_vlc_app}" != "no" &&
4232 (test "${SYS}" = "darwin" || test "${enable_macosx_vlc_app}" = "yes") ])
4235 dnl Stuff used by the program
4237 VERSION_MESSAGE="${VERSION} ${CODENAME}"
4238 COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
4239 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION_MESSAGE}", [Simple version string])
4240 AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "${COPYRIGHT_MESSAGE}", [Copyright string])
4241 AC_DEFINE_UNQUOTED(COPYRIGHT_YEARS, "${COPYRIGHT_YEARS}", [The copyright years])
4242 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
4243 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,${VERSION_MAJOR}, [version major number])
4244 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,${VERSION_MINOR}, [version minor number])
4245 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_REVISION,${VERSION_REVISION}, [version revision number])
4246 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_EXTRA,${VERSION_EXTRA}, [version extra number])
4247 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_DEV,"${VERSION_DEV}", [version development string])
4248 AC_SUBST(COPYRIGHT_MESSAGE)
4249 AC_SUBST(VERSION_MESSAGE)
4250 AC_SUBST(VERSION_MAJOR)
4251 AC_SUBST(VERSION_MINOR)
4252 AC_SUBST(VERSION_REVISION)
4253 AC_SUBST(VERSION_EXTRA)
4254 AC_SUBST(COPYRIGHT_YEARS)
4255 AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure])
4256 AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname -f 2>/dev/null || hostname`", [host which ran configure])
4257 AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler])
4259 dnl Handle substvars that use $(top_srcdir)
4261 CPPFLAGS_save="-I\$(top_srcdir)/include -I\$(top_builddir)/include ${CPPFLAGS_save}"
4269 dnl Sort the modules list
4271 PLUGINS=$( (for i in `echo $PLUGINS`; do echo $i; done)|sort|xargs )
4274 dnl Configuration is finished
4284 AC_SUBST(WINE_SDK_PATH)
4286 AC_SUBST(AM_CPPFLAGS)
4287 AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
4288 AC_SUBST(FILE_LIBVLCCORE_DLL)
4289 AC_SUBST(FILE_LIBVLC_DLL)
4304 modules/access/Makefile
4305 modules/access/bd/Makefile
4306 modules/access/dshow/Makefile
4307 modules/access/mms/Makefile
4308 modules/access/rtp/Makefile
4309 modules/access/rtsp/Makefile
4310 modules/access/vcd/Makefile
4311 modules/access/vcdx/Makefile
4312 modules/access/screen/Makefile
4313 modules/access/zip/Makefile
4314 modules/access/zip/unzip/Makefile
4315 modules/access_output/Makefile
4316 modules/audio_filter/Makefile
4317 modules/audio_mixer/Makefile
4318 modules/audio_output/Makefile
4319 modules/codec/Makefile
4320 modules/codec/avcodec/Makefile
4321 modules/codec/dmo/Makefile
4322 modules/codec/loader/Makefile
4323 modules/codec/omxil/Makefile
4324 modules/codec/shine/Makefile
4325 modules/codec/spudec/Makefile
4326 modules/codec/wmafixed/Makefile
4327 modules/control/Makefile
4328 modules/control/dbus/Makefile
4329 modules/control/globalhotkeys/Makefile
4330 modules/demux/Makefile
4331 modules/demux/asf/Makefile
4332 modules/demux/avformat/Makefile
4333 modules/demux/avi/Makefile
4334 modules/demux/mkv/Makefile
4335 modules/demux/mp4/Makefile
4336 modules/demux/mpeg/Makefile
4337 modules/demux/playlist/Makefile
4338 modules/gui/Makefile
4339 modules/gui/macosx/Makefile
4340 modules/gui/hildon/Makefile
4341 modules/gui/minimal_macosx/Makefile
4342 modules/gui/macosx_dialog_provider/Makefile
4343 modules/gui/qt4/Makefile
4344 modules/gui/skins2/Makefile
4345 modules/lua/Makefile
4346 modules/meta_engine/Makefile
4347 modules/misc/Makefile
4348 modules/misc/playlist/Makefile
4349 modules/misc/osd/Makefile
4350 modules/misc/stats/Makefile
4351 modules/media_library/Makefile
4352 modules/mux/Makefile
4353 modules/mux/mpeg/Makefile
4354 modules/notify/Makefile
4355 modules/packetizer/Makefile
4356 modules/services_discovery/Makefile
4357 modules/stream_filter/Makefile
4358 modules/stream_filter/dash/Makefile
4359 modules/stream_out/Makefile
4360 modules/stream_out/transcode/Makefile
4361 modules/text_renderer/Makefile
4362 modules/video_chroma/Makefile
4363 modules/video_filter/Makefile
4364 modules/video_filter/dynamicoverlay/Makefile
4365 modules/video_output/Makefile
4366 modules/video_output/msw/Makefile
4367 modules/visualization/Makefile
4368 modules/visualization/visual/Makefile
4369 modules/mmx/Makefile
4370 modules/mmxext/Makefile
4371 modules/3dnow/Makefile
4372 modules/sse2/Makefile
4373 modules/altivec/Makefile
4374 modules/arm_neon/Makefile
4377 AM_COND_IF([HAVE_WIN32], [
4379 extras/package/win32/spad.nsi
4380 extras/package/win32/vlc.win32.nsi
4384 AM_COND_IF([HAVE_DARWIN], [
4386 extras/package/macosx/Info.plist
4387 extras/package/macosx/Resources/English.lproj/InfoPlist.strings
4391 dnl Generate makefiles
4394 dnl Do we have to use make or gmake ?
4395 USE_MAKE_OR_GMAKE=`case "${SYS}" in openbsd*) echo "gmake";; *) echo "make";; esac`
4396 dnl Shortcut to nice compile message
4398 if test -n $SHELL; then
4399 SHELL=${CONFIG_SHELL-/bin/sh}
4401 echo '#! '$SHELL >compile
4402 echo rm -f .error\$\$ >>compile
4403 echo ERROR=0 >>compile
4404 echo export PATH=$PATH LANG=C >>compile
4405 echo "($USE_MAKE_OR_GMAKE V=1 \$@ 2>&1 || touch .error\$\$)| \\" >>compile
4406 echo '`sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/buildsystem/make.pl' >>compile
4407 echo test -f .error\$\$ \&\& ERROR=1 >>compile
4408 echo rm -f .error\$\$ >>compile
4409 echo exit \$ERROR >>compile
4413 libvlc configuration
4414 --------------------
4415 version : ${VERSION}
4417 architecture : ${ARCH}
4418 optimizations : ${enable_optimizations}"
4419 if test "${enable_vlc}" != "no"; then
4420 echo "vlc aliases :${ALIASES}"
4422 echo "build vlc executable : no"
4425 To build vlc and its plugins, type \`./compile' or \`$USE_MAKE_OR_GMAKE'."