[tomboy] Make NUNIT conditional



commit 5f354f00eeeea55398ac2f0563cf669c48179309
Author: Aaron Borden <adborden live com>
Date:   Sat Jun 25 22:02:03 2011 -0700

    Make NUNIT conditional
    
    Signed-off-by: Jared Jennings <jjennings src gnome org>

 configure.in |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/configure.in b/configure.in
index 1a9c601..e1de3a9 100644
--- a/configure.in
+++ b/configure.in
@@ -269,11 +269,24 @@ AC_SUBST(GALAGO_LIBS)
 
 #
 # NUnit required for (optional) unit tests
-#
-PKG_CHECK_MODULES(NUNIT, mono-nunit, HAVE_NUNIT="yes", HAVE_NUNIT="no")
-AM_CONDITIONAL(HAVE_NUNIT, test "$HAVE_NUNIT" = "yes")
+# 
+# Added optional arg support. Default now is no NUNIT support instead of yes.
+# bgo #647591
+# 
+#
+AC_ARG_ENABLE(tests,
+	      [  --enable-tests[[=no/yes]]  compile with unit tests [[default: no]]],
+	      [ENABLE_NUNIT="$enableval"],
+          [ENABLE_NUNIT="no"]
+	      )
+	      
+if test "x$ENABLE_NUNIT" = "xyes" ; then
+	PKG_CHECK_MODULES(NUNIT, mono-nunit, HAVE_NUNIT="yes", HAVE_NUNIT="no")
+	AC_PATH_PROG(NUNIT, nunit-console)
+fi
+AM_CONDITIONAL(HAVE_NUNIT, test "x$HAVE_NUNIT" = "xyes")
 AC_SUBST(NUNIT_LIBS)
-AC_PATH_PROG(NUNIT, nunit-console)
+	
 
 #
 # Check for X11 libraries
@@ -370,6 +383,7 @@ ${PACKAGE}-${VERSION}
     GNOME Support:              ${ENABLE_GNOME}
     Mac OS X Support:           ${ENABLE_OSX}
     Windows Support:            ${ENABLE_WIN}
+    UNIT Test Support:          ${ENABLE_NUNIT}
 
     D-Bus Support:              ${ENABLE_DBUS}
 



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