blob: 9c4eae2b30e0b098a9ffbfa7f3c9d324ffa41a40 [file] [log] [blame]
[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
===================================================================
Index: xlib_libX11-1.3.2/configure.ac
===================================================================
--- xlib_libX11-1.3.2.orig/configure.ac 2009-10-23 22:55:03.000000000 +0200
+++ xlib_libX11-1.3.2/configure.ac 2010-05-04 16:26:39.000000000 +0200
@@ -280,8 +280,15 @@
# 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])
else