summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Messier <mmessier@grapetv.org>2007-05-14 20:08:12 -0400
committerMatt Messier <mmessier@grapetv.org>2007-05-14 20:08:12 -0400
commit0f8df48c99c5ba5bc6b27e07a85df183400e9410 (patch)
treec36cb61d0d8ad4fd6fc13e90bee3fc10a89770c6
parenta8559f87b6cf39292a94d457689a1dfd1b4b21bf (diff)
downloadxine-lib-0f8df48c99c5ba5bc6b27e07a85df183400e9410.tar.gz
xine-lib-0f8df48c99c5ba5bc6b27e07a85df183400e9410.tar.bz2
Final pass over input plugin configuration checks
-- Move some generic checks out of m4/input.m4 and back into configure.ac -- Remove ioctl_request.m4 and inline it in configure.ac -- Fix compilation of internal libcdio and libvcd stuff -- now works for Darwin -- Add a switch for enabling/disabling dvb support. Disabled by default for all platforms except for Linux. Only allowed to be used on Linux. -- Disable vcd support on all platforms except for FreeBSD, Linux, and Solaris, because src/input/input_vcd.c is only supported on those platforms even though libcdio and libvcd will compile on other platforms -- Clean up some summary.m4 stuff
-rw-r--r--configure.ac88
-rw-r--r--m4/Makefile.am1
-rw-r--r--m4/input.m4149
-rw-r--r--m4/ioctl_request.m448
-rw-r--r--m4/summary.m4175
-rw-r--r--m4/video_out.m46
-rw-r--r--src/input/Makefile.am10
-rw-r--r--src/input/vcd/Makefile.am8
-rw-r--r--src/input/vcd/libcdio/Makefile.am4
-rw-r--r--src/input/vcd/libvcd/Makefile.am6
10 files changed, 239 insertions, 256 deletions
diff --git a/configure.ac b/configure.ac
index 59d0ab219..f721454b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -326,8 +326,25 @@ dnl -----------------------
AC_HEADER_STDC
AC_CHECK_HEADERS([alloca.h])
-AC_CHECK_HEADERS([assert.h byteswap.h dirent.h execinfo.h libgen.h malloc.h netdb.h ucontext.h])
-AC_CHECK_HEADERS([sys/ioctl.h sys/mixer.h sys/mman.h sys/param.h sys/times.h])
+AC_CHECK_HEADERS([assert.h byteswap.h dirent.h errno.h execinfo.h fcntl.h glob.h])
+AC_CHECK_HEADERS([libgen.h malloc.h netdb.h stdbool.h ucontext.h])
+AC_CHECK_HEADERS([sys/ioctl.h sys/mixer.h sys/mman.h sys/param.h sys/times.h sys/wait.h])
+
+dnl This is duplicative due to AC_HEADER_STDC, but src/input/vcd stuff needs to
+dnl have HAVE_STDIO_H defined, or it won't compile.
+AC_CHECK_HEADERS([stdio.h])
+
+dnl cdrom ioctls (common for dvdnav and vcd)
+case "$host_os" in
+ linux*)
+ AC_CHECK_HEADERS([linux/cdrom.h],
+ [AC_DEFINE([HAVE_LINUX_CDROM], 1, [Define 1 if you have Linux-type CD-ROM support])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/cdrom.h>]],
+ [[struct cdrom_generic_command test; int has_timeout = sizeof(test.timeout);]])],
+ [AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1], [Define 1 if timeout is in cdrom_generic_command struct])])])
+ ;;
+esac
+AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h])
dnl ----------------
@@ -336,19 +353,35 @@ dnl ----------------
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
-AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
AC_CHECK_GENERATE_INTTYPES([include])
AM_CONDITIONAL([GENERATED_INTTYPES_H], [test "x$ac_cv_header_inttypes_h" != x"yes"])
AC_CHECK_TYPE([ssize_t], [],
[AC_DEFINE([ssize_t], [__int64], [define ssize_t to __int64 if it's missing in default includes])])
AC_CHECK_SOCKLEN_T
-AC_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()])
dnl ---------------------
dnl checks for structures
dnl ---------------------
+AC_CHECK_MEMBER([struct tm.tm_gmtoff],
+ [AC_DEFINE([HAVE_TM_GMTOFF], 1, [Define if struct tm has the tm_gmtoff member.])],
+ [], [#include <time.h>])
+
dnl -----------------------------------
dnl checks for compiler characteristics
@@ -372,6 +405,26 @@ AC_C_CONST
AC_C_INLINE
AC_C_RESTRICT
+dnl empty_array_size - src/input/vcd
+AC_MSG_CHECKING([how to create empty arrays])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[]; } baz]])],
+ [empty_array_size=""],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[0]; } baz]])],
+ [empty_array_size="0"],
+ [AC_MSG_ERROR([compiler is unable to create empty arrays])])])
+
+AC_DEFINE_UNQUOTED([EMPTY_ARRAY_SIZE], [$empty_array_size], [what to put between the brackets for empty arrays])
+AC_MSG_RESULT([[[$empty_array_size]]])
+
+dnl ISOC99_PRAGMA - src/input/vcd/libvcd
+AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Pragma("pack(1)")]])],
+ [ISOC99_PRAGMA=yes
+ AC_DEFINE([HAVE_ISOC99_PRAGMA], [], [Supports ISO _Pragma() macro])],
+ [ISOC99_PRAGMA=no])
+AC_MSG_RESULT([$ISOC99_PRAGMA])
+
+
dnl ASM ALIGN is power of two ?
dnl src/post/planar
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[asm(".align 3");]])],
@@ -783,17 +836,22 @@ dnl NLS: src/input/mms.c src/input/vcd, xine-utils
AC_CHECK_FUNCS([nl_langinfo])
dnl src/libfaad
-AC_CHECK_DECL(lrintf,[
- AC_DEFINE([HAVE_LRINTF], [1], [Define this if the 'lrintf' function is declared in math.h])
- AC_DEFINE([_ISOC9X_SOURCE], [1], [Define this if you are ISO C9X compliant])
- ],,[
-#define _ISOC9X_SOURCE
-#include <math.h>
-])
+AC_CHECK_DECL([lrintf],
+ [AC_DEFINE([HAVE_LRINTF], 1, [Define this if the 'lrintf' function is declared in math.h])
+ AC_DEFINE([_ISOC9X_SOURCE], 1, [Define this if you are ISO C9X compliant])],
+ [],
+ [#define _ISOC9X_SOURCE
+ #include <math.h>])
dnl contrib/libdca, src/video_out/vidix/drivers/mach64_vid.c
AC_CHECK_FUNCS([memalign])
+dnl src/input/vcd/libcdio/portable.h
+AC_CHECK_FUNCS([bzero])
+
+dnl src/libfaad/common.h
+AC_CHECK_FUNCS([memcpy])
+
dnl src/input/input_file.c
AC_ARG_ENABLE([mmap],
AS_HELP_STRING([--enable-mmap], [Enable mmap() file loading (default: no)]))
@@ -850,7 +908,7 @@ dnl extension of AC_PATH_X that sets X_CFLAGS and X_LIBS. It will also set
dnl X_EXTRA_LIBS and X_PRE_LIBS.
AC_PATH_XTRA
if test x"$no_x" != x"yes"; then
- X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+ X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
AC_CHECK_LIB([Xext], [main],
[X_LIBS="$X_LIBS -lXext"], [AC_MSG_ERROR([libXext is required])],
[$X_LIBS])
@@ -889,9 +947,9 @@ AC_SYS_LARGEFILE
dnl Add macros to the compiler command line that are also in config.h for things
dnl that do not #include config.h.
dnl known: src/input/libreal, src/input/librtsp
-test x"$ac_cv_sys_file_offset_bits" != x"no" && CPPFLAGS="-D_FILE_OFFSET_BITS=64 $CPPFLAGS"
-test x"$ac_cv_sys_largefile_source" != x"no" && CPPFLAGS="-D_LARGEFILE_SOURCE $CPPFLAGS"
-test x"$ac_cv_sys_large_files" != x"" && CPPFLAGS="-D_LARGE_FILES $CPPFLAGS"
+test x"$ac_cv_sys_file_offset_bits" = x"yes" && CPPFLAGS="-D_FILE_OFFSET_BITS=64 $CPPFLAGS"
+test x"$ac_cv_sys_largefile_source" = x"yes" && CPPFLAGS="-D_LARGEFILE_SOURCE $CPPFLAGS"
+test x"$ac_cv_sys_large_files" = x"yes" && CPPFLAGS="-D_LARGE_FILES $CPPFLAGS"
dnl -------
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 3fd1e9313..71e4b9d51 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -17,7 +17,6 @@ EXTRA_DIST = \
directx.m4 \
gas.m4 \
input.m4 \
- ioctl_request.m4 \
libFLAC.m4 \
macosx.m4 \
objc.m4 \
diff --git a/m4/input.m4 b/m4/input.m4
index 4a1462bbe..b12992170 100644
--- a/m4/input.m4
+++ b/m4/input.m4
@@ -6,79 +6,105 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [
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=disable
default_enable_gnomevfs=enable
default_enable_samba=enable
default_enable_v4l=disable
- default_enable_vcd=enable
+ default_enable_vcd=disable
default_with_internal_vcdlibs=without
case "$host_os" in
- linux*) default_enable_v4l=enable ;;
+ cygwin* | mingw*)
+ default_enable_gnomevfs=disable
+ default_enable_samba=disable
+ ;;
+ darwin*)
+ default_enable_gnomevfs=disable
+ default_enable_samba=disable
+ ;;
+ freebsd*)
+ default_enable_vcd=enable
+ ;;
+ linux*)
+ default_enable_v4l=enable
+ default_enable_vcd=enable
+ ;;
+ solaris*)
+ default_enable_vcd=enable
+ ;;
esac
+ dnl dvb
+ AC_ARG_ENABLE([dvb],
+ [AS_HELP_STRING([--enable-dvb], [Enable support for the DVB plugin (Linux only)])],
+ [test x"$enableval" != x"no" && enable_dvb="yes"],
+ [test $default_enable_dvb = disable && enable_dvb="no"])
+ if test x"$enable_dvb" != x"no"; then
+ case "$host_os" in
+ linux*) have_dvb=yes ;;
+ *) have_dvb=no ;;
+ esac
+ if test x"$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
AC_ARG_ENABLE([gnomevfs],
- [AS_HELP_STRING([--disable-gnomevfs], [do not build gnome-vfs support])],
- [], [test $default_enable_gnomevfs = disable && enable_gnomevfs=no])
+ [AS_HELP_STRING([--enable-gnomevfs], [Enable support for the Gnome-VFS plugin])],
+ [test x"$enableval" != x"no" && enable_gnomevfs="yes"],
+ [test $default_enable_gnomevfs = disable && enable_gnomevfs="no"])
if test x"$enable_gnomevfs" != x"no"; then
- PKG_CHECK_MODULES([GNOME_VFS], [gnome-vfs-2.0], [no_gnome_vfs=no], [no_gnome_vfs=yes])
- if test x"$no_gnome_vfs" != x"yes"; then
- AC_DEFINE([HAVE_GNOME_VFS], 1, [Define this if you have gnome-vfs installed])
+ PKG_CHECK_MODULES([GNOME_VFS], [gnome-vfs-2.0], [have_gnomevfs=yes], [have_gnome_vfs=no])
+ if test x"$enable_gnomevfs" = x"yes" && test x"$have_gnomevfs" != x"yes"; then
+ AC_MSG_ERROR([Gnome-VFS support requested, but Gnome-VFS not found])
fi
- else
- no_gnome_vfs=yes
fi
- AM_CONDITIONAL([ENABLE_GNOME_VFS], [test x"$no_gnome_vfs" != x"yes"])
+ AM_CONDITIONAL([ENABLE_GNOME_VFS], [test x"$have_gnomevfs" = x"yes"])
dnl libsmbclient
AC_ARG_ENABLE([samba],
- [AS_HELP_STRING([--disable-samba], [do not build Samba support])],
- [], [test $default_enable_samba = disable && enable_samba=no])
+ [AS_HELP_STRING([--enable-samba], [Enable support for the Samba plugin])],
+ [test x"$enableval" != x"no" && enable_samba="yes"],
+ [test $default_enable_samba = disable && enable_samba="no"])
if test x"$enable_samba" != x"no"; then
AC_CHECK_LIB([smbclient], [smbc_init],
- [AC_CHECK_HEADERS([libsmbclient.h], [have_libsmbclient=yes
- LIBSMBCLIENT_LIBS="-lsmbclient"])])
+ [AC_CHECK_HEADERS([libsmbclient.h], [have_libsmbclient=yes LIBSMBCLIENT_LIBS="-lsmbclient"])])
AC_SUBST(LIBSMBCLIENT_LIBS)
+ if test x"$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_libsmbclient" = x"yes"])
+ AM_CONDITIONAL([ENABLE_LIBSMBCLIENT], [test x"$have_samba" = x"yes"])
dnl video-for-linux (v4l)
AC_ARG_ENABLE([v4l],
- [AS_HELP_STRING([--disable-v4l], [do not build Video4Linux input plugin])],
- [], [test $default_enable_v4l = disable && enable_v4l=no])
+ [AS_HELP_STRING([--enable-v4l], [Enable Video4Linux support])],
+ [test x"$enableval" != x"no" && enable_v4l="yes"],
+ [test $default_enable_v4l = disable && enable_v4l="no"])
if test x"$enable_v4l" != x"no"; then
AC_CHECK_HEADERS([linux/videodev.h], [have_v4l=yes], [have_v4l=no])
AC_CHECK_HEADERS([asm/types.h])
- if test x"$enable_v4l" = x"yes" && test x"$have_v4l" = x"no"; then
+ if test x"$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"])
- dnl cdrom ioctls (common for dvdnav and vcd)
- case "$host_os" in
- linux*)
- AC_CHECK_HEADERS([linux/cdrom.h],
- [AC_DEFINE([HAVE_LINUX_CDROM], 1, [Define 1 if you have Linux-type CD-ROM support])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <linux/cdrom.h>]],
- [[struct cdrom_generic_command test; int has_timeout = sizeof(test.timeout);]])],
- [AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1], [Define 1 if timeout is in cdrom_generic_command struct])])])
- ;;
- esac
- AC_CHECK_HEADERS([sys/dvdio.h sys/cdio.h sys/scsiio.h])
-
-
dnl dvdnav
+ dnl XXX: This could be cleaned up so that code does not have to ifdef so much
AC_ARG_WITH([external-dvdnav],
- [AS_HELP_STRING([--with-external-dvdnav], [use external dvdnav library (not recommended)])],
- [], [with_external_dvdnav=no])
+ [AS_HELP_STRING([--with-external-dvdnav], [Use external dvdnav library (not recommended)])],
+ [test x"$withval" != x"no" && with_external_dvdnav="yes"], [with_external_dvdnav="no"])
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])],
@@ -90,57 +116,29 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [
dnl Video CD
+ dnl XXX: This could be cleaned up so that code does not have it ifdef so much
AC_ARG_ENABLE([vcd],
- [AS_HELP_STRING([--disable-vcd], [do not compile VCD plugin])],
- [], [test $default_enable_vcd = disable && enable_vcd=no])
+ [AS_HELP_STRING([--enable-vcd], [Enable VCD (VideoCD) support])],
+ [test x"$enableval" != x"no" && enable_vcd="yes"],
+ [test $default_enable_vcd = disable && enable_vcd="no"])
+ AC_ARG_WITH([internal-vcdlibs],
+ [AS_HELP_STRING([--with-internal-vcdlibs], [force using internal libcdio/libvcd/libvcdinfo])],
+ [test x"$withval" != x"no" && with_internal_vcdlibs="yes"],
+ [test $default_with_internal_vcdlibs = without && with_internal_vcdlibs="no"])
if test x"$enable_vcd" != x"no"; then
- AC_ARG_WITH([internal-vcdlibs],
- [AS_HELP_STRING([--with-internal-vcdlibs], [force using internal libcdio/libvcd/libvcdinfo])],
- [], [test $default_with_internal_vcdlibs = without && with_internal_vcdlibs=no])
dnl check twice - fallback is to use internal vcdlibs
if test x"$with_internal_vcdlibs" = x"no"; then
- PKG_CHECK_MODULES([LIBCDIO], [libcdio >= 0.71], [], [with_internval_vcdlibs=yes])
- PKG_CHECK_MODULES([LIBVCDINFO], [libvcdinfo >= 0.7.23], [], [with_internval_vcdlibs=yes])
- if test x"$with_internval_vcdlibs" = x"yes"; then
+ PKG_CHECK_MODULES([LIBCDIO], [libcdio >= 0.71], [], [with_internal_vcdlibs=yes])
+ PKG_CHECK_MODULES([LIBVCDINFO], [libvcdinfo >= 0.7.23], [], [with_internal_vcdlibs=yes])
+ if test x"$with_internal_vcdlibs" = x"yes"; then
AC_MSG_RESULT([Using included libcdio/libvcdinfo support])
fi
fi
- if test "x$with_internval_vcdlibs" = "xno"; then
+ if test x"$with_internal_vcdlibs" = x"no"; then
AC_DEFINE([HAVE_VCDNAV], 1, [Define this if you use external libcdio/libvcdinfo])
else
AC_DEFINE_UNQUOTED([HOST_ARCH], ["$host_os/$host_cpu"], [host os/cpu identifier])
AC_DEFINE([_DEVELOPMENT_], [], [enable warnings about being development release])
- AC_CHECK_FUNCS([bzero memcpy])
-
- AC_CHECK_MEMBER([struct tm.tm_gmtoff],
- [AC_DEFINE([HAVE_TM_GMTOFF], 1, [Define if struct tm has the tm_gmtoff member.])],
- [], [#include <time.h>])
-
- dnl empty_array_size
- AC_MSG_CHECKING([how to create empty arrays])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[]; } baz]])],
- [empty_array_size=""],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[struct { int foo; int bar[0]; } baz]])],
- [empty_array_size="0"],
- [AC_MSG_ERROR([compiler is unable to create empty arrays])])])
-
- AC_DEFINE_UNQUOTED([EMPTY_ARRAY_SIZE], [$empty_array_size], [what to put between the brackets for empty arrays])
- AC_MSG_RESULT([[[$empty_array_size]]])
-
- dnl ISOC99_PRAGMA
- AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Pragma("pack(1)")]])],
- [ISOC99_PRAGMA=yes
- AC_DEFINE([HAVE_ISOC99_PRAGMA], [], [Supports ISO _Pragma() macro])],
- [ISOC99_PRAGMA=no])
- AC_MSG_RESULT([$ISOC99_PRAGMA])
-
- AC_CHECK_HEADERS([errno.h fcntl.h glob.h stdbool.h])
- if test x"$ac_cv_header_stdint_h" != x"yes"; then
- AC_CHECK_SIZEOF([int], 4)
- AC_CHECK_SIZEOF([long], 4)
- AC_CHECK_SIZEOF([long long], 8)
- fi
dnl
dnl bitfield order
@@ -239,6 +237,7 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [
darwin*)
AC_CHECK_HEADERS([IOKit/IOKitLib.h CoreFoundation/CFBase.h],
[AC_DEFINE([HAVE_DARWIN_CDROM], 1, [Define 1 if you have Darwin OS X-type CD-ROM support])])
+ LIBVCD_LIBS="$LIBVCD_LIBS -framework CoreFoundation -framework IOKit"
;;
freebsd4.*)
AC_DEFINE([HAVE_FREEBSD_CDROM], 1, [Define 1 if you have FreeBSD CD-ROM support])
@@ -270,6 +269,6 @@ AC_DEFUN([XINE_INPUT_PLUGINS], [
AC_SUBST(LIBVCD_CFLAGS)
AC_SUBST(LIBVCD_LIBS)
AC_SUBST(LIBVCDINFO_LIBS)
- AM_CONDITIONAL([WITH_EXTERNAL_VCDLIBS], [test x"$with_internal_vcdlibs" != x"no"])
- AM_CONDITIONAL([ENABLE_VCD], [test x"$enable_vcd" = x"yes"])
+ AM_CONDITIONAL([WITH_EXTERNAL_VCDLIBS], [test x"$with_internal_vcdlibs" = x"no"])
+ AM_CONDITIONAL([ENABLE_VCD], [test x"$enable_vcd" != x"no"])
])
diff --git a/m4/ioctl_request.m4 b/m4/ioctl_request.m4
deleted file mode 100644
index 8ded72504..000000000
--- a/m4/ioctl_request.m4
+++ /dev/null
@@ -1,48 +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/summary.m4 b/m4/summary.m4
index c99153674..b695b212a 100644
--- a/m4/summary.m4
+++ b/m4/summary.m4
@@ -12,30 +12,23 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
echo " - stdin_fifo - rtp"
echo " - http - mms"
echo " - pnm - rtsp"
- echo " - dvb"
- if test "x$with_external_dvdnav" = "xyes"; then
+ if test x"$enable_vcd" != x"no"; then
+ if test x"$with_internal_vcdlibs" = x"no"; then
+ echo " - vcdo - vcd (external libs)"
+ else
+ echo " - vcdo - vcd (internal libs)"
+ fi
+ fi
+ if test x"$with_external_dvdnav" = x"yes"; then
echo " - dvd (external libs)"
else
echo " - dvd (internal libs)"
fi
- if test "x$enable_vcd" = "xyes"; then
- if test "x$internal_vcdnav" = "xno"; then
- echo " - vcd (external libs)"
- else
- echo " - vcd (internal libs)"
- fi
- fi
- echo " - vcdo"
+ 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"
echo " - cdda"
- if test "x$no_gnome_vfs" = "xno"; then
- echo " - gnome-vfs"
- fi
- if test "x$have_v4l" = "xyes"; then
- echo " - v4l"
- fi
- if test "x$have_libsmbclient" = "xyes"; then
- echo " - smbclient"
- fi
echo ""
dnl Demuxers
@@ -59,26 +52,26 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
echo " - FLAC - aac"
echo " - iff - matroska"
echo " - vmd - flv"
- if test "x$enable_asf" = "xyes"; then
+ if test x"$enable_asf" != x"no"; then
echo " - asf"
fi
- if test "x$have_vorbis" = "xyes"; then
+ if test x"$have_vorbis" = x"yes"; then
echo " - ogg"
fi
- if test "x$enable_mng" != x"no"; then
+ if test x"$enable_mng" != x"no"; then
echo " - mng"
fi
- if test "x$enable_modplug" != x"no"; then
+ if test x"$enable_modplug" != x"no"; then
echo " - mod"
fi
- if test "x$have_libflac" = "xyes"; then
+ if test x"$have_libflac" = x"yes"; then
echo " - FLAC (with libFLAC)"
fi
- if test "x$have_wavpack" = "xyes"; then
+ if test x"$have_wavpack" = x"yes"; then
echo " - WavPack"
fi
- if test "x$enable_a52dec" = "xyes"; then
- if test "x$have_a52" = "xyes"; then
+ if test x"$enable_a52dec" != x"no"; then
+ if test x"$have_a52" = x"yes"; then
echo " - ac3 (external library)"
else
echo " - ac3 (internal library)"
@@ -90,7 +83,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
echo " * video decoder plugins:"
echo " - MPEG 1,2 - Amiga Bitplane"
echo " - Raw RGB - Raw YUV"
- if test "x$with_external_ffmpeg" = "xyes"; then
+ if test x"$with_external_ffmpeg" = x"yes"; then
echo " - ffmpeg (external library):"
else
echo " - ffmpeg (internal library):"
@@ -112,19 +105,19 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
echo " - 8BPS - Duck TrueMotion v1"
echo " - ATI VCR1 - Flash Video"
echo " - ZLIB - MSZH"
- if test "x$have_dxr3" = "xyes"; then
+ if test x"$have_dxr3" = x"yes"; then
echo " - dxr3_video"
fi
- if test "x$enable_w32dll" = "xyes"; then
+ if test x"$enable_w32dll" != x"no"; then
echo " - w32dll"
fi
- if test "x$have_imagemagick" = "xyes"; then
+ if test x"$have_imagemagick" = x"yes"; then
echo " - image"
fi
- if test x"no_gdkpixbuf" != "xyes"; then
+ if test x"no_gdkpixbuf" != x"yes"; then
echo " - gdk-pixbuf"
fi
- if test "x$have_theora" = "xyes"; then
+ if test x"$have_theora" = x"yes"; then
echo " - theora"
fi
echo ""
@@ -133,7 +126,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
echo " * audio decoder plugins:"
echo " - GSM 06.10"
echo " - linear PCM - Nosefart (NSF)"
- if test "x$with_external_ffmpeg" = "xyes"; then
+ if test x"$with_external_ffmpeg" = x"yes"; then
echo " - ffmpeg (external library):"
else
echo " - ffmpeg (internal library):"
@@ -145,50 +138,50 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
echo " - XA ADPCM - Game DPCM/ADPCM"
echo " - Mace 3:13 - Mace 6:1"
echo " - FLAC"
- if test "x$have_libflac" = "xyes"; then
+ if test x"$have_libflac" = x"yes"; then
echo " - FLAC (with libFLAC)"
fi
- if test "x$have_vorbis" = "xyes"; then
+ if test x"$have_vorbis" = x"yes"; then
echo " - vorbis"
fi
- if test "x$have_speex" = "xyes"; then
+ if test x"$have_speex" = x"yes"; then
echo " - speex"
fi
- if test "x$enable_w32dll" = "xyes"; then
+ if test x"$enable_w32dll" != x"no"; then
echo " - w32dll"
fi
- if test "x$enable_faad" = "xyes"; then
+ if test x"$enable_faad" != x"no"; then
echo " - faad"
fi
- if test "x$enable_mad" = "xyes"; then
- if test "x$with_external_mad" != "xno"; then
+ if test x"$enable_mad" != x"no"; then
+ if test x"$with_external_mad" != x"no"; then
echo " - MAD (MPG 1/2/3) (external library)"
else
echo " - MAD (MPG 1/2/3) (internal library)"
fi
fi
- if test "x$enable_libdts" = "xyes"; then
- if test "x$have_dts" = "xyes"; then
+ if test x"$enable_libdts" != x"no"; then
+ if test x"$have_dts" = x"yes"; then
echo " - DTS (external library)"
else
echo " - DTS (internal library)"
fi
fi
- if test "x$enable_a52dec" = "xyes"; then
- if test "x$have_a52" = "xyes"; then
+ if test x"$enable_a52dec" != x"no"; then
+ if test x"$have_a52" = x"yes"; then
echo " - A52/ra-dnet (external library)"
else
echo " - A52/ra-dnet (internal library)"
fi
fi
- if test "x$enable_musepack" != "xno"; then
- if test "x$have_mpcdec" = "xyes"; then
+ if test x"$enable_musepack" != x"no"; then
+ if test x"$have_mpcdec" = x"yes"; then
echo " - MusePack (external library)"
else
echo " - MusePack (internal library)"
fi
fi
- if test "x$have_wavpack" = "xyes"; then
+ if test x"$have_wavpack" = x"yes"; then
echo " - WavPack"
fi
echo ""
@@ -198,9 +191,7 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
echo " - spu - spucc"
echo " - spucmml - sputext"
echo " - spudvb"
- if test "x$have_dxr3" = "xyes"; then
- echo " - dxr3_spu"
- fi
+ test x"$have_dxr3" = x"yes" && echo " - dxr3_spu"
echo ""
dnl post plugins
@@ -217,109 +208,91 @@ AC_DEFUN([XINE_LIB_SUMMARY], [
dnl Video plugins
echo " * video driver plugins:"
- if test "x$no_x" != "xyes"; then
+ if test x"$no_x" != x"yes"; then
echo " - XShm (X11 shared memory)"
- dnl syncfb
- if test "x$have_syncfb" = "xyes"; then
+ if test x"$have_syncfb" = x"yes"; then
echo " - SyncFB (for Matrox G200/G400 cards)"
fi
- dnl Xv
- if test "x$have_xv" = "xyes"; then
- if test "x$have_xv_static" = "xyes"; then
+ 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
- dnl XxMC
- if test "x$have_xxmc" = "xyes"; then
- if test "x$have_vldexts" = "xyes"; then
+ 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
- dnl XvMC
- if test "x$have_xvmc" = "xyes"; then
+ if test x"$have_xvmc" = x"yes"; then
echo " - XvMC (XVideo motion compensation)"
fi
- if test x"$have_opengl" = "xyes"; then
+ 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
- if test "x$have_sunfb" = "xyes"; then
- if test "x$have_sundga" = "xyes"; then
+ 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" = "xyes"; then
- dnl xcb-shm
- if test "x$have_xcbshm" = "xyes"; then
+ 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
- dnl xcb-xv
- if test "x$have_xcbxv" = "xyes"; then
+ if test x"$have_xcbxv" = x"yes"; then
echo " - xcb-xv (XVideo using XCB)"
fi
fi
- if test "x$have_aalib" = "xyes"; then
- echo " - aa (Ascii ART)"
- fi
- if test "x$have_caca" = "xyes"; then
- echo " - caca (Color AsCii Art)"
- fi
- if test "x$have_fb" = "xyes"; then
- echo " - fb (Linux framebuffer device)"
- fi
- if test "x$have_sdl" = "xyes"; then
- echo " - sdl (Simple DirectMedia Layer)"
- fi
- if test "x$have_libstk" = "xyes"; then
- echo " - stk (Libstk Set-top Toolkit)"
- fi
- if test "x$have_directfb" = "xyes"; then
- echo " - directfb (DirectFB driver)"
- fi
- if test "x$have_dxr3" = "xyes"; then
- if test "x$have_encoder" = "xyes"; then
+
+
+ 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" = "xyes"; then
+ if test x"$have_vidix" = x"yes"; then
echo $ECHO_N " - vidix ("
- if test "x$no_x" != "xyes"; then
+ if test x"$no_x" != x"yes"; then
echo $ECHO_N "X11"
- if test "x$have_fb" = "xyes"; then
+ if test x"$have_fb" = x"yes"; then
echo $ECHO_N " and "
fi
fi
- if test "x$have_fb" = "xyes"; then
+ if test x"$have_fb" = x"yes"; then
echo $ECHO_N "framebuffer"
fi
echo $ECHO_N " support"
- if test "x$enable_dha_kmod" = "xyes"; then
+ if test x"$enable_dha_kmod" != x"no"; then
echo " with dhahelper)"
else
echo ")"
fi
fi
- if test "x$have_directx" = "xyes"; then
- echo " - directx (DirectX video driver)"
- fi
- if test "x$have_macosx_video" = "xyes"; then
- echo " - Mac OS X OpenGL"
- fi
echo ""
diff --git a/m4/video_out.m4 b/m4/video_out.m4
index 4a6bc431b..a0ab163fa 100644
--- a/m4/video_out.m4
+++ b/m4/video_out.m4
@@ -72,7 +72,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
dnl Color AsCii Art
AC_ARG_WITH([caca],
- [AS_HELP_STRING([--without-caca], [Do not build CACA support])],
+ [AS_HELP_STRING([--with-caca], [enable support for CACA])],
[test x"$withval" != x"no" && with_caca="yes"],
[test $default_with_caca = without && with_caca=no])
if test x"$with_caca" != x"no"; then
@@ -263,7 +263,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
dnl SDL
AC_ARG_WITH([sdl],
- [AS_HELP_STRING([--without-sdl], [Build without SDL video output])],
+ [AS_HELP_STRING([--with-sdl], [Enable support for SDL video output])],
[test x"$withval" != x"no" && with_sdl="yes"],
[test $default_with_sdl = without && with_sdl="no"])
if test x"$with_sdl" != x"no"; then
@@ -310,7 +310,7 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
dnl xcb
AC_ARG_WITH([xcb],
- [AS_HELP_STRING([--without-xcb], [Doesn't build XCB video out plugins])],
+ [AS_HELP_STRING([--with-xcb], [Enable support for XCB video out plugins])],
[test x"$withval" != x"no" && with_xcb="yes"],
[test $default_with_xcb = without && with_xcb="no"])
if test x"$with_xcb" != x"no"; then
diff --git a/src/input/Makefile.am b/src/input/Makefile.am
index a5c98c85f..b1cd89bb5 100644
--- a/src/input/Makefile.am
+++ b/src/input/Makefile.am
@@ -10,7 +10,10 @@ AM_LDFLAGS = $(xineplug_ldflags)
# All of xine input plugins should be named like the scheme "xineplug_inp_"
#
-SUBDIRS = dvb libreal librtsp
+SUBDIRS = libreal librtsp
+if ENABLE_DVB
+SUBDIRS += dvb
+endif
if ENABLE_VCD
SUBDIRS += vcd
endif
@@ -23,6 +26,10 @@ xineinclude_HEADERS = input_plugin.h
noinst_HEADERS = net_buf_ctrl.h mms.h mmsh.h pnm.h media_helper.h videodev2.h http_helper.h
+if ENABLE_DVB
+in_dvb = xineplug_inp_dvb.la
+endif
+
if ENABLE_VCD
in_vcd = xineplug_inp_vcdo.la
endif
@@ -51,7 +58,6 @@ endif
# not ported to native Windows
if !WIN32
in_rtp = xineplug_inp_rtp.la
-in_dvb = xineplug_inp_dvb.la
endif
diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am
index 0ff664605..1f03720cb 100644
--- a/src/input/vcd/Makefile.am
+++ b/src/input/vcd/Makefile.am
@@ -1,6 +1,6 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(DEFAULT_OCFLAGS) $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
AM_LDFLAGS = $(xineplug_ldflags)
SUBDIRS =
@@ -13,9 +13,5 @@ noinst_HEADERS = vcdio.h vcdplayer.h xine-extra.h
xineplug_LTLIBRARIES = xineplug_inp_vcd.la
xineplug_inp_vcd_la_SOURCES = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c
-
-if WITH_EXTERNAL_VCDLIBS
-xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCDINFO_LIBS)
-else
xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCD_LIBS) $(LIBVCDINFO_LIBS) -lm
-endif
+xineplug_inp_vcd_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS)
diff --git a/src/input/vcd/libcdio/Makefile.am b/src/input/vcd/libcdio/Makefile.am
index 6414d8230..a79525c8f 100644
--- a/src/input/vcd/libcdio/Makefile.am
+++ b/src/input/vcd/libcdio/Makefile.am
@@ -1,11 +1,11 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(DEFAULT_OCFLAGS)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
AM_LDFLAGS = $(xineplug_ldflags)
SUBDIRS = cdio MSWindows image
-INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib
+INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib
noinst_HEADERS = \
cdio_assert.h \
diff --git a/src/input/vcd/libvcd/Makefile.am b/src/input/vcd/libvcd/Makefile.am
index 65ffc6255..c922685e3 100644
--- a/src/input/vcd/libvcd/Makefile.am
+++ b/src/input/vcd/libvcd/Makefile.am
@@ -1,8 +1,8 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(DEFAULT_OCFLAGS)
+AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib
+INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib
SUBDIRS = libvcd
@@ -47,7 +47,6 @@ libvcd_la_SOURCES = \
stream.c \
stream_stdio.c \
util.c
-libvcd_la_LIBADD = $(LIBCDIO_LIBS) $(LIBISO9660_LIBS)
libvcd_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS)
libvcdinfo_la_SOURCES = \
@@ -55,3 +54,4 @@ libvcdinfo_la_SOURCES = \
inf.c \
info_private.c \
vcd_read.c
+libvcdinfo_la_CFLAGS = $(AM_CFLAGS) $(LIBCDIO_CFLAGS)