提交 9537c3d0 编写于 作者: M Matthias Bolte 提交者: Eric Blake

configure.ac: Avoid uname, which breaks cross-compilation

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.
上级 362bc09a
...@@ -210,8 +210,11 @@ if test "$prefix" = "/usr" && test "$sysconfdir" = '${prefix}/etc' ; then ...@@ -210,8 +210,11 @@ if test "$prefix" = "/usr" && test "$sysconfdir" = '${prefix}/etc' ; then
fi fi
dnl lxc and qemu drivers require linux headers dnl lxc and qemu drivers require linux headers
if test `uname -s` != "Linux" case "$host" in
then *-*-linux*)
# match linux here so the *) case will match anything non-linux
;;
*)
if test "x$with_lxc" != "xyes" if test "x$with_lxc" != "xyes"
then then
with_lxc=no with_lxc=no
...@@ -220,7 +223,8 @@ then ...@@ -220,7 +223,8 @@ then
then then
with_qemu=no with_qemu=no
fi fi
fi ;;
esac
dnl Allow to build without Xen, QEMU/KVM, test or remote driver dnl Allow to build without Xen, QEMU/KVM, test or remote driver
AC_ARG_WITH([xen], AC_ARG_WITH([xen],
...@@ -1983,7 +1987,13 @@ then ...@@ -1983,7 +1987,13 @@ then
fi fi
AM_CONDITIONAL([WITH_NODE_DEVICES], [test "$with_nodedev" = "yes"]) 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], AC_ARG_WITH([qemu-user],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册