diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-06-03 11:06:15 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-06-03 12:45:23 -0700 |
commit | b2487d07f7b355f230a56e32c763acd08862735c (patch) | |
tree | 7cdabb7922e40b01ccecd335f530d2a72e64e45e | |
parent | 4378219ff8c1418418c70086085358b69d574e74 (diff) |
Bug 22584 - libX11 does not cross compile
Adaptation of patch submitted by Paul Bender in attachment 27301 to
https://bugs.freedesktop.org/show_bug.cgi?id=22584
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
-rw-r--r-- | configure.ac | 26 | ||||
-rw-r--r-- | src/util/Makefile.am | 3 |
2 files changed, 28 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 85e7b440..502996a0 100644 --- a/configure.ac +++ b/configure.ac @@ -8,6 +8,8 @@ AC_INIT([libX11], libX11) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) +AC_CANONICAL_BUILD +AC_CANONICAL_HOST AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE @@ -32,6 +34,7 @@ XORG_WITH_PS2PDF AC_PROG_LIBTOOL DOLT AC_PROG_CC +PKG_PROG_PKG_CONFIG if test x"$CC_FOR_BUILD" = x; then if test x"$cross_compiling" = xyes; then @@ -42,6 +45,27 @@ if test x"$CC_FOR_BUILD" = x; then fi AC_SUBST([CC_FOR_BUILD]) +if test x"$CPPFLAGS_FOR_BUILD" = x; then + if test ! x"$cross_compiling" = xyes; then + CPPFLAGS_FOR_BUILD=${CPPFLAGS} + fi +fi +AC_SUBST(CPPFLAGS_FOR_BUILD) + +if test x"$CFLAGS_FOR_BUILD" = x; then + if test ! x"$cross_compiling" = xyes; then + CFLAGS_FOR_BUILD=${CFLAGS} + fi +fi +AC_SUBST(CFLAGS_FOR_BUILD) + +if test x"$LDFLAGS_FOR_BUILD" = x; then + if test ! x"$cross_compiling" = xyes; then + LDFLAGS_FOR_BUILD=${LDFLAGS} + fi +fi +AC_SUBST(LDFLAGS_FOR_BUILD) + XORG_PROG_RAWCPP # Find perl for "make check" tests in nls/localerules.in @@ -285,7 +309,7 @@ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], ) # Find keysymdef.h # AC_MSG_CHECKING([keysymdef.h]) -dir=`pkg-config --variable=includedir xproto` +dir=`$PKG_CONFIG --variable=includedir xproto` KEYSYMDEF="$dir/X11/keysymdef.h" if test -f "$KEYSYMDEF"; then AC_MSG_RESULT([$KEYSYMDEF]) diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 644d6b64..3b100e00 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -6,6 +6,9 @@ makekeys_CFLAGS = \ $(CWARNFLAGS) CC = @CC_FOR_BUILD@ +CPPFLAGS = @CPPFLAGS_FOR_BUILD@ +CFLAGS = @CFLAGS_FOR_BUILD@ +LDFLAGS = @LDFLAGS_FOR_BUILD@ EXTRA_DIST = mkks.sh |