rump kernels: Handle rumpxen host in configure
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 28 May 2014 16:04:52 +0000 (17:04 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 14 Jul 2014 15:07:50 +0000 (16:07 +0100)
Support
   ./configure --host=x86_64-rumpxen-netbsd
   ./configure --host=i386-rumpxen-netbsd

Setting --host tells configure we are cross compiling and therefore
has various automatic effects.

But in this patch we make some deliberate changes as well:
 * We disable a large number of configure tests for libraries
   etc. which don't exist.
 * We set CONFIG_RUMP in Tools.mk.
 * Hence, we automatically set XEN_OS.

(I have only tested the 32-bit build but I think the 64-bit build
should work just as well.)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
v3: Add comment to `fi'
v2: Mention x86_64.
    Drop an erroneous whitespace change.

config/Tools.mk.in
tools/configure
tools/configure.ac

index 852c941d68bcb13149725f474e07a2f9be4a2bd9..748cc69c6bc51218399e0e14bda3d1b86b68b797 100644 (file)
@@ -1,3 +1,8 @@
+CONFIG_RUMP         := @CONFIG_RUMP@
+ifeq ($(CONFIG_RUMP),y)
+XEN_OS              := NetBSDRump
+endif
+
 # Prefix and install folder
 prefix              := @prefix@
 PREFIX              := $(prefix)
index 20f1aa93e57aef70c8ab0a14396a76ac3a56dbd3..a4aa8f18559ebf5e8f45f6ce1e4fe514db73358e 100755 (executable)
@@ -706,6 +706,7 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+CONFIG_RUMP
 host_os
 host_vendor
 host_cpu
@@ -2323,6 +2324,12 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
+case $host_vendor in
+rumpxen) CONFIG_RUMP=y; rump=true ;;
+*)       CONFIG_RUMP=n; rump=false ;;
+esac
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6704,6 +6711,8 @@ LDLFAGS=$ac_previous_ldflags
 
 fi
 
+if ! $rump; then
+
 # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -8160,6 +8169,8 @@ fi
 done
 
 
+fi # ! $rump
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
index 6d70f04fe14b62825a07ceecc8f8b322aac93176..629d6a044aa8cf6ea44c8266eb78c0a74f81cd84 100644 (file)
@@ -20,6 +20,12 @@ APPEND_INCLUDES and APPEND_LIB instead when possible.])
 
 AC_CANONICAL_HOST
 
+case $host_vendor in
+rumpxen) CONFIG_RUMP=y; rump=true ;;
+*)       CONFIG_RUMP=n; rump=false ;;
+esac
+AC_SUBST(CONFIG_RUMP)
+
 AC_SYS_LARGEFILE
 
 case $ac_cv_sys_file_offset_bits in #(
@@ -34,11 +40,11 @@ AC_SUBST(FILE_OFFSET_BITS)
 m4_include([../m4/savevar.m4])
 m4_include([../m4/features.m4])
 m4_include([../m4/path_or_fail.m4])
+m4_include([../m4/checkpolicy.m4])
+m4_include([../m4/set_cflags_ldflags.m4])
 m4_include([../m4/python_version.m4])
 m4_include([../m4/python_devel.m4])
 m4_include([../m4/ocaml.m4])
-m4_include([../m4/checkpolicy.m4])
-m4_include([../m4/set_cflags_ldflags.m4])
 m4_include([../m4/uuid.m4])
 m4_include([../m4/pkg.m4])
 m4_include([../m4/curses.m4])
@@ -233,6 +239,8 @@ AS_IF([test "$cross_compiling" != yes], [
     AX_CHECK_PYTHON_DEVEL()
 ])
 
+if ! $rump; then
+
 AX_PATH_PROG_OR_FAIL([XGETTEXT], [xgettext])
 dnl as86, ld86, bcc and iasl are only required when the host system is x86*.
 dnl "host" here means the platform on which the hypervisor and tools is
@@ -287,5 +295,7 @@ esac
 # Checks for header files.
 AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h valgrind/memcheck.h utmp.h])
 
+fi # ! $rump
+
 AC_OUTPUT()