2 # Copyright (C) 2013-2022 Red Hat Inc.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
11 # * Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
15 # * Neither the name of Red Hat nor the names of its contributors may be
16 # used to endorse or promote products derived from this software without
17 # specific prior written permission.
19 # THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
20 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22 # PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
23 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
26 # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
27 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
29 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 m4_define([NBDKIT_VERSION_MAJOR], [1])
33 m4_define([NBDKIT_VERSION_MINOR], [31])
34 m4_define([NBDKIT_VERSION_MICRO], [6])
36 NBDKIT_VERSION_MAJOR.NBDKIT_VERSION_MINOR.NBDKIT_VERSION_MICRO)
37 AC_CONFIG_MACRO_DIR([m4])
39 dnl This must be used very early else you will get
40 dnl "warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS"
41 m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],[],
42 [m4_define([AC_USE_SYSTEM_EXTENSIONS],[])])
43 AC_USE_SYSTEM_EXTENSIONS
45 dnl NB: Do not [quote] this parameter.
46 AM_INIT_AUTOMAKE(foreign)
49 dnl Extra string, a freeform string defined by downstream packagers.
50 dnl eg. If you are packaging nbdkit for Linux distro X 1.1, you could
51 dnl ./configure --with-extra="X release 1.1"
53 [AS_HELP_STRING([--with-extra],
54 [extra version information (for use by packagers)])],
55 [NBDKIT_VERSION_EXTRA="$withval"],
56 [NBDKIT_VERSION_EXTRA=]
58 AC_DEFINE_UNQUOTED([NBDKIT_VERSION_EXTRA], ["$NBDKIT_VERSION_EXTRA"],
59 [Extra version information (for use by packagers)])
61 AC_MSG_NOTICE([nbdkit version NBDKIT_VERSION_MAJOR.NBDKIT_VERSION_MINOR.NBDKIT_VERSION_MICRO ($NBDKIT_VERSION_EXTRA)])
63 dnl List of plugins and filters.
109 plugins="$(echo $(printf %s\\n $lang_plugins $non_lang_plugins | sort -u))"
154 AC_SUBST([lang_plugins])
155 AC_SUBST([non_lang_plugins])
158 dnl Some very basic tools.
161 dnl Check for basic C environment.
168 test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
172 dnl Define the host CPU architecture (defines 'host_cpu').
174 AC_DEFINE_UNQUOTED([host_cpu],["$host_cpu"],[Host architecture.])
176 dnl Define 'host_os'.
177 AC_DEFINE_UNQUOTED([host_os],["$host_os"],[Host operating system.])
179 dnl Defines WORDS_BIGENDIAN on big endian platforms.
182 dnl These are defined in <unistd.h> which is included by
183 dnl AC_DEFAULT_INCLUDES.
184 AC_CHECK_SIZEOF([pid_t])
185 AC_CHECK_SIZEOF([uid_t])
186 AC_CHECK_SIZEOF([gid_t])
188 dnl Check for C++ (optional, we just use this to test the header
189 dnl can be included from C++ code).
192 dnl The C++ compiler test is pretty useless because even if it fails
193 dnl it sets CXX=g++. So test the compiler actually works.
194 AC_MSG_CHECKING([if the C++ compiler really really works])
195 AS_IF([$CXX --version >&AS_MESSAGE_LOG_FD 2>&1],[have_cxx=yes],[have_cxx=no])
196 AC_MSG_RESULT([$have_cxx])
197 AM_CONDITIONAL([HAVE_CXX], [test "$have_cxx" = "yes"])
199 AC_ARG_ENABLE([gcc-warnings],
200 [AS_HELP_STRING([--enable-gcc-warnings],
201 [turn on lots of GCC warnings (for developers)])],
204 *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
206 gcc_warnings=$enableval],
209 if test "x$gcc_warnings" = "xyes"; then
210 WARNINGS_CFLAGS="-Wall -Wshadow -Wvla -Werror"
211 AC_SUBST([WARNINGS_CFLAGS])
214 dnl Check if the compiler supports -std=c90 flag. This is only used
215 dnl during a test. OpenBSD GCC does not support this flag so we skip
217 AC_MSG_CHECKING([if the compiler supports -std=c90 for ANSI C test])
219 CFLAGS="$CFLAGS -std=c90"
220 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
221 [supports_std_c90=yes],
222 [supports_std_c90=no])
224 AC_MSG_RESULT([$supports_std_c90])
225 AM_CONDITIONAL([CAN_TEST_ANSI_C], [test "x$supports_std_c90" = "xyes"])
227 dnl Check for __builtin_*_overflow. We need the dummy parameters
228 dnl else detection doesn't work correctly for some reason.
229 AC_CHECK_DECLS([__builtin_add_overflow(int, int, int *),
230 __builtin_mul_overflow(int, int, int *)],
233 dnl On Haiku we must use BSD-compatibility headers to get the endian
235 AC_MSG_CHECKING(whether OS-dependent include paths are required)
237 [haiku*], [CFLAGS="$CFLAGS -I`findpaths -p /system B_FIND_PATH_HEADERS_DIRECTORY`/bsd"; AC_MSG_RESULT(yes)],
241 dnl On Linux /tmp is often tmpfs which is not large enough, so use /var/tmp.
242 dnl But Haiku only has /tmp.
243 AC_MSG_CHECKING([for temporary directory for large files])
245 [haiku*], [LARGE_TMPDIR=/tmp],
246 [LARGE_TMPDIR=/var/tmp]
248 AC_MSG_RESULT([$LARGE_TMPDIR])
249 AC_DEFINE_UNQUOTED([LARGE_TMPDIR],["$LARGE_TMPDIR"],
250 [Temporary directory for large files])
252 dnl Check if libc has program_invocation_short_name.
253 AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
257 dnl Check if __attribute__((cleanup(...))) works.
258 dnl Set -Werror, otherwise gcc will only emit a warning for attributes
259 dnl that it doesn't understand.
260 acx_nbdkit_save_CFLAGS="${CFLAGS}"
261 CFLAGS="${CFLAGS} -Werror"
262 AC_MSG_CHECKING([if __attribute__((cleanup(...))) works with this compiler])
277 __attribute__((cleanup(freep))) char *ptr = malloc (100);
282 main (int argc, char *argv[])
293 ['__attribute__((cleanup(...)))' does not work.
295 You may not be using a sufficiently recent version of GCC or CLANG, or
296 you may be using a C compiler which does not support this attribute,
297 or the configure test may be wrong.
299 This code requires the attribute to work for proper locking between threads.])])
300 CFLAGS="${acx_nbdkit_save_CFLAGS}"
302 dnl Check for __auto_type (GCC extension).
303 AC_MSG_CHECKING([if __auto_type is available in this compiler])
315 AC_DEFINE([HAVE_AUTO_TYPE],[1],[__auto_type is available])
321 dnl 'environ' is not always declared in public header files:
322 dnl Linux => <unistd.h> Haiku => <stdlib.h>
323 dnl FreeBSD & OpenBSD => not declared
324 dnl On platforms where it's not declared we must add an extern decl.
325 AC_MSG_CHECKING([if environ is declared in header files])
333 const char **env = environ;
334 return env ? 1 : 0; // this just forces env to be used
339 AC_DEFINE([HAVE_ENVIRON_DECL],[1],[environ is declared in headers])
345 dnl Check for other headers, all optional.
374 AC_CHECK_HEADERS([linux/vm_sockets.h], [], [], [#include <sys/socket.h>])
376 dnl Check for functions in libc, all optional.
396 dnl Check for structs and members.
397 AC_CHECK_MEMBERS([struct dirent.d_type], [], [], [[#include <dirent.h>]])
398 AC_CHECK_MEMBERS([struct ucred.uid], [], [],
400 #ifdef HAVE_SYS_SOCKET_H
401 #include <sys/socket.h>
403 #ifdef HAVE_SYS_UCRED_H
404 #include <sys/ucred.h>
407 AC_CHECK_MEMBERS([struct sockpeercred.uid], [], [],
409 #ifdef HAVE_SYS_SOCKET_H
410 #include <sys/socket.h>
414 dnl Replacement functions that we provide for some platforms.
415 AC_CONFIG_LIBOBJ_DIR([common/replacements])
419 get_current_dir_name \
434 dnl Check whether printf("%m") works
435 AC_CACHE_CHECK([whether the printf family supports %m],
436 [nbdkit_cv_func_printf_percent_m],
445 snprintf(buf, sizeof buf, "%m");
446 return !!strcmp (buf, strerror (EINVAL));
448 [nbdkit_cv_func_printf_percent_m=yes],
449 [nbdkit_cv_func_printf_percent_m=no],
452 *-gnu* | gnu*) nbdkit_cv_func_printf_percent_m=yes;;
453 *) nbdkit_cv_func_printf_percent_m="guessing no";;
456 AS_IF([test "x$nbdkit_cv_func_printf_percent_m" = xyes],
457 [AC_DEFINE([HAVE_VFPRINTF_PERCENT_M],[1],
458 [Define to 1 if vfprintf supports %m.])])
461 AC_SEARCH_LIBS([dlsym], [dl dld], [
462 AS_IF([test "x$ac_cv_search_dlsym" != "xnone required"],
463 [DL_LIBS="$ac_cv_search_dlsym"], [DL_LIBS=])
465 ], [AC_MSG_ERROR([unable to find the dlsym() function])
469 dnl Test if <iconv.h> header can build working binaries.
471 dnl On FreeBSD: iconv and libiconv both exist, both can be installed
472 dnl simultaneously, <iconv.h> can exist in two separate places, and
473 dnl if you get the wrong header/library mix everything breaks.
475 dnl On Haiku: libiconv is required to link to iconv_* functions.
477 [AS_HELP_STRING([--without-iconv],
478 [don't try to link against iconv @<:@default=check@:>@])],
481 AS_IF([test "x$with_iconv" != "xno"],[
482 AC_CHECK_HEADER([iconv.h],[
483 AC_MSG_CHECKING([if <iconv.h> can be used to link a program])
490 main (int argc, char *argv[])
492 iconv_t ic = iconv_open ("", "");
505 AM_CONDITIONAL([HAVE_ICONV], [test "x$iconv_working" = "xyes"])
507 use_linker_script_for_server=yes
509 dnl Don't use linker script for the server on FreeBSD because
510 dnl FreeBSD's linker is broken. See eg:
511 dnl https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190851
512 AC_MSG_CHECKING([if we should disable the linker script (FreeBSD only)])
515 use_linker_script_for_server=no
518 [AC_MSG_RESULT([no])]
521 dnl Check if -rdynamic linker flag works.
522 acx_nbdkit_save_LDFLAGS="${LDFLAGS}"
523 LDFLAGS="${LDFLAGS} -rdynamic"
524 AC_MSG_CHECKING([if linker supports -rdynamic])
529 main (int argc, char *argv[])
541 LDFLAGS="${acx_nbdkit_save_LDFLAGS}"
542 AC_SUBST([DL_LDFLAGS])
544 dnl Check for dladdr in -ldl, optional. This is a glibc extension.
546 LIBS="$DL_LIBS $LIBS"
547 AC_CHECK_FUNCS([dladdr])
551 AC_MSG_CHECKING([if the target is Windows])
555 LIBS="$LIBS -lmsvcrt -lkernel32 -luser32 -lws2_32"
556 NO_UNDEFINED_ON_WINDOWS="-no-undefined"
557 IMPORT_LIBRARY_ON_WINDOWS='-Wl,-L$(top_builddir)/server -Wl,-lnbdkit'
559 DIR_SEPARATOR_STR='\\'
565 AC_MSG_RESULT([$is_windows])
566 AC_SUBST([NO_UNDEFINED_ON_WINDOWS])
567 AC_SUBST([IMPORT_LIBRARY_ON_WINDOWS])
569 AC_DEFINE_UNQUOTED([SOEXT],["$SOEXT"],[Extension used for shared objects/DLLs.])
570 AC_DEFINE_UNQUOTED([EXEEXT],["$EXEEXT"],[Extension used for executables.])
571 AC_DEFINE_UNQUOTED([DIR_SEPARATOR_STR],["$DIR_SEPARATOR_STR"],
572 [String that separates path elements.])
573 AM_CONDITIONAL([IS_WINDOWS],[test "x$is_windows" = "xyes"])
575 AS_IF([test "x$is_windows" = "xyes"],[
576 dnl For Windows, look for the mc/windmc utility.
577 dnl XXX Do we need to check for mc.exe as well?
578 AC_CHECK_TOOLS([MC],[windmc mc],[no])
579 AS_IF([test "x$MC" = "xno"],
580 [AC_MSG_ERROR([mc/windmc utility must be available when compiling for Windows])])
582 dnl On Windows look for dlltool.
583 AC_CHECK_TOOLS([DLLTOOL],[dlltool],[no])
584 AS_IF([test "x$DLLTOOL" = "xno"],
585 [AC_MSG_ERROR([dlltool utility must be available when compiling for Windows])])
588 AC_SEARCH_LIBS([getaddrinfo], [network socket])
590 dnl Does this platform require libc_malloc_debug.so.0 (glibc >= 2.34)?
591 AC_MSG_CHECKING([if this is glibc >= 2.34])
592 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
594 #if !defined(__GLIBC__) || __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 34)
595 #error "not glibc 2.34"
597 ]])], [is_glibc_234=yes], [is_glibc_234=no]
599 AC_MSG_RESULT([$is_glibc_234])
600 AM_CONDITIONAL([HAVE_GLIBC_234], [test "x$is_glibc_234" = "xyes"])
602 dnl Check for SELinux socket labelling (optional).
603 PKG_CHECK_MODULES([LIBSELINUX], [libselinux], [
604 AC_SUBST([LIBSELINUX_CFLAGS])
605 AC_SUBST([LIBSELINUX_LIBS])
606 AC_DEFINE([HAVE_LIBSELINUX],[1],[libselinux found at compile time.])
608 AC_MSG_WARN([libselinux not found, SELinux socket labelling support will be disabled.])
611 dnl Check for GnuTLS (optional, for TLS support).
612 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.3.0], [
613 AC_SUBST([GNUTLS_CFLAGS])
614 AC_SUBST([GNUTLS_LIBS])
615 AC_DEFINE([HAVE_GNUTLS],[1],[gnutls found at compile time.])
617 AC_MSG_WARN([gnutls not found or < 3.3.0, TLS support will be disabled.])
619 AM_CONDITIONAL([HAVE_GNUTLS], [test "x$GNUTLS_LIBS" != "x"])
621 AS_IF([test "x$GNUTLS_LIBS" != "x"],[
622 AC_MSG_CHECKING([for default TLS session priority string])
623 AC_ARG_WITH([tls-priority],
624 [AS_HELP_STRING([--with-tls-priority],
625 [default TLS session priority string @<:@default=NORMAL@:>@])],
626 [tls_priority=$withval],
627 [tls_priority=NORMAL])
628 AC_MSG_RESULT([$tls_priority])
629 AC_DEFINE_UNQUOTED([TLS_PRIORITY],["$tls_priority"],
630 [Default TLS session priority string])
632 # Check for APIs which may not be present.
634 LIBS="$GNUTLS_LIBS $LIBS"
636 gnutls_base64_decode2 \
637 gnutls_certificate_set_known_dh_params \
639 gnutls_group_get_name \
641 gnutls_session_set_verify_cert \
642 gnutls_srp_server_get_username \
646 AM_CONDITIONAL([HAVE_GNUTLS_PBKDF2],
647 [test "x$GNUTLS_LIBS" != "x" && test "x$ac_cv_func_gnutls_pbkdf2" = xyes])
649 AC_ARG_ENABLE([linuxdisk],
650 [AS_HELP_STRING([--disable-linuxdisk],
651 [disable linuxdisk plugin @<:@default=check@:>@])],
653 [enable_linuxdisk=check])
654 dnl Check for mke2fs -d (used by linuxdisk plugin). There are two
655 dnl possible outcomes that we care about: (1) We have mke2fs and
656 dnl it supports the -d option. (2) We either don't have mke2fs
657 dnl or it's too old to support the -d option (eg. on RHEL 7).
659 AS_IF([test "$enable_linuxdisk" != "no"], [
660 AC_MSG_CHECKING([for mke2fs supporting the -d option])
661 AS_IF([mke2fs -V >/dev/null 2>&1], [
662 AS_IF([LANG=C mke2fs -d 2>&1 | grep -sq "option requires an argument"], [
666 AC_MSG_RESULT([$mke2fs_with_d])
668 AM_CONDITIONAL([HAVE_MKE2FS_WITH_D],[test "x$mke2fs_with_d" = "xyes"])
670 dnl Check for valgrind.
671 AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind],[no])
673 dnl If valgrind headers are available (optional).
674 dnl Although the runtime check adds only a trivial amount of code, you can
675 dnl avoid it with explicit --disable-valgrind.
676 AC_ARG_ENABLE([valgrind],
677 [AS_HELP_STRING([--disable-valgrind],
678 [disable Valgrind probe])],
680 [enable_valgrind=check])
681 AS_IF([test "x$enable_valgrind" != "xno"],[
682 PKG_CHECK_MODULES([VALGRIND], [valgrind], [
683 AC_SUBST([VALGRIND_CFLAGS])
684 AC_SUBST([VALGRIND_LIBS])
685 AC_DEFINE([HAVE_VALGRIND],[1],[Valgrind headers found at compile time])
687 AS_IF([test "x$enable_valgrind" = "xyes"], [
688 AC_MSG_ERROR([--enable-valgrind given, but Valgrind headers are not available])
693 dnl Build the special libFuzzer version of nbdkit. DO NOT USE THIS for
694 dnl normal builds. See fuzzing/README.
695 AC_ARG_ENABLE([libfuzzer],
696 [AS_HELP_STRING([--enable-libfuzzer],
697 [build libFuzzer test binary (developers only)])],
699 [enable_libfuzzer=no])
700 AS_IF([test "x$enable_libfuzzer" = "xyes"],[
701 AC_DEFINE([ENABLE_LIBFUZZER],[1],[Enable special libFuzzer binary])
702 # We have to disable the linker script for libFuzzer because Clang
703 # adds loads of fuzzer and ASAN-related symbols that are required
704 # by the plugins but which our linker script tries to hide.
705 use_linker_script_for_server=no
707 AM_CONDITIONAL([ENABLE_LIBFUZZER],[test "x$enable_libfuzzer" = "xyes"])
709 dnl Should we use the linker script with the server? Note
710 dnl some tests above may set this variable.
711 AC_ARG_ENABLE([linker-script],
712 [AS_HELP_STRING([--disable-linker-script],
713 [disable linker script for server (developers only)])],
714 [use_linker_script_for_server=$enableval],
716 AM_CONDITIONAL([USE_LINKER_SCRIPT_FOR_SERVER],
717 [test "x$use_linker_script_for_server" = "xyes"])
720 PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], [
722 AC_MSG_CHECKING([for bash-completions directory])
723 m4_ifdef([PKG_CHECK_VAR],[
724 PKG_CHECK_VAR(bashcompdir, [bash-completion], [completionsdir])
726 AS_IF([test -z "$bashcompdir"], [
727 bashcompdir="${sysconfdir}/bash_completion.d"
729 AC_MSG_RESULT([$bashcompdir])
730 AC_SUBST([bashcompdir])
733 AC_MSG_WARN([bash-completion not installed])
735 AM_CONDITIONAL([HAVE_BASH_COMPLETION],[test "x$bash_completion" = "xyes"])
737 dnl Check we have enough to run podwrapper.
738 AC_CHECK_PROG([PERL],[perl],[perl],[no])
739 AS_IF([test "x$PERL" != "xno"],[
740 AC_MSG_CHECKING([if we have perl Pod::Man and Pod::Simple])
741 AS_IF([$PERL -MPod::Man -MPod::Simple -e 1 >&AS_MESSAGE_LOG_FD 2>&1],[
746 AC_MSG_RESULT([$enable_pod])
748 AM_CONDITIONAL([HAVE_POD],
749 [test "x$PERL" != "xno" && test "x$enable_pod" = "xyes"])
751 dnl Define the path to the podwrapper program.
752 PODWRAPPER="$PERL $(pwd)/podwrapper.pl"
753 AC_SUBST([PODWRAPPER])
755 dnl Allow all plugins and filters to be disabled.
756 AC_ARG_ENABLE([plugins],
757 [AS_HELP_STRING([--disable-plugins],
758 [disable all bundled plugins and filters])])
759 AM_CONDITIONAL([HAVE_PLUGINS], [test "x$enable_plugins" != "xno"])
761 dnl Check for Perl, for embedding in the perl plugin.
762 dnl Note that the perl binary is checked above.
763 AC_ARG_ENABLE([perl],
764 [AS_HELP_STRING([--disable-perl], [disable Perl embed plugin])],
767 AS_IF([test "x$PERL" != "xno" && test "x$enable_perl" != "xno"],[
768 dnl Check for Perl archlib.
769 AC_MSG_CHECKING([for Perl embed archlib])
770 PERL_ARCHLIB="$($PERL -MConfig -e 'print $Config{archlib}')"
771 AS_IF([ test -n "$PERL_ARCHLIB" ],[
772 AC_MSG_RESULT([$PERL_ARCHLIB])
774 AC_MSG_NOTICE([Perl embed module disabled])
778 dnl Check for Perl CFLAGS.
779 AC_MSG_CHECKING([for Perl embed CFLAGS])
780 PERL_CFLAGS="$($PERL -MExtUtils::Embed -e 'ccflags')"
781 AS_IF([ test -n "$PERL_CFLAGS" ],[
782 AC_MSG_RESULT([$PERL_CFLAGS])
784 AC_MSG_NOTICE([Perl embed module disabled])
788 dnl Check for Perl LDOPTS.
789 AC_MSG_CHECKING([for Perl embed LDOPTS])
790 PERL_LDOPTS="$($PERL -MExtUtils::Embed -e 'ldopts')"
791 AC_MSG_RESULT([$PERL_LDOPTS])
793 dnl XXX Could check these actually work.
795 AM_CONDITIONAL([HAVE_PERL],[test "x$enable_perl" != "xno" && test "x$PERL" != "xno"])
796 AC_SUBST([PERL_ARCHLIB])
797 AC_SUBST([PERL_CFLAGS])
798 AC_SUBST([PERL_LDOPTS])
800 dnl Check for Python 3, for embedding in the python plugin.
801 AC_PATH_PROGS([PYTHON],[python3 python],[no])
802 AC_ARG_ENABLE([python],
803 [AS_HELP_STRING([--disable-python], [disable Python embed plugin])],
806 AS_IF([test "x$PYTHON" != "xno" && test "x$enable_python" != "xno"],[
807 AC_MSG_CHECKING([version of $PYTHON])
808 PYTHON_VERSION_MAJOR=`$PYTHON -c "import sys; print (sys.version_info@<:@0@:>@)"`
809 PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"`
810 PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR"
811 AS_IF([test -n "$PYTHON_VERSION"],[
812 AC_MSG_RESULT([$PYTHON_VERSION])
814 AC_MSG_NOTICE([Python embed module disabled])
818 AC_MSG_CHECKING([Python major version is 3])
819 AS_IF([test "x$PYTHON_VERSION_MAJOR" = "x3"],[
823 AC_MSG_ERROR([Python $PYTHON_VERSION_MAJOR <> 3 is no longer supported.
825 Python 2 end of life is 2020-01-01 and nbdkit >= 1.16 no longer
828 If you want to use Python 2, you will need to use nbdkit 1.14.])
831 dnl Check for Python CFLAGS, libraries.
832 dnl For Python >= 3.8 we have to use python-<VERSION>-embed.pc, see:
833 dnl https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build
834 dnl The python.pc is called python-<VERSION>.pc on Debian and
835 dnl later versions of Fedora, and python.pc on older versions
837 PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"-embed], [
838 AC_SUBST([PYTHON_CFLAGS])
839 AC_SUBST([PYTHON_LIBS])
840 AC_SUBST([PYTHON_VERSION])
841 AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
843 PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"], [
844 AC_SUBST([PYTHON_CFLAGS])
845 AC_SUBST([PYTHON_LIBS])
846 AC_SUBST([PYTHON_VERSION])
847 AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
849 PKG_CHECK_MODULES([PYTHON], [python], [
850 AC_SUBST([PYTHON_CFLAGS])
851 AC_SUBST([PYTHON_LIBS])
852 AC_SUBST([PYTHON_VERSION])
853 AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
855 AC_MSG_WARN([python $PYTHON_VERSION not found])
859 AM_CONDITIONAL([HAVE_PYTHON],[test "x$enable_python" != "xno" && test "x$PYTHON" != "xno"])
860 AC_SUBST([PYTHON_CFLAGS])
861 AC_SUBST([PYTHON_LIBS])
862 AC_SUBST([PYTHON_LDFLAGS])
864 dnl For the OCaml plugin, you can set OCAMLOPTFLAGS before running
865 dnl ./configure to specify any extra flags you want to pass to
866 dnl ocamlopt. For example to enable OCaml warnings:
867 dnl OCAMLOPTFLAGS="-warn-error +A-3"
868 AC_SUBST([OCAMLOPTFLAGS])
870 dnl Check for OCaml, for embedding in the ocaml plugin.
872 AC_ARG_ENABLE([ocaml],
873 [AS_HELP_STRING([--disable-ocaml], [disable OCaml embed plugin])],
876 AS_IF([test "x$OCAMLOPT" != "xno" && test "x$enable_ocaml" != "xno"],[
877 dnl Check OCaml can create a shared library (see README for details).
878 AC_MSG_CHECKING([if $OCAMLOPT can create a shared library])
879 echo 'print_endline "test"' > conftest.ml
880 AS_IF([$OCAMLOPT $OCAMLOPTFLAGS -output-obj -runtime-variant _pic -o conftest.so conftest.ml >&AS_MESSAGE_LOG_FD 2>&1],[
882 ocaml_link_shared=yes
886 rm -f conftest.ml conftest.cmi conftest.cmx conftest.so conftest.o
888 AM_CONDITIONAL([HAVE_OCAML],[test "x$OCAMLOPT" != "xno" &&
889 test "x$ocaml_link_shared" = "xyes"])
890 AM_CONDITIONAL([HAVE_OCAMLDOC],[test "x$OCAMLDOC" != "xno"])
892 dnl Check if OCaml has caml_alloc_initialized_string (added 2017).
893 AS_IF([test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && \
894 test "x$enable_ocaml" = "xyes"],[
895 AC_MSG_CHECKING([for caml_alloc_initialized_string])
896 cat >conftest.c <<'EOF'
897 #include <caml/alloc.h>
898 int main () { char *p = (void *) caml_alloc_initialized_string; return 0; }
900 AS_IF([$OCAMLC conftest.c >&AS_MESSAGE_LOG_FD 2>&1],[
902 AC_DEFINE([HAVE_CAML_ALLOC_INITIALIZED_STRING],[1],
903 [caml_alloc_initialized_string found at compile time.])
907 rm -f conftest.c conftest.o
910 dnl Check if OCaml has caml_shutdown (added 2014).
911 AS_IF([test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && \
912 test "x$enable_ocaml" = "xyes"],[
913 AC_MSG_CHECKING([for caml_shutdown])
914 cat >conftest.c <<'EOF'
915 #include <caml/callback.h>
916 int main () { char *p = (void *) caml_shutdown; return 0; }
918 AS_IF([$OCAMLC conftest.c >&AS_MESSAGE_LOG_FD 2>&1],[
920 AC_DEFINE([HAVE_CAML_SHUTDOWN],[1],
921 [caml_shutdown found at compile time.])
925 rm -f conftest.c conftest.o
928 dnl For developing plugins in Rust, optional.
929 AC_CHECK_PROG([CARGO],[cargo],[cargo],[no])
930 AC_ARG_ENABLE([rust],
931 [AS_HELP_STRING([--disable-rust], [disable Rust plugin])],
934 AM_CONDITIONAL([HAVE_RUST],
935 [test "x$CARGO" != "xno" && test "x$enable_rust" != "xno"])
937 dnl Check for Ruby, for embedding in the Ruby plugin.
938 AC_CHECK_PROG([RUBY],[ruby],[ruby],[no])
939 AC_ARG_ENABLE([ruby],
940 [AS_HELP_STRING([--disable-ruby], [disable Ruby plugin])],
943 AS_IF([test "x$RUBY" != "xno" && test "x$enable_ruby" != "xno"],[
944 PKG_CHECK_MODULES([RUBY], [ruby], [
945 AC_SUBST([RUBY_CFLAGS])
946 AC_SUBST([RUBY_LIBS])
948 AC_MSG_WARN([ruby not found])
952 AM_CONDITIONAL([HAVE_RUBY],[test "x$RUBY" != "xno" &&
953 test "x$enable_ruby" = "xyes"])
955 dnl Check for Tcl, for embedding in the Tcl plugin.
957 [AS_HELP_STRING([--disable-tcl], [disable Tcl plugin])],
960 AS_IF([test "x$enable_tcl" != "xno"],[
961 PKG_CHECK_MODULES([TCL], [tcl], [
962 AC_SUBST([TCL_CFLAGS])
965 AC_MSG_WARN([Tcl not found])
969 AM_CONDITIONAL([HAVE_TCL],[test "x$enable_tcl" = "xyes"])
971 dnl Check for Lua, for embedding in the Lua plugin.
973 [AS_HELP_STRING([--disable-lua], [disable Lua plugin])],
976 AS_IF([test "x$enable_lua" != "xno"],[
977 PKG_CHECK_MODULES([LUA], [lua], [
978 AC_SUBST([LUA_CFLAGS])
981 dnl Lua 5.1 used by RHEL 7 does not have lua_isinteger.
983 LIBS="$LUA_LIBS $LIBS"
984 AC_CHECK_FUNCS([lua_isinteger])
987 AC_MSG_WARN([Lua not found])
991 AM_CONDITIONAL([HAVE_LUA],[test "x$enable_lua" = "xyes"])
993 dnl Check for golang.
994 AC_ARG_ENABLE([golang],
995 AS_HELP_STRING([--disable-golang], [disable Go language plugin]),
998 AS_IF([test "x$enable_golang" != "xno"],[
999 AC_CHECK_PROG([GOLANG],[go],[go],[no])
1000 AS_IF([test "x$GOLANG" != "xno"],[
1001 AC_MSG_CHECKING([if $GOLANG is usable])
1002 AS_IF([$GOLANG run $srcdir/plugins/golang/config-test.go 2>&AS_MESSAGE_LOG_FD && \
1003 $GOLANG help modules 2>&AS_MESSAGE_LOG_FD 1>&2],[
1004 AC_MSG_RESULT([yes])
1006 # Substitute some golang environment.
1007 GOOS=`$GOLANG env GOOS`
1008 GOARCH=`$GOLANG env GOARCH`
1009 GOROOT=`$GOLANG env GOROOT`
1015 AC_MSG_WARN([golang ($GOLANG) is installed but not usable])
1020 AM_CONDITIONAL([HAVE_GOLANG],[test "x$GOLANG" != "xno"])
1022 dnl Check for curl (only if you want to compile the curl plugin).
1024 [AS_HELP_STRING([--without-curl],
1025 [disable curl plugin @<:@default=check@:>@])],
1028 AS_IF([test "$with_curl" != "no"],[
1029 PKG_CHECK_MODULES([CURL], [libcurl],[
1030 AC_SUBST([CURL_CFLAGS])
1031 AC_SUBST([CURL_LIBS])
1032 AC_DEFINE([HAVE_CURL],[1],[curl found at compile time.])
1033 AC_CHECK_DECL([CURLOPT_UNIX_SOCKET_PATH], [
1034 AC_DEFINE([HAVE_CURLOPT_UNIX_SOCKET_PATH],[1],
1035 [CURLOPT_UNIX_SOCKET_PATH found at compile time.])
1036 ], [], [#include <curl/curl.h>])
1038 [AC_MSG_WARN([curl not found, curl plugin will be disabled])])
1040 AM_CONDITIONAL([HAVE_CURL],[test "x$CURL_LIBS" != "x"])
1042 dnl Check for libssh (only if you want to compile the ssh plugin).
1044 [AS_HELP_STRING([--without-ssh],
1045 [disable ssh plugin @<:@default=check@:>@])],
1048 AS_IF([test "$with_ssh" != "no"],[
1049 PKG_CHECK_MODULES([SSH], [libssh >= 0.8.0],[
1050 # Ubuntu 18.04 shipped prerelease of libssh-0.8.0 without
1051 # SSH_OPTIONS_NODELAY
1052 old_CFLAGS="$CFLAGS"
1053 CFLAGS="$CFLAGS $SSH_CFLAGS"
1054 AC_CHECK_DECL([SSH_OPTIONS_NODELAY], [
1055 AC_SUBST([SSH_CFLAGS])
1056 AC_SUBST([SSH_LIBS])
1057 # We don't need this in the code, just in this configure
1058 HAVE_SSH_OPTIONS_NODELAY=1
1060 #include <libssh/libssh.h>
1062 CFLAGS="$old_CFLAGS"
1064 [AC_MSG_WARN([libssh not found, ssh plugin will be disabled])])
1066 AM_CONDITIONAL([HAVE_SSH],[test "x$HAVE_SSH_OPTIONS_NODELAY" != "x"])
1068 dnl Check for xorriso or genisoimage or mkisofs
1069 dnl (only if you want to compile the iso plugin).
1073 [AS_HELP_STRING([--without-iso],
1074 [disable iso plugin @<:@default=check@:>@])],
1077 AS_IF([test "$with_iso" != "no"],[
1078 AC_CHECK_PROG([XORRISO],[xorriso],[xorriso],[no])
1079 AC_CHECK_PROG([GENISOIMAGE],[genisoimage],[genisoimage],[no])
1080 AC_CHECK_PROG([MKISOFS],[mkisofs],[mkisofs],[no])
1081 AS_IF([test "x$XORRISO" != "xno"],[
1085 AS_IF([test "x$GENISOIMAGE" != "xno"],[
1086 ISOPROG="$GENISOIMAGE"
1088 AS_IF([test "x$MKISOFS" != "xno"],[
1093 AS_IF([test "x$ISOPROG" != "xno"],[
1094 AC_MSG_RESULT([Picked $ISOPROG for nbdkit-iso-plugin])
1095 AC_DEFINE_UNQUOTED([ISOPROG],["$ISOPROG"],
1096 [Program used by iso plugin to make ISOs.])
1097 AS_IF([test "x$is_xorriso" = "x1"], [
1098 AC_DEFINE([ISOPROG_IS_XORRISO],[1],
1099 [ISO program behaves like xorriso.])
1104 AM_CONDITIONAL([HAVE_ISO],[test "x$ISOPROG" != "xno"])
1106 dnl Check for libvirt (only if you want to compile the libvirt plugin).
1107 AC_ARG_WITH([libvirt],
1108 [AS_HELP_STRING([--without-libvirt],
1109 [disable libvirt plugin @<:@default=check@:>@])],
1111 [with_libvirt=check])
1112 AS_IF([test "$with_libvirt" != "no"],[
1113 PKG_CHECK_MODULES([LIBVIRT], [libvirt],[
1114 AC_SUBST([LIBVIRT_CFLAGS])
1115 AC_SUBST([LIBVIRT_LIBS])
1116 AC_DEFINE([HAVE_LIBVIRT],[1],[libvirt found at compile time.])
1118 [AC_MSG_WARN([libvirt not found, libvirt plugin will be disabled])])
1120 AM_CONDITIONAL([HAVE_LIBVIRT],[test "x$LIBVIRT_LIBS" != "x"])
1122 dnl Check for zlib (only if you want to compile the gzip filter).
1124 [AS_HELP_STRING([--without-zlib],
1125 [disable gzip filter @<:@default=check@:>@])],
1128 AS_IF([test "$with_zlib" != "no"],[
1129 PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.3.5],[
1130 AC_SUBST([ZLIB_CFLAGS])
1131 AC_SUBST([ZLIB_LIBS])
1132 AC_DEFINE([HAVE_ZLIB],[1],[zlib found at compile time.])
1134 [AC_MSG_WARN([zlib >= 1.2.3.5 not found, gzip filter will be disabled])])
1136 AM_CONDITIONAL([HAVE_ZLIB],[test "x$ZLIB_LIBS" != "x"])
1138 dnl Check for libnbd (only if you want to compile the nbd plugin).
1139 AC_ARG_WITH([libnbd],
1140 [AS_HELP_STRING([--without-libnbd],
1141 [disable nbd plugin @<:@default=check@:>@])],
1143 [with_libnbd=check])
1144 AS_IF([test "$with_libnbd" != "no"],[
1145 PKG_CHECK_MODULES([LIBNBD], [libnbd >= 0.9.8],[
1146 AC_SUBST([LIBNBD_CFLAGS])
1147 AC_SUBST([LIBNBD_LIBS])
1148 AC_DEFINE([HAVE_LIBNBD],[1],[libnbd found at compile time.])
1150 [AC_MSG_WARN([libnbd >= 0.9.8 not found, nbd plugin will be crippled])])
1153 dnl For backwards compatibilty, we have a second way to disable the nbd plugin.
1154 AC_ARG_ENABLE([nbd-plugin],
1155 [AS_HELP_STRING([--disable-nbd-plugin], [disable nbd plugin (deprecated, use --without-libnbd)])],
1157 [enable_nbd_plugin=yes])
1158 AM_CONDITIONAL([HAVE_LIBNBD],
1159 [test "x$LIBNBD_LIBS" != "x" && test "x$enable_nbd_plugin" = "xyes"])
1161 dnl Check for liblzma (only if you want to compile the xz filter).
1162 AC_ARG_WITH([liblzma],
1163 [AS_HELP_STRING([--without-liblzma],
1164 [disable xz filter @<:@default=check@:>@])],
1166 [with_liblzma=check])
1167 AS_IF([test "$with_liblzma" != "no"],[
1168 PKG_CHECK_MODULES([LIBLZMA], [liblzma],[
1169 AC_SUBST([LIBLZMA_CFLAGS])
1170 AC_SUBST([LIBLZMA_LIBS])
1171 AC_DEFINE([HAVE_LIBLZMA],[1],[liblzma found at compile time.])
1173 [AC_MSG_WARN([liblzma not found, xz filter will be disabled])])
1175 AM_CONDITIONAL([HAVE_LIBLZMA],[test "x$LIBLZMA_LIBS" != "x"])
1177 dnl Check for zstd (only if you want to compile allocator=zstd).
1178 AC_ARG_WITH([libzstd],
1179 [AS_HELP_STRING([--without-libzstd],
1180 [disable allocator=zstd @<:@default=check@:>@])],
1182 [with_libzstd=check])
1183 AS_IF([test "$with_libzstd" != "no"],[
1184 PKG_CHECK_MODULES([LIBZSTD], [libzstd],[
1185 AC_SUBST([LIBZSTD_CFLAGS])
1186 AC_SUBST([LIBZSTD_LIBS])
1187 AC_DEFINE([HAVE_LIBZSTD],[1],[libzstd found at compile time.])
1189 [AC_MSG_WARN([libzstd not found, allocator=zstd will be disabled])])
1191 AM_CONDITIONAL([HAVE_LIBZSTD],[test "x$LIBZSTD_LIBS" != "x"])
1193 dnl Check for libguestfs (only for the guestfs plugin and parts of
1194 dnl the test suite).
1195 AC_ARG_WITH([libguestfs],
1196 [AS_HELP_STRING([--without-libguestfs],
1197 [disable guestfs plugin and tests @<:@default=check@:>@])],
1199 [with_libguestfs=check])
1200 AS_IF([test "$with_libguestfs" != "no"],[
1201 PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs],[
1202 # Although the library was found, we want to make sure it supports nbd
1203 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1204 #include <guestfs.h>
1206 #ifndef GUESTFS_ADD_DRIVE_OPTS_PROTOCOL
1210 AC_SUBST([LIBGUESTFS_CFLAGS])
1211 AC_SUBST([LIBGUESTFS_LIBS])
1212 AC_DEFINE([HAVE_LIBGUESTFS],[1],[libguestfs found at compile time.])
1215 AC_MSG_WARN([libguestfs too old, guestfs plugin and tests will be disabled])])
1217 [AC_MSG_WARN([libguestfs not found, guestfs plugin and tests will be disabled])])
1219 AM_CONDITIONAL([HAVE_LIBGUESTFS],[test "x$LIBGUESTFS_LIBS" != "x"])
1221 dnl Disable tests which need libguestfs.
1222 AC_ARG_ENABLE([libguestfs-tests],
1223 [AS_HELP_STRING([--disable-libguestfs-tests],
1224 [disable tests which need libguestfs])],
1226 [enable_libguestfs_tests=check]
1228 AM_CONDITIONAL([USE_LIBGUESTFS_FOR_TESTS],
1229 [test "x$LIBGUESTFS_LIBS" != "x" && \
1230 test "x$enable_libguestfs_tests" != "xno"])
1232 dnl Check for ext2fs and com_err, for the ext2 filter.
1234 [AS_HELP_STRING([--without-ext2],
1235 [disable ext2 filter @<:@default=check@:>@])],
1238 AS_IF([test "$with_ext2" != "no"], [
1239 PKG_CHECK_MODULES([EXT2FS], [ext2fs], [
1240 AC_SUBST([EXT2FS_CFLAGS])
1241 AC_SUBST([EXT2FS_LIBS])
1242 AC_DEFINE([HAVE_EXT2FS],[1],[ext2fs found at compile time.])
1244 [AC_MSG_WARN([ext2fs not found, ext2 filter will be disabled])])
1245 PKG_CHECK_MODULES([COM_ERR], [com_err], [
1246 AC_SUBST([COM_ERR_CFLAGS])
1247 AC_SUBST([COM_ERR_LIBS])
1248 AC_DEFINE([HAVE_COM_ERR],[1],[com_err found at compile time.])
1250 [AC_MSG_WARN([com_err not found, ext2 filter will be disabled])])
1252 AC_CHECK_MEMBERS([struct struct_io_manager.cache_readahead,
1253 struct struct_io_manager.zeroout])
1255 AM_CONDITIONAL([HAVE_EXT2],
1256 [test "x$EXT2FS_LIBS" != "x" && test "x$COM_ERR_LIBS" != "x"])
1258 dnl libtorrent-rasterbar for the bittorrent plugin.
1259 AC_ARG_ENABLE([torrent],
1260 [AS_HELP_STRING([--disable-torrent],
1261 [disable bittorrent plugin])],
1263 [enable_torrent=check]
1265 AS_IF([test "x$enable_torrent" != "xno"], [
1266 PKG_CHECK_MODULES([LIBTORRENT], [libtorrent-rasterbar], [
1267 AC_SUBST([LIBTORRENT_CFLAGS])
1268 AC_SUBST([LIBTORRENT_LIBS])
1270 [AC_MSG_WARN([libtorrent-rasterbar not found, bittorrent plugin will be disabled])])
1272 AM_CONDITIONAL([HAVE_TORRENT],
1273 [test "x$have_cxx" = "xyes" && test "x$LIBTORRENT_LIBS" != "x"])
1275 dnl Check if the user wants to disable VDDK support.
1276 dnl See plugins/vddk/README.VDDK.
1277 AC_ARG_ENABLE([vddk],
1278 [AS_HELP_STRING([--disable-vddk],
1279 [disable VMware VDDK plugin])],
1282 dnl While VDDK was available on i686 in 5.1.1, we only support
1283 dnl newer versions which are supported only on x86-64. Don't
1284 dnl compile on other platforms.
1285 AC_MSG_CHECKING([if the host CPU is compatible with VDDK])
1286 AS_IF([test "$host_cpu" = "x86_64"],[
1287 AC_MSG_RESULT([yes ($host_cpu)])
1290 AC_MSG_RESULT([no ($host_cpu)])
1294 AM_CONDITIONAL([HAVE_VDDK], [test "x$enable_vddk" = "xyes"])
1296 dnl Expose version information to the public headers
1297 [NBDKIT_]VERSION_MAJOR=NBDKIT_VERSION_MAJOR
1298 [NBDKIT_]VERSION_MINOR=NBDKIT_VERSION_MINOR
1299 [NBDKIT_]VERSION_MICRO=NBDKIT_VERSION_MICRO
1300 AC_SUBST([NBDKIT_VERSION_MAJOR])
1301 AC_SUBST([NBDKIT_VERSION_MINOR])
1302 AC_SUBST([NBDKIT_VERSION_MICRO])
1304 dnl Produce output files.
1305 AC_CONFIG_HEADERS([config.h])
1306 AC_CONFIG_FILES([podwrapper.pl],
1307 [chmod +x,-w podwrapper.pl])
1308 AC_CONFIG_FILES([scripts/vddk-esxi-open.sh],
1309 [chmod +x,-w scripts/vddk-esxi-open.sh])
1310 AC_CONFIG_FILES([scripts/vddk-vcenter-open.sh],
1311 [chmod +x,-w scripts/vddk-vcenter-open.sh])
1312 AC_CONFIG_FILES([common/protocol/generate-protostrings.sh],
1313 [chmod +x,-w common/protocol/generate-protostrings.sh])
1314 AC_CONFIG_FILES([Makefile
1315 bash-completion/Makefile
1316 common/allocators/Makefile
1317 common/bitmap/Makefile
1319 common/include/Makefile
1320 common/protocol/Makefile
1321 common/regions/Makefile
1322 common/replacements/Makefile
1323 common/replacements/win32/Makefile
1324 common/utils/Makefile
1327 include/nbdkit-version.h
1330 plugins/cdi/Makefile
1331 plugins/curl/Makefile
1332 plugins/data/Makefile
1333 plugins/eval/Makefile
1334 plugins/example1/Makefile
1335 plugins/example2/Makefile
1336 plugins/example3/Makefile
1337 plugins/example4/Makefile
1338 plugins/file/Makefile
1339 plugins/floppy/Makefile
1340 plugins/full/Makefile
1341 plugins/golang/Makefile
1342 plugins/guestfs/Makefile
1343 plugins/info/Makefile
1344 plugins/iso/Makefile
1345 plugins/libvirt/Makefile
1346 plugins/linuxdisk/Makefile
1347 plugins/lua/Makefile
1348 plugins/memory/Makefile
1349 plugins/nbd/Makefile
1350 plugins/null/Makefile
1351 plugins/ocaml/Makefile
1352 plugins/ondemand/Makefile
1353 plugins/partitioning/Makefile
1354 plugins/pattern/Makefile
1355 plugins/perl/Makefile
1356 plugins/python/Makefile
1357 plugins/random/Makefile
1358 plugins/ruby/Makefile
1359 plugins/rust/Makefile
1362 plugins/ssh/Makefile
1363 plugins/sparse-random/Makefile
1364 plugins/split/Makefile
1365 plugins/tcl/Makefile
1366 plugins/tmpdisk/Makefile
1367 plugins/torrent/Makefile
1368 plugins/vddk/Makefile
1369 plugins/zero/Makefile
1371 filters/blocksize/Makefile
1372 filters/blocksize-policy/Makefile
1373 filters/cache/Makefile
1374 filters/cacheextents/Makefile
1375 filters/checkwrite/Makefile
1376 filters/cow/Makefile
1377 filters/ddrescue/Makefile
1378 filters/delay/Makefile
1379 filters/error/Makefile
1380 filters/exitlast/Makefile
1381 filters/exitwhen/Makefile
1382 filters/exportname/Makefile
1383 filters/ext2/Makefile
1384 filters/extentlist/Makefile
1385 filters/fua/Makefile
1386 filters/gzip/Makefile
1388 filters/limit/Makefile
1389 filters/log/Makefile
1390 filters/luks/Makefile
1391 filters/multi-conn/Makefile
1392 filters/nocache/Makefile
1393 filters/noextents/Makefile
1394 filters/nofilter/Makefile
1395 filters/noparallel/Makefile
1396 filters/nozero/Makefile
1397 filters/offset/Makefile
1398 filters/partition/Makefile
1399 filters/pause/Makefile
1400 filters/protect/Makefile
1401 filters/rate/Makefile
1402 filters/readahead/Makefile
1403 filters/retry/Makefile
1404 filters/retry-request/Makefile
1405 filters/scan/Makefile
1406 filters/stats/Makefile
1407 filters/swab/Makefile
1408 filters/tar/Makefile
1409 filters/tls-fallback/Makefile
1410 filters/truncate/Makefile
1413 server/local/nbdkit.pc
1425 echo "----------------------------------------------------------------------"
1426 echo "Thank you for downloading $PACKAGE_STRING"
1428 echo "This is how we have configured the optional components for you today:"
1435 if "$@"; then echo "yes"; else echo "no"; fi
1438 echo "Optional server features:"
1440 feature "bash-completion ........................ " \
1441 test "x$HAVE_BASH_COMPLETION_TRUE" = "x"
1442 feature "libfuzzer .............................. " \
1443 test "x$ENABLE_LIBFUZZER_TRUE" = "x"
1444 feature "linker script .......................... " \
1445 test "x$USE_LINKER_SCRIPT_FOR_SERVER_TRUE" = "x"
1446 feature "manual pages ........................... " \
1447 test "x$HAVE_POD_TRUE" = "x"
1448 feature "SELinux ................................ " \
1449 test "x$LIBSELINUX_LIBS" != "x"
1450 feature "TLS .................................... " \
1451 test "x$GNUTLS_LIBS" != "x"
1454 echo "Optional plugins:"
1456 feature "curl ................................... " \
1457 test "x$HAVE_CURL_TRUE" = "x"
1458 feature "example4 ............................... " \
1459 test "x$HAVE_PERL_TRUE" = "x"
1460 feature "floppy ................................. " \
1461 test "x$HAVE_ICONV_TRUE" = "x"
1462 feature "guestfs ................................ " \
1463 test "x$HAVE_LIBGUESTFS_TRUE" = "x"
1464 feature "iso .................................... " \
1465 test "x$HAVE_ISO_TRUE" = "x"
1466 feature "libvirt ................................ " \
1467 test "x$HAVE_LIBVIRT_TRUE" = "x"
1468 feature "linuxdisk .............................. " \
1469 test "x$HAVE_MKE2FS_WITH_D_TRUE" = "x"
1470 feature "nbd .................................... " \
1471 test "x$HAVE_LIBNBD_TRUE" = "x"
1472 feature "S3 ..................................... " \
1473 test "x$HAVE_PYTHON_TRUE" = "x"
1474 feature "ssh .................................... " \
1475 test "x$HAVE_SSH_TRUE" = "x"
1476 feature "torrent ................................ " \
1477 test "x$HAVE_TORRENT_TRUE" = "x"
1478 feature "vddk ................................... " \
1479 test "x$HAVE_VDDK_TRUE" = "x"
1484 feature "go ..................................... " \
1485 test "x$HAVE_GOLANG_TRUE" = "x"
1486 feature "lua .................................... " \
1487 test "x$HAVE_LUA_TRUE" = "x"
1488 feature "ocaml .................................. " \
1489 test "x$HAVE_OCAML_TRUE" = "x"
1490 feature "perl ................................... " \
1491 test "x$HAVE_PERL_TRUE" = "x"
1492 feature "python ................................. " \
1493 test "x$HAVE_PYTHON_TRUE" = "x"
1494 feature "ruby ................................... " \
1495 test "x$HAVE_RUBY_TRUE" = "x"
1496 feature "rust ................................... " \
1497 test "x$HAVE_RUST_TRUE" = "x"
1498 feature "tcl .................................... " \
1499 test "x$HAVE_TCL_TRUE" = "x"
1502 echo "Optional filters:"
1504 feature "ext2 ................................... " \
1505 test "x$HAVE_EXT2_TRUE" = "x"
1506 feature "gzip ................................... " \
1507 test "x$HAVE_ZLIB_TRUE" = "x"
1508 feature "luks ................................... " \
1509 test "x$HAVE_GNUTLS_PBKDF2_TRUE" = "x"
1510 feature "stats .................................. " \
1511 test "x$HAVE_CXX_TRUE" = "x"
1512 feature "xz ..................................... " \
1513 test "x$HAVE_LIBLZMA_TRUE" = "x"
1516 echo "Other optional features:"
1518 feature "allocator=zstd ......................... " \
1519 test "x$HAVE_LIBZSTD_TRUE" = "x"
1520 feature "tests using libguestfs ................. " \
1521 test "x$HAVE_LIBGUESTFS_TRUE" = "x" -a \
1522 "x$USE_LIBGUESTFS_FOR_TESTS_TRUE" = "x"
1525 echo "If any optional component is configured ‘no’ when you expected ‘yes’"
1526 echo "then you should check the preceding messages and README."
1528 echo "Please report bugs back to the mailing list:"
1529 echo "http://www.redhat.com/mailman/listinfo/libguestfs"
1531 echo "Next you should type 'make' to build the package,"
1532 echo "then 'make check' to run the tests."