Skip to content
Snippets Groups Projects
configure.ac 189 KiB
Newer Older
  AC_ARG_WITH(twolame-tree,
  [    --with-twolame-tree=PATH twolame tree for static linking])
  if test -n "${with_twolame_tree}"
    AC_MSG_CHECKING(for libtwolame.a in ${with_twolame_tree})
    real_twolame_tree="`cd ${with_twolame_tree} 2>/dev/null && pwd`"
    if test -z "${real_twolame_tree}"
    then
      dnl  The given directory can't be found
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([cannot cd to ${with_twolame_tree}])
    if test -f "${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a"
      dnl  Use a custom twolame
      AC_MSG_RESULT(${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a)
      VLC_ADD_BUILTINS([twolame])
      VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a])
      VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame])
      AC_MSG_ERROR([cannot find ${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame}"
    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_twolame}"
    AC_CHECK_HEADERS(twolame.h, ,
      [ AC_MSG_ERROR([Cannot find development header for libtwolame...]) ])
    AC_CHECK_LIB(twolame, twolame_init, [
      VLC_ADD_PLUGINS([twolame])
      VLC_ADD_LDFLAGS([twolame],[-ltwolame]) ],
        [ AC_MSG_ERROR([Cannot find libtwolame library...]) ])
    LDFLAGS="${LDFLAGS_save}"  
dnl
dnl  QuickTime plugin
dnl
AC_ARG_ENABLE(quicktime,
  [  --enable-quicktime      QuickTime module (default enabled on MacOS X)])
if test "${enable_quicktime}" != "no" &&
  (test "${SYS}" = "darwin" || test "${enable_quicktime}" = "yes")
gbazin's avatar
 
gbazin committed
  if test "${SYS}" = "mingw32"; then
    VLC_ADD_BUILTINS([quicktime])
gbazin's avatar
 
gbazin committed
  else
  AC_CHECK_HEADERS(QuickTime/QuickTime.h,
    [ VLC_ADD_BUILTINS([quicktime])
      VLC_ADD_LDFLAGS([quicktime],[-framework QuickTime -framework Carbon])
hartman's avatar
hartman committed
    ], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
gbazin's avatar
 
gbazin committed
  fi
dnl
dnl  Real plugin
dnl
AC_ARG_ENABLE(real,
  [  --enable-real           Real audio module (default disabled)])
if test "${enable_real}" = "yes"; then
  VLC_ADD_PLUGINS([realaudio])
fi

dnl
dnl  Real RTSP plugin
dnl
AC_ARG_ENABLE(realrtsp,
  [  --enable-realrtsp       Real RTSP module (default disabled)])
if test "${enable_realrtsp}" = "yes"; then
  VLC_ADD_PLUGINS([access_realrtsp])
fi

AC_CHECK_HEADERS(zlib.h, [
  VLC_ADD_LDFLAGS([mp4 skins2 sap mkv gme],[-lz])
ipkiss's avatar
ipkiss committed
dnl skins2 module
dnl
AC_CHECK_HEADERS(libtar.h, [
ipkiss's avatar
ipkiss committed
  VLC_ADD_LDFLAGS([skins2],[-ltar])
gbazin's avatar
 
gbazin committed
dnl
gbazin's avatar
 
gbazin committed
dnl A52/AC3 decoder plugin
gbazin's avatar
 
gbazin committed
dnl
gbazin's avatar
 
gbazin committed
AC_ARG_ENABLE(a52,
  [  --enable-a52            A/52 support with liba52 (default enabled)])
if test "${enable_a52}" != "no"
gbazin's avatar
 
gbazin committed
then
    [    --with-a52=PATH       a52 headers and libraries])
gbazin's avatar
 
gbazin committed
  AC_ARG_WITH(a52-tree,
    [    --with-a52-tree=PATH  a52dec tree for static linking ],[],[])
Samuel Hocevar's avatar
Samuel Hocevar committed
  if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
gbazin's avatar
 
gbazin committed
  then
gbazin's avatar
 
gbazin committed
    real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
Samuel Hocevar's avatar
Samuel Hocevar committed
    if test -z "${real_a52_tree}"
gbazin's avatar
 
gbazin committed
    then
      dnl  The given directory can't be found
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([${with_a52_tree} directory doesn't exist])
    fi
    dnl  Use a custom a52dec
    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}"
gbazin's avatar
 
gbazin committed
      AC_CHECK_LIB(a52, a52_free, [
        VLC_ADD_BUILTINS([a52tofloat32])
        VLC_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
        VLC_ADD_LDFLAGS([a52tofloat32],[-la52])
gbazin's avatar
 
gbazin committed
        ],[
        if test -f ${real_a52_tree}/liba52/.libs/liba52.a
        then
          AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
gbazin's avatar
 
gbazin committed
        else
          AC_MSG_ERROR([the specified tree hasn't been compiled])
        fi
gbazin's avatar
 
gbazin committed
    else
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([the specified tree doesn't have a52.h])
    fi
Samuel Hocevar's avatar
Samuel Hocevar committed
    if test -z "${with_a52}"
      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}"
gbazin's avatar
 
gbazin committed
      AC_CHECK_LIB(a52, a52_free, [
        VLC_ADD_PLUGINS([a52tofloat32])
        VLC_ADD_LDFLAGS([a52tofloat32],[${LDFLAGS_test} -la52])
        VLC_ADD_CPPFLAGS([a52tofloat32],[${CPPFLAGS_test}])
gbazin's avatar
 
gbazin committed
        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.])
gbazin's avatar
 
gbazin committed
    ])
    CPPFLAGS="${CPPFLAGS_save}"
    LDFLAGS="${LDFLAGS_save}"
gbazin's avatar
 
gbazin committed
  fi
gbazin's avatar
 
gbazin committed
fi

AC_ARG_WITH(a52-fixed,
      [    --with-a52-fixed      specify if liba52 has been compiled with fixed point support],
      [
        VLC_ADD_CPPFLAGS([a52tofloat32],[-DLIBA52_FIXED]) ])

gbazin's avatar
 
gbazin committed
dnl
dnl DTS Coherent Acoustics decoder plugin
dnl
AC_ARG_ENABLE(dts,
Felix Paul Kühne's avatar
Felix Paul Kühne committed
  [  --enable-dts            DTS Coherent Acoustics support with libdca (default enabled)])
gbazin's avatar
 
gbazin committed
if test "${enable_dts}" != "no"; then
  AC_ARG_WITH(dts-tree,
gbazin's avatar
 
gbazin committed
    [    --with-dts-tree=PATH  libdts tree for static linking ],[],[])
gbazin's avatar
 
gbazin committed
  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
gbazin's avatar
 
gbazin committed
    dnl  Use a custom libdts
gbazin's avatar
 
gbazin committed
    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])
gbazin's avatar
 
gbazin committed
      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_dtstofloat32}"
Samuel Hocevar's avatar
Samuel Hocevar committed
      AC_CHECK_LIB(dts_pic, dts_free, [
        VLC_ADD_PLUGINS([dtstofloat32])
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
        VLC_ADD_LDFLAGS([dtstofloat32],[-ldts_pic -lm])
gbazin's avatar
 
gbazin committed
        ],[
Samuel Hocevar's avatar
Samuel Hocevar committed
        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
        ])
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
      ], [-lm])
gbazin's avatar
 
gbazin committed
      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}"
gbazin's avatar
 
gbazin committed
    AC_CHECK_HEADERS(dts.h, [
Samuel Hocevar's avatar
Samuel Hocevar committed
      AC_CHECK_LIB(dts_pic, dts_free, [
        VLC_ADD_PLUGINS([dtstofloat32])
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
        VLC_ADD_LDFLAGS([dtstofloat32],[-ldts_pic -lm])
gbazin's avatar
 
gbazin committed
      ],[
Samuel Hocevar's avatar
Samuel Hocevar committed
        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
        ])
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
      ], [-lm])
gbazin's avatar
 
gbazin committed
    ])
gbazin's avatar
 
gbazin committed
  fi
fi

gbazin's avatar
 
gbazin committed
dnl  Flac plugin
gbazin's avatar
 
gbazin committed
  [  --enable-flac           flac decoder support (default disabled)])
if test "${enable_flac}" = "yes"
  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
gbazin's avatar
 
gbazin committed
dnl
dnl  Libmpeg2 plugin
dnl
AC_ARG_ENABLE(libmpeg2,
gbazin's avatar
 
gbazin committed
  [  --enable-libmpeg2       libmpeg2 decoder support (default enabled)])
if test "${enable_libmpeg2}" != "no"
gbazin's avatar
 
gbazin committed
then
  AC_ARG_WITH(libmpeg2-tree,
  [    --with-libmpeg2-tree=PATH libmpeg2 tree for static linking])
Samuel Hocevar's avatar
Samuel Hocevar committed
  if test -n "${with_libmpeg2_tree}"
  then
    AC_MSG_CHECKING(for libmpeg2.a in ${with_libmpeg2_tree})
    real_libmpeg2_tree="`cd ${with_libmpeg2_tree} 2>/dev/null && pwd`"
Samuel Hocevar's avatar
Samuel Hocevar committed
    if test -z "${real_libmpeg2_tree}"
    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)
      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
gbazin's avatar
 
gbazin committed
fi

gbazin's avatar
 
gbazin committed
dnl
dnl  Vorbis plugin
dnl
AC_ARG_ENABLE(vorbis,
gbazin's avatar
 
gbazin committed
  [  --enable-vorbis         Vorbis decoder support (default enabled)])
if test "${enable_vorbis}" != "no"
gbazin's avatar
 
gbazin committed
then
  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]) ],[])
gbazin's avatar
 
gbazin committed

    AC_CHECK_HEADERS(vorbis/vorbisenc.h, [
      VLC_ADD_LDFLAGS([vorbis],[-lvorbisenc]) ],[])
  fi
gbazin's avatar
 
gbazin committed
fi
gbazin's avatar
 
gbazin committed

gbazin's avatar
 
gbazin committed
dnl
dnl  Tremor plugin
dnl
AC_ARG_ENABLE(tremor,
  [  --enable-tremor         Tremor decoder support (default disabled)])
if test "${enable_tremor}" = "yes"
gbazin's avatar
 
gbazin committed
then
  AC_CHECK_HEADERS(tremor/ivorbiscodec.h, [
    VLC_ADD_PLUGINS([tremor])
    VLC_ADD_LDFLAGS([tremor],[-lvorbisidec -logg])
gbazin's avatar
 
gbazin committed
   ],[])
fi

gbazin's avatar
 
gbazin committed
dnl
dnl  Speex plugin
dnl
AC_ARG_ENABLE(speex,
hartman's avatar
hartman committed
  [  --enable-speex          Speex decoder support (default enabled)])
gbazin's avatar
 
gbazin committed
if test "${enable_speex}" != "no"
then
  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_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
gbazin's avatar
 
gbazin committed
fi

gbazin's avatar
 
gbazin committed
dnl
dnl  tarkin decoder plugin
dnl
AC_ARG_ENABLE(tarkin,
[  --enable-tarkin         experimental tarkin codec (default disabled)])
if test "${enable_tarkin}" = "yes"
gbazin's avatar
 
gbazin committed
then
  AC_ARG_WITH(tarkin-tree,
  [    --with-tarkin-tree=PATH tarkin tree for static linking])
Samuel Hocevar's avatar
Samuel Hocevar committed
  if test -n "${with_tarkin_tree}"
gbazin's avatar
 
gbazin committed
  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])
gbazin's avatar
 
gbazin committed
      AC_MSG_RESULT(yes)
gbazin's avatar
 
gbazin committed
    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

gbazin's avatar
 
gbazin committed
dnl
dnl  theora decoder plugin
dnl
AC_ARG_ENABLE(theora,
[  --enable-theora         experimental theora codec (default disabled)])
if test "${enable_theora}" = "yes"
gbazin's avatar
 
gbazin committed
then
  AC_CHECK_HEADERS(theora/theora.h, [
    AC_CHECK_LIB(theora, theora_granule_time, [
      VLC_ADD_PLUGINS([theora])
      theora_libs="-ltheora -logg"
      VLC_ADD_LDFLAGS([theora],[${theora_libs}]) ],[
      AC_MSG_ERROR([libtheora doesn't appear to be installed on your system.
gbazin's avatar
 
gbazin committed
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
Christophe Mutricy's avatar
Christophe Mutricy committed
  PKG_CHECK_MODULES(DIRAC,dirac, [
Christophe Mutricy's avatar
Christophe Mutricy committed
      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.])
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])
    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
  VLC_ADD_PLUGINS([cmml])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl  Video plugins
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl

Samuel Hocevar's avatar
 
Samuel Hocevar committed
AC_ARG_WITH(,[Video plugins:])
Samuel Hocevar's avatar
 
Samuel Hocevar committed

gbazin's avatar
 
gbazin committed
dnl Check for DPMS
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
  CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
gbazin's avatar
 
gbazin committed
  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

Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl  X11 module
dnl  (enabled by default except on win32)
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
Samuel Hocevar's avatar
 
Samuel Hocevar committed
AC_ARG_ENABLE(x11,
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  [  --enable-x11            X11 support (default enabled)])
if test "${enable_x11}" != "no" &&
  (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
   test "${enable_x11}" = "yes"); then
  CPPFLAGS="${CPPFLAGS_save} ${X_FLAGS}"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  AC_CHECK_HEADERS(X11/Xlib.h, [
    VLC_ADD_PLUGINS([x11 panoramix])
    VLC_ADD_LDFLAGS([x11 panoramix],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext])
    VLC_ADD_CPPFLAGS([x11 panoramix],[${X_CFLAGS}])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  ])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
fi

dnl
dnl  XVideo module
dnl  (enabled by default except on win32)
dnl
AC_ARG_ENABLE(xvideo,
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  [  --enable-xvideo         XVideo support (default enabled)])
if test "${enable_xvideo}" != "no" &&
  (test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
   test "${enable_xvideo}" = "yes"); then
  CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  AC_CHECK_HEADERS(X11/extensions/Xv.h, [
    CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext"
Samuel Hocevar's avatar
Samuel Hocevar committed
    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_PLUGINS([xvideo])
        VLC_ADD_CPPFLAGS([xvideo],[${X_CFLAGS}])
        VLC_ADD_LDFLAGS([xvideo],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXv])
Samuel Hocevar's avatar
Samuel Hocevar committed
      else
        AC_CHECK_LIB(Xv_pic,XvPutImage,[
          VLC_ADD_PLUGINS([xvideo])
          VLC_ADD_CPPFLAGS([xvideo],[${X_CFLAGS}])
          VLC_ADD_LDFLAGS([xvideo],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXv_pic])
Samuel Hocevar's avatar
Samuel Hocevar committed
        ],[
          VLC_ADD_BUILTINS([xvideo])
          VLC_ADD_LDFLAGS([xvideo],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXv])
          VLC_ADD_CPPFLAGS([xvideo],[${X_CFLAGS}])
Samuel Hocevar's avatar
Samuel Hocevar committed
        ])
      fi
gbazin's avatar
 
gbazin committed
    ])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  ]
Samuel Hocevar's avatar
 
Samuel Hocevar committed
fi
Samuel Hocevar's avatar
 
Samuel Hocevar committed

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_LDFLAGS([glx],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lGL -lGLU])
      VLC_ADD_CPPFLAGS([glx],[${X_CFLAGS}])
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
Samuel Hocevar's avatar
Samuel Hocevar committed
  ac_cv_have_xinerama="no"
  CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
  CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext"
Samuel Hocevar's avatar
Samuel Hocevar committed
  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])
Samuel Hocevar's avatar
Samuel Hocevar committed
      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])
Samuel Hocevar's avatar
Samuel Hocevar committed
        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}"

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  OpenGL module
dnl  (enabled by default except on beos)
  [  --enable-opengl         OpenGL support (default enabled)])
if test "${enable_opengl}" != "no" &&
   test "${SYS}" != "beos" -a "${SYS}" != "mingwce"; then
  if test "${SYS}" != "darwin"; then
      VLC_ADD_PLUGINS([opengl])
      if test "${SYS}" != "mingw32"; then
        VLC_ADD_LDFLAGS([opengl],[${X_LIBS} -lGL -lGLU])
        VLC_ADD_LDFLAGS([opengl],[-lopengl32 -lglu32])
      fi
    ])
  else
    dnl OS X special case (no GL/gl.h but OpenGL/gl.h)
    VLC_ADD_LDFLAGS([opengl],[-framework OpenGL])
  fi
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
dnl  SDL module
dnl
AC_ARG_ENABLE(sdl,
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  [  --enable-sdl            SDL support (default enabled)])
if test "${enable_sdl}" != "no"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
    [    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
    [ if test "${with_sdl_config_path}" != "no"
        SDL_PATH="${with_sdl_config_path}:${PATH}"
  AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, ${SDL_PATH})
  SDL_CONFIG="${SDL12_CONFIG}"
  if test "${SDL_CONFIG}" = "no"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  then
    AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no, ${SDL_PATH})
Samuel Hocevar's avatar
 
Samuel Hocevar committed
    SDL_CONFIG=${SDL11_CONFIG}
    SDL_HEADER="SDL11/SDL.h"
  if test "${SDL_CONFIG}" = "no"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  then
    AC_PATH_PROG(SDL_CONFIG, sdl-config, no, ${SDL_PATH})
  # 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)],[],[])
Samuel Hocevar's avatar
Samuel Hocevar committed
  if test "${with_sdl_prefix}" != "no" -a -n "${with_sdl_prefix}"
  then
    SDL_PREFIX="--prefix=${with_sdl_prefix}"
  fi
  if test "${SDL_CONFIG}" != "no"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  then
    # SDL on Darwin is heavily patched and can only run SDL_image
    if test "${SYS}" != "darwin" -a "${SYS}" != "mingw32"; then
    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,,'`])
    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),
      [ AC_CHECK_HEADERS(SDL.h, AC_DEFINE(SDL_INCLUDE_FILE, <SDL.h>,
          As a last resort we also test for SDL.h presence),
      [ AC_MSG_ERROR([The development package for SDL is not installed.
Please install it and try again. Alternatively you can also configure with
    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])
      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])])
      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.])
      ])])
    if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
Samuel Hocevar's avatar
 
Samuel Hocevar committed
    then
      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.])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
    fi
  elif test "${enable_sdl}" =  "yes"
Samuel Hocevar's avatar
 
Samuel Hocevar committed
  then
    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.
    ])
Samuel Hocevar's avatar
 
Samuel Hocevar committed

dnl
dnl  freetype module
dnl
AC_ARG_ENABLE(freetype,
  [  --enable-freetype       freetype support (default enabled)])
gbazin's avatar
 
gbazin committed
AC_ARG_ENABLE(fribidi,
  [  --enable-fribidi        fribidi support (default enabled)])
if test "${enable_freetype}" != "no"
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})
  if test "${FREETYPE_CONFIG}" != "no"
    VLC_ADD_PLUGINS([freetype])
    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])])
  elif test "${enable_freetype}" =  "yes"
  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
gbazin's avatar
 
gbazin committed

  dnl fribidi support
  if test "${enable_fribidi}" != "no"
gbazin's avatar
 
gbazin committed
    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`])
gbazin's avatar
 
gbazin committed
    fi
gbazin's avatar
gbazin committed
dnl
dnl  libxml2 module
dnl
AC_ARG_ENABLE(libxml2,
  [  --enable-libxml2        libxml2 support (default enabled)])
gbazin's avatar
gbazin committed
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}"
gbazin's avatar
gbazin committed
    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])
       ],[
gbazin's avatar
gbazin committed
      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}"
gbazin's avatar
gbazin committed
  else
    if test "${enable_xml2}" = "yes"; then
      AC_MSG_ERROR([Could not find libxml2])
    fi
  fi
fi

  [  --enable-svg            SVG support (default disabled)])
 	  VLC_ADD_LDFLAGS([svg],[$SVG_LIBS])
      	  VLC_ADD_CFLAGS([svg],[$SVG_CFLAGS])
          VLC_ADD_PLUGINS([svg]) ],
dnl
dnl Snapshot vout module (with cache)
dnl
AC_ARG_ENABLE(snapshot,
  [  --enable-snapshot       snapshot module (default disabled)])
if test "${enable_snapshot}" = "yes"
dnl  (disabled by default)
dnl
AC_ARG_ENABLE(qte,
  [  --enable-qte            QT Embedded support (default disabled)])
if test "${enable_qte}" = "yes"
  [    --with-qte=PATH       Qt Embedded headers and libraries])
Samuel Hocevar's avatar
Samuel Hocevar committed
  if test "${with_qte}" != "no" -a -n "${with_qte}"
    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])
    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])
  VLC_ADD_PLUGINS([qte])
  CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}"
  AC_CHECK_HEADERS(qt.h jpeglib.h, ,[
    AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."])
  ] )
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])