[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC v2 3/3] tools/configure: Detect out-of-tree blktap2 and use by default if available
Set the {CFLAGS,LDLIBS,SHLIBS}_libblktapctl conditionally so that if someone is building blkttap out-of-tree but not installing it in the build environment, they can specify the path thus: CFLAGS="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ LDFLAGS="-L$INST_DIR/$PREFIX/lib -Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ ./configure --prefix=$PREFIX --with-system-qemu=/usr/bin/qemu-system-i386 CFLAGS_libblktapctl="-I$INST_DIR/$PREFIX/include/blktap -I$INST_DIR/$PREFIX/include/vhd" \ LDLIBS_libblktapctl="-L$INST_DIR/$PREFIX/lib -lblktapctl" \ SHLIB_libblktapctl="-Wl,-rpath-link=$INST_DIR/$PREFIX/lib" \ make Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> --- NOTES: 1. blktap doesn't have any proper versioning, so these checks may need to be made more complete to make sure we have a compatible version of the library. 2. The blktap header files at the moment are borked wrt paths. "make install" will separate them into /usr/include/blktap and /usr/include/vhd; but in the header files themselves they include one another by using #include "filename.h". This means that using them after install doesn't work unless you add -I/usr/include/blktap and -I/usr/include/vhd. Rules.mk at the moment handles this by including both paths in CFLAGS_libblktapctl; but for configure to correctly detect it, at the moment it means passing an extra CFLAGS, like this: CFLAGS="-I/usr/include/blktap -I/usr/include/vhd" ./configure I'll try to sort out #2 before getting this committed. This patch modifies tools/configure.ac; autogen.sh should be re-run. CC: Ian Campbell <ian.campbell@xxxxxxxxxx> CC: Ian Jackson <ian.jackson@xxxxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> CC: Dave Scott <Dave.Scott@xxxxxxxxxxxxx> CC: Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx> CC: Wen Congyang <wency@xxxxxxxxxxxxxx> CC: Yang Hongyang <yanghy@xxxxxxxxxxxxxx> --- tools/Rules.mk | 10 +- tools/config.h.in | 7 +- tools/configure | 2013 ++++++++++++++++++++++++++++------------------------ tools/configure.ac | 32 +- 4 files changed, 1123 insertions(+), 939 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 3c29d07..f3687d8 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -14,7 +14,6 @@ XEN_LIBXC = $(XEN_ROOT)/tools/libxc XEN_XENLIGHT = $(XEN_ROOT)/tools/libxl XEN_XENSTORE = $(XEN_ROOT)/tools/xenstore XEN_LIBXENSTAT = $(XEN_ROOT)/tools/xenstat/libxenstat/src -XEN_BLKTAP2 = $(XEN_ROOT)/tools/blktap2 XEN_LIBVCHAN = $(XEN_ROOT)/tools/libvchan CFLAGS_xeninclude = -I$(XEN_INCLUDE) @@ -63,10 +62,13 @@ endif LIBXL_BLKTAP ?= $(CONFIG_BLKTAP2) +# If you build blktap out-of-tree but don't install it in your +# buildroot, set these environment variables to let the build system +# know where to find the headers and libraries. ifeq ($(LIBXL_BLKTAP),y) -CFLAGS_libblktapctl = -I$(XEN_BLKTAP2)/control -I$(XEN_BLKTAP2)/include $(CFLAGS_xeninclude) -LDLIBS_libblktapctl = -L$(XEN_BLKTAP2)/control -lblktapctl -SHLIB_libblktapctl = -Wl,-rpath-link=$(XEN_BLKTAP2)/control +CFLAGS_libblktapctl ?= -I$(INCLUDEDIR)/blktap -I$(INCLUDEDIR)/vhd $(CFLAGS_xeninclude) +LDLIBS_libblktapctl ?= -lblktapctl +SHLIB_libblktapctl ?= -Wl,-rpath-link=$(LIBDIR) else CFLAGS_libblktapctl = LDLIBS_libblktapctl = diff --git a/tools/config.h.in b/tools/config.h.in index 251f6c1..9b3764f 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -1,10 +1,13 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Blktap2 enabled */ +#undef HAVE_BLKTAP2 + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `aio' library (-laio). */ -#undef HAVE_LIBAIO +/* Define to 1 if you have the `blktapctl' library (-lblktapctl). */ +#undef HAVE_LIBBLKTAPCTL /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO diff --git a/tools/configure b/tools/configure index cc8caf6..e67ec8e 100755 --- a/tools/configure +++ b/tools/configure @@ -639,7 +639,6 @@ PTHREAD_LDFLAGS PTHREAD_CFLAGS libgcrypt EXTFS_LIBS -system_aio zlib FETCHER FTP @@ -653,9 +652,6 @@ PKG_CONFIG_PATH PKG_CONFIG CURSES_LIBS PY_NOOPT_CFLAGS -EGREP -GREP -CPP pyconfig PYTHONPATH CHECKPOLICY @@ -702,6 +698,9 @@ qemu_xen rombios qemu_traditional blktap2 +EGREP +GREP +CPP LINUX_BACKEND_MODULES debug seabios @@ -814,6 +813,7 @@ CFLAGS LDFLAGS LIBS CPPFLAGS +CPP PREPEND_INCLUDES PREPEND_LIB APPEND_INCLUDES @@ -830,7 +830,6 @@ AS86 LD86 BCC IASL -CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR @@ -1527,6 +1526,7 @@ Some influential environment variables: LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> + CPP C preprocessor PREPEND_INCLUDES List of include folders to prepend to CFLAGS (without -I) PREPEND_LIB List of library folders to prepend to LDFLAGS (without -L) @@ -1545,7 +1545,6 @@ Some influential environment variables: LD86 Path to ld86 tool BCC Path to bcc tool IASL Path to iasl tool - CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path @@ -4038,110 +4037,723 @@ fi LINUX_BACKEND_MODULES="`eval echo $LINUX_BACKEND_MODULES`" -# Check whether --enable-blktap2 was given. -if test "${enable_blktap2+set}" = set; then : - enableval=$enable_blktap2; -else - - enable_blktap2="no" -fi - -if test "x$enable_blktap2" = "xyes"; then : - - as_fn_error $? "blktap2 support temporarily unavailable" "$LINENO" 5 +# Check for blktap2 +blktap2_present="yes" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= fi - - - -# Check whether --enable-qemu-traditional was given. -if test "${enable_qemu_traditional+set}" = set; then : - enableval=$enable_qemu_traditional; +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : - case "$host_cpu" in - i[3456]86|x86_64) - enable_qemu_traditional="yes";; - *) enable_qemu_traditional="no";; - esac - case "$host_os" in - freebsd*) - enable_qemu_traditional="no";; - esac - - +else + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -if test "x$enable_qemu_traditional" = "xyes"; then : - - -$as_echo "#define HAVE_QEMU_TRADITIONAL 1" >>confdefs.h - - qemu_traditional=y + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext - qemu_traditional=n - +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break fi + done + ac_cv_prog_CPP=$CPP -# Check whether --enable-rombios was given. -if test "${enable_rombios+set}" = set; then : - enableval=$enable_rombios; +fi + CPP=$ac_cv_prog_CPP else - - if test "x$enable_qemu_traditional" = "xyes"; then : - - enable_rombios="yes" + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : else - - enable_rombios="no" - + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext -if test "x$enable_rombios" = "xyes"; then : - - -$as_echo "#define HAVE_ROMBIOS 1" >>confdefs.h +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : - rombios=y else - - rombios=n - + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Check whether --with-system-qemu was given. -if test "${with_system_qemu+set}" = set; then : - withval=$with_system_qemu; - case $withval in - yes) qemu_xen=n ; qemu_xen_path=qemu ;; - no) qemu_xen=y ; qemu_xen_path= ;; - *) qemu_xen=n ; qemu_xen_path=$withval ;; - esac - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac - case "$host_cpu" in - i[3456]86|x86_64) - qemu_xen=y;; - arm*|aarch64) - qemu_xen=y;; - *) qemu_xen=n;; - esac - + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP fi -if test "x$qemu_xen" = "xn"; then : - - -cat >>confdefs.h <<_ACEOF -#define QEMU_XEN_PATH "$qemu_xen_path" -_ACEOF +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_header_mongrel "$LINENO" "blktap/tap-ctl.h" "ac_cv_header_blktap_tap_ctl_h" "$ac_includes_default" +if test "x$ac_cv_header_blktap_tap_ctl_h" = xyes; then : + +else + blktap2_present="no" +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tap_ctl_list in -lblktapctl" >&5 +$as_echo_n "checking for tap_ctl_list in -lblktapctl... " >&6; } +if ${ac_cv_lib_blktapctl_tap_ctl_list+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblktapctl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tap_ctl_list (); +int +main () +{ +return tap_ctl_list (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_blktapctl_tap_ctl_list=yes +else + ac_cv_lib_blktapctl_tap_ctl_list=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blktapctl_tap_ctl_list" >&5 +$as_echo "$ac_cv_lib_blktapctl_tap_ctl_list" >&6; } +if test "x$ac_cv_lib_blktapctl_tap_ctl_list" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBBLKTAPCTL 1 +_ACEOF + + LIBS="-lblktapctl $LIBS" + +else + blktap2_present="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tap_ctl_find_minor in -lblktapctl" >&5 +$as_echo_n "checking for tap_ctl_find_minor in -lblktapctl... " >&6; } +if ${ac_cv_lib_blktapctl_tap_ctl_find_minor+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblktapctl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tap_ctl_find_minor (); +int +main () +{ +return tap_ctl_find_minor (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_blktapctl_tap_ctl_find_minor=yes +else + ac_cv_lib_blktapctl_tap_ctl_find_minor=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blktapctl_tap_ctl_find_minor" >&5 +$as_echo "$ac_cv_lib_blktapctl_tap_ctl_find_minor" >&6; } +if test "x$ac_cv_lib_blktapctl_tap_ctl_find_minor" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBBLKTAPCTL 1 +_ACEOF + + LIBS="-lblktapctl $LIBS" + +else + blktap2_present="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tap_ctl_create in -lblktapctl" >&5 +$as_echo_n "checking for tap_ctl_create in -lblktapctl... " >&6; } +if ${ac_cv_lib_blktapctl_tap_ctl_create+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblktapctl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tap_ctl_create (); +int +main () +{ +return tap_ctl_create (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_blktapctl_tap_ctl_create=yes +else + ac_cv_lib_blktapctl_tap_ctl_create=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blktapctl_tap_ctl_create" >&5 +$as_echo "$ac_cv_lib_blktapctl_tap_ctl_create" >&6; } +if test "x$ac_cv_lib_blktapctl_tap_ctl_create" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBBLKTAPCTL 1 +_ACEOF + + LIBS="-lblktapctl $LIBS" + +else + blktap2_present="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tap_ctl_destroy in -lblktapctl" >&5 +$as_echo_n "checking for tap_ctl_destroy in -lblktapctl... " >&6; } +if ${ac_cv_lib_blktapctl_tap_ctl_destroy+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblktapctl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char tap_ctl_destroy (); +int +main () +{ +return tap_ctl_destroy (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_blktapctl_tap_ctl_destroy=yes +else + ac_cv_lib_blktapctl_tap_ctl_destroy=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blktapctl_tap_ctl_destroy" >&5 +$as_echo "$ac_cv_lib_blktapctl_tap_ctl_destroy" >&6; } +if test "x$ac_cv_lib_blktapctl_tap_ctl_destroy" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBBLKTAPCTL 1 +_ACEOF + + LIBS="-lblktapctl $LIBS" + +else + blktap2_present="no" +fi + + +# Check whether --enable-blktap2 was given. +if test "${enable_blktap2+set}" = set; then : + enableval=$enable_blktap2; if test "$enable_blktap2" = "yes"; then : + if test "$blktap2_present" = "no"; then : + as_fn_error $? "blktap2 enabled, but cannot find blktap2" "$LINENO" 5 +fi +fi +else + + case "$blktap2_present" in + yes) + enable_blktap2="yes";; + no) + enable_blktap2="no";; + esac + +fi + +if test "x$enable_blktap2" = "xyes"; then : + + +$as_echo "#define HAVE_BLKTAP2 1" >>confdefs.h + + blktap2=y +else + + blktap2=n + +fi + + + +# Check whether --enable-qemu-traditional was given. +if test "${enable_qemu_traditional+set}" = set; then : + enableval=$enable_qemu_traditional; +else + + case "$host_cpu" in + i[3456]86|x86_64) + enable_qemu_traditional="yes";; + *) enable_qemu_traditional="no";; + esac + case "$host_os" in + freebsd*) + enable_qemu_traditional="no";; + esac + + +fi + +if test "x$enable_qemu_traditional" = "xyes"; then : + + +$as_echo "#define HAVE_QEMU_TRADITIONAL 1" >>confdefs.h + + qemu_traditional=y +else + + qemu_traditional=n + +fi + + +# Check whether --enable-rombios was given. +if test "${enable_rombios+set}" = set; then : + enableval=$enable_rombios; +else + + if test "x$enable_qemu_traditional" = "xyes"; then : + + enable_rombios="yes" + +else + + enable_rombios="no" + +fi + +fi + +if test "x$enable_rombios" = "xyes"; then : + + +$as_echo "#define HAVE_ROMBIOS 1" >>confdefs.h + + rombios=y +else + + rombios=n + +fi + + + +# Check whether --with-system-qemu was given. +if test "${with_system_qemu+set}" = set; then : + withval=$with_system_qemu; + case $withval in + yes) qemu_xen=n ; qemu_xen_path=qemu ;; + no) qemu_xen=y ; qemu_xen_path= ;; + *) qemu_xen=n ; qemu_xen_path=$withval ;; + esac + +else + + case "$host_cpu" in + i[3456]86|x86_64) + qemu_xen=y;; + arm*|aarch64) + qemu_xen=y;; + *) qemu_xen=n;; + esac + +fi + +if test "x$qemu_xen" = "xn"; then : + + +cat >>confdefs.h <<_ACEOF +#define QEMU_XEN_PATH "$qemu_xen_path" +_ACEOF fi @@ -5860,209 +6472,20 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - - -fi -if test -z "$ac_cv_prog_OCAMLDOC"; then - ac_ct_OCAMLDOC=$OCAMLDOC - # Extract the first word of "ocamldoc", so it can be a program name with args. -set dummy ocamldoc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLDOC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OCAMLDOC"; then - ac_cv_prog_ac_ct_OCAMLDOC="$ac_ct_OCAMLDOC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OCAMLDOC=$ac_cv_prog_ac_ct_OCAMLDOC -if test -n "$ac_ct_OCAMLDOC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOC" >&5 -$as_echo "$ac_ct_OCAMLDOC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OCAMLDOC" = x; then - OCAMLDOC="no" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OCAMLDOC=$ac_ct_OCAMLDOC - fi -else - OCAMLDOC="$ac_cv_prog_OCAMLDOC" -fi - - - # checking for ocamlbuild - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ocamlbuild", so it can be a program name with args. -set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLBUILD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLBUILD"; then - ac_cv_prog_OCAMLBUILD="$OCAMLBUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OCAMLBUILD=$ac_cv_prog_OCAMLBUILD -if test -n "$OCAMLBUILD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLBUILD" >&5 -$as_echo "$OCAMLBUILD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OCAMLBUILD"; then - ac_ct_OCAMLBUILD=$OCAMLBUILD - # Extract the first word of "ocamlbuild", so it can be a program name with args. -set dummy ocamlbuild; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLBUILD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OCAMLBUILD"; then - ac_cv_prog_ac_ct_OCAMLBUILD="$ac_ct_OCAMLBUILD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_OCAMLBUILD=$ac_cv_prog_ac_ct_OCAMLBUILD -if test -n "$ac_ct_OCAMLBUILD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLBUILD" >&5 -$as_echo "$ac_ct_OCAMLBUILD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OCAMLBUILD" = x; then - OCAMLBUILD="no" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OCAMLBUILD=$ac_ct_OCAMLBUILD - fi -else - OCAMLBUILD="$ac_cv_prog_OCAMLBUILD" -fi - - - - # checking for ocamlfind - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a program name with args. -set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLFIND+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLFIND"; then - ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OCAMLFIND=$ac_cv_prog_OCAMLFIND -if test -n "$OCAMLFIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5 -$as_echo "$OCAMLFIND" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OCAMLFIND"; then - ac_ct_OCAMLFIND=$OCAMLFIND - # Extract the first word of "ocamlfind", so it can be a program name with args. -set dummy ocamlfind; ac_word=$2 + + +fi +if test -z "$ac_cv_prog_OCAMLDOC"; then + ac_ct_OCAMLDOC=$OCAMLDOC + # Extract the first word of "ocamldoc", so it can be a program name with args. +set dummy ocamldoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OCAMLFIND+:} false; then : +if ${ac_cv_prog_ac_ct_OCAMLDOC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OCAMLFIND"; then - ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the test. + if test -n "$ac_ct_OCAMLDOC"; then + ac_cv_prog_ac_ct_OCAMLDOC="$ac_ct_OCAMLDOC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6071,7 +6494,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind" + ac_cv_prog_ac_ct_OCAMLDOC="ocamldoc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6081,17 +6504,17 @@ IFS=$as_save_IFS fi fi -ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND -if test -n "$ac_ct_OCAMLFIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLFIND" >&5 -$as_echo "$ac_ct_OCAMLFIND" >&6; } +ac_ct_OCAMLDOC=$ac_cv_prog_ac_ct_OCAMLDOC +if test -n "$ac_ct_OCAMLDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLDOC" >&5 +$as_echo "$ac_ct_OCAMLDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_OCAMLFIND" = x; then - OCAMLFIND="no" + if test "x$ac_ct_OCAMLDOC" = x; then + OCAMLDOC="no" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6099,26 +6522,24 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - OCAMLFIND=$ac_ct_OCAMLFIND + OCAMLDOC=$ac_ct_OCAMLDOC fi else - OCAMLFIND="$ac_cv_prog_OCAMLFIND" + OCAMLDOC="$ac_cv_prog_OCAMLDOC" fi - - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + # checking for ocamlbuild + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ocamlbuild", so it can be a program name with args. +set dummy ${ac_tool_prefix}ocamlbuild; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : +if ${ac_cv_prog_OCAMLBUILD+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. + if test -n "$OCAMLBUILD"; then + ac_cv_prog_OCAMLBUILD="$OCAMLBUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6127,7 +6548,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" + ac_cv_prog_OCAMLBUILD="${ac_tool_prefix}ocamlbuild" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6137,159 +6558,83 @@ IFS=$as_save_IFS fi fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } +OCAMLBUILD=$ac_cv_prog_OCAMLBUILD +if test -n "$OCAMLBUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLBUILD" >&5 +$as_echo "$OCAMLBUILD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$AWK" && break -done - -if test "x$ocamltools" = "xy"; then : - - if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then : - - if test "x$enable_ocamltools" = "xyes"; then : - - as_fn_error $? "Ocaml tools enabled, but unable to find Ocaml" "$LINENO" 5 fi - ocamltools="n" - +if test -z "$ac_cv_prog_OCAMLBUILD"; then + ac_ct_OCAMLBUILD=$OCAMLBUILD + # Extract the first word of "ocamlbuild", so it can be a program name with args. +set dummy ocamlbuild; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OCAMLBUILD+:} false; then : + $as_echo_n "(cached) " >&6 else - - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "$OCAMLVERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "3.09.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` - - - - if test "$ax_compare_version" = "true" ; then - - if test "x$enable_ocamltools" = "xyes"; then : - - as_fn_error $? "Your version of OCaml: $OCAMLVERSION is not supported" "$LINENO" 5 -fi - ocamltools="n" - - fi - - -fi - -fi - - - - - - - - - - -if test "x$XENSTORE" = "x"; then : - - -# Check whether --with-xenstored was given. -if test "${with_xenstored+set}" = set; then : - withval=$with_xenstored; - if test "x$withval" = "xxenstored"; then : - - xenstore=$withval - xenstored=$sbindir/xenstored - -fi - if test "x$withval" = "xoxenstored"; then : - - xenstore=$withval - xenstored=$sbindir/oxenstored - - if test "$ocamltools" = "n"; then : - - as_fn_error $? "Missing ocaml dependencies for oxenstored, try installing ocaml ocaml-compiler-libs ocaml-runtime ocaml-findlib" "$LINENO" 5 - -fi - - -fi - if test "x$withval" != "xoxenstored" && test "x$withval" != "xxenstored"; then : - - as_fn_error $? "Unsupported xenstored specified, supported types: oxenstored xenstored" "$LINENO" 5 - -fi - + if test -n "$ac_ct_OCAMLBUILD"; then + ac_cv_prog_ac_ct_OCAMLBUILD="$ac_ct_OCAMLBUILD" # Let the user override the test. else - - - xenstore="oxenstored" - xenstored=$sbindir/oxenstored - if test "$ocamltools" = "n"; then : - - xenstore="xenstored" - xenstored=$sbindir/xenstored +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OCAMLBUILD="ocamlbuild" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS fi - - fi - - +ac_ct_OCAMLBUILD=$ac_cv_prog_ac_ct_OCAMLBUILD +if test -n "$ac_ct_OCAMLBUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLBUILD" >&5 +$as_echo "$ac_ct_OCAMLBUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - - XENSTORE=$xenstore - - if test "x$XENSTORED" = "x"; then : - - XENSTORED=$xenstored - + if test "x$ac_ct_OCAMLBUILD" = x; then + OCAMLBUILD="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OCAMLBUILD=$ac_ct_OCAMLBUILD + fi +else + OCAMLBUILD="$ac_cv_prog_OCAMLBUILD" fi -if test "x$xsmpolicy" = "xy"; then : - - # check for a checkpolicy binary with support for -t xen + # checking for ocamlfind if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}checkpolicy", so it can be a program name with args. -set dummy ${ac_tool_prefix}checkpolicy; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a program name with args. +set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CHECKPOLICY+:} false; then : +if ${ac_cv_prog_OCAMLFIND+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CHECKPOLICY"; then - ac_cv_prog_CHECKPOLICY="$CHECKPOLICY" # Let the user override the test. + if test -n "$OCAMLFIND"; then + ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6298,7 +6643,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CHECKPOLICY="${ac_tool_prefix}checkpolicy" + ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6308,10 +6653,10 @@ IFS=$as_save_IFS fi fi -CHECKPOLICY=$ac_cv_prog_CHECKPOLICY -if test -n "$CHECKPOLICY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECKPOLICY" >&5 -$as_echo "$CHECKPOLICY" >&6; } +OCAMLFIND=$ac_cv_prog_OCAMLFIND +if test -n "$OCAMLFIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5 +$as_echo "$OCAMLFIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -6319,17 +6664,17 @@ fi fi -if test -z "$ac_cv_prog_CHECKPOLICY"; then - ac_ct_CHECKPOLICY=$CHECKPOLICY - # Extract the first word of "checkpolicy", so it can be a program name with args. -set dummy checkpolicy; ac_word=$2 +if test -z "$ac_cv_prog_OCAMLFIND"; then + ac_ct_OCAMLFIND=$OCAMLFIND + # Extract the first word of "ocamlfind", so it can be a program name with args. +set dummy ocamlfind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CHECKPOLICY+:} false; then : +if ${ac_cv_prog_ac_ct_OCAMLFIND+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CHECKPOLICY"; then - ac_cv_prog_ac_ct_CHECKPOLICY="$ac_ct_CHECKPOLICY" # Let the user override the test. + if test -n "$ac_ct_OCAMLFIND"; then + ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6338,7 +6683,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CHECKPOLICY="checkpolicy" + ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6348,17 +6693,17 @@ IFS=$as_save_IFS fi fi -ac_ct_CHECKPOLICY=$ac_cv_prog_ac_ct_CHECKPOLICY -if test -n "$ac_ct_CHECKPOLICY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CHECKPOLICY" >&5 -$as_echo "$ac_ct_CHECKPOLICY" >&6; } +ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND +if test -n "$ac_ct_OCAMLFIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLFIND" >&5 +$as_echo "$ac_ct_OCAMLFIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_CHECKPOLICY" = x; then - CHECKPOLICY="no" + if test "x$ac_ct_OCAMLFIND" = x; then + OCAMLFIND="no" else case $cross_compiling:$ac_tool_warned in yes:) @@ -6366,51 +6711,35 @@ yes:) $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - CHECKPOLICY=$ac_ct_CHECKPOLICY + OCAMLFIND=$ac_ct_OCAMLFIND fi else - CHECKPOLICY="$ac_cv_prog_CHECKPOLICY" + OCAMLFIND="$ac_cv_prog_OCAMLFIND" fi - if test "$CHECKPOLICY" != "no"; then - CHECKPOLICYHELP=`$CHECKPOLICY -h | grep xen` - if test "$CHECKPOLICYHELP" = ""; then - CHECKPOLICY=no - fi - fi - - if test "x$CHECKPOLICY" = "xno"; then : - - if test "x$enable_xsmpolicy" = "xyes"; then : - - as_fn_error $? "XSM policy compilation enabled, but unable to find checkpolicy" "$LINENO" 5 -fi - xsmpolicy="n" -fi -fi -# Extract the first word of "bash", so it can be a program name with args. -set dummy bash; ac_word=$2 +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BASH+:} false; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else - case $BASH in - [\\/]* | ?:[\\/]*) - ac_cv_path_BASH="$BASH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6418,490 +6747,376 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_path_BASH" && ac_cv_path_BASH="no" - ;; -esac fi -BASH=$ac_cv_path_BASH -if test -n "$BASH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 -$as_echo "$BASH" >&6; } +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -if test x"${BASH}" = x"no" -then - as_fn_error $? "Unable to find bash, please install bash" "$LINENO" 5 -fi -if echo "$PYTHON" | grep -q "^/"; then : + test -n "$AWK" && break +done - PYTHONPATH=$PYTHON - PYTHON=`basename $PYTHONPATH` +if test "x$ocamltools" = "xy"; then : -elif test -z "$PYTHON"; then : - PYTHON="python" -else - as_fn_error $? "PYTHON specified, but is not an absolute path" "$LINENO" 5 -fi -# Extract the first word of "$PYTHON", so it can be a program name with args. -set dummy $PYTHON; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PYTHONPATH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PYTHONPATH in - [\\/]* | ?:[\\/]*) - ac_cv_path_PYTHONPATH="$PYTHONPATH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PYTHONPATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then : - test -z "$ac_cv_path_PYTHONPATH" && ac_cv_path_PYTHONPATH="no" - ;; -esac + if test "x$enable_ocamltools" = "xyes"; then : + + as_fn_error $? "Ocaml tools enabled, but unable to find Ocaml" "$LINENO" 5 fi -PYTHONPATH=$ac_cv_path_PYTHONPATH -if test -n "$PYTHONPATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONPATH" >&5 -$as_echo "$PYTHONPATH" >&6; } + ocamltools="n" + else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -if test x"${PYTHONPATH}" = x"no" -then - as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5 + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "$OCAMLVERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "3.09.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + if test "x$enable_ocamltools" = "xyes"; then : + + as_fn_error $? "Your version of OCaml: $OCAMLVERSION is not supported" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.3 " >&5 -$as_echo_n "checking for python version >= 2.3 ... " >&6; } -`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 3)"))'` -if test "$?" != "0" -then - python_version=`$PYTHON -V 2>&1` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "$python_version is too old, minimum required version is 2.3" "$LINENO" 5 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + ocamltools="n" + + fi + + fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue + + + + + + + + + +if test "x$XENSTORE" = "x"; then : + + +# Check whether --with-xenstored was given. +if test "${with_xenstored+set}" = set; then : + withval=$with_xenstored; + if test "x$withval" = "xxenstored"; then : + + xenstore=$withval + xenstored=$sbindir/xenstored + fi -rm -f conftest.err conftest.i conftest.$ac_ext + if test "x$withval" = "xoxenstored"; then : + + xenstore=$withval + xenstored=$sbindir/oxenstored + + if test "$ocamltools" = "n"; then : + + as_fn_error $? "Missing ocaml dependencies for oxenstored, try installing ocaml ocaml-compiler-libs ocaml-runtime ocaml-findlib" "$LINENO" 5 - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break + fi + if test "x$withval" != "xoxenstored" && test "x$withval" != "xxenstored"; then : - done - ac_cv_prog_CPP=$CPP + as_fn_error $? "Unsupported xenstored specified, supported types: oxenstored xenstored" "$LINENO" 5 fi - CPP=$ac_cv_prog_CPP + else - ac_cv_prog_CPP=$CPP + + + xenstore="oxenstored" + xenstored=$sbindir/oxenstored + if test "$ocamltools" = "n"; then : + + xenstore="xenstored" + xenstored=$sbindir/xenstored + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue + fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break + fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + XENSTORE=$xenstore + + if test "x$XENSTORED" = "x"; then : + + XENSTORED=$xenstored + fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : +if test "x$xsmpolicy" = "xy"; then : + + # check for a checkpolicy binary with support for -t xen + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}checkpolicy", so it can be a program name with args. +set dummy ${ac_tool_prefix}checkpolicy; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CHECKPOLICY+:} false; then : $as_echo_n "(cached) " >&6 else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + if test -n "$CHECKPOLICY"; then + ac_cv_prog_CHECKPOLICY="$CHECKPOLICY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CHECKPOLICY="${ac_tool_prefix}checkpolicy" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" +fi +CHECKPOLICY=$ac_cv_prog_CHECKPOLICY +if test -n "$CHECKPOLICY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECKPOLICY" >&5 +$as_echo "$CHECKPOLICY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : +fi +if test -z "$ac_cv_prog_CHECKPOLICY"; then + ac_ct_CHECKPOLICY=$CHECKPOLICY + # Extract the first word of "checkpolicy", so it can be a program name with args. +set dummy checkpolicy; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CHECKPOLICY+:} false; then : $as_echo_n "(cached) " >&6 else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + if test -n "$ac_ct_CHECKPOLICY"; then + ac_cv_prog_ac_ct_CHECKPOLICY="$ac_ct_CHECKPOLICY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CHECKPOLICY="checkpolicy" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + +fi +fi +ac_ct_CHECKPOLICY=$ac_cv_prog_ac_ct_CHECKPOLICY +if test -n "$ac_ct_CHECKPOLICY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CHECKPOLICY" >&5 +$as_echo "$ac_ct_CHECKPOLICY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CHECKPOLICY" = x; then + CHECKPOLICY="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CHECKPOLICY=$ac_ct_CHECKPOLICY fi else - ac_cv_path_EGREP=$EGREP + CHECKPOLICY="$ac_cv_prog_CHECKPOLICY" fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" + if test "$CHECKPOLICY" != "no"; then + CHECKPOLICYHELP=`$CHECKPOLICY -h | grep xen` + if test "$CHECKPOLICYHELP" = ""; then + CHECKPOLICY=no + fi + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> + if test "x$CHECKPOLICY" = "xno"; then : -int -main () -{ + if test "x$enable_xsmpolicy" = "xyes"; then : - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no + as_fn_error $? "XSM policy compilation enabled, but unable to find checkpolicy" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : + xsmpolicy="n" -else - ac_cv_header_stdc=no fi -rm -f conftest* fi +# Extract the first word of "bash", so it can be a program name with args. +set dummy bash; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_BASH+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $BASH in + [\\/]* | ?:[\\/]*) + ac_cv_path_BASH="$BASH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + test -z "$ac_cv_path_BASH" && ac_cv_path_BASH="no" + ;; +esac +fi +BASH=$ac_cv_path_BASH +if test -n "$BASH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5 +$as_echo "$BASH" >&6; } else - ac_cv_header_stdc=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest* -fi -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif +if test x"${BASH}" = x"no" +then + as_fn_error $? "Unable to find bash, please install bash" "$LINENO" 5 +fi +if echo "$PYTHON" | grep -q "^/"; then : -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : + PYTHONPATH=$PYTHON + PYTHON=`basename $PYTHONPATH` +elif test -z "$PYTHON"; then : + PYTHON="python" else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + as_fn_error $? "PYTHON specified, but is not an absolute path" "$LINENO" 5 fi +# Extract the first word of "$PYTHON", so it can be a program name with args. +set dummy $PYTHON; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PYTHONPATH+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PYTHONPATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHONPATH="$PYTHONPATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHONPATH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + test -z "$ac_cv_path_PYTHONPATH" && ac_cv_path_PYTHONPATH="no" + ;; +esac fi +PYTHONPATH=$ac_cv_path_PYTHONPATH +if test -n "$PYTHONPATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONPATH" >&5 +$as_echo "$PYTHONPATH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +if test x"${PYTHONPATH}" = x"no" +then + as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5 fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.3 " >&5 +$as_echo_n "checking for python version >= 2.3 ... " >&6; } +`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 3)"))'` +if test "$?" != "0" +then + python_version=`$PYTHON -V 2>&1` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "$python_version is too old, minimum required version is 2.3" "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi -done - - if test "$cross_compiling" != yes; then : @@ -8042,58 +8257,6 @@ fi -if test "x$enable_blktap2" = "xyes"]; then : - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for io_setup in -laio" >&5 -$as_echo_n "checking for io_setup in -laio... " >&6; } -if ${ac_cv_lib_aio_io_setup+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-laio $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char io_setup (); -int -main () -{ -return io_setup (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_aio_io_setup=yes -else - ac_cv_lib_aio_io_setup=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aio_io_setup" >&5 -$as_echo "$ac_cv_lib_aio_io_setup" >&6; } -if test "x$ac_cv_lib_aio_io_setup" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBAIO 1 -_ACEOF - - LIBS="-laio $LIBS" - -else - as_fn_error $? "Could not find libaio" "$LINENO" 5 -fi - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5 in -lcrypto" >&5 $as_echo_n "checking for MD5 in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_MD5+:} false; then : diff --git a/tools/configure.ac b/tools/configure.ac index ae2946f..ecf1508 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -114,13 +114,33 @@ esac]) LINUX_BACKEND_MODULES="`eval echo $LINUX_BACKEND_MODULES`" AC_SUBST(LINUX_BACKEND_MODULES) -dnl Enable blktap2 on Linux only. +# Check for blktap2 +blktap2_present="yes" +AC_CHECK_HEADER([tap-ctl.h],,[blktap2_present="no"]) +AC_CHECK_LIB([blktapctl], [tap_ctl_list],,[blktap2_present="no"]) +AC_CHECK_LIB([blktapctl], [tap_ctl_find_minor],,[blktap2_present="no"]) +AC_CHECK_LIB([blktapctl], [tap_ctl_create],,[blktap2_present="no"]) +AC_CHECK_LIB([blktapctl], [tap_ctl_destroy],,[blktap2_present="no"]) + AC_ARG_ENABLE([blktap2], AS_HELP_STRING([--enable-blktap2], - [Enable blktap2, (DEFAULT is on for Linux, otherwise off)]),,[ - enable_blktap2="no"]) + [Enable blktap2, (DEFAULT is on for Linux, otherwise off)]), + [AS_IF([test "$enable_blktap2" = "yes"], + [AS_IF([test "$blktap2_present" = "no"], + [AC_MSG_ERROR([blktap2 enabled, but cannot find blktap2])])])], + [ + case "$blktap2_present" in + yes) + enable_blktap2="yes";; + no) + enable_blktap2="no";; + esac + ]) AS_IF([test "x$enable_blktap2" = "xyes"], [ - AC_MSG_ERROR([blktap2 support temporarily unavailable])]) +AC_DEFINE([HAVE_BLKTAP2], [1], [Blktap2 enabled]) + blktap2=y],[ + blktap2=n +]) AC_SUBST(blktap2) @@ -327,10 +347,6 @@ AC_CHECK_HEADER([lzo/lzo1x.h], [ AC_CHECK_LIB([lzo2], [lzo1x_decompress], [zlib="$zlib -DHAVE_LZO1X -llzo2"]) ]) AC_SUBST(zlib) -AS_IF(test "x$enable_blktap2" = "xyes"], [ -AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])]) -]) -AC_SUBST(system_aio) AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])]) AX_CHECK_EXTFS AC_CHECK_LIB([gcrypt], [gcry_md_hash_buffer], [libgcrypt="y"], [libgcrypt="n"]) -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |