summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-02-15 15:17:00 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-02-23 09:53:56 +0100
commitf4cc493426df00f2ec6a768f6719826424dd5e73 (patch)
tree7a7ff58dacd711661d6a22d1560dec095a0f102f /configure.ac
parent5a7d20a6a23961f316e1195050fa09bab97a52d3 (diff)
qmi-firmware-update: new optional runtime check to see if MM running
Enabled by default, may be disabled using --without-mm-runtime-check during configure.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac49
1 files changed, 35 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index dd1937c..7ea2084 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,17 +80,29 @@ AC_SUBST(GLIB_LIBS)
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
AC_SUBST(GLIB_MKENUMS)
+dnl qmi-firmware-update is optional, enabled by default
+AC_ARG_ENABLE([firmware-update],
+ AS_HELP_STRING([--enable-firmware-update],
+ [enable compilation of `qmi-firmware-update' [default=yes]]),
+ [build_firmware_update=$enableval],
+ [build_firmware_update=yes])
+AM_CONDITIONAL([BUILD_FIRMWARE_UPDATE], [test "x$build_firmware_update" = "xyes"])
+
dnl udev support is optional, enabled by default
AC_ARG_WITH(udev, AS_HELP_STRING([--without-udev], [Build without udev support]), [], [with_udev=yes])
case $with_udev in
yes)
- PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= $GUDEV_VERSION], [have_gudev=yes],[have_gudev=no])
- if test "x$have_gudev" = "xno"; then
- AC_MSG_ERROR([Couldn't find gudev >= $GUDEV_VERSION. Install it, or otherwise configure using --without-udev to disable udev support.])
+ if test "x$build_firmware_update" = "xyes"; then
+ PKG_CHECK_MODULES(GUDEV, [gudev-1.0 >= $GUDEV_VERSION], [have_gudev=yes],[have_gudev=no])
+ if test "x$have_gudev" = "xno"; then
+ AC_MSG_ERROR([Couldn't find gudev >= $GUDEV_VERSION. Install it, or otherwise configure using --without-udev to disable udev support.])
+ else
+ AC_DEFINE(WITH_UDEV, 1, [Define if you want udev support])
+ AC_SUBST(GUDEV_CFLAGS)
+ AC_SUBST(GUDEV_LIBS)
+ fi
else
- AC_DEFINE(WITH_UDEV, 1, [Define if you want udev support])
- AC_SUBST(GUDEV_CFLAGS)
- AC_SUBST(GUDEV_LIBS)
+ with_udev="n/a"
fi
;;
*)
@@ -98,13 +110,20 @@ case $with_udev in
;;
esac
-dnl qmi-firmware-update is optional, enabled by default
-AC_ARG_ENABLE([firmware-update],
- AS_HELP_STRING([--enable-firmware-update],
- [enable compilation of `qmi-firmware-update' [default=yes]]),
- [build_firmware_update=$enableval],
- [build_firmware_update=yes])
-AM_CONDITIONAL([BUILD_FIRMWARE_UPDATE], [test "x$build_firmware_update" = "xyes"])
+dnl runtime MM check is optional, enabled by default
+AC_ARG_WITH(mm-runtime-check, AS_HELP_STRING([--without-mm-runtime-check], [Build without ModemManager runtime check]), [], [with_mm_runtime_check=yes])
+case $with_mm_runtime_check in
+ yes)
+ if test "x$build_firmware_update" = "xyes"; then
+ AC_DEFINE(WITH_MM_RUNTIME_CHECK, 1, [Define if you want ModemManager runtime check])
+ else
+ with_mm_runtime_check="n/a"
+ fi
+ ;;
+ *)
+ with_mm_runtime_check=no
+ ;;
+esac
dnl Documentation
GTK_DOC_CHECK(1.0)
@@ -208,5 +227,7 @@ echo "
Built items:
libqmi-glib: yes
qmicli: yes
- qmi-firmware-update: ${build_firmware_update} (with udev: ${with_udev})
+ qmi-firmware-update: ${build_firmware_update}
+ with udev: ${with_udev}
+ with MM runtime check: ${with_mm_runtime_check}
"