Newer
Older

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_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"
])
AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
dnl OpenGL ES 2: depends on EGL 1.1
PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
dnl OpenGL ES 1: depends on EGL 1.0
PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 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"
])
])
AC_ARG_ENABLE(xvideo,
[ --enable-xvideo XVideo support (default enabled)],, [
enable_xvideo="$enable_xcb"
])
have_xcb_randr="no"
AS_IF([test "${enable_xcb}" != "no"], [
dnl libxcb
PKG_CHECK_MODULES(XCB, [xcb >= 1.6])
PKG_CHECK_MODULES(XCB_COMPOSITE, [xcb-composite])
AS_IF([test "${enable_xvideo}" != "no"], [
PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [have_xcb_xvideo="yes"])
PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [have_xcb_randr="yes"])
dnl xcb-utils
PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [have_xcb_keysyms="yes"], [
AC_MSG_WARN([${XCB_KEYSYMS_PKG_ERRORS}. Hotkeys will not work.])
AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
AM_CONDITIONAL([HAVE_XCB_KEYSYMS], [test "${have_xcb_keysyms}" = "yes"])
AM_CONDITIONAL([HAVE_XCB_RANDR], [test "${have_xcb_randr}" = "yes"])
AM_CONDITIONAL([HAVE_XCB_XVIDEO], [test "${have_xcb_xvideo}" = "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"], [
case "${avfork}" in
libav) av_vdpau_ver="55.26.0" ;;
ffmpeg) av_vdpau_ver="55.42.100" ;;
esac
PKG_CHECK_EXISTS([libavutil >= 52.4.0 libavcodec >= ${av_vdpau_ver}], [
have_avcodec_vdpau="yes"
AC_MSG_NOTICE([VDPAU decoding acceleration activated])
], [
AS_IF([test -n "${enable_vdpau}"], [
AC_MSG_ERROR([libav libavutil >= 52.4.0 and libavcodec >= 55.26.0 are required for VDPAU decoding.])
AC_MSG_WARN([libav libavutil >= 52.4.0 and libavcodec >= 55.26.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"
AC_ARG_VAR([WAYLAND_SCANNER], [Wayland scanner utility])
AS_IF([test "${enable_wayland}" != "no"], [
AC_MSG_CHECKING([for the Wayland scanner])
AS_IF([test -z "$WAYLAND_SCANNER"], [
PKG_CHECK_EXISTS([wayland-scanner], [
WAYLAND_SCANNER="$(${PKG_CONFIG} wayland-scanner --variable wayland_scanner)"
], [
WAYLAND_SCANNER="wayland-scanner"
])
])
AC_MSG_RESULT([$WAYLAND_SCANNER])
PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= 1.5.91], [
have_wayland="yes"
], [
AS_IF([test -n "${enable_wayland}"], [
AC_MSG_ERROR([${WAYLAND_CLIENT_PKG_ERRORS}.])
])
])
AS_IF([test "${have_egl}" = "yes"], [
PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl], [
have_wayland_egl="yes"
], [
AS_IF([test -n "${enable_wayland}"], [
AC_MSG_ERROR([${WAYLAND_EGL_PKG_ERRORS}.])
])
])
])
])
AM_CONDITIONAL([HAVE_WAYLAND], [test "${have_wayland}" = "yes"])
AM_CONDITIONAL([HAVE_WAYLAND_EGL], [test "${have_wayland_egl}" = "yes"])
Christophe Mutricy
committed
AC_ARG_ENABLE(sdl-image,
[ --enable-sdl-image SDL image support (default enabled)])
PKG_CHECK_MODULES(SDL, [sdl >= 1.2.10], [
# SDL on Darwin is heavily patched and can only run SDL_image
if test "${SYS}" != "darwin"; then
# SDL_image
AS_IF([ test "${enable_sdl_image}" != "no"],[
PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
[ AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
AC_MSG_WARN([${SDL_PKG_ERRORS}.])
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)])
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
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
if test "${SYS}" != "mingw32"; then
if test "${enable_fontconfig}" != "no"; then
AC_CHECK_HEADERS(fontconfig/fontconfig.h, [
],[AC_MSG_WARN([library fontconfig not found. 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 QuartzText vout module (iOS/Mac OS)
AC_ARG_ENABLE(macosx-quartztext,
[ --enable-macosx-quartztext Mac OS X quartz text module (default enabled on Mac OS X)])
if test "x${enable_macosx_quartztext}" != "xno" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_quartztext}" = "yes")
then
VLC_ADD_PLUGIN([quartztext])
fi
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"
])
])
have_directx="no"
AS_IF([test "${enable_directx}" != "no"], [
dnl DirectDraw
AC_CHECK_HEADERS(ddraw.h, [
have_directx="yes"
], [
AC_MSG_ERROR([Cannot find DirectX headers!])
])
dnl OpenGL
AC_CHECK_HEADERS(GL/wglew.h, [
VLC_ADD_PLUGIN([glwin32])
],, [
#include <windows.h>
#include <GL/gl.h>
])
dnl Direct3D11
AC_CHECK_HEADERS(d3d11.h, [
VLC_ADD_PLUGIN([direct3d11])
])
dnl Direct3D9
AC_CHECK_HEADERS(d3d9.h, [
VLC_ADD_PLUGIN([direct3d9])
dnl Direct2D
AC_CHECK_HEADERS(d2d1.h, [
VLC_ADD_PLUGIN([direct2d])
])
])
AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"])
AC_CHECK_HEADER([linux/fb.h], [
VLC_ADD_PLUGIN([fb])
])

Jean-Paul Saman
committed
dnl
dnl DirectFB module
dnl try to find using: 1 - given location; 2 - directfb-config; 3 - pkg-config
dnl TODO: support for static linking

Jean-Paul Saman
committed
dnl
AC_ARG_ENABLE(directfb,
[ --enable-directfb DirectFB support (default disabled)])
[ --with-directfb=PATH path to DirectFB headers and libraries])
if test "${enable_directfb}" = "yes"; then
have_directfb="false"
CPPFLAGS_mydirectfb=
if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
dnl Trying the given location
VLC_SAVE_FLAGS
CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
LIBS_new="-L${with_directfb}/lib/fusion/.libs/ -L${with_directfb}/lib/direct/.libs/ -L${with_directfb}/src/.libs/"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
dnl FIXME: too obscure
AC_CHECK_HEADER([directfb.h], [
AC_CHECK_LIB([direct],[direct_initialize], [
AC_CHECK_LIB([fusion], [fusion_enter], [
AC_CHECK_LIB([directfb], [DirectFBInit], have_directfb="true", have_directfb="false")
], have_directfb="false")
], have_directfb="false")
], have_directfb="false")
VLC_RESTORE_FLAGS
if test "${have_directfb}" = "true"; then
LIBS_mydirectfb="${LIBS_new} -lz $LIBDL -ldirectfb -lfusion -ldirect -lpthread"
CPPFLAGS_mydirectfb="${CPPFLAGS_new}"
fi
dnl Look for directfb-config
AC_PATH_PROG(DIRECTFB_CONFIG, directfb-config, no, ${PATH})
if test "${DIRECTFB_CONFIG}" != "no"; then
CPPFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --cflags`"
LIBS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
dnl Trying with pkg-config
PKG_CHECK_MODULES(DIRECTFB, directfb, [
CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
have_directfb="true"
], [have_directfb="false"])
fi
fi
if test "${have_directfb}" = "true"; then
VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}])
AC_MSG_ERROR([${DIRECTFB_PKG_ERRORS}.])

Jean-Paul Saman
committed
fi
dnl
dnl AA plugin
dnl
AC_ARG_ENABLE(aa,
[ --enable-aa aalib output (default disabled)])
Ramiro Polla
committed
PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
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} -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/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],[ -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux ])
VLC_ADD_LIBS([mmal],[ -lbcm_host -lmmal -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 evas plugin
dnl
AC_ARG_ENABLE(evas,
[AS_HELP_STRING([--enable-evas],
[use evas output module (default disabled)])])
have_evas="no"
AS_IF([test "${enable_evas}" = "yes"], [
PKG_CHECK_MODULES(EVAS, [evas >= 1.15.99 ecore >= 1.15.99], [
have_evas="yes"
AC_DEFINE([HAVE_EVAS], [1], [Define to 1 if evas is enabled.])
],[
AS_IF([test "x${enable_evas}" != "x"], [
AC_MSG_ERROR([$EVAS_PKG_ERRORS. libevas and libecore 1.15.99 or later required.])
])
])
])
AM_CONDITIONAL([HAVE_EVAS], [test "${have_evas}" = "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.])
])
])
])
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
dnl AudioQueue plugin
dnl
AC_ARG_ENABLE(audioqueue,
[ --enable-audioqueue AudioQueue audio module (default disabled)])
if test "${enable_audioqueue}" = "yes"
then
VLC_ADD_PLUGIN([audioqueue])
fi
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])
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
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.2.0 Qt5Widgets Qt5Gui], [
PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
VLC_ADD_LIBS([qt],[${QTX11_LIBS}])
VLC_ADD_CXXFLAGS([qt],[${QTX11_CFLAGS} -DQT5_HAS_X11])
PKG_CHECK_MODULES([XI], [xi], [
VLC_ADD_LIBS([qt], [${XI_LIBS}])
VLC_ADD_CXXFLAGS([qt], [${XI_CFLAGS} -DHAVE_XI])
], [
PKG_CHECK_EXISTS([Qt5Gui >= 5.5], [
AC_MSG_ERROR([${XI_PKG_ERRORS}.])
], [
AC_MSG_WARN([${XI_PKG_ERRORS}.])
])
])
],[
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)"
AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.8.0],, [
AS_IF([test -n "${enable_qt}"],[
AC_MSG_ERROR([${QT_PKG_ERRORS}.])
],[
AC_MSG_WARN([${QT_PKG_ERRORS}.])
])
enable_qt="no"
QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
AS_IF([test "${enable_qt}" != "no"], [
ALIASES="${ALIASES} qvlc"
AM_CONDITIONAL(ENABLE_QT, [test "$enable_qt" != "no"])
dnl
dnl detect kde4-config patch (used for kde solids and kwallet).
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 MacOS
], [test "${SYS}" = "darwin"], [
VLC_ADD_CPPFLAGS([skins2],[ -DMACOSX_SKINS])
VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon])
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([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} -lX11])
])
dnl for All OSes
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
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, libxpm, libxext and libxinerama])
])
enable_skins2="no"
], [
VLC_ADD_PLUGIN([skins2])
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"

Felix Paul Kühne
committed
VLC_ADD_PLUGIN([macosx])
if test ! -d ${CONTRIB_DIR}/BGHUDAppKit.framework
AC_MSG_ERROR([BGHUDAppKit framework is required and was not found in ${CONTRIB_DIR}])

Felix Paul Kühne
committed
fi
AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "no"])
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"
then
if test ! -d ${CONTRIB_DIR}/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"])

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 VideoToolbox plugins
AC_CHECK_HEADERS(VideoToolbox/VideoToolbox.h, [
VLC_ADD_PLUGIN([videotoolbox])
VLC_ADD_PLUGIN([cvpx_i420])
])
[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, [
have_lirc="true"
])
])
])
AM_CONDITIONAL([HAVE_LIRC], [test "${have_lirc}" = "yes"])
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] )
])