Newer
Older
AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
],[
AC_MSG_ERROR([Could not find liba52 on your system: you may get it from http://liba52.sf.net/. Alternatively you can use --disable-a52 to disable the a52 plugin.])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
gbazin
committed
AC_ARG_WITH(a52-fixed,
[ --with-a52-fixed specify if liba52 has been compiled with fixed point support],
gbazin
committed
[
VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ])
PKG_ENABLE_MODULES_VLC([DCA], [dtstofloat32], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
dnl
dnl
PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
dnl
dnl Tremor plugin
dnl
AC_ARG_ENABLE(tremor,
[ --enable-tremor Tremor decoder support (default disabled)])
VLC_ADD_LIBS([tremor],[-lvorbisidec -logg])

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex decoder support], [auto])

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theora >= 1.0], [experimental theora codec], [auto])
dnl
dnl dirac encoder plugin
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([DIRAC], [], [dirac >= 0.10.0], [dirac encoder], [auto])
dnl
dnl schroedinger decoder plugin (for dirac format video)
dnl

Jean-Baptiste Kempf
committed
PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.6], [dirac decoder using schroedinger], [auto])
dnl
dnl PNG decoder module
dnl
AC_ARG_ENABLE(png,
[ --enable-png PNG support (default enabled)])
if test "${enable_png}" != "no"; then
AC_CHECK_HEADERS(png.h, [
LDFLAGS="${LDFLAGS_save} -lz"
AC_CHECK_LIB(png, png_set_rows, [
VLC_ADD_LIBS([png],[-lpng -lz])
VLC_ADD_PLUGIN([png osdmenu osd_parser])],

Jean-Paul Saman
committed
LDFLAGS="${LDFLAGS_save}"

Jean-Paul Saman
committed
AM_CONDITIONAL(BUILD_OSDMENU, [test "${enable_png}" != "no"])
dnl
dnl H264 encoder plugin (using libx264)
dnl
AC_ARG_ENABLE(x264,
[ --enable-x264 H264 encoding support with libx264 (default enabled)])
if test "${enable_x264}" != "no"; then
AC_ARG_WITH(x264-tree,
[ --with-x264-tree=PATH x264 tree for static linking ],[],[])
if test "${with_x264_tree}" != "no" -a -n "${with_x264_tree}"
then
real_x264_tree="`cd ${with_x264_tree} 2>/dev/null && pwd`"
if test -z "${real_x264_tree}"
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}])
AC_CACHE_CHECK([if linker supports -Bsymbolic],
[ac_cv_ld_bsymbolic],
[LDFLAGS="${LDFLAGS_vlc} -Wl,-Bsymbolic"
AC_TRY_LINK([],,ac_cv_ld_bsymbolic=yes,ac_cv_ld_bsymbolic=no)
LDFLAGS="${LDFLAGS_save}"
])
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 asa demuxer
dnl
AC_ARG_ENABLE(asademux,
[ --enable-asademux asa subtitle demuxing (default disabled)])
PKG_CHECK_MODULES(PCRE,
libpcre >= 6.5,
[
VLC_ADD_LDFLAGS([asademux],[$PCRE_LIBS])
VLC_ADD_CFLAGS([asademux],[$PCRE_CFLAGS])
if test "${SYS}" = "mingw32"; then
VLC_ADD_CPPFLAGS([asademux],[-DPCRE_STATIC])
],[
AC_MSG_WARN([PCRE library not found (required for asademux)])
])
])
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([screensaver 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}])
], [true])
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
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 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])
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
AC_ARG_ENABLE(oss,
[ --enable-oss Linux OSS /dev/dsp support (enabled on Linux)])
(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
AS_IF([test "${no_x}" = "yes"], [
AS_IF([test "${enable_pulse}" = "yes"], [
AC_MSG_ERROR([Xlib is required for VLC PulseAudio support
(see http://www.pulseaudio.org/ticket/799 for further reference).])
])
], [
PKG_ENABLE_MODULES_VLC([PULSE], [], [libpulse >= 0.9.11], [Pulseaudio support], [auto])
VLC_ADD_LIBS([pulse], [${X_LIBS} ${X_PRE_LIBS} -lX11])
dnl
dnl Portaudio module
dnl
PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library support], [auto])
PKG_ENABLE_MODULES_VLC([ALSA], [alsa access_alsa], [alsa >= 1.0.0], [Alsa sound support for linux], [auto])
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 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 CyberLink for C++ UPnP stack
dnl
AC_ARG_ENABLE(cyberlink,
[ --enable-cyberlink CyberLink for C++ UPnP stack (default disabled)])
AS_IF([test "${enable_cyberlink}" = "yes" ], [
AC_ARG_WITH(cyberlink-tree,
[ --with-cyberlink-tree=PATH CyberLink for C++ tree for static linking])
dnl
dnl test for --with-cyberlink-tree
dnl
AS_IF([test ! -z "${with_cyberlink_tree}" -a "${CXX}" != ""], [
AC_LANG_PUSH(C++)
real_cyberlink_tree="`cd ${with_cyberlink_tree} 2>/dev/null && pwd`"
AS_IF([test -z "${real_cyberlink_tree}"], [
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_cyberlink_tree}])
])
CPPFLAGS_save="${CPPFLAGS}"
CPPFLAGS_cyberlink="-I${real_cyberlink_tree}/include"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_cyberlink}"
AC_CHECK_HEADERS([cybergarage/upnp/MediaServer.h],
[ VLC_ADD_CXXFLAGS([upnp_cc], [${CPPFLAGS_cyberlink}])
],[
AC_MSG_ERROR([cannot find CyberLink for C++ headers])
])
AC_MSG_CHECKING(for libclink.a in ${with_cyberlink_tree})
AS_IF([test -f "${real_cyberlink_tree}/lib/unix/libclink.a"], [
AC_MSG_RESULT(${real_cyberlink_tree}/lib/unix/libclink.a)
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
dnl The mere fact that we have to make such an ugly check sucks
AC_MSG_CHECKING(for XML parser to link CyberLink with)
LIBS_save="$LIBS"
LIBS_cclink="no"
for l in "`xml2-config --libs`" -lexpat -lxerces-c; do
LIBS="$LIBS_save ${real_cyberlink_tree}/lib/unix/libclink.a -lpthread $l"
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <cybergarage/upnp/media/player/MediaPlayer.h>
using namespace CyberLink;
class testclass : public SearchResponseListener, public MediaPlayer
{
virtual void deviceSearchResponseReceived( SSDPPacket *)
{
}
public:
testclass (void)
{
addSearchResponseListener (this);
start ();
}
};
],[testclass l;])],[LIBS_cclink="$l"])
done
LIBS="${LIBS_save}"
dnl should not happen - otherwise this needs fixing - hence FAILURE
[AC_MSG_FAILURE([cannot find XML parser for CyberLink])])
AC_MSG_RESULT([${LIBS_cclink}])
VLC_ADD_LIBS([upnp_cc], [${real_cyberlink_tree}/lib/unix/libclink.a -lpthread ${LIBS_cclink}])
AC_MSG_ERROR([cannot find ${real_cyberlink_tree}/lib/unix/libclink.a, make sure you compiled CyberLink for C++ in ${with_cyberlink_tree}])
])
CPPFLAGS="${CPPFLAGS_save}"
dnl
dnl UPnP Plugin (Intel SDK)
dnl
PKG_ENABLE_MODULES_VLC([UPNP], [upnp_intel], [libupnp], [Intel UPnp SDK],[auto])
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}" = "yes" ||
(test "${SYS}" != "darwin" && test "${SYS}" != "beos" &&
test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no"); 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 -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_PLUGIN([qt4])
ALIASES="${ALIASES} qvlc"
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin"], [
VLC_ADD_LIBS([qt4],[$QT4_LIBS ${X_LIBS} ${X_PRE_LIBS} -lX11])
VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS ${X_CFLAGS}])
VLC_ADD_LIBS([qt4],[$QT4_LIBS -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") ])