[jana] build: Make libjana-gtk compilation optional



commit aac030f235dd4cbfafa4373ee416f071179d480c
Author: Rob Bradford <rob linux intel com>
Date:   Thu Jun 23 16:17:29 2011 +0100

    build: Make libjana-gtk compilation optional

 Makefile.am  |    9 ++++++++-
 configure.ac |   14 +++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 12581a4..f63a3fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,10 @@
-SUBDIRS=libjana libjana-ecal libjana-gtk @build_tests@ @build_examples@ po
+SUBDIRS=libjana libjana-ecal
+
+if WITH_GTK
+SUBDIRS += libjana-gtk
+endif
+
+SUBDIRS += @build_tests@ @build_examples@ po
+
 DIST_SUBDIRS=libjana libjana-ecal libjana-gtk tests examples po
 
diff --git a/configure.ac b/configure.ac
index 5a984f9..eb93653 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,6 @@ AC_CHECK_LIB(m, pow)
 
 PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= 2.12.0)
 PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0)
 PKG_CHECK_MODULES(ECAL, libecal-1.2 >= 1.4.0)
 PKG_CHECK_MODULES(EDATASERVERUI, libedataserverui-1.2)
 
@@ -65,6 +64,19 @@ fi
 
 AM_CONDITIONAL(WITH_GLADE, test "$enable_glade" = yes)
 
+AC_ARG_ENABLE([gtk],
+              [AC_HELP_STRING([--enable-gtk=@<:@yes/no@:>@],
+                              [Enable gtk @<:@default=no@:>@])],
+              [],
+              [enable_gtk=no])
+
+
+AM_CONDITIONAL(WITH_GTK, test "$enable_gtk" = yes)
+
+AS_IF([test "x$enable_gtk" = "xyes"],
+      [PKG_CHECK_MODULES(GTK, [gtk+-2.0])],
+      [])
+
 AC_SUBST([build_tests])
 AC_SUBST([build_examples])
 AC_SUBST([catalogdir])



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