aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDennis Schridde <devurandom@gmx.net>2011-09-02 09:50:03 -0500
committerTed Gould <ted@gould.cx>2011-09-02 09:50:03 -0500
commit74f7670af1848a814568d570d2306ed93ece1a6c (patch)
treed00af6c1e689e697fb7a8b20ac0d944db3895a37 /configure.ac
parent9e5549b8a612db4a68bb7df14b5d7244bb82154c (diff)
downloadlibdbusmenu-74f7670af1848a814568d570d2306ed93ece1a6c.tar.gz
libdbusmenu-74f7670af1848a814568d570d2306ed93ece1a6c.tar.bz2
libdbusmenu-74f7670af1848a814568d570d2306ed93ece1a6c.zip
Make building tests optional
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index fcec99a..6430cc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,8 +99,17 @@ AC_SUBST(DBUSMENUDUMPER_LIBS)
JSON_GLIB_REQUIRED_VERSION=0.13.4
GIO_UNIX_REQUIRED_VERSION=2.24
+AC_ARG_ENABLE([tests],
+ AC_HELP_STRING([--disable-tests], [Disable tests]),
+ [enable_tests=$enableval], [enable_tests=auto])
+AM_CONDITIONAL([WANT_TESTS], [test "x$enable_tests" != "xno"])
+
+AS_IF([test "x$enable_tests" != "xno"],[
PKG_CHECK_MODULES(DBUSMENUTESTS, json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
- gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION)
+ gio-unix-2.0 >= $GIO_UNIX_REQUIRED_VERSION,
+ [have_tests=yes]
+)
+])
AC_SUBST(DBUSMENUTESTS_CFLAGS)
AC_SUBST(DBUSMENUTESTS_LIBS)
@@ -199,3 +208,8 @@ libdbusmenu Configuration:
GTK+ Version: $with_gtk
])
+AS_IF([test "x$have_tests" = "xyes"],
+ AC_MSG_NOTICE([ Tests: yes]),
+ AC_MSG_NOTICE([ Tests: no])
+)
+