build: don't use "test cond1 -a cond2" in configure: it's not portable
* configure.ac: Use "test cond1 && test cond2" instead.
This commit is contained in:
parent
ca7db6cb80
commit
7998714d60
26
configure.ac
26
configure.ac
@ -197,10 +197,10 @@ dnl if --prefix is /usr, don't use /usr/var for localstatedir
|
|||||||
dnl or /usr/etc for sysconfdir
|
dnl or /usr/etc for sysconfdir
|
||||||
dnl as this makes a lot of things break in testing situations
|
dnl as this makes a lot of things break in testing situations
|
||||||
|
|
||||||
if test "$prefix" = "/usr" -a "$localstatedir" = '${prefix}/var' ; then
|
if test "$prefix" = "/usr" && test "$localstatedir" = '${prefix}/var' ; then
|
||||||
localstatedir='/var'
|
localstatedir='/var'
|
||||||
fi
|
fi
|
||||||
if test "$prefix" = "/usr" -a "$sysconfdir" = '${prefix}/etc' ; then
|
if test "$prefix" = "/usr" && test "$sysconfdir" = '${prefix}/etc' ; then
|
||||||
sysconfdir='/etc'
|
sysconfdir='/etc'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ AC_ARG_WITH([libvirtd],
|
|||||||
dnl
|
dnl
|
||||||
dnl specific tests to setup DV devel environments with debug etc ...
|
dnl specific tests to setup DV devel environments with debug etc ...
|
||||||
dnl
|
dnl
|
||||||
if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/libvirt" ]] ; then
|
if [[ "${LOGNAME}" = "veillard" && test "`pwd`" = "/u/veillard/libvirt" ]] ; then
|
||||||
STATIC_BINARIES="-static"
|
STATIC_BINARIES="-static"
|
||||||
else
|
else
|
||||||
STATIC_BINARIES=
|
STATIC_BINARIES=
|
||||||
@ -351,7 +351,7 @@ LIBXENSERVER_LIBS=""
|
|||||||
LIBXENSERVER_CFLAGS=""
|
LIBXENSERVER_CFLAGS=""
|
||||||
dnl search for the XenServer library
|
dnl search for the XenServer library
|
||||||
if test "$with_xenapi" != "no" ; then
|
if test "$with_xenapi" != "no" ; then
|
||||||
if test "$with_xenapi" != "yes" -a "$with_xenapi" != "check" ; then
|
if test "$with_xenapi" != "yes" && test "$with_xenapi" != "check" ; then
|
||||||
LIBXENSERVER_CFLAGS="-I$with_xenapi/include"
|
LIBXENSERVER_CFLAGS="-I$with_xenapi/include"
|
||||||
LIBXENSERVER_LIBS="-L$with_xenapi"
|
LIBXENSERVER_LIBS="-L$with_xenapi"
|
||||||
fi
|
fi
|
||||||
@ -390,7 +390,7 @@ XEN_LIBS=""
|
|||||||
XEN_CFLAGS=""
|
XEN_CFLAGS=""
|
||||||
dnl search for the Xen store library
|
dnl search for the Xen store library
|
||||||
if test "$with_xen" != "no" ; then
|
if test "$with_xen" != "no" ; then
|
||||||
if test "$with_xen" != "yes" -a "$with_xen" != "check" ; then
|
if test "$with_xen" != "yes" && test "$with_xen" != "check" ; then
|
||||||
XEN_CFLAGS="-I$with_xen/include"
|
XEN_CFLAGS="-I$with_xen/include"
|
||||||
XEN_LIBS="-L$with_xen/lib64 -L$with_xen/lib"
|
XEN_LIBS="-L$with_xen/lib64 -L$with_xen/lib"
|
||||||
fi
|
fi
|
||||||
@ -571,7 +571,7 @@ AC_ARG_WITH([libxml], AC_HELP_STRING([--with-libxml=@<:@PFX@:>@], [libxml2 locat
|
|||||||
if test "x$with_libxml" = "xno" ; then
|
if test "x$with_libxml" = "xno" ; then
|
||||||
AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_REQUIRED)
|
AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_REQUIRED)
|
||||||
AC_MSG_ERROR([libxml2 >= $LIBXML_REQUIRED is required for libvirt])
|
AC_MSG_ERROR([libxml2 >= $LIBXML_REQUIRED is required for libvirt])
|
||||||
elif test "x$with_libxml" = "x" -a "x$PKG_CONFIG" != "x" ; then
|
elif test "x$with_libxml" = "x" && test "x$PKG_CONFIG" != "x" ; then
|
||||||
PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED, [LIBXML_FOUND=yes], [LIBXML_FOUND=no])
|
PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED, [LIBXML_FOUND=yes], [LIBXML_FOUND=no])
|
||||||
fi
|
fi
|
||||||
if test "$LIBXML_FOUND" = "no" ; then
|
if test "$LIBXML_FOUND" = "no" ; then
|
||||||
@ -661,7 +661,7 @@ AC_ARG_WITH([sasl],
|
|||||||
SASL_CFLAGS=
|
SASL_CFLAGS=
|
||||||
SASL_LIBS=
|
SASL_LIBS=
|
||||||
if test "x$with_sasl" != "xno"; then
|
if test "x$with_sasl" != "xno"; then
|
||||||
if test "x$with_sasl" != "xyes" -a "x$with_sasl" != "xcheck"; then
|
if test "x$with_sasl" != "xyes" && test "x$with_sasl" != "xcheck"; then
|
||||||
SASL_CFLAGS="-I$with_sasl"
|
SASL_CFLAGS="-I$with_sasl"
|
||||||
SASL_LIBS="-L$with_sasl"
|
SASL_LIBS="-L$with_sasl"
|
||||||
fi
|
fi
|
||||||
@ -716,7 +716,7 @@ AC_ARG_WITH([yajl],
|
|||||||
YAJL_CFLAGS=
|
YAJL_CFLAGS=
|
||||||
YAJL_LIBS=
|
YAJL_LIBS=
|
||||||
if test "x$with_yajl" != "xno"; then
|
if test "x$with_yajl" != "xno"; then
|
||||||
if test "x$with_yajl" != "xyes" -a "x$with_yajl" != "xcheck"; then
|
if test "x$with_yajl" != "xyes" && test "x$with_yajl" != "xcheck"; then
|
||||||
YAJL_CFLAGS="-I$with_yajl/include"
|
YAJL_CFLAGS="-I$with_yajl/include"
|
||||||
YAJL_LIBS="-L$with_yajl/lib"
|
YAJL_LIBS="-L$with_yajl/lib"
|
||||||
fi
|
fi
|
||||||
@ -1004,7 +1004,7 @@ AC_ARG_WITH([numactl],
|
|||||||
|
|
||||||
NUMACTL_CFLAGS=
|
NUMACTL_CFLAGS=
|
||||||
NUMACTL_LIBS=
|
NUMACTL_LIBS=
|
||||||
if test "$with_qemu" = "yes" -a "$with_numactl" != "no"; then
|
if test "$with_qemu" = "yes" && test "$with_numactl" != "no"; then
|
||||||
old_cflags="$CFLAGS"
|
old_cflags="$CFLAGS"
|
||||||
old_libs="$LIBS"
|
old_libs="$LIBS"
|
||||||
if test "$with_numactl" = "check"; then
|
if test "$with_numactl" = "check"; then
|
||||||
@ -1062,7 +1062,7 @@ dnl
|
|||||||
dnl libssh checks
|
dnl libssh checks
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
if test "$with_libssh2" != "yes" -a "$with_libssh2" != "no"; then
|
if test "$with_libssh2" != "yes" && test "$with_libssh2" != "no"; then
|
||||||
libssh2_path="$with_libssh2"
|
libssh2_path="$with_libssh2"
|
||||||
elif test "$with_libssh2" = "yes"; then
|
elif test "$with_libssh2" = "yes"; then
|
||||||
libssh2_path="/usr/local/lib/"
|
libssh2_path="/usr/local/lib/"
|
||||||
@ -1143,7 +1143,7 @@ dnl introduced in 0.4.0 release which need as minimum
|
|||||||
dnl
|
dnl
|
||||||
CAPNG_CFLAGS=
|
CAPNG_CFLAGS=
|
||||||
CAPNG_LIBS=
|
CAPNG_LIBS=
|
||||||
if test "$with_qemu" = "yes" -a "$with_capng" != "no"; then
|
if test "$with_qemu" = "yes" && test "$with_capng" != "no"; then
|
||||||
old_cflags="$CFLAGS"
|
old_cflags="$CFLAGS"
|
||||||
old_libs="$LIBS"
|
old_libs="$LIBS"
|
||||||
if test "$with_capng" = "check"; then
|
if test "$with_capng" = "check"; then
|
||||||
@ -1453,7 +1453,7 @@ if test "$with_storage_disk" = "yes" -o "$with_storage_disk" = "check"; then
|
|||||||
PARTED_FOUND=yes
|
PARTED_FOUND=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$with_storage_disk" != "no" -a "x$PKG_CONFIG" != "x" ; then
|
if test "$with_storage_disk" != "no" && test "x$PKG_CONFIG" != "x" ; then
|
||||||
PKG_CHECK_MODULES(LIBPARTED, libparted >= $PARTED_REQUIRED, [], [PARTED_FOUND=no])
|
PKG_CHECK_MODULES(LIBPARTED, libparted >= $PARTED_REQUIRED, [], [PARTED_FOUND=no])
|
||||||
fi
|
fi
|
||||||
if test "$PARTED_FOUND" = "no"; then
|
if test "$PARTED_FOUND" = "no"; then
|
||||||
@ -1635,7 +1635,7 @@ else
|
|||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($RUNNING_XEND)
|
AC_MSG_RESULT($RUNNING_XEND)
|
||||||
|
|
||||||
AM_CONDITIONAL([ENABLE_XEN_TESTS], [test "$RUNNING_XEN" != "no" -a "$RUNNING_XEND" != "no"])
|
AM_CONDITIONAL([ENABLE_XEN_TESTS], [test "$RUNNING_XEN" != "no" && test "$RUNNING_XEND" != "no"])
|
||||||
|
|
||||||
AC_ARG_ENABLE([test-coverage],
|
AC_ARG_ENABLE([test-coverage],
|
||||||
AC_HELP_STRING([--enable-test-coverage], [turn on code coverage instrumentation @<:@default=no@:>@]),
|
AC_HELP_STRING([--enable-test-coverage], [turn on code coverage instrumentation @<:@default=no@:>@]),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user