summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3873
1 files changed, 906 insertions, 2967 deletions
diff --git a/configure.ac b/configure.ac
index f4f9b6563..c55f23a0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,153 +1,181 @@
-dnl
-dnl Configure.ac for xine
-dnl
+AC_PREREQ(2.59)
+
+m4_include([m4/objc.m4])
-AC_INIT
+dnl Note that autoconf/autoheader/automake cache using autom4te, so version.sh
+dnl will only be run if configure.ac has changed. This must be done before
+dnl AC_INIT so that XINE_VERSION_SPEC, which is an m4 macro, is available.
+m4_esyscmd([./version.sh])
+
+dnl Initialize autoconf, autoheader, and automake
+AC_INIT([xine-lib], XINE_VERSION_SPEC, [xine-bugs@lists.sourceforge.net])
+AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/xine-engine/xine.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_LIBOBJ_DIR([lib])
+AC_CONFIG_HEADERS([include/configure.h])
+AM_MAINTAINER_MODE
-dnl
-dnl Require autoconf version 2.60
-dnl
-AC_PREREQ(2.59)
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
-dnl Making releases:
-dnl XINE_SUB += 1; XINE_PATCH = ''; continue with XINE_LT_* values below
-dnl
-XINE_MAJOR=1
-XINE_MINOR=1
-XINE_SUB=21
-dnl XINE_PATCH should be left empty or set to ".1" or ".2" or something similar
-XINE_PATCH=
-dnl Release series number (usually $XINE_MAJOR.$XINE_MINOR)
-XINE_SERIES=1.1
-
-dnl if test $XINE_SUB -eq 0 ; then
-dnl XINE_SUBPART="";
-dnl else
- XINE_SUBPART=".$XINE_SUB$XINE_PATCH"
-dnl fi
+AH_TOP([#ifndef __XINE_LIB_CONFIG_H__
+#define __XINE_LIB_CONFIG_H__ 1
+])
+AH_BOTTOM([#ifdef ASMALIGN_1SLN
+# define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"
+#else
+# define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"
+#endif
-dnl The libtool version numbers (XINE_LT_*). Don't even think about faking this!
-dnl
-dnl immediately before every release do:
-dnl ===================================
-dnl if (the interface is totally unchanged from previous release)
-dnl XINE_LT_REVISION ++;
-dnl else { /* interfaces have been added, removed or changed */
-dnl XINE_LT_REVISION = 0;
-dnl XINE_LT_CURRENT ++;
-dnl if (any interfaces have been _added_ since last release)
-dnl XINE_LT_AGE ++;
-dnl if (any interfaces have been _removed_ or _incompatibly changed_)
-dnl XINE_LT_AGE = 0;
-dnl }
-dnl
-dnl If you want to know more about what you are doing, here are some details:
-dnl * XINE_LT_CURRENT is the current API version
-dnl * XINE_LT_REVISION is an internal revision number which is increased when
-dnl the API itself did not change
-dnl * XINE_LT_AGE is the number of previous API versions still supported by
-dnl this library
-dnl * libtool has its own numbering scheme, because local library numbering
-dnl schemes are platform dependent
-dnl * for GNU/Linux, the library will be named
-dnl libname.so.(XINE_LT_CURRENT - XINE_LT_AGE).XINE_LT_AGE.XINE_LT_REVISION
-
-XINE_LT_CURRENT=31
-XINE_LT_REVISION=1
-XINE_LT_AGE=30
-
-dnl for a release tarball do "rm .cvsversion" before "make dist"
-if test -f "${srcdir-.}/.cvsversion"; then
- XINE_PRE="hg"
-else
- XINE_PRE=""
+#endif /* __XINE_LIB_CONFIG_H__ */
+])
+
+test x"$prefix" = x"NONE" && prefix="${ac_default_prefix}"
+test x"$exec_prefix" = x"NONE" && exec_prefix='${prefix}'
+
+dnl Use features of autoconf 2.61, but stay compatible with older versions.
+if test x"$datarootdir" = x""; then
+ datarootdir='${datadir}'
+ AC_SUBST(datarootdir)
+fi
+
+if test x"$docdir" = x""; then
+ docdir='${datarootdir}/doc/${PACKAGE}'
+ AC_SUBST(docdir)
fi
+if test x"$htmldir" = x""; then
+ htmldir='${docdir}'
+ AC_SUBST(htmldir)
+fi
+
+
+dnl -------------------------
+dnl Setup version information
+dnl -------------------------
+
+dnl Do not change these manually; they come from running ./version.sh when
+dnl autoconf runs. This must all be done after AC_INIT is done, but running
+dnl the version.sh script must be done before AC_INIT.
+XINE_MAJOR=XINE_VERSION_MAJOR
AC_SUBST(XINE_MAJOR)
+AC_DEFINE_UNQUOTED([XINE_MAJOR], [$XINE_MAJOR], [xine major version number])
+XINE_MINOR=XINE_VERSION_MINOR
AC_SUBST(XINE_MINOR)
+AC_DEFINE_UNQUOTED([XINE_MINOR], [$XINE_MINOR], [xine minor version number])
+XINE_SUB=XINE_VERSION_SUB
AC_SUBST(XINE_SUB)
+AC_DEFINE_UNQUOTED([XINE_SUB], [$XINE_SUB], [xine sub version number])
+XINE_PATCH=XINE_VERSION_PATCH
AC_SUBST(XINE_PATCH)
+AC_DEFINE_UNQUOTED([XINE_PATCH], [$XINE_PATCH], [xine patch version number])
+XINE_SERIES=XINE_VERSION_SERIES
AC_SUBST(XINE_SERIES)
-AC_SUBST(XINE_IFACE_AGE)
-AC_SUBST(XINE_BIN_AGE)
-
-AC_DEFINE_UNQUOTED(XINE_MAJOR, $XINE_MAJOR,[xine major version number])
-AC_DEFINE_UNQUOTED(XINE_MINOR, $XINE_MINOR,[xine minor version number])
-AC_DEFINE_UNQUOTED(XINE_SUB, $XINE_SUB, [xine sub version number])
-AC_DEFINE_UNQUOTED(XINE_PATCH, $XINE_PATCH, [xine patch version number])
+XINE_LT_CURRENT=__XINE_LT_CURRENT
AC_SUBST(XINE_LT_CURRENT)
+AC_DEFINE_UNQUOTED(XINE_LT_CURRENT, $XINE_LT_CURRENT, [xine interface version number])
+XINE_LT_REVISION=__XINE_LT_REVISION
AC_SUBST(XINE_LT_REVISION)
+XINE_LT_AGE=__XINE_LT_AGE
AC_SUBST(XINE_LT_AGE)
-
-AC_DEFINE_UNQUOTED(XINE_LT_CURRENT, $XINE_LT_CURRENT, [xine interface version number])
AC_DEFINE_UNQUOTED(XINE_LT_AGE, $XINE_LT_AGE, [xine interface version age])
-SPEC_VERSION=$XINE_MAJOR.$XINE_MINOR${XINE_SUBPART}$XINE_PRE
-TAR_NAME="xine-lib-"$SPEC_VERSION
-dnl TAR_NAME="xine-lib-"$XINE_MAJOR-$XINE_PRE
-dnl SPEC_VERSION=${XINE_MAJOR}_$XINE_PRE
+LIBNAME="libxine$(($XINE_LT_CURRENT-$XINE_LT_AGE))"
+AC_SUBST(LIBNAME)
+AC_DEFINE_UNQUOTED([XINE_TEXTDOMAIN], "$LIBNAME", [catalog message text domain])
+
+dnl Always set flags to begin with -g so that debug information will be
+dnl included. In release bulids, this can be stripped out later if desired.
+dnl More importantly, it prevents autoconf from initializing the defaults to
+dnl include -O2, which is not desirable in a debug build, and it messes with
+dnl other optimizations that we'll want to be setting ourselves later.
+CFLAGS="-g $CFLAGS"
+CPPFLAGS="-D_REENTRANT -DXINE_COMPILE $CPPFLAGS"
+LDFLAGS="-g $LDFLAGS"
+OBJCFLAGS="-g $OBJCFLAGS"
+
+
+dnl ------------------------------
+dnl Build modes: debug and profile
+dnl ------------------------------
+
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug], [build with debugging code enabled])],
+ [], [enable_debug="no"])
+if test x"$enable_debug" != x"no"; then
+ CPPFLAGS="-DDEBUG $CPPFLAGS"
+else
+ CPPFLAGS="-DNDEBUG $CPPFLAGS"
+fi
+AM_CONDITIONAL([DEBUG_BUILD], [test x"$enable_debug" != x"no"])
-AC_SUBST(TAR_NAME)
-AC_SUBST(SPEC_VERSION)
+AC_ARG_ENABLE([profiling],
+ [AS_HELP_STRING([--enable-profiling], [build with profiling code enabled])],
+ [], [enable_profiling="no"])
+if test x"$enable_profiling" != x"no"; then
+ CFLAGS="-pg $CFLAGS"
+ OBJCFLAGS="-pg $OBJCFLAGS"
+ LDFLAGS="-pg $LDFLAGS"
+fi
+AM_CONDITIONAL([PROFILING_BUILD], [test x"$enable_profiling" != x"no"])
-LIBNAME=libxine$XINE_MAJOR
-AC_SUBST(LIBNAME)
-AC_DEFINE_UNQUOTED(XINE_TEXTDOMAIN, "$LIBNAME", [catalog message text domain])
+dnl --------------
+dnl Build features
+dnl --------------
-dnl
-AM_INIT_AUTOMAKE("xine-lib", $SPEC_VERSION)
-dnl AM_INIT_AUTOMAKE("xine-lib", $XINE_MAJOR-$XINE_PRE)
+AC_ARG_ENABLE([ipv6],
+ [AS_HELP_STRING([--enable-ipv6], [enable use of IPv6])],
+ [if test x"$enableval" != x"no"; then
+ AC_DEFINE([ENABLE_IPV6], 1, [Enable this when IPv6 is requested])
+ fi])
-dnl ---------------------------------------------
-dnl Made possible to build for another arch.
-dnl ---------------------------------------------
+AC_ARG_ENABLE([antialiasing],
+ [AS_HELP_STRING([--enable-antialiasing], [enable font antialiasing])],
+ [if test x"$enableval" != x"no"; then
+ AC_DEFINE([ENABLE_ANTIALIASING], 1, [Define this to 1 to enable font antialising.])
+ fi])
-AC_CANONICAL_HOST
-AC_CANONICAL_BUILD
-test "$host" = "$build" && check_athlon=yes
+dnl ----------------------------------------------
+dnl Cross compilation, Mac OS X Universal Binaries
+dnl ----------------------------------------------
-AC_CONFIG_HEADERS([include/configure.h])
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+dnl check for Mac OS X universal binary support early, because certain flags
+dnl must be set prior to looking for cc/libtool, etc.
+MACOSX_UNIVERSAL_BINARIES
-dnl ---------------------------------------------
-dnl Check for programs.
-dnl ---------------------------------------------
+dnl Check to see if $host is empty. If it is, try $host_alias instead.
+dnl If $host is empty, it's because the user has run ./configure with a host
+dnl parameter unknown to config.sub. This used to be set in xv handling, but
+dnl it's also used in a bunch of other places unrelated to Xwindows support,
+dnl so if X is disabled, other things could go badly.
+host_or_hostalias="$host"
+test x"$host_or_hostalias" = x"" && host_or_hostalias="$host_alias"
-AC_PROG_CC
-AM_PROG_AS
-case "$host_os" in
- *darwin*)
- m4_ifdef([AC_PROG_OBJC],
- [AC_PROG_OBJC],
- [AC_CHECK_TOOL([OBJC], [gcc])
- AC_SUBST([OBJC])
- AC_SUBST([OBJCFLAGS])
- ])
- CPPFLAGS="$CPPFLAGS -DCONFIG_DARWIN"
- ;;
-esac
+dnl -------------------
+dnl checks for programs
+dnl -------------------
+AC_PROG_CC
+AM_PROG_CC_C_O
AC_GNU_SOURCE
-dnl Save CFLAGS, AC_ISC_POSIX set some unwanted default CFLAGS
-saved_CFLAGS="$CFLAGS"
AC_ISC_POSIX
-AC_PATH_MAGIC
-CFLAGS="$saved_CFLAGS"
-AC_HEADER_STDC
+
+AC_PROG_OBJC
+
+CC_PROG_AS
AC_PROG_MAKE_SET
AC_PROG_EGREP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_AWK
-AC_C_INLINE
AC_PATH_PROG([PERL], [perl], [no])
if test "$PERL" = no; then
@@ -157,42 +185,29 @@ AC_SUBST([PERL])
AC_CHECK_TOOL([STRINGS], [strings], [false])
+PKG_PROG_PKG_CONFIG
+
dnl ---------------------------------------------
dnl Libtool
dnl ---------------------------------------------
-AC_LIBTOOL_DLOPEN
AC_DISABLE_STATIC
+AC_LIBTOOL_DLOPEN
AC_LIBTOOL_WIN32_DLL
+AC_PATH_MAGIC
AC_PROG_LIBTOOL
AC_PROG_LIBTOOL_SANITYCHECK
-AC_SUBST(LIBTOOL_DEPS)
-if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
- STATIC="-static"
-else
- STATIC=
-fi
-AC_SUBST(STATIC)
-
-
-dnl ---------------------------------------------
-dnl Requirements for macros whose first invocations are conditional
-dnl ---------------------------------------------
-PKG_PROG_PKG_CONFIG
-CC_CHECK_WERROR
+dnl --------------------
+dnl checks for libraries
+dnl --------------------
-dnl ---------------------------------------------
-dnl NLS Support
-dnl ---------------------------------------------
-
-dnl ALL_LINGUAS="cs da de el en@quot en@boldquot es et fr gl id it ja ko nl nn no pl pt pt_BR ru sl sv tr zh"
AM_ICONV
AC_ARG_ENABLE([iconvtest],
- AS_HELP_STRING([--disable-iconvtest], [don't require iconv library]))
-if test "x$enable_iconvtest" != xno; then
- if test "x$am_cv_func_iconv" != xyes; then
- AC_MSG_ERROR([
+ [AS_HELP_STRING([--disable-iconvtest], [don't require iconv library])])
+if test x"$enable_iconvtest" != x"no"; then
+ if test x"$am_cv_func_iconv" != x"yes"; then
+ AC_MSG_ERROR([
****************************************************************
* iconv library not found. It's necessary for proper *
* manipulation with texts so xine requires it as default. *
@@ -201,2324 +216,806 @@ if test "x$enable_iconvtest" != xno; then
* by option --with-libiconv-prefix. *
* *
* If you don't want iconv support use the option *
-* --disable-iconvtest. *
+* --disable-iconvtest. *
****************************************************************
- ])
- fi
+])
+ fi
fi
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])
AC_PROG_GMSGFMT_PLURAL
-AC_CHECK_FUNCS([nl_langinfo])
-
-dnl ---------------------------------------------
-dnl Checks for typedefs, structures, and compiler characteristics.
-dnl ---------------------------------------------
-
-AC_C_BIGENDIAN
-AC_C_CONST
-dnl AC_C_ALWAYS_INLINE removal allows ffmpeg to be more widely buildable
-AC_TYPE_OFF_T
-AC_TYPE_SIZE_T
-AC_CHECK_SIZEOF(long)
-dnl AC_CHECK_TYPES([ptrdiff_t])
-dnl For systems without inttypes.h would be needed extend generated replacement.
-AC_CHECK_GENERATE_INTTYPES([include])
-AM_CONDITIONAL(GENERATED_INTTYPES_H, test "x$ac_cv_header_inttypes_h" != x"yes")
-AC_CHECK_TYPE(ssize_t, :, AC_DEFINE(ssize_t, __int64, [define ssize_t to __int64 if it's missing in default includes]))
-
-dnl ---------------------------------------------
-dnl threads and OS specific stuff
-dnl ---------------------------------------------
-
-CC_PTHREAD_FLAGS(, [AC_MSG_ERROR([Pthread support is needed])])
-CC_PTHREAD_RECURSIVE_MUTEX(, [AC_MSG_ERROR([recursive mutex support is needed - please report])])
-dnl <pthread.h> is implicitly included by xine-internals.h, so the include dir is needed everywhere
-CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS"
-
-AC_CHECK_DECL(sysi86,[
- AC_DEFINE(HAVE_SYSI86,1,[Define this if the 'sysi86' function is declared in sys/sysi86.h])
- ],,[
-#include <sys/sysi86.h>
-])
-
-AC_GETOPT_LONG
-
-
-dnl ---------------------------------------------
-dnl Windows & Hurd ports checks
-dnl ---------------------------------------------
-have_supported_dvb=yes
-SYS=other
-
-case "$host_os" in
- gnu*)
- have_supported_dvb=no
- SYS=hurd
- ;;
- mingw* | cygwin*)
- have_supported_dvb=no
- dnl check if we are using the cygwin, mingw or cygwin with mno-cygwin mode
- dnl in which case we are actually dealing with a mingw32 compiler
- case "$host" in
- *-*-mingw32*)
- SYS=mingw32
- ;;
- *-*-cygwin*)
- AC_EGREP_CPP(pattern,
- [#ifdef WIN32
- yes
- #endif],
- SYS=mingw32, SYS=cygwin)
- ;;
- esac
-
- if test "$SYS" = "mingw32"; then
- WIN32_CPPFLAGS='-I$(top_srcdir)/win32/include'
- LIBS="-lwinmm -lwsock32 $LIBS"
- LDFLAGS="-Wl,--enable-stdcall-fixup $LDFLAGS"
- dnl iberty has been needed only in older versions
- AC_CHECK_LIB(iberty, strncomp, [GOOM_LIBS="-liberty"])
+AC_CHECK_LIB([c], [dlopen], [DYNAMIC_LD_LIBS=""],
+ [AC_CHECK_LIB([dl], [dlopen], [DYNAMIC_LD_LIBS="-ldl"],
+ [AC_MSG_CHECKING(for dlopen under win32)
+ AC_LANG_PUSH([C])
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="-I${srcdir}/win32/include $CPPFLAGS"
+ ac_save_LIBS="$LIBS" LIBS="$LIBS -lkernel32"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+ #include <dlfcn.h>]], [[dlopen(NULL, 0)]])],
+ [DYNAMIC_LD_LIBS="-lkernel32"
+ AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+ CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS"
+ AC_LANG_POP([C])], [AC_MSG_ERROR([dynamic linker needed])])])
+AC_SUBST([DYNAMIC_LD_LIBS])
+
+AC_ARG_WITH([external-libxdg-basedir],
+ [AS_HELP_STRING([--without-external-libxdg-basedir], [use internal copy of libxdg-basedir])])
+
+have_xdg_basedir=no
+if test x"$with_external_libxdg_basedir" != x"no"; then
+ PKG_CHECK_MODULES([XDG_BASEDIR], [libxdg-basedir >= 1], [have_xdg_basedir=yes], [have_xdg_basedir=no])
+
+ if test x"$have_xdg_basedir" = x"no" -a x"$with_external_libxdg_basedir" = x"yes"; then
+ AC_MSG_ERROR([--with-external-libxdg-basedir used but no libxdg-basedir found])
fi
- ;;
-esac
-AC_SUBST(GOOM_LIBS)
-AC_SUBST(WIN32_CPPFLAGS)
-AM_CONDITIONAL(WIN32, test "x$SYS" = "xmingw32")
-AM_CONDITIONAL([HURD], [test "x$SYS" = "xhurd"])
-AM_CONDITIONAL([DVB], [test "$have_supported_dvb" = "yes"])
-
-
-dnl ---------------------------------------------
-dnl dynamic linker
-dnl ---------------------------------------------
-AM_DL()
-
-
-dnl ---------------------------------------------
-dnl determine libdir name
-dnl ---------------------------------------------
-
-AC_MSG_CHECKING([libdir name])
-case $host 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_LIBNAME="lib64"
- ;;
-*:*)
- XINE_LIBNAME="lib"
- ;;
-esac
-AC_MSG_RESULT([$XINE_LIBNAME])
-
-
-dnl ---------------------------------------------
-dnl mpeg2lib and ffmpeg stuff
-dnl ---------------------------------------------
-
-AC_SUBST(LIBMPEG2_CFLAGS)
-
-AC_ARG_ENABLE([libmpeg2new],
- AS_HELP_STRING([--enable-libmpeg2new], [build the newer MPEG2 decoder (buggy)]))
-AM_CONDITIONAL(ENABLE_MPEG2NEW, test "x$enable_libmpeg2new" = "xyes")
-
-AC_ARG_WITH([external-ffmpeg], AS_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library]))
-
-case "x$with_external_ffmpeg" in
- xno)
- ;;
- xyes)
- PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0])
- ;;
- *)
- with_external_ffmpeg=yes
- PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.20.0], [],
- [AC_MSG_RESULT(no); with_external_ffmpeg=no])
- ;;
-esac
-if test "x$with_external_ffmpeg" != "xno"; then
- PKG_CHECK_MODULES([FFMPEG_UTIL], [libavutil])
- PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc])
- AC_SUBST([FFMPEG_CFLAGS])
- AC_SUBST([FFMPEG_LIBS])
- AC_SUBST([FFMPEG_POSTPROC_CFLAGS])
- AC_SUBST([FFMPEG_POSTPROC_LIBS])
- AC_DEFINE([HAVE_FFMPEG], [1], [Define this if you have ffmpeg library])
-
- dnl Check presence of ffmpeg/avutil.h to see if it's old or new
- dnl style for headers. The new style would be preferred actually...
- AC_CHECK_HEADERS([ffmpeg/avutil.h])
- AC_CHECK_HEADERS([libavutil/avutil.h])
- if test "$ac_cv_header_ffmpeg_avutil_h" = "yes" && test "$ac_cv_header_libavutil_avutil_h" = "yes"; then
- AC_MSG_ERROR([old & new ffmpeg headers found - you need to clean up!])
- fi
-
- AC_MSG_RESULT([using external ffmpeg])
-else
- AC_MSG_RESULT([using internal ffmpeg - NOT RECOMMENDED OR SUPPORTED])
- LIBFFMPEG_CPPFLAGS="-DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DXINE_MPEG_ENCODER -D_ISOC9X_SOURCE -DCONFIG_DECODERS"
- AC_CHECK_TYPES(int_fast8_t, [], [LIBFFMPEG_CPPFLAGS="$LIBFFMPEG_CPPFLAGS -DEMULATE_FAST_INT"])
- AC_SUBST([LIBFFMPEG_CPPFLAGS])
fi
-AM_CONDITIONAL(HAVE_FFMPEG, test "x$with_external_ffmpeg" = "xyes")
-
-
-AC_ARG_ENABLE([ffmpeg_uncommon_codecs],
- AS_HELP_STRING([--disable-ffmpeg-uncommon-codecs], [don't build uncommon ffmpeg codecs]))
-
-AC_ARG_ENABLE([ffmpeg_popular_codecs],
- AS_HELP_STRING([--disable-ffmpeg-popular-codecs], [don't build popular ffmpeg codecs]))
-
-AS_MKDIR_P(src/libffmpeg)
-ffmpeg_config_h=src/libffmpeg/ffmpeg_config.h
-echo "/* Automatically generated */" > $ffmpeg_config_h
-
-dnl uncommon ffmpeg codecs
-ffmpeg_uncommon_codecs="AASC ASV1 ASV2 AVS CSCD CYUV DVVIDEO EIGHTBPS FLIC FLV FOURXM FRAPS HUFFYUV IDCIN INTERPLAY_VIDEO KMVC LOCO MMVIDEO NUV QDRAW QPEG ROQ RPZA SMACKER SMC SNOW TRUEMOTION1 TRUEMOTION2 TSCC ULTI VCR1 VMDVIDEO WNV1 XAN_WC3 XL ZMBV ALAC AMR_NB AMR_WB LIBGSM MACE3 MACE6 SHORTEN SMACKAUD TRUESPEECH TTA VMDAUDIO PCM_ALAW PCM_MULAW PCM_S8 PCM_S16BE PCM_S16LE PCM_S24BE PCM_S24DAUD PCM_S24LE PCM_S32BE PCM_S32LE PCM_U8 PCM_U16BE PCM_U16LE PCM_U24BE PCM_U24LE PCM_U32BE PCM_U32LE INTERPLAY_DPCM ROQ_DPCM SOL_DPCM VQA XAN_DPCM ADPCM_4XM ADPCM_CT ADPCM_EA ADPCM_IMA_DK3 ADPCM_IMA_DK4 ADPCM_IMA_QT ADPCM_IMA_SMJPEG ADPCM_IMA_WAV ADPCM_IMA_WS ADPCM_MS ADPCM_SBPRO_2 ADPCM_SBPRO_3 ADPCM_SBPRO_4 ADPCM_XA ADPCM_YAMAHA"
-for ucname in $ffmpeg_uncommon_codecs; do
- config_name="CONFIG_${ucname}_DECODER"
- enabled_name="ENABLE_${ucname}_DECODER"
-
- if test "x$enable_ffmpeg_uncommon_codecs" != xno; then
- echo "#define $config_name 1" >> $ffmpeg_config_h
- echo "#define $enabled_name 1" >> $ffmpeg_config_h
- else
- echo "#define $enabled_name 0" >> $ffmpeg_config_h
- fi
-done
-
-dnl popular ffmpeg codecs
-ffmpeg_popular_codecs="CINEPAK FLASHSV H261 H263 H263I H264 INDEO2 INDEO3 MJPEG MJPEGB MPEG1VIDEO MPEG2VIDEO MPEG4 MPEGVIDEO MSMPEG4V1 MSMPEG4V2 MSMPEG4V3 MSRLE MSVIDEO1 QTRLE RV10 RV20 RV30 RV40 SVQ1 SVQ3 VC1 VP3 VP5 VP6 VP6F VP8 WMV1 WMV2 WMV3 COOK DTS EAC3 AAC_LATM FLAC MP2 MP3 QDM2 RA_144 RA_288 WAVPACK WMAV1 WMAV2 WMAPRO ADPCM_SWF"
-
-for ucname in $ffmpeg_popular_codecs; do
- config_name="CONFIG_${ucname}_DECODER"
- enabled_name="ENABLE_${ucname}_DECODER"
-
- if test "x$enable_ffmpeg_popular_codecs" != xno; then
- echo "#define $config_name 1" >> $ffmpeg_config_h
- echo "#define $enabled_name 1" >> $ffmpeg_config_h
- else
- echo "#define $enabled_name 0" >> $ffmpeg_config_h
- fi
-done
-
-dnl disabled ffmpeg codecs
-ffmpeg_disabled_codecs="BMP CAVS CLJR DSICINVIDEO FFV1 FFVHUFF GIF MDEC MPEG_XVMC MSZH PNG RAWVIDEO SP5X TARGA TIERTEXSEQVIDEO TIFF VMNC ZLIB DSICINAUDIO IMC MP3ADU MP3ON4 MPC7 SONIC WS_SND1 ADPCM_ADX ADPCM_G726 DVBSUB DVDSUB THEORA AAC MPEG4AAC AC3 VORBIS"
-for ucname in $ffmpeg_disabled_codecs; do
- config_name="CONFIG_${ucname}_DECODER"
- enabled_name="ENABLE_${ucname}_DECODER"
-
- echo "#define $enabled_name 0" >> $ffmpeg_config_h
-done
-
-dnl disabled ffmpeg encoders
-ffmpeg_extra_encoders="H263P JPEGLS LJPEG PAM PBM PGM PGMYUV PPM SONIC_LS"
-for ucname in $ffmpeg_uncommon_codecs $ffmpeg_popular_codecs $ffmpeg_disabled_codecs $ffmpeg_extra_encoders; do
- config_name="CONFIG_${ucname}_ENCODER"
- enabled_name="ENABLE_${ucname}_ENCODER"
-
- echo "#define $enabled_name 0" >> $ffmpeg_config_h
-done
-
-dnl disabled parsers
-ffmpeg_parsers="AAC AC3 CAVSVIDEO DVBSUB DVDSUB H261 H263 H264 MJPEG MPEG4VIDEO MPEGAUDIO MPEGVIDEO PNM"
-for ucname in $ffmpeg_parsers; do
- config_name="CONFIG_${ucname}_PARSER"
- enabled_name="ENABLE_${ucname}_PARSER"
-
- echo "#define $enabled_name 0" >> $ffmpeg_config_h
-done
-
-LIBMPEG2_CFLAGS=""
-
-AC_CHECK_DECL(lrintf,[
- AC_DEFINE(HAVE_LRINTF,1,[Define this if the 'lrintf' function is declared in math.h])
- AC_DEFINE(_ISOC9X_SOURCE,1,[Define this if you are ISO C9X compliant])
- ],,[
-#define _ISOC9X_SOURCE
-#include <math.h>
-])
-AC_CHECK_DECL(rintf,[
- AC_DEFINE(HAVE_RINTF,1,[Define this if the 'rintf' function is declared in math.h])
- ],,[
-#include <math.h>
-])
-
-AC_CHECK_FUNCS(memalign)
-
-AC_ARG_ENABLE([altivec],
- AS_HELP_STRING([--disable-altivec], [do not use assembly codes for Motorola 74xx CPUs]))
-
-AC_ARG_ENABLE([vis],
- AS_HELP_STRING([--disable-vis], [do not use assembly codes for Sun UltraSPARC CPUs]))
-
-AC_ARG_ENABLE([mlib],
- AS_HELP_STRING([--enable-mlib], [build Sun mediaLib support]))
-
-AC_ARG_ENABLE([mlib-lazyload],
- AS_HELP_STRING([--enable-mlib-lazyload], [check for Sun mediaLib at runtime]))
-
-if test "x$enable_mlib" = xyes; then
- if test "x$MLIBHOME" = x; then
- mlibhome=/opt/SUNWmlib
- else
- mlibhome="$MLIBHOME"
- fi
-
- AC_CHECK_LIB(mlib, mlib_VideoAddBlock_U8_S16,
- [ saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I$mlibhome/include"
- AC_CHECK_HEADER(mlib_video.h,
- [ if test "x$enable_mlib_lazyload" = xyes; then
- if test "$GCC" = yes; then
- MLIB_LIBS="-L$mlibhome/lib -Wl,-z,lazyload,-lmlib,-z,nolazyload"
- else
- MLIB_LIBS="-L$mlibhome/lib -z lazyload -lmlib -z nolazyload"
- fi
- AC_DEFINE(MLIB_LAZYLOAD,1,[Define this if you want to load mlib lazily])
- else
- MLIB_LIBS="-L$mlibhome/lib -lmlib"
- fi
- MLIB_CFLAGS="-I$mlibhome/include"
- LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS $MLIB_CFLAGS"
- LIBFFMPEG_CFLAGS="$LIBFFMPEG_CFLAGS $MLIB_CFLAGS"
- 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
- ],)
- CPPFLAGS="$saved_CPPFLAGS"
- ], , -L$mlibhome/lib)
-fi
-AM_CONDITIONAL(HAVE_MLIB, test "x$ac_have_mlib" = "xyes")
-AC_SUBST(MLIB_LIBS)
-AC_SUBST(MLIB_CFLAGS)
-
-dnl ---------------------------------------------
-dnl Checks for X11
-dnl ---------------------------------------------
-
-if test "x$with_x" != "xno"; then
- PKG_CHECK_MODULES([X], [x11 xext], , [
- AC_PATH_XTRA
-
- dnl Set xv_path if its not done already
- dnl we do it here before rewriting X_LIBS
- if test x$xv_path = x; then
- xv_path=`echo $X_LIBS | sed -e 's/\-L\(.*\)/\1/'`
- fi
-
- dnl ----------------------------------------------
- dnl Check for XShm support (required with X)
- dnl ----------------------------------------------
-
- if test "x$no_x" != "xyes"; then
- ac_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
- AC_CHECK_HEADERS([X11/extensions/XShm.h], [true],
- [AC_MSG_ERROR([XShm extension is required])], [[#include <X11/Xlib.h>]])
- AC_CHECK_LIB([Xext], [main], [true],
- [AC_MSG_ERROR([libXext is required])], [$X_LIBS])
- CPPFLAGS="$ac_save_CPPFLAGS"
- X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext"
- fi
- ])
+if test x"$have_xdg_basedir" = xyes; then
+ XDG_BASEDIR_REQUIRES="libxdg-basedir"
else
- no_x="yes"
-fi
-
-if test "x$no_x" != "xyes"; then
- AC_DEFINE(HAVE_X11,1,[Define this if you have X11R6 installed])
+ XDG_BASEDIR_CPPFLAGS='-I$(top_srcdir)/contrib/libxdg-basedir'
+ XDG_BASEDIR_LIBS='$(top_builddir)/contrib/libxdg-basedir/libxdg-basedir.la'
+ XDG_BASEDIR_DEPS='$(top_builddir)/contrib/libxdg-basedir/libxdg-basedir.la'
fi
-AM_CONDITIONAL(HAVE_X11, [test "x$no_x" != "xyes"])
-
-
-dnl ---------------------------------------------
-dnl Locate libraries needed for X health check
-dnl ---------------------------------------------
-soname_script="/[[0-9]]$/! d; s%^.*/%%
-t q
-b
-:q
-q"
-x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libX11.so"* "${x_libraries:-/usr/lib}/libX11.so"* 2>/dev/null | sed -e \"${soname_script}\"`"
-AC_DEFINE_UNQUOTED([LIBX11_SO], "${x_lib_location:-libX11.so}", [The soname of libX11, needed for dlopen()])
-x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libXv.so"* "${x_libraries:-/usr/lib}/libXv.so"* 2>/dev/null | sed -e \"${soname_script}\"`"
-AC_DEFINE_UNQUOTED([LIBXV_SO], "${x_lib_location:-libXv.so}", [The soname of libXv, needed for dlopen()])
+AC_SUBST([XDG_BASEDIR_REQUIRES])
+AC_SUBST([XDG_BASEDIR_CPPFLAGS])
+AC_SUBST([XDG_BASEDIR_LIBS])
+AC_SUBST([XDG_BASEDIR_DEPS])
-
-dnl ---------------------------------------------
-dnl socket library
-dnl ---------------------------------------------
+AM_CONDITIONAL([EXTERNAL_LIBXDG_BASEDIR], [test x"$have_xdg_basedir" = xyes])
dnl Test for socket and network support library
-NET_LIBS=""
-AC_CHECK_LIB(socket, socket, NET_LIBS="-lsocket $NET_LIBS",)
-AC_CHECK_LIB(nsl, gethostbyname, NET_LIBS="-lnsl $NET_LIBS",)
+AC_CHECK_LIB([socket], [socket], [NET_LIBS="-lsocket $NET_LIBS"])
+AC_CHECK_LIB([nsl], [gethostbyname], [NET_LIBS="-lnsl $NET_LIBS"])
+AC_CHECK_LIB([resolv], [hstrerror], [NET_LIBS="-lresolv $NET_LIBS"])
AC_SUBST(NET_LIBS)
-
-dnl ---------------------------------------------
-dnl socklen_t
-dnl ---------------------------------------------
-AC_CHECK_SOCKLEN_T
-
-
-dnl ---------------------------------------------
-dnl IPv6
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([ipv6],
- AS_HELP_STRING([--enable-ipv6], [enable use of IPv6]))
-
-if test "x$enable_ipv6" = "xyes"; then
- AC_DEFINE([ENABLE_IPV6], [1], [Enable this when IPv6 is requested])
-fi
-
-dnl ---------------------------------------------
-dnl zlib
-dnl ---------------------------------------------
-
-AC_ARG_WITH(zlib-prefix,
- AS_HELP_STRING(
- [--with-zlib-prefix=PREFIX],
- [path to zlib compression library]),
- [zlib_prefix="$withval"],
- [zlib_prefix="no"])
-
-if test "x$zlib_prefix" = "xno"; then
- ZLIB_LIBS="-lz"
-else
- ZLIB_CPPFLAGS="-I$zlib_prefix/include"
- ZLIB_LIBS="-L$zlib_prefix/lib -lz"
-fi
-
-ac_save_CPPFLAGS="$CPPFLAGS"
-ac_save_LIBS="$LIBS"
-CPPFLAGS="$CPPFLAGS $ZLIB_CPPFLAGS"
-LIBS="$LIBS $ZLIB_LIBS"
-
-AC_CHECK_LIB(z, gzsetparams,
- [AC_CHECK_HEADER(zlib.h,
- have_zlib=yes)])
-
-CPPFLAGS="$ac_save_CPPFLAGS"
-LIBS="$ac_save_LIBS"
-
-if test "x$have_zlib" != "xyes"; then
- AC_MSG_ERROR(zlib needed)
-fi
-AC_SUBST(ZLIB_CPPFLAGS)
-AC_SUBST(ZLIB_LIBS)
-
-
-dnl ---------------------------------------------
-dnl check posix timers
-dnl ---------------------------------------------
-
-AC_CHECK_LIB(rt, clock_getres,
+AC_CHECK_LIB([rt], [clock_getres],
[RT_LIBS="-lrt"
- AC_DEFINE(HAVE_POSIX_TIMERS,1,
- [Define this if you have POSIX timers.])],
- AC_MSG_RESULT([*** no POSIX timers available.]))
+ AC_DEFINE(HAVE_POSIX_TIMERS, 1, [Define this if you have POSIX timers.])],
+ [AC_MSG_RESULT([*** no POSIX timers available.])])
AC_SUBST(RT_LIBS)
-dnl ---------------------------------------------
-dnl Check for OpenGL & [GLut | GLU]
-dnl ---------------------------------------------
-
-AM_PATH_OPENGL()
-
+AC_CHECK_LIB([posix4], [sched_get_priority_min])
-dnl ---------------------------------------------
-dnl Check for platform which supports syncfb
-dnl ---------------------------------------------
+AC_CHECK_LIB([kstat], [kstat_open],
+ [KSTAT_LIBS=-lkstat
+ AC_DEFINE([HAVE_KSTAT], 1, [Define this if you have kernel statistics available via kstat interface])])
+AC_SUBST(KSTAT_LIBS)
-AC_ARG_ENABLE([syncfb],
- AS_HELP_STRING([--disable-syncfb], [do not build syncfb plugin]))
+AC_ARG_WITH([zlib-prefix],
+ [AS_HELP_STRING([--with-zlib-prefix=PREFIX], [path to zlib compression library])],
+ [if test x"$withval" != x"no"; then
+ ZLIB_CPPFLAGS="-I$withval/include"
+ ZLIB_LIBS="-L$withval/lib"
+ fi])
+
+AC_CHECK_LIB([z], [gzsetparams],
+ [ZLIB_LIBS="$ZLIB_LIBS -lz"
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ZLIB_CPPFLAGS"
+ AC_CHECK_HEADER([zlib.h], [have_zlib=yes], [have_zlib=no])
+ CPPFLAGS="$ac_save_CPPFLAGS"],
+ [have_zlib=no],
+ ["$ZLIB_LIBS"])
+
+test x"$have_zlib" != x"yes" && AC_MSG_ERROR(zlib needed)
+AC_SUBST(ZLIB_CPPFLAGS)
+AC_SUBST(ZLIB_LIBS)
-case "$host_os" in
- *linux*) ;;
- *)
- if test "x$enable_syncfb" = "xyes"; then
- AC_MSG_ERROR([You cannot build SyncFB support on non-Linux systems.])
+dnl FreeType2 (optional; disabled by default)
+AC_ARG_WITH([freetype],
+ [AS_HELP_STRING([--with-freetype], [Build with FreeType2 library])],
+ [], [with_freetype=no])
+if test x"$with_freetype" != x"no"; then
+ PKG_CHECK_MODULES([FT2], [freetype2], [have_freetype=yes], [have_freetype=no])
+ if test x"$have_freetype" = x"no"; then
+ AC_MSG_ERROR([FreeType2 support requested but FreeType2 library not found])
+ elif test x"$have_freetype" = x"yes"; then
+ AC_DEFINE([HAVE_FT2], 1, [Define this if you have freetype2 library])
fi
- enable_syncfb=no ;;
-esac
-
-AM_CONDITIONAL(HAVE_SYNCFB, test "x$enable_syncfb" != "xno")
-
-
-dnl ----------------------------------------------
-dnl Check for usable video-for-linux (v4l) support
-dnl ----------------------------------------------
-AC_ARG_ENABLE([v4l],
- AS_HELP_STRING([--disable-v4l], [do not build Video4Linux input plugins]))
-
-have_v4l=no
-have_v4l2=no
-if test "x$enable_v4l" != "xno"; then
- AC_CHECK_HEADERS([linux/videodev.h], [have_v4l=yes], [])
- AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h sys/videodev2.h], [have_v4l2=yes], [])
- AC_CHECK_HEADERS([asm/types.h])
- if test "x$enable_v4l" = "xyes" && test "x$have_v4l$have_v4l2" = "xnono"; then
- AC_MSG_ERROR([Video4Linux support requested, but prerequisite headers not found.])
- fi
fi
-AM_CONDITIONAL(HAVE_V4L, [test "x$have_v4l" = "xyes"])
-AM_CONDITIONAL(HAVE_V4L2, [test "x$have_v4l2" = "xyes"])
-
-dnl ----------------------------------------------
-dnl Check for libv4l support
-dnl ----------------------------------------------
-AC_ARG_ENABLE([libv4l],
- AS_HELP_STRING([--disable-libv4l], [do not build with libv4l support]))
-
-if test "x$have_v4l2" = xyes && test "x$enable_libv4l" != xno; then
- have_libv4l=no
- PKG_CHECK_MODULES([V4L2], [libv4l2],
- [have_libv4l=yes
- AC_DEFINE([HAVE_LIBV4L2_H], [1], [Define this if you have libv4l installed])],
- [have_libv4l=no])
- if test "x$enable_libv4l" = "xyes" && test "x$have_libv4l" = "xno"; then
- AC_MSG_ERROR([libv4l requested but not found.])
- fi
+dnl fontconfig (optional; disabled by default)
+AC_ARG_WITH([fontconfig],
+ [AS_HELP_STRING([--with-fontconfig], [Build with fontconfig library])],
+ [], [with_fontconfig=no])
+if test x"$with_fontconfig" = x"yes"; then
+ if test x"$have_freetype" != x"yes"; then
+ AC_MSG_ERROR([fontconfig support requested, but FreeType2 not enabled.])
+ fi
+ PKG_CHECK_MODULES([FONTCONFIG], [fontconfig], [have_fontconfig=yes], [have_fontconfig=no])
+ if test x"$have_fontconfig" = x"no"; then
+ AC_MSG_ERROR([fontconfig support requested but fontconfig library not found])
+ elif test x"$have_fontconfig" = x"yes"; then
+ AC_DEFINE([HAVE_FONTCONFIG], 1, [Define this if you have fontconfig library])
+ fi
fi
-dnl ----------------------------------------------
-dnl Check for Xv and XvMC support
-dnl ----------------------------------------------
-
-dnl With recent XFree86 or Xorg, dynamic linking is preferred!
-dnl Only dynamic linking is possible when using libtool < 1.4.0
-
-AC_ARG_WITH(xv-path, AS_HELP_STRING([--with-xv-path=path], [where libXv is installed]),
- xv_path="$withval",)
+dnl -----------------------
+dnl checks for header files
+dnl -----------------------
-AC_ARG_ENABLE([static-xv],
- AS_HELP_STRING([--enable-static-xv],[Enable this to force linking against libXv.a]))
-
-if test "x$enable_static_xv" = "xyes"; then
- xv_prefer_shared="no"
-else
- xv_prefer_shared="yes"
-fi
+AC_HEADER_STDC
-if test "x$no_x" != "xyes"; then
- PKG_CHECK_MODULES([XV], [xv], [
- ac_have_xv="yes"
- AC_DEFINE([HAVE_XV], [1], [Define this if you have libXv installed])
- ], [AC_FIND_LIBXV])
-fi
-AM_CONDITIONAL(HAVE_XV, test "x$ac_have_xv" = "xyes")
+AC_CHECK_HEADERS([alloca.h])
+AC_CHECK_HEADERS([assert.h byteswap.h dirent.h errno.h execinfo.h fcntl.h glob.h])
+AC_CHECK_HEADERS([libgen.h malloc.h netdb.h stdbool.h ucontext.h])
+AC_CHECK_HEADERS([sys/ioctl.h sys/mixer.h sys/mman.h sys/param.h sys/times.h sys/wait.h])
+dnl This is duplicative due to AC_HEADER_STDC, but src/input/vcd stuff needs to
+dnl have HAVE_STDIO_H defined, or it won't compile.
+AC_CHECK_HEADERS([stdio.h])
-host_or_hostalias="$host"
-if test "$host_or_hostalias" = ""; then
- dnl user has called ./configure with a host parameter unknown to
- dnl config.sub; the canonical "$host" is empty
- dnl
- dnl Try the following switch with user's original host_alias
- dnl input instead.
- dnl
- host_or_hostalias="$host_alias"
-fi
-
-case "$host_or_hostalias" in
- hppa*)
- if test "x$ac_have_xv_static" = "xyes"; then
- echo "warning: hppa linker - disabling static libXv"
- XV_LIBS="libXv.so"
- fi
- ;;
-
- ppc-*-linux* | powerpc-*)
- ppc_arch="yes"
- ;;
-
- *)
+dnl cdrom ioctls (common for dvdnav and vcd)
+case "$host_os" in
+ linux*)
+ AC_CHECK_HEADERS([linux/cdrom.h],
+ [AC_DEFINE([HAVE_LINUX_CDROM], 1, [Define 1 if you have Linux-type CD-ROM support])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/cdrom.h>]],
+ [[struct cdrom_generic_command test; int has_timeout = sizeof(test.timeout);]])],
+ [AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1], [Define 1 if timeout is in cdrom_generic_command struct])])])
;;
esac
-AM_CONDITIONAL(PPC_ARCH, test "x$ppc_arch" = "xyes")
-
-dnl
-dnl Check if we can enable the xxmc plugin.
-dnl
-
-AC_ARG_ENABLE([xvmc],
- AS_HELP_STRING([--disable-xvmc], [Disable XxMC and XvMC outplut plugins]) )
+AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h])
-if test "x$no_x" = "x" && test "x$enable_xvmc" != "xno"; then
-AC_ARG_WITH(xxmc-path, AS_HELP_STRING([--with-xxmc-path=path], [where libXvMC libraries for the
- xxmc plugin are installed. Defalts to the default X library path.]),
- xxmc_path="$withval", xxmc_path="$x_libraries")
-AC_ARG_WITH(xxmc-lib, AS_HELP_STRING([--with-xxmc-lib=XXXX], [The name of the XvMC library
- libXXXX.so for the xxmc plugin.]),xxmc_stub="$withval",
- xxmc_stub="XvMCW")
+dnl ----------------
+dnl checks for types
+dnl ----------------
-saved_libs="$LIBS"
-saved_CPPFLAGS="$CPPFLAGS"
-if test "x$x_includes" != "x"; then
- CPPFLAGS="$CPPFLAGS -I$x_includes"
-fi
-
-XXMC_LIBS="${xxmc_path:+-L}$xxmc_path -l$xxmc_stub"
-AC_MSG_CHECKING(whether to enable the xxmc plugin with vld extensions)
-AC_MSG_RESULT()
-dnl Check if vld "extended" XvMC is available
-if test "x$xxmc_stub" = "xXvMCW" && test "x$ac_have_xv" = "xyes"; then
- AC_CHECK_LIB($xxmc_stub, XvMCPutSlice,
- ac_have_xxmc="yes",
- [ac_have_xxmc="no"
- AC_MSG_RESULT([*** Could not link with -l$xxmc_stub for vld extensions.])],
- [${xxmc_path:+-L}$xxmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
-else
- if test "x$ac_have_xv" = "xyes"; then
- AC_CHECK_LIB($xxmc_stub, XvMCPutSlice,
- [ac_have_xxmc="yes"
- XXMC_LIBS="$XXMC_LIBS -lXvMC"],
- [ac_have_xxmc="no"
- AC_MSG_RESULT([*** Could not link with -l$xxmc_stub -lXvMC for vld extensions.])],
- [${xxmc_path:+-L}$xxmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
- else
- ac_have_xxmc="no",
- fi
-fi
-
-if test "x$ac_have_xxmc" = "xyes"; then
- AC_CHECK_HEADERS(X11/extensions/vldXvMC.h,
- [ac_have_vldxvmc_h="yes"],
- ac_have_vldxvmc="no",)
- if test "x$ac_have_vldxvmc_h" = "xyes"; then
- AC_DEFINE([HAVE_VLDXVMC], [1],
- [Define 1 if you have vldXvMC.h])
- fi
-fi
-dnl Try fallback to standard XvMC if vld failed
-if test "x$ac_have_xxmc" = "xno"; then
- if test "x$xxmc_stub" = "xXvMCW"; then
- AC_CHECK_LIB($xxmc_stub, XvMCCreateContext,
- ac_have_xxmc="yes",
- [ac_have_xxmc="no"
- AC_MSG_RESULT([*** Could not link with -l$xxmc_stub for standard XvMC.])],
- [${xxmc_path:+-L}$xxmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
- else
- if test "x$ac_have_xv" = "xyes"; then
- AC_CHECK_LIB($xxmc_stub, XvMCCreateContext,
- [ac_have_xxmc="yes"
- XXMC_LIBS="$XXMC_LIBS -lXvMC"],
- [ac_have_xxmc="no"
- AC_MSG_RESULT([*** Could not link with -lXvMC for standard XvMC.])],
- [${xxmc_path:+-L}$xxmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
- else
- ac_have_xxmc="no",
- fi
- fi
-fi
-if test "x$ac_have_xxmc" = "xyes"; then
- AC_CHECK_HEADERS(X11/extensions/XvMC.h,,
- ac_have_xxmc="no",)
-fi
-if test "x$ac_have_xxmc" = "xyes"; then
- AC_DEFINE(HAVE_XXMC,1,[Define this to compile the xxmc plugin.])
- if test "x$ac_have_vldxvmc_h" = "xyes"; then
- AC_MSG_RESULT([*** Enabling xxmc plugin with vld extensions.])
- else
- AC_MSG_RESULT([*** Enabling xxmc plugin for standard XvMC *only*.])
- fi
-else
- AC_MSG_RESULT([*** Disabling xxmc plugin due to above errors.])
-fi
-LIBS="$saved_libs"
-fi
-AM_CONDITIONAL(HAVE_VLDXVMC, test "x$ac_have_vldxvmc_h" = "xyes")
-AM_CONDITIONAL(HAVE_XXMC, test "x$ac_have_xxmc" = "xyes")
-AC_SUBST(XXMC_LIBS)
-
-dnl
-dnl Check if we can enable the xvmc plugin.
-dnl
-if test "x$no_x" = "x" && test "x$enable_xvmc" != "xno"; then
-
-AC_ARG_WITH(xvmc-path, AS_HELP_STRING([--with-xvmc-path=path], [where libXvMC libraries for the
- xvmc plugin are installed. Defalts to the default X library path.]),
- xvmc_path="$withval", xvmc_path="$x_libraries")
-AC_ARG_WITH(xvmc-lib, AS_HELP_STRING([--with-xvmc-lib=XXXX], [The name of the XvMC library
- libXXXX.so for the xvmc plugin.]),xvmc_stub="$withval",
- xvmc_stub="XvMCW")
-saved_libs="$LIBS"
-XVMC_LIBS="${xvmc_path:+-L}$xvmc_path -l$xvmc_stub"
-AC_MSG_CHECKING(whether to enable the xvmc plugin)
-AC_MSG_RESULT()
-if test "x$xvmc_stub" = "xXvMCW"; then
- AC_CHECK_LIB($xvmc_stub, XvMCCreateContext,
- ac_have_xvmc="yes",
- [ac_have_xvmc="no"
- AC_MSG_RESULT([*** Could not link with -l$xvmc_stub.])],
- [${xvmc_path:+-L}$xvmc_path $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
-else
- if test "x$ac_have_xv" = "xyes"; then
- AC_CHECK_LIB($xvmc_stub, XvMCCreateContext,
- [ac_have_xvmc="yes"
- XVMC_LIBS="$XVMC_LIBS -lXvMC"],
- [ac_have_xvmc="no"
- AC_MSG_RESULT([*** Could not link with -lXvMC.])],
- [${xvmc_path:+-L}$xvmc_path -lXvMC $X_LIBS $X_PRE_LIBS $XV_LIBS -lXext $X_EXTRA_LIBS])
- else
- ac_have_xvmc="no",
- fi
-fi
-if test "x$ac_have_xvmc" = "xyes"; then
- AC_CHECK_HEADERS(X11/extensions/XvMC.h,,
- ac_have_xvmc="no",)
-fi
-if test "x$ac_have_xvmc" = "xyes"; then
- AC_DEFINE(HAVE_XVMC,1,[Define this if you have an XvMC library and XvMC.h installed.])
- AC_MSG_RESULT([*** Enabling old xvmc plugin.])
-else
- AC_MSG_RESULT([*** Disabling old xvmc plugin due to above errors.])
-fi
-CPPFLAGS="$saved_CPPFLAGS"
-LIBS="$saved_libs"
-fi
-AM_CONDITIONAL(HAVE_XVMC, test "x$ac_have_xvmc" = "xyes")
-AC_SUBST(XVMC_LIBS)
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
+AC_CHECK_GENERATE_INTTYPES([include])
+AM_CONDITIONAL([GENERATED_INTTYPES_H], [test "x$ac_cv_header_inttypes_h" != x"yes"])
+AC_CHECK_TYPE([ssize_t], [],
+ [AC_DEFINE([ssize_t], [__int64], [define ssize_t to __int64 if it's missing in default includes])])
+AC_CHECK_SOCKLEN_T
+AC_CACHE_CHECK([type of request parameter for ioctl()], [ac_cv_ioctl_request], [
+ for ac_ioctl_request_type in "unsigned long" "int"; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/ioctl.h>
+ int ioctl(int fd, $ac_ioctl_request_type request, ...);]], [[]])],
+ [ac_cv_ioctl_request=$ac_ioctl_request_type], [])
+ done
+ if test x"$ac_cv_ioctl_request" = x""; then
+ AC_MSG_ERROR([Unable to determine the type for ioctl() request parameter])
+ fi
+])
+AC_DEFINE_UNQUOTED([IOCTL_REQUEST_TYPE], [$ac_cv_ioctl_request], [Type of the request parameter for ioctl()])
-dnl ---------------------------------------------
-dnl Check for xcb
-dnl ---------------------------------------------
-AC_ARG_WITH([xcb], AS_HELP_STRING([--without-xcb], [Doesn't build XCB video out plugins]))
-if test "x$with_xcb" != "xno"; then
- PKG_CHECK_MODULES([XCB], [xcb-shape >= 1.0], [have_xcb="yes"], [have_xcb="no"])
-fi
+dnl ---------------------
+dnl checks for structures
+dnl ---------------------
-AC_SUBST(XCB_CFLAGS)
-AC_SUBST(XCB_LIBS)
-AM_CONDITIONAL(HAVE_XCB, test "x$have_xcb" = "xyes" )
+AC_CHECK_MEMBER([struct tm.tm_gmtoff],
+ [AC_DEFINE([HAVE_TM_GMTOFF], 1, [Define if struct tm has the tm_gmtoff member.])],
+ [], [#include <time.h>])
-dnl ---------------------------------------------
-dnl Check for xcb-shm
-dnl ---------------------------------------------
+dnl -----------------------------------
+dnl checks for compiler characteristics
+dnl -----------------------------------
-if test "x$have_xcb" = "xyes"; then
- PKG_CHECK_MODULES([XCBSHM], [xcb-shm], [have_xcbshm="yes"], [have_xcbshm="no"])
+if test x"$GCC" = x"yes"; then
+ GCC_VERSION="`$CC -dumpversion`"
+ GCC_VERSION_MAJOR="`echo "$GCC_VERSION" | cut -d '.' -f1`"
+ GCC_VERSION_MINOR="`echo "$GCC_VERSION" | cut -d '.' -f2`"
+ GCC_VERSION_PATCHLEVEL="`echo "$GCC_VERSION" | cut -d '.' -f3`"
fi
-AC_SUBST(XCBSHM_CFLAGS)
-AC_SUBST(XCBSHM_LIBS)
-AM_CONDITIONAL(HAVE_XCBSHM, test "x$have_xcbshm" = "xyes" )
-
-
-dnl ---------------------------------------------
-dnl Check for xcb-xv
-dnl ---------------------------------------------
-
-if test "x$have_xcb" = "xyes"; then
- PKG_CHECK_MODULES([XCBXV], [xcb-xv], [have_xcbxv="yes"], [have_xcbxv="no"])
-fi
-
-AC_SUBST(XCBXV_CFLAGS)
-AC_SUBST(XCBXV_LIBS)
-AM_CONDITIONAL(HAVE_XCBXV, test "x$have_xcbxv" = "xyes" )
+CC_CHECK_WERROR
+CC_PTHREAD_FLAGS([], [AC_MSG_ERROR([Pthread support is needed])])
+CC_PTHREAD_RECURSIVE_MUTEX([], [AC_MSG_ERROR([recursive mutex support is needed - please report])])
+dnl <pthread.h> is implicitly included by xine-internals.h, so the include dir is needed everywhere
+CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS"
-dnl ---------------------------------------------
-dnl Checks for Xinerama extension
-dnl ---------------------------------------------
+dnl REVISIT: AC_C_ALWAYS_INLINE removal allows ffmpeg to be more widely buildable
+AC_C_BIGENDIAN
+AC_C_CONST
+AC_C_INLINE
+AC_C_RESTRICT
-AC_ARG_ENABLE([xinerama],
- AS_HELP_STRING([--disable-xinerama], [do not build Xinerama support]))
-
-if test "x$enable_xinerama" != "xno"; then
- PKG_CHECK_MODULES([XINERAMA], [xinerama], [ac_have_xinerama=yes], [
- AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
- [XINERAMA_LIBS="-lXinerama"
- ac_have_xinerama="yes"],,
- [$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS])
- ])
- if test "x$ac_have_xinerama" = "xyes"; then
- AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama installed])
- X_LIBS="${X_LIBS} ${XINERAMA_LIBS}"
- fi
-else
- ac_have_xinerama=no
-fi
-dnl AM_CONDITIONAL(HAVE_XINERAMA, test "x$ac_have_xinerama" = "xyes")
+dnl empty_array_size - src/input/vcd
+AC_MSG_CHECKING([how to create empty arrays])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[]; } baz]])],
+ [empty_array_size=""],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[0]; } baz]])],
+ [empty_array_size="0"],
+ [AC_MSG_ERROR([compiler is unable to create empty arrays])])])
-
-dnl ---------------------------------------------
-dnl Checks for Ascii-Art library
-dnl ---------------------------------------------
+AC_DEFINE_UNQUOTED([EMPTY_ARRAY_SIZE], [$empty_array_size], [what to put between the brackets for empty arrays])
+AC_MSG_RESULT([[[$empty_array_size]]])
-AC_ARG_ENABLE([aalib],
- AS_HELP_STRING([--disable-aalib], [do not build AALIB support]),
- [with_aalib=$enableval], [with_aalib=yes])
+dnl ISOC99_PRAGMA - src/input/vcd/libvcd
+AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Pragma("pack(1)")]])],
+ [ISOC99_PRAGMA=yes
+ AC_DEFINE([HAVE_ISOC99_PRAGMA], [], [Supports ISO _Pragma() macro])],
+ [ISOC99_PRAGMA=no])
+AC_MSG_RESULT([$ISOC99_PRAGMA])
-if test "x$with_aalib" = "xyes"; then
- AM_PATH_AALIB(1.4,, AC_MSG_RESULT([*** All of AALIB dependent parts will be disabled ***]))
-else
- no_aalib=yes
-fi
-AM_CONDITIONAL(HAVE_AA, test "x$no_aalib" != "xyes")
+dnl ASM ALIGN is power of two ?
+dnl src/post/planar
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[asm(".align 3");]])],
+ [AC_DEFINE([ASMALIGN_1SLN], [1],
+ [define if '.align n' means alignment to (1 << n) - byte boundaries])])
-dnl ---------------------------------------------
-dnl Checks for Color AsCii Art library
-dnl ---------------------------------------------
+CC_ATTRIBUTE_ALIGNED
-AC_ARG_WITH([caca],
- AS_HELP_STRING([--without-caca], [Do not build CACA support]))
+CC_ATTRIBUTE_VISIBILITY([protected],
+ [visibility_export="protected"],
+ [CC_ATTRIBUTE_VISIBILITY([default], [visibility_export="default"])])
+CC_ATTRIBUTE_VISIBILITY([internal])
-if test "x$with_caca" != "xno"; then
- have_caca=yes
- PKG_CHECK_MODULES([CACA], [caca >= 0.99beta14 cucul >= 0.99beta14 ],
- [], [AC_MSG_RESULT(no); have_caca="no"])
- if test "x$with_caca" = "xyes" && test "x$have_caca" = "xno"; then
- AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found])
- fi
+if test x"$visibility_export" != x""; then
+ CC_FLAG_VISIBILITY([VISIBILITY_FLAG="-fvisibility=hidden"
+ EXPORTED='__attribute__((visibility("default")))'])
fi
+AC_DEFINE_UNQUOTED([EXPORTED], [$EXPORTED], [Mark a symbol as being exported if visibility is changed])
+AC_SUBST([VISIBILITY_FLAG])
-AM_CONDITIONAL([HAVE_CACA], [test "x$have_caca" = "xyes"])
-
-dnl ---------------------------------------------
-dnl Check solaris framebuffer device support
-dnl ---------------------------------------------
-
-AC_CHECK_HEADER(sys/fbio.h, ac_have_sunfb=yes,)
-AM_CONDITIONAL(HAVE_SUNFB, [test "x$ac_have_sunfb" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl Check for Sun DGA
-dnl ---------------------------------------------
-
-saved_LDFLAGS="$LDFLAGS"
-LDFLAGS="$LDFLAGS -L/usr/openwin/lib"
-saved_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I/usr/openwin/include"
-AC_CHECK_LIB(dga, XDgaGrabDrawable, [
- AC_CHECK_HEADER(dga/dga.h, [
- SUNDGA_CFLAGS="-I/usr/openwin/include"
- SUNDGA_LIBS="-L/usr/openwin/lib -R/usr/openwin/lib -ldga"
- ac_have_sundga=yes
- ])
-])
-LDFLAGS="$saved_LDFLAGS"
-CPPFLAGS="$saved_CPPFLAGS"
-AM_CONDITIONAL(HAVE_SUNDGA, [test "x$ac_have_sundga" = "xyes"])
-AC_SUBST(SUNDGA_CFLAGS)
-AC_SUBST(SUNDGA_LIBS)
-
-
-dnl ---------------------------------------------
-dnl Check linux framebuffer device support
-dnl ---------------------------------------------
-
-AC_CHECK_HEADER(linux/fb.h,
- [AC_DEFINE(HAVE_FB,1,[Define this if you have linux framebuffer support])
- have_fb=yes],)
-AC_ARG_ENABLE(fb, AS_HELP_STRING([--disable-fb], [do not build linux framebuffer support]),
- have_fb=$enableval)
-AM_CONDITIONAL(HAVE_FB, [test "x$have_fb" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl Check whether to build Mac OS X video output driver
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE(macosx_video, AS_HELP_STRING([--enable-macosx-video], [enable support for Mac OS X OpenGL video output]),
- have_macosx_video=$enableval)
-AM_CONDITIONAL(HAVE_MACOSX_VIDEO, [test "x$have_macosx_video" = "xyes"])
-
+CC_ATTRIBUTE_SENTINEL
+CC_ATTRIBUTE_FORMAT
+CC_ATTRIBUTE_FORMAT_ARG
+CC_ATTRIBUTE_DEPRECATED
+CC_ATTRIBUTE_UNUSED
+CC_ATTRIBUTE_MALLOC
-dnl ---------------------------------------------
-dnl Check whether to build Mac OS X audio output driver
-dnl ---------------------------------------------
+CC_ATTRIBUTE_PACKED([],
+ [AC_MSG_WARN([Your compiler doesn't support __attribute__((packed)); xine might not work as expected.])])
+CC_ATTRIBUTE_CONST
-AC_ARG_ENABLE(coreaudio, AS_HELP_STRING([--enable-coreaudio], [enable support for Mac OS X Coreaudio output]),
- have_coreaudio=$enableval)
-AM_CONDITIONAL(HAVE_COREAUDIO, [test "x$have_coreaudio" = "xyes"])
+CC_CHECK_CFLAGS([-pipe], [miscflags="$miscflags -pipe"])
+dnl Set warning flags for warnings that we do not want to skip. In all cases,
+dnl these warnings should be enabled. Set these into CFLAGS and OBJCFLAGS
+dnl later after all testing is done.
-dnl ---------------------------------------------
-dnl Check for DirectFB
-dnl ---------------------------------------------
-AC_ARG_ENABLE(directfb,
- AS_HELP_STRING([--enable-directfb], [enable use of DirectFB]),
- enable_directfb=$enableval,
- enable_directfb=no)
+CC_CHECK_CFLAGS([-Wall], [warnflags="$warnflags -Wall"])
-if test "x$enable_directfb" = "xyes"; then
- PKG_CHECK_MODULES([DIRECTFB], [directfb >= 0.9.22], [have_directfb="yes"], [have_directfb="no"])
+CC_CHECK_CFLAGS([-Wformat=2], [wformat="-Wformat=2"],
+ [CC_CHECK_CFLAGS([-Wformat], [wformat="-Wformat"])])
+if test x"$wformat" != x""; then
+ CC_CHECK_CFLAGS([-Wno-format-zero-length], [wformat="$wformat -Wno-format-zero-length"])
fi
+CC_CHECK_CFLAGS([-Wmissing-format-attribute], [wformat="$wformat -Wmissing-format-attribute"])
+warnflags="$warnflags $wformat"
-AC_SUBST(DIRECTFB_CFLAGS)
-AC_SUBST(DIRECTFB_LIBS)
-AM_CONDITIONAL(HAVE_DIRECTFB, test "x$have_directfb" = "xyes" )
-
-
-dnl ---------------------------------------------
-dnl check for SDL
-dnl ---------------------------------------------
-
-AC_ARG_WITH([sdl],
- AS_HELP_STRING([--without-sdl], [Build without SDL video output]))
-
-if test "x$with_sdl" != "xno"; then
- PKG_CHECK_MODULES([SDL], [sdl], [have_sdl=yes], [have_sdl=no])
- if test "x$with_sdl" = "xyes" && test "x$have_sdl" = "xno"; then
- AC_MSG_ERROR([SDL support requested, but SDL not found])
- elif test "x$have_sdl" = "xyes"; then
- AC_DEFINE([HAVE_SDL], [1], [Define this if you have SDL installed])
- fi
-fi
+dnl WARNING: This warning flag, if set into CFLAGS now, can break some autoconf tests.
+CC_CHECK_CFLAGS([-Werror-implicit-function-declaration], [warnflags="$warnflags -Werror-implicit-function-declaration"])
-AM_CONDITIONAL([HAVE_SDL], [test "x$have_sdl" = "xyes"])
+CC_CHECK_CFLAGS([-Wstrict-aliasing=2], [warnflags="$warnflags -Wstrict-aliasing=2"],
+ [CC_CHECK_CFLAGS([-Wstrict-aliasing], [warnflags="$warnflags -Wstrict-aliasing"])])
-AC_SUBST([SDL_CFLAGS])
-AC_SUBST([SDL_LIBS])
+CC_CHECK_CFLAGS([-Wchar-subscripts], [warnflags="$warnflags -Wchar-subscripts"])
+CC_CHECK_CFLAGS([-Wmissing-declarations], [warnflags="$warnflags -Wmissing-declarations"])
+CC_CHECK_CFLAGS([-Wmissing-prototypes], [warnflags="$warnflags -Wmissing-prototypes"])
+CC_CHECK_CFLAGS([-Wwrite-strings], [warnflags="$warnflags -Wwrite-strings"])
-dnl ---------------------------------------------
-dnl check for Libstk
-dnl ---------------------------------------------
+dnl Some combinations of gcc and glibc produce useless warnings on memset when
+dnl compiling with -Wpointer-arith, so check for this first.
+AC_MSG_CHECKING([for sane -Wpointer-arith])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[int a; memset(&a, 0, sizeof(int))]])],
+ [warnflags="$warnflags -Wpointer-arith"
+ AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
-AC_ARG_WITH([libstk],
- AS_HELP_STRING([--with-libstk], [Build with STK surface video driver]))
+CC_CHECK_LDFLAGS([-Wl,--gc-sections], [GCSECTIONS="-Wl,--gc-sections"])
+AC_SUBST([GCSECTIONS])
-if test "x$with_libstk" = "xyes"; then
- PKG_CHECK_MODULES([LIBSTK], [libstk >= 0.2.0], [have_libstk=yes], [have_libstk=no])
- if test "x$with_libstk" = "xyes" && test "x$have_libstk" = "xno"; then
- AC_MSG_ERROR([libstk support requested, but libstk not found])
- fi
-fi
+dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads
+dnl are requested, as different implementations are present; to avoid problems
+dnl use -Wl,-z,defs only for those platforms not behaving this way.
+case "$host_or_hostalias" in
+ *-freebsd*) ;;
-AM_CONDITIONAL([HAVE_STK], [test "x$have_libstk" = "xyes"])
+ dnl check if we are using the cygwin, mingw or cygwin with mno-cygwin mode
+ dnl in which case we are actually dealing with a mingw32 compiler
+ dnl This cannot be done until AC_PROG_EGREP and AC_PROG_CC are both done.
+ *-*-mingw* | *-*-cygwin*)
+ CC_CHECK_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"])
+ case "$host_or_hostalias" in
+ *-*-mingw32*)
+ WIN32_SYS=mingw32
+ ;;
+ *-*-cygwin*)
+ AC_EGREP_CPP([yes],
+ [#ifdef WIN32
+ yes
+ #endif],
+ [WIN32_SYS=mingw32], [WIN32_SYS=cygwin])
+ ;;
+ esac
+
+ if test "$WIN32_SYS" = "mingw32"; then
+ WIN32_INCLUDES='-I$(top_srcdir)/win32/include'
+ LIBS="-lwinmm -lwsock32 $LIBS"
+ LDFLAGS="-Wl,--enable-stdcall-fixup $LDFLAGS"
+ dnl iberty has been needed only in older versions
+ AC_CHECK_LIB(iberty, strncomp, [GOOM_LIBS="-liberty"])
+ AC_SUBST(GOOM_LIBS)
+ fi
+ LDFLAGS="-no-undefined $LDFLAGS"
+ ;;
-dnl ---------------------------------------------
-dnl check for pulseaudio
-dnl ---------------------------------------------
+ *)
+ CC_CHECK_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"])
+ ;;
+esac
-AC_ARG_WITH([pulseaudio],
- AS_HELP_STRING([--without-pulseaudio], [Do not build Pulseaudio support]))
+AC_SUBST(NOUNDEF)
+AM_CONDITIONAL([WIN32], [test x"$WIN32_SYS" = x"mingw32"])
-if test "x$with_pulseaudio" != "xno"; then
- PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"])
+AC_ARG_ENABLE([altivec],
+ [AS_HELP_STRING([--disable-altivec], [do not use assembly codes for Motorola 74xx CPUs])],
+ [], [enable_altivec="yes"])
+
+dnl No optimization at all. For gcc, this is the optimization level.
+O0_CFLAGS="-O0"
+
+dnl Lowest level of optimization. For gcc, this enables:
+dnl -fdefer-pop -fdelayed-branch -fguess-branch-probability -fcprop-registers
+dnl -floop-optimize -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce
+dnl -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs
+dnl -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -fmerge-constants
+dnl On platforms where -fomit-frame-pointer does not interfere with debugging,
+dnl it is also enabled by -O1.
+O1_CFLAGS="-O1"
+
+dnl Middle level of optimization. For gcc, this enables -O1 and:
+dnl -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps
+dnl -fcse-skip-blocks -fgcse -fgcse-lm -fexpensive-optimizations
+dnl -fstrength-reduce -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves
+dnl -fforce-mem -fpeephole2 -fschedule-insns -fschedule-insns2
+dnl -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing
+dnl -fdelete-null-pointer-checks -freorder-blocks -freorder-functions
+dnl -funit-at-a-time -falign-functions -falign-jumps -falign-loops
+dnl -falign-labels -ftree-pre
+dnl Note that Apple's version of gcc differs slightly, because it does not enable
+dnl -fstrict-aliasing -freorder-blocks -fsched-interblock
+O2_CFLAGS="-O2"
+
+dnl Highest level of optimization. For gcc, this enables -O2 and:
+dnl -finline-functions -funswitch-loops -fgcse-after-reload
+O3_CFLAGS="-O3"
+
+dnl gcc 3.3.5 (at least) is known to be buggy wrt optimization with
+dnl -finline-functions, so use -fno-inline-functions for gcc < 3.4.0
+if test x"$GCC" = x"yes"; then
+ if test "$GCC_VERSION_MAJOR" -lt 3; then
+ O3_CFLAGS="$O3_CFLAGS -fno-inline-functions"
+ else
+ if test "$GCC_VERSION_MAJOR" -eq 3 -a "$GCC_VERSION_MINOR" -lt 4; then
+ O3_CFLAGS="$O3_CFLAGS -fno-inline-functions"
+ fi
+ fi
fi
-AM_CONDITIONAL(HAVE_PULSEAUDIO, [test "x$have_pulseaudio" = x"yes"])
-AC_SUBST([PULSEAUDIO_CFLAGS])
-AC_SUBST([PULSEAUDIO_LIBS])
-
-dnl ---------------------------------------------
-dnl check for DirectX
-dnl ---------------------------------------------
-
-AM_PATH_DIRECTX()
+CC_CHECK_CFLAGS([-ffast-math], [optflags="$optflags -ffast-math"])
+CC_CHECK_CFLAGS([-fexpensive-optimizations], [optflags="$optflags -fexpensive-optimizations"])
-
-dnl ---------------------------------------------
-dnl dxr3 / hollywood plus card
-dnl ---------------------------------------------
+dnl initialize arch_86 as it is later tested for != "no"
+arch_x86=no
case "$host_or_hostalias" in
- *-linux*)
- AC_CHECK_DXR3()
- if test "x$have_libfame" = "xyes" ; then
- AC_DEFINE_UNQUOTED(HAVE_LIBFAME,1,[Define this if you have libfame mpeg encoder installed (fame.sf.net)])
- AM_PATH_LIBFAME(0.8.10,
- AC_DEFINE(HAVE_NEW_LIBFAME,1,[Define this if you have libfame 0.8.10 or above]))
- fi
- if test "x$have_librte" = "xyes" ; then
- AC_DEFINE_UNQUOTED(HAVE_LIBRTE,1,[Define this if you have librte mpeg encoder installed (zapping.sf.net)])
- fi
- ;;
- *)
- have_dxr3="no"
- have_libfame="no"
- have_librte="no"
- have_encoder="no"
- ;;
-esac
-AM_CONDITIONAL(HAVE_DXR3, test "x$have_dxr3" = "xyes")
-AM_CONDITIONAL(HAVE_LIBFAME, test "x$have_libfame" = "xyes")
-AM_CONDITIONAL(HAVE_LIBRTE, test "x$have_librte" = "xyes")
-
-
-dnl ---------------------------------------------
-dnl Vidix/libdha
-dnl ---------------------------------------------
-
-AC_LINUX_PATH(/usr/src/linux)
-AC_SUBST([LINUX_INCLUDE])
-
-AC_ARG_ENABLE(vidix, AS_HELP_STRING([--disable-vidix], [do not build vidix support]),
- check_vidix=$enableval, check_vidix=yes)
-AC_ARG_ENABLE(dha-kmod, AS_HELP_STRING([--enable-dha-kmod], [build DHA kernel module]),
- enable_dha_kmod=$enableval,enable_dha_kmod=no)
-
-enable_vidix="no"
-
-AC_MSG_CHECKING(for vidix support)
-if test "x$check_vidix" = "xyes" -a "x$ac_cv_prog_AWK" != "xno"; then
- if test "x$no_x" != "xyes" -o "x$have_fb" = "xyes"; then
- case "$host_or_hostalias" in
- i?86-*-linux* | k?-*-linux* | athlon-*-linux*)
- enable_vidix="yes"
- enable_linux="yes"
- ;;
- i?86-*-freebsd* | k?-*-freebsd* | athlon-*-freebsd* | i?86-*-kfreebsd*)
- enable_vidix="yes"
- enable_dha_kmod="no"
+ alphaev56-*)
+ cpuflags="-mcpu=ev56 -mieee $cpuflags"
+ AC_DEFINE([ARCH_ALPHA], [], [Define this if you're running Alpha architecture])
;;
- *)
- enable_dha_kmod="no"
- enable_vidix="no"
+ alpha*)
+ cpuflags="-mieee $cpuflags"
+ AC_DEFINE([ARCH_ALPHA], [], [Define this if you're running Alpha architecture])
;;
- esac
- fi
-fi
-AC_MSG_RESULT($enable_vidix)
-
-AC_MSG_CHECKING(for DHA linux kernel module build)
-if test "x$enable_dha_kmod" = "xyes"; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-
-AM_CONDITIONAL(HAVE_VIDIX, test "x$enable_vidix" = "xyes")
-AM_CONDITIONAL(HAVE_LINUX, test "x$enable_linux" = "xyes")
-AM_CONDITIONAL(BUILD_DHA_KMOD, test "x$enable_dha_kmod" = "xyes")
-AC_CHECK_PROG(MKNOD, mknod, mknod, no)
-AC_CHECK_PROG(DEPMOD, depmod, depmod, no, "$PATH:/sbin")
-
-
-dnl ---------------------------------------------
-dnl Ogg/Vorbis libs.
-dnl ---------------------------------------------
-
-AC_ARG_WITH([vorbis],
- AS_HELP_STRING([--without-vorbis], [Build without Vorbis audio decoder]))
-
-if test "x$with_vorbis" != "xno"; then
- PKG_CHECK_MODULES([VORBIS], [ogg vorbis], [have_vorbis=yes], [have_vorbis=no])
- if test "x$with_vorbis" = "xyes" && test "x$have_vorbis" = "xno"; then
- AC_MSG_ERROR([Vorbis support requested, but libvorbis not found])
- fi
-fi
-AM_CONDITIONAL([HAVE_VORBIS], [test "x$have_vorbis" = "xyes"])
-
-AC_SUBST([VORBIS_CFLAGS])
-AC_SUBST([VORBIS_LIBS])
-
-dnl ---------------------------------------------
-dnl Ogg/Theora libs.
-dnl ---------------------------------------------
-
-AC_ARG_WITH([theora],
- AS_HELP_STRING([--without-theora], [Build without Theora video decoder]))
-
-if test "x$with_theora" != "xno"; then
- PKG_CHECK_MODULES([THEORA], [ogg theora], [have_theora=yes], [have_theora=no])
- if test "x$with_theora" = "xyes" && test "x$have_theora" = "xno"; then
- AC_MSG_ERROR([Theora support requested, but libtheora not found])
- elif test "x$have_theora" = "xyes"; then
- AC_DEFINE([HAVE_THEORA], [1], [Define this if you have theora])
- fi
-fi
-AM_CONDITIONAL([HAVE_THEORA], [test "x$have_theora" = "xyes"])
-
-AC_SUBST([THEORA_CFLAGS])
-AC_SUBST([THEORA_LIBS])
-
-dnl ---------------------------------------------
-dnl Ogg/Speex libs.
-dnl ---------------------------------------------
-AC_ARG_WITH([speex],
- AS_HELP_STRING([--without-speex], [Build without Speex audio decoder]))
-
-if test "x$with_speex" != "xno"; then
- PKG_CHECK_MODULES([SPEEX], [ogg speex], [have_speex=yes], [have_speex=no])
- if test "x$with_speex" = "xyes" && test "x$have_speex" = "xno"; then
- AC_MSG_ERROR([Speex support requested, but libspeex not found])
- elif test "x$have_speex" = "xyes"; then
- AC_DEFINE([HAVE_SPEEX], [1], [Define this if you have speex])
- fi
-fi
-AM_CONDITIONAL([HAVE_SPEEX], [test "x$have_speex" = "xyes"])
-
-AC_SUBST([SPEEX_CFLAGS])
-AC_SUBST([SPEEX_LIBS])
-
-dnl ---------------------------------------------
-dnl check for libFLAC
-dnl ---------------------------------------------
-
-AC_ARG_WITH([libflac],
- AS_HELP_STRING([--without-libflac], [don't build libFLAC-based decoder and demuxer]))
-
-have_libflac="no"
-if test "x$with_libflac" != "xno"; then
- AM_PATH_LIBFLAC([have_libflac="yes"])
-fi
-
-AM_CONDITIONAL([HAVE_LIBFLAC], [test "x$have_libflac" = "xyes"])
-
-dnl ---------------------------------------------
-dnl External version of a52dec
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE(a52dec, AS_HELP_STRING([--disable-a52dec], [Disable support for a52dec decoding library (default: enabled)]),
- [enable_a52dec="$enableval"], [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"])
-
-have_a52="no"
-
-if test "x$enable_a52dec" = "xno"; then
- AC_MSG_RESULT([a52dec support disabled])
-elif test "x$external_a52dec" = "xyes"; then
- have_a52="yes"
- AC_CHECK_HEADERS([a52dec/a52.h],, have_a52="no",
-[
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_INTTYPES_H
- # include <inttypes.h>
- #endif
- #ifdef HAVE_STDINT_H
- # include <stdint.h>
- #endif
-
- #include <a52dec/a52.h>
-])
- SAVE_LIBS="$LIBS"
- AC_CHECK_LIB([a52], [a52_init],, have_a52="no", [-lm])
- LIBS="$SAVE_LIBS"
-
- if test "x$have_a52" = "xno"; then
- AC_MSG_RESULT([*** no usable version of a52dec found, using internal copy ***])
- fi
-else
- AC_MSG_RESULT([Use included a52dec support])
-fi
-
-AM_CONDITIONAL(A52, test "x$enable_a52dec" = "xyes")
-AM_CONDITIONAL(EXTERNAL_A52DEC, test "x$have_a52" = "xyes")
-
-dnl ---------------------------------------------
-dnl External version of libmad
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE(mad, AS_HELP_STRING([--disable-mad], [Disable support for MAD decoding library (default: enabled)]),
- [enable_libmad="$enableval"], [enable_libmad="yes"])
-AC_ARG_WITH(external-libmad, AS_HELP_STRING([--with-external-libmad], [use external libmad library (not recommended)]),
- [external_libmad="$withval"], [external_libmad="no"])
-
-have_mad="no"
-
-if test "x$enable_libmad" = "xno"; then
- AC_MSG_RESULT([libmad support disabled])
-elif test "x$external_libmad" = "xyes"; then
- PKG_CHECK_MODULES(LIBMAD, [mad], have_mad=yes, have_mad=no)
- AC_CHECK_HEADERS([mad.h])
- AC_SUBST(LIBMAD_LIBS)
- AC_SUBST(LIBMAD_CFLAGS)
- if test "x$have_mad" = "xno"; then
- AC_MSG_RESULT([*** no usable version of libmad found, using internal copy ***])
- fi
-else
- AC_MSG_RESULT([Use included libmad support])
-fi
-
-AM_CONDITIONAL(MAD, test "x$enable_libmad" = "xyes")
-AM_CONDITIONAL(EXTERNAL_LIBMAD, test "x$have_mad" = "xyes")
-
-dnl ---------------------------------------------
-dnl External libmpcdec support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([musepack], AS_HELP_STRING([--disable-musepack], [Disable support for MusePack decoding (default: enabled)]))
-AC_ARG_WITH([external-libmpcdec], AS_HELP_STRING([--with-external-libmpcdec], [Use external libmpc library]))
-
-if test "x$enable_musepack" = "xno"; then
- AC_MSG_RESULT([musepack support disabled])
-elif test "x$with_external_libmpcdec" = "xyes"; then
- AC_CHECK_LIB([mpcdec], [mpc_demux_decode], [have_mpcdec=yes],
- [AC_CHECK_LIB([mpcdec], [mpc_decoder_decode], [have_mpcdec=yes])])
- AC_CHECK_HEADERS([mpc/mpcdec.h], [],
- [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [], [have_mpcdec=no])])
- if test "x$have_mpcdec" != "xyes"; then
- AC_MSG_ERROR([Unable to find mpcdec])
- fi
- AC_DEFINE([HAVE_LIBMPC], [1], [Define if external libmpc is used])
-else
- AC_MSG_RESULT([Use included libmusepack])
-fi
-
-AM_CONDITIONAL([MUSEPACK], [test "x$enable_musepack" != "xno"])
-AM_CONDITIONAL([EXTERNAL_MPCDEC], [test "x$have_mpcdec" = "xyes"])
-
-dnl ---------------------------------------------
-dnl MNG libs.
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([mng],
- AS_HELP_STRING([--disable-mng], [do not build mng support]),
- [with_mng=$enableval], [with_mng=yes])
-
-if test "x$with_mng" = "xyes"; then
- AC_CHECK_LIB(mng, mng_initialize,
- [ AC_CHECK_HEADER(libmng.h,
- [ have_libmng=yes
- MNG_LIBS="-lmng" ],
- AC_MSG_RESULT([*** All libmng dependent parts will be disabled ***]))],
- AC_MSG_RESULT([*** All libmng dependent parts will be disabled ***]))
- AC_SUBST(MNG_LIBS)
-else
- have_libmng=no
-fi
-AM_CONDITIONAL(HAVE_LIBMNG, test "x$have_libmng" = "xyes")
-
-dnl ---------------------------------------------
-dnl MagickWand API of Imagemagick.
-dnl ---------------------------------------------
-
-AC_ARG_WITH([imagemagick],
- AS_HELP_STRING([--without-imagemagick], [Build without ImageMagick image decoder (or GraphicsMagick's compat layer)]))
-
-if test "x$with_imagemagick" != "xno"; then
- PKG_CHECK_MODULES([WAND], [Wand], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
- if test "x$have_imagemagick" = 'xno'; then
- PKG_CHECK_MODULES([MAGICKWAND], [MagickWand], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
- dnl Avoid $(WAND_FLAGS) $(MAGICKWAND_FLAGS) ...
- WAND_CFLAGS="$MAGICKWAND_CFLAGS"
- WAND_LIBS="$MAGICKWAND_LIBS"
- fi
- if test "x$have_imagemagick" = 'xno'; then
- PKG_CHECK_MODULES([GRAPHICSMAGICK], [ImageMagick], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
- PKG_CHECK_MODULES([GRAPHICSMAGICKWAND], [GraphicsMagickWand], [have_imagemagick=yes], [AC_MSG_RESULT([no]); have_imagemagick=no])
- dnl The following assignments are safe, since they include
- dnl the flags for plain GraphicsMagick
- WAND_CFLAGS="$GRAPHICSMAGICKWAND_CFLAGS"
- WAND_LIBS="$GRAPHICSMAGICKWAND_LIBS"
- AC_DEFINE([HAVE_GRAPHICSMAGICK], [1], [Define this if you have GraphicsMagick installed])
- fi
- if test "x$with_imagemagick" = "xyes" && test "x$have_imagemagick" = "xno"; then
- AC_MSG_ERROR([ImageMagick support requested, but neither Wand, MagickWand, nor GraphicsMagick were found])
- elif test "x$have_imagemagick" = "xyes"; then
- AC_DEFINE([HAVE_WAND], [1], [Define this if you have ImageMagick or GraphicsMagick's compat layer installed])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_WAND], [test "x$have_imagemagick" = "xyes"])
-AC_SUBST(WAND_CFLAGS)
-AC_SUBST(WAND_LIBS)
-
-dnl ---------------------------------------------
-dnl freetype2 lib.
-dnl ---------------------------------------------
-AC_ARG_WITH([freetype],
- AS_HELP_STRING([--with-freetype], [Build with FreeType2 library]))
-
-if test "x$with_freetype" = "xyes"; then
- PKG_CHECK_MODULES([FT2], [freetype2], [have_freetype=yes], [have_freetype=no])
- if test "x$have_freetype" = "xno"; then
- AC_MSG_ERROR([FreeType2 support requested but FreeType2 library not found])
- elif test "x$have_freetype" = "xyes"; then
- AC_DEFINE([HAVE_FT2], [1], [Define this if you have freetype2 library])
- fi
-fi
-AC_SUBST([FT2_CFLAGS])
-AC_SUBST([FT2_LIBS])
-dnl ---------------------------------------------
-dnl fontconfig
-dnl ---------------------------------------------
-AC_ARG_WITH([fontconfig],
- AS_HELP_STRING([--with-fontconfig], [Build with fontconfig library]))
-
-if test "x$with_fontconfig" = "xyes"; then
- if test "x$have_freetype" != "xyes"; then
- AC_MSG_ERROR([fontconfig support requested, but FreeType2 not enabled.])
- fi
-
- PKG_CHECK_MODULES([FONTCONFIG], [fontconfig], [have_fontconfig=yes], [have_fontconfig=no])
- if test "x$have_fontconfig" = "xno"; then
- AC_MSG_ERROR([fontconfig support requested but fontconfig library not found])
- elif test "x$have_fontconfig" = "xyes"; then
- AC_DEFINE([HAVE_FONTCONFIG], [1], [Define this if you have fontconfig library])
- fi
-fi
-AC_SUBST([FONTCONFIG_CFLAGS])
-AC_SUBST([FONTCONFIG_LIBS])
-
-
-dnl ---------------------------------------------
-dnl OSS style audio interface
-dnl ---------------------------------------------
-AC_ARG_ENABLE([oss],
- AS_HELP_STRING([--disable-oss], [Do not build OSS audio output support]))
-
-if test "x$enable_oss" != "xno"; then
- AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h soundcard.h], [break])
- AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_ossaudio=yes], [], [
- #ifdef HAVE_SYS_SOUNDCARD_H
- # include <sys/soundcard.h>
- #endif
- #ifdef HAVE_MACHINE_SOUNDCARD_H
- # include <sys/soundcard.h>
- #endif
- #ifdef HAVE_SOUNDCARD_H
- # include <soundcard.h>
- #endif
- ])
-
- if test "x$have_ossaudio" = "xyes"; then
- AC_IOCTL_REQUEST
- fi
-fi
-
-AM_CONDITIONAL(HAVE_OSS, test "x$have_ossaudio" = "xyes")
-
-
-dnl ---------------------------------------------
-dnl Alsa support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([alsa],
- AS_HELP_STRING([--without-alsa], [Build without ALSA audio output]))
-
-if test "x$with_alsa" != "xno"; then
- PKG_CHECK_MODULES([ALSA], [alsa >= 0.9.0], [have_alsa=yes], [have_alsa=no])
- AC_SUBST([ALSA_LIBS])
- AC_SUBST([ALSA_CFLAGS])
- if test "x$have_alsa" = "xyes"; then
- AC_DEFINE([HAVE_ALSA], [1], [Define this if you have ALSA installed])
- elif test "x$with_alsa" = "xyes"; then
- AC_MSG_ERROR([ALSA support requested but not found.])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_ALSA], [test "x$have_alsa" = "xyes"])
-
-dnl ---------------------------------------------
-dnl ESD support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([esound],
- AS_HELP_STRING([--without-esound], [Build without ESounD audio output]))
-
-if test "x$with_esound" != "xno"; then
- PKG_CHECK_MODULES([ESD], [esound], [have_esound=yes], [have_esound=no])
- if test "x$with_esound" = "xyes" && test "x$have_esound" = "xno"; then
- AC_MSG_ERROR([ESounD support requested, but libesd not found])
- elif test "x$have_esound" = "xyes"; then
- AC_DEFINE([HAVE_ESD], [1], [Define this if you have ESounD installed])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_ESD], [test "x$have_esound" = "xyes"])
-
-AC_SUBST([ESD_CFLAGS])
-AC_SUBST([ESD_LIBS])
-
-
-dnl ---------------------------------------------
-dnl ARTS support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([arts],
- AS_HELP_STRING([--with-arts], [Build with ARTS audio output]),
- [with_arts=$withval], [with_arts=no])
-
-if test "x$with_arts" = "xyes"; then
- AM_PATH_ARTS(0.9.5,
- AC_DEFINE(HAVE_ARTS,1,[Define this if you have ARTS (libartsc) installed]),
- AC_MSG_RESULT(*** All of ARTS dependent parts will be disabled ***))
-else
- no_arts=yes
-fi
-AM_CONDITIONAL(HAVE_ARTS, test "x$no_arts" != "xyes")
-
-
-dnl ---------------------------------------------
-dnl FusionSound support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([fusionsound],
- AS_HELP_STRING([--with-fusionsound], [Build with FunsionSound audio output]),
- [with_fusionsound=$withval], [with_fusionsound=no])
-
-if test "x$with_fusionsound" = "xyes"; then
- PKG_CHECK_MODULES(FUSIONSOUND, fusionsound >= 0.9.23,
- AC_DEFINE(HAVE_FUSIONSOUND,1,[Define to 1 if you have FusionSound.]),
- AC_MSG_RESULT(*** All of FusionSound dependent parts will be disabled ***))
- AC_SUBST(FUSIONSOUND_CFLAGS)
- AC_SUBST(FUSIONSOUND_LIBS)
-else
- no_fusionsound=yes
-fi
-AM_CONDITIONAL(HAVE_FUSIONSOUND, test "x$no_fusionsound" != "xyes")
-
-
-dnl ---------------------------------------------
-dnl JACK support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([jack],
- AS_HELP_STRING([--without-jack], [Build without Jack support]))
-
-if test "x$with_jack" != "xno"; then
- PKG_CHECK_MODULES([JACK], [jack >= 0.100], [have_jack=yes], [have_jack=no])
-
- if test "x$with_jack" = "xyes" && test "x$have_jack" = "xno"; then
- AC_MSG_ERROR([Jack support requested, but Jack not found])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_JACK], [test "x$have_jack" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl sndio support
-dnl ---------------------------------------------
-
-AC_ARG_WITH([sndio],
- AS_HELP_STRING([--without-sndio], [Build without sndio support]))
-
-if test "x$with_sndio" != "xno"; then
- AC_CHECK_LIB(sndio, sio_open, [SNDIO_LIBS=-lsndio; have_sndio=yes],
- [have_sndio=no])
-
- if test "x$with_sndio" = "xyes" && test "x$have_sndio" = "xno"; then
- AC_MSG_ERROR([sndio support requested, but sndio not found])
- fi
-fi
-
-AM_CONDITIONAL([HAVE_SNDIO], [test "x$have_sndio" = "xyes"])
-
-AC_SUBST([SNDIO_CFLAGS])
-AC_SUBST([SNDIO_LIBS])
-
-
-dnl ---------------------------------------------
-dnl gnome-vfs support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([gnomevfs],
- AS_HELP_STRING([--disable-gnomevfs], [do not build gnome-vfs support]),
- [with_gnome_vfs=$enableval], [with_gnome_vfs=yes])
-
-if test "x$with_gnome_vfs" = "xyes"; then
- PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0,
- no_gnome_vfs=no,
- no_gnome_vfs=yes)
- AC_SUBST(GNOME_VFS_CFLAGS)
- AC_SUBST(GNOME_VFS_LIBS)
- if test "x$no_gnome_vfs" != "xyes"; then
- AC_DEFINE(HAVE_GNOME_VFS,1,[Define this if you have gnome-vfs installed])
- else
- AC_MSG_RESULT(*** All of the gnome-vfs dependent parts will be disabled ***)
- fi
-else
- no_gnome_vfs=yes
-fi
-AM_CONDITIONAL(HAVE_GNOME_VFS, test "x$no_gnome_vfs" != "xyes")
-
-dnl ---------------------------------------------
-dnl gdk-pixbuf support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([gdkpixbuf],
- AS_HELP_STRING([--disable-gdkpixbuf], [do not build gdk-pixbuf support]))
-
-if test "x$enable_gdkpixbuf" != "xno"; then
- PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0,
- no_gdkpixbuf=no,
- no_gdkpixbuf=yes)
- AC_SUBST(GDK_PIXBUF_CFLAGS)
- AC_SUBST(GDK_PIXBUF_LIBS)
- if test "x$no_gdkpixbuf" != "xyes"; then
- AC_DEFINE(HAVE_GDK_PIXBUF,1,[Define this if you have gdk-pixbuf installed])
- else
- AC_MSG_RESULT(*** All of the gdk-pixbuf dependent parts will be disabled ***)
- fi
-else
- no_gdkpixbuf=yes
-fi
-AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "x$no_gdkpixbuf" != "xyes")
-
-dnl ---------------------------------------------
-dnl libbluray support
-dnl ---------------------------------------------
-AC_ARG_ENABLE([bluray],
- AS_HELP_STRING([--disable-bluray], [Do not build BluRay support]),
- [with_bluray=$enableval], [with_bluray=yes])
-
-if test "x$with_bluray" != "xno"; then
- PKG_CHECK_MODULES([LIBBLURAY], [libbluray >= 0.2.1],
- [have_libbluray=yes],
- AC_MSG_RESULT(*** All of the libbluray dependent parts will be disabled ***))
- AC_SUBST(LIBBLURAY_CFLAGS)
- AC_SUBST(LIBBLURAY_LIBS)
-fi
-AM_CONDITIONAL(HAVE_LIBBLURAY, test "x$have_libbluray" = "xyes")
-
-dnl ---------------------------------------------
-dnl libsmbclient support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([samba],
- AS_HELP_STRING([--disable-samba], [do not build Samba support]),
- [with_samba=$enableval], [with_samba=yes])
-
-if test "x$with_samba" = "xyes"; then
- AC_CHECK_LIB(smbclient, smbc_init,
- [ AC_CHECK_HEADER(libsmbclient.h,
- [ have_libsmbclient=yes
- LIBSMBCLIENT_LIBS="-lsmbclient" ],
- AC_MSG_RESULT([*** All libsmbclient dependent parts will be disabled ***]))],
- AC_MSG_RESULT([*** All libsmbclient dependent parts will be disabled ***]))
- AC_SUBST(LIBSMBCLIENT_LIBS)
-fi
-AM_CONDITIONAL(HAVE_LIBSMBCLIENT, test "x$have_libsmbclient" = "xyes")
-
-
-dnl ---------------------------------------------
-dnl SUN style audio interface
-dnl ---------------------------------------------
-AC_ARG_ENABLE([sunaudio],
- AS_HELP_STRING([--disable-sunaudio], [Do not build Sun audio output support]))
-
-if test "x$enable_sunaudio" != "xno"; then
- AC_MSG_CHECKING(for Sun audio support)
- have_sunaudio=no
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <sys/types.h>
- #include <sys/audioio.h>
- ]], [[
- audio_info_t audio_info;
- AUDIO_INITINFO(&audio_info);
- ]])],[
- have_sunaudio=yes
- ],[])
- AC_MSG_RESULT($have_sunaudio)
- AM_CONDITIONAL(HAVE_SUNAUDIO, test "x$have_sunaudio" = "xyes")
-
- if test "x$have_sunaudio" = "xyes"; then
- dnl NetBSD and OpenBSD don't have this, but check for it
- dnl rather than assuming that it doesn't happen elsewhere.
- AC_CHECK_MEMBERS([audio_info_t.output_muted])
- fi
-fi
-
-AM_CONDITIONAL(HAVE_SUNAUDIO, test "x$have_sunaudio" = "xyes")
-
-
-dnl ---------------------------------------------
-dnl IRIX style audio interface
-dnl ---------------------------------------------
-
-AM_CHECK_IRIXAL([AC_DEFINE(HAVE_IRIXAL,1,
- [Define this if you have a usable IRIX al interface available])],
- [AC_MSG_RESULT([*** All of IRIX AL dependent parts will be disabled ***])])
-AM_CONDITIONAL(HAVE_IRIXAL, [test "x$am_cv_have_irixal" = xyes])
-
-
-dnl ---------------------------------------------
-dnl Solaris kstat kernel statistics
-dnl ---------------------------------------------
-
-AC_CHECK_LIB(kstat, kstat_open,
- [KSTAT_LIBS=-lkstat
- AC_DEFINE(HAVE_KSTAT,1,[Define this if you have kernel statistics available via kstat interface])])
-AC_SUBST(KSTAT_LIBS)
-
-
-dnl ---------------------------------------------
-dnl cdrom ioctls
-dnl ---------------------------------------------
-
-AC_CHECK_HEADERS([linux/cdrom.h sys/dvdio.h], [break])
-AC_CHECK_HEADERS([sys/cdio.h sys/scsiio.h])
-AM_CHECK_CDROM_IOCTLS(
- [AC_DEFINE(HAVE_CDROM_IOCTLS,1,[Define this if you have CDROM ioctls])],
- [AC_MSG_RESULT([*** (S)VCD support will be disabled ***])])
-AM_CONDITIONAL(HAVE_CDROM_IOCTLS, [test "x$have_cdrom_ioctls" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl check for a usable version of libdvdnav
-dnl ---------------------------------------------
-
-AC_ARG_WITH(external-dvdnav, AS_HELP_STRING([--with-external-dvdnav], [use external dvdnav library (not recommended)]),
- [external_dvdnav="$withval"], [no_dvdnav="yes"; external_dvdnav="no"])
-
-if test "x$external_dvdnav" = "xyes"; then
- AM_PATH_DVDNAV(0.1.9,
- AC_DEFINE(HAVE_DVDNAV,1,[Define this if you have a suitable version of libdvdnav]),
- [AC_MSG_RESULT([*** no usable version of libdvdnav found, using internal copy ***])])
- AC_CHECK_LIB(dvdread, navRead_DSI, DVDNAV_LIBS="$DVDNAV_LIBS -ldvdread",)
-else
- AC_MSG_RESULT([Use included DVDNAV support])
-fi
+ armv4l-*-linux*)
+ cpuflags="-mcpu=strongarm1100 -ffast-math -fsigned-char $cpuflags"
+ DEFAULT_OCFLAGS='$(O2_CFLAGS)'
+ AC_DEFINE([ARCH_ARM], [], [Define this if you're running ARM architecture])
+ ;;
-AM_CONDITIONAL(HAVE_DVDNAV, [test "x$no_dvdnav" != "xyes"])
+ sparc*-*-linux*)
+ case "`uname -m`" in
+ sparc) cpuflags="-mcpu=supersparc -mtune=supersparc" ;;
+ sparc64) cpuflags="-mcpu=ultrasparc -mtune=ultrasparc" ;;
+ esac
+ test x"$enable_vis" != x"no" && has_vis=yes
+ AC_DEFINE([ARCH_SPARC], [], [Define this if you're running SPARC architecture])
+ ;;
+ sparc-*-solaris*)
+ if test x"$GCC" = x"yes"; then
+ case "`uname -m`" in
+ sun4c) cpuflags="-mcpu=v7 -mtune=supersparc" ;;
+ sun4m) cpuflags="-mcpu=v8 -mtune=supersparc" ;;
+ sun4u)
+ if test x"$GCC_VERSION_MAJOR" -lt 3; then
+ # -mcpu=ultrasparc triggers a GCC 2.95.x compiler bug
+ # when compiling video_out.c:
+ # gcc: Internal compiler error: program cc1 got fatal signal 11
+ # avoid -mcpu=ultrasparc with gcc 2.*
+ cpuflags="-mcpu=v8 -mtune=ultrasparc"
+ else
+ cpuflags="-mcpu=ultrasparc -mtune=ultrasparc"
+ fi
+ ;;
+ esac
+ if test "$GCC_VERSION_MAJOR" -ge 3; then
+ test x"$enable_vis" != x"no" && has_vis=yes
+ fi
+ else
+ case "`uname -m`" in
+ sun4c) cpuflags="-xarch=v7" ;;
+ sun4m) cpuflags="-xarch=v8" ;;
+ sun4u) cpuflags="-xarch=v8plusa" ;;
+ esac
+ O1_CFLAGS="-fast -xCC"
+ O2_CFLAGS="$O1_CFLAGS"
+ O3_CFLAGS="$O1_CFLAGS"
+ fi
+ AC_DEFINE([ARCH_SPARC], [], [Define this if you're running SPARC architecture])
+ ;;
-dnl ---------------------------------------------
-dnl Video CD
-dnl ---------------------------------------------
+ x86_64-*)
+ arch_x86=64
+ AC_DEFINE([ARCH_X86_64], [], [Define this if you're running x86 architecture 64 bits])
+ ;;
-AC_ARG_ENABLE(vcd, AS_HELP_STRING([--disable-vcd], [do not compile VCD plugin]),
- enable_vcd=$enableval, enable_vcd=yes)
+ *-*-darwin*)
+ case "$host_or_hostalias" in
+ universal-*)
+ arch_ppc=yes
+ arch_x86=32
+ ;;
+ i386-* | x86_64-*)
+ arch_x86=32
+ AC_DEFINE([ARCH_X86_32], [], [Define this if you're running x86 architecture 32 bits])
+ ;;
+ ppc* | powerpc*)
+ arch_ppc=yes
+ dnl avoid ppc compilation crash
+ AS="$CC"
+ AC_DEFINE([ARCH_PPC], [], [Define this if you're running PowerPC architecture])
+
+ AC_CHECK_HEADER([altivec.h], [], [enable_altivec=no])
+ if test x"$enable_altivec" != x"no"; then
+ AC_DEFINE([ENABLE_ALTIVEC], [], [Define this if you want to use altivec on PowerPC CPUs])
+ cpuflags="$cpuflags -faltivec -maltivec"
+ LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -force_cpusubtype_ALL"
+ fi
+ ;;
+ esac
+
+ enable_impure_text=yes
+ HOST_OS_DARWIN=1
+ dnl HOST_OS_DARWIN is used by a bunch of difference stuff, including
+ dnl libdvdnav, libmpeg2, and xine itself (xine-engine, xine-utils)
+ AC_DEFINE([HOST_OS_DARWIN], 1, [Define this if built on Mac OS X/Darwin])
+ dnl CONFIG_DARWIN is used by ffmpeg, so anything that pulls ffmpeg
+ dnl headers needs to have this set.
+ AC_DEFINE([CONFIG_DARWIN], 1, [Define this if built on Mac OS X/Darwin])
+ CPPFLAGS="-D_INTL_REDIRECT_MACROS $CPPFLAGS"
+ ;;
-dnl Force build of both vcd plugins, for now.
-dnl AC_ARG_ENABLE(vcdo, AS_HELP_STRING([--disable-vcdo], [do not compile old VCD plugin]),
-dnl enable_vcdo=$enableval, enable_vcdo=yes)
-dnl
-enable_vcdo="yes"
-
-AC_ARG_WITH(internal-vcdlibs, AS_HELP_STRING([--with-internal-vcdlibs], [force using internal libcdio/libvcd/libvcdinfo]),
- [internal_vcdnav="$withval"], [internal_vcdnav="no"])
-
-if test "x$enable_vcd" = "xyes"; then
- dnl empty_array_size
- AC_MSG_CHECKING([how to create empty arrays])
-
- empty_array_size="xxx"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[]; } doo;]])],[empty_array_size=""],[])
-
- if test "x$empty_array_size" = "xxxx";then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[0]; } doo;]])],[empty_array_size="0"],[])
- fi
-
- if test "x$empty_array_size" = "xxxx"
- then
- AC_MSG_ERROR([compiler is unable to creaty empty arrays])
- else
- AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE, $empty_array_size,
- [what to put between the brackets for empty arrays])
- changequote(`,')
- msg="[${empty_array_size}]"
- changequote([,])
- AC_MSG_RESULT($msg)
- fi
- dnl empty_array_size
-
- if test "x$internal_vcdnav" = "xno" ; then
- PKG_CHECK_MODULES([LIBCDIO], [libcdio >= 0.71], [], [internal_vcdnav=yes])
- PKG_CHECK_MODULES([LIBVCDINFO], [libvcdinfo >= 0.7.23], [], [internal_vcdnav=yes])
- if test "x$internal_vcdnav" = "xyes"; then
- AC_MSG_RESULT([Use included libcdio/libvcdinfo support])
- fi
- fi
-
- dnl check twice, fallback is internal copy
- if test "x$internal_vcdnav" = "xno"; then
- AC_DEFINE([HAVE_VCDNAV], [1], [Define this if you use external libcdio/libvcdinfo])
- else
- AC_DEFINE_UNQUOTED(HOST_ARCH, "$host_os/$host_cpu", [host os/cpu identifier])
-
- AC_DEFINE(_DEVELOPMENT_, [], enable warnings about being development release)
- AC_HEADER_STDC
- AC_CHECK_HEADERS(sys/stat.h stdint.h glob.h inttypes.h stdbool.h)
-
- if test "x$ac_cv_header_stdint_h" != "xyes"
- then
- AC_CHECK_SIZEOF(int, 4)
- AC_CHECK_SIZEOF(long, 4)
- AC_CHECK_SIZEOF(long long, 8)
- fi
+ ppc-*-linux* | powerpc-*)
+ arch_ppc=yes
- dnl ISOC99_PRAGMA
- AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Pragma("pack(1)")]])],[
- ISOC99_PRAGMA=yes
- AC_DEFINE(HAVE_ISOC99_PRAGMA, [], [Supports ISO _Pragma() macro])
- ],[ISOC99_PRAGMA=no])
- AC_MSG_RESULT($ISOC99_PRAGMA)
-
- dnl
- dnl bitfield order
- dnl
- AC_MSG_CHECKING([bitfield ordering in structs])
-
- dnl basic compile test for all platforms
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-int main() {
- struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
- __attribute__((packed))
-#endif
- bf = { 1,1,1,1 };
- switch (0) case 0: case sizeof(bf) == 1:;
- return 0;
-}
-])], [], AC_MSG_ERROR([compiler doesn't support bitfield structs]))
+ dnl avoid ppc compilation crash
+ AS="$CC"
+ AC_DEFINE([ARCH_PPC], [], [Define this if you're running PowerPC architecture])
+ AC_CHECK_HEADER([altivec.h], [], [enable_altivec=no])
+ if test x"$enable_altivec" != x"no"; then
+ AC_DEFINE([ENABLE_ALTIVEC], [], [Define this if you want to use altivec on PowerPC CPUs])
+ cpuflags="$cpuflags -maltivec"
+ fi
+ ;;
- dnl run test
- AC_RUN_IFELSE([AC_LANG_SOURCE([
-int main() {
- struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
- __attribute__((packed))
-#endif
- bf = { 1,1,1,1 };
- if (sizeof (bf) != 1) return 1;
- return *((unsigned char*) &bf) != 0x4b; }
-])], bf_lsbf=1, [
- AC_RUN_IFELSE([AC_LANG_SOURCE([
-int main() {
- struct { char bit_0:1, bit_12:2, bit_345:3, bit_67:2; }
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
- __attribute__((packed))
-#endif
- bf = { 1,1,1,1 };
- if (sizeof (bf) != 1) return 1;
- return *((unsigned char*) &bf) != 0xa5; }
-])], bf_lsbf=0, AC_MSG_ERROR([unsupported bitfield ordering]))
- ],
- [case "$host" in
- *-*-mingw32* | *-*-cygwin*)
- bf_lsbf=1
- ;;
- *)
- AC_MSG_RESULT([unknown])
- AC_MSG_ERROR([value of bitfield test isn't known for $host
-*********************************************************************
-Value of bitfield test can't be found out for cross-compiling and we
-don't know its value for host "$host".
-
-Because it's needed for VCD plugin, disable VCD by configure option
---disable-vcd or use external VCD library.
-*********************************************************************])
- esac]
-)
-
- if test "x$cross_compiling" = "xyes"; then
- TEXT=" (guessed)"
- else
- TEXT=""
- fi
- if test "x$bf_lsbf" = "x1"; then
- AC_MSG_RESULT(LSBF${TEXT})
- AC_DEFINE(BITFIELD_LSBF, [], [compiler does lsbf in struct bitfields])
- else
- AC_MSG_RESULT(MSBF${TEXT})
- fi
+ i?86-* | k?-* | athlon-* | pentium*)
+ arch_x86=32
+ enable_impure_text=yes
+
+ case "$host_or_hostalias" in
+ *-*-cygwin* | *-*-mingw32*)
+ CC_CHECK_CFLAGS([-fno-omit-frame-pointer], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-omit-frame-pointer"])
+ CC_CHECK_CFLAGS([-fno-inline-functions], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-inline-functions"])
+ CC_CHECK_CFLAGS([-fno-rename-registers], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-rename-registers"])
+ AC_SUBST(W32_NO_OPTIMIZE)
+ case "$host_or_hostalias" in
+ *-*-cygwin*) LIBS="$LIBS @INTLLIBS@ -lkernel32" ;;
+ esac
+ ;;
+ esac
+
+ AC_DEFINE([ARCH_X86_32], [], [Define this if you're running x86 architecture 32 bits])
+
+ if test x"$GCC" = x"yes" -o x"${CC##*/}" = x"icc"; then
+ if test x"$GCC" = x"yes"; then
+ # GCC optimizations
+ CC_CHECK_CFLAGS([-mtune=i386], [sarchopt="-mtune"],
+ [CC_CHECK_CFLAGS([-mcpu=i386], [sarchopt="-mcpu"],
+ [CC_CHECK_CFLAGS([-march=i386], [sarchopt="-march"], [sarchopt="no"])])])
+ if test "$sarchopt" != "no"; then
+ case "$host_or_hostalias" in
+ i386-*) archopt_val="i386" ;;
+ i486-*) archopt_val="i486" ;;
+ i586-*) archopt_val="pentium" ;;
+ pentium-mmx-*) archopt_val="pentium-mmx" ;;
+ k6-2* | k6-3-*) archopt_val="k6-2" ;;
+ k6-*) archopt_val="k6" ;;
+ pentium3-*) archopt_val="pentium3" ;;
+ pentium4-*) archopt_val="pentium4" ;;
+
+ athlon-4-* | athlon-xp-* | althon-mp-*) archopt_val="athlon-4" ;;
+ k7-* | athlon-tbird-* | athlon-*) archopt_val="athlon" ;;
+
+ pentiumpro-* | pentium2-* | i686-*)
+ archopt_val="pentiumpro"
+ if test x"$cross_compiling" != x"yes"; then
+ if test -f /proc/cpuinfo; then
+ modelname=`cat /proc/cpuinfo | grep "model\ name\ :" | sed -e 's/ //g' | cut -d ':' -f2`
+ case "$modelname" in
+ *Athlon* | *Duron* | *K7*)
+ dnl Special check for k7 cpu CC support
+ CC_CHECK_CFLAGS([$sarchopt=athlon],
+ [archopt_val="athlon"], [archopt_val="i686"])
+ ;;
+ VIAEzra)
+ archopt_val="c3"
+ ;;
+ esac
+ fi
+ fi
+ ;;
+ esac
+ test x"$archopt_val" != x"" && cpuflags="$cpuflags $sarchopt=$archopt_val"
+ fi
+ else
+ # Intel optimizations
+ O3_CFLAGS="$O3_CFLAGS -unroll -ipo -ipo_obj"
+ fi
+ fi
+ ;;
+esac
- AC_CHECK_HEADERS([errno.h fcntl.h \
- stdbool.h stdlib.h stdint.h stdio.h string.h \
- strings.h linux/version.h sys/cdio.h sys/stat.h \
- sys/types.h ])
-
- LIBCDIO_CFLAGS='-I$(top_srcdir)/src/input/vcd/libcdio'
- LIBCDIO_LIBS='$(top_builddir)/src/input/vcd/libcdio/libcdio.la'
- LIBISO9660_LIBS='$(top_builddir)/src/input/vcd/libcdio/libiso9660.la'
- LIBVCD_CFLAGS='-I$(top_srcdir)/src/input/vcd/libvcd'
- LIBVCD_LIBS='$(top_builddir)/src/input/vcd/libvcd/libvcd.la'
- LIBVCDINFO_LIBS='$(top_builddir)/src/input/vcd/libvcd/libvcdinfo.la'
-
- case $host_os in
- darwin*)
- AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h,
- [have_iokit_h="yes"])
- if test "x$have_iokit_h" = "xyes" ; then
- AC_DEFINE([HAVE_DARWIN_CDROM], [1],
- [Define 1 if you have Darwin OS X-type CD-ROM support])
- fi
- ;;
- linux*)
- AC_CHECK_HEADERS(linux/version.h)
- AC_CHECK_HEADERS(linux/cdrom.h, [have_linux_cdrom_h="yes"])
- if test "x$have_linux_cdrom_h" = "xyes" ; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
-#include <linux/cdrom.h>
-struct cdrom_generic_command test;
-int has_timeout=sizeof(test.timeout);]])],
- [AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1],
- [Define 1 if timeout is in cdrom_generic_command struct])],[])
- AC_DEFINE([HAVE_LINUX_CDROM], [1],
- [Define 1 if you have Linux-type CD-ROM support])
- fi
- ;;
- bsdi*)
- AC_CHECK_HEADERS(dvd.h, [have_bsdi_dvd_h="yes"])
- if test "x$have_bsdi_dvd_h" = "xyes" ; then
- AC_DEFINE([HAVE_BSDI_CDROM], [1],
- [Define 1 if you have BSDI-type CD-ROM support])
- fi
- ;;
- sunos*|sun*|solaris*)
- AC_CHECK_HEADERS(sys/cdio.h)
- AC_DEFINE([HAVE_SOLARIS_CDROM], [1],
- [Define 1 if you have Solaris CD-ROM support])
- ;;
- cygwin*)
- AC_DEFINE([CYGWIN], [1],
- [Define 1 if you are compiling using cygwin])
- AC_DEFINE([HAVE_WIN32_CDROM], [1],
- [Define 1 if you have MinGW CD-ROM support])
- LIBCDIO_LIBS="$LIBCDIO_LIBS -lwinmm"
- LIBVCD_LIBS="$LIBVCD_LIBS -lwinmm"
- ;;
- mingw*)
- AC_DEFINE([MINGW32], [1],
- [Define 1 if you are compiling using MinGW])
- AC_DEFINE([HAVE_WIN32_CDROM], [1],
- [Define 1 if you have MinGW CD-ROM support])
- ;;
- freebsd4.*|kfreebsd*-gnu)
- AC_DEFINE([HAVE_FREEBSD_CDROM], [1],
- [Define 1 if you have FreeBSD CD-ROM support])
- ;;
- *)
- AC_MSG_WARN(Don't have OS CD-reading support for ${host_os}...)
- AC_MSG_WARN(Will use generic support.)
- ;;
+AC_ARG_ENABLE([vis],
+ [AS_HELP_STRING([--disable-vis], [do not use assembly codes for Sun UltraSPARC CPUs])],
+ [], [enable_vis="yes"])
+if test "x$has_vis" = "xyes"; then
+ AC_DEFINE([ENABLE_VIS], [], [Define this if you have Sun UltraSPARC CPU])
+ case "$cpuflags" in
+ *-mcpu=*) ;;
+ *) cpuflags="$cpuflags -mcpu=v9" ;;
esac
- AC_SUBST(LINUX_CDROM_TIMEOUT)
- AC_SUBST(HAVE_BSDI_CDROM)
- AC_SUBST(HAVE_DARWIN_CDROM)
- AC_SUBST(HAVE_FREEBSD_CDROM)
- AC_SUBST(HAVE_LINUX_CDROM)
- AC_SUBST(HAVE_SOLARIS_CDROM)
- AC_SUBST(HAVE_WIN32_CDROM)
- AC_SUBST(LINUX_CDROM_TIMEOUT)
- AC_SUBST(LIBVCD_SYSDEP)
-
- AC_CHECK_FUNCS( bzero memcpy )
-
- AC_CHECK_MEMBER([struct tm.tm_gmtoff],
- [AC_DEFINE(HAVE_TM_GMTOFF, 1,
- [Define if struct tm has the tm_gmtoff member.])],
- ,
- [#include <time.h>])
- fi
fi
-
-AC_DEFINE([LIBCDIO_CONFIG_H], 1, [Get of rid system libcdio build configuration])
-AC_DEFINE([EXTERNAL_LIBCDIO_CONFIG_H], 1, [Get of rid system libcdio build configuration])
-AC_SUBST(LIBCDIO_CFLAGS)
-AC_SUBST(LIBCDIO_LIBS)
-AC_SUBST(LIBISO9660_LIBS)
-AC_SUBST(LIBVCD_CFLAGS)
-AC_SUBST(LIBVCD_LIBS)
-AC_SUBST(LIBVCDINFO_LIBS)
-AM_CONDITIONAL(HAVE_VCDNAV, [test "x$internal_vcdnav" = "xno"])
-AM_CONDITIONAL(ENABLE_VCD, [test "x$enable_vcd" = "xyes"])
-
-
-dnl ---------------------------------------------
-dnl ASF build can be optional
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([asf], AS_HELP_STRING([--disable-asf], [do not build ASF demuxer]))
-AM_CONDITIONAL(BUILD_ASF, test "x$enable_asf" != "xno")
-
-
-dnl ---------------------------------------------
-dnl Nosefart build can be optional
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([nosefart], AS_HELP_STRING([--disable-nosefart], [do not build nosefart player]))
-if test "x$enable_nosefart" != "xno"; then
- AC_DEFINE([HAVE_NOSEFART], 1, [Define this if Nosefart is being built.])
-fi
-AM_CONDITIONAL(BUILD_NOSEFART, test "x$enable_nosefart" != "xno")
-
-dnl ---------------------------------------------
-dnl FAAD build can be optional
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([faad], AS_HELP_STRING([--disable-faad], [do not build FAAD decoder]))
-AC_ARG_WITH(external-libfaad, AS_HELP_STRING([--with-external-libfaad], [use external libfaad (recommended)]),
- [external_libfaad="$withval"], [external_libfaad="yes"])
-
-have_faad=no
-if test "x$enable_faad" = "xno"; then
- AC_MSG_RESULT([faad support disabled])
-elif test "x$with_external_libfaad" != "xno"; then
- AC_CHECK_LIB([faad], [NeAACDecInit], [have_faad=yes])
- if test "x$have_faad" = xyes; then
- AC_CHECK_HEADERS([faad.h], , [have_faad=no])
- if test "x$have_faad" != "xyes"; then
- AC_MSG_ERROR([Unable to find libfaad])
- fi
- AC_DEFINE([EXTERNAL_LIBFAAD], [1], [Define if external libfaad is used])
- fi
+AM_CONDITIONAL([ENABLE_VIS], test x"$has_vis" = x"yes")
+
+O1_CFLAGS="$O1_CFLAGS $optflags $cpuflags"
+O2_CFLAGS="$O2_CFLAGS $optflags $cpuflags"
+O3_CFLAGS="$O3_CFLAGS $optflags $cpuflags"
+
+dnl Allow turning off/on of optimizations. By default, optimizations are
+dnl enabled if --enable-debug is not specified. Even with --enable-debug,
+dnl optimizations can be enabled by explicitly specifying --enable-optimizations
+AC_ARG_ENABLE([optimizations],
+ [AS_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable])],
+ [], [test x"$enable_debug" != x"no" && enable_optimizations="no"])
+AM_CONDITIONAL([DISABLE_OPTIMIZATIONS], [test x"$enable_optimizations" = x"no"])
+if test x"$enable_optimizations" = x"no"; then
+ DEFAULT_OCFLAGS='$(O0_CFLAGS)'
else
- AC_MSG_RESULT([Use included libfaad])
+ dnl For multi-pass compilation: never when cross-compiling
+ if test x"$cross_compiling" != x"yes"; then
+ if test x"$GCC" = x"yes"; then
+ CC_CHECK_CFLAGS([-fprofile-arcs], [CC_CHECK_CFLAGS([-fbranch-probabilities],
+ [PASS1_CFLAGS="-fprofile-arcs $PASS1_CFLAGS"
+ PASS2_CFLAGS="-fbranch-probabilities $PASS2_CFLAGS"])])
+ else
+ pass1flags="-prof_dir \$(PWD)/\$(top_builddir)/ -prof_genx"
+ pass2flags="-prof_dir \$(PWD)/\$(top_builddir)/ -prof_use"
+ CC_CHECK_CFLAGS(["$pass1flags"], [CC_CHECK_CFLAGS(["$pass2flags"],
+ [PASS1_CFLAGS="$pass1flags $PASS1_CFLAGS"
+ PASS2_CFLAGS="$pass2flags $PASS2_CFLAGS"])])
+ fi
+ fi
fi
+AC_SUBST(O0_CFLAGS)
+AC_SUBST(O1_CFLAGS)
+AC_SUBST(O2_CFLAGS)
+AC_SUBST(O3_CFLAGS)
-AM_CONDITIONAL(BUILD_FAAD, test "x$enable_faad" != "xno")
-AM_CONDITIONAL(EXTERNAL_LIBFAAD, test "x$have_faad" = "xyes")
-
-dnl ---------------------------------------------
-dnl Optional and external libdts
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE(dts, AS_HELP_STRING([--disable-dts], [Disable support for DTS decoding library (default: enabled)]),
- [enable_libdts="$enableval"], [enable_libdts="yes"])
-AC_ARG_WITH(external-libdts, AS_HELP_STRING([--with-external-libdts], [use external libdts library (not recommended)]),
- [external_libdts="$withval"], [external_libdts="no"])
-
-have_dts="no"
-
-if test "x$enable_libdts" = "xno"; then
- AC_MSG_RESULT([libdts support disabled])
-elif test "x$external_libdts" = "xyes"; then
- PKG_CHECK_MODULES(LIBDTS, [libdts], have_dts=yes, have_dts=no)
- AC_CHECK_HEADERS([dts.h])
- AC_SUBST(LIBDTS_LIBS)
- AC_SUBST(LIBDTS_CFLAGS)
- if test "x$have_dts" = "xno"; then
- AC_MSG_RESULT([*** no usable version of libdts found, using internal copy ***])
- fi
-else
- AC_MSG_RESULT([Use included libdts support])
-fi
+AC_SUBST(PASS1_CFLAGS)
+AC_SUBST(PASS2_CFLAGS)
-AM_CONDITIONAL(DTS, test "x$enable_libdts" = "xyes")
-AM_CONDITIONAL(EXTERNAL_LIBDTS, test "x$have_dts" = "xyes")
+test x"$DEFAULT_OCFLAGS" = x"" && DEFAULT_OCFLAGS='$(O3_CFLAGS)'
+AC_SUBST(DEFAULT_OCFLAGS)
-dnl ---------------------------------------------
-dnl libmodplug support
-dnl ---------------------------------------------
-AC_ARG_ENABLE([modplug],
- AS_HELP_STRING([--enable-modplug], [Enable modplug support]) )
-
-if test "x$enable_modplug" != "xno"; then
- PKG_CHECK_MODULES([LIBMODPLUG], [libmodplug >= 0.7],
- [AC_DEFINE([HAVE_MODPLUG], 1, [define this if you have libmodplug installed])],
- [enable_modplug=no])
- if test "`"$PKG_CONFIG" --modversion libmodplug`" = 0.8.8; then
- AC_MSG_ERROR([you have a broken version of libmodplug (0.8.8); cowardly refusing to use it])
- fi
+if test x"$arch_x86" != x"no" && test x"$enable_macosx_universal" = x"no"; then
+ AC_DEFINE([ARCH_X86], [], [Define this if you're running x86 architecture])
+ AC_DEFINE([HAVE_MMX], [], [Define this if you can compile MMX asm instructions])
fi
+AM_CONDITIONAL([ARCH_PPC], test x"$arch_ppc" = x"yes")
+AM_CONDITIONAL([ARCH_X86], test x"$arch_x86" != x"no")
+AM_CONDITIONAL([ARCH_X86_32], test x"$arch_x86" = x"32")
+AM_CONDITIONAL([ARCH_X86_64], test x"$arch_x86" = x"64")
+AM_CONDITIONAL([HAVE_MMX], test x"$arch_x86" != x"no")
+AM_CONDITIONAL([HOST_OS_DARWIN], test x"$HOST_OS_DARWIN" = x"1")
-AC_SUBST(LIBMODPLUG_CFLAGS)
-AC_SUBST(LIBMODPLUG_LIBS)
-dnl AM_CONDITIONAL(HAVE_MODPLUG, [test "x$have_modplug" = x"yes"])
-
-dnl ---------------------------------------------
-dnl Wavpack library
-dnl ---------------------------------------------
-AC_ARG_WITH([wavpack],
- AS_HELP_STRING([--with-wavpack], [Enable Wavpack decoder (requires libwavpack)]) )
-
-if test "x$with_wavpack" = "xyes"; then
- PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes])
+if test x"$enable_impure_text" = x"yes"; then
+ case "$host_or_hostalias" in
+ *solaris*)
+ if test "$GCC" = yes; then
+ IMPURE_TEXT_LDFLAGS="-mimpure-text"
+ else
+ IMPURE_TEXT_LDFLAGS="-z textoff"
+ fi
+ ;;
+ *darwin*)
+ IMPURE_TEXT_LDFLAGS="-Wl,-read_only_relocs,warning"
+ ;;
+ esac
fi
+AC_SUBST(IMPURE_TEXT_LDFLAGS)
-AM_CONDITIONAL([HAVE_WAVPACK], [test "x$have_wavpack" = "xyes"])
-
-
-dnl --------------------------------------------
-dnl Real binary codecs support
-dnl --------------------------------------------
-AC_ARG_ENABLE([real-codecs],
- AS_HELP_STRING([--disable-real-codecs], [Disable Real binary codecs support]))
-AC_ARG_WITH([real-codecs-path],
- AS_HELP_STRING([--with-real-codecs-path=dir], [Specify directory for Real binary codecs]), [
- AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$withval"], [Specified path for Real binary codecs])
- ])
+dnl ----------------------------
+dnl checks for library functions
+dnl ----------------------------
-dnl On some systems, we cannot enable Real codecs support to begin with.
-dnl This includes Darwin, that uses Mach-O rather than ELF.
-case $host in
- *-darwin*) enable_real_codecs="no" ;;
-esac
-
-if test "x$enable_real_codecs" != "xno"; then
- 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 NLS: src/input/mms.c src/input/vcd, xine-utils
+AC_CHECK_FUNCS([nl_langinfo])
- dnl For these there are no replacements
- AC_CHECK_SYMBOLS([___brk_addr __ctype_b])
+dnl src/libfaad
+AC_CHECK_DECL([lrintf],
+ [AC_DEFINE([HAVE_LRINTF], 1, [Define this if the 'lrintf' function is declared in math.h])
+ AC_DEFINE([_ISOC9X_SOURCE], 1, [Define this if you are ISO C9X compliant])],
+ [],
+ [#define _ISOC9X_SOURCE
+ #include <math.h>])
- 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])])
- fi
-fi
+dnl contrib/libdca, src/video_out/vidix/drivers/mach64_vid.c
+AC_CHECK_FUNCS([memalign])
-AM_CONDITIONAL([ENABLE_REAL], [test "x$enable_real_codecs" != "xno"])
+dnl src/input/vcd/libcdio/portable.h
+AC_CHECK_FUNCS([bzero])
-dnl --------------------------------------------
-dnl mmap() support
-dnl --------------------------------------------
+dnl src/libfaad/common.h
+AC_CHECK_FUNCS([memcpy])
+dnl src/input/input_file.c
AC_ARG_ENABLE([mmap],
- AS_HELP_STRING([--enable-mmap], [Enable mmap() file loading (default: no)]))
-
-if test "x$enable_mmap" = "xyes"; then
- AC_CHECK_FUNCS([mmap])
-fi
-
-dnl ---------------------------------------------
-dnl antialising support
-dnl ---------------------------------------------
-
-AC_ARG_ENABLE([antialiasing],
- AS_HELP_STRING([--enable-antialiasing], [enable font antialiasing]))
-
-if test "x$enable_antialiasing" = "xyes"; then
- AC_DEFINE(ENABLE_ANTIALIASING,1,[Define this to 1 to enable font antialising.])
-fi
-
-dnl ---------------------------------------------
-dnl ip_mreqn
-dnl ---------------------------------------------
-
-AC_CHECK_IP_MREQN
-if test "x$have_ip_mreqn" = "xyes"; then
- AC_DEFINE(HAVE_IP_MREQN,1,[Define this if you have ip_mreqn in netinet/in.h])
+ AS_HELP_STRING([--enable-mmap], [Enable mmap() file loading (default: no)]))
+if test x"$enable_mmap" = x"yes"; then
+ AC_CHECK_FUNCS([mmap])
fi
-dnl ---------------------------------------------
-dnl restrict keyword finding (from gstreamer)
-dnl ---------------------------------------------
-restrict=""
-for restrict_keyword in restrict __restrict__ __restrict; do
- AC_MSG_CHECKING(for restrict keyword $restrict_keyword)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ void foo(char * $restrict_keyword p); ]])],[
- KEYWORD_FOUND=yes && AC_MSG_RESULT(yes) ],[
- KEYWORD_FOUND=no && AC_MSG_RESULT(no) ])
- if test "x$KEYWORD_FOUND" = xyes; then
- restrict="$restrict_keyword"
- break
- fi
-done
-if test "x$restrict" = x; then
- AC_MSG_ERROR(No restrict keyword found)
-fi
-AC_DEFINE_UNQUOTED(restrict, $restrict, [restrict keyword])
-
-dnl ---------------------------------------------
-dnl ASM ALIGN is power of two ?
-dnl Used by internal FFmpeg and Planar postprocess
-dnl ---------------------------------------------
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ asm (".align 3"); ]])],
- AC_DEFINE([ASMALIGN_1SLN], [1], [define if '.align n' means alignment to (1<<n)-byte boundaries]),
- :)
-AH_BOTTOM([#ifdef ASMALIGN_1SLN
-# define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\n\t"
-#else
-# define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\n\t"
-#endif
-])
+AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr va_copy])
-dnl ---------------------------------------------
-dnl Some extra checks.
-dnl ---------------------------------------------
+AC_CHECK_FUNCS([snprintf _snprintf], [have_required_function="yes"])
+ test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found])
+AC_CHECK_FUNCS([vsnprintf _vsnprintf], [have_required_function="yes"])
+ test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found])
+AC_CHECK_FUNCS([strcasecmp _stricmp], [have_required_function="yes"])
+ test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found])
+AC_CHECK_FUNCS([strncasecmp _strnicmp], [have_required_function="yes"])
+ test x"$have_required_function" != x"yes" && AC_MSG_ERROR([required function not found])
-AC_SYS_LARGEFILE
-AC_CHECK_LIB(posix4, sched_get_priority_min)
-AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr tzset va_copy])
-AC_CHECK_FUNCS([snprintf _snprintf], [some_snprintf="yes"; break])
-AC_CHECK_FUNCS([vsnprintf _vsnprintf], [some_vsnprintf="yes"; break])
-AC_CHECK_FUNCS([strcasecmp _stricmp], [some_strcasecmp="yes"; break])
-AC_CHECK_FUNCS([strncasecmp _strnicmp], [some_strncasecmp="yes"; break])
-if test "x$some_snprintf" != "xyes" -o \
- "x$some_vsnprintf" != "xyes" -o \
- "x$some_strcasecmp" != "xyes" -o \
- "x$some_strncasecmp" != "xyes"; then
- AC_MSG_ERROR([required function not found])
-fi
AC_FUNC_FSEEKO
-AC_CHECK_HEADERS(assert.h byteswap.h malloc.h execinfo.h ucontext.h sys/mman.h sys/mixer.h libgen.h netdb.h dirent.h sys/times.h sys/ioctl.h sys/param.h alloca.h)
-AC_REPLACE_FUNCS(asprintf basename gettimeofday setenv strcasestr strndup strpbrk strsep strtok_r timegm unsetenv memmem)
-
-AC_LIBSOURCE(hstrerror.c)
-AC_LINK_IFELSE([AC_LANG_SOURCE([#include <netdb.h>
-int main(void) {
- hstrerror(0);
-}])], ac_cv_function_system_hstrerror="yes")
-AC_CHECK_LIB([resolv], [hstrerror], [
- ac_cv_function_system_hstrerror="yes"
- NET_LIBS="-lresolv $NET_LIBS"
-])
-AC_SUBST(NET_LIBS)
-if test "x$ac_cv_function_system_hstrerror" = "xyes"; then
- AC_DEFINE(HAVE_HSTRERROR, 1, [Define to 1 if you have 'hstrerror' in <netdb.h>])
-else
- AC_LIBOBJ(hstrerror)
-fi
+AC_REPLACE_FUNCS([asprintf basename gettimeofday setenv strcasestr strndup strpbrk strsep strtok_r timegm unsetenv memmem])
-AC_LIBSOURCE(dirent_msvc.c)
-AC_CHECK_FUNC(opendir,
- [AC_DEFINE(HAVE_OPENDIR, 1, [Define to 1 if you have 'opendir' function])],
- [if test "x$SYS" = "xmingw32"; then
- AC_LIBOBJ(dirent_msvc)
- else
- AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)])
- fi])
+AC_LIBSOURCE([hstrerror.c])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[hstrerror(0)]])],
+ [AC_DEFINE([HAVE_HSTRERROR], 1, [Define to 1 if you have 'hstrerror' in <netdb.h>])],
+ [AC_LIBOBJ([hstrerror])])
+
+AC_LIBSOURCE([dirent_msvc.c])
+AC_CHECK_FUNC([opendir],
+ [AC_DEFINE([HAVE_OPENDIR], 1, [Define to 1 if you have 'opendir' function])],
+ [if test x"$WIN32_SYS" = x"mingw32"; then
+ AC_LIBOBJ([dirent_msvc])
+ else
+ AC_MSG_ERROR([dirent is needed (opendir, readdir, ...)])
+ fi])
XINE_CHECK_MINMAX([
AC_DEFINE(HAVE_MAX_MACRO, 1, [Define to 1 if you have 'MAX' macro in sys/param.h])
AC_DEFINE(HAVE_MIN_MACRO, 1, [Define to 1 if you have 'MIN' macro in sys/param.h])
],[])
-dnl ---------------------------------------------
-dnl cflags and debug cflags
-dnl ---------------------------------------------
-
-AC_SUBST(DEBUG_CFLAGS)
-DEBUG_CFLAGS="-g -DDEBUG $CFLAGS"
-
-dnl dummy
-ASFLAGS="$ASFLAGS"
-AC_SUBST(ASFLAGS)
-
-dnl ---------------------------------------------
-dnl Check for some __attribute__ support needed
-dnl ---------------------------------------------
-
-CC_ATTRIBUTE_ALIGNED
-
-CC_ATTRIBUTE_VISIBILITY([protected], [visibility_export="protected"],
- [CC_ATTRIBUTE_VISIBILITY([default], [visibility_export="default"])]
-)
-CC_ATTRIBUTE_VISIBILITY([internal])
-
-if test "x$visibility_export" != "x"; then
- CC_FLAG_VISIBILITY([
- AC_DEFINE([EXPORTED], [__attribute__((visibility("default")))],
- [Mark a symbol as being exported if visibility is changed])
- VISIBILITY_FLAG="-fvisibility=hidden"
- ], [AC_DEFINE([EXPORTED], [], [Dummy mark as being exported])
- ])
-else
- AC_DEFINE([EXPORTED], [], [Dummy mark as being exported])
-fi
-
-AC_SUBST([VISIBILITY_FLAG])
-
-CC_ATTRIBUTE_SENTINEL
-CC_ATTRIBUTE_FORMAT
-CC_ATTRIBUTE_FORMAT_ARG
-CC_ATTRIBUTE_DEPRECATED
-CC_ATTRIBUTE_UNUSED
-CC_ATTRIBUTE_MALLOC
-CC_ATTRIBUTE_PACKED
-CC_ATTRIBUTE_CONST
-
-AC_OPTIMIZATIONS
-
-arch_x86="no"
-enable_armv4l="no"
-
-case "$host_or_hostalias" in
- i?86-* | k?-* | athlon-* | pentium*-)
- dnl enable x86 specific parts of the code
- dnl
- dnl all of this stuff needs gcc/gas; it uses gnu c compiler extensions
- dnl like the extended asm() or __attribute(__cdecl__), or other direct
- dnl mmx/sse/3dnow assembler instructions.
- dnl
- AC_DEFINE_UNQUOTED(ARCH_X86_32,,[Define this if you're running x86 architecture 32 bits])
- AC_DEFINE(FPM_INTEL,1,[Define to select libmad fixed point arithmetic implementation])
- arch_x86="32"
- enable_impure_text="yes"
-
- case "$host_or_hostalias" in
- *-*-cygwin)
- LIBS="$LIBS @INTLLIBS@ -lkernel32"
- ;;
- esac
- ;;
- x86_64-*)
- AC_DEFINE_UNQUOTED(ARCH_X86_64,,[Define this if you're running x86 architecture 64 bits])
- AC_DEFINE(FPM_64BIT,1,[Define to select libmad fixed point arithmetic implementation])
- arch_x86="64"
- ;;
- powerpc-*-darwin*)
- dnl avoid ppc compilation crash
- AS="$CC"
- AC_DEFINE_UNQUOTED(FPM_PPC,,[Define to select libmad fixed point arithmetic implementation])
- AC_DEFINE_UNQUOTED(ARCH_PPC,,[Define this if you're running PowerPC architecture])
-
- AC_CHECK_HEADER([altivec.h], , enable_altivec=no)
-
- if test "x$enable_altivec" != xno; then
- AC_DEFINE_UNQUOTED(ENABLE_ALTIVEC,,[Define this if you want to use altivec on PowerPC CPUs])
- CFLAGS="$CFLAGS -faltivec -maltivec"
- LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -force_cpusubtype_ALL -faltivec -maltivec"
- fi
- ;;
- ppc-*-linux* | powerpc-*)
- dnl avoid ppc compilation crash
- AS="$CC"
- AC_DEFINE_UNQUOTED(FPM_PPC,,[Define to select libmad fixed point arithmetic implementation])
- AC_DEFINE_UNQUOTED(ARCH_PPC,,[Define this if you're running PowerPC architecture])
-
- AC_CHECK_HEADER([altivec.h], , enable_altivec=no)
-
- if test "x$enable_altivec" != xno; then
- AC_DEFINE_UNQUOTED(ENABLE_ALTIVEC,,[Define this if you have a Motorola 74xx CPU])
- CFLAGS="$CFLAGS -maltivec"
- LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -maltivec"
- fi
- ;;
- sparc*-*-linux*)
- if test "x$enable_vis" != xno; then
- has_vis=yes
- fi
+AC_LIBSOURCE([timedlock.c])
+ac_save_LIBS="$LIBS" LIBS="$LIBS $PTHREAD_LIBS"
+AC_CHECK_FUNCS([pthread_mutex_timedlock],
+ [AC_DEFINE([HAVE_PTHREAD_MUTEX_TIMEDLOCK], 1, [Define to 1 if you have 'pthread_mutex_timedlock' in <pthread.h>])],
+ [AC_LIBOBJ([timedlock])])
+LIBS="$ac_save_LIBS"
- AC_DEFINE_UNQUOTED(FPM_SPARC,,[Define to select libmad fixed point arithmetic implementation])
- AC_DEFINE_UNQUOTED(ARCH_SPARC,,[Define this if you're running SPARC architecture])
- ;;
- sparc-*-solaris*)
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- 1.*|2.*) ;;
- *)
- if test "x$enable_vis" != xno; then
- has_vis=yes
- fi
- ;;
- esac
-
- AC_DEFINE_UNQUOTED(FPM_SPARC,,[Define to select libmad fixed point arithmetic implementation])
- else
- AC_DEFINE_UNQUOTED(FPM_64BIT,,[Define to select libmad fixed point arithmetic implementation])
- fi
- AC_DEFINE_UNQUOTED(ARCH_SPARC,,[Define this if you're running SPARC architecture])
- ;;
- mips-*)
- AC_DEFINE_UNQUOTED(FPM_MIPS,,[Define to select libmad fixed point arithmetic implementation])
- ;;
- alphaev56-* | alpha* | ia64-* | hppa*-linux-*)
- AC_DEFINE_UNQUOTED(FPM_64BIT,,[Define to select libmad fixed point arithmetic implementation])
- AC_DEFINE_UNQUOTED(ARCH_ALPHA,,[Define this if you're running Alpha architecture])
- ;;
- armv4l-*-linux*)
- AC_DEFINE_UNQUOTED(FPM_ARM,,[Define to select libmad fixed point arithmetic implementation])
- AC_DEFINE_UNQUOTED(ARCH_ARM,,[Define this if you're running ARM architecture])
- enable_armv4l="yes"
- ;;
- *)
- AC_DEFINE_UNQUOTED(FPM_DEFAULT,,[Define to select libmad fixed point arithmetic implementation])
- ;;
-esac
+AC_GETOPT_LONG
-if test "x$has_vis" = "xyes"; then
- AC_DEFINE_UNQUOTED(ENABLE_VIS,,[Define this if you have Sun UltraSPARC CPU])
- case "$CFLAGS" in
- *-mcpu=*) ;;
- *) CFLAGS="$CFLAGS -mcpu=v9" ;;
- esac
-fi
-AM_CONDITIONAL(ENABLE_VIS, test "x$has_vis" = "xyes")
+dnl --------------------------
+dnl checks for system services
+dnl --------------------------
-if test "x$arch_x86" != "xno"; then
- AC_DEFINE_UNQUOTED(ARCH_X86,,[Define this if you're running x86 architecture])
- AC_DEFINE_UNQUOTED(HAVE_MMX,,[Define this if you can compile MMX asm instructions])
-fi
-AM_CONDITIONAL(ARCH_X86, test "x$arch_x86" != "xno")
-AM_CONDITIONAL(ARCH_X86_32, test "x$arch_x86" = "x32")
-AM_CONDITIONAL(ARCH_X86_64, test "x$arch_x86" = "x64")
-AM_CONDITIONAL(HAVE_MMX, test "x$arch_x86" != "xno")
-
-case $host_os in
- darwin*)
- HOST_OS_DARWIN=1
- AC_DEFINE_UNQUOTED(HOST_OS_DARWIN, 1, [Define this if built on Mac OS X/Darwin])
- OBJCFLAGS="-D_INTL_REDIRECT_MACROS $OBJCFLAGS"
+dnl Even as of 2.61, autoconf is not smart enough to find the X include
+dnl and library paths on Mac OS X, so seed them automatically if they're
+dnl not specified on the configure command-line.
+case "$host_os" in
+ darwin*)
+ test x"$x_includes" = x"NONE" && x_includes="/usr/X11R6/include"
+ test x"$x_libraries" = x"NONE" && x_libraries="/usr/X11R6/lib"
;;
esac
-AM_CONDITIONAL(HOST_OS_DARWIN, test "x$HOST_OS_DARWIN" = "x1")
-dnl ---------------------------------------------
-dnl Set IMPURE_TEXT_LDFLAGS
-dnl ---------------------------------------------
+dnl Check for Xwindows using the autoconf AC_PATH_XTRA macro, which is an
+dnl extension of AC_PATH_X that sets X_CFLAGS and X_LIBS. It will also set
+dnl X_EXTRA_LIBS and X_PRE_LIBS.
+AC_PATH_XTRA
+if test x"$no_x" != x"yes"; then
+ X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
+ AC_CHECK_LIB([Xext], [main],
+ [X_LIBS="$X_LIBS -lXext"], [AC_MSG_ERROR([libXext is required])],
+ [$X_LIBS])
+elif test x"$have_x" = x"no"; then
+ PKG_CHECK_MODULES([X], [x11 xext], [have_x=yes; no_x=no], [have_x=no; no_x=yes])
+fi
+
+dnl Check for XShm support (required for xine X support)
+if test x"$no_x" != x"yes"; then
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ AC_CHECK_HEADERS([X11/extensions/XShm.h], [],
+ [AC_MSG_ERROR([XShm extension is required])],
+ [#include <X11/Xlib.h>])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ AC_DEFINE([HAVE_X11], 1, [Define this if you have X11R6 installed])
+fi
+AM_CONDITIONAL([HAVE_X11], [test x"$no_x" != x"yes"])
-IMPURE_TEXT_LDFLAGS=""
-if test "x$enable_impure_text" = xyes; then
- case "$host_or_hostalias" in
- *solaris*)
- if test "$GCC" = yes; then
- IMPURE_TEXT_LDFLAGS="-mimpure-text"
- else
- IMPURE_TEXT_LDFLAGS="-z textoff"
- fi
- ;;
- *-darwin*)
- IMPURE_TEXT_LDFLAGS="-Wl,-read_only_relocs,warning"
- ;;
- esac
-fi
-AC_SUBST(IMPURE_TEXT_LDFLAGS)
-
-dnl ---------------------------------------------
-dnl HAVE_ARMV4L is currently used in libavcodec makefile.am
-dnl ---------------------------------------------
-
-AM_CONDITIONAL(HAVE_ARMV4L, test "x$enable_armv4l" = "xyes")
+dnl Locate libraries needed for X health check
+soname_script="/[[0-9]]$/! d; s%^.*/%%
+t q
+b
+:q
+q"
+x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libX11.$acl_cv_shlibext"* "${x_libraries:-/usr/lib}/libX11.$acl_cv_shlibext"* 2>/dev/null | sed -e \"${soname_script}\"`"
+AC_DEFINE_UNQUOTED([LIBX11_SO], "${x_lib_location:-libX11.$acl_cv_shlibext}", [The soname of libX11, needed for dlopen()])
+x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libXv.$acl_cv_shlibext"* "${x_libraries:-/usr/lib}/libXv.$acl_cv_shlibext"* 2>/dev/null | sed -e \"${soname_script}\"`"
+AC_DEFINE_UNQUOTED([LIBXV_SO], "${x_lib_location:-libXv.$acl_cv_shlibext}", [The soname of libXv, needed for dlopen()])
+
+dnl _FILE_OFFSET_BITS (AC_SYS_LARGEFILE; ac_cv_sys_file_offset_bits)
+dnl _LARGE_FILES (AC_SYS_LARGEFILE; ac_cv_sys_large_files)
+dnl _LARGEFILE_SOURCE (AC_FUNC_SEEKO; ac_cv_sys_largfile_source)
+dnl _LARGEFILE64_SOURCE (glibc transitional; not tested or used anywhere)
+AC_SYS_LARGEFILE
+dnl Add macros to the compiler command line that are also in config.h for things
+dnl that do not #include config.h.
+dnl known: src/input/libreal, src/input/librtsp
+test x"$ac_cv_sys_file_offset_bits" != x"no" && CPPFLAGS="-D_FILE_OFFSET_BITS=64 $CPPFLAGS"
+test x"$ac_cv_sys_largefile_source" != x"no" && CPPFLAGS="-D_LARGEFILE_SOURCE $CPPFLAGS"
+test x"$ac_cv_sys_large_files" != x"" && test x"$ac_cv_sys_large_files" != x"no" && CPPFLAGS="-D_LARGE_FILES $CPPFLAGS"
-dnl ---------------------------------------------
-dnl Use features of autoconf 2.61, but stay compatible
-dnl with older versions.
-dnl ---------------------------------------------
-if test "x$datarootdir" = "x"; then
- datarootdir='${datadir}'
- AC_SUBST(datarootdir)
-fi
+dnl -------
+dnl Plugins
+dnl -------
-if test "x$docdir" = "x"; then
- docdir='${datarootdir}/doc/${PACKAGE}'
- AC_SUBST(docdir)
-fi
+XINE_AUDIO_OUT_PLUGINS
+XINE_VIDEO_OUT_PLUGINS
+XINE_INPUT_PLUGINS
+XINE_DECODER_PLUGINS
-if test "x$htmldir" = "x"; then
- htmldir='${docdir}'
- AC_SUBST(htmldir)
-fi
dnl ---------------------------------------------
dnl XINE_ROOTDIR does not work if architecture independent files are
dnl installed to another place than architecture dependent files !!!
dnl ---------------------------------------------
-if test "x$prefix" = xNONE; then
- prefix="${ac_default_prefix}"
-fi
-if test "x$exec_prefix" = xNONE; then
- exec_prefix='${prefix}'
-fi
-
dnl
dnl installation directories and directories relative to prefix
dnl
@@ -2528,11 +1025,11 @@ dnl use AC_SUBST for installation
dnl
makeexpand () {
- local i
- local j
- i="$1"
- while test "$i" != "$j"; do j="$i"; eval i="$j"; done
- echo "$i"
+ local i
+ local j
+ i="$1"
+ while test "$i" != "$j"; do j="$i"; eval i="$j"; done
+ echo "$i"
}
xinelibdir='${libdir}/xine'
@@ -2552,25 +1049,29 @@ XINE_REL_PLUGINDIR="$XINE_REL_PLUGINROOT.$XINE_LT_AGE"
XINE_REL_FONTDIR="`makeexpand "$XINE_FONTDIR" | sed -e "s,^${prefix}/,,"`"
XINE_REL_LOCALEDIR="`makeexpand "$XINE_LOCALEDIR" | sed -e "s,^${prefix}/,,"`"
XINE_PKGCONFIG_DIR="`makeexpand "$pkgconfigdir"`"
-dnl platform specific runtime directories
-if test "x$SYS" = "xmingw32" -o "x$SYS" = "xcygwin"; then
- AC_DEFINE(XINE_PLUGINROOT,[xine_get_pluginroot()],[Define this to general plugins directory location])
- AC_DEFINE(XINE_PLUGINDIR,[xine_get_plugindir()],[Define this to specific plugins directory location])
- AC_DEFINE(XINE_FONTDIR,[xine_get_fontdir()],[Define this to osd fonts dir location])
- AC_DEFINE(XINE_LOCALEDIR,[xine_get_localedir()],[Path where catalog files will be.])
+if test "x$WIN32_SYS" = "xmingw32" -o "x$WIN32_SYS" = "xcygwin"; then
+ dnl polish paths (MinGW runtime accepts both \ and / anyway)
+ XINE_REL_PLUGINROOT="`echo "$XINE_REL_PLUGINROOT" | sed -e 's/\\//\\\\\\\\/g'`"
+ XINE_REL_PLUGINDIR="$XINE_REL_PLUGINROOT.$XINE_LT_AGE"
+ XINE_REL_FONTDIR="`echo "$XINE_REL_FONTDIR" | sed -e 's/\\//\\\\\\\\/g'`"
+ XINE_REL_LOCALEDIR="`echo "$XINE_REL_LOCALEDIR" | sed -e 's/\\//\\\\\\\\/g'`"
+ AC_DEFINE([XINE_PLUGINROOT],[xine_get_pluginroot()],[Define this to general plugins directory location])
+ AC_DEFINE([XINE_PLUGINDIR], [xine_get_plugindir()], [Define this to specific plugins directory location])
+ AC_DEFINE([XINE_FONTDIR], [xine_get_fontdir()], [Define this to osd fonts dir location])
+ AC_DEFINE([XINE_LOCALEDIR], [xine_get_localedir()], [Path where catalog files will be.])
else
- XINE_PLUGINROOTPATH="`makeexpand "$XINE_PLUGINROOT"`"
- XINE_FONTPATH="`makeexpand "$XINE_FONTDIR"`"
- XINE_LOCALEPATH="`makeexpand "$XINE_LOCALEDIR"`"
- AC_DEFINE_UNQUOTED(XINE_PLUGINROOT,"$XINE_PLUGINROOTPATH",[Define this to general plugins directory location])
- AC_DEFINE_UNQUOTED(XINE_PLUGINDIR,"$XINE_PLUGINROOTPATH.$XINE_LT_AGE",[Define this to specific plugins directory location])
- AC_DEFINE_UNQUOTED(XINE_FONTDIR,"$XINE_FONTPATH",[Define this to osd fonts dir location])
- AC_DEFINE_UNQUOTED(XINE_LOCALEDIR, "$XINE_LOCALEPATH",[Path where catalog files will be.])
-fi
-AC_DEFINE_UNQUOTED(XINE_REL_PLUGINDIR,"$XINE_REL_PLUGINDIR",[Define this to specific plugin directory relative to execution prefix])
-AC_DEFINE_UNQUOTED(XINE_REL_PLUGINROOT,"$XINE_REL_PLUGINROOT",[Define this to general plugin directory relative to execution prefix])
-AC_DEFINE_UNQUOTED(XINE_REL_FONTDIR,"$XINE_REL_FONTDIR",[Define this to font directory relative to prefix])
-AC_DEFINE_UNQUOTED(XINE_REL_LOCALEDIR,"$XINE_REL_LOCALEDIR",[Define this to font directory relative to prefix])
+ XINE_PLUGINROOTPATH="`makeexpand "$XINE_PLUGINROOT"`"
+ XINE_FONTPATH="`makeexpand "$XINE_FONTDIR"`"
+ XINE_LOCALEPATH="`makeexpand "$XINE_LOCALEDIR"`"
+ AC_DEFINE_UNQUOTED([XINE_PLUGINROOT],["$XINE_PLUGINROOTPATH"], [Define this to general plugins directory location])
+ AC_DEFINE_UNQUOTED([XINE_PLUGINDIR], ["$XINE_PLUGINROOTPATH.$XINE_LT_AGE"], [Define this to soecific plugins directory location])
+ AC_DEFINE_UNQUOTED([XINE_FONTDIR], ["$XINE_FONTPATH"], [Define this to osd fonts dir location])
+ AC_DEFINE_UNQUOTED([XINE_LOCALEDIR], ["$XINE_LOCALEPATH"], [Path where catalog files will be.])
+fi
+AC_DEFINE_UNQUOTED([XINE_REL_PLUGINDIR], ["$XINE_REL_PLUGINDIR"], [Define this to specific plugin directory relative to execution prefix])
+AC_DEFINE_UNQUOTED([XINE_REL_PLUGINROOT],["$XINE_REL_PLUGINROOT"],[Define this to general plugin directory relative to execution prefix])
+AC_DEFINE_UNQUOTED([XINE_REL_FONTDIR], ["$XINE_REL_FONTDIR"], [Define this to font directory relative to prefix])
+AC_DEFINE_UNQUOTED([XINE_REL_LOCALEDIR], ["$XINE_REL_LOCALEDIR"], [Define this to font directory relative to prefix])
AC_SUBST(XINE_PLUGINDIR)
AC_SUBST(XINE_FONTDIR)
AC_SUBST(XINE_LOCALEDIR)
@@ -2583,8 +1084,10 @@ fi
AC_SUBST([LIBTOOL_DESTDIR_DEFAULT])
dnl Where aclocal m4 files should be installed
+xine_acflags='-I ${datarootdir}/aclocal'
XINE_ACFLAGS="-I ${datarootdir}/aclocal"
-AC_DEFINE_UNQUOTED(XINE_ACFLAGS, "$XINE_ACFLAGS", [Path where aclocal m4 files will be.])
+AC_DEFINE_UNQUOTED([XINE_ACFLAGS], ["$XINE_ACFLAGS"], [Path where aclocal m4 files will be.])
+AC_SUBST(xine_acflags)
AC_SUBST(XINE_ACFLAGS)
dnl Where architecture independent data (e.g. logo) will/should be installed
@@ -2597,62 +1100,6 @@ AC_SUBST(XINE_SCRIPTPATH)
dnl ---------------------------------------------
-dnl Some informations about xine-lib compilation
-dnl ---------------------------------------------
-
-XINE_BUILD_CC="`$CC -v 2>&1 | tail -1 2>/dev/null`"
-XINE_BUILD_OS="`uname -s -r -m`"
-XINE_BUILD_DATE="`date "+%a %d %b %Y %T"`"
-AC_SUBST(XINE_BUILD_CC)
-AC_SUBST(XINE_BUILD_OS)
-AC_SUBST(XINE_BUILD_DATE)
-
-
-dnl ---------------------------------------------
-dnl For win32 libraries location, needed by libw32dll.
-dnl ---------------------------------------------
-
-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"])
-AC_SUBST(w32_path)
-
-AC_ARG_ENABLE([w32dll],
- AS_HELP_STRING([--disable-w32dll], [Disable Win32 DLL support]),
- , [enable_w32dll=$with_gnu_as])
-
-case $host in
- *-mingw* | *-cygwin)
- enable_w32dll="no" ;;
- i?86-* | k?-* | athlon-* | pentium*-)
- if test "x$enable_w32dll" != "xno"; then
- CC_PROG_AS
- fi
- test "x$enable_w32dll" = "x" && \
- enable_w32dll="$with_gnu_as"
- ;;
- *)
- enable_w32dll="no" ;;
-esac
-
-if test "x$enable_w32dll" = "xyes" && \
- test "x$with_gnu_as" = "xno"; then
-
- AC_MSG_ERROR([You need GNU as to enable Win32 codecs support])
-fi
-
-AM_CONDITIONAL(HAVE_W32DLL, test "x$enable_w32dll" != "xno")
-
-
-dnl ---------------------------------------------
-dnl some include paths ( !!! DO NOT REMOVE !!! )
-dnl ---------------------------------------------
-
-INCLUDES='-I$(top_srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src/xine-engine -I$(top_srcdir)/src/xine-engine -I$(top_srcdir)/src/xine-utils $(INTLDIR) -I$(top_builddir)/src/input -I$(top_srcdir)/src/input $(WIN32_CPPFLAGS) -I$(top_builddir)/lib -I$(top_srcdir)/lib'
-AC_SUBST(INCLUDES)
-
-
-dnl ---------------------------------------------
dnl Get where .m4 should be installed.
dnl ---------------------------------------------
@@ -2673,50 +1120,21 @@ dnl ;;
dnl esac
dnl fi
AC_SUBST(ACLOCAL_DIR)
-AM_CONDITIONAL([INSTALL_M4],[test "x$ACLOCAL_DIR" != "x"])
-
+AM_CONDITIONAL([INSTALL_M4], [test x"$ACLOCAL_DIR" != x""])
-dnl ---------------------------------------------
-dnl It seems automake 1.5 don't take care about this script
-dnl ---------------------------------------------
-
-if test ! -z "$am_depcomp"; then
- DEPCOMP="depcomp"
-fi
-AC_SUBST(DEPCOMP)
-
-
-dnl ---------------------------------------------
-dnl Check for documentation formatting tool
-dnl ---------------------------------------------
-
-AC_CHECK_PROG(SGMLTOOLS, sgmltools, sgmltools, no)
-AM_CONDITIONAL([HAVE_SGMLTOOLS], [test "$SGMLTOOLS" != "no"])
-
-AC_CHECK_PROG(FIG2DEV, fig2dev, fig2dev, no)
-AM_CONDITIONAL([HAVE_FIG2DEV], [test "$FIG2DEV" != "no"])
-
-dnl ---------------------------------------------
-dnl Newest automake workaround
-dnl ---------------------------------------------
-
-AC_SUBST(mkdir_p)
-if test -n "$ac_aux_dir"; then
- case "$ac_aux_dir" in
- /*) MKINSTALLDIRS="$ac_aux_dir/install-sh -d" ;;
- *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/install-sh -d" ;;
- esac
-else
- MKINSTALLDIRS="\$(top_srcdir)/install-sh -d"
-fi
-AC_SUBST(MKINSTALLDIRS)
dnl this is an internal function we should not use, but
dnl as long as neither autoconf nor automake offer an A[CM]_PROG_OBJC
dnl check we will have to call it
_AM_DEPENDENCIES([OBJC])
-AM_CONDITIONAL([BUILD_DMX_IMAGE], [test "x$have_imagemagick" = "xyes" -o "x$no_gdkpixbuf" != "xyes"])
+
+dnl ---------------------------------------------
+dnl some include paths ( !!! DO NOT REMOVE !!! )
+dnl ---------------------------------------------
+
+INCLUDES='-I$(top_srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_builddir)/src/xine-engine -I$(top_srcdir)/src/xine-engine -I$(top_srcdir)/src/xine-utils $(INTLDIR) -I$(top_builddir)/src/input -I$(top_srcdir)/src/input $(WIN32_INCLUDES) -I$(top_builddir)/lib -I$(top_srcdir)/lib'
+AC_SUBST(INCLUDES)
dnl We check for warnings here rather than with optimisations since we
dnl want them to be _always_ enabled, to make sure the code is sane
@@ -2760,16 +1178,36 @@ AH_BOTTOM([
#endif
])
-
dnl Common cflags for all platforms
-CFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE \$(MULTIPASS_CFLAGS) $CFLAGS"
-DEBUG_CFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE $DEBUG_CFLAGS"
+CFLAGS="$UNIVERSAL_CFLAGS \$(MULTIPASS_CFLAGS) $miscflags $warnflags $CFLAGS"
+LDFLAGS="$UNIVERSAL_LDFLAGS $LDFLAGS"
+OBJCFLAGS="$UNIVERSAL_CFLAGS $miscflags $warnflags $OBJCFLAGS"
-if test "x$enable_debug" = "xyes"; then
- CFLAGS="$CFLAGS -DDEBUG"
-else
- CFLAGS="$CFLAGS -DNDEBUG"
-fi
+dnl Some informations about xine-lib compilation for xine-config
+XINE_BUILD_CC="`$CC -v 2>&1 | tail -1 2>/dev/null`"
+XINE_BUILD_OS="`uname -s -r -m`"
+XINE_BUILD_DATE="`date "+%a %d %b %Y %T"`"
+AC_SUBST(XINE_BUILD_CC)
+AC_SUBST(XINE_BUILD_OS)
+AC_SUBST(XINE_BUILD_DATE)
+
+
+dnl ---------------------------------------------
+dnl Check for documentation formatting tool
+dnl ---------------------------------------------
+
+AC_CHECK_PROG(XMLTO, xmlto, xmlto, no)
+AM_CONDITIONAL([HAVE_XMLTO], [test "$XMLTO" != "no"])
+
+AC_CHECK_PROG(RSVG, rsvg, rsvg, no)
+AM_CONDITIONAL([HAVE_RSVG], [test "$RSVG" != "no"])
+
+dnl ---------------------------------------------
+dnl ... and for PNG optimisation tool
+dnl ---------------------------------------------
+
+AC_CHECK_PROG(OPTIPNG, optipng, optipng, no)
+AM_CONDITIONAL([HAVE_OPTIPNG], [test "$OPTIPNG" != "no"])
dnl ---------------------------------------------
dnl Output configuration files
@@ -2782,15 +1220,31 @@ doc/man/Makefile
doc/man/en/Makefile
doc/hackersguide/Makefile
doc/faq/Makefile
+doc/Doxyfile
+contrib/Makefile
+contrib/a52dec/Makefile
+contrib/gsm610/Makefile
+contrib/libdca/Makefile
+contrib/libdha/Makefile
+contrib/libdha/bin/Makefile
+contrib/libdha/kernelhelper/Makefile
+contrib/libdha/oth/Makefile
+contrib/libdha/sysdep/Makefile
+contrib/libfaad/Makefile
+contrib/libmad/Makefile
+contrib/libmpcdec/Makefile
+contrib/libxdg-basedir/Makefile
+contrib/nosefart/Makefile
+contrib/vidix/Makefile
+contrib/vidix/drivers/Makefile
include/Makefile
-include/xine.h
+include/xine/version.h
lib/Makefile
m4/Makefile
misc/Makefile
misc/Makefile.plugins
misc/SlackBuild
misc/build_rpms.sh
-misc/fonts/Makefile
misc/libxine.pc
misc/relchk.sh
misc/xine-config
@@ -2799,59 +1253,22 @@ po/Makevars.extra
po/Makefile.in
src/Makefile
src/audio_out/Makefile
+src/audio_dec/Makefile
src/combined/Makefile
src/combined/ffmpeg/Makefile
src/demuxers/Makefile
src/dxr3/Makefile
src/input/Makefile
src/input/libdvdnav/Makefile
-src/input/dvb/Makefile
src/input/librtsp/Makefile
src/input/libreal/Makefile
src/input/vcd/Makefile
-src/input/vcd/libcdio/Makefile
-src/input/vcd/libcdio/cdio/Makefile
-src/input/vcd/libcdio/MSWindows/Makefile
-src/input/vcd/libcdio/image/Makefile
-src/input/vcd/libvcd/Makefile
-src/input/vcd/libvcd/libvcd/Makefile
-src/liba52/Makefile
-src/libdts/Makefile
-src/libfaad/Makefile
-src/libfaad/codebook/Makefile
-src/libffmpeg/Makefile
-src/libffmpeg/libavcodec/Makefile
-src/libffmpeg/libavcodec/armv4l/Makefile
-src/libffmpeg/libavcodec/i386/Makefile
-src/libffmpeg/libavcodec/mlib/Makefile
-src/libffmpeg/libavcodec/alpha/Makefile
-src/libffmpeg/libavcodec/ppc/Makefile
-src/libffmpeg/libavcodec/sparc/Makefile
-src/libffmpeg/libavcodec/libpostproc/Makefile
-src/libffmpeg/libavutil/Makefile
-src/libmad/Makefile
-src/libmpeg2/Makefile
-src/libmpeg2new/Makefile
-src/libmpeg2new/libmpeg2/Makefile
-src/libmpeg2new/include/Makefile
-src/libmusepack/Makefile
-src/libmusepack/musepack/Makefile
-src/libspudec/Makefile
-src/libspucc/Makefile
-src/libspucmml/Makefile
-src/libspudvb/Makefile
-src/libspuhdmv/Makefile
-src/libsputext/Makefile
src/libw32dll/Makefile
src/libw32dll/wine/Makefile
src/libw32dll/DirectShow/Makefile
src/libw32dll/dmo/Makefile
src/libw32dll/qtx/Makefile
src/libw32dll/qtx/qtxsdk/Makefile
-src/libxinevdec/Makefile
-src/libxineadec/Makefile
-src/libxineadec/gsm610/Makefile
-src/libxineadec/nosefart/Makefile
src/libreal/Makefile
src/post/Makefile
src/post/planar/Makefile
@@ -2861,19 +1278,19 @@ src/post/visualizations/Makefile
src/post/audio/Makefile
src/post/deinterlace/Makefile
src/post/deinterlace/plugins/Makefile
+src/spu_dec/Makefile
+src/video_dec/Makefile
+src/video_dec/libmpeg2/Makefile
+src/video_dec/libmpeg2new/Makefile
+src/video_dec/libmpeg2new/include/Makefile
+src/video_dec/libmpeg2new/libmpeg2/Makefile
+src/video_dec/libvdpau/Makefile
src/video_out/Makefile
-src/video_out/libdha/Makefile
-src/video_out/libdha/bin/Makefile
-src/video_out/libdha/kernelhelper/Makefile
-src/video_out/libdha/oth/Makefile
-src/video_out/libdha/sysdep/Makefile
src/video_out/macosx/Makefile
-src/video_out/vidix/Makefile
-src/video_out/vidix/drivers/Makefile
src/xine-utils/Makefile
src/xine-engine/Makefile
-win32/Makefile
-win32/include/Makefile])
+src/vdr/Makefile
+win32/Makefile])
AC_CONFIG_COMMANDS([default],[[chmod +x ./misc/SlackBuild ./misc/build_rpms.sh ./misc/relchk.sh]],[[]])
AC_OUTPUT
@@ -2904,7 +1321,11 @@ dnl It disables multi-pass compilation of xine-list.
dnl ---------------------------------------------
dnl Note: Brackets [] must be doubled as they are treated as m4 macro quotes.
-cat libtool | sed -e '/sys_lib_search_path_spec=/s/\/\([[ "]]\)/\1/g' > libtool.tmp
+if test x"$enable_macosx_universal" = x"no"; then
+ cat libtool | sed -e '/sys_lib_search_path_spec=/s/\/\([[ "]]\)/\1/g' > libtool.tmp
+else
+ cat libtool | sed -e 's,sys_lib_search_path_spec=.*$,sys_lib_search_path_spec=\"/Developer/SDKs/MacOSX10.4u.sdk/usr/lib\",' > libtool.tmp
+fi
mv -f libtool.tmp libtool
dnl removing make-specific variable
@@ -2913,486 +1334,4 @@ mv -f libtool.tmp libtool
chmod +x libtool
-dnl ---------------------------------------------
-dnl Libtool flag for Windows:
-dnl
-dnl The "-no-undefined" flag must be added after all other
-dnl configure checks, because it is only for libtool and
-dnl must not be passed to GCC by accident.
-dnl ---------------------------------------------
-case "$host_os" in
- mingw* | cygwin*)
- LDFLAGS="-no-undefined $LDFLAGS"
- ;;
-esac
-
-dnl ---------------------------------------------
-dnl Some infos:
-dnl ---------------------------------------------
-
-echo "xine-lib summary:"
-echo "----------------"
-
-dnl Input
-echo " * input plugins:"
-echo " - file - net"
-echo " - stdin_fifo - rtp"
-echo " - http - mms"
-echo " - pnm - rtsp"
-if test "$have_supported_dvb" = yes; then
- echo " - dvb"
-fi
-if test "x$external_dvdnav" = "xyes"; then
- echo " - dvd (external libs)"
-else
- echo " - dvd (internal libs)"
-fi
-if test "x$have_cdrom_ioctls" = "xyes"; then
- if test "x$enable_vcd" = "xyes"; then
- if test "x$internal_vcdnav" = "xno"; then
- echo " - vcd (external libs)"
- else
- echo " - vcd (internal libs)"
- fi
- fi
- echo " - vcdo"
- echo " - cdda"
-fi
-if test "x$no_gnome_vfs" = "xno"; then
- echo " - gnome-vfs"
-fi
-if test "x$have_v4l" = "xyes"; then
- echo " - v4l"
-fi
-if test "x$have_v4l2" = "xyes"; then
- echo " - v4l2"
-fi
-if test "x$have_libsmbclient" = "xyes"; then
- echo " - smbclient"
-fi
-if test "x$have_libbluray" = x"yes"; then
- echo " - bluray"
-fi
-echo ""
-
-dnl Demuxers
-echo " * demultiplexer plugins:"
-echo " - avi - mpeg"
-echo " - mpeg_block - mpeg_audio"
-echo " - mpeg_elem - mpeg_pes"
-echo " - mpeg_ts - qt/mpeg-4"
-echo " - film - roq"
-echo " - fli - smjpeg"
-echo " - idcin - wav"
-echo " - wc3 mve - voc"
-echo " - vqa - aiff"
-echo " - cdda - snd/au"
-echo " - yuv4mpeg2 - real/realaudio"
-echo " - ea wve - raw dv"
-echo " - interplay mve - psx str"
-echo " - ws aud - pva"
-echo " - vox"
-echo " - nsv - 4xm"
-echo " - FLAC - aac"
-echo " - iff - matroska"
-echo " - vmd - flv"
-if test "x$enable_asf" = "xyes"; then
- echo " - asf"
-fi
-if test "x$enable_nosefart" != "xno"; then
- echo " - nsf"
-fi
-if test "x$have_vorbis" = "xyes"; then
- echo " - ogg"
-fi
-if test "x$have_libmng" = "xyes"; then
- echo " - mng"
-fi
-if test "x$enable_modplug" != x"no"; then
- echo " - mod"
-fi
-if test "x$have_libflac" = "xyes"; then
- echo " - FLAC (with libFLAC)"
-fi
-if test "x$have_wavpack" = "xyes"; then
- echo " - WavPack"
-fi
-if test "x$enable_a52dec" = "xyes"; then
- if test "x$have_a52" = "xyes"; then
- echo " - ac3 (external library)"
- else
- echo " - ac3 (internal library)"
- fi
-fi
-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" = "xyes"; 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" = "xyes"; then
- echo " - dxr3_video"
-fi
-if test "x$enable_w32dll" = "xyes"; then
- echo " - w32dll"
-fi
-if test "x$have_imagemagick" = "xyes"; then
- echo " - image"
-fi
-if test x"no_gdkpixbuf" != "xyes"; then
- echo " - gdk-pixbuf"
-fi
-if test "x$have_theora" = "xyes"; then
- echo " - theora"
-fi
-echo ""
-
-dnl audio decoders
-echo " * audio decoder plugins:"
-echo " - GSM 06.10 - linear PCM"
-if test "x$with_external_ffmpeg" = "xyes"; then
- echo " - ffmpeg (external library):"
- echo " - Windows Media Audio v1/v2/Pro"
-else
- echo " - ffmpeg (internal library):"
- echo " - Windows Media Audio v1/v2"
-fi
-echo " - Windows Media Audio v1/v2/Pro"
-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"
-echo " - E-AC-3"
-echo " - AAC LATM"
-if test "x$enable_nosefart" != "xno"; then
- echo " - Nosefart (NSF)"
-fi
-if test "x$have_libflac" = "xyes"; then
- echo " - FLAC (with libFLAC)"
-fi
-if test "x$have_vorbis" = "xyes"; then
- echo " - vorbis"
-fi
-if test "x$have_speex" = "xyes"; then
- echo " - speex"
-fi
-if test "x$enable_w32dll" = "xyes"; then
- echo " - w32dll"
-fi
-if test "x$enable_faad" = "xyes"; then
- echo " - faad"
-fi
-if test "x$enable_libmad" = "xyes"; then
- if test "x$have_mad" = "xyes"; 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" = "xyes"; then
- if test "x$have_dts" = "xyes"; then
- echo " - DTS (external library)"
- else
- echo " - DTS (internal library)"
- fi
-fi
-if test "x$enable_a52dec" = "xyes"; then
- if test "x$have_a52" = "xyes"; then
- echo " - A52/ra-dnet (external library)"
- else
- echo " - A52/ra-dnet (internal library)"
- fi
-fi
-if test "x$enable_musepack" != "xno"; then
- if test "x$have_mpcdec" = "xyes"; then
- echo " - MusePack (external library)"
- else
- echo " - MusePack (internal library)"
- fi
-fi
-if test "x$have_wavpack" = "xyes"; then
- echo " - WavPack"
-fi
-echo ""
-
-dnl spu decoders
-echo " * subtitle decoder plugins:"
-echo " - spu - spucc"
-echo " - spucmml - sputext"
-echo " - spudvb"
-if test "x$have_dxr3" = "xyes"; then
- echo " - dxr3_spu"
-fi
-echo ""
-
-dnl post plugins
-echo " * post effect plugins:"
-echo " * planar video effects:"
-echo " - invert - expand"
-echo " - eq - eq2"
-echo " - boxblur - denoise3d"
-echo " - unsharp - tvtime"
-echo " * SFX:"
-echo " - goom - oscope"
-echo " - fftscope - mosaico"
-echo ""
-
-dnl Video plugins
-echo " * video driver plugins:"
-if test "x$no_x" != "xyes"; then
- echo " - XShm (X11 shared memory)"
- dnl synfb
- if test "x$enable_syncfb" != "xno"; then
- echo " - SyncFB (for Matrox G200/G400 cards)"
- fi
- dnl Xv
- if test "x$ac_have_xv" = "xyes"; then
- if test "x$ac_have_xv_static" = "xyes"; then
- echo " - Xv (XVideo *static*)"
- else
- echo " - Xv (XVideo *shared*)"
- fi
- fi
- dnl XxMC
- if test "x$ac_have_xxmc" = "xyes"; then
- if test "x$ac_have_vldxvmc_h" = "xyes"; then
- echo " - XxMC (XVideo extended motion compensation)"
- else
- echo " - XxMC (XVideo motion compensation - vld extensions DISABLED)"
- fi
- fi
- dnl XvMC
- if test "x$ac_have_xvmc" = "xyes"; then
- echo " - XvMC (XVideo motion compensation)"
- fi
- if test "x$ac_have_opengl" = "xyes" -a "x$ac_have_glut" = "xyes" -o \
- "x$ac_have_opengl" = "xyes" -a "x$ac_have_glu" = "xyes"; then
- echo " - OpenGL"
- fi
- if test "x$ac_have_sunfb" = "xyes"; then
- if test "x$ac_have_sundga" = "xyes"; then
- echo " - PGX64 (for Sun XVR100/PGX64/PGX24 cards)"
- echo " - PGX32 (for Sun PGX32 cards)"
- fi
- fi
-fi
-if test "x$have_xcb" = "xyes"; then
- dnl xcb-shm
- if test "x$have_xcbshm" = "xyes"; then
- echo " - xcb-shm (X shared memory using XCB)"
- fi
- dnl xcb-xv
- if test "x$have_xcbxv" = "xyes"; then
- echo " - xcb-xv (XVideo using XCB)"
- fi
-fi
-if test "x$no_aalib" != "xyes"; then
- echo " - aa (Ascii ART)"
-fi
-if test "x$have_caca" = "xyes"; then
- echo " - caca (Color AsCii Art)"
-fi
-if test "x$have_fb" = "xyes"; then
- echo " - fb (Linux framebuffer device)"
-fi
-if test "x$have_sdl" = "xyes"; then
- echo " - sdl (Simple DirectMedia Layer)"
-fi
-if test "x$have_libstk" = "xyes"; then
- echo " - stk (Libstk Set-top Toolkit)"
-fi
-if test "x$have_directfb" = "xyes"; then
- echo " - directfb (DirectFB driver)"
-fi
-if test "x$have_dxr3" = "xyes"; then
- if test "x$have_encoder" = "xyes"; then
- echo " - dxr3 (Hollywood+ and Creative dxr3, both mpeg and non-mpeg video)"
- else
- echo " - dxr3 (Hollywood+ and Creative dxr3, mpeg video only)"
- fi
-fi
-if test "x$enable_vidix" = "xyes"; then
- echo $ECHO_N " - vidix ("
-
- if test "x$no_x" != "xyes"; then
- echo $ECHO_N "X11"
- if test "x$have_fb" = "xyes"; then
- echo $ECHO_N " and "
- fi
- fi
-
- if test "x$have_fb" = "xyes"; then
- echo $ECHO_N "framebuffer"
- fi
-
- echo $ECHO_N " support"
-
- if test "x$enable_dha_kmod" = "xyes"; then
- echo " with dhahelper)"
- else
- echo ")"
- fi
-fi
-if test "x$have_directx" = "xyes"; then
- echo " - directx (DirectX video driver)"
-fi
-if test "x$have_macosx_video" = "xyes"; then
- echo " - Mac OS X OpenGL"
-fi
-
-echo ""
-
-dnl Audio plugins
-echo " * audio driver plugins:"
-if test "x$have_ossaudio" = "xyes"; then
- echo " - oss (Open Sound System)"
-fi
-if test "x$have_alsa" = "xyes"; then
- echo " - alsa"
-fi
-if test "x$have_esound" = "xyes"; then
- echo " - esd (Enlightened Sound Daemon)"
-fi
-if test "x$no_arts" != "xyes"; then
- echo " - arts (aRts - KDE soundserver)"
-fi
-if test "x$no_fusionsound" != "xyes"; then
- echo " - fusionsound (FusionSound driver)"
-fi
-if test "x$have_sunaudio" = "xyes"; then
- echo " - sun ()"
-fi
-if test "x$am_cv_have_irixal" = xyes; then
- echo " - irixal (Irix audio library)"
-fi
-if test "x$have_directx" = "xyes"; then
- echo " - directx (DirectX audio driver)"
-fi
-if test "x$have_coreaudio" = "xyes"; then
- echo " - CoreAudio (Mac OS X audio driver)"
-fi
-if test "x$have_pulseaudio" = "xyes"; then
- echo " - pulseaudio sound server"
-fi
-if test "x$have_jack" = "xyes"; then
- echo " - Jack"
-fi
-if test "x$have_sndio" = "xyes"; then
- echo " - sndio"
-fi
-echo "---"
-
-
-dnl ---------------------------------------------
-dnl some user warnings
-dnl ---------------------------------------------
-
-dnl some levels of variable expansion to get final install paths
-final_libdir="`eval eval eval eval echo $libdir`"
-final_bindir="`eval eval eval eval echo $bindir`"
-
-if test -r /etc/ld.so.conf && ! grep -x "$final_libdir" /etc/ld.so.conf >/dev/null ; then
- if test "$final_libdir" != "/lib" -a "$final_libdir" != "/usr/lib" ; then
- if ! echo "$LD_LIBRARY_PATH" | egrep "(:|^)$final_libdir(/?:|/?$)" >/dev/null ; then
- echo
- echo "****************************************************************"
- echo "xine-lib will be installed to $final_libdir"
- echo
- echo "This path is not mentioned among the linker search paths in your"
- echo "/etc/ld.so.conf. This means it is possible that xine-lib will"
- echo "not be found when you try to compile or run a program using it."
- echo "If this happens, you should add $final_libdir to"
- echo "the environment variable LD_LIBRARY_PATH like that:"
- echo
- echo "export LD_LIBRARY_PATH=$final_libdir:\$LD_LIBRARY_PATH"
- echo
- echo "Alternatively you can add a line \"$final_libdir\""
- echo "to your /etc/ld.so.conf."
- echo "****************************************************************"
- echo
- fi
- fi
-fi
-
-if ! echo "$PATH" | egrep "(:|^)$final_bindir(/?:|/?$)" >/dev/null ; then
- echo
- echo "****************************************************************"
- echo "xine-config will be installed to $final_bindir"
- echo
- echo "This path is not in your search path. This means it is possible"
- echo "that xine-config will not be found when you try to compile a"
- echo "program using xine-lib. This will result in build failures."
- echo "If this happens, you should add $final_bindir to"
- echo "the environment variable PATH like that:"
- echo
- echo "export PATH=$final_bindir:\$PATH"
- echo
- echo "Note that this is only needed for compilation. It is not needed"
- echo "to have xine-config in your search path at runtime. (Although"
- echo "it will not cause any harm either.)"
- echo "****************************************************************"
- echo
-fi
-
-dnl warn if no X11 plugins will be built
-if test "x$no_x" = "xyes"; then
- case $host in
- *mingw*|*-cygwin) ;;
- *-darwin*) ;;
- *)
- echo
- echo "****************************************************************"
- echo "WARNING! No X11 output plugins will be built."
- echo
- echo "For some reason, the requirements for building the X11 video"
- echo "output plugins are not met. That means, that you will NOT be"
- echo "able to use the resulting xine-lib to watch videos in a window"
- echo "on any X11-based display (e.g. your desktop)."
- echo
- echo "If this is not what you want, provide the necessary X11 build"
- echo "dependencies (usually done by installing a package called"
- echo "XFree86-devel or similar) and run configure again."
- echo "****************************************************************"
- echo
- ;;
- esac
-fi
-
-dnl warn if internal ffmpeg is being used
-if test "x$with_external_ffmpeg" = "xno"; then
- AC_MSG_NOTICE([
-*********************************************************************
-xine-lib is configured to use internal ffmpeg.
-
-This copy of ffmpeg is old and has known security problems.
-Don't use it. We don't want you to. We only care that xine-lib is
-compilable with it; beyond that, you're completely on your own.
-
-You are STRONGLY advised to install a newer version (including
-development files) and to reconfigure xine-lib to use it.
-*********************************************************************])
-fi
+XINE_LIB_SUMMARY