Skip to content
Snippets Groups Projects
configure.ac 127 KiB
Newer Older
Alan Fischer's avatar
Alan Fischer committed
dnl
dnl  SIDPlay plugin
dnl
AC_ARG_ENABLE(sid,
    [AS_HELP_STRING([--enable-sid],[C64 sid demux support (default auto)])])
AS_IF([test "${enable_sid}" != "no"], [
Pierre Ynard's avatar
Pierre Ynard committed
    PKG_CHECK_MODULES(SID, [libsidplay2], [
        AC_LANG_PUSH(C++)
        oldCPPFLAGS="$CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $SID_CFLAGS"
        AC_CHECK_HEADER([sidplay/builders/resid.h], [
            VLC_ADD_PLUGIN([sid])
            VLC_ADD_CFLAGS([sid], [$SID_CFLAGS])
            VLC_ADD_LIBS([sid], [$SID_LIBS] [-lresid-builder])
        ], [
            AS_IF([test -n "${enable_sid}"],
                [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
                [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
                )
        ])
        CPPFLAGS="$oldCPPFLAGS"
        AC_LANG_POP(C++)
    ], [
        AS_IF([test "x${enable_sid}" = "xyes"],
            [AC_MSG_ERROR([${SID_PKG_ERRORS} (required for sid).])],
            [AC_MSG_WARN([${SID_PKG_ERRORS} (required for sid).])]
gbazin's avatar
 
gbazin committed
dnl
gbazin's avatar
 
gbazin committed
dnl  ogg demux plugin
gbazin's avatar
 
gbazin committed
dnl
PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
if test "${enable_sout}" != "no"; then
    PKG_ENABLE_MODULES_VLC([MUX_OGG], [], [ogg >= 1.0], [Ogg mux support], [auto])
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
dnl Check for libshout
    PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
gbazin's avatar
 
gbazin committed
dnl
dnl  matroska demux plugin
dnl
AC_ARG_ENABLE(mkv,
  [AS_HELP_STRING([--disable-mkv],
    [do not use libmatroska (default auto)])])
if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
Samuel Hocevar's avatar
Samuel Hocevar committed
  AC_LANG_PUSH(C++)
  AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
    AC_MSG_CHECKING(for libebml version >= 1.0.0)
    AC_EGREP_CPP(yes,
      [#include <ebml/EbmlVersion.h>
       #ifdef LIBEBML_VERSION
       #if LIBEBML_VERSION >= 0x010000
       yes
       #endif
       #endif],
      [AC_MSG_RESULT([yes])
        AC_CHECK_HEADERS(matroska/KaxVersion.h, [
          AC_MSG_CHECKING(for libmatroska version >= 1.0.0)
          AC_EGREP_CPP(yes,
            [#include <matroska/KaxVersion.h>
             #ifdef LIBMATROSKA_VERSION
             #if LIBMATROSKA_VERSION >= 0x010000
             yes
             #endif
             #endif],
            [AC_MSG_RESULT([yes])
              AC_CHECK_HEADERS(matroska/KaxAttachments.h)
              AC_CHECK_LIB(ebml_pic, main, [
                VLC_ADD_PLUGIN([mkv])
                VLC_ADD_LIBS([mkv],[-lmatroska -lebml_pic])
                AC_CHECK_LIB(ebml, main, [
                  VLC_ADD_PLUGIN([mkv])
                  VLC_ADD_LIBS([mkv],[-lmatroska -lebml])
              ])
            ], [
              AC_MSG_RESULT([no])
              AC_MSG_ERROR([Your libmatroska is too old: you may get a more recent one from http://dl.matroska.org/downloads/libmatroska/. Alternatively you can use --disable-mkv to disable the matroska plugin.])
          ])
Samuel Hocevar's avatar
Samuel Hocevar committed
        ])
      ],
      [AC_MSG_RESULT([no])
        AC_MSG_ERROR([Your libebml is too old: you may get a more recent one from http://dl.matroska.org/downloads/libebml/. Alternatively you can use --disable-mkv to disable the matroska plugin.])
Samuel Hocevar's avatar
Samuel Hocevar committed
  ])
Samuel Hocevar's avatar
Samuel Hocevar committed
  AC_LANG_POP(C++)
gbazin's avatar
 
gbazin committed
fi

gbazin's avatar
 
gbazin committed
dnl
dnl  modplug demux plugin
dnl
AC_ARG_ENABLE(mod,
  [AS_HELP_STRING([--disable-mod],
    [do not use libmodplug (default auto)])])
if test "${enable_mod}" != "no" ; then
    PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [
          VLC_ADD_PLUGIN([mod])
          VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
          VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
       AS_IF([test -n "${enable_mod}"],
         [AC_MSG_ERROR([${LIBMODPLUG_PKG_ERRORS}.])],
         [AC_MSG_WARN([${LIBMODPLUG_PKG_ERRORS}.])])
gbazin's avatar
 
gbazin committed
fi

  [AS_HELP_STRING([--disable-mpc], [do not use libmpcdec (default auto)])])
Yavor Doganov's avatar
Yavor Doganov committed
  AC_CHECK_HEADERS([mpc/mpcdec.h], [
    VLC_ADD_PLUGIN([mpc])
Yavor Doganov's avatar
Yavor Doganov committed
    VLC_ADD_LIBS([mpc],[-lmpcdec])],
    [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [
    VLC_ADD_PLUGIN([mpc])
    VLC_ADD_LIBS([mpc],[-lmpcdec])])])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl  Codec plugins
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl
Samuel Hocevar's avatar
 
Samuel Hocevar committed

EXTEND_HELP_STRING([Codec plugins:])
Samuel Hocevar's avatar
 
Samuel Hocevar committed

dnl
dnl wmafixed plugin
dnl
AC_ARG_ENABLE(wma-fixed,
  [  --enable-wma-fixed      libwma-fixed module (default disabled)])
if test "${enable_wma_fixed}" = "yes"
then
  VLC_ADD_PLUGIN([wma_fixed])
fi

dnl
dnl shine fixed point mp3 encoder
dnl
AC_ARG_ENABLE(shine,
  [  --enable-shine          shine mp3 encoding module (default disabled)])
if test "${enable_shine}" = "yes"
then
  VLC_ADD_PLUGIN([shine])
fi

dnl
dnl openmax il codec plugin
dnl
AC_ARG_ENABLE(omxil,
  [  --enable-omxil          openmax il codec module (default disabled)])
if test "${enable_omxil}" = "yes"
then
  VLC_ADD_PLUGIN([omxil])
fi

dnl
dnl openmax il vout plugin
dnl
AC_ARG_ENABLE(omxil-vout,
  [  --enable-omxil-vout     openmax il video output module (default disabled)])
if test "${enable_omxil_vout}" = "yes"
then
  VLC_ADD_PLUGIN([omxil_vout])
fi

dnl
dnl raspberry pi openmax il configuration
dnl
AC_ARG_ENABLE(rpi-omxil,
  [  --enable-rpi-omxil     openmax il configured for raspberry pi (default disabled)])
if test "${enable_rpi_omxil}" = "yes"
then
  VLC_ADD_PLUGIN([omxil omxil_vout])
  VLC_ADD_CFLAGS([omxil omxil_vout],[-DRPI_OMX])
fi

dnl
dnl CrystalHD codec plugin
dnl
AC_ARG_ENABLE(crystalhd,
  [  --enable-crystalhd      crystalhd codec plugin (default auto)])
if test "${enable_crystalhd}" != "no"; then
    AC_CHECK_HEADER(libcrystalhd/libcrystalhd_if.h, [
      VLC_ADD_PLUGIN([crystalhd])
      VLC_ADD_LIBS([crystalhd], [-lcrystalhd])
    ],[
      if test "${SYS}" = "mingw32" ; then
        AC_CHECK_HEADERS(libcrystalhd/bc_dts_defs.h, [
          VLC_ADD_PLUGIN([crystalhd])
          AC_CHECK_HEADERS(libcrystalhd/bc_drv_if.h, [
            VLC_ADD_LIBS([crystalhd], [-lbcmDIL])
            ])
          AS_IF([test x"${enable_crystalhd}" = "xyes"],
                [AC_MSG_ERROR("Could not find CrystalHD development headers")],
                [AC_MSG_WARN("Could not find CrystalHD development headers")])
        ],[#define __LINUX_USER__
               #include <libcrystalhd/bc_dts_types.h>
       #include <libcrystalhd/bc_dts_types.h>
      ])
Samuel Hocevar's avatar
 
Samuel Hocevar committed
dnl  mad plugin
AC_ARG_ENABLE(mad,
  [  --enable-mad            libmad module (default enabled)])
if test "${enable_mad}" != "no"
then
  AC_ARG_WITH(mad,
    [  --with-mad=PATH         path to libmad],[],[])
  if test "${with_mad}" != "no" -a -n "${with_mad}"
  then
    VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
    VLC_ADD_LIBS([mpgatofixed32],[-L${with_mad}/lib])
  fi

  AC_ARG_WITH(mad-tree,
    [  --with-mad-tree=PATH    mad tree for static linking],[],[])
  if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
  then
    real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
    if test -z "${real_mad_tree}"
    then
      dnl  The given directory can't be found
      AC_MSG_RESULT(no)
Rafaël Carré's avatar
Rafaël Carré committed
      AC_MSG_ERROR([${with_mad_tree} directory does not exist])
    fi
    dnl  Use a custom libmad
    AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
    if test -f ${real_mad_tree}/mad.h
    then
      AC_MSG_RESULT(yes)
      VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
      VLC_ADD_LIBS([mpgatofixed32],[-L${real_mad_tree}/.libs])
      VLC_SAVE_FLAGS
      LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
      AC_CHECK_LIB(mad, mad_bit_init, [
        VLC_ADD_PLUGIN([mpgatofixed32])
        VLC_ADD_LIBS([mpgatofixed32],[-lmad])
Rafaël Carré's avatar
Rafaël Carré committed
        ],[ AC_MSG_ERROR([the specified tree has not been compiled ])
    else
      AC_MSG_RESULT(no)
Rafaël Carré's avatar
Rafaël Carré committed
      AC_MSG_ERROR([the specified tree does not have mad.h])
    VLC_SAVE_FLAGS
    CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_mpgatofixed32}"
    LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
    AC_CHECK_HEADERS(mad.h, ,
      [ AC_MSG_ERROR([Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.]) ])
    AC_CHECK_LIB(mad, mad_bit_init, [
      VLC_ADD_PLUGIN([mpgatofixed32])
      VLC_ADD_LIBS([mpgatofixed32],[-lmad])],
      [ AC_MSG_ERROR([Cannot find libmad library...]) ])
[  --enable-merge-ffmpeg   merge FFmpeg-based plugins (default disabled)],, [
  enable_merge_ffmpeg="no"
])
AM_CONDITIONAL([MERGE_FFMPEG], [test "$enable_merge_ffmpeg" != "no"])

Christophe Mutricy's avatar
Christophe Mutricy committed
[  --enable-avcodec        libavcodec codec (default enabled)])
AS_IF([test "${enable_avcodec}" != "no"], [
  PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [
    dnl PKG_CHECK_EXISTS([libavcodec < 56],, [
    dnl   AC_MSG_ERROR([libavcodec versions 56 and later are not supported yet.])
    dnl ])
    VLC_SAVE_FLAGS
    CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
    CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
    AC_CHECK_HEADERS(libavcodec/avcodec.h)
    AC_CHECK_HEADERS(libavutil/avutil.h)
    VLC_RESTORE_FLAGS
    have_avcodec="yes"
  ],[
    AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
AM_CONDITIONAL([HAVE_AVCODEC], [test "${have_avcodec}" != "no"])
dnl
dnl libva needs avcodec
dnl
AC_ARG_ENABLE(libva,
  [  --enable-libva          VAAPI GPU decoding support (libVA) (default auto)])
AS_IF([test "${enable_libva}" = "yes" -a "${have_avcodec}" != "yes" ], [
  AC_MSG_ERROR([--enable-libva and --disable-avcodec options are mutually exclusive. Use --enable-avcodec.])
])
AS_IF([test "${enable_libva}" != "no" -a "${have_avcodec}" = "yes"], [
  PKG_CHECK_MODULES(LIBVA, [libva libva-x11], [
    VLC_SAVE_FLAGS
    CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
    CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
    AC_CHECK_HEADERS(libavcodec/vaapi.h, [
      AC_MSG_NOTICE([VAAPI acceleration activated])
    ],[
      AS_IF([test -n "${enable_libva}"], [
        AC_MSG_ERROR([libva is present but libavcodec/vaapi.h is missing])
      ], [
        AC_MSG_WARN([libva is present but libavcodec/vaapi.h is missing ])
    AS_IF([test -n "${enable_libva}"], [
      AC_MSG_ERROR([${LIBVA_PKG_ERRORS}.])
    ], [
      AC_MSG_WARN([${LIBVA_PKG_ERRORS}.])
AM_CONDITIONAL([HAVE_AVCODEC_VAAPI], [test "${have_avcodec_vaapi}" = "yes"])
dnl
dnl dxva2 needs avcodec
dnl
AC_ARG_ENABLE(dxva2,
  [  --enable-dxva2          DxVA2 GPU decoding support (default auto)])
AS_IF([test "${enable_dxva2}" != "no"], [
  if test "${SYS}" = "mingw32"; then
  AS_IF([test "x${have_avcodec}" = "xyes"], [
    AC_CHECK_HEADERS(dxva2api.h,
      [
        AC_CHECK_HEADERS(libavcodec/dxva2.h, [
           AC_MSG_NOTICE([DxVA2 acceleration activated])
           have_avcodec_dxva2="yes"
    AS_IF([test "${enable_dxva2}" = "yes"],
          [AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
              [AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
        ], [#undef _WIN32_WINNT
            /* DXVA2 is only available in Vista and above */
            #define _WIN32_WINNT 0x600])
    AS_IF([test "${enable_dxva2}" = "yes"],
              [AC_MSG_ERROR([Could not find required dxva2api.h])],
              [AC_MSG_WARN([dxva2api.h not found])])
      ])
  ],[
    AS_IF([test "x${enable_dxva2}" != "x"], [
      AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
    ])
AM_CONDITIONAL([HAVE_AVCODEC_DXVA2], [test "${have_avcodec_dxva2}" = "yes"])
dnl
dnl vda needs avcodec
dnl
AC_ARG_ENABLE(vda,
  [  --enable-vda          VDA  support (default auto)])

AS_IF([test "${enable_vda}" != "no"], [
  if test "${SYS}" = "darwin"; then
  AS_IF([test "x${have_avcodec}" = "xyes"], [
    AC_CHECK_HEADERS(VideoDecodeAcceleration/VDADecoder.h,
      [
        AC_CHECK_HEADERS(libavcodec/vda.h, [
	AS_IF([test "${enable_vda}" = "yes"],
	      [AC_MSG_ERROR([vda is present but libavcodec/vda.h is missing])],
              [AC_MSG_WARN([vda is present but libavcodec/vda.h is missing ])])
        ])
  ],[
	AS_IF([test "${enable_vda}" = "yes"],
              [AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])],
              [AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])])
      ])
  ],[
    AS_IF([test "x${enable_vda}" != "x"], [
      AC_MSG_ERROR([--enable-vda and --disable-avcodec options are mutually exclusive.])
    ])
 ])
  fi
])
AM_CONDITIONAL([HAVE_AVCODEC_VDA], [test "${have_avcodec_vda}" = "yes"])
[  --enable-avformat       libavformat containers (default enabled)],, [
  enable_avformat="${have_avcodec}"
])
have_avformat="no"
AS_IF([test "${enable_avformat}" != "no"], [
  PKG_CHECK_MODULES(AVFORMAT,[libavformat >= 53.21.0 libavcodec libavutil], [
      have_avformat="yes"
      VLC_SAVE_FLAGS
      CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
      CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
      AC_CHECK_HEADERS(libavformat/avformat.h libavformat/avio.h)
      AC_CHECK_HEADERS(libavutil/avutil.h)
      AS_IF([test "$enable_merge_ffmpeg" = "no"], [
        have_avformat="no"
      AC_MSG_ERROR([${AVFORMAT_PKG_ERRORS}. Pass --disable-avformat to ignore this error.])
])
AM_CONDITIONAL([HAVE_AVFORMAT], [test "${enable_avformat}" != "no"])
dnl
dnl  swscale image scaling and conversion plugin
dnl
  AS_HELP_STRING([--enable-swscale],[libswscale image scaling and conversion
          (default enabled)]))
  PKG_CHECK_MODULES(SWSCALE,[libswscale],
      CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
      CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
      AC_CHECK_HEADERS(libswscale/swscale.h)
      VLC_ADD_PLUGIN([swscale])
      VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
      VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
      AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
        VLC_ADD_LIBS([swscale],[${ac_cv_ld_bsymbolic}])
      AC_MSG_ERROR([${SWSCALE_PKG_ERRORS}. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.])
hartman's avatar
hartman committed

[  --enable-postproc       libpostproc image post-processing (default auto)])
if test "${enable_postproc}" != "no"
then
  PKG_CHECK_MODULES(POSTPROC,[libpostproc libavutil],
    [
      VLC_SAVE_FLAGS
      CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
      CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
      AC_CHECK_HEADERS(postproc/postprocess.h)
      VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS $AVUTIL_LIBS])
      VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS $AVUTIL_CFLAGS])
      AC_MSG_WARN([${POSTPROC_PKG_ERRORS}.])
dnl
dnl  faad decoder plugin
dnl
AC_ARG_ENABLE(faad,
[  --enable-faad           faad codec (default auto)])
if test "${enable_faad}" != "no"; then
  AC_ARG_WITH(faad-tree,  [  --with-faad-tree=PATH   faad tree for static linking])
  if test -n "${with_faad_tree}"; then
    AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
    real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
    if test -z "${real_faad_tree}"; then
      dnl  The given directory can't be found
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([cannot cd to ${with_faad_tree}])
    fi
    if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"; then
      dnl  Use the custom faad
      AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
      VLC_ADD_PLUGIN([faad])
      VLC_ADD_LIBS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
      VLC_ADD_CPPFLAGS([faad],[-I${real_faad_tree}/include])
    else
      dnl  The given libfaad wasn't built
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([cannot find ${real_faad_tree}/libfaad/.libs/libfaad.a, make sure you compiled libfaad in ${with_faad_tree}])
    VLC_SAVE_FLAGS
    CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_faad}"
    LDFLAGS="${LDFLAGS} ${LIBS_faad}"
    AC_CHECK_HEADERS(faad.h,
      [ AC_CHECK_LIB(faad, faacDecOpen, [
          VLC_ADD_PLUGIN([faad])
          VLC_ADD_LIBS([faad],[-lfaad]) ], [
            AC_CHECK_LIB(faad, NeAACDecOpen, [
              VLC_ADD_PLUGIN([faad])
              VLC_ADD_LIBS([faad],[-lfaad]) ], [
                AS_IF([test "${enable_faad}" = "yes"],
                [ AC_MSG_ERROR([Cannot find libfaad library...]) ],
                [ AC_MSG_WARN([Cannot find libfaad library...]) ]) ]) ])
      ] , [ AS_IF([test "${enable_faad}" = "yes"],
        [ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ],
        [ AC_MSG_WARN([Cannot find development headers for libfaad...]) ]) ])
Christophe Mutricy's avatar
Christophe Mutricy committed
PKG_ENABLE_MODULES_VLC([TWOLAME], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])
dnl
dnl fdk-aac encoder plugin
dnl
PKG_ENABLE_MODULES_VLC([FDKAAC], [], [fdk-aac], [FDK-AAC encoder], [disabled])

dnl
dnl  QuickTime plugin
dnl
AC_ARG_ENABLE(quicktime,
  [  --enable-quicktime      QuickTime module (deprecated)])
if test "${enable_quicktime}" = "yes"; then
gbazin's avatar
 
gbazin committed
  if test "${SYS}" = "mingw32"; then
    VLC_ADD_PLUGIN([quicktime])
gbazin's avatar
 
gbazin committed
  else
  AC_CHECK_HEADERS(QuickTime/QuickTime.h,
      VLC_ADD_LIBS([quicktime],[-Wl,-framework,QuickTime,-framework,Carbon])
hartman's avatar
hartman committed
    ], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
gbazin's avatar
 
gbazin committed
  fi
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)
Rafaël Carré's avatar
Rafaël Carré committed
      AC_MSG_ERROR([${with_a52_tree} directory does not exist])
gbazin's avatar
 
gbazin committed
    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_LIBS([a52tofloat32],[-L${real_a52_tree}/liba52/.libs])
      VLC_SAVE_FLAGS
      LDFLAGS="${LDFLAGS} ${LIBS_a52tofloat32}"
gbazin's avatar
 
gbazin committed
      AC_CHECK_LIB(a52, a52_free, [
        VLC_ADD_PLUGIN([a52tofloat32])
        VLC_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
        VLC_ADD_LIBS([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 ($real_a52_tree)])
gbazin's avatar
 
gbazin committed
        else
Rafaël Carré's avatar
Rafaël Carré committed
          AC_MSG_ERROR([the specified tree has not been compiled])
gbazin's avatar
 
gbazin committed
        fi
gbazin's avatar
 
gbazin committed
    else
      AC_MSG_RESULT(no)
Rafaël Carré's avatar
Rafaël Carré committed
      AC_MSG_ERROR([the specified tree does not have a52.h])
gbazin's avatar
 
gbazin committed
    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"
    VLC_SAVE_FLAGS
    CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_test} ${CPPFLAGS_a52tofloat32}"
    LDFLAGS="${LDFLAGS} ${LDFLAGS_test} ${LIBS_a52tofloat32}"
gbazin's avatar
 
gbazin committed
      AC_CHECK_LIB(a52, a52_free, [
        VLC_ADD_PLUGIN([a52tofloat32])
        VLC_ADD_LIBS([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.])
        ], [$LIBM])
    ],[
      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
    ])
gbazin's avatar
 
gbazin committed
  fi
gbazin's avatar
 
gbazin committed
fi

gbazin's avatar
 
gbazin committed
dnl
dnl DTS Coherent Acoustics decoder plugin
dnl
PKG_ENABLE_MODULES_VLC([DCA], [dtstofloat32], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
gbazin's avatar
 
gbazin committed

gbazin's avatar
 
gbazin committed
dnl  Flac plugin
PKG_ENABLE_MODULES_VLC([FLAC], [], [flac], [libflac decoder/encoder support], [auto])
gbazin's avatar
 
gbazin committed
dnl
dnl  Libmpeg2 plugin
dnl
PKG_ENABLE_MODULES_VLC([LIBMPEG2], [], [libmpeg2 > 0.3.2], [libmpeg2 decoder support], [auto])
gbazin's avatar
 
gbazin committed

gbazin's avatar
 
gbazin committed
dnl
dnl  Vorbis plugin
dnl
PKG_ENABLE_MODULES_VLC([VORBIS], [], [ogg vorbis >= 1.1 vorbisenc >= 1.1], [Vorbis decoder and encoder], [auto])
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_PLUGIN([tremor])
gbazin's avatar
 
gbazin committed
   ],[])
fi

gbazin's avatar
 
gbazin committed
dnl
dnl  Speex plugins
gbazin's avatar
 
gbazin committed
dnl
PKG_ENABLE_MODULES_VLC([SPEEX], [], [ogg speex >= 1.0.5], [Speex support], [auto])
have_speexdsp="no"
AS_IF([test "${enable_speex}" != "no"], [
  PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
    have_speexdsp="yes"
  ], [
    AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
  ])
])
AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
gbazin's avatar
 
gbazin committed

Timothy B. Terriberry's avatar
Timothy B. Terriberry committed
dnl
dnl  Opus plugin
dnl
PKG_ENABLE_MODULES_VLC([OPUS], [], [ogg opus], [Opus support], [auto])

gbazin's avatar
 
gbazin committed
dnl
dnl  theora decoder plugin
dnl
PKG_ENABLE_MODULES_VLC([THEORA], [], [ogg theoradec >= 1.0 theoraenc], [experimental theora codec], [auto])
gbazin's avatar
 
gbazin committed

PKG_ENABLE_MODULES_VLC([DIRAC], [], [dirac >= 0.10.0], [dirac encoder], [auto])
dnl
dnl  schroedinger decoder plugin (for dirac format video)
dnl
PKG_ENABLE_MODULES_VLC([SCHROEDINGER], [], [schroedinger-1.0 >= 1.0.10], [dirac decoder and encoder using schroedinger], [auto])
dnl
dnl  PNG decoder module
dnl
AC_ARG_ENABLE(png,
  [  --enable-png            PNG support (default enabled)])
AS_IF([test "${enable_png}" != "no"], [
AC_CHECK_HEADERS(png.h, [
  LDFLAGS="${LDFLAGS} -lz $LIBM"
  AC_CHECK_LIB(png, png_set_rows, [
    VLC_ADD_PLUGIN([png])
  ], [], [-lz $LIBM])
dnl
dnl H262 encoder plugin (lib262)
dnl
AC_ARG_ENABLE(x262,
  [  --enable-x262           H262 encoding support with static libx262 (default disabled)])
if test "${enable_x262}" != "no"; then
AC_ARG_WITH(x262-tree,
  [ --with-x262-tree=PATH      H262 encoding module with libx262 (static linking)],[],[])
  if test "${with_x262_tree}" != "no" -a -n "${with_x262_tree}"
  then
    real_x262_tree="̧`cd ${with_x262_tree} 2>/dev/null && pwd`"
    if test -z "${real_x262_tree}"
    then
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([${with_x262_tree} directory does not exist])
    fi
    AC_MSG_CHECKING(for x262.h in ${real_x262_tree})
    if test -f ${with_x262_tree}/x262_config.h
    then
      VLC_ADD_PLUGIN([x262])
      VLC_ADD_CFLAGS([x262],[-I${with_x262_tree}])
      VLC_ADD_LIBS([x262],[-L${with_x262_tree} -lm -lpthread -lx262])
    else
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([${with_x262_tree} doesnt have x262_config.h])
    fi
  else
    PKG_CHECK_MODULES(X262, x262, [
        VLC_ADD_PLUGIN([x262])
        VLC_ADD_LDFLAGS([x262],[${X262_LIBS}])
        AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
          VLC_ADD_LIBS([x262],[${av_cv_ld_bsymbolic}])
        ])
        VLC_ADD_CFLAGS([x262],[${X262_CFLAGS}])
        if echo ${X262_LIBS} |grep -q 'pthreadGC2'; then
          VLC_ADD_CFLAGS([x262], [-DPTW32_STATIC_LIB])
        fi
    ], [
       if test "${enable_x262}" = "yes"; then
        AC_MSG_ERROR([x262 module doesn't work without staticly compiled libx262.a])
       fi
    ])
  fi
fi


dnl
dnl H264 encoder plugin (10-bit lib264)
dnl
AC_ARG_ENABLE(x26410b,
  [  --enable-x26410b           H264 10-bit encoding support with static libx264 (default disabled)])
if test "${enable_x26410b}" != "no"; then
AC_ARG_WITH(x26410b-tree,
  [ --with-x26410b-tree=PATH      H264 10-bit encoding module with libx264 (static linking)],[],[])
  if test "${with_x26410b_tree}" != "no" -a -n "${with_x26410b_tree}"
  then
    real_x26410b_tree="̧`cd ${with_x26410b_tree} 2>/dev/null && pwd`"
    if test -z "${real_x26410b_tree}"
    then
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([${with_x26410b_tree} directory does not exist])
    fi
    AC_MSG_CHECKING(for x264.h in ${real_x26410b_tree})
    if test -f ${with_x26410b_tree}/x264_config.h
    then
      AC_MSG_RESULT(yes)
      AC_MSG_CHECKING(for 10-bit build of x264)
      if grep -q "BIT_DEPTH.*10"  ${with_x26410b_tree}/x264_config.h ;then
        AC_MSG_RESULT(yes)
        VLC_ADD_PLUGIN([x26410b])
        VLC_ADD_CFLAGS([x26410b],[-I${with_x26410b_tree}])
        VLC_ADD_LIBS([x26410b],[-L${with_x26410b_tree} -lm -lpthread -lx264])
      else
        AC_MSG_RESULT(no)
        AC_MSG_ERROR([${with_x26410b_tree} isnt build 10-bit])
      fi
    else
      AC_MSG_RESULT(no)
      AC_MSG_ERROR([${with_x26410b_tree} doesnt have x264_config.h])
    fi
  else
    PKG_CHECK_MODULES(X26410B, x26410b, [
        VLC_ADD_PLUGIN([x26410b])
        VLC_ADD_LIBS([x26410b],[${X26410B_LIBS}])
        AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
          VLC_ADD_LDFLAGS([x26410b],[${ac_cv_ld_bsymbolic}])
        ])
        VLC_ADD_CFLAGS([x26410b],[${X26410B_CFLAGS}])
        if echo ${X26410B_LIBS} |grep -q 'pthreadGC2'; then
          VLC_ADD_CFLAGS([x26410b], [-DPTW32_STATIC_LIB])
        fi
    ], [
Rafaël Carré's avatar
Rafaël Carré committed
       if test "${enable_x26410b}" = "yes"; then
        AC_MSG_ERROR([x26410b module doesn't work without staticly compiled libx264.a])
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)
Rafaël Carré's avatar
Rafaël Carré committed
      AC_MSG_ERROR([${with_x264_tree} directory does not 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}])
bigben's avatar
 
bigben committed
      PKG_CHECK_MODULES(X264,x264, [
        VLC_ADD_PLUGIN([x264])
bigben's avatar
 
bigben committed
        VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
ssbssa's avatar
ssbssa committed
        if echo ${X264_LIBS} |grep -q 'pthreadGC2'; then
          VLC_ADD_CFLAGS([x264], [-DPTW32_STATIC_LIB])
        fi
Rafaël Carré's avatar
Rafaël Carré committed
        AC_MSG_ERROR([the specified tree has not been compiled])
      ])
    else
      AC_MSG_RESULT(no)
Rafaël Carré's avatar
Rafaël Carré committed
      AC_MSG_ERROR([the specified tree does not have x264.h])
      PKG_CHECK_MODULES(X264,x264 >= 0.86, [
        VLC_ADD_PLUGIN([x264])
        VLC_ADD_LIBS([x264],[${X264_LIBS}])
        AS_IF([test -n "${ac_cv_ld_bsymbolic}"], [
          VLC_ADD_LDFLAGS([x264],[${ac_cv_ld_bsymbolic}])
bigben's avatar
 
bigben committed
        VLC_ADD_CFLAGS([x264],[${X264_CFLAGS}])
ssbssa's avatar
ssbssa committed
        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([${X264_PKG_ERRORS}: you may get it from http://www.videolan.org/x264.html])
dnl
dnl Intel QuickSync (aka MediaSDK) H264/H262 encoder
dnl
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
PKG_ENABLE_MODULES_VLC([MFX], [qsv], [libmfx], [Intel QuickSync MPEG4-Part10/MPEG2 (aka H.264/H.262) encoder], [auto])
dnl
dnl libfluidsynth (MIDI synthetizer) plugin
dnl
PKG_ENABLE_MODULES_VLC([FLUIDSYNTH], [], [fluidsynth >= 1.1.2], [MIDI synthetiser with libfluidsynth], [auto])
  AS_HELP_STRING([--enable-zvbi],[VBI (inc. Teletext) decoding support with
                  libzvbi (default enabled)]))
  AS_HELP_STRING([--enable-telx],[Teletext decoding module (conflicting with
                  zvbi) (default enabled if zvbi is absent)]))
    PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.28],
          VLC_ADD_PLUGIN([zvbi])
          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 incompatible. Using zvbi.])
          AC_MSG_WARN([${ZVBI_PKG_ERRORS}. Enabling the telx module instead.])
AS_IF( [test "${enable_telx}" != "no" ],[
  VLC_ADD_PLUGIN([telx])
Laurent Aimar's avatar
Laurent Aimar 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.8],
Laurent Aimar's avatar
Laurent Aimar committed
      [
        VLC_ADD_PLUGIN([libass])

        AC_CHECK_HEADERS(fontconfig/fontconfig.h,
          [VLC_ADD_CPPFLAGS([libass],[-DHAVE_FONTCONFIG])
           VLC_ADD_LIBS([libass],[-lfontconfig])
       ])
Laurent Aimar's avatar
Laurent Aimar committed
      ],[
        AC_MSG_WARN([${LIBASS_PKG_ERRORS}.])
dnl
dnl  kate decoder plugin
dnl
PKG_ENABLE_MODULES_VLC([KATE], [], [kate >= 0.3.0], [kate codec], [auto])
dnl  tiger rendering for kate decoder plugin
dnl
AC_ARG_ENABLE(tiger,
[  --enable-tiger          Tiger rendering library for Kate streams (default auto)])
AS_IF([test "${enable_tiger}" != "no"], [
  PKG_CHECK_MODULES(TIGER,[tiger >= 0.3.1], [
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
      AC_DEFINE(HAVE_TIGER, 1, [Define if libtiger is available.])],[
        AS_IF([test -n "${enable_tiger}"], [
          AC_MSG_ERROR([${TIGER_PKG_ERRORS}.])
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

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

dnl
dnl  OpenGL
dnl
PKG_CHECK_MODULES([GL], [gl], [
  have_gl="yes"
], [
  AC_CHECK_HEADER([GL/gl.h], [
    have_gl="yes"
    GL_CFLAGS=""
    AS_IF([test "${SYS}" = "mingw32"], [
      GL_LIBS="-lopengl32"
    ], [
      GL_LIBS="-lGL"
    ])
  ], [
    have_gl="no"
  ])
])
AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
dnl OpenGL ES 2: depends on EGL 1.1
PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled])
dnl OpenGL ES 1: depends on EGL 1.0
PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [disabled])

AC_ARG_ENABLE(egl,
  [  --enable-egl            OpenGL support through EGL (default disabled)],, [
  enable_egl="no"
])
AS_IF([test "$enable_egl" != "no"], [
  PKG_CHECK_MODULES([EGL], [egl], [
    VLC_ADD_PLUGIN([egl])
  ])
])

AC_CHECK_HEADERS(X11/Xlib.h)
dnl
dnl  X C Bindings modules
dnl