Newer
Older
AC_CACHE_CHECK([if linker needs -framework vecLib],
[ac_cv_ld_altivec],
Samuel Hocevar
committed
[LDFLAGS="${LDFLAGS_vlc} -framework vecLib"
AC_TRY_LINK([],,ac_cv_ld_altivec=yes,ac_cv_ld_altivec=no)
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
AX_ADD_LDFLAGS([vlc idctaltivec motionaltivec memcpyaltivec],[-framework vecLib])
dnl Special arch tuning
AC_ARG_WITH(tuning,
(default i686 on IA-32 and 750 on PPC)])
Samuel Hocevar
committed
CFLAGS_TUNING="-mtune=${with_tuning}"
else
CFLAGS_TUNING="-mcpu=${with_tuning}"
fi
if test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "i486" -o "${target_cpu}" = "i386"; then CFLAGS_TUNING="-mcpu=pentiumpro"
if test "${target_cpu}" = "powerpc"; then CFLAGS_TUNING="-mtune=750"; fi
fi
fi
if test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "x86" -o "${target_cpu}" = "i386"
dnl
dnl Enable/disable optimizations
dnl
AC_ARG_ENABLE(optimizations,
Samuel Hocevar
committed
[ --disable-optimizations disable compiler optimizations (default enabled)])
test "${enable_optimizations}" != "no" && enable_optimizations="yes"
AC_ARG_ENABLE(altivec,
[ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
[ if test "${enable_altivec}" = "yes"; then ARCH="${ARCH} altivec";
[ if test "${target_cpu}" = "powerpc"; then ARCH="${ARCH} altivec";
AC_ARG_ENABLE(debug,
Samuel Hocevar
committed
[ --enable-debug debug mode (default disabled)])
Samuel Hocevar
committed
[ --enable-release activate extra optimizations (default disabled)])
dnl
dnl Stream output
dnl
AC_ARG_ENABLE(sout,
[ --enable-sout Stream output modules (default enabled)])
AX_ADD_PLUGINS([access_output_dummy access_output_udp access_output_file access_output_http])
AX_ADD_PLUGINS([mux_ts mux_ps mux_avi mux_mp4 mux_asf mux_dummy])
AX_ADD_PLUGINS([packetizer_mpegvideo])
AX_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
AX_ADD_PLUGINS([packetizer_copy])
AX_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp])
AX_ADD_PLUGINS([stream_out_duplicate stream_out_display stream_out_gather])
Christophe Massiot
committed
# AX_ADD_PLUGINS([stream_out_transrate])
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
dnl
dnl live.com input
dnl
AC_ARG_ENABLE(livedotcom,
[ --enable-livedotcom live.com input plugin (default disabled)])
if test "${enable_livedotcom}" = "yes"
then
AC_ARG_WITH(livedotcom-tree,
[ --with-livedotcom-tree=PATH live.com tree for static linking (required)])
dnl
dnl test for --with-livedotcom-tree
dnl
if test "${with_livedotcom_tree}" != "no" -a -n "${with_livedotcom_tree}";then
AC_MSG_CHECKING(for liveMedia/libliveMedia.a in ${with_livedotcom_tree})
real_livedotcom_tree="`cd ${with_livedotcom_tree} 2>/dev/null && pwd`"
if test -z "${real_livedotcom_tree}"; then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_livedotcom_tree}])
fi
if test -f "${real_livedotcom_tree}/liveMedia/libliveMedia.a"; then
AC_MSG_RESULT(${real_livedotcom_tree}/liveMedia/libliveMedia.a)
AX_ADD_BUILTINS([livedotcom])
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
AX_ADD_LDFLAGS([livedotcom],[-lws2_32])
fi
AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/liveMedia -lliveMedia])
AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/groupsock -lgroupsock])
AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/UsageEnvironment -lUsageEnvironment])
AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/BasicUsageEnvironment/include])
AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/groupsock/include])
AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/liveMedia/include])
AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/UsageEnvironment/include ])
else
dnl The given live.com wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_livedotcom_tree}/liveMedia/libliveMedia.a, make sure you compiled live.com in ${with_livedotcom_tree}])
fi
else
dnl The --with-livedotcom-tree isn't specified wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([You have to specify a tree with --with-livedotcom-tree])
fi
fi
dnl DVD module: optionally check for installed libdvdcss
dnl
AC_ARG_ENABLE(dvd,
[ --enable-dvd DVD input module (default enabled)])
Samuel Hocevar
committed
AC_ARG_WITH(dvdcss,
Samuel Hocevar
committed
AC_ARG_WITH(dvdcss-tree,
[ AX_ADD_PLUGINS([dvd])
AX_ADD_LDFLAGS([dvd dvdcss],[-ldvdcss])],
[ AC_MSG_WARN([libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.])
AC_MSG_ERROR([cannot find libdvdcss headers]) ])
else
AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
real_dvdcss_tree="`cd ${with_dvdcss_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_dvdcss_tree}])
fi
if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
then
dnl Use a custom libdvdcss
AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
AX_ADD_BUILTINS([dvd])
AX_ADD_LDFLAGS([dvd dvdcss],[-L${real_dvdcss_tree}/src/.libs -ldvdcss])
AX_ADD_CPPFLAGS([dvd],[-I${real_dvdcss_tree}/src])
else
dnl The given libdvdcss wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}])
fi
fi
AX_ADD_PLUGINS([dvd])
AX_ADD_CPPFLAGS([dvd],[-DGOD_DAMN_DMCA])
AX_ADD_LDFLAGS([dvd],[-ldl])
AC_MSG_CHECKING(for dvdcss headers in ${with_dvdcss})
if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
AX_ADD_PLUGINS([dvd])
AX_ADD_LDFLAGS([dvd dvdcss],[-L${with_dvdcss}/lib -ldvdcss])
AX_ADD_CPPFLAGS([dvd],[-I${with_dvdcss}/include])
dnl dvdread module: check for libdvdread
AC_ARG_ENABLE(dvdread,
[ --enable-dvdread dvdread input module (default disabled)])
Samuel Hocevar
committed
AC_ARG_WITH(dvdread,
[ --with-dvdread=PATH libdvdread headers and libraries])
AC_ARG_WITH(dvdread-tree,
[ --with-dvdread-tree=PATH libdvdread tree for static linking])
[ AX_ADD_PLUGINS([dvdread])
AX_ADD_LDFLAGS([dvdread],[-ldvdread ${LDFLAGS_dvdcss}])
],[
then
AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
AC_MSG_ERROR([cannot find libdvdread headers])
else
AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_dvdread_tree}])
fi
Samuel Hocevar
committed
if test -f "${real_dvdread_tree}/dvdread/.libs/libdvdread.a"
then
dnl Use a custom libdvdread
AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
AX_ADD_BUILTINS([dvdread])
AX_ADD_LDFLAGS([dvdread],[-L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LDFLAGS_dvdcss}])
AX_ADD_CPPFLAGS([dvdread],[-I${real_dvdread_tree}])
dnl The given libdvdread wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_dvdread_tree}/dvdread/.libs/libdvdread.a, make sure you compiled libdvdread in ${with_dvdread_tree}])
else
AC_MSG_CHECKING(for dvdread headers in ${with_dvdread})
then
AC_MSG_RESULT(yes)
AX_ADD_PLUGINS([dvdread])
AX_ADD_LDFLAGS([dvdread],[-L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}])
AX_ADD_CPPFLAGS([dvdread],[-I${with_dvdread}/include])
else
dnl No libdvdread could be found, sorry
AC_MSG_RESULT(no)
fi
fi
fi
dnl
dnl dvdplay module: check for libdvdplay
dnl
AC_ARG_ENABLE(dvdplay,
then
Samuel Hocevar
committed
AC_ARG_WITH(dvdplay,
[ --with-dvdplay=PATH libdvdplay headers and libraries])
AC_ARG_WITH(dvdplay-tree,
[ --with-dvdplay-tree=PATH libdvdplay tree for static linking])
then
then
AC_CHECK_HEADERS(dvdplay/dvdplay.h,[
AX_ADD_PLUGINS([dvdplay])
AX_ADD_LDFLAGS([dvdplay],[-ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}])
AX_ADD_CPPFLAGS([dvdplay],[${CPPFLAGS_dvdread}])
],[
then
AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
AC_MSG_ERROR([cannot find libdvdplay headers])
else
AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
real_dvdplay_tree="`cd ${with_dvdplay_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_dvdplay_tree}])
fi
Samuel Hocevar
committed
if test -f "${real_dvdplay_tree}/src/.libs/libdvdplay.a"
then
dnl Use a custom libdvdplay
AC_MSG_RESULT(${real_dvdplay_tree}/src/.libs/libdvdplay.a)
AX_ADD_BUILTINS([dvdplay])
AX_ADD_LDFLAGS([dvdplay],[-L${real_dvdplay_tree}/src/.libs -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}])
AX_ADD_CPPFLAGS([dvdplay],[${CPPFLAGS_dvdread} -I${real_dvdplay_tree}/src])
else
dnl The given libdvdplay wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_dvdplay_tree}/src/.libs/libdvdplay.a, make sure you compiled libdvdplay in ${with_dvdplay_tree}])
fi
fi
else
AC_MSG_CHECKING(for dvdplay headers in ${with_dvdplay})
then
dnl Use ${with_dvdplay}/include/dvdplay/dvdplay.h
AC_MSG_RESULT(yes)
AX_ADD_PLUGINS([dvdplay])
AX_ADD_LDFLAGS([dvdplay],[-L${with_dvdplay}/lib -ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}])
AX_ADD_CPPFLAGS([dvdplay],[${CPPFLAGS_dvdread} -I${with_dvdplay}/include])
else
dnl No libdvdplay could be found, sorry
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${with_dvdplay}/include/dvdplay/dvdplay.h])
fi
fi
dnl
dnl Windows DirectShow access module
dnl
AC_ARG_ENABLE(dshow,
[ --enable-dshow Win32 DirectShow support (default enabled on Win32)])
if test "${enable_dshow}" != "no"
then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
AC_CHECK_HEADERS(dshow.h,
[ AX_ADD_PLUGINS([dshow])
AX_ADD_CXXFLAGS([dshow],[])
AX_ADD_LDFLAGS([dshow],[-lole32 -loleaut32]) ])
fi
fi
Laurent Aimar
committed
dnl libdvbpsi ts demux/mux
dnl
AC_ARG_ENABLE(dvbpsi,
Laurent Aimar
committed
[ --enable-dvbpsi dvbpsi ts mux and demux module (default enabled)])
then
Samuel Hocevar
committed
AC_ARG_WITH(dvbpsi,
[ --with-dvbpsi=PATH libdvbpsi headers and libraries])
AC_ARG_WITH(dvbpsi,
[ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
then
[ AX_ADD_PLUGINS([ts_dvbpsi mux_ts_dvbpsi])
AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi],[-ldvbpsi]) ],
[ AC_MSG_WARN([cannot find libdvbpsi headers]) ],
[#if defined( HAVE_STDINT_H )
# include <stdint.h>
#elif defined( HAVE_INTTYPES_H )
# include <inttypes.h>
#endif
#include <dvbpsi/dvbpsi.h>
#include <dvbpsi/descriptor.h>
#include <dvbpsi/pat.h>
#include <dvbpsi/pmt.h>])
else
AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
real_dvbpsi_tree="`cd ${with_dvbpsi_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_dvbpsi_tree}])
fi
if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
then
dnl Use a custom libdvbpsi
AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
AX_ADD_BUILTINS([ts_dvbpsi mux_ts_dvbpsi])
AX_ADD_CPPFLAGS([ts_dvbpsi mux_ts_dvbpsi],[-I${real_dvbpsi_tree}/src])
AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi],[-L${real_dvbpsi_tree}/src/.libs -ldvbpsi])
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}"
AC_CHECK_HEADERS([dvbpsi/dr.h],[
AX_ADD_PLUGINS([ts_dvbpsi mux_ts_dvbpsi])
AX_ADD_CPPFLAGS([ts_dvbpsi mux_ts_dvbpsi],[${CPPFLAGS_test}])
AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi],[${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}"
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],[],[])
then
AX_ADD_CPPFLAGS([v4l],[-I${with_v4l}/include])
fi
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l}"
],[])
CPPFLAGS="${CPPFLAGS_save}"
Samuel Hocevar
committed
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 VCDX and CDDAX modules
dnl
AC_ARG_ENABLE(libcdio,
[ --enable-libcdio CDDA support via libcdio (default enabled)])
AC_ARG_ENABLE(libcddb,
[ --enable-libcddb CDDB support for CDDAX (default enabled)])
AC_ARG_ENABLE(vcdx,
[ --enable-vcdx VCD support with Navigation (default enabled)])
if test "${enable_cddax}" != "no"
then
PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.65,
[enable_cddax="no"
AC_DEFINE(HAVE_CDDAX, [], [Define for the CD-DA plugin using libcdio])
AX_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
AX_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
AX_ADD_PLUGINS([cddax])],
[AC_MSG_WARN(libcdio library not found)
HAVE_CDDAX=no])
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
if test x$enable_cddb != no; then
PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.4, [
HAVE_LIBCDDB=yes
AC_DEFINE(HAVE_LIBCDDB, [], [Define this if you have libcddb installed])
AX_ADD_LDFLAGS([cddax],[$LIBCDDB_LIBS])
AX_ADD_CFLAGS([cddax],[$LIBCDDB_CFLAGS])
],
[AC_MSG_WARN(new enough libcddb not found. CDDB access disabled)
HAVE_LIBCDDB=no])
fi
PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.65,
[enable_cddax="no"
AX_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
AX_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
AX_ADD_PLUGINS([cddax])],
[AC_MSG_WARN(libcdio library not found)])
if test "${enable_vcdx}" != "no"
then
PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.20-cdio,
[enable_vcd="no"
AC_DEFINE(HAVE_VCDX, [],
[Define for the VCD plugin using libcdio/libvcdinfo])
AX_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
AX_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
AX_ADD_PLUGINS([vcdx])],
[AC_MSG_WARN(vcdinfo library not found)
HAVE_VCDX=no])
[ --enable-vcd VCD support for Linux, FreeBSD, MacOS X and Win32 (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"
AX_ADD_PLUGINS([vcd cdda])
AX_ADD_LDFLAGS([vcd cdda],[-framework IOKit -framework CoreFoundation])
dnl
dnl Satellite input module
dnl
AC_ARG_ENABLE(satellite,
AC_DEFINE(HAVE_SATELLITE, [],
[Define for the VCD plugin using libcdio/libvcdinfo])
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
AX_ADD_CFLAGS([dvb],[-I${with_dvb}/include])
fi

Jean-Paul Saman
committed
CPPFLAGS="${CPPFLAGS_save} -I${with_dvb}/include"
AC_CHECK_HEADERS(linux/dvb/version.h linux/dvb/frontend.h, [
AX_ADD_PLUGINS([dvb])
],[])
CPPFLAGS="${CPPFLAGS_save}"
fi
Christophe Massiot
committed
dnl
dnl ipv6 plugin - not for QNX yet
Christophe Massiot
committed
dnl
if test "${SYS}" != "nto" && test "${SYS}" != "mingw32"
Samuel Hocevar
committed
have_ipv6=false
AC_CHECK_FUNCS(inet_pton,[have_ipv6=:],[
AC_CHECK_LIB(resolv,inet_pton,
Samuel Hocevar
committed
[have_ipv6=:
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=false])
Samuel Hocevar
committed
if ${have_ipv6}; then
fi
then
AC_MSG_CHECKING(for getaddrinfo in ws2tcpip.h)
AC_EGREP_HEADER(addrinfo,ws2tcpip.h,[AC_MSG_RESULT(yes)
Christophe Massiot
committed
dnl
AC_ARG_ENABLE(ogg,
[ --enable-ogg Ogg demux support (default enabled)])
AX_ADD_PLUGINS([ogg mux_ogg])
AX_ADD_LDFLAGS([ogg mux_ogg],[-logg])])
[ --enable-mkv Matroska demux support (default enabled)])
if test "${enable_mkv}" != "no"
AC_CHECK_HEADERS(ebml/EbmlVersion.h matroska/KaxVersion.h, [
AC_CHECK_HEADERS(matroska/KaxAttachments.h)
Samuel Hocevar
committed
AC_CHECK_LIB(ebml_pic,main,[
# We have ebml_pic, that's good, we can build an mkv.so plugin !
AX_ADD_LDFLAGS([mkv],[-lmatroska_pic -lebml_pic])
],[
AX_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
])
[ --enable-mad libmad module (default enabled)])
AX_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
AX_ADD_LDFLAGS([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
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}/libmad)
if test -f ${real_mad_tree}/libmad/mad.h
then
AC_MSG_RESULT(yes)
AX_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}/libmad])
AX_ADD_LDFLAGS([mpgatofixed32],[-L${real_mad_tree}/libmad/.libs])
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_mpgatofixed32}"
AX_ADD_BUILTINS([mpgatofixed32])
AX_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.]) ])
AX_ADD_PLUGINS([mpgatofixed32])
AX_ADD_LDFLAGS([mpgatofixed32],[-lmad])],
Samuel Hocevar
committed
CPPFLAGS="${CPPFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
dnl
dnl libid3tag support
dnl
AC_CHECK_HEADERS(id3tag.h, [
AX_ADD_LDFLAGS([id3tag],[-lid3tag -lz])
AX_ADD_PLUGINS([id3tag])]) ])
Samuel Hocevar
committed
dnl
dnl ffmpeg decoder plugin
dnl
AC_ARG_ENABLE(ffmpeg,
then
AC_ARG_WITH(ffmpeg-mp3lame,
[ --with-ffmpeg-mp3lame if ffmpeg has been compiled with mp3lame support],
[
dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
dnl linker would miserably barf on multiple definitions.
AX_ADD_LDFLAGS([stream_out_transcode],[])
AC_ARG_WITH(ffmpeg-faac,
[ --with-ffmpeg-faac if ffmpeg has been compiled with faac support],
[
dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
dnl linker would miserably barf on multiple definitions.
AX_ADD_LDFLAGS([stream_out_transcode],[])
AX_ADD_LDFLAGS([ffmpeg],[-lfaac]) ])
AC_ARG_WITH(ffmpeg-tree,
[ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
dnl
dnl test for !(--with-ffmpeg-tree)
dnl
if test "${with_ffmpeg_tree}" = "no" -o -z "${with_ffmpeg_tree}";then
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
AX_ADD_BUILTINS([ffmpeg stream_out_transcode])
AX_ADD_LDFLAGS([ffmpeg],[-lavcodec])
dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
dnl linker would miserably barf on multiple definitions.
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ])
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`"
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
fi
dnl Use a custom libffmpeg
AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
AX_ADD_BUILTINS([ffmpeg stream_out_transcode])
AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec -lavcodec])
AX_ADD_CPPFLAGS([ffmpeg],[-I${real_ffmpeg_tree}/libavcodec])
dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
dnl linker would miserably barf on multiple definitions.
AX_ADD_LDFLAGS([stream_out_transcode],[-L${real_ffmpeg_tree}/libavcodec])
AX_ADD_CPPFLAGS([stream_out_transcode],[-I${real_ffmpeg_tree}/libavcodec])
else
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
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)
AX_ADD_BUILTINS([faad])
AX_ADD_LDFLAGS([faad],[-L${real_faad_tree}/libfaad/.libs -lfaad])
AX_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, [
[ AC_MSG_ERROR([Cannot find libfaad library...]) ])
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
fi
fi
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
dnl dnl
dnl dnl xvid decoder plugin
dnl dnl
dnl AC_ARG_ENABLE(xvid,
dnl [ --enable-xvid xvid codec (default disabled)])
dnl if test "${enable_xvid}" = "yes"
dnl then
dnl AC_ARG_WITH(xvid,
dnl [ --with-xvid=PATH path to xvid installation],[],[])
dnl if test "${with_xvid}" != "no" -a -n "${with_xvid}"
dnl then
dnl AX_ADD_CPPFLAGS([xvid],[-I${with_xvid}/include])
dnl AX_ADD_LDFLAGS([xvid],[-L${with_xvid}/lib])
dnl fi
dnl
dnl AC_ARG_WITH(xvid-tree,
dnl [ --with-xvid-tree=PATH xvid tree for static linking])
dnl if test -n "${with_xvid_tree}"
dnl then
dnl AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
dnl real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
dnl if test -z "${real_xvid_tree}"
dnl then
dnl dnl The given directory can't be found
dnl AC_MSG_RESULT(no)
dnl AC_MSG_ERROR([cannot cd to ${with_xvid_tree}])
dnl fi
dnl if test -f "${real_xvid_tree}/build/generic/libxvidcore.a"
dnl then
dnl dnl Use a custom xvid
dnl AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a)
dnl AX_ADD_BUILTINS([xvid])
dnl AX_ADD_LDFLAGS([xvid],[-L${real_xvid_tree}/build/generic -lxvidcore])
dnl AX_ADD_CPPFLAGS([xvid],[-I${real_xvid_tree}/src])
dnl else
dnl dnl The given libxvidcore wasn't built
dnl AC_MSG_RESULT(no)
dnl AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}])
dnl fi
dnl else
dnl CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}"
dnl LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}"
dnl AC_CHECK_HEADERS(xvid.h, ,
dnl [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ])
dnl AC_CHECK_LIB(xvidcore, xvid_init, [
dnl AX_ADD_PLUGINS([xvid])
dnl AX_ADD_LDFLAGS([xvid],[-lxvidcore]) ],
dnl [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ])
dnl LDFLAGS="${LDFLAGS_save}"
dnl CPPFLAGS="${CPPFLAGS_save}"
dnl fi
dnl fi
Samuel Hocevar
committed
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")
if test "${SYS}" = "mingw32"; then
AX_ADD_BUILTINS([quicktime])
else
[ AX_ADD_BUILTINS([quicktime])
AX_ADD_LDFLAGS([quicktime],[-framework QuickTime -framework Carbon])
Samuel Hocevar
committed
dnl
dnl MP4 module
dnl
AX_ADD_LDFLAGS([mp4 skins skins2 sap],[-lz])
dnl
dnl skins module
dnl
AC_CHECK_HEADERS(libtar.h, [
AX_ADD_LDFLAGS([skins skins2],[-ltar])
[ --enable-a52 A/52 support with liba52 (default enabled)])
Samuel Hocevar
committed
AC_ARG_WITH(a52,
[ --with-a52=PATH a52 headers and libraries])
AC_ARG_WITH(a52-tree,
[ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
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)
AX_ADD_CPPFLAGS([a52tofloat32],[-I${real_a52_tree}])
AX_ADD_LDFLAGS([a52tofloat32],[-L${real_a52_tree}/liba52/.libs])
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
AX_ADD_BUILTINS([a52tofloat32])
AX_ADD_CPPFLAGS([a52tofloat32],[-DUSE_A52DEC_TREE])
AX_ADD_LDFLAGS([a52tofloat32],[-la52])
Samuel Hocevar
committed
AC_MSG_ERROR([make sure you have at least a52dec-0.7.3])
])
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"