[libdmapsharing] Don't make GTK a hard dependency just because of dpapview Signed-off-by: W. Michael Petullo <mike fl



commit d685b3c1aa3b7eaf0318530bebbe61f27dc8ad19
Author: W. Michael Petullo <mike flyn org>
Date:   Sat Dec 11 17:01:50 2010 -0600

    Don't make GTK a hard dependency just because of dpapview
    Signed-off-by: W. Michael Petullo <mike flyn org>

 configure.ac      |   14 ++++++++------
 tests/Makefile.am |   18 ++++++++++++------
 2 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 58a941d..fc25867 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,19 +335,21 @@ if test "x$USE_MAINTAINER_MODE" = "xyes" ; then
 fi
 
 PKG_CHECK_MODULES(GTK, gtk+-2.0, HAVE_GTK=yes, HAVE_GTK=no)
-if test "x$HAVE_GTK" = "xno"; then
-        AC_MSG_ERROR(you need gtk+-2.0 installed)
-fi
+
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
 PKG_CHECK_MODULES(GEE, gee-1.0, HAVE_GEE=yes, HAVE_GEE=no)
-if test "x$HAVE_GEE" = "xno"; then
-        AC_MSG_ERROR(you need gee-1.0 installed)
-fi
+
 AC_SUBST(GEE_CFLAGS)
 AC_SUBST(GEE_LIBS)
 
+if test "x$HAVE_GEE" = "xyes" -a "x$HAVE_GTK" = "xyes"; then
+	AM_CONDITIONAL(BUILD_DPAPVIEW, true)
+else
+	AC_WARN([Will not build dpapview])
+fi
+
 AM_CONDITIONAL(USE_GSTREAMERAPP, test x"$HAVE_GSTREAMERAPP" = "xyes")
 
 AC_SUBST(GSTREAMERAPP_CFLAGS)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4dcf97e..c9bfc83 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,8 @@
-noinst_PROGRAMS = test-dmap-client test-dmap-server dpapview
+noinst_PROGRAMS = test-dmap-client test-dmap-server
+
+if BUILD_DPAPVIEW
+noinst_PROGRAMS += dpapview
+endif
 
 test_dmap_client_SOURCES = \
 	test-dmap-db.c \
@@ -38,11 +42,6 @@ test_dmap_server_LDADD = \
 	$(IMAGEMAGICK_LIBS) \
 	$(MDNS_LIBS)
 
-dpapview_VALASOURCES = \
-	dpapview.vala
-
-dpapview_VALABUILTSOURCES = $(dpapview_VALASOURCES:.vala=.c)
-
 if MAINTAINER_MODE
 PACKAGES = --pkg gee-1.0 --pkg gtk+-2.0 --pkg gstreamer-0.10 --pkg libdmapsharing-2.2 --pkg libsoup-2.4 --pkg glib-2.0
 BUILT_SOURCES = vala.stamp
@@ -52,6 +51,12 @@ vala.stamp: $(dpapview_VALASOURCES)
 	touch $@
 endif
 
+if BUILD_DPAPVIEW
+dpapview_VALASOURCES = \
+	dpapview.vala
+
+dpapview_VALABUILTSOURCES = $(dpapview_VALASOURCES:.vala=.c)
+
 dpapview_SOURCES = \
 	$(dpapview_VALABUILTSOURCES)
 
@@ -59,6 +64,7 @@ dpapview_LDADD = \
 	$(top_builddir)/libdmapsharing/libdmapsharing.la \
 	$(GTK_LIBS) \
 	$(GEE_LIBS)
+endif
 
 AM_CPPFLAGS = \
 	-I$(top_srcdir) \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]