Fix configure checks from previous commits

* configure.in: Don't set AM_CONDITIIONAL until *after* making
  the checks
This commit is contained in:
Daniel P. Berrange 2009-08-05 11:59:58 +01:00
parent acec6c3d02
commit 87f3d69dac

View File

@ -297,14 +297,6 @@ if test "x$with_vbox" = "xyes"; then
fi
AM_CONDITIONAL([WITH_VBOX], [test "$with_vbox" = "yes"])
if test "$with_libvirtd" = "no" ; then
with_lxc=no
fi
if test "$with_lxc" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_LXC], 1, [whether LXC driver is enabled])
fi
AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
if test "$with_libvirtd" = "no" ; then
with_qemu=no
fi
@ -313,21 +305,11 @@ if test "$with_qemu" = "yes" ; then
fi
AM_CONDITIONAL([WITH_QEMU], [test "$with_qemu" = "yes"])
if test "$with_uml" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_UML], 1, [whether UML driver is enabled])
fi
AM_CONDITIONAL([WITH_UML], [test "$with_uml" = "yes"])
if test "$with_one" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_ONE],1,[whether ONE driver is enabled])
fi
AM_CONDITIONAL([WITH_ONE],[test "$with_one" = "yes"])
if test "$with_esx" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_ESX], 1, [whether ESX driver is enabled])
fi
AM_CONDITIONAL([WITH_ESX], [test "$with_esx" = "yes"])
if test "$with_test" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_TEST], 1, [whether Test driver is enabled])
fi
@ -425,14 +407,6 @@ if test "$with_xen_inotify" = "yes"; then
fi
AM_CONDITIONAL([WITH_XEN_INOTIFY], [test "$with_xen_inotify" = "yes"])
dnl
dnl check for kernel headers required by src/bridge.c
dnl
if test "$with_qemu" = "yes" -o "$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]))
fi
dnl
dnl check for kvm headers
dnl
@ -471,6 +445,23 @@ if test "$with_lxc" = "yes" -o "$with_lxc" = "check"; then
])
fi
if test "$with_libvirtd" = "no" ; then
with_lxc=no
fi
if test "$with_lxc" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_LXC], 1, [whether LXC driver is enabled])
fi
AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
dnl
dnl check for kernel headers required by src/bridge.c
dnl
if test "$with_qemu" = "yes" -o "$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]))
fi
dnl OpenNebula driver Compilation setting
dnl
@ -840,6 +831,14 @@ if test "$with_uml" = "yes" -o "$with_uml" = "check"; then
fi
])
fi
if test "$with_libvirtd" = "no" ; then
with_uml=no
fi
if test "$with_uml" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_UML], 1, [whether UML driver is enabled])
fi
AM_CONDITIONAL([WITH_UML], [test "$with_uml" = "yes"])
dnl
@ -1226,6 +1225,10 @@ if test "$with_esx" = "yes" -o "$with_esx" = "check"; then
fi
])
fi
if test "$with_esx" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_ESX], 1, [whether ESX driver is enabled])
fi
AM_CONDITIONAL([WITH_ESX], [test "$with_esx" = "yes"])
AC_SUBST([LIBCURL_CFLAGS])
AC_SUBST([LIBCURL_LIBS])