summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/minicom/minicom/allow.to.disable.lockdev.patch
blob: 39dc5c04925886b7f5e026c191cc5628f10f3742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
configure: Allow lockdev to be disabled

When the pkgconfig dependencies may be present, it is useful to be
able to explictly disable the lockdev dependency. This adds such an
option.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Upstream-Status: Submitted [https://salsa.debian.org/minicom-team/minicom/-/merge_requests/14]

Index: minicom-2.8/configure.ac
===================================================================
--- minicom-2.8.orig/configure.ac
+++ minicom-2.8/configure.ac
@@ -43,7 +43,13 @@ if test "x$enable_socket" = xyes; then
 fi
 
 PKG_PROG_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
+
+AC_ARG_ENABLE([lockdev],
+        AS_HELP_STRING([--enable-lockdev],
+                       [Enable lockdev support (def: enabled)]),
+        [], [enable_lockdev="yes"])
+
+if test -n "$PKG_CONFIG" && test "x$enable_lockdev" = xyes; then
 	PKG_CHECK_MODULES([LOCKDEV], [lockdev], AC_DEFINE([HAVE_LOCKDEV],[1],[Define if you have lockdev]),[:])
 fi