pkgsrc/x11/XF86Setup/patches/patch-ac
abs db63f91df1 These patches used HAVE_RESOLUTION_FIELD to work with both old and newer
versions of Xfree86. Unfortunately the configure script (to set
HAVE_RESOLUTION_FIELD) was never run, and if run it failed due to missing
-I/usr/X11R6/include. The net result was it always configured for the old
version of XFree86. Now sets HAVE_RESOLUTION_FIELD correctly, which means
we can work with XFree86 3.3.3.
1999-01-04 02:40:16 +00:00

40 lines
809 B
Text

$NetBSD: patch-ac,v 1.2 1999/01/04 02:40:16 abs Exp $
Introduce a configure script which produces a file called
res_cpp_symbol, containing either a definition or "undefinition" of
HAVE_RESOLUTION_FIELD
--- /dev/null Tue Sep 8 10:40:44 1998
+++ configure Tue Sep 8 10:27:51 1998
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+
+cat > config.c << EOF
+#include <X11/Intrinsic.h>
+#include <X11/Xmd.h>
+#include <X11/extensions/xf86misc.h>
+
+int
+main(int argc, char **argv)
+{
+ XF86MiscMouseSettings mouse;
+
+ mouse.resolution = 400;
+ mouse.buttons = 3;
+ exit(0);
+}
+EOF
+
+ex=1
+cc -I/usr/X11R6/include -g config.c 2>/dev/null
+case $? in
+0)
+ echo "-DHAVE_RESOLUTION_FIELD=1" > ./res_cpp_symbol
+ ex=0 ;;
+*) echo "-UHAVE_RESOLUTION_FIELD" > ./res_cpp_symbol ;;
+esac
+
+rm -f config.c config.o a.out
+
+exit $ex