Newer
Older
AC_MSG_CHECKING(for a52.h in ${real_a52_tree}/include)
if test -f ${real_a52_tree}/include/a52.h
then
AC_MSG_RESULT(yes)
VLC_ADD_CPPFLAGS([a52tofloat32],[-I${real_a52_tree}])
VLC_ADD_LDFLAGS([a52tofloat32],[-L${real_a52_tree}/liba52/.libs])
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
VLC_ADD_BUILTINS([a52tofloat32])
VLC_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
VLC_ADD_LDFLAGS([a52tofloat32],[-la52])
Samuel Hocevar
committed
AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
])
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have a52.h])
fi
Samuel Hocevar
committed
LDFLAGS_test=""
CPPFLAGS_test=""
Samuel Hocevar
committed
LDFLAGS_test="-L${with_a52}/lib"
CPPFLAGS_test="-I${with_a52}/include"
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_test} ${LDFLAGS_a52tofloat32}"
AC_CHECK_HEADERS(a52dec/a52.h, [
VLC_ADD_PLUGINS([a52tofloat32])
VLC_ADD_LDFLAGS([a52tofloat32],[${LDFLAGS_test} -la52])
VLC_ADD_CPPFLAGS([a52tofloat32],[${CPPFLAGS_test}])
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],
[
VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ])
dnl
dnl DTS Coherent Acoustics decoder plugin
dnl
AC_ARG_ENABLE(dts,
[ --enable-dts DTS Coherent Acoustics support with libdca (default enabled)])
if test "${with_dts_tree}" != "no" -a -n "${with_dts_tree}"
then
real_dts_tree="`cd ${with_dts_tree} 2>/dev/null && pwd`"
if test -z "${real_dts_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_dts_tree} directory doesn't exist])
fi
AC_MSG_CHECKING(for dts.h in ${real_dts_tree}/include)
if test -f ${real_dts_tree}/include/dts.h
then
AC_MSG_RESULT(yes)
VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dts_tree}/include])
VLC_ADD_LDFLAGS([dtstofloat32],[-L${real_dts_tree}/libdts])
AC_CHECK_LIB(dts_pic, dts_free, [
VLC_ADD_PLUGINS([dtstofloat32])
VLC_ADD_LDFLAGS([dtstofloat32],[-ldts_pic])
AC_CHECK_LIB(dts, dts_free, [
VLC_ADD_BUILTINS([dtstofloat32])
VLC_ADD_LDFLAGS([dtstofloat32],[-ldts])
],[
if test -f ${real_dts_tree}/libdts/libdts.a
then
AC_MSG_ERROR([make sure you have at least libdts-0.0.2])
else
AC_MSG_ERROR([the specified tree hasn't been compiled])
fi
])
])
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have dts.h])
fi
else
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_dtstofloat32}"
AC_CHECK_LIB(dts, dts_free, [
VLC_ADD_BUILTINS([dtstofloat32])
VLC_ADD_LDFLAGS([dtstofloat32],[-ldts])
],[
if test "${enable_dts}" = "yes"; then
AC_MSG_ERROR([Could not find libdts on your system: you may get it from http://www.videolan.org/dtsdec.html])
fi
])
LDFLAGS="${LDFLAGS_save}"
dnl
dnl
AC_ARG_ENABLE(flac,
then
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
AC_ARG_WITH(flac-tree,
[ --with-flac-tree=PATH flac tree for static linking])
if test -n "${with_flac_tree}"
then
AC_MSG_CHECKING(for libFLAC.a in ${with_flac_tree})
real_flac_tree="`cd ${with_flac_tree} 2>/dev/null && pwd`"
if test -z "${real_flac_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_flac_tree}])
fi
if test -f "${real_flac_tree}/src/libFLAC/.libs/libFLAC.a"
then
dnl Use a custom flac
AC_MSG_RESULT(${real_flac_tree}/src/libFLAC/.libs/libFLAC.a)
VLC_ADD_LDFLAGS([flacdec],[${real_flac_tree}/src/libFLAC/.libs/libFLAC.a])
VLC_ADD_CFLAGS([flacdec],[-I${real_flac_tree}/include])
AC_DEFINE(HAVE_FLAC_STREAM_DECODER_H, 1, [Define if you have FLAC])
else
dnl The given flac wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_flac_tree}/src/libFLAC/.libs/libFLAC.a, make sure you compiled flac in ${with_flac_tree}])
fi
else
AC_CHECK_HEADERS(FLAC/stream_decoder.h, [
VLC_ADD_LDFLAGS([flacdec],[-lFLAC])
],[])
fi
Samuel Hocevar
committed
fi
AC_ARG_WITH(libmpeg2-tree,
[ --with-libmpeg2-tree=PATH libmpeg2 tree for static linking])
then
AC_MSG_CHECKING(for libmpeg2.a in ${with_libmpeg2_tree})
real_libmpeg2_tree="`cd ${with_libmpeg2_tree} 2>/dev/null && pwd`"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_libmpeg2_tree}])
fi
if test -f "${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a"
then
dnl Use a custom libmpeg2
AC_MSG_RESULT(${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a)
Christophe Massiot
committed
VLC_ADD_BUILTINS([libmpeg2])
VLC_ADD_LDFLAGS([libmpeg2],[-L${real_libmpeg2_tree}/libmpeg2/.libs -lmpeg2])
VLC_ADD_CFLAGS([libmpeg2],[-I${real_libmpeg2_tree}/include])
eval "`cd ${real_libmpeg2_tree}/include && ln -sf . mpeg2dec 2>/dev/null`"
else
dnl The given libmpeg2 wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_libmpeg2_tree}/libmpeg2/.libs/libmpeg2.a, make sure you compiled libmpeg2 in ${with_libmpeg2_tree}])
fi
else
AC_CHECK_HEADERS(mpeg2dec/mpeg2.h, [
AC_MSG_CHECKING(for libmpeg2 version >= 0.3.2)
AC_EGREP_CPP(yes,
[#include <mpeg2dec/mpeg2.h>
#ifdef MPEG2_RELEASE
#if MPEG2_RELEASE >= MPEG2_VERSION(0,3,2)
yes
#endif
#endif],
[AC_MSG_RESULT([yes])
VLC_ADD_PLUGINS([libmpeg2])
VLC_ADD_LDFLAGS([libmpeg2],[-lmpeg2])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([Your libmpeg2 is too old (you need the cvs version): you may get a more recent one from http://libmpeg2.sf.net/. Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])])],
[AC_MSG_ERROR([Could not find libmpeg2 on your system: you may get it from http://libmpeg2.sf.net/ (you need the cvs version). Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.])]
)
fi
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
AC_ARG_WITH(vorbis-tree,
[ --with-vorbis-tree=PATH vorbis tree for static linking])
if test -n "${with_vorbis_tree}"
then
AC_MSG_CHECKING(for libvorbis.a in ${with_vorbis_tree})
real_vorbis_tree="`cd ${with_vorbis_tree} 2>/dev/null && pwd`"
if test -z "${real_vorbis_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_vorbis_tree}])
fi
if test -f "${real_vorbis_tree}/lib/.libs/libvorbis.a"
then
dnl Use a custom vorbis
AC_MSG_RESULT(${real_vorbis_tree}/lib/.libs/libvorbis.a)
VLC_ADD_PLUGINS([vorbis])
VLC_ADD_LDFLAGS([vorbis],[${real_vorbis_tree}/lib/.libs/libvorbis.a ${real_vorbis_tree}/lib/.libs/libvorbisenc.a])
VLC_ADD_CFLAGS([vorbis],[-I${real_vorbis_tree}/include])
else
dnl The given vorbis wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_vorbis_tree}/lib/.libs/libvorbis.a, make sure you compiled vorbis in ${with_vorbis_tree}])
fi
else
AC_CHECK_HEADERS(vorbis/codec.h, [
VLC_ADD_PLUGINS([vorbis])
VLC_ADD_LDFLAGS([vorbis],[-lvorbis -logg]) ],[])
AC_CHECK_HEADERS(vorbis/vorbisenc.h, [
VLC_ADD_LDFLAGS([vorbis],[-lvorbisenc]) ],[])
fi
dnl
dnl Tremor plugin
dnl
AC_ARG_ENABLE(tremor,
[ --enable-tremor Tremor decoder support (default disabled)])
VLC_ADD_PLUGINS([tremor])
VLC_ADD_LDFLAGS([tremor],[-lvorbisidec -logg])
[ --enable-speex Speex decoder support (default enabled)])
AC_ARG_WITH(speex-tree,
[ --with-speex-tree=PATH speex tree for static linking])
if test -n "${with_speex_tree}"
then
AC_MSG_CHECKING(for libspeex.a in ${with_speex_tree})
real_speex_tree="`cd ${with_speex_tree} 2>/dev/null && pwd`"
if test -z "${real_speex_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_speex_tree}])
fi
if test -f "${real_speex_tree}/libspeex/.libs/libspeex.a"
then
dnl Use a custom speex
AC_MSG_RESULT(${real_speex_tree}/libspeex/.libs/libspeex.a)
VLC_ADD_PLUGINS([speex])
VLC_ADD_LDFLAGS([speex],[${real_speex_tree}/libspeex/.libs/libspeex.a])
VLC_ADD_CFLAGS([speex],[-I${real_speex_tree}/include])
else
dnl The given speex wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_speex_tree}/libspeex/.libs/libspeex.a, make sure you compiled speex in ${with_speex_tree}])
fi
else
AC_CHECK_HEADERS(speex/speex.h, [
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_speex}"
AC_CHECK_LIB(speex, speex_decode_int, [
VLC_ADD_PLUGINS([speex])
VLC_ADD_LDFLAGS([speex],[-lspeex]) ],
[ AC_MSG_RESULT([no])
AC_MSG_WARN([Your libspeex is too old, please get the development
version.]) ],[])
LDFLAGS="${LDFLAGS_save}"
],[])
fi
dnl
dnl tarkin decoder plugin
dnl
AC_ARG_ENABLE(tarkin,
[ --enable-tarkin experimental tarkin codec (default disabled)])
then
AC_ARG_WITH(tarkin-tree,
[ --with-tarkin-tree=PATH tarkin tree for static linking])
then
AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
if test -f "${real_tarkin_tree}/tarkin.o"
then
VLC_ADD_BUILTINS([tarkin])
VLC_ADD_CPPFLAGS([tarkin],[-I${real_tarkin_tree}])
VLC_ADD_LDFLAGS([tarkin],[${real_tarkin_tree}/mem.o ${real_tarkin_tree}/pnm.o ${real_tarkin_tree}/wavelet.o ${real_tarkin_tree}/wavelet_xform.o ${real_tarkin_tree}/wavelet_coeff.o ${real_tarkin_tree}/yuv.o ${real_tarkin_tree}/tarkin.o ${real_tarkin_tree}/info.o -logg])
else
dnl The given tarkin tree wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_tarkin_tree}/tarkin.o,
make sure you compiled tarkin in ${with_tarkin_tree}])
fi
fi
fi
dnl
dnl theora decoder plugin
dnl
AC_ARG_ENABLE(theora,
[ --enable-theora experimental theora codec (default disabled)])
AC_CHECK_LIB(theora, theora_granule_time, [
VLC_ADD_LDFLAGS([theora],[${theora_libs}]) ],[
AC_MSG_ERROR([libtheora 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.])],
[-logg])
])
fi
dnl
dnl dirac decoder plugin
dnl
AC_ARG_ENABLE(dirac,
[ --enable-dirac experimental dirac codec (default disabled)])
if test "${enable_dirac}" = "yes"; then
VLC_ADD_PLUGINS([dirac])
VLC_ADD_CFLAGS([dirac],[$DIRAC_CFLAGS])
VLC_ADD_LDFLAGS([dirac],[$DIRAC_LIBS -lstdc++]) ],[
AC_MSG_ERROR([libdirac doesn't appear to be installed on you system.])
])
fi
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_LDFLAGS([png],[-lpng -lz])
VLC_ADD_PLUGINS([png])

Jean-Paul Saman
committed
VLC_ADD_PLUGINS([osdmenu])
AC_DEFINE(HAVE_LIBPNG, [], [Define if you have the PNG library: libpng])],
[],[-lz])
LDFLAGS="${LDFLAGS_save}"
])
fi
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_LDFLAGS([x264],[-L${real_x264_tree}])
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_x264} ${THREAD_LIB}"
AC_CHECK_LIB(x264, x264_encoder_open, [
VLC_ADD_BUILTINS([x264])
VLC_ADD_LDFLAGS([x264],[-lx264])
],[
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
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_x264} ${THREAD_LIB}"
AC_CHECK_HEADERS(x264.h, [
AC_CHECK_LIB(x264, x264_encoder_open, [
VLC_ADD_PLUGINS([x264])
VLC_ADD_LDFLAGS([x264],[-lx264])
],[
if test "${enable_x264}" = "yes"; then
AC_MSG_ERROR([Could not find libx264 on your system: you may get it from http://www.videolan.org/x264.html])
fi
])
])
LDFLAGS="${LDFLAGS_save}"
fi
fi
dnl
dnl CMML plugin
dnl
AC_ARG_ENABLE(cmml,
[ --enable-cmml CMML support (default enabled)])
if test "${enable_cmml}" != "no"
then
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
AC_CHECK_HEADERS(X11/extensions/dpms.h, [
AC_MSG_CHECKING(for DPMSInfo in X11/extensions/dpms.h)
AC_EGREP_HEADER(DPMSInfo,X11/extensions/dpms.h,[
AC_MSG_RESULT(yes)
AC_DEFINE(DPMSINFO_IN_DPMS_H, 1,
Define if <X11/extensions/dpms.h> defines DPMSInfo.)
],[
AC_MSG_RESULT(no)
])
],,[
#include <X11/Xlib.h>
])
CPPFLAGS="${CPPFLAGS_save}"
fi
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_x11}" = "yes"); then
CPPFLAGS="${CPPFLAGS_save} ${X_FLAGS}"
VLC_ADD_LDFLAGS([x11],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext])
VLC_ADD_CPPFLAGS([x11],[${X_CFLAGS}])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
fi
dnl
dnl XVideo module
dnl (enabled by default except on win32)
dnl
AC_ARG_ENABLE(xvideo,
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_xvideo}" = "yes"); then
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext"
AC_CHECK_LIB(Xv,XvPutImage,[
# If libXv.so is available, xvideo can be a plugin. Otherwise, we
# test for libXv_pic.
if test -f /usr/X11R6/lib/libXv.so -o -f /usr/lib/libXv.so -o -f "${x_libraries}"/libXv.so; then
VLC_ADD_CPPFLAGS([xvideo],[${X_CFLAGS}])
VLC_ADD_LDFLAGS([xvideo],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXv])
VLC_ADD_CPPFLAGS([xvideo],[${X_CFLAGS}])
VLC_ADD_LDFLAGS([xvideo],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXv_pic])
VLC_ADD_LDFLAGS([xvideo],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXv])
VLC_ADD_CPPFLAGS([xvideo],[${X_CFLAGS}])
Samuel Hocevar
committed
CFLAGS="${CFLAGS_save}"
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}")
dnl
dnl GLX module
dnl (enabled by default except on win32)
dnl
AC_ARG_ENABLE(glx,
[ --enable-glx X11 OpenGL (GLX) support (default enabled)])
if test "${enable_glx}" != "no" &&
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_glx}" = "yes"); then
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h, [
VLC_ADD_PLUGINS([glx])
VLC_ADD_LDFLAGS([glx],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lGL -lGLU])
VLC_ADD_CPPFLAGS([glx],[${X_CFLAGS}])
CPPFLAGS="${CPPFLAGS_save}"
fi

Rémi Denis-Courmont
committed
dnl
dnl Check for the Xinerama extension
dnl
AC_ARG_ENABLE(xinerama,
[ --enable-xinerama Xinerama support (default enabled)])
if test "${enable_xvideo}" != "no" && test "${enable_xinerama}" != "no" &&
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_xvideo}" = "yes"); then
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext"
AC_CHECK_HEADERS(X11/extensions/Xinerama.h,[
AC_CHECK_LIB(Xinerama_pic, XineramaQueryExtension,[
VLC_ADD_LDFLAGS([xvideo],[-lXinerama_pic])
VLC_ADD_LDFLAGS([x11],[-lXinerama_pic])
VLC_ADD_LDFLAGS([glx],[-lXinerama_pic])
ac_cv_have_xinerama="yes"
],[
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,[
VLC_ADD_LDFLAGS([xvideo],[-lXinerama])
VLC_ADD_LDFLAGS([x11],[-lXinerama])
VLC_ADD_LDFLAGS([glx],[-lXinerama])
ac_cv_have_xinerama="yes"
])
])
])
if test "${ac_cv_have_xinerama}" = "yes"; then
AC_DEFINE(HAVE_XINERAMA, 1, [Define this if you have libXinerama installed])
fi
CFLAGS="${CFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"

Rémi Denis-Courmont
committed
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
dnl
dnl Check for XF86VidMode extension
dnl
ac_cv_have_xf86vidmode="no"
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext"
AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,[
AC_CHECK_LIB(Xxf86vm_pic, XF86VidModeGetViewPort,[
VLC_ADD_LDFLAGS([xvideo],[-lXxf86vm_pic])
VLC_ADD_LDFLAGS([x11],[-lXxf86vm_pic])
VLC_ADD_LDFLAGS([glx],[-lXxf86vm_pic])
ac_cv_have_xf86vidmode="yes"
],[
AC_CHECK_LIB(Xxf86vm, XF86VidModeGetViewPort,[
VLC_ADD_LDFLAGS([xvideo],[-lXxf86vm])
VLC_ADD_LDFLAGS([x11],[-lXxf86vm])
VLC_ADD_LDFLAGS([glx],[-lXxf86vm])
ac_cv_have_xf86vidmode="yes"
])
])
],[true],
[#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
#endif]
)
AS_IF([test "${ac_cv_have_xf86vidmode}" = "yes"],
[AC_DEFINE(HAVE_XF86VIDMODE, 1, [Define this if you have libXxf86vm installed])
])
CFLAGS="${CFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
dnl
dnl OpenGL module
dnl (enabled by default except on beos)
dnl
AC_ARG_ENABLE(opengl,
[ --enable-opengl OpenGL support (default enabled)])
if test "${enable_opengl}" != "no" &&
test "${SYS}" != "beos" -a "${SYS}" != "mingwce"; then
if test "${SYS}" != "darwin"; then
bigben
committed
AC_CHECK_HEADERS(GL/gl.h GL/glu.h, [
VLC_ADD_PLUGINS([opengl])
if test "${SYS}" != "mingw32"; then
VLC_ADD_LDFLAGS([opengl],[${X_LIBS} -lGL -lGLU])
bigben
committed
VLC_ADD_LDFLAGS([opengl],[-lopengl32 -lglu32])
fi
])
else
dnl OS X special case (no GL/gl.h but OpenGL/gl.h)
VLC_ADD_PLUGINS([opengl])
VLC_ADD_LDFLAGS([opengl],[-framework OpenGL])
fi
fi
SDL_PATH="${PATH}"
AC_ARG_WITH(sdl-config-path,
[ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
then
SDL_PATH="${with_sdl_config_path}:${PATH}"
fi ])
AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
SDL_CONFIG="${SDL12_CONFIG}"
SDL_HEADER="SDL12/SDL.h"
Christophe Massiot
committed
SDL_IMAGE="SDL12/SDL_image.h"
AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
Christophe Massiot
committed
SDL_IMAGE="SDL11/SDL_image.h"
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
SDL_HEADER="SDL/SDL.h"
Christophe Massiot
committed
SDL_IMAGE="SDL/SDL_image.h"
# check for cross-compiling
SDL_PREFIX=
AC_ARG_WITH(sdl-prefix,
[ --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
e.g use as:
--with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
if test "${with_sdl_prefix}" != "no" -a -n "${with_sdl_prefix}"
then
SDL_PREFIX="--prefix=${with_sdl_prefix}"
fi
# SDL on Darwin is heavily patched and can only run SDL_image
Christophe Massiot
committed
if test "${SYS}" != "darwin" -a "${SYS}" != "mingw32"; then
VLC_ADD_PLUGINS([vout_sdl aout_sdl])
fi
Christophe Massiot
committed
VLC_ADD_CFLAGS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} ${SDL_PREFIX} --cflags | sed 's,SDL,,'`])
VLC_ADD_LDFLAGS([vout_sdl aout_sdl sdl_image],[`${SDL_CONFIG} ${SDL_PREFIX} --libs | sed 's,-rdynamic,,'`])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_vout_sdl}"
AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
<${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
gbazin
committed
[ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
As a last resort we also test for SDL.h presence),
Samuel Hocevar
committed
[ AC_MSG_ERROR([The development package for SDL is not installed.
Please install it and try again. Alternatively you can also configure with
--disable-sdl.])
gbazin
committed
])])
Christophe Massiot
committed
AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE,
<${SDL_IMAGE}>, Indicate the path of SDL_image.h)
VLC_ADD_PLUGINS([sdl_image])
Christophe Massiot
committed
AC_CHECK_LIB(png, png_set_rows,
[VLC_ADD_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz])
AC_CHECK_LIB(jpeg, jpeg_start_decompress,
[VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])])
AC_CHECK_LIB(tiff, TIFFClientOpen,
[VLC_ADD_LDFLAGS([sdl_image],[-ltiff])])
Christophe Massiot
committed
VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])],
[ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>,
As a last resort we also test for SDL_image.h presence),
[ AC_MSG_WARN([The development package for SDL_image is not installed.
You should install it alongside your SDL package.])
])])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
AC_MSG_ERROR([The development package for SDL is not installed.
Please install it and try again. Alternatively you can also configure with
--disable-sdl.])
Christophe Massiot
committed
AC_MSG_ERROR([I couldn't find the SDL package. You can download libSDL
from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
])
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)])
then
FREETYPE_PATH="${PATH}"
AC_ARG_WITH(freetype-config-path,
[ --with-freetype-config-path=PATH freetype-config path (default search in \$PATH)],
[ if test "${with_freetype_config_path}" != "no"
then
FREETYPE_PATH="${with_freetype_config_path}:${PATH}"
fi ])
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no, ${FREETYPE_PATH})
VLC_ADD_CFLAGS([freetype],[`${FREETYPE_CONFIG} --cflags`])
VLC_ADD_LDFLAGS([freetype],[`${FREETYPE_CONFIG} --libs`])
AC_CHECK_HEADERS(Carbon/Carbon.h,
[VLC_ADD_LDFLAGS([freetype],[-framework Carbon])])
then
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.
])
fi
FRIBIDI_PATH="${PATH}"
AC_ARG_WITH(fribidi-config-path,
[ --with-fribidi-config-path=PATH fribidi-config path (default search in \$PATH)],
[ if test "${with_fribidi_config_path}" != "no"
then
FRIBIDI_PATH="${with_fribidi_config_path}:${PATH}"
fi ])
AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config, no, ${FRIBIDI_PATH})
if test "${FRIBIDI_CONFIG}" != "no"
then
VLC_ADD_CFLAGS([freetype], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
VLC_ADD_CPPFLAGS([skins2], [`${FRIBIDI_CONFIG} --cflags` -DHAVE_FRIBIDI])
VLC_ADD_LDFLAGS([freetype], [`${FRIBIDI_CONFIG} --libs`])
VLC_ADD_LDFLAGS([skins2], [`${FRIBIDI_CONFIG} --libs`])
fi
dnl
dnl libxml2 module
dnl
AC_ARG_ENABLE(libxml2,
[ --enable-libxml2 libxml2 support (default enabled)])
if test "${enable_libxml2}" != "no"
then
XML2_PATH="${PATH}"
AC_ARG_WITH(xml2-config-path,
[ --with-xml2-config-path=PATH xml2-config path (default search in \$PATH)],
[ if test "${with_xml2_config_path}" != "no"; then
XML2_PATH="${with_xml2_config_path}:${PATH}"
fi ])
AC_PATH_PROG(XML2_CONFIG, xml2-config, no, ${XML2_PATH})
if test "${XML2_CONFIG}" != "no"; then
VLC_ADD_CPPFLAGS([xml],[`${XML2_CONFIG} --cflags`])
VLC_ADD_LDFLAGS([xml],[`${XML2_CONFIG} --libs`])
dnl depends on the xmlTextReader extension
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xml}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xml}"
AC_CHECK_LIB(xml2,xmlTextReaderConstName,[
AC_EGREP_HEADER(xmlTextReaderConstName,libxml/xmlreader.h,[
VLC_ADD_PLUGINS([xml]) ],[
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension])
fi])
],[
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension])
fi])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
else
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([Could not find libxml2])
fi
fi
fi
dnl
dnl SVG module
dnl
AC_ARG_ENABLE(svg,
[ --enable-svg SVG support (default disabled)])
if test "${enable_svg}" = "yes"
then
PKG_CHECK_MODULES(SVG,
librsvg-2.0 >= 2.9.0,
VLC_ADD_LDFLAGS([svg],[$SVG_LIBS])
VLC_ADD_CFLAGS([svg],[$SVG_CFLAGS])
VLC_ADD_PLUGINS([svg]) ],
[AC_MSG_WARN(SVG library not found)])
fi
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
VLC_ADD_PLUGINS([snapshot])
fi

Jean-Paul Saman
committed
dnl
dnl Qt Embedded module

Jean-Paul Saman
committed
dnl (disabled by default)
dnl
AC_ARG_ENABLE(qte,
[ --enable-qte QT Embedded support (default disabled)])

Jean-Paul Saman
committed
then
AC_ARG_WITH(qte,
[ --with-qte=PATH Qt Embedded headers and libraries])

Jean-Paul Saman
committed
then
VLC_ADD_LDFLAGS([qte],[-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
VLC_ADD_CXXFLAGS([qte],[-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])

Jean-Paul Saman
committed
else
VLC_ADD_LDFLAGS([qte],[-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
VLC_ADD_CXXFLAGS([qte],[-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])

Jean-Paul Saman
committed
NEED_QTE_MAIN=yes
CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}"
AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
] )
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"

Jean-Paul Saman
committed
fi

Jean-Paul Saman
committed
dnl
dnl Qt Video output module
dnl (disabled by default)
dnl
dnl AC_ARG_ENABLE(qt_video,
dnl [ --enable-qt_video QT Video Output support (default disabled)])
dnl if test "${enable_qt_video}" = "yes"
dnl then
dnl VLC_ADD_PLUGINS([qt_video])
dnl VLC_ADD_LDFLAGS([qt_video],[-L${QTDIR}/lib])

Jean-Paul Saman
committed
dnl LDFLAGS="${LDFLAGS_save} ${LDFLAGS_qt_video}"
dnl AC_CHECK_LIB(qt-mt,main,[

Jean-Paul Saman
committed
dnl ],[
dnl AC_CHECK_LIB(qt,main,[

Jean-Paul Saman
committed
dnl ])
dnl ])
dnl NEED_QTE_MAIN=yes
dnl LDFLAGS="${LDFLAGS_save}"
dnl VLC_ADD_CXXFLAGS([qt_video],[-I/usr/include/qt3 -I/usr/include/qt -I${QTDIR}/include])

Jean-Paul Saman
committed
dnl fi
dnl
dnl Roku HD1000 Video output module
dnl
AC_ARG_ENABLE(hd1000v,

Jean-Paul Saman
committed
[ --enable-hd1000v HD1000 Video Output module (default enabled on HD1000)])
if test "${enable_hd1000v}" != "no" -a "${CXX}" != "" &&
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_hd1000v}" = "yes"); then
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([cascade/graphics/CascadeScreen.h cascade/graphics/CascadeBitmap.h],
[
can_build_roku="yes"
],
[
can_build_roku="no"
AC_MSG_WARN([Not building Roku HD1000 compatible video output])
])
if test "$can_build_roku" = "yes"
then
VLC_ADD_PLUGINS([hd1000v])
VLC_ADD_LDFLAGS([hd1000v],[-lCascade -ldvbpsi -lmad])
AC_ARG_ENABLE(directx,
if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce" -o "${SYS}" = "cygwin"
Samuel Hocevar
committed
AC_ARG_WITH(directx,
[ VLC_ADD_PLUGINS([vout_directx aout_directx])
VLC_ADD_LDFLAGS([vout_directx],[-lgdi32])
])
AC_CHECK_HEADERS(GL/gl.h,
[ VLC_ADD_PLUGINS([glwin32])
VLC_ADD_LDFLAGS([glwin32],[-lopengl32 -lgdi32])
])
AC_CHECK_HEADERS(d3d9.h,
[ VLC_ADD_PLUGINS([direct3d])
VLC_ADD_LDFLAGS([direct3d],[-ld3d9 -lgdi32])
])
AC_MSG_CHECKING(for directX headers in ${with_directx})
if test -f ${with_directx}/ddraw.h
VLC_ADD_PLUGINS([vout_directx aout_directx])
VLC_ADD_CPPFLAGS([vout_directx aout_directx],[-I${with_directx}])
VLC_ADD_LDFLAGS([vout_directx],[-lgdi32])
AC_MSG_ERROR([Cannot find ${with_directx}/ddraw.h!])
AC_ARG_ENABLE(fb,
[ --enable-fb Linux framebuffer support (default enabled on Linux)])
AC_ARG_ENABLE(mga,
[ --enable-mga Linux kernel Matrox support (default disabled)],
dnl
dnl SVGAlib module
dnl
AC_ARG_ENABLE(svgalib,
[ --enable-svgalib SVGAlib support (default disabled)])
then
VLC_ADD_PLUGINS([svgalib])
VLC_ADD_LDFLAGS([svgalib],[-lvgagl -lvga])
fi

Jean-Paul Saman
committed
dnl
dnl DirectFB module
dnl
AC_ARG_ENABLE(directfb,