Newer
Older
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_x264_tree} directory doesn't exist])
fi
dnl Use a custom libx264
AC_MSG_CHECKING(for x264.h in ${real_x264_tree})
if test -f ${real_x264_tree}/x264.h
then
AC_MSG_RESULT(yes)
VLC_ADD_CPPFLAGS([x264],[-I${real_x264_tree}])
VLC_ADD_LIBS([x264],[-L${real_x264_tree}])
VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
fi
],[
AC_MSG_ERROR([the specified tree hasn't been compiled])
])
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have x264.h])
fi
else
PKG_CHECK_MODULES(X264,x264 >= 0.86, [
VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
VLC_ADD_LDFLAGS([x264],[-Wl,-Bsymbolic])
])
if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
fi
],[
if test "${enable_x264}" = "yes"; then
AC_MSG_ERROR([Could not find libx264 >= 0.86 on your system: you may get it from http://www.videolan.org/x264.html])
fi
])
LDFLAGS="${LDFLAGS_save}"
fi
fi
dnl
dnl libfluidsynth (MIDI synthetizer) plugin
dnl
PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth], [MIDI synthetiser with libfluidsynth], [auto])

Jean-Paul Saman
committed
dnl
Christophe Mutricy
committed
dnl Teletext Modules

Jean-Paul Saman
committed
dnl vbi decoder plugin (using libzbvi)
Christophe Mutricy
committed
dnl telx module
dnl uncompatible

Jean-Paul Saman
committed
dnl
AC_ARG_ENABLE(zvbi,
AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
Christophe Mutricy
committed
AC_ARG_ENABLE(telx,
AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
zvbi) (default enabled if zvbi is absent)]))
Christophe Mutricy
committed
AS_IF( [test "${enable_zvbi}" != "no"],[
PKG_CHECK_MODULES(ZVBI,
[
VLC_ADD_LIBS([zvbi],[$ZVBI_LIBS])
if test "${SYS}" = "mingw32"; then
VLC_ADD_LIBS([zvbi],[ -lpthreadGC2])
VLC_ADD_CFLAGS([zvbi],[$ZVBI_CFLAGS])
AC_DEFINE(ZVBI_COMPILED, 1, [Define if the zvbi module is built])
AS_IF( [test "${enable_telx}" = "yes"],[
AC_MSG_WARN([The zvbi and telx modules are uncompatibles.
Using zvbi.])
])
],[
AC_MSG_WARN(ZVBI library not found. Enabling the telx module instead)
])
AS_IF( [test "${enable_telx}" != "no" ],[
Christophe Mutricy
committed
])

Jean-Paul Saman
committed
dnl
dnl libass subtitle rendering module
dnl
AC_ARG_ENABLE(libass,
[ --enable-libass Subtitle support using libass (default enabled)])
AS_IF( [test "${enable_libass}" != "no"], [
PKG_CHECK_MODULES(LIBASS, libass >= 0.9.6,
VLC_ADD_LIBS([libass],[$LIBASS_LIBS])
VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
VLC_ADD_PLUGIN([libass])
AC_CHECK_HEADERS(fontconfig/fontconfig.h,
[VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
VLC_ADD_LIBS([libass],[-lfontconfig])
])
],[
AC_MSG_WARN([LIBASS library not found])
])
])
dnl
dnl kate decoder plugin
dnl
AC_ARG_ENABLE(kate,
[ --enable-kate kate codec (default enabled)])
AS_IF([test "${enable_kate}" != "no"], [
Vincent Penquerc'h
committed
PKG_CHECK_MODULES(KATE,[kate >= 0.1.5], [
VLC_ADD_CFLAGS([kate],[$KATE_CFLAGS])
VLC_ADD_LIBS([kate],[$KATE_LIBS]) ],[
AC_CHECK_HEADERS(kate/kate.h, [
AC_CHECK_LIB(kate, kate_decode_init, [
kate_libs="-lkate -logg"
VLC_ADD_LDFLAGS([kate],[${kate_libs}]) ],[
AS_IF([test "x${enable_kate}" != "x"], [
AC_MSG_ERROR([libkate doesn't appear to be installed on your system.
You also need to check that you have a libogg posterior to the 1.0 release.])
])
], [-lkate -logg])
AS_IF([test "x${enable_kate}" != "x"], [
AC_MSG_ERROR([libkate headers do not appear to be installed on your system.
You also need to check that you have a libogg posterior to the 1.0 release.])
dnl tiger rendering for kate decoder plugin
dnl
AC_ARG_ENABLE(tiger,
[ --enable-tiger Tiger rendering library for Kate streams (default enabled)])
AS_IF([test "${enable_tiger}" != "no"], [
PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])
VLC_ADD_CFLAGS([kate],[$TIGER_CFLAGS])
VLC_ADD_LIBS([kate],[$TIGER_LIBS]) ],[
AS_IF([test "x${enable_tiger}" != "x"], [
AC_MSG_ERROR([libtiger does not appear to be installed on your system.])
])
])
])
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}" != "mingwce" -a "${SYS}" != "darwin"], [
enable_xcb="yes"
], [
enable_xcb="no"
])
])
AC_ARG_ENABLE(xvideo,
[ --enable-xvideo XVideo support (default enabled)],, [
enable_xvideo="$enable_xcb"
])
AS_IF([test "${enable_xcb}" != "no"], [
dnl libxcb

Rémi Denis-Courmont
committed
PKG_CHECK_MODULES(XCB, [xcb])
VLC_ADD_PLUGIN([xscreensaver xcb_x11 xcb_window xcb_screen xcb_apps])
AS_IF([test "${enable_xvideo}" != "no"], [
PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
], [
PKG_CHECK_MODULES(XCB_XV, [xcb-xv], [
VLC_ADD_PLUGIN([xcb_xv])
VLC_ADD_CFLAGS([xcb_xv], [-DXCB_XV_OLD])
])
PKG_CHECK_MODULES(XCB_RANDR, [xcb-randr >= 1.3], [
VLC_ADD_PLUGIN([panoramix])
VLC_ADD_LIBS([panoramix],[${XCB_RANDR_LIBS} ${XCB_LIBS}])
VLC_ADD_CFLAGS([panoramix],[${XCB_RANDR_CFLAGS} ${XCB_CFLAGS}])
], [
AC_MSG_WARN([libxcb-randr not found. Panoramix filter will not be supported.])
])
PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [
have_xcb_keysyms="yes"
], [
PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms], [
have_xcb_keysyms="yes"
VLC_ADD_CFLAGS([globalhotkeys], [-DXCB_KEYSYM_OLD_API])
], [
have_xcb_keysyms="no"
need_xid_provider="yes"
AC_MSG_WARN([libxcb-keysyms not found. Hotkeys will not be supported.])
AS_IF([test "${have_xcb_keysyms}" = "yes"], [
PKG_CHECK_MODULES(XPROTO, [xproto])
VLC_ADD_PLUGIN([globalhotkeys])
VLC_ADD_CFLAGS([globalhotkeys], [${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}])
VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}])
VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
AC_ARG_ENABLE(glx,
[ --enable-glx X11 OpenGL (GLX) support (default enabled)],, [
enable_glx="$enable_xcb"
])
AS_IF([test "${enable_glx}" != "no"], [
PKG_CHECK_MODULES(XLIB_XCB, [x11-xcb])
PKG_CHECK_MODULES(GL, [gl],, [
AC_CHECK_HEADER([GL/gl.h], [
GL_CFLAGS=""
GL_LIBS="-lGL"
], [
AC_MSG_ERROR([GLX (libGL) cannot be found. If you do not need OpenGL with X11, use --disable-glx.])
])
])
VLC_ADD_PLUGIN([xcb_glx])
])
AC_SUBST([GL_CFLAGS])
AC_SUBST([GL_LIBS])
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
VLC_ADD_PLUGIN([vout_sdl aout_sdl])
if test "${SYS}" != "mingw32"; then
VLC_ADD_LIBS([vout_sdl],[${X_LIBS} ${X_PRE_LIBS} -lX11])
fi
VLC_ADD_CFLAGS([vout_sdl aout_sdl],[${SDL_CFLAGS}])
VLC_ADD_LIBS([vout_sdl aout_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([The development package for SDL_image is not installed.
You should install it alongside your SDL package.])
])
])
],[
AC_MSG_WARN([The development package for SDL is not present or too old.
You need 1.2.10. Alternatively you can also configure with
--disable-sdl.])
dnl
dnl freetype module
dnl
AC_ARG_ENABLE(freetype,
[ --enable-freetype freetype support (default enabled)])
AC_ARG_ENABLE(fribidi,
[ --enable-fribidi fribidi support (default enabled)])
[ --enable-fontconfig fontconfig support (default enabled)])

Jean-Paul Saman
committed
PKG_CHECK_MODULES(FREETYPE, freetype2,[

Jean-Paul Saman
committed
have_freetype=yes
VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
Christophe Mutricy
committed
if test "${SYS}" = "mingw32"; then
VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
if test "${enable_fontconfig}" != "no"
then
AC_CHECK_HEADERS(fontconfig/fontconfig.h,
[VLC_ADD_CPPFLAGS([freetype],[-DHAVE_FONTCONFIG])
VLC_ADD_LIBS([freetype],[-lfontconfig])])
AC_CHECK_HEADERS(Carbon/Carbon.h,
[VLC_ADD_LDFLAGS([freetype],[-Wl,-framework,Carbon])])
fi
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}])
])
fi
Christophe Mutricy
committed
],[
have_freetype=no
AS_IF([ test "${enable_freetype}" = "yes"],[
AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2
from http://www.freetype.org/, or configure with --disable-freetype. Have a nice day.
Christophe Mutricy
committed
])
Christophe Mutricy
committed
])
fi
PKG_ENABLE_MODULES_VLC([LIBXML2], [xml], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
dnl
dnl SVG module
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([SVG], [], [librsvg-2.0 >= 2.9.0], [SVG rendering library],[auto])
Olivier Aubert
committed
dnl
dnl Snapshot vout module (with cache)
dnl
AC_ARG_ENABLE(snapshot,
[ --enable-snapshot snapshot module (default disabled)])
if test "${enable_snapshot}" = "yes"
Olivier Aubert
committed
then
Olivier Aubert
committed
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])
VLC_ADD_LDFLAGS([vout_ios], [-Wl,-framework,OpenGLES,-framework,QuartzCore,-framework,UIKit,-framework,Foundation])
fi
dnl
dnl QuartzText vout module (iOS/Mac OS)
dnl
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_LDFLAGS([quartztext],[-Wl,-framework,ApplicationServices])
fi
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"
AC_ARG_ENABLE(directx,
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"
[ VLC_ADD_PLUGIN([directx aout_directx])
VLC_ADD_LIBS([directx],[-lgdi32])
],[AC_MSG_ERROR([Cannot find DirectX headers!])]
)
AC_CHECK_HEADERS(GL/gl.h,
VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
])
AC_CHECK_HEADERS(d3d9.h,
VLC_ADD_LIBS([direct3d],[-lgdi32])
VLC_ADD_LIBS([direct3d directx glwin32],[-lole32])
dnl
dnl Windows Direct2D plugin
dnl
AC_ARG_ENABLE(direct2d,
[ --enable-direct2d Win7/VistaPU Direct2D support (default auto on Win32)])
if test "${enable_direct2d}" != "no"; then
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"
then
AC_CHECK_HEADERS(d2d1.h,
[
VLC_ADD_PLUGIN([direct2d])
VLC_ADD_LIBS([direct2d],[-lgdi32 -lole32])
], [AC_MSG_WARN([Cannot find Direct2D headers!])]
)
fi
fi
dnl
dnl win32 GDI plugin
dnl
AC_ARG_ENABLE(wingdi,
[ --enable-wingdi Win32 GDI module (default enabled on Win32)])
if test "${enable_wingdi}" != "no"; then
if test "${SYS}" = "mingw32"; then
VLC_ADD_PLUGIN([wingdi])
VLC_ADD_LIBS([wingdi],[-lgdi32 -lole32])
fi
if test "${SYS}" = "mingwce"; then
VLC_ADD_PLUGIN([wingdi wingapi])
VLC_ADD_LIBS([wingdi],[-laygshell])
VLC_ADD_LIBS([wingapi],[-laygshell])
fi
fi
AC_ARG_ENABLE(fb,
[ --enable-fb Linux framebuffer support (default enabled on Linux)])

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
CPPFLAGS_save="${CPPFLAGS}"
LIBS_save="${LIBS}"
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/"
LIBS_new="${LIBS_new} -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")
dnl Restore flags
CPPFLAGS="${CPPFLAGS_save}"
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([cannot find directfb headers and/or libraries ])

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])
dnl
dnl OSS /dev/dsp module (enabled by default except on win32)
dnl
[ --enable-oss Open Sound System OSS support (default enabled)])
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_oss}" = "yes")
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
VLC_ADD_PLUGIN([oss access_oss])
AC_CHECK_LIB(ossaudio,main,[VLC_ADD_LIBS([oss access_oss],[-lossaudio])])
dnl
dnl Pulseaudio module
dnl
PKG_ENABLE_MODULES_VLC([PULSE], [], [libpulse >= 0.9.22], [Pulseaudio support], [auto])
dnl
dnl Portaudio module
dnl
PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library support], [auto])
AC_ARG_ENABLE(alsa,
[ --enable-alsa Advanced Linux Sound Architecture (default auto)])
have_alsa="no"
AS_IF([test "${enable_alsa}" != "no"], [
PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.0], [
have_alsa="yes"
], [
AS_IF([test "x${enable_alsa}" != "x"], [
AC_MSG_ERROR([alsa-lib not found])
])
])
])
AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
AC_ARG_ENABLE(waveout,
[ --enable-waveout Win32 waveOut module (default enabled on Win32)])
VLC_ADD_LIBS([waveout],[-lwinmm])
fi
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])
VLC_ADD_LDFLAGS([auhal],[-Wl,-framework,CoreAudio,-framework,AudioUnit,-framework,AudioToolbox,-framework,Carbon])
Samuel Hocevar
committed
], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
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])
VLC_ADD_LDFLAGS([audioqueue], [-Wl,-framework,AudioToolbox,-framework,CoreFoundation])
fi
dnl
dnl Roku HD1000 audio
dnl
AC_ARG_ENABLE(hd1000a,
[ --enable-hd1000a HD1000 audio module (default enabled on HD1000)])
if test "${enable_hd1000a}" != "no" -a "${CXX}" != "" &&
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_hd1000a}" = "yes")
then
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS(deschutes/libraries/hdmachinex225/PCMAudioPlayer.h, [
AC_CHECK_LIB(HDMachineX225,main,VLC_ADD_LIBS([hd1000a],[-lHDMachineX225])) ])
dnl JACK modules
PKG_ENABLE_MODULES_VLC([JACK], [jack access_jack], [jack], [JACK audio I/O modules],[auto])
dnl
dnl UPnP Plugin (Intel SDK)
dnl
PKG_ENABLE_MODULES_VLC([UPNP], [upnp_intel], [libupnp], [Intel UPnp SDK],[auto])
VLC_ADD_CXXFLAGS([upnp_intel],[${UPNP_CFLAGS}])
dnl
dnl Skins2 module
dnl
AC_ARG_ENABLE(skins2,
[AS_HELP_STRING([--enable-skins2],[Skins2 interface module (default
enabled except on MacOSX, BeOS and WinCE)])])
if test "${enable_skins2}" != "no" ||
(test "${SYS}" != "darwin" && test "${SYS}" != "beos" &&
test "${SYS}" != "mingwce" && test "${enable_skins2}" == "yes"); then
Christophe Mutricy
committed
if test "${have_freetype}" != "yes"; then
skins2_missing_lib="yes"
if test "${enable_skins2}" = "yes"; then
AC_MSG_ERROR([Could not find freetype (required for skins2)])
fi
fi
if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32"); then
VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
VLC_ADD_LIBS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
else if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "darwin"); then
ALIASES="${ALIASES} svlc"
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
Samuel Hocevar
committed
VLC_ADD_LDFLAGS([skins2],[-Wl,-framework,Carbon])
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} -DX11_SKINS])
VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} -lXext -lXpm -lX11])
fi fi fi
AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes" ||
(test "${SYS}" != "darwin" && test "${SYS}" != "beos" &&
test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no")])
AC_ARG_ENABLE(hildon,
[ --enable-hildon Hildon touchscreen UI (default disabled)])
AS_IF([test "${enable_hildon}" = "yes"], [
gbazin
committed
PKG_CHECK_MODULES(HILDON, [hildon-1], [
PKG_CHECK_MODULES(HILDON_FM, hildon-fm-2, [
VLC_ADD_CFLAGS([hildon],[${HILDON_FM_CFLAGS} -DHAVE_HILDON_FM])
gbazin
committed
VLC_ADD_LIBS([hildon],[${HILDON_FM_LIBS}])
], [
AC_MSG_WARN(hildon-fm-2 not found)
])
VLC_ADD_CFLAGS([hildon],[${HILDON_CFLAGS} ${X_CFLAGS}])
VLC_ADD_LIBS([hildon],[${HILDON_LIBS} ${X_LIBS} ${X_PRE_LIBS} -lX11])
ALIASES="${ALIASES} mvlc"
AS_IF([test "${enable_hildon}" = "yes"],[
AC_MSG_ERROR([Hildon libraries not found])
])
])
AM_CONDITIONAL(BUILD_HILDON, [test "${enable_hildon}" = "yes"])
[ --enable-qt4 Qt 4 support (default enabled) ],, [
AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
])
AS_IF([test "${enable_qt4}" != "no"], [

Jean-Baptiste Kempf
committed
PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.0], [
VLC_ADD_LIBS([qt4],[${QT4_LIBS}])
VLC_ADD_CXXFLAGS([qt4],[${QT4_CFLAGS}])
AC_MSG_CHECKING([whether Qt uses X11])
AC_PREPROC_IFELSE([
#include <QWidget>
#if !defined (Q_WS_X11)
# error Fail
#endif
], [
AC_MSG_RESULT([yes])
VLC_ADD_LIBS([qt4],[${X_LIBS} ${X_PRE_LIBS} -lX11])
need_xid_provider="no"
VLC_ADD_CXXFLAGS([qt4],[${X_CFLAGS}])
AC_MSG_RESULT([no])
])
CPPFLAGS="${CPPFLAGS_save}"
AC_LANG_POP([C++])
AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
VLC_ADD_LIBS([qt4],[-lole32])
AC_PATH_PROGS(MOC, [moc-qt4 moc], moc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
AC_PATH_PROG(RCC, rcc, rcc,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
AC_PATH_PROGS(UIC, [uic-qt4 uic], uic,`eval $PKG_CONFIG --variable=exec_prefix QtCore`/bin)
], [
AS_IF([test "${enable_qt4}" = "yes"],[
AC_MSG_ERROR([Qt 4 library not found])
],[
AC_MSG_WARN([Qt 4 library not found])
])
enable_qt4="no"
])
AM_CONDITIONAL(ENABLE_QT4, [test "x$enable_qt4" != "xno"])

Jean-Paul Saman
committed
dnl
dnl Simple test for skins2 dependency
dnl
AS_IF([test "${enable_skins2}" != "no" && test "x$enable_qt4" = "xno"], [
AC_MSG_ERROR([The skins2 module depends on a the Qt4 development package. Without it you won't 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.])
])

Jean-Paul Saman
committed
AC_ARG_ENABLE(macosx,
[ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)])
VLC_ADD_LDFLAGS([macosx minimal_macosx],[-Wl,-framework,Cocoa])
VLC_ADD_LDFLAGS([macosx minimal_macosx],[-Wl,-framework,OpenGL])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,Carbon])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,CoreServices])
VLC_ADD_LDFLAGS([macosx minimal_macosx], [-Wl,-framework,AGL])
VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,IOKit])
VLC_ADD_LDFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle])
Pierre d'Herbemont
committed
dnl For bug report
VLC_ADD_LDFLAGS([macosx], [-Wl,-framework,AddressBook])
VLC_ADD_OBJCFLAGS([macosx minimal_macosx], [-fobjc-exceptions] )
VLC_ADD_PLUGIN([macosx minimal_macosx])
dnl
dnl MacOS X related modules
dnl
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_LDFLAGS([vout_macosx],[-Wl,-framework,Cocoa])
VLC_ADD_LDFLAGS([vout_macosx],[-Wl,-framework,OpenGL])
VLC_ADD_PLUGIN([vout_macosx])
fi
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
VLC_ADD_LDFLAGS([macosx_dialog_provider],[-Wl,-framework,Cocoa])
VLC_ADD_PLUGIN([macosx_dialog_provider])
fi
AC_ARG_ENABLE(macosx-qtcapture,
[ --enable-macosx-qtcapture Mac OS X qtcapture (iSight) module (default enabled on Mac OS X)])
if test "x${enable_macosx_qtcapture}" != "xno" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_qtcapture}" = "yes")
then
VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,Cocoa])
VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,QTKit])
VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,CoreAudio])
VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,QuartzCore])
VLC_ADD_LDFLAGS([qtcapture], [-Wl,-framework,CoreVideo])
VLC_ADD_PLUGIN([qtcapture])
fi
AC_ARG_ENABLE(macosx-eyetv,
[ --enable-macosx-eyetv Mac OS X EyeTV (TNT Tuner) module (default enabled on Mac OS X)])
if test "x${enable_macosx_eyetv}" != "xno" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_eyetv}" = "yes")
then
VLC_ADD_LDFLAGS([access_eyetv], [-Wl,-framework,Foundation])
VLC_ADD_PLUGIN([access_eyetv])
fi
AC_ARG_ENABLE(macosx-vlc-app,
[ --enable-macosx-vlc-app build the VLC media player (default enabled on Mac OS X)])
AM_CONDITIONAL(BUILD_MACOSX_VLC_APP, [test "${enable_macosx_vlc_app}" != "no" &&
(test "${SYS}" = "darwin" || test "${enable_macosx_vlc_app}" = "yes") ])
[ --disable-ncurses ncurses interface support (default disabled)],
[if test "${enable_ncurses}" != "no"; then
AC_CHECK_HEADER(ncurses.h,
[AC_CHECK_LIB(ncursesw, mvprintw,
VLC_ADD_LIBS([ncurses],[-lncursesw])
AC_CHECK_LIB(ncursesw, tgetent, [],
AC_CHECK_LIB(tinfow, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfow])],
[AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])],
[AC_MSG_ERROR([tgetent not found in ncursesw tinfow tinfo]
)])])
]
)
)
],
[AS_IF([test "${enable_ncurses}" = "yes"], [
AC_MSG_ERROR([libncursesw not found])])]
)],
[AS_IF([test "${enable_ncurses}" = "yes"], [
AC_MSG_ERROR([ncurses.h not found])])]
)
fi]
)
dnl
dnl XOSD plugin
dnl
AC_ARG_ENABLE(xosd,
[ --enable-xosd xosd interface support (default disabled)])
AC_CHECK_HEADERS(xosd.h,
AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
VLC_ADD_PLUGIN([xosd])
VLC_ADD_LIBS([xosd],[-lxosd])
])
)
dnl
dnl Framebuffer (overlay) plugin
dnl
AC_ARG_ENABLE(fbosd,
if test "${enable_fbosd}" = "yes"
then
AC_CHECK_HEADERS(linux/fb.h, [
])
fi
dnl
dnl Post-interface configuration checks
dnl
AS_IF([test "$need_xid_provider" = "yes"], [
AC_MSG_ERROR([X11 video outputs need a window provider (Qt4, Skins2, Hildon or xcb-utils), but none were found. Please install xcb-keysyms.])
])
dnl
dnl Visualisation plugin
dnl
AC_ARG_ENABLE(visual,
[ --enable-visual visualisation plugin (default enabled)])
if test "${enable_visual}" != "no"
then
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])
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] )
])
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++)
])
])