summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2012-09-12 14:39:40 +0100
committerDaniel Stone <daniel@fooishbar.org>2012-09-12 22:30:39 +0100
commitd45b3fc19fbe95c41afc4e51d768df6d42332010 (patch)
tree801ff72e1ebce89717e610a79acbea40cdfb9433
parent44cdc0dc2c68d67654023ec707b807145d3a38c0 (diff)
downloadxorg-lib-libX11-d45b3fc19fbe95c41afc4e51d768df6d42332010.tar.gz
Allow overriding location of keysymdef.h
Currently keysymdef.h is found by using the includedir of xproto. This doesn't work when cross-compiling with a sysroot as that ends up being /usr/include/X11, not a path into the cross-build environment. So, add an option to allow explicitly specifying the location of keysymdef.h, and verify that the specified or found path exists. (original patch by Martin Jansa <martin.jansa@gmail.com>, revised by myself) Signed-off-by: Ross Burton <ross.burton@intel.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 48a0c8ab..a45f9d95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -306,7 +306,15 @@ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
# Find keysymdef.h
#
AC_MSG_CHECKING([keysym definitions])
-KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11
+AC_ARG_WITH([keysymdefdir],
+ [AC_HELP_STRING([--with-keysymdefdir=DIR], [The location of keysymdef.h (defaults to xproto include dir)])],
+ [KEYSYMDEFDIR=$withval],
+ [KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11])
+
+if test ! -d "$KEYSYMDEFDIR"; then
+ AC_MSG_ERROR([$KEYSYMDEFDIR doesn't exist or isn't a directory])
+fi
+
FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
for i in $FILES; do
if test -f "$KEYSYMDEFDIR/$i"; then