build_docs="no"
uname_release=""
curses="yes"
+pthread="yes"
aio="yes"
+io_thread="no"
nptl="yes"
mixemu="no"
bluez="yes"
blobs="yes"
fdt="yes"
sdl_x11="no"
+xen="yes"
pkgversion=""
# OS specific
;;
--disable-kqemu) kqemu="no"
;;
+ --disable-xen) xen="no"
+ ;;
--disable-brlapi) brlapi="no"
;;
--disable-bluez) bluez="no"
;;
--enable-mixemu) mixemu="yes"
;;
+ --disable-pthread) pthread="no"
+ ;;
--disable-aio) aio="no"
;;
+ --enable-io-thread) io_thread="yes"
+ ;;
--disable-blobs) blobs="no"
;;
--kerneldir=*) kerneldir="$optarg"
echo " --audio-card-list=LIST set list of emulated audio cards [$audio_card_list]"
echo " Available cards: $audio_possible_cards"
echo " --enable-mixemu enable mixer emulation"
+echo " --disable-xen disable xen backend driver support"
echo " --disable-brlapi disable BrlAPI"
echo " --disable-vnc-tls disable TLS encryption for VNC server"
echo " --disable-vnc-sasl disable SASL encryption for VNC server"
echo " --enable-uname-release=R Return R for uname -r in usermode emulation"
echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
echo " --disable-vde disable support for vde network"
+echo " --disable-pthread disable pthread support"
echo " --disable-aio disable AIO support"
+echo " --enable-io-thread enable IO thread"
echo " --disable-blobs disable installing provided firmware blobs"
echo " --kerneldir=PATH look for kernel includes in PATH"
echo ""
fi
##########################################
+# xen probe
+
+if test "$xen" = "yes" ; then
+cat > $TMPC <<EOF
+#include <xenctrl.h>
+#include <xs.h>
+int main(void) { xs_daemon_open; xc_interface_open; }
+EOF
+ if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC -lxenstore -lxenctrl 2> /dev/null > /dev/null ; then
+ :
+ else
+ xen="no"
+ fi
+fi
+
+##########################################
# SDL probe
sdl_too_old=no
vnc_sasl_cflags=""
vnc_sasl_libs="-lsasl2"
if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $vnc_sasl_cflags $TMPC \
- $vnc_sasl_libs 2> /dev/null ; then
+ $vnc_sasl_libs 2> /dev/null > /dev/null ; then
:
else
vnc_sasl="no"
##########################################
# bluez support probe
if test "$bluez" = "yes" ; then
- `pkg-config bluez` || bluez="no"
+ `pkg-config bluez 2> /dev/null` || bluez="no"
fi
if test "$bluez" = "yes" ; then
cat > $TMPC << EOF
#include <bluetooth/bluetooth.h>
int main(void) { return bt_error(0); }
EOF
- bluez_cflags=`pkg-config --cflags bluez`
- bluez_libs=`pkg-config --libs bluez`
+ bluez_cflags=`pkg-config --cflags bluez 2> /dev/null`
+ bluez_libs=`pkg-config --libs bluez 2> /dev/null`
if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $bluez_cflags $TMPC \
$bluez_libs > /dev/null 2> /dev/null ; then
:
fi
##########################################
-# AIO probe
-AIOLIBS=""
+# pthread probe
+PTHREADLIBS=""
-if test "$aio" = "yes" ; then
- aio=no
- cat > $TMPC << EOF
+if test "$pthread" = yes; then
+ pthread=no
+cat > $TMPC << EOF
#include <pthread.h>
int main(void) { pthread_mutex_t lock; return 0; }
EOF
- if $cc $ARCH_CFLAGS -o $TMPE $AIOLIBS $TMPC 2> /dev/null ; then
- aio=yes
- AIOLIBS="-lpthread"
+ if $cc $ARCH_CFLAGS -o $TMPE $PTHREADLIBS $TMPC 2> /dev/null > /dev/null ; then
+ pthread=yes
+ PTHREADLIBS="-lpthread"
fi
fi
+if test "$pthread" = no; then
+ aio=no
+ io_thread=no
+fi
+
##########################################
# iovec probe
cat > $TMPC <<EOF
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
- if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lfdt 2> /dev/null ; then
+ if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lfdt 2> /dev/null > /dev/null ; then
fdt=yes
fi
fi
return (unlinkat(AT_FDCWD, "nonexistent_file", 0));
}
EOF
- if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
+ if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null > /dev/null ; then
atfile=yes
fi
fi
return inotify_init();
}
EOF
- if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
+ if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null > /dev/null ; then
inotify=yes
fi
fi
##########################################
# Do we need librt
+CLOCKLIBS=""
cat > $TMPC <<EOF
#include <signal.h>
#include <time.h>
fi
if test "$rt" = "yes" ; then
- # Hack, we should have a general purpose LIBS for this sort of thing
- AIOLIBS="$AIOLIBS -lrt"
+ CLOCKLIBS="-lrt"
fi
if test "$mingw32" = "yes" ; then
echo "Target Sparc Arch $sparc_cpu"
fi
echo "kqemu support $kqemu"
+echo "xen support $xen"
echo "brlapi support $brlapi"
echo "Documentation $build_docs"
[ ! -z "$uname_release" ] && \
echo "NPTL support $nptl"
echo "vde support $vde"
echo "AIO support $aio"
+echo "IO thread $io_thread"
echo "Install blobs $blobs"
echo "KVM support $kvm"
echo "fdt support $fdt"
echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h
echo "MAKE=$make" >> $config_mak
echo "INSTALL=$install" >> $config_mak
+echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_mak
+echo "INSTALL_DATA=$install -m0644 -p" >> $config_mak
+echo "INSTALL_PROG=$install -m0755 -p" >> $config_mak
echo "CC=$cc" >> $config_mak
echo "HOST_CC=$host_cc" >> $config_mak
echo "AR=$ar" >> $config_mak
echo "CFLAGS=$CFLAGS" >> $config_mak
echo "LDFLAGS=$LDFLAGS" >> $config_mak
echo "EXESUF=$EXESUF" >> $config_mak
-echo "AIOLIBS=$AIOLIBS" >> $config_mak
+echo "PTHREADLIBS=$PTHREADLIBS" >> $config_mak
+echo "CLOCKLIBS=$CLOCKLIBS" >> $config_mak
case "$cpu" in
i386)
echo "ARCH=i386" >> $config_mak
echo "CONFIG_BLUEZ_LIBS=$bluez_libs" >> $config_mak
echo "#define CONFIG_BLUEZ 1" >> $config_h
fi
+if test "$xen" = "yes" ; then
+ echo "XEN_LIBS=-lxenstore -lxenctrl -lxenguest" >> $config_mak
+fi
if test "$aio" = "yes" ; then
echo "#define CONFIG_AIO 1" >> $config_h
echo "CONFIG_AIO=yes" >> $config_mak
fi
+if test "$io_thread" = "yes" ; then
+ echo "CONFIG_IOTHREAD=yes" >> $config_mak
+ echo "#define CONFIG_IOTHREAD 1" >> $config_h
+fi
if test "$blobs" = "yes" ; then
echo "INSTALL_BLOBS=yes" >> $config_mak
fi
echo "#define TARGET_I386 1" >> $config_h
if test $kqemu = "yes" -a "$target_softmmu" = "yes"
then
- echo "#define USE_KQEMU 1" >> $config_h
+ echo "CONFIG_KQEMU=yes" >> $config_mak
+ echo "#define CONFIG_KQEMU 1" >> $config_h
fi
if test "$kvm" = "yes" ; then
echo "CONFIG_KVM=yes" >> $config_mak
echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
echo "#define CONFIG_KVM 1" >> $config_h
fi
+ if test "$xen" = "yes" -a "$target_softmmu" = "yes";
+ then
+ echo "CONFIG_XEN=yes" >> $config_mak
+ echo "#define CONFIG_XEN 1" >> $config_h
+ fi
;;
x86_64)
echo "TARGET_ARCH=x86_64" >> $config_mak
echo "#define TARGET_X86_64 1" >> $config_h
if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64"
then
- echo "#define USE_KQEMU 1" >> $config_h
+ echo "CONFIG_KQEMU=yes" >> $config_mak
+ echo "#define CONFIG_KQEMU 1" >> $config_h
fi
if test "$kvm" = "yes" ; then
echo "CONFIG_KVM=yes" >> $config_mak
echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
echo "#define CONFIG_KVM 1" >> $config_h
fi
+ if test "$xen" = "yes" -a "$target_softmmu" = "yes"
+ then
+ echo "CONFIG_XEN=yes" >> $config_mak
+ echo "#define CONFIG_XEN 1" >> $config_h
+ fi
;;
alpha)
echo "TARGET_ARCH=alpha" >> $config_mak