fmod_inc=""
oss_lib=""
vnc_tls="yes"
+vnc_sasl="yes"
bsd="no"
linux="no"
solaris="no"
aix="no"
blobs="yes"
fdt="yes"
+sdl_x11="no"
# OS specific
if check_define __linux__ ; then
kqemu="yes"
fi
;;
+DragonFly)
+bsd="yes"
+audio_drv_list="oss"
+audio_possible_drivers="oss sdl esd pa"
+if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
+ kqemu="yes"
+fi
+aio="no"
+;;
NetBSD)
bsd="yes"
audio_drv_list="oss"
Darwin)
bsd="yes"
darwin="yes"
+# on Leopard most of the system is 32-bit, so we have to ask the kernel it if we can run 64-bit userspace code
+if [ "$cpu" = "i386" ] ; then
+ is_x86_64=`sysctl -n hw.optional.x86_64`
+ [ "$is_x86_64" = "1" ] && cpu=x86_64
+fi
+if [ "$cpu" = "x86_64" ] ; then
+ OS_CFLAGS="-arch x86_64"
+ LDFLAGS="-arch x86_64"
+else
+ OS_CFLAGS="-mdynamic-no-pic"
+fi
darwin_user="yes"
cocoa="yes"
audio_drv_list="coreaudio"
audio_possible_drivers="coreaudio sdl fmod"
-OS_CFLAGS="-mdynamic-no-pic"
OS_LDFLAGS="-framework CoreFoundation -framework IOKit"
;;
SunOS)
;;
--disable-vnc-tls) vnc_tls="no"
;;
+ --disable-vnc-sasl) vnc_sasl="no"
+ ;;
--disable-slirp) slirp="no"
;;
--disable-vde) vde="no"
echo " --enable-mixemu enable mixer emulation"
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 " --disable-curses disable curses output"
echo " --disable-bluez disable bluez stack connectivity"
echo " --disable-kvm disable KVM acceleration support"
oss="no"
linux_user="no"
bsd_user="no"
+ OS_CFLAGS="$OS_CFLAGS -DWIN32_LEAN_AND_MEAN -DWINVER=0x501"
fi
if test ! -x "$(which cgcc 2>/dev/null)"; then
fi
fi # -z $sdl
+if test "$sdl" = "yes" ; then
+cat > $TMPC <<EOF
+#include <SDL.h>
+#if defined(SDL_VIDEO_DRIVER_X11)
+#include <X11/XKBlib.h>
+#else
+#error No x11 support
+#endif
+int main(void) { return 0; }
+EOF
+ if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` > /dev/null 2>&1 ; then
+ sdl_x11="yes"
+ fi
+fi
+
##########################################
# VNC TLS detection
if test "$vnc_tls" = "yes" ; then
fi
fi
+##########################################
+# VNC SASL detection
+if test "$vnc_sasl" = "yes" ; then
+cat > $TMPC <<EOF
+#include <sasl/sasl.h>
+#include <stdio.h>
+int main(void) { sasl_server_init(NULL, "qemu"); return 0; }
+EOF
+ # Assuming Cyrus-SASL installed in /usr prefix
+ 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
+ :
+ else
+ vnc_sasl="no"
+ fi
+fi
+
+##########################################
+# fnmatch() probe, used for ACL routines
+fnmatch="no"
+cat > $TMPC << EOF
+#include <fnmatch.h>
+int main(void)
+{
+ fnmatch("foo", "foo", 0);
+ return 0;
+}
+EOF
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC > /dev/null 2> /dev/null ; then
+ fnmatch="yes"
+fi
+
##########################################
# vde libraries probe
if test "$vde" = "yes" ; then
kvm="no";
if [ -x "`which awk 2>/dev/null`" ] && \
[ -x "`which grep 2>/dev/null`" ]; then
- kvmerr=`$cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $kvm_cflags $TMPC 2>&1 \
+ kvmerr=`LANG=C $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $kvm_cflags $TMPC 2>&1 \
| grep "error: " \
| awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
if test "$kvmerr" != "" ; then
echo " TLS CFLAGS $vnc_tls_cflags"
echo " TLS LIBS $vnc_tls_libs"
fi
+echo "VNC SASL support $vnc_sasl"
+if test "$vnc_sasl" = "yes" ; then
+ echo " SASL CFLAGS $vnc_sasl_cflags"
+ echo " SASL LIBS $vnc_sasl_libs"
+fi
if test -n "$sparc_cpu"; then
echo "Target Sparc Arch $sparc_cpu"
fi
echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_mak
echo "#define CONFIG_VNC_TLS 1" >> $config_h
fi
+if test "$vnc_sasl" = "yes" ; then
+ echo "CONFIG_VNC_SASL=yes" >> $config_mak
+ echo "CONFIG_VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_mak
+ echo "CONFIG_VNC_SASL_LIBS=$vnc_sasl_libs" >> $config_mak
+ echo "#define CONFIG_VNC_SASL 1" >> $config_h
+fi
+if test "$fnmatch" = "yes" ; then
+ echo "#define HAVE_FNMATCH_H 1" >> $config_h
+fi
qemu_version=`head $source_path/VERSION`
echo "VERSION=$qemu_version" >>$config_mak
echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
echo "CONFIG_SDL=yes" >> $config_mak
if test "$target_softmmu" = "no" -o "$static" = "yes"; then
echo "SDL_LIBS=$sdl_static_libs" >> $config_mak
+ elif test "$sdl_x11" = "yes" ; then
+ echo "SDL_LIBS=`$sdl_config --libs` -lX11" >> $config_mak
else
echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
fi
if [ "$bsd" = "yes" ] ; then
echo "#define O_LARGEFILE 0" >> $config_h
echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
- echo "#define _BSD 1" >> $config_h
+ echo "#define HOST_BSD 1" >> $config_h
fi
echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
echo "TARGET_ARCH=ppc" >> $config_mak
echo "#define TARGET_ARCH \"ppc\"" >> $config_h
echo "#define TARGET_PPC 1" >> $config_h
+ gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
;;
ppcemb)
echo "TARGET_ARCH=ppcemb" >> $config_mak
echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
echo "#define CONFIG_KVM 1" >> $config_h
fi
+ gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
;;
ppc64)
echo "TARGET_ARCH=ppc64" >> $config_mak
echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
echo "#define TARGET_PPC 1" >> $config_h
echo "#define TARGET_PPC64 1" >> $config_h
+ gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
;;
ppc64abi32)
echo "TARGET_ARCH=ppc64" >> $config_mak
echo "#define TARGET_PPC 1" >> $config_h
echo "#define TARGET_PPC64 1" >> $config_h
echo "#define TARGET_ABI32 1" >> $config_h
+ gdb_xml_files="power64-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
;;
sh4|sh4eb)
echo "TARGET_ARCH=sh4" >> $config_mak