summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/Makefile.am1
-rw-r--r--m4/_xine.m4536
-rw-r--r--m4/aa.m4272
-rw-r--r--m4/arts.m4168
-rw-r--r--m4/audio_out.m4220
-rw-r--r--m4/decoders.m4520
-rw-r--r--m4/directx.m494
-rw-r--r--m4/dl.m453
-rw-r--r--m4/dvdnav.m4194
-rw-r--r--m4/gas.m4197
-rw-r--r--m4/glibc2.m430
-rw-r--r--m4/glibc21.m430
-rw-r--r--m4/input.m4177
-rw-r--r--m4/intdiv0.m484
-rw-r--r--m4/inttypes.m425
-rw-r--r--m4/ioctl_request.m452
-rw-r--r--m4/irixal.m419
-rw-r--r--m4/isc-posix.m424
-rw-r--r--m4/lcmessage.m430
-rw-r--r--m4/lib-ld.m4110
-rw-r--r--m4/libFLAC.m427
-rw-r--r--m4/libfame.m4183
-rw-r--r--m4/macosx.m443
-rw-r--r--m4/objc.m4253
-rw-r--r--m4/opengl.m474
-rw-r--r--m4/optimizations.m4244
-rw-r--r--m4/package.m472
-rw-r--r--m4/pkg.m46
-rw-r--r--m4/printf-posix.m444
-rw-r--r--m4/programs.m4124
-rw-r--r--m4/progtest.m492
-rw-r--r--m4/signed.m417
-rw-r--r--m4/summary.m4361
-rw-r--r--m4/types.m4245
-rw-r--r--m4/uintmax_t.m430
-rw-r--r--m4/video_out.m4490
-rw-r--r--m4/wchar_t.m420
-rw-r--r--m4/wint_t.m428
-rw-r--r--m4/xine.m4285
-rw-r--r--m4/xsize.m413
-rw-r--r--m4/xv.m493
41 files changed, 2771 insertions, 2809 deletions
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 0149ed648..e5edd1836 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -1,3 +1,4 @@
+include $(top_srcdir)/misc/Makefile.quiet
include $(top_srcdir)/misc/Makefile.common
if INSTALL_M4
diff --git a/m4/_xine.m4 b/m4/_xine.m4
deleted file mode 100644
index 70bbe5d8f..000000000
--- a/m4/_xine.m4
+++ /dev/null
@@ -1,536 +0,0 @@
-dnl AC_C_ALWAYS_INLINE
-dnl Define inline to something appropriate, including the new always_inline
-dnl attribute from gcc 3.1
-dnl Thanks to Michel LESPINASSE <walken@zoy.org>
-dnl __inline__ "check" added by Darren Salt
-AC_DEFUN([AC_C_ALWAYS_INLINE],
- [AC_C_INLINE
- if test x"$GCC" = x"yes" -a x"$ac_cv_c_inline" = x"inline"; then
- AC_MSG_CHECKING([for always_inline])
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wall -Werror"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[inline __attribute__ ((__always_inline__)) void f (void);]])],
- [ac_cv_always_inline=yes],[ac_cv_always_inline=no])
- CFLAGS="$SAVE_CFLAGS"
- AC_MSG_RESULT([$ac_cv_always_inline])
- if test x"$ac_cv_always_inline" = x"yes"; then
- AH_TOP([
-#ifdef inline
-/* the strange formatting below is needed to prevent config.status from rewriting it */
-# undef \
- inline
-#endif
- ])
- AC_DEFINE_UNQUOTED([inline],[inline __attribute__ ((__always_inline__))])
- fi
- ac_cv_c___inline__=''
- else
- # FIXME: test the compiler to see if it supports __inline__
- # instead of assuming that if it isn't gcc, it doesn't
- case "$ac_cv_c_inline" in
- yes)
- ac_cv_c___inline__=inline
- ;;
- inline|__inline__)
- ac_cv_c___inline__=''
- ;;
- *)
- ac_cv_c___inline__="$ac_cv_c_inline"
- ;;
- esac
- fi
- if test x"$ac_cv_c___inline__" != x; then
- AC_DEFINE_UNQUOTED([__inline__],[$ac_cv_c___inline__],[Define if the compiler doesn't recognise __inline__])
- fi
-])
-
-dnl
-dnl Check for minimum version of libtool
-dnl AC_PREREQ_LIBTOOL([MINIMUM VERSION],[ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]])
-AC_DEFUN([AC_PREREQ_LIBTOOL],
- [
- lt_min_full=ifelse([$1], ,1.3.5,$1)
- lt_min=`echo $lt_min_full | sed -e 's/\.//g'`
- AC_MSG_CHECKING(for libtool >= $lt_min_full)
- lt_version="`grep '^VERSION' $srcdir/ltmain.sh | sed -e 's/VERSION\=//g;s/[[-.a-zA-Z]]//g'`"
-
- if test $lt_version -lt 100 ; then
- lt_version=`expr $lt_version \* 10`
- fi
-
- if test $lt_version -lt $lt_min ; then
- AC_MSG_RESULT(no)
- ifelse([$3], , :, [$3])
- fi
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- ])
-
-dnl
-AC_DEFUN([AC_CHECK_LIRC],
- [AC_ARG_ENABLE(lirc,
- AS_HELP_STRING([--disable-lirc], [turn off LIRC support]),
- enable_lirc=$enableval, enable_lirc=yes)
-
- if test x"$enable_lirc" = xyes; then
- have_lirc=yes
- AC_REQUIRE_CPP
- AC_CHECK_LIB(lirc_client,lirc_init,
- AC_CHECK_HEADER(lirc/lirc_client.h, true, have_lirc=no), have_lirc=no)
- if test "$have_lirc" = "yes"; then
-
- if test x"$LIRC_PREFIX" != "x"; then
- lirc_libprefix="$LIRC_PREFIX/lib"
- LIRC_INCLUDE="-I$LIRC_PREFIX/include"
- fi
- for llirc in $lirc_libprefix /lib /usr/lib /usr/local/lib; do
- AC_CHECK_FILE("$llirc/liblirc_client.a",
- LIRC_LIBS="$llirc/liblirc_client.a"
- AC_DEFINE(HAVE_LIRC),,)
- done
- else
- AC_MSG_RESULT([*** LIRC client support not available, LIRC support will be disabled ***]);
- fi
- fi
-
- AC_SUBST(LIRC_LIBS)
- AC_SUBST(LIRC_INCLUDE)
-])
-
-
-dnl AC_LINUX_PATH(DEFAULT PATH)
-AC_DEFUN([AC_LINUX_PATH],
- [AC_ARG_WITH(linux-path,
- AS_HELP_STRING([--with-linux-path=PATH], [where the linux sources are located]),
- linux_path="$withval", linux_path="$1")
- LINUX_INCLUDE="-I$linux_path/include"
-])
-
-dnl AC_CHECK_DXR3()
-AC_DEFUN([AC_CHECK_DXR3],
-[
- AC_ARG_ENABLE(dxr3,
- AS_HELP_STRING([--disable-dxr3], [do not build the DXR3/HW+ plugins]),
- enable_dxr3=$enableval, enable_dxr3=yes)
- if test x"$enable_dxr3" = xyes; then
- have_dxr3=yes
- AC_MSG_RESULT([*** checking for a supported mpeg encoder])
- have_encoder=no
- have_libfame=yes
- AC_CHECK_LIB(fame, fame_open,
- [AC_CHECK_HEADER(fame.h, true, have_libfame=no)], have_libfame=no)
- if test "$have_libfame" = "yes"; then
- AC_DEFINE(HAVE_LIBFAME)
- have_encoder=yes
- fi
- have_librte=yes
- AC_CHECK_LIB(rte, rte_init,
- [AC_CHECK_HEADER(rte.h, true, have_librte=no)], have_librte=no)
- if test "$have_librte" = "yes"; then
- AC_DEFINE(HAVE_LIBRTE)
- AC_MSG_WARN([this will probably only work with rte version 0.4!])
- have_encoder=yes
- fi
- if test "$have_encoder" = "yes"; then
- AC_MSG_RESULT([*** found one or more external mpeg encoders]);
- else
- AC_MSG_RESULT([*** no external mpeg encoder found]);
- fi
- else
- AC_MSG_RESULT([DXR3 plugins will not be built.])
- have_dxr3=no
- fi
-])
-
-dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY)
-dnl generate a default inttypes.h if the header file does not exist already
-AC_DEFUN([AC_CHECK_GENERATE_INTTYPES],
- [AC_CHECK_HEADER([inttypes.h],,
- [if test ! -d $1; then mkdir $1; fi
- AC_CHECK_HEADER([stdint.h],
- [cat >$1/inttypes.h << EOF
-#ifndef _INTTYPES_H
-#define _INTTYPES_H
-/* helper inttypes.h for people who do not have it on their system */
-
-#include <stdint.h>
-EOF
- ],
- [AC_COMPILE_CHECK_SIZEOF([char],[1])
- AC_COMPILE_CHECK_SIZEOF([short],[2])
- AC_COMPILE_CHECK_SIZEOF([int],[4])
- AC_COMPILE_CHECK_SIZEOF([long long],[8])
- cat >$1/inttypes.h << EOF
-#ifndef _INTTYPES_H
-#define _INTTYPES_H
-/* default inttypes.h for people who do not have it on their system */
-#if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
-#define __int8_t_defined
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed int int32_t;
-#ifdef ARCH_X86
-typedef signed long long int64_t;
-#endif
-#endif
-#if (!defined __uint8_t_defined) && (!defined _LINUX_TYPES_H)
-#define __uint8_t_defined
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-#ifdef ARCH_X86
-typedef unsigned long long uint64_t;
-#endif
-#endif
-EOF
- ])
- cat >>$1/inttypes.h << EOF
-
-#ifdef WIN32
-# define PRI64_PREFIX "I64"
-#else
-# define PRI64_PREFIX "l"
-#endif
-
-#ifndef PRId8
-# define PRId8 "d"
-#endif
-#ifndef PRId16
-# define PRId16 "d"
-#endif
-#ifndef PRId32
-# define PRId32 "d"
-#endif
-#ifndef PRId64
-# define PRId64 PRI64_PREFIX "d"
-#endif
-
-#ifndef PRIu8
-# define PRIu8 "u"
-#endif
-#ifndef PRIu16
-# define PRIu16 "u"
-#endif
-#ifndef PRIu32
-# define PRIu32 "u"
-#endif
-#ifndef PRIu64
-# define PRIu64 PRI64_PREFIX "u"
-#endif
-
-#ifndef PRIx8
-# define PRIx8 "x"
-#endif
-#ifndef PRIx16
-# define PRIx16 "x"
-#endif
-#ifndef PRIx32
-# define PRIx32 "x"
-#endif
-#ifndef PRIx64
-# define PRIx64 PRI64_PREFIX "x"
-#endif
-
-#ifndef PRIX8
-# define PRIX8 "X"
-#endif
-#ifndef PRIX16
-# define PRIX16 "X"
-#endif
-#ifndef PRIX32
-# define PRIX32 "X"
-#endif
-#ifndef PRIX64
-# define PRIX64 PRI64_PREFIX "X"
-#endif
-
-#ifndef PRIdFAST8
-# define PRIdFAST8 "d"
-#endif
-#ifndef PRIdFAST16
-# define PRIdFAST16 "d"
-#endif
-#ifndef PRIdFAST32
-# define PRIdFAST32 "d"
-#endif
-#ifndef PRIdFAST64
-# define PRIdFAST64 "d"
-#endif
-
-#ifndef PRIuFAST8
-# define PRIuFAST8 "u"
-#endif
-#ifndef PRIuFAST16
-# define PRIuFAST16 "u"
-#endif
-#ifndef PRIuFAST32
-# define PRIuFAST32 "u"
-#endif
-#ifndef PRIuFAST64
-# define PRIuFAST64 PRI64_PREFIX "u"
-#endif
-
-#ifndef PRIxFAST8
-# define PRIxFAST8 "x"
-#endif
-#ifndef PRIxFAST16
-# define PRIxFAST16 "x"
-#endif
-#ifndef PRIxFAST32
-# define PRIxFAST32 "x"
-#endif
-#ifndef PRIxFAST64
-# define PRIxFAST64 PRI64_PREFIX "x"
-#endif
-
-#ifndef SCNd8
-# define SCNd8 "hhd"
-#endif
-#ifndef SCNd16
-# define SCNd16 "hd"
-#endif
-#ifndef SCNd32
-# define SCNd32 "d"
-#endif
-#ifndef SCNd64
-# define SCNd64 PRI64_PREFIX "d"
-#endif
-
-#ifndef SCNu8
-# define SCNu8 "hhu"
-#endif
-#ifndef SCNu16
-# define SCNu16 "hu"
-#endif
-#ifndef SCNu32
-# define SCNu32 "u"
-#endif
-#ifndef SCNu64
-# define SCNu64 PRI64_PREFIX "u"
-#endif
-
-#ifndef PRIdMAX
-# define PRIdMAX PRId64
-#endif
-#ifndef PRIuMAX
-# define PRIuMAX PRIu64
-#endif
-#ifndef PRIxMAX
-# define PRIxMAX PRIx64
-#endif
-#ifndef SCNdMAX
-# define SCNdMAX SCNd64
-#endif
-
-#endif
-EOF
- ])]
-)
-
-
-dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE)
-dnl abort if the given type does not have the supposed size
-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
- [AC_MSG_CHECKING(that size of $1 is $2)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) case 0: case (sizeof ($1) == $2):;]])],[],
- [AC_MSG_ERROR([can not build a default inttypes.h])])
- AC_MSG_RESULT([yes])])
-
-
-dnl AM_CHECK_CDROM_IOCTLS ([ACTION-IF-YES], [ACTION-IF-NO])
-dnl check for CDROM_DRIVE_STATUS in ioctl.h
-AC_DEFUN([AM_CHECK_CDROM_IOCTLS],
- [AC_CACHE_CHECK([if cdrom ioctls are available],
- [am_cv_have_cdrom_ioctls],
- [AC_EGREP_HEADER([CDROM_DRIVE_STATUS],[sys/ioctl.h],
- am_cv_have_cdrom_ioctls=yes,
- [AC_EGREP_HEADER([CDIOCALLOW],[sys/ioctl.h],
- am_cv_have_cdrom_ioctls=yes,
- [AC_EGREP_CPP(we_have_cdrom_ioctls,[
-#include <sys/ioctl.h>
-#ifdef HAVE_SYS_CDIO_H
-# include <sys/cdio.h>
-#endif
-#ifdef HAVE_LINUX_CDROM_H
-# include <linux/cdrom.h>
-#endif
-#if defined(CDROM_DRIVE_STATUS) || defined(CDIOCALLOW) || defined(CDROMCDXA)
- we_have_cdrom_ioctls
-#endif
-],
- am_cv_have_cdrom_ioctls=yes,
- am_cv_have_cdrom_ioctls=no
- )])])])
- have_cdrom_ioctls=$am_cv_have_cdrom_ioctls
- if test "x$have_cdrom_ioctls" = xyes ; then
- ifelse([$1], , :, [$1])
- else
- ifelse([$2], , :, [$2])
- fi
-])
-
-
-dnl AC_CHECK_IP_MREQN
-dnl check for struct ip_mreqn in netinet/in.h
-AC_DEFUN([AC_CHECK_IP_MREQN],
- [AC_CACHE_CHECK([for ip_mreqn], [ac_cv_have_ip_mreqn],
- [AC_EGREP_HEADER([ip_mreqn],
- [netinet/in.h],
- [ac_cv_have_ip_mreqn=yes],
- [ac_cv_have_ip_mreqn=no])])
- if test $ac_cv_have_ip_mreqn = yes; then
- AC_DEFINE([HAVE_IP_MREQN],1,[Define this if you have ip_mreqn in netinet/in.h])
- fi
-])
-
-
-dnl AC_PROG_GMSGFMT_PLURAL
-dnl ----------------------
-dnl Validate the GMSGFMT program found by gettext.m4; reject old versions
-dnl of GNU msgfmt that do not support the "msgid_plural" extension.
-AC_DEFUN([AC_PROG_GMSGFMT_PLURAL],
- [dnl AC_REQUIRE(AM_GNU_GETTEXT)
-
- if test "$GMSGFMT" != ":"; then
- AC_MSG_CHECKING([for plural forms in GNU msgfmt])
-
- changequote(,)dnl We use [ and ] in in .po test input
-
- dnl If the GNU msgfmt does not accept msgid_plural we define it
- dnl as : so that the Makefiles still can work.
- cat >conftest.po <<_ACEOF
-msgid "channel"
-msgid_plural "channels"
-msgstr[0] "canal"
-msgstr[1] "canal"
-
-_ACEOF
- changequote([,])dnl
-
- if $GMSGFMT -o /dev/null conftest.po >/dev/null 2>&1; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- AC_MSG_RESULT(
- [found GNU msgfmt program is too old, it does not support plural forms; ignore it])
- GMSGFMT=":"
- fi
- rm -f conftest.po
- fi
-])dnl AC_PROG_GMSGFMT_PLURAL
-
-
-# AC_PROG_LIBTOOL_SANITYCHECK
-# ----------------------
-# Default configuration of libtool on solaris produces non-working
-# plugin modules, when gcc is used as compiler, and gcc does not
-# use gnu-ld
-AC_DEFUN([AC_PROG_LIBTOOL_SANITYCHECK],
- [dnl AC_REQUIRE(AC_PROG_CC)
- dnl AC_REQUIRE(AC_PROG_LD)
- dnl AC_REQUIRE(AC_PROG_LIBTOOL)
-
- case $host in
- *-*-solaris*)
- if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
- AC_MSG_CHECKING([if libtool can build working modules])
- cat > conftest1.c <<_ACEOF
-#undef NDEBUG
-#include <assert.h>
-int shlib_func(long long a, long long b) {
- assert(b);
- switch (a&3) {
- case 0: return a/b;
- case 1: return a%b;
- case 2: return (unsigned long long)a/b;
- case 3: return (unsigned long long)a%b;
- }
-}
-_ACEOF
-
- cat > conftest2.c <<_ACEOF
-#include <dlfcn.h>
-int main(){
- void *dl = dlopen(".libs/libconftest.so", RTLD_NOW);
- if (!dl) printf("%s\n", dlerror());
- exit(dl ? 0 : 1);
-}
-_ACEOF
-
- if ./libtool $CC -c conftest1.c >/dev/null 2>&1 && \
- ./libtool $CC -o libconftest.la conftest1.lo \
- -module -avoid-version -rpath /tmp >/dev/null 2>&1 && \
- ./libtool $CC -o conftest2 conftest2.c -ldl >/dev/null 2>&1
- then
- if ./conftest2 >/dev/null 2>&1; then
- AC_MSG_RESULT(yes)
- else
- dnl typical problem: dlopen'ed module not self contained, because
- dnl it wasn't linked with -lgcc
- AC_MSG_RESULT(no)
- if grep '^archive_cmds=.*$LD -G' libtool >/dev/null; then
- AC_MSG_CHECKING([if libtool can be fixed])
-
- dnl first try to update gcc2's spec file to add the
- dnl gcc3 -mimpure-text flag
-
- libtool_specs=""
-
- if $CC -dumpspecs | grep -- '-G -dy -z text' >/dev/null; then
- $CC -dumpspecs | \
- sed 's/-G -dy -z text/-G -dy %{!mimpure-text:-z text}/g' \
- > gcc-libtool-specs
- libtool_specs=" -specs=`pwd`/gcc-libtool-specs"
- fi
-
- sed -e "s,\$LD -G,\$CC${libtool_specs} -shared -mimpure-text,g" \
- -e 's/ -M / -Wl,-M,/' libtool >libtool-fixed
- chmod +x libtool-fixed
- if ./libtool-fixed $CC -o libconftest.la conftest1.lo \
- -module -avoid-version -rpath /tmp >/dev/null 2>&1 && \
- ./conftest2 >/dev/null 2>&1; then
-
- dnl the fixed libtool works
- AC_MSG_RESULT(yes)
- mv -f libtool-fixed libtool
-
- else
- AC_MSG_RESULT(no)
- fi
- fi
- fi
- else
- AC_MSG_RESULT(no)
- fi
- rm -f conftest1.c conftest1.lo conftest1.o conftest2.c \
- libconftest.la conftest libtool-fixed
- rm -rf .libs
- fi ;;
- esac
-])# AC_PROG_LIBTOOL_SANITYCHECK
-
-dnl Check for the type of the third argument of getsockname
-AC_DEFUN([AC_CHECK_SOCKLEN_T], [
- AC_MSG_CHECKING(for socklen_t)
-
- AC_CACHE_VAL(ac_cv_socklen_t, [
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <sys/socket.h>
- ]], [[socklen_t a=0;
-getsockname(0,(struct sockaddr*)0, &a);
- ]])],[ac_cv_socklen_t=socklen_t],[ac_cv_socklen_t=''])
- if test "x$ac_cv_socklen_t" = x; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#include <sys/socket.h>]], [[
-int a=0;
-getsockname(0,(struct sockaddr*)0, &a);]])],
- [ac_cv_socklen_t=int],[ac_cv_socklen_t=size_t])
- fi
- ])
-
- AC_MSG_RESULT($ac_cv_socklen_t)
- if test "$ac_cv_socklen_t" != "socklen_t"; then
- AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
- [Define the real type of socklen_t])
- fi
-])
diff --git a/m4/aa.m4 b/m4/aa.m4
deleted file mode 100644
index f7eefd8d7..000000000
--- a/m4/aa.m4
+++ /dev/null
@@ -1,272 +0,0 @@
-dnl Configure path and dependencies for aalib.
-dnl
-dnl Copyright (C) 2001 Daniel Caujolle-Bert <segfault@club-internet.fr>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-dnl
-dnl
-dnl As a special exception to the GNU General Public License, if you
-dnl distribute this file as part of a program that contains a configuration
-dnl script generated by Autoconf, you may include it under the same
-dnl distribution terms that you use for the rest of that program.
-dnl
-dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND ]]])
-dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS, AALIB_STATIC_LIBS.
-dnl
-dnl ***********************
-dnl 26/09/2001
-dnl * fixed --disable-aalibtest.
-dnl 17/09/2001
-dnl * use both aalib-config, and *last chance* aainfo for guessing.
-dnl 19/08/2001
-dnl * use aalib-config instead of aainfo now.
-dnl 17/06/2001
-dnl * First shot
-dnl
-
-dnl Internal bits, used by AM_PATH_AALIB.
-dnl Requires AALIB_CFLAGS and AALIB_FLAGS to be defined
-AC_DEFUN([_AALIB_CHECK_VERSION], [
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$AALIB_CFLAGS $CFLAGS"
- LIBS="$AALIB_LIBS $LIBS"
-
-dnl Now check if the installed AALIB is sufficiently new. (Also sanity
-dnl checks the results of aalib-config to some extent.)
-
- rm -f conf.aalibtest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <stdlib.h>
-#include <aalib.h>
-
-int main () {
- int major, minor;
- char *tmp_version;
-
- system ("touch conf.aalibtest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *) strdup("$min_aalib_version");
- if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
- printf("%s, bad version string\n", "$min_aalib_version");
- exit(1);
- }
-
- if ((AA_LIB_VERSION > major) || ((AA_LIB_VERSION == major) &&
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR >= minor)
-#else
- (AA_LIB_MINOR >= minor)
-#endif
- )) {
- return 0;
- }
- else {
-#ifdef AA_LIB_MINNOR
- printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINNOR);
-#else
- printf("\n*** An old version of AALIB (%d.%d) was found.\n", AA_LIB_VERSION, AA_LIB_MINOR);
-#endif
- printf("*** You need a version of AALIB newer than %d.%d. The latest version of\n", major, minor);
- printf("*** AALIB is always available from:\n");
- printf("*** http://www.ta.jcu.cz://aa\n");
- printf("***\n");
- }
- return 1;
-}
-]])],[],[no_aalib=yes],[no_aalib=cc])
- if test "x$no_aalib" = xcc; then
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <aalib.h>
-]], [[ return ((AA_LIB_VERSION) ||
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR)
-#else
- (AA_LIB_MINOR)
-#endif
- ); ]])],[no_aalib=''],[no_aalib=yes])
- fi
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
-])
-
-
-AC_DEFUN([AM_PATH_AALIB],
-[dnl
-dnl
-AC_ARG_WITH(aalib-prefix,
- AS_HELP_STRING([--with-aalib-prefix=DIR], [prefix where AALIB is installed (optional)]),
- aalib_config_prefix="$withval", aalib_config_prefix="")
-AC_ARG_WITH(aalib-exec-prefix,
- AS_HELP_STRING([--with-aalib-exec-prefix=DIR], [exec prefix where AALIB is installed (optional)]),
- aalib_config_exec_prefix="$withval", aalib_config_exec_prefix="")
-AC_ARG_ENABLE(aalibtest,
- AS_HELP_STRING([--disable-aalibtest], [do not try to compile and run a test AALIB program]),
- enable_aalibtest=$enableval, enable_aalibtest=yes)
-
- AC_LANG_PUSH([C])
-
- if test x$aalib_config_exec_prefix != x ; then
- aalib_config_args="$aalib_config_args --exec-prefix=$aalib_config_exec_prefix"
- if test x${AALIB_CONFIG+set} != xset ; then
- AALIB_CONFIG=$aalib_config_exec_prefix/bin/aalib-config
- fi
- fi
- if test x$aalib_config_prefix != x ; then
- aalib_config_args="$aalib_config_args --prefix=$aalib_config_prefix"
- if test x${AALIB_CONFIG+set} != xset ; then
- AALIB_CONFIG=$aalib_config_prefix/bin/aalib-config
- fi
- fi
-
- min_aalib_version=ifelse([$1], ,1.4,$1)
-
- if test x"$enable_aalibtest" != "xyes"; then
- AC_MSG_CHECKING([for AALIB version >= $min_aalib_version])
- else
- if test ! -x "$AALIB_CONFIG"; then
- AALIB_CONFIG=""
- fi
- AC_PATH_TOOL(AALIB_CONFIG, aalib-config, no)
-
- if test "$AALIB_CONFIG" = "no" ; then
-
-dnl aalib-config is missing, check for old aainfo
-
- AALIB_LIBS="$AALIB_LIBS -laa"
- if test x$aalib_config_exec_prefix != x ; then
- AALIB_CFLAGS="-I$aalib_config_exec_prefix/include"
- AALIB_LIBS="-L$aalib_config_exec_prefix/lib -laa"
- if test x${AAINFO+set} != xset ; then
- AAINFO=$aalib_config_exec_prefix/bin/aainfo
- fi
- fi
-
- if test x$aalib_config_prefix != x ; then
- AALIB_CFLAGS="-I$aalib_config_prefix/include"
- AALIB_LIBS="-L$aalib_config_prefix/lib -laa"
- if test x${AAINFO+set} != xset ; then
- AAINFO=$aalib_config_prefix/bin/aainfo
- fi
- fi
-
- if test x"$aalib_config_prefix" = "x"; then
- AC_PATH_TOOL(AAINFO, aainfo, no)
- else
- AC_MSG_CHECKING(for $AAINFO)
- if test -x $AAINFO; then
- AC_MSG_RESULT(yes)
- else
- AAINFO="no"
- AC_MSG_RESULT(no)
- fi
- fi
-
- AC_MSG_CHECKING([for AALIB version >= $min_aalib_version])
- no_aalib=""
-
- if test x"$AAINFO" = "xno"; then
- no_aalib=yes
- else
- aalib_drivers="`$AAINFO --help | grep drivers | sed -e 's/available//g;s/drivers//g;s/\://g'`"
- for drv in $aalib_drivers; do
- if test $drv = "X11" -a x$x11dep = "x"; then
- AALIB_CFLAGS="$AALIB_CFLAGS `echo $X_CFLAGS|sed -e 's/\-I/\-L/g;s/include/lib/g'`"
- x11dep="yes"
- fi
-dnl if test $drv = "slang" -a x$slangdep = "x"; then
-dnl slangdep="yes"
-dnl fi
-dnl if test $drv = "gpm" -a x$gmpdep = "x"; then
-dnl gpmdep="yes"
-dnl fi
- done
-
- _AALIB_CHECK_VERSION
- fi
-
- else dnl AALIB_CONFIG
- AC_MSG_CHECKING([for AALIB version >= $min_aalib_version])
- no_aalib=""
- AALIB_CFLAGS="`$AALIB_CONFIG $aalib_config_args --cflags`"
- AALIB_LIBS="`$AALIB_CONFIG $aalib_config_args --libs`"
- aalib_config_major_version=`$AALIB_CONFIG $aalib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- aalib_config_minor_version=`$AALIB_CONFIG $aalib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- aalib_config_sub_version=`$AALIB_CONFIG $aalib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
- _AALIB_CHECK_VERSION
- fi dnl AALIB_CONFIG
- fi dnl enable_aalibtest
-
- if test "x$no_aalib" = x; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$AALIB_CONFIG" = "no"; then
- echo "*** The [aalib-config|aainfo] program installed by AALIB could not be found"
- echo "*** If AALIB was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or use --with-aalib-prefix to set the prefix"
- echo "*** where AALIB is installed."
- else
- if test -f conf.aalibtest ; then
- :
- else
- echo "*** Could not run AALIB test program, checking why..."
- CFLAGS="$CFLAGS $AALIB_CFLAGS"
- LIBS="$LIBS $AALIB_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <aalib.h>
-]], [[
- return ((AA_LIB_VERSION) ||
-#ifdef AA_LIB_MINNOR
- (AA_LIB_MINNOR)
-#else
- (AA_LIB_MINOR)
-#endif
- ); ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding AALIB or finding the wrong"
- echo "*** version of AALIB. If it is not finding AALIB, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means AALIB was incorrectly installed"
- echo "*** or that you have moved AALIB since it was installed." ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- AALIB_CFLAGS=""
- AALIB_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(AALIB_CFLAGS)
- AC_SUBST(AALIB_LIBS)
- AC_LANG_POP([C])
- rm -f conf.aalibtest
-])
diff --git a/m4/arts.m4 b/m4/arts.m4
deleted file mode 100644
index b66199be8..000000000
--- a/m4/arts.m4
+++ /dev/null
@@ -1,168 +0,0 @@
-# Configure paths for ARTS
-# Philip Stadermann 2001-06-21
-# stolen from esd.m4
-
-dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for ARTS, and define ARTS_CFLAGS and ARTS_LIBS
-dnl
-AC_DEFUN([AM_PATH_ARTS],
-[dnl
-dnl Get the cflags and libraries from the artsc-config script
-dnl
-AC_ARG_WITH(arts-prefix, AS_HELP_STRING([--with-arts-prefix=DIR], [prefix where ARTS is installed (optional)]),
- arts_prefix="$withval", arts_prefix="")
-AC_ARG_ENABLE(artstest, AS_HELP_STRING([--disable-artstest], [do not try to compile and run a test ARTS program]),
- enable_artstest=$enableval, enable_artstest=yes)
-
- if test x$arts_prefix != x ; then
- arts_args="$arts_args --arts-prefix=$arts_prefix"
- if test x${ARTS_CONFIG+set} != xset ; then
- ARTS_CONFIG=$arts_prefix/bin/artsc-config
- fi
- fi
-
- AC_PATH_TOOL(ARTS_CONFIG, artsc-config, no)
-
- min_arts_version=ifelse([$1], ,0.9.5,$1)
- AC_MSG_CHECKING(for ARTS artsc - version >= $min_arts_version)
- no_arts=""
- if test "$ARTS_CONFIG" = "no" ; then
- no_arts=yes
- else
- ARTS_CFLAGS=`$ARTS_CONFIG $artsconf_args --cflags`
- ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs`
-
- arts_major_version=`$ARTS_CONFIG $arts_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- arts_minor_version=`$ARTS_CONFIG $arts_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_artstest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $ARTS_CFLAGS"
- LIBS="$LIBS $ARTS_LIBS"
-dnl
-dnl Check if the installed ARTS is actually available -- when cross-compiling,
-dnl we have probably detected the build system's version of artsc-config
-dnl
- AC_CHECK_LIB([artsc], [arts_init], [], [no_arts=yes], [$ARTS_LIBS])
-
-dnl
-dnl Now check if the installed ARTS is sufficiently new. (Also sanity
-dnl checks the results of artsc-config to some extent)
-dnl
- rm -f conf.artstest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <artsc.h>
-
-char*
-my_strdup (char *str)
-{
- char *new_str;
-
- if (str)
- {
- new_str = malloc ((strlen (str) + 1) * sizeof(char));
- strcpy (new_str, str);
- }
- else
- new_str = NULL;
-
- return new_str;
-}
-
-int main ()
-{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.artstest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = my_strdup("$min_arts_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
- printf("%s, bad version string\n", "$min_arts_version");
- exit(1);
- }
-
- if (($arts_major_version > major) ||
- (($arts_major_version == major) && ($arts_minor_version > minor)) ||
- (($arts_major_version == major) && ($arts_minor_version == minor) && ($arts_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $arts_major_version, $arts_minor_version, $arts_micro_version);
- printf("*** of ARTS required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro);
- printf("*** best to upgrade to the required version.\n");
- printf("*** If artsc-config was wrong, set the environment variable ARTS_CONFIG\n");
- printf("*** to point to the correct copy of artsc-config, and remove the file\n");
- printf("*** config.cache before re-running configure\n");
- return 1;
- }
-}
-
-]])],[],[no_arts=yes],[no_arts=cc])
-
- if test "x$no_arts" = "xcc"; then
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <artsc.h>
-]], [[ return 0; ]])],[no_arts=''],[no_arts=yes])
- fi
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_arts" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$ARTS_CONFIG" = "no" ; then
- echo "*** The artsc-config script installed by ARTS could not be found"
- echo "*** If ARTS was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the ARTS_CONFIG environment variable to the"
- echo "*** full path to artsc-config."
- else
- if test -f conf.artstest ; then
- :
- else
- echo "*** Could not run ARTS test program, checking why..."
- CFLAGS="$CFLAGS $ARTS_CFLAGS"
- LIBS="$LIBS $ARTS_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <artsc.h>
-]], [[ return 0; ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding ARTS or finding the wrong"
- echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means ARTS was incorrectly installed"
- echo "*** or that you have moved ARTS since it was installed. In the latter case, you"
- echo "*** may want to edit the artsc-config script: $ARTS_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- ARTS_CFLAGS=""
- ARTS_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(ARTS_CFLAGS)
- AC_SUBST(ARTS_LIBS)
- rm -f conf.artstest
-])
diff --git a/m4/audio_out.m4 b/m4/audio_out.m4
new file mode 100644
index 000000000..791f1ecda
--- /dev/null
+++ b/m4/audio_out.m4
@@ -0,0 +1,220 @@
+dnl -----------------
+dnl Audio out plugins
+dnl -----------------
+AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [
+ dnl Setup defaults for the target operating system. For example, alsa is
+ dnl only ever available on Linux, so don't bother checking for it unless
+ dnl explicitly requested to do so on other operating systems.
+ dnl Notes:
+ dnl - Alsa is Linux only
+ dnl - CoreAudio is Mac OS X only
+ dnl - EsounD is reported to be available on most platforms
+ dnl - FusionSound is Linux only, but don't enable it by default
+ dnl - Jack is Linux and Mac OS X primarily
+ dnl - OSS is most unix variants
+ dnl - PulseAudio has been tested on Linux, Solaris, FreeBSD, Windows
+ dnl - SunAudio is NetBSD, OpenBSD, Solaris (anything else?)
+
+ default_enable_coreaudio=no
+ default_enable_irixal=no
+ default_enable_oss=yes
+ default_enable_sunaudio=no
+ default_enable_sndio=no
+
+ default_with_alsa=no
+ default_with_esound=yes
+ default_with_fusionsound=no
+ default_with_jack=no
+ default_with_pulseaudio=no
+
+ case "$host_os" in
+ cygwin* | mingw*)
+ default_enable_oss=no
+ default_with_pulseaudio=yes
+ ;;
+ darwin*)
+ default_enable_coreaudio=yes
+ default_with_jack=yes
+ default_enable_oss=no
+ ;;
+ freebsd*|kfreebsd*)
+ default_with_pulseaudio=yes
+ default_with_jack=yes
+ ;;
+ irix*)
+ default_enable_irixal=yes
+ default_enable_oss=no
+ ;;
+ linux*)
+ default_with_alsa=yes
+ default_with_jack=yes
+ default_with_pulseaudio=yes
+ ;;
+ netbsd*)
+ default_enable_sunaudio=yes
+ ;;
+ openbsd*)
+ default_enable_sunaudio=yes
+ default_enable_sndio=yes
+ ;;
+ solaris*)
+ default_with_pulseaudio=yes
+ default_enable_sunaudio=yes
+ ;;
+ esac
+
+
+ dnl Alsa support
+ XINE_ARG_WITH([alsa], [Build with ALSA audio output support])
+ if test x"$with_alsa" != x"no"; then
+ PKG_CHECK_MODULES([ALSA], [alsa >= 0.9.0], [have_alsa=yes], [have_alsa=no])
+ if test x"$hard_with_alsa" = x"yes" && test x"$have_alsa" != x"yes"; then
+ AC_MSG_ERROR([ALSA support requested but not found.])
+ elif test x"$have_alsa" = x"yes"; then
+ dnl This is needed by src/input/input_v4l.c
+ AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_ALSA], [test x"$have_alsa" = x"yes"])
+
+
+ dnl CoreAudio for Mac OS X
+ XINE_ARG_ENABLE([coreaudio], [Enable support for Mac OS X CoreAudio])
+ if test x"$enable_coreaudio" != x"no"; then
+ AC_MSG_CHECKING([for CoreAudio frameworks])
+ ac_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreAudio -framework AudioUnit"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])], [have_coreaudio=yes], [have_coreaudio=no])
+ LIBS="$ac_save_LIBS"
+ AC_MSG_RESULT([$have_coreaudio])
+ if test x"hard_$enable_coreaudio" = x"yes" && test x"$have_coreaudio" != x"yes"; then
+ AC_MSG_ERROR([CoreAudio support requested, but CoreAudio not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_COREAUDIO], [test x"$have_coreaudio" = x"yes"])
+
+
+ dnl EsounD support
+ XINE_ARG_WITH([esound], [Build with EsounD audio output support])
+ if test x"$with_esound" != x"no"; then
+ PKG_CHECK_MODULES([ESD], [esound], [have_esound=yes], [have_esound=no])
+ if test x"$hard_with_esound" = x"yes" && test x"$have_esound" != x"yes"; then
+ AC_MSG_ERROR([EsounD support requested, but EsounD not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_ESD], [test x"$have_esound" = x"yes"])
+
+
+ dnl FusionSound support
+ XINE_ARG_WITH([fusionsound], [Build with FunsionSound audio output support])
+ if test x"$with_fusionsound" != x"no"; then
+ PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 0.9.23], [have_fusionsound=yes], [have_fusionsound=no])
+ if test x"$hard_with_fusionsound" = x"yes" && test x"$have_fusionsound" != x"yes"; then
+ AC_MSG_ERROR([FusionSound support requested, but FusionSound not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_FUSIONSOUND], [test x"$have_fusionsound" = x"yes"])
+
+
+ dnl IRIX style audio interface
+ XINE_ARG_ENABLE([irixal], [Enable support for IRIX libaudio])
+ if test x"$enable_irixal" != x"no"; then
+ AC_CACHE_CHECK([for IRIX libaudio support], [am_cv_have_irixal],
+ [AC_CHECK_HEADER([dmedia/audio.h],
+ [am_cv_have_irixal=yes], [am_cv_have_irixal=no])])
+ if test x"$am_cv_have_irixal" = x"yes"; then
+ AC_DEFINE([HAVE_IRIXAL], 1, [Define this if you have a usable IRIX al interface available])
+ IRIXAL_LIBS="-laudio"
+ IRIXAL_STATIC_LIB="/usr/lib/libaudio.a"
+ AC_SUBST(IRIXAL_LIBS)
+ AC_SUBST(IRIXAL_STATIC_LIB)
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_IRIXAL], [test x"$am_cv_have_irixal" = x"yes"])
+
+
+ dnl JACK support
+ XINE_ARG_WITH([jack], [Build with Jack support])
+ if test x"$with_jack" != x"no"; then
+ PKG_CHECK_MODULES([JACK], [jack >= 0.100], [have_jack=yes], [have_jack=no])
+ if test x"$hard_with_jack" = x"yes" && test x"$have_jack" != x"yes"; then
+ AC_MSG_ERROR([Jack support requested, but Jack not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_JACK], [test x"$have_jack" = x"yes"])
+
+
+ dnl OSS (Open Sound System)
+ XINE_ARG_ENABLE([oss], [Enable OSS (Open Sound System) support])
+ if test x"$enable_oss" != x"no"; then
+ AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h soundcard.h], [break])
+ AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_oss=yes], [have_oss=no],
+ [#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"$hard_enable_oss" = x"yes" && test x"$have_oss" != x"yes"; then
+ AC_MSG_ERROR([OSS support requested, but OSS not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_OSS], [test x"$have_oss" = x"yes"])
+
+
+ dnl PulseAudio
+ XINE_ARG_WITH([pulseaudio], [Build with PulseAudio support])
+ if test x"$with_pulseaudio" != x"no"; then
+ PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"])
+ if test x"$hard_with_pulseaudio" = x"yes" && test x"$have_pulseaudio" != x"yes"; then
+ AC_MSG_ERROR([PulseAudio support requested, but PulseAudio not found])
+ fi
+ if test x"$have_pulseaudio" = xyes; then
+ AC_MSG_CHECKING([for pulseaudio >= 0.9.7])
+ PKG_CHECK_EXISTS([libpulse >= 0.9.7],
+ [have_pulseaudio_0_9_7="yes"],
+ [have_pulseaudio_0_9_7="no"])
+ AC_MSG_RESULT([$have_pulseaudio_0_9_7])
+ if test x"$have_pulseaudio_0_9_7" = xyes; then
+ AC_DEFINE([HAVE_PULSEAUDIO_0_9_7], 1, [define this if you have pulseaudio >= 0.9.7])
+ fi
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test x"$have_pulseaudio" = x"yes"])
+
+
+ dnl SUN style audio interface
+ XINE_ARG_ENABLE([sunaudio], [Enable Sun audio support])
+ if test x"$enable_sunaudio" != x"no"; then
+ AC_MSG_CHECKING([for Sun audio support])
+ 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], [have_sunaudio=no])
+ AC_MSG_RESULT([$have_sunaudio])
+ if test x"$hard_enable_sunaudio" = x"yes" && test x"$have_sunaudio" != x"yes"; then
+ AC_MSG_ERROR([Sun audio support requested, but Sun audio not found])
+ elif test x"$have_sunaudio" = x"yes"; 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([ENABLE_SUNAUDIO], [test x"$have_sunaudio" = x"yes"])
+
+
+ dnl sndio support
+ XINE_ARG_ENABLE([sndio], [Enable sndio support])
+ if test x"$enable_sndio" != "xno"; then
+ AC_CHECK_LIB([sndio], [sio_open], [SNDIO_LIBS=-lsndio; have_sndio=yes],
+ [have_sndio=no])
+ if test "x$hard_enable_sndio" = "xyes" && test "x$have_sndio" = "xno"; then
+ AC_MSG_ERROR([sndio support requested, but sndio not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_SNDIO], [test "x$have_sndio" = "xyes"])
+ AC_SUBST([SNDIO_CFLAGS])
+ AC_SUBST([SNDIO_LIBS])
+])dnl XINE_AUDIO_OUT_PLUGINS
diff --git a/m4/decoders.m4 b/m4/decoders.m4
new file mode 100644
index 000000000..09d8dd900
--- /dev/null
+++ b/m4/decoders.m4
@@ -0,0 +1,520 @@
+dnl ---------------------------
+dnl Decoder and Demuxer Plugins
+dnl ---------------------------
+AC_DEFUN([XINE_DECODER_PLUGINS], [
+ dnl a52dec (optional; enabled by default; external version allowed)
+ AC_ARG_ENABLE([a52dec],
+ [AS_HELP_STRING([--enable-a52dec], [Enable support for a52dec decoding library (default: enabled, internal: use internal copy)])])
+ if test x"$enable_a52dec" != x"no"; then
+ if test x"$enable_a52dec" != x"internal"; then
+ AC_CHECK_LIB([a52], [a52_init],
+ [AC_CHECK_HEADERS([a52dec/a52.h], [have_external_a52dec=yes], [have_external_a52dec=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>])], [have_external_a52dec=no], [-lm])
+ if test x"$have_external_a52dec" = x"no"; then
+ AC_MSG_RESULT([*** no usable version of a52dec found, using internal copy ***])
+ fi
+ else
+ AC_MSG_RESULT([Using included a52dec support])
+ fi
+ if test x"$have_external_a52dec" = x"yes"; then
+ A52DEC_CFLAGS=''
+ A52DEC_LIBS='-la52'
+ A52DEC_DEPS=''
+ else
+ A52DEC_CFLAGS='-I$(top_srcdir)/contrib/a52dec'
+ A52DEC_LIBS='$(top_builddir)/contrib/a52dec/liba52.la'
+ A52DEC_DEPS='$(top_builddir)/contrib/a52dec/liba52.la'
+ fi
+ AC_SUBST(A52DEC_CFLAGS)
+ AC_SUBST(A52DEC_DEPS)
+ AC_SUBST(A52DEC_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_A52DEC], [test x"$enable_a52dec" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_A52DEC], [test x"$have_external_a52dec" = x"yes"])
+
+
+ dnl ASF (optional; enabled by default)
+ AC_ARG_ENABLE([asf],
+ [AS_HELP_STRING([--enable-asf], [Enable support for ASF demuxer (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_asf="yes"])
+ AM_CONDITIONAL([ENABLE_ASF], [test x"$enable_asf" != x"no"])
+
+ dnl Nosefart (optional, enabled by default)
+ AC_ARG_ENABLE([nosefart],
+ [AS_HELP_STRING([--enable-nosefart], [Enable support for nosefart player (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_nosefart="yes"])
+ AM_CONDITIONAL([ENABLE_NOSEFART], [test "x$enable_nosefart" != "xno"])
+
+ dnl FAAD (optional; enabled by default)
+ AC_ARG_ENABLE([faad],
+ [AS_HELP_STRING([--enable-faad], [Enable support for FAAD decoder (default: enabled, internal: use internal copy)])])
+ if test x"$enable_faad" != x"no"; then
+ if test x"$enable_faad" != x"internal"; then
+ AC_CHECK_LIB([faad], [NeAACDecInit],
+ [AC_CHECK_HEADERS([neaacdec.h], [have_external_faad=yes], [have_external_faad=no],
+ [#include <neaacdec.h>])], [have_external_faad=no], [-lm])
+ if test x"$have_external_faad" = x"no"; then
+ AC_MSG_RESULT([*** no usable version of libfaad found, using internal copy ***])
+ fi
+ else
+ AC_MSG_RESULT([Using included libfaad support])
+ fi
+ if test x"$have_external_faad" = x"yes"; then
+ FAAD_CFLAGS=''
+ FAAD_LIBS='-lfaad'
+ FAAD_DEPS=''
+ else
+ FAAD_CFLAGS='-I$(top_srcdir)/contrib/libfaad'
+ FAAD_LIBS='$(top_builddir)/contrib/libfaad/libfaad.la'
+ FAAD_DEPS='$(top_builddir)/contrib/libfaad/libfaad.la'
+ fi
+ AC_SUBST(FAAD_CFLAGS)
+ AC_SUBST(FAAD_DEPS)
+ AC_SUBST(FAAD_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_FAAD], [test x"$enable_faad" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_FAAD], [test x"$have_external_faad" = x"yes"])
+
+ dnl ffmpeg external version required
+ PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.68.0])
+ PKG_CHECK_MODULES([AVUTIL], [libavutil >= 49.6.0])
+ PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc])
+ 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])
+ AC_CHECK_HEADERS([libavutil/sha1.h])
+ AC_CHECK_HEADERS([libavutil/sha.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
+
+ dnl gdk-pixbuf (optional; enabled by default)
+ AC_ARG_ENABLE([gdkpixbuf],
+ [AS_HELP_STRING([--enable-gdkpixbuf], [Enable GdkPixbuf support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_gdkpixbuf="yes"])
+ if test x"$enable_gdkpixbuf" != x"no"; then
+ PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0], [have_gdkpixbuf=yes], [have_gdkpixbuf=no])
+ if test x"$enable_gdkpixbuf" = x"yes" && test x"$have_gdkpixbuf" != x"yes"; then
+ AC_MSG_ERROR([GdkPixbuf support requested, but GdkPixbuf not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_GDK_PIXBUF], [test x"$have_gdkpixbuf" = x"yes"])
+
+
+ dnl ImageMagick (optional; enabled by default)
+ AC_ARG_WITH([imagemagick],
+ [AS_HELP_STRING([--with-imagemagick], [Enable ImageMagick image decoder support (default: enabled)])],
+ [test x"$withval" != x"no" && with_imagemagick="yes"])
+ if test x"$with_imagemagick" != x"no"; then
+ PKG_CHECK_MODULES([WAND], [Wand], [have_imagemagick=yes], [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" = x"yes" && test x"$have_imagemagick" = x"no"; then
+ AC_MSG_ERROR([ImageMagick support requested, but neither Wand, MagickWand, nor GraphicsMagick were found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_IMAGEMAGICK], [test x"$have_imagemagick" = x"yes"])
+
+
+ dnl libdts (optional; enabled by default; external version allowed)
+ AC_ARG_ENABLE([dts],
+ [AS_HELP_STRING([--enable-dts], [Enable support for DTS decoding library (default: enabled, internal: use internal copy)])])
+ if test x"$enable_dts" != x"no"; then
+ if test x"$enable_dts" != x"internal"; then
+ PKG_CHECK_MODULES([LIBDTS], [libdts], [have_external_dts=yes], [have_external_dts=no])
+ if test x"$have_external_dts" != x"yes"; then
+ AC_MSG_RESULT([*** no usable version of libdts found, using internal copy ***])
+ fi
+ else
+ AC_MSG_RESULT([Using included libdts support])
+ fi
+ if test x"$have_external_dts" != x"yes"; then
+ LIBDTS_CFLAGS='-I$(top_srcdir)/contrib/libdca/include'
+ LIBDTS_DEPS='$(top_builddir)/contrib/libdca/libdca.la'
+ LIBDTS_LIBS='$(top_builddir)/contrib/libdca/libdca.la'
+ AC_SUBST(LIBDTS_DEPS)
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_DTS], [test x"$enable_dts" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_LIBDTS], [test x"$have_external_dts" = x"yes"])
+
+
+ dnl libFLAC (optional; enabled by default)
+ AC_ARG_WITH([libflac],
+ [AS_HELP_STRING([--with-libflac], [build libFLAC-based decoder and demuxer (default: enabled)])],
+ [test x"$withval" != x"no" && with_libflac="yes"])
+ AC_ARG_WITH([libFLAC-prefix],
+ [AS_HELP_STRING([--with-libFLAC-prefix=DIR], [prefix where libFLAC is installed (optional)])])
+ AC_ARG_WITH([libFLAC-libraries],
+ [AS_HELP_STRING([--with-libFLAC-libraries=DIR], [directory where libFLAC library is installed (optional)])])
+ AC_ARG_WITH([libFLAC-includes],
+ [AS_HELP_STRING([--with-libFLAC-includes=DIR], [directory where libFLAC header files are installed (optional)])])
+ if test x"$with_libflac" != x"no"; then
+ AC_MSG_CHECKING([libdir name])
+ case "$host_or_hostalias" in
+ *-*-linux*)
+ # Test if the compiler is 64bit
+ echo 'int i;' > conftest.$ac_ext
+ xine_cv_cc_64bit_output=no
+ if AC_TRY_EVAL(ac_compile); then
+ case `"$MAGIC_CMD" conftest.$ac_objext` in
+ *"ELF 64"*) xine_cv_cc_64bit_output=yes ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+ case "$host_cpu:$xine_cv_cc_64bit_output" in
+ powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+ XINE_LIBDIRNAME="lib64" ;;
+ *:*)
+ XINE_LIBDIRNAME="lib" ;;
+ esac
+ AC_MSG_RESULT([$XINE_LIBDIRNAME])
+
+ if test x"$with_libFLAC_includes" != x""; then
+ LIBFLAC_CFLAGS="-I$with_libFLAC_includes"
+ elif test x"$with_libFLAC_prefix" != x""; then
+ LIBFLAC_CFLAGS="-I$with_libFLAC_prefix/include"
+ elif test x"$prefix" != x"NONE"; then
+ LIBFLAC_CFLAGS="-I$prefix/include"
+ fi
+ AC_SUBST(LIBFLAC_CFLAGS)
+
+ if test x"$with_libFLAC_libraries" != x""; then
+ LIBFLAC_LIBS="-L$with_libFLAC_libraries"
+ elif test x"$with_libFLAC_prefix" != x""; then
+ LIBFLAC_LIBS="-L$with_libFLAC_prefix/$XINE_LIBDIRNAME"
+ elif test x"$prefix" != x"NONE"; then
+ LIBFLAC_LIBS="-L$prefix/$XINE_LIBDIRNAME"
+ fi
+ AC_SUBST(LIBFLAC_LIBS)
+
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $LIBFLAC_CFLAGS"
+ AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_new],
+ [AC_CHECK_HEADERS([FLAC/stream_decoder.h],
+ [have_libflac=yes LIBFLAC_LIBS="$LIBFLAC_LIBS -lFLAC -lm"],
+ [have_libflac=no])],
+ [have_libflac=no], [-lm])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ if test x"$with_libflac" = x"yes" && test x"$have_libflac" != x"yes"; then
+ AC_MSG_ERROR([libFLAC-based decoder support requested, but libFLAC not found])
+ elif test x"$have_libflac" != x"yes"; then
+ LIBFLAC_CFLAGS="" LIBFLAC_LIBS=""
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_LIBFLAC], [test x"$have_libflac" = x"yes"])
+
+
+ dnl libmad (optional; enabled by default; external version allowed)
+ AC_ARG_ENABLE([mad],
+ [AS_HELP_STRING([--enable-mad], [Enable support for MAD decoding library (default: enabled, internal: use external copy)])])
+ if test x"$enable_mad" != x"no"; then
+ if test x"$enable_mad" != x"internal"; then
+ PKG_CHECK_MODULES([LIBMAD], [mad],
+ [AC_CHECK_HEADERS([mad.h], [have_external_libmad=yes], [have_external_libmad=no])],
+ [have_external_libmad=no])
+ if test x"$have_external_libmad" != x"yes"; then
+ AC_MSG_RESULT([*** no usable version of libmad found, using internal copy ***])
+ fi
+ else
+ AC_MSG_RESULT([Using included libmad support])
+ fi
+ if test x"$have_external_libmad" != x"yes"; then
+ case "$host_or_hostalias" in
+ i?86-* | k?-* | athlon-* | pentium*-)
+ AC_DEFINE([FPM_INTEL], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ x86_64-*)
+ AC_DEFINE([FPM_64BIT], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ ppc-* | powerpc-*)
+ AC_DEFINE([FPM_PPC], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ sparc*-*)
+ if test "$GCC" = yes; then
+ AC_DEFINE([FPM_SPARC], 1, [Define to select libmad fixed point arithmetic implementation])
+ else
+ AC_DEFINE([FPM_64BIT], 1, [Define to select libmad fixed point arithmetic implementation])
+ fi
+ ;;
+ mips-*)
+ AC_DEFINE([FPM_MIPS], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ alphaev56-* | alpha* | ia64-* | hppa*-linux-*)
+ AC_DEFINE([FPM_64BIT], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ arm*-*)
+ AC_DEFINE([FPM_ARM], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ universal-*)
+ ;;
+ *)
+ AC_DEFINE([FPM_DEFAULT], 1, [Define to select libmad fixed point arithmetic implementation])
+ ;;
+ esac
+ LIBMAD_CFLAGS='-I$(top_srcdir)/contrib/libmad'
+ LIBMAD_LIBS='$(top_builddir)/contrib/libmad/libmad.la'
+ LIBMAD_DEPS='$(top_builddir)/contrib/libmad/libmad.la'
+ fi
+ AC_SUBST(LIBMAD_CFLAGS)
+ AC_SUBST(LIBMAD_DEPS)
+ AC_SUBST(LIBMAD_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_MAD], [test x"$enable_mad" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_MAD], [test x"$have_external_libmad" = x"yes"])
+
+
+ dnl libmodplug (optional; enabled by default)
+ AC_ARG_ENABLE([modplug],
+ [AS_HELP_STRING([--enable-modplug], [Enable MODPlug support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_modplug="yes"])
+ if test x"$enable_modplug" != x"no"; then
+ PKG_CHECK_MODULES([LIBMODPLUG], [libmodplug >= 0.7], [have_modplug=yes], [have_modplug=no])
+ if test x"$enable_modplug" = x"yes" && test x"$have_modplug" != x"yes"; then
+ AC_MSG_ERROR([MODPlug support requested, but MODPlug not found])
+ fi
+ 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
+ fi
+ AM_CONDITIONAL([ENABLE_MODPLUG], [test x"$have_modplug" = x"yes"])
+
+
+ dnl libmpeg2new (optional; disabled by default)
+ AC_ARG_ENABLE([libmpeg2new],
+ AS_HELP_STRING([--enable-libmpeg2new], [build the newer MPEG2 decoder (buggy)]))
+ AM_CONDITIONAL([ENABLE_MPEG2NEW], [test "x$enable_libmpeg2new" = "xyes"])
+
+
+ dnl libmpcdec (optional; enabled by default; external version allowed)
+ AC_ARG_ENABLE([musepack],
+ [AS_HELP_STRING([--enable-musepack], [Enable support for Musepack decoding (default: enabled, internal: use external copy)])])
+ if test x"$enable_musepack" != x"no"; then
+ if test x"$enable_musepack" != x"internal"; then
+ AC_CHECK_LIB([mpcdec], [mpc_demux_decode],
+ [AC_CHECK_HEADERS([mpc/mpcdec.h], [have_external_libmpcdec=yes], [have_external_libmpcdec=no])],
+ [AC_CHECK_LIB([mpcdec], [mpc_decoder_decode],
+ [AC_CHECK_HEADERS([mpcdec/mpcdec.h], [have_external_libmpcdec=yes], [have_external_libmpcdec=no])],
+ [have_external_libmpcdec=no])])
+ if test x"$have_external_libmpcdec" != x"yes"; then
+ AC_MSG_RESULT([*** no usable version of libmpcdec found, using internal copy ***])
+ else
+ MPCDEC_CFLAGS=""
+ MPCDEC_DEPS=""
+ MPCDEC_LIBS="-lmpcdec"
+ fi
+ else
+ AC_MSG_RESULT([Using included libmpcdec (Musepack)])
+ fi
+ if test x"$have_external_libmpcdec" != x"yes"; then
+ MPCDEC_CFLAGS='-I$(top_srcdir)/contrib/libmpcdec'
+ MPCDEC_LIBS='$(top_builddir)/contrib/libmpcdec/libmpcdec.la'
+ MPCDEC_DEPS='$(top_builddir)/contrib/libmpcdec/libmpcdec.la'
+ fi
+ AC_SUBST(MPCDEC_CFLAGS)
+ AC_SUBST(MPCDEC_DEPS)
+ AC_SUBST(MPCDEC_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_MUSEPACK], [test x"$enable_musepack" != x"no"])
+ AM_CONDITIONAL([WITH_EXTERNAL_LIBMPCDEC], [test x"$have_external_libmpcdec" = x"yes"])
+
+
+ dnl mlib
+ AC_ARG_ENABLE([mlib],
+ [AS_HELP_STRING([--enable-mlib], [build Sun mediaLib support (default: disabled)])],
+ [test x"$enableval" != x"no" && enable_mlib="yes"], [enable_lib="no"])
+ AC_ARG_ENABLE([mlib-lazyload],
+ [AS_HELP_STRING([--enable-mlib-lazyload], [check for Sun mediaLib at runtime])],
+ [test x"$enableval" != x"no" && enable_mlib_lazyload="yes"], [enable_mlib_lazyload="no"])
+ if test x"$enable_mlib" != x"no"; then
+ mlibhome="$MLIBHOME" test x"$mlibhome" = x"" && mlibhome="/opt/SUNWmlib"
+ AC_CHECK_LIB([mlib], [mlib_VideoAddBlock_U8_S16],
+ [saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$mlibhome/include"
+ AC_CHECK_HEADERS([mlib_video.h],
+ [if test x"$enable_mlib_lazyload" != x"no"; 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"
+ AC_SUBST(MLIB_LIBS)
+ AC_SUBST(MLIB_CFLAGS)
+ dnl TODO: src/video_out/yuv2rgb.c and src/xine-utils/cpu_accel.c should be changed to use LIBMPEG2_MLIB
+ dnl and HAVE_MLIB should go away.
+ AC_DEFINE([HAVE_MLIB], 1, [Define this if you have mlib installed])
+ AC_DEFINE([LIBMPEG2_MLIB], 1, [Define this if you have mlib installed])
+ have_mlib=yes])
+ CPPFLAGS="$saved_CPPFLAGS"], [], ["-L$mlibhome/lib"])
+ fi
+ AM_CONDITIONAL([HAVE_MLIB], [test x"$have_mlib" = x"yes"])
+
+
+ dnl mng (optional; enabled by default)
+ AC_ARG_ENABLE([mng],
+ [AS_HELP_STRING([--enable-mng], [Enable MNG decoder support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_mng="yes"])
+ if test x"$enable_mng" != x"no"; then
+ AC_CHECK_LIB([mng], [mng_initialize],
+ [AC_CHECK_HEADERS([libmng.h], [have_mng=yes], [have_mng=no])], [have_mng=no])
+ if test x"$enable_mng" = x"yes" && test x"$have_mng" != x"yes"; then
+ AC_MSG_ERROR([MNG support requested, but libmng not found])
+ elif test x"$have_mng" = x"yes"; then
+ MNG_LIBS="-lmng"
+ AC_SUBST(MNG_LIBS)
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_MNG], [test x"$have_mng" = x"yes"])
+
+
+ dnl Ogg/Speex (optional; enabled by default; external)
+ AC_ARG_WITH([speex],
+ [AS_HELP_STRING([--with-speex], [Enable Speex audio decoder support (default: enabled)])],
+ [test x"$withval" != x"no" && with_speex="yes"])
+ if test x"$with_speex" != x"no"; then
+ PKG_CHECK_MODULES([SPEEX], [ogg speex], [have_speex=yes], [have_speex=no])
+ if test x"$with_speex" = x"yes" && test x"$have_speex" != x"yes"; then
+ AC_MSG_ERROR([Speex support requested, but libspeex and/or libogg not found])
+ elif test x"$have_speex" = x"yes"; then
+ AC_DEFINE([HAVE_SPEEX], 1, [Define this if you have speex])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_SPEEX], [test x"$have_speex" = x"yes"])
+
+
+ dnl Ogg/Theora (optional; enabled by default; external)
+ AC_ARG_WITH([theora],
+ [AS_HELP_STRING([--with-theora], [Enable Theora video decoder support (default: enabled)])],
+ [test x"$withval" != x"no" && with_theora="yes"])
+ if test x"$with_theora" != x"no"; then
+ PKG_CHECK_MODULES([THEORA], [ogg theora], [have_theora=yes], [have_theora=no])
+ if test x"$with_theora" = x"yes" && test x"$have_theora" = x"no"; then
+ AC_MSG_ERROR([Theora support requested, but libtheora and/or libogg not found])
+ elif test x"$have_theora" = x"yes"; then
+ AC_DEFINE([HAVE_THEORA], 1, [Define this if you have theora])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_THEORA], [test x"$have_theora" = x"yes"])
+
+
+ dnl Ogg/Vorbis (optional; enabled by default; external)
+ AC_ARG_WITH([vorbis],
+ [AS_HELP_STRING([--with-vorbis], [Enable Vorbis audio decoder support (default: enabled)])],
+ [test x"$withval" != x"no" && with_vorbis="yes"])
+ if test x"$with_vorbis" != x"no"; then
+ PKG_CHECK_MODULES([VORBIS], [ogg vorbis], [have_vorbis=yes], [have_vorbis=no])
+ if test x"$with_vorbis" = x"yes" && test x"$have_vorbis" = "xno"; then
+ AC_MSG_ERROR([Vorbis support requested, but libvorbis and/or libogg not found])
+ elif test x"$have_vorbis" = x"yes"; then
+ AC_DEFINE([HAVE_VORBIS], 1, [Define this if you have vorbis])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_VORBIS], [test x"$have_vorbis" = x"yes"])
+
+
+ dnl real (optional; enabled by default)
+ dnl On some systems, we cannot enable Real codecs support to begin with.
+ dnl This includes Darwin, because it uses Mach-O rather than ELF.
+ AC_ARG_ENABLE([real-codecs],
+ [AS_HELP_STRING([--enable-real-codecs], [Enable Real binary codecs support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_real_codecs="yes"])
+ AC_ARG_WITH([real-codecs-path],
+ [AS_HELP_STRING([--with-real-codecs-path=PATH], [Specify directory for Real binary codecs])])
+ if test x"$enable_real_codecs" != x"no"; then
+ case "$host_os" in
+ darwin*) have_real_codecs=no ;;
+ *)
+ have_real_codecs=yes
+
+ dnl For those that have a replacement, break at the first one found
+ AC_CHECK_SYMBOLS([__environ _environ environ], [break], [need_weak_aliases=yes])
+ AC_CHECK_SYMBOLS([stderr __stderrp], [break], [need_weak_aliases=yes])
+
+ dnl For these there are no replacements
+ AC_CHECK_SYMBOLS([___brk_addr __ctype_b])
+
+ if test x"$need_weak_aliases" = x"yes"; then
+ CC_ATTRIBUTE_ALIAS([], [have_real_codecs=no])
+ fi
+ ;;
+ esac
+ if test x"$enable_real_codecs" = x"yes" && test x"$have_real_codecs" != x"yes"; then
+ AC_MSG_ERROR([Binary Real codec support requested, but it is not available])
+ elif test x"$have_real_codecs" = x"yes"; then
+ if test "${with_real_codecs_path+set}" = "set"; then
+ AC_DEFINE_UNQUOTED([REAL_CODEC_PATH], ["$with_real_codecs_path"], [Default path in which to find Real binary codecs])
+ fi
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_REAL], [test x"$have_real_codecs" = x"yes"])
+
+
+ dnl w32dll (optional; x86 only; enabled if using GNU as; GNU as required)
+ AC_ARG_ENABLE([w32dll],
+ [AS_HELP_STRING([--enable-w32dll], [Enable Win32 DLL support (default: enabled)])],
+ [test x"$enableval" != x"no" && enable_w32dll="yes"],
+ [test x"$with_gnu_as" != x"yes" && enable_w32dll="no"])
+ AC_ARG_WITH([w32-path],
+ [AS_HELP_STRING([--with-w32-path=PATH], [location of Win32 binary codecs])],
+ [w32_path="$withval"], [w32_path="/usr/lib/codecs"])
+ if test x"$enable_w32dll" != x"no"; then
+ case "$host_or_hostalias" in
+ *-mingw* | *-cygwin) have_w32dll=no ;;
+ i?86-* | k?-* | athlon-* | pentium*-) have_w32dll="$with_gnu_as" ;;
+ *) enable_w32dll=no ;;
+ esac
+ if test x"$enable_w32dll" = x"yes" && test x"$have_w32dll" != x"yes"; then
+ AC_MSG_ERROR([Win32 DLL support requested, but Win32 DLL support is not available])
+ fi
+ fi
+ AC_SUBST(w32_path)
+ AM_CONDITIONAL([ENABLE_W32DLL], [test x"$have_w32dll" = x"yes"])
+
+
+ dnl wavpack (optional; disabled by default)
+ AC_ARG_WITH([wavpack],
+ [AS_HELP_STRING([--with-wavpack], [Enable Wavpack decoder (requires libwavpack)])],
+ [test x"$withval" != x"no" && with_wavpack="yes"], [with_wavpack="no"])
+ if test x"$with_wavpack" != x"no"; then
+ PKG_CHECK_MODULES([WAVPACK], [wavpack], [have_wavpack=yes], [have_wavpack=no])
+ if test x"$with_wavpack" = x"yes" && test x"$have_wavpack" != x"yes"; then
+ AC_MSG_ERROR([Wavpack decoder support requested, but libwavpack not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_WAVPACK], [test x"$have_wavpack" = x"yes"])
+
+
+ dnl Only enable building dmx image if either gdk_pixbuf or ImageMagick are enabled
+ AM_CONDITIONAL([BUILD_DMX_IMAGE], [test x"$have_imagemagick" = x"yes" -o x"$have_gdkpixbuf" = x"yes"])
+])
diff --git a/m4/directx.m4 b/m4/directx.m4
index d64c13fc4..082581c8f 100644
--- a/m4/directx.m4
+++ b/m4/directx.m4
@@ -10,62 +10,40 @@ dnl It looks for DirectX, defines DIRECTX_CPPFLAGS, DIRECTX_AUDIO_LIBS and
dnl DIRECTX_VIDEO_LIBS.
dnl
AC_DEFUN([AM_PATH_DIRECTX], [
-
-AC_ARG_WITH(dxheaders, AS_HELP_STRING([--with-dxheaders], [specify location of DirectX headers]),
- [dxheaders_prefix="$withval"],
- [dxheaders_prefix="no"]
-)
-
-if test x"$dxheaders_prefix" != "xno"; then
- DIRECTX_CPPFLAGS="-I${dxheaders_prefix} ${DIRECTX_CPPFLAGS}"
-fi
-
-AC_MSG_CHECKING(for DirectX)
-DIRECTX_VIDEO_LIBS="$DIRECTX_LIBS -lgdi32 -lddraw"
-DIRECTX_AUDIO_LIBS="$DIRECTX_LIBS -ldsound"
-AC_LANG_PUSH([C])
-ac_save_CPPFLAGS="$CPPFLAGS"
-ac_save_LIBS="$LIBS"
-CPPFLAGS="$CPPFLAGS $DIRECTX_CPPFLAGS"
-LIBS="$LIBS $DIRECTX_VIDEO_LIBS $DIRECTX_AUDIO_LIBS"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE(
- [
-#include <stddef.h>
-
-#include <windows.h>
-#include <ddraw.h>
-#include <dsound.h>
-
-int main() {
- DirectDrawCreate(0, NULL, 0);
- DirectSoundCreate(0, NULL, 0);
-
- return 0;
-}
- ])],
- [have_directx=yes
- AC_DEFINE(HAVE_DIRECTX,1,[Define this if you have DirectX])],,)
-CPPFLAGS=$ac_save_CPPFLAGS
-LIBS=$ac_save_LIBS
-AC_LANG_POP([C])
-
-if test x$have_directx = xyes ; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
- AC_MSG_RESULT(*** All DirectX dependent parts will be disabled ***)
-fi
-
-AC_SUBST(DIRECTX_CPPFLAGS)
-AC_SUBST(DIRECTX_AUDIO_LIBS)
-AC_SUBST(DIRECTX_VIDEO_LIBS)
-AM_CONDITIONAL(HAVE_DIRECTX, test x$have_directx = "xyes")
-
-dnl result
-if test x"$have_directx" = "xyes"; then
- ifelse([$1], , :, [$1])
-else
- ifelse([$2], , :, [$2])
-fi
-
+ AC_ARG_WITH([dxheaders],
+ [AS_HELP_STRING([--with-dxheaders], [specify location of DirectX headers])],
+ [dxheaders_prefix="$withval"], [dxheaders_prefix="no"])
+ if test x"$dxheaders_prefix" != x"no"; then
+ DIRECTX_CPPFLAGS="-I$dxheaders_prefix $DIRECTX_CPPFLAGS"
+ fi
+
+ AC_MSG_CHECKING([for DirectX])
+ DIRECTX_AUDIO_LIBS="$DIRECTX_LIBS -ldsound"
+ DIRECTX_VIDEO_LIBS="$DIRECTX_LIBS -lgdi32 -lddraw"
+
+ AC_LANG_PUSH([C])
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $DIRECTX_CPPFLAGS"
+ ac_save_LIBS="$LIBS" LIBS="$LIBS $DIRECTX_VIDEO_LIBS $DIRECTX_AUDIO_LIBS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+ #include <windows.h>
+ #include <ddraw.h>
+ #include <dsound.h>]],
+ [[DirectDrawCreate(0, NULL, 0); DirectSoundCreate(0, NULL, 0)]])],
+ [have_directx=yes], [have_directx=no])
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIBS="$ac_save_LIBS"
+ AC_LANG_POP([C])
+
+ AC_SUBST(DIRECTX_CPPFLAGS)
+ AC_SUBST(DIRECTX_AUDIO_LIBS)
+ AC_SUBST(DIRECTX_VIDEO_LIBS)
+ AM_CONDITIONAL([ENABLE_DIRECTX], [test x"$have_directx" = x"yes"])
+
+ AC_MSG_RESULT([$have_directx])
+ if test x"$have_directx" = x"yes"; then
+ AC_DEFINE([HAVE_DIRECTX], 1, [Define this if you have DirectX])
+ ifelse([$1], , :, [$1])
+ else
+ ifelse([$2], , :, [$2])
+ fi
])
diff --git a/m4/dl.m4 b/m4/dl.m4
deleted file mode 100644
index 87d16c17f..000000000
--- a/m4/dl.m4
+++ /dev/null
@@ -1,53 +0,0 @@
-dnl
-dnl Check for dlopen symbol and set DYNAMIC_LD_LIBS.
-dnl
-dnl AM_DL()
-dnl
-
-AC_DEFUN([AM_DL], [
- AC_CHECK_LIB(c, dlopen,
- [DYNAMIC_LD_LIBS=""
- have_dl=yes])
-
- if test x$have_dl != "xyes"; then
- AC_CHECK_LIB(dl, dlopen,
- [DYNAMIC_LD_LIBS="-ldl"
- have_dl=yes])
- fi
-
- if test x$have_dl != "xyes"; then
- AC_MSG_CHECKING(for dlopen under win32)
- AC_LANG_PUSH([C])
-
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_LIBS="$LIBS"
- CPPFLAGS="-I${srcdir}/win32/include $CPPFLAGS"
- LIBS="$LIBS -lkernel32"
- AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include <stddef.h>
-#include <dlfcn.h>
-
-int main() {
- dlopen(NULL, 0);
- return 0;
-}
-])],
- [DYNAMIC_LD_LIBS=-lkernel32
- have_dl=yes
- AC_MSG_RESULT(yes)],
- AC_MSG_RESULT(no)
- )
-
- CPPFLAGS=$ac_save_CPPFLAGS
- LIBS=$ac_save_LIBS
-
- AC_LANG_POP([C])
- fi
-
- if test x$have_dl != "xyes"; then
- AC_MSG_ERROR(dynamic linker needed)
- fi
-
- AC_SUBST(DYNAMIC_LD_LIBS)
-
-])
diff --git a/m4/dvdnav.m4 b/m4/dvdnav.m4
deleted file mode 100644
index d82fc02db..000000000
--- a/m4/dvdnav.m4
+++ /dev/null
@@ -1,194 +0,0 @@
-dnl Configure paths for DVDNAV
-dnl
-dnl Copyright (C) 2001 Daniel Caujolle-Bert <segfault@club-internet.fr>
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-dnl
-dnl
-dnl As a special exception to the GNU General Public License, if you
-dnl distribute this file as part of a program that contains a configuration
-dnl script generated by Autoconf, you may include it under the same
-dnl distribution terms that you use for the rest of that program.
-dnl
-
-dnl AM_PATH_DVDNAV([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for DVDNAV, and define DVDNAV_CFLAGS and DVDNAV_LIBS
-dnl
-AC_DEFUN([AM_PATH_DVDNAV],
-[dnl
-dnl Get the cflags and libraries from the dvdnav-config script
-dnl
-AC_ARG_WITH(dvdnav-prefix,
- AS_HELP_STRING([--with-dvdnav-prefix=DIR], [prefix where DVDNAV is installed (optional)]),
- dvdnav_config_prefix="$withval", dvdnav_config_prefix="")
-AC_ARG_WITH(dvdnav-exec-prefix,
- AS_HELP_STRING([--with-dvdnav-exec-prefix=DIR], [exec prefix where DVDNAV is installed (optional)]),
- dvdnav_config_exec_prefix="$withval", dvdnav_config_exec_prefix="")
-AC_ARG_ENABLE(dvdnavtest,
- AS_HELP_STRING([--disable-dvdnavtest], [do not try to compile and run a test DVDNAV program]),
- enable_dvdnavtest=$enableval, enable_dvdnavtest=yes)
-
- AC_LANG_PUSH([C])
-
- if test x$dvdnav_config_exec_prefix != x ; then
- dvdnav_config_args="$dvdnav_config_args --exec-prefix=$dvdnav_config_exec_prefix"
- if test x${DVDNAV_CONFIG+set} != xset ; then
- DVDNAV_CONFIG=$dvdnav_config_exec_prefix/bin/dvdnav-config
- fi
- fi
- if test x$dvdnav_config_prefix != x ; then
- dvdnav_config_args="$dvdnav_config_args --prefix=$dvdnav_config_prefix"
- if test x${DVDNAV_CONFIG+set} != xset ; then
- DVDNAV_CONFIG=$dvdnav_config_prefix/bin/dvdnav-config
- fi
- fi
-
- min_dvdnav_version=ifelse([$1], ,0.0.0,$1)
- if test "x$enable_dvdnavtest" != "xyes" ; then
- AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version])
- else
- AC_PATH_TOOL(DVDNAV_CONFIG, dvdnav-config, no)
- AC_MSG_CHECKING([for DVDNAV-LIB version >= $min_dvdnav_version])
- no_dvdnav=""
- if test "$DVDNAV_CONFIG" = "no" ; then
- no_dvdnav=yes
- else
- DVDNAV_CFLAGS=`$DVDNAV_CONFIG $dvdnav_config_args --cflags`
- DVDNAV_LIBS=`$DVDNAV_CONFIG $dvdnav_config_args --libs`
- dvdnav_config_major_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- dvdnav_config_minor_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- dvdnav_config_sub_version=`$DVDNAV_CONFIG $dvdnav_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- dnl if test "x$enable_dvdnavtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $DVDNAV_CFLAGS"
- LIBS="$DVDNAV_LIBS $LIBS"
-dnl
-dnl Now check if the installed DVDNAV is sufficiently new. (Also sanity
-dnl checks the results of dvdnav-config to some extent
-dnl
- rm -f conf.dvdnavtest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdint.h>
-#include <dvdnav/dvdnav.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int
-main ()
-{
- int major, minor, sub;
- char *tmp_version;
-
- system ("touch conf.dvdnavtest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *) strdup("$min_dvdnav_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &sub) != 3) {
- printf("%s, bad version string\n", "$min_dvdnav_version");
- exit(1);
- }
-
- if (($dvdnav_config_major_version > major) ||
- (($dvdnav_config_major_version == major) && ($dvdnav_config_minor_version > minor)) ||
- (($dvdnav_config_major_version == major) && ($dvdnav_config_minor_version == minor) && ($dvdnav_config_sub_version >= sub))) {
- return 0;
- } else {
- printf("\n*** An old version of libdvdnav (%d.%d.%d) was found.\n",
- $dvdnav_config_major_version, $dvdnav_config_minor_version, $dvdnav_config_sub_version);
- printf("*** You need a version of libdvdnav newer than %d.%d.%d. The latest version of\n",
- major, minor, sub);
- printf("*** libdvdnav is always available from:\n");
- printf("*** http://dvd.sourceforge.net\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the dvdnav-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of libdvdnav, but you can also set the DVDNAV_CONFIG environment to point to the\n");
- printf("*** correct copy of dvdnav-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- return 1;
-}
-]])],[],[no_dvdnav=yes],[no_dvdnav=cc])
- if test "x$no_dvdnav" = xcc; then
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdint.h>
-#include <dvdnav/dvdnav.h>
-#include <stdio.h>
-]], [[ return 0; ]])],[no_dvdnav=''],[no_dvdnav=yes])
- fi
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_dvdnav" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- dnl nav_*.h seem to have been moved from dvdnav at some point?
- AC_CHECK_HEADERS([dvdread/nav_types.h],,,
-[#include <stdint.h>
-])
- else
- AC_MSG_RESULT(no)
- if test "$DVDNAV_CONFIG" = "no" ; then
- echo "*** The dvdnav-config script installed by DVDNAV could not be found"
- echo "*** If DVDNAV was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the DVDNAV_CONFIG environment variable to the"
- echo "*** full path to dvdnav-config."
- else
- if test -f conf.dvdnavtest ; then
- :
- else
- echo "*** Could not run DVDNAV test program, checking why..."
- CFLAGS="$CFLAGS $DVDNAV_CFLAGS"
- LIBS="$LIBS $DVDNAV_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <stdint.h>
-#include <dvdnav/dvdnav.h>
-#include <stdio.h>
-]], [[ return 0; ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding DVDNAV or finding the wrong"
- echo "*** version of DVDNAV. If it is not finding DVDNAV, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means DVDNAV was incorrectly installed"
- echo "*** or that you have moved DVDNAV since it was installed. In the latter case, you"
- echo "*** may want to edit the dvdnav-config script: $DVDNAV_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- DVDNAV_CFLAGS=""
- DVDNAV_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(DVDNAV_CFLAGS)
- AC_SUBST(DVDNAV_LIBS)
- AC_LANG_POP([C])
- rm -f conf.dvdnavtest
-])
diff --git a/m4/gas.m4 b/m4/gas.m4
index 923c3f90c..a3c600793 100644
--- a/m4/gas.m4
+++ b/m4/gas.m4
@@ -10,111 +10,98 @@ dnl modifications, as long as this notice is preserved.
dnl AC_PROG_AS
dnl ----------
dnl find the pathname to the GNU or non-GNU assembler
-AC_DEFUN([CC_PROG_AS],
-[AC_ARG_WITH([gnu-as],
- [AS_HELP_STRING([--with-gnu-as],
- [assume the C compiler uses GNU as @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_as=yes],
- [with_gnu_as=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-cc_prog=as
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=as gives a path.
- AC_MSG_CHECKING([for as used by $CC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=as) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=as) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of as
- ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
- done
- test -z "$AS" && AS="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=as
- ;;
- *)
- # If it is relative, then search for the first as in PATH.
- with_gnu_as=unknown
- ;;
- esac
-elif test "$with_gnu_as" = yes; then
- AC_MSG_CHECKING([for GNU as])
-else
- AC_MSG_CHECKING([for non-GNU as])
-fi
-AC_CACHE_VAL(cc_cv_path_AS,
-[if test -z "$AS"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_AS="$ac_dir/$ac_prog"
- # Check to see if the program is GNU as. I'd rather use --version,
- # but apparently some variants of GNU as only accept -v.
- # Break only if it was the GNU/non-GNU as that we prefer.
- case `"$cc_cv_path_AS" -v 2>&1 </dev/null` in
- dnl Apple's assembler reports itself as GNU as 1.38;
- dnl but it doesn't provide the functions we need.
- *Apple*)
- test "$with_gnu_as" != yes && break
- ;;
- *GNU* | *'with BFD'*)
- test "$with_gnu_as" != no && break
- ;;
- *)
- test "$with_gnu_as" != yes && break
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
-else
- cc_cv_path_AS="$AS" # Let the user override the test with a path.
-fi])
-AS="$cc_cv_path_AS"
-if test -n "$AS"; then
- AC_MSG_RESULT($AS)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$AS" && AC_MSG_ERROR([no acceptable as found in \$PATH])
-CC_PROG_AS_GNU
-])
+dnl based on AC_PROG_LD from libtool
+AC_DEFUN([CC_PROG_AS], [
+ AC_REQUIRE([LT_AC_PROG_SED])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AM_PROG_AS])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+
+ AC_ARG_WITH([gnu-as],
+ [AS_HELP_STRING([--with-gnu-as], [assume the C compiler uses GNU as @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_as=yes], [with_gnu_as=unknown])
+ if test x"$with_gnu_as" = x"unknown"; then
+ dnl If CCAS is not the same as CC, check to see if it's GCC.
+ if test x"$CCAS" = x"$CC"; then
+ ccas_is_gnu="$GCC"
+ else
+ AC_CACHE_CHECK([whether $CCAS is a GNU compiler], [ac_cv_CCAS_compiler_gnu],
+ [saved_CC="$CC" CC="$CCAS"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __GNUC__
+ choke me
+ #endif]])],
+ [ac_cv_CCAS_compiler_gnu=yes], [ac_cv_CCAS_compiler_gnu=no])
+ CC="$saved_CC"])
+ ccas_is_gnu="$ac_cv_CCAS_compiler_gnu"
+ fi
+ dnl Try to figure out the assembler command. Fallback to as.
+ ac_prog=""
+ if test x"$AS" = x""; then
+ AC_MSG_CHECKING([for as used by $CCAS])
+ if test x"$ccas_is_gnu" = x"yes"; then
+ # Check if gcc -print-prog-name=as gives a path.
+ case "$host_or_hostalias" in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CCAS -print-prog-name=as) 2>&5 | tr -d '\015'`
+ ;;
+ *)
+ ac_prog=`($CCAS -print-prog-name=as) 2>&5`
+ ;;
+ esac
+
+ case "$ac_prog" in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of as
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ ;;
+ *) ac_prog="" ;;
+ esac
+ fi
+ fi
+ if test x"$ac_prog" = x""; then
+ # If it fails, then pretend we aren't using GCC.
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/as" || test -f "$ac_dir/as$ac_exeext"; then
+ ac_prog="$ac_dir/as"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ fi
+ if test x"$ac_prog" = x""; then
+ AC_MSG_RESULT([unknown])
+ else
+ AS="$ac_prog"
+ AC_MSG_RESULT([$AS])
+ fi
+ fi
-dnl AC_PROG_AS_GNU
-dnl --------------
-AC_DEFUN([CC_PROG_AS_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the assembler ($AS) is GNU as], cc_cv_prog_gnu_as,
-[# I'd rather use --version here, but apparently some GNU as's only accept -v.
-case `$AS -v 2>&1 </dev/null` in
-dnl Apple's assembler reports itself as GNU as 1.38;
-dnl but it doesn't provide the functions we need.
-*Apple*)
- cc_cv_prog_gnu_as=no
- ;;
-*GNU* | *'with BFD'*)
- cc_cv_prog_gnu_as=yes
- ;;
-*)
- cc_cv_prog_gnu_as=no
- ;;
-esac])
-with_gnu_as=$cc_cv_prog_gnu_as
+ test -z "$AS" && AC_MSG_ERROR([no acceptable as found in \$PATH])
+ AC_CACHE_CHECK([if the assembler ($AS) is GNU as], [cc_cv_prog_gnu_as], [
+ # I'd rather use --version here, but apparently some GNU as's only accept -v.
+ case `"$AS" -v 2>&1 </dev/null` in
+ *Apple*)
+ # Apple's assembler reports itself as GNU as 1.38;
+ # but it doesn't provide the functions we need.
+ cc_cv_prog_gnu_as=no
+ ;;
+ *GNU* | *'with BFD'*)
+ cc_cv_prog_gnu_as=yes
+ ;;
+ *)
+ cc_cv_prog_gnu_as=no
+ ;;
+ esac])
+ with_gnu_as="$cc_cv_prog_gnu_as"
])
diff --git a/m4/glibc2.m4 b/m4/glibc2.m4
deleted file mode 100644
index e8f5bfe6e..000000000
--- a/m4/glibc2.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-# glibc2.m4 serial 1
-dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# Test for the GNU C Library, version 2.0 or newer.
-# From Bruno Haible.
-
-AC_DEFUN([gt_GLIBC2],
- [
- AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
- ac_cv_gnu_library_2,
- [AC_EGREP_CPP([Lucky GNU user],
- [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2)
- Lucky GNU user
- #endif
-#endif
- ],
- ac_cv_gnu_library_2=yes,
- ac_cv_gnu_library_2=no)
- ]
- )
- AC_SUBST(GLIBC2)
- GLIBC2="$ac_cv_gnu_library_2"
- ]
-)
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
deleted file mode 100644
index d95fd9861..000000000
--- a/m4/glibc21.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-# glibc21.m4 serial 3
-dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# Test for the GNU C Library, version 2.1 or newer.
-# From Bruno Haible.
-
-AC_DEFUN([gl_GLIBC21],
- [
- AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
- ac_cv_gnu_library_2_1,
- [AC_EGREP_CPP([Lucky GNU user],
- [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
- Lucky GNU user
- #endif
-#endif
- ],
- ac_cv_gnu_library_2_1=yes,
- ac_cv_gnu_library_2_1=no)
- ]
- )
- AC_SUBST(GLIBC21)
- GLIBC21="$ac_cv_gnu_library_2_1"
- ]
-)
diff --git a/m4/input.m4 b/m4/input.m4
new file mode 100644
index 000000000..c337162c7
--- /dev/null
+++ b/m4/input.m4
@@ -0,0 +1,177 @@
+dnl -------------
+dnl Input Plugins
+dnl -------------
+AC_DEFUN([XINE_INPUT_PLUGINS], [
+ dnl Setup defaults for the target operating system. For example, v4l is
+ dnl only ever available on Linux, so don't bother checking for it unless
+ dnl explicitly requested to do so on other operating systems.
+ dnl Notes:
+ dnl - dvb is Linux only
+ dnl - v4l is Linux only
+
+ default_enable_dvb=no
+ default_enable_gnomevfs=yes
+ default_enable_samba=yes
+ default_enable_v4l=no
+ default_enable_v4l2=no
+ default_enable_libv4l=no
+ default_enable_vcd=yes
+ default_enable_vcdo=no
+ default_enable_vdr=yes
+ default_enable_bluray=yes
+ default_with_external_dvdnav=no
+
+ case "$host_os" in
+ cygwin* | mingw*)
+ default_enable_gnomevfs=no
+ default_enable_samba=no
+ ;;
+ darwin*)
+ default_enable_gnomevfs=no
+ default_enable_samba=no
+ ;;
+ freebsd*|kfreebsd*)
+ default_enable_vcdo=yes
+ ;;
+ netbsd* | openbsd*)
+ default_enable_v4l2=yes
+ ;;
+ linux*)
+ default_enable_dvb=yes
+ default_enable_v4l=yes
+ default_enable_v4l2=yes
+ default_enable_libv4l=yes
+ default_enable_vcdo=yes
+ ;;
+ solaris*)
+ default_enable_vcdo=yes
+ default_enable_v4l2=yes
+ ;;
+ esac
+
+ dnl default_enable_libv4l="$default_enable_v4l2"
+
+ dnl dvb
+ XINE_ARG_ENABLE([dvb], [Enable support for the DVB plugin (Linux only)])
+ if test x"$enable_dvb" != x"no"; then
+ case "$host_os" in
+ linux*) have_dvb=yes ;;
+ *) have_dvb=no ;;
+ esac
+ if test x"$hard_enable_dvb" = x"yes" && test x"$have_dvb" != x"yes"; then
+ AC_MSG_ERROR([DVB support requested, but DVB not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_DVB], [test x"$have_dvb" = x"yes"])
+
+
+ dnl gnome-vfs
+ XINE_ARG_ENABLE([gnomevfs], [Enable support for the Gnome-VFS plugin])
+ if test x"$enable_gnomevfs" != x"no"; then
+ PKG_CHECK_MODULES([GNOME_VFS], [gnome-vfs-2.0], [have_gnomevfs=yes], [have_gnome_vfs=no])
+ if test x"$hard_enable_gnomevfs" = x"yes" && test x"$have_gnomevfs" != x"yes"; then
+ AC_MSG_ERROR([Gnome-VFS support requested, but Gnome-VFS not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_GNOME_VFS], [test x"$have_gnomevfs" = x"yes"])
+
+
+ dnl libsmbclient
+ XINE_ARG_ENABLE([samba], [Enable support for the Samba plugin])
+ if test x"$enable_samba" != x"no"; then
+ AC_CHECK_LIB([smbclient], [smbc_init],
+ [AC_CHECK_HEADERS([libsmbclient.h], [have_samba=yes LIBSMBCLIENT_LIBS="-lsmbclient"])])
+ AC_SUBST(LIBSMBCLIENT_LIBS)
+ if test x"$hard_enable_samba" = x"yes" && test x"$have_samba" != x"yes"; then
+ AC_MSG_ERROR([Samba support requested, but Samba not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_LIBSMBCLIENT], [test x"$have_samba" = x"yes"])
+
+
+ dnl video-for-linux (v4l)
+ XINE_ARG_ENABLE([v4l], [Enable Video4Linux support])
+ if test x"$enable_v4l" != x"no"; then
+ have_v4l=yes
+ AC_CHECK_HEADERS([linux/videodev.h], , [have_v4l=no])
+ AC_CHECK_HEADERS([asm/types.h])
+ if test x"$hard_enable_v4l" = x"yes" && test x"$have_v4l" != x"yes"; then
+ AC_MSG_ERROR([Video4Linux support requested, but prerequisite headers not found.])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_V4L], [test x"$have_v4l" = x"yes"])
+
+ XINE_ARG_ENABLE([v4l2], [Enable Video4Linux 2 support])
+ if test x"$enable_v4l2" != x"no"; then
+ have_v4l2=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"$hard_enable_v4l2" = x"yes" && test x"$have_v4l2" != x"yes"; then
+ AC_MSG_ERROR([Video4Linux 2 support requested, but prerequisite headers not found.])
+ fi
+ XINE_ARG_ENABLE([libv4l], [Enable libv4l support])
+ if test "x$enable_libv4l" != "xno"; then
+ 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$hard_enable_libv4l" = "xyes" && test "x$have_libv4l" = "xno"; then
+ AC_MSG_ERROR([libv4l requested, but libv4l not found])
+ fi
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_V4L2], [test x"$have_v4l2" = x"yes"])
+
+ dnl dvdnav
+ dnl XXX: This could be cleaned up so that code does not have to ifdef so much
+ XINE_ARG_WITH([external-dvdnav], [Use external dvdnav library (not recommended)])
+ if test x"$with_external_dvdnav" != x"no"; then
+ ACX_PACKAGE_CHECK([DVDNAV], [0.1.9], [dvdnav-config],
+ [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([Using included DVDNAV support])
+ fi
+ AM_CONDITIONAL([WITH_EXTERNAL_DVDNAV], [test x"$with_external_dvdnav" != x"no"])
+
+
+ dnl Video CD
+ dnl XXX: This could be cleaned up so that code does not have it ifdef so much
+ XINE_ARG_ENABLE([vcd], [Enable VCD (VideoCD) support])
+ if test x"$enable_vcd" != x"no"; then
+ PKG_CHECK_MODULES([LIBCDIO], [libcdio >= 0.71])
+ PKG_CHECK_MODULES([LIBVCDINFO], [libvcdinfo >= 0.7.23])
+ AC_DEFINE([HAVE_VCDNAV], 1, [Define this if you use external libcdio/libvcdinfo])
+ fi
+
+ enable_vcdo=no
+ test $default_enable_vcdo = yes && test x"$enable_vcd" != x"no" && enable_vcdo=yes
+
+ 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(LIBVCD_CFLAGS)
+ AC_SUBST(LIBVCD_LIBS)
+ AM_CONDITIONAL([ENABLE_VCD], [test x"$enable_vcd" != x"no"])
+ AM_CONDITIONAL([ENABLE_VCDO], [test x"$enable_vcdo" != x"no"])
+
+
+ dnl vdr
+ XINE_ARG_ENABLE([vdr], [Enable support for the VDR plugin (default: enabled)])
+ AM_CONDITIONAL([ENABLE_VDR], [test x"$enable_vdr" != x"no"])
+
+ dnl bluray
+ XINE_ARG_ENABLE([bluray], [Enable BluRay support])
+ if test "x$enable_bluray" != "xno"; then
+ PKG_CHECK_MODULES([LIBBLURAY], [libbluray >= 0.2.1], [have_libbluray=yes], [have_libbluray=no])
+ if test x"$hard_enable_bluray" = x"yes" && test x"$have_libbluray" != x"yes"; then
+ AC_MSG_ERROR([BluRay support requested, but libbluray not found])
+ fi
+ AC_SUBST(LIBBLURAY_CFLAGS)
+ AC_SUBST(LIBBLURAY_LIBS)
+ fi
+ AM_CONDITIONAL(ENABLE_BLURAY, test "x$have_libbluray" = "xyes")
+
+])
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
deleted file mode 100644
index 8c8a67084..000000000
--- a/m4/intdiv0.m4
+++ /dev/null
@@ -1,84 +0,0 @@
-# intdiv0.m4 serial 2 (gettext-0.17)
-dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([gt_INTDIV0],
-[
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_CANONICAL_HOST])dnl
-
- AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
- gt_cv_int_divbyzero_sigfpe,
- [
- gt_cv_int_divbyzero_sigfpe=
-changequote(,)dnl
- case "$host_os" in
- macos* | darwin[6-9]* | darwin[1-9][0-9]*)
- # On MacOS X 10.2 or newer, just assume the same as when cross-
- # compiling. If we were to perform the real test, 1 Crash Report
- # dialog window would pop up.
- case "$host_cpu" in
- i[34567]86 | x86_64)
- gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
- esac
- ;;
- esac
-changequote([,])dnl
- if test -z "$gt_cv_int_divbyzero_sigfpe"; then
- AC_TRY_RUN([
-#include <stdlib.h>
-#include <signal.h>
-
-static void
-sigfpe_handler (int sig)
-{
- /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
- exit (sig != SIGFPE);
-}
-
-int x = 1;
-int y = 0;
-int z;
-int nan;
-
-int main ()
-{
- signal (SIGFPE, sigfpe_handler);
-/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
-#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
- signal (SIGTRAP, sigfpe_handler);
-#endif
-/* Linux/SPARC yields signal SIGILL. */
-#if defined (__sparc__) && defined (__linux__)
- signal (SIGILL, sigfpe_handler);
-#endif
-
- z = x / y;
- nan = y / y;
- exit (1);
-}
-], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
- [
- # Guess based on the CPU.
-changequote(,)dnl
- case "$host_cpu" in
- alpha* | i[34567]86 | x86_64 | m68k | s390*)
- gt_cv_int_divbyzero_sigfpe="guessing yes";;
- *)
- gt_cv_int_divbyzero_sigfpe="guessing no";;
- esac
-changequote([,])dnl
- ])
- fi
- ])
- case "$gt_cv_int_divbyzero_sigfpe" in
- *yes) value=1;;
- *) value=0;;
- esac
- AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
- [Define if integer division by zero raises signal SIGFPE.])
-])
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
deleted file mode 100644
index 779bcea05..000000000
--- a/m4/inttypes.m4
+++ /dev/null
@@ -1,25 +0,0 @@
-# inttypes.m4 serial 1 (gettext-0.11.4)
-dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
-# <sys/types.h>.
-
-AC_DEFUN([gt_HEADER_INTTYPES_H],
-[
- AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
- [
- AC_TRY_COMPILE(
- [#include <sys/types.h>
-#include <inttypes.h>],
- [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
- ])
- if test $gt_cv_header_inttypes_h = yes; then
- AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
- [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
- fi
-])
diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4
deleted file mode 100644
index 6eb3f45a6..000000000
--- a/m4/ioctl_request.m4
+++ /dev/null
@@ -1,52 +0,0 @@
-dnl Simple macro to find the type of the ioctl request parameter
-dnl Copyright (c) 2007 xine project
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 2, or (at your option)
-dnl any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software
-dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-dnl 02110-1301, USA.
-dnl
-dnl As a special exception, the xine project, as copyright owner of the
-dnl macro gives unlimited permission to copy, distribute and modify the
-dnl configure scripts that are the output of Autoconf when processing the
-dnl Macro. You need not follow the terms of the GNU General Public
-dnl License when using or distributing such scripts, even though portions
-dnl of the text of the Macro appear in them. The GNU General Public
-dnl License (GPL) does govern all other use of the material that
-dnl constitutes the Autoconf Macro.
-dnl
-dnl This special exception to the GPL applies to versions of the
-dnl Autoconf Macro released by the xine project. When you make and
-dnl distribute a modified version of the Autoconf Macro, you may extend
-dnl this special exception to the GPL to apply to your modified version as
-dnl well.
-
-
-dnl Usage AC_IOCTL_REQUEST
-AC_DEFUN([AC_IOCTL_REQUEST], [
- 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()])
-])
diff --git a/m4/irixal.m4 b/m4/irixal.m4
deleted file mode 100644
index 3ff633cf8..000000000
--- a/m4/irixal.m4
+++ /dev/null
@@ -1,19 +0,0 @@
-dnl AM_CHECK_IRIXAL ([ACTION-IF-YES], [ACTION-IF-NO])
-dnl Configure paths/version for IRIX AL
-AC_DEFUN([AM_CHECK_IRIXAL],
- [AC_CACHE_CHECK([for IRIX libaudio support],
- [am_cv_have_irixal],
- [AC_CHECK_HEADER([dmedia/audio.h],
- am_cv_have_irixal=yes, am_cv_have_irixal=no)])
- if test "x$am_cv_have_irixal" = xyes ; then
- IRIXAL_LIBS="-laudio"
- IRIXAL_STATIC_LIB="/usr/lib/libaudio.a"
- ifelse([$1], , :, [$1])
- else
- ifelse([$2], , :, [$2])
- fi
- AC_SUBST(IRIXAL_CFLAGS)
- AC_SUBST(IRIXAL_STATIC_LIB)
- AC_SUBST(IRIXAL_LIBS)
-])
-
diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4
deleted file mode 100644
index 74dc8f26d..000000000
--- a/m4/isc-posix.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-# isc-posix.m4 serial 2 (gettext-0.11.2)
-dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
-
-# This test replaces the one in autoconf.
-# Currently this macro should have the same name as the autoconf macro
-# because gettext's gettext.m4 (distributed in the automake package)
-# still uses it. Otherwise, the use in gettext.m4 makes autoheader
-# give these diagnostics:
-# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
-# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
-
-undefine([AC_ISC_POSIX])
-
-AC_DEFUN([AC_ISC_POSIX],
- [
- dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
- AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
- ]
-)
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
deleted file mode 100644
index 19aa77e4f..000000000
--- a/m4/lcmessage.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-# lcmessage.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-
-AC_DEFUN([gt_LC_MESSAGES],
-[
- AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
- if test $gt_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your <locale.h> file defines LC_MESSAGES.])
- fi
-])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
deleted file mode 100644
index 96c4e2c33..000000000
--- a/m4/lib-ld.m4
+++ /dev/null
@@ -1,110 +0,0 @@
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes ;;
-*)
- acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- [re_direlt='/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break ;;
- *)
- test "$with_gnu_ld" != yes && break ;;
- esac
- fi
- done
- IFS="$ac_save_ifs"
-else
- acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
diff --git a/m4/libFLAC.m4 b/m4/libFLAC.m4
index 7ad896b05..0bca54d97 100644
--- a/m4/libFLAC.m4
+++ b/m4/libFLAC.m4
@@ -13,6 +13,33 @@ AC_ARG_WITH(libFLAC-libraries, AS_HELP_STRING([--with-libFLAC-libraries=DIR], [d
AC_ARG_WITH(libFLAC-includes, AS_HELP_STRING([--with-libFLAC-includes=DIR], [directory where libFLAC header files are installed (optional)]), libFLAC_includes="$withval", libFLAC_includes="")
AC_ARG_ENABLE(libFLACtest, AS_HELP_STRING([--disable-libFLACtest], [do not try to compile and run a test libFLAC program]), enable_libFLACtest=$enableval, enable_libFLACtest=yes)
+ AC_MSG_CHECKING([libdir name])
+ case $host_or_hostalias in
+ *-*-linux*)
+ # Test if the compiler is 64bit
+ echo 'int i;' > conftest.$ac_ext
+ xine_cv_cc_64bit_output=no
+ if AC_TRY_EVAL(ac_compile); then
+ case `"$MAGIC_CMD" conftest.$ac_objext` in
+ *"ELF 64"*)
+ xine_cv_cc_64bit_output=yes
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
+ case $host_cpu:$xine_cv_cc_64bit_output in
+ powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
+ XINE_LIBNAME="lib64"
+ ;;
+ *:*)
+ XINE_LIBNAME="lib"
+ ;;
+ esac
+ AC_MSG_RESULT([$XINE_LIBNAME])
+
if test "x$libFLAC_libraries" != "x" ; then
LIBFLAC_LIBS="-L$libFLAC_libraries"
elif test "x$libFLAC_prefix" != "x" ; then
diff --git a/m4/libfame.m4 b/m4/libfame.m4
deleted file mode 100644
index bf54f1e80..000000000
--- a/m4/libfame.m4
+++ /dev/null
@@ -1,183 +0,0 @@
-dnl AM_PATH_LIBFAME([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for libfame, and define LIBFAME_CFLAGS and LIBFAME_LIBS
-dnl Vivien Chappelier 12/11/00
-dnl stolen from ORBit autoconf
-dnl
-AC_DEFUN([AM_PATH_LIBFAME],
-[dnl
-dnl Get the cflags and libraries from the libfame-config script
-dnl
-AC_ARG_WITH(libfame-prefix, AS_HELP_STRING([--with-libfame-prefix=DIR], [prefix where libfame is installed (optional)]),
- libfame_config_prefix="$withval", libfame_config_prefix="")
-AC_ARG_WITH(libfame-exec-prefix, AS_HELP_STRING([--with-libfame-exec-prefix=DIR], [exec prefix where libfame is installed (optional)]),
- libfame_config_exec_prefix="$withval", libfame_config_exec_prefix="")
-AC_ARG_ENABLE(libfametest, AS_HELP_STRING([--disable-libfametest], [do not try to compile and run a test libfame program]),
- enable_libfametest=$enableval, enable_libfametest=yes)
-
- if test x$libfame_config_exec_prefix != x ; then
- libfame_config_args="$libfame_config_args --exec-prefix=$libfame_config_exec_prefix"
- if test x${LIBFAME_CONFIG+set} != xset ; then
- LIBFAME_CONFIG=$libfame_config_exec_prefix/bin/libfame-config
- fi
- fi
- if test x$libfame_config_prefix != x ; then
- libfame_config_args="$libfame_config_args --prefix=$libfame_config_prefix"
- if test x${LIBFAME_CONFIG+set} != xset ; then
- LIBFAME_CONFIG=$libfame_config_prefix/bin/libfame-config
- fi
- fi
-
- AC_PATH_TOOL(LIBFAME_CONFIG, libfame-config, no)
- min_libfame_version=ifelse([$1], , 0.9.0, $1)
- AC_MSG_CHECKING(for libfame - version >= $min_libfame_version)
- no_libfame=""
- if test "$LIBFAME_CONFIG" = "no" ; then
- no_libfame=yes
- else
- LIBFAME_CFLAGS=`$LIBFAME_CONFIG $libfame_config_args --cflags`
- LIBFAME_LIBS=`$LIBFAME_CONFIG $libfame_config_args --libs`
- libfame_config_major_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- libfame_config_minor_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- libfame_config_micro_version=`$LIBFAME_CONFIG $libfame_config_args --version | \
- sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_libfametest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $LIBFAME_CFLAGS"
- LIBS="$LIBFAME_LIBS $LIBS"
-dnl
-dnl Now check if the installed LIBFAME is sufficiently new. (Also sanity
-dnl checks the results of libfame-config to some extent
-dnl
- rm -f conf.libfametest
- AC_TRY_RUN([
-#include <fame.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main ()
-{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.libfametest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = strdup("$min_libfame_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
- printf("%s, bad version string\n", "$min_libfame_version");
- exit(1);
- }
-
- if ((libfame_major_version != $libfame_config_major_version) ||
- (libfame_minor_version != $libfame_config_minor_version) ||
- (libfame_micro_version != $libfame_config_micro_version))
- {
- printf("\n*** 'libfame-config --version' returned %d.%d.%d, but Libfame (%d.%d.%d)\n",
- $libfame_config_major_version, $libfame_config_minor_version, $libfame_config_micro_version,
- libfame_major_version, libfame_minor_version, libfame_micro_version);
- printf ("*** was found! If libfame-config was correct, then it is best\n");
- printf ("*** to remove the old version of libfame. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If libfame-config was wrong, set the environment variable LIBFAME_CONFIG\n");
- printf("*** to point to the correct copy of libfame-config, and remove the file config.cache\n");
- printf("*** before re-running configure\n");
- }
-#if defined (LIBFAME_MAJOR_VERSION) && defined (LIBFAME_MINOR_VERSION) && defined (LIBFAME_MICRO_VERSION)
- else if ((libfame_major_version != LIBFAME_MAJOR_VERSION) ||
- (libfame_minor_version != LIBFAME_MINOR_VERSION) ||
- (libfame_micro_version != LIBFAME_MICRO_VERSION))
- {
- printf("*** libfame header files (version %d.%d.%d) do not match\n",
- LIBFAME_MAJOR_VERSION, LIBFAME_MINOR_VERSION, LIBFAME_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- libfame_major_version, libfame_minor_version, libfame_micro_version);
- }
-#endif /* defined (LIBFAME_MAJOR_VERSION) ... */
- else
- {
- if ((libfame_major_version > major) ||
- ((libfame_major_version == major) && (libfame_minor_version > minor)) ||
- ((libfame_major_version == major) && (libfame_minor_version == minor) && (libfame_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of libfame (%d.%d.%d) was found.\n",
- libfame_major_version, libfame_minor_version, libfame_micro_version);
- printf("*** You need a version of libfame newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** libfame is always available from http://www-eleves.enst-bretagne.fr/~chappeli/fame\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the libfame-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of libfame, but you can also set the LIBFAME_CONFIG environment to point to the\n");
- printf("*** correct copy of libfame-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-],, no_libfame=yes,
- AC_TRY_LINK([
-#include <fame.h>
-#include <stdio.h>
-], [ return 0; ],, no_libfame=yes))
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_libfame" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$LIBFAME_CONFIG" = "no" ; then
- echo "*** The libfame-config script installed by libfame could not be found"
- echo "*** If libfame was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the LIBFAME_CONFIG environment variable to the"
- echo "*** full path to libfame-config."
- else
- if test -f conf.libfametest ; then
- :
- else
- echo "*** Could not run libfame test program, checking why..."
- CFLAGS="$CFLAGS $LIBFAME_CFLAGS"
- LIBS="$LIBS $LIBFAME_LIBS"
- AC_TRY_LINK([
-#include <fame.h>
-#include <stdio.h>
-], [ return ((libfame_major_version) || (libfame_minor_version) || (libfame_micro_version)); ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding libfame or finding the wrong"
- echo "*** version of LIBFAME. If it is not finding libfame, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means libfame was incorrectly installed"
- echo "*** or that you have moved libfame since it was installed. In the latter case, you"
- echo "*** may want to edit the libfame-config script: $LIBFAME_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- ifelse([$3], , :, [$3])
- fi
-
- AC_SUBST(LIBFAME_CFLAGS)
- AC_SUBST(LIBFAME_LIBS)
- rm -f conf.libfametest
-])
diff --git a/m4/macosx.m4 b/m4/macosx.m4
new file mode 100644
index 000000000..0151b41e9
--- /dev/null
+++ b/m4/macosx.m4
@@ -0,0 +1,43 @@
+AC_DEFUN([MACOSX_UNIVERSAL_BINARIES], [
+ AC_ARG_ENABLE([macosx-universal],
+ AS_HELP_STRING([--enable-macosx-universal], [build universal binaries for Mac OS X)]),
+ [], [enable_macosx_universal="no"])
+ if test x"$enable_macosx_universal" != x"no" ; then
+ case "$host_os" in
+ *darwin*)
+ dnl x64_64 and ppc64 binaries could also be built, but there is no
+ dnl version of Mac OS X currently shipping that can run them, so
+ dnl do not enable them by default for now.
+ if test x"$enable_macosx_universal" = x"yes" ; then
+ UNIVERSAL_ARCHES="i386 ppc"
+ else
+ UNIVERSAL_ARCHES=`echo "$enable_macosx_universal" | sed -e 's/,/ /g'`
+ fi
+ ;;
+ *)
+ AC_MSG_ERROR([Universal binaries can only be built on Darwin])
+ ;;
+ esac
+ AC_SUBST(UNIVERSAL_ARCHES)
+
+ CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+ LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
+
+ if test x"$UNIVERSAL_ARCHES" != x"" ; then
+ # Forcibly disable dependency tracking for Universal builds, because -M
+ # does not work with multiple -arch arguments on the gcc command-line.
+ ac_tool_warned=yes
+ cross_compiling=yes
+ enable_dependency_tracking=no
+ host="`echo $host | sed -e s/$host_cpu/universal/g`"
+ host_cpu=universal
+
+ AC_DEFINE([XINE_MACOSX_UNIVERSAL_BINARY], 1, [Define this if a universal binary is being built for Mac OS X])
+ for arch in $UNIVERSAL_ARCHES ; do
+ UNIVERSAL_CFLAGS="$UNIVERSAL_CFLAGS -arch $arch"
+ UNIVERSAL_LDFLAGS="$UNIVERSAL_LDFLAGS -arch $arch"
+ done
+ fi
+ fi
+ AM_CONDITIONAL([MACOSX_UNIVERSAL_BINARY], [test x"$enable_macosx_universal" = x"yes"])
+])dnl MACOSX_UNIVERSAL_BINARIES
diff --git a/m4/objc.m4 b/m4/objc.m4
new file mode 100644
index 000000000..73dd8b6a0
--- /dev/null
+++ b/m4/objc.m4
@@ -0,0 +1,253 @@
+# Extracted from autoconf 2.61 to obtain Objective C macros.
+# Only expand if the version of autoconf in use doesn't have the macro itself.
+m4_ifdef([AC_PROG_OBJC], [], [
+
+# This file is part of Autoconf. -*- Autoconf -*-
+# Programming languages support.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf. You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them. The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf. We call these the "data" portions. The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case. We call these
+# comments and executable code the "non-data" portions. Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation. When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with. (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.) If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+#
+# Written by David MacKenzie, with help from
+# Akim Demaille, Paul Eggert,
+# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+
+# ------------------------------ #
+# 1d. The Objective C language. #
+# ------------------------------ #
+
+
+# AC_LANG(Objective C)
+# --------------------
+m4_define([AC_LANG(Objective C)],
+[ac_ext=m
+ac_cpp='$OBJCPP $CPPFLAGS'
+ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
+ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
+ac_compiler_gnu=$ac_cv_objc_compiler_gnu
+])
+
+
+# AC_LANG_OBJC
+# ------------
+AU_DEFUN([AC_LANG_OBJC], [AC_LANG(Objective C)])
+
+
+# _AC_LANG_ABBREV(Objective C)
+# ----------------------------
+m4_define([_AC_LANG_ABBREV(Objective C)], [objc])
+
+
+# _AC_LANG_PREFIX(Objective C)
+# ----------------------------
+m4_define([_AC_LANG_PREFIX(Objective C)], [OBJC])
+
+
+# ------------------------- #
+# 2d. Objective C sources. #
+# ------------------------- #
+
+# AC_LANG_SOURCE(Objective C)(BODY)
+# ---------------------------------
+m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(Objective C)])
+
+
+# AC_LANG_PROGRAM(Objective C)([PROLOGUE], [BODY])
+# ------------------------------------------------
+m4_copy([AC_LANG_PROGRAM(C)], [AC_LANG_PROGRAM(Objective C)])
+
+
+# AC_LANG_CALL(Objective C)(PROLOGUE, FUNCTION)
+# ---------------------------------------------
+m4_copy([AC_LANG_CALL(C)], [AC_LANG_CALL(Objective C)])
+
+
+# AC_LANG_FUNC_LINK_TRY(Objective C)(FUNCTION)
+# --------------------------------------------
+m4_copy([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_FUNC_LINK_TRY(Objective C)])
+
+
+# AC_LANG_BOOL_COMPILE_TRY(Objective C)(PROLOGUE, EXPRESSION)
+# -----------------------------------------------------------
+m4_copy([AC_LANG_BOOL_COMPILE_TRY(C)], [AC_LANG_BOOL_COMPILE_TRY(Objective C)])
+
+
+# AC_LANG_INT_SAVE(Objective C)(PROLOGUE, EXPRESSION)
+# ---------------------------------------------------
+m4_copy([AC_LANG_INT_SAVE(C)], [AC_LANG_INT_SAVE(Objective C)])
+
+
+# ------------------------------ #
+# 3d. The Objective C compiler. #
+# ------------------------------ #
+
+# AC_LANG_PREPROC(Objective C)
+# ----------------------------
+# Find the Objective C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able.
+m4_defun([AC_LANG_PREPROC(Objective C)],
+[AC_REQUIRE([AC_PROG_OBJCPP])])
+
+
+# AC_PROG_OBJCPP
+# --------------
+# Find a working Objective C preprocessor.
+AC_DEFUN([AC_PROG_OBJCPP],
+[AC_REQUIRE([AC_PROG_OBJC])dnl
+AC_ARG_VAR([OBJCPP], [Objective C preprocessor])dnl
+_AC_ARG_VAR_CPPFLAGS()dnl
+AC_LANG_PUSH(Objective C)dnl
+AC_MSG_CHECKING([how to run the Objective C preprocessor])
+if test -z "$OBJCPP"; then
+ AC_CACHE_VAL(ac_cv_prog_OBJCPP,
+ [dnl
+ # Double quotes because OBJCPP needs to be expanded
+ for OBJCPP in "$OBJC -E" "/lib/cpp"
+ do
+ _AC_PROG_PREPROC_WORKS_IFELSE([break])
+ done
+ ac_cv_prog_OBJCPP=$OBJCPP
+ ])dnl
+ OBJCPP=$ac_cv_prog_OBJCPP
+else
+ ac_cv_prog_OBJCPP=$OBJCPP
+fi
+AC_MSG_RESULT([$OBJCPP])
+_AC_PROG_PREPROC_WORKS_IFELSE([],
+ [AC_MSG_FAILURE([Objective C preprocessor "$OBJCPP" fails sanity check])])
+AC_SUBST(OBJCPP)dnl
+AC_LANG_POP(Objective C)dnl
+])# AC_PROG_OBJCPP
+
+
+# AC_LANG_COMPILER(Objective C)
+# -----------------------------
+# Find the Objective C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able.
+m4_defun([AC_LANG_COMPILER(Objective C)],
+[AC_REQUIRE([AC_PROG_OBJC])])
+
+
+
+# AC_PROG_OBJC([LIST-OF-COMPILERS])
+# ---------------------------------
+# LIST-OF-COMPILERS is a space separated list of Objective C compilers to
+# search for (if not specified, a default list is used). This just gives
+# the user an opportunity to specify an alternative search list for the
+# Objective C compiler.
+# objcc StepStone Objective-C compiler (also "standard" name for OBJC)
+# objc David Stes' POC. If you installed this, you likely want it.
+# cc Native C compiler (for instance, Apple).
+# CC You never know.
+AN_MAKEVAR([OBJC], [AC_PROG_OBJC])
+AN_PROGRAM([objcc], [AC_PROG_OBJC])
+AN_PROGRAM([objc], [AC_PROG_OBJC])
+AC_DEFUN([AC_PROG_OBJC],
+[AC_LANG_PUSH(Objective C)dnl
+AC_ARG_VAR([OBJC], [Objective C compiler command])dnl
+AC_ARG_VAR([OBJCFLAGS], [Objective C compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+dnl _AC_ARG_VAR_LIBS()dnl
+_AC_ARG_VAR_CPPFLAGS()dnl
+_AC_ARG_VAR_PRECIOUS([OBJC])dnl
+AC_CHECK_TOOLS(OBJC,
+ [m4_default([$1], [gcc objcc objc cc CC])],
+ gcc)
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD
+ac_compiler=`set X $ac_compile; echo $[2]`
+_AC_EVAL([$ac_compiler --version </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -v </dev/null >&AS_MESSAGE_LOG_FD])
+_AC_EVAL([$ac_compiler -V </dev/null >&AS_MESSAGE_LOG_FD])
+
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+_AC_LANG_COMPILER_GNU
+GOBJC=`test $ac_compiler_gnu = yes && echo yes`
+_AC_PROG_OBJC_G
+AC_LANG_POP(Objective C)dnl
+])# AC_PROG_OBJC
+
+
+# _AC_PROG_OBJC_G
+# ---------------
+# Check whether -g works, even if OBJCFLAGS is set, in case the package
+# plays around with OBJCFLAGS (such as to build both debugging and
+# normal versions of a library), tasteless as that idea is.
+# Don't consider -g to work if it generates warnings when plain compiles don't.
+m4_define([_AC_PROG_OBJC_G],
+[ac_test_OBJCFLAGS=${OBJCFLAGS+set}
+ac_save_OBJCFLAGS=$OBJCFLAGS
+AC_CACHE_CHECK(whether $OBJC accepts -g, ac_cv_prog_objc_g,
+ [ac_save_objc_werror_flag=$ac_objc_werror_flag
+ ac_objc_werror_flag=yes
+ ac_cv_prog_objc_g=no
+ OBJCFLAGS="-g"
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [ac_cv_prog_objc_g=yes],
+ [OBJCFLAGS=""
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [],
+ [ac_objc_werror_flag=$ac_save_objc_werror_flag
+ OBJCFLAGS="-g"
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [ac_cv_prog_objc_g=yes])])])
+ ac_objc_werror_flag=$ac_save_objc_werror_flag])
+if test "$ac_test_OBJCFLAGS" = set; then
+ OBJCFLAGS=$ac_save_OBJCFLAGS
+elif test $ac_cv_prog_objc_g = yes; then
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-g -O2"
+ else
+ OBJCFLAGS="-g"
+ fi
+else
+ if test "$GOBJC" = yes; then
+ OBJCFLAGS="-O2"
+ else
+ OBJCFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_OBJC_G
+])dnl m4_ifdef([AC_PROG_OBJC])
diff --git a/m4/opengl.m4 b/m4/opengl.m4
deleted file mode 100644
index f718fc848..000000000
--- a/m4/opengl.m4
+++ /dev/null
@@ -1,74 +0,0 @@
-dnl
-dnl Check for OpenGL & GLU
-dnl
-dnl AM_PATH_OPENGL([ACTION IF FOUND [, ACTION IF NOT FOUND]])
-dnl
-
-AC_DEFUN([AM_PATH_OPENGL], [
-
- AC_ARG_ENABLE(opengl, AS_HELP_STRING([--disable-opengl], [do not build OpenGL plugin]),
- [enableopengl=$enableval],
- [enableopengl="yes"]
- )
- AC_ARG_ENABLE(glu, AS_HELP_STRING([--disable-glu], [build OpenGL plugin without GLU (no verbose errors)]),
- [enableglu=$enableval],
- [enableglu="yes"]
- )
-
- if test x$enableopengl = "xyes"; then
- AC_CHECK_LIB(GL, glBegin,
- [AC_CHECK_LIB(m, tan,
- [AC_CHECK_HEADER(GL/gl.h,
- [ac_have_opengl="yes"
- OPENGL_LIBS="-lGL -lm"
- AC_DEFINE(HAVE_OPENGL,1,[Define this if you have OpenGL support available])
- dnl
- dnl need to check with some test if this linking with -lGLU actually works...
- dnl check for GLU
- dnl
- if test x$enableglu = "xyes"; then
- AC_CHECK_LIB(GLU, gluPerspective,
- [AC_CHECK_HEADER(GL/glu.h,
- [AC_MSG_CHECKING([if GLU is sane])
- ac_save_LIBS="$LIBS"
- LIBS="$X_LIBS $XPRE_LIBS $OPENGL_LIBS -lGLU $X_EXTRA_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <GL/gl.h>
-#include <GL/glu.h>]], [[ gluPerspective(45.0f,1.33f,1.0f,1000.0f); glBegin(GL_POINTS); glEnd(); return 0 ]])],
- [ ac_have_glu="yes"
- GLU_LIBS="-lGLU"
- AC_DEFINE(HAVE_GLU,1,[Define this if you have GLU support available])
- AC_MSG_RESULT(yes)],
- [ AC_MSG_RESULT(no)
- echo "*** GLU doesn't link with GL; GLU is disabled ***"])
- LIBS="$ac_save_LIBS"]
- )],
- [],
- [$X_LIBS $X_PRE_LIBS $OPENGL_LIBS -lGLU $X_EXTRA_LIBS]
- )
- fi
- ]
- )],
- [],
- [$X_LIBS $X_PRE_LIBS -lGL -lm $X_EXTRA_LIBS]
- )],
- [],
- [$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS]
- )
- if test x$ac_have_opengl = "xyes"; then
- ac_use_opengl=yes
- fi
- fi
-
- AC_SUBST(OPENGL_CFLAGS)
- AC_SUBST(OPENGL_LIBS)
- AC_SUBST(GLU_LIBS)
- AM_CONDITIONAL(HAVE_OPENGL, [test x$ac_use_opengl = "xyes"])
-
- dnl result
- if test x$ac_use_opengl = "xyes"; then
- ifelse([$1], , :, [$1])
- else
- ifelse([$2], , :, [$2])
- fi
-
-])
diff --git a/m4/optimizations.m4 b/m4/optimizations.m4
deleted file mode 100644
index f4880093c..000000000
--- a/m4/optimizations.m4
+++ /dev/null
@@ -1,244 +0,0 @@
-dnl
-dnl M4 macro to add support for extra optimizations
-dnl
-dnl It understand --enable/--disable-optimizations .
-dnl when optimizations are disabled, it does not touch cflags
-dnl
-dnl Note: always disable while crosscompiling
-dnl
-
-AC_DEFUN([AC_OPTIMIZATIONS], [
- AC_ARG_ENABLE([optimizations],
- AS_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable]))
-
- if test "x$enable_optimizations" != "xno"; then
- INLINE_FUNCTIONS=-finline-functions
-
- if test "$GCC" = yes; then
- dnl
- dnl check cflags not supported by all gcc versions
- CC_CHECK_CFLAGS([-fschedule-insns2], f_si="-fschedule-insns2", f_si="")
- CC_CHECK_CFLAGS([-mwide-multiply], m_wm="-mwide-multiply", m_wm="")
- dnl
- dnl gcc 3.1 uses the -f version
- dnl
- CC_CHECK_CFLAGS([-falign-functions=4], f_af="-falign-functions=4",
- f_af="-malign-functions=4")
- CC_CHECK_CFLAGS([-falign-loops=4], f_al="-falign-loops=4",
- f_al="-malign-loops=4")
- CC_CHECK_CFLAGS([-falign-jumps=4], f_aj="-falign-jumps=4",
- f_aj="-malign-jumps=4")
- dnl
- dnl Check for some optimization disabling
- dnl needed for win32 code
- dnl
- 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)
- dnl
- dnl Multipass compilation
- dnl
- CC_CHECK_CFLAGS([-fprofile-arcs], PASS1_CFLAGS="-fprofile-arcs $PASS1_CFLAGS",)
- CC_CHECK_CFLAGS([-fbranch-probabilities], PASS2_CFLAGS="-fbranch-probabilities $PASS2_CFLAGS",)
- AC_SUBST(PASS1_CFLAGS)
- AC_SUBST(PASS2_CFLAGS)
- dnl some combinations of gcc+glibc produce useless warnings on memset
- dnl when compiling with -Wpointer-arith, so we check for this first
- AC_MSG_CHECKING(for sane -Wpointer-arith)
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="-O2 -Wpointer-arith -Werror $CFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[int a; memset(&a, 0, sizeof(int));]])],
- [AC_MSG_RESULT(yes); CFLAGS="-Wpointer-arith $SAVE_CFLAGS"],
- [AC_MSG_RESULT(no); CFLAGS="$SAVE_CFLAGS"]);
-
- dnl gcc 3.3.5 (at least) is known to be buggy wrt optimisation and
- dnl -finline-functions. Use -fno-inline-functions for gcc < 3.4.0.
-
- AC_MSG_CHECKING(for gcc 3.4.0 or later)
- newGCC="`$CC -dumpversion |
- awk -F. '{ if ((@S|@1 * 10000 + @S|@2 * 100 + @S|@3) >= 30400) { print "yes" } }'
- `"
- AC_MSG_RESULT(${newGCC:-no - assuming bugginess in -finline-functions})
- test "$newGCC" = yes || INLINE_FUNCTIONS=-fno-inline-functions
- fi
-
- CFLAGS="$wall ${CFLAGS}"
- DEBUG_CFLAGS="$wall ${DEBUG_CFLAGS}"
-
- case "$host_or_hostalias" in
- i?86-* | k?-* | athlon-* | pentium*)
- if test "$GCC" = yes -o "${CC##*/}x" = "iccx" ; then
-
- if test "$GCC" = yes; then
- dnl Check for gcc cpu optimization support
- CC_CHECK_CFLAGS("-mtune=i386",
- sarchopt="-mtune",
- CC_CHECK_CFLAGS("-mcpu=i386",
- sarchopt="-mcpu",
- CC_CHECK_CFLAGS("-march=i386",
- sarchopt="-march",
- [ AC_MSG_RESULT(** no cpu optimization supports **)
- sarchopt=no
- ]
- )
- )
- )
-
- dnl special check for k7 cpu CC support
- CC_CHECK_CFLAGS([$sarchopt=athlon], k7cpu="athlon", k7cpu="i686")
-
- dnl add x86 specific gcc CFLAGS
- CFLAGS="-O3 -pipe -fomit-frame-pointer $f_af $f_al $f_aj $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS"
-
- DEBUG_CFLAGS="-O $DEBUG_CFLAGS"
-
- if test x"$sarchopt" != "xno"; then
- archopt_val=
-
- case "$host_or_hostalias" in
- i386-*)
- archopt_val="i386" ;;
- i486-*)
- archopt_val="i486" ;;
- i586-*)
- archopt_val="pentium"
- ;;
- pentium-mmx-*)
- archopt_val="pentium-mmx"
- ;;
- pentiumpro-* | pentium2-* | i686-*)
- archopt_val="pentiumpro"
- if test x"$check_athlon" = "xyes"; 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*)
- archopt_val="$k7cpu"
- ;;
- VIAEzra)
- archopt_val="c3"
- ;;
- esac
- fi
- fi
- ;;
- k6-2-* | k6-3-*)
- archopt_val="k6-2"
- ;;
- k6-*)
- archopt_val="k6"
- ;;
- pentium3-*)
- archopt_val="pentium3"
- ;;
- pentium4-*)
- archopt_val="pentium4"
- ;;
- athlon-4-* | athlon-xp-* | athlon-mp-*)
- archopt_val="athlon-4"
- ;;
- k7-* | athlon-tbird-* | athlon-*)
- archopt_val="athlon"
- ;;
-
- esac
- if test x"$archopt_val" != x; then
- CFLAGS="$sarchopt=$archopt_val $CFLAGS"
- DEBUG_CFLAGS="$sarchopt=$archopt_val $DEBUG_CFLAGS"
- fi
- fi
- else
- dnl we have the Intel compiler
- CFLAGS="-unroll -ipo -ipo_obj -O3 $CFLAGS"
- PASS1_CFLAGS="-prof_genx -prof_dir \$(PWD)/\$(top_builddir)/ $PASS1_CFLAGS"
- PASS2_CFLAGS="-prof_use -prof_dir \$(PWD)/\$(top_builddir)/ $PASS2_CFLAGS"
- AC_SUBST(PASS1_CFLAGS)
- AC_SUBST(PASS2_CFLAGS)
- fi
-
- else
- dnl add x86 specific cc CFLAGS
- CFLAGS="-O $CFLAGS"
- DEBUG_CFLAGS="-O $DEBUG_CFLAGS"
- AC_DEFINE_UNQUOTED(FPM_64BIT,,[Define to select libmad fixed point arithmetic implementation])
- fi
- ;;
- alphaev56-*)
- CFLAGS="-O3 -mcpu=ev56 -mieee $CFLAGS"
- DEBUG_CFLAGS="-O3 -mcpu=ev56 -mieee $DEBUG_CFLAGS"
- ;;
- alpha*)
- CFLAGS="-O3 -mieee $CFLAGS"
- DEBUG_CFLAGS="-O3 -mieee $DEBUG_CFLAGS"
- ;;
- *darwin*)
- CFLAGS="-O3 -pipe -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS -no-cpp-precomp -D_INTL_REDIRECT_MACROS $CFLAGS"
- DEBUG_CFLAGS="-O3 $DEBUG_CFLAGS"
- ;;
- ppc-*-linux* | powerpc-*)
- CFLAGS="-O3 -pipe -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS"
- DEBUG_CFLAGS="-O3 $DEBUG_CFLAGS"
- ;;
- sparc*-*-linux*)
- CFLAGS="-O3 $cpu_cflags $INLINE_FUNCTIONS $CFLAGS"
- DEBUG_CFLAGS="-O $cpu_cflags $INLINE_FUNCTIONS $DEBUG_CFLAGS"
-
- case `uname -m` in
- sparc)
- cpu_cflags="-mcpu=supersparc -mtune=supersparc" ;;
- sparc64)
- cpu_cflags="-mcpu=ultrasparc -mtune=ultrasparc" ;;
- esac
- ;;
- sparc-*-solaris*)
- if test "$GCC" = yes; then
- case `uname -m` in
- sun4c) cpu_cflags="-mcpu=v7 -mtune=supersparc" ;;
- sun4m) cpu_cflags="-mcpu=v8 -mtune=supersparc" ;;
- sun4u)
- case `$CC --version 2>/dev/null` in
- 1.*|2.*)
- # -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.*
- cpu_cflags="-mcpu=v8 -mtune=ultrasparc"
- ;;
- *)
- # GCC 3 or newer should have no problem with -mcpu=ultrasparc
- cpu_cflags="-mcpu=ultrasparc -mtune=ultrasparc"
- ;;
- esac
- ;;
- esac
- cc_optimize_cflags="-O3 $cpu_cflags $INLINE_FUNCTIONS"
- cc_debug_cflags="-O $cpu_cflags $INLINE_FUNCTIONS"
- else
- case `uname -m` in
- sun4c) cpu_cflags="-xarch=v7" ;;
- sun4m) cpu_cflags="-xarch=v8" ;;
- sun4u) cpu_cflags="-xarch=v8plusa" ;;
- esac
- cc_optimize_cflags="-fast $cpu_cflags -xCC"
- cc_debug_cflags="-O"
- fi
-
- CFLAGS="$cc_optimize_cflags $CFLAGS"
- DEBUG_CFLAGS="$cc_debug_cflags $DEBUG_CFLAGS"
- ;;
- x86_64-*)
- CFLAGS="-O3 -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS"
- DEBUG_CFLAGS="-g $DEBUG_CFLAGS"
- ;;
- armv4l-*-linux*)
- CFLAGS="-O2 -fsigned-char -ffast-math -mcpu=strongarm1100 -fomit-frame-pointer -fthread-jumps -fregmove $CFLAGS"
- dnl CFLAGS="-O1 -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 $INLINE_FUNCTIONS -fsigned-char -fomit-frame-pointer -march=armv4 -mtune=strongarm $CFLAGS"
- DEBUG_CFLAGS="-O2 $DEBUG_CFLAGS"
- ;;
- esac
- fi
-])
-
-dnl Kate modeline: leave at the end
-dnl kate: indent-width 2; replace-trailing-space-save 1; space-indent 1; backspace-indents 1;
diff --git a/m4/package.m4 b/m4/package.m4
new file mode 100644
index 000000000..0ee28830a
--- /dev/null
+++ b/m4/package.m4
@@ -0,0 +1,72 @@
+dnl _ACX_VERSION_PARSE(version)
+AC_DEFUN([_ACX_VERSION_PARSE], [`echo $1 | perl -e 'my $v = <>; chomp $v;
+my @v = split(" ", $v); $v = $v[[@S|@#v]]; $v =~ s/[[^0-9.]].*$//; @v = split (/\./, $v);
+push @v, 0 while $[#v] < 2; print $v[[0]] * 10000 + $v[[1]] * 100 + $v[[2]], "\n"'`])
+
+dnl ACX_VERSION_CHECK(required, actual)
+AC_DEFUN([ACX_VERSION_CHECK], [
+ required_version=ifelse([$1], , [0.0.0], [$1])
+ required_version_parsed=_ACX_VERSION_PARSE([$required_version])
+ actual_version=ifelse([$2], , [0.0.0], [$2])
+ actual_version_parsed=_ACX_VERSION_PARSE([$actual_version])
+ if test $required_version_parsed -le $actual_version_parsed; then
+ ifelse([$3], , [:], [$3])
+ else
+ ifelse([$4], , [:], [$4])
+ fi
+])
+
+AC_DEFUN([ASX_TR_LOWER], [m4_translit([[$1]], [ABCDEFGHIJKLMNOPQRSTUVWXYZ], [abcdefghijklmnopqrstuvwxyz])])
+
+dnl ACX_PACKAGE_CHECK(VARIABLE-PREFIX, MINIMUM-VERSION, CONFIG-SCRIPT,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([ACX_PACKAGE_CHECK], [
+ AC_ARG_VAR($1_CONFIG, [Full path to $3])
+ AC_ARG_WITH(ASX_TR_LOWER([$1][-prefix]),
+ [AS_HELP_STRING(ASX_TR_LOWER([--with-][$1][-prefix])[=PATH], [prefix where $3 is installed (optional)])],
+ [package_config_prefix="$withval"], [package_config_prefix=""])
+ AC_ARG_WITH(ASX_TR_LOWER([$1][-exec-prefix]),
+ [AS_HELP_STRING(ASX_TR_LOWER([--with-][$1][-exec-prefix])[=PATH], [exec prefix where $3 is installed (optional)])],
+ [package_config_exec_prefix="$withval"], [package_config_exec_prefix=""])
+ package_config_args=""
+ if test x"$package_config_exec_prefix" != x""; then
+ package_config_args="$package_config_args --exec-prefix=$package_config_exec_prefix"
+ test x"${$1_CONFIG+set}" != x"set" && $1_CONFIG="$package_config_exec_prefix/bin/$3"
+ fi
+ if test x"$package_config_prefix" != x""; then
+ package_config_args="$package_config_args --prefix=$package_config_prefix"
+ test x"${$1_CONFIG+set}" != x"set" && $1_CONFIG="$package_config_prefix/bin/$3"
+ fi
+
+ min_package_version=ifelse([$2], , [0.0.0], [$2])
+ AC_PATH_TOOL([$1_CONFIG], [$3], [no])
+ AC_MSG_CHECKING([for $1 version >= $min_package_version])
+ if test x"$$1_CONFIG" = x"no"; then
+ AC_MSG_RESULT([unknown])
+ AC_MSG_NOTICE([The $3 script installed by $1 could not be found.
+*** If $1 was installed in PREFIX, make sure PREFIX/bin is in your path, or
+*** set the $1_CONFIG environment variable to the full path to the program.])
+ else
+ [$1][_CFLAGS]="`$$1_CONFIG $package_config_args --cflags`"
+ [$1][_LIBS]="`$$1_CONFIG $package_config_args --libs`"
+ [$1][_VERSION]="`$$1_CONFIG $package_config_args --version`"
+ ACX_VERSION_CHECK([$min_package_version], [$[$1][_VERSION]],
+ [package_version_ok=yes; AC_MSG_RESULT([yes -- $[$1][_VERSION]])],
+ [[$1][_CFLAGS]="" [$1][_LIBS]=""; AC_MSG_RESULT([no -- $[$1][_VERSION]])
+ AC_MSG_NOTICE([If you have already installed a sufficiently new version,
+*** this error probably means that the wrong copy of the $3
+*** shell script is being found. The easiest way to fix this is to remove the
+*** old version, but you can also set the $1_CONFIG environment
+*** variable to point to the correct copy. In this case, you will have to
+*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf
+*** so that the correct libraries are found at run-time.])])
+ fi
+
+ if test x"$package_version_ok" = x"yes"; then
+ ifelse([$4], , [:], [$4])
+ else
+ ifelse([$5], , [:], [$5])
+ fi
+ AC_SUBST([$1][_CFLAGS])
+ AC_SUBST([$1][_LIBS])
+])
diff --git a/m4/pkg.m4 b/m4/pkg.m4
index 4328e2e3f..9b95e1786 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -136,7 +136,8 @@ installed software in a non-standard prefix.
_PKG_TEXT
])],
- [$4])
+ [AC_MSG_RESULT([no])
+ $4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[The pkg-config script could not be found or is too old. Make sure it
@@ -146,7 +147,8 @@ path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
- [$4])
+ [AC_MSG_RESULT([no])
+ $4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
deleted file mode 100644
index 14ba61283..000000000
--- a/m4/printf-posix.m4
+++ /dev/null
@@ -1,44 +0,0 @@
-# printf-posix.m4 serial 3 (gettext-0.17)
-dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether the printf() function supports POSIX/XSI format strings with
-dnl positions.
-
-AC_DEFUN([gt_PRINTF_POSIX],
-[
- AC_REQUIRE([AC_PROG_CC])
- AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
- gt_cv_func_printf_posix,
- [
- AC_TRY_RUN([
-#include <stdio.h>
-#include <string.h>
-/* The string "%2$d %1$d", with dollar characters protected from the shell's
- dollar expansion (possibly an autoconf bug). */
-static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
-static char buf[100];
-int main ()
-{
- sprintf (buf, format, 33, 55);
- return (strcmp (buf, "55 33") != 0);
-}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
- [
- AC_EGREP_CPP(notposix, [
-#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
- notposix
-#endif
- ], gt_cv_func_printf_posix="guessing no",
- gt_cv_func_printf_posix="guessing yes")
- ])
- ])
- case $gt_cv_func_printf_posix in
- *yes)
- AC_DEFINE(HAVE_POSIX_PRINTF, 1,
- [Define if your printf() function supports format strings with positions.])
- ;;
- esac
-])
diff --git a/m4/programs.m4 b/m4/programs.m4
new file mode 100644
index 000000000..6703e48df
--- /dev/null
+++ b/m4/programs.m4
@@ -0,0 +1,124 @@
+dnl AC_PROG_GMSGFMT_PLURAL
+dnl ----------------------
+dnl Validate the GMSGFMT program found by gettext.m4; reject old versions
+dnl of GNU msgfmt that do not support the "msgid_plural" extension.
+AC_DEFUN([AC_PROG_GMSGFMT_PLURAL],
+ [dnl AC_REQUIRE(AM_GNU_GETTEXT)
+
+ if test "$GMSGFMT" != ":"; then
+ AC_MSG_CHECKING([for plural forms in GNU msgfmt])
+
+ changequote(,)dnl We use [ and ] in in .po test input
+
+ dnl If the GNU msgfmt does not accept msgid_plural we define it
+ dnl as : so that the Makefiles still can work.
+ cat >conftest.po <<_ACEOF
+msgid "channel"
+msgid_plural "channels"
+msgstr[0] "canal"
+msgstr[1] "canal"
+
+_ACEOF
+ changequote([,])dnl
+
+ if $GMSGFMT -o /dev/null conftest.po >/dev/null 2>&1; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_RESULT(
+ [found GNU msgfmt program is too old, it does not support plural forms; ignore it])
+ GMSGFMT=":"
+ fi
+ rm -f conftest.po
+ fi
+])dnl AC_PROG_GMSGFMT_PLURAL
+
+
+# AC_PROG_LIBTOOL_SANITYCHECK
+# ----------------------
+# Default configuration of libtool on solaris produces non-working
+# plugin modules, when gcc is used as compiler, and gcc does not
+# use gnu-ld
+AC_DEFUN([AC_PROG_LIBTOOL_SANITYCHECK],
+ [dnl AC_REQUIRE(AC_PROG_CC)
+ dnl AC_REQUIRE(AC_PROG_LD)
+ dnl AC_REQUIRE(AC_PROG_LIBTOOL)
+
+ case $host in
+ *-*-solaris*)
+ if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
+ AC_MSG_CHECKING([if libtool can build working modules])
+ cat > conftest1.c <<_ACEOF
+#undef NDEBUG
+#include <assert.h>
+int shlib_func(long long a, long long b) {
+ assert(b);
+ switch (a&3) {
+ case 0: return a/b;
+ case 1: return a%b;
+ case 2: return (unsigned long long)a/b;
+ case 3: return (unsigned long long)a%b;
+ }
+}
+_ACEOF
+
+ cat > conftest2.c <<_ACEOF
+#include <dlfcn.h>
+int main(){
+ void *dl = dlopen(".libs/libconftest.so", RTLD_NOW);
+ if (!dl) printf("%s\n", dlerror());
+ exit(dl ? 0 : 1);
+}
+_ACEOF
+
+ if ./libtool $CC -c conftest1.c >/dev/null 2>&1 && \
+ ./libtool $CC -o libconftest.la conftest1.lo \
+ -module -avoid-version -rpath /tmp >/dev/null 2>&1 && \
+ ./libtool $CC -o conftest2 conftest2.c -ldl >/dev/null 2>&1
+ then
+ if ./conftest2 >/dev/null 2>&1; then
+ AC_MSG_RESULT(yes)
+ else
+ dnl typical problem: dlopen'ed module not self contained, because
+ dnl it wasn't linked with -lgcc
+ AC_MSG_RESULT(no)
+ if grep '^archive_cmds=.*$LD -G' libtool >/dev/null; then
+ AC_MSG_CHECKING([if libtool can be fixed])
+
+ dnl first try to update gcc2's spec file to add the
+ dnl gcc3 -mimpure-text flag
+
+ libtool_specs=""
+
+ if $CC -dumpspecs | grep -- '-G -dy -z text' >/dev/null; then
+ $CC -dumpspecs | \
+ sed 's/-G -dy -z text/-G -dy %{!mimpure-text:-z text}/g' \
+ > gcc-libtool-specs
+ libtool_specs=" -specs=`pwd`/gcc-libtool-specs"
+ fi
+
+ sed -e "s,\$LD -G,\$CC${libtool_specs} -shared -mimpure-text,g" \
+ -e 's/ -M / -Wl,-M,/' libtool >libtool-fixed
+ chmod +x libtool-fixed
+ if ./libtool-fixed $CC -o libconftest.la conftest1.lo \
+ -module -avoid-version -rpath /tmp >/dev/null 2>&1 && \
+ ./conftest2 >/dev/null 2>&1; then
+
+ dnl the fixed libtool works
+ AC_MSG_RESULT(yes)
+ mv -f libtool-fixed libtool
+
+ else
+ AC_MSG_RESULT(no)
+ fi
+ fi
+ fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+ rm -f conftest1.c conftest1.lo conftest1.o conftest2.c \
+ libconftest.la conftest libtool-fixed
+ rm -rf .libs
+ fi ;;
+ esac
+])# AC_PROG_LIBTOOL_SANITYCHECK
diff --git a/m4/progtest.m4 b/m4/progtest.m4
deleted file mode 100644
index a56365cd3..000000000
--- a/m4/progtest.m4
+++ /dev/null
@@ -1,92 +0,0 @@
-# progtest.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-AC_PREREQ(2.50)
-
-# Search path for a program which passes the given test.
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN([AM_PATH_PROG_WITH_TEST],
-[
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-# Find out how to test for executable files. Don't use a zero-byte file,
-# as systems may use methods other than mode bits to determine executability.
-cat >conf$$.file <<_ASEOF
-#! /bin/sh
-exit 0
-_ASEOF
-chmod +x conf$$.file
-if test -x conf$$.file >/dev/null 2>&1; then
- ac_executable_p="test -x"
-else
- ac_executable_p="test -f"
-fi
-rm -f conf$$.file
-
-# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- [[\\/]]* | ?:[[\\/]]*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- IFS="$ac_save_IFS"
- test -z "$ac_dir" && ac_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
- echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
- break 2
- fi
- fi
- done
- done
- IFS="$ac_save_IFS"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
diff --git a/m4/signed.m4 b/m4/signed.m4
deleted file mode 100644
index 048f59369..000000000
--- a/m4/signed.m4
+++ /dev/null
@@ -1,17 +0,0 @@
-# signed.m4 serial 1 (gettext-0.10.40)
-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([bh_C_SIGNED],
-[
- AC_CACHE_CHECK([for signed], bh_cv_c_signed,
- [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
- if test $bh_cv_c_signed = no; then
- AC_DEFINE(signed, ,
- [Define to empty if the C compiler doesn't support this keyword.])
- fi
-])
diff --git a/m4/summary.m4 b/m4/summary.m4
new file mode 100644
index 000000000..8c89285cb
--- /dev/null
+++ b/m4/summary.m4
@@ -0,0 +1,361 @@
+AC_DEFUN([XINE_LIB_SUMMARY], [
+ 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 x"$enable_vcd" != x"no"; then
+ if test x"$enable_vcdo" != x"no"; then
+ echo " - vcdo - vcd"
+ else
+ echo " - vcd"
+ fi
+ fi
+ if test x"$with_external_dvdnav" != x"no"; then
+ echo " - dvd (external libs)"
+ else
+ echo " - dvd (*INTERNAL* libs)"
+ fi
+ test x"$enable_vdr" != x"no" && echo " - vdr"
+ test x"$have_dvb" = x"yes" && echo " - dvb"
+ test x"$have_gnomevfs" = x"yes" && echo " - gnome-vfs"
+ test x"$have_samba" = x"yes" && echo " - smb"
+ test x"$have_v4l" = x"yes" && echo " - v4l"
+ test x"$have_v4l2" = x"yes" && echo " - v4l2"
+ echo " - cdda"
+ test x"$have_libbluray" = x"yes" && echo " - bluray"
+ 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 - nsf"
+ echo " - nsv - 4xm"
+ echo " - FLAC - aac"
+ echo " - iff - matroska"
+ echo " - vmd - flv"
+ if test x"$enable_a52dec" != x"no"; then
+ if test x"$have_external_a52dec" = x"yes"; then
+ echo " - ac3 (external library)"
+ else
+ echo " - ac3 (*INTERNAL* library)"
+ fi
+ fi
+ echo " - E-AC-3"
+ echo " - AAC LATM"
+ test x"$enable_asf" != x"no" && echo " - asf"
+ test x"$enable_nosefart" != xno && echo " - Nosefart (NSF)"
+ test x"$enable_mng" != x"no" && echo " - mng"
+ test x"$have_modplug" = x"yes" && echo " - mod"
+ test x"$have_libflac" = x"yes" && echo " - FLAC (with libFLAC)"
+ test x"$have_vorbis" = x"yes" && echo " - ogg"
+ test x"$have_wavpack" = x"yes" && echo " - WavPack"
+ echo ""
+
+ dnl video decoders
+ echo " * video decoder plugins:"
+ echo " - MPEG 1,2 - Amiga Bitplane"
+ echo " - Raw RGB - Raw YUV"
+ test x"$have_dxr3" = x"yes" && echo " - dxr3_video"
+ test x"$have_gdkpixbuf" = x"yes" && echo " - gdk-pixbuf"
+ test x"$have_imagemagick" = x"yes" && echo " - image"
+ test x"$have_theora" = x"yes" && echo " - theora"
+ test x"$have_w32dll" = x"yes" && echo " - w32dll"
+ test x"$have_vdpau" = x"yes" && echo " - vdpau"
+ if test x"$with_external_ffmpeg" != x"no"; then
+ echo " - ffmpeg (external library)"
+ else
+ echo " - ffmpeg (*INTERNAL* library):"
+ echo " - MPEG-4 (ISO, Microsoft, DivX*, XviD)"
+ echo " - Creative YUV - Motion JPEG"
+ echo " - Cinepak - MS Video-1"
+ echo " - FLI/FLC - MS RLE"
+ echo " - Id RoQ - Id Cin"
+ echo " - Apple Graphics - Apple Video"
+ echo " - Apple Animation - Interplay Video"
+ echo " - Westwood VQA - Origin Xan"
+ echo " - H.263 - Intel Indeo 3"
+ echo " - SVQ1 - SVQ3"
+ echo " - Real Video 1.0 - Real Video 2.0"
+ echo " - 4X Video - Sierra Video"
+ echo " - Asus v1/v2 - HuffYUV"
+ echo " - On2 VP3 - DV"
+ echo " - 8BPS - Duck TrueMotion v1"
+ echo " - ATI VCR1 - Flash Video"
+ echo " - ZLIB - MSZH"
+ fi
+ echo ""
+
+ dnl audio decoders
+ echo " * audio decoder plugins:"
+ echo " - GSM 06.10 - linear PCM"
+ test x"$enable_faad" != x"no" && echo " - faad"
+ test x"$enable_nosefart" != xno && echo " - Nosefart (NSF)"
+ test x"$have_libflac" = x"yes" && echo " - FLAC (with libFLAC)"
+ test x"$have_speex" = x"yes" && echo " - speex"
+ test x"$have_vorbis" = x"yes" && echo " - vorbis"
+ test x"$have_w32dll" = x"yes" && echo " - w32dll"
+ test x"$have_wavpack" = x"yes" && echo " - WavPack"
+ if test x"$enable_mad" != x"no"; then
+ if test x"$have_external_libmad" = x"yes"; then
+ echo " - MAD (MPG 1/2/3) (external library)"
+ else
+ echo " - MAD (MPG 1/2/3) (*INTERNAL* library)"
+ fi
+ fi
+ if test x"$enable_libdts" != x"no"; then
+ if test x"$have_external_dts" = x"yes"; then
+ echo " - DTS (external library)"
+ else
+ echo " - DTS (*INTERNAL* library)"
+ fi
+ fi
+ if test x"$enable_a52dec" != x"no"; then
+ if test x"$have_external_a52dec" = x"yes"; then
+ echo " - A52/ra-dnet (external library)"
+ else
+ echo " - A52/ra-dnet (*INTERNAL* library)"
+ fi
+ fi
+ if test x"$enable_musepack" != x"no"; then
+ if test x"$have_external_libmpcdec" = x"yes"; then
+ echo " - Musepack (external library)"
+ else
+ echo " - Musepack (*INTERNAL* library)"
+ fi
+ fi
+ if test x"$with_external_ffmpeg" = x"yes"; then
+ echo " - ffmpeg (external library)"
+ else
+ echo " - ffmpeg (*INTERNAL* library):"
+ 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"
+ fi
+ echo ""
+
+ dnl spu decoders
+ echo " * subtitle decoder plugins:"
+ echo " - spu - spucc"
+ echo " - spucmml - sputext"
+ echo " - spudvb"
+ test x"$have_dxr3" = x"yes" && echo " - dxr3_spu"
+ echo ""
+
+ dnl post plugins
+ echo " * post effect plugins:"
+ echo " * planar video effects:"
+ echo " - invert - expand"
+ echo " - eq - eq2"
+ echo " - boxblur - denoise3d"
+ echo " - unsharp - tvtime"
+ test x"$have_dvb" = x"yes" && echo " - vdr"
+ echo " * SFX:"
+ echo " - goom - oscope"
+ echo " - fftscope - mosaico"
+ echo ""
+
+ dnl Video plugins
+ echo " * video driver plugins:"
+ if test x"$no_x" != x"yes"; then
+ echo " - XShm (X11 shared memory)"
+ if test x"$have_xv" = x"yes"; then
+ if test x"$have_xv_static" = x"yes"; then
+ echo " - Xv (XVideo *static*)"
+ else
+ echo " - Xv (XVideo *shared*)"
+ fi
+ fi
+ if test x"$have_xxmc" = x"yes"; then
+ if test x"$have_vldexts" = x"yes"; then
+ echo " - XxMC (XVideo extended motion compensation)"
+ else
+ echo " - XxMC (XVideo motion compensation - vld extensions DISABLED)"
+ fi
+ fi
+ if test x"$have_xvmc" = x"yes"; then
+ echo " - XvMC (XVideo motion compensation)"
+ fi
+ if test x"$have_opengl" = x"yes"; then
+ if test x"$have_glu" = x"yes"; then
+ echo " - OpenGL (with GLU support)"
+ else
+ echo " - OpenGL"
+ fi
+ fi
+ test x"$have_vdpau" = x"yes" && echo " - vdpau (X11 Video Decode and Presentation API for Unix)"
+ if test x"$have_sunfb" = x"yes"; then
+ if test x"$have_sundga" = x"yes"; then
+ echo " - PGX64 (for Sun XVR100/PGX64/PGX24 cards)"
+ echo " - PGX32 (for Sun PGX32 cards)"
+ fi
+ fi
+ fi
+ if test x"$have_xcb" = x"yes"; then
+ if test x"$have_xcbshm" = x"yes"; then
+ echo " - xcb-shm (X shared memory using XCB)"
+ fi
+ if test x"$have_xcbxv" = x"yes"; then
+ echo " - xcb-xv (XVideo using XCB)"
+ fi
+ fi
+
+
+ test x"$have_aalib" = x"yes" && echo " - aa (Ascii ART)"
+ test x"$have_caca" = x"yes" && echo " - caca (Color AsCii Art)"
+ test x"$have_directfb" = x"yes" && echo " - directfb (DirectFB driver)"
+ test x"$have_directx" = x"yes" && echo " - directx (DirectX video driver)"
+ test x"$have_fb" = x"yes" && echo " - fb (Linux framebuffer device)"
+ test x"$have_libstk" = x"yes" && echo " - stk (Libstk Set-top Toolkit)"
+ test x"$have_macosx_video" = x"yes" && echo " - Mac OS X OpenGL"
+ test x"$have_sdl" = x"yes" && echo " - sdl (Simple DirectMedia Layer)"
+
+
+ if test x"$have_dxr3" = x"yes"; then
+ if test x"$have_encoder" = x"yes"; 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"$have_vidix" = x"yes"; then
+ echo $ECHO_N " - vidix ("
+
+ if test x"$no_x" != x"yes"; then
+ echo $ECHO_N "X11"
+ if test x"$have_fb" = x"yes"; then
+ echo $ECHO_N " and "
+ fi
+ fi
+
+ if test x"$have_fb" = x"yes"; then
+ echo $ECHO_N "framebuffer"
+ fi
+
+ echo $ECHO_N " support"
+
+ if test x"$enable_dha_kmod" != x"no"; then
+ echo " with dhahelper)"
+ else
+ echo ")"
+ fi
+ fi
+
+ echo ""
+
+ dnl Audio plugins
+ echo " * audio driver plugins:"
+ test x"$have_alsa" = x"yes" && echo " - alsa (ALSA - Advanced Linux Sound Architecture)"
+ test x"$have_coreaudio" = x"yes" && echo " - CoreAudio (Mac OS X audio driver)"
+ test x"$have_directx" = x"yes" && echo " - directx (DirectX audio driver)"
+ test x"$have_esound" = x"yes" && echo " - esd (Enlightened Sound Daemon)"
+ test x"$have_fusionsound" = x"yes" && echo " - fusionsound (FusionSound driver)"
+ test x"$am_cv_have_irixal" = x"yes" && echo " - irixal (Irix audio library)"
+ test x"$have_jack" = x"yes" && echo " - Jack"
+ test x"$have_oss" = x"yes" && echo " - oss (Open Sound System)"
+ test x"$have_pulseaudio" = x"yes" && echo " - pulseaudio (PulseAudio sound server)"
+ test x"$have_sunaudio" = x"yes" && echo " - sun (Sun audio interface)"
+ test "x$have_sndio" = "xyes" && echo " - sndio"
+ 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
+])
diff --git a/m4/types.m4 b/m4/types.m4
new file mode 100644
index 000000000..0afa6b29e
--- /dev/null
+++ b/m4/types.m4
@@ -0,0 +1,245 @@
+dnl AC_COMPILE_CHECK_SIZEOF (TYPE SUPPOSED-SIZE)
+dnl abort if the given type does not have the supposed size
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], [
+ AC_MSG_CHECKING(that size of $1 is $2)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[switch (0) case 0: case (sizeof ($1) == $2):;]])],
+ [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([can not build a default inttypes.h])])
+])
+
+dnl
+AC_DEFUN([AC_CHECK_LIRC],
+ [AC_ARG_ENABLE(lirc,
+ AS_HELP_STRING([--disable-lirc], [turn off LIRC support]),
+ enable_lirc=$enableval, enable_lirc=yes)
+
+ if test x"$enable_lirc" = xyes; then
+ have_lirc=yes
+ AC_REQUIRE_CPP
+ AC_CHECK_LIB(lirc_client,lirc_init,
+ AC_CHECK_HEADER(lirc/lirc_client.h, true, have_lirc=no), have_lirc=no)
+ if test "$have_lirc" = "yes"; then
+
+ if test x"$LIRC_PREFIX" != "x"; then
+ lirc_libprefix="$LIRC_PREFIX/lib"
+ LIRC_INCLUDE="-I$LIRC_PREFIX/include"
+ fi
+ for llirc in $lirc_libprefix /lib /usr/lib /usr/local/lib; do
+ AC_CHECK_FILE("$llirc/liblirc_client.a",
+ LIRC_LIBS="$llirc/liblirc_client.a"
+ AC_DEFINE(HAVE_LIRC),,)
+ done
+ else
+ AC_MSG_RESULT([*** LIRC client support not available, LIRC support will be disabled ***]);
+ fi
+ fi
+
+ AC_SUBST(LIRC_LIBS)
+ AC_SUBST(LIRC_INCLUDE)
+])
+
+dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY)
+dnl generate a default inttypes.h if the header file does not exist already
+AC_DEFUN([AC_CHECK_GENERATE_INTTYPES],
+ [AC_CHECK_HEADER([inttypes.h],,
+ [if test ! -d $1; then mkdir $1; fi
+ AC_CHECK_HEADER([stdint.h],
+ [cat >$1/inttypes.h << EOF
+#ifndef _INTTYPES_H
+#define _INTTYPES_H
+/* helper inttypes.h for people who do not have it on their system */
+
+#include <stdint.h>
+EOF
+ ],
+ [AC_COMPILE_CHECK_SIZEOF([char],[1])
+ AC_COMPILE_CHECK_SIZEOF([short],[2])
+ AC_COMPILE_CHECK_SIZEOF([int],[4])
+ AC_COMPILE_CHECK_SIZEOF([long long],[8])
+ cat >$1/inttypes.h << EOF
+#ifndef _INTTYPES_H
+#define _INTTYPES_H
+/* default inttypes.h for people who do not have it on their system */
+#if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__)
+#define __int8_t_defined
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+#ifdef ARCH_X86
+typedef signed long long int64_t;
+#endif
+#endif
+#if (!defined __uint8_t_defined) && (!defined _LINUX_TYPES_H)
+#define __uint8_t_defined
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+#ifdef ARCH_X86
+typedef unsigned long long uint64_t;
+#endif
+#endif
+EOF
+ ])
+ cat >>$1/inttypes.h << EOF
+
+#ifdef WIN32
+# define PRI64_PREFIX "I64"
+#else
+# define PRI64_PREFIX "l"
+#endif
+
+#ifndef PRId8
+# define PRId8 "d"
+#endif
+#ifndef PRId16
+# define PRId16 "d"
+#endif
+#ifndef PRId32
+# define PRId32 "d"
+#endif
+#ifndef PRId64
+# define PRId64 PRI64_PREFIX "d"
+#endif
+
+#ifndef PRIu8
+# define PRIu8 "u"
+#endif
+#ifndef PRIu16
+# define PRIu16 "u"
+#endif
+#ifndef PRIu32
+# define PRIu32 "u"
+#endif
+#ifndef PRIu64
+# define PRIu64 PRI64_PREFIX "u"
+#endif
+
+#ifndef PRIx8
+# define PRIx8 "x"
+#endif
+#ifndef PRIx16
+# define PRIx16 "x"
+#endif
+#ifndef PRIx32
+# define PRIx32 "x"
+#endif
+#ifndef PRIx64
+# define PRIx64 PRI64_PREFIX "x"
+#endif
+
+#ifndef PRIX8
+# define PRIX8 "X"
+#endif
+#ifndef PRIX16
+# define PRIX16 "X"
+#endif
+#ifndef PRIX32
+# define PRIX32 "X"
+#endif
+#ifndef PRIX64
+# define PRIX64 PRI64_PREFIX "X"
+#endif
+
+#ifndef PRIdFAST8
+# define PRIdFAST8 "d"
+#endif
+#ifndef PRIdFAST16
+# define PRIdFAST16 "d"
+#endif
+#ifndef PRIdFAST32
+# define PRIdFAST32 "d"
+#endif
+#ifndef PRIdFAST64
+# define PRIdFAST64 "d"
+#endif
+
+#ifndef PRIuFAST8
+# define PRIuFAST8 "u"
+#endif
+#ifndef PRIuFAST16
+# define PRIuFAST16 "u"
+#endif
+#ifndef PRIuFAST32
+# define PRIuFAST32 "u"
+#endif
+#ifndef PRIuFAST64
+# define PRIuFAST64 PRI64_PREFIX "u"
+#endif
+
+#ifndef PRIxFAST8
+# define PRIxFAST8 "x"
+#endif
+#ifndef PRIxFAST16
+# define PRIxFAST16 "x"
+#endif
+#ifndef PRIxFAST32
+# define PRIxFAST32 "x"
+#endif
+#ifndef PRIxFAST64
+# define PRIxFAST64 PRI64_PREFIX "x"
+#endif
+
+#ifndef SCNd8
+# define SCNd8 "hhd"
+#endif
+#ifndef SCNd16
+# define SCNd16 "hd"
+#endif
+#ifndef SCNd32
+# define SCNd32 "d"
+#endif
+#ifndef SCNd64
+# define SCNd64 PRI64_PREFIX "d"
+#endif
+
+#ifndef SCNu8
+# define SCNu8 "hhu"
+#endif
+#ifndef SCNu16
+# define SCNu16 "hu"
+#endif
+#ifndef SCNu32
+# define SCNu32 "u"
+#endif
+#ifndef SCNu64
+# define SCNu64 PRI64_PREFIX "u"
+#endif
+
+#ifndef PRIdMAX
+# define PRIdMAX PRId64
+#endif
+#ifndef PRIuMAX
+# define PRIuMAX PRIu64
+#endif
+#ifndef PRIxMAX
+# define PRIxMAX PRIx64
+#endif
+#ifndef SCNdMAX
+# define SCNdMAX SCNd64
+#endif
+
+#endif
+EOF
+ ])])
+
+
+dnl Check for the type of the third argument of getsockname
+AC_DEFUN([AC_CHECK_SOCKLEN_T], [
+ AC_MSG_CHECKING([for socklen_t])
+ AC_LANG_PUSH([C])
+ AC_CACHE_VAL([ac_cv_socklen_t],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>]],
+ [[socklen_t a=0; getsockname(0,(struct sockaddr*)0, &a)]])],
+ [ac_cv_socklen_t=socklen_t], [ac_cv_socklen_t=''])
+ if test x"$ac_cv_socklen_t" = x""; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+ #include <sys/socket.h>]],
+ [[int a=0; getsockname(0,(struct sockaddr*)0, &a);]])],
+ [ac_cv_socklen_t=int], [ac_cv_socklen_t=size_t])
+ fi])
+ AC_LANG_POP([C])
+ AC_MSG_RESULT([$ac_cv_socklen_t])
+ if test x"$ac_cv_socklen_t" != x"socklen_t"; then
+ AC_DEFINE_UNQUOTED([socklen_t], [$ac_cv_socklen_t], [Define the real type of socklen_t])
+ fi
+])
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4
deleted file mode 100644
index 641c4898d..000000000
--- a/m4/uintmax_t.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-# uintmax_t.m4 serial 10
-dnl Copyright (C) 1997-2004, 2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-AC_PREREQ(2.13)
-
-# Define uintmax_t to 'unsigned long' or 'unsigned long long'
-# if it is not already defined in <stdint.h> or <inttypes.h>.
-
-AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
-[
- AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
- AC_REQUIRE([gl_AC_HEADER_STDINT_H])
- if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
- AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
- test $ac_cv_type_unsigned_long_long_int = yes \
- && ac_type='unsigned long long' \
- || ac_type='unsigned long'
- AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
- [Define to unsigned long or unsigned long long
- if <stdint.h> and <inttypes.h> don't define.])
- else
- AC_DEFINE(HAVE_UINTMAX_T, 1,
- [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
- fi
-])
diff --git a/m4/video_out.m4 b/m4/video_out.m4
new file mode 100644
index 000000000..8d6ddad0e
--- /dev/null
+++ b/m4/video_out.m4
@@ -0,0 +1,490 @@
+dnl -----------------
+dnl Video out plugins
+dnl -----------------
+AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
+ dnl Setup defaults for the target operating system. For example, linuxfb is
+ dnl only ever available on Linux, so don't bother checking for it unless
+ dnl explicitly requested to do so on other operating systems.
+ dnl Notes:
+ dnl - dha_kmod is Linux only, but disabled by default
+ dnl - directx is Windows only
+ dnl - dxr3 is Linux only
+ dnl - Mac OS X video is Mac OS X only
+ dnl - OpenGL requires Xwindows
+ dnl - Vidix is FreeBSD and Linux only
+ dnl - XvMC and xxmc depend on Xv
+
+ default_enable_aalib=yes
+ default_enable_dha_kmod=no
+ default_enable_directfb=no
+ default_enable_directx=no
+ default_enable_dxr3=no
+ default_enable_glu=yes
+ default_enable_fb=no
+ default_enable_macosx_video=no
+ default_enable_opengl=yes
+ default_enable_vidix=no
+ default_enable_xinerama=yes
+ default_enable_xvmc=yes
+ default_enable_vdpau=no
+
+ default_with_caca=yes
+ default_with_libstk=no
+ default_with_sdl=yes
+ default_with_xcb=yes
+
+ case "$host_os" in
+ cygwin* | mingw*)
+ default_enable_directx=yes
+ ;;
+
+ darwin*)
+ default_enable_macosx_video=yes
+ ;;
+
+ freebsd*|kfreebsd*)
+ default_enable_vidix=yes
+ default_enable_vdpau=yes
+ ;;
+
+ linux*)
+ default_enable_dxr3=yes
+ default_enable_fb=yes
+ default_enable_vidix=yes
+ default_enable_vdpau=yes
+ enable_linux=yes
+ ;;
+ esac
+
+
+ dnl Ascii-Art
+ XINE_ARG_ENABLE([aalib], [enable support for AALIB])
+ if test x"$enable_aalib" != x"no"; then
+ ACX_PACKAGE_CHECK([AALIB], [1.4], [aalib-config], [have_aalib=yes], [have_aalib=no])
+ if test x"$hard_enable_aalib" = x"yes" && test x"$have_aalib" != x"yes"; then
+ AC_MSG_ERROR([aalib support requested, but aalib not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_AA], [test x"$have_aalib" = x"yes"])
+
+
+ dnl Color AsCii Art
+ XINE_ARG_WITH([caca], [enable support for CACA])
+ if test x"$with_caca" != x"no"; then
+ PKG_CHECK_MODULES([CACA], [caca >= 0.99beta14 cucul >= 0.99beta14], [have_caca="yes"], [have_caca="no"])
+ if test x"$hard_with_caca" = x"yes" && test x"$have_caca" != x"yes"; then
+ AC_MSG_ERROR([CACA support requested, but libcaca 0.99 not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_CACA], [test x"$have_caca" = x"yes"])
+
+
+ dnl dha (Linux only)
+ XINE_ARG_ENABLE([dha-kmod], [build Linux DHA kernel module])
+ if test x"$enable_dha_kmod" != x"no"; then
+ AC_ARG_WITH([linux-path],
+ [AS_HELP_STRING([--with-linux-path=PATH], [where the linux sources are located])],
+ [linux_path="$withval"], [linux_path="/usr/src/linux"])
+ LINUX_INCLUDE="-I$linux_path/include"
+ AC_SUBST(LINUX_INCLUDE)
+ AC_CHECK_PROG([MKNOD], [mknod], [mknod], [no])
+ AC_CHECK_PROG([DEPMOD], [depmod], [depmod], [no], ["$PATH:/sbin"])
+ fi
+ AM_CONDITIONAL([HAVE_LINUX], [test x"$enable_linux" = x"yes"])
+ AM_CONDITIONAL([BUILD_DHA_KMOD], [test x"$enable_dha_kmod" != x"no"])
+
+
+ dnl DirectFB
+ XINE_ARG_ENABLE([directfb], [enable use of DirectFB])
+ if test "x$enable_directfb" = "xyes"; then
+ PKG_CHECK_MODULES([DIRECTFB], [directfb >= 0.9.22], [have_directfb=yes], [have_directfb=no])
+ if test x"$hard_enable_directfb" = x"yes" && test x"$have_directfb" != x"yes"; then
+ AC_MSG_ERROR([DirectFB support requested, but DirectFB not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_DIRECTFB], [test x"$have_directfb" = x"yes"])
+
+
+ dnl DirectX (see directx.m4)
+ AM_PATH_DIRECTX
+
+
+ dnl dxr3 / hollywood plus card
+ XINE_ARG_ENABLE([dxr3], [enable support for DXR3/HW+])
+ if test x"$enable_dxr3" != x"no"; then
+ have_dxr3=yes
+ AC_MSG_RESULT([*** checking for a supported mpeg encoder])
+ AC_CHECK_LIB([fame], [fame_open],
+ [AC_CHECK_HEADERS([fame.h], [have_libfame=yes], [have_libfame=no])], [have_libfame=no])
+ if test x"$have_libfame" = x"yes"; then
+ have_encoder=yes
+ AC_DEFINE([HAVE_LIBFAME], 1, [Define this if you have libfame mpeg encoder installed (fame.sf.net)])
+ ACX_PACKAGE_CHECK([LIBFAME], [0.8.10], [libfame-config],
+ [AC_DEFINE([HAVE_NEW_LIBFAME], 1, [Define this if you have libfame 0.8.10 or above])])
+ fi
+ AC_CHECK_LIB([rte], [rte_init],
+ [AC_CHECK_HEADERS([rte.h], [have_librte=yes], [have_librte=no])], [have_librte=no])
+ if test x"$have_librte" = x"yes"; then
+ have_encoder=yes
+ AC_MSG_WARN([this will probably only work with rte version 0.4!])
+ AC_DEFINE([HAVE_LIBRTE], 1, [Define this if you have librte mpeg encoder installed (zapping.sf.net)])
+ fi
+ if test "$have_encoder" = "yes"; then
+ AC_MSG_RESULT([*** found one or more external mpeg encoders])
+ else
+ AC_MSG_RESULT([*** no external mpeg encoder found])
+ fi
+ else
+ have_dxr3=no have_libfame=no have_librte=no have_encoder=no
+ fi
+ AM_CONDITIONAL([ENABLE_DXR3], [test x"$have_dxr3" = x"yes"])
+ AM_CONDITIONAL([HAVE_LIBFAME], [test x"$have_libfame" = x"yes"])
+ AM_CONDITIONAL([HAVE_LIBRTE], [test x"$have_librte" = x"yes"])
+
+
+ dnl LibSTK - http://www.libstk.net (project appears to be dead)
+ XINE_ARG_WITH([libstk], [Build with STK surface video driver])
+ if test x"$with_libstk" != x"no"; then
+ PKG_CHECK_MODULES([LIBSTK], [libstk >= 0.2.0], [have_libstk=yes], [have_libstk=no])
+ if test x"$hard_with_libstk" = x"yes" && test x"$have_libstk" != x"yes"; then
+ AC_MSG_ERROR([libstk support requested, but libstk not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_STK], [test x"$have_libstk" = x"yes"])
+
+
+ dnl Linux framebuffer device
+ XINE_ARG_ENABLE([fb], [enable Linux framebuffer support])
+ if test x"$enable_fb" != x"no"; then
+ AC_CHECK_HEADERS([linux/fb.h], [have_fb=yes], [have_fb=no])
+ if test x"$hard_enable_fb" = x"yes" && test x"$have_fb" != x"yes"; then
+ AC_MSG_ERROR([Linux framebuffer support requested, but required header file(s) not found])
+ elif test x"$have_fb" = x"yes"; then
+ dnl This define is needed by src/video_out/video_out_vidix.c
+ AC_DEFINE([HAVE_FB], 1, [Define this if you have linux framebuffer support])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_FB], [test x"$have_fb" = x"yes"])
+
+
+ dnl Mac OS X OpenGL video output
+ XINE_ARG_ENABLE([macosx-video], [enable support for Mac OS X OpenGL video output])
+ if test x"$enable_macosx_video" != x"no"; then
+ AC_MSG_CHECKING([for Mac OS X video output frameworks])
+ ac_save_LIBS="$LIBS" LIBS="$LIBS -framework Cocoa -framework OpenGL"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])], [have_macosx_video=yes], [have_macosx_video=no])
+ LIBS="$ac_save_LIBS"
+ AC_MSG_RESULT([$have_macosx_video])
+ if test x"$hard_enable_macosx_video" = x"yes" && test x"$have_macosx_video" != x"yes"; then
+ AC_MSG_ERROR([Mac OS X OpenGL video output support requested, but required frameworks not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_MACOSX_VIDEO], [test x"$have_macosx_video" = x"yes"])
+
+
+ dnl OpenGL, including GLut and/or GLU
+ XINE_ARG_ENABLE([opengl], [enable support for X-based OpenGL video output])
+ XINE_ARG_ENABLE([glu], [enable support for GLU in the OpenGL plugin])
+ if test x"$enable_opengl" != x"no"; then
+ if test x"$no_x" = x"yes"; then
+ if test x"$hard_enable_opengl" = x"yes"; then
+ AC_MSG_ERROR([OpenGL support requested, but X support is disabled])
+ fi
+ enable_opengl=no
+ fi
+ fi
+ if test x"$enable_opengl" != x"no"; then
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ AC_CHECK_LIB([GL], [glBegin],
+ [AC_CHECK_HEADERS([GL/gl.h], [have_opengl=yes], [have_opengl=no])], [have_opengl=no],
+ [$X_LIBS -lm])
+ if test x"$hard_enable_opengl" = x"yes" && test x"$have_opengl" != x"yes"; then
+ AC_MSG_ERROR([OpenGL support requested, but OpenGL not found])
+ elif test x"$have_opengl" = x"yes"; then
+ OPENGL_LIBS="-lGL -lm"
+ if test x"$enable_glu" != x"no"; then
+ have_glu=no
+ AC_CHECK_LIB([GLU], [gluPerspective],
+ [AC_CHECK_HEADERS([GL/glu.h],
+ [AC_MSG_CHECKING([if GLU is sane])
+ ac_save_LIBS="$LIBS" LIBS="-lGLU $X_LIBS $OPENGL_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <GL/gl.h>
+ #include <GL/glu.h>]],
+ [[gluPerspective(45.0f, 1.33f, 1.0f, 1000.0f);
+ glBegin(GL_POINTS); glEnd()]])],
+ [have_glu=yes], [have_glu=no])
+ LIBS="$ac_save_LIBS"
+ AC_MSG_RESULT([$have_glu])], [have_glu=no])], [have_glu=no],
+ [$X_LIBS $OPENGL_LIBS])
+ if test x"$hard_enable_glu" = x"yes" && test x"$have_glu" != x"yes"; then
+ AC_MSG_ERROR([OpenGL GLU support requested, but GLU not found])
+ elif test x"$have_glu" = x"yes"; then
+ AC_DEFINE([HAVE_GLU], 1, [Define this if you have GLU support available])
+ GLU_LIBS="-lGLU"
+ fi
+ fi
+ fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ AC_SUBST(OPENGL_CFLAGS)
+ AC_SUBST(OPENGL_LIBS)
+ AC_SUBST(GLU_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_OPENGL], [test x"$have_opengl" = x"yes"])
+
+
+ dnl SDL
+ XINE_ARG_WITH([sdl], [Enable support for SDL video output])
+ if test x"$with_sdl" != x"no"; then
+ PKG_CHECK_MODULES([SDL], [sdl], [have_sdl=yes], [have_sdl=no])
+ if test x"$hard_with_sdl" = x"yes" && test x"$have_sdl" != x"yes"; then
+ AC_MSG_ERROR([SDL support requested, but SDL not found])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_SDL], [test x"$have_sdl" = x"yes"])
+
+
+ dnl Solaris framebuffer device support (exists for more than just Solaris)
+ AC_CHECK_HEADERS([sys/fbio.h], [have_sunfb=yes], [have_sunfb=no])
+ if test x"$have_sunfb" = x"yes"; then
+ saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I/usr/openwin/include"
+ saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L/usr/openwin/lib"
+ 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"
+ have_sundga=yes])])
+ CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS"
+ AC_SUBST(SUNDGA_CPPFLAGS)
+ AC_SUBST(SUNDGA_LIBS)
+ fi
+ AM_CONDITIONAL([ENABLE_SUNDGA], [test x"$have_sundga" = x"yes"])
+ AM_CONDITIONAL([ENABLE_SUNFB], [test x"$have_sunfb" = x"yes"])
+
+
+ dnl xcb
+ XINE_ARG_WITH([xcb], [Enable support for XCB video out plugins])
+ if test x"$with_xcb" != x"no"; then
+ PKG_CHECK_MODULES([XCB], [xcb-shape >= 1.0], [have_xcb=yes], [have_xcb=no])
+ if test x"$hard_enable_xcb" = x"yes" && test x"$have_xcb" != x"yes"; then
+ AC_MSG_ERROR([XCB support requested, but XCB not found])
+ elif test x"$have_xcb" = x"yes"; then
+ PKG_CHECK_MODULES([XCBSHM], [xcb-shm], [have_xcbshm=yes], [have_xcbshm=no])
+ PKG_CHECK_MODULES([XCBXV], [xcb-xv], [have_xcbxv=yes], [have_xcbxv=no])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_XCB], [test x"$have_xcb" = x"yes"])
+ AM_CONDITIONAL([ENABLE_XCBSHM], [test x"$have_xcbshm" = x"yes"])
+ AM_CONDITIONAL([ENABLE_XCBXV], [test x"$have_xcbxv" = x"yes"])
+
+
+ dnl vidix/libdha
+ dnl Requires X11 or Linux framebuffer
+ XINE_ARG_ENABLE([vidix], [enable support for Vidix])
+ if test x"$enable_vidix" != x"no"; then
+ have_vidix=yes
+ if test x"$ac_cv_prog_AWK" = x"no"; then
+ have_vidix=no
+ else
+ if test x"$no_x" = x"yes" -o x"$have_fb" != x"yes"; then
+ have_vidix=no
+ else
+ case "$host_or_hostalias" in
+ i?86-*-linux* | k?-*-linux* | athlon-*-linux*) ;;
+ i?86-*-freebsd* | k?-*-freebsd* | athlon-*-freebsd* | i?86-*-kfreebsd*) ;;
+ *) have_vidix="no" ;;
+ esac
+ fi
+ fi
+ if test x"$hard_enable_vidix" = x"yes" && test x"$have_vidix" != x"yes"; then
+ AC_MSG_ERROR([Vidix support requested, but not all requirements are met])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_VIDIX], test x"$have_vidix" = x"yes")
+
+
+ dnl Xinerama
+ XINE_ARG_ENABLE([xinerama], [enable support for Xinerama])
+ if test x"$enable_xinerama" != x"no"; then
+ if test x"$no_x" != x"yes"; then
+ PKG_CHECK_MODULES([XINERAMA], [xinerama], [have_xinerama=yes],
+ [AC_CHECK_LIB([Xinerama], [XineramaQueryExtension],
+ [XINERAMA_LIBS="-lXinerama" have_xinerama="yes"], [],
+ [$X_LIBS])])
+ fi
+ if test x"$enable_xinerama" = x"yes" && test x"$have_xinerama" != x"yes"; then
+ AC_MSG_ERROR([Xinerama support requested, but Xinerama not found or X disabled])
+ elif test x"$have_xinerama" = x"yes"; then
+ AC_DEFINE([HAVE_XINERAMA], 1, [Define this if you have libXinerama installed])
+ X_LIBS="$X_LIBS $XINERAMA_LIBS"
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_XINERAMA], [test x"$have_xinerama" = x"yes"])
+
+
+ dnl xv
+ AC_ARG_WITH([xv-path],
+ [AS_HELP_STRING([--with-xv-path=path], [where libXv is installed])])
+ dnl With recent XFree86 or Xorg, dynamic linking is preferred!
+ dnl Only dynamic linking is possible when using libtool < 1.4.0
+ AC_ARG_ENABLE([static-xv],
+ [AS_HELP_STRING([--enable-static-xv], [Enable this to force linking against libXv.a])],
+ [test x"$enableval" != x"no" && xv_prefer_static="yes"], [xv_prefer_static="no"])
+ case "$host_or_hostalias" in
+ hppa*) xv_libexts="$acl_cv_shlibext" ;;
+ *)
+ if test x"$xv_prefer_static" = x"yes"; then
+ xv_libexts="$acl_cv_libext $acl_cv_shlibext"
+ else
+ xv_libexts="$acl_cv_shlibext $acl_cv_libext"
+ fi
+ ;;
+ esac
+ if test x"$no_x" != x"yes"; then
+ PKG_CHECK_MODULES([XV], [xv], [have_xv=yes], [have_xv=no])
+ if test x"$have_xv" = x"no"; then
+ dnl No Xv package -- search for it
+ for xv_libext in $xv_libexts; do
+ xv_lib="libXv.$xv_libext"
+ AC_MSG_CHECKING([for $xv_lib])
+ for xv_try_path in "$with_xv_path" "$x_libraries" /usr/X11R6/lib /usr/lib; do
+ if test x"$xv_try_path" != x"" && test -f "$xv_try_path/$xv_lib"; then
+ case $xv_lib in
+ *.$acl_cv_libext) have_xv_static=yes xv_try_libs="$xv_try_path/$xv_lib" ;;
+ *.$acl_cv_shlibext) have_xv_static=no xv_try_libs="${xv_try_path:+-L}$xv_try_path -lXv" ;;
+ esac
+ ac_save_LIBS="$LIBS" LIBS="$xv_try_libs $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvShmCreateImage()]])], [have_xv=yes], [])
+ LIBS="$ac_save_LIBS"
+ if test x"$have_xv" = x"yes"; then
+ AC_MSG_RESULT([$xv_try_path])
+ XV_LIBS="$xv_try_libs"
+ break
+ fi
+ fi
+ done
+ test x"$have_xv" = x"yes" && break
+ AC_MSG_RESULT([no])
+ done
+ fi
+ if test x"$have_xv" = x"yes"; then
+ AC_DEFINE([HAVE_XV], 1, [Define this if you have libXv installed])
+ fi
+ fi
+ AM_CONDITIONAL([HAVE_XV], [test x"$have_xv" = x"yes"])
+
+
+ dnl XvMC
+ XINE_ARG_ENABLE([xvmc], [Enable xxmc and XvMC outplut plugins])
+ AC_ARG_WITH([xvmc-path],
+ [AS_HELP_STRING([--with-xvmc-path=PATH], [where libXvMC for the xvmc plugin are installed])],
+ [], [with_xvmc_path="$x_libraries"])
+ AC_ARG_WITH([xvmc-lib],
+ [AS_HELP_STRING([--with-xvmc-lib=LIBNAME], [The name of the XvMC library libLIBNAME.so for the xvmc plugin])],
+ [], [with_xvmc_lib="XvMCW"])
+ AC_ARG_WITH([xxmc-path],
+ [AS_HELP_STRING([--with-xxmc-path=PATH], [Where libXvMC for the xxmc plugin are installed])],
+ [], [with_xxmc_path="$x_libraries"])
+ AC_ARG_WITH([xxmc-lib],
+ [AS_HELP_STRING([--with-xxmc-lib=LIBNAME], [The name of the XvMC library libLIBNAME.so for the xxmc plugin])],
+ [], [with_xxmc_lib="XvMCW"])
+ if test x"$enable_xvmc" != x"no"; then
+ if test x"$have_xv" != x"yes"; then
+ have_xvmc=no have_xxmc=no have_xvmc_or_xxmc=no
+ else
+ ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ ac_save_LIBS="$LIBS"
+
+ dnl Check for xxmc
+ XXMC_LIBS="${with_xxmc_path:+-L}$with_xxmc_path -l$with_xxmc_lib"
+ AC_SUBST(XXMC_LIBS)
+ AC_MSG_CHECKING([whether to enable the xxmc plugin with VLD extensions])
+ AC_MSG_RESULT([])
+ LIBS="$XXMC_LIBS $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCPutSlice()]])], [have_xxmc=yes],
+ [LIBS="$XXMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCPutSlice()]])],
+ [have_xxmc=yes XXMC_LIBS="$XXMC_LIBS -lXvMC"])])
+ if test x"$have_xxmc" = x"yes"; then
+ AC_CHECK_HEADERS([X11/extensions/vldXvMC.h],
+ [have_vldexts=yes
+ AC_DEFINE([HAVE_VLDXVMC], 1, [Define if you have vldXvMC.h])],
+ [have_vldexts=no])
+ else
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])], [have_xxmc=yes],
+ [LIBS="$XXMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])],
+ [have_xxmc=yes XXMC_LIBS="$XXMC_LIBS -lXvMC"])])
+ fi
+ if test x"$have_xxmc" = x"yes"; then
+ AC_CHECK_HEADERS([X11/extensions/XvMC.h], [], [have_xxmc=no])
+ fi
+
+ dnl Check for xvmc
+ XVMC_LIBS="${with_xvmc_path:+-L}$with_xvmc_path -l$with_xvmc_lib"
+ AC_SUBST(XVMC_LIBS)
+ AC_MSG_CHECKING([whether to enable the xvmc plugin])
+ AC_MSG_RESULT([])
+ LIBS="$XVMC_LIBS $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])], [have_xvmc=yes],
+ [LIBS="$XVMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])],
+ [have_xvmc=yes XVMC_LIBS="$XVMC_LIBS -lXvMC"])])
+ if test x"$have_xvmc" = x"yes"; then
+ AC_CHECK_HEADERS([X11/extensions/XvMC.h], [], [have_xvmc=no])
+ fi
+ CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS"
+ fi
+ have_xvmc_or_xxmc="$have_xvmc"; test x"$have_xxmc" = x"yes" && have_xvmc_or_xxmc=yes
+ if test x"$hard_enable_xvmc" = x"yes" && test x"$have_xvmc_or_xxmc" != x"yes"; then
+ AC_MSG_ERROR([XvMC support requested, but neither XvMC nor xxmc could be found, or X is disabled])
+ else
+ if test x"$have_xvmc" = x"yes"; 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.])
+ fi
+ if test x"$have_xxmc" = x"yes"; then
+ if test x"$have_vldexts" = x"yes"; 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.])
+ fi
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_XVMC], [test x"$have_xvmc" = x"yes"])
+ AM_CONDITIONAL([ENABLE_XXMC], [test x"$have_xxmc" = x"yes"])
+
+
+ dnl VDPAU
+ XINE_ARG_ENABLE([vdpau], [Disable VDPAU output plugin])
+ if test x"$no_x" != x"yes" && test x"$enable_vdpau" != x"no"; then
+ PKG_CHECK_MODULES([VDPAU], [vdpau], [have_vdpau=yes], [have_vdpau=no])
+ if test x"$have_vdpau" = xno; then
+ saved_CFLAGS="$CFLAGS"
+ saved_LIBS="$LIBS"
+ CFLAGS=
+ LIBS=
+ dnl likely defaults
+ dnl if these are bad, blame nVidia for not supplying vdpau.pc
+ VDPAU_CFLAGS=
+ VDPAU_LIBS=-lvdpau
+ AC_CHECK_HEADERS([vdpau/vdpau_x11.h], [have_vdpau=yes], [have_vdpau=no])
+ if test x"$have_vdpau" = x"yes"; then
+ AC_CHECK_LIB([vdpau], [vdp_device_create_x11], [], [have_vdpau=no], [$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS])
+ fi
+ if test x"$hard_enable_vdpau" = x"yes" && test x"$have_vdpau" != x"yes"; then
+ AC_MSG_ERROR([VDPAU support requested, but not all requirements are met])
+ fi
+ CFLAGS="$saved_CFLAGS"
+ LIBS="$saved_LIBS"
+ AC_SUBST([VDPAU_CFLAGS])
+ AC_SUBST([VDPAU_LIBS])
+ fi
+ fi
+ AM_CONDITIONAL([ENABLE_VDPAU], test x"$have_vdpau" = x"yes")
+
+])dnl XINE_VIDEO_OUT_PLUGIN
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
deleted file mode 100644
index cde2129a9..000000000
--- a/m4/wchar_t.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-# wchar_t.m4 serial 1 (gettext-0.12)
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether <stddef.h> has the 'wchar_t' type.
-dnl Prerequisite: AC_PROG_CC
-
-AC_DEFUN([gt_TYPE_WCHAR_T],
-[
- AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
- [AC_TRY_COMPILE([#include <stddef.h>
- wchar_t foo = (wchar_t)'\0';], ,
- gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
- if test $gt_cv_c_wchar_t = yes; then
- AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
- fi
-])
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
deleted file mode 100644
index af5ed936c..000000000
--- a/m4/wint_t.m4
+++ /dev/null
@@ -1,28 +0,0 @@
-# wint_t.m4 serial 2 (gettext-0.17)
-dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether <wchar.h> has the 'wint_t' type.
-dnl Prerequisite: AC_PROG_CC
-
-AC_DEFUN([gt_TYPE_WINT_T],
-[
- AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
- [AC_TRY_COMPILE([
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
- before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
- wint_t foo = (wchar_t)'\0';], ,
- gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
- if test $gt_cv_c_wint_t = yes; then
- AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
- fi
-])
diff --git a/m4/xine.m4 b/m4/xine.m4
index a92fb54e9..db530e250 100644
--- a/m4/xine.m4
+++ b/m4/xine.m4
@@ -23,194 +23,121 @@ dnl script generated by Autoconf, you may include it under the same
dnl distribution terms that you use for the rest of that program.
dnl
-dnl AM_PATH_XINE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for XINE, and define XINE_CFLAGS and XINE_LIBS
-dnl
-AC_DEFUN([AM_PATH_XINE],
-[dnl
-dnl Get the cflags and libraries from the xine-config script
-dnl
-AC_ARG_WITH(xine-prefix,
- AS_HELP_STRING([--with-xine-prefix=DIR], [prefix where XINE is installed (optional)]),
- xine_config_prefix="$withval", xine_config_prefix="")
-AC_ARG_WITH(xine-exec-prefix,
- AS_HELP_STRING([--with-xine-exec-prefix=DIR], [exec prefix where XINE is installed (optional)]),
- xine_config_exec_prefix="$withval", xine_config_exec_prefix="")
-AC_ARG_ENABLE(xinetest,
- AS_HELP_STRING([--disable-xinetest], [do not try to compile and run a test XINE program]),
- enable_xinetest=$enableval, enable_xinetest=yes)
-
- AC_LANG_PUSH([C])
+dnl _XINE_VERSION_PARSE(version)
+AC_DEFUN([_XINE_VERSION_PARSE], [`echo $1 | perl -e 'my $v = <>; chomp $v;
+my @v = split(" ", $v); $v = $v[[@S|@#v]]; $v =~ s/[[^0-9.]].*$//; @v = split (/\./, $v);
+push @v, 0 while $[#v] < 2; print $v[[0]] * 10000 + $v[[1]] * 100 + $v[[2]], "\n"'`])
- if test x$xine_config_exec_prefix != x ; then
- xine_config_args="$xine_config_args --exec-prefix=$xine_config_exec_prefix"
- if test x${XINE_CONFIG+set} != xset ; then
- XINE_CONFIG=$xine_config_exec_prefix/bin/xine-config
- fi
- fi
- if test x$xine_config_prefix != x ; then
- xine_config_args="$xine_config_args --prefix=$xine_config_prefix"
- if test x${XINE_CONFIG+set} != xset ; then
- XINE_CONFIG=$xine_config_prefix/bin/xine-config
- fi
- fi
- min_xine_version=ifelse([$1], ,0.5.0,$1)
- if test "x$enable_xinetest" != "xyes" ; then
- AC_MSG_CHECKING([for XINE-LIB version >= $min_xine_version])
- else
- AC_PATH_TOOL(XINE_CONFIG, xine-config, no)
- AC_MSG_CHECKING([for XINE-LIB version >= $min_xine_version])
- no_xine=""
- if test "$XINE_CONFIG" = "no" ; then
- no_xine=yes
+dnl _XINE_VERSION_CHECK(required, actual)
+AC_DEFUN([_XINE_VERSION_CHECK], [
+ required_version=ifelse([$1], , [0.0.0], [$1])
+ required_version_parsed=_XINE_VERSION_PARSE([$required_version])
+ actual_version=ifelse([$2], , [0.0.0], [$2])
+ actual_version_parsed=_XINE_VERSION_PARSE([$actual_version])
+ if test $required_version_parsed -le $actual_version_parsed; then
+ ifelse([$3], , [:], [$3])
else
- XINE_CFLAGS=`$XINE_CONFIG $xine_config_args --cflags 2>/dev/null`
- XINE_LIBS=`$XINE_CONFIG $xine_config_args --libs 2>/dev/null`
- XINE_ACFLAGS=`$XINE_CONFIG $xine_config_args --acflags 2>/dev/null`
- xine_version=`$XINE_CONFIG $xine_config_args --version 2>/dev/null`
- xine_config_major_version=`echo "$xine_version" | \
- sed -n 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/p'`
- xine_config_minor_version=`echo "$xine_version" | \
- sed -n 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/p'`
- xine_config_sub_version=`echo "$xine_version" | \
- sed -n 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/p'`
- xine_data_dir=`$XINE_CONFIG $xine_config_args --datadir 2>/dev/null`
- xine_script_dir=`$XINE_CONFIG $xine_config_args --scriptdir 2>/dev/null`
- xine_plugin_dir=`$XINE_CONFIG $xine_config_args --plugindir 2>/dev/null`
- xine_locale_dir=`$XINE_CONFIG $xine_config_args --localedir 2>/dev/null`
- dnl if test "x$enable_xinetest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $XINE_CFLAGS"
- LIBS="$XINE_LIBS $LIBS"
-dnl
-dnl Now check if the installed XINE is sufficiently new. (Also sanity
-dnl checks the results of xine-config to some extent
-dnl
- rm -f conf.xinetest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <xine.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+ ifelse([$4], , [:], [$4])
+ fi
+])
-int
-main ()
-{
- int major, minor, sub;
- char *tmp_version;
- system ("touch conf.xinetest");
+dnl AM_PATH_XINE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for XINE, and define XINE_CFLAGS and XINE_LIBS
+dnl
+AC_DEFUN([AM_PATH_XINE], [
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *) strdup("$min_xine_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &sub) != 3) {
- printf("%s, bad version string\n", "$min_xine_version");
- exit(1);
- }
+ AC_ARG_VAR([XINE_CONFIG], [Full path to xine-config (xine-lib < 1.2)])
+ AC_ARG_WITH([xine-prefix],
+ [AS_HELP_STRING([--with-xine-prefix], [prefix where xine-lib is installed (optional, xine-lib < 1.2)])])
+ AC_ARG_WITH([xine-exec-prefix],
+ [AS_HELP_STRING([--with-xine-exec-prefix], [exec prefix where xine-lib is installed (optional, xine-lib < 1.2)])])
- if ((XINE_MAJOR_VERSION != $xine_config_major_version) ||
- (XINE_MINOR_VERSION != $xine_config_minor_version) ||
- (XINE_SUB_VERSION != $xine_config_sub_version))
- {
- printf("\n*** 'xine-config --version' returned %d.%d.%d, but XINE (%d.%d.%d)\n",
- $xine_config_major_version, $xine_config_minor_version, $xine_config_sub_version,
- XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION);
- printf ("*** was found! If xine-config was correct, then it is best\n");
- printf ("*** to remove the old version of XINE. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If xine-config was wrong, set the environment variable XINE_CONFIG\n");
- printf("*** to point to the correct copy of xine-config, and remove the file config.cache\n");
- printf("*** before re-running configure\n");
- }
- else
- {
- if ((XINE_MAJOR_VERSION > major) ||
- ((XINE_MAJOR_VERSION == major) && (XINE_MINOR_VERSION > minor)) ||
- ((XINE_MAJOR_VERSION == major) && (XINE_MINOR_VERSION == minor) && (XINE_SUB_VERSION >= sub)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of XINE (%d.%d.%d) was found.\n",
- XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION);
- printf("*** You need a version of XINE newer than %d.%d.%d. The latest version of\n",
- major, minor, sub);
- printf("*** XINE is always available from:\n");
- printf("*** http://xine.sourceforge.net\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the xine-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of XINE, but you can also set the XINE_CONFIG environment to point to the\n");
- printf("*** correct copy of xine-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-]])],[],[no_xine=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
+ xine_config_args=""
+ if test x"$with_xine_exec_prefix" != x""; then
+ xine_config_args="$xine_config_args --exec-prefix=$with_xine_exec_prefix"
+ test x"$XINE_CONFIG" != x"" && XINE_CONFIG="$with_xine_exec_prefix/bin/xine-config"
+ fi
+ if test x"$with_xine_prefix" != x""; then
+ xine_config_args="$xine_config_args --prefix=$with_xine_prefix"
+ test x"$XINE_CONFIG" = x"" && XINE_CONFIG="$with_xine_prefix/bin/xine-config"
fi
- if test "x$no_xine" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
+
+ if "$PKG_CONFIG" --atleast-version 1.1.90 libxine; then
+ min_xine_version=ifelse([$1], , [1.2.0], [$1])
+ PKG_CHECK_MODULES([XINE], [libxine >= $min_xine_version],
+ [XINE_VERSION="`"$PKG_CONFIG" --modversion libxine`"
+ XINE_ACFLAGS="`"$PKG_CONFIG" --variable=acflags libxine`"
+ xine_data_dir="`"$PKG_CONFIG" --variable=datadir libxine`"
+ xine_script_dir="`"$PKG_CONFIG" --variable=scriptdir libxine`"
+ xine_plugin_dir="`"$PKG_CONFIG" --variable=plugindir libxine`"
+ xine_locale_dir="`"$PKG_CONFIG" --variable=localedir libxine`"
+ $2],
+ [$3])
else
- AC_MSG_RESULT(no)
- if test "$XINE_CONFIG" = "no" ; then
- echo "*** The xine-config script installed by XINE could not be found"
- echo "*** If XINE was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the XINE_CONFIG environment variable to the"
- echo "*** full path to xine-config."
- else
- if test -f conf.xinetest ; then
- :
- else
- echo "*** Could not run XINE test program, checking why..."
- CFLAGS="$CFLAGS $XINE_CFLAGS"
- LIBS="$LIBS $XINE_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <xine.h>
-#include <stdio.h>
-]], [[ return ((XINE_MAJOR_VERSION) || (XINE_MINOR_VERSION) || (XINE_SUB_VERSION)); ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding XINE or finding the wrong"
- echo "*** version of XINE. If it is not finding XINE, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means XINE was incorrectly installed"
- echo "*** or that you have moved XINE since it was installed. In the latter case, you"
- echo "*** may want to edit the xine-config script: $XINE_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
+ min_xine_version=ifelse([$1], , [0.5.0], [$1])
+ AC_PATH_TOOL([XINE_CONFIG], [xine-config], [no])
+ AC_MSG_CHECKING([for XINE-LIB version >= $min_xine_version])
+ XINE_CFLAGS="`$XINE_CONFIG $xine_config_args --cflags 2>/dev/null`"
+ XINE_LIBS="`$XINE_CONFIG $xine_config_args --libs 2>/dev/null`"
+ XINE_VERSION="`$XINE_CONFIG $xine_config_args --version 2>/dev/null`"
+ XINE_ACFLAGS="`$XINE_CONFIG $xine_config_args --acflags 2>/dev/null`"
+ xine_data_dir="`$XINE_CONFIG $xine_config_args --datadir 2>/dev/null`"
+ xine_script_dir="`$XINE_CONFIG $xine_config_args --scriptdir 2>/dev/null`"
+ xine_plugin_dir="`$XINE_CONFIG $xine_config_args --plugindir 2>/dev/null`"
+ xine_locale_dir="`$XINE_CONFIG $xine_config_args --localedir 2>/dev/null`"
+ _XINE_VERSION_CHECK([$min_xine_version], [$XINE_VERSION],
+ [xine_version_ok=yes; AC_MSG_RESULT([yes, $XINE_VERSION])],
+ [xine_version_ok=no; AC_MSG_RESULT([no, $XINE_VERSION])])
+ if test x"$xine_version_ok" = x"yes"; then
+ ifelse([$2], , [:], [$2])
+ else
+ AC_MSG_NOTICE([
+*** You need a version of xine-lib newer than $XINE_VERSION.
+*** The latest version of xine-lib is always available from:
+*** http://www.xinehq.de
+***
+*** If you have already installed a sufficiently new version, this error
+*** probably means that the wrong copy of the xine-config shell script is
+*** being found. The easiest way to fix this is to remove the old version
+*** of xine-lib, but you can also set the XINE_CONFIG environment variable
+*** to point to the correct copy of xine-config. In this case, you will have
+*** to modify your LD_LIBRARY_PATH enviroment variable, or edit
+*** /etc/ld.so.conf so that the correct libraries are found at run-time.
+ ])
+ ifelse([$3], , [:], [$3])
fi
- fi
- XINE_CFLAGS=""
- XINE_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(XINE_CFLAGS)
- AC_SUBST(XINE_LIBS)
- AC_SUBST(XINE_ACFLAGS)
- AC_LANG_POP([C])
- rm -f conf.xinetest
+ fi
-dnl Make sure HAVE_STRSEP, HAVE_SETENV and HAVE_STRPBRK are defined as
-dnl necessary.
- AC_CHECK_FUNCS([strsep strpbrk setenv])
-dnl alloca (in public macro) and MinGW
- AC_CHECK_HEADERS([malloc.h])
+ AC_SUBST(XINE_CFLAGS)
+ AC_SUBST(XINE_LIBS)
+ AC_SUBST(XINE_ACFLAGS)
])
+
+dnl XINE_ARG_WITH(VARIABLE, HELP-TEXT)
+dnl Like AC_ARG_WITH but strictly sets variables
+dnl hard_with_VARIABLE = "yes" or "no" if the option is present, else undefined
+dnl with_VARIABLE = "yes" or "no" if the option is enabled or disabled
+dnl (falls back on default_with_VARIABLE)
+dnl if both = yes, error is permissible if missing requirement(s)
+AC_DEFUN([XINE_ARG_WITH], [
+ if test "x$default_with_[]m4_translit([[$1]], [-], [_])" = x; then
+ AC_MSG_ERROR([default_with_[]m4_translit([[$1]], [-], [_]) is not set])
+ fi
+ AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])],
+ [test x"$withval" != xno && with_[]m4_translit([[$1]], [-], [_])=yes || with_[]m4_translit([[$1]], [-], [_])=no; hard_with_[]m4_translit([[$1]], [-], [_])="$with_[]m4_translit([[$1]], [-], [_])"],
+ [with_[]m4_translit([[$1]], [-], [_])="$default_with_[]m4_translit([[$1]], [-], [_])"; hard_with_[]m4_translit([[$1]], [-], [_])=''])])
+
+dnl XINE_ARG_ENABLE(VARIABLE, HELP-TEXT)
+dnl Like AC_ARG_WITH_X but wrapping AC_ARG_ENABLE
+AC_DEFUN([XINE_ARG_ENABLE], [
+ if test "x$default_enable_[]m4_translit([[$1]], [-], [_])" = x; then
+ AC_MSG_ERROR([default_enable_[]m4_translit([[$1]], [-], [_]) is not set])
+ fi
+ AC_ARG_ENABLE([$1], [AS_HELP_STRING([--enable-$1], [$2])],
+ [test x"$enableval" != xno && enable_[]m4_translit([[$1]], [-], [_])=yes || enable_[]m4_translit([[$1]], [-], [_])=no; hard_enable_[]m4_translit([[$1]], [-], [_])="$enable_[]m4_translit([[$1]], [-], [_])"],
+ [enable_[]m4_translit([[$1]], [-], [_])="$default_enable_[]m4_translit([[$1]], [-], [_])"; hard_enable_[]m4_translit([[$1]], [-], [_])=''])])
diff --git a/m4/xsize.m4 b/m4/xsize.m4
deleted file mode 100644
index 85bb721e4..000000000
--- a/m4/xsize.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-# xsize.m4 serial 3
-dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_XSIZE],
-[
- dnl Prerequisites of lib/xsize.h.
- AC_REQUIRE([gl_SIZE_MAX])
- AC_REQUIRE([AC_C_INLINE])
- AC_CHECK_HEADERS(stdint.h)
-])
diff --git a/m4/xv.m4 b/m4/xv.m4
deleted file mode 100644
index 9b37a0b6e..000000000
--- a/m4/xv.m4
+++ /dev/null
@@ -1,93 +0,0 @@
-# AC_FIND_LIBXV_IMPL (LIB)
-# -------------------------
-#
-AC_DEFUN([AC_PATH_LIBXV_IMPL],
-[
- AC_MSG_CHECKING([for $1])
- if test -f "$xv_path/$1"; then
- AC_MSG_RESULT([found $1 in $xv_path])
- XV_LIBS="$1"
- else
- if test -f "/usr/lib/$1"; then
- AC_MSG_RESULT([found $1 in /usr/lib])
- XV_LIBS="$1"
- else
- AC_MSG_RESULT([$1 not found in $xv_path])
- fi
- fi
-])
-
-AC_DEFUN([AC_TEST_LIBXV],
-[
- dnl -----------------------------------------------
- dnl Testing installed Xv library
- dnl -----------------------------------------------
- AC_CHECK_LIB(Xv, XvShmCreateImage,
- [
- AC_DEFINE(HAVE_XV,
- 1,
- [Define this if you have libXv installed])
-
- ac_have_xv="yes"
- case x$XV_LIBS in
- x*.a)
- AC_DEFINE(HAVE_XV_STATIC,
- 1,
- [Define this if you have libXv.a])
- ac_have_xv_static="yes"
- XV_LIBS="$xv_path/$XV_LIBS"
- ;;
- x*.so)
- XV_LIBS=`echo $XV_LIBS | sed 's/^lib/-l/; s/\.so$//'`
- ;;
- *)
- AC_MSG_ERROR([sorry, I don't know about $XV_LIBS])
- ;;
- esac
- ],
- ,
- [$X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS])
-
- dnl -----------------------------------------------
- dnl xine_check use Xv functions API.
- dnl -----------------------------------------------
- if test x$ac_have_xv = "xyes"; then
- EXTRA_X_LIBS="-L$xv_path $XV_LIBS -lXext"
- EXTRA_X_CFLAGS=""
- fi
- AC_SUBST(XV_LIBS)
- AC_SUBST(EXTRA_X_LIBS)
- AC_SUBST(EXTRA_X_CFLAGS)
-])
-
-# AC_PATH_LIBXV
-# -------------------------
-#
-AC_DEFUN([AC_FIND_LIBXV],
-[
- # Ensure that AC_PATH_XTRA is executed before this
- AC_REQUIRE([AC_PATH_XTRA])
-
- if test x$xv_path = x; then
- xv_path=/usr/X11R6/lib
- fi
-
- if test "x$xv_prefer_shared" = "xyes"; then
- AC_PATH_LIBXV_IMPL([libXv.so])
- else
- AC_PATH_LIBXV_IMPL([libXv.a])
- fi
-
- # Try the other lib if prefered failed
- if test x$XV_LIBS = x; then
- if ! test "x$xv_prefer_shared" = "xyes"; then
- AC_PATH_LIBXV_IMPL([libXv.so])
- else
- AC_PATH_LIBXV_IMPL([libXv.a])
- fi
- fi
-
- if ! test x$XV_LIBS = x; then
- AC_TEST_LIBXV
- fi
-])