-AC_PROG_CPP
-
-AC_C_PROTOTYPES
-test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
-
-AC_PROG_CC_C_O
-
-dnl Select some C flags based on the host type.
-AC_CANONICAL_HOST
-
-DEBUG="-g"
-WARNINGS="-Wall -Werror"
-CFLAGS_FPIC="-fPIC"
-WIN32=no
-case "$host" in
- *-*-mingw*)
- WARNINGS="$WARNINGS -Wno-unused"
- CFLAGS_FPIC=""
- WIN32=yes
-esac
-AC_SUBST(DEBUG)
-AC_SUBST(WARNINGS)
-AC_SUBST(CFLAGS_FPIC)
-AC_SUBST(WIN32)
-
-dnl Check for libvirt development environment.
-AC_ARG_WITH(libvirt,
- AC_HELP_STRING([--with-libvirt=PATH],[Set path to installed libvirt]),
- [if test "x$withval" != "x"; then
- CFLAGS="$CFLAGS -I$withval/include"
- LDFLAGS="$LDFLAGS -L$withval/lib"
- fi
- ])
-AC_CHECK_LIB(virt,virConnectOpen,
- [],
- AC_MSG_ERROR([You must install libvirt library]))
-AC_CHECK_HEADER([libvirt/libvirt.h],
- [],
- AC_MSG_ERROR([You must install libvirt development package]))
-
-dnl We also use <libvirt/virterror.h>
-AC_CHECK_HEADER([libvirt/virterror.h],
- [],
- AC_MSG_ERROR([You must install libvirt development package]))
-
-dnl Check for libvirt >= 0.2.1 (our minimum supported version).
-dnl See: http://libvirt.org/hvsupport.html
-AC_CHECK_FUNC(virConnectGetCapabilities,
- [],
- AC_MSG_ERROR([You must have libvirt >= 0.2.1]))
-
-dnl Check for optional libvirt functions added since 0.2.1.
-dnl See: http://libvirt.org/hvsupport.html
-AC_CHECK_FUNCS([virConnectGetHostname \
- virConnectGetURI \
- virDomainBlockStats \
- virDomainGetSchedulerParameters \
- virDomainGetSchedulerType \
- virDomainInterfaceStats \
- virDomainMigrate \
- virDomainSetSchedulerParameters \
- virNodeGetFreeMemory \
- virNodeGetCellsFreeMemory \
- virJobGetInfo \
- virJobGetDomain \
- virJobGetNetwork \
- virJobCancel \
- virJobFree \
- virDomainCreateLinuxJob \
- virDomainSaveJob \
- virDomainRestoreJob \
- virDomainCoreDumpJob \
- virDomainCreateJob \
- virNetworkCreateXMLJob \
- virNetworkCreateJob \
- virStoragePoolGetConnect \
- virConnectNumOfStoragePools \
- virConnectListStoragePools \
- virConnectNumOfDefinedStoragePools \
- virConnectListDefinedStoragePools \
- virConnectDiscoverStoragePools \
- virStoragePoolLookupByName \
- virStoragePoolLookupByUUID \
- virStoragePoolLookupByUUIDString \
- virStoragePoolLookupByVolume \
- virStoragePoolCreateXML \
- virStoragePoolDefineXML \
- virStoragePoolUndefine \
- virStoragePoolCreate \
- virStoragePoolDestroy \
- virStoragePoolShutdown \
- virStoragePoolFree \
- virStoragePoolRefresh \
- virStoragePoolGetName \
- virStoragePoolGetUUID \
- virStoragePoolGetUUIDString \
- virStoragePoolGetInfo \
- virStoragePoolGetXMLDesc \
- virStoragePoolGetAutostart \
- virStoragePoolSetAutostart \
- virStoragePoolNumOfVolumes \
- virStoragePoolListVolumes \
- virStorageVolLookupByName \
- virStorageVolLookupByKey \
- virStorageVolLookupByPath \
- virStorageVolGetName \
- virStorageVolGetKey \
- virStorageVolCreateXML \
- virStorageVolDestroy \
- virStorageVolFree \
- virStorageVolGetInfo \
- virStorageVolGetXMLDesc \
- virStorageVolGetPath \
-])
-
-dnl Check for optional types added since 0.2.1.
-AC_CHECK_TYPES([virJobPtr, virStoragePoolPtr, virStorageVolPtr],,,
- [#include <libvirt/libvirt.h>])
-
-dnl Check for optional ncurses.
-AC_CHECK_LIB(ncurses,initscr)