summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/configure.ac
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-11-29 06:05:13 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-11-29 06:05:55 +0700
commit16ad87bf5292508013713b952bd00f78e5065d96 (patch)
treef900e9e44b2c6d86ad627fcd59f93a9c4fd5e981 /src/host/layer23/configure.ac
parent993d2ab5015322842e24dfa17ee7750dc2cd8dd6 (diff)
mobile: make LUA support configurable via --with-lua53
Diffstat (limited to 'src/host/layer23/configure.ac')
-rw-r--r--src/host/layer23/configure.ac18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/host/layer23/configure.ac b/src/host/layer23/configure.ac
index f74efa2a..50cb8cab 100644
--- a/src/host/layer23/configure.ac
+++ b/src/host/layer23/configure.ac
@@ -50,11 +50,19 @@ AC_SUBST([LIBGPS_LIBS])
dnl optional dependencies
-PKG_CHECK_MODULES(LIBLUA, lua53, [
- WITH_LUA=1], [
- WITH_LUA=0])
-AC_SUBST([WITH_LUA])
-AM_CONDITIONAL([BUILD_LUA], test "x$WITH_LUA" = "x1")
+AC_ARG_WITH([lua53], [
+ AS_HELP_STRING([--with-lua53],
+ [Enable LUA scripting support @<:@default=check@:>@])
+])
+
+found_lua53=no
+AS_IF([test "x$with_lua53" != "xno"], [
+ PKG_CHECK_MODULES(LIBLUA, lua53, [found_lua53=yes], [found_lua53=no])
+ AS_IF([test "x$with_lua53" = "xyes" -a "x$found_lua53" = "xno"], [
+ AC_MSG_ERROR([lua53 support requested but pkg-config is unable to find it])
+ ])
+])
+AM_CONDITIONAL([BUILD_LUA], test "x$found_lua53" = "xyes")
dnl checks for header files
AC_HEADER_STDC