diff --git a/configure.ac b/configure.ac index 6569402065..91e79c776e 100644 --- a/configure.ac +++ b/configure.ac @@ -946,9 +946,13 @@ fi dnl dnl check for kernel headers required by src/bridge.c dnl -if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then - AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],, - AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])) +if test "$with_linux" = "yes"; then + if test "$with_qemu" = "yes" || test "$with_lxc" = "yes" ; then + AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],, + [AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt with QEMU or LXC support])], + [[#include + ]]) + fi fi