2005-11-02 12:50:21 +00:00
dnl Process this file with autoconf to produce a configure script.
2007-09-18 23:46:18 +00:00
2015-01-08 15:36:54 +01:00
dnl Copyright (C) 2005-2015 Red Hat, Inc.
2013-05-14 17:42:12 -06:00
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library. If not, see
dnl <http://www.gnu.org/licenses/>.
2011-07-28 12:56:24 -06:00
2008-05-22 15:34:02 +00:00
AC_CONFIG_AUX_DIR([build-aux])
2010-02-17 06:45:10 -07:00
AC_CONFIG_MACRO_DIR([m4])
2019-04-03 02:21:28 +02:00
dnl Make automake keep quiet about wildcards & other GNUmake-isms
2019-04-03 02:01:30 +02:00
AM_INIT_AUTOMAKE([
2019-04-03 02:29:03 +02:00
foreign
2019-04-03 02:01:30 +02:00
-Wno-portability
tar-pax
no-dist-gzip
dist-xz
subdir-objects
])
2015-06-02 09:17:43 -06:00
dnl older automake's default of ARFLAGS=cru is noisy on newer binutils;
dnl we don't really need the 'u' even in older toolchains. Then there is
dnl older libtool, which spelled it AR_FLAGS
m4_divert_text([DEFAULTS], [: "${ARFLAGS=cr} ${AR_FLAGS=cr}"])
2009-07-08 11:51:59 +02:00
2013-09-04 10:26:30 -06:00
# Default to using the silent-rules feature when possible. Formatting
# chosen to bypass 'grep' checks that cause older automake to warn.
# Users (include rpm) can still change the default at configure time.
m4_ifndef([AM_SILENT_RULES],
[m4_define([AM_SILENT_RULES],[])])AM_SILENT_RULES([yes])
2009-07-08 11:51:59 +02:00
2005-11-02 12:50:21 +00:00
AC_CANONICAL_HOST
2007-11-29 17:41:57 +00:00
dnl Checks for C compiler.
2005-11-02 13:19:10 +00:00
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_CPP
2007-09-20 18:40:36 +00:00
2020-01-17 11:26:26 +00:00
dnl get 64-int interfaces on 32-bit platforms
2020-07-24 14:02:39 +02:00
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
2020-01-17 11:26:26 +00:00
2007-11-29 17:41:57 +00:00
dnl Support building Win32 DLLs (must appear *before* AM_PROG_LIBTOOL)
AC_LIBTOOL_WIN32_DLL
2013-04-02 16:52:31 +01:00
m4_ifndef([LT_INIT], [
AM_PROG_LIBTOOL
], [
LT_INIT([shared disable-static])
])
2007-03-15 17:24:56 +00:00
AM_PROG_CC_C_O
2010-04-27 09:43:55 +02:00
AM_PROG_LD
2007-03-15 17:24:56 +00:00
2013-09-17 10:25:42 -06:00
dnl Make some notes about which OS we're compiling for, as the lxc and qemu
dnl drivers require linux headers, and storage_mpath, dtrace, and nwfilter
dnl are also linux specific. The "network" and storage_fs drivers are known
2019-04-02 11:04:46 +02:00
dnl to not work on macOS presently, so we also make a note if compiling
2013-09-17 10:25:42 -06:00
dnl for that
2020-01-14 18:34:26 +00:00
with_linux=no with_macos=no with_freebsd=no with_win=no
2013-09-17 10:25:42 -06:00
case $host in
*-*-linux*) with_linux=yes ;;
2019-04-02 11:04:46 +02:00
*-*-darwin*) with_macos=yes ;;
2013-09-17 10:25:42 -06:00
*-*-freebsd*) with_freebsd=yes ;;
2014-04-28 13:30:36 +01:00
*-*-mingw* | *-*-msvc* ) with_win=yes ;;
2013-09-17 10:25:42 -06:00
esac
if test $with_linux = no; then
with_dtrace=no
2017-03-05 18:17:22 +04:00
with_storage_scsi=no
2013-09-17 10:25:42 -06:00
fi
AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"])
AM_CONDITIONAL([WITH_FREEBSD], [test "$with_freebsd" = "yes"])
2019-08-21 19:13:19 +03:00
AM_CONDITIONAL([WITH_MACOS], [test "$with_macos" = "yes"])
2013-09-17 10:25:42 -06:00
# Check for compiler and library settings.
2016-12-12 18:11:51 +01:00
LIBVIRT_ARG_NSS
2016-12-15 14:56:29 +01:00
LIBVIRT_ARG_PM_UTILS
2016-12-12 18:11:51 +01:00
2016-12-06 16:00:41 +01:00
LIBVIRT_CHECK_NWFILTER
2016-12-15 14:56:29 +01:00
LIBVIRT_CHECK_PM_UTILS
2012-09-20 13:03:27 +01:00
2017-05-18 11:55:12 +02:00
2016-12-13 13:47:07 +01:00
2016-12-14 15:28:55 +01:00
dnl
dnl Virtualization drivers check
dnl
LIBVIRT_DRIVER_ARG_NETWORK
LIBVIRT_DRIVER_ARG_INTERFACE
LIBVIRT_DRIVER_CHECK_NETWORK
LIBVIRT_DRIVER_CHECK_INTERFACE
2016-11-14 15:25:41 +01:00
2005-12-02 12:11:06 +00:00
dnl
2010-09-09 17:06:00 +02:00
dnl in case someone want to build static binaries
dnl STATIC_BINARIES="-static"
2005-12-02 12:11:06 +00:00
dnl
2010-09-09 17:06:00 +02:00
STATIC_BINARIES=
2008-05-22 15:34:02 +00:00
AC_SUBST([STATIC_BINARIES])
2005-12-02 12:11:06 +00:00
2016-12-15 15:04:23 +01:00
dnl
dnl Miscellaneous checks
dnl
2007-02-16 18:30:55 +00:00
2016-12-15 15:04:23 +01:00
LIBVIRT_ARG_DTRACE
LIBVIRT_ARG_NUMAD
2016-12-12 18:11:51 +01:00
LIBVIRT_ARG_INIT_SCRIPT
2016-12-15 15:04:23 +01:00
LIBVIRT_ARG_CHRDEV_LOCK_FILES
LIBVIRT_ARG_LOADER_NVRAM
LIBVIRT_ARG_LOGIN_SHELL
LIBVIRT_ARG_HOST_VALIDATE
LIBVIRT_ARG_TLS_PRIORITY
2016-11-29 08:33:19 +01:00
LIBVIRT_ARG_SYSCTL_CONFIG
2016-12-15 15:04:23 +01:00
LIBVIRT_CHECK_DTRACE
LIBVIRT_CHECK_NUMAD
LIBVIRT_CHECK_INIT_SCRIPT
LIBVIRT_CHECK_CHRDEV_LOCK_FILES
LIBVIRT_CHECK_LOADER_NVRAM
LIBVIRT_CHECK_LOGIN_SHELL
LIBVIRT_CHECK_HOST_VALIDATE
LIBVIRT_CHECK_TLS_PRIORITY
2016-11-29 08:33:19 +01:00
LIBVIRT_CHECK_SYSCTL_CONFIG
2016-12-25 13:42:42 +01:00
LIBVIRT_CHECK_NSS
2012-04-04 11:16:34 +01:00
2010-03-25 13:46:12 -04:00
2009-09-10 14:21:10 +01:00
dnl Need to test if pkg-config exists
PKG_PROG_PKG_CONFIG
2009-05-25 11:56:00 +00:00
2016-12-12 18:20:45 +01:00
dnl Security driver checks
LIBVIRT_SECDRIVER_ARG_SELINUX
2016-12-01 12:08:20 +01:00
LIBVIRT_SECDRIVER_ARG_APPARMOR
2009-10-08 16:34:22 +02:00
2016-12-01 12:08:20 +01:00
LIBVIRT_SECDRIVER_CHECK_SELINUX
LIBVIRT_SECDRIVER_CHECK_APPARMOR
2009-10-08 16:34:22 +02:00
2009-09-14 13:31:23 +01:00
2016-12-22 12:49:51 +01:00
LIBVIRT_ARG_WITH_FEATURE([SECRETS], [local secrets management driver], [yes])
2011-05-24 13:21:51 +02:00
2009-09-14 13:31:23 +01:00
if test "$with_libvirtd" = "no"; then
with_secrets=no
fi
if test "$with_secrets" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_SECRETS], 1, [whether local secrets management driver is available])
fi
AM_CONDITIONAL([WITH_SECRETS], [test "$with_secrets" = "yes"])
2016-12-13 10:36:14 +01:00
dnl
dnl Storage driver checks
dnl
2016-12-07 08:46:51 +01:00
LIBVIRT_STORAGE_ARG_DIR
2016-12-07 10:16:19 +01:00
LIBVIRT_STORAGE_ARG_FS
2016-12-07 10:22:05 +01:00
LIBVIRT_STORAGE_ARG_LVM
2016-12-07 13:12:31 +01:00
LIBVIRT_STORAGE_ARG_ISCSI
2018-07-31 10:44:21 +02:00
LIBVIRT_STORAGE_ARG_ISCSI_DIRECT
2016-12-07 13:13:00 +01:00
LIBVIRT_STORAGE_ARG_SCSI
2016-12-12 18:21:11 +01:00
LIBVIRT_STORAGE_ARG_MPATH
2016-12-12 18:21:51 +01:00
LIBVIRT_STORAGE_ARG_DISK
2016-12-07 15:44:08 +01:00
LIBVIRT_STORAGE_ARG_RBD
2016-12-07 15:48:37 +01:00
LIBVIRT_STORAGE_ARG_SHEEPDOG
2016-12-07 15:52:39 +01:00
LIBVIRT_STORAGE_ARG_GLUSTER
2016-12-07 15:59:19 +01:00
LIBVIRT_STORAGE_ARG_ZFS
2017-01-17 17:10:55 +03:00
LIBVIRT_STORAGE_ARG_VSTORAGE
2008-02-20 15:42:30 +00:00
2008-09-05 12:03:45 +00:00
if test "$with_libvirtd" = "no"; then
with_storage_dir=no
with_storage_fs=no
with_storage_lvm=no
with_storage_iscsi=no
2018-07-31 10:44:21 +02:00
with_storage_iscsi_direct=no
2009-04-01 16:03:22 +00:00
with_storage_scsi=no
2009-09-08 15:47:45 +02:00
with_storage_mpath=no
2008-09-05 12:03:45 +00:00
with_storage_disk=no
2012-05-14 11:06:42 +02:00
with_storage_rbd=no
2012-07-18 20:06:58 +01:00
with_storage_sheepdog=no
2013-11-19 16:26:05 -07:00
with_storage_gluster=no
2014-07-21 18:38:42 +04:00
with_storage_zfs=no
2017-01-17 17:10:55 +03:00
with_storage_vstorage=no
2008-09-05 12:03:45 +00:00
fi
2016-12-07 08:46:51 +01:00
2019-04-02 11:04:46 +02:00
dnl storage-fs does not work on macOS
2010-10-05 12:31:05 +11:00
2019-04-02 11:04:46 +02:00
if test "$with_macos" = "yes"; then
2010-10-05 12:31:05 +11:00
with_storage_fs=no
fi
2008-09-05 12:03:45 +00:00
2016-12-13 10:36:14 +01:00
LIBVIRT_STORAGE_CHECK_DIR
2016-12-07 10:16:19 +01:00
LIBVIRT_STORAGE_CHECK_FS
2016-12-07 10:22:05 +01:00
LIBVIRT_STORAGE_CHECK_LVM
2016-12-07 13:12:31 +01:00
LIBVIRT_STORAGE_CHECK_ISCSI
2018-07-31 10:44:21 +02:00
LIBVIRT_STORAGE_CHECK_ISCSI_DIRECT
2016-12-07 13:13:00 +01:00
LIBVIRT_STORAGE_CHECK_SCSI
2016-12-12 18:21:11 +01:00
LIBVIRT_STORAGE_CHECK_MPATH
2016-12-13 10:36:14 +01:00
LIBVIRT_STORAGE_CHECK_DISK
2016-12-07 15:44:08 +01:00
LIBVIRT_STORAGE_CHECK_RBD
2016-12-07 15:48:37 +01:00
LIBVIRT_STORAGE_CHECK_SHEEPDOG
2016-12-07 15:52:39 +01:00
LIBVIRT_STORAGE_CHECK_GLUSTER
2016-12-07 15:59:19 +01:00
LIBVIRT_STORAGE_CHECK_ZFS
2017-01-17 17:10:55 +03:00
LIBVIRT_STORAGE_CHECK_VSTORAGE
2008-02-20 15:45:33 +00:00
2012-06-05 10:28:52 -06:00
with_storage=no
2018-07-31 10:44:21 +02:00
for backend in dir fs lvm iscsi iscsi_direct scsi mpath rbd disk; do
2012-06-05 10:28:52 -06:00
if eval test \$with_storage_$backend = yes; then
with_storage=yes
break
fi
done
if test $with_storage = yes; then
AC_DEFINE([WITH_STORAGE], [1],
[Define to 1 if at least one storage backend is in use])
fi
AM_CONDITIONAL([WITH_STORAGE], [test "$with_storage" = "yes"])
2019-09-05 16:45:27 +01:00
dnl Python3 < 3.7 treats the C locale as 7-bit only.
dnl We must force env vars so it treats it as UTF-8
dnl regardless of the user's locale.
RUNUTF8="LC_ALL= LANG=C LC_CTYPE=en_US.UTF-8"
AC_SUBST(RUNUTF8)
2020-01-14 18:34:26 +00:00
dnl MinGW checks
2016-12-06 13:56:38 +01:00
LIBVIRT_WIN_CHECK_SYMBOLS
2016-12-06 13:57:12 +01:00
LIBVIRT_WIN_CHECK_WINDRES
2016-12-15 11:48:38 +01:00
2016-11-14 15:34:04 +01:00
dnl Driver-Modules library support
LIBVIRT_CHECK_DRIVER_MODULES
2008-11-21 12:16:08 +00:00
2008-02-28 17:07:37 +00:00
# Set LV_LIBTOOL_OBJDIR to "." or $lt_cv_objdir, depending on whether
# we're building shared libraries. This is the name of the directory
# in which .o files will be created.
test "$enable_shared" = no && lt_cv_objdir=.
LV_LIBTOOL_OBJDIR=${lt_cv_objdir-.}
2008-05-22 15:34:02 +00:00
AC_SUBST([LV_LIBTOOL_OBJDIR])
2008-02-28 17:07:37 +00:00
2008-11-21 12:27:11 +00:00
with_nodedev=no;
2010-03-24 15:31:31 -06:00
if test "$with_hal" = "yes" || test "$with_udev" = "yes";
2008-11-21 12:27:11 +00:00
then
with_nodedev=yes
AC_DEFINE_UNQUOTED([WITH_NODE_DEVICES], 1, [with node device driver])
fi
AM_CONDITIONAL([WITH_NODE_DEVICES], [test "$with_nodedev" = "yes"])
2013-07-17 20:02:17 +02:00
2019-10-02 17:04:31 +01:00
GNUmakefile=GNUmakefile
m4_if(m4_version_compare([2.61a.100],
m4_defn([m4_PACKAGE_VERSION])), [1], [],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
[GNUmakefile=$GNUmakefile])])
2012-09-14 10:08:54 +01:00
AC_CONFIG_FILES([run],
[chmod +x,-w run])
2013-07-31 14:52:16 -06:00
AC_CONFIG_FILES([\
2020-06-18 00:53:35 +02:00
Makefile src/Makefile docs/Makefile \
2017-04-21 16:05:19 +02:00
.color_coded \
2017-04-21 16:47:02 +02:00
.ycm_extra_conf.py \
2014-06-20 17:47:15 +01:00
libvirt.pc \
libvirt-qemu.pc \
libvirt-lxc.pc \
2015-04-15 16:16:24 +02:00
libvirt-admin.pc \
2014-06-20 17:48:12 +01:00
src/libvirt.pc \
src/libvirt-qemu.pc \
src/libvirt-lxc.pc \
2014-06-20 17:47:15 +01:00
libvirt.spec mingw-libvirt.spec \
2018-04-03 16:39:17 +01:00
po/Makefile \
2016-01-09 18:03:56 -05:00
examples/Makefile \
2013-07-31 14:52:16 -06:00
tests/Makefile \
2016-01-10 15:35:36 -05:00
tools/Makefile])
2013-07-31 14:52:16 -06:00
AC_OUTPUT
2007-09-18 23:36:30 +00:00
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Configuration summary])
AC_MSG_NOTICE([=====================])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Drivers])
AC_MSG_NOTICE([])
2016-12-01 12:02:30 +01:00
LIBVIRT_DRIVER_RESULT_NETWORK
2016-12-01 15:50:59 +01:00
LIBVIRT_DRIVER_RESULT_INTERFACE
2007-09-18 23:36:30 +00:00
AC_MSG_NOTICE([])
2008-02-20 15:42:30 +00:00
AC_MSG_NOTICE([Storage Drivers])
AC_MSG_NOTICE([])
2016-12-07 08:46:51 +01:00
LIBVIRT_STORAGE_RESULT_DIR
2016-12-07 10:16:19 +01:00
LIBVIRT_STORAGE_RESULT_FS
2016-12-07 10:22:05 +01:00
LIBVIRT_STORAGE_RESULT_LVM
2016-12-07 13:12:31 +01:00
LIBVIRT_STORAGE_RESULT_ISCSI
2018-07-31 10:44:21 +02:00
LIBVIRT_STORAGE_RESULT_ISCSI_DIRECT
2016-12-07 13:13:00 +01:00
LIBVIRT_STORAGE_RESULT_SCSI
2016-12-12 18:21:11 +01:00
LIBVIRT_STORAGE_RESULT_MPATH
2016-12-12 18:21:51 +01:00
LIBVIRT_STORAGE_RESULT_DISK
2016-12-07 15:44:08 +01:00
LIBVIRT_STORAGE_RESULT_RBD
2016-12-07 15:48:37 +01:00
LIBVIRT_STORAGE_RESULT_SHEEPDOG
2016-12-07 15:52:39 +01:00
LIBVIRT_STORAGE_RESULT_GLUSTER
2016-12-07 15:59:19 +01:00
LIBVIRT_STORAGE_RESULT_ZFS
2017-01-17 17:10:55 +03:00
LIBVIRT_STORAGE_RESULT_VSTORAGE
2008-02-20 15:42:30 +00:00
AC_MSG_NOTICE([])
2009-03-03 10:06:49 +00:00
AC_MSG_NOTICE([Security Drivers])
AC_MSG_NOTICE([])
2016-12-12 18:20:45 +01:00
LIBVIRT_SECDRIVER_RESULT_SELINUX
2016-12-01 12:08:20 +01:00
LIBVIRT_SECDRIVER_RESULT_APPARMOR
2009-03-03 10:06:49 +00:00
AC_MSG_NOTICE([])
2008-11-21 12:16:08 +00:00
AC_MSG_NOTICE([Driver Loadable Modules])
AC_MSG_NOTICE([])
2016-11-14 15:34:04 +01:00
LIBVIRT_RESULT_DRIVER_MODULES
2009-08-05 10:43:37 +02:00
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Libraries])
AC_MSG_NOTICE([])
2016-11-10 14:33:41 +01:00
LIBVIRT_RESULT_NSS
2016-12-12 10:12:13 +01:00
LIBVIRT_RESULT_PM_UTILS
2016-12-07 15:44:08 +01:00
LIBVIRT_RESULT_RBD
2016-12-15 11:48:38 +01:00
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Windows])
AC_MSG_NOTICE([])
2016-12-06 13:57:12 +01:00
LIBVIRT_WIN_RESULT_WINDRES
2007-09-18 23:36:30 +00:00
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Miscellaneous])
AC_MSG_NOTICE([])
2016-11-30 14:34:57 +01:00
LIBVIRT_RESULT_DTRACE
2016-12-12 13:54:35 +01:00
LIBVIRT_RESULT_NUMAD
2016-05-02 13:27:47 +02:00
LIBVIRT_RESULT_INIT_SCRIPT
2016-12-13 13:45:25 +01:00
LIBVIRT_RESULT_CHRDEV_LOCK_FILES
2016-12-15 13:39:21 +01:00
LIBVIRT_RESULT_LOADER_NVRAM
2016-12-14 16:51:30 +01:00
LIBVIRT_RESULT_LOGIN_SHELL
LIBVIRT_RESULT_HOST_VALIDATE
2016-12-14 16:33:57 +01:00
LIBVIRT_RESULT_TLS_PRIORITY
2007-09-18 23:36:30 +00:00
AC_MSG_NOTICE([])