aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDylan Van Assche <me@dylanvanassche.be>2022-07-25 09:18:29 +0200
committerDylan Van Assche <me@dylanvanassche.be>2022-07-25 11:01:51 +0200
commitba96ccc61587b7b6c31b94826ee7a3c44d795364 (patch)
tree6924ba6a4cd89c8500a9e7826074df5b23616b65 /configure.ac
parent041f53af8b138fda6242ad1381fd3cd1c2ff6c81 (diff)
build: make tests optional
Add a meson option -Dtests and --without-tests automake option to disable the compilation of all available testcases. This is useful for compiling projects with Flatpak such as GNOME Control Center which disables all possible integrations since they only need the DBus part of ModemManager. Contributes to https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1392
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d4580a31..bb8a75fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,6 +252,21 @@ case $with_udev in
esac
dnl-----------------------------------------------------------------------------
+dnl build with tests (enabled by default)
+dnl
+
+AC_ARG_WITH(tests, AS_HELP_STRING([--without-tests], [Build without testcases]), [], [with_tests=yes])
+AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
+case $with_tests in
+ yes)
+ AC_DEFINE(WITH_TESTS, 1, [Define if you want to build all testcases])
+ ;;
+ *)
+ with_tests=no
+ ;;
+esac
+
+dnl-----------------------------------------------------------------------------
dnl Suspend/resume support
dnl
@@ -629,6 +644,7 @@ examples/sms-python/Makefile
examples/network-scan-python/Makefile
examples/sms-c/Makefile
])
+
AC_OUTPUT
echo "
@@ -643,6 +659,7 @@ echo "
warn ldflags: ${WARN_LDFLAGS}
maintainer mode: ${USE_MAINTAINER_MODE}
release: ${ax_is_release}
+ tests: ${with_tests}
System paths:
prefix: ${prefix}