summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-10-07 20:10:45 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-10-07 20:10:45 +0000
commit19b84cd45f5be52401edae5852df4c889e832979 (patch)
treec4caa6e58b1fade69f7ae4f5f92b5e15c2470b04
parentfd99af790c0f3fe36373553870a301c39e34bf12 (diff)
downloadxine-lib-19b84cd45f5be52401edae5852df4c889e832979.tar.gz
xine-lib-19b84cd45f5be52401edae5852df4c889e832979.tar.bz2
Add ogg/vorbis checks. Change divxdecore checks.
CVS patchset: 760 CVS date: 2001/10/07 20:10:45
-rw-r--r--configure.in32
-rwxr-xr-xcvscompile.sh2
-rw-r--r--m4/Makefile.am2
-rw-r--r--m4/_xine.m428
-rw-r--r--m4/ogg.m491
-rw-r--r--m4/vorbis.m496
-rw-r--r--src/Makefile.am2
-rw-r--r--src/libdivx4/Makefile.am21
-rw-r--r--src/libvorbis/Makefile.am40
9 files changed, 257 insertions, 57 deletions
diff --git a/configure.in b/configure.in
index 153850dbc..a2aa21e8b 100644
--- a/configure.in
+++ b/configure.in
@@ -248,11 +248,29 @@ AM_CONDITIONAL(HAVE_XINERAMA, test x$ac_have_xinerama = "xyes")
dnl
dnl Checks for Ascii-Art library
dnl
-AM_PATH_AALIB(1.2,,)
+AM_PATH_AALIB(1.2,, AC_MSG_RESULT(*** All of AALIB dependent parts will be disabled ***))
AM_CONDITIONAL(HAVE_AA, test x$no_aalib != "xyes")
dnl
+dnl Check for divx4
+dnl
+AC_CHECK_DIVX4(, AC_MSG_RESULT(*** All of DIVX4 dependent parts will be disabled ***))
+AM_CONDITIONAL(HAVE_DIVX4, test x"$no_divx4" != "xyes")
+
+
+dnl
+dnl Ogg/Vorbis libs.
+dnl
+
+AM_PATH_OGG([no_oggvorbis=no
+ AM_PATH_VORBIS(no_oggvorbis=no,
+ AC_MSG_RESULT([*** All of OGG/VORBIS dependent parts will be disabled ***]))],
+ AC_MSG_RESULT([*** All of OGG/VORBIS dependent parts will be disabled ***]))
+AM_CONDITIONAL(HAVE_VORBIS, test x"$no_oggvorbis" = "xno")
+
+
+dnl
dnl OSS style audio interface
dnl
AC_MSG_CHECKING(for OSS audio support)
@@ -573,20 +591,8 @@ else
fi
AC_SUBST(W32DLL_DEP)
-enable_divx4=yes
-DIVX_LIBS=$LIBS
-LIBS="$DIVX_LIBS -lstdc++"
-AC_CHECK_LIB(divxdecore, decore, , enable_divx4=no)
-AC_CHECK_HEADER(decore.h, , enable_divx4=no)
-if test x$enable_divx4 = xno ; then
- AC_MSG_WARN([
-*** Did not find decore.h or libdivxdecore. Not compiling divx4 plugin. ])
-fi;
-AM_CONDITIONAL(HAVE_DIVXDECORE, test x"$enable_divx4" = "xyes")
-
AM_CONDITIONAL(HAVE_FFMMX, test x"$enable_ffmmx" = "xyes")
-
dnl
dnl gcc __attribute__ ((aligned ()))
dnl
diff --git a/cvscompile.sh b/cvscompile.sh
index 6cd96756a..0be9ff331 100755
--- a/cvscompile.sh
+++ b/cvscompile.sh
@@ -13,7 +13,7 @@ rm -f config.cache
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
-m4_files="_xine.m4 alsa.m4 arts.m4 esd.m4 aa.m4 irixal.m4"
+m4_files="_xine.m4 alsa.m4 arts.m4 esd.m4 aa.m4 irixal.m4 ogg.m4 vorbis.m4"
if test -d $srcdir/m4; then
rm -f acinclude.m4
for m4f in $m4_files; do
diff --git a/m4/Makefile.am b/m4/Makefile.am
index f0954207a..71a3353cc 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -6,7 +6,7 @@ m4datadir = @ACLOCAL_DIR@
m4data_DATA = xine.m4
endif
-EXTRA_DIST = _xine.m4 alsa.m4 arts.m4 esd.m4 xine.m4 aa.m4 irixal.m4 as.m4
+EXTRA_DIST = _xine.m4 alsa.m4 arts.m4 esd.m4 xine.m4 aa.m4 irixal.m4 as.m4 ogg.m4 vorbis.m4
debug:
diff --git a/m4/_xine.m4 b/m4/_xine.m4
index d73cabd40..a738fd732 100644
--- a/m4/_xine.m4
+++ b/m4/_xine.m4
@@ -1,4 +1,32 @@
dnl
+dnl Check for divx4.
+dnl AC_CHECK_DIVX4([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]])
+AC_DEFUN([AC_CHECK_DIVX4],
+ [
+ ac_save_LIBS="$LIBS"
+
+ DIVX4_LIBS="$DIVX4_LIBS -lstdc++"
+ LIBS="$DIVX4_LIBS"
+
+ AC_CHECK_HEADER(decore.h,
+ [ no_divx4=no;
+ AC_CHECK_LIB(divxdecore, decore, no_divx4=no, no_divx4=yes) ]
+ , no_divx4=yes)
+
+ LIBS="$ac_save_LIBS"
+
+ if test x"$no_divx4" = "xno" ; then
+ DIVX4_LIBS="$DIVX4_LIBS -ldivxdecore"
+ AC_SUBST(DIVX4_LIBS)
+ ifelse([$1], , :, [$1])
+ else
+ DIVX4_LIBS=""
+ AC_SUBST(DIVX4_LIBS)
+ ifelse([$2], , :, [$2])
+ 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],
diff --git a/m4/ogg.m4 b/m4/ogg.m4
new file mode 100644
index 000000000..509f73b36
--- /dev/null
+++ b/m4/ogg.m4
@@ -0,0 +1,91 @@
+# Configure paths for libogg
+# Jack Moffitt <jack@icecast.org> 10-21-2000
+# Shamelessly stolen from Owen Taylor and Manish Singh
+
+dnl AM_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
+dnl
+AC_DEFUN(AM_PATH_OGG,
+[dnl
+dnl Get the cflags and libraries
+dnl
+AC_ARG_WITH(ogg-prefix,[ --with-ogg-prefix=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
+AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
+
+ if test x$ogg_prefix != x ; then
+ ogg_args="$ogg_args --prefix=$ogg_prefix"
+ OGG_CFLAGS="-I$ogg_prefix/include"
+ OGG_LIBS="-L$ogg_prefix/lib"
+ fi
+
+ OGG_LIBS="$OGG_LIBS -logg"
+
+ AC_MSG_CHECKING(for Ogg)
+ no_ogg=""
+
+
+ if test "x$enable_oggtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $OGG_CFLAGS"
+ LIBS="$LIBS $OGG_LIBS"
+dnl
+dnl Now check if the installed Ogg is sufficiently new.
+dnl
+ rm -f conf.oggtest
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ogg/ogg.h>
+
+int main ()
+{
+ system("touch conf.oggtest");
+ return 0;
+}
+
+],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+
+ if test "x$no_ogg" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$1], , :, [$1])
+ else
+ AC_MSG_RESULT(no)
+ if test -f conf.oggtest ; then
+ :
+ else
+ echo "*** Could not run Ogg test program, checking why..."
+ CFLAGS="$CFLAGS $OGG_CFLAGS"
+ LIBS="$LIBS $OGG_LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <ogg/ogg.h>
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding Ogg or finding the wrong"
+ echo "*** version of Ogg. If it is not finding Ogg, 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 Ogg was incorrectly installed"
+ echo "*** or that you have moved Ogg since it was installed. In the latter case, you"
+ echo "*** may want to edit the ogg-config script: $OGG_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ OGG_CFLAGS=""
+ OGG_LIBS=""
+ ifelse([$2], , :, [$2])
+ fi
+ AC_SUBST(OGG_CFLAGS)
+ AC_SUBST(OGG_LIBS)
+ rm -f conf.oggtest
+])
diff --git a/m4/vorbis.m4 b/m4/vorbis.m4
new file mode 100644
index 000000000..0cc4c3c2e
--- /dev/null
+++ b/m4/vorbis.m4
@@ -0,0 +1,96 @@
+# Configure paths for libvorbis
+# Jack Moffitt <jack@icecast.org> 10-21-2000
+# Shamelessly stolen from Owen Taylor and Manish Singh
+
+dnl AM_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
+dnl
+AC_DEFUN(AM_PATH_VORBIS,
+[dnl
+dnl Get the cflags and libraries
+dnl
+AC_ARG_WITH(vorbis-prefix,[ --with-vorbis-prefix=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
+AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
+
+ if test x$vorbis_prefix != x ; then
+ vorbis_args="$vorbis_args --prefix=$vorbis_prefix"
+ VORBIS_CFLAGS="-I$vorbis_prefix/include"
+ VORBIS_LIBDIR="-L$vorbis_prefix/lib"
+ fi
+
+ VORBIS_LIBS="$VORBIS_LIBDIR -lvorbis -lm"
+ VORBISFILE_LIBS="-lvorbisfile"
+ VORBISENC_LIBS="-lvorbisenc"
+
+ AC_MSG_CHECKING(for Vorbis)
+ no_vorbis=""
+
+
+ if test "x$enable_vorbistest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $VORBIS_CFLAGS"
+ LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
+dnl
+dnl Now check if the installed Vorbis is sufficiently new.
+dnl
+ rm -f conf.vorbistest
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <vorbis/codec.h>
+
+int main ()
+{
+ system("touch conf.vorbistest");
+ return 0;
+}
+
+],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+
+ if test "x$no_vorbis" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$1], , :, [$1])
+ else
+ AC_MSG_RESULT(no)
+ if test -f conf.vorbistest ; then
+ :
+ else
+ echo "*** Could not run Vorbis test program, checking why..."
+ CFLAGS="$CFLAGS $VORBIS_CFLAGS"
+ LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <vorbis/codec.h>
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
+ echo "*** version of Vorbis. If it is not finding Vorbis, 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 Vorbis was incorrectly installed"
+ echo "*** or that you have moved Vorbis since it was installed." ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ VORBIS_CFLAGS=""
+ VORBIS_LIBS=""
+ VORBISFILE_LIBS=""
+ VORBISENC_LIBS=""
+ ifelse([$2], , :, [$2])
+ fi
+ AC_SUBST(VORBIS_CFLAGS)
+ AC_SUBST(VORBIS_LIBS)
+ AC_SUBST(VORBISFILE_LIBS)
+ AC_SUBST(VORBISENC_LIBS)
+ rm -f conf.vorbistest
+])
diff --git a/src/Makefile.am b/src/Makefile.am
index af8b4dd06..7b284b9e3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = audio_out video_out dxr3 input libmpeg2 libspudec demuxers \
liba52 libffmpeg liblpcm libw32dll libmad libdts libvfill \
- libvorbis xine-engine libdivx4
+ libvorbis libdivx4 xine-engine
debug:
@list='$(SUBDIRS)'; for subdir in $$list; do \
diff --git a/src/libdivx4/Makefile.am b/src/libdivx4/Makefile.am
index a8e425dbc..cebb2ab86 100644
--- a/src/libdivx4/Makefile.am
+++ b/src/libdivx4/Makefile.am
@@ -6,25 +6,20 @@ CFLAGS = @GLOBAL_CFLAGS@
LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
-if HAVE_DIVXDECORE
-divx4_codec = xineplug_decode_divx4.la
-endif
-
libdir = $(XINE_PLUGINDIR)
-lib_LTLIBRARIES = $(divx4_codec)
-
-xineplug_decode_divx4_la_SOURCES = xine_decoder.c
+if HAVE_DIVX4
+divx4_module = xineplug_decode_divx4.la
+endif
-xineplug_decode_divx4_la_LDFLAGS = -ldivxdecore -avoid-version -module
+lib_LTLIBRARIES = $(divx4_module)
-#noinst_HEADERS = config.h
+xineplug_decode_divx4_la_SOURCES = xine_decoder.c
+xineplug_decode_divx4_la_LIBADD = @DIVX4_LIBS@
+xineplug_decode_divx4_la_LDFLAGS = -avoid-version -module
debug:
- @list='$(SUBDIRS)'; for subdir in $$list; do \
- (cd $$subdir && $(MAKE) $@) || exit;\
- done;
- @$(MAKE) CFLAGS="@DEBUG_CFLAGS@"
+ @$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"
install-debug: debug
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
diff --git a/src/libvorbis/Makefile.am b/src/libvorbis/Makefile.am
index 8beec93b8..286a1befa 100644
--- a/src/libvorbis/Makefile.am
+++ b/src/libvorbis/Makefile.am
@@ -1,42 +1,26 @@
-CFLAGS = @GLOBAL_CFLAGS@
+##
+## Process this file with automake to produce Makefile.in
+##
+
+CFLAGS = @GLOBAL_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@
LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
libdir = $(XINE_PLUGINDIR)
-lib_LTLIBRARIES = xineplug_decode_vorbis.la
+if HAVE_VORBIS
+vorbis_module = xineplug_decode_vorbis.la
+endif
+
+lib_LTLIBRARIES = $(vorbis_module)
xineplug_decode_vorbis_la_SOURCES = xine_decoder.c
-xineplug_decode_vorbis_la_LIBADD = -lvorbis
+xineplug_decode_vorbis_la_LIBADD = @OGG_LIBS@ @VORBIS_LIBS@
xineplug_decode_vorbis_la_LDFLAGS = -avoid-version -module
-
-##
-## Install header files (default=$includedir/xine)
-##
-install-includeHEADERS: $(include_HEADERS)
- @$(NORMAL_INSTALL)
- $(mkinstalldirs) $(DESTDIR)$(includedir)/xine
- @list='$(include_HEADERS)'; for p in $$list; do \
- if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
- echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p"; \
- $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p; \
- done
-
-
-##
-## Remove them
-##
-uninstall-includeHEADERS:
- @$(NORMAL_UNINSTALL)
- list='$(include_HEADERS)'; for p in $$list; do \
- rm -f $(DESTDIR)$(includedir)/xine/$$p; \
- done
-
-
debug:
- @$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"
+ @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) @OGG_CFLAGS@ @VORBIS_CFLAGS@"
install-debug: debug
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am