--- 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]) --- 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 --- 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