build: new `--without-qmi' configure option
For those who don't care about the QMI support through libqmi-glib, or if you're stuck with glib 2.30 (libqmi-glib requires 2.32), this configure switch allows disabling the QMI support completely. The logic to detect cdc-wdm ports is still in place, but the QMI probing is never launched at them. Also, all QMI-related objects won't be compiled.
This commit is contained in:
@@ -16,6 +16,10 @@ PLUGIN_COMMON_LINKER_FLAGS = \
|
||||
-module \
|
||||
-avoid-version
|
||||
|
||||
if WITH_QMI
|
||||
PLUGIN_COMMON_COMPILER_FLAGS += $(QMI_CFLAGS)
|
||||
endif
|
||||
|
||||
# UDev rules
|
||||
udevrulesdir = $(UDEV_BASE_DIR)/rules.d
|
||||
udevrules_DATA =
|
||||
|
||||
@@ -29,10 +29,13 @@
|
||||
|
||||
#include "mm-plugin-generic.h"
|
||||
#include "mm-broadband-modem.h"
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#include "mm-serial-parsers.h"
|
||||
#include "mm-log.h"
|
||||
|
||||
#if defined WITH_QMI
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (MMPluginGeneric, mm_plugin_generic, MM_TYPE_PLUGIN)
|
||||
|
||||
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
|
||||
@@ -49,6 +52,7 @@ create_modem (MMPlugin *self,
|
||||
GList *probes,
|
||||
GError **error)
|
||||
{
|
||||
#if defined WITH_QMI
|
||||
if (mm_port_probe_list_has_qmi_port (probes)) {
|
||||
mm_dbg ("QMI-powered generic modem found...");
|
||||
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path,
|
||||
@@ -57,6 +61,7 @@ create_modem (MMPlugin *self,
|
||||
vendor,
|
||||
product));
|
||||
}
|
||||
#endif
|
||||
|
||||
return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path,
|
||||
drivers,
|
||||
|
||||
@@ -20,10 +20,13 @@
|
||||
#include <libmm-common.h>
|
||||
|
||||
#include "mm-plugin-gobi.h"
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#include "mm-broadband-modem-gobi.h"
|
||||
#include "mm-log.h"
|
||||
|
||||
#if defined WITH_QMI
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (MMPluginGobi, mm_plugin_gobi, MM_TYPE_PLUGIN)
|
||||
|
||||
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
|
||||
@@ -40,6 +43,7 @@ create_modem (MMPlugin *self,
|
||||
GList *probes,
|
||||
GError **error)
|
||||
{
|
||||
#if defined WITH_QMI
|
||||
if (mm_port_probe_list_has_qmi_port (probes)) {
|
||||
mm_dbg ("QMI-powered Gobi modem found...");
|
||||
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path,
|
||||
@@ -48,6 +52,7 @@ create_modem (MMPlugin *self,
|
||||
vendor,
|
||||
product));
|
||||
}
|
||||
#endif
|
||||
|
||||
return MM_BASE_MODEM (mm_broadband_modem_gobi_new (sysfs_path,
|
||||
drivers,
|
||||
|
||||
@@ -25,9 +25,12 @@
|
||||
#include "mm-serial-enums-types.h"
|
||||
#include "mm-log.h"
|
||||
#include "mm-plugin-huawei.h"
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#include "mm-broadband-modem-huawei.h"
|
||||
|
||||
#if defined WITH_QMI
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (MMPluginHuawei, mm_plugin_huawei, MM_TYPE_PLUGIN)
|
||||
|
||||
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
|
||||
@@ -424,6 +427,7 @@ create_modem (MMPlugin *self,
|
||||
{
|
||||
propagate_port_mode_results (probes);
|
||||
|
||||
#if defined WITH_QMI
|
||||
if (mm_port_probe_list_has_qmi_port (probes)) {
|
||||
mm_dbg ("QMI-powered Huawei modem found...");
|
||||
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path,
|
||||
@@ -432,6 +436,7 @@ create_modem (MMPlugin *self,
|
||||
vendor,
|
||||
product));
|
||||
}
|
||||
#endif
|
||||
|
||||
return MM_BASE_MODEM (mm_broadband_modem_huawei_new (sysfs_path,
|
||||
drivers,
|
||||
|
||||
@@ -21,7 +21,10 @@
|
||||
#include "mm-log.h"
|
||||
#include "mm-plugin-pantech.h"
|
||||
#include "mm-broadband-modem.h"
|
||||
|
||||
#if defined WITH_QMI
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (MMPluginPantech, mm_plugin_pantech, MM_TYPE_PLUGIN)
|
||||
|
||||
@@ -39,6 +42,7 @@ create_modem (MMPlugin *self,
|
||||
GList *probes,
|
||||
GError **error)
|
||||
{
|
||||
#if defined WITH_QMI
|
||||
if (mm_port_probe_list_has_qmi_port (probes)) {
|
||||
mm_dbg ("QMI-powered Pantech modem found...");
|
||||
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path,
|
||||
@@ -47,6 +51,7 @@ create_modem (MMPlugin *self,
|
||||
vendor,
|
||||
product));
|
||||
}
|
||||
#endif
|
||||
|
||||
return MM_BASE_MODEM (mm_broadband_modem_new (sysfs_path,
|
||||
drivers,
|
||||
|
||||
@@ -23,10 +23,13 @@
|
||||
|
||||
#include "mm-log.h"
|
||||
#include "mm-plugin-sierra.h"
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#include "mm-broadband-modem-sierra.h"
|
||||
#include "mm-broadband-modem-sierra-icera.h"
|
||||
|
||||
#if defined WITH_QMI
|
||||
#include "mm-broadband-modem-qmi.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (MMPluginSierra, mm_plugin_sierra, MM_TYPE_PLUGIN)
|
||||
|
||||
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
|
||||
@@ -194,6 +197,7 @@ create_modem (MMPlugin *self,
|
||||
GList *probes,
|
||||
GError **error)
|
||||
{
|
||||
#if defined WITH_QMI
|
||||
if (mm_port_probe_list_has_qmi_port (probes)) {
|
||||
mm_dbg ("QMI-powered Sierra modem found...");
|
||||
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (sysfs_path,
|
||||
@@ -202,6 +206,7 @@ create_modem (MMPlugin *self,
|
||||
vendor,
|
||||
product));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (sierra_port_probe_list_is_icera (probes))
|
||||
return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path,
|
||||
|
||||
Reference in New Issue
Block a user