summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-11-19 12:00:34 +0100
committerAleksander Morgado <aleksander@aleksander.es>2020-11-20 09:24:51 +0000
commit65560dd8854f01eec1b28587c37d544bfff360d3 (patch)
treed5f148f2851835f8d4cfcb176715941d44919c3e
parent9065e3b22777c5c811a2239de6353ecd3baade5d (diff)
build: qcom-soc plugin by default disabled
It will not be automatically enabled by the implicit --enable-all-plugins; instead, it must be explicitly enabled with --enable-plugin-qcom-soc. This plugin only makes sense under very specific SoC builds, so there is no point in always building it by default. It should be explicitly requested only in those SoC builds that are really going to make use of it (e.g. postmarketOS).
-rw-r--r--configure.ac2
-rw-r--r--m4/mm-enable-plugin.m422
2 files changed, 19 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 9718c480..e3c9a4f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -490,7 +490,7 @@ MM_ENABLE_PLUGIN([option],
MM_ENABLE_PLUGIN([option-hso],
[with_shared_option])
MM_ENABLE_PLUGIN([pantech])
-MM_ENABLE_PLUGIN([qcom-soc])
+MM_ENABLE_PLUGIN_DISABLED([qcom-soc])
MM_ENABLE_PLUGIN([quectel])
MM_ENABLE_PLUGIN([samsung],
[with_shared_icera])
diff --git a/m4/mm-enable-plugin.m4 b/m4/mm-enable-plugin.m4
index 0ea09da2..4f92a744 100644
--- a/m4/mm-enable-plugin.m4
+++ b/m4/mm-enable-plugin.m4
@@ -20,18 +20,18 @@ AC_ARG_ENABLE(all-plugins,
])
dnl Usage:
-dnl MM_ENABLE_PLUGIN([NAME],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
-AC_DEFUN([MM_ENABLE_PLUGIN],
+dnl MM_ENABLE_PLUGIN_FULL([NAME],[DEFAULT],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
+AC_DEFUN([MM_ENABLE_PLUGIN_FULL],
[dnl
m4_pushdef([var_enable_plugin], patsubst([enable_plugin_$1], -, _))dnl
m4_pushdef([VAR_ENABLE_PLUGIN], patsubst(translit([enable_plugin_$1], [a-z], [A-Z]), -, _))dnl
AC_ARG_ENABLE(plugin-$1,
AS_HELP_STRING([--enable-plugin-$1], [Build $1 plugin]),
[],
- [var_enable_plugin=$enable_all_plugins])
+ [var_enable_plugin=$2])
if test "x$var_enable_plugin" = "xyes"; then
AC_DEFINE([VAR_ENABLE_PLUGIN], 1, [Define if $1 plugin is enabled])
-m4_ifval([$2],[m4_foreach(with_shared,[$2],[dnl
+m4_ifval([$3],[m4_foreach(with_shared,[$3],[dnl
with_shared="yes"
])])dnl
fi
@@ -41,6 +41,20 @@ m4_popdef([var_enable_plugin])dnl
])
dnl Usage:
+dnl MM_ENABLE_PLUGIN([NAME],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
+AC_DEFUN([MM_ENABLE_PLUGIN],
+[dnl
+MM_ENABLE_PLUGIN_FULL($1,$enable_all_plugins,$2)
+])
+
+dnl Usage:
+dnl MM_ENABLE_PLUGIN_DISABLED([NAME],[WITH_SHARED_NAME_1,WITH_SHARED_NAME_2,...])
+AC_DEFUN([MM_ENABLE_PLUGIN_DISABLED],
+[dnl
+MM_ENABLE_PLUGIN_FULL($1,"no",$2)
+])
+
+dnl Usage:
dnl MM_BUILD_SHARED([NAME])
AC_DEFUN([MM_BUILD_SHARED],
[dnl