fdt=""
netmap="no"
sdl=""
-sdlabi=""
+sdl_image=""
virtfs=""
mpath=""
vnc="yes"
"${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
}
pkg_config=query_pkg_config
-sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
sdl2_config="${SDL2_CONFIG-${cross_prefix}sdl2-config}"
# If the user hasn't specified ARFLAGS, default to 'rv', just as make does.
;;
GNU/kFreeBSD)
bsd="yes"
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl pa"
;;
FreeBSD)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl pa"
# needed for kinfo_getvmmap(3) in libutil.h
LIBS="-lutil $LIBS"
DragonFly)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl pa"
HOST_VARIANT_DIR="dragonfly"
;;
NetBSD)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl"
oss_lib="-lossaudio"
HOST_VARIANT_DIR="netbsd"
OpenBSD)
bsd="yes"
make="${MAKE-gmake}"
- audio_drv_list="sdl"
+ audio_drv_list="try-sdl"
audio_possible_drivers="sdl"
HOST_VARIANT_DIR="openbsd"
supported_os="yes"
LDFLAGS="-arch x86_64 $LDFLAGS"
fi
cocoa="yes"
- audio_drv_list="coreaudio"
+ audio_drv_list="coreaudio try-sdl"
audio_possible_drivers="coreaudio sdl"
LDFLAGS="-framework CoreFoundation -framework IOKit $LDFLAGS"
libs_softmmu="-F/System/Library/Frameworks -framework Cocoa -framework IOKit $libs_softmmu"
install="${INSTALL-ginstall}"
smbd="${SMBD-/usr/sfw/sbin/smbd}"
if test -f /usr/include/sys/soundcard.h ; then
- audio_drv_list="oss"
+ audio_drv_list="oss try-sdl"
fi
audio_possible_drivers="oss sdl"
# needed for CMSG_ macros in sys/socket.h
LIBS="-lposix_error_mapper -lnetwork $LIBS"
;;
Linux)
- audio_drv_list="oss"
+ audio_drv_list="try-pa try-alsa try-sdl oss"
audio_possible_drivers="oss alsa sdl pa"
linux="yes"
linux_user="yes"
;;
--enable-sdl) sdl="yes"
;;
- --with-sdlabi=*) sdlabi="$optarg"
+ --disable-sdl-image) sdl_image="no"
+ ;;
+ --enable-sdl-image) sdl_image="yes"
;;
--disable-qom-cast-debug) qom_cast_debug="no"
;;
nettle nettle cryptography support
gcrypt libgcrypt cryptography support
sdl SDL UI
- --with-sdlabi select preferred SDL ABI 1.2 or 2.0
+ sdl_image SDL Image support for icons
gtk gtk UI
vte vte support for the gtk UI
curses curses UI
sdl_probe ()
{
- sdl_too_old=no
- if test "$sdlabi" = ""; then
- if $pkg_config --exists "sdl2"; then
- sdlabi=2.0
- elif $pkg_config --exists "sdl"; then
- sdlabi=1.2
- else
- sdlabi=2.0
- fi
- fi
-
- if test $sdlabi = "2.0"; then
- sdl_config=$sdl2_config
- sdlname=sdl2
- sdlconfigname=sdl2_config
- elif test $sdlabi = "1.2"; then
- sdlname=sdl
- sdlconfigname=sdl_config
- else
- error_exit "Unknown sdlabi $sdlabi, must be 1.2 or 2.0"
- fi
-
- if test "$(basename $sdl_config)" != $sdlconfigname && ! has ${sdl_config}; then
- sdl_config=$sdlconfigname
- fi
-
- if $pkg_config $sdlname --exists; then
- sdlconfig="$pkg_config $sdlname"
+ if $pkg_config sdl2 --exists; then
+ sdlconfig="$pkg_config sdl2"
sdlversion=$($sdlconfig --modversion 2>/dev/null)
elif has ${sdl_config}; then
- sdlconfig="$sdl_config"
+ sdlconfig="$sdl2_config"
sdlversion=$($sdlconfig --version)
else
if test "$sdl" = "yes" ; then
sdl_cflags=$($sdlconfig --cflags 2>/dev/null)
sdl_cflags="$sdl_cflags -Wno-undef" # workaround 2.0.8 bug
if test "$static" = "yes" ; then
- if $pkg_config $sdlname --exists; then
- sdl_libs=$($pkg_config $sdlname --static --libs 2>/dev/null)
+ if $pkg_config sdl2 --exists; then
+ sdl_libs=$($pkg_config sdl2 --static --libs 2>/dev/null)
else
sdl_libs=$($sdlconfig --static-libs 2>/dev/null)
fi
sdl_libs=$($sdlconfig --libs 2>/dev/null)
fi
if compile_prog "$sdl_cflags" "$sdl_libs" ; then
- if test $(echo $sdlversion | sed 's/[^0-9]//g') -lt 121 ; then
- sdl_too_old=yes
- else
- sdl=yes
- fi
+ sdl=yes
# static link with sdl ? (note: sdl.pc's --static --libs is broken)
if test "$sdl" = "yes" -a "$static" = "yes" ; then
fi # static link
else # sdl not found
if test "$sdl" = "yes" ; then
- feature_not_found "sdl" "Install SDL devel"
+ feature_not_found "sdl" "Install SDL2 devel"
fi
sdl=no
fi # sdl compile test
}
+sdl_image_probe ()
+{
+ if test "$sdl_image" != "no" ; then
+ if $pkg_config SDL2_image --exists; then
+ if test "$static" = "yes"; then
+ sdl_image_libs=$($pkg_config SDL2_image --libs --static 2>/dev/null)
+ else
+ sdl_image_libs=$($pkg_config SDL2_image --libs 2>/dev/null)
+ fi
+ sdl_image_cflags=$($pkg_config SDL2_image --cflags 2>/dev/null)
+ sdl_image=yes
+
+ sdl_cflags="$sdl_cflags $sdl_image_cflags"
+ sdl_libs="$sdl_libs $sdl_image_libs"
+ else
+ if test "$sdl_image" = "yes" ; then
+ feature_not_found "sdl_image" "Install SDL Image devel"
+ else
+ sdl_image=no
+ fi
+ fi
+ fi
+}
+
if test "$sdl" != "no" ; then
sdl_probe
fi
+if test "$sdl" = "yes" ; then
+ sdl_image_probe
+else
+ if test "$sdl_image" = "yes"; then
+ echo "warning: SDL Image requested, but SDL is not available, disabling"
+ fi
+ sdl_image=no
+fi
+
if test "$sdl" = "yes" ; then
cat > $TMPC <<EOF
#include <SDL.h>
##########################################
# Sound support libraries probe
-audio_drv_probe()
-{
- drv=$1
- hdr=$2
- lib=$3
- exp=$4
- cfl=$5
- cat > $TMPC << EOF
-#include <$hdr>
-int main(void) { $exp }
-EOF
- if compile_prog "$cfl" "$lib" ; then
- :
- else
- error_exit "$drv check failed" \
- "Make sure to have the $drv libs and headers installed."
- fi
-}
-
audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/,/ /g')
for drv in $audio_drv_list; do
case $drv in
- alsa)
- audio_drv_probe $drv alsa/asoundlib.h -lasound \
- "return snd_pcm_close((snd_pcm_t *)0);"
- alsa_libs="-lasound"
+ alsa | try-alsa)
+ if $pkg_config alsa --exists; then
+ alsa_libs=$($pkg_config alsa --libs)
+ if test "$drv" = "try-alsa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa/alsa/')
+ fi
+ else
+ if test "$drv" = "try-alsa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa//')
+ else
+ error_exit "$drv check failed" \
+ "Make sure to have the $drv libs and headers installed."
+ fi
+ fi
;;
- pa)
- audio_drv_probe $drv pulse/pulseaudio.h "-lpulse" \
- "pa_context_set_source_output_volume(NULL, 0, NULL, NULL, NULL); return 0;"
- pulse_libs="-lpulse"
- audio_pt_int="yes"
+ pa | try-pa)
+ if $pkg_config libpulse --exists; then
+ pulse_libs=$($pkg_config libpulse --libs)
+ audio_pt_int="yes"
+ if test "$drv" = "try-pa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
+ fi
+ else
+ if test "$drv" = "try-pa"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa//')
+ else
+ error_exit "$drv check failed" \
+ "Make sure to have the $drv libs and headers installed."
+ fi
+ fi
;;
sdl)
fi
;;
+ try-sdl)
+ if test "$sdl" = "no"; then
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-sdl//')
+ else
+ audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-sdl/sdl/')
+ fi
+ ;;
+
coreaudio)
coreaudio_libs="-framework CoreAudio"
;;
fi
fi
+if test "$opengl" = "yes" -a "$have_x11" = "yes"; then
+ for target in $target_list; do
+ case $target in
+ lm32-softmmu) # milkymist-tmu2 requires X11 and OpenGL
+ need_x11=yes
+ ;;
+ esac
+ done
+fi
+
##########################################
# libxml2 probe
if test "$libxml2" != "no" ; then
signalfd=yes
fi
+# check if optreset global is declared by <getopt.h>
+optreset="no"
+cat > $TMPC << EOF
+#include <getopt.h>
+int main(void) { return optreset; }
+EOF
+
+if compile_prog "" "" ; then
+ optreset=yes
+fi
+
# check if eventfd is supported
eventfd=no
cat > $TMPC << EOF
qemu_moddir=$libdir$confsuffix
qemu_datadir=$datadir$confsuffix
qemu_localedir="$datadir/locale"
+qemu_icondir="$datadir/icons"
+qemu_desktopdir="$datadir/applications"
# We can only support ivshmem if we have eventfd
if [ "$eventfd" = "yes" ]; then
echo "Cocoa support $cocoa"
fi
echo "SDL support $sdl $(echo_version $sdl $sdlversion)"
+echo "SDL image support $sdl_image"
echo "GTK support $gtk $(echo_version $gtk $gtk_version)"
echo "GTK GL support $gtk_gl"
echo "VTE support $vte $(echo_version $vte $vteversion)"
echo "libpmem support $libpmem"
echo "libudev $libudev"
-if test "$sdl_too_old" = "yes"; then
-echo "-> Your SDL version is too old - please upgrade to have SDL support"
-fi
-
-if test "$sdlabi" = "1.2"; then
- echo
- echo "WARNING: Use of SDL 1.2 is deprecated and will be removed in"
- echo "WARNING: future releases. Please switch to using SDL 2.0"
-fi
-
if test "$supported_cpu" = "no"; then
echo
echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEASES!"
fi
echo "qemu_helperdir=$libexecdir" >> $config_host_mak
echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
+echo "qemu_icondir=$qemu_icondir" >> $config_host_mak
+echo "qemu_desktopdir=$qemu_desktopdir" >> $config_host_mak
echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
echo "GIT=$git" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
fi
if test "$sdl" = "yes" ; then
echo "CONFIG_SDL=m" >> $config_host_mak
- echo "CONFIG_SDLABI=$sdlabi" >> $config_host_mak
echo "SDL_CFLAGS=$sdl_cflags" >> $config_host_mak
echo "SDL_LIBS=$sdl_libs" >> $config_host_mak
+ if test "$sdl_image" = "yes" ; then
+ echo "CONFIG_SDL_IMAGE=y" >> $config_host_mak
+ fi
fi
if test "$cocoa" = "yes" ; then
echo "CONFIG_COCOA=y" >> $config_host_mak
if test "$signalfd" = "yes" ; then
echo "CONFIG_SIGNALFD=y" >> $config_host_mak
fi
+if test "$optreset" = "yes" ; then
+ echo "HAVE_OPTRESET=y" >> $config_host_mak
+fi
if test "$tcg" = "yes"; then
echo "CONFIG_TCG=y" >> $config_host_mak
if test "$tcg_interpreter" = "yes" ; then