X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure.ac;h=aaae5a61cf301c53d2d37668529ae9a227b12ace;hb=a8d51df7c92b91b266aec2d3d654852496d9496e;hp=b4433ebdcbf7deeef2803ce0a21d40c970180268;hpb=689e6f400d7b96decb1a96d56a97b2ae67428664;p=vlc diff --git a/configure.ac b/configure.ac index b4433ebdcb..aaae5a61cf 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ dnl Autoconf settings for vlc -dnl $Id: configure.ac,v 1.103 2003/11/03 23:05:03 fenrir Exp $ +dnl $Id: configure.ac,v 1.184 2004/02/22 15:03:33 gbazin Exp $ -AC_INIT(vlc,0.6.3-cvs) +AC_INIT(vlc,0.7.1-test2) CONFIGURE_LINE="$0 $*" -CODENAME="Trevelyan" +CODENAME="Bond" AC_PREREQ(2.50) AC_CONFIG_SRCDIR(src/libvlc.c) @@ -13,7 +13,7 @@ AC_CANONICAL_SYSTEM dnl XXX: we don't put any flags here, because automake 1.5 doesn't support dnl them. And we need the comma otherwize automake will choke on it. -AM_INIT_AUTOMAKE(vlc,0.6.3-cvs) +AM_INIT_AUTOMAKE(vlc,0.7.1-test2) AM_CONFIG_HEADER(config.h) dnl @@ -28,6 +28,7 @@ AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CPP AC_PROG_CXX +AC_PROG_CXXCPP AC_PROG_MAKE_SET AC_PROG_INSTALL @@ -53,6 +54,7 @@ AC_CHECK_TOOL(STRIP, strip, :) AC_CHECK_TOOL(AR, ar, :) AC_CHECK_TOOL(LD, ld, :) +dnl Sam, if you think I didn't see that... --Meuuh dnl AM_PROG_LIBTOOL AC_PROG_INSTALL @@ -60,6 +62,32 @@ dnl Check for compiler properties AC_C_CONST AC_C_INLINE +dnl +dnl Check for the contrib directory +dnl +topdir="`pwd`" +if test -d ${topdir}/extras/contrib/lib; then + export PATH=${topdir}/extras/contrib/bin:$PATH + export LD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$LD_LIBRARY_PATH + export DYLD_LIBRARY_PATH=${topdir}/extras/contrib/lib:$DYLD_LIBRARY_PATH + CPPFLAGS="${CPPFLAGS} -I${topdir}/extras/contrib/include" + CPPFLAGS_save="${CPPFLAGS_save} -I${topdir}/extras/contrib/include" + CFLAGS="${CFLAGS} -I${topdir}/extras/contrib/include" + CFLAGS_save="${CFLAGS_save} -I${topdir}/extras/contrib/include" + CXXFLAGS="${CXXFLAGS} -I${topdir}/extras/contrib/include" + CXXFLAGS_save="${CXXFLAGS_save} -I${topdir}/extras/contrib/include" + OBJCFLAGS="${OBJCFLAGS} -I${topdir}/extras/contrib/include" + OBJCFLAGS_save="${OBJCFLAGS_save} -I${topdir}/extras/contrib/include" + if test -d ${topdir}/extras/contrib/vlc-lib; then + LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/vlc-lib" + LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/vlc-lib" + fi + LDFLAGS="${LDFLAGS} -L${topdir}/extras/contrib/lib" + LDFLAGS_save="${LDFLAGS_save} -L${topdir}/extras/contrib/lib" + with_livedotcom_tree=${topdir}/extras/contrib/src/live + with_goom_tree=${topdir}/extras/contrib/src/goom +fi + dnl dnl Set default values dnl @@ -91,6 +119,7 @@ case "${target_os}" in CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}" OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}" AX_ADD_LDFLAGS([vlc ffmpeg],[-all_load]) + AX_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation]) AX_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress]) LIBEXT=".dylib" ;; @@ -117,7 +146,7 @@ case "${target_os}" in # add ws2_32 for closesocket, select, recv CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}" AX_ADD_LDFLAGS([vlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows]) - AX_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_ftp access_output_udp sap slp http httpd stream_out_standard],[-lws2_32]) + AX_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http httpd stream_out_standard],[-lws2_32]) fi ;; *nto*) @@ -126,6 +155,9 @@ case "${target_os}" in ;; solaris*) SYS=solaris + # _POSIX_PTHREAD_SEMANTICS is needed to get the POSIX ctime_r + # Perhaps it is useful other places as well? + CFLAGS_save="${CFLAGS_save} -D_POSIX_PTHREAD_SEMANTICS"; CFLAGS="${CFLAGS_save}" ;; hpux*) SYS=hpux @@ -135,14 +167,11 @@ case "${target_os}" in SYS=beos CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}" CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}" + AX_ADD_CXXFLAGS([beos],[]) AX_ADD_LDFLAGS([vlc beos],[-lbe]) AX_ADD_LDFLAGS([beos],[-lmedia -ltranslation -ltracker -lgame]) - dnl Check for BONE presence - AC_CHECK_LIB(socket, connect, - AX_ADD_LDFLAGS([vlc access_mms ipv4 httpd],[-lsocket -lbind])) - - dnl Kludgy check for Zeta + dnl Ugly check for Zeta if test -f /boot/beos/system/lib/libzeta.so; then AX_ADD_LDFLAGS([beos],[-lzeta]) fi @@ -158,7 +187,7 @@ AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32") dnl dnl Gettext stuff dnl -ALL_LINGUAS="de en_GB es fr it ja nl no pl pt_BR ru sv" +ALL_LINGUAS="de en_GB es fr hu it ja nl no pl pt_BR ru sv" AM_GNU_GETTEXT_VERSION(0.11.5) AM_GNU_GETTEXT if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then @@ -175,6 +204,14 @@ fi AM_CONDITIONAL(BUILD_INTL, test "${nls_cv_force_use_gnu_gettext}" = "yes") XGETTEXT="${XGETTEXT} --keyword=_NS --keyword=_ANS" +AC_ARG_ENABLE(utf8, + [ --enable-utf8 unicode utf8 support (default enabled on darwin/beos/win32)]) +if test "${enable_utf8}" = "yes" || (test "${enable_utf8}" != "no" && (test "${SYS}" = "mingw32" || test "${SYS}" = "beos" || test "${SYS}" = "darwin" ) ) +then + AC_DEFINE(ENABLE_UTF8, 1, + Define if you want utf8 support) +fi + AC_MSG_CHECKING(for suffix of libraries) AC_MSG_RESULT(${LIBEXT}) @@ -249,7 +286,7 @@ CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcd dnl Check for system libs needed need_libc=false -AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r) +AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r) dnl Check for usual libc functions AC_CHECK_FUNCS(strdup strndup atof lseek) @@ -274,22 +311,22 @@ fi AC_CHECK_FUNCS(connect,,[ AC_CHECK_LIB(socket,connect,[ - AX_ADD_LDFLAGS([vlc ipv4],-lsocket) + AX_ADD_LDFLAGS([vlc ipv4 cddax],-lsocket) ]) ]) AC_CHECK_FUNCS(send,,[ AC_CHECK_LIB(socket,send,[ - AX_ADD_LDFLAGS([access_http access_mms access_udp access_ftp sap http access_output_udp],[-lsocket]) + AX_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp sap httpd access_output_udp stream_out_standard],[-lsocket]) ]) ]) AC_CHECK_FUNCS(gethostbyname,,[ AC_CHECK_LIB(nsl,gethostbyname,[ - AX_ADD_LDFLAGS([ipv4 httpd vlc],[-lnsl]) + AX_ADD_LDFLAGS([cddax ipv4 httpd vlc],[-lnsl]) ],[ AC_CHECK_LIB(bind,gethostbyname,[ - AX_ADD_LDFLAGS([ipv4 httpd],[-lbind]) + AX_ADD_LDFLAGS([ipv4 access_mms httpd],[-lbind]) ]) ]) ]) @@ -349,10 +386,10 @@ AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt}) if test "${SYS}" != "mingw32"; then AC_TYPE_SIGNAL AC_CHECK_LIB(m,cos,[ - AX_ADD_LDFLAGS([adjust distort a52tofloat32],[-lm]) + AX_ADD_LDFLAGS([adjust distort a52tofloat32 dtstofloat32],[-lm]) ]) AC_CHECK_LIB(m,pow,[ - AX_ADD_LDFLAGS([ffmpeg stream_out_transcode i420_rgb faad],[-lm]) + AX_ADD_LDFLAGS([ffmpeg stream_out_transcode stream_out_transrate i420_rgb faad vlc],[-lm]) ]) AC_CHECK_LIB(m,sqrt,[ AX_ADD_LDFLAGS([headphone_channel_mixer],[-lm]) @@ -845,8 +882,8 @@ dnl dnl default modules dnl AX_ADD_PLUGINS([dummy rc logger gestures memcpy hotkeys]) -AX_ADD_PLUGINS([es mpga m4v mpeg_system ps ts avi asf aac mp4 rawdv]) -AX_ADD_PLUGINS([spudec mpeg_audio lpcm a52 dts cinepak]) +AX_ADD_PLUGINS([mpgv mpga m4v mpeg_system ps ps2 pva ts avi asf aac mp4 rawdv demux2 nsv real aiff]) +AX_ADD_PLUGINS([cvdsub svcdsub spudec dvbsub mpeg_audio lpcm a52 dts cinepak]) AX_ADD_PLUGINS([deinterlace invert adjust wall transform distort clone crop motionblur]) AX_ADD_PLUGINS([float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32]) AX_ADD_PLUGINS([trivial_resampler ugly_resampler linear_resampler bandlimited_resampler]) @@ -855,10 +892,10 @@ AX_ADD_PLUGINS([trivial_mixer spdif_mixer float32_mixer]) AX_ADD_PLUGINS([aout_file]) #AX_ADD_PLUGINS([scope]) AX_ADD_PLUGINS([i420_rgb i420_yuy2 i422_yuy2 i420_ymga]) -AX_ADD_PLUGINS([id3 m3u]) +AX_ADD_PLUGINS([id3 m3u playlist export]) AX_ADD_PLUGINS([rawvideo]) -AX_ADD_PLUGINS([wav araw demuxdump demuxsub adpcm a52sys au]) -AX_ADD_PLUGINS([access_file access_udp access_http ipv4 access_mms]) +AX_ADD_PLUGINS([wav araw demuxdump demuxsub adpcm a52sys dtssys au]) +AX_ADD_PLUGINS([access_file access_udp access_tcp access_http ipv4 access_mms]) AX_ADD_PLUGINS([access_ftp access_directory sap httpd http]) dnl @@ -889,7 +926,7 @@ MMXEXT_MODULES="memcpymmxext" #MMXEXT_MODULES="${MMXEXT_MODULES} idctmmxext motionmmxext" THREEDNOW_MODULES="memcpy3dn" SSE_MODULES="" -ALTIVEC_MODULES="memcpyaltivec" +ALTIVEC_MODULES="memcpyaltivec i420_yuy2_altivec" #ALTIVEC_MODULES="${ALTIVEC_MODULES} idctaltivec motionaltivec" if test "${enable_gprof}" != "yes" @@ -903,6 +940,7 @@ AC_CACHE_CHECK([if \$CC groks MMX inline assembly], AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));], ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)]) if test "${ac_cv_mmx_inline}" != "no"; then + AC_DEFINE(CAN_COMPILE_MMX, 1, Define if \$CC groks MMX inline assembly.) ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}" fi @@ -912,6 +950,7 @@ AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly], AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));], ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)]) if test "${ac_cv_mmxext_inline}" != "no"; then + AC_DEFINE(CAN_COMPILE_MMXEXT, 1, Define if \$CC groks MMX EXT inline assembly.) ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}" fi @@ -971,7 +1010,7 @@ AC_CACHE_CHECK([if \$CC groks AltiVec C extensions], CFLAGS="${CFLAGS_save}"]) if test "${ac_cv_c_altivec}" != "no"; then AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.) - AX_ADD_CFLAGS([vlc idctaltivec motionaltivec memcpyaltivec],[${ac_cv_c_altivec}]) + AX_ADD_CFLAGS([vlc idctaltivec motionaltivec memcpyaltivec deinterlace i420_yuy2_altivec],[${ac_cv_c_altivec}]) ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}" fi @@ -1002,7 +1041,8 @@ if test -n "${with_tuning}"; then CFLAGS_TUNING="-mcpu=${with_tuning}" fi else - 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}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "i486" -o "${target_cpu}" = "i386"; then + CFLAGS_TUNING="-mcpu=pentiumpro" else if test "${target_cpu}" = "powerpc"; then CFLAGS_TUNING="-mtune=750"; fi fi @@ -1063,6 +1103,7 @@ then 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]) +# AX_ADD_PLUGINS([stream_out_transrate]) dnl Ogg and vorbis are handled in their respective section fi @@ -1074,6 +1115,80 @@ dnl AC_ARG_WITH(,[Input plugins:]) +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]) + + dnl + dnl test for --with-livedotcom-tree + dnl + 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 dnl DVD module: optionally check for installed libdvdcss dnl @@ -1270,11 +1385,34 @@ then fi fi +dnl +dnl libdvdnav plugin +dnl +AC_ARG_ENABLE(dvdnav, + [ --enable-dvdnav dvdnav input module (default enabled)]) +if test "${enable_caca}" != "no" +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)]) + [ --enable-dshow Win32 DirectShow support (default enabled on Win32)]) if test "${enable_dshow}" != "no" then if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin" @@ -1302,8 +1440,8 @@ then if test -z "${with_dvbpsi_tree}" then AC_CHECK_HEADERS(dvbpsi/dr.h, - [ AX_ADD_PLUGINS([ts_dvbpsi mux_ts_dvbpsi]) - AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi],[-ldvbpsi]) ], + [ 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 @@ -1327,9 +1465,9 @@ then 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]) + 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) @@ -1352,9 +1490,9 @@ then fi 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]) + 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]) ],[ if test -n "${enable_dvbpsi}" @@ -1398,6 +1536,57 @@ then AX_ADD_PLUGINS([pvr]) fi +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)]) + +AC_ARG_ENABLE(cdda, + [ --enable-cdda CDDA 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]) + + 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.20, + [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]) + fi +fi + dnl dnl VCD module dnl @@ -1444,29 +1633,6 @@ then fi fi -dnl -dnl VCDX and CDX modules -dnl -AC_ARG_ENABLE(vcdx, - [ --enable-vcdx VCD support with Navigation for Linux and Win32 (default enabled)]) - -if test "${enable_vcdx}" != "no" -then - PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.63, - [enable_cdda="no" - AX_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS]) - AX_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS]) - AX_ADD_PLUGINS([cddax])], - [AC_MSG_WARN(libcdio library not found)]) - - PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.18-cdio, - [enable_vcd="no" - AX_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS]) - AX_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS]) - AX_ADD_PLUGINS([vcdx])], - [AC_MSG_WARN(vcdinfo library not found)]) -fi - dnl dnl Satellite input module dnl @@ -1474,6 +1640,8 @@ AC_ARG_ENABLE(satellite, [ --enable-satellite satellite card support (default disabled)], [ if test "${enable_satellite}" = "yes" then + AC_DEFINE(HAVE_SATELLITE, [], + [Define for the VCD plugin using libcdio/libvcdinfo]) AX_ADD_PLUGINS([satellite]) fi]) @@ -1532,8 +1700,6 @@ if test "${enable_ogg}" != "no" then AC_CHECK_HEADERS(ogg/ogg.h, [ AC_CHECK_LIB( ogg, oggpack_read, [ - AC_CHECK_LIB( ogg, oggpackB_read, [ - AX_ADD_CPPFLAGS([ogg],[-DHAVE_OGGPACKB])]) AX_ADD_PLUGINS([ogg mux_ogg]) AX_ADD_LDFLAGS([ogg mux_ogg],[-logg])]) ],[]) @@ -1544,22 +1710,39 @@ dnl matroska demux plugin dnl AC_ARG_ENABLE(mkv, [ --enable-mkv Matroska demux support (default enabled)]) -if test "${enable_mkv}" != "no" -then -AC_LANG_PUSH(C++) - AC_CHECK_HEADERS(ebml/EbmlVersion.h matroska/KaxVersion.h, [ - AC_CHECK_HEADERS(matroska/KaxAttachments.h) - AX_ADD_PLUGINS([mkv]) - 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_LDFLAGS([mkv],[-lmatroska_pic -lebml_pic]) - ],[ - AX_ADD_LDFLAGS([mkv],[-lmatroska -lebml]) +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]) + ]) + ]) ]) ]) - CPPFLAGS="${CPPFLAGS_save}" -AC_LANG_POP(C++) + AC_LANG_POP(C++) +fi + +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 dnl @@ -1635,7 +1818,7 @@ AC_CHECK_HEADERS(id3tag.h, [ AX_ADD_PLUGINS([id3tag])]) ]) dnl -dnl ffmpeg decoder plugin +dnl ffmpeg decoder/demuxer plugin dnl AC_ARG_ENABLE(ffmpeg, [ --enable-ffmpeg ffmpeg codec (default enabled)]) @@ -1663,10 +1846,11 @@ then dnl dnl test for !(--with-ffmpeg-tree) dnl - if test "${with_ffmpeg_tree}" = "no" -o -z "${with_ffmpeg_tree}";then + if test "${with_ffmpeg_tree}" = "no" -o -z "${with_ffmpeg_tree}"; then CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}" LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}" - AC_CHECK_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h) + 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.])] ) AC_CHECK_LIB(avcodec, avcodec_init, [ AX_ADD_BUILTINS([ffmpeg stream_out_transcode]) AX_ADD_LDFLAGS([ffmpeg],[-lavcodec]) @@ -1674,6 +1858,10 @@ then dnl linker would miserably barf on multiple definitions. AX_ADD_LDFLAGS([stream_out_transcode],[]) ], [ 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]) ]) LDFLAGS="${LDFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}" fi @@ -1681,7 +1869,7 @@ then dnl dnl test for --with-ffmpeg-tree dnl - if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}";then + 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 @@ -1689,22 +1877,32 @@ then 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 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 + 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 ! grep -q "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]) + + 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]) fi fi @@ -1754,58 +1952,58 @@ then fi -dnl -dnl xvid decoder plugin -dnl -AC_ARG_ENABLE(xvid, -[ --enable-xvid xvid codec (default disabled)]) -if test "${enable_xvid}" = "yes" -then - AC_ARG_WITH(xvid, - [ --with-xvid=PATH path to xvid installation],[],[]) - if test "${with_xvid}" != "no" -a -n "${with_xvid}" - then - AX_ADD_CPPFLAGS([xvid],[-I${with_xvid}/include]) - AX_ADD_LDFLAGS([xvid],[-L${with_xvid}/lib]) - fi - - AC_ARG_WITH(xvid-tree, - [ --with-xvid-tree=PATH xvid tree for static linking]) - if test -n "${with_xvid_tree}" - then - AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree}) - real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`" - if test -z "${real_xvid_tree}" - then - dnl The given directory can't be found - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot cd to ${with_xvid_tree}]) - fi - if test -f "${real_xvid_tree}/build/generic/libxvidcore.a" - then - dnl Use a custom xvid - AC_MSG_RESULT(${real_xvid_tree}/build/generic/libxvidcore.a) - AX_ADD_BUILTINS([xvid]) - AX_ADD_LDFLAGS([xvid],[-L${real_xvid_tree}/build/generic -lxvidcore]) - AX_ADD_CPPFLAGS([xvid],[-I${real_xvid_tree}/src]) - else - dnl The given libxvidcore wasn't built - AC_MSG_RESULT(no) - AC_MSG_ERROR([cannot find ${real_xvid_tree}/build/generic/libxvidcore.a, make sure you compiled libxvidcore in ${with_xvid_tree}]) - fi - else - CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xvid}" - LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xvid}" - AC_CHECK_HEADERS(xvid.h, , - [ AC_MSG_ERROR([Cannot find development headers for libxvidcore...]) ]) - AC_CHECK_LIB(xvidcore, xvid_init, [ - AX_ADD_PLUGINS([xvid]) - AX_ADD_LDFLAGS([xvid],[-lxvidcore]) ], - [ AC_MSG_ERROR([Cannot find libxvidcore library...]) ]) - LDFLAGS="${LDFLAGS_save}" - CPPFLAGS="${CPPFLAGS_save}" - fi -fi +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 dnl dnl QuickTime plugin @@ -1829,21 +2027,24 @@ dnl dnl MP4 module dnl AC_CHECK_HEADERS(zlib.h, [ - AX_ADD_LDFLAGS([mp4 skins],[-lz]) + AX_ADD_LDFLAGS([mp4 skins skins2 sap],[-lz]) ] ) +AC_CHECK_HEADERS(sysfs/libsysfs.h, [ + AX_ADD_LDFLAGS([mp4],[-lsysfs]) +] ) dnl dnl skins module dnl AC_CHECK_HEADERS(libtar.h, [ - AX_ADD_LDFLAGS([skins],[-ltar]) + AX_ADD_LDFLAGS([skins skins2],[-ltar]) ] ) dnl -dnl a52 AC3 decoder plugin +dnl A52/AC3 decoder plugin dnl AC_ARG_ENABLE(a52, [ --enable-a52 A/52 support with liba52 (default enabled)]) @@ -1913,18 +2114,74 @@ then fi dnl -dnl DV plugin +dnl DTS Coherent Acoustics decoder plugin dnl -AC_ARG_ENABLE(dv, - [ --enable-dv DV decoder support (deprecated in favor of ffmpeg) (default disabled)]) -if test "${enable_dv}" = "yes" -then - AC_CHECK_HEADERS(libdv/dv.h, [ - AX_ADD_PLUGINS([dv]) - AX_ADD_LDFLAGS([dv],[-ldv]) - ],[]) +AC_ARG_ENABLE(dts, + [ --enable-dts DTS Coherent Acoustics support with libdts (default enabled)]) +if test "${enable_dts}" != "no"; then + AC_ARG_WITH(dts-tree, + [ --with-dts-tree=PATH dtsdec tree for static linking ],[],[]) + if test "${with_dts_tree}" != "no" -a -n "${with_dts_tree}" + then + real_dts_tree="`cd ${with_dts_tree} 2>/dev/null && pwd`" + if test -z "${real_dts_tree}" + then + dnl The given directory can't be found + AC_MSG_RESULT(no) + AC_MSG_ERROR([${with_dts_tree} directory doesn't exist]) + fi + dnl Use a custom dtsdec + AC_MSG_CHECKING(for dts.h in ${real_dts_tree}/include) + if test -f ${real_dts_tree}/include/dts.h + then + AC_MSG_RESULT(yes) + AX_ADD_CPPFLAGS([dtstofloat32],[-I${real_dts_tree}]) + AX_ADD_LDFLAGS([dtstofloat32],[-L${real_dts_tree}/libdts/.libs]) + LDFLAGS="${LDFLAGS_save} ${LDFLAGS_dtstofloat32}" + AC_CHECK_LIB(dts, dts_free, [ + AX_ADD_BUILTINS([dtstofloat32]) + AX_ADD_CPPFLAGS([dtstofloat32],[-DUSE_DTSDEC_TREE]) + AX_ADD_LDFLAGS([dtstofloat32],[-ldts]) + ],[ + if test -f ${real_dts_tree}/libdts/.libs/libdts.a + then + AC_MSG_ERROR([make sure you have at least dtsdec-0.1.0]) + else + AC_MSG_ERROR([the specified tree hasn't been compiled]) + fi + ]) + LDFLAGS="${LDFLAGS_save}" + else + AC_MSG_RESULT(no) + AC_MSG_ERROR([the specified tree doesn't have dts.h]) + fi + else + AC_CHECK_HEADERS(dtsdec/dts.h, [ + AC_CHECK_LIB(dts, dts_free, [ + AX_ADD_PLUGINS([dtstofloat32]) + AX_ADD_LDFLAGS([dtstofloat32],[-ldts]) + ],[ + if test "${enable_dts}" = "yes"; then + AC_MSG_ERROR([Could not find libdts on your system: you may get it from http://www.videolan.org/dtsdec.]) + fi + ]) + ]) + fi fi +dnl dnl +dnl dnl DV plugin +dnl dnl +dnl AC_ARG_ENABLE(dv, +dnl [ --enable-dv DV decoder support (deprecated in favor of ffmpeg) (default disabled)]) +dnl if test "${enable_dv}" = "yes" +dnl then +dnl AC_CHECK_HEADERS(libdv/dv.h, [ +dnl AX_ADD_PLUGINS([dv]) +dnl AX_ADD_LDFLAGS([dv],[-ldv]) +dnl ],[]) +dnl fi + dnl dnl Flac plugin dnl @@ -2023,7 +2280,7 @@ dnl dnl Speex plugin dnl AC_ARG_ENABLE(speex, - [ --enable-speex Speex decoder support (default enabled)]) + [ --enable-speex Speex decoder support (default enabled)]) if test "${enable_speex}" != "no" then AC_CHECK_HEADERS(speex.h, [ @@ -2098,7 +2355,10 @@ dnl png dnl AC_CHECK_HEADERS(png.h, [ AX_ADD_LDFLAGS([logo],[-lpng -lz]) - AX_ADD_PLUGINS([logo])]) + AX_ADD_PLUGINS([logo]) + AX_ADD_LDFLAGS([svcdsub],[-lpng -lz]) + AX_ADD_LDFLAGS([cvdsub],[-lpng -lz]) + AC_DEFINE(HAVE_LIBPNG, [], [Define if you have the PNG library: libpng])]) dnl dnl Video plugins @@ -2279,7 +2539,6 @@ then AX_ADD_LDFLAGS([freetype],[`${FREETYPE_CONFIG} --libs` ${LIBICONV}]) AC_CHECK_HEADERS(Carbon/Carbon.h, [AX_ADD_LDFLAGS([freetype],[-framework Carbon])]) - CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_freetype}" elif test "${enable_freetype}" = "yes" then AC_MSG_ERROR([I couldn't find the freetype package. You can download libfreetype2 @@ -2327,7 +2586,7 @@ then fi AX_ADD_PLUGINS([qte]) NEED_QTE_MAIN=yes - CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}" + CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}" AC_CHECK_HEADERS(qt.h jpeglib.h, ,[ AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."]) ] ) @@ -2451,6 +2710,29 @@ then fi fi +dnl +dnl libcaca plugin +dnl +AC_ARG_ENABLE(caca, + [ --enable-caca libcaca output (default disabled)]) +if test "${enable_caca}" = "yes" +then + CACA_PATH="${PATH}" + AC_ARG_WITH(caca-config-path, + [ --with-caca-config-path=PATH caca-config path (default search in \$PATH)], + [ if test "${with_caca_config_path}" != "no" + then + CACA_PATH="${with_caca_config_path}:${PATH}" + fi ]) + AC_PATH_PROG(CACA_CONFIG, caca-config, no, ${CACA_PATH}) + if test "${CACA_CONFIG}" != "no" + then + AX_ADD_PLUGINS([caca]) + AX_ADD_CFLAGS([caca],[`${CACA_CONFIG} --cflags`]) + AX_ADD_LDFLAGS([caca],[`${CACA_CONFIG} --plugin-libs`]) + fi +fi + dnl dnl win32 GDI plugin dnl @@ -2597,20 +2879,90 @@ if test "${enable_skins}" != "no"; then AX_ADD_LDFLAGS([skins],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32]) else if test "${enable_skins}" = "yes"; then - IMLIB2_PATH="${PATH}" - AC_PATH_PROG(IMLIB2_CONFIG_SKINS, imlib2-config, no, ${IMLIB2_PATH}) - if test "${IMLIB2_CONFIG_SKINS}" = "no"; then - AC_MSG_ERROR([Couldn't find the imlib2 package. You can download imlib2 from http://enlightenment.org/, or configure with --disable-skins.]) - fi - AX_ADD_PLUGINS([skins]) ALIASES="${ALIASES} svlc" - AX_ADD_CPPFLAGS([skins],[-Imodules/gui/skins -I${x_includes} `${IMLIB2_CONFIG_SKINS} --cflags` -DX11_SKINS]) + AX_ADD_CPPFLAGS([skins],[-Imodules/gui/skins -I${x_includes} -I/usr/include/freetype2 -DX11_SKINS]) AX_ADD_CXXFLAGS([skins],[-O2 -fno-rtti]) - AX_ADD_LDFLAGS([skins],[-L${x_libraries} -lXext -lX11 `${IMLIB2_CONFIG_SKINS} --libs`]) + AX_ADD_LDFLAGS([skins],[-L${x_libraries} -lImlib2 -lXext -lX11 -lfreetype -lpng -lz ]) + fi fi +fi + +dnl +dnl Skins2 module +dnl +AC_ARG_ENABLE(skins2, + [ --enable-skins2 Skins2 interface module (experimental)]) +if test "${enable_skins2}" = "yes" || (test "${SYS}" != "darwin" && test "${SYS}" != "beos" && test "${enable_skins2}" != "no"); then + + dnl test for the required libraries + skins2_missing_lib="no" + + dnl freetype + if test "${FREETYPE_CONFIG}" != "no"; then + AX_ADD_CPPFLAGS([skins2],[`${FREETYPE_CONFIG} --cflags`]) + AX_ADD_LDFLAGS([skins2],[`${FREETYPE_CONFIG} --libs`]) + else + skins2_missing_lib="yes" + if test "${enable_skins2}" = "yes"; then + AC_MSG_ERROR([Could not find freetype (required for skins2)]) + fi + fi + + dnl iconv + if test "$am_cv_func_iconv" = "yes"; then + AX_ADD_CPPFLAGS([skins2],[${INCICONV}]) + AX_ADD_LDFLAGS([skins2],[${LIBICONV} -lpng]) + else + skins2_missing_lib="yes" + if test "${enable_skins2}" = "yes"; then + AC_MSG_ERROR([Could not find iconv (required for skins2)]) + fi + fi + + dnl libxml2 + XML2_PATH="${PATH}" + AC_ARG_WITH(xml2-config-path, + [ --with-xml2-config-path=PATH xml2-config path (default search in \$PATH)], + [ if test "${with_xml2_config_path}" != "no"; then + XML2_PATH="${with_xml2_config_path}:${PATH}" + fi ]) + AC_PATH_PROG(XML2_CONFIG, xml2-config, no, ${XML2_PATH}) + if test "${XML2_CONFIG}" != "no"; then + AX_ADD_CPPFLAGS([skins2],[`${XML2_CONFIG} --cflags`]) + AX_ADD_LDFLAGS([skins2],[`${XML2_CONFIG} --libs`]) + dnl skins2 depends on the xmlTextReader extension + LDFLAGS="${LDFLAGS_save} ${LDFLAGS_skins2}" + AC_CHECK_LIB(xml2,xmlTextReaderConstName,[],[ + skins2_missing_lib="yes" + AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version]) + if test "${enable_skins2}" = "yes"; then + AC_MSG_ERROR([libxml2 missing the xmlTextReader extension (required for skins2)]) + fi]) + LDFLAGS="${LDFLAGS_save}" + else + skins2_missing_lib="yes" + if test "${enable_skins2}" = "yes"; then + AC_MSG_ERROR([Could not find libxml2 (required for skins2)]) + fi + fi + + if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"); then + AX_ADD_PLUGINS([skins2]) + ALIASES="${ALIASES} svlc" + AX_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS]) + AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti]) + AX_ADD_LDFLAGS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32]) + + else if test "${skins2_missing_lib}" = "no"; then + AX_ADD_PLUGINS([skins2]) + ALIASES="${ALIASES} svlc" + AX_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -I${x_includes} -DX11_SKINS]) + AX_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti]) + AX_ADD_LDFLAGS([skins2],[-L${x_libraries} -lXext -lX11]) fi fi fi + dnl dnl Gtk+ module dnl @@ -2866,7 +3218,7 @@ AC_ARG_ENABLE(opie, AX_ADD_LDFLAGS([qte],[-L${QTDIR}/lib `echo -L${QTDIR}/lib | sed 's,opt/QtPalmtop,usr,'`]) AX_ADD_CXXFLAGS([qte],[-I${QTDIR}/include `echo -I${QTDIR}/include | sed 's,opt/QtPalmtop,usr,'`]) fi - CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_qte}" + CPPFLAGS="${CPPFLAGS_save} ${CXXFLAGS_qte}" AC_CHECK_HEADERS(qt.h jpeglib.h, ,[ AC_MSG_ERROR([echo "Cannot find QT Embedded development headers."]) ] ) @@ -2892,11 +3244,11 @@ AC_ARG_ENABLE(macosx, [if test "${enable_macosx}" = "yes" then AX_ADD_BUILTINS([macosx]) - AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC]) + AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL]) fi], [AC_CHECK_HEADERS(Cocoa/Cocoa.h, AX_ADD_BUILTINS([macosx]) - AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC]) + AX_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL]) )]) dnl @@ -2948,7 +3300,7 @@ dnl dnl Visualisation plugin dnl AC_ARG_ENABLE(visual, - [ --enable-visual visualisation plugin (default enabled)]) + [ --enable-visual visualisation plugin (default enabled)]) if test "${enable_visual}" != "no" then AX_ADD_PLUGINS([visual]) @@ -2958,7 +3310,7 @@ dnl dnl goom visualization plugin dnl AC_ARG_ENABLE(goom, -[ --enable-goom goom visualisation plugin (default disabled)]) +[ --enable-goom goom visualisation plugin (default disabled)]) if test "${enable_goom}" = "yes" then AC_ARG_WITH(goom-tree, @@ -2967,7 +3319,7 @@ then dnl dnl test for --with-goom-tree dnl - if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}";then + if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}"; then AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree}) real_goom_tree="`cd ${with_goom_tree} 2>/dev/null && pwd`" if test -z "${real_goom_tree}"; then @@ -3232,8 +3584,8 @@ fi if test "${NEED_GNOME_MAIN}" != "no" then AX_ADD_PLUGINS([gnome_main]) - AX_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_pda} ${CFLAGS_gnome}]) - AX_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_pda} ${LDFLAGS_gnome}]) + AX_ADD_CFLAGS([gnome_main],[${CFLAGS_gtk} ${CFLAGS_gnome}]) + AX_ADD_LDFLAGS([gnome_main],[${LDFLAGS_gtk} ${LDFLAGS_gnome}]) fi if test "${NEED_GTK2_MAIN}" != "no" @@ -3321,7 +3673,7 @@ AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version st AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string]) AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line]) -VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-/__/'`" +VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-+/___/'`" AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions]) AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions]) AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension]) @@ -3370,9 +3722,7 @@ AX_VLC_SUBSTS dnl Create vlc-config.in AX_OUTPUT_VLC_CONFIG_IN -AC_OUTPUT([ - vlc-config - +AC_CONFIG_FILES([ Makefile autotools/Makefile debian/Makefile @@ -3386,7 +3736,9 @@ AC_OUTPUT([ po/Makefile.in share/Makefile src/Makefile +]) +AC_CONFIG_FILES([ modules/access/Makefile modules/access/dshow/Makefile modules/access/dvb/Makefile @@ -3397,6 +3749,7 @@ AC_OUTPUT([ modules/access/pvr/Makefile modules/access/satellite/Makefile modules/access/v4l/Makefile + modules/access/cdda/Makefile modules/access/vcd/Makefile modules/access/vcdx/Makefile modules/access_output/Makefile @@ -3409,6 +3762,7 @@ AC_OUTPUT([ modules/codec/Makefile modules/codec/ffmpeg/Makefile modules/codec/ffmpeg/postprocessing/Makefile + modules/codec/ogt/Makefile modules/codec/spudec/Makefile modules/control/Makefile modules/control/corba/Makefile @@ -3419,6 +3773,7 @@ AC_OUTPUT([ modules/demux/avi/Makefile modules/demux/mp4/Makefile modules/demux/mpeg/Makefile + modules/demux/playlist/Makefile modules/demux/util/Makefile modules/gui/Makefile modules/gui/beos/Makefile @@ -3431,6 +3786,7 @@ AC_OUTPUT([ modules/gui/qnx/Makefile modules/gui/qt/Makefile modules/gui/skins/Makefile + modules/gui/skins2/Makefile modules/gui/wxwindows/Makefile modules/misc/Makefile modules/misc/dummy/Makefile @@ -3438,10 +3794,12 @@ AC_OUTPUT([ modules/misc/memcpy/Makefile modules/misc/network/Makefile modules/misc/testsuite/Makefile + modules/misc/playlist/Makefile modules/mux/Makefile modules/mux/mpeg/Makefile modules/packetizer/Makefile modules/stream_out/Makefile + modules/stream_out/transrate/Makefile modules/video_chroma/Makefile modules/video_filter/Makefile modules/video_filter/deinterlace/Makefile @@ -3454,11 +3812,12 @@ AC_OUTPUT([ modules/visualization/scope/Makefile modules/visualization/xosd/Makefile modules/visualization/visual/Makefile -],[ - chmod 0755 vlc-config ]) -dnl Generate makefiles found by bootstrap +AC_CONFIG_FILES([vlc-config], [chmod 0755 vlc-config]) + +dnl Generate makefiles +AC_OUTPUT printf " vlc configuration