From: Francis Dupont Date: Fri, 6 Mar 2015 17:45:45 +0000 (+0100) Subject: [3745] Handle better cross compiling X-Git-Tag: ha_checkpoints12~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcf1a11b2718162695e3893d0074f669d25a7a90;p=thirdparty%2Fkea.git [3745] Handle better cross compiling --- diff --git a/configure.ac b/configure.ac index 4f50e7b0b7..3ac8bd6ef2 100644 --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,7 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4macros]) AC_CANONICAL_HOST +AC_CANONICAL_BUILD # Checks for programs. AC_PROG_CXX @@ -58,6 +59,21 @@ if test "$sep" = "__NONE__"; then fi AC_SUBST(SEP) +# If cross compiling assume the message compiler executable was +# magically already in place... +if test "$cross_compiling" = "yes"; then + AC_MSG_CHECKING("build (vs. host) compiled message compiler") + if test -x "${srcdir}/src/lib/log/compiler/message"; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + AC_MSG_WARN("you must install a message compiler in:") + AC_MSG_WARN(" ${srcdir}/src/lib/log/compiler/message") + AC_MSG_WARN("compiled for build ($build).") + fi +fi +AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = "yes"]) + # Enable low-performing debugging facilities? This option optionally # enables some debugging aids that perform slowly and hence aren't built # by default. diff --git a/src/lib/log/Makefile.am b/src/lib/log/Makefile.am index aaa628fad2..2c1f170885 100644 --- a/src/lib/log/Makefile.am +++ b/src/lib/log/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = interprocess . compiler tests +SUBDIRS = interprocess . +if !CROSS_COMPILING +SUBDIRS += compiler +endif +SUBDIRS += tests AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib AM_CPPFLAGS += $(BOOST_INCLUDES)