]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3745] Handle better cross compiling
authorFrancis Dupont <fdupont@isc.org>
Fri, 6 Mar 2015 17:45:45 +0000 (18:45 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 27 Feb 2018 12:22:34 +0000 (13:22 +0100)
configure.ac
src/lib/log/Makefile.am

index 4f50e7b0b777af9bf4c1ebf78cb2fb352457ddd7..3ac8bd6ef20f6110922ac33928626eb5356acd31 100644 (file)
@@ -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.
index aaa628fad261b17dc25ae2bdb181b37360a72283..2c1f170885f94594353ca57c05039bbdf4de89ab 100644 (file)
@@ -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)