Newer
Older
AC_MSG_WARN([${XPROTO_PKG_ERRORS}. Hotkeys and XWD will not work.])
AS_IF([test "${enable_glx}" != "no"], [
AS_IF([test "${have_gl}" != "yes"], [
AC_MSG_ERROR([${GL_PKG_ERRORS}. Pass --disable-glx if you do not need OpenGL X11 support.])
])
VLC_ADD_PLUGIN([glx])
VLC_ADD_PLUGIN([gl])
AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
dnl
dnl VDPAU needs X11 and avcodec
dnl
AC_ARG_ENABLE(vdpau,
[AS_HELP_STRING([--enable-vdpau],
[VDPAU hardware decoder support (default auto)])])
have_vdpau="no"
AS_IF([test "${enable_vdpau}" != "no" -a "${have_avcodec}" == "yes"], [
PKG_CHECK_MODULES([VDPAU], [vdpau], [
have_vdpau="yes"
AS_IF([test "${no_x}" = "yes"], [
AC_MSG_ERROR([VDPAU requires Xlib (X11).])
])
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
AC_MSG_NOTICE([VDPAU acceleration activated])
], [
AS_IF([test -n "${enable_vdpau}"], [
AC_MSG_ERROR([${VDPAU_PKG_ERRORS}.])
])
])
])
dnl AM_CONDITIONAL([HAVE_VDPAU], [test "${have_vdpau}" = "yes"])
have_avcodec_vdpau="no"
AS_IF([test "${have_vdpau}" = "yes"], [
PKG_CHECK_EXISTS([libavutil >= 0.52.4 libavcodec >= 54.36.0], [
have_avcodec_vdpau="yes"
], [
AS_IF([test -n "${enable_vdpau}"], [
AC_MSG_ERROR([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.])
], [
AC_MSG_WARN([libavutil >= 0.52.4 and libavcodec >= 54.36.0 are required for VDPAU decoding.])
])
])
])
AM_CONDITIONAL([HAVE_AVCODEC_VDPAU], [test "${have_avcodec_vdpau}" = "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
if test "${SYS}" != "mingw32" -a "${SYS}" != "os2"; then
VLC_ADD_LIBS([vout_sdl],[${X_LIBS} ${X_PRE_LIBS} -lX11])
fi
VLC_ADD_CFLAGS([vout_sdl],[${SDL_CFLAGS}])
VLC_ADD_LIBS([vout_sdl],[${SDL_LIBS}])
# SDL_image
AS_IF([ test "${enable_sdl_image}" != "no"],[
PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
VLC_ADD_PLUGIN([sdl_image])
VLC_ADD_LIBS([sdl_image],[${SDL_IMAGE_LIBS}])
VLC_ADD_CFLAGS([sdl_image], [${SDL_IMAGE_CFLAGS}])],
[ AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your SDL package.])
AC_MSG_WARN([${SDL_PKG_ERRORS}.])
dnl
dnl Mac Vout
AC_ARG_ENABLE(macosx-vout,
[ --enable-macosx-vout Mac OS X video output module (default enabled on Mac OS X)])
if test "x${enable_macosx_vout}" != "xno" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_vout}" = "yes")
then
VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,Cocoa])
VLC_ADD_LIBS([vout_macosx],[-Wl,-framework,OpenGL])
VLC_ADD_PLUGIN([vout_macosx])
fi
dnl
dnl freetype module
dnl
AC_ARG_ENABLE(freetype,
[ --enable-freetype freetype support (default auto)])
[ --enable-fribidi fribidi support (default auto)])
[ --enable-fontconfig fontconfig support (default auto)])
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
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])])
if test "${enable_freetype}" != "no"; then
PKG_CHECK_MODULES(FREETYPE, freetype2, [

Jean-Paul Saman
committed
have_freetype=yes
VLC_ADD_PLUGIN([freetype])
VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
Christophe Mutricy
committed
if test "${SYS}" = "mingw32"; then
VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
AC_CHECK_HEADERS(Carbon/Carbon.h,

Felix Paul Kühne
committed
[VLC_ADD_LIBS([freetype],[-Wl,-framework,Carbon])])
dnl fontconfig support
if test "${SYS}" != "mingw32"; then
if test "${enable_fontconfig}" != "no"; then
AC_CHECK_HEADERS(fontconfig/fontconfig.h, [
VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
VLC_ADD_LIBS([freetype],[-lfontconfig])
],[AC_MSG_WARN([library fontconfig not found. Styles will be disabled in freetype])])
fi
else
VLC_ADD_LIBS([freetype],[-lgdi32])
dnl fribidi support
if test "${enable_fribidi}" != "no"; then
PKG_CHECK_MODULES(FRIBIDI, fribidi, [
VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
],[AC_MSG_WARN([${FRIBIDI_PKG_ERRORS}. Bidirectional support will be disabled in FreeType.])])
Christophe Mutricy
committed
],[
have_freetype=no
AS_IF([test -n "${enable_freetype}"],[
AC_MSG_ERROR([${FREETYPE_PKG_ERRORS}. Install FreeType2 development or configure with --disable-freetype.])
Christophe Mutricy
committed
])
fi
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])
VLC_ADD_LIBS([quartztext],[-Wl,-framework,ApplicationServices])
fi
dnl
dnl SVG module
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
dnl
dnl android surface module
dnl
AC_ARG_ENABLE(android-surface,
[ --enable-android-surface Android Surface video output module (default disabled)])
if test "${enable_android_surface}" = "yes"; then
if test "${HAVE_ANDROID}" = "1"; then
VLC_ADD_PLUGIN([android_surface])
VLC_ADD_LDFLAGS([android_surface], [-ldl])
fi
fi
dnl
dnl iOS vout module
dnl
AC_ARG_ENABLE(ios-vout,
[ --enable-ios-vout iOS video output module (default disabled)])
if test "${enable_ios_vout}" = "yes"
then
VLC_ADD_PLUGIN([vout_ios])

Felix Paul Kühne
committed
VLC_ADD_LIBS([vout_ios], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit,-framework,Foundation])
dnl
dnl iOS ES2 vout module
dnl
AC_ARG_ENABLE(ios-vout2,
[ --enable-ios-vout2 iOS video output module (default disabled)])
if test "${enable_ios_vout2}" = "yes"
then
VLC_ADD_PLUGIN([vout_ios2])
VLC_ADD_LIBS([vout_ios2], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit])
fi
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 Direct3D
AC_CHECK_HEADERS(d3d9.h, [
VLC_ADD_PLUGIN([direct3d])
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)])
VLC_ADD_LIBS([aa],[-laa])
if test "${SYS}" != "mingw32"; then
VLC_ADD_LIBS([aa],[${X_LIBS} ${X_PRE_LIBS} -lX11])
fi
Ramiro Polla
committed
PKG_ENABLE_MODULES_VLC([CACA], [], [caca >= 0.99.beta14], [libcaca output],[auto])
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
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"])
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 >= 0.9.22], [
have_pulse="yes"
], [
PKG_CHECK_MODULES([PULSE], [libpulse >= 0.9.16], [
AS_IF([test "${no_x}" != "yes"], [
have_pulse="yes"
PULSE_LIBS="$PULSE_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11"
], [
AS_IF([test "${enable_pulse}" = "yes"], [
AC_MSG_ERROR([Xlib is required with PulseAudio pre-0.9.22 versions
(see http://www.pulseaudio.org/ticket/799 for further reference).])
])
])
], [
AS_IF([test "x${enable_pulse}" != "x"], [
AC_MSG_ERROR([$PULSE_PKG_ERRORS. PulseAudio 0.9.22 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"])
AC_ARG_ENABLE(waveout,
[ --enable-waveout Win32 waveOut module (default enabled on Win32)])
VLC_ADD_LIBS([waveout],[-lwinmm])
dnl
dnl CoreAudio plugin
dnl
AC_ARG_ENABLE(macosx-audio,
[ --enable-macosx-audio Mac OS X audio module (default enabled on MacOS X)])
if test "x${enable_macosx_audio}" != "xno" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_audio}" = "yes")
AC_CHECK_HEADERS(CoreAudio/CoreAudio.h,
[ VLC_ADD_PLUGIN([auhal])

Felix Paul Kühne
committed
VLC_ADD_LIBS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,CoreServices])
Samuel Hocevar
committed
], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
dnl
dnl iOS CoreAudio plugin
dnl
AC_ARG_ENABLE(ios-audio,
[ --enable-ios-audio Audio module for iOS (default disabled)])
if test "${enable_ios_audio}" = "yes"
then
AC_CHECK_HEADERS(AudioUnit/AudioUnit.h,
[ VLC_ADD_PLUGIN([audiounit_ios])
VLC_ADD_LIBS([audiounit_ios],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,CoreServices])
], [ AC_MSG_ERROR([cannot find AudioUnit headers]) ])
fi
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])

Felix Paul Kühne
committed
VLC_ADD_LIBS([audioqueue], [-Wl,-framework,AudioToolbox,-framework,CoreFoundation])
dnl JACK modules
PKG_ENABLE_MODULES_VLC([JACK], [jack access_jack], [jack], [JACK audio I/O modules],[auto])
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 libsamplerate plugin
PKG_ENABLE_MODULES_VLC([SAMPLERATE], [], [samplerate], [Resampler with libsamplerate], [auto])
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
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"])
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], [QtCore >= 5 QtWidgets QtGui],, [
PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
AS_IF([test -n "${enable_qt}"],[
AC_MSG_ERROR([${QT_PKG_ERRORS}.])
],[
AC_MSG_WARN([${QT_PKG_ERRORS}.])
])
enable_qt="no"
])
])
AS_IF([test "${enable_qt}" != "no"], [
VLC_ADD_PLUGIN([qt4])
VLC_ADD_LIBS([qt4],[${QT_LIBS}])
VLC_ADD_CXXFLAGS([qt4],[${QT_CFLAGS}])
ALIASES="${ALIASES} qvlc"
AC_LANG_PUSH([C++])
VLC_SAVE_FLAGS
AC_MSG_CHECKING([whether Qt uses Xlib])
CPPFLAGS="${CPPFLAGS} ${QT_CFLAGS}"
AC_PREPROC_IFELSE([AC_LANG_SOURCE([
#include <QWidget>
#if !defined (Q_WS_X11)
# error Fail
#endif
])], [
AC_MSG_RESULT([yes])
VLC_ADD_LIBS([qt4],[${X_LIBS} ${X_PRE_LIBS} -lX11])
VLC_ADD_CXXFLAGS([qt4],[${X_CFLAGS}])
], [
AC_MSG_RESULT([no])
])
VLC_RESTORE_FLAGS
AC_LANG_POP([C++])
VLC_ADD_LIBS([qt4],[-lole32])
])
AS_IF([test "${SYS}" = "darwin" ],[
VLC_ADD_LIBS([qt4], [-Wl,-framework,Cocoa])
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])
AM_CONDITIONAL(ENABLE_QT4, [test "$enable_qt" != "no"])

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 Qt4 interface. Without it you will not be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
], [
enable_skins2="no"
AC_MSG_WARN([The skins2 module depends on the Qt4 interface, Qt4 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 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])
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
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"
VLC_ADD_LIBS([macosx], [-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,CoreServices])

Felix Paul Kühne
committed
VLC_ADD_OBJCFLAGS([macosx], [-fobjc-exceptions] )
VLC_ADD_PLUGIN([macosx])
David Fuhrmann
committed
VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit -Wl,-framework,CoreAudio -Wl,-framework,SystemConfiguration -Wl,-framework,ScriptingBridge])
if test ! -d ${CONTRIB_DIR}/Sparkle.framework
then
AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}])
fi
VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,Sparkle])
VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}])
if test ! -d ${CONTRIB_DIR}/BGHUDAppKit.framework
AC_MSG_ERROR([BGHUDAppKit framework is required and was not found in ${CONTRIB_DIR}])
VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,BGHUDAppKit])
VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}])

Felix Paul Kühne
committed
fi
AM_CONDITIONAL(ENABLE_MACOSX_UI, [test "$enable_macosx" != "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

Felix Paul Kühne
committed
VLC_ADD_LIBS([minimal_macosx], [-Wl,-framework,Cocoa])

Felix Paul Kühne
committed
VLC_ADD_OBJCFLAGS([minimal_macosx], [-fobjc-exceptions] )
VLC_ADD_PLUGIN([minimal_macosx])

Felix Paul Kühne
committed
AM_CONDITIONAL(ENABLE_MINIMAL_MACOSX, [test "$enable_minimal_macosx" != "no"])
dnl

Felix Paul Kühne
committed
dnl MacOS X dialog provider
dnl
AC_ARG_ENABLE(macosx-dialog-provider,
[ --enable-macosx-dialog-provider Mac OS X dialog module (default enabled on Mac OS X)])
if test "x${enable_macosx_dialog_provider}" != "xno" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_dialog_provider}" = "yes")
then

Felix Paul Kühne
committed
VLC_ADD_LIBS([macosx_dialog_provider],[-Wl,-framework,Cocoa])
VLC_ADD_PLUGIN([macosx_dialog_provider])
fi

Felix Paul Kühne
committed
AM_CONDITIONAL(ENABLE_MACOSX_DIALOG_PROVIDER, [test "$enable_macosx_dialog_provider" != "no"])
[AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)])])
AS_IF([test "${enable_ncurses}" != "no"] ,[
PKG_CHECK_MODULES([NCURSES], [ncursesw], [
VLC_ADD_PLUGIN([ncurses])
VLC_ADD_CFLAGS([ncurses],[${NCURSES_CFLAGS}])
VLC_ADD_LIBS([ncurses],[${NCURSES_LIBS}])
ALIASES="${ALIASES} nvlc"
AS_IF([test -n "${enable_ncurses}"], [
AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
])
dnl
dnl Lirc plugin
dnl
AC_ARG_ENABLE(lirc,
[ --enable-lirc lirc support (default disabled)])
if test "${enable_lirc}" = "yes"
then
AC_CHECK_HEADER(lirc/lirc_client.h, AC_CHECK_LIB(lirc_client, lirc_init, have_lirc="true", have_lirc="false"),have_lirc="false")
if test "${have_lirc}" = "true"
then
VLC_ADD_PLUGIN([lirc])
VLC_ADD_LIBS([lirc],[-llirc_client])
fi
fi
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 chromaprint audio track fingerprinter
dnl
PKG_ENABLE_MODULES_VLC([CHROMAPRINT], [stream_out_chromaprint], [libchromaprint >= 0.6.0], (Chromaprint based audio fingerprinter), [auto], [-I./webservices -I../stream_out])
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])
VLC_ADD_CXXFLAGS([projectm],[$PROJECTM_CFLAGS])
VLC_ADD_LIBS([projectm],[$PROJECTM_LIBS])
PKG_CHECK_MODULES(PROJECTM2, [libprojectM >= 2.0.0],
[ 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])
VLC_ADD_CXXFLAGS([vsxu],[$VSXU_CFLAGS])
VLC_ADD_LIBS([vsxu],[$VSXU_LIBS])
],[
AC_MSG_WARN([${VSXU_PKG_ERRORS}.])
])
])
dionoea
committed
dnl
dnl AtmoLight (homemade Philips Ambilight clone)
dionoea
committed
dnl
AS_HELP_STRING([--disable-atmo],[AtmoLight (homemade Philips Ambilight clone)
(default enabled)]),, [enable_atmo="yes"])
AS_IF([test "${enable_atmo}" != no], [
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "linux"], [
AC_LANG_PUSH(C++)
VLC_ADD_PLUGIN([atmo])
AC_LANG_POP(C++)
])
])
dionoea
committed
EXTEND_HELP_STRING([Service Discovery plugins:])
dnl
dnl Bonjour services discovery

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([BONJOUR], [], [avahi-client >= 0.6], [Bonjour services discovery], [auto])
dnl
dnl libudev services discovery
PKG_ENABLE_MODULES_VLC([UDEV], [], [libudev >= 142], [Linux udev services discovery], [auto])
PKG_ENABLE_MODULES_VLC([MTP], [mtp access_mtp], [libmtp >= 1.0.0], [MTP devices support], [auto])
dnl
dnl UPnP Plugin (Intel SDK)
dnl
PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto])
VLC_ADD_CXXFLAGS([upnp],[${UPNP_CFLAGS}])
dnl
dnl libxml2 module
dnl
PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
dnl
dnl libgcrypt
dnl
AC_ARG_ENABLE(libgcrypt,
[ --disable-libgcrypt gcrypt support (default enabled)])
AS_IF([test "${enable_libgcrypt}" != "no"], [
AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [
libgcrypt-config --version >/dev/null || \
AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found])
AC_CHECK_LIB(gcrypt, gcry_control, [
have_libgcrypt="yes"
GCRYPT_CFLAGS="`libgcrypt-config --cflags`"
GCRYPT_LIBS="`libgcrypt-config --libs`"
], [
AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
], [`libgcrypt-config --libs`])
], [
AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
], [#include <gcrypt.h>]
)
AC_SUBST(GCRYPT_CFLAGS)
AC_SUBST(GCRYPT_LIBS)
AM_CONDITIONAL([HAVE_GCRYPT], [test "${have_libgcrypt}" = "yes"])

Rémi Denis-Courmont
committed
dnl
dnl TLS/SSL
dnl
AC_ARG_ENABLE(gnutls,
[ --enable-gnutls GNU TLS TLS/SSL support (default enabled)])

Rémi Denis-Courmont
committed
AS_IF([test "${enable_gnutls}" != "no"], [
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.0.20], [

Rémi Denis-Courmont
committed
], [
AS_IF([test -n "${enable_gnutls}"], [
AC_MSG_ERROR([${GNUTLS_PKG_ERRORS}.)])

Rémi Denis-Courmont
committed
])
])
])
dnl
dnl Taglib plugin
dnl
AC_ARG_ENABLE(taglib,
[AS_HELP_STRING([--disable-taglib],
[do not use TagLib (default enabled)])])
AS_IF([test "${enable_taglib}" != "no"], [
PKG_CHECK_MODULES(TAGLIB, taglib >= 1.6.1, [
VLC_ADD_PLUGIN([taglib])
VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz])
VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS])
], [
AC_MSG_WARN([${TAGLIB_PKG_ERRORS}.])])
dnl
dnl update checking system
dnl
AC_ARG_ENABLE(update-check,
[ --enable-update-check update checking system (default disabled)])
if test "${enable_update_check}" = "yes"
then
if test "${have_libgcrypt}" != "yes"
then
AC_MSG_ERROR([libgcrypt is required for update checking system])
fi
VLC_ADD_LIBS([libvlccore], [${GCRYPT_LIBS}])
VLC_ADD_CFLAGS([libvlccore], [${GCRYPT_CFLAGS}])
AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
fi

Rémi Denis-Courmont
committed
dnl
dnl Growl notification plugin
dnl
AC_ARG_ENABLE(growl,
[ --enable-growl growl notification plugin (default disabled)],,