224
230
# default flags for all hosts
225
231
QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
226
232
CFLAGS="-g $CFLAGS"
227
QEMU_CFLAGS="-Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
233
QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
228
234
QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
229
235
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
230
236
QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
469
477
: ${make=${MAKE-make}}
470
478
: ${install=${INSTALL-install}}
479
: ${python=${PYTHON-python}}
472
481
if test "$mingw32" = "yes" ; then
474
483
QEMU_CFLAGS="-DWIN32_LEAN_AND_MEAN -DWINVER=0x501 $QEMU_CFLAGS"
475
484
# enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
476
485
QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
477
LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
486
LIBS="-lwinmm -lws2_32 -liberty -liphlpapi $LIBS"
478
487
prefix="c:/Program Files/Qemu"
479
488
mandir="\${prefix}"
480
489
datadir="\${prefix}"
714
731
--enable-vhost-net) vhost_net="yes"
733
--disable-opengl) opengl="no"
735
--enable-opengl) opengl="yes"
718
739
--disable-rbd) rbd="no"
720
741
--enable-rbd) rbd="yes"
743
--disable-smartcard) smartcard="no"
745
--enable-smartcard) smartcard="yes"
747
--disable-smartcard-nss) smartcard_nss="no"
749
--enable-smartcard-nss) smartcard_nss="yes"
751
--disable-usb-redir) usb_redir="no"
753
--enable-usb-redir) usb_redir="yes"
755
--enable-guest-agent) guest_agent="yes"
757
--disable-guest-agent) guest_agent="no"
722
759
*) echo "ERROR: unknown option $opt"; show_help="yes"
794
831
host_guest_base="yes"
834
host_guest_base="yes"
798
838
[ -z "$guest_base" ] && guest_base="$host_guest_base"
841
default_target_list=""
843
# these targets are portable
844
if [ "$softmmu" = "yes" ] ; then
845
default_target_list="\
853
microblazeel-softmmu \
868
# the following are Linux specific
869
if [ "$linux_user" = "yes" ] ; then
870
default_target_list="${default_target_list}\
878
microblaze-linux-user \
879
microblazeel-linux-user \
884
ppc64abi32-linux-user \
889
sparc32plus-linux-user \
890
unicore32-linux-user \
894
# the following are Darwin specific
895
if [ "$darwin_user" = "yes" ] ; then
896
default_target_list="$default_target_list i386-darwin-user ppc-darwin-user "
898
# the following are BSD specific
899
if [ "$bsd_user" = "yes" ] ; then
900
default_target_list="${default_target_list}\
800
908
if test x"$show_help" = x"yes" ; then
809
917
echo " --prefix=PREFIX install in PREFIX [$prefix]"
810
918
echo " --interp-prefix=PREFIX where to find shared libraries, etc."
811
919
echo " use %M for cpu name [$interp_prefix]"
812
echo " --target-list=LIST set target list [$target_list]"
920
echo " --target-list=LIST set target list (default: build everything)"
921
echo "Available targets: $default_target_list" | \
922
fold -s -w 53 | sed -e 's/^/ /'
814
924
echo "Advanced options (experts only):"
815
925
echo " --source-path=PATH path of source code [$source_path]"
821
931
echo " --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS"
822
932
echo " --make=MAKE use specified make [$make]"
823
933
echo " --install=INSTALL use specified install [$install]"
934
echo " --python=PYTHON use specified python [$python]"
824
935
echo " --static enable static build [$static]"
825
936
echo " --mandir=PATH install man pages in PATH"
826
937
echo " --datadir=PATH install firmware in PATH"
836
947
echo " --disable-werror disable compilation abort on warning"
837
948
echo " --disable-sdl disable SDL"
838
949
echo " --enable-sdl enable SDL"
950
echo " --disable-vnc disable VNC"
951
echo " --enable-vnc enable VNC"
839
952
echo " --enable-cocoa enable COCOA (Mac OS X only)"
840
953
echo " --audio-drv-list=LIST set audio drivers list:"
841
954
echo " Available drivers: $audio_possible_drivers"
868
981
echo " --enable-check-utests enable check unit-tests"
869
982
echo " --disable-bluez disable bluez stack connectivity"
870
983
echo " --enable-bluez enable bluez stack connectivity"
984
echo " --disable-slirp disable SLIRP userspace network connectivity"
871
985
echo " --disable-kvm disable KVM acceleration support"
872
986
echo " --enable-kvm enable KVM acceleration support"
873
987
echo " --disable-nptl disable usermode NPTL support"
902
1016
echo " --enable-attr enable attr and xattr support"
903
1017
echo " --enable-io-thread enable IO thread"
904
1018
echo " --disable-blobs disable installing provided firmware blobs"
905
echo " --kerneldir=PATH look for kernel includes in PATH"
906
1019
echo " --enable-docs enable documentation build"
907
1020
echo " --disable-docs disable documentation build"
908
1021
echo " --disable-vhost-net disable vhost-net acceleration support"
914
1027
echo " --disable-spice disable spice"
915
1028
echo " --enable-spice enable spice"
916
1029
echo " --enable-rbd enable building the rados block device (rbd)"
1030
echo " --disable-smartcard disable smartcard support"
1031
echo " --enable-smartcard enable smartcard support"
1032
echo " --disable-smartcard-nss disable smartcard nss support"
1033
echo " --enable-smartcard-nss enable smartcard nss support"
1034
echo " --disable-usb-redir disable usb network redirection support"
1035
echo " --enable-usb-redir enable usb network redirection support"
1036
echo " --disable-guest-agent disable building of the QEMU Guest Agent"
1037
echo " --enable-guest-agent enable building of the QEMU Guest Agent"
918
1039
echo "NOTE: The object files are built at the place where configure is launched"
1097
if test "$guest_agent" != "no" ; then
1098
if has $python; then
1101
echo "Python not found. Use --python=/path/to/python"
977
1106
if test -z "$target_list" ; then
978
# these targets are portable
979
if [ "$softmmu" = "yes" ] ; then
1000
# the following are Linux specific
1001
if [ "$linux_user" = "yes" ] ; then
1002
target_list="${target_list}\
1010
microblaze-linux-user \
1015
ppc64abi32-linux-user \
1019
sparc64-linux-user \
1020
sparc32plus-linux-user \
1023
# the following are Darwin specific
1024
if [ "$darwin_user" = "yes" ] ; then
1025
target_list="$target_list i386-darwin-user ppc-darwin-user "
1027
# the following are BSD specific
1028
if [ "$bsd_user" = "yes" ] ; then
1029
target_list="${target_list}\
1107
target_list="$default_target_list"
1037
1109
target_list=`echo "$target_list" | sed -e 's/,/ /g'`
1146
1218
if test "$xen" != "no" ; then
1147
1219
xen_libs="-lxenstore -lxenctrl -lxenguest"
1148
1222
cat > $TMPC <<EOF
1149
1223
#include <xenctrl.h>
1150
1224
#include <xs.h>
1151
int main(void) { xs_daemon_open(); xc_interface_open(); return 0; }
1226
#include <xen/hvm/hvm_info_table.h>
1227
#if !defined(HVM_MAX_VCPUS)
1228
# error HVM_MAX_VCPUS not defined
1233
xc = xc_interface_open(0, 0, 0);
1234
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
1235
xc_gnttab_open(NULL, 0);
1236
xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
1153
1240
if compile_prog "" "$xen_libs" ; then
1155
libs_softmmu="$xen_libs $libs_softmmu"
1241
xen_ctrl_version=410
1247
#include <xenctrl.h>
1250
#include <xen/hvm/hvm_info_table.h>
1251
#if !defined(HVM_MAX_VCPUS)
1252
# error HVM_MAX_VCPUS not defined
1255
struct xen_add_to_physmap xatp = {
1256
.domid = 0, .space = XENMAPSPACE_gmfn, .idx = 0, .gpfn = 0,
1259
xc_interface_open();
1261
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
1262
xc_memory_op(0, XENMEM_add_to_physmap, &xatp);
1266
compile_prog "" "$xen_libs"
1268
xen_ctrl_version=400
1274
#include <xenctrl.h>
1277
struct xen_add_to_physmap xatp = {
1278
.domid = 0, .space = XENMAPSPACE_gmfn, .idx = 0, .gpfn = 0,
1281
xc_interface_open();
1283
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
1284
xc_memory_op(0, XENMEM_add_to_physmap, &xatp);
1288
compile_prog "" "$xen_libs"
1290
xen_ctrl_version=340
1296
#include <xenctrl.h>
1300
xc_interface_open();
1302
xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
1306
compile_prog "" "$xen_libs"
1308
xen_ctrl_version=330
1311
# Xen not found or unsupported
1157
1313
if test "$xen" = "yes" ; then
1158
1314
feature_not_found "xen"
1319
if test "$xen" = yes; then
1320
libs_softmmu="$xen_libs $libs_softmmu"
1164
1324
##########################################
1658
1831
##########################################
1660
if test "$kvm" != "no" ; then
1662
#include <linux/kvm.h>
1663
#if !defined(KVM_API_VERSION) || KVM_API_VERSION < 12 || KVM_API_VERSION > 12
1664
#error Invalid KVM version
1667
must_have_caps="KVM_CAP_USER_MEMORY \
1668
KVM_CAP_DESTROY_MEMORY_REGION_WORKS \
1669
KVM_CAP_COALESCED_MMIO \
1672
if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) ; then
1673
must_have_caps="$caps \
1674
KVM_CAP_SET_TSS_ADDR \
1676
KVM_CAP_CLOCKSOURCE \
1677
KVM_CAP_NOP_IO_DELAY \
1683
for c in $must_have_caps ; do
1686
#error Missing KVM capability $c
1691
int main(void) { return 0; }
1693
if test "$kerneldir" != "" ; then
1694
kvm_cflags=-I"$kerneldir"/include
1695
if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) \
1696
-a -d "$kerneldir/arch/x86/include" ; then
1697
kvm_cflags="$kvm_cflags -I$kerneldir/arch/x86/include"
1698
elif test "$cpu" = "ppc" -a -d "$kerneldir/arch/powerpc/include" ; then
1699
kvm_cflags="$kvm_cflags -I$kerneldir/arch/powerpc/include"
1700
elif test "$cpu" = "s390x" -a -d "$kerneldir/arch/s390/include" ; then
1701
kvm_cflags="$kvm_cflags -I$kerneldir/arch/s390/include"
1702
elif test -d "$kerneldir/arch/$cpu/include" ; then
1703
kvm_cflags="$kvm_cflags -I$kerneldir/arch/$cpu/include"
1706
kvm_cflags=`$pkg_config --cflags kvm-kmod 2>/dev/null`
1708
if compile_prog "$kvm_cflags" "" ; then
1711
#include <linux/kvm_para.h>
1712
int main(void) { return 0; }
1714
if compile_prog "$kvm_cflags" "" ; then
1718
if test "$kvm" = "yes" ; then
1719
if has awk && has grep; then
1720
kvmerr=`LANG=C $cc $QEMU_CFLAGS -o $TMPE $kvm_cflags $TMPC 2>&1 \
1722
| awk -F "error: " '{if (NR>1) printf(", "); printf("%s",$2);}'`
1723
if test "$kvmerr" != "" ; then
1724
echo -e "${kvmerr}\n\
1725
NOTE: To enable KVM support, update your kernel to 2.6.29+ or install \
1726
recent kvm-kmod from http://sourceforge.net/projects/kvm."
1729
feature_not_found "kvm"
1735
##########################################
1736
# test for vhost net
1738
if test "$vhost_net" != "no"; then
1739
if test "$kvm" != "no"; then
1741
#include <linux/vhost.h>
1742
int main(void) { return 0; }
1744
if compile_prog "$kvm_cflags" "" ; then
1747
if test "$vhost_net" = "yes" ; then
1748
feature_not_found "vhost-net"
1832
# glib support probe
1833
if test "$guest_agent" != "no" ; then
1834
if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
1835
glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
1836
glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
1837
libs_softmmu="$glib_libs $libs_softmmu"
1838
libs_tools="$glib_libs $libs_tools"
1753
if test "$vhost_net" = "yes" ; then
1754
echo "NOTE: vhost-net feature requires KVM (--enable-kvm)."
1755
feature_not_found "vhost-net"
1840
echo "glib-2.0 required to compile QEMU"
1792
1876
if test "$rbd" != "no" ; then
1793
1877
cat > $TMPC <<EOF
1794
1878
#include <stdio.h>
1795
#include <rados/librados.h>
1796
int main(void) { rados_initialize(0, NULL); return 0; }
1879
#include <rbd/librbd.h>
1882
rados_create(&cluster, NULL);
1886
rbd_libs="-lrbd -lrados"
1799
1887
if compile_prog "" "$rbd_libs" ; then
1803
#include <rados/librados.h>
1804
#ifndef CEPH_OSD_TMAP_SET
1805
#error missing CEPH_OSD_TMAP_SET
1808
int (*func)(const rados_pool_t pool, uint64_t *snapid) = rados_selfmanaged_snap_create;
1809
rados_initialize(0, NULL);
1813
if compile_prog "" "$rbd_libs" ; then
1815
libs_tools="$rbd_libs $libs_tools"
1816
libs_softmmu="$rbd_libs $libs_softmmu"
1819
librados_too_old=yes
1889
libs_tools="$rbd_libs $libs_tools"
1890
libs_softmmu="$rbd_libs $libs_softmmu"
1822
1892
if test "$rbd" = "yes" ; then
1823
1893
feature_not_found "rados block device"
1827
if test "$librados_too_old" = "yes" ; then
1828
echo "-> Your librados version is too old - upgrade needed to have rbd support"
1832
1899
##########################################
1908
1975
if compile_prog "" "$fdt_libs" ; then
1910
libs_softmmu="$fdt_libs $libs_softmmu"
1912
1978
if test "$fdt" = "yes" ; then
1913
1979
feature_not_found "fdt"
1986
##########################################
1987
# opengl probe, used by milkymist-tmu2
1988
if test "$opengl" != "no" ; then
1991
#include <X11/Xlib.h>
1994
int main(void) { GL_VERSION; return 0; }
1996
if compile_prog "" "-lGL" ; then
1999
if test "$opengl" = "yes" ; then
2000
feature_not_found "opengl"
1920
2008
# Check for xxxat() functions when we are building linux-user
1921
2009
# emulator. This is done because older glibc versions don't
2241
# check for epoll support
2244
#include <sys/epoll.h>
2252
if compile_prog "$ARCH_CFLAGS" "" ; then
2256
# epoll_create1 and epoll_pwait are later additions
2257
# so we must check separately for their presence
2260
#include <sys/epoll.h>
2264
/* Note that we use epoll_create1 as a value, not as
2265
* a function being called. This is necessary so that on
2266
* old SPARC glibc versions where the function was present in
2267
* the library but not declared in the header file we will
2268
* fail the configure check. (Otherwise we will get a compiler
2269
* warning but not an error, and will proceed to fail the
2270
* qemu compile where we compile with -Werror.)
2276
if compile_prog "$ARCH_CFLAGS" "" ; then
2282
#include <sys/epoll.h>
2286
epoll_pwait(0, 0, 0, 0, 0);
2290
if compile_prog "$ARCH_CFLAGS" "" ; then
2147
2294
# Check if tools are available to build documentation.
2148
2295
if test "$docs" != "no" ; then
2149
2296
if has makeinfo && has pod2man; then
2397
# check for libcacard for smartcard support
2398
if test "$smartcard" != "no" ; then
2401
# TODO - what's the minimal nss version we support?
2402
if test "$smartcard_nss" != "no"; then
2403
if $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 ; then
2405
smartcard_cflags="-I\$(SRC_PATH)/libcacard"
2406
libcacard_libs=$($pkg_config --libs nss 2>/dev/null)
2407
libcacard_cflags=$($pkg_config --cflags nss 2>/dev/null)
2408
QEMU_CFLAGS="$QEMU_CFLAGS $smartcard_cflags $libcacard_cflags"
2409
LIBS="$libcacard_libs $LIBS"
2411
if test "$smartcard_nss" = "yes"; then
2412
feature_not_found "nss"
2418
if test "$smartcard" = "no" ; then
2422
# check for usbredirparser for usb network redirection support
2423
if test "$usb_redir" != "no" ; then
2424
if $pkg_config libusbredirparser >/dev/null 2>&1 ; then
2426
usb_redir_cflags=$($pkg_config --cflags libusbredirparser 2>/dev/null)
2427
usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null)
2428
QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags"
2429
LIBS="$LIBS $usb_redir_libs"
2431
if test "$usb_redir" = "yes"; then
2432
feature_not_found "usb-redir"
2250
2438
##########################################
2252
2440
##########################################
2336
2530
##########################################
2531
# __sync_fetch_and_and requires at least -march=i486. Many toolchains
2532
# use i686 as default anyway, but for those that don't, an explicit
2533
# specification is necessary
2534
if test $vhost_net = "yes" && test $cpu = "i386"; then
2536
int sfaa(unsigned *ptr)
2538
return __sync_fetch_and_and(ptr, 0);
2541
int main(int argc, char **argv)
2548
if ! compile_prog "" "" ; then
2549
CFLAGS+="-march=i486"
2553
##########################################
2337
2554
# End of CC checks
2338
2555
# After here, no more $cc or $ld runs
2390
2607
tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
2391
2608
if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
2392
2609
tools="qemu-nbd\$(EXESUF) $tools"
2610
if [ "$guest_agent" = "yes" ]; then
2611
tools="qemu-ga\$(EXESUF) $tools"
2393
2613
if [ "$check_utests" = "yes" ]; then
2394
2614
tools="check-qint check-qstring check-qdict check-qlist $tools"
2395
2615
tools="check-qfloat check-qjson $tools"
2404
2624
"$softmmu" = yes ; then
2405
2625
roms="optionrom"
2627
if test "$cpu" = "ppc64" -a "$targetos" != "Darwin" ; then
2628
roms="$roms spapr-rtas"
2409
2631
echo "Install prefix $prefix"
2410
2632
echo "BIOS directory `eval echo $datadir`"
2411
2633
echo "binary directory `eval echo $bindir`"
2634
echo "library directory `eval echo $libdir`"
2412
2635
echo "config directory `eval echo $sysconfdir`"
2413
2636
if test "$mingw32" = "no" ; then
2414
2637
echo "Manual directory `eval echo $mandir`"
2445
2669
echo "Extra audio cards $audio_card_list"
2446
2670
echo "Block whitelist $block_drv_whitelist"
2447
2671
echo "Mixer emulation $mixemu"
2448
echo "VNC TLS support $vnc_tls"
2449
echo "VNC SASL support $vnc_sasl"
2450
echo "VNC JPEG support $vnc_jpeg"
2451
echo "VNC PNG support $vnc_png"
2452
echo "VNC thread $vnc_thread"
2672
echo "VNC support $vnc"
2673
if test "$vnc" = "yes" ; then
2674
echo "VNC TLS support $vnc_tls"
2675
echo "VNC SASL support $vnc_sasl"
2676
echo "VNC JPEG support $vnc_jpeg"
2677
echo "VNC PNG support $vnc_png"
2678
echo "VNC thread $vnc_thread"
2453
2680
if test -n "$sparc_cpu"; then
2454
2681
echo "Target Sparc Arch $sparc_cpu"
2480
2707
echo "spice support $spice"
2481
2708
echo "rbd support $rbd"
2482
2709
echo "xfsctl support $xfs"
2710
echo "nss used $smartcard_nss"
2711
echo "usb net redir $usb_redir"
2712
echo "OpenGL support $opengl"
2713
echo "build guest agent $guest_agent"
2484
2715
if test $sdl_too_old = "yes"; then
2485
2716
echo "-> Your SDL version is too old - please upgrade to have SDL support"
2607
2842
echo "CONFIG_VNC_SASL=y" >> $config_host_mak
2608
2843
echo "VNC_SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak
2610
if test "$vnc_jpeg" != "no" ; then
2845
if test "$vnc_jpeg" = "yes" ; then
2611
2846
echo "CONFIG_VNC_JPEG=y" >> $config_host_mak
2612
2847
echo "VNC_JPEG_CFLAGS=$vnc_jpeg_cflags" >> $config_host_mak
2614
if test "$vnc_png" != "no" ; then
2849
if test "$vnc_png" = "yes" ; then
2615
2850
echo "CONFIG_VNC_PNG=y" >> $config_host_mak
2616
2851
echo "VNC_PNG_CFLAGS=$vnc_png_cflags" >> $config_host_mak
2618
if test "$vnc_thread" != "no" ; then
2853
if test "$vnc_thread" = "yes" ; then
2619
2854
echo "CONFIG_VNC_THREAD=y" >> $config_host_mak
2620
echo "CONFIG_THREAD=y" >> $config_host_mak
2622
2856
if test "$fnmatch" = "yes" ; then
2623
2857
echo "CONFIG_FNMATCH=y" >> $config_host_mak
2676
2910
if test "$dup3" = "yes" ; then
2677
2911
echo "CONFIG_DUP3=y" >> $config_host_mak
2913
if test "$epoll" = "yes" ; then
2914
echo "CONFIG_EPOLL=y" >> $config_host_mak
2916
if test "$epoll_create1" = "yes" ; then
2917
echo "CONFIG_EPOLL_CREATE1=y" >> $config_host_mak
2919
if test "$epoll_pwait" = "yes" ; then
2920
echo "CONFIG_EPOLL_PWAIT=y" >> $config_host_mak
2679
2922
if test "$inotify" = "yes" ; then
2680
2923
echo "CONFIG_INOTIFY=y" >> $config_host_mak
2699
2942
echo "CONFIG_BLUEZ=y" >> $config_host_mak
2700
2943
echo "BLUEZ_CFLAGS=$bluez_cflags" >> $config_host_mak
2945
echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
2702
2946
if test "$xen" = "yes" ; then
2703
echo "CONFIG_XEN=y" >> $config_host_mak
2947
echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
2948
echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
2705
2950
if test "$io_thread" = "yes" ; then
2706
2951
echo "CONFIG_IOTHREAD=y" >> $config_host_mak
2707
echo "CONFIG_THREAD=y" >> $config_host_mak
2709
2953
if test "$linux_aio" = "yes" ; then
2710
2954
echo "CONFIG_LINUX_AIO=y" >> $config_host_mak
2752
2996
echo "CONFIG_SPICE=y" >> $config_host_mak
2999
if test "$smartcard" = "yes" ; then
3000
echo "CONFIG_SMARTCARD=y" >> $config_host_mak
3003
if test "$smartcard_nss" = "yes" ; then
3004
echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak
3007
if test "$usb_redir" = "yes" ; then
3008
echo "CONFIG_USB_REDIR=y" >> $config_host_mak
3011
if test "$opengl" = "yes" ; then
3012
echo "CONFIG_OPENGL=y" >> $config_host_mak
2755
3015
# XXX: suppress that
2756
3016
if [ "$bsd" = "yes" ] ; then
2757
3017
echo "CONFIG_BSD=y" >> $config_host_mak
2799
3059
echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_host_mak
2800
3060
echo "INSTALL_DATA=$install -m0644 -p" >> $config_host_mak
2801
3061
echo "INSTALL_PROG=$install -m0755 -p" >> $config_host_mak
3062
echo "PYTHON=$python" >> $config_host_mak
2802
3063
echo "CC=$cc" >> $config_host_mak
2803
3064
echo "CC_I386=$cc_i386" >> $config_host_mak
2804
3065
echo "HOST_CC=$host_cc" >> $config_host_mak
2806
3067
echo "OBJCOPY=$objcopy" >> $config_host_mak
2807
3068
echo "LD=$ld" >> $config_host_mak
2808
3069
echo "WINDRES=$windres" >> $config_host_mak
3070
echo "LIBTOOL=$libtool" >> $config_host_mak
2809
3071
echo "CFLAGS=$CFLAGS" >> $config_host_mak
2810
3072
echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
2811
3073
echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
3013
3300
target_phys_bits=64
3016
3304
target_phys_bits=64
3305
target_long_alignment=8
3019
3311
echo "Unsupported target CPU"
3315
echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak
3316
echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak
3317
echo "TARGET_LONG_ALIGNMENT=$target_long_alignment" >> $config_target_mak
3318
echo "TARGET_LLONG_ALIGNMENT=$target_llong_alignment" >> $config_target_mak
3023
3319
echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak
3024
3320
target_arch_name="`echo $TARGET_ARCH | tr '[:lower:]' '[:upper:]'`"
3025
3321
echo "TARGET_$target_arch_name=y" >> $config_target_mak
3046
3346
\( "$target_arch2" = "$cpu" -o \
3047
3347
\( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc" \) -o \
3048
3348
\( "$target_arch2" = "ppc64" -a "$cpu" = "ppc" \) -o \
3349
\( "$target_arch2" = "ppc" -a "$cpu" = "ppc64" \) -o \
3350
\( "$target_arch2" = "ppcemb" -a "$cpu" = "ppc64" \) -o \
3049
3351
\( "$target_arch2" = "x86_64" -a "$cpu" = "i386" \) -o \
3050
3352
\( "$target_arch2" = "i386" -a "$cpu" = "x86_64" \) \) ; then
3051
3353
echo "CONFIG_KVM=y" >> $config_target_mak
3052
echo "KVM_CFLAGS=$kvm_cflags" >> $config_target_mak
3053
if test "$kvm_para" = "yes"; then
3054
echo "CONFIG_KVM_PARA=y" >> $config_target_mak
3056
3354
if test $vhost_net = "yes" ; then
3057
3355
echo "CONFIG_VHOST_NET=y" >> $config_target_mak
3064
3362
if test "$target_softmmu" = "yes" ; then
3065
3363
echo "TARGET_PHYS_ADDR_BITS=$target_phys_bits" >> $config_target_mak
3066
3364
echo "CONFIG_SOFTMMU=y" >> $config_target_mak
3067
echo "LIBS+=$libs_softmmu" >> $config_target_mak
3365
echo "LIBS+=$libs_softmmu $target_libs_softmmu" >> $config_target_mak
3068
3366
echo "HWDIR=../libhw$target_phys_bits" >> $config_target_mak
3069
3367
echo "subdir-$target: subdir-libhw$target_phys_bits" >> $config_host_mak
3077
3375
if test "$target_darwin_user" = "yes" ; then
3078
3376
echo "CONFIG_DARWIN_USER=y" >> $config_target_mak
3378
if test "$smartcard_nss" = "yes" ; then
3379
echo "subdir-$target: subdir-libcacard" >> $config_host_mak
3380
echo "libcacard_libs=$libcacard_libs" >> $config_host_mak
3381
echo "libcacard_cflags=$libcacard_cflags" >> $config_host_mak
3081
3384
if test ! -z "$gdb_xml_files" ; then
3082
3385
for x in $gdb_xml_files; do
3547
# use included Linux headers
3548
if test "$linux" = "yes" ; then
3549
includes="-I\$(SRC_PATH)/linux-headers $includes"
3550
mkdir -p linux-headers
3553
symlink $source_path/linux-headers/asm-x86 linux-headers/asm
3556
symlink $source_path/linux-headers/asm-powerpc linux-headers/asm
3559
symlink $source_path/linux-headers/asm-s390 linux-headers/asm
3250
3564
echo "LDFLAGS+=$ldflags" >> $config_target_mak
3251
3565
echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
3252
3566
echo "QEMU_INCLUDES+=$includes" >> $config_target_mak
3256
3570
# build tree in object directory in case the source is not in the current directory
3257
3571
DIRS="tests tests/cris slirp audio block net pc-bios/optionrom"
3572
DIRS="$DIRS pc-bios/spapr-rtas"
3258
3573
DIRS="$DIRS roms/seabios roms/vgabios"
3259
3574
DIRS="$DIRS fsdev ui"
3260
3577
FILES="Makefile tests/Makefile"
3261
3578
FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
3262
3579
FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
3580
FILES="$FILES pc-bios/spapr-rtas/Makefile"
3263
3581
FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
3264
for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.dtb $source_path/pc-bios/openbios-*; do
3582
for bios_file in $source_path/pc-bios/*.bin $source_path/pc-bios/*.rom $source_path/pc-bios/*.dtb $source_path/pc-bios/openbios-*; do
3265
3583
FILES="$FILES pc-bios/`basename $bios_file`"
3268
3586
for f in $FILES ; do
3269
test -e $f || symlink $source_path/$f $f
3587
if [ -e "$source_path/$f" ] && ! [ -e "$f" ]; then
3588
symlink "$source_path/$f" "$f"
3272
3592
# temporary config to build submodules