libXt cross-compilation fixes

Joerg Sonnenberger joerg at britannica.bec.de
Wed Aug 15 10:27:17 PDT 2007


Hi all,
attached are similiar patches for libXt to fix cross-compilation.
This is a bit more tricky here as makestrs is normally installed.

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

--- util/Makefile.am.orig	2006-07-11 20:05:55.000000000 +0200
+++ util/Makefile.am
@@ -1,7 +1,8 @@
 if INSTALL_MAKESTRS
 bin_PROGRAMS = makestrs
+noinst_PROGRAMS = $(MAKESTRS_PROG)
 else
-noinst_PROGRAMS = makestrs
+noinst_PROGRAMS = makestrs $(MAKESTRS_PROG)
 endif
 
 EXTRA_DIST = \
@@ -13,6 +14,13 @@ EXTRA_DIST = \
 makestrs_CFLAGS = $(XT_CFLAGS)
 makestrs_SOURCES = makestrs.c
 
+if CROSS_COMPILING
+MAKESTRS_PROG=		xmakestrs$(EXEEXT)
+ 
+xmakestrs$(EXEEXT): makestrs.c
+	$(CC_FOR_BUILD) $(X11_CFLAGS) $(CPPFLAGS_FOR_BUILD) \
+	    $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ makestrs.c
+endif
 
 # Man page
 appmandir = $(APP_MAN_DIR)
-------------- next part --------------
--- src/Makefile.am	2006-12-19 04:40:53.000000000 +0100
+++ src/Makefile.am	2007-07-27 21:30:16.000000000 +0200
@@ -96,8 +96,15 @@
 
 $(BUILT_HEADER): $(BUILT_SOURCE)
 
+if CROSS_COMPILING
+MAKESTRS=	$(top_builddir)/util/xmakestrs
+else
+MAKESTRS=	$(top_builddir)/util/makestrs
+endif
+
+
 $(BUILT_SOURCE):
-	$(top_builddir)/util/makestrs -i $(top_srcdir) $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c
+	$(MAKESTRS) -i $(top_srcdir) $(STRINGSABIOPTIONS) < $(STRING_LIST) > StringDefs.c
 	mkdir -p $(top_builddir)/src
 	mkdir -p $(top_builddir)/include/X11
 	cp StringDefs.h $(top_builddir)/include/X11
-------------- next part --------------
--- configure.ac	2007-01-28 07:27:22.000000000 +0100
+++ configure.ac	2007-07-27 20:08:44.000000000 +0200
@@ -95,6 +95,8 @@
 esac
 AC_SUBST(STRINGSABIOPTIONS)
 
+AM_CONDITIONAL(CROSS_COMPILING, [ test $cross_compiling = yes ])
+
 # Man page processing requirements
 XORG_PROG_RAWCPP
 XORG_MANPAGE_SECTIONS


More information about the xorg mailing list