root / configure @ 91834991
History | View | Annotate | Download (38.3 kB)
1 | 7d13299d | bellard | #!/bin/sh |
---|---|---|---|
2 | 7d13299d | bellard | # |
3 | 3ef693a0 | bellard | # qemu configure script (c) 2003 Fabrice Bellard |
4 | 7d13299d | bellard | # |
5 | 7d13299d | bellard | # set temporary file name |
6 | 7d13299d | bellard | if test ! -z "$TMPDIR" ; then |
7 | 7d13299d | bellard | TMPDIR1="${TMPDIR}" |
8 | 7d13299d | bellard | elif test ! -z "$TEMPDIR" ; then |
9 | 7d13299d | bellard | TMPDIR1="${TEMPDIR}" |
10 | 7d13299d | bellard | else |
11 | 7d13299d | bellard | TMPDIR1="/tmp" |
12 | 7d13299d | bellard | fi |
13 | 7d13299d | bellard | |
14 | 3ef693a0 | bellard | TMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c" |
15 | 3ef693a0 | bellard | TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o" |
16 | 3ef693a0 | bellard | TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}" |
17 | 3ef693a0 | bellard | TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S" |
18 | 7d13299d | bellard | |
19 | 7d13299d | bellard | # default parameters |
20 | 11d9f695 | bellard | prefix="" |
21 | 1e43adfc | bellard | interp_prefix="/usr/gnemul/qemu-%M" |
22 | 43ce4dfe | bellard | static="no" |
23 | 7d13299d | bellard | cross_prefix="" |
24 | 7d13299d | bellard | cc="gcc" |
25 | 328a4240 | pbrook | gcc3_search="yes" |
26 | fe8f78e4 | balrog | gcc3_list="gcc-3.4.6 gcc-3.4 gcc34 gcc-3.3.6 gcc-3.3 gcc33 gcc-3.2 gcc32" |
27 | 7d13299d | bellard | host_cc="gcc" |
28 | 7d13299d | bellard | ar="ar" |
29 | 7d13299d | bellard | make="make" |
30 | 6a882643 | pbrook | install="install" |
31 | 7d13299d | bellard | strip="strip" |
32 | 7d13299d | bellard | cpu=`uname -m` |
33 | 5327cf48 | bellard | target_list="" |
34 | 7d13299d | bellard | case "$cpu" in |
35 | 7d13299d | bellard | i386|i486|i586|i686|i86pc|BePC) |
36 | 97a847bc | bellard | cpu="i386" |
37 | 7d13299d | bellard | ;; |
38 | aaa5fa14 | aurel32 | x86_64|amd64) |
39 | aaa5fa14 | aurel32 | cpu="x86_64" |
40 | aaa5fa14 | aurel32 | ;; |
41 | aaa5fa14 | aurel32 | alpha) |
42 | aaa5fa14 | aurel32 | cpu="alpha" |
43 | aaa5fa14 | aurel32 | ;; |
44 | ba68055e | bellard | armv*b) |
45 | 808c4954 | bellard | cpu="armv4b" |
46 | 808c4954 | bellard | ;; |
47 | ba68055e | bellard | armv*l) |
48 | 7d13299d | bellard | cpu="armv4l" |
49 | 7d13299d | bellard | ;; |
50 | aaa5fa14 | aurel32 | cris) |
51 | aaa5fa14 | aurel32 | cpu="cris" |
52 | 7d13299d | bellard | ;; |
53 | f54b3f92 | aurel32 | parisc|parisc64) |
54 | f54b3f92 | aurel32 | cpu="hppa" |
55 | f54b3f92 | aurel32 | ;; |
56 | aaa5fa14 | aurel32 | ia64) |
57 | aaa5fa14 | aurel32 | cpu="ia64" |
58 | aaa5fa14 | aurel32 | ;; |
59 | aaa5fa14 | aurel32 | m68k) |
60 | aaa5fa14 | aurel32 | cpu="m68k" |
61 | 7d13299d | bellard | ;; |
62 | 7d13299d | bellard | mips) |
63 | 7d13299d | bellard | cpu="mips" |
64 | 7d13299d | bellard | ;; |
65 | fbe4f65b | ths | mips64) |
66 | fbe4f65b | ths | cpu="mips64" |
67 | fbe4f65b | ths | ;; |
68 | aaa5fa14 | aurel32 | "Power Macintosh"|ppc|ppc64) |
69 | aaa5fa14 | aurel32 | cpu="powerpc" |
70 | e7daa605 | ths | ;; |
71 | 0e7b8a9f | ths | s390*) |
72 | fb3e5849 | bellard | cpu="s390" |
73 | fb3e5849 | bellard | ;; |
74 | 3142255c | blueswir1 | sparc|sun4[cdmuv]) |
75 | ae228531 | bellard | cpu="sparc" |
76 | ae228531 | bellard | ;; |
77 | ae228531 | bellard | sparc64) |
78 | ae228531 | bellard | cpu="sparc64" |
79 | ae228531 | bellard | ;; |
80 | 7d13299d | bellard | *) |
81 | 7d13299d | bellard | cpu="unknown" |
82 | 7d13299d | bellard | ;; |
83 | 7d13299d | bellard | esac |
84 | 7d13299d | bellard | gprof="no" |
85 | 7d13299d | bellard | bigendian="no" |
86 | 67b915a5 | bellard | mingw32="no" |
87 | 67b915a5 | bellard | EXESUF="" |
88 | 67b915a5 | bellard | gdbstub="yes" |
89 | 443f1376 | bellard | slirp="yes" |
90 | fb065187 | bellard | adlib="no" |
91 | e5c9a13e | balrog | ac97="no" |
92 | 423d65f4 | balrog | gus="no" |
93 | fb065187 | bellard | oss="no" |
94 | 1d14ffa9 | bellard | dsound="no" |
95 | 1d14ffa9 | bellard | coreaudio="no" |
96 | 1d14ffa9 | bellard | alsa="no" |
97 | ca9cc28c | balrog | esd="no" |
98 | 102a52e4 | bellard | fmod="no" |
99 | 102a52e4 | bellard | fmod_lib="" |
100 | 102a52e4 | bellard | fmod_inc="" |
101 | 8d5d2d4c | ths | vnc_tls="yes" |
102 | b1a550a0 | pbrook | bsd="no" |
103 | 5327cf48 | bellard | linux="no" |
104 | c9ec1fe4 | bellard | kqemu="no" |
105 | 05c2a3e7 | bellard | profiler="no" |
106 | 5b0753e0 | bellard | cocoa="no" |
107 | 97ccc689 | bellard | check_gfx="yes" |
108 | 1aff381f | bellard | check_gcc="yes" |
109 | 0a8e90f4 | pbrook | softmmu="yes" |
110 | 831b7825 | ths | linux_user="no" |
111 | 831b7825 | ths | darwin_user="no" |
112 | cc8ae6de | pbrook | build_docs="no" |
113 | c5937220 | pbrook | uname_release="" |
114 | 4d3b6f6e | balrog | curses="yes" |
115 | 7d13299d | bellard | |
116 | 7d13299d | bellard | # OS specific |
117 | 7d13299d | bellard | targetos=`uname -s` |
118 | 7d13299d | bellard | case $targetos in |
119 | c326e0af | bellard | CYGWIN*) |
120 | c326e0af | bellard | mingw32="yes" |
121 | 6f30fa85 | ths | OS_CFLAGS="-mno-cygwin" |
122 | db8d7dd1 | ths | if [ "$cpu" = "i386" ] ; then |
123 | db8d7dd1 | ths | kqemu="yes" |
124 | db8d7dd1 | ths | fi |
125 | c326e0af | bellard | ;; |
126 | 67b915a5 | bellard | MINGW32*) |
127 | 67b915a5 | bellard | mingw32="yes" |
128 | db8d7dd1 | ths | if [ "$cpu" = "i386" ] ; then |
129 | db8d7dd1 | ths | kqemu="yes" |
130 | db8d7dd1 | ths | fi |
131 | 67b915a5 | bellard | ;; |
132 | 5c40d2bd | ths | GNU/kFreeBSD) |
133 | 5c40d2bd | ths | oss="yes" |
134 | 5c40d2bd | ths | if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
135 | 5c40d2bd | ths | kqemu="yes" |
136 | 5c40d2bd | ths | fi |
137 | 5c40d2bd | ths | ;; |
138 | 7d3505c5 | bellard | FreeBSD) |
139 | 7d3505c5 | bellard | bsd="yes" |
140 | fb065187 | bellard | oss="yes" |
141 | e99f9060 | bellard | if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
142 | 07f4ddbf | bellard | kqemu="yes" |
143 | 07f4ddbf | bellard | fi |
144 | 7d3505c5 | bellard | ;; |
145 | 7d3505c5 | bellard | NetBSD) |
146 | 7d3505c5 | bellard | bsd="yes" |
147 | fb065187 | bellard | oss="yes" |
148 | 7d3505c5 | bellard | ;; |
149 | 7d3505c5 | bellard | OpenBSD) |
150 | 7d3505c5 | bellard | bsd="yes" |
151 | fb065187 | bellard | oss="yes" |
152 | 7d3505c5 | bellard | ;; |
153 | 83fb7adf | bellard | Darwin) |
154 | 83fb7adf | bellard | bsd="yes" |
155 | 83fb7adf | bellard | darwin="yes" |
156 | 831b7825 | ths | darwin_user="yes" |
157 | fd677642 | ths | cocoa="yes" |
158 | fd677642 | ths | coreaudio="yes" |
159 | 6f30fa85 | ths | OS_CFLAGS="-mdynamic-no-pic" |
160 | c2c59c3e | ths | OS_LDFLAGS="-framework CoreFoundation -framework IOKit" |
161 | 83fb7adf | bellard | ;; |
162 | ec530c81 | bellard | SunOS) |
163 | c2b84fab | ths | solaris="yes" |
164 | c2b84fab | ths | make="gmake" |
165 | c2b84fab | ths | install="ginstall" |
166 | 0475a5ca | ths | needs_libsunmath="no" |
167 | c2b84fab | ths | solarisrev=`uname -r | cut -f2 -d.` |
168 | ef18c883 | ths | # have to select again, because `uname -m` returns i86pc |
169 | ef18c883 | ths | # even on an x86_64 box. |
170 | ef18c883 | ths | solariscpu=`isainfo -k` |
171 | ef18c883 | ths | if test "${solariscpu}" = "amd64" ; then |
172 | ef18c883 | ths | cpu="x86_64" |
173 | ef18c883 | ths | fi |
174 | c2b84fab | ths | if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
175 | 0475a5ca | ths | if test "$solarisrev" -le 9 ; then |
176 | 0475a5ca | ths | if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then |
177 | 0475a5ca | ths | needs_libsunmath="yes" |
178 | 0475a5ca | ths | else |
179 | 0475a5ca | ths | echo "QEMU will not link correctly on Solaris 8/X86 or 9/x86 without" |
180 | 0475a5ca | ths | echo "libsunmath from the Sun Studio compilers tools, due to a lack of" |
181 | 0475a5ca | ths | echo "C99 math features in libm.so in Solaris 8/x86 and Solaris 9/x86" |
182 | 0475a5ca | ths | echo "Studio 11 can be downloaded from www.sun.com." |
183 | 0475a5ca | ths | exit 1 |
184 | 0475a5ca | ths | fi |
185 | 0475a5ca | ths | fi |
186 | 0475a5ca | ths | if test "$solarisrev" -ge 9 ; then |
187 | c2b84fab | ths | kqemu="yes" |
188 | c2b84fab | ths | fi |
189 | 86b2bd93 | ths | fi |
190 | 6b4d2ba1 | ths | if test -f /usr/include/sys/soundcard.h ; then |
191 | 6b4d2ba1 | ths | oss=yes |
192 | 6b4d2ba1 | ths | fi |
193 | 86b2bd93 | ths | ;; |
194 | 1d14ffa9 | bellard | *) |
195 | fb065187 | bellard | oss="yes" |
196 | 5327cf48 | bellard | linux="yes" |
197 | 831b7825 | ths | linux_user="yes" |
198 | 07f4ddbf | bellard | if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
199 | c9ec1fe4 | bellard | kqemu="yes" |
200 | c9ec1fe4 | bellard | fi |
201 | fb065187 | bellard | ;; |
202 | 7d13299d | bellard | esac |
203 | 7d13299d | bellard | |
204 | 7d3505c5 | bellard | if [ "$bsd" = "yes" ] ; then |
205 | b1a550a0 | pbrook | if [ "$darwin" != "yes" ] ; then |
206 | 83fb7adf | bellard | make="gmake" |
207 | 83fb7adf | bellard | fi |
208 | 7d3505c5 | bellard | fi |
209 | 7d3505c5 | bellard | |
210 | 7d13299d | bellard | # find source path |
211 | ad064840 | pbrook | source_path=`dirname "$0"` |
212 | 59faef3a | balrog | source_path_used="no" |
213 | 59faef3a | balrog | workdir=`pwd` |
214 | ad064840 | pbrook | if [ -z "$source_path" ]; then |
215 | 59faef3a | balrog | source_path=$workdir |
216 | ad064840 | pbrook | else |
217 | ad064840 | pbrook | source_path=`cd "$source_path"; pwd` |
218 | 7d13299d | bellard | fi |
219 | 724db118 | pbrook | [ -f "$workdir/vl.c" ] || source_path_used="yes" |
220 | 7d13299d | bellard | |
221 | 85aa5189 | bellard | werror="no" |
222 | 0d1e2394 | bellard | # generate compile errors on warnings for development builds |
223 | 0d1e2394 | bellard | #if grep cvs $source_path/VERSION > /dev/null 2>&1 ; then |
224 | 0d1e2394 | bellard | #werror="yes"; |
225 | 0d1e2394 | bellard | #fi |
226 | 85aa5189 | bellard | |
227 | 7d13299d | bellard | for opt do |
228 | a46e4035 | pbrook | optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` |
229 | 7d13299d | bellard | case "$opt" in |
230 | 2efc3265 | bellard | --help|-h) show_help=yes |
231 | 2efc3265 | bellard | ;; |
232 | b1a550a0 | pbrook | --prefix=*) prefix="$optarg" |
233 | 7d13299d | bellard | ;; |
234 | b1a550a0 | pbrook | --interp-prefix=*) interp_prefix="$optarg" |
235 | 32ce6337 | bellard | ;; |
236 | b1a550a0 | pbrook | --source-path=*) source_path="$optarg" |
237 | ad064840 | pbrook | source_path_used="yes" |
238 | 7d13299d | bellard | ;; |
239 | b1a550a0 | pbrook | --cross-prefix=*) cross_prefix="$optarg" |
240 | 7d13299d | bellard | ;; |
241 | b1a550a0 | pbrook | --cc=*) cc="$optarg" |
242 | 328a4240 | pbrook | gcc3_search="no" |
243 | 7d13299d | bellard | ;; |
244 | b1a550a0 | pbrook | --host-cc=*) host_cc="$optarg" |
245 | 83469015 | bellard | ;; |
246 | b1a550a0 | pbrook | --make=*) make="$optarg" |
247 | 7d13299d | bellard | ;; |
248 | 6a882643 | pbrook | --install=*) install="$optarg" |
249 | 6a882643 | pbrook | ;; |
250 | b1a550a0 | pbrook | --extra-cflags=*) CFLAGS="$optarg" |
251 | 7d13299d | bellard | ;; |
252 | b1a550a0 | pbrook | --extra-ldflags=*) LDFLAGS="$optarg" |
253 | 7d13299d | bellard | ;; |
254 | b1a550a0 | pbrook | --cpu=*) cpu="$optarg" |
255 | 7d13299d | bellard | ;; |
256 | b1a550a0 | pbrook | --target-list=*) target_list="$optarg" |
257 | de83cd02 | bellard | ;; |
258 | 7d13299d | bellard | --enable-gprof) gprof="yes" |
259 | 7d13299d | bellard | ;; |
260 | 43ce4dfe | bellard | --static) static="yes" |
261 | 43ce4dfe | bellard | ;; |
262 | 97a847bc | bellard | --disable-sdl) sdl="no" |
263 | 97a847bc | bellard | ;; |
264 | 1d14ffa9 | bellard | --enable-coreaudio) coreaudio="yes" |
265 | 1d14ffa9 | bellard | ;; |
266 | 1d14ffa9 | bellard | --enable-alsa) alsa="yes" |
267 | 1d14ffa9 | bellard | ;; |
268 | ca9cc28c | balrog | --enable-esd) esd="yes" |
269 | ca9cc28c | balrog | ;; |
270 | 1d14ffa9 | bellard | --enable-dsound) dsound="yes" |
271 | 1d14ffa9 | bellard | ;; |
272 | 102a52e4 | bellard | --enable-fmod) fmod="yes" |
273 | 102a52e4 | bellard | ;; |
274 | b1a550a0 | pbrook | --fmod-lib=*) fmod_lib="$optarg" |
275 | 102a52e4 | bellard | ;; |
276 | b1a550a0 | pbrook | --fmod-inc=*) fmod_inc="$optarg" |
277 | 102a52e4 | bellard | ;; |
278 | 8d5d2d4c | ths | --disable-vnc-tls) vnc_tls="no" |
279 | 8d5d2d4c | ths | ;; |
280 | b93aebec | bellard | --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; linux_user="no" |
281 | 1d14ffa9 | bellard | ;; |
282 | 443f1376 | bellard | --disable-slirp) slirp="no" |
283 | 1d14ffa9 | bellard | ;; |
284 | fb065187 | bellard | --enable-adlib) adlib="yes" |
285 | 1d14ffa9 | bellard | ;; |
286 | e5c9a13e | balrog | --enable-ac97) ac97="yes" |
287 | e5c9a13e | balrog | ;; |
288 | 423d65f4 | balrog | --enable-gus) gus="yes" |
289 | 423d65f4 | balrog | ;; |
290 | c9ec1fe4 | bellard | --disable-kqemu) kqemu="no" |
291 | 1d14ffa9 | bellard | ;; |
292 | 2e4d9fb1 | aurel32 | --disable-brlapi) brlapi="no" |
293 | 2e4d9fb1 | aurel32 | ;; |
294 | 05c2a3e7 | bellard | --enable-profiler) profiler="yes" |
295 | 05c2a3e7 | bellard | ;; |
296 | 1d14ffa9 | bellard | --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no" |
297 | 1d14ffa9 | bellard | ;; |
298 | 97ccc689 | bellard | --disable-gfx-check) check_gfx="no" |
299 | 97ccc689 | bellard | ;; |
300 | 1aff381f | bellard | --disable-gcc-check) check_gcc="no" |
301 | 1aff381f | bellard | ;; |
302 | cad25d69 | pbrook | --disable-system) softmmu="no" |
303 | 0a8e90f4 | pbrook | ;; |
304 | cad25d69 | pbrook | --enable-system) softmmu="yes" |
305 | 0a8e90f4 | pbrook | ;; |
306 | 831b7825 | ths | --disable-linux-user) linux_user="no" |
307 | 0a8e90f4 | pbrook | ;; |
308 | 831b7825 | ths | --enable-linux-user) linux_user="yes" |
309 | 831b7825 | ths | ;; |
310 | 831b7825 | ths | --disable-darwin-user) darwin_user="no" |
311 | 831b7825 | ths | ;; |
312 | 831b7825 | ths | --enable-darwin-user) darwin_user="yes" |
313 | 0a8e90f4 | pbrook | ;; |
314 | c5937220 | pbrook | --enable-uname-release=*) uname_release="$optarg" |
315 | c5937220 | pbrook | ;; |
316 | 3142255c | blueswir1 | --sparc_cpu=*) |
317 | 3142255c | blueswir1 | sparc_cpu="$optarg" |
318 | 3142255c | blueswir1 | case $sparc_cpu in |
319 | 3142255c | blueswir1 | v7|v8) SP_CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32" |
320 | 3142255c | blueswir1 | target_cpu="sparc"; cpu="sparc" ;; |
321 | 3142255c | blueswir1 | v8plus|v8plusa) SP_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m32" |
322 | 3142255c | blueswir1 | target_cpu="sparc"; cpu="sparc" ;; |
323 | 3142255c | blueswir1 | v9) SP_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__"; SP_LDFLAGS="-m64" |
324 | 3142255c | blueswir1 | target_cpu="sparc64"; cpu="sparc64" ;; |
325 | 3142255c | blueswir1 | *) echo "undefined SPARC architecture. Exiting";exit 1;; |
326 | 3142255c | blueswir1 | esac |
327 | 3142255c | blueswir1 | ;; |
328 | 85aa5189 | bellard | --enable-werror) werror="yes" |
329 | 85aa5189 | bellard | ;; |
330 | 85aa5189 | bellard | --disable-werror) werror="no" |
331 | 85aa5189 | bellard | ;; |
332 | 4d3b6f6e | balrog | --disable-curses) curses="no" |
333 | 4d3b6f6e | balrog | ;; |
334 | 7f1559c6 | balrog | *) echo "ERROR: unknown option $opt"; show_help="yes" |
335 | 7f1559c6 | balrog | ;; |
336 | 7d13299d | bellard | esac |
337 | 7d13299d | bellard | done |
338 | 7d13299d | bellard | |
339 | 209afb9e | ths | if [ "$bsd" = "yes" -o "$darwin" = "yes" -o "$mingw32" = "yes" ] ; then |
340 | 209afb9e | ths | AIOLIBS= |
341 | 209afb9e | ths | else |
342 | 4259e1a5 | ths | # Some Linux architectures (e.g. s390) don't imply -lpthread automatically. |
343 | 4259e1a5 | ths | AIOLIBS="-lrt -lpthread" |
344 | 209afb9e | ths | fi |
345 | 209afb9e | ths | |
346 | 6f30fa85 | ths | # default flags for all hosts |
347 | 6f30fa85 | ths | CFLAGS="$CFLAGS -Wall -O2 -g -fno-strict-aliasing" |
348 | 6f30fa85 | ths | LDFLAGS="$LDFLAGS -g" |
349 | 85aa5189 | bellard | if test "$werror" = "yes" ; then |
350 | 85aa5189 | bellard | CFLAGS="$CFLAGS -Werror" |
351 | 85aa5189 | bellard | fi |
352 | 6f30fa85 | ths | |
353 | 3142255c | blueswir1 | # |
354 | 3142255c | blueswir1 | # If cpu ~= sparc and sparc_cpu hasn't been defined, plug in the right |
355 | 3142255c | blueswir1 | # ARCH_CFLAGS/ARCH_LDFLAGS (assume sparc_v8plus for 32-bit and sparc_v9 for 64-bit) |
356 | 3142255c | blueswir1 | # |
357 | 40293e58 | bellard | case "$cpu" in |
358 | 3142255c | blueswir1 | sparc) if test -z "$sparc_cpu" ; then |
359 | 3142255c | blueswir1 | ARCH_CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v8plus__" |
360 | 3142255c | blueswir1 | ARCH_LDFLAGS="-m32" |
361 | 3142255c | blueswir1 | else |
362 | 3142255c | blueswir1 | ARCH_CFLAGS="${SP_CFLAGS}" |
363 | 3142255c | blueswir1 | ARCH_LDFLAGS="${SP_LDFLAGS}" |
364 | 3142255c | blueswir1 | fi |
365 | 3142255c | blueswir1 | ;; |
366 | 3142255c | blueswir1 | sparc64) if test -z "$sparc_cpu" ; then |
367 | 3142255c | blueswir1 | ARCH_CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_v9__" |
368 | 3142255c | blueswir1 | ARCH_LDFLAGS="-m64" |
369 | 3142255c | blueswir1 | else |
370 | 3142255c | blueswir1 | ARCH_CFLAGS="${SP_CFLAGS}" |
371 | 3142255c | blueswir1 | ARCH_LDFLAGS="${SP_LDFLAGS}" |
372 | 3142255c | blueswir1 | fi |
373 | 3142255c | blueswir1 | ;; |
374 | 76d83bde | ths | s390) |
375 | 76d83bde | ths | ARCH_CFLAGS="-march=z900" |
376 | 76d83bde | ths | ;; |
377 | 40293e58 | bellard | i386) |
378 | 40293e58 | bellard | ARCH_CFLAGS="-m32" |
379 | 40293e58 | bellard | ARCH_LDFLAGS="-m32" |
380 | 40293e58 | bellard | ;; |
381 | 40293e58 | bellard | x86_64) |
382 | 40293e58 | bellard | ARCH_CFLAGS="-m64" |
383 | 40293e58 | bellard | ARCH_LDFLAGS="-m64" |
384 | 40293e58 | bellard | ;; |
385 | 3142255c | blueswir1 | esac |
386 | 3142255c | blueswir1 | |
387 | af5db58e | pbrook | if test x"$show_help" = x"yes" ; then |
388 | af5db58e | pbrook | cat << EOF |
389 | af5db58e | pbrook | |
390 | af5db58e | pbrook | Usage: configure [options] |
391 | af5db58e | pbrook | Options: [defaults in brackets after descriptions] |
392 | af5db58e | pbrook | |
393 | af5db58e | pbrook | EOF |
394 | af5db58e | pbrook | echo "Standard options:" |
395 | af5db58e | pbrook | echo " --help print this message" |
396 | af5db58e | pbrook | echo " --prefix=PREFIX install in PREFIX [$prefix]" |
397 | af5db58e | pbrook | echo " --interp-prefix=PREFIX where to find shared libraries, etc." |
398 | af5db58e | pbrook | echo " use %M for cpu name [$interp_prefix]" |
399 | af5db58e | pbrook | echo " --target-list=LIST set target list [$target_list]" |
400 | af5db58e | pbrook | echo "" |
401 | af5db58e | pbrook | echo "kqemu kernel acceleration support:" |
402 | af5db58e | pbrook | echo " --disable-kqemu disable kqemu support" |
403 | af5db58e | pbrook | echo "" |
404 | af5db58e | pbrook | echo "Advanced options (experts only):" |
405 | af5db58e | pbrook | echo " --source-path=PATH path of source code [$source_path]" |
406 | af5db58e | pbrook | echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]" |
407 | af5db58e | pbrook | echo " --cc=CC use C compiler CC [$cc]" |
408 | af5db58e | pbrook | echo " --host-cc=CC use C compiler CC [$host_cc] for dyngen etc." |
409 | af5db58e | pbrook | echo " --make=MAKE use specified make [$make]" |
410 | 6a882643 | pbrook | echo " --install=INSTALL use specified install [$install]" |
411 | af5db58e | pbrook | echo " --static enable static build [$static]" |
412 | 85aa5189 | bellard | echo " --disable-werror disable compilation abort on warning" |
413 | fe8f78e4 | balrog | echo " --disable-sdl disable SDL" |
414 | af5db58e | pbrook | echo " --enable-cocoa enable COCOA (Mac OS X only)" |
415 | af5db58e | pbrook | echo " --enable-mingw32 enable Win32 cross compilation with mingw32" |
416 | af5db58e | pbrook | echo " --enable-adlib enable Adlib emulation" |
417 | e5c9a13e | balrog | echo " --enable-ac97 enable AC97 emulation" |
418 | 423d65f4 | balrog | echo " --enable-gus enable Gravis Ultrasound emulation" |
419 | af5db58e | pbrook | echo " --enable-coreaudio enable Coreaudio audio driver" |
420 | af5db58e | pbrook | echo " --enable-alsa enable ALSA audio driver" |
421 | ca9cc28c | balrog | echo " --enable-esd enable EsoundD audio driver" |
422 | af5db58e | pbrook | echo " --enable-fmod enable FMOD audio driver" |
423 | ed5065e1 | ths | echo " --enable-dsound enable DirectSound audio driver" |
424 | 2e4d9fb1 | aurel32 | echo " --disable-brlapi disable BrlAPI" |
425 | 8d5d2d4c | ths | echo " --disable-vnc-tls disable TLS encryption for VNC server" |
426 | af896aaa | pbrook | echo " --disable-curses disable curses output" |
427 | af5db58e | pbrook | echo " --enable-system enable all system emulation targets" |
428 | af5db58e | pbrook | echo " --disable-system disable all system emulation targets" |
429 | 831b7825 | ths | echo " --enable-linux-user enable all linux usermode emulation targets" |
430 | 831b7825 | ths | echo " --disable-linux-user disable all linux usermode emulation targets" |
431 | 831b7825 | ths | echo " --enable-darwin-user enable all darwin usermode emulation targets" |
432 | 831b7825 | ths | echo " --disable-darwin-user disable all darwin usermode emulation targets" |
433 | af5db58e | pbrook | echo " --fmod-lib path to FMOD library" |
434 | af5db58e | pbrook | echo " --fmod-inc path to FMOD includes" |
435 | c5937220 | pbrook | echo " --enable-uname-release=R Return R for uname -r in usermode emulation" |
436 | 3142255c | blueswir1 | echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9" |
437 | af5db58e | pbrook | echo "" |
438 | 5bf08934 | ths | echo "NOTE: The object files are built at the place where configure is launched" |
439 | af5db58e | pbrook | exit 1 |
440 | af5db58e | pbrook | fi |
441 | af5db58e | pbrook | |
442 | 7d13299d | bellard | cc="${cross_prefix}${cc}" |
443 | 7d13299d | bellard | ar="${cross_prefix}${ar}" |
444 | 7d13299d | bellard | strip="${cross_prefix}${strip}" |
445 | 7d13299d | bellard | |
446 | 064aae13 | pbrook | # check that the C compiler works. |
447 | 064aae13 | pbrook | cat > $TMPC <<EOF |
448 | 064aae13 | pbrook | int main(void) {} |
449 | 064aae13 | pbrook | EOF |
450 | 064aae13 | pbrook | |
451 | db7287ed | pbrook | if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC 2> /dev/null ; then |
452 | 064aae13 | pbrook | : C compiler works ok |
453 | 064aae13 | pbrook | else |
454 | 064aae13 | pbrook | echo "ERROR: \"$cc\" either does not exist or does not work" |
455 | 064aae13 | pbrook | exit 1 |
456 | a7350fa1 | bellard | fi |
457 | a7350fa1 | bellard | |
458 | 67b915a5 | bellard | if test "$mingw32" = "yes" ; then |
459 | 5327cf48 | bellard | linux="no" |
460 | 67b915a5 | bellard | EXESUF=".exe" |
461 | 9f059eca | bellard | oss="no" |
462 | 67b915a5 | bellard | fi |
463 | 67b915a5 | bellard | |
464 | 5fafdf24 | ths | # Check for gcc4, error if pre-gcc4 |
465 | 328a4240 | pbrook | if test "$check_gcc" = "yes" ; then |
466 | 328a4240 | pbrook | cat > $TMPC <<EOF |
467 | 328a4240 | pbrook | #if __GNUC__ < 4 |
468 | 328a4240 | pbrook | #error gcc3 |
469 | 328a4240 | pbrook | #endif |
470 | 328a4240 | pbrook | int main(){return 0;} |
471 | 328a4240 | pbrook | EOF |
472 | db7287ed | pbrook | if "$cc" $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then |
473 | 328a4240 | pbrook | echo "WARNING: \"$cc\" looks like gcc 4.x" |
474 | 328a4240 | pbrook | found_compat_cc="no" |
475 | 328a4240 | pbrook | if test "$gcc3_search" = "yes" ; then |
476 | 328a4240 | pbrook | echo "Looking for gcc 3.x" |
477 | 328a4240 | pbrook | for compat_cc in $gcc3_list ; do |
478 | d4af3de2 | balrog | if "$cross_prefix$compat_cc" --version 2> /dev/null | fgrep '(GCC) 3.' > /dev/null 2>&1 ; then |
479 | 328a4240 | pbrook | echo "Found \"$compat_cc\"" |
480 | 1124426a | pbrook | cc="$cross_prefix$compat_cc" |
481 | 328a4240 | pbrook | found_compat_cc="yes" |
482 | 328a4240 | pbrook | break |
483 | 328a4240 | pbrook | fi |
484 | 328a4240 | pbrook | done |
485 | 328a4240 | pbrook | if test "$found_compat_cc" = "no" ; then |
486 | 328a4240 | pbrook | echo "gcc 3.x not found!" |
487 | 328a4240 | pbrook | fi |
488 | 328a4240 | pbrook | fi |
489 | 328a4240 | pbrook | if test "$found_compat_cc" = "no" ; then |
490 | 328a4240 | pbrook | echo "QEMU is known to have problems when compiled with gcc 4.x" |
491 | 328a4240 | pbrook | echo "It is recommended that you use gcc 3.x to build QEMU" |
492 | 328a4240 | pbrook | echo "To use this compiler anyway, configure with --disable-gcc-check" |
493 | 328a4240 | pbrook | exit 1; |
494 | 328a4240 | pbrook | fi |
495 | 328a4240 | pbrook | fi |
496 | 328a4240 | pbrook | fi |
497 | 328a4240 | pbrook | |
498 | ec530c81 | bellard | # |
499 | ec530c81 | bellard | # Solaris specific configure tool chain decisions |
500 | ec530c81 | bellard | # |
501 | ec530c81 | bellard | if test "$solaris" = "yes" ; then |
502 | ec530c81 | bellard | # |
503 | ec530c81 | bellard | # gcc for solaris 10/fcs in /usr/sfw/bin doesn't compile qemu correctly |
504 | ec530c81 | bellard | # override the check with --disable-gcc-check |
505 | 5fafdf24 | ths | # |
506 | ec530c81 | bellard | if test "$solarisrev" -eq 10 -a "$check_gcc" = "yes" ; then |
507 | ec530c81 | bellard | solgcc=`which $cc` |
508 | ec530c81 | bellard | if test "$solgcc" = "/usr/sfw/bin/gcc" ; then |
509 | ec530c81 | bellard | echo "Solaris 10/FCS gcc in /usr/sfw/bin will not compiled qemu correctly." |
510 | ec530c81 | bellard | echo "please get gcc-3.4.3 or later, from www.blastwave.org using pkg-get -i gcc3" |
511 | ec530c81 | bellard | echo "or get the latest patch from SunSolve for gcc" |
512 | ec530c81 | bellard | exit 1 |
513 | ec530c81 | bellard | fi |
514 | ec530c81 | bellard | fi |
515 | ec530c81 | bellard | solinst=`which $install 2> /dev/null | /usr/bin/grep -v "no $install in"` |
516 | ec530c81 | bellard | if test -z "$solinst" ; then |
517 | ec530c81 | bellard | echo "Solaris install program not found. Use --install=/usr/ucb/install or" |
518 | ec530c81 | bellard | echo "install fileutils from www.blastwave.org using pkg-get -i fileutils" |
519 | ec530c81 | bellard | echo "to get ginstall which is used by default (which lives in /opt/csw/bin)" |
520 | ec530c81 | bellard | exit 1 |
521 | ec530c81 | bellard | fi |
522 | ec530c81 | bellard | if test "$solinst" = "/usr/sbin/install" ; then |
523 | ec530c81 | bellard | echo "Error: Solaris /usr/sbin/install is not an appropriate install program." |
524 | ec530c81 | bellard | echo "try ginstall from the GNU fileutils available from www.blastwave.org" |
525 | ec530c81 | bellard | echo "using pkg-get -i fileutils, or use --install=/usr/ucb/install" |
526 | ec530c81 | bellard | exit 1 |
527 | ec530c81 | bellard | fi |
528 | ec530c81 | bellard | sol_ar=`which ar 2> /dev/null | /usr/bin/grep -v "no ar in"` |
529 | ec530c81 | bellard | if test -z "$sol_ar" ; then |
530 | ec530c81 | bellard | echo "Error: No path includes ar" |
531 | ec530c81 | bellard | if test -f /usr/ccs/bin/ar ; then |
532 | ec530c81 | bellard | echo "Add /usr/ccs/bin to your path and rerun configure" |
533 | ec530c81 | bellard | fi |
534 | ec530c81 | bellard | exit 1 |
535 | ec530c81 | bellard | fi |
536 | 5fafdf24 | ths | fi |
537 | ec530c81 | bellard | |
538 | ec530c81 | bellard | |
539 | 5327cf48 | bellard | if test -z "$target_list" ; then |
540 | 5327cf48 | bellard | # these targets are portable |
541 | 0a8e90f4 | pbrook | if [ "$softmmu" = "yes" ] ; then |
542 | 2408a527 | aurel32 | target_list="\ |
543 | 2408a527 | aurel32 | i386-softmmu \ |
544 | 2408a527 | aurel32 | x86_64-softmmu \ |
545 | 2408a527 | aurel32 | arm-softmmu \ |
546 | 2408a527 | aurel32 | cris-softmmu \ |
547 | 2408a527 | aurel32 | m68k-softmmu \ |
548 | 2408a527 | aurel32 | mips-softmmu \ |
549 | 2408a527 | aurel32 | mipsel-softmmu \ |
550 | 2408a527 | aurel32 | mips64-softmmu \ |
551 | 2408a527 | aurel32 | mips64el-softmmu \ |
552 | 2408a527 | aurel32 | ppc-softmmu \ |
553 | 2408a527 | aurel32 | ppcemb-softmmu \ |
554 | 2408a527 | aurel32 | ppc64-softmmu \ |
555 | 2408a527 | aurel32 | sh4-softmmu \ |
556 | 2408a527 | aurel32 | sh4eb-softmmu \ |
557 | 2408a527 | aurel32 | sparc-softmmu \ |
558 | 2408a527 | aurel32 | " |
559 | 0a8e90f4 | pbrook | fi |
560 | 5327cf48 | bellard | # the following are Linux specific |
561 | 831b7825 | ths | if [ "$linux_user" = "yes" ] ; then |
562 | 2408a527 | aurel32 | target_list="${target_list}\ |
563 | 2408a527 | aurel32 | i386-linux-user \ |
564 | 2408a527 | aurel32 | x86_64-linux-user \ |
565 | 2408a527 | aurel32 | alpha-linux-user \ |
566 | 2408a527 | aurel32 | arm-linux-user \ |
567 | 2408a527 | aurel32 | armeb-linux-user \ |
568 | 2408a527 | aurel32 | cris-linux-user \ |
569 | 2408a527 | aurel32 | m68k-linux-user \ |
570 | 2408a527 | aurel32 | mips-linux-user \ |
571 | 2408a527 | aurel32 | mipsel-linux-user \ |
572 | 2408a527 | aurel32 | ppc-linux-user \ |
573 | 2408a527 | aurel32 | ppc64-linux-user \ |
574 | 2408a527 | aurel32 | ppc64abi32-linux-user \ |
575 | 2408a527 | aurel32 | sh4-linux-user \ |
576 | 2408a527 | aurel32 | sh4eb-linux-user \ |
577 | 2408a527 | aurel32 | sparc-linux-user \ |
578 | 2408a527 | aurel32 | sparc64-linux-user \ |
579 | 2408a527 | aurel32 | sparc32plus-linux-user \ |
580 | 2408a527 | aurel32 | " |
581 | 831b7825 | ths | fi |
582 | 831b7825 | ths | # the following are Darwin specific |
583 | 831b7825 | ths | if [ "$darwin_user" = "yes" ] ; then |
584 | 2408a527 | aurel32 | target_list="$target_list i386-darwin-user ppc-darwin-user" |
585 | 5327cf48 | bellard | fi |
586 | 6e20a45f | bellard | else |
587 | b1a550a0 | pbrook | target_list=`echo "$target_list" | sed -e 's/,/ /g'` |
588 | 5327cf48 | bellard | fi |
589 | 0a8e90f4 | pbrook | if test -z "$target_list" ; then |
590 | 0a8e90f4 | pbrook | echo "No targets enabled" |
591 | 0a8e90f4 | pbrook | exit 1 |
592 | 0a8e90f4 | pbrook | fi |
593 | 5327cf48 | bellard | |
594 | 7d13299d | bellard | if test -z "$cross_prefix" ; then |
595 | 7d13299d | bellard | |
596 | 7d13299d | bellard | # --- |
597 | 7d13299d | bellard | # big/little endian test |
598 | 7d13299d | bellard | cat > $TMPC << EOF |
599 | 7d13299d | bellard | #include <inttypes.h> |
600 | 7d13299d | bellard | int main(int argc, char ** argv){ |
601 | 1d14ffa9 | bellard | volatile uint32_t i=0x01234567; |
602 | 1d14ffa9 | bellard | return (*((uint8_t*)(&i))) == 0x67; |
603 | 7d13299d | bellard | } |
604 | 7d13299d | bellard | EOF |
605 | 7d13299d | bellard | |
606 | db7287ed | pbrook | if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then |
607 | 7d13299d | bellard | $TMPE && bigendian="yes" |
608 | 7d13299d | bellard | else |
609 | 7d13299d | bellard | echo big/little test failed |
610 | 7d13299d | bellard | fi |
611 | 7d13299d | bellard | |
612 | 7d13299d | bellard | else |
613 | 7d13299d | bellard | |
614 | 7d13299d | bellard | # if cross compiling, cannot launch a program, so make a static guess |
615 | 0938cda5 | aurel32 | if test "$cpu" = "armv4b" \ |
616 | f54b3f92 | aurel32 | -o "$cpu" = "hppa" \ |
617 | 0938cda5 | aurel32 | -o "$cpu" = "m68k" \ |
618 | 0938cda5 | aurel32 | -o "$cpu" = "mips" \ |
619 | 0938cda5 | aurel32 | -o "$cpu" = "mips64" \ |
620 | 0938cda5 | aurel32 | -o "$cpu" = "powerpc" \ |
621 | 0938cda5 | aurel32 | -o "$cpu" = "s390" \ |
622 | 0938cda5 | aurel32 | -o "$cpu" = "sparc" \ |
623 | 0938cda5 | aurel32 | -o "$cpu" = "sparc64"; then |
624 | 7d13299d | bellard | bigendian="yes" |
625 | 7d13299d | bellard | fi |
626 | 7d13299d | bellard | |
627 | 7d13299d | bellard | fi |
628 | 7d13299d | bellard | |
629 | b6853697 | bellard | # host long bits test |
630 | b6853697 | bellard | hostlongbits="32" |
631 | 0938cda5 | aurel32 | if test "$cpu" = "x86_64" \ |
632 | 0938cda5 | aurel32 | -o "$cpu" = "alpha" \ |
633 | 0938cda5 | aurel32 | -o "$cpu" = "ia64" \ |
634 | 0938cda5 | aurel32 | -o "$cpu" = "sparc64"; then |
635 | b6853697 | bellard | hostlongbits="64" |
636 | b6853697 | bellard | fi |
637 | b6853697 | bellard | |
638 | e8cd23de | bellard | # check gcc options support |
639 | 04369ff2 | bellard | cat > $TMPC <<EOF |
640 | 04369ff2 | bellard | int main(void) { |
641 | 04369ff2 | bellard | } |
642 | 04369ff2 | bellard | EOF |
643 | 04369ff2 | bellard | |
644 | 11d9f695 | bellard | ########################################## |
645 | 11d9f695 | bellard | # SDL probe |
646 | 11d9f695 | bellard | |
647 | 11d9f695 | bellard | sdl_too_old=no |
648 | 11d9f695 | bellard | |
649 | 11d9f695 | bellard | if test -z "$sdl" ; then |
650 | 069b0bda | ths | sdl_config="sdl-config" |
651 | 069b0bda | ths | sdl=no |
652 | 069b0bda | ths | sdl_static=no |
653 | 069b0bda | ths | |
654 | 069b0bda | ths | if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then |
655 | 069b0bda | ths | # win32 cross compilation case |
656 | 069b0bda | ths | sdl_config="i386-mingw32msvc-sdl-config" |
657 | 069b0bda | ths | sdl=yes |
658 | 069b0bda | ths | else |
659 | 069b0bda | ths | # normal SDL probe |
660 | 11d9f695 | bellard | cat > $TMPC << EOF |
661 | 11d9f695 | bellard | #include <SDL.h> |
662 | 11d9f695 | bellard | #undef main /* We don't want SDL to override our main() */ |
663 | 11d9f695 | bellard | int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } |
664 | 11d9f695 | bellard | EOF |
665 | db7287ed | pbrook | 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 |
666 | 069b0bda | ths | _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` |
667 | 069b0bda | ths | if test "$_sdlversion" -lt 121 ; then |
668 | 069b0bda | ths | sdl_too_old=yes |
669 | 069b0bda | ths | else |
670 | 069b0bda | ths | if test "$cocoa" = "no" ; then |
671 | 069b0bda | ths | sdl=yes |
672 | 069b0bda | ths | fi |
673 | 069b0bda | ths | fi |
674 | 11d9f695 | bellard | |
675 | 069b0bda | ths | # static link with sdl ? |
676 | 069b0bda | ths | if test "$sdl" = "yes" ; then |
677 | 069b0bda | ths | aa="no" |
678 | 069b0bda | ths | `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes" |
679 | 069b0bda | ths | sdl_static_libs=`$sdl_config --static-libs 2>/dev/null` |
680 | 069b0bda | ths | if [ "$aa" = "yes" ] ; then |
681 | 069b0bda | ths | sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" |
682 | 069b0bda | ths | fi |
683 | 069b0bda | ths | |
684 | 8281db4d | ths | if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then |
685 | 069b0bda | ths | sdl_static=yes |
686 | 069b0bda | ths | fi |
687 | 069b0bda | ths | fi # static link |
688 | 069b0bda | ths | fi # sdl compile test |
689 | 069b0bda | ths | fi # cross compilation |
690 | fd677642 | ths | else |
691 | 069b0bda | ths | # Make sure to disable cocoa if sdl was set |
692 | 069b0bda | ths | if test "$sdl" = "yes" ; then |
693 | 069b0bda | ths | cocoa="no" |
694 | 069b0bda | ths | coreaudio="no" |
695 | 069b0bda | ths | fi |
696 | a6e022ad | bellard | fi # -z $sdl |
697 | 11d9f695 | bellard | |
698 | 8f28f3fb | ths | ########################################## |
699 | 8d5d2d4c | ths | # VNC TLS detection |
700 | 8d5d2d4c | ths | if test "$vnc_tls" = "yes" ; then |
701 | 8d5d2d4c | ths | `pkg-config gnutls` || vnc_tls="no" |
702 | 8d5d2d4c | ths | fi |
703 | 8d5d2d4c | ths | if test "$vnc_tls" = "yes" ; then |
704 | 8d5d2d4c | ths | vnc_tls_cflags=`pkg-config --cflags gnutls` |
705 | 8d5d2d4c | ths | vnc_tls_libs=`pkg-config --libs gnutls` |
706 | 8d5d2d4c | ths | fi |
707 | 8d5d2d4c | ths | |
708 | 8d5d2d4c | ths | ########################################## |
709 | 8f28f3fb | ths | # alsa sound support libraries |
710 | 8f28f3fb | ths | |
711 | 8f28f3fb | ths | if test "$alsa" = "yes" ; then |
712 | 8f28f3fb | ths | cat > $TMPC << EOF |
713 | 8f28f3fb | ths | #include <alsa/asoundlib.h> |
714 | 8f28f3fb | ths | int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); } |
715 | 8f28f3fb | ths | EOF |
716 | db7287ed | pbrook | if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lasound 2> /dev/null ; then |
717 | 8f28f3fb | ths | : |
718 | 8f28f3fb | ths | else |
719 | 8f28f3fb | ths | echo |
720 | 8f28f3fb | ths | echo "Error: Could not find alsa" |
721 | 8f28f3fb | ths | echo "Make sure to have the alsa libs and headers installed." |
722 | 8f28f3fb | ths | echo |
723 | 8f28f3fb | ths | exit 1 |
724 | 8f28f3fb | ths | fi |
725 | 8f28f3fb | ths | fi |
726 | 8f28f3fb | ths | |
727 | 4d3b6f6e | balrog | ########################################## |
728 | 2e4d9fb1 | aurel32 | # BrlAPI probe |
729 | 2e4d9fb1 | aurel32 | |
730 | 2e4d9fb1 | aurel32 | if test -z "$brlapi" ; then |
731 | 2e4d9fb1 | aurel32 | brlapi=no |
732 | 2e4d9fb1 | aurel32 | cat > $TMPC << EOF |
733 | 2e4d9fb1 | aurel32 | #include <brlapi.h> |
734 | 2e4d9fb1 | aurel32 | int main( void ) { return brlapi__openConnection (NULL, NULL, NULL); } |
735 | 2e4d9fb1 | aurel32 | EOF |
736 | a40e56d5 | aurel32 | if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC -lbrlapi 2> /dev/null ; then |
737 | 2e4d9fb1 | aurel32 | brlapi=yes |
738 | 2e4d9fb1 | aurel32 | fi # brlapi compile test |
739 | 2e4d9fb1 | aurel32 | fi # -z $brlapi |
740 | 2e4d9fb1 | aurel32 | |
741 | 2e4d9fb1 | aurel32 | ########################################## |
742 | 4d3b6f6e | balrog | # curses probe |
743 | 4d3b6f6e | balrog | |
744 | 4d3b6f6e | balrog | if test "$curses" = "yes" ; then |
745 | 4d3b6f6e | balrog | curses=no |
746 | 4d3b6f6e | balrog | cat > $TMPC << EOF |
747 | 4d3b6f6e | balrog | #include <curses.h> |
748 | 4d3b6f6e | balrog | int main(void) { return curses_version(); } |
749 | 4d3b6f6e | balrog | EOF |
750 | af896aaa | pbrook | if $cc $ARCH_CFLAGS -o $TMPE $TMPC -lcurses 2> /dev/null ; then |
751 | 4d3b6f6e | balrog | curses=yes |
752 | 4d3b6f6e | balrog | fi |
753 | 4d3b6f6e | balrog | fi # test "$curses" |
754 | 4d3b6f6e | balrog | |
755 | cc8ae6de | pbrook | # Check if tools are available to build documentation. |
756 | 6c591867 | ths | if [ -x "`which texi2html 2>/dev/null`" ] && \ |
757 | 6c591867 | ths | [ -x "`which pod2man 2>/dev/null`" ]; then |
758 | cc8ae6de | pbrook | build_docs="yes" |
759 | cc8ae6de | pbrook | fi |
760 | cc8ae6de | pbrook | |
761 | 11d9f695 | bellard | if test "$mingw32" = "yes" ; then |
762 | 308c3593 | pbrook | if test -z "$prefix" ; then |
763 | 308c3593 | pbrook | prefix="/c/Program Files/Qemu" |
764 | 308c3593 | pbrook | fi |
765 | 308c3593 | pbrook | mansuffix="" |
766 | 308c3593 | pbrook | datasuffix="" |
767 | 308c3593 | pbrook | docsuffix="" |
768 | 308c3593 | pbrook | binsuffix="" |
769 | 11d9f695 | bellard | else |
770 | 308c3593 | pbrook | if test -z "$prefix" ; then |
771 | 308c3593 | pbrook | prefix="/usr/local" |
772 | 308c3593 | pbrook | fi |
773 | 308c3593 | pbrook | mansuffix="/share/man" |
774 | 308c3593 | pbrook | datasuffix="/share/qemu" |
775 | 308c3593 | pbrook | docsuffix="/share/doc/qemu" |
776 | 308c3593 | pbrook | binsuffix="/bin" |
777 | 11d9f695 | bellard | fi |
778 | 5a67135a | bellard | |
779 | 43ce4dfe | bellard | echo "Install prefix $prefix" |
780 | 308c3593 | pbrook | echo "BIOS directory $prefix$datasuffix" |
781 | 308c3593 | pbrook | echo "binary directory $prefix$binsuffix" |
782 | 11d9f695 | bellard | if test "$mingw32" = "no" ; then |
783 | 308c3593 | pbrook | echo "Manual directory $prefix$mansuffix" |
784 | 43ce4dfe | bellard | echo "ELF interp prefix $interp_prefix" |
785 | 11d9f695 | bellard | fi |
786 | 5a67135a | bellard | echo "Source path $source_path" |
787 | 43ce4dfe | bellard | echo "C compiler $cc" |
788 | 83469015 | bellard | echo "Host C compiler $host_cc" |
789 | db7287ed | pbrook | echo "ARCH_CFLAGS $ARCH_CFLAGS" |
790 | 43ce4dfe | bellard | echo "make $make" |
791 | 6a882643 | pbrook | echo "install $install" |
792 | 43ce4dfe | bellard | echo "host CPU $cpu" |
793 | de83cd02 | bellard | echo "host big endian $bigendian" |
794 | 97a847bc | bellard | echo "target list $target_list" |
795 | 43ce4dfe | bellard | echo "gprof enabled $gprof" |
796 | 05c2a3e7 | bellard | echo "profiler $profiler" |
797 | 43ce4dfe | bellard | echo "static build $static" |
798 | 85aa5189 | bellard | echo "-Werror enabled $werror" |
799 | 5b0753e0 | bellard | if test "$darwin" = "yes" ; then |
800 | 5b0753e0 | bellard | echo "Cocoa support $cocoa" |
801 | 5b0753e0 | bellard | fi |
802 | 97a847bc | bellard | echo "SDL support $sdl" |
803 | e4afee97 | bellard | if test "$sdl" != "no" ; then |
804 | e4afee97 | bellard | echo "SDL static link $sdl_static" |
805 | e4afee97 | bellard | fi |
806 | 4d3b6f6e | balrog | echo "curses support $curses" |
807 | 67b915a5 | bellard | echo "mingw32 support $mingw32" |
808 | fb065187 | bellard | echo "Adlib support $adlib" |
809 | e5c9a13e | balrog | echo "AC97 support $ac97" |
810 | 423d65f4 | balrog | echo "GUS support $gus" |
811 | 1d14ffa9 | bellard | echo "CoreAudio support $coreaudio" |
812 | 1d14ffa9 | bellard | echo "ALSA support $alsa" |
813 | ca9cc28c | balrog | echo "EsounD support $esd" |
814 | 1d14ffa9 | bellard | echo "DSound support $dsound" |
815 | 1d14ffa9 | bellard | if test "$fmod" = "yes"; then |
816 | 1d14ffa9 | bellard | if test -z $fmod_lib || test -z $fmod_inc; then |
817 | 1d14ffa9 | bellard | echo |
818 | 1d14ffa9 | bellard | echo "Error: You must specify path to FMOD library and headers" |
819 | 1d14ffa9 | bellard | echo "Example: --fmod-inc=/path/include/fmod --fmod-lib=/path/lib/libfmod-3.74.so" |
820 | 1d14ffa9 | bellard | echo |
821 | 1d14ffa9 | bellard | exit 1 |
822 | 1d14ffa9 | bellard | fi |
823 | b1a550a0 | pbrook | fmod_support=" (lib='$fmod_lib' include='$fmod_inc')" |
824 | b1a550a0 | pbrook | else |
825 | b1a550a0 | pbrook | fmod_support="" |
826 | 102a52e4 | bellard | fi |
827 | b1a550a0 | pbrook | echo "FMOD support $fmod $fmod_support" |
828 | 6b4d2ba1 | ths | echo "OSS support $oss" |
829 | 8d5d2d4c | ths | echo "VNC TLS support $vnc_tls" |
830 | 8d5d2d4c | ths | if test "$vnc_tls" = "yes" ; then |
831 | 8d5d2d4c | ths | echo " TLS CFLAGS $vnc_tls_cflags" |
832 | 8d5d2d4c | ths | echo " TLS LIBS $vnc_tls_libs" |
833 | 8d5d2d4c | ths | fi |
834 | 3142255c | blueswir1 | if test -n "$sparc_cpu"; then |
835 | 3142255c | blueswir1 | echo "Target Sparc Arch $sparc_cpu" |
836 | 3142255c | blueswir1 | fi |
837 | 07f4ddbf | bellard | echo "kqemu support $kqemu" |
838 | 2e4d9fb1 | aurel32 | echo "brlapi support $brlapi" |
839 | cc8ae6de | pbrook | echo "Documentation $build_docs" |
840 | c5937220 | pbrook | [ ! -z "$uname_release" ] && \ |
841 | c5937220 | pbrook | echo "uname -r $uname_release" |
842 | 67b915a5 | bellard | |
843 | 97a847bc | bellard | if test $sdl_too_old = "yes"; then |
844 | 24b55b96 | bellard | echo "-> Your SDL version is too old - please upgrade to have SDL support" |
845 | 7c1f25b4 | bellard | fi |
846 | 20b40c6a | ths | if [ -s /tmp/qemu-$$-sdl-config.log ]; then |
847 | 20b40c6a | ths | echo "The error log from compiling the libSDL test is: " |
848 | 20b40c6a | ths | cat /tmp/qemu-$$-sdl-config.log |
849 | 20b40c6a | ths | fi |
850 | 20b40c6a | ths | rm -f /tmp/qemu-$$-sdl-config.log |
851 | 24b55b96 | bellard | #if test "$sdl_static" = "no"; then |
852 | 24b55b96 | bellard | # echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output" |
853 | 24b55b96 | bellard | #fi |
854 | 97a847bc | bellard | config_mak="config-host.mak" |
855 | 97a847bc | bellard | config_h="config-host.h" |
856 | 7d13299d | bellard | |
857 | 7c1f25b4 | bellard | #echo "Creating $config_mak and $config_h" |
858 | 7d13299d | bellard | |
859 | 15d9ca0f | ths | test -f $config_h && mv $config_h ${config_h}~ |
860 | 15d9ca0f | ths | |
861 | 97a847bc | bellard | echo "# Automatically generated by configure - do not modify" > $config_mak |
862 | 29517134 | pbrook | echo "# Configured with: $0 $@" >> $config_mak |
863 | 97a847bc | bellard | echo "/* Automatically generated by configure - do not modify */" > $config_h |
864 | 7d13299d | bellard | |
865 | 97a847bc | bellard | echo "prefix=$prefix" >> $config_mak |
866 | 308c3593 | pbrook | echo "bindir=\${prefix}$binsuffix" >> $config_mak |
867 | 308c3593 | pbrook | echo "mandir=\${prefix}$mansuffix" >> $config_mak |
868 | 308c3593 | pbrook | echo "datadir=\${prefix}$datasuffix" >> $config_mak |
869 | 4ad5b06d | ths | echo "docdir=\${prefix}$docsuffix" >> $config_mak |
870 | 308c3593 | pbrook | echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h |
871 | 97a847bc | bellard | echo "MAKE=$make" >> $config_mak |
872 | 6a882643 | pbrook | echo "INSTALL=$install" >> $config_mak |
873 | 97a847bc | bellard | echo "CC=$cc" >> $config_mak |
874 | 97a847bc | bellard | echo "HOST_CC=$host_cc" >> $config_mak |
875 | 97a847bc | bellard | echo "AR=$ar" >> $config_mak |
876 | 97a847bc | bellard | echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak |
877 | 40293e58 | bellard | # XXX: only use CFLAGS and LDFLAGS ? |
878 | 40293e58 | bellard | # XXX: should export HOST_CFLAGS and HOST_LDFLAGS for cross |
879 | 40293e58 | bellard | # compilation of dyngen tool (useful for win32 build on Linux host) |
880 | 6f30fa85 | ths | echo "OS_CFLAGS=$OS_CFLAGS" >> $config_mak |
881 | 3142255c | blueswir1 | echo "OS_LDFLAGS=$OS_LDFLAGS" >> $config_mak |
882 | 3142255c | blueswir1 | echo "ARCH_CFLAGS=$ARCH_CFLAGS" >> $config_mak |
883 | 3142255c | blueswir1 | echo "ARCH_LDFLAGS=$ARCH_LDFLAGS" >> $config_mak |
884 | 97a847bc | bellard | echo "CFLAGS=$CFLAGS" >> $config_mak |
885 | 97a847bc | bellard | echo "LDFLAGS=$LDFLAGS" >> $config_mak |
886 | 67b915a5 | bellard | echo "EXESUF=$EXESUF" >> $config_mak |
887 | 70956b77 | ths | echo "AIOLIBS=$AIOLIBS" >> $config_mak |
888 | 2408a527 | aurel32 | case "$cpu" in |
889 | 2408a527 | aurel32 | i386) |
890 | 2408a527 | aurel32 | echo "ARCH=i386" >> $config_mak |
891 | 2408a527 | aurel32 | echo "#define HOST_I386 1" >> $config_h |
892 | 2408a527 | aurel32 | ;; |
893 | 2408a527 | aurel32 | x86_64) |
894 | 2408a527 | aurel32 | echo "ARCH=x86_64" >> $config_mak |
895 | 2408a527 | aurel32 | echo "#define HOST_X86_64 1" >> $config_h |
896 | 2408a527 | aurel32 | ;; |
897 | 2408a527 | aurel32 | alpha) |
898 | 2408a527 | aurel32 | echo "ARCH=alpha" >> $config_mak |
899 | 2408a527 | aurel32 | echo "#define HOST_ALPHA 1" >> $config_h |
900 | 2408a527 | aurel32 | ;; |
901 | 2408a527 | aurel32 | armv4b) |
902 | 2408a527 | aurel32 | echo "ARCH=arm" >> $config_mak |
903 | 2408a527 | aurel32 | echo "#define HOST_ARM 1" >> $config_h |
904 | 2408a527 | aurel32 | ;; |
905 | 2408a527 | aurel32 | armv4l) |
906 | 2408a527 | aurel32 | echo "ARCH=arm" >> $config_mak |
907 | 2408a527 | aurel32 | echo "#define HOST_ARM 1" >> $config_h |
908 | 2408a527 | aurel32 | ;; |
909 | 2408a527 | aurel32 | cris) |
910 | 2408a527 | aurel32 | echo "ARCH=cris" >> $config_mak |
911 | 2408a527 | aurel32 | echo "#define HOST_CRIS 1" >> $config_h |
912 | 2408a527 | aurel32 | ;; |
913 | 2408a527 | aurel32 | hppa) |
914 | 2408a527 | aurel32 | echo "ARCH=hppa" >> $config_mak |
915 | 2408a527 | aurel32 | echo "#define HOST_HPPA 1" >> $config_h |
916 | 2408a527 | aurel32 | ;; |
917 | 2408a527 | aurel32 | ia64) |
918 | 2408a527 | aurel32 | echo "ARCH=ia64" >> $config_mak |
919 | 2408a527 | aurel32 | echo "#define HOST_IA64 1" >> $config_h |
920 | 2408a527 | aurel32 | ;; |
921 | 2408a527 | aurel32 | m68k) |
922 | 2408a527 | aurel32 | echo "ARCH=m68k" >> $config_mak |
923 | 2408a527 | aurel32 | echo "#define HOST_M68K 1" >> $config_h |
924 | 2408a527 | aurel32 | ;; |
925 | 2408a527 | aurel32 | mips) |
926 | 2408a527 | aurel32 | echo "ARCH=mips" >> $config_mak |
927 | 2408a527 | aurel32 | echo "#define HOST_MIPS 1" >> $config_h |
928 | 2408a527 | aurel32 | ;; |
929 | 2408a527 | aurel32 | mips64) |
930 | 2408a527 | aurel32 | echo "ARCH=mips64" >> $config_mak |
931 | 2408a527 | aurel32 | echo "#define HOST_MIPS64 1" >> $config_h |
932 | 2408a527 | aurel32 | ;; |
933 | 2408a527 | aurel32 | powerpc) |
934 | 2408a527 | aurel32 | echo "ARCH=ppc" >> $config_mak |
935 | 2408a527 | aurel32 | echo "#define HOST_PPC 1" >> $config_h |
936 | 2408a527 | aurel32 | ;; |
937 | 2408a527 | aurel32 | s390) |
938 | 2408a527 | aurel32 | echo "ARCH=s390" >> $config_mak |
939 | 2408a527 | aurel32 | echo "#define HOST_S390 1" >> $config_h |
940 | 2408a527 | aurel32 | ;; |
941 | 2408a527 | aurel32 | sparc) |
942 | 2408a527 | aurel32 | echo "ARCH=sparc" >> $config_mak |
943 | 2408a527 | aurel32 | echo "#define HOST_SPARC 1" >> $config_h |
944 | 2408a527 | aurel32 | ;; |
945 | 2408a527 | aurel32 | sparc64) |
946 | 2408a527 | aurel32 | echo "ARCH=sparc64" >> $config_mak |
947 | 2408a527 | aurel32 | echo "#define HOST_SPARC64 1" >> $config_h |
948 | 2408a527 | aurel32 | ;; |
949 | 2408a527 | aurel32 | *) |
950 | 2408a527 | aurel32 | echo "Unsupported CPU = $cpu" |
951 | 2408a527 | aurel32 | exit 1 |
952 | 2408a527 | aurel32 | ;; |
953 | 2408a527 | aurel32 | esac |
954 | 7d13299d | bellard | if test "$bigendian" = "yes" ; then |
955 | 97a847bc | bellard | echo "WORDS_BIGENDIAN=yes" >> $config_mak |
956 | 97a847bc | bellard | echo "#define WORDS_BIGENDIAN 1" >> $config_h |
957 | 97a847bc | bellard | fi |
958 | b6853697 | bellard | echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h |
959 | 67b915a5 | bellard | if test "$mingw32" = "yes" ; then |
960 | 67b915a5 | bellard | echo "CONFIG_WIN32=yes" >> $config_mak |
961 | 11d9f695 | bellard | echo "#define CONFIG_WIN32 1" >> $config_h |
962 | 210fa556 | pbrook | else |
963 | 210fa556 | pbrook | cat > $TMPC << EOF |
964 | 210fa556 | pbrook | #include <byteswap.h> |
965 | 210fa556 | pbrook | int main(void) { return bswap_32(0); } |
966 | 210fa556 | pbrook | EOF |
967 | db7287ed | pbrook | if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then |
968 | 210fa556 | pbrook | echo "#define HAVE_BYTESWAP_H 1" >> $config_h |
969 | 210fa556 | pbrook | fi |
970 | 67b915a5 | bellard | fi |
971 | 83fb7adf | bellard | if test "$darwin" = "yes" ; then |
972 | 83fb7adf | bellard | echo "CONFIG_DARWIN=yes" >> $config_mak |
973 | 83fb7adf | bellard | echo "#define CONFIG_DARWIN 1" >> $config_h |
974 | 83fb7adf | bellard | fi |
975 | ec530c81 | bellard | if test "$solaris" = "yes" ; then |
976 | ec530c81 | bellard | echo "CONFIG_SOLARIS=yes" >> $config_mak |
977 | 38cfa06c | bellard | echo "#define HOST_SOLARIS $solarisrev" >> $config_h |
978 | 0475a5ca | ths | if test "$needs_libsunmath" = "yes" ; then |
979 | 0475a5ca | ths | echo "NEEDS_LIBSUNMATH=yes" >> $config_mak |
980 | 0475a5ca | ths | echo "#define NEEDS_LIBSUNMATH 1" >> $config_h |
981 | 0475a5ca | ths | fi |
982 | ec530c81 | bellard | fi |
983 | 3142255c | blueswir1 | if test -n "$sparc_cpu"; then |
984 | 3142255c | blueswir1 | echo "CONFIG__sparc_${sparc_cpu}__=yes" >> $config_mak |
985 | 3142255c | blueswir1 | echo "#define __sparc_${sparc_cpu}__ 1" >> $config_h |
986 | 3142255c | blueswir1 | fi |
987 | 67b915a5 | bellard | if test "$gdbstub" = "yes" ; then |
988 | 67b915a5 | bellard | echo "CONFIG_GDBSTUB=yes" >> $config_mak |
989 | 67b915a5 | bellard | echo "#define CONFIG_GDBSTUB 1" >> $config_h |
990 | 67b915a5 | bellard | fi |
991 | 97a847bc | bellard | if test "$gprof" = "yes" ; then |
992 | 97a847bc | bellard | echo "TARGET_GPROF=yes" >> $config_mak |
993 | 97a847bc | bellard | echo "#define HAVE_GPROF 1" >> $config_h |
994 | 97a847bc | bellard | fi |
995 | 97a847bc | bellard | if test "$static" = "yes" ; then |
996 | 97a847bc | bellard | echo "CONFIG_STATIC=yes" >> $config_mak |
997 | 50863472 | bellard | echo "#define CONFIG_STATIC 1" >> $config_h |
998 | 7d13299d | bellard | fi |
999 | 05c2a3e7 | bellard | if test $profiler = "yes" ; then |
1000 | 05c2a3e7 | bellard | echo "#define CONFIG_PROFILER 1" >> $config_h |
1001 | 05c2a3e7 | bellard | fi |
1002 | c20709aa | bellard | if test "$slirp" = "yes" ; then |
1003 | c20709aa | bellard | echo "CONFIG_SLIRP=yes" >> $config_mak |
1004 | c20709aa | bellard | echo "#define CONFIG_SLIRP 1" >> $config_h |
1005 | c20709aa | bellard | fi |
1006 | fb065187 | bellard | if test "$adlib" = "yes" ; then |
1007 | fb065187 | bellard | echo "CONFIG_ADLIB=yes" >> $config_mak |
1008 | fb065187 | bellard | echo "#define CONFIG_ADLIB 1" >> $config_h |
1009 | fb065187 | bellard | fi |
1010 | e5c9a13e | balrog | if test "$ac97" = "yes" ; then |
1011 | e5c9a13e | balrog | echo "CONFIG_AC97=yes" >> $config_mak |
1012 | e5c9a13e | balrog | echo "#define CONFIG_AC97 1" >> $config_h |
1013 | e5c9a13e | balrog | fi |
1014 | 423d65f4 | balrog | if test "$gus" = "yes" ; then |
1015 | 423d65f4 | balrog | echo "CONFIG_GUS=yes" >> $config_mak |
1016 | 423d65f4 | balrog | echo "#define CONFIG_GUS 1" >> $config_h |
1017 | 423d65f4 | balrog | fi |
1018 | fb065187 | bellard | if test "$oss" = "yes" ; then |
1019 | fb065187 | bellard | echo "CONFIG_OSS=yes" >> $config_mak |
1020 | fb065187 | bellard | echo "#define CONFIG_OSS 1" >> $config_h |
1021 | fb065187 | bellard | fi |
1022 | 1d14ffa9 | bellard | if test "$coreaudio" = "yes" ; then |
1023 | 1d14ffa9 | bellard | echo "CONFIG_COREAUDIO=yes" >> $config_mak |
1024 | 1d14ffa9 | bellard | echo "#define CONFIG_COREAUDIO 1" >> $config_h |
1025 | 1d14ffa9 | bellard | fi |
1026 | 1d14ffa9 | bellard | if test "$alsa" = "yes" ; then |
1027 | 1d14ffa9 | bellard | echo "CONFIG_ALSA=yes" >> $config_mak |
1028 | 1d14ffa9 | bellard | echo "#define CONFIG_ALSA 1" >> $config_h |
1029 | 1d14ffa9 | bellard | fi |
1030 | ca9cc28c | balrog | if test "$esd" = "yes" ; then |
1031 | ca9cc28c | balrog | echo "CONFIG_ESD=yes" >> $config_mak |
1032 | ca9cc28c | balrog | echo "#define CONFIG_ESD 1" >> $config_h |
1033 | ca9cc28c | balrog | fi |
1034 | 1d14ffa9 | bellard | if test "$dsound" = "yes" ; then |
1035 | 1d14ffa9 | bellard | echo "CONFIG_DSOUND=yes" >> $config_mak |
1036 | 1d14ffa9 | bellard | echo "#define CONFIG_DSOUND 1" >> $config_h |
1037 | 1d14ffa9 | bellard | fi |
1038 | 102a52e4 | bellard | if test "$fmod" = "yes" ; then |
1039 | 102a52e4 | bellard | echo "CONFIG_FMOD=yes" >> $config_mak |
1040 | 102a52e4 | bellard | echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak |
1041 | 102a52e4 | bellard | echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak |
1042 | 102a52e4 | bellard | echo "#define CONFIG_FMOD 1" >> $config_h |
1043 | 102a52e4 | bellard | fi |
1044 | 8d5d2d4c | ths | if test "$vnc_tls" = "yes" ; then |
1045 | 8d5d2d4c | ths | echo "CONFIG_VNC_TLS=yes" >> $config_mak |
1046 | 8d5d2d4c | ths | echo "CONFIG_VNC_TLS_CFLAGS=$vnc_tls_cflags" >> $config_mak |
1047 | 8d5d2d4c | ths | echo "CONFIG_VNC_TLS_LIBS=$vnc_tls_libs" >> $config_mak |
1048 | 8d5d2d4c | ths | echo "#define CONFIG_VNC_TLS 1" >> $config_h |
1049 | 8d5d2d4c | ths | fi |
1050 | b1a550a0 | pbrook | qemu_version=`head $source_path/VERSION` |
1051 | b1a550a0 | pbrook | echo "VERSION=$qemu_version" >>$config_mak |
1052 | d4b8f039 | pbrook | echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h |
1053 | 97a847bc | bellard | |
1054 | 97a847bc | bellard | echo "SRC_PATH=$source_path" >> $config_mak |
1055 | ad064840 | pbrook | if [ "$source_path_used" = "yes" ]; then |
1056 | ad064840 | pbrook | echo "VPATH=$source_path" >> $config_mak |
1057 | ad064840 | pbrook | fi |
1058 | 97a847bc | bellard | echo "TARGET_DIRS=$target_list" >> $config_mak |
1059 | cc8ae6de | pbrook | if [ "$build_docs" = "yes" ] ; then |
1060 | cc8ae6de | pbrook | echo "BUILD_DOCS=yes" >> $config_mak |
1061 | cc8ae6de | pbrook | fi |
1062 | 49ecc3fa | bellard | if test "$static" = "yes"; then |
1063 | 49ecc3fa | bellard | sdl1=$sdl_static |
1064 | 49ecc3fa | bellard | else |
1065 | 49ecc3fa | bellard | sdl1=$sdl |
1066 | 49ecc3fa | bellard | fi |
1067 | 49ecc3fa | bellard | if test "$sdl1" = "yes" ; then |
1068 | 49ecc3fa | bellard | echo "#define CONFIG_SDL 1" >> $config_h |
1069 | 49ecc3fa | bellard | echo "CONFIG_SDL=yes" >> $config_mak |
1070 | 49ecc3fa | bellard | if test "$target_softmmu" = "no" -o "$static" = "yes"; then |
1071 | 49ecc3fa | bellard | echo "SDL_LIBS=$sdl_static_libs" >> $config_mak |
1072 | 49ecc3fa | bellard | else |
1073 | 49ecc3fa | bellard | echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak |
1074 | 49ecc3fa | bellard | fi |
1075 | 49ecc3fa | bellard | if [ "${aa}" = "yes" ] ; then |
1076 | 49ecc3fa | bellard | echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak |
1077 | 49ecc3fa | bellard | else |
1078 | 49ecc3fa | bellard | echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak |
1079 | 49ecc3fa | bellard | fi |
1080 | 49ecc3fa | bellard | fi |
1081 | 49ecc3fa | bellard | if test "$cocoa" = "yes" ; then |
1082 | 4d3b6f6e | balrog | echo "#define CONFIG_COCOA 1" >> $config_h |
1083 | 4d3b6f6e | balrog | echo "CONFIG_COCOA=yes" >> $config_mak |
1084 | 4d3b6f6e | balrog | fi |
1085 | 4d3b6f6e | balrog | if test "$curses" = "yes" ; then |
1086 | 4d3b6f6e | balrog | echo "#define CONFIG_CURSES 1" >> $config_h |
1087 | 4d3b6f6e | balrog | echo "CONFIG_CURSES=yes" >> $config_mak |
1088 | 4d3b6f6e | balrog | echo "CURSES_LIBS=-lcurses" >> $config_mak |
1089 | 49ecc3fa | bellard | fi |
1090 | 2e4d9fb1 | aurel32 | if test "$brlapi" = "yes" ; then |
1091 | 2e4d9fb1 | aurel32 | echo "CONFIG_BRLAPI=yes" >> $config_mak |
1092 | 2e4d9fb1 | aurel32 | echo "#define CONFIG_BRLAPI 1" >> $config_h |
1093 | 2e4d9fb1 | aurel32 | echo "BRLAPI_LIBS=-lbrlapi" >> $config_mak |
1094 | 2e4d9fb1 | aurel32 | fi |
1095 | 97a847bc | bellard | |
1096 | 83fb7adf | bellard | # XXX: suppress that |
1097 | 7d3505c5 | bellard | if [ "$bsd" = "yes" ] ; then |
1098 | 43003046 | bellard | echo "#define O_LARGEFILE 0" >> $config_h |
1099 | 43003046 | bellard | echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h |
1100 | 7d3505c5 | bellard | echo "#define _BSD 1" >> $config_h |
1101 | 7d3505c5 | bellard | fi |
1102 | 7d3505c5 | bellard | |
1103 | c5937220 | pbrook | echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h |
1104 | c5937220 | pbrook | |
1105 | c39e3338 | pbrook | tools= |
1106 | c39e3338 | pbrook | if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then |
1107 | c39e3338 | pbrook | tools="qemu-img\$(EXESUF) $tools" |
1108 | c39e3338 | pbrook | fi |
1109 | c39e3338 | pbrook | echo "TOOLS=$tools" >> $config_mak |
1110 | c39e3338 | pbrook | |
1111 | 15d9ca0f | ths | test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h |
1112 | 15d9ca0f | ths | |
1113 | 1d14ffa9 | bellard | for target in $target_list; do |
1114 | 97a847bc | bellard | target_dir="$target" |
1115 | 97a847bc | bellard | config_mak=$target_dir/config.mak |
1116 | 97a847bc | bellard | config_h=$target_dir/config.h |
1117 | 97a847bc | bellard | target_cpu=`echo $target | cut -d '-' -f 1` |
1118 | 97a847bc | bellard | target_bigendian="no" |
1119 | 808c4954 | bellard | [ "$target_cpu" = "armeb" ] && target_bigendian=yes |
1120 | 0938cda5 | aurel32 | [ "$target_cpu" = "m68k" ] && target_bigendian=yes |
1121 | 0938cda5 | aurel32 | [ "$target_cpu" = "mips" ] && target_bigendian=yes |
1122 | 0938cda5 | aurel32 | [ "$target_cpu" = "mipsn32" ] && target_bigendian=yes |
1123 | 0938cda5 | aurel32 | [ "$target_cpu" = "mips64" ] && target_bigendian=yes |
1124 | 67867308 | bellard | [ "$target_cpu" = "ppc" ] && target_bigendian=yes |
1125 | d4082e95 | j_mayer | [ "$target_cpu" = "ppcemb" ] && target_bigendian=yes |
1126 | 22f8a8b3 | j_mayer | [ "$target_cpu" = "ppc64" ] && target_bigendian=yes |
1127 | e85e7c6e | j_mayer | [ "$target_cpu" = "ppc64abi32" ] && target_bigendian=yes |
1128 | 908f52b0 | pbrook | [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes |
1129 | 0938cda5 | aurel32 | [ "$target_cpu" = "sparc" ] && target_bigendian=yes |
1130 | 0938cda5 | aurel32 | [ "$target_cpu" = "sparc64" ] && target_bigendian=yes |
1131 | 0938cda5 | aurel32 | [ "$target_cpu" = "sparc32plus" ] && target_bigendian=yes |
1132 | 97a847bc | bellard | target_softmmu="no" |
1133 | 997344f3 | bellard | target_user_only="no" |
1134 | 831b7825 | ths | target_linux_user="no" |
1135 | 831b7825 | ths | target_darwin_user="no" |
1136 | 9e407a85 | pbrook | case "$target" in |
1137 | 9e407a85 | pbrook | ${target_cpu}-softmmu) |
1138 | 9e407a85 | pbrook | target_softmmu="yes" |
1139 | 9e407a85 | pbrook | ;; |
1140 | 9e407a85 | pbrook | ${target_cpu}-linux-user) |
1141 | 9e407a85 | pbrook | target_user_only="yes" |
1142 | 9e407a85 | pbrook | target_linux_user="yes" |
1143 | 9e407a85 | pbrook | ;; |
1144 | 9e407a85 | pbrook | ${target_cpu}-darwin-user) |
1145 | 9e407a85 | pbrook | target_user_only="yes" |
1146 | 9e407a85 | pbrook | target_darwin_user="yes" |
1147 | 9e407a85 | pbrook | ;; |
1148 | 9e407a85 | pbrook | *) |
1149 | 9e407a85 | pbrook | echo "ERROR: Target '$target' not recognised" |
1150 | 9e407a85 | pbrook | exit 1 |
1151 | 9e407a85 | pbrook | ;; |
1152 | 9e407a85 | pbrook | esac |
1153 | 831b7825 | ths | |
1154 | 97ccc689 | bellard | if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \ |
1155 | 1d14ffa9 | bellard | -a "$sdl" = "no" -a "$cocoa" = "no" ; then |
1156 | 97ccc689 | bellard | echo "ERROR: QEMU requires SDL or Cocoa for graphical output" |
1157 | 9c038506 | pbrook | echo "To build QEMU without graphical output configure with --disable-gfx-check" |
1158 | 4d3b6f6e | balrog | echo "Note that this will disable all output from the virtual graphics card" |
1159 | 4d3b6f6e | balrog | echo "except through VNC or curses." |
1160 | 97ccc689 | bellard | exit 1; |
1161 | 97ccc689 | bellard | fi |
1162 | 97ccc689 | bellard | |
1163 | 7c1f25b4 | bellard | #echo "Creating $config_mak, $config_h and $target_dir/Makefile" |
1164 | 97a847bc | bellard | |
1165 | 15d9ca0f | ths | test -f $config_h && mv $config_h ${config_h}~ |
1166 | 15d9ca0f | ths | |
1167 | 97a847bc | bellard | mkdir -p $target_dir |
1168 | 158142c2 | bellard | mkdir -p $target_dir/fpu |
1169 | 57fec1fe | bellard | mkdir -p $target_dir/tcg |
1170 | 831b7825 | ths | if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" ; then |
1171 | 69de927c | bellard | mkdir -p $target_dir/nwfpe |
1172 | 69de927c | bellard | fi |
1173 | 69de927c | bellard | |
1174 | ec530c81 | bellard | # |
1175 | ec530c81 | bellard | # don't use ln -sf as not all "ln -sf" over write the file/link |
1176 | ec530c81 | bellard | # |
1177 | ec530c81 | bellard | rm -f $target_dir/Makefile |
1178 | ec530c81 | bellard | ln -s $source_path/Makefile.target $target_dir/Makefile |
1179 | ec530c81 | bellard | |
1180 | 97a847bc | bellard | |
1181 | 97a847bc | bellard | echo "# Automatically generated by configure - do not modify" > $config_mak |
1182 | 97a847bc | bellard | echo "/* Automatically generated by configure - do not modify */" > $config_h |
1183 | 97a847bc | bellard | |
1184 | de83cd02 | bellard | |
1185 | 97a847bc | bellard | echo "include ../config-host.mak" >> $config_mak |
1186 | 97a847bc | bellard | echo "#include \"../config-host.h\"" >> $config_h |
1187 | 1e43adfc | bellard | |
1188 | e5fe0c52 | pbrook | bflt="no" |
1189 | cb33da57 | blueswir1 | elfload32="no" |
1190 | 1e43adfc | bellard | interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"` |
1191 | 1e43adfc | bellard | echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h |
1192 | 97a847bc | bellard | |
1193 | 2408a527 | aurel32 | case "$target_cpu" in |
1194 | 2408a527 | aurel32 | i386) |
1195 | 2408a527 | aurel32 | echo "TARGET_ARCH=i386" >> $config_mak |
1196 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"i386\"" >> $config_h |
1197 | 2408a527 | aurel32 | echo "#define TARGET_I386 1" >> $config_h |
1198 | 2408a527 | aurel32 | if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "i386" |
1199 | 2408a527 | aurel32 | then |
1200 | 2408a527 | aurel32 | echo "#define USE_KQEMU 1" >> $config_h |
1201 | 2408a527 | aurel32 | fi |
1202 | 2408a527 | aurel32 | ;; |
1203 | 2408a527 | aurel32 | x86_64) |
1204 | 2408a527 | aurel32 | echo "TARGET_ARCH=x86_64" >> $config_mak |
1205 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"x86_64\"" >> $config_h |
1206 | 2408a527 | aurel32 | echo "#define TARGET_I386 1" >> $config_h |
1207 | 2408a527 | aurel32 | echo "#define TARGET_X86_64 1" >> $config_h |
1208 | 2408a527 | aurel32 | if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" |
1209 | 2408a527 | aurel32 | then |
1210 | 2408a527 | aurel32 | echo "#define USE_KQEMU 1" >> $config_h |
1211 | 2408a527 | aurel32 | fi |
1212 | 2408a527 | aurel32 | ;; |
1213 | 2408a527 | aurel32 | alpha) |
1214 | 2408a527 | aurel32 | echo "TARGET_ARCH=alpha" >> $config_mak |
1215 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"alpha\"" >> $config_h |
1216 | 2408a527 | aurel32 | echo "#define TARGET_ALPHA 1" >> $config_h |
1217 | 2408a527 | aurel32 | ;; |
1218 | 2408a527 | aurel32 | arm|armeb) |
1219 | 2408a527 | aurel32 | echo "TARGET_ARCH=arm" >> $config_mak |
1220 | 2408a527 | aurel32 | echo "CONFIG_NO_DYNGEN_OP=yes" >> $config_mak |
1221 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"arm\"" >> $config_h |
1222 | 2408a527 | aurel32 | echo "#define TARGET_ARM 1" >> $config_h |
1223 | 2408a527 | aurel32 | echo "#define CONFIG_NO_DYNGEN_OP 1" >> $config_h |
1224 | 2408a527 | aurel32 | bflt="yes" |
1225 | 2408a527 | aurel32 | ;; |
1226 | 2408a527 | aurel32 | cris) |
1227 | 2408a527 | aurel32 | echo "TARGET_ARCH=cris" >> $config_mak |
1228 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"cris\"" >> $config_h |
1229 | 2408a527 | aurel32 | echo "#define TARGET_CRIS 1" >> $config_h |
1230 | 2408a527 | aurel32 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
1231 | 2408a527 | aurel32 | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h |
1232 | 2408a527 | aurel32 | ;; |
1233 | 2408a527 | aurel32 | m68k) |
1234 | 2408a527 | aurel32 | echo "TARGET_ARCH=m68k" >> $config_mak |
1235 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"m68k\"" >> $config_h |
1236 | 2408a527 | aurel32 | echo "#define TARGET_M68K 1" >> $config_h |
1237 | 2408a527 | aurel32 | bflt="yes" |
1238 | 2408a527 | aurel32 | ;; |
1239 | 2408a527 | aurel32 | mips|mipsel) |
1240 | 2408a527 | aurel32 | echo "TARGET_ARCH=mips" >> $config_mak |
1241 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"mips\"" >> $config_h |
1242 | 2408a527 | aurel32 | echo "#define TARGET_MIPS 1" >> $config_h |
1243 | 2408a527 | aurel32 | echo "#define TARGET_ABI_MIPSO32 1" >> $config_h |
1244 | 2408a527 | aurel32 | ;; |
1245 | 2408a527 | aurel32 | mipsn32|mipsn32el) |
1246 | 2408a527 | aurel32 | echo "TARGET_ARCH=mipsn32" >> $config_mak |
1247 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"mipsn32\"" >> $config_h |
1248 | 2408a527 | aurel32 | echo "#define TARGET_MIPS 1" >> $config_h |
1249 | 2408a527 | aurel32 | echo "#define TARGET_ABI_MIPSN32 1" >> $config_h |
1250 | 2408a527 | aurel32 | ;; |
1251 | 2408a527 | aurel32 | mips64|mips64el) |
1252 | 2408a527 | aurel32 | echo "TARGET_ARCH=mips64" >> $config_mak |
1253 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"mips64\"" >> $config_h |
1254 | 2408a527 | aurel32 | echo "#define TARGET_MIPS 1" >> $config_h |
1255 | 2408a527 | aurel32 | echo "#define TARGET_MIPS64 1" >> $config_h |
1256 | 2408a527 | aurel32 | echo "#define TARGET_ABI_MIPSN64 1" >> $config_h |
1257 | 2408a527 | aurel32 | ;; |
1258 | 2408a527 | aurel32 | ppc) |
1259 | 2408a527 | aurel32 | echo "TARGET_ARCH=ppc" >> $config_mak |
1260 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"ppc\"" >> $config_h |
1261 | 2408a527 | aurel32 | echo "#define TARGET_PPC 1" >> $config_h |
1262 | 2408a527 | aurel32 | ;; |
1263 | 2408a527 | aurel32 | ppcemb) |
1264 | 2408a527 | aurel32 | echo "TARGET_ARCH=ppcemb" >> $config_mak |
1265 | 2408a527 | aurel32 | echo "TARGET_ABI_DIR=ppc" >> $config_mak |
1266 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h |
1267 | 2408a527 | aurel32 | echo "#define TARGET_PPC 1" >> $config_h |
1268 | 2408a527 | aurel32 | echo "#define TARGET_PPCEMB 1" >> $config_h |
1269 | 2408a527 | aurel32 | ;; |
1270 | 2408a527 | aurel32 | ppc64) |
1271 | 2408a527 | aurel32 | echo "TARGET_ARCH=ppc64" >> $config_mak |
1272 | 2408a527 | aurel32 | echo "TARGET_ABI_DIR=ppc" >> $config_mak |
1273 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"ppc64\"" >> $config_h |
1274 | 2408a527 | aurel32 | echo "#define TARGET_PPC 1" >> $config_h |
1275 | 2408a527 | aurel32 | echo "#define TARGET_PPC64 1" >> $config_h |
1276 | 2408a527 | aurel32 | ;; |
1277 | 2408a527 | aurel32 | ppc64abi32) |
1278 | 2408a527 | aurel32 | echo "TARGET_ARCH=ppc64" >> $config_mak |
1279 | 2408a527 | aurel32 | echo "TARGET_ABI_DIR=ppc" >> $config_mak |
1280 | 2408a527 | aurel32 | echo "TARGET_ARCH2=ppc64abi32" >> $config_mak |
1281 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"ppc64\"" >> $config_h |
1282 | 2408a527 | aurel32 | echo "#define TARGET_PPC 1" >> $config_h |
1283 | 2408a527 | aurel32 | echo "#define TARGET_PPC64 1" >> $config_h |
1284 | 2408a527 | aurel32 | echo "#define TARGET_ABI32 1" >> $config_h |
1285 | 2408a527 | aurel32 | ;; |
1286 | 2408a527 | aurel32 | sh4|sh4eb) |
1287 | 2408a527 | aurel32 | echo "TARGET_ARCH=sh4" >> $config_mak |
1288 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h |
1289 | 2408a527 | aurel32 | echo "#define TARGET_SH4 1" >> $config_h |
1290 | 2408a527 | aurel32 | bflt="yes" |
1291 | 2408a527 | aurel32 | ;; |
1292 | 2408a527 | aurel32 | sparc) |
1293 | 2408a527 | aurel32 | echo "TARGET_ARCH=sparc" >> $config_mak |
1294 | 7fa76c0b | blueswir1 | echo "CONFIG_NO_DYNGEN_OP=yes" >> $config_mak |
1295 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"sparc\"" >> $config_h |
1296 | 2408a527 | aurel32 | echo "#define TARGET_SPARC 1" >> $config_h |
1297 | 7fa76c0b | blueswir1 | echo "#define CONFIG_NO_DYNGEN_OP 1" >> $config_h |
1298 | 2408a527 | aurel32 | ;; |
1299 | 2408a527 | aurel32 | sparc64) |
1300 | 2408a527 | aurel32 | echo "TARGET_ARCH=sparc64" >> $config_mak |
1301 | 7fa76c0b | blueswir1 | echo "CONFIG_NO_DYNGEN_OP=yes" >> $config_mak |
1302 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"sparc64\"" >> $config_h |
1303 | 2408a527 | aurel32 | echo "#define TARGET_SPARC 1" >> $config_h |
1304 | 2408a527 | aurel32 | echo "#define TARGET_SPARC64 1" >> $config_h |
1305 | 7fa76c0b | blueswir1 | echo "#define CONFIG_NO_DYNGEN_OP 1" >> $config_h |
1306 | 2408a527 | aurel32 | elfload32="yes" |
1307 | 2408a527 | aurel32 | ;; |
1308 | 2408a527 | aurel32 | sparc32plus) |
1309 | 2408a527 | aurel32 | echo "TARGET_ARCH=sparc64" >> $config_mak |
1310 | 2408a527 | aurel32 | echo "TARGET_ABI_DIR=sparc" >> $config_mak |
1311 | 2408a527 | aurel32 | echo "TARGET_ARCH2=sparc32plus" >> $config_mak |
1312 | 7fa76c0b | blueswir1 | echo "CONFIG_NO_DYNGEN_OP=yes" >> $config_mak |
1313 | 2408a527 | aurel32 | echo "#define TARGET_ARCH \"sparc64\"" >> $config_h |
1314 | 2408a527 | aurel32 | echo "#define TARGET_SPARC 1" >> $config_h |
1315 | 2408a527 | aurel32 | echo "#define TARGET_SPARC64 1" >> $config_h |
1316 | 2408a527 | aurel32 | echo "#define TARGET_ABI32 1" >> $config_h |
1317 | 7fa76c0b | blueswir1 | echo "#define CONFIG_NO_DYNGEN_OP 1" >> $config_h |
1318 | 2408a527 | aurel32 | ;; |
1319 | 2408a527 | aurel32 | *) |
1320 | 2408a527 | aurel32 | echo "Unsupported target CPU" |
1321 | 2408a527 | aurel32 | exit 1 |
1322 | 2408a527 | aurel32 | ;; |
1323 | 2408a527 | aurel32 | esac |
1324 | de83cd02 | bellard | if test "$target_bigendian" = "yes" ; then |
1325 | 97a847bc | bellard | echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak |
1326 | 97a847bc | bellard | echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h |
1327 | de83cd02 | bellard | fi |
1328 | 97a847bc | bellard | if test "$target_softmmu" = "yes" ; then |
1329 | 97a847bc | bellard | echo "CONFIG_SOFTMMU=yes" >> $config_mak |
1330 | 97a847bc | bellard | echo "#define CONFIG_SOFTMMU 1" >> $config_h |
1331 | 43ce4dfe | bellard | fi |
1332 | 997344f3 | bellard | if test "$target_user_only" = "yes" ; then |
1333 | 997344f3 | bellard | echo "CONFIG_USER_ONLY=yes" >> $config_mak |
1334 | 997344f3 | bellard | echo "#define CONFIG_USER_ONLY 1" >> $config_h |
1335 | 997344f3 | bellard | fi |
1336 | 831b7825 | ths | if test "$target_linux_user" = "yes" ; then |
1337 | 831b7825 | ths | echo "CONFIG_LINUX_USER=yes" >> $config_mak |
1338 | 831b7825 | ths | echo "#define CONFIG_LINUX_USER 1" >> $config_h |
1339 | 831b7825 | ths | fi |
1340 | 831b7825 | ths | if test "$target_darwin_user" = "yes" ; then |
1341 | 831b7825 | ths | echo "CONFIG_DARWIN_USER=yes" >> $config_mak |
1342 | 831b7825 | ths | echo "#define CONFIG_DARWIN_USER 1" >> $config_h |
1343 | 831b7825 | ths | fi |
1344 | 97a847bc | bellard | |
1345 | 0938cda5 | aurel32 | if test "$target_cpu" = "arm" \ |
1346 | 0938cda5 | aurel32 | -o "$target_cpu" = "armeb" \ |
1347 | 0938cda5 | aurel32 | -o "$target_cpu" = "m68k" \ |
1348 | 0938cda5 | aurel32 | -o "$target_cpu" = "mips" \ |
1349 | 0938cda5 | aurel32 | -o "$target_cpu" = "mipsel" \ |
1350 | 0938cda5 | aurel32 | -o "$target_cpu" = "mipsn32" \ |
1351 | 0938cda5 | aurel32 | -o "$target_cpu" = "mipsn32el" \ |
1352 | 0938cda5 | aurel32 | -o "$target_cpu" = "mips64" \ |
1353 | 0938cda5 | aurel32 | -o "$target_cpu" = "mips64el" \ |
1354 | 0938cda5 | aurel32 | -o "$target_cpu" = "sparc" \ |
1355 | 0938cda5 | aurel32 | -o "$target_cpu" = "sparc64" \ |
1356 | 0938cda5 | aurel32 | -o "$target_cpu" = "sparc32plus"; then |
1357 | 158142c2 | bellard | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
1358 | 158142c2 | bellard | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h |
1359 | 158142c2 | bellard | fi |
1360 | e5fe0c52 | pbrook | if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then |
1361 | e5fe0c52 | pbrook | echo "TARGET_HAS_BFLT=yes" >> $config_mak |
1362 | e5fe0c52 | pbrook | echo "#define TARGET_HAS_BFLT 1" >> $config_h |
1363 | e5fe0c52 | pbrook | fi |
1364 | cb33da57 | blueswir1 | # 32 bit ELF loader in addition to native 64 bit loader? |
1365 | cb33da57 | blueswir1 | if test "$target_user_only" = "yes" -a "$elfload32" = "yes"; then |
1366 | cb33da57 | blueswir1 | echo "TARGET_HAS_ELFLOAD32=yes" >> $config_mak |
1367 | cb33da57 | blueswir1 | echo "#define TARGET_HAS_ELFLOAD32 1" >> $config_h |
1368 | cb33da57 | blueswir1 | fi |
1369 | 5b0753e0 | bellard | |
1370 | 15d9ca0f | ths | test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h |
1371 | 15d9ca0f | ths | |
1372 | 97a847bc | bellard | done # for target in $targets |
1373 | 7d13299d | bellard | |
1374 | 7d13299d | bellard | # build tree in object directory if source path is different from current one |
1375 | 7d13299d | bellard | if test "$source_path_used" = "yes" ; then |
1376 | 49ecc3fa | bellard | DIRS="tests tests/cris slirp audio" |
1377 | 7d13299d | bellard | FILES="Makefile tests/Makefile" |
1378 | e7daa605 | ths | FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit" |
1379 | e1ffb0f1 | edgar_igl | FILES="$FILES tests/test-mmap.c" |
1380 | 7d13299d | bellard | for dir in $DIRS ; do |
1381 | 7d13299d | bellard | mkdir -p $dir |
1382 | 7d13299d | bellard | done |
1383 | ec530c81 | bellard | # remove the link and recreate it, as not all "ln -sf" overwrite the link |
1384 | 7d13299d | bellard | for f in $FILES ; do |
1385 | ec530c81 | bellard | rm -f $f |
1386 | ec530c81 | bellard | ln -s $source_path/$f $f |
1387 | 7d13299d | bellard | done |
1388 | 7d13299d | bellard | fi |
1389 | 7d13299d | bellard | |
1390 | 97a847bc | bellard | rm -f $TMPO $TMPC $TMPE $TMPS |