summaryrefslogtreecommitdiff
path: root/x11/libxshmfence/patches/patch-configure_ac
blob: 0b7faed9dea701f6d4568406c106b989fd5ba507 (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
$OpenBSD$

Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -32,6 +32,7 @@ AC_USE_SYSTEM_EXTENSIONS
 
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
 
 # Initialize libtool
 AC_PROG_LIBTOOL
@@ -56,6 +57,13 @@ AC_ARG_ENABLE(futex,	AS_HELP_STRING([--enable-futex], 
 
 if test "x$FUTEX" = "xauto"; then
 	AC_CHECK_HEADER([linux/futex.h], [FUTEX=yes])
+fi
+
+if test "x$FUTEX" = "xauto"; then
+	AC_CHECK_HEADER([sys/futex.h], [FUTEX=yes])
+	if test "x$FUTEX" = "xyes"; then
+		AC_DEFINE(HAVE_FUTEX, 1, [Use futex])
+	fi
 fi
 
 if test "x$FUTEX" = "xauto"; then