[grilo/0.2.x] build: Add option to disable Test UI



commit 04140cb254ef86a38e37acacbfa72ff97ca21ddc
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Wed Sep 26 17:00:59 2012 +0200

    build: Add option to disable Test UI

 configure.ac |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 614daaa..b2a26d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,10 +119,26 @@ AC_SUBST(GLIB_MKENUMS)
 # ----------------------------------------------------------
 
 PKG_CHECK_MODULES([GTU], [ gtk+-3.0 >= 3.0 ],
-                       [ BUILD_GRILO_TEST_UI=yes ],
-                       [ BUILD_GRILO_TEST_UI=no ])
+                       [ HAVE_GTK=yes ],
+                       [ HAVE_GTK=no ])
 
-AM_CONDITIONAL(BUILD_GRILO_TEST_UI, test "x$BUILD_GRILO_TEST_UI" = "xyes")
+AC_ARG_ENABLE(test-ui,
+        AS_HELP_STRING([--enable-test-ui],
+                [Build Test UI (default: auto)]),
+        [
+                case "$enableval" in
+                     yes)
+                        if test "x$HAVE_GTK" = "xno"; then
+                           AC_MSG_ERROR([gtk+-3.0 >= 3.0 not found, install it or use --disable-test-ui])
+                        fi
+                        ;;
+                     no)
+                        HAVE_GTK=no
+                        ;;
+                esac
+        ])
+
+AM_CONDITIONAL(BUILD_GRILO_TEST_UI, test "x$HAVE_GTK" = "xyes")
 
 # ----------------------------------------------------------
 # NET LIBRARY



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