Newer
Older
AC_DEFINE(HAVE_CSS, 1, [Define if CSS engine is built])
])
AM_CONDITIONAL([ENABLE_CSS], [test "${with_css}" = "yes"])

Rémi Denis-Courmont
committed
PKG_CHECK_MODULES([EGL], [egl], [
have_egl="yes"
], [
have_egl="no"
])
AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
have_gl="no"
PKG_CHECK_MODULES([GL], [gl], [
have_gl="yes"
], [
AC_MSG_CHECKING([for OpenGL])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef _WIN32
# include <GL/glew.h>
#endif
#include <GL/gl.h>
]], [
[int t0 = GL_TEXTURE0;]])
], [
have_gl="yes"
AS_IF([test "${SYS}" != "mingw32"], [
GL_LIBS="-lGL"
], [
GL_LIBS="-lopengl32"
])
AC_MSG_RESULT([${have_gl}])
AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
AS_IF([test "${have_gl}" = "yes"], [
AC_DEFINE([HAVE_GL], 1, [Defined if having OpenGL])
])
dnl OpenGL ES 2: depends on EGL 1.1
PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
dnl
dnl Xlib
dnl
AC_PATH_XTRA()
AC_CHECK_HEADERS(X11/Xlib.h)
dnl
dnl X C Bindings modules
dnl
AC_ARG_ENABLE(xcb,
[ --enable-xcb X11 support with XCB (default enabled)],, [
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "darwin"], [
enable_xcb="yes"
], [
enable_xcb="no"
])
])
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
dnl libxcb
PKG_CHECK_MODULES([XCB], [xcb >= 1.6],, [
xcb_err="$xcb_err ${XCB_PKG_ERRORS}."])
PKG_CHECK_MODULES([XCB_COMPOSITE], [xcb-composite],, [
xcb_err="$xcb_err ${XCB_COMPOSITE_PKG_ERRORS}."])
PKG_CHECK_MODULES([XCB_RANDR], [xcb-randr >= 1.3],, [
xcb_err="$xcb_err ${XCB_RANDR_PKG_ERRORS}."])
PKG_CHECK_MODULES([XCB_SHM], [xcb-shm],, [
xcb_err="$xcb_err ${XCB_SHM_PKG_ERRORS}."])
PKG_CHECK_MODULES([XCB_XKB], [xcb-xkb],, [
xcb_err="$xcb_err ${XCB_XKB_PKG_ERRORS}."])
PKG_CHECK_MODULES([XCB_XV], [xcb-xv >= 1.1.90.1],, [
xcb_err="$xcb_err ${XCB_XV_PKG_ERRORS}."])
dnl xproto
PKG_CHECK_MODULES(XPROTO, [xproto],, [
xcb_err="$xcb_err ${XPROTO_PKG_ERRORS}."])
AS_IF([test -n "$xcb_err"], [
AC_MSG_ERROR([$xcb_err Pass --disable-xcb to skip X11 support.])
])
dnl xkbcommon
PKG_CHECK_MODULES([XKBCOMMON_X11], [xkbcommon-x11], [
have_xkbcommon_x11="yes"
AC_MSG_WARN([${XKBCOMMON_X11_PKG_ERRORS}. Hotkeys are disabled.])
PKG_CHECK_MODULES([XCB_KEYSYMS], [xcb-keysyms >= 0.3.4], [
have_xcb_keysyms="yes"
], [
AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Global hotkeys are disabled.])
AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
AM_CONDITIONAL([HAVE_XKBCOMMON_X11], [test "${have_xkbcommon_x11}" = "yes"])
AM_CONDITIONAL([HAVE_XCB_KEYSYMS], [test "${have_xcb_keysyms}" = "yes"])
dnl VDPAU needs X11
dnl
AC_ARG_ENABLE(vdpau,
[AS_HELP_STRING([--enable-vdpau], [VDPAU hardware support (default auto)])])
AS_IF([test "${enable_vdpau}" != "no"], [
PKG_CHECK_MODULES([VDPAU], [vdpau >= 0.6], [
AS_IF([test "${no_x}" = "yes"], [
AC_MSG_ERROR([VDPAU requires Xlib (X11).])
])
], [
AS_IF([test -n "${enable_vdpau}"], [
AC_MSG_ERROR([${VDPAU_PKG_ERRORS}.])
])
])
])
AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"])
have_avcodec_vdpau="no"
AS_IF([test "${have_vdpau}" = "yes" -a "${have_avcodec}" = "yes"], [
libav) av_vdpau_ver="56.10.0" ;;
ffmpeg) av_vdpau_ver="56.19.100" ;;
PKG_CHECK_EXISTS([libavcodec >= ${av_vdpau_ver}], [
have_avcodec_vdpau="yes"
AC_MSG_NOTICE([VDPAU decoding acceleration activated])
], [
AS_IF([test -n "${enable_vdpau}"], [
AC_MSG_ERROR([libavcodec >= 56.10.0 is required for VDPAU decoding.])
AC_MSG_WARN([libavcodec >= 56.10.0 are required for VDPAU decoding.])
])
])
])
AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" = "yes"])
dnl
dnl Wayland
dnl
AC_ARG_ENABLE(wayland,
[AS_HELP_STRING([--enable-wayland], [Wayland support (default auto)])])
have_wayland="no"
have_wayland_cursor="no"
AS_IF([test "${enable_wayland}" != "no"], [
PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= 1.5.91], [
AC_MSG_CHECKING([for the Wayland protocols])
PKG_CHECK_EXISTS([wayland-protocols >= 1.12], [
WAYLAND_PROTOCOLS="$(${PKG_CONFIG} wayland-protocols --variable pkgdatadir)"
AC_MSG_RESULT([${WAYLAND_PROTOCOLS}])
], [
AC_MSG_RESULT([not found])
AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors 'wayland-protocols >= 1.12')])
PKG_CHECK_MODULES([WAYLAND_CURSOR], [wayland-cursor], [
have_wayland_cursor="yes"
], [
AC_MSG_WARN([${WAYLAND_CURSOR_PKG_ERRORS}.])
])
AC_MSG_CHECKING([for the Wayland scanner])
PKG_CHECK_EXISTS([wayland-scanner >= 1.15], [
WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
AC_MSG_RESULT([${WAYLAND_SCANNER}])
AC_MSG_ERROR([$(${PKG_CONFIG} --print-errors 'wayland-scanner >= 1.15')])
have_wayland="yes"
AS_IF([test "${have_egl}" = "yes"], [
PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl], [
have_wayland_egl="yes"
], [
AC_MSG_ERROR([${WAYLAND_EGL_PKG_ERRORS}.])
])
])
PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon], [
have_xkbcommon="yes"
], [
AC_MSG_WARN([${XKBCOMMON_PKG_ERRORS}])
])
], [
AS_IF([test -n "${enable_wayland}"], [
AC_MSG_ERROR([${WAYLAND_CLIENT_PKG_ERRORS}.])
])
AC_SUBST([WAYLAND_PROTOCOLS])
AM_CONDITIONAL([HAVE_WAYLAND], [test "${have_wayland}" = "yes"])
AM_CONDITIONAL([HAVE_WAYLAND_CURSOR], [test "${have_wayland_cursor}" = "yes"])
AM_CONDITIONAL([HAVE_WAYLAND_EGL], [test "${have_wayland_egl}" = "yes"])
AM_CONDITIONAL([HAVE_XKBCOMMON], [test "${have_xkbcommon}" = "yes"])
Christophe Mutricy
committed
AC_ARG_ENABLE(sdl-image,
[ --enable-sdl-image SDL image support (default enabled)])
AS_IF([test "${enable_sdl_image}" != "no"],[
PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
VLC_ADD_PLUGIN([sdl_image])
], [
AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
])
])
dnl
dnl freetype module
dnl
AC_ARG_ENABLE(freetype,
[ --enable-freetype freetype support (default auto)])
[ --enable-fribidi fribidi support (default auto)])
AC_ARG_ENABLE(harfbuzz,
[ --enable-harfbuzz harfbuzz support (default auto)])
[ --enable-fontconfig fontconfig support (default auto)])
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
AC_ARG_WITH([default-font],
AS_HELP_STRING([--with-default-font=PATH],
[Path to the default font]),
[AC_DEFINE_UNQUOTED([DEFAULT_FONT_FILE],
"$withval", [Default font])])
AC_ARG_WITH([default-monospace-font],
AS_HELP_STRING([--with-default-monospace-font=PATH],
[Path to the default font]),
[AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FONT_FILE],
"$withval", [Default monospace font])])
AC_ARG_WITH([default-font-family],
AS_HELP_STRING([--with-default-font-family=NAME],
[Path to the default font family]),
[AC_DEFINE_UNQUOTED([DEFAULT_FAMILY],
"$withval", [Default font family])])
AC_ARG_WITH([default-monospace-font-family],
AS_HELP_STRING([--with-default-monospace-font-family=NAME],
[Path to the default font family]),
[AC_DEFINE_UNQUOTED([DEFAULT_MONOSPACE_FAMILY],
"$withval", [Default monospace font family])])
have_freetype="no"
have_fontconfig="no"
have_fribidi="no"
if test "${enable_freetype}" != "no"; then
PKG_CHECK_MODULES(FREETYPE, freetype2, [
have_freetype="yes"
VLC_ADD_CPPFLAGS([skins2],[${FREETYPE_CFLAGS}])
VLC_ADD_LIBS([skins2],[${FREETYPE_LIBS}])
dnl fontconfig support
AS_IF([test "${enable_fontconfig}" != "no" -a "${SYS}" != "mingw32" -a "${SYS}" != "darwin"], [
PKG_CHECK_MODULES(FONTCONFIG, [fontconfig >= 2.11], [
have_fontconfig="yes"
], [
AC_MSG_WARN([${FONTCONFIG_PKG_ERRORS}. Styles will be disabled in FreeType.])
])
])
dnl fribidi support
if test "${enable_fribidi}" != "no"; then
PKG_CHECK_MODULES(FRIBIDI, fribidi, [
have_fribidi="yes"
VLC_ADD_CPPFLAGS([skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
VLC_ADD_LIBS([skins2], [${FRIBIDI_LIBS}])
],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional text and complex scripts (Arabic, Farsi, Thai...) will be disabled in FreeType.])])
fi
dnl harfbuzz support
if test "${have_fribidi}" != "no"; then
if test "${enable_harfbuzz}" != "no"; then
PKG_CHECK_MODULES(HARFBUZZ, harfbuzz, [
have_harfbuzz="yes"
VLC_ADD_CPPFLAGS([skins2], [${HARFBUZZ_CFLAGS} -DHAVE_HARFBUZZ])
VLC_ADD_LIBS([skins2], [${HARFBUZZ_LIBS}])
],[AC_MSG_WARN([${HARFBUZZ_PKG_ERRORS}. Support for complex scripts (Arabic, Farsi, Thai...) will be disabled in FreeType.])])
fi
Christophe Mutricy
committed
],[
AS_IF([test -n "${enable_freetype}"],[
AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
Christophe Mutricy
committed
])
fi
AM_CONDITIONAL([HAVE_FREETYPE], [test "${have_freetype}" = "yes"])
AM_CONDITIONAL([HAVE_FONTCONFIG], [test "${have_fontconfig}" = "yes"])
AM_CONDITIONAL([HAVE_FRIBIDI], [test "${have_fribidi}" = "yes"])
AM_CONDITIONAL([HAVE_HARFBUZZ], [test "${have_harfbuzz}" = "yes"])
dnl
dnl SAPI (text to Speech renderer for Windows)
dnl
AC_LANG_PUSH([C++])
AC_CHECK_TYPES([ISpObjectToken],[
],[AC_MSG_WARN([sapi.h not found. Text to Speech renderer for Windows disabled])],
[#include <windows.h>
#include <sapi.h>
#include <sphelper.h>])
AM_CONDITIONAL([HAVE_SAPI], [test "${have_sapi}" = "yes"])
AC_LANG_POP([C++])
dnl
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
PKG_ENABLE_MODULES_VLC([SVGDEC], [], [librsvg-2.0 >= 2.9.0 cairo >= 1.13.1], [SVG image decoder library],[auto])
AC_ARG_ENABLE(directx,
[AS_HELP_STRING([--enable-directx],
[Microsoft DirectX support (default enabled on Windows)])],, [
enable_directx="yes"
], [
enable_directx="no"
])
])
AS_IF([test "${enable_directx}" != "no"], [
dnl DirectDraw
AC_CHECK_HEADERS(ddraw.h, [
dnl OpenGL
AC_CHECK_HEADERS(GL/wglew.h, [
],, [
#include <windows.h>
#include <GL/gl.h>
])
VLC_ADD_PLUGIN([direct3d11 direct3d11_filters])
AC_CHECK_HEADERS(d3d9.h, [
VLC_ADD_PLUGIN([direct3d9])
AC_CHECK_HEADERS(d3dx9effect.h)
AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
[[#define COBJMACROS
#include <d3d9.h>
#include <dxva2api.h>
#ifndef IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids
# error dxva2 too old
#endif
]],[[;]])
],[
VLC_ADD_PLUGIN([direct3d9_filters])
[AC_MSG_WARN([Could not find required IDirectXVideoDecoder in dxva2api.h])])
AC_CHECK_HEADER([linux/fb.h], [
VLC_ADD_PLUGIN([fb])
])
Ramiro Polla
committed
PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
dnl
dnl OS/2 KVA plugin
dnl
AC_ARG_ENABLE(kva,
[AS_HELP_STRING([--enable-kva],
[support the K Video Accelerator KVA (default enabled on OS/2)])],, [
AS_IF([test "$SYS" = "os2"], [
enable_kva="yes"
])
])
have_kva="no"
KVA_LIBS=""
AS_IF([test "$enable_kva" != "no"], [
AC_CHECK_HEADERS([kva.h], [
have_kva="yes"
AC_CHECK_LIB(kva, main, [
KVA_LIBS="-lkva"
])
])
])
AC_SUBST(KVA_LIBS)
AM_CONDITIONAL([HAVE_KVA], [test "${have_kva}" = "yes"])
AC_ARG_ENABLE(mmal,
AS_HELP_STRING([--enable-mmal],
[Multi-Media Abstraction Layer (MMAL) hardware plugin (default enable)]))
if test "${enable_mmal}" != "no"; then
CPPFLAGS="${CPPFLAGS} -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux"
AC_CHECK_HEADERS(interface/mmal/mmal.h,
[ AC_CHECK_LIB(bcm_host, vc_tv_unregister_callback_full, [
have_mmal="yes"
VLC_ADD_PLUGIN([mmal])
VLC_ADD_LDFLAGS([mmal],[ -L/opt/vc/lib ])
VLC_ADD_CFLAGS([mmal],[ -isystem /opt/vc/include -isystem /opt/vc/include/interface/vcos/pthreads -isystem /opt/vc/include/interface/vmcs_host/linux ])
VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -lmmal_core -lmmal_components -lmmal_util -lvchostif ]) ], [
AS_IF([test "${enable_mmal}" = "yes"],
[ AC_MSG_ERROR([Cannot find bcm library...]) ],
[ AC_MSG_WARN([Cannot find bcm library...]) ])
],
[])
] , [ AS_IF([test "${enable_mmal}" = "yes"],
[ AC_MSG_ERROR([Cannot find development headers for mmal...]) ],
[ AC_MSG_WARN([Cannot find development headers for mmal...]) ]) ])
VLC_RESTORE_FLAGS
fi
AM_CONDITIONAL([HAVE_MMAL], [test "${have_mmal}" = "yes"])
dnl
dnl Pulseaudio module
dnl
AC_ARG_ENABLE(pulse,
[AS_HELP_STRING([--enable-pulse],
[use the PulseAudio client library (default auto)])])
have_pulse="no"
AS_IF([test "${enable_pulse}" != "no"], [
PKG_CHECK_MODULES([PULSE], [libpulse >= 1.0], [
AS_IF([test "x${enable_pulse}" != "x"], [
AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 1.0 or later required.])
])
])
])
AM_CONDITIONAL([HAVE_PULSE], [test "${have_pulse}" = "yes"])
[AS_HELP_STRING([--enable-alsa],
[support the Advanced Linux Sound Architecture (default auto)])],, [
AS_IF([test "$SYS" = "linux" -a "${have_pulse}" = "no"], [
enable_alsa="yes"
])
])
have_alsa="no"
AS_IF([test "${enable_alsa}" != "no"], [
PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.24], [
have_alsa="yes"
], [
AS_IF([test "x${enable_alsa}" != "x"], [
AC_MSG_ERROR([$ALSA_PKG_ERRORS. alsa-lib 1.0.24 or later required. Pass --disable-alsa to ignore this error.])
])
])
])
AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
dnl
dnl Open Sound System module
dnl
AC_ARG_ENABLE(oss,
[AS_HELP_STRING([--enable-oss],
[support the Open Sound System OSS (default enabled on FreeBSD/NetBSD/DragonFlyBSD)])],, [
AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "linux" -o "$SYS" = "openbsd"], [
enable_oss="no"
])
])
have_oss="no"
OSS_LIBS=""
AS_IF([test "$enable_oss" != "no"], [
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
have_oss="yes"
AC_CHECK_LIB(ossaudio, main, [
OSS_LIBS="-lossaudio"
])
])
])
AC_SUBST(OSS_LIBS)
AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
dnl
dnl OpenBSD sndio module
dnl
AC_ARG_ENABLE([sndio],
[AS_HELP_STRING([--disable-sndio],
[support the OpenBSD sndio (default auto)])],, [
enable_sndio="yes"
])
])
have_sndio="no"
AS_IF([test "$enable_sndio" != "no"], [
AC_CHECK_HEADER([sndio.h], [
have_sndio="yes"
])
])
AM_CONDITIONAL([HAVE_SNDIO], [test "${have_sndio}" = "yes"])
dnl
dnl Windows Audio Session plugin
dnl
AC_ARG_ENABLE([wasapi],
[AS_HELP_STRING([--enable-wasapi],
[use the Windows Audio Session API (default auto)])
])
have_wasapi="no"
AS_IF([test "$enable_wasapi" != "no"], [
AC_CHECK_HEADER([audioclient.h], [
have_wasapi="yes"
], [
AS_IF([test "x${enable_wasapi}" != "x"], [
AC_MSG_ERROR([Windows Audio Session API not found.])
])
])
])
AM_CONDITIONAL([HAVE_WASAPI], [test "${have_wasapi}" = "yes"])
dnl JACK modules
AC_ARG_ENABLE(jack,
[AS_HELP_STRING([--disable-jack],
[do not use jack (default auto)])])
have_jack="no"
AS_IF([test "${enable_jack}" != "no"], [
PKG_CHECK_MODULES(JACK, jack >= 1.9.7,
[ have_jack=yes ],
[
AC_MSG_WARN([${JACK_PKG_ERRORS}, trying jack1 instead])
PKG_CHECK_MODULES(JACK, jack >= 0.120.1 jack < 1.0,
[ have_jack=yes ],
[
AS_IF([test -n "${enable_jack}"],
[AC_MSG_ERROR([${JACK_PKG_ERRORS}.])],
[AC_MSG_WARN([${JACK_PKG_ERRORS}.])])
])
])
])
AM_CONDITIONAL([HAVE_JACK], [test "${have_jack}" != "no"])
dnl
dnl OpenSLES Android
dnl
AC_ARG_ENABLE(opensles,
[ --enable-opensles Android OpenSL ES audio module (default disabled)])
if test "${HAVE_ANDROID}" = "1"; then
if test "${enable_opensles}" = "yes"; then
AC_CHECK_HEADERS(SLES/OpenSLES.h,
[ VLC_ADD_PLUGIN([opensles_android]) ],
[ AC_MSG_ERROR([cannot find OpenSLES headers])] )
fi
fi
dnl
dnl Tizen audio
dnl
AC_ARG_ENABLE(tizen_audio,
[AS_HELP_STRING([--enable-tizen-audio],
[Tizen audio module (default enabled on Tizen)])],, [
AS_IF([test "$HAVE_TIZEN" = "1"], [
enable_tizen_audio="yes"
])
])
if test "${enable_tizen_audio}" = "yes"; then
AC_CHECK_HEADERS(audio_io.h,
[ VLC_ADD_PLUGIN([tizen_audio]) ],
[ AC_MSG_ERROR([cannot find Tizen audio_io headers])] )
fi
dnl libsamplerate plugin
PKG_ENABLE_MODULES_VLC([SAMPLERATE], [], [samplerate], [Resampler with libsamplerate], [auto])
dnl
dnl soxr module
dnl
PKG_ENABLE_MODULES_VLC([SOXR], [], [soxr >= 0.1.2], [SoX Resampler library], [auto])
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
dnl
dnl OS/2 KAI plugin
dnl
AC_ARG_ENABLE(kai,
[AS_HELP_STRING([--enable-kai],
[support the K Audio Interface KAI (default enabled on OS/2)])],, [
AS_IF([test "$SYS" = "os2"], [
enable_kai="yes"
])
])
have_kai="no"
KAI_LIBS=""
AS_IF([test "$enable_kai" != "no"], [
AC_CHECK_HEADERS([kai.h], [
have_kai="yes"
AC_CHECK_LIB(kai, main, [
KAI_LIBS="-lkai"
])
])
])
AC_SUBST(KAI_LIBS)
AM_CONDITIONAL([HAVE_KAI], [test "${have_kai}" = "yes"])
dnl
dnl chromaprint audio track fingerprinter
dnl
m4_pushdef([libchromaprint_version], 0.6.0)
PKG_WITH_MODULES([CHROMAPRINT],[libchromaprint >= libchromaprint_version],
VLC_ADD_PLUGIN([stream_out_chromaprint]),
AS_IF([test "${enable_chromaprint}" = "yes"],
[AC_MSG_ERROR(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)],
[AC_MSG_WARN(Library [libchromaprint >= libchromaprint_version] needed for [chromaprint] was not found)]
),
[(Chromaprint based audio fingerprinter)],[auto])
m4_popdef([libchromaprint_version])
dnl
dnl Chromecast streaming support
dnl
m4_pushdef([protobuf_lite_version], 2.5.0)
AC_ARG_VAR(PROTOC, [protobuf compiler])
AC_CHECK_PROGS(PROTOC, protoc, no)
PKG_WITH_MODULES([CHROMECAST],[protobuf-lite >= protobuf_lite_version], [
AS_IF([test "x${PROTOC}" != "xno"], [
build_chromecast="yes"
], [
AC_MSG_ERROR(protoc compiler needed for [chromecast] was not found)
])
], [
AS_IF([test "${enable_chromecast}" = "yes"],
AC_MSG_ERROR(Library [protobuf-lite >= protobuf_lite_version] needed for [chromecast] was not found),
AC_MSG_WARN(Library [protobuf-lite >= protobuf_lite_version] needed for [chromecast] was not found)
)
enable_chromecast="no"
], [(Chromecast streaming support)], [auto])
AM_CONDITIONAL([BUILD_CHROMECAST], [test "${build_chromecast}" = "yes"])
m4_popdef([protobuf_lite_version])
AC_ARG_ENABLE(qt, [
AS_HELP_STRING([--disable-qt], [Qt UI support (default enabled)])],, [
AS_IF([test "${SYS}" = "darwin"], [
enable_qt="no"
])
])
AS_IF([test "${enable_qt}" != "no"], [
PKG_CHECK_MODULES([QT], [Qt5Core >= 5.5.0 Qt5Widgets Qt5Gui Qt5Svg], [
PKG_CHECK_MODULES([QT5_X11], [Qt5X11Extras], [
have_qt5_x11="yes"
],[
AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
QT_VERSION="$(eval $PKG_CONFIG --modversion Qt5Gui)"
AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
AS_IF([test -n "${enable_qt}"],[
AC_MSG_ERROR([${QT_PKG_ERRORS}.])
],[
AC_MSG_WARN([${QT_PKG_ERRORS}.])
AS_IF([test "${enable_qt}" != "no"], [
ALIASES="${ALIASES} qvlc"
AM_CONDITIONAL(ENABLE_QT, [test "$enable_qt" != "no"])
AM_CONDITIONAL([HAVE_QT5_X11], [test "${have_qt5_x11}" = "yes"])
dnl detect kde4-config patch (used for kde solids).
dnl
AC_ARG_VAR([KDE4_CONFIG], [kde4-config utility])
AS_IF([test "x$KDE4_CONFIG" = "x"], [
KDE4_CONFIG="kde4-config"
])

Jean-Paul Saman
committed
dnl
dnl Simple test for skins2 dependency
dnl
AS_IF([test "$enable_qt" = "no"], [
AS_IF([test "${enable_skins2}" = "yes"], [
AC_MSG_ERROR([The skins2 module depends on the Qt interface. Without it you will not be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt development package or alternatively you can also configure with: --disable-qt --disable-skins2.])
AC_MSG_WARN([The skins2 module depends on the Qt interface, Qt is not built so skins2 is disabled.])

Jean-Paul Saman
committed
dnl
dnl Skins2 module
dnl
AC_ARG_ENABLE(skins2,
[AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)])])
AS_IF([test "${enable_skins2}" != "no"], [
have_skins_deps="yes"
dnl Win32
AS_IF([test "${SYS}" = "mingw32"], [
VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -DWIN32_SKINS])
VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
dnl OS/2
], [test "${SYS}" = "os2"], [
VLC_ADD_CPPFLAGS([skins2],[ -DOS2_SKINS])
dnl Linux/Unix
], [
PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
PKG_CHECK_MODULES([XCURSOR], [xcursor],, [have_skins_deps="no"])
PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
VLC_ADD_CPPFLAGS([skins2],[${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} ${XCURSOR_LIBS} -lX11])
])
dnl we need freetype
AS_IF([test "${have_freetype}" != "yes"], [
have_skins_deps="no"
])
AS_IF([test "${have_skins_deps}" = "no"], [
AS_IF([test "x${enable_skins2}" = "x"], [
AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
], [
AC_MSG_ERROR([Skins2 interface requires FreeType, libxcursor, libxpm, libxext and libxinerama])
])
enable_skins2="no"
], [
ALIASES="${ALIASES} svlc"
enable_skins2="yes"
])
])
AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
AC_ARG_ENABLE(libtar,
[ --enable-libtar libtar support for skins2 (default auto)])
AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
AC_CHECK_HEADERS(libtar.h, [
VLC_ADD_LIBS([skins2],[-ltar])
])
])
dnl MacOS X gui module
AC_ARG_ENABLE(macosx,
[ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)])
if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
dnl
dnl If possible, use xcrun to find the right ibtool
dnl
AC_PATH_PROG([XCRUN], [xcrun], [no])
AS_IF([test ! "x${XCRUN}" = "xno"], [
AC_MSG_CHECKING([for ibtool (using xcrun)])
XIB="$(eval $XCRUN -f ibtool 2>/dev/null || echo no)"
AC_MSG_RESULT([${XIB}])
], [
AC_MSG_WARN([Looking for tools without using xcrun])
])
AS_IF([test "x${XIB}" = "xno"], [
AC_PATH_PROG(XIB, [ibtool], [no])
AS_IF([test "x${XIB}" = "xno"], [
AC_MSG_ERROR([ibtool was not found, but is required for --enable-macosx])
])
])

Felix Paul Kühne
committed
fi
AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "no" -a "${SYS}" = "darwin"])
dnl
dnl MacOS X sparkle update support
dnl
AC_ARG_ENABLE(sparkle,
[ --enable-sparkle Sparkle update support for OS X (default enabled on Mac OS X)])
if test "x${enable_sparkle}" != "xno" -a "${HAVE_OSX}" = "1"
if test ! -d ${CONTRIB_DIR}/Sparkle.framework -a ! -d ${CONTRIB_DIR}/Frameworks/Sparkle.framework
then
AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}])
fi
AC_DEFINE([HAVE_SPARKLE], [1], [Define to 1 if sparkle is enabled.])
fi
AM_CONDITIONAL(HAVE_SPARKLE, [test "$enable_sparkle" != "no"])
dnl
dnl MacOS X breakpad creash reporter support
dnl
AC_ARG_WITH([breakpad],
AS_HELP_STRING([--with-breakpad=URL], [Enable Breakpad reporter using given URL]), [], [with_breakpad=no])
AS_IF([test "$with_breakpad" != "no"], [
AS_IF([test "$with_breakpad" = "yes"], [
AC_MSG_ERROR([You need to supply the CrashDragon Server URL as value for --with-breakpad])
])
AS_IF([test "$HAVE_OSX" = "1"], [
AC_MSG_CHECKING([for Breakpad framework])
AS_IF([test ! -d ${CONTRIB_DIR}/Breakpad.framework -a \
! -d ${CONTRIB_DIR}/Frameworks/Breakpad.framework], [
AC_MSG_RESULT([no])
with_breakpad="no"
AC_MSG_ERROR([Breakpad framework is required and was not found in ${CONTRIB_DIR}])
], [
AC_MSG_RESULT([yes])
])
],[
PKG_CHECK_MODULES([BREAKPAD], [breakpad-client], [
LDFLAGS="${LDFLAGS} -Wl,--build-id"
], [
AC_MSG_ERROR(["breakpad not found"])
])
])
])
AM_CONDITIONAL(HAVE_BREAKPAD, [test "$with_breakpad" != "no"])
AS_IF([test "$with_breakpad" != "no"], [
AC_SUBST(BREAKPAD_URL, ["${with_breakpad}"])
])

Felix Paul Kühne
committed
dnl
dnl Minimal Mac OS X module
dnl
AC_ARG_ENABLE(minimal-macosx,
[ --enable-minimal-macosx Minimal Mac OS X support (default disabled)])
if test "${enable_minimal_macosx}" = "yes" -a "${SYS}" = "darwin"
then
VLC_ADD_PLUGIN([minimal_macosx])
dnl
dnl Mac OS X fancy dmg build tool
dnl
if test "${HAVE_OSX}" = "1"
then
AC_PATH_PROG(DMGBUILD, dmgbuild, no)
AS_IF([test "x${DMGBUILD}" = "xno"], [
AC_MSG_WARN([dmgbuild not found -- unable to build fancy DMGs])
])
fi
AM_CONDITIONAL(HAVE_DMGBUILD, [test "x$DMGBUILD" != "xno" -a "${HAVE_OSX}" = "1"])
dnl
dnl VideoToolbox plugins
AC_CHECK_HEADERS(VideoToolbox/VideoToolbox.h, [
VLC_ADD_PLUGIN([videotoolbox])
dnl
dnl AudioToolbox MIDI plugin
AC_CHECK_HEADERS([AudioToolbox/AudioToolbox.h], [
VLC_ADD_PLUGIN([audiotoolboxmidi])
])
[AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)])])
AS_IF([test "${enable_ncurses}" != "no"] ,[
PKG_CHECK_MODULES([NCURSES], [ncursesw], [
ALIASES="${ALIASES} nvlc"
AS_IF([test -n "${enable_ncurses}"], [
AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
])
AM_CONDITIONAL([HAVE_NCURSES], [test "${have_ncurses}" = "yes"])
dnl
dnl Lirc plugin
dnl
AC_ARG_ENABLE(lirc,
[ --enable-lirc lirc support (default disabled)])
have_lirc="no"
AS_IF([test "${enable_lirc}" = "yes"], [
AC_CHECK_HEADER(lirc/lirc_client.h, [
AC_CHECK_LIB(lirc_client, lirc_init, [
])
])
])
AM_CONDITIONAL([HAVE_LIRC], [test "${have_lirc}" = "yes"])
PKG_ENABLE_MODULES_VLC([SRT], [access_srt access_output_srt], [srt >= 1.2.2], [SRT input/output plugin], [auto], [], [], [-DENABLE_SRT])
EXTEND_HELP_STRING([Visualisations and Video filter plugins:])
dnl
dnl goom visualization plugin
dnl
PKG_ENABLE_MODULES_VLC([GOOM], [], [libgoom2], [goom visualization plugin], [auto])
dnl
dnl libprojectM visualization plugin
dnl
AC_ARG_ENABLE(projectm,
[ --enable-projectm projectM visualization plugin (default enabled)])
AS_IF([test "${enable_projectm}" != "no"],
[
PKG_CHECK_MODULES(PROJECTM, libprojectM,
[
VLC_ADD_PLUGIN([projectm])
[ AC_DEFINE([HAVE_PROJECTM2], 1, [Define to 1 if using libprojectM 2.x]) ],
[ AC_MSG_WARN( [Using libprojectM version 1] )
])
AC_MSG_WARN([${PROJECTM_PKG_ERRORS}.])
dnl
dnl Vovoid VSXu visualization plugin
dnl
AC_ARG_ENABLE(vsxu,
[ --enable-vsxu Vovoid VSXu visualization plugin (default auto)])
AS_IF([test "${enable_vsxu}" != "no"],
[
PKG_CHECK_MODULES(VSXU, libvsxu,
[
VLC_ADD_PLUGIN([vsxu])
],[
AC_MSG_WARN([${VSXU_PKG_ERRORS}.])
])
])
EXTEND_HELP_STRING([Service Discovery plugins:])