Blame SOURCES/gavl-1.1.1-system_libgdither.patch

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