summaryrefslogtreecommitdiff
path: root/debian/patches/check-for-devinput-using-ac_check_file.patch
blob: 9e6ff7c15526a27606eeda26189283fe48e04aa4 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From: Helmut Grohne <helmut@subdivi.de>
Date: Mon, 31 May 2021 13:09:56 +0200
X-Dgit-Generated: 0.10.1-7.3 54cb42673c340f60f85764753d13da093aad4baf
Subject: Check for /dev/input using AC_CHECK_FILE.

(Closes: #989304)

---

diff --git a/configure.ac b/configure.ac
index 1d910b0..66f96aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -289,29 +289,12 @@ else
 fi
 
 AC_MSG_CHECKING(for devinput)
-AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-  #include <unistd.h>
-]],[[
-  return access("/dev/input", R_OK) == 0 ? 0 : 1;
-]])],[
+AC_CHECK_FILE([/dev/input],[
   have_devinput="yes"
   AC_MSG_RESULT(yes)
 ],[
   AC_MSG_RESULT(no)
   have_devinput="no"
-],[
-  AS_IF([test x$DEVINPUT_HEADER = x -a x$enable_devinput = xyes], [
-    AC_MSG_ERROR([
-      cannot cross-compile with devinput without DEVINPUT_HEADER
-      defined, giving up
-    ])
-  ])
-  if test -n "$DEVINPUT_HEADER" ; then
-    have_devinput="yes"
-  else
-    have_devinput="no"
-  fi
-  AC_MSG_RESULT(yes)
 ])