int main(void) { xs_daemon_open(); xc_interface_open(); return 0; }
EOF
if compile_prog "" "$xen_libs" ; then
- :
+ libs_softmmu="$xen_libs $libs_softmmu"
else
xen="no"
fi
vnc_tls_cflags=`pkg-config --cflags gnutls 2> /dev/null`
vnc_tls_libs=`pkg-config --libs gnutls 2> /dev/null`
if compile_prog "$vnc_tls_cflags" "$vnc_tls_libs" ; then
- :
+ libs_softmmu="$vnc_tls_libs $libs_softmmu"
else
vnc_tls="no"
fi
vnc_sasl_cflags=""
vnc_sasl_libs="-lsasl2"
if compile_prog "$vnc_sasl_cflags" "$vnc_sasl_libs" ; then
- :
+ libs_softmmu="$vnc_sasl_libs $libs_softmmu"
else
vnc_sasl="no"
fi
EOF
if compile_prog "" "$brlapi_libs" ; then
brlapi=yes
+ libs_softmmu="$brlapi_libs $libs_softmmu"
fi
fi
int main(void) { resize_term(0, 0); return curses_version(); }
EOF
if compile_prog "" "-lncurses" ; then
- curses_libs="-lncurses"
+ libs_softmmu="-lncurses $libs_softmmu"
elif compile_prog "" "-lcurses" ; then
- curses_libs="-lcurses"
+ libs_softmmu="-lcurses $libs_softmmu"
else
curses=no
fi
bluez_cflags=`pkg-config --cflags bluez 2> /dev/null`
bluez_libs=`pkg-config --libs bluez 2> /dev/null`
if compile_prog "$bluez_cflags" "$bluez_libs" ; then
- :
+ libs_softmmu="$bluez_libs $libs_softmmu"
else
bluez="no"
fi
EOF
if compile_prog "" "$fdt_libs" ; then
fdt=yes
+ libs_softmmu="$fdt_libs $libs_softmmu"
fi
fi
exit 1
fi
+if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaries" != yes -a \
+ "$aix" != "yes" ; then
+ libs_softmmu="-lutil $libs_softmmu"
+fi
+
# End of CC checks
# After here, no more $cc or $ld runs
if test "$vnc_tls" = "yes" ; then
echo "CONFIG_VNC_TLS=y" >> $config_host_mak
echo "VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_host_mak
- echo "VNC_TLS_LIBS=$vnc_tls_libs" >> $config_host_mak
fi
if test "$vnc_sasl" = "yes" ; then
echo "CONFIG_VNC_SASL=y" >> $config_host_mak
echo "VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak
- echo "VNC_SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak
fi
if test "$fnmatch" = "yes" ; then
echo "CONFIG_FNMATCH=y" >> $config_host_mak
fi
if test "$curses" = "yes" ; then
echo "CONFIG_CURSES=y" >> $config_host_mak
- echo "CURSES_LIBS=$curses_libs" >> $config_host_mak
fi
if test "$atfile" = "yes" ; then
echo "CONFIG_ATFILE=y" >> $config_host_mak
fi
if test "$brlapi" = "yes" ; then
echo "CONFIG_BRLAPI=y" >> $config_host_mak
- echo "BRLAPI_LIBS=$brlapi_libs" >> $config_host_mak
fi
if test "$bluez" = "yes" ; then
echo "CONFIG_BLUEZ=y" >> $config_host_mak
echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
- echo "BLUEZ_LIBS=$bluez_libs" >> $config_host_mak
fi
if test "$xen" = "yes" ; then
echo "CONFIG_XEN=y" >> $config_host_mak
- echo "XEN_LIBS=$xen_libs" >> $config_host_mak
fi
if test "$aio" = "yes" ; then
echo "CONFIG_AIO=y" >> $config_host_mak
fi
if test "$fdt" = "yes" ; then
echo "CONFIG_FDT=y" >> $config_host_mak
- echo "FDT_LIBS=$fdt_libs" >> $config_host_mak
fi
# XXX: suppress that
arm|armeb|m68k|microblaze|mips|mipsel|mipsn32|mipsn32el|mips64|mips64el|ppc|ppc64|ppc64abi32|ppcemb|sparc|sparc64|sparc32plus)
echo "CONFIG_SOFTFLOAT=y" >> $config_mak
;;
+ *)
+ echo "CONFIG_NOSOFTFLOAT=y" >> $config_mak
+ ;;
esac
if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then
echo "CONFIG_BSD_USER=y" >> $config_mak
fi
-# generate LDFLAGS for targets
+# generate QEMU_CFLAGS/LDFLAGS for targets
+cflags=""
ldflags=""
-if test "$target_linux_user" = "yes" -o "$target_linux_user" = "yes" ; then
+linker_script="-Wl,-T../config-host.ld -Wl,-T,\$(SRC_PATH)/\$(ARCH).ld"
+
+if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
case "$ARCH" in
i386)
if test "$gprof" = "yes" -o "$static" = "yes" ; then
- ldflags='-Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld'
+ ldflags="$linker_script $ldflags"
else
# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
# that the kernel ELF loader considers as an executable. I think this
# is the simplest way to make it self virtualizable!
- ldflags='-Wl,-shared'
+ ldflags="-Wl,-shared $ldflags"
fi
;;
sparc)
# -static is used to avoid g1/g3 usage by the dynamic linker
- ldflags='-Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld -static'
+ ldflags="$linker_script -static $ldflags"
;;
ia64)
- ldflags='-Wl,-G0 -Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld -static'
+ ldflags="-Wl,-G0 $linker_script -static $ldflags"
;;
x86_64|ppc|ppc64|s390|sparc64|alpha|arm|m68k|mips|mips64)
- ldflags='-Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld'
+ ldflags="$linker_script $ldflags"
;;
esac
fi
if test "$target_softmmu" = "yes" ; then
case "$ARCH" in
ia64)
- ldflags='-Wl,-G0 -Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld -static'
+ ldflags="-Wl,-G0 $linker_script -static $ldflags"
;;
esac
fi
-if test "$ldflags" != "" ; then
- echo "LDFLAGS+=$ldflags" >> $config_mak
-fi
+echo "LDFLAGS+=$ldflags" >> $config_mak
+echo "QEMU_CFLAGS+=$cflags" >> $config_mak
echo "/* Automatically generated by configure - do not modify */" > $config_h
echo "#include \"../config-host.h\"" >> $config_h