mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-01-06 05:00:13 +01:00
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>
This commit is contained in:
parent
4378219ff8
commit
b2487d07f7
2 changed files with 28 additions and 1 deletions
26
configure.ac
26
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])
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue