summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlastair Hughes <hobbitalastair@gmail.com>2017-01-06 19:06:03 +1300
committerWill Estes <westes575@gmail.com>2017-02-23 14:07:56 -0500
commit89f10ee36f95430f18ac70f971fe9f9f894d9dc5 (patch)
treef6c22538904e29a1cc2fa6f85e2a79395bc8d31b /configure.ac
parentd1b195b67171ee246cf589670f1a7db04fa93afc (diff)
build: support cross compiling.
Check for cross compiling. If cross compiling, build stage1flex using a custom link command. We also override LDADD since that adds the replacement implementations that are cross compiled, and instead always use the replacement library implementations. We don't use BUILD_OBJEXT and BUILD_EXEEXT since it seems that automake does not support these. Fixes #78.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a19b9f2..4c246ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,7 @@ AS_IF([test "$YACC" != 'bison -y'], [
AM_CONDITIONAL([HAVE_BISON], [test "$YACC" = 'bison -y'])
AM_PROG_LEX
AC_PROG_CC
+AX_PROG_CC_FOR_BUILD
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_LN_S
@@ -80,6 +81,8 @@ AC_ARG_ENABLE([bootstrap],
[], [enable_bootstrap=yes])
AM_CONDITIONAL([ENABLE_BOOTSTRAP], [test "x$enable_bootstrap" = xyes])
+AM_CONDITIONAL([CROSS], [test "x$cross_compiling" = xyes])
+
AC_PATH_PROG([HELP2MAN], help2man, [\${top_srcdir}/build-aux/missing help2man])
AS_IF([test "$HELP2MAN" = "\${top_srcdir}/build-aux/missing help2man"],
AC_MSG_WARN(help2man: program not found: building man page will not work)