blob: 120e03d7b80c19ba8387ff2809b6276c47835df3 [file] [log] [blame]
bellard7d132992003-03-06 23:23:54 +00001#!/bin/sh
2#
bellard3ef693a2003-03-23 20:17:16 +00003# qemu configure script (c) 2003 Fabrice Bellard
bellard7d132992003-03-06 23:23:54 +00004#
5# set temporary file name
6if test ! -z "$TMPDIR" ; then
7 TMPDIR1="${TMPDIR}"
8elif test ! -z "$TEMPDIR" ; then
9 TMPDIR1="${TEMPDIR}"
10else
11 TMPDIR1="/tmp"
12fi
13
bellard3ef693a2003-03-23 20:17:16 +000014TMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c"
15TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o"
16TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}"
17TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S"
bellard7d132992003-03-06 23:23:54 +000018
19# default parameters
bellard11d9f692004-04-02 20:55:59 +000020prefix=""
bellard1e43adf2003-09-30 20:54:24 +000021interp_prefix="/usr/gnemul/qemu-%M"
bellard43ce4df2003-06-09 19:53:12 +000022static="no"
bellard7d132992003-03-06 23:23:54 +000023cross_prefix=""
24cc="gcc"
25host_cc="gcc"
26ar="ar"
27make="make"
pbrook6a882642006-04-17 13:57:12 +000028install="install"
bellard7d132992003-03-06 23:23:54 +000029strip="strip"
30cpu=`uname -m`
bellard5327cf42005-01-10 23:18:50 +000031target_list=""
bellard7d132992003-03-06 23:23:54 +000032case "$cpu" in
33 i386|i486|i586|i686|i86pc|BePC)
bellard97a847b2003-08-10 21:36:04 +000034 cpu="i386"
bellard7d132992003-03-06 23:23:54 +000035 ;;
bellardba680552005-03-13 09:49:52 +000036 armv*b)
bellard808c4952004-12-19 23:33:47 +000037 cpu="armv4b"
38 ;;
bellardba680552005-03-13 09:49:52 +000039 armv*l)
bellard7d132992003-03-06 23:23:54 +000040 cpu="armv4l"
41 ;;
42 alpha)
43 cpu="alpha"
44 ;;
bellard295defa2003-04-07 21:31:29 +000045 "Power Macintosh"|ppc|ppc64)
bellard7d132992003-03-06 23:23:54 +000046 cpu="powerpc"
47 ;;
48 mips)
49 cpu="mips"
50 ;;
bellardfb3e5842003-03-29 17:32:36 +000051 s390)
52 cpu="s390"
53 ;;
bellardae228532003-05-13 18:59:59 +000054 sparc)
55 cpu="sparc"
56 ;;
57 sparc64)
58 cpu="sparc64"
59 ;;
bellarda8baa8c2003-04-29 20:53:31 +000060 ia64)
61 cpu="ia64"
62 ;;
bellard38e584a2003-08-10 22:14:22 +000063 m68k)
64 cpu="m68k"
65 ;;
bellardbc51c5c2004-03-17 23:46:04 +000066 x86_64|amd64)
bellard0b0babc2005-01-03 23:38:40 +000067 cpu="x86_64"
bellardbc51c5c2004-03-17 23:46:04 +000068 ;;
bellard7d132992003-03-06 23:23:54 +000069 *)
70 cpu="unknown"
71 ;;
72esac
73gprof="no"
74bigendian="no"
bellard67b915a2004-03-31 23:37:16 +000075mingw32="no"
76EXESUF=""
77gdbstub="yes"
bellard443f1372004-06-04 11:13:20 +000078slirp="yes"
bellardfb065182004-11-09 23:09:44 +000079adlib="no"
80oss="no"
bellard1d14ffa2005-10-30 18:58:22 +000081dsound="no"
82coreaudio="no"
83alsa="no"
bellard102a52e2004-11-14 19:57:29 +000084fmod="no"
85fmod_lib=""
86fmod_inc=""
pbrookb1a550a2006-04-16 13:28:56 +000087bsd="no"
bellard5327cf42005-01-10 23:18:50 +000088linux="no"
bellardc9ec1fe2005-02-10 21:55:30 +000089kqemu="no"
bellard05c2a3e2006-02-08 22:39:17 +000090profiler="no"
bellardc9ec1fe2005-02-10 21:55:30 +000091kernel_path=""
bellard5b0753e2005-03-01 21:37:28 +000092cocoa="no"
bellard97ccc682005-07-02 13:32:17 +000093check_gfx="yes"
bellard1aff3812005-11-02 22:30:45 +000094check_gcc="yes"
pbrook0a8e90f2006-03-19 14:54:16 +000095softmmu="yes"
96user="no"
pbrookcc8ae6d2006-04-23 17:57:59 +000097build_docs="no"
bellard7d132992003-03-06 23:23:54 +000098
99# OS specific
100targetos=`uname -s`
101case $targetos in
bellardc326e0a2005-04-23 18:30:28 +0000102CYGWIN*)
103mingw32="yes"
104CFLAGS="-O2 -mno-cygwin"
105;;
bellard67b915a2004-03-31 23:37:16 +0000106MINGW32*)
107mingw32="yes"
108;;
bellard7d3505c2004-05-12 19:32:15 +0000109FreeBSD)
110bsd="yes"
bellardfb065182004-11-09 23:09:44 +0000111oss="yes"
bellarde99f9062005-07-28 21:45:38 +0000112if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
bellard07f4ddb2005-04-23 17:44:28 +0000113 kqemu="yes"
114fi
bellard7d3505c2004-05-12 19:32:15 +0000115;;
116NetBSD)
117bsd="yes"
bellardfb065182004-11-09 23:09:44 +0000118oss="yes"
bellard7d3505c2004-05-12 19:32:15 +0000119;;
120OpenBSD)
121bsd="yes"
bellardfb065182004-11-09 23:09:44 +0000122oss="yes"
bellard7d3505c2004-05-12 19:32:15 +0000123;;
bellard83fb7ad2004-07-05 21:25:26 +0000124Darwin)
125bsd="yes"
126darwin="yes"
127;;
bellard1d14ffa2005-10-30 18:58:22 +0000128*)
bellardfb065182004-11-09 23:09:44 +0000129oss="yes"
bellard5327cf42005-01-10 23:18:50 +0000130linux="yes"
pbrook0a8e90f2006-03-19 14:54:16 +0000131user="yes"
bellard07f4ddb2005-04-23 17:44:28 +0000132if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
bellardc9ec1fe2005-02-10 21:55:30 +0000133 kqemu="yes"
134fi
bellardfb065182004-11-09 23:09:44 +0000135;;
bellard7d132992003-03-06 23:23:54 +0000136esac
137
bellard7d3505c2004-05-12 19:32:15 +0000138if [ "$bsd" = "yes" ] ; then
pbrookb1a550a2006-04-16 13:28:56 +0000139 if [ "$darwin" != "yes" ] ; then
bellard83fb7ad2004-07-05 21:25:26 +0000140 make="gmake"
141 fi
bellard7d3505c2004-05-12 19:32:15 +0000142fi
143
bellard7d132992003-03-06 23:23:54 +0000144# find source path
pbrookad064842006-04-16 12:41:07 +0000145source_path=`dirname "$0"`
146if [ -z "$source_path" ]; then
bellard7d132992003-03-06 23:23:54 +0000147 source_path=`pwd`
pbrookad064842006-04-16 12:41:07 +0000148else
149 source_path=`cd "$source_path"; pwd`
150fi
151if test "$source_path" = `pwd` ; then
bellard7d132992003-03-06 23:23:54 +0000152 source_path_used="no"
pbrookad064842006-04-16 12:41:07 +0000153else
154 source_path_used="yes"
bellard7d132992003-03-06 23:23:54 +0000155fi
156
157for opt do
pbrookb1a550a2006-04-16 13:28:56 +0000158 optarg=`expr "$opt" : '[^=]*=\(.*\)'`
bellard7d132992003-03-06 23:23:54 +0000159 case "$opt" in
bellard2efc3262005-12-18 19:14:49 +0000160 --help|-h) show_help=yes
161 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000162 --prefix=*) prefix="$optarg"
bellard7d132992003-03-06 23:23:54 +0000163 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000164 --interp-prefix=*) interp_prefix="$optarg"
bellard32ce6332003-04-11 00:16:16 +0000165 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000166 --source-path=*) source_path="$optarg"
pbrookad064842006-04-16 12:41:07 +0000167 source_path_used="yes"
bellard7d132992003-03-06 23:23:54 +0000168 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000169 --cross-prefix=*) cross_prefix="$optarg"
bellard7d132992003-03-06 23:23:54 +0000170 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000171 --cc=*) cc="$optarg"
bellard7d132992003-03-06 23:23:54 +0000172 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000173 --host-cc=*) host_cc="$optarg"
bellard83469012005-07-23 14:27:54 +0000174 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000175 --make=*) make="$optarg"
bellard7d132992003-03-06 23:23:54 +0000176 ;;
pbrook6a882642006-04-17 13:57:12 +0000177 --install=*) install="$optarg"
178 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000179 --extra-cflags=*) CFLAGS="$optarg"
bellard7d132992003-03-06 23:23:54 +0000180 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000181 --extra-ldflags=*) LDFLAGS="$optarg"
bellard7d132992003-03-06 23:23:54 +0000182 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000183 --cpu=*) cpu="$optarg"
bellard7d132992003-03-06 23:23:54 +0000184 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000185 --target-list=*) target_list="$optarg"
bellardde83cd02003-06-15 20:25:43 +0000186 ;;
bellard7d132992003-03-06 23:23:54 +0000187 --enable-gprof) gprof="yes"
188 ;;
bellard43ce4df2003-06-09 19:53:12 +0000189 --static) static="yes"
190 ;;
bellard97a847b2003-08-10 21:36:04 +0000191 --disable-sdl) sdl="no"
192 ;;
bellard1d14ffa2005-10-30 18:58:22 +0000193 --enable-coreaudio) coreaudio="yes"
194 ;;
195 --enable-alsa) alsa="yes"
196 ;;
197 --enable-dsound) dsound="yes"
198 ;;
bellard102a52e2004-11-14 19:57:29 +0000199 --enable-fmod) fmod="yes"
200 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000201 --fmod-lib=*) fmod_lib="$optarg"
bellard102a52e2004-11-14 19:57:29 +0000202 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000203 --fmod-inc=*) fmod_inc="$optarg"
bellard102a52e2004-11-14 19:57:29 +0000204 ;;
bellard67b915a2004-03-31 23:37:16 +0000205 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"
bellard1d14ffa2005-10-30 18:58:22 +0000206 ;;
bellard443f1372004-06-04 11:13:20 +0000207 --disable-slirp) slirp="no"
bellard1d14ffa2005-10-30 18:58:22 +0000208 ;;
bellardfb065182004-11-09 23:09:44 +0000209 --enable-adlib) adlib="yes"
bellard1d14ffa2005-10-30 18:58:22 +0000210 ;;
bellardc9ec1fe2005-02-10 21:55:30 +0000211 --disable-kqemu) kqemu="no"
bellard1d14ffa2005-10-30 18:58:22 +0000212 ;;
bellard05c2a3e2006-02-08 22:39:17 +0000213 --enable-profiler) profiler="yes"
214 ;;
pbrookb1a550a2006-04-16 13:28:56 +0000215 --kernel-path=*) kernel_path="$optarg"
bellard1d14ffa2005-10-30 18:58:22 +0000216 ;;
217 --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no"
218 ;;
bellard97ccc682005-07-02 13:32:17 +0000219 --disable-gfx-check) check_gfx="no"
220 ;;
bellard1aff3812005-11-02 22:30:45 +0000221 --disable-gcc-check) check_gcc="no"
222 ;;
pbrookcad25d62006-03-19 16:31:11 +0000223 --disable-system) softmmu="no"
pbrook0a8e90f2006-03-19 14:54:16 +0000224 ;;
pbrookcad25d62006-03-19 16:31:11 +0000225 --enable-system) softmmu="yes"
pbrook0a8e90f2006-03-19 14:54:16 +0000226 ;;
227 --disable-user) user="no"
228 ;;
229 --enable-user) user="yes"
230 ;;
bellard7d132992003-03-06 23:23:54 +0000231 esac
232done
233
234# Checking for CFLAGS
235if test -z "$CFLAGS"; then
236 CFLAGS="-O2"
237fi
238
pbrookaf5db582006-04-08 14:26:41 +0000239if test x"$show_help" = x"yes" ; then
240cat << EOF
241
242Usage: configure [options]
243Options: [defaults in brackets after descriptions]
244
245EOF
246echo "Standard options:"
247echo " --help print this message"
248echo " --prefix=PREFIX install in PREFIX [$prefix]"
249echo " --interp-prefix=PREFIX where to find shared libraries, etc."
250echo " use %M for cpu name [$interp_prefix]"
251echo " --target-list=LIST set target list [$target_list]"
252echo ""
253echo "kqemu kernel acceleration support:"
254echo " --disable-kqemu disable kqemu support"
255echo " --kernel-path=PATH set the kernel path (configure probes it)"
256echo ""
257echo "Advanced options (experts only):"
258echo " --source-path=PATH path of source code [$source_path]"
259echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
260echo " --cc=CC use C compiler CC [$cc]"
261echo " --host-cc=CC use C compiler CC [$host_cc] for dyngen etc."
262echo " --make=MAKE use specified make [$make]"
pbrook6a882642006-04-17 13:57:12 +0000263echo " --install=INSTALL use specified install [$install]"
pbrookaf5db582006-04-08 14:26:41 +0000264echo " --static enable static build [$static]"
265echo " --enable-cocoa enable COCOA (Mac OS X only)"
266echo " --enable-mingw32 enable Win32 cross compilation with mingw32"
267echo " --enable-adlib enable Adlib emulation"
268echo " --enable-coreaudio enable Coreaudio audio driver"
269echo " --enable-alsa enable ALSA audio driver"
270echo " --enable-fmod enable FMOD audio driver"
271echo " --enabled-dsound enable DirectSound audio driver"
272echo " --enable-system enable all system emulation targets"
273echo " --disable-system disable all system emulation targets"
274echo " --enable-user enable all linux usermode emulation targets"
275echo " --disable-user disable all linux usermode emulation targets"
276echo " --fmod-lib path to FMOD library"
277echo " --fmod-inc path to FMOD includes"
278echo ""
279echo "NOTE: The object files are build at the place where configure is launched"
280exit 1
281fi
282
bellard7d132992003-03-06 23:23:54 +0000283cc="${cross_prefix}${cc}"
284ar="${cross_prefix}${ar}"
285strip="${cross_prefix}${strip}"
286
bellarda7350fa2006-04-23 14:35:23 +0000287if [ -z `which $cc` ] ; then
288 echo "Compiler $cc could not be found"
289 exit
290fi
291
bellard67b915a2004-03-31 23:37:16 +0000292if test "$mingw32" = "yes" ; then
bellard5327cf42005-01-10 23:18:50 +0000293 linux="no"
bellard67b915a2004-03-31 23:37:16 +0000294 EXESUF=".exe"
295 gdbstub="no"
bellard9f059ec2004-11-14 18:59:52 +0000296 oss="no"
bellard07f4ddb2005-04-23 17:44:28 +0000297 if [ "$cpu" = "i386" ] ; then
298 kqemu="yes"
299 fi
bellard67b915a2004-03-31 23:37:16 +0000300fi
301
bellard5327cf42005-01-10 23:18:50 +0000302if test -z "$target_list" ; then
303# these targets are portable
pbrook0a8e90f2006-03-19 14:54:16 +0000304 if [ "$softmmu" = "yes" ] ; then
305 target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu"
306 fi
bellard5327cf42005-01-10 23:18:50 +0000307# the following are Linux specific
pbrook0a8e90f2006-03-19 14:54:16 +0000308 if [ "$user" = "yes" ] ; then
bellardc20eb472005-12-06 21:42:55 +0000309 target_list="i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user $target_list"
bellard5327cf42005-01-10 23:18:50 +0000310 fi
bellard6e20a452005-06-05 15:56:02 +0000311else
pbrookb1a550a2006-04-16 13:28:56 +0000312 target_list=`echo "$target_list" | sed -e 's/,/ /g'`
bellard5327cf42005-01-10 23:18:50 +0000313fi
pbrook0a8e90f2006-03-19 14:54:16 +0000314if test -z "$target_list" ; then
315 echo "No targets enabled"
316 exit 1
317fi
bellard5327cf42005-01-10 23:18:50 +0000318
bellard7d132992003-03-06 23:23:54 +0000319if test -z "$cross_prefix" ; then
320
321# ---
322# big/little endian test
323cat > $TMPC << EOF
324#include <inttypes.h>
325int main(int argc, char ** argv){
bellard1d14ffa2005-10-30 18:58:22 +0000326 volatile uint32_t i=0x01234567;
327 return (*((uint8_t*)(&i))) == 0x67;
bellard7d132992003-03-06 23:23:54 +0000328}
329EOF
330
331if $cc -o $TMPE $TMPC 2>/dev/null ; then
332$TMPE && bigendian="yes"
333else
334echo big/little test failed
335fi
336
337else
338
339# if cross compiling, cannot launch a program, so make a static guess
bellard808c4952004-12-19 23:33:47 +0000340if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then
bellard7d132992003-03-06 23:23:54 +0000341 bigendian="yes"
342fi
343
344fi
345
bellardb6853692005-06-05 17:10:39 +0000346# host long bits test
347hostlongbits="32"
348if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then
349 hostlongbits="64"
350fi
351
bellarde8cd23d2003-06-25 16:08:13 +0000352# check gcc options support
bellard04369ff2003-03-20 22:33:23 +0000353cat > $TMPC <<EOF
354int main(void) {
bellard04369ff2003-03-20 22:33:23 +0000355}
356EOF
357
bellarde8cd23d2003-06-25 16:08:13 +0000358have_gcc3_options="no"
359if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then
360 have_gcc3_options="yes"
bellard04369ff2003-03-20 22:33:23 +0000361fi
bellardca735202003-03-18 20:41:34 +0000362
pbrookb1a550a2006-04-16 13:28:56 +0000363# Check for gcc4, error if pre-gcc4
bellard1aff3812005-11-02 22:30:45 +0000364if test "$check_gcc" = "yes" ; then
365 cat > $TMPC <<EOF
pbrookb1a550a2006-04-16 13:28:56 +0000366#if __GNUC__ < 4
367#error gcc3
bellard1aff3812005-11-02 22:30:45 +0000368#endif
369int main(){return 0;}
370EOF
pbrookb1a550a2006-04-16 13:28:56 +0000371 if $cc -o $TMPO $TMPC 2>/dev/null ; then
bellard1aff3812005-11-02 22:30:45 +0000372 echo "ERROR: \"$cc\" looks like gcc 4.x"
373 echo "QEMU is known to have problems when compiled with gcc 4.x"
374 echo "It is recommended that you use gcc 3.x to build QEMU"
375 echo "To use this compiler anyway, configure with --disable-gcc-check"
376 exit 1;
377 fi
378fi
379
bellard11d9f692004-04-02 20:55:59 +0000380##########################################
381# SDL probe
382
383sdl_too_old=no
384
385if test -z "$sdl" ; then
386
bellarda6e022a2004-04-02 21:55:47 +0000387sdl_config="sdl-config"
388sdl=no
bellard7c1f25b2004-04-22 00:02:08 +0000389sdl_static=no
bellarda6e022a2004-04-02 21:55:47 +0000390
391if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
392# win32 cross compilation case
393 sdl_config="i386-mingw32msvc-sdl-config"
394 sdl=yes
395else
396# normal SDL probe
bellard11d9f692004-04-02 20:55:59 +0000397cat > $TMPC << EOF
398#include <SDL.h>
399#undef main /* We don't want SDL to override our main() */
400int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
401EOF
402
bellarda6e022a2004-04-02 21:55:47 +0000403if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then
404_sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
bellard11d9f692004-04-02 20:55:59 +0000405if test "$_sdlversion" -lt 121 ; then
406sdl_too_old=yes
407else
408sdl=yes
409fi
bellard7c1f25b2004-04-22 00:02:08 +0000410
411# static link with sdl ?
412if test "$sdl" = "yes" ; then
413aa="no"
414`$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes"
415sdl_static_libs=`$sdl_config --static-libs`
416if [ "$aa" = "yes" ] ; then
bellardd8d8aa42004-04-29 20:14:07 +0000417 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
bellard11d9f692004-04-02 20:55:59 +0000418fi
419
bellard7c1f25b2004-04-22 00:02:08 +0000420if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
421 sdl_static=yes
422fi
423
424fi # static link
425
426fi # sdl compile test
427
bellarda6e022a2004-04-02 21:55:47 +0000428fi # cross compilation
429fi # -z $sdl
bellard11d9f692004-04-02 20:55:59 +0000430
pbrookcc8ae6d2006-04-23 17:57:59 +0000431# Check if tools are available to build documentation.
432if [ ! -z `which texi2html` ] && [ ! -z `which pod2man` ]; then
433 build_docs="yes"
434fi
435
bellard11d9f692004-04-02 20:55:59 +0000436if test "$mingw32" = "yes" ; then
437if test -z "$prefix" ; then
438 prefix="/c/Program Files/Qemu"
439fi
440mandir="$prefix"
bellard7efa4382004-05-12 18:54:06 +0000441datadir="$prefix"
bellard1f50f8d2004-05-08 14:44:43 +0000442docdir="$prefix"
bellard11d9f692004-04-02 20:55:59 +0000443bindir="$prefix"
444else
445if test -z "$prefix" ; then
446 prefix="/usr/local"
447fi
bellard5a671352003-10-01 00:13:48 +0000448mandir="$prefix/share/man"
bellard7efa4382004-05-12 18:54:06 +0000449datadir="$prefix/share/qemu"
bellard1f50f8d2004-05-08 14:44:43 +0000450docdir="$prefix/share/doc/qemu"
bellard11d9f692004-04-02 20:55:59 +0000451bindir="$prefix/bin"
452fi
bellard5a671352003-10-01 00:13:48 +0000453
bellard43ce4df2003-06-09 19:53:12 +0000454echo "Install prefix $prefix"
bellard7efa4382004-05-12 18:54:06 +0000455echo "BIOS directory $datadir"
bellard11d9f692004-04-02 20:55:59 +0000456echo "binary directory $bindir"
457if test "$mingw32" = "no" ; then
458echo "Manual directory $mandir"
bellard43ce4df2003-06-09 19:53:12 +0000459echo "ELF interp prefix $interp_prefix"
bellard11d9f692004-04-02 20:55:59 +0000460fi
bellard5a671352003-10-01 00:13:48 +0000461echo "Source path $source_path"
bellard43ce4df2003-06-09 19:53:12 +0000462echo "C compiler $cc"
bellard83469012005-07-23 14:27:54 +0000463echo "Host C compiler $host_cc"
bellard43ce4df2003-06-09 19:53:12 +0000464echo "make $make"
pbrook6a882642006-04-17 13:57:12 +0000465echo "install $install"
bellard43ce4df2003-06-09 19:53:12 +0000466echo "host CPU $cpu"
bellardde83cd02003-06-15 20:25:43 +0000467echo "host big endian $bigendian"
bellard97a847b2003-08-10 21:36:04 +0000468echo "target list $target_list"
bellard43ce4df2003-06-09 19:53:12 +0000469echo "gprof enabled $gprof"
bellard05c2a3e2006-02-08 22:39:17 +0000470echo "profiler $profiler"
bellard43ce4df2003-06-09 19:53:12 +0000471echo "static build $static"
bellard5b0753e2005-03-01 21:37:28 +0000472if test "$darwin" = "yes" ; then
473 echo "Cocoa support $cocoa"
474fi
bellard97a847b2003-08-10 21:36:04 +0000475echo "SDL support $sdl"
bellarde4afee92005-04-26 20:46:24 +0000476if test "$sdl" != "no" ; then
477 echo "SDL static link $sdl_static"
478fi
bellard67b915a2004-03-31 23:37:16 +0000479echo "mingw32 support $mingw32"
bellardfb065182004-11-09 23:09:44 +0000480echo "Adlib support $adlib"
bellard1d14ffa2005-10-30 18:58:22 +0000481echo "CoreAudio support $coreaudio"
482echo "ALSA support $alsa"
483echo "DSound support $dsound"
bellard1d14ffa2005-10-30 18:58:22 +0000484if test "$fmod" = "yes"; then
485 if test -z $fmod_lib || test -z $fmod_inc; then
486 echo
487 echo "Error: You must specify path to FMOD library and headers"
488 echo "Example: --fmod-inc=/path/include/fmod --fmod-lib=/path/lib/libfmod-3.74.so"
489 echo
490 exit 1
491 fi
pbrookb1a550a2006-04-16 13:28:56 +0000492 fmod_support=" (lib='$fmod_lib' include='$fmod_inc')"
493else
494 fmod_support=""
bellard102a52e2004-11-14 19:57:29 +0000495fi
pbrookb1a550a2006-04-16 13:28:56 +0000496echo "FMOD support $fmod $fmod_support"
bellard07f4ddb2005-04-23 17:44:28 +0000497echo "kqemu support $kqemu"
pbrookcc8ae6d2006-04-23 17:57:59 +0000498echo "Documentation $build_docs"
bellard67b915a2004-03-31 23:37:16 +0000499
bellard97a847b2003-08-10 21:36:04 +0000500if test $sdl_too_old = "yes"; then
bellard24b55b92005-03-01 22:30:41 +0000501echo "-> Your SDL version is too old - please upgrade to have SDL support"
bellarde8cd23d2003-06-25 16:08:13 +0000502fi
bellard24b55b92005-03-01 22:30:41 +0000503#if test "$sdl_static" = "no"; then
504# echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output"
505#fi
bellard97a847b2003-08-10 21:36:04 +0000506config_mak="config-host.mak"
507config_h="config-host.h"
508
bellard7c1f25b2004-04-22 00:02:08 +0000509#echo "Creating $config_mak and $config_h"
bellard97a847b2003-08-10 21:36:04 +0000510
511echo "# Automatically generated by configure - do not modify" > $config_mak
pbrook29517132006-02-09 17:58:47 +0000512echo "# Configured with: $0 $@" >> $config_mak
bellard97a847b2003-08-10 21:36:04 +0000513echo "/* Automatically generated by configure - do not modify */" > $config_h
514
515echo "prefix=$prefix" >> $config_mak
bellard11d9f692004-04-02 20:55:59 +0000516echo "bindir=$bindir" >> $config_mak
bellard5a671352003-10-01 00:13:48 +0000517echo "mandir=$mandir" >> $config_mak
bellard7efa4382004-05-12 18:54:06 +0000518echo "datadir=$datadir" >> $config_mak
bellard1f50f8d2004-05-08 14:44:43 +0000519echo "docdir=$docdir" >> $config_mak
bellard7efa4382004-05-12 18:54:06 +0000520echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h
bellard97a847b2003-08-10 21:36:04 +0000521echo "MAKE=$make" >> $config_mak
pbrook6a882642006-04-17 13:57:12 +0000522echo "INSTALL=$install" >> $config_mak
bellard97a847b2003-08-10 21:36:04 +0000523echo "CC=$cc" >> $config_mak
524if test "$have_gcc3_options" = "yes" ; then
525 echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
526fi
527echo "HOST_CC=$host_cc" >> $config_mak
528echo "AR=$ar" >> $config_mak
529echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
530echo "CFLAGS=$CFLAGS" >> $config_mak
531echo "LDFLAGS=$LDFLAGS" >> $config_mak
bellard67b915a2004-03-31 23:37:16 +0000532echo "EXESUF=$EXESUF" >> $config_mak
bellard97a847b2003-08-10 21:36:04 +0000533if test "$cpu" = "i386" ; then
534 echo "ARCH=i386" >> $config_mak
535 echo "#define HOST_I386 1" >> $config_h
bellard0b0babc2005-01-03 23:38:40 +0000536elif test "$cpu" = "x86_64" ; then
537 echo "ARCH=x86_64" >> $config_mak
538 echo "#define HOST_X86_64 1" >> $config_h
bellard808c4952004-12-19 23:33:47 +0000539elif test "$cpu" = "armv4b" ; then
540 echo "ARCH=arm" >> $config_mak
541 echo "#define HOST_ARM 1" >> $config_h
bellard7d132992003-03-06 23:23:54 +0000542elif test "$cpu" = "armv4l" ; then
bellard97a847b2003-08-10 21:36:04 +0000543 echo "ARCH=arm" >> $config_mak
544 echo "#define HOST_ARM 1" >> $config_h
bellard7d132992003-03-06 23:23:54 +0000545elif test "$cpu" = "powerpc" ; then
bellard97a847b2003-08-10 21:36:04 +0000546 echo "ARCH=ppc" >> $config_mak
547 echo "#define HOST_PPC 1" >> $config_h
bellard7d132992003-03-06 23:23:54 +0000548elif test "$cpu" = "mips" ; then
bellard97a847b2003-08-10 21:36:04 +0000549 echo "ARCH=mips" >> $config_mak
550 echo "#define HOST_MIPS 1" >> $config_h
bellardfb3e5842003-03-29 17:32:36 +0000551elif test "$cpu" = "s390" ; then
bellard97a847b2003-08-10 21:36:04 +0000552 echo "ARCH=s390" >> $config_mak
553 echo "#define HOST_S390 1" >> $config_h
bellard295defa2003-04-07 21:31:29 +0000554elif test "$cpu" = "alpha" ; then
bellard97a847b2003-08-10 21:36:04 +0000555 echo "ARCH=alpha" >> $config_mak
556 echo "#define HOST_ALPHA 1" >> $config_h
bellardae228532003-05-13 18:59:59 +0000557elif test "$cpu" = "sparc" ; then
bellard97a847b2003-08-10 21:36:04 +0000558 echo "ARCH=sparc" >> $config_mak
559 echo "#define HOST_SPARC 1" >> $config_h
bellardae228532003-05-13 18:59:59 +0000560elif test "$cpu" = "sparc64" ; then
bellard97a847b2003-08-10 21:36:04 +0000561 echo "ARCH=sparc64" >> $config_mak
562 echo "#define HOST_SPARC64 1" >> $config_h
bellarda8baa8c2003-04-29 20:53:31 +0000563elif test "$cpu" = "ia64" ; then
bellard97a847b2003-08-10 21:36:04 +0000564 echo "ARCH=ia64" >> $config_mak
565 echo "#define HOST_IA64 1" >> $config_h
bellard38e584a2003-08-10 22:14:22 +0000566elif test "$cpu" = "m68k" ; then
bellard38ca2ab2004-03-13 18:32:13 +0000567 echo "ARCH=m68k" >> $config_mak
568 echo "#define HOST_M68K 1" >> $config_h
bellard7d132992003-03-06 23:23:54 +0000569else
570 echo "Unsupported CPU"
571 exit 1
572fi
573if test "$bigendian" = "yes" ; then
bellard97a847b2003-08-10 21:36:04 +0000574 echo "WORDS_BIGENDIAN=yes" >> $config_mak
575 echo "#define WORDS_BIGENDIAN 1" >> $config_h
576fi
bellardb6853692005-06-05 17:10:39 +0000577echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h
bellard67b915a2004-03-31 23:37:16 +0000578if test "$mingw32" = "yes" ; then
579 echo "CONFIG_WIN32=yes" >> $config_mak
bellard11d9f692004-04-02 20:55:59 +0000580 echo "#define CONFIG_WIN32 1" >> $config_h
bellard7d3505c2004-05-12 19:32:15 +0000581elif test -f "/usr/include/byteswap.h" ; then
bellard67b915a2004-03-31 23:37:16 +0000582 echo "#define HAVE_BYTESWAP_H 1" >> $config_h
583fi
bellard83fb7ad2004-07-05 21:25:26 +0000584if test "$darwin" = "yes" ; then
585 echo "CONFIG_DARWIN=yes" >> $config_mak
586 echo "#define CONFIG_DARWIN 1" >> $config_h
587fi
bellard67b915a2004-03-31 23:37:16 +0000588if test "$gdbstub" = "yes" ; then
589 echo "CONFIG_GDBSTUB=yes" >> $config_mak
590 echo "#define CONFIG_GDBSTUB 1" >> $config_h
591fi
bellard97a847b2003-08-10 21:36:04 +0000592if test "$gprof" = "yes" ; then
593 echo "TARGET_GPROF=yes" >> $config_mak
594 echo "#define HAVE_GPROF 1" >> $config_h
595fi
596if test "$static" = "yes" ; then
597 echo "CONFIG_STATIC=yes" >> $config_mak
bellard50863472003-10-28 23:04:01 +0000598 echo "#define CONFIG_STATIC 1" >> $config_h
bellard97a847b2003-08-10 21:36:04 +0000599fi
bellard05c2a3e2006-02-08 22:39:17 +0000600if test $profiler = "yes" ; then
601 echo "#define CONFIG_PROFILER 1" >> $config_h
602fi
bellardc20709a2004-04-21 23:27:19 +0000603if test "$slirp" = "yes" ; then
604 echo "CONFIG_SLIRP=yes" >> $config_mak
605 echo "#define CONFIG_SLIRP 1" >> $config_h
606fi
bellardfb065182004-11-09 23:09:44 +0000607if test "$adlib" = "yes" ; then
608 echo "CONFIG_ADLIB=yes" >> $config_mak
609 echo "#define CONFIG_ADLIB 1" >> $config_h
610fi
611if test "$oss" = "yes" ; then
612 echo "CONFIG_OSS=yes" >> $config_mak
613 echo "#define CONFIG_OSS 1" >> $config_h
614fi
bellard1d14ffa2005-10-30 18:58:22 +0000615if test "$coreaudio" = "yes" ; then
616 echo "CONFIG_COREAUDIO=yes" >> $config_mak
617 echo "#define CONFIG_COREAUDIO 1" >> $config_h
618fi
619if test "$alsa" = "yes" ; then
620 echo "CONFIG_ALSA=yes" >> $config_mak
621 echo "#define CONFIG_ALSA 1" >> $config_h
622fi
623if test "$dsound" = "yes" ; then
624 echo "CONFIG_DSOUND=yes" >> $config_mak
625 echo "#define CONFIG_DSOUND 1" >> $config_h
626fi
bellard102a52e2004-11-14 19:57:29 +0000627if test "$fmod" = "yes" ; then
628 echo "CONFIG_FMOD=yes" >> $config_mak
629 echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
630 echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
631 echo "#define CONFIG_FMOD 1" >> $config_h
632fi
pbrookb1a550a2006-04-16 13:28:56 +0000633qemu_version=`head $source_path/VERSION`
634echo "VERSION=$qemu_version" >>$config_mak
pbrookd4b8f032006-04-16 13:49:23 +0000635echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
bellard97a847b2003-08-10 21:36:04 +0000636
637echo "SRC_PATH=$source_path" >> $config_mak
pbrookad064842006-04-16 12:41:07 +0000638if [ "$source_path_used" = "yes" ]; then
639 echo "VPATH=$source_path" >> $config_mak
640fi
bellard97a847b2003-08-10 21:36:04 +0000641echo "TARGET_DIRS=$target_list" >> $config_mak
pbrookcc8ae6d2006-04-23 17:57:59 +0000642if [ "$build_docs" = "yes" ] ; then
643 echo "BUILD_DOCS=yes" >> $config_mak
644fi
bellard97a847b2003-08-10 21:36:04 +0000645
bellard83fb7ad2004-07-05 21:25:26 +0000646# XXX: suppress that
bellard7d3505c2004-05-12 19:32:15 +0000647if [ "$bsd" = "yes" ] ; then
bellard43003042004-05-20 13:23:39 +0000648 echo "#define O_LARGEFILE 0" >> $config_h
bellard43003042004-05-20 13:23:39 +0000649 echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
bellard7d3505c2004-05-12 19:32:15 +0000650 echo "#define _BSD 1" >> $config_h
651fi
652
bellard1d14ffa2005-10-30 18:58:22 +0000653for target in $target_list; do
bellard97a847b2003-08-10 21:36:04 +0000654target_dir="$target"
655config_mak=$target_dir/config.mak
656config_h=$target_dir/config.h
657target_cpu=`echo $target | cut -d '-' -f 1`
658target_bigendian="no"
bellard808c4952004-12-19 23:33:47 +0000659[ "$target_cpu" = "armeb" ] && target_bigendian=yes
bellard1e43adf2003-09-30 20:54:24 +0000660[ "$target_cpu" = "sparc" ] && target_bigendian=yes
bellard64b3ab22005-01-30 22:43:42 +0000661[ "$target_cpu" = "sparc64" ] && target_bigendian=yes
bellard67867302003-11-23 17:05:30 +0000662[ "$target_cpu" = "ppc" ] && target_bigendian=yes
bellarda2458622005-07-23 22:39:53 +0000663[ "$target_cpu" = "ppc64" ] && target_bigendian=yes
bellardd3258562005-07-02 15:37:12 +0000664[ "$target_cpu" = "mips" ] && target_bigendian=yes
bellard97a847b2003-08-10 21:36:04 +0000665target_softmmu="no"
666if expr $target : '.*-softmmu' > /dev/null ; then
667 target_softmmu="yes"
bellard7d132992003-03-06 23:23:54 +0000668fi
bellard997344f2003-10-27 21:10:39 +0000669target_user_only="no"
670if expr $target : '.*-user' > /dev/null ; then
671 target_user_only="yes"
672fi
bellardde83cd02003-06-15 20:25:43 +0000673
bellard97ccc682005-07-02 13:32:17 +0000674if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \
bellard1d14ffa2005-10-30 18:58:22 +0000675 -a "$sdl" = "no" -a "$cocoa" = "no" ; then
bellard97ccc682005-07-02 13:32:17 +0000676 echo "ERROR: QEMU requires SDL or Cocoa for graphical output"
pbrook9c038502006-04-16 15:19:15 +0000677 echo "To build QEMU without graphical output configure with --disable-gfx-check"
bellard97ccc682005-07-02 13:32:17 +0000678 echo "Note that this will disable all output from the virtual graphics card."
679 exit 1;
680fi
681
bellard7c1f25b2004-04-22 00:02:08 +0000682#echo "Creating $config_mak, $config_h and $target_dir/Makefile"
bellard97a847b2003-08-10 21:36:04 +0000683
684mkdir -p $target_dir
bellard158142c2005-03-13 16:54:06 +0000685mkdir -p $target_dir/fpu
bellard808c4952004-12-19 23:33:47 +0000686if test "$target" = "arm-user" -o "$target" = "armeb-user" ; then
bellard69de9272004-02-16 21:40:43 +0000687 mkdir -p $target_dir/nwfpe
688fi
bellarda7e61ed2004-04-22 21:46:47 +0000689if test "$target_user_only" = "no" ; then
690 mkdir -p $target_dir/slirp
691fi
bellard69de9272004-02-16 21:40:43 +0000692
bellard97a847b2003-08-10 21:36:04 +0000693ln -sf $source_path/Makefile.target $target_dir/Makefile
694
695echo "# Automatically generated by configure - do not modify" > $config_mak
696echo "/* Automatically generated by configure - do not modify */" > $config_h
697
698
699echo "include ../config-host.mak" >> $config_mak
700echo "#include \"../config-host.h\"" >> $config_h
bellard1e43adf2003-09-30 20:54:24 +0000701
702interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
703echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
bellard97a847b2003-08-10 21:36:04 +0000704
705if test "$target_cpu" = "i386" ; then
706 echo "TARGET_ARCH=i386" >> $config_mak
707 echo "#define TARGET_ARCH \"i386\"" >> $config_h
708 echo "#define TARGET_I386 1" >> $config_h
bellard07f4ddb2005-04-23 17:44:28 +0000709 if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "i386" ; then
bellard824d5602005-02-12 18:58:00 +0000710 echo "#define USE_KQEMU 1" >> $config_h
711 fi
bellard808c4952004-12-19 23:33:47 +0000712elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then
bellard97a847b2003-08-10 21:36:04 +0000713 echo "TARGET_ARCH=arm" >> $config_mak
714 echo "#define TARGET_ARCH \"arm\"" >> $config_h
715 echo "#define TARGET_ARM 1" >> $config_h
bellard1e43adf2003-09-30 20:54:24 +0000716elif test "$target_cpu" = "sparc" ; then
717 echo "TARGET_ARCH=sparc" >> $config_mak
718 echo "#define TARGET_ARCH \"sparc\"" >> $config_h
719 echo "#define TARGET_SPARC 1" >> $config_h
bellard64b3ab22005-01-30 22:43:42 +0000720elif test "$target_cpu" = "sparc64" ; then
721 echo "TARGET_ARCH=sparc64" >> $config_mak
722 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
723 echo "#define TARGET_SPARC 1" >> $config_h
724 echo "#define TARGET_SPARC64 1" >> $config_h
bellard67867302003-11-23 17:05:30 +0000725elif test "$target_cpu" = "ppc" ; then
726 echo "TARGET_ARCH=ppc" >> $config_mak
727 echo "#define TARGET_ARCH \"ppc\"" >> $config_h
728 echo "#define TARGET_PPC 1" >> $config_h
bellarda2458622005-07-23 22:39:53 +0000729elif test "$target_cpu" = "ppc64" ; then
730 echo "TARGET_ARCH=ppc64" >> $config_mak
731 echo "#define TARGET_ARCH \"ppc64\"" >> $config_h
732 echo "#define TARGET_PPC 1" >> $config_h
733 echo "#define TARGET_PPC64 1" >> $config_h
bellard0b0babc2005-01-03 23:38:40 +0000734elif test "$target_cpu" = "x86_64" ; then
735 echo "TARGET_ARCH=x86_64" >> $config_mak
736 echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
737 echo "#define TARGET_I386 1" >> $config_h
738 echo "#define TARGET_X86_64 1" >> $config_h
bellard07f4ddb2005-04-23 17:44:28 +0000739 if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" ; then
740 echo "#define USE_KQEMU 1" >> $config_h
741 fi
bellardc20eb472005-12-06 21:42:55 +0000742elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then
bellardd3258562005-07-02 15:37:12 +0000743 echo "TARGET_ARCH=mips" >> $config_mak
744 echo "#define TARGET_ARCH \"mips\"" >> $config_h
745 echo "#define TARGET_MIPS 1" >> $config_h
bellardde83cd02003-06-15 20:25:43 +0000746else
747 echo "Unsupported target CPU"
748 exit 1
749fi
750if test "$target_bigendian" = "yes" ; then
bellard97a847b2003-08-10 21:36:04 +0000751 echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak
752 echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h
753fi
754if test "$target_softmmu" = "yes" ; then
755 echo "CONFIG_SOFTMMU=yes" >> $config_mak
756 echo "#define CONFIG_SOFTMMU 1" >> $config_h
bellardde83cd02003-06-15 20:25:43 +0000757fi
bellard997344f2003-10-27 21:10:39 +0000758if test "$target_user_only" = "yes" ; then
759 echo "CONFIG_USER_ONLY=yes" >> $config_mak
760 echo "#define CONFIG_USER_ONLY 1" >> $config_h
761fi
bellardde83cd02003-06-15 20:25:43 +0000762
bellard158142c2005-03-13 16:54:06 +0000763if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then
764 echo "CONFIG_SOFTFLOAT=yes" >> $config_mak
765 echo "#define CONFIG_SOFTFLOAT 1" >> $config_h
766fi
bellard7c1f25b2004-04-22 00:02:08 +0000767# sdl defines
768
769if test "$target_user_only" = "no"; then
770 if test "$target_softmmu" = "no" -o "$static" = "yes"; then
bellarddbb2c922004-10-24 22:17:47 +0000771 sdl1=$sdl_static
bellard7c1f25b2004-04-22 00:02:08 +0000772 else
bellarddbb2c922004-10-24 22:17:47 +0000773 sdl1=$sdl
774 fi
775 if test "$sdl1" = "yes" ; then
776 echo "#define CONFIG_SDL 1" >> $config_h
777 echo "CONFIG_SDL=yes" >> $config_mak
778 if test "$target_softmmu" = "no" -o "$static" = "yes"; then
779 echo "SDL_LIBS=$sdl_static_libs" >> $config_mak
780 else
bellard7c1f25b2004-04-22 00:02:08 +0000781 echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
782 fi
bellarddbb2c922004-10-24 22:17:47 +0000783 if [ "${aa}" = "yes" ] ; then
pbrookb1a550a2006-04-16 13:28:56 +0000784 echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak
785 else
786 echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
bellarddbb2c922004-10-24 22:17:47 +0000787 fi
bellard7c1f25b2004-04-22 00:02:08 +0000788 fi
bellard7c1f25b2004-04-22 00:02:08 +0000789fi
790
bellard5b0753e2005-03-01 21:37:28 +0000791if test "$cocoa" = "yes" ; then
792 echo "#define CONFIG_COCOA 1" >> $config_h
793 echo "CONFIG_COCOA=yes" >> $config_mak
794fi
795
bellard97a847b2003-08-10 21:36:04 +0000796done # for target in $targets
bellard7d132992003-03-06 23:23:54 +0000797
798# build tree in object directory if source path is different from current one
799if test "$source_path_used" = "yes" ; then
800 DIRS="tests"
801 FILES="Makefile tests/Makefile"
802 for dir in $DIRS ; do
803 mkdir -p $dir
804 done
805 for f in $FILES ; do
806 ln -sf $source_path/$f $f
807 done
808fi
bellard7d132992003-03-06 23:23:54 +0000809
bellard97a847b2003-08-10 21:36:04 +0000810rm -f $TMPO $TMPC $TMPE $TMPS