diff options
-rw-r--r-- | m4/Makefile.am | 1 | ||||
-rw-r--r-- | m4/decoders.m4 | 380 | ||||
-rw-r--r-- | m4/summary.m4 | 144 | ||||
-rw-r--r-- | src/demuxers/Makefile.am | 2 | ||||
-rw-r--r-- | src/liba52/Makefile.am | 25 | ||||
-rw-r--r-- | src/libfaad/Makefile.am | 2 | ||||
-rw-r--r-- | src/libmpeg2/Makefile.am | 2 | ||||
-rw-r--r-- | src/libmpeg2new/Makefile.am | 2 |
8 files changed, 293 insertions, 265 deletions
diff --git a/m4/Makefile.am b/m4/Makefile.am index 71e4b9d51..068661ebd 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -17,7 +17,6 @@ EXTRA_DIST = \ directx.m4 \ gas.m4 \ input.m4 \ - libFLAC.m4 \ macosx.m4 \ objc.m4 \ pkg.m4 \ diff --git a/m4/decoders.m4 b/m4/decoders.m4 index 5e3ec7b48..9f9ae9aeb 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -2,19 +2,17 @@ dnl --------------------------- dnl Decoder and Demuxer Plugins dnl --------------------------- AC_DEFUN([XINE_DECODER_PLUGINS], [ - dnl a52dec (optional; enabled by default; external version allowed) AC_ARG_ENABLE([a52dec], - [AS_HELP_STRING([--disable-a52dec], [Disable support for a52dec decoding library (default: enabled)])], - [], [enable_a52dec=yes]) + [AS_HELP_STRING([--enable-a52dec], [Enable support for a52dec decoding library (default: enabled)])], + [test x"$enableval" != x"no" && enable_a52dec="yes"]) AC_ARG_WITH([external-a52dec], - [AS_HELP_STRING([--with-external-a52dec], [use external a52dec library (not recommended)])], - [external_a52dec="$withval"], [external_a52dec="no"]) + [AS_HELP_STRING([--with-external-a52dec], [Use external a52dec library (not recommended)])], + [test x"$withval" != x"no" && with_external_a52dec="yes"], [with_external_a52dec="no"]) if test x"$enable_a52dec" != x"no"; then - dnl REVISIT: --with-external-a52dec=PREFIX - if test x"$external_a52dec" != x"no"; then + if test x"$with_external_a52dec" != x"no"; then AC_CHECK_LIB([a52], [a52_init], - [AC_CHECK_HEADERS([a52dec/a52.h a52dec/a52_internal.h], [have_a52=yes], [have_a52=no], + [AC_CHECK_HEADERS([a52dec/a52.h a52dec/a52_internal.h], [have_external_a52dec=yes], [have_external_a52dec=no], [#ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif @@ -24,155 +22,211 @@ AC_DEFUN([XINE_DECODER_PLUGINS], [ #ifdef HAVE_STDINT_H # include <stdint.h> #endif - #include <a52dec/a52.h>])], [have_a52=no], [-lm]) - if test x"$have_a52" = x"no"; then + #include <a52dec/a52.h>])], [have_external_a52dec=no], [-lm]) + if test x"$have_external_a52dec" = x"no"; then AC_MSG_RESULT([*** no usable version of a52dec found, using internal copy ***]) fi else AC_MSG_RESULT([Using included a52dec support]) fi fi - AM_CONDITIONAL([A52], [test x"$enable_a52dec" != x"no"]) - AM_CONDITIONAL([EXTERNAL_A52DEC], [test x"$have_a52" = x"yes"]) + AM_CONDITIONAL([ENABLE_A52DEC], [test x"$enable_a52dec" != x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_A52DEC], [test x"$have_external_a52dec" = x"yes"]) dnl ASF (optional; enabled by default) AC_ARG_ENABLE([asf], - [AS_HELP_STRING([--disable-asf], [do not build ASF demuxer])], - [], [enable_asf=yes]) - AM_CONDITIONAL([BUILD_ASF], [test x"$enable_asf" != x"no"]) + [AS_HELP_STRING([--enable-asf], [Enable support for ASF demuxer (default: enabled)])], + [test x"$enableval" != x"no" && enable_asf="yes"]) + AM_CONDITIONAL([ENABLE_ASF], [test x"$enable_asf" != x"no"]) dnl FAAD (optional; enabled by default) AC_ARG_ENABLE([faad], - [AS_HELP_STRING([--disable-faad], [do not build FAAD decoder])], - [], [enable_faad=yes]) - AM_CONDITIONAL([BUILD_FAAD], [test x"$enable_faad" != x"no"]) + [AS_HELP_STRING([--enable-faad], [Enable support for FAAD decoder (default: enabled)])], + [test x"$enableval" != x"no" && enable_faad="yes"]) + AM_CONDITIONAL([ENABLE_FAAD], [test x"$enable_faad" != x"no"]) dnl ffmpeg (required; external version allowed) AC_ARG_WITH([external-ffmpeg], [AS_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library])], - [], [with_external_ffmpeg=no]) + [], [with_external_ffmpeg="no"]) + AC_ARG_ENABLE([ffmpeg_uncommon_codecs], + [AS_HELP_STRING([--disable-ffmpeg-uncommon-codecs], [don't build uncommon ffmpeg codecs])], + [test x"$enableval" != x"no" && enable_ffmpeg_uncommon_codecs="yes"]) + AC_ARG_ENABLE([ffmpeg_popular_codecs], + [AS_HELP_STRING([--disable-ffmpeg-popular-codecs], [don't build popular ffmpeg codecs])], + [test x"$enableval" != x"no" && enable_ffmpeg_popular_codecs="yes"]) case x"$with_external_ffmpeg" in - x"yes") - PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0]) - ;; + x"no") with_external_ffmpeg=no ;; x"soft") - PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], - [with_external_ffmpeg=yes], [with_external_ffmpeg=no]) + PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], [with_external_ffmpeg=yes], [with_external_ffmpeg=no]) + ;; + x*) + PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], [with_external_ffmpeg=yes]) ;; esac - if test "x$with_external_ffmpeg" = "xyes"; then + if test x"$with_external_ffmpeg" != x"no"; then PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc]) AC_DEFINE([HAVE_FFMPEG], 1, [Define this if you have ffmpeg library]) AC_MSG_NOTICE([ ********************************************************************* -xine is configured with external ffmpeg. +xine-lib is configured with external ffmpeg. This requires the same version of ffmpeg what is included in xine and you should know what you do. If some problems occur, please try to use internal ffmpeg. *********************************************************************]) else - AC_MSG_RESULT([using included ffmpeg]) - AC_ARG_ENABLE([ffmpeg_uncommon_codecs], - [AS_HELP_STRING([--disable-ffmpeg-uncommon-codecs], [don't build uncommon ffmpeg codecs])], - [], [enable_ffmpeg_uncommon_codecs=yes]) - AM_CONDITIONAL([FFMPEG_DISABLE_UNCOMMON_CODECS], [test x"$enable_ffmpeg_uncommon_codecs" = x"no"]) - AC_ARG_ENABLE([ffmpeg_popular_codecs], - [AS_HELP_STRING([--disable-ffmpeg-popular-codecs], [don't build popular ffmpeg codecs])], - [], [enable_ffmpeg_popular_codecs=yes]) - AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test x"$enable_ffmpeg_popular_codecs" = x"no"]) + AC_MSG_RESULT([Using included ffmpeg]) fi - AM_CONDITIONAL([WITH_EXTERNAL_FFMPEG], [test x"$with_external_ffmpeg" = x"yes"]) + AM_CONDITIONAL([FFMPEG_DISABLE_UNCOMMON_CODECS], [test x"$enable_ffmpeg_uncommon_codecs" = x"no"]) + AM_CONDITIONAL([FFMPEG_DISABLE_POPULAR_CODECS], [test x"$enable_ffmpeg_popular_codecs" = x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_FFMPEG], [test x"$with_external_ffmpeg" != x"no"]) dnl gdk-pixbuf (optional; enabled by default) AC_ARG_ENABLE([gdkpixbuf], - [AS_HELP_STRING([--disable-gdkpixbuf], [do not build gdk-pixbuf support])], - [], [enable_gdkpixbuf=yes]) + [AS_HELP_STRING([--enable-gdkpixbuf], [Enable GdkPixbuf support (default: enabled)])], + [test x"$enableval" != x"no" && enable_gdkpixbuf="yes"]) if test x"$enable_gdkpixbuf" != x"no"; then - PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0], [no_gdkpixbuf=no], [no_gdkpixbuf=yes]) - if test x"$no_gdkpixbuf" != x"yes"; then - AC_DEFINE([HAVE_GDK_PIXBUF], 1, [Define this if you have gdk-pixbuf installed]) + PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0], [have_gdkpixbuf=yes], [have_gdkpixbuf=no]) + if test x"$enable_gdkpixbuf" = x"yes" && test x"$have_gdkpixbuf" != x"yes"; then + AC_MSG_ERROR([GdkPixbuf support requested, but GdkPixbuf not found]) fi - else - no_gdkpixbuf=yes fi - AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$no_gdkpixbuf" != x"yes"]) + AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$have_gdkpixbuf" = x"yes"]) dnl ImageMagick (optional; enabled by default) AC_ARG_WITH([imagemagick], - [AS_HELP_STRING([--without-imagemagick], [Build without ImageMagick image decoder])], - [], [with_imagemagic=yes]) + [AS_HELP_STRING([--with-imagemagick], [Enable ImageMagick image decoder support (default: enabled)])], + [test x"$withval" != x"no" && with_imagemagick="yes"]) if test x"$with_imagemagick" != x"no"; then PKG_CHECK_MODULES([WAND], [Wand], [have_imagemagick=yes], [have_imagemagick=no]) if test x"$with_imagemagick" = x"yes" && test x"$have_imagemagick" = x"no"; then - AC_MSG_ERROR([ImageMagick support requested, but Wand not found]) - elif test x"$have_imagemagick" = x"yes"; then - AC_DEFINE([HAVE_WAND], 1, [Define this if you have ImageMagick installed]) + AC_MSG_ERROR([ImageMagick support requested, but ImageMagick not found]) fi fi - AM_CONDITIONAL([ENABLE_IMAGEMAGICK], [test x"$have_imagemagick" != x"no"]) + AM_CONDITIONAL([ENABLE_IMAGEMAGICK], [test x"$have_imagemagick" = x"yes"]) dnl libdts (optional; enabled by default; external version allowed) AC_ARG_ENABLE([dts], - [AS_HELP_STRING([--disable-dts], [Disable support for DTS decoding library (default: enabled)])], - [], [enable_dts=yes]) + [AS_HELP_STRING([--enable-dts], [Enable support for DTS decoding library (default: enabled)])], + [test x"$enableval" != x"no" && enable_dts="yes"]) AC_ARG_WITH([external-libdts], - [AS_HELP_STRING([--with-external-libdts], [use external libdts/libdca library (not recommended)])], - [], [with_external_libdts=no]) + [AS_HELP_STRING([--with-external-libdts], [Use external libdts/libdca library (not recommended)])], + [test x"$withval" != x"no" && with_external_libdts="yes"], [with_external_libdts="no"]) if test x"$enable_dts" != x"no"; then if test x"$with_external_libdts" != x"no"; then - PKG_CHECK_MODULES([LIBDTS], [libdts], [have_dts=yes], [have_dts=no]) - if test x"$have_dts" = x"no"; then + PKG_CHECK_MODULES([LIBDTS], [libdts], [have_external_dts=yes], [have_external_dts=no]) + if test x"$have_external_dts" != x"yes"; then AC_MSG_RESULT([*** no usable version of libdts found, using internal copy ***]) fi else AC_MSG_RESULT([Using included libdts support]) + fi + if test x"$have_external_libdts" != x"yes"; then LIBDTS_CFLAGS='-I$(top_srcdir)/contrib/libdca/include' LIBDTS_DEPS='$(top_builddir)/contrib/libdca/libdca.la' LIBDTS_LIBS='$(top_builddir)/contrib/libdca/libdca.la' - AC_SUBST(LIBDTS_CFLAGS) AC_SUBST(LIBDTS_DEPS) - AC_SUBST(LIBDTS_LIBS) fi fi AM_CONDITIONAL([ENABLE_DTS], [test x"$enable_dts" != x"no"]) - AM_CONDITIONAL([WITH_EXTERNAL_LIBDTS], [test x"$have_dts" = x"yes"]) + AM_CONDITIONAL([WITH_EXTERNAL_LIBDTS], [test x"$have_external_libdts" = x"yes"]) dnl libFLAC (optional; disabled by default) AC_ARG_WITH([libflac], [AS_HELP_STRING([--with-libflac], [build libFLAC-based decoder and demuxer])], - [], [enable_libflac=no]) + [test x"$withval" != x"no" && with_libflac="yes"], [with_libflac="no"]) + AC_ARG_WITH([libFLAC-prefix], + [AS_HELP_STRING([--with-libFLAC-prefix=DIR], [prefix where libFLAC is installed (optional)])]) + AC_ARG_WITH([libFLAC-libraries], + [AS_HELP_STRING([--with-libFLAC-libraries=DIR], [directory where libFLAC library is installed (optional)])]) + AC_ARG_WITH([libFLAC-includes], + [AS_HELP_STRING([--with-libFLAC-includes=DIR], [directory where libFLAC header files are installed (optional)])]) if test x"$with_libflac" != x"no"; then - AM_PATH_LIBFLAC([have_libflac=yes]) + AC_MSG_CHECKING([libdir name]) + case "$host_or_hostalias" in + *-*-linux*) + # Test if the compiler is 64bit + echo 'int i;' > conftest.$ac_ext + xine_cv_cc_64bit_output=no + if AC_TRY_EVAL(ac_compile); then + case `"$MAGIC_CMD" conftest.$ac_objext` in + *"ELF 64"*) xine_cv_cc_64bit_output=yes ;; + esac + fi + rm -rf conftest* + ;; + esac + case "$host_cpu:$xine_cv_cc_64bit_output" in + powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) + XINE_LIBDIRNAME="lib64" ;; + *:*) + XINE_LIBDIRNAME="lib" ;; + esac + AC_MSG_RESULT([$XINE_LIBDIRNAME]) + + if test x"$with_libFLAC_includes" != x""; then + LIBFLAC_CFLAGS="-I$with_libFLAC_includes" + elif test x"$with_libFLAC_prefix" != x""; then + LIBFLAC_CFLAGS="-I$with_libFLAC_prefix/include" + elif test x"$prefix" != x"NONE"; then + LIBFLAC_CFLAGS="-I$prefix/include" + fi + AC_SUBST(LIBFLAC_CFLAGS) + + if test x"$with_libFLAC_libraries" != x""; then + LIBFLAC_LIBS="-L$with_libFLAC_libraries" + elif test x"$with_libFLAC_prefix" != x""; then + LIBFLAC_LIBS="-L$with_libFLAC_prefix/$XINE_LIBDIRNAME" + elif test x"$prefix" != x"NONE"; then + LIBFLAC_LIBS="-L$prefix/$XINE_LIBDIRNAME" + fi + AC_SUBST(LIBFLAC_LIBS) + + ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $LIBFLAC_CFLAGS" + AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_new], + [AC_CHECK_HEADERS([FLAC/stream_decoder.h], + [have_libflac=yes LIBFLAC_LIBS="$LIBFLAC_LIBS -lFLAC -lm"], + [have_libflac=no])], + [have_libflac=no], [-lm]) + CPPFLAGS="$ac_save_CPPFLAGS" + + if test x"$with_libflac" = x"yes" && test x"$have_libflac" != x"yes"; then + AC_MSG_ERROR([libFLAC-based decoder support requested, but libFLAC not found]) + elif test x"$have_libflac" != x"yes"; then + LIBFLAC_CFLAGS="" LIBFLAC_LIBS="" + fi fi AM_CONDITIONAL([ENABLE_LIBFLAC], [test x"$have_libflac" = x"yes"]) dnl libmad (optional; enabled by default; external version allowed) AC_ARG_ENABLE([mad], - [AS_HELP_STRING([--disable-mad], [Disable support for MAD decoding library (default: enabled)])], - [], [enable_mad=yes]) + [AS_HELP_STRING([--enable-mad], [Enable support for MAD decoding library (default: enabled)])], + [test x"$enableval" != x"no" && enable_mad="yes"]) AC_ARG_WITH([external-libmad], [AS_HELP_STRING([--with-external-libmad], [use external libmad library (not recommended)])], - [], [with_external_libmad=no]) + [test x"$withval" != x"no" && with_external_libmad="yes"], [with_external_libmad="no"]) if test x"$enable_mad" != x"no"; then if test x"$with_external_libmad" != x"no"; then PKG_CHECK_MODULES([LIBMAD], [mad], - [AC_CHECK_HEADERS([mad.h], [], [with_external_libmad=no])], [with_external_libmad=no]) - if test x"$with_external_libmad" = x"no"; then + [AC_CHECK_HEADERS([mad.h], [have_external_libmad=yes], [have_external_libmad=no])], + [have_external_libmad=no]) + if test x"$have_external_libmad" != x"yes"; then AC_MSG_RESULT([*** no usable version of libmad found, using internal copy ***]) fi - fi - if test x"$with_external_libmad" = x"no"; then + else AC_MSG_RESULT([Using included libmad support]) + fi + if test x"$have_external_libmad" != x"no"; then case "$host_or_hostalias" in i?86-* | k?-* | athlon-* | pentium*-) AC_DEFINE([FPM_INTEL], 1, [Define to select libmad fixed point arithmetic implementation]) @@ -205,40 +259,48 @@ use internal ffmpeg. esac fi fi - AM_CONDITIONAL([ENABLE_MAD], [test x"$enable_mad" = x"yes"]) - AM_CONDITIONAL([WITH_EXTERNAL_MAD], [test x"$have_mad" = x"yes"]) + AM_CONDITIONAL([ENABLE_MAD], [test x"$enable_mad" != x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_MAD], [test x"$have_external_libmad" = x"yes"]) dnl libmodplug (optional; enabled by default) AC_ARG_ENABLE([modplug], - [AS_HELP_STRING([--enable-modplug], [Enable modplug support])], - [], [enable_modplug=yes]) + [AS_HELP_STRING([--enable-modplug], [Enable MODPlug support (default: enabled)])], + [test x"$enableval" != x"no" && enable_modplug="yes"]) if test x"$enable_modplug" != x"no"; then - PKG_CHECK_MODULES([LIBMODPLUG], [libmodplug >= 0.7], - [AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed])], - [enable_modplug=no]) + PKG_CHECK_MODULES([LIBMODPLUG], [libmodplug >= 0.7], [have_modplug=yes], [have_modplug=no]) + if test x"$enable_modplug" = x"yes" && test x"$have_modplug" != x"yes"; then + AC_MSG_ERROR([MODPlug support requested, but MODPlug not found]) + elif test x"$have_modplug" = x"yes"; then + AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed]) + fi fi AM_CONDITIONAL([ENABLE_MODPLUG], [test x"$have_modplug" = x"yes"]) dnl libmpcdec (optional; enabled by default; external version allowed) AC_ARG_ENABLE([musepack], - [AS_HELP_STRING([--disable-musepack], [Disable support for MusePack decoding (default: enabled)])], - [], [enable_musepack=yes]) + [AS_HELP_STRING([--enable-musepack], [Enable support for Musepack decoding (default: enabled)])], + [test x"$enableval" != x"no" && enable_musepack="yes"]) AC_ARG_WITH([external-libmpcdec], [AS_HELP_STRING([--with-external-libmpcdec], [Use external libmpc library])], - [], [with_external_libmpcdec=no]) + [test x"$withval" != x"no" && with_external_libmpcdec="yes"], [with_external_libmpcdec="no"]) if test x"$enable_musepack" != x"no"; then if test x"$with_external_libmpcdec" != x"no"; then AC_CHECK_LIB([mpcdec], [mpc_decoder_decode], - [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [have_mpcdec=yes])]) - if test x"$have_mpcdec" != x"yes"; then - AC_MSG_ERROR([Unable to find mpcdec]) + [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [have_external_libmpcdec=yes], [have_external_libmpcdec=no])], + [have_external_libmpcdec=no]) + if test x"$have_external_libmpcdec" != x"yes"; then + AC_MSG_RESULT([*** no usable version of libmpcdec found, using internal copy ***]) + else + MPCDEC_CFLAGS="" + MPCDEC_DEPS="" + MPCDEC_LIBS="-lmpcdec" fi - MPCDEC_LIBS="-lmpcdec" - MPCDEC_CFLAGS="" else - AC_MSG_RESULT([Use included libmusepack]) + AC_MSG_RESULT([Using included libmpcdec (Musepack)]) + fi + if test x"$have_external_libmpcdec" != x"yes"; then MPCDEC_CFLAGS='-I$(top_srcdir)/contrib/libmpcdec' MPCDEC_LIBS='$(top_builddir)/contrib/libmpcdec/libmpcdec.la' MPCDEC_DEPS='$(top_builddir)/contrib/libmpcdec/libmpcdec.la' @@ -248,48 +310,18 @@ use internal ffmpeg. AC_SUBST(MPCDEC_LIBS) fi AM_CONDITIONAL([ENABLE_MUSEPACK], [test x"$enable_musepack" != x"no"]) - AM_CONDITIONAL([WITH_EXTERNAL_LIBMPCDEC], [test x"$have_mpcdec" = x"yes"]) - - - dnl libw32dll (optional; x86 only; enabled if using GNU as; GNU as required) - AC_ARG_ENABLE([w32dll], - [AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support])], - [], [enable_w32dll="$with_gnu_as"]) - if test x"$enable_w32dll" != x"no"; then - case "$host_or_hostalias" in - *-mingw* | *-cygwin) - enable_w32dll=no - ;; - i?86-* | k?-* | athlon-* | pentium*-) - test x"$with_gnu_as" = x"no" && enable_w32dll=no - ;; - *) - enable_w32dll=no - ;; - esac - fi - if test x"$enable_w32dll" != x"no"; then - if test x"with_gnu_as" = x"no"; then - AC_MSG_ERROR([You need GNU as to enable Win32 codecs support]) - fi - AC_ARG_WITH([w32-path], - [AS_HELP_STRING([--with-w32-path=PATH], [location of Win32 binary codecs])], - [], [w32_path="/usr/lib/codecs"]) - AC_SUBST(w32_path) - fi - AM_CONDITIONAL([ENABLE_W32DLL], [test x"$enable_w32dll" != x"no"]) + AM_CONDITIONAL([WITH_EXTERNAL_LIBMPCDEC], [test x"$have_external_libmpcdec" = x"yes"]) dnl mlib AC_ARG_ENABLE([mlib], - [AS_HELP_STRING([--disable-mlib], [do not build Sun mediaLib support])], - [], [enable_mlib=yes]) + [AS_HELP_STRING([--enable-mlib], [do not build Sun mediaLib support (default: enabled)])], + [test x"$enableval" != x"no" && enable_mlib="yes"]) AC_ARG_ENABLE([mlib-lazyload], [AS_HELP_STRING([--enable-mlib-lazyload], [check for Sun mediaLib at runtime])], - [], [enable_mlib_lazyload=no]) + [test x"$enableval" != x"no" && enable_mlib_lazyload="yes"], [enable_mlib_lazyload="no"]) if test x"$enable_mlib" != x"no"; then - mlibhome="$MLIBHOME" - test x"$mlibhome" = x"" && mlibhome="/opt/SUNWmlib" + mlibhome="$MLIBHOME" test x"$mlibhome" = x"" && mlibhome="/opt/SUNWmlib" AC_CHECK_LIB([mlib], [mlib_VideoAddBlock_U8_S16], [saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$mlibhome/include" AC_CHECK_HEADERS([mlib_video.h], @@ -304,36 +336,42 @@ use internal ffmpeg. MLIB_LIBS="-L$mlibhome/lib -lmlib" fi MLIB_CFLAGS="-I$mlibhome/include" - LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS $MLIB_CFLAGS" - AC_SUBST(LIBMPEG2_CFLAGS) AC_SUBST(MLIB_LIBS) AC_SUBST(MLIB_CFLAGS) + dnl TODO: src/video_out/yuv2rgb.c and src/xine-utils/cpu_accel.c should be changed to use LIBMPEG2_MLIB + dnl and HAVE_MLIB should go away. AC_DEFINE([HAVE_MLIB], 1, [Define this if you have mlib installed]) AC_DEFINE([LIBMPEG2_MLIB], 1, [Define this if you have mlib installed]) - ac_have_mlib=yes]) + have_mlib=yes]) CPPFLAGS="$saved_CPPFLAGS"], [], ["-L$mlibhome/lib"]) fi - AM_CONDITIONAL([HAVE_MLIB], [test x"$ac_have_mlib" = x"yes"]) + AM_CONDITIONAL([HAVE_MLIB], [test x"$have_mlib" = x"yes"]) dnl mng (optional; enabled by default) AC_ARG_ENABLE([mng], - [AS_HELP_STRING([--disable-mng], [do not build mng support])], - [], [enable_mng=yes]) + [AS_HELP_STRING([--enable-mng], [Enable MNG decoder support (default: enabled)])], + [test x"$enableval" != x"no" && enable_mng="yes"]) if test x"$with_mng" != x"no"; then AC_CHECK_LIB([mng], [mng_initialize], - [AC_CHECK_HEADERS([libmng.h], [MNG_LIBS="-lmng"], [enable_mng=yes])], [enable_mng=no]) - AC_SUBST(MNG_LIBS) + [AC_CHECK_HEADERS([libmng.h], [have_mng=yes], [have_mng=no])], [have_mng=no]) + if test x"$with_mng" = x"yes" && test x"$have_mng" != x"yes"; then + AC_MSG_ERROR([MNG support requested, but libmng not found]) + elif test x"$have_mng" = x"yes"; then + MNG_LIBS="-lmng" + AC_SUBST(MNG_LIBS) + fi fi - AM_CONDITIONAL([ENABLE_MNG], [test x"$enable_mng" != x"no"]) + AM_CONDITIONAL([ENABLE_MNG], [test x"$have_mng" = x"yes"]) dnl Ogg/Speex (optional; enabled by default; external) AC_ARG_WITH([speex], - [AS_HELP_STRING([--without-speex], [Build without Speex audio decoder])]) + [AS_HELP_STRING([--with-speex], [Enable Speex audio decoder support (default: enabled)])], + [test x"$withval" != x"no" && with_speex="yes"]) if test x"$with_speex" != x"no"; then PKG_CHECK_MODULES([SPEEX], [ogg speex], [have_speex=yes], [have_speex=no]) - if test x"$with_speex" = x"yes" && test x"$have_speex" = x"no"; then + if test x"$with_speex" = x"yes" && test x"$have_speex" != x"yes"; then AC_MSG_ERROR([Speex support requested, but libspeex not found]) elif test x"$have_speex" = x"yes"; then AC_DEFINE([HAVE_SPEEX], 1, [Define this if you have speex]) @@ -344,7 +382,8 @@ use internal ffmpeg. dnl Ogg/Theora (optional; enabled by default; external) AC_ARG_WITH([theora], - [AS_HELP_STRING([--without-theora], [Build without Theora video decoder])]) + [AS_HELP_STRING([--with-theora], [Enable Theora video decoder support (default: enabled)])], + [test x"$withval" != x"no" && with_theora="yes"]) if test x"$with_theora" != x"no"; then PKG_CHECK_MODULES([THEORA], [ogg theora], [have_theora=yes], [have_theora=no]) if test x"$with_theora" = x"yes" && test x"$have_theora" = x"no"; then @@ -358,54 +397,91 @@ use internal ffmpeg. dnl Ogg/Vorbis (optional; enabled by default; external) AC_ARG_WITH([vorbis], - [AS_HELP_STRING([--without-vorbis], [Build without Vorbis audio decoder])]) + [AS_HELP_STRING([--with-vorbis], [Enable Vorbis audio decoder support (default: enabled)])], + [test x"$withval" != x"no" && with_vorbis="yes"]) if test x"$with_vorbis" != x"no"; then PKG_CHECK_MODULES([VORBIS], [ogg vorbis], [have_vorbis=yes], [have_vorbis=no]) if test x"$with_vorbis" = x"yes" && test x"$have_vorbis" = "xno"; then AC_MSG_ERROR([Vorbis support requested, but libvorbis not found]) + elif test x"$have_vorbis" = x"yes"; then + AC_DEFINE([HAVE_VORBIS], 1, [Define this if you have vorbis]) fi fi AM_CONDITIONAL([ENABLE_VORBIS], [test x"$have_vorbis" = x"yes"]) - dnl real (optional; default depends on platform) + dnl real (optional; enabled by default) dnl On some systems, we cannot enable Real codecs support to begin with. dnl This includes Darwin, because it uses Mach-O rather than ELF. AC_ARG_ENABLE([real-codecs], - [AS_HELP_STRING([--disable-real-codecs], [Disable Real binary codecs support])], - [], [case $host_os in - darwin*) enable_real_codecs=no ;; - *) enable_real_codes=yes ;; - esac]) + [AS_HELP_STRING([--enable-real-codecs], [Enable Real binary codecs support (default: enabled)])], + [test x"$enableval" != x"no" && enable_real_codecs="yes"]) + AC_ARG_WITH([real-codecs-path], + [AS_HELP_STRING([--with-real-codecs-path=PATH], [Specify directory for Real binary codecs])]) if test x"$enable_real_codecs" != x"no"; then - AC_ARG_WITH([real-codecs-path], - [AS_HELP_STRING([--with-real-codecs-path=PATH], [Specify directory for Real binary codecs])], - [AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$withval"], [Specified path for Real binary codecs])]) + case "$host_os" in + darwin*) have_real_codecs=no ;; + *) + have_real_codecs=yes + + dnl For those that have a replacement, break at the first one found + AC_CHECK_SYMBOLS([__environ _environ environ], [break], [need_weak_aliases=yes]) + AC_CHECK_SYMBOLS([stderr __stderrp], [break], [need_weak_aliases=yes]) - dnl For those that have a replacement, break at the first one found - AC_CHECK_SYMBOLS([__environ _environ environ], [break], [need_weak_aliases=yes]) - AC_CHECK_SYMBOLS([stderr __stderrp], [break], [need_weak_aliases=yes]) + dnl For these there are no replacements + AC_CHECK_SYMBOLS([___brk_addr __ctype_b]) + + if test x"$need_weak_aliases" = x"yes"; then + CC_ATTRIBUTE_ALIAS([], [have_real_codecs=no]) + fi + ;; + esac + if test x"$enable_real_codecs" = x"yes" && test x"$have_real_codecs" != x"yes"; then + AC_MSG_ERROR([Binary Real codec support requested, but it is not available]) + elif test x"$have_real_codecs" = x"yes"; then + if test "${with_real_codecs_path+set}" = "set"; then + AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$with_real_codecs_path"], [Default path in which to find Real binary codecs]) + fi + fi + fi + AM_CONDITIONAL([ENABLE_REAL], [test x"$have_real_codecs" = x"yes"]) - dnl For these there are no replacements - AC_CHECK_SYMBOLS([___brk_addr __ctype_b]) - if test "x$need_weak_aliases" = "xyes"; then - CC_ATTRIBUTE_ALIAS([], [AC_MSG_ERROR([You need weak aliases support for Real codecs on your platform])]) + dnl w32dll (optional; x86 only; enabled if using GNU as; GNU as required) + AC_ARG_ENABLE([w32dll], + [AS_HELP_STRING([--enable-w32dll], [Enable Win32 DLL support (default: enabled)])], + [test x"$enableval" != x"no" && enable_w32dll="yes"], + [test x"$with_gnu_as" != x"yes" && enable_w32dll="no"]) + AC_ARG_WITH([w32-path], + [AS_HELP_STRING([--with-w32-path=PATH], [location of Win32 binary codecs])], + [w32_path="$withval"], [w32_path="/usr/lib/codecs"]) + if test x"$enable_w32dll" != x"no"; then + case "$host_or_hostalias" in + *-mingw* | *-cygwin) have_w32dll=no ;; + i?86-* | k?-* | athlon-* | pentium*-) have_w32dll="$with_gnu_as" ;; + *) enable_w32dll=no ;; + esac + if test x"$enable_w32dll" = x"yes" && test x"$have_w32dll" != x"yes"; then + AC_MSG_ERROR([Win32 DLL support requested, but Win32 DLL support is not available]) fi fi - AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"]) + AC_SUBST(w32_path) + AM_CONDITIONAL([ENABLE_W32DLL], [test x"$have_w32dll" = x"yes"]) dnl wavpack (optional; disabled by default) AC_ARG_WITH([wavpack], [AS_HELP_STRING([--with-wavpack], [Enable Wavpack decoder (requires libwavpack)])], - [], [with_wavpack=no]) + [test x"$withval" != x"no" && with_wavpack="yes"], [with_wavpack="no"]) if test x"$with_wavpack" != x"no"; then - PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes]) + PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes], [have_wavpack=no]) + if test x"$with_wavpack" = x"yes" && test x"$have_wavpack" != x"yes"; then + AC_MSG_ERROR([Wavpack decoder support requested, but libwavpack not found]) + fi fi AM_CONDITIONAL([ENABLE_WAVPACK], [test x"$have_wavpack" = x"yes"]) dnl Only enable building dmx image if either gdk_pixbuf or ImageMagick are enabled - AM_CONDITIONAL([BUILD_DMX_IMAGE], [test x"$have_imagemagick" = x"yes" -o x"$no_gdkpixbuf" != x"yes"]) + AM_CONDITIONAL([BUILD_DMX_IMAGE], [test x"$have_imagemagick" = x"yes" -o x"$have_gdkpixbuf" = x"yes"]) ]) diff --git a/m4/summary.m4 b/m4/summary.m4 index b695b212a..161400d50 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -19,7 +19,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - vcdo - vcd (internal libs)" fi fi - if test x"$with_external_dvdnav" = x"yes"; then + if test x"$with_external_dvdnav" != x"no"; then echo " - dvd (external libs)" else echo " - dvd (internal libs)" @@ -52,73 +52,51 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " - FLAC - aac" echo " - iff - matroska" echo " - vmd - flv" - if test x"$enable_asf" != x"no"; then - echo " - asf" - fi - if test x"$have_vorbis" = x"yes"; then - echo " - ogg" - fi - if test x"$enable_mng" != x"no"; then - echo " - mng" - fi - if test x"$enable_modplug" != x"no"; then - echo " - mod" - fi - if test x"$have_libflac" = x"yes"; then - echo " - FLAC (with libFLAC)" - fi - if test x"$have_wavpack" = x"yes"; then - echo " - WavPack" - fi if test x"$enable_a52dec" != x"no"; then - if test x"$have_a52" = x"yes"; then + if test x"$have_external_a52dec" = x"yes"; then echo " - ac3 (external library)" else echo " - ac3 (internal library)" fi fi + test x"$enable_asf" != x"no" && echo " - asf" + test x"$enable_mng" != x"no" && echo " - mng" + test x"$have_modplug" = x"yes" && echo " - mod" + test x"$have_libflac" = x"yes" && echo " - FLAC (with libFLAC)" + test x"$have_vorbis" = x"yes" && echo " - ogg" + test x"$have_wavpack" = x"yes" && echo " - WavPack" echo "" dnl video decoders echo " * video decoder plugins:" echo " - MPEG 1,2 - Amiga Bitplane" echo " - Raw RGB - Raw YUV" - if test x"$with_external_ffmpeg" = x"yes"; then - echo " - ffmpeg (external library):" + test x"$have_dxr3" = x"yes" && echo " - dxr3_video" + test x"$have_gdkpixbuf" = x"yes" && echo " - gdk-pixbuf" + test x"$have_imagemagick" = x"yes" && echo " - image" + test x"$have_theora" = x"yes" && echo " - theora" + test x"$have_w32dll" = x"yes" && echo " - w32dll" + if test x"$with_external_ffmpeg" != x"no"; then + echo " - ffmpeg (external library)" else echo " - ffmpeg (internal library):" - fi - echo " - MPEG-4 (ISO, Microsoft, DivX*, XviD)" - echo " - Creative YUV - Motion JPEG" - echo " - Cinepak - MS Video-1" - echo " - FLI/FLC - MS RLE" - echo " - Id RoQ - Id Cin" - echo " - Apple Graphics - Apple Video" - echo " - Apple Animation - Interplay Video" - echo " - Westwood VQA - Origin Xan" - echo " - H.263 - Intel Indeo 3" - echo " - SVQ1 - SVQ3" - echo " - Real Video 1.0 - Real Video 2.0" - echo " - 4X Video - Sierra Video" - echo " - Asus v1/v2 - HuffYUV" - echo " - On2 VP3 - DV" - echo " - 8BPS - Duck TrueMotion v1" - echo " - ATI VCR1 - Flash Video" - echo " - ZLIB - MSZH" - if test x"$have_dxr3" = x"yes"; then - echo " - dxr3_video" - fi - if test x"$enable_w32dll" != x"no"; then - echo " - w32dll" - fi - if test x"$have_imagemagick" = x"yes"; then - echo " - image" - fi - if test x"no_gdkpixbuf" != x"yes"; then - echo " - gdk-pixbuf" - fi - if test x"$have_theora" = x"yes"; then - echo " - theora" + echo " - MPEG-4 (ISO, Microsoft, DivX*, XviD)" + echo " - Creative YUV - Motion JPEG" + echo " - Cinepak - MS Video-1" + echo " - FLI/FLC - MS RLE" + echo " - Id RoQ - Id Cin" + echo " - Apple Graphics - Apple Video" + echo " - Apple Animation - Interplay Video" + echo " - Westwood VQA - Origin Xan" + echo " - H.263 - Intel Indeo 3" + echo " - SVQ1 - SVQ3" + echo " - Real Video 1.0 - Real Video 2.0" + echo " - 4X Video - Sierra Video" + echo " - Asus v1/v2 - HuffYUV" + echo " - On2 VP3 - DV" + echo " - 8BPS - Duck TrueMotion v1" + echo " - ATI VCR1 - Flash Video" + echo " - ZLIB - MSZH" fi echo "" @@ -126,63 +104,51 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ echo " * audio decoder plugins:" echo " - GSM 06.10" echo " - linear PCM - Nosefart (NSF)" - if test x"$with_external_ffmpeg" = x"yes"; then - echo " - ffmpeg (external library):" - else - echo " - ffmpeg (internal library):" - fi - echo " - Windows Media Audio v1/v2" - echo " - DV - logarithmic PCM" - echo " - 14k4 - 28k8" - echo " - MS ADPCM - IMA ADPCM" - echo " - XA ADPCM - Game DPCM/ADPCM" - echo " - Mace 3:13 - Mace 6:1" - echo " - FLAC" - if test x"$have_libflac" = x"yes"; then - echo " - FLAC (with libFLAC)" - fi - if test x"$have_vorbis" = x"yes"; then - echo " - vorbis" - fi - if test x"$have_speex" = x"yes"; then - echo " - speex" - fi - if test x"$enable_w32dll" != x"no"; then - echo " - w32dll" - fi - if test x"$enable_faad" != x"no"; then - echo " - faad" - fi + test x"$enable_faad" != x"no" && echo " - faad" + test x"$have_libflac" = x"yes" && echo " - FLAC (with libFLAC)" + test x"$have_speex" = x"yes" && echo " - speex" + test x"$have_vorbis" = x"yes" && echo " - vorbis" + test x"$have_w32dll" = x"yes" && echo " - w32dll" + test x"$have_wavpack" = x"yes" && echo " - WavPack" if test x"$enable_mad" != x"no"; then - if test x"$with_external_mad" != x"no"; then + if test x"$have_external_libmad" = x"yes"; then echo " - MAD (MPG 1/2/3) (external library)" else echo " - MAD (MPG 1/2/3) (internal library)" fi fi if test x"$enable_libdts" != x"no"; then - if test x"$have_dts" = x"yes"; then + if test x"$have_external_libdts" = x"yes"; then echo " - DTS (external library)" else echo " - DTS (internal library)" fi fi if test x"$enable_a52dec" != x"no"; then - if test x"$have_a52" = x"yes"; then + if test x"$have_external_a52dec" = x"yes"; then echo " - A52/ra-dnet (external library)" else echo " - A52/ra-dnet (internal library)" fi fi if test x"$enable_musepack" != x"no"; then - if test x"$have_mpcdec" = x"yes"; then - echo " - MusePack (external library)" + if test x"$have_external_libmpcdec" = x"yes"; then + echo " - Musepack (external library)" else - echo " - MusePack (internal library)" + echo " - Musepack (internal library)" fi fi - if test x"$have_wavpack" = x"yes"; then - echo " - WavPack" + if test x"$with_external_ffmpeg" = x"yes"; then + echo " - ffmpeg (external library)" + else + echo " - ffmpeg (internal library):" + echo " - Windows Media Audio v1/v2" + echo " - DV - logarithmic PCM" + echo " - 14k4 - 28k8" + echo " - MS ADPCM - IMA ADPCM" + echo " - XA ADPCM - Game DPCM/ADPCM" + echo " - Mace 3:13 - Mace 6:1" + echo " - FLAC" fi echo "" diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index 0cfec1e89..b1e747bcc 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -16,7 +16,7 @@ if ENABLE_VORBIS ogg_module = xineplug_dmx_ogg.la endif -if BUILD_ASF +if ENABLE_ASF asf_module = xineplug_dmx_asf.la endif diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am index 9eec4f6d2..1025b373d 100644 --- a/src/liba52/Makefile.am +++ b/src/liba52/Makefile.am @@ -3,32 +3,19 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) -noinst_HEADERS = \ - a52.h \ - a52_internal.h \ - bitstream.h \ - tables.h \ - crc.c +noinst_HEADERS = a52.h a52_internal.h bitstream.h tables.h crc.c -if A52 +if ENABLE_A52DEC xineplug_LTLIBRARIES = xineplug_decode_a52.la endif -if EXTERNAL_A52DEC -internal_sources = +if WITH_EXTERNAL_A52DEC external_libs = -la52 +internal_sources = else -internal_sources = \ - bitstream.c \ - bit_allocate.c \ - downmix.c \ - imdct.c \ - parse.c external_libs = +internal_sources = bitstream.c bit_allocate.c downmix.c imdct.c parse.c endif -xineplug_decode_a52_la_SOURCES = \ - xine_a52_decoder.c \ - $(internal_sources) - +xineplug_decode_a52_la_SOURCES = xine_a52_decoder.c $(internal_sources) xineplug_decode_a52_la_LIBADD = $(XINE_LIB) $(external_libs) -lm diff --git a/src/libfaad/Makefile.am b/src/libfaad/Makefile.am index 5f4be9cd4..379033b15 100644 --- a/src/libfaad/Makefile.am +++ b/src/libfaad/Makefile.am @@ -57,7 +57,7 @@ noinst_HEADERS = \ syntax.h \ tns.h -if BUILD_FAAD +if ENABLE_FAAD xineplug_LTLIBRARIES = xineplug_decode_faad.la endif diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am index a970c6d24..d772f0e09 100644 --- a/src/libmpeg2/Makefile.am +++ b/src/libmpeg2/Makefile.am @@ -29,4 +29,4 @@ xineplug_decode_mpeg2_la_SOURCES = \ libmpeg2_accel.c xineplug_decode_mpeg2_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm -xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) +xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) diff --git a/src/libmpeg2new/Makefile.am b/src/libmpeg2new/Makefile.am index 4e9e6305b..8c248fdcb 100644 --- a/src/libmpeg2new/Makefile.am +++ b/src/libmpeg2new/Makefile.am @@ -9,4 +9,4 @@ xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la xineplug_decode_mpeg2_la_SOURCES = xine_mpeg2_decoder.c xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) ./libmpeg2/libmpeg2.la -xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) +xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) |