Merge branch 'qemu-cvs'
[qemu-kvm/fedora.git] / configure
blob92299b9891eac2e9c7b2e8d041478c99a8fccf58
1 #!/bin/sh
3 # qemu configure script (c) 2003 Fabrice Bellard
5 # set temporary file name
6 if test ! -z "$TMPDIR" ; then
7 TMPDIR1="${TMPDIR}"
8 elif test ! -z "$TEMPDIR" ; then
9 TMPDIR1="${TEMPDIR}"
10 else
11 TMPDIR1="/tmp"
14 TMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c"
15 TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o"
16 TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}"
17 TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S"
19 # default parameters
20 prefix=""
21 interp_prefix="/usr/gnemul/qemu-%M"
22 static="no"
23 cross_prefix=""
24 cc="gcc"
25 gcc3_search="yes"
26 gcc3_list="gcc-3.4.6 gcc-3.4 gcc34 gcc-3.3.6 gcc-3.3 gcc33 gcc-3.2 gcc32"
27 host_cc="gcc"
28 ar="ar"
29 make="make"
30 install="install"
31 strip="strip"
32 cpu=`uname -m`
33 target_list=""
34 case "$cpu" in
35 i386|i486|i586|i686|i86pc|BePC)
36 cpu="i386"
38 armv*b)
39 cpu="armv4b"
41 armv*l)
42 cpu="armv4l"
44 alpha)
45 cpu="alpha"
47 "Power Macintosh"|ppc|ppc64)
48 cpu="powerpc"
50 mips)
51 cpu="mips"
53 mips64)
54 cpu="mips64"
56 cris)
57 cpu="cris"
59 s390*)
60 cpu="s390"
62 sparc|sun4[cdmuv])
63 cpu="sparc"
65 sparc64)
66 cpu="sparc64"
68 ia64)
69 cpu="ia64"
71 m68k)
72 cpu="m68k"
74 x86_64|amd64)
75 cpu="x86_64"
78 cpu="unknown"
80 esac
81 gprof="no"
82 bigendian="no"
83 mingw32="no"
84 EXESUF=""
85 gdbstub="yes"
86 slirp="yes"
87 adlib="no"
88 ac97="no"
89 gus="no"
90 oss="no"
91 dsound="no"
92 coreaudio="no"
93 alsa="no"
94 esd="no"
95 fmod="no"
96 fmod_lib=""
97 fmod_inc=""
98 vnc_tls="yes"
99 bsd="no"
100 linux="no"
101 kqemu="no"
102 kvm="no"
103 profiler="no"
104 kernel_path=""
105 cocoa="no"
106 check_gfx="yes"
107 check_gcc="yes"
108 softmmu="yes"
109 linux_user="no"
110 darwin_user="no"
111 build_docs="no"
112 uname_release=""
114 # OS specific
115 targetos=`uname -s`
116 case $targetos in
117 CYGWIN*)
118 mingw32="yes"
119 OS_CFLAGS="-mno-cygwin"
120 if [ "$cpu" = "i386" ] ; then
121 kqemu="yes"
124 MINGW32*)
125 mingw32="yes"
126 if [ "$cpu" = "i386" ] ; then
127 kqemu="yes"
130 GNU/kFreeBSD)
131 oss="yes"
132 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
133 kqemu="yes"
136 FreeBSD)
137 bsd="yes"
138 oss="yes"
139 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
140 kqemu="yes"
141 kvm="yes"
144 NetBSD)
145 bsd="yes"
146 oss="yes"
148 OpenBSD)
149 bsd="yes"
150 oss="yes"
152 Darwin)
153 bsd="yes"
154 darwin="yes"
155 darwin_user="yes"
156 cocoa="yes"
157 coreaudio="yes"
158 OS_CFLAGS="-mdynamic-no-pic"
159 OS_LDFLAGS="-framework CoreFoundation -framework IOKit"
161 SunOS)
162 solaris="yes"
163 make="gmake"
164 install="ginstall"
165 needs_libsunmath="no"
166 solarisrev=`uname -r | cut -f2 -d.`
167 # have to select again, because `uname -m` returns i86pc
168 # even on an x86_64 box.
169 solariscpu=`isainfo -k`
170 if test "${solariscpu}" = "amd64" ; then
171 cpu="x86_64"
173 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
174 if test "$solarisrev" -le 9 ; then
175 if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then
176 needs_libsunmath="yes"
177 else
178 echo "QEMU will not link correctly on Solaris 8/X86 or 9/x86 without"
179 echo "libsunmath from the Sun Studio compilers tools, due to a lack of"
180 echo "C99 math features in libm.so in Solaris 8/x86 and Solaris 9/x86"
181 echo "Studio 11 can be downloaded from www.sun.com."
182 exit 1
185 if test "$solarisrev" -ge 9 ; then
186 kqemu="yes"
189 if test -f /usr/include/sys/soundcard.h ; then
190 oss=yes
194 oss="yes"
195 linux="yes"
196 linux_user="yes"
197 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
198 kqemu="yes"
199 kvm="yes"
201 if [ "$cpu" = "ia64" ] ; then
202 kvm="yes"
203 gdbstub="no"
204 slirp="no"
206 if [ "$cpu" = "powerpc" ]; then
207 kvm="yes"
210 esac
212 if [ "$bsd" = "yes" ] ; then
213 if [ "$darwin" != "yes" ] ; then
214 make="gmake"
218 # find source path
219 source_path=`dirname "$0"`
220 source_path_used="no"
221 workdir=`pwd`
222 if [ -z "$source_path" ]; then
223 source_path=$workdir
224 else
225 source_path=`cd "$source_path"; pwd`
227 [ -f "$workdir/vl.c" ] || source_path_used="yes"
229 werror="no"
230 # generate compile errors on warnings for development builds
231 #if grep cvs $source_path/VERSION > /dev/null 2>&1 ; then
232 #werror="yes";
235 for opt do
236 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
237 case "$opt" in
238 --help|-h) show_help=yes
240 --prefix=*) prefix="$optarg"
242 --interp-prefix=*) interp_prefix="$optarg"
244 --source-path=*) source_path="$optarg"
245 source_path_used="yes"
247 --cross-prefix=*) cross_prefix="$optarg"
249 --cc=*) cc="$optarg"
250 gcc3_search="no"
252 --host-cc=*) host_cc="$optarg"
254 --make=*) make="$optarg"
256 --install=*) install="$optarg"
258 --extra-cflags=*) CFLAGS="$optarg"
260 --extra-ldflags=*) LDFLAGS="$optarg"
262 --cpu=*) cpu="$optarg"
264 --target-list=*) target_list="$optarg"
266 --enable-gprof) gprof="yes"
268 --static) static="yes"
270 --disable-sdl) sdl="no"
272 --enable-coreaudio) coreaudio="yes"
274 --enable-alsa) alsa="yes"
276 --enable-esd) esd="yes"
278 --enable-dsound) dsound="yes"
280 --enable-fmod) fmod="yes"
282 --fmod-lib=*) fmod_lib="$optarg"
284 --fmod-inc=*) fmod_inc="$optarg"
286 --disable-vnc-tls) vnc_tls="no"
288 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; linux_user="no"
290 --disable-slirp) slirp="no"
292 --enable-adlib) adlib="yes"
294 --enable-ac97) ac97="yes"
296 --enable-gus) gus="yes"
298 --disable-kqemu) kqemu="no"
300 --disable-kvm) kvm="no"
302 --enable-profiler) profiler="yes"
304 --kernel-path=*) kernel_path="$optarg"
306 --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no"
308 --disable-gfx-check) check_gfx="no"
310 --disable-gcc-check) check_gcc="no"
312 --disable-system) softmmu="no"
314 --enable-system) softmmu="yes"
316 --disable-linux-user) linux_user="no"
318 --enable-linux-user) linux_user="yes"
320 --disable-darwin-user) darwin_user="no"
322 --enable-darwin-user) darwin_user="yes"
324 --enable-uname-release=*) uname_release="$optarg"
326 --sparc_cpu=*)
327 sparc_cpu="$optarg"
328 case $sparc_cpu in
329 v7|v8) SP_CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32"
330 target_cpu="sparc"; cpu="sparc" ;;
331 v8plus|v8plusa) SP_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32"
332 target_cpu="sparc"; cpu="sparc" ;;
333 v9) SP_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m64"
334 target_cpu="sparc64"; cpu="sparc64" ;;
335 *) echo "undefined SPARC architecture. Exiting";exit 1;;
336 esac
338 --enable-werror) werror="yes"
340 --disable-werror) werror="no"
342 *) echo "ERROR: unknown option $opt"; exit 1
344 esac
345 done
347 if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then
348 AIOLIBS=
349 else
350 # Some Linux architectures (e.g. s390) don't imply -lpthread automatically.
351 AIOLIBS="-lrt -lpthread"
354 # default flags for all hosts
355 CFLAGS="$CFLAGS -Wall -O2 -g -fno-strict-aliasing"
356 LDFLAGS="$LDFLAGS -g"
357 if test "$werror" = "yes" ; then
358 CFLAGS="$CFLAGS -Werror"
362 # If cpu ~= sparc and sparc_cpu hasn't been defined, plug in the right
363 # ARCH_CFLAGS/ARCH_LDFLAGS (assume sparc_v8plus for 32-bit and sparc_v9 for 64-bit)
365 case "$cpu" in
366 sparc) if test -z "$sparc_cpu" ; then
367 ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v8plus__"
368 ARCH_LDFLAGS="-m32"
369 else
370 ARCH_CFLAGS="${SP_CFLAGS}"
371 ARCH_LDFLAGS="${SP_LDFLAGS}"
374 sparc64) if test -z "$sparc_cpu" ; then
375 ARCH_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_v9__"
376 ARCH_LDFLAGS="-m64"
377 else
378 ARCH_CFLAGS="${SP_CFLAGS}"
379 ARCH_LDFLAGS="${SP_LDFLAGS}"
382 s390)
383 ARCH_CFLAGS="-march=z900"
385 i386)
386 ARCH_CFLAGS="-m32"
387 ARCH_LDFLAGS="-m32"
389 x86_64)
390 ARCH_CFLAGS="-m64"
391 ARCH_LDFLAGS="-m64"
393 esac
395 if test x"$show_help" = x"yes" ; then
396 cat << EOF
398 Usage: configure [options]
399 Options: [defaults in brackets after descriptions]
402 echo "Standard options:"
403 echo " --help print this message"
404 echo " --prefix=PREFIX install in PREFIX [$prefix]"
405 echo " --interp-prefix=PREFIX where to find shared libraries, etc."
406 echo " use %M for cpu name [$interp_prefix]"
407 echo " --target-list=LIST set target list [$target_list]"
408 echo ""
409 echo "kqemu kernel acceleration support:"
410 echo " --disable-kqemu disable kqemu support"
411 echo " --kernel-path=PATH set the kernel path (configure probes it)"
412 echo " --disable-kvm disable kernel virtual machine support"
413 echo ""
414 echo "Advanced options (experts only):"
415 echo " --source-path=PATH path of source code [$source_path]"
416 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
417 echo " --cc=CC use C compiler CC [$cc]"
418 echo " --host-cc=CC use C compiler CC [$host_cc] for dyngen etc."
419 echo " --make=MAKE use specified make [$make]"
420 echo " --install=INSTALL use specified install [$install]"
421 echo " --static enable static build [$static]"
422 echo " --disable-werror disable compilation abort on warning"
423 echo " --disable-sdl disable SDL"
424 echo " --enable-cocoa enable COCOA (Mac OS X only)"
425 echo " --enable-mingw32 enable Win32 cross compilation with mingw32"
426 echo " --enable-adlib enable Adlib emulation"
427 echo " --enable-ac97 enable AC97 emulation"
428 echo " --enable-gus enable Gravis Ultrasound emulation"
429 echo " --enable-coreaudio enable Coreaudio audio driver"
430 echo " --enable-alsa enable ALSA audio driver"
431 echo " --enable-esd enable EsoundD audio driver"
432 echo " --enable-fmod enable FMOD audio driver"
433 echo " --enable-dsound enable DirectSound audio driver"
434 echo " --disable-vnc-tls disable TLS encryption for VNC server"
435 echo " --enable-system enable all system emulation targets"
436 echo " --disable-system disable all system emulation targets"
437 echo " --enable-linux-user enable all linux usermode emulation targets"
438 echo " --disable-linux-user disable all linux usermode emulation targets"
439 echo " --enable-darwin-user enable all darwin usermode emulation targets"
440 echo " --disable-darwin-user disable all darwin usermode emulation targets"
441 echo " --fmod-lib path to FMOD library"
442 echo " --fmod-inc path to FMOD includes"
443 echo " --enable-uname-release=R Return R for uname -r in usermode emulation"
444 echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
445 echo ""
446 echo "NOTE: The object files are built at the place where configure is launched"
447 exit 1
450 cc="${cross_prefix}${cc}"
451 ar="${cross_prefix}${ar}"
452 strip="${cross_prefix}${strip}"
454 # check that the C compiler works.
455 cat > $TMPC <<EOF
456 int main(void) {}
459 if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC 2> /dev/null ; then
460 : C compiler works ok
461 else
462 echo "ERROR: \"$cc\" either does not exist or does not work"
463 exit 1
466 if test "$mingw32" = "yes" ; then
467 linux="no"
468 EXESUF=".exe"
469 oss="no"
472 # Check for gcc4, error if pre-gcc4
473 if test "$check_gcc" = "yes" ; then
474 cat > $TMPC <<EOF
475 #if __GNUC__ < 4
476 #error gcc3
477 #endif
478 int main(){return 0;}
480 if "$cc" $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
481 echo "WARNING: \"$cc\" looks like gcc 4.x"
482 found_compat_cc="no"
483 if test "$gcc3_search" = "yes" ; then
484 echo "Looking for gcc 3.x"
485 for compat_cc in $gcc3_list ; do
486 if "$cross_prefix$compat_cc" --version 2> /dev/null | fgrep '(GCC) 3.' > /dev/null 2>&1 ; then
487 echo "Found \"$compat_cc\""
488 cc="$cross_prefix$compat_cc"
489 found_compat_cc="yes"
490 break
492 done
493 if test "$found_compat_cc" = "no" ; then
494 echo "gcc 3.x not found!"
497 if test "$found_compat_cc" = "no" ; then
498 echo "QEMU is known to have problems when compiled with gcc 4.x"
499 echo "It is recommended that you use gcc 3.x to build QEMU"
500 echo "To use this compiler anyway, configure with --disable-gcc-check"
501 exit 1;
507 # Solaris specific configure tool chain decisions
509 if test "$solaris" = "yes" ; then
511 # gcc for solaris 10/fcs in /usr/sfw/bin doesn't compile qemu correctly
512 # override the check with --disable-gcc-check
514 if test "$solarisrev" -eq 10 -a "$check_gcc" = "yes" ; then
515 solgcc=`which $cc`
516 if test "$solgcc" = "/usr/sfw/bin/gcc" ; then
517 echo "Solaris 10/FCS gcc in /usr/sfw/bin will not compiled qemu correctly."
518 echo "please get gcc-3.4.3 or later, from www.blastwave.org using pkg-get -i gcc3"
519 echo "or get the latest patch from SunSolve for gcc"
520 exit 1
523 solinst=`which $install 2> /dev/null | /usr/bin/grep -v "no $install in"`
524 if test -z "$solinst" ; then
525 echo "Solaris install program not found. Use --install=/usr/ucb/install or"
526 echo "install fileutils from www.blastwave.org using pkg-get -i fileutils"
527 echo "to get ginstall which is used by default (which lives in /opt/csw/bin)"
528 exit 1
530 if test "$solinst" = "/usr/sbin/install" ; then
531 echo "Error: Solaris /usr/sbin/install is not an appropriate install program."
532 echo "try ginstall from the GNU fileutils available from www.blastwave.org"
533 echo "using pkg-get -i fileutils, or use --install=/usr/ucb/install"
534 exit 1
536 sol_ar=`which ar 2> /dev/null | /usr/bin/grep -v "no ar in"`
537 if test -z "$sol_ar" ; then
538 echo "Error: No path includes ar"
539 if test -f /usr/ccs/bin/ar ; then
540 echo "Add /usr/ccs/bin to your path and rerun configure"
542 exit 1
547 if test -z "$target_list" ; then
548 # these targets are portable
549 if [ "$softmmu" = "yes" ] ; then
550 target_list="i386-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu m68k-softmmu sh4-softmmu sh4eb-softmmu cris-softmmu"
552 # the following are Linux specific
553 if [ "$linux_user" = "yes" ] ; then
554 target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user sh4-linux-user sh4eb-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user x86_64-linux-user cris-linux-user $target_list"
556 # the following are Darwin specific
557 if [ "$darwin_user" = "yes" ] ; then
558 target_list="i386-darwin-user ppc-darwin-user $target_list"
560 else
561 target_list=`echo "$target_list" | sed -e 's/,/ /g'`
563 if test -z "$target_list" ; then
564 echo "No targets enabled"
565 exit 1
568 if test -z "$cross_prefix" ; then
570 # ---
571 # big/little endian test
572 cat > $TMPC << EOF
573 #include <inttypes.h>
574 int main(int argc, char ** argv){
575 volatile uint32_t i=0x01234567;
576 return (*((uint8_t*)(&i))) == 0x67;
580 if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
581 $TMPE && bigendian="yes"
582 else
583 echo big/little test failed
586 else
588 # if cross compiling, cannot launch a program, so make a static guess
589 if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "mips64" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then
590 bigendian="yes"
595 # host long bits test
596 hostlongbits="32"
597 if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then
598 hostlongbits="64"
601 # check gcc options support
602 cat > $TMPC <<EOF
603 int main(void) {
607 ##########################################
608 # SDL probe
610 sdl_too_old=no
612 if test -z "$sdl" ; then
613 sdl_config="sdl-config"
614 sdl=no
615 sdl_static=no
617 if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
618 # win32 cross compilation case
619 sdl_config="i386-mingw32msvc-sdl-config"
620 sdl=yes
621 else
622 # normal SDL probe
623 cat > $TMPC << EOF
624 #include <SDL.h>
625 #undef main /* We don't want SDL to override our main() */
626 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
628 if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /tmp/qemu-$$-sdl-config.log ; then
629 _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
630 if test "$_sdlversion" -lt 121 ; then
631 sdl_too_old=yes
632 else
633 if test "$cocoa" = "no" ; then
634 sdl=yes
638 # static link with sdl ?
639 if test "$sdl" = "yes" ; then
640 aa="no"
641 `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
642 sdl_static_libs=`$sdl_config --static-libs 2>/dev/null`
643 if [ "$aa" = "yes" ] ; then
644 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
647 if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
648 sdl_static=yes
650 fi # static link
651 fi # sdl compile test
652 fi # cross compilation
653 else
654 # Make sure to disable cocoa if sdl was set
655 if test "$sdl" = "yes" ; then
656 cocoa="no"
657 coreaudio="no"
659 fi # -z $sdl
661 ##########################################
662 # VNC TLS detection
663 if test "$vnc_tls" = "yes" ; then
664 `pkg-config gnutls` || vnc_tls="no"
666 if test "$vnc_tls" = "yes" ; then
667 vnc_tls_cflags=`pkg-config --cflags gnutls`
668 vnc_tls_libs=`pkg-config --libs gnutls`
671 ##########################################
672 # alsa sound support libraries
674 if test "$alsa" = "yes" ; then
675 cat > $TMPC << EOF
676 #include <alsa/asoundlib.h>
677 int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); }
679 if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lasound 2> /dev/null ; then
681 else
682 echo
683 echo "Error: Could not find alsa"
684 echo "Make sure to have the alsa libs and headers installed."
685 echo
686 exit 1
690 # Check if tools are available to build documentation.
691 if [ -x "`which texi2html 2>/dev/null`" ] && \
692 [ -x "`which pod2man 2>/dev/null`" ]; then
693 build_docs="yes"
696 if test "$mingw32" = "yes" ; then
697 if test -z "$prefix" ; then
698 prefix="/c/Program Files/Qemu"
700 mansuffix=""
701 datasuffix=""
702 docsuffix=""
703 binsuffix=""
704 else
705 if test -z "$prefix" ; then
706 prefix="/usr/local"
708 mansuffix="/share/man"
709 datasuffix="/share/qemu"
710 docsuffix="/share/doc/qemu"
711 binsuffix="/bin"
714 echo "Install prefix $prefix"
715 echo "BIOS directory $prefix$datasuffix"
716 echo "binary directory $prefix$binsuffix"
717 if test "$mingw32" = "no" ; then
718 echo "Manual directory $prefix$mansuffix"
719 echo "ELF interp prefix $interp_prefix"
721 echo "Source path $source_path"
722 echo "C compiler $cc"
723 echo "Host C compiler $host_cc"
724 echo "ARCH_CFLAGS $ARCH_CFLAGS"
725 echo "make $make"
726 echo "install $install"
727 echo "host CPU $cpu"
728 echo "host big endian $bigendian"
729 echo "target list $target_list"
730 echo "gprof enabled $gprof"
731 echo "profiler $profiler"
732 echo "static build $static"
733 echo "-Werror enabled $werror"
734 if test "$darwin" = "yes" ; then
735 echo "Cocoa support $cocoa"
737 echo "SDL support $sdl"
738 if test "$sdl" != "no" ; then
739 echo "SDL static link $sdl_static"
741 echo "mingw32 support $mingw32"
742 echo "Adlib support $adlib"
743 echo "AC97 support $ac97"
744 echo "GUS support $gus"
745 echo "CoreAudio support $coreaudio"
746 echo "ALSA support $alsa"
747 echo "EsounD support $esd"
748 echo "DSound support $dsound"
749 if test "$fmod" = "yes"; then
750 if test -z $fmod_lib || test -z $fmod_inc; then
751 echo
752 echo "Error: You must specify path to FMOD library and headers"
753 echo "Example: --fmod-inc=/path/include/fmod --fmod-lib=/path/lib/libfmod-3.74.so"
754 echo
755 exit 1
757 fmod_support=" (lib='$fmod_lib' include='$fmod_inc')"
758 else
759 fmod_support=""
761 echo "FMOD support $fmod $fmod_support"
762 echo "OSS support $oss"
763 echo "VNC TLS support $vnc_tls"
764 if test "$vnc_tls" = "yes" ; then
765 echo " TLS CFLAGS $vnc_tls_cflags"
766 echo " TLS LIBS $vnc_tls_libs"
768 if test -n "$sparc_cpu"; then
769 echo "Target Sparc Arch $sparc_cpu"
771 echo "kqemu support $kqemu"
772 echo "kvm support $kvm"
773 echo "Documentation $build_docs"
774 [ ! -z "$uname_release" ] && \
775 echo "uname -r $uname_release"
777 if test $sdl_too_old = "yes"; then
778 echo "-> Your SDL version is too old - please upgrade to have SDL support"
780 if [ -s /tmp/qemu-$$-sdl-config.log ]; then
781 echo "The error log from compiling the libSDL test is: "
782 cat /tmp/qemu-$$-sdl-config.log
784 rm -f /tmp/qemu-$$-sdl-config.log
785 #if test "$sdl_static" = "no"; then
786 # echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output"
788 config_mak="config-host.mak"
789 config_h="config-host.h"
791 #echo "Creating $config_mak and $config_h"
793 test -f $config_h && mv $config_h ${config_h}~
795 echo "# Automatically generated by configure - do not modify" > $config_mak
796 echo "# Configured with: $0 $@" >> $config_mak
797 echo "/* Automatically generated by configure - do not modify */" > $config_h
799 echo "prefix=$prefix" >> $config_mak
800 echo "bindir=\${prefix}$binsuffix" >> $config_mak
801 echo "mandir=\${prefix}$mansuffix" >> $config_mak
802 echo "datadir=\${prefix}$datasuffix" >> $config_mak
803 echo "docdir=\${prefix}$docsuffix" >> $config_mak
804 echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h
805 echo "MAKE=$make" >> $config_mak
806 echo "INSTALL=$install" >> $config_mak
807 echo "CC=$cc" >> $config_mak
808 echo "HOST_CC=$host_cc" >> $config_mak
809 echo "AR=$ar" >> $config_mak
810 echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
811 # XXX: only use CFLAGS and LDFLAGS ?
812 # XXX: should export HOST_CFLAGS and HOST_LDFLAGS for cross
813 # compilation of dyngen tool (useful for win32 build on Linux host)
814 echo "OS_CFLAGS=$OS_CFLAGS" >> $config_mak
815 echo "OS_LDFLAGS=$OS_LDFLAGS" >> $config_mak
816 echo "ARCH_CFLAGS=$ARCH_CFLAGS" >> $config_mak
817 echo "ARCH_LDFLAGS=$ARCH_LDFLAGS" >> $config_mak
818 echo "CFLAGS=$CFLAGS" >> $config_mak
819 echo "LDFLAGS=$LDFLAGS" >> $config_mak
820 echo "EXESUF=$EXESUF" >> $config_mak
821 echo "AIOLIBS=$AIOLIBS" >> $config_mak
822 if test "$cpu" = "i386" ; then
823 echo "ARCH=i386" >> $config_mak
824 echo "#define HOST_I386 1" >> $config_h
825 elif test "$cpu" = "x86_64" ; then
826 echo "ARCH=x86_64" >> $config_mak
827 echo "#define HOST_X86_64 1" >> $config_h
828 elif test "$cpu" = "armv4b" ; then
829 echo "ARCH=arm" >> $config_mak
830 echo "#define HOST_ARM 1" >> $config_h
831 elif test "$cpu" = "armv4l" ; then
832 echo "ARCH=arm" >> $config_mak
833 echo "#define HOST_ARM 1" >> $config_h
834 elif test "$cpu" = "powerpc" ; then
835 echo "ARCH=ppc" >> $config_mak
836 echo "#define HOST_PPC 1" >> $config_h
837 elif test "$cpu" = "mips" ; then
838 echo "ARCH=mips" >> $config_mak
839 echo "#define HOST_MIPS 1" >> $config_h
840 elif test "$cpu" = "mips64" ; then
841 echo "ARCH=mips64" >> $config_mak
842 echo "#define HOST_MIPS64 1" >> $config_h
843 elif test "$cpu" = "cris" ; then
844 echo "ARCH=cris" >> $config_mak
845 echo "#define HOST_CRIS 1" >> $config_h
846 elif test "$cpu" = "s390" ; then
847 echo "ARCH=s390" >> $config_mak
848 echo "#define HOST_S390 1" >> $config_h
849 elif test "$cpu" = "alpha" ; then
850 echo "ARCH=alpha" >> $config_mak
851 echo "#define HOST_ALPHA 1" >> $config_h
852 elif test "$cpu" = "sparc" ; then
853 echo "ARCH=sparc" >> $config_mak
854 echo "#define HOST_SPARC 1" >> $config_h
855 elif test "$cpu" = "sparc64" ; then
856 echo "ARCH=sparc64" >> $config_mak
857 echo "#define HOST_SPARC64 1" >> $config_h
858 elif test "$cpu" = "ia64" ; then
859 echo "ARCH=ia64" >> $config_mak
860 echo "#define HOST_IA64 1" >> $config_h
861 elif test "$cpu" = "m68k" ; then
862 echo "ARCH=m68k" >> $config_mak
863 echo "#define HOST_M68K 1" >> $config_h
864 else
865 echo "Unsupported CPU = $cpu"
866 exit 1
868 if test "$bigendian" = "yes" ; then
869 echo "WORDS_BIGENDIAN=yes" >> $config_mak
870 echo "#define WORDS_BIGENDIAN 1" >> $config_h
872 echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h
873 if test "$mingw32" = "yes" ; then
874 echo "CONFIG_WIN32=yes" >> $config_mak
875 echo "#define CONFIG_WIN32 1" >> $config_h
876 else
877 cat > $TMPC << EOF
878 #include <byteswap.h>
879 int main(void) { return bswap_32(0); }
881 if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
882 echo "#define HAVE_BYTESWAP_H 1" >> $config_h
885 if test "$darwin" = "yes" ; then
886 echo "CONFIG_DARWIN=yes" >> $config_mak
887 echo "#define CONFIG_DARWIN 1" >> $config_h
889 if test "$solaris" = "yes" ; then
890 echo "CONFIG_SOLARIS=yes" >> $config_mak
891 echo "#define HOST_SOLARIS $solarisrev" >> $config_h
892 if test "$needs_libsunmath" = "yes" ; then
893 echo "NEEDS_LIBSUNMATH=yes" >> $config_mak
894 echo "#define NEEDS_LIBSUNMATH 1" >> $config_h
897 if test -n "$sparc_cpu"; then
898 echo "CONFIG__sparc_${sparc_cpu}__=yes" >> $config_mak
899 echo "#define __sparc_${sparc_cpu}__ 1" >> $config_h
901 if test "$gdbstub" = "yes" ; then
902 echo "CONFIG_GDBSTUB=yes" >> $config_mak
903 echo "#define CONFIG_GDBSTUB 1" >> $config_h
905 if test "$gprof" = "yes" ; then
906 echo "TARGET_GPROF=yes" >> $config_mak
907 echo "#define HAVE_GPROF 1" >> $config_h
909 if test "$static" = "yes" ; then
910 echo "CONFIG_STATIC=yes" >> $config_mak
911 echo "#define CONFIG_STATIC 1" >> $config_h
913 if test $profiler = "yes" ; then
914 echo "#define CONFIG_PROFILER 1" >> $config_h
916 if test "$slirp" = "yes" ; then
917 echo "CONFIG_SLIRP=yes" >> $config_mak
918 echo "#define CONFIG_SLIRP 1" >> $config_h
920 if test "$adlib" = "yes" ; then
921 echo "CONFIG_ADLIB=yes" >> $config_mak
922 echo "#define CONFIG_ADLIB 1" >> $config_h
924 if test "$ac97" = "yes" ; then
925 echo "CONFIG_AC97=yes" >> $config_mak
926 echo "#define CONFIG_AC97 1" >> $config_h
928 if test "$gus" = "yes" ; then
929 echo "CONFIG_GUS=yes" >> $config_mak
930 echo "#define CONFIG_GUS 1" >> $config_h
932 if test "$oss" = "yes" ; then
933 echo "CONFIG_OSS=yes" >> $config_mak
934 echo "#define CONFIG_OSS 1" >> $config_h
936 if test "$coreaudio" = "yes" ; then
937 echo "CONFIG_COREAUDIO=yes" >> $config_mak
938 echo "#define CONFIG_COREAUDIO 1" >> $config_h
940 if test "$alsa" = "yes" ; then
941 echo "CONFIG_ALSA=yes" >> $config_mak
942 echo "#define CONFIG_ALSA 1" >> $config_h
944 if test "$esd" = "yes" ; then
945 echo "CONFIG_ESD=yes" >> $config_mak
946 echo "#define CONFIG_ESD 1" >> $config_h
948 if test "$dsound" = "yes" ; then
949 echo "CONFIG_DSOUND=yes" >> $config_mak
950 echo "#define CONFIG_DSOUND 1" >> $config_h
952 if test "$fmod" = "yes" ; then
953 echo "CONFIG_FMOD=yes" >> $config_mak
954 echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
955 echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
956 echo "#define CONFIG_FMOD 1" >> $config_h
958 if test "$vnc_tls" = "yes" ; then
959 echo "CONFIG_VNC_TLS=yes" >> $config_mak
960 echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_mak
961 echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_mak
962 echo "#define CONFIG_VNC_TLS 1" >> $config_h
964 qemu_version=`head $source_path/VERSION`
965 echo "VERSION=$qemu_version" >>$config_mak
966 echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
967 echo "#define KVM_VERSION \"kvm-devel\"" >> $config_h
969 echo "SRC_PATH=$source_path" >> $config_mak
970 if [ "$source_path_used" = "yes" ]; then
971 echo "VPATH=$source_path" >> $config_mak
973 echo "TARGET_DIRS=$target_list" >> $config_mak
974 if [ "$build_docs" = "yes" ] ; then
975 echo "BUILD_DOCS=yes" >> $config_mak
977 if test "$static" = "yes"; then
978 sdl1=$sdl_static
979 else
980 sdl1=$sdl
982 if test "$sdl1" = "yes" ; then
983 echo "#define CONFIG_SDL 1" >> $config_h
984 echo "CONFIG_SDL=yes" >> $config_mak
985 if test "$target_softmmu" = "no" -o "$static" = "yes"; then
986 echo "SDL_LIBS=$sdl_static_libs" >> $config_mak
987 else
988 echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
990 if [ "${aa}" = "yes" ] ; then
991 echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak
992 else
993 echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
996 if test "$cocoa" = "yes" ; then
997 echo "#define CONFIG_COCOA 1" >> $config_h
998 echo "CONFIG_COCOA=yes" >> $config_mak
1001 # XXX: suppress that
1002 if [ "$bsd" = "yes" ] ; then
1003 echo "#define O_LARGEFILE 0" >> $config_h
1004 echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
1005 echo "#define _BSD 1" >> $config_h
1008 echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
1010 tools=
1011 if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
1012 tools="qemu-img\$(EXESUF) $tools"
1014 echo "TOOLS=$tools" >> $config_mak
1016 test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h
1018 for target in $target_list; do
1019 target_dir="$target"
1020 config_mak=$target_dir/config.mak
1021 config_h=$target_dir/config.h
1022 target_cpu=`echo $target | cut -d '-' -f 1`
1023 target_bigendian="no"
1024 [ "$target_cpu" = "armeb" ] && target_bigendian=yes
1025 [ "$target_cpu" = "sparc" ] && target_bigendian=yes
1026 [ "$target_cpu" = "sparc64" ] && target_bigendian=yes
1027 [ "$target_cpu" = "sparc32plus" ] && target_bigendian=yes
1028 [ "$target_cpu" = "ppc" ] && target_bigendian=yes
1029 [ "$target_cpu" = "ppcemb" ] && target_bigendian=yes
1030 [ "$target_cpu" = "ppc64" ] && target_bigendian=yes
1031 [ "$target_cpu" = "ppc64abi32" ] && target_bigendian=yes
1032 [ "$target_cpu" = "mips" ] && target_bigendian=yes
1033 [ "$target_cpu" = "mipsn32" ] && target_bigendian=yes
1034 [ "$target_cpu" = "mips64" ] && target_bigendian=yes
1035 [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes
1036 [ "$target_cpu" = "m68k" ] && target_bigendian=yes
1037 target_softmmu="no"
1038 target_user_only="no"
1039 target_linux_user="no"
1040 target_darwin_user="no"
1041 case "$target" in
1042 ${target_cpu}-softmmu)
1043 target_softmmu="yes"
1045 ${target_cpu}-linux-user)
1046 target_user_only="yes"
1047 target_linux_user="yes"
1049 ${target_cpu}-darwin-user)
1050 target_user_only="yes"
1051 target_darwin_user="yes"
1054 echo "ERROR: Target '$target' not recognised"
1055 exit 1
1057 esac
1059 if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \
1060 -a "$sdl" = "no" -a "$cocoa" = "no" ; then
1061 echo "ERROR: QEMU requires SDL or Cocoa for graphical output"
1062 echo "To build QEMU without graphical output configure with --disable-gfx-check"
1063 echo "Note that this will disable all output from the virtual graphics card."
1064 exit 1;
1067 #echo "Creating $config_mak, $config_h and $target_dir/Makefile"
1069 test -f $config_h && mv $config_h ${config_h}~
1071 mkdir -p $target_dir
1072 mkdir -p $target_dir/fpu
1073 mkdir -p $target_dir/tcg
1074 if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" ; then
1075 mkdir -p $target_dir/nwfpe
1079 # don't use ln -sf as not all "ln -sf" over write the file/link
1081 rm -f $target_dir/Makefile
1082 ln -s $source_path/Makefile.target $target_dir/Makefile
1085 echo "# Automatically generated by configure - do not modify" > $config_mak
1086 echo "/* Automatically generated by configure - do not modify */" > $config_h
1089 echo "include ../config-host.mak" >> $config_mak
1090 echo "#include \"../config-host.h\"" >> $config_h
1092 bflt="no"
1093 elfload32="no"
1094 interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
1095 echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
1097 configure_kvm() {
1098 if test $kvm = "yes" -a "$target_softmmu" = "yes" -a \
1099 \( "$cpu" = "i386" -o "$cpu" = "x86_64" -o "$cpu" = "ia64" -o "$cpu" = "powerpc" \); then
1100 echo "#define USE_KVM 1" >> $config_h
1101 echo "USE_KVM=1" >> $config_mak
1102 echo "CONFIG_KVM_KERNEL_INC=$kernel_path/include" >> $config_mak
1106 if test "$target_cpu" = "i386" ; then
1107 echo "TARGET_ARCH=i386" >> $config_mak
1108 echo "#define TARGET_ARCH \"i386\"" >> $config_h
1109 echo "#define TARGET_I386 1" >> $config_h
1110 if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "i386" ; then
1111 echo "#define USE_KQEMU 1" >> $config_h
1113 configure_kvm
1114 elif test "$target_cpu" = "ia64" ; then
1115 echo "TARGET_ARCH=ia64" >> $config_mak
1116 echo "#define TARGET_ARCH \"ia64\"" >> $config_h
1117 echo "#define TARGET_IA64 1" >> $config_h
1118 configure_kvm
1119 elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then
1120 echo "TARGET_ARCH=arm" >> $config_mak
1121 echo "#define TARGET_ARCH \"arm\"" >> $config_h
1122 echo "#define TARGET_ARM 1" >> $config_h
1123 bflt="yes"
1124 elif test "$target_cpu" = "sparc" ; then
1125 echo "TARGET_ARCH=sparc" >> $config_mak
1126 echo "#define TARGET_ARCH \"sparc\"" >> $config_h
1127 echo "#define TARGET_SPARC 1" >> $config_h
1128 elif test "$target_cpu" = "sparc64" ; then
1129 echo "TARGET_ARCH=sparc64" >> $config_mak
1130 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
1131 echo "#define TARGET_SPARC 1" >> $config_h
1132 echo "#define TARGET_SPARC64 1" >> $config_h
1133 elfload32="yes"
1134 elif test "$target_cpu" = "sparc32plus" ; then
1135 echo "TARGET_ARCH=sparc64" >> $config_mak
1136 echo "TARGET_ABI_DIR=sparc" >> $config_mak
1137 echo "TARGET_ARCH2=sparc32plus" >> $config_mak
1138 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
1139 echo "#define TARGET_SPARC 1" >> $config_h
1140 echo "#define TARGET_SPARC64 1" >> $config_h
1141 echo "#define TARGET_ABI32 1" >> $config_h
1142 elif test "$target_cpu" = "ppc" ; then
1143 echo "TARGET_ARCH=ppc" >> $config_mak
1144 echo "#define TARGET_ARCH \"ppc\"" >> $config_h
1145 echo "#define TARGET_PPC 1" >> $config_h
1146 elif test "$target_cpu" = "ppcemb" ; then
1147 echo "TARGET_ARCH=ppcemb" >> $config_mak
1148 echo "TARGET_ABI_DIR=ppc" >> $config_mak
1149 echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
1150 echo "#define TARGET_PPC 1" >> $config_h
1151 echo "#define TARGET_PPCEMB 1" >> $config_h
1152 configure_kvm
1153 elif test "$target_cpu" = "ppc64" ; then
1154 echo "TARGET_ARCH=ppc64" >> $config_mak
1155 echo "TARGET_ABI_DIR=ppc" >> $config_mak
1156 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
1157 echo "#define TARGET_PPC 1" >> $config_h
1158 echo "#define TARGET_PPC64 1" >> $config_h
1159 elif test "$target_cpu" = "ppc64abi32" ; then
1160 echo "TARGET_ARCH=ppc64" >> $config_mak
1161 echo "TARGET_ABI_DIR=ppc" >> $config_mak
1162 echo "TARGET_ARCH2=ppc64abi32" >> $config_mak
1163 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
1164 echo "#define TARGET_PPC 1" >> $config_h
1165 echo "#define TARGET_PPC64 1" >> $config_h
1166 echo "#define TARGET_ABI32 1" >> $config_h
1167 elif test "$target_cpu" = "x86_64" ; then
1168 echo "TARGET_ARCH=x86_64" >> $config_mak
1169 echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
1170 echo "#define TARGET_I386 1" >> $config_h
1171 echo "#define TARGET_X86_64 1" >> $config_h
1172 if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" ; then
1173 echo "#define USE_KQEMU 1" >> $config_h
1175 configure_kvm
1176 elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then
1177 echo "TARGET_ARCH=mips" >> $config_mak
1178 echo "#define TARGET_ARCH \"mips\"" >> $config_h
1179 echo "#define TARGET_MIPS 1" >> $config_h
1180 echo "#define TARGET_ABI_MIPSO32 1" >> $config_h
1181 elif test "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" ; then
1182 echo "TARGET_ARCH=mipsn32" >> $config_mak
1183 echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h
1184 echo "#define TARGET_MIPS 1" >> $config_h
1185 echo "#define TARGET_ABI_MIPSN32 1" >> $config_h
1186 elif test "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el" ; then
1187 echo "TARGET_ARCH=mips64" >> $config_mak
1188 echo "#define TARGET_ARCH \"mips64\"" >> $config_h
1189 echo "#define TARGET_MIPS 1" >> $config_h
1190 echo "#define TARGET_MIPS64 1" >> $config_h
1191 echo "#define TARGET_ABI_MIPSN64 1" >> $config_h
1192 elif test "$target_cpu" = "cris" ; then
1193 echo "TARGET_ARCH=cris" >> $config_mak
1194 echo "#define TARGET_ARCH \"cris\"" >> $config_h
1195 echo "#define TARGET_CRIS 1" >> $config_h
1196 echo "CONFIG_SOFTFLOAT=yes" >> $config_mak
1197 echo "#define CONFIG_SOFTFLOAT 1" >> $config_h
1198 elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then
1199 echo "TARGET_ARCH=sh4" >> $config_mak
1200 echo "#define TARGET_ARCH \"sh4\"" >> $config_h
1201 echo "#define TARGET_SH4 1" >> $config_h
1202 bflt="yes"
1203 elif test "$target_cpu" = "m68k" ; then
1204 echo "TARGET_ARCH=m68k" >> $config_mak
1205 echo "#define TARGET_ARCH \"m68k\"" >> $config_h
1206 echo "#define TARGET_M68K 1" >> $config_h
1207 bflt="yes"
1208 elif test "$target_cpu" = "alpha" ; then
1209 echo "TARGET_ARCH=alpha" >> $config_mak
1210 echo "#define TARGET_ARCH \"alpha\"" >> $config_h
1211 echo "#define TARGET_ALPHA 1" >> $config_h
1212 else
1213 echo "Unsupported target CPU"
1214 exit 1
1216 if test "$target_bigendian" = "yes" ; then
1217 echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak
1218 echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h
1220 if test "$target_softmmu" = "yes" ; then
1221 echo "CONFIG_SOFTMMU=yes" >> $config_mak
1222 echo "#define CONFIG_SOFTMMU 1" >> $config_h
1224 if test "$target_user_only" = "yes" ; then
1225 echo "CONFIG_USER_ONLY=yes" >> $config_mak
1226 echo "#define CONFIG_USER_ONLY 1" >> $config_h
1228 if test "$target_linux_user" = "yes" ; then
1229 echo "CONFIG_LINUX_USER=yes" >> $config_mak
1230 echo "#define CONFIG_LINUX_USER 1" >> $config_h
1232 if test "$target_darwin_user" = "yes" ; then
1233 echo "CONFIG_DARWIN_USER=yes" >> $config_mak
1234 echo "#define CONFIG_DARWIN_USER 1" >> $config_h
1237 if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64" -o "$target_cpu" = "sparc32plus" -o "$target_cpu" = "m68k" -o "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" -o "$target_cpu" = "mipsn32" -o "$target_cpu" = "mipsn32el" -o "$target_cpu" = "mips64" -o "$target_cpu" = "mips64el"; then
1238 echo "CONFIG_SOFTFLOAT=yes" >> $config_mak
1239 echo "#define CONFIG_SOFTFLOAT 1" >> $config_h
1241 if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then
1242 echo "TARGET_HAS_BFLT=yes" >> $config_mak
1243 echo "#define TARGET_HAS_BFLT 1" >> $config_h
1245 # 32 bit ELF loader in addition to native 64 bit loader?
1246 if test "$target_user_only" = "yes" -a "$elfload32" = "yes"; then
1247 echo "TARGET_HAS_ELFLOAD32=yes" >> $config_mak
1248 echo "#define TARGET_HAS_ELFLOAD32 1" >> $config_h
1251 test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h
1253 done # for target in $targets
1255 # build tree in object directory if source path is different from current one
1256 if test "$source_path_used" = "yes" ; then
1257 DIRS="tests tests/cris slirp audio"
1258 FILES="Makefile tests/Makefile"
1259 FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit"
1260 for dir in $DIRS ; do
1261 mkdir -p $dir
1262 done
1263 # remove the link and recreate it, as not all "ln -sf" overwrite the link
1264 for f in $FILES ; do
1265 rm -f $f
1266 ln -s $source_path/$f $f
1267 done
1270 rm -f $TMPO $TMPC $TMPE $TMPS