From f4cc493426df00f2ec6a768f6719826424dd5e73 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 15 Feb 2017 15:17:00 +0100 Subject: 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. --- configure.ac | 49 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) (limited to 'configure.ac') 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} " -- cgit v1.1