Blame SOURCES/gavl-1.1.1-system_libgdither.patch

b0a55b
diff -up gavl-1.1.1/configure.ac.gdither gavl-1.1.1/configure.ac
b0a55b
--- gavl-1.1.1/configure.ac.gdither	2009-07-13 22:42:38.000000000 +0200
b0a55b
+++ gavl-1.1.1/configure.ac	2009-10-28 00:02:31.461428785 +0100
b0a55b
@@ -217,6 +217,27 @@ TOP_SRCDIR=`cd ${srcdir} && pwd` 
b0a55b
 AC_SUBST(TOP_SRCDIR)
b0a55b
 
b0a55b
 dnl
b0a55b
+dnl System libraries
b0a55b
+dnl
b0a55b
+
b0a55b
+AC_ARG_ENABLE(libgdither,
b0a55b
+  [  --enable-libgdither	System libgdither (experimental)])
b0a55b
+if test "${enable_libgdither}" = "yes"
b0a55b
+then
b0a55b
+  PKG_CHECK_MODULES(LIBGDITHER, libgdither,
b0a55b
+    [
b0a55b
+      AC_DEFINE(HAVE_LIBGDITHER, 1, [Define to 1 if you have the `libgdither' library (-lgdither).])
b0a55b
+      have_libgdither="true"
b0a55b
+    ],
b0a55b
+    [
b0a55b
+      have_libgdither="false"
b0a55b
+    ]
b0a55b
+  )
b0a55b
+fi
b0a55b
+AM_CONDITIONAL(HAVE_LIBGDITHER, [test x$have_libgdither = xtrue])
b0a55b
+
b0a55b
+
b0a55b
+dnl
b0a55b
 dnl Output variables
b0a55b
 dnl
b0a55b
 
b0a55b
diff -up gavl-1.1.1/gavl/Makefile.am.gdither gavl-1.1.1/gavl/Makefile.am
b0a55b
--- gavl-1.1.1/gavl/Makefile.am.gdither	2009-05-13 17:10:37.000000000 +0200
b0a55b
+++ gavl-1.1.1/gavl/Makefile.am	2009-10-28 00:04:37.837435280 +0100
b0a55b
@@ -40,8 +40,15 @@ threednow_libs = 
b0a55b
 threednow_subdirs =
b0a55b
 endif
b0a55b
 
b0a55b
+if HAVE_LIBGDITHER
b0a55b
+  MAYBE_LIBGDITHER_LA = @LIBGDITHER_LIBS@
b0a55b
+else
b0a55b
+  MAYBE_LIBGDITHER = libgdither
b0a55b
+  MAYBE_LIBGDITHER_LA = libgdither/libgdither.la
b0a55b
+endif
b0a55b
+
b0a55b
 
b0a55b
-SUBDIRS = hq c libgdither libsamplerate $(mmx_subdirs) \
b0a55b
+SUBDIRS = hq c $(MAYBE_LIBGDITHER) libsamplerate $(mmx_subdirs) \
b0a55b
 $(sse_subdirs) \
b0a55b
 $(sse2_subdirs) \
b0a55b
 $(sse3_subdirs) \
b0a55b
@@ -109,7 +116,7 @@ $(sse3_libs) \
b0a55b
 $(threednow_libs) \
b0a55b
 c/libgavl_c.la \
b0a55b
 hq/libgavl_hq.la \
b0a55b
-libgdither/libgdither.la \
b0a55b
+$(MAYBE_LIBGDITHER_LA) \
b0a55b
 libsamplerate/libsamplerate.la \
b0a55b
 @LIBGAVL_LIBS@ \
b0a55b
 -lm