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
 
