From a71d7235e5f27314b440ae2576387a8fb829e352 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 8 Oct 2003 13:51:08 +0000 Subject: [PATCH] Added proper AVI library settings and checks. --- Makefile.am | 12 ++++++++++-- configure.in | 40 +++++++++++++++++++++++++++++++++------- src/Makefile.am | 22 +++++++++++++++++----- 3 files changed, 60 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index e4b8eda95..4ff755b0d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,15 @@ ## process this file with automake to produce Makefile.in if HAVE_AVICLASSES -AVICLASSES_SUBDIR=aviclasses +aviclasses_subdir=aviclasses +endif +if HAVE_AVILIB +avilib_subdir=avilib +endif +if HAVE_AVILIB0_6_10 +avilib0_6_10_subdir=avilib-0.6.10 endif -SUBDIRS = avilib $(AVICLASSES_SUBDIR) src doc +SUBDIRS = $(avilib_subdir) $(aviclasses_subdir) $(avilib0_6_10_subdir) src doc +DIST_SUBDIRS = $(avilib_subdir) $(aviclasses_subdir) $(avilib0_6_10_subdir) \ + src doc diff --git a/configure.in b/configure.in index 7a8bc1de8..3a5289487 100644 --- a/configure.in +++ b/configure.in @@ -804,15 +804,42 @@ AM_CONDITIONAL(HAVE_WXWINDOWS, test x"$have_wxwindows" = "xyes") dnl dnl Option to use the (old) avilib library instead of the AVI classes dnl -AC_ARG_ENABLE(aviclasses, - [ --enable-aviclasses Use AVIclasses instead of avilib], - have_aviclasses=yes, have_aviclasses=no) +AC_ARG_WITH(avilib, + [ --with-avilib=version Which avilib should be used (old, classes or 0.6.10)], + with_avilib_given=yes, with_avilib_given=no) - if test "x$have_aviclasses" = "xyes"; then + if test "x$with_avilib_given" = "xyes"; then + case "${with_avilib}" in + old) + have_avilib=yes + ;; + classes) + have_aviclasses=yes + ;; + "0.6.10") + have_avilib0_6_10=yes + ;; + *) + echo "*** Unknown AVI library string \"${with_avilib}\". Supported " + echo "*** values are:" + echo "*** old - the old and tested avilib, no OpenDML support" + echo "*** 0.6.10 - the new avilib with OpenDML support" + echo "*** classes - AVI access classes by Cyrius with OpenDML support" + exit 1 + ;; + esac + fi + if test "x$have_aviclasses" = "xyes"; then AC_DEFINE(HAVE_AVICLASSES, 1, - [Define if the newer AVIclasses should be used]) + [Define if the newer AVIclasses should be used.]) AVICLASSES_LIBS="-laviclasses" fi + if test "x$have_avilib0_6_10" = "xyes"; then + AC_DEFINE(HAVE_AVILIB0_6_10, 1, + [Define if the newer avilib from transcode 0.6.10 should be used.]) + fi + AM_CONDITIONAL(HAVE_AVILIB, test x"$have_avilib0_6_10" != "xyes") + AM_CONDITIONAL(HAVE_AVILIB0_6_10, test x"$have_avilib0_6_10" == "xyes") AM_CONDITIONAL(HAVE_AVICLASSES, test x"$have_aviclasses" = "xyes") AVILIB_LIBS="-lavi" @@ -825,5 +852,4 @@ CXXFLAGS="-Wall -Wno-sign-compare -Wno-comment -D_LARGEFILE64_SOURCE -D_LARGEFIL CPPFLAGS="@EXTRA_CFLAGS@" LDFLAGS="@EXTRA_LDFLAGS@" -AC_OUTPUT(Makefile avilib/Makefile aviclasses/Makefile src/Makefile src/mmg/Makefile doc/Makefile) - +AC_OUTPUT(Makefile avilib/Makefile avilib-0.6.10/Makefile aviclasses/Makefile src/Makefile src/mmg/Makefile doc/Makefile) diff --git a/src/Makefile.am b/src/Makefile.am index 462559488..c8994ab89 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,10 +1,22 @@ AUTOMAKE_OPTIONS = dist-zip foreign -DEFAULT_INCLUDES = -I$(top_srcdir) \ - -I$(top_srcdir)/avilib \ - -I$(top_srcdir)/aviclasses \ - -I$(top_srcdir)/src -LDFLAGS = -L$(top_srcdir)/avilib -L$(top_srcdir)/aviclasses +if HAVE_AVILIB +avilib_incdirs = -I$(top_srcdir)/avilib +avilib_libdirs = -L$(top_srcdir)/avilib +endif +if HAVE_AVILIB0_6_10 +avilib0_6_10_incdirs = -I$(top_srcdir)/avilib-0.6.10 +avilib0_6_10_libdirs = -L$(top_srcdir)/avilib-0.6.10 +endif +if HAVE_AVICLASSES +aviclasses_incdirs = -I$(top_srcdir)/aviclasses +aviclasses_libdirs = -L$(top_srcdir)/aviclasses +endif + +DEFAULT_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src \ + $(avilib_incdirs) $(avilib_6_10_incdirs) $(aviclasses_incdirs) + +LDFLAGS = $(avilib_libdirs) $(avilib0_6_10_libdirs) $(aviclasses_libdirs) if HAVE_WXWINDOWS SUBDIRS = mmg