Newer
Older
VLC_ADD_CPPFLAGS([mux_ts ts dvb],[-I${real_dvbpsi_tree}/src])
VLC_ADD_LDFLAGS([mux_ts ts dvb],[${real_dvbpsi_tree}/src/.libs/libdvbpsi.a])
else
dnl The given libdvbpsi wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}])
fi
dnl Compile without dvbpsi
;;
*)
AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
Samuel Hocevar
committed
LDFLAGS_test=""
CPPFLAGS_test=""
Samuel Hocevar
committed
LDFLAGS_test="-L${with_dvbpsi}/lib"
CPPFLAGS_test="-I${with_dvbpsi}/include"
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
VLC_ADD_PLUGINS([ts])
if test "${enable_sout}" != "no"; then
VLC_ADD_PLUGINS([mux_ts])
VLC_ADD_CPPFLAGS([mux_ts ts dvb],[${CPPFLAGS_test}])
VLC_ADD_LDFLAGS([mux_ts ts dvb],[${LDFLAGS_test} -ldvbpsi])
Laurent Aimar
committed
then
AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
fi
])
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
AC_CHECK_LIB(dvbpsi, dvbpsi_GenSDTSections, [
AC_DEFINE(HAVE_DVBPSI_SDT, 1, [Define if you have dvbpsi_GenSDTSections.])
], [], [${LDFLAGS_ts}])
Samuel Hocevar
committed
dnl
dnl Video4Linux plugin
dnl
AC_ARG_ENABLE(v4l,
[ --enable-v4l Video4Linux input support (default disabled)])
Samuel Hocevar
committed
then
AC_ARG_WITH(v4l,
[ --with-v4l=PATH path to a v4l-enabled kernel tree],[],[])
VLC_ADD_CPPFLAGS([v4l],[-I${with_v4l}/include])
fi
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l}"
],[])
CPPFLAGS="${CPPFLAGS_save}"
Samuel Hocevar
committed
fi
dnl
dnl Video4Linux plugin
dnl
AC_ARG_ENABLE(v4l2,
if test "${enable_v4l2}" = "yes"
then
AC_ARG_WITH(v4l2,
[ --with-v4l2=PATH path to a v4l2-enabled kernel tree],[],[])
if test "${with_v4l2}" != "no" -a -n "${with_v4l2}"
then
VLC_ADD_CPPFLAGS([v4l2],[-I${with_v4l2}/include])
fi
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}"
AC_CHECK_HEADERS(linux/videodev2.h, [
VLC_ADD_PLUGINS([v4l2])
],[])
CPPFLAGS="${CPPFLAGS_save}"
fi
dnl
dnl special access module for Hauppauge PVR cards
dnl
AC_ARG_ENABLE(pvr,
[ --enable-pvr PVR cards access module (default disabled)])
dnl
dnl gnomeVFS access module
dnl
AC_ARG_ENABLE(gnomevfs,
[ --enable-gnomevfs GnomeVFS access module (default enabled)])
if test "${enable_gnomevfs}" != "no"
then
PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0,
VLC_ADD_LDFLAGS([access_gnomevfs],[$GNOMEVFS_LIBS])
VLC_ADD_CPPFLAGS([access_gnomevfs],[$GNOMEVFS_CPPFLAGS])
VLC_ADD_CFLAGS([access_gnomevfs],[$GNOMEVFS_CFLAGS])
VLC_ADD_PLUGINS([access_gnomevfs]),
AC_MSG_WARN([GnomeVFS support disabled because GnomeVFS development headers not found]))
dnl Need to test libcdio and libvcdinfo for a number of things. Do it now.
AC_ARG_ENABLE(libcdio,
[ --enable-libcdio CD input and control library support (default enabled)])
have_libcdio=no
have_libvcdinfo=no
if test "${enable_libcdio}" != "no"
then
PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.78.2,
have_libcdio=yes
AC_DEFINE(HAVE_LIBCDIO, [],
[Define if you have libcdio 0.78.2 or greater installed]),
[AC_MSG_WARN(CD Reading and information library not found)])
PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.22,
[have_libvcdinfo=yes
AC_DEFINE(HAVE_VCDINFO, [],
[Define if you have libvcdinfo 0.7.22 or greater installed])],
[AC_MSG_WARN(VCD information library not found)])
fi
dnl
dnl VCDX and CDDAX modules
dnl
AC_ARG_ENABLE(cddax,
[ --enable-cddax audio CD plugin with CD Text and CD paranoia via libcdio (default disabled)])
AC_ARG_ENABLE(libcddb,
[ --enable-libcddb CDDB support for libcdio audio CD (default enabled)])
if test "${enable_cddax}" = "yes"
if test "$have_libcdio" = "yes"
then
AC_DEFINE(HAVE_CDDAX, [], [Define for the audio CD plugin using libcdio])
VLC_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
VLC_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
VLC_ADD_PLUGINS([cddax])
PKG_CHECK_MODULES(LIBCDIO_PARANOIA, libcdio_paranoia >= 0.72, [
VLC_ADD_LDFLAGS([cddax],[$LIBCDIO_CDDA_LIBS $LIBCDIO_CDDA_LIBS $LIBCDIO_PARANOIA_LIBS])],
AC_MSG_WARN([CD Paranoia support disabled because no libcdio >= 0.72 found]))
else
AC_MSG_WARN([cddax plugin disabled because ok libcdio library not found or disabled])
HAVE_CDDAX=no
fi
if test "$enable_libcddb" != "no"; then
PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.5, [
HAVE_LIBCDDB=yes
AC_DEFINE(HAVE_LIBCDDB, [], [Define this if you have libcddb installed])
VLC_ADD_LDFLAGS([cddax],[$LIBCDDB_LIBS])
VLC_ADD_CFLAGS([cddax],[$LIBCDDB_CFLAGS])
],
[AC_MSG_WARN(new enough libcddb not found. CDDB access disabled)
HAVE_LIBCDDB=no])
fi
fi
AC_ARG_ENABLE(vcdx,
[ --enable-vcdx VCD with navigation via libvcdinfo (default disabled)])
if test "${enable_vcdx}" = "yes"
then
if test "${have_libvcdinfo}" = "yes"
then
VLC_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
VLC_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
else
AC_MSG_WARN([vcdx plugin disabled because ok libvcdinfo library not found or disabled])
HAVE_VCDX=no
fi
[VLC_ADD_LDFLAGS([vcdx],[$LIBISO9660_LIBS])
VLC_ADD_CFLAGS([vcdx],[$LIBISO9660_CFLAGS])],
[AC_MSG_WARN([vcdx plugin disabled because ok libiso9660 library not found])
HAVE_VCDX=no])
if test "$have_libvcdinfo" = "yes"
then
AC_DEFINE(HAVE_VCDX, [],
[Define for the VCD plugin using libcdio/libvcdinfo])
VLC_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
VLC_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
VLC_ADD_PLUGINS([vcdx])
else
AC_MSG_WARN([vcdx plugin disabled because ok libvcdinfo library not found])
HAVE_VCDX=no
fi
dnl Built-in CD-DA and VCD module
AC_ARG_ENABLE(cdda,
[ --enable-cdda audio CD via built-in VCD (default enabled)])
Rocky Bernstein
committed
[ --enable-vcd built-in VCD (default enabled)])
AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
Samuel Hocevar
committed
AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
],[
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
],[
AC_MSG_RESULT(no)
Samuel Hocevar
committed
if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32"
VLC_ADD_LDFLAGS([vcd vcdx cdda cddax],[-framework IOKit -framework CoreFoundation])
if test "$enable_libcddb" != "no"; then
PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.5, [
HAVE_LIBCDDB=yes
AC_DEFINE(HAVE_LIBCDDB, [], [Define this if you have libcddb installed])
VLC_ADD_LDFLAGS([cdda],[$LIBCDDB_LIBS])
VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
],:
[AC_MSG_WARN(new enough libcddb not found. CDDB access disabled)
HAVE_LIBCDDB=no])
fi
dnl
dnl DVB-S/DVB-T/DVB-C satellite/teresterial/cable input using v4l2
dnl
AC_ARG_ENABLE(dvb,
[ --enable-dvb DVB-S/T/C card support (default disabled)])
if test "${enable_dvb}" = "yes"
then
AC_ARG_WITH(dvb,
[ --with-dvb=PATH path to a dvb- and v4l2-enabled kernel tree],[],[])
if test "${with_dvb}" != "no" -a -n "${with_dvb}"
then
VLC_ADD_CFLAGS([dvb],[-I${with_dvb}/include])

Jean-Paul Saman
committed
CPPFLAGS="${CPPFLAGS_save} -I${with_dvb}/include"
AC_CHECK_HEADERS(linux/dvb/version.h linux/dvb/frontend.h, [
Christophe Massiot
committed
if test -z "${with_dvbpsi_tree}"
then
VLC_ADD_PLUGINS([dvb])
else
VLC_ADD_BUILTINS([dvb])
fi
],[AC_MSG_WARN(linux-dvb headers not found, dvb disabled)])
CPPFLAGS="${CPPFLAGS_save}"
fi
dnl
dnl Screen capture module
dnl
AC_ARG_ENABLE(screen,
[ --enable-screen Screen capture support (default enabled)])
hartman
committed
if test "${enable_screen}" != "no"; then
hartman
committed
AC_CHECK_HEADERS(ApplicationServices/ApplicationServices.h, [
VLC_ADD_PLUGINS([screen])
VLC_ADD_LDFLAGS([screen],[-framework ApplicationServices])
])
VLC_ADD_PLUGINS([screen])
VLC_ADD_LDFLAGS([screen],[-lgdi32])
elif test "${SYS}" = "mingwce"; then
CPPFLAGS="${CPPFLAGS_save}"
elif test "${SYS}" = "beos"; then
VLC_ADD_PLUGINS([screen])
VLC_ADD_CXXFLAGS([screen],[])
VLC_ADD_LDFLAGS([screen],[-lbe])
else
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
AC_CHECK_HEADERS(X11/Xlib.h, [
VLC_ADD_PLUGINS([screen])
VLC_ADD_LDFLAGS([screen],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext])
VLC_ADD_CPPFLAGS([screen],[${X_CFLAGS}])
])
CPPFLAGS="${CPPFLAGS_save}"
fi
fi
Christophe Massiot
committed
dnl
dnl ipv6 plugin - not for QNX yet
Christophe Massiot
committed
dnl
have_ipv6=no
AC_CHECK_FUNCS(inet_pton,[have_ipv6=yes],[
AC_CHECK_LIB(nsl,inet_pton, [have_ipv6=yes])
AS_IF([test "${have_ipv6}" = "yes"], [
AC_DEFINE(HAVE_INET_PTON, 1, [Define to 1 if you have inet_pton().])])
if test "${SYS}" != "nto" &&
test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
AC_MSG_CHECKING(for sockaddr_in6 in netinet/in.h)
AC_EGREP_HEADER(sockaddr_in6,netinet/in.h,
[AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); have_ipv6=no])
AS_IF([test "${have_ipv6}" != "no"], [
VLC_ADD_PLUGINS([ipv6])])
then
AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
VLC_ADD_PLUGINS([ipv6])],[AC_MSG_RESULT(no)])
Christophe Massiot
committed
dnl
AC_ARG_ENABLE(ogg,
[ --enable-ogg Ogg demux support (default enabled)])
AC_ARG_WITH(ogg-tree,
[ --with-ogg-tree=PATH ogg tree for static linking])
if test -n "${with_ogg_tree}"
then
AC_MSG_CHECKING(for libogg.a in ${with_ogg_tree})
real_ogg_tree="`cd ${with_ogg_tree} 2>/dev/null && pwd`"
if test -z "${real_ogg_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_ogg_tree}])
fi
if test -f "${real_ogg_tree}/src/.libs/libogg.a"
then
dnl Use a custom ogg
AC_MSG_RESULT(${real_ogg_tree}/src/.libs/libogg.a)
VLC_ADD_PLUGINS([ogg])
if test "${enable_sout}" != "no"; then
VLC_ADD_PLUGINS([mux_ogg])
fi
VLC_ADD_LDFLAGS([ogg mux_ogg speex vorbis],[${real_ogg_tree}/src/.libs/libogg.a])
VLC_ADD_CFLAGS([ogg mux_ogg speex vorbis],[-I${real_ogg_tree}/include])
else
dnl The given ogg wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_ogg_tree}/src/.libs/libogg.a, make sure you compiled ogg in ${with_ogg_tree}])
fi
else
AC_CHECK_HEADERS(ogg/ogg.h, [
AC_CHECK_LIB( ogg, oggpack_read, [
VLC_ADD_PLUGINS([ogg])
if test "${enable_sout}" != "no"; then
VLC_ADD_PLUGINS([mux_ogg])
fi
VLC_ADD_LDFLAGS([ogg mux_ogg],[-logg])])
],[])
fi
if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
AC_MSG_CHECKING(for libebml version >= 0.7.6)
AC_EGREP_CPP(yes,
[#include <ebml/EbmlVersion.h>
#ifdef LIBEBML_VERSION
#if LIBEBML_VERSION >= 0x000706
yes
#endif
#endif],
[AC_MSG_RESULT([yes])
AC_CHECK_HEADERS(matroska/KaxVersion.h, [
AC_MSG_CHECKING(for libmatroska version >= 0.7.7)
AC_EGREP_CPP(yes,
[#include <matroska/KaxVersion.h>
#ifdef LIBMATROSKA_VERSION
#if LIBMATROSKA_VERSION >= 0x000705
yes
#endif
#endif],
[AC_MSG_RESULT([yes])
AC_CHECK_HEADERS(matroska/KaxAttachments.h)
VLC_ADD_CXXFLAGS([mkv],[])
if test "${SYS}" = "darwin"; then
VLC_ADD_CXXFLAGS([mkv],[-O1])
fi
AC_CHECK_LIB(ebml, main, [
VLC_ADD_PLUGINS([mkv])
VLC_ADD_LDFLAGS([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.])
])
],
[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
committed
])
dnl
dnl modplug demux plugin
dnl
AC_ARG_ENABLE(mod,
[ --enable-mod Mod demux support (default enabled)])
if test "${enable_mod}" != "no"
then
AC_ARG_WITH(mod-tree,
[ --with-mod-tree=PATH mod tree for static linking])
if test -n "${with_mod_tree}"
then
AC_MSG_CHECKING(for libmodplug.a in ${with_mod_tree})
real_mod_tree="`cd ${with_mod_tree} 2>/dev/null && pwd`"
if test -z "${real_mod_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_mod_tree}])
fi
if test -f "${real_mod_tree}/src/.libs/libmodplug.a"
then
dnl Use a custom mod
AC_MSG_RESULT(${real_mod_tree}/src/.libs/libmodplug.a)
VLC_ADD_PLUGINS([mod])
VLC_ADD_LDFLAGS([mod],[${real_mod_tree}/src/.libs/libmodplug.a -lstdc++])
VLC_ADD_CXXFLAGS([mod],[-I${real_mod_tree}/include])
else
dnl The given mod wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_mod_tree}/src/.libs/libmodplug.a, make sure you compiled mod in ${with_mod_tree}])
fi
else
AC_CHECK_HEADERS(libmodplug/modplug.h, [
VLC_ADD_PLUGINS([mod])
VLC_ADD_CXXFLAGS([mod],[])
VLC_ADD_LDFLAGS([mod],[-lmodplug -lstdc++])])
dnl
dnl mpc demux plugin
dnl
AC_ARG_ENABLE(mpc,
[ --enable-mpc Mpc demux support (default enabled)])
if test "${enable_mpc}" != "no"
then
AC_CHECK_HEADERS(mpcdec/mpcdec.h, [
VLC_ADD_PLUGINS([mpc])
VLC_ADD_LDFLAGS([mpc],[-lmpcdec])])
fi
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
dnl
dnl game music emu demux plugin
dnl
AC_ARG_ENABLE(gme,
[ --enable-gme Game Music Emu demux support (default enabled)])
if test "${enable_gme}" != "no" -a "${CXX}" != "";
then
AC_LANG_PUSH(C++)
AC_ARG_WITH(gme-tree,
[ --with-gme-tree=PATH gme tree for static linking])
if test -n "${with_gme_tree}"
then
AC_MSG_CHECKING(for libgme.a in ${with_mod_tree})
real_gme_tree="`cd ${with_gme_tree} 2>/dev/null && pwd`"
if test -z "${real_gme_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_gme_tree}])
fi
if test -f "${real_gme_tree}/gme/libgme.a"
then
dnl Use a custom gme
AC_MSG_RESULT(${real_gme_tree}/gme/libgme.a)
VLC_ADD_PLUGINS([gme])
VLC_ADD_LDFLAGS([gme],[${real_gme_tree}/gme/libgme.a])
VLC_ADD_CXXFLAGS([gme],[-I${real_gme_tree}/gme])
else
dnl The given gme wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_mod_tree}/gme/libgme.a, make sure you compiled gme in ${with_gme_tree}])
fi
else
AC_MSG_WARN([only static linking is available, you must provide a gme-tree])
fi
AC_LANG_POP(C++)
fi
[ --enable-mad libmad module (default enabled)])
VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
VLC_ADD_LDFLAGS([mpgatofixed32],[-L${with_mad}/lib])
[ --with-mad-tree=PATH mad tree for static linking],[],[])
if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([${with_mad_tree} directory doesn't 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
VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
VLC_ADD_LDFLAGS([mpgatofixed32],[-L${real_mad_tree}/.libs])
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
VLC_ADD_BUILTINS([mpgatofixed32])
VLC_ADD_LDFLAGS([mpgatofixed32],[-lmad])
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have mad.h])
fi
else
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
[ 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.]) ])
VLC_ADD_PLUGINS([mpgatofixed32])
VLC_ADD_LDFLAGS([mpgatofixed32],[-lmad])],
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
dnl libid3tag support (FIXME!!! doesn't work with new input)
AC_CHECK_HEADERS(id3tag.h, [
AC_CHECK_HEADERS(zlib.h, [
VLC_ADD_LDFLAGS([id3tag],[-lid3tag -lz])
VLC_ADD_PLUGINS([id3tag])]) ])
Samuel Hocevar
committed
dnl
dnl
Christophe Mutricy
committed
dnl we try to find ffmpeg using : 1- given tree 2- ffmpeg-config, 3- pkg-config
dnl 4- default place,
AC_ARG_ENABLE(ffmpeg,
then
dnl Those options have to be here because the .pc can be bogus for ffmpeg previous nov 05
Christophe Mutricy
committed
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
AC_ARG_WITH(ffmpeg-mp3lame,
[ --with-ffmpeg-mp3lame specify if ffmpeg has been compiled with mp3lame support],
[
if test "$with_ffmpeg_mp3lame" = "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame])
fi])
AC_ARG_WITH(ffmpeg-faac,
[ --with-ffmpeg-faac specify if ffmpeg has been compiled with faac support],
[
if test "$with_ffmpeg_faac" = "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lfaac])
fi])
AC_ARG_WITH(ffmpeg-dts,
[ --with-ffmpeg-dts specify if ffmpeg has been compiled with dts support],
[
if test "$with_ffmpeg_dts" = "yes"; then
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
AC_CHECK_LIB(dts_pic, dts_free,
[ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
[ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
LDFLAGS="${LDFLAGS_save}"
fi])

Jean-Paul Saman
committed
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
AC_ARG_WITH(ffmpeg-vorbis,
[ --with-ffmpeg-vorbis specify if ffmpeg has been compiled with vorbis support],
[
if test "$with_ffmpeg_vorbis" = "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lvorbisenc -lvorbis])
fi])
AC_ARG_WITH(ffmpeg-theora,
[ --with-ffmpeg-theora specify if ffmpeg has been compiled with theora support],
[
if test "$with_ffmpeg_theora" = "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-ltheora])
fi])
AC_ARG_WITH(ffmpeg-ogg,
[ --with-ffmpeg-ogg specify if ffmpeg has been compiled with ogg support],
[
if test "$with_ffmpeg_ogg" = "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-logg])
fi])
Christophe Mutricy
committed
AC_ARG_WITH(ffmpeg-zlib,
[ --with-ffmpeg-zlib specify if ffmpeg has been compiled with zlib support],
[
if test "$with_ffmpeg_zlib" = "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lz])
Christophe Mutricy
committed
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
fi])
dnl
dnl test for --with-ffmpeg-tree
dnl
AC_ARG_WITH(ffmpeg-tree,
[ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}"; then
AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
if test -z "${real_ffmpeg_tree}"; then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
fi
if ! test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
dnl The given libavcodec wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
fi
if ! fgrep -s "pp_get_context" "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
if test -f "${real_ffmpeg_tree}/libavcodec/libpostproc/libpostproc.a"; then
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec/libpostproc ${real_ffmpeg_tree}/libavcodec/libpostproc/libpostproc.a])
elif test -f "${real_ffmpeg_tree}/libpostproc/libpostproc.a"; then
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libpostproc ${real_ffmpeg_tree}/libpostproc/libpostproc.a])
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}])
else
dnl The given libavcodec wasn't built with --enable-pp
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find libpostproc.a in ${real_ffmpeg_tree}/[libavcodec/]libpostproc/. Make sure you configured ffmpeg with --enable-pp])
fi
Christophe Mutricy
committed
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
fi
dnl Use a custom libffmpeg
AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
if fgrep -s "CONFIG_ZLIB=yes" "${real_ffmpeg_tree}/config.mak"; then
if test "${with_ffmpeg_zlib}" != "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lz])
fi
fi
if fgrep -s "CONFIG_MP3LAME=yes" "${real_ffmpeg_tree}/config.mak"; then
if test "${with_ffmpeg_mp3lame}" != "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame])
fi
fi
if fgrep -s "CONFIG_FAAC=yes" "${real_ffmpeg_tree}/config.mak"; then
if test "${with_ffmpeg_faac}" != "yes"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lfaac])
fi
fi
if fgrep -s "CONFIG_DTS=yes" "${real_ffmpeg_tree}/config.mak"; then
if test "${with_ffmpeg_dts}" != "yes"; then
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
AC_CHECK_LIB(dts_pic, dts_free,
[ VLC_ADD_LDFLAGS([ffmpeg],[-ldts_pic]) ],
[ VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
LDFLAGS="${LDFLAGS_save}"
fi
fi
if fgrep -s "CONFIG_VORBIS=yes" "${real_ffmpeg_tree}/config.mak"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lvorbis -lvorbisenc])
fi
if fgrep -s "CONFIG_FAAD=yes" "${real_ffmpeg_tree}/config.mak"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lfaad])
fi
if fgrep -s "CONFIG_XVID=yes" "${real_ffmpeg_tree}/config.mak"; then
VLC_ADD_LDFLAGS([ffmpeg],[-lxvidcore])
fi
VLC_ADD_BUILTINS([ffmpeg])
if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes" ; then
Christophe Mutricy
committed
VLC_ADD_BUILTINS([stream_out_switcher])
fi
if test -f "${real_ffmpeg_tree}/libavutil/libavutil.a"; then
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavutil ${real_ffmpeg_tree}/libavutil/libavutil.a])
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavutil])
fi
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec ${real_ffmpeg_tree}/libavcodec/libavcodec.a])
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavcodec])
if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then
hartman
committed
AC_DEFINE(HAVE_LIBAVFORMAT_TREE, 1, [Define if you have ffmpeg's libavformat.])
Christophe Mutricy
committed
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat ${real_ffmpeg_tree}/libavformat/libavformat.a])
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavformat])
fi
if test -f "${real_ffmpeg_tree}/libswscale/libswscale.a"; then
AC_DEFINE(HAVE_LIBSWSCALE_TREE, 1, [Define if you have ffmpeg's libswscale.])
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libswscale ${real_ffmpeg_tree}/libswscale/libswscale.a])
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libswscale])
fi
Christophe Mutricy
committed
else
dnl Look for a ffmpeg-config (we are on debian )
FFMPEG_PATH="${PATH}"
AC_ARG_WITH(ffmpeg-config-path,
[ --with-ffmpeg-config-path=PATH ffmpeg-config path (default search in \$PATH)],
[ if test "${with_ffmpeg_config_path}" != "no"
then
FFMPEG_PATH="${with_ffmpeg_config_path}"
fi ])
AC_PATH_PROG(FFMPEG_CONFIG, ffmpeg-config, no, ${FFMPEG_PATH})
if test "${FFMPEG_CONFIG}" != "no"
then
AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
hartman
committed
AC_CHECK_HEADERS(ffmpeg/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
Christophe Mutricy
committed
VLC_ADD_PLUGINS([ffmpeg])
if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
Christophe Mutricy
committed
VLC_ADD_PLUGINS([stream_out_switcher])
fi
VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --cflags`])
VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --plugin-libs avcodec avformat postproc`])
else
dnl Trying with pkg-config
PKG_CHECK_MODULES(FFMPEG,[libavcodec, libavformat],
[

Rafaël Carré
committed
AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
hartman
committed
AC_CHECK_HEADERS(ffmpeg/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
if test "${SYS}" = "darwin"; then
VLC_ADD_BUILTINS([ffmpeg])
else
VLC_ADD_PLUGINS([ffmpeg])
fi
if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
if test "${SYS}" = "darwin"; then
VLC_ADD_BUILTINS([stream_out_switcher])
else
VLC_ADD_PLUGINS([stream_out_switcher])
fi
fi
VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_CFLAGS}])
VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_LIBS}])
dnl newer ffmpeg have a separate libpostproc
VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}])
VLC_ADD_LDFLAGS([ffmpeg],[${POSTPROC_LIBS}])
dnl even newer ffmpeg has a libswscale
PKG_CHECK_MODULES(SWSCALE, libswscale,[
VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}])
VLC_ADD_LDFLAGS([ffmpeg],[${SWSCALE_LIBS}])
],[ true ])
],[
dnl
Christophe Mutricy
committed
dnl last chance: at the default place
dnl
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
hartman
committed
AC_CHECK_HEADERS(ffmpeg/avformat.h)
hartman
committed
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
AC_CHECK_LIB(avutil, av_crc_init, [
VLC_ADD_LDFLAGS([ffmpeg],[-lavutil])
AC_CHECK_LIB(avcodec, avcodec_init, [
VLC_ADD_BUILTINS([ffmpeg])
VLC_ADD_LDFLAGS([ffmpeg],[-lavcodec])
if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
VLC_ADD_BUILTINS([stream_out_switcher])
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (svn version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ], [$LDAVUTIL])
hartman
committed
AC_CHECK_LIB(postproc, pp_postprocess, [
VLC_ADD_LDFLAGS([ffmpeg],[-lpostproc])],
AC_MSG_ERROR([Could not find libpostproc inside FFmpeg. You should configure FFmpeg with --enable-gpl --enable-pp.]),
[$LDAVUTIL])
AC_CHECK_LIB(avformat, av_open_input_stream, [
VLC_ADD_LDFLAGS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
AC_CHECK_LIB(swscale, sws_getContext, [
VLC_ADD_LDFLAGS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
])
Christophe Mutricy
committed
fi
fi
Christophe Mutricy
committed
dnl ffmpegaltivec plugin
dnl
AC_ARG_ENABLE(ffmpegaltivec,
[ --enable-ffmpegaltivec ffmpegaltivec codec (DO NOT USE)])
if test "${enable_ffmpegaltivec}" = "yes"
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
then
if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}"; then
AC_MSG_CHECKING(for libavcodecaltivec.a in ${with_ffmpeg_tree})
real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
if test -z "${real_ffmpeg_tree}"; then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
fi
if ! test -f "${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a"; then
dnl The given libavcodecaltivec wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a, make sure you compiled libavcodecaltivec in ${with_ffmpeg_tree}])
fi
if ! fgrep -s "pp_get_context" "${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a"; then
dnl The given libavcodecaltivec wasn't built with --enable-pp
AC_MSG_RESULT(no)
AC_MSG_ERROR([${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a was not compiled with postprocessing support, make sure you configured ffmpeg with --enable-pp])
fi
dnl Use a custom libffmpeg
AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodecaltivec.a)
VLC_ADD_LDFLAGS([ffmpegaltivec],[-L${real_ffmpeg_tree}/libavcodec -lavcodecaltivec])
VLC_ADD_CPPFLAGS([ffmpeg],[-DNO_ALTIVEC_IN_FFMPEG])
VLC_ADD_CPPFLAGS([ffmpegaltivec],[-I${real_ffmpeg_tree}/libavcodec -I${real_ffmpeg_tree}/libavformat])
if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then
hartman
committed
AC_DEFINE(HAVE_LIBAVFORMAT_TREE, 1, [Define if you have ffmpeg's libavformat.])
VLC_ADD_LDFLAGS([ffmpegaltivec],[-L${real_ffmpeg_tree}/libavformat -lavformataltivec -lz])
VLC_ADD_CPPFLAGS([ffmpegaltivec],[-I${real_ffmpeg_tree}/libavformat])
fi
Christophe Massiot
committed
VLC_ADD_LDFLAGS([stream_out_switcher],[-L${real_ffmpeg_tree}/libavcodec])
VLC_ADD_CPPFLAGS([stream_out_switcher],[-I${real_ffmpeg_tree}/libavcodec -I${real_ffmpeg_tree}/libavformat])
fi
fi
dnl
dnl faad decoder plugin
dnl
AC_ARG_ENABLE(faad,
[ --enable-faad faad codec (default disabled)])
then
Samuel Hocevar
committed
AC_ARG_WITH(faad-tree,
[ --with-faad-tree=PATH faad tree for static linking])
then
AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
real_faad_tree="`cd ${with_faad_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_faad_tree}])
fi
if test -f "${real_faad_tree}/libfaad/.libs/libfaad.a"
then
dnl Use a custom faad
AC_MSG_RESULT(${real_faad_tree}/libfaad/.libs/libfaad.a)
VLC_ADD_BUILTINS([faad])
VLC_ADD_LDFLAGS([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}])
fi
else
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_faad}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_faad}"
AC_CHECK_HEADERS(faad.h, ,
[ AC_MSG_ERROR([Cannot find development headers for libfaad...]) ])
AC_CHECK_LIB(faad, faacDecOpen, [
VLC_ADD_PLUGINS([faad])
VLC_ADD_LDFLAGS([faad],[-lfaad]) ],
AC_CHECK_LIB(faad, NeAACDecOpen, [
VLC_ADD_PLUGINS([faad])
VLC_ADD_LDFLAGS([faad],[-lfaad]) ],
[ AC_MSG_ERROR([Cannot find libfaad library...]) ]))
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
fi
fi
dnl
Christophe Massiot
committed
dnl twolame encoder plugin
dnl
Christophe Massiot
committed
AC_ARG_ENABLE(twolame,
[ --enable-twolame twolame codec (default disabled)])
if test "${enable_twolame}" = "yes"
then
Christophe Massiot
committed
AC_ARG_WITH(twolame-tree,
[ --with-twolame-tree=PATH twolame tree for static linking])
if test -n "${with_twolame_tree}"
then
Christophe Massiot
committed
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)
Christophe Massiot
committed
AC_MSG_ERROR([cannot cd to ${with_twolame_tree}])
fi
Christophe Massiot
committed
if test -f "${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a"
then
Christophe Massiot
committed
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])
Christophe Massiot
committed
VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame])
else
Christophe Massiot
committed
dnl The given libtwolame wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
fi
else
Christophe Massiot
committed
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...]) ])