From fd9eb6e8800cfc6929201c4a8d666ce431b0195c Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 23 Feb 2017 10:42:55 +0100 Subject: build: mm-runtime-check is an optional feature not an optional package --- configure.ac | 12 ++++++------ src/qmi-firmware-update/qfu-main.c | 6 +++--- src/qmi-firmware-update/qfu-utils.c | 2 +- src/qmi-firmware-update/qfu-utils.h | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 7ea2084..c544794 100644 --- a/configure.ac +++ b/configure.ac @@ -111,17 +111,17 @@ case $with_udev in esac 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 +AC_ARG_ENABLE(mm-runtime-check, AS_HELP_STRING([--disable-mm-runtime-check], [Build without ModemManager runtime check]), [], [enable_mm_runtime_check=yes]) +case $enable_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]) + AC_DEFINE(MM_RUNTIME_CHECK_ENABLED, 1, [Define if you want ModemManager runtime check]) else - with_mm_runtime_check="n/a" + enable_mm_runtime_check="n/a" fi ;; *) - with_mm_runtime_check=no + enable_mm_runtime_check=no ;; esac @@ -229,5 +229,5 @@ echo " qmicli: yes qmi-firmware-update: ${build_firmware_update} with udev: ${with_udev} - with MM runtime check: ${with_mm_runtime_check} + with MM runtime check: ${enable_mm_runtime_check} " diff --git a/src/qmi-firmware-update/qfu-main.c b/src/qmi-firmware-update/qfu-main.c index 2ecdca6..07efb63 100644 --- a/src/qmi-firmware-update/qfu-main.c +++ b/src/qmi-firmware-update/qfu-main.c @@ -51,7 +51,7 @@ static guint16 pid; static gchar *cdc_wdm_str; static gchar *tty_str; -#if defined WITH_MM_RUNTIME_CHECK +#if defined MM_RUNTIME_CHECK_ENABLED static gboolean ignore_mm_runtime_check_flag; #endif @@ -292,7 +292,7 @@ static GOptionEntry context_main_entries[] = { "Open a cdc-wdm device in either QMI or MBIM mode (default)", NULL }, -#if defined WITH_MM_RUNTIME_CHECK +#if defined MM_RUNTIME_CHECK_ENABLED { "ignore-mm-runtime-check", 0, 0, G_OPTION_ARG_NONE, &ignore_mm_runtime_check_flag, "Ignore ModemManager runtime check", NULL @@ -651,7 +651,7 @@ int main (int argc, char **argv) goto out; } -#if defined WITH_MM_RUNTIME_CHECK +#if defined MM_RUNTIME_CHECK_ENABLED /* For all those actions that require a device, we will be doing MM runtime checks */ if (!ignore_mm_runtime_check_flag) { gboolean mm_running; diff --git a/src/qmi-firmware-update/qfu-utils.c b/src/qmi-firmware-update/qfu-utils.c index 9109987..035e78f 100644 --- a/src/qmi-firmware-update/qfu-utils.c +++ b/src/qmi-firmware-update/qfu-utils.c @@ -717,7 +717,7 @@ qfu_utils_power_cycle (QmiClientDms *qmi_client, /******************************************************************************/ -#if defined WITH_MM_RUNTIME_CHECK +#if defined MM_RUNTIME_CHECK_ENABLED gboolean qfu_utils_modemmanager_running (gboolean *mm_running, diff --git a/src/qmi-firmware-update/qfu-utils.h b/src/qmi-firmware-update/qfu-utils.h index 3444db1..aaafa51 100644 --- a/src/qmi-firmware-update/qfu-utils.h +++ b/src/qmi-firmware-update/qfu-utils.h @@ -72,7 +72,7 @@ gboolean qfu_utils_power_cycle_finish (QmiClientDms *qmi_client, GAsyncResult *res, GError **error); -#if defined WITH_MM_RUNTIME_CHECK +#if defined MM_RUNTIME_CHECK_ENABLED gboolean qfu_utils_modemmanager_running (gboolean *mm_running, GError **error); -- cgit v1.1