build: allow kmscon to be cross-compiled
authorThierry Reding <thierry.reding@gmail.com>
Mon, 9 Sep 2013 10:27:48 +0000 (12:27 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 12 Sep 2013 11:38:04 +0000 (13:38 +0200)
commit2d191bd8765fee480c8f7edaf358c61a98a3d3eb
tree306ff410e6bc5b7dff5f3473e7567bf834c2fd3f
parentca22b38421c2f80b9669c4f7522359cc9e1753ce
build: allow kmscon to be cross-compiled

The genshader and genunifont utilities are run during the build process
to generate source files. In order for that to work when cross-compiling
the files need to be built using the native compiler instead of the
cross-compiler.

Add the AX_PROG_CC_FOR_BUILD m4 macro which defines various *_FOR_BUILD
variables that are the native equivalents of CC, CFLAGS, LDFLAGS, etc.
Override CC, CFLAGS and LDFLAGS for genshader and genunifont and their
object files so that they will be built natively and can be executed
during the build.

Signed-off-by: Thierry Reding <treding@nvidia.com>
(added TODO marker)
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Makefile.am
configure.ac
m4/ax_prog_cc_for_build.m4 [new file with mode: 0644]