libX11 cross-compilation fixes

Joerg Sonnenberger joerg at britannica.bec.de
Wed Aug 15 10:25:08 PDT 2007


Hi all,
can the attached patches please be added to the repo?

They are similiar to the patches linked in the wiki, but don't affect
native building. The patches have been tested on various platforms to
create a working result.

Joerg
-------------- next part --------------
$NetBSD: patch-aa,v 1.3 2007/08/01 16:48:41 joerg Exp $

--- configure.ac.orig	2007-07-27 18:02:55.000000000 +0200
+++ configure.ac
@@ -304,6 +304,8 @@ else
 fi
 AC_SUBST(XKBPROTO_REQUIRES)
 
+AM_CONDITIONAL(CROSS_COMPILING, [ test $cross_compiling = yes ])
+
 AC_FUNC_MMAP()
 composecache_default=$ac_cv_func_mmap_fixed_mapped
 AC_CHECK_FUNC(nl_langinfo, , [composecache_default=no])
-------------- next part --------------
$NetBSD: patch-ad,v 1.2 2007/08/05 22:39:38 joerg Exp $

--- src/util/Makefile.am.orig	2007-05-16 17:34:44.000000000 +0200
+++ src/util/Makefile.am
@@ -1,11 +1,15 @@
 # $XdotOrg: lib/X11/src/util/Makefile.am,v 1.4 2006-02-19 02:14:12 jamey Exp $
 
-noinst_PROGRAMS=makekeys
+noinst_PROGRAMS=	makekeys$(EXEEXT) $(MAKEKEYS_PROG)
 
 makekeys_CFLAGS=$(X11_CFLAGS)
+if CROSS_COMPILING
+MAKEKEYS_PROG=		xmakekeys$(EXEEXT)
 
-#override CC = gcc
-LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+xmakekeys$(EXEEXT): makekeys.c
+	$(CC_FOR_BUILD) $(X11_CFLAGS) $(CPPFLAGS_FOR_BUILD) \
+	    $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ makekeys.c
+endif
 
 EXTRA_DIST = mkks.sh
 
-------------- next part --------------
$NetBSD: patch-af,v 1.2 2007/08/05 22:39:39 joerg Exp $

--- src/Makefile.am.orig	2007-08-05 23:59:55.000000000 +0200
+++ src/Makefile.am
@@ -408,8 +408,14 @@ endif LINT
 
 KEYSYMDEF=@KEYSYMDEF@
 
+if CROSS_COMPILING
+MAKEKEYS=	$(top_builddir)/src/util/xmakekeys
+else
+MAKEKEYS=	$(top_builddir)/src/util/makekeys
+endif
+
 ks_tables.h: $(KEYSYMDEF) $(top_builddir)/src/util/makekeys$(EXEEXT)
-	$(top_builddir)/src/util/makekeys < $(KEYSYMDEF) > ks_tables_h
+	$(MAKEKEYS) < $(KEYSYMDEF) > ks_tables_h
 	mv ks_tables_h $@
 
 $(top_builddir)/src/util/makekeys$(EXEEXT): force


More information about the xorg mailing list