Commit b2487d07 authored by Alan Coopersmith's avatar Alan Coopersmith

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=22584Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov's avatarMikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Dan Nicholson's avatarDan Nicholson <dbn.lists@gmail.com>
parent 4378219f
......@@ -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])
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment