s390x-softmmu \
xtensa-softmmu \
xtensaeb-softmmu \
+unicore32-softmmu \
"
fi
# the following are Linux specific
# Xen (any)
cat > $TMPC <<EOF
#include <xenctrl.h>
-#include <xs.h>
int main(void) {
return 0;
}
xen=no
# Xen unstable
- elif (
- cat > $TMPC <<EOF
+ elif
+ cat > $TMPC <<EOF &&
#include <xenctrl.h>
#include <xenstore.h>
#include <stdint.h>
}
EOF
compile_prog "" "$xen_libs"
- ) ; then
+ then
xen_ctrl_version=420
xen=yes
- elif (
- cat > $TMPC <<EOF
+ elif
+ cat > $TMPC <<EOF &&
#include <xenctrl.h>
#include <xs.h>
#include <stdint.h>
# error HVM_MAX_VCPUS not defined
#endif
int main(void) {
- xc_interface *xc;
xs_daemon_open();
- xc = xc_interface_open(0, 0, 0);
+ xc_interface_open(0, 0, 0);
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
xc_gnttab_open(NULL, 0);
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
}
EOF
compile_prog "" "$xen_libs"
- ) ; then
+ then
xen_ctrl_version=410
xen=yes
# Xen 4.0.0
- elif (
- cat > $TMPC <<EOF
+ elif
+ cat > $TMPC <<EOF &&
#include <xenctrl.h>
#include <xs.h>
#include <stdint.h>
}
EOF
compile_prog "" "$xen_libs"
- ) ; then
+ then
xen_ctrl_version=400
xen=yes
# Xen 3.4.0
- elif (
- cat > $TMPC <<EOF
+ elif
+ cat > $TMPC <<EOF &&
#include <xenctrl.h>
#include <xs.h>
int main(void) {
}
EOF
compile_prog "" "$xen_libs"
- ) ; then
+ then
xen_ctrl_version=340
xen=yes
# Xen 3.3.0
- elif (
- cat > $TMPC <<EOF
+ elif
+ cat > $TMPC <<EOF &&
#include <xenctrl.h>
#include <xs.h>
int main(void) {
}
EOF
compile_prog "" "$xen_libs"
- ) ; then
+ then
xen_ctrl_version=330
xen=yes
int main(void) {
png_structp png_ptr;
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
- return 0;
+ return png_ptr != 0;
}
EOF
if $pkg_config libpng --modversion >/dev/null 2>&1; then
int main(void)
{
struct vde_open_args a = {0, 0, 0};
- vde_open("", "", &a);
+ char s[] = "";
+ vde_open(s, s, &a);
return 0;
}
EOF
case $drv in
alsa)
audio_drv_probe $drv alsa/asoundlib.h -lasound \
- "snd_pcm_t **handle; return snd_pcm_close(*handle);"
+ "return snd_pcm_close((snd_pcm_t *)0);"
libs_softmmu="-lasound $libs_softmmu"
;;
cat > $TMPC <<EOF
#include <stdio.h>
#include <sys/capability.h>
-int main(void) { cap_t caps; caps = cap_init(); }
+int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; }
EOF
if compile_prog "" "-lcap" ; then
cap=yes
#define _ATFILE_SOURCE
#include <stddef.h>
#include <fcntl.h>
+#include <sys/stat.h>
int main(void)
{
#include <pk11pub.h>
int main(void) { PK11_FreeSlot(0); return 0; }
EOF
- smartcard_cflags="-I\$(SRC_PATH)/libcacard"
+ smartcard_includes="-I\$(SRC_PATH)/libcacard"
libcacard_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs"
libcacard_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags"
test_cflags="$libcacard_cflags"
if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \
compile_prog "$test_cflags" "$libcacard_libs"; then
smartcard_nss="yes"
- QEMU_CFLAGS="$QEMU_CFLAGS $smartcard_cflags $libcacard_cflags"
+ QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags"
+ QEMU_INCLUDES="$QEMU_INCLUDES $smartcard_includes"
libs_softmmu="$libcacard_libs $libs_softmmu"
else
if test "$smartcard_nss" = "yes"; then
# specification is necessary
if test "$vhost_net" = "yes" && test "$cpu" = "i386"; then
cat > $TMPC << EOF
-int sfaa(unsigned *ptr)
+static int sfaa(int *ptr)
{
return __sync_fetch_and_and(ptr, 0);
}
}
EOF
if ! compile_prog "" "" ; then
- CFLAGS+="-march=i486"
+ QEMU_CFLAGS="-march=i486 $QEMU_CFLAGS"
fi
fi