summaryrefslogtreecommitdiff
path: root/package/x11r7/xlib_libX11/xlib_libX11-1.1.5-keysymdef.patch
blob: 1ac9f9d80c902fd85911350ca56abbb9c3ecd570 (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
[patch]: configure: add --with-keysymdef argument for cross compilation

Based on a similar patch from Openembedded.

The libX11 configure script hardcodes the location to keysymdef.h as
<prefix>/include/X11/keysymdef.h, which is fine for native compilation,
but breaks with cross compilation as that directory is a location on
the target, not the build host.

Fix it by providing an explicit --with-keysymdef=<full-path-to-file>.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>Index: libX11-1.1.5/configure.ac
===================================================================
--- libX11-1.1.5.orig/configure.ac	2008-10-28 11:36:49.000000000 +0000
+++ libX11-1.1.5/configure.ac	2008-10-28 11:40:05.000000000 +0000
@@ -221,13 +221,21 @@
 # Find keysymdef.h
 #
 AC_MSG_CHECKING([keysymdef.h])
-dir=`pkg-config --variable=includedir xproto`
-KEYSYMDEF="$dir/X11/keysymdef.h"
+AC_ARG_WITH(keysymdef,
+	AC_HELP_STRING([--with-keysymdef=DIR/keysymdef.h], [The location of keysymdef.h]),
+	KEYSYMDEF=$withval, KEYSYMDEF="")
+
+if test x$KEYSYMDEF = x; then
+	dir=`pkg-config --variable=includedir xproto`
+	KEYSYMDEF="$dir/X11/keysymdef.h"
+fi
+
 if test -f "$KEYSYMDEF"; then
-        AC_MSG_RESULT([$KEYSYMDEF])
+	AC_MSG_RESULT([$KEYSYMDEF])
 else
 	AC_MSG_ERROR([Cannot find keysymdef.h])
 fi
+
 AC_SUBST(KEYSYMDEF)
 
 AM_CONDITIONAL(UDC, test xfalse = xtrue)