Newer
Older
[# Darwin test
CFLAGS="${CFLAGS_save} -faltivec"
AC_TRY_COMPILE([],
[ac_cv_c_altivec="-faltivec"],
[# Linux/PPC test
CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -maltivec -mabi=altivec"
AC_TRY_COMPILE([#ifdef HAVE_ALTIVEC_H
#include <altivec.h>
#endif],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-maltivec -mabi=altivec"],
[# Linux/PPC test (old GCC versions)
CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
AC_TRY_COMPILE([#ifdef HAVE_ALTIVEC_H
#include <altivec.h>
#endif],
[vec_ld(0, (unsigned char *)0);],
[ac_cv_c_altivec="-fvec"],
[ac_cv_c_altivec=no])
])
Samuel Hocevar
committed
CFLAGS="${CFLAGS_save}"])
AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
AX_ADD_CFLAGS([vlc idctaltivec motionaltivec memcpyaltivec deinterlace i420_yuy2_altivec],[${ac_cv_c_altivec}])
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
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 packetizer_h264])
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])
dnl
dnl live.com input
dnl
AC_ARG_ENABLE(livedotcom,
[ --enable-livedotcom live.com input plugin (default disabled)])
AC_ARG_WITH(livedotcom-tree,
[ --with-livedotcom-tree=PATH live.com tree for static linking])
dnl
dnl test for --with-livedotcom-tree
dnl
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
if test -z "${with_livedotcom_tree}"; then
AC_LANG_PUSH(C++)
CPPFLAGS_save="${CPPFLAGS}"
CPPFLAGS_livedotcom="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_livedotcom}"
AC_CHECK_HEADERS(liveMedia.hh, [
AX_ADD_CXXFLAGS([livedotcom], [${CPPFLAGS_livedotcom}])
AC_CHECK_LIB(liveMedia_pic, main, [
# We have -lliveMedia_pic, build plugins
AX_ADD_PLUGINS([livedotcom])
AX_ADD_LDFLAGS([livedotcom], [-lliveMedia_pic -lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic])
], [
AC_CHECK_LIB(liveMedia, main, [
# We only have -lliveMedia, do builtins
AX_ADD_BUILTINS([livedotcom])
AX_ADD_LDFLAGS([livedotcom], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
])
])
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
AX_ADD_LDFLAGS([livedotcom],[-lws2_32])
fi
])
CPPFLAGS="${CPPFLAGS_save}"
AC_LANG_POP(C++)
else
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
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 libdvdnav plugin
dnl
AC_ARG_ENABLE(dvdnav,
[ --enable-dvdnav dvdnav input module (default enabled)])
then
DVDNAV_PATH="${PATH}"
AC_ARG_WITH(dvdnav-config-path,
[ --with-dvdnav-config-path=PATH dvdnav-config path (default search in \$PATH)],
[ if test "${with_dvdnav_config_path}" != "no"
then
DVDNAV_PATH="${with_dvdnav_config_path}:${PATH}"
fi ])
AC_PATH_PROG(DVDNAV_CONFIG, dvdnav-config, no, ${DVDNAV_PATH})
if test "${DVDNAV_CONFIG}" != "no"
then
AX_ADD_PLUGINS([dvdnav])
AX_ADD_CFLAGS([dvdnav],[`${DVDNAV_CONFIG} --cflags`])
AX_ADD_LDFLAGS([dvdnav],[`${DVDNAV_CONFIG} --libs`])
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 ts2])
AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi ts2],[-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 ts2])
AX_ADD_CPPFLAGS([ts_dvbpsi mux_ts_dvbpsi ts2],[-I${real_dvbpsi_tree}/src])
AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi ts2],[-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}"
AX_ADD_PLUGINS([ts_dvbpsi mux_ts_dvbpsi ts2])
AX_ADD_CPPFLAGS([ts_dvbpsi mux_ts_dvbpsi ts2],[${CPPFLAGS_test}])
AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi ts2],[${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)])
[ --enable-libcddb CDDB support for CDDAX (default enabled)])
[ --enable-vcdx VCD support with Navigation (default enabled)])

Jean-Paul Saman
committed
[ --enable-cdda CDDA plugin support (default enabled)])
AC_ARG_ENABLE(cddax,
[ --enable-cddax CDDAX plugin support (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])
Rocky Bernstein
committed
if test x$enable_libcddb != 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
if test "${enable_vcdx}" != "no"
then
PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.21,
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_LDFLAGS([vcd vcdx 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])])
if test "${enable_mkv}" != "no"; then
AC_LANG_PUSH(C++)
AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
AC_CHECK_HEADERS(matroska/KaxVersion.h, [
AC_CHECK_HEADERS(matroska/KaxAttachments.h)
AX_ADD_CXXFLAGS([mkv],[])
AC_CHECK_LIB(ebml_pic, main, [
# We have ebml_pic, that's good, we can build an mkv.so plugin !
AX_ADD_PLUGINS([mkv])
AX_ADD_LDFLAGS([mkv],[-lmatroska_pic -lebml_pic])
], [
AC_CHECK_LIB(ebml, main, [
# We only have libebml, make mkv.a a builtin
AX_ADD_BUILTINS([mkv])
AX_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
])
])
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_CHECK_HEADERS(libmodplug/modplug.h, [
AX_ADD_PLUGINS([mod])
AX_ADD_CXXFLAGS([mod],[])
AX_ADD_LDFLAGS([mod],[-lmodplug])])
fi
[ --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})
if test -f ${real_mad_tree}/mad.h
AX_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
AX_ADD_LDFLAGS([mpgatofixed32],[-L${real_mad_tree}/.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
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}"

Jean-Paul Saman
committed
AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
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.]) ])
AC_CHECK_LIB(avformat, av_open_input_stream, [
AC_DEFINE(HAVE_LIBAVFORMAT, 1,
[Define if you have ffmpeg's libavformat.])
AX_ADD_LDFLAGS([ffmpeg],[-lavformat -lz]) ])
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
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
dnl The given libavcodec wasn't built with --enable-pp
AC_MSG_RESULT(no)
AC_MSG_ERROR([${real_ffmpeg_tree}/libavcodec/libavcodec.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/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 -I${real_ffmpeg_tree}/libavformat])
if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then
AC_DEFINE(HAVE_LIBAVFORMAT, 1, [Define if you have ffmpeg's libavformat.])
AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat -lavformat -lz])
AX_ADD_CPPFLAGS([ffmpeg],[-I${real_ffmpeg_tree}/libavformat])
fi
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 -I${real_ffmpeg_tree}/libavformat])
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_LDFLAGS([faad],[${real_faad_tree}/libfaad/.libs/libfaad.a])
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_CHECK_LIB(faad, NeAACDecOpen, [
AX_ADD_PLUGINS([faad])
AX_ADD_LDFLAGS([faad],[-lfaad]) ],
[ AC_MSG_ERROR([Cannot find libfaad library...]) ]))
Samuel Hocevar
committed
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
fi
fi
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
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)