When cross-compiling on Linux, configure will misdetect the target as
Linux because it uses uname instead of relying on the $host variable.
This results in including libvirt_linux.syms into libvirt.syms and
therefore trying to export undefined symbols.
Replace uname checks with $host checks to fix this.
fi
dnl lxc and qemu drivers require linux headers
-if test `uname -s` != "Linux"
-then
+case "$host" in
+ *-*-linux*)
+ # match linux here so the *) case will match anything non-linux
+ ;;
+ *)
if test "x$with_lxc" != "xyes"
then
with_lxc=no
then
with_qemu=no
fi
-fi
+ ;;
+esac
dnl Allow to build without Xen, QEMU/KVM, test or remote driver
AC_ARG_WITH([xen],
fi
AM_CONDITIONAL([WITH_NODE_DEVICES], [test "$with_nodedev" = "yes"])
-AM_CONDITIONAL([WITH_LINUX], [test `uname -s` = "Linux"])
+with_linux=no
+case "$host" in
+ *-*-linux*)
+ with_linux=yes
+ ;;
+esac
+AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"])
AC_ARG_WITH([qemu-user],