]>
Commit | Line | Data |
---|---|---|
7d13299d FB |
1 | #!/bin/sh |
2 | # | |
3ef693a0 | 3 | # qemu configure script (c) 2003 Fabrice Bellard |
7d13299d FB |
4 | # |
5 | # set temporary file name | |
6 | if test ! -z "$TMPDIR" ; then | |
7 | TMPDIR1="${TMPDIR}" | |
8 | elif test ! -z "$TEMPDIR" ; then | |
9 | TMPDIR1="${TEMPDIR}" | |
10 | else | |
11 | TMPDIR1="/tmp" | |
12 | fi | |
13 | ||
3ef693a0 FB |
14 | TMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c" |
15 | TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o" | |
16 | TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}" | |
17 | TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S" | |
7d13299d FB |
18 | |
19 | # default parameters | |
11d9f695 | 20 | prefix="" |
1e43adfc | 21 | interp_prefix="/usr/gnemul/qemu-%M" |
43ce4dfe | 22 | static="no" |
7d13299d FB |
23 | cross_prefix="" |
24 | cc="gcc" | |
25 | host_cc="gcc" | |
26 | ar="ar" | |
27 | make="make" | |
6a882643 | 28 | install="install" |
7d13299d FB |
29 | strip="strip" |
30 | cpu=`uname -m` | |
5327cf48 | 31 | target_list="" |
7d13299d FB |
32 | case "$cpu" in |
33 | i386|i486|i586|i686|i86pc|BePC) | |
97a847bc | 34 | cpu="i386" |
7d13299d | 35 | ;; |
ba68055e | 36 | armv*b) |
808c4954 FB |
37 | cpu="armv4b" |
38 | ;; | |
ba68055e | 39 | armv*l) |
7d13299d FB |
40 | cpu="armv4l" |
41 | ;; | |
42 | alpha) | |
43 | cpu="alpha" | |
44 | ;; | |
295defa5 | 45 | "Power Macintosh"|ppc|ppc64) |
7d13299d FB |
46 | cpu="powerpc" |
47 | ;; | |
48 | mips) | |
49 | cpu="mips" | |
50 | ;; | |
fb3e5849 FB |
51 | s390) |
52 | cpu="s390" | |
53 | ;; | |
94ac5158 | 54 | sparc|sun4[muv]) |
ae228531 FB |
55 | cpu="sparc" |
56 | ;; | |
57 | sparc64) | |
58 | cpu="sparc64" | |
59 | ;; | |
a8baa8c5 FB |
60 | ia64) |
61 | cpu="ia64" | |
62 | ;; | |
38e584a0 FB |
63 | m68k) |
64 | cpu="m68k" | |
65 | ;; | |
bc51c5c9 | 66 | x86_64|amd64) |
0b0babc6 | 67 | cpu="x86_64" |
bc51c5c9 | 68 | ;; |
7d13299d FB |
69 | *) |
70 | cpu="unknown" | |
71 | ;; | |
72 | esac | |
73 | gprof="no" | |
74 | bigendian="no" | |
67b915a5 FB |
75 | mingw32="no" |
76 | EXESUF="" | |
77 | gdbstub="yes" | |
443f1376 | 78 | slirp="yes" |
fb065187 FB |
79 | adlib="no" |
80 | oss="no" | |
1d14ffa9 FB |
81 | dsound="no" |
82 | coreaudio="no" | |
83 | alsa="no" | |
102a52e4 FB |
84 | fmod="no" |
85 | fmod_lib="" | |
86 | fmod_inc="" | |
b1a550a0 | 87 | bsd="no" |
5327cf48 | 88 | linux="no" |
c9ec1fe4 | 89 | kqemu="no" |
05c2a3e7 | 90 | profiler="no" |
5b0753e0 | 91 | cocoa="no" |
97ccc689 | 92 | check_gfx="yes" |
1aff381f | 93 | check_gcc="yes" |
0a8e90f4 PB |
94 | softmmu="yes" |
95 | user="no" | |
cc8ae6de | 96 | build_docs="no" |
c5937220 | 97 | uname_release="" |
7d13299d FB |
98 | |
99 | # OS specific | |
100 | targetos=`uname -s` | |
101 | case $targetos in | |
c326e0af FB |
102 | CYGWIN*) |
103 | mingw32="yes" | |
104 | CFLAGS="-O2 -mno-cygwin" | |
105 | ;; | |
67b915a5 FB |
106 | MINGW32*) |
107 | mingw32="yes" | |
108 | ;; | |
7d3505c5 FB |
109 | FreeBSD) |
110 | bsd="yes" | |
fb065187 | 111 | oss="yes" |
e99f9060 | 112 | if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
07f4ddbf FB |
113 | kqemu="yes" |
114 | fi | |
7d3505c5 FB |
115 | ;; |
116 | NetBSD) | |
117 | bsd="yes" | |
fb065187 | 118 | oss="yes" |
7d3505c5 FB |
119 | ;; |
120 | OpenBSD) | |
121 | bsd="yes" | |
fb065187 | 122 | oss="yes" |
7d3505c5 | 123 | ;; |
83fb7adf FB |
124 | Darwin) |
125 | bsd="yes" | |
126 | darwin="yes" | |
127 | ;; | |
ec530c81 FB |
128 | SunOS) |
129 | solaris="yes" | |
130 | ;; | |
1d14ffa9 | 131 | *) |
fb065187 | 132 | oss="yes" |
5327cf48 | 133 | linux="yes" |
0a8e90f4 | 134 | user="yes" |
07f4ddbf | 135 | if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
c9ec1fe4 FB |
136 | kqemu="yes" |
137 | fi | |
fb065187 | 138 | ;; |
7d13299d FB |
139 | esac |
140 | ||
7d3505c5 | 141 | if [ "$bsd" = "yes" ] ; then |
b1a550a0 | 142 | if [ "$darwin" != "yes" ] ; then |
83fb7adf FB |
143 | make="gmake" |
144 | fi | |
7d3505c5 FB |
145 | fi |
146 | ||
ec530c81 FB |
147 | if [ "$solaris" = "yes" ] ; then |
148 | make="gmake" | |
149 | install="ginstall" | |
150 | solarisrev=`uname -r | cut -f2 -d.` | |
ec530c81 FB |
151 | fi |
152 | ||
7d13299d | 153 | # find source path |
ad064840 PB |
154 | source_path=`dirname "$0"` |
155 | if [ -z "$source_path" ]; then | |
7d13299d | 156 | source_path=`pwd` |
ad064840 PB |
157 | else |
158 | source_path=`cd "$source_path"; pwd` | |
159 | fi | |
160 | if test "$source_path" = `pwd` ; then | |
7d13299d | 161 | source_path_used="no" |
ad064840 PB |
162 | else |
163 | source_path_used="yes" | |
7d13299d FB |
164 | fi |
165 | ||
166 | for opt do | |
a46e4035 | 167 | optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` |
7d13299d | 168 | case "$opt" in |
2efc3265 FB |
169 | --help|-h) show_help=yes |
170 | ;; | |
b1a550a0 | 171 | --prefix=*) prefix="$optarg" |
7d13299d | 172 | ;; |
b1a550a0 | 173 | --interp-prefix=*) interp_prefix="$optarg" |
32ce6337 | 174 | ;; |
b1a550a0 | 175 | --source-path=*) source_path="$optarg" |
ad064840 | 176 | source_path_used="yes" |
7d13299d | 177 | ;; |
b1a550a0 | 178 | --cross-prefix=*) cross_prefix="$optarg" |
7d13299d | 179 | ;; |
b1a550a0 | 180 | --cc=*) cc="$optarg" |
7d13299d | 181 | ;; |
b1a550a0 | 182 | --host-cc=*) host_cc="$optarg" |
83469015 | 183 | ;; |
b1a550a0 | 184 | --make=*) make="$optarg" |
7d13299d | 185 | ;; |
6a882643 PB |
186 | --install=*) install="$optarg" |
187 | ;; | |
b1a550a0 | 188 | --extra-cflags=*) CFLAGS="$optarg" |
7d13299d | 189 | ;; |
b1a550a0 | 190 | --extra-ldflags=*) LDFLAGS="$optarg" |
7d13299d | 191 | ;; |
b1a550a0 | 192 | --cpu=*) cpu="$optarg" |
7d13299d | 193 | ;; |
b1a550a0 | 194 | --target-list=*) target_list="$optarg" |
de83cd02 | 195 | ;; |
7d13299d FB |
196 | --enable-gprof) gprof="yes" |
197 | ;; | |
43ce4dfe FB |
198 | --static) static="yes" |
199 | ;; | |
97a847bc FB |
200 | --disable-sdl) sdl="no" |
201 | ;; | |
1d14ffa9 FB |
202 | --enable-coreaudio) coreaudio="yes" |
203 | ;; | |
204 | --enable-alsa) alsa="yes" | |
205 | ;; | |
206 | --enable-dsound) dsound="yes" | |
207 | ;; | |
102a52e4 FB |
208 | --enable-fmod) fmod="yes" |
209 | ;; | |
b1a550a0 | 210 | --fmod-lib=*) fmod_lib="$optarg" |
102a52e4 | 211 | ;; |
b1a550a0 | 212 | --fmod-inc=*) fmod_inc="$optarg" |
102a52e4 | 213 | ;; |
87ac5427 | 214 | --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" ; user="no" |
1d14ffa9 | 215 | ;; |
443f1376 | 216 | --disable-slirp) slirp="no" |
1d14ffa9 | 217 | ;; |
fb065187 | 218 | --enable-adlib) adlib="yes" |
1d14ffa9 | 219 | ;; |
c9ec1fe4 | 220 | --disable-kqemu) kqemu="no" |
1d14ffa9 | 221 | ;; |
05c2a3e7 FB |
222 | --enable-profiler) profiler="yes" |
223 | ;; | |
1d14ffa9 FB |
224 | --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no" |
225 | ;; | |
97ccc689 FB |
226 | --disable-gfx-check) check_gfx="no" |
227 | ;; | |
1aff381f FB |
228 | --disable-gcc-check) check_gcc="no" |
229 | ;; | |
cad25d69 | 230 | --disable-system) softmmu="no" |
0a8e90f4 | 231 | ;; |
cad25d69 | 232 | --enable-system) softmmu="yes" |
0a8e90f4 PB |
233 | ;; |
234 | --disable-user) user="no" | |
235 | ;; | |
236 | --enable-user) user="yes" | |
237 | ;; | |
c5937220 PB |
238 | --enable-uname-release=*) uname_release="$optarg" |
239 | ;; | |
7d13299d FB |
240 | esac |
241 | done | |
242 | ||
243 | # Checking for CFLAGS | |
244 | if test -z "$CFLAGS"; then | |
245 | CFLAGS="-O2" | |
246 | fi | |
247 | ||
af5db58e PB |
248 | if test x"$show_help" = x"yes" ; then |
249 | cat << EOF | |
250 | ||
251 | Usage: configure [options] | |
252 | Options: [defaults in brackets after descriptions] | |
253 | ||
254 | EOF | |
255 | echo "Standard options:" | |
256 | echo " --help print this message" | |
257 | echo " --prefix=PREFIX install in PREFIX [$prefix]" | |
258 | echo " --interp-prefix=PREFIX where to find shared libraries, etc." | |
259 | echo " use %M for cpu name [$interp_prefix]" | |
260 | echo " --target-list=LIST set target list [$target_list]" | |
261 | echo "" | |
262 | echo "kqemu kernel acceleration support:" | |
263 | echo " --disable-kqemu disable kqemu support" | |
af5db58e PB |
264 | echo "" |
265 | echo "Advanced options (experts only):" | |
266 | echo " --source-path=PATH path of source code [$source_path]" | |
267 | echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]" | |
268 | echo " --cc=CC use C compiler CC [$cc]" | |
269 | echo " --host-cc=CC use C compiler CC [$host_cc] for dyngen etc." | |
270 | echo " --make=MAKE use specified make [$make]" | |
6a882643 | 271 | echo " --install=INSTALL use specified install [$install]" |
af5db58e PB |
272 | echo " --static enable static build [$static]" |
273 | echo " --enable-cocoa enable COCOA (Mac OS X only)" | |
274 | echo " --enable-mingw32 enable Win32 cross compilation with mingw32" | |
275 | echo " --enable-adlib enable Adlib emulation" | |
276 | echo " --enable-coreaudio enable Coreaudio audio driver" | |
277 | echo " --enable-alsa enable ALSA audio driver" | |
278 | echo " --enable-fmod enable FMOD audio driver" | |
279 | echo " --enabled-dsound enable DirectSound audio driver" | |
280 | echo " --enable-system enable all system emulation targets" | |
281 | echo " --disable-system disable all system emulation targets" | |
282 | echo " --enable-user enable all linux usermode emulation targets" | |
283 | echo " --disable-user disable all linux usermode emulation targets" | |
284 | echo " --fmod-lib path to FMOD library" | |
285 | echo " --fmod-inc path to FMOD includes" | |
c5937220 | 286 | echo " --enable-uname-release=R Return R for uname -r in usermode emulation" |
af5db58e PB |
287 | echo "" |
288 | echo "NOTE: The object files are build at the place where configure is launched" | |
289 | exit 1 | |
290 | fi | |
291 | ||
7d13299d FB |
292 | cc="${cross_prefix}${cc}" |
293 | ar="${cross_prefix}${ar}" | |
294 | strip="${cross_prefix}${strip}" | |
295 | ||
064aae13 PB |
296 | # check that the C compiler works. |
297 | cat > $TMPC <<EOF | |
298 | int main(void) {} | |
299 | EOF | |
300 | ||
301 | if $cc -c -o $TMPO $TMPC 2>/dev/null ; then | |
302 | : C compiler works ok | |
303 | else | |
304 | echo "ERROR: \"$cc\" either does not exist or does not work" | |
305 | exit 1 | |
a7350fa1 FB |
306 | fi |
307 | ||
67b915a5 | 308 | if test "$mingw32" = "yes" ; then |
5327cf48 | 309 | linux="no" |
67b915a5 | 310 | EXESUF=".exe" |
9f059eca | 311 | oss="no" |
07f4ddbf FB |
312 | if [ "$cpu" = "i386" ] ; then |
313 | kqemu="yes" | |
314 | fi | |
67b915a5 FB |
315 | fi |
316 | ||
ec530c81 FB |
317 | # |
318 | # Solaris specific configure tool chain decisions | |
319 | # | |
320 | if test "$solaris" = "yes" ; then | |
321 | # | |
322 | # gcc for solaris 10/fcs in /usr/sfw/bin doesn't compile qemu correctly | |
323 | # override the check with --disable-gcc-check | |
324 | # | |
325 | if test "$solarisrev" -eq 10 -a "$check_gcc" = "yes" ; then | |
326 | solgcc=`which $cc` | |
327 | if test "$solgcc" = "/usr/sfw/bin/gcc" ; then | |
328 | echo "Solaris 10/FCS gcc in /usr/sfw/bin will not compiled qemu correctly." | |
329 | echo "please get gcc-3.4.3 or later, from www.blastwave.org using pkg-get -i gcc3" | |
330 | echo "or get the latest patch from SunSolve for gcc" | |
331 | exit 1 | |
332 | fi | |
333 | fi | |
334 | solinst=`which $install 2> /dev/null | /usr/bin/grep -v "no $install in"` | |
335 | if test -z "$solinst" ; then | |
336 | echo "Solaris install program not found. Use --install=/usr/ucb/install or" | |
337 | echo "install fileutils from www.blastwave.org using pkg-get -i fileutils" | |
338 | echo "to get ginstall which is used by default (which lives in /opt/csw/bin)" | |
339 | exit 1 | |
340 | fi | |
341 | if test "$solinst" = "/usr/sbin/install" ; then | |
342 | echo "Error: Solaris /usr/sbin/install is not an appropriate install program." | |
343 | echo "try ginstall from the GNU fileutils available from www.blastwave.org" | |
344 | echo "using pkg-get -i fileutils, or use --install=/usr/ucb/install" | |
345 | exit 1 | |
346 | fi | |
ec530c81 FB |
347 | sol_ar=`which ar 2> /dev/null | /usr/bin/grep -v "no ar in"` |
348 | if test -z "$sol_ar" ; then | |
349 | echo "Error: No path includes ar" | |
350 | if test -f /usr/ccs/bin/ar ; then | |
351 | echo "Add /usr/ccs/bin to your path and rerun configure" | |
352 | fi | |
353 | exit 1 | |
354 | fi | |
355 | fi | |
356 | ||
357 | ||
5327cf48 FB |
358 | if test -z "$target_list" ; then |
359 | # these targets are portable | |
0a8e90f4 PB |
360 | if [ "$softmmu" = "yes" ] ; then |
361 | target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu mipsel-softmmu arm-softmmu" | |
362 | fi | |
5327cf48 | 363 | # the following are Linux specific |
0a8e90f4 | 364 | if [ "$user" = "yes" ] ; then |
e6e5906b | 365 | target_list="i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user m68k-user $target_list" |
5327cf48 | 366 | fi |
6e20a45f | 367 | else |
b1a550a0 | 368 | target_list=`echo "$target_list" | sed -e 's/,/ /g'` |
5327cf48 | 369 | fi |
0a8e90f4 PB |
370 | if test -z "$target_list" ; then |
371 | echo "No targets enabled" | |
372 | exit 1 | |
373 | fi | |
5327cf48 | 374 | |
7d13299d FB |
375 | if test -z "$cross_prefix" ; then |
376 | ||
377 | # --- | |
378 | # big/little endian test | |
379 | cat > $TMPC << EOF | |
380 | #include <inttypes.h> | |
381 | int main(int argc, char ** argv){ | |
1d14ffa9 FB |
382 | volatile uint32_t i=0x01234567; |
383 | return (*((uint8_t*)(&i))) == 0x67; | |
7d13299d FB |
384 | } |
385 | EOF | |
386 | ||
387 | if $cc -o $TMPE $TMPC 2>/dev/null ; then | |
388 | $TMPE && bigendian="yes" | |
389 | else | |
390 | echo big/little test failed | |
391 | fi | |
392 | ||
393 | else | |
394 | ||
395 | # if cross compiling, cannot launch a program, so make a static guess | |
808c4954 | 396 | if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then |
7d13299d FB |
397 | bigendian="yes" |
398 | fi | |
399 | ||
400 | fi | |
401 | ||
b6853697 FB |
402 | # host long bits test |
403 | hostlongbits="32" | |
404 | if test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then | |
405 | hostlongbits="64" | |
406 | fi | |
407 | ||
e8cd23de | 408 | # check gcc options support |
04369ff2 FB |
409 | cat > $TMPC <<EOF |
410 | int main(void) { | |
04369ff2 FB |
411 | } |
412 | EOF | |
413 | ||
e8cd23de FB |
414 | have_gcc3_options="no" |
415 | if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then | |
416 | have_gcc3_options="yes" | |
04369ff2 | 417 | fi |
ca735206 | 418 | |
b1a550a0 | 419 | # Check for gcc4, error if pre-gcc4 |
1aff381f FB |
420 | if test "$check_gcc" = "yes" ; then |
421 | cat > $TMPC <<EOF | |
b1a550a0 PB |
422 | #if __GNUC__ < 4 |
423 | #error gcc3 | |
1aff381f FB |
424 | #endif |
425 | int main(){return 0;} | |
426 | EOF | |
b1a550a0 | 427 | if $cc -o $TMPO $TMPC 2>/dev/null ; then |
1aff381f FB |
428 | echo "ERROR: \"$cc\" looks like gcc 4.x" |
429 | echo "QEMU is known to have problems when compiled with gcc 4.x" | |
430 | echo "It is recommended that you use gcc 3.x to build QEMU" | |
431 | echo "To use this compiler anyway, configure with --disable-gcc-check" | |
432 | exit 1; | |
433 | fi | |
434 | fi | |
435 | ||
11d9f695 FB |
436 | ########################################## |
437 | # SDL probe | |
438 | ||
439 | sdl_too_old=no | |
440 | ||
441 | if test -z "$sdl" ; then | |
442 | ||
a6e022ad FB |
443 | sdl_config="sdl-config" |
444 | sdl=no | |
7c1f25b4 | 445 | sdl_static=no |
a6e022ad FB |
446 | |
447 | if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then | |
448 | # win32 cross compilation case | |
449 | sdl_config="i386-mingw32msvc-sdl-config" | |
450 | sdl=yes | |
451 | else | |
452 | # normal SDL probe | |
11d9f695 FB |
453 | cat > $TMPC << EOF |
454 | #include <SDL.h> | |
455 | #undef main /* We don't want SDL to override our main() */ | |
456 | int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } | |
457 | EOF | |
458 | ||
a6e022ad FB |
459 | if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then |
460 | _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` | |
11d9f695 FB |
461 | if test "$_sdlversion" -lt 121 ; then |
462 | sdl_too_old=yes | |
463 | else | |
464 | sdl=yes | |
465 | fi | |
7c1f25b4 FB |
466 | |
467 | # static link with sdl ? | |
468 | if test "$sdl" = "yes" ; then | |
469 | aa="no" | |
470 | `$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes" | |
471 | sdl_static_libs=`$sdl_config --static-libs` | |
472 | if [ "$aa" = "yes" ] ; then | |
d8d8aa4e | 473 | sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" |
7c1f25b4 FB |
474 | fi |
475 | ||
476 | if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then | |
477 | sdl_static=yes | |
11d9f695 FB |
478 | fi |
479 | ||
7c1f25b4 FB |
480 | fi # static link |
481 | ||
482 | fi # sdl compile test | |
483 | ||
a6e022ad FB |
484 | fi # cross compilation |
485 | fi # -z $sdl | |
11d9f695 | 486 | |
cc8ae6de | 487 | # Check if tools are available to build documentation. |
94ac5158 | 488 | if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then |
cc8ae6de PB |
489 | build_docs="yes" |
490 | fi | |
491 | ||
11d9f695 FB |
492 | if test "$mingw32" = "yes" ; then |
493 | if test -z "$prefix" ; then | |
494 | prefix="/c/Program Files/Qemu" | |
495 | fi | |
496 | mandir="$prefix" | |
7efa4387 | 497 | datadir="$prefix" |
1f50f8d1 | 498 | docdir="$prefix" |
11d9f695 FB |
499 | bindir="$prefix" |
500 | else | |
501 | if test -z "$prefix" ; then | |
502 | prefix="/usr/local" | |
503 | fi | |
5a67135a | 504 | mandir="$prefix/share/man" |
7efa4387 | 505 | datadir="$prefix/share/qemu" |
1f50f8d1 | 506 | docdir="$prefix/share/doc/qemu" |
11d9f695 FB |
507 | bindir="$prefix/bin" |
508 | fi | |
5a67135a | 509 | |
43ce4dfe | 510 | echo "Install prefix $prefix" |
7efa4387 | 511 | echo "BIOS directory $datadir" |
11d9f695 FB |
512 | echo "binary directory $bindir" |
513 | if test "$mingw32" = "no" ; then | |
514 | echo "Manual directory $mandir" | |
43ce4dfe | 515 | echo "ELF interp prefix $interp_prefix" |
11d9f695 | 516 | fi |
5a67135a | 517 | echo "Source path $source_path" |
43ce4dfe | 518 | echo "C compiler $cc" |
83469015 | 519 | echo "Host C compiler $host_cc" |
43ce4dfe | 520 | echo "make $make" |
6a882643 | 521 | echo "install $install" |
43ce4dfe | 522 | echo "host CPU $cpu" |
de83cd02 | 523 | echo "host big endian $bigendian" |
97a847bc | 524 | echo "target list $target_list" |
43ce4dfe | 525 | echo "gprof enabled $gprof" |
05c2a3e7 | 526 | echo "profiler $profiler" |
43ce4dfe | 527 | echo "static build $static" |
5b0753e0 FB |
528 | if test "$darwin" = "yes" ; then |
529 | echo "Cocoa support $cocoa" | |
530 | fi | |
97a847bc | 531 | echo "SDL support $sdl" |
e4afee97 FB |
532 | if test "$sdl" != "no" ; then |
533 | echo "SDL static link $sdl_static" | |
534 | fi | |
67b915a5 | 535 | echo "mingw32 support $mingw32" |
fb065187 | 536 | echo "Adlib support $adlib" |
1d14ffa9 FB |
537 | echo "CoreAudio support $coreaudio" |
538 | echo "ALSA support $alsa" | |
539 | echo "DSound support $dsound" | |
1d14ffa9 FB |
540 | if test "$fmod" = "yes"; then |
541 | if test -z $fmod_lib || test -z $fmod_inc; then | |
542 | echo | |
543 | echo "Error: You must specify path to FMOD library and headers" | |
544 | echo "Example: --fmod-inc=/path/include/fmod --fmod-lib=/path/lib/libfmod-3.74.so" | |
545 | echo | |
546 | exit 1 | |
547 | fi | |
b1a550a0 PB |
548 | fmod_support=" (lib='$fmod_lib' include='$fmod_inc')" |
549 | else | |
550 | fmod_support="" | |
102a52e4 | 551 | fi |
b1a550a0 | 552 | echo "FMOD support $fmod $fmod_support" |
07f4ddbf | 553 | echo "kqemu support $kqemu" |
cc8ae6de | 554 | echo "Documentation $build_docs" |
c5937220 PB |
555 | [ ! -z "$uname_release" ] && \ |
556 | echo "uname -r $uname_release" | |
67b915a5 | 557 | |
97a847bc | 558 | if test $sdl_too_old = "yes"; then |
24b55b96 | 559 | echo "-> Your SDL version is too old - please upgrade to have SDL support" |
7c1f25b4 | 560 | fi |
24b55b96 FB |
561 | #if test "$sdl_static" = "no"; then |
562 | # echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output" | |
563 | #fi | |
97a847bc FB |
564 | config_mak="config-host.mak" |
565 | config_h="config-host.h" | |
7d13299d | 566 | |
7c1f25b4 | 567 | #echo "Creating $config_mak and $config_h" |
7d13299d | 568 | |
97a847bc | 569 | echo "# Automatically generated by configure - do not modify" > $config_mak |
29517134 | 570 | echo "# Configured with: $0 $@" >> $config_mak |
97a847bc | 571 | echo "/* Automatically generated by configure - do not modify */" > $config_h |
7d13299d | 572 | |
97a847bc | 573 | echo "prefix=$prefix" >> $config_mak |
11d9f695 | 574 | echo "bindir=$bindir" >> $config_mak |
5a67135a | 575 | echo "mandir=$mandir" >> $config_mak |
7efa4387 | 576 | echo "datadir=$datadir" >> $config_mak |
1f50f8d1 | 577 | echo "docdir=$docdir" >> $config_mak |
7efa4387 | 578 | echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h |
97a847bc | 579 | echo "MAKE=$make" >> $config_mak |
6a882643 | 580 | echo "INSTALL=$install" >> $config_mak |
97a847bc | 581 | echo "CC=$cc" >> $config_mak |
e8cd23de | 582 | if test "$have_gcc3_options" = "yes" ; then |
97a847bc | 583 | echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak |
e8cd23de | 584 | fi |
97a847bc FB |
585 | echo "HOST_CC=$host_cc" >> $config_mak |
586 | echo "AR=$ar" >> $config_mak | |
587 | echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak | |
588 | echo "CFLAGS=$CFLAGS" >> $config_mak | |
589 | echo "LDFLAGS=$LDFLAGS" >> $config_mak | |
67b915a5 | 590 | echo "EXESUF=$EXESUF" >> $config_mak |
97a847bc FB |
591 | if test "$cpu" = "i386" ; then |
592 | echo "ARCH=i386" >> $config_mak | |
593 | echo "#define HOST_I386 1" >> $config_h | |
0b0babc6 FB |
594 | elif test "$cpu" = "x86_64" ; then |
595 | echo "ARCH=x86_64" >> $config_mak | |
596 | echo "#define HOST_X86_64 1" >> $config_h | |
808c4954 FB |
597 | elif test "$cpu" = "armv4b" ; then |
598 | echo "ARCH=arm" >> $config_mak | |
599 | echo "#define HOST_ARM 1" >> $config_h | |
7d13299d | 600 | elif test "$cpu" = "armv4l" ; then |
97a847bc FB |
601 | echo "ARCH=arm" >> $config_mak |
602 | echo "#define HOST_ARM 1" >> $config_h | |
7d13299d | 603 | elif test "$cpu" = "powerpc" ; then |
97a847bc FB |
604 | echo "ARCH=ppc" >> $config_mak |
605 | echo "#define HOST_PPC 1" >> $config_h | |
7d13299d | 606 | elif test "$cpu" = "mips" ; then |
97a847bc FB |
607 | echo "ARCH=mips" >> $config_mak |
608 | echo "#define HOST_MIPS 1" >> $config_h | |
fb3e5849 | 609 | elif test "$cpu" = "s390" ; then |
97a847bc FB |
610 | echo "ARCH=s390" >> $config_mak |
611 | echo "#define HOST_S390 1" >> $config_h | |
295defa5 | 612 | elif test "$cpu" = "alpha" ; then |
97a847bc FB |
613 | echo "ARCH=alpha" >> $config_mak |
614 | echo "#define HOST_ALPHA 1" >> $config_h | |
ae228531 | 615 | elif test "$cpu" = "sparc" ; then |
97a847bc FB |
616 | echo "ARCH=sparc" >> $config_mak |
617 | echo "#define HOST_SPARC 1" >> $config_h | |
ae228531 | 618 | elif test "$cpu" = "sparc64" ; then |
97a847bc FB |
619 | echo "ARCH=sparc64" >> $config_mak |
620 | echo "#define HOST_SPARC64 1" >> $config_h | |
a8baa8c5 | 621 | elif test "$cpu" = "ia64" ; then |
97a847bc FB |
622 | echo "ARCH=ia64" >> $config_mak |
623 | echo "#define HOST_IA64 1" >> $config_h | |
38e584a0 | 624 | elif test "$cpu" = "m68k" ; then |
38ca2abc FB |
625 | echo "ARCH=m68k" >> $config_mak |
626 | echo "#define HOST_M68K 1" >> $config_h | |
7d13299d FB |
627 | else |
628 | echo "Unsupported CPU" | |
629 | exit 1 | |
630 | fi | |
631 | if test "$bigendian" = "yes" ; then | |
97a847bc FB |
632 | echo "WORDS_BIGENDIAN=yes" >> $config_mak |
633 | echo "#define WORDS_BIGENDIAN 1" >> $config_h | |
634 | fi | |
b6853697 | 635 | echo "#define HOST_LONG_BITS $hostlongbits" >> $config_h |
67b915a5 FB |
636 | if test "$mingw32" = "yes" ; then |
637 | echo "CONFIG_WIN32=yes" >> $config_mak | |
11d9f695 | 638 | echo "#define CONFIG_WIN32 1" >> $config_h |
7d3505c5 | 639 | elif test -f "/usr/include/byteswap.h" ; then |
67b915a5 FB |
640 | echo "#define HAVE_BYTESWAP_H 1" >> $config_h |
641 | fi | |
83fb7adf FB |
642 | if test "$darwin" = "yes" ; then |
643 | echo "CONFIG_DARWIN=yes" >> $config_mak | |
644 | echo "#define CONFIG_DARWIN 1" >> $config_h | |
645 | fi | |
ec530c81 FB |
646 | if test "$solaris" = "yes" ; then |
647 | echo "CONFIG_SOLARIS=yes" >> $config_mak | |
38cfa06c | 648 | echo "#define HOST_SOLARIS $solarisrev" >> $config_h |
ec530c81 | 649 | fi |
67b915a5 FB |
650 | if test "$gdbstub" = "yes" ; then |
651 | echo "CONFIG_GDBSTUB=yes" >> $config_mak | |
652 | echo "#define CONFIG_GDBSTUB 1" >> $config_h | |
653 | fi | |
97a847bc FB |
654 | if test "$gprof" = "yes" ; then |
655 | echo "TARGET_GPROF=yes" >> $config_mak | |
656 | echo "#define HAVE_GPROF 1" >> $config_h | |
657 | fi | |
658 | if test "$static" = "yes" ; then | |
659 | echo "CONFIG_STATIC=yes" >> $config_mak | |
50863472 | 660 | echo "#define CONFIG_STATIC 1" >> $config_h |
7d13299d | 661 | fi |
05c2a3e7 FB |
662 | if test $profiler = "yes" ; then |
663 | echo "#define CONFIG_PROFILER 1" >> $config_h | |
664 | fi | |
c20709aa FB |
665 | if test "$slirp" = "yes" ; then |
666 | echo "CONFIG_SLIRP=yes" >> $config_mak | |
667 | echo "#define CONFIG_SLIRP 1" >> $config_h | |
668 | fi | |
fb065187 FB |
669 | if test "$adlib" = "yes" ; then |
670 | echo "CONFIG_ADLIB=yes" >> $config_mak | |
671 | echo "#define CONFIG_ADLIB 1" >> $config_h | |
672 | fi | |
673 | if test "$oss" = "yes" ; then | |
674 | echo "CONFIG_OSS=yes" >> $config_mak | |
675 | echo "#define CONFIG_OSS 1" >> $config_h | |
676 | fi | |
1d14ffa9 FB |
677 | if test "$coreaudio" = "yes" ; then |
678 | echo "CONFIG_COREAUDIO=yes" >> $config_mak | |
679 | echo "#define CONFIG_COREAUDIO 1" >> $config_h | |
680 | fi | |
681 | if test "$alsa" = "yes" ; then | |
682 | echo "CONFIG_ALSA=yes" >> $config_mak | |
683 | echo "#define CONFIG_ALSA 1" >> $config_h | |
684 | fi | |
685 | if test "$dsound" = "yes" ; then | |
686 | echo "CONFIG_DSOUND=yes" >> $config_mak | |
687 | echo "#define CONFIG_DSOUND 1" >> $config_h | |
688 | fi | |
102a52e4 FB |
689 | if test "$fmod" = "yes" ; then |
690 | echo "CONFIG_FMOD=yes" >> $config_mak | |
691 | echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak | |
692 | echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak | |
693 | echo "#define CONFIG_FMOD 1" >> $config_h | |
694 | fi | |
b1a550a0 PB |
695 | qemu_version=`head $source_path/VERSION` |
696 | echo "VERSION=$qemu_version" >>$config_mak | |
d4b8f039 | 697 | echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h |
97a847bc FB |
698 | |
699 | echo "SRC_PATH=$source_path" >> $config_mak | |
ad064840 PB |
700 | if [ "$source_path_used" = "yes" ]; then |
701 | echo "VPATH=$source_path" >> $config_mak | |
702 | fi | |
97a847bc | 703 | echo "TARGET_DIRS=$target_list" >> $config_mak |
cc8ae6de PB |
704 | if [ "$build_docs" = "yes" ] ; then |
705 | echo "BUILD_DOCS=yes" >> $config_mak | |
706 | fi | |
97a847bc | 707 | |
83fb7adf | 708 | # XXX: suppress that |
7d3505c5 | 709 | if [ "$bsd" = "yes" ] ; then |
43003046 | 710 | echo "#define O_LARGEFILE 0" >> $config_h |
43003046 | 711 | echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h |
7d3505c5 FB |
712 | echo "#define _BSD 1" >> $config_h |
713 | fi | |
714 | ||
c5937220 PB |
715 | echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h |
716 | ||
1d14ffa9 | 717 | for target in $target_list; do |
97a847bc FB |
718 | target_dir="$target" |
719 | config_mak=$target_dir/config.mak | |
720 | config_h=$target_dir/config.h | |
721 | target_cpu=`echo $target | cut -d '-' -f 1` | |
722 | target_bigendian="no" | |
808c4954 | 723 | [ "$target_cpu" = "armeb" ] && target_bigendian=yes |
1e43adfc | 724 | [ "$target_cpu" = "sparc" ] && target_bigendian=yes |
64b3ab24 | 725 | [ "$target_cpu" = "sparc64" ] && target_bigendian=yes |
67867308 | 726 | [ "$target_cpu" = "ppc" ] && target_bigendian=yes |
a2458627 | 727 | [ "$target_cpu" = "ppc64" ] && target_bigendian=yes |
d3258560 | 728 | [ "$target_cpu" = "mips" ] && target_bigendian=yes |
908f52b0 | 729 | [ "$target_cpu" = "sh4eb" ] && target_bigendian=yes |
e6e5906b | 730 | [ "$target_cpu" = "m68k" ] && target_bigendian=yes |
97a847bc FB |
731 | target_softmmu="no" |
732 | if expr $target : '.*-softmmu' > /dev/null ; then | |
733 | target_softmmu="yes" | |
734 | fi | |
997344f3 FB |
735 | target_user_only="no" |
736 | if expr $target : '.*-user' > /dev/null ; then | |
737 | target_user_only="yes" | |
738 | fi | |
97a847bc | 739 | |
97ccc689 | 740 | if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \ |
1d14ffa9 | 741 | -a "$sdl" = "no" -a "$cocoa" = "no" ; then |
97ccc689 | 742 | echo "ERROR: QEMU requires SDL or Cocoa for graphical output" |
9c038506 | 743 | echo "To build QEMU without graphical output configure with --disable-gfx-check" |
97ccc689 FB |
744 | echo "Note that this will disable all output from the virtual graphics card." |
745 | exit 1; | |
746 | fi | |
747 | ||
7c1f25b4 | 748 | #echo "Creating $config_mak, $config_h and $target_dir/Makefile" |
97a847bc FB |
749 | |
750 | mkdir -p $target_dir | |
158142c2 | 751 | mkdir -p $target_dir/fpu |
808c4954 | 752 | if test "$target" = "arm-user" -o "$target" = "armeb-user" ; then |
69de927c FB |
753 | mkdir -p $target_dir/nwfpe |
754 | fi | |
a7e61ed4 FB |
755 | if test "$target_user_only" = "no" ; then |
756 | mkdir -p $target_dir/slirp | |
757 | fi | |
69de927c | 758 | |
ec530c81 FB |
759 | # |
760 | # don't use ln -sf as not all "ln -sf" over write the file/link | |
761 | # | |
762 | rm -f $target_dir/Makefile | |
763 | ln -s $source_path/Makefile.target $target_dir/Makefile | |
764 | ||
97a847bc FB |
765 | |
766 | echo "# Automatically generated by configure - do not modify" > $config_mak | |
767 | echo "/* Automatically generated by configure - do not modify */" > $config_h | |
768 | ||
de83cd02 | 769 | |
97a847bc FB |
770 | echo "include ../config-host.mak" >> $config_mak |
771 | echo "#include \"../config-host.h\"" >> $config_h | |
1e43adfc | 772 | |
e5fe0c52 | 773 | bflt="no" |
1e43adfc FB |
774 | interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"` |
775 | echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h | |
97a847bc FB |
776 | |
777 | if test "$target_cpu" = "i386" ; then | |
778 | echo "TARGET_ARCH=i386" >> $config_mak | |
779 | echo "#define TARGET_ARCH \"i386\"" >> $config_h | |
780 | echo "#define TARGET_I386 1" >> $config_h | |
07f4ddbf | 781 | if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "i386" ; then |
824d560f FB |
782 | echo "#define USE_KQEMU 1" >> $config_h |
783 | fi | |
808c4954 | 784 | elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then |
97a847bc FB |
785 | echo "TARGET_ARCH=arm" >> $config_mak |
786 | echo "#define TARGET_ARCH \"arm\"" >> $config_h | |
787 | echo "#define TARGET_ARM 1" >> $config_h | |
e5fe0c52 | 788 | bflt="yes" |
1e43adfc FB |
789 | elif test "$target_cpu" = "sparc" ; then |
790 | echo "TARGET_ARCH=sparc" >> $config_mak | |
791 | echo "#define TARGET_ARCH \"sparc\"" >> $config_h | |
792 | echo "#define TARGET_SPARC 1" >> $config_h | |
64b3ab24 FB |
793 | elif test "$target_cpu" = "sparc64" ; then |
794 | echo "TARGET_ARCH=sparc64" >> $config_mak | |
795 | echo "#define TARGET_ARCH \"sparc64\"" >> $config_h | |
796 | echo "#define TARGET_SPARC 1" >> $config_h | |
797 | echo "#define TARGET_SPARC64 1" >> $config_h | |
67867308 FB |
798 | elif test "$target_cpu" = "ppc" ; then |
799 | echo "TARGET_ARCH=ppc" >> $config_mak | |
800 | echo "#define TARGET_ARCH \"ppc\"" >> $config_h | |
801 | echo "#define TARGET_PPC 1" >> $config_h | |
a2458627 FB |
802 | elif test "$target_cpu" = "ppc64" ; then |
803 | echo "TARGET_ARCH=ppc64" >> $config_mak | |
804 | echo "#define TARGET_ARCH \"ppc64\"" >> $config_h | |
805 | echo "#define TARGET_PPC 1" >> $config_h | |
806 | echo "#define TARGET_PPC64 1" >> $config_h | |
0b0babc6 FB |
807 | elif test "$target_cpu" = "x86_64" ; then |
808 | echo "TARGET_ARCH=x86_64" >> $config_mak | |
809 | echo "#define TARGET_ARCH \"x86_64\"" >> $config_h | |
810 | echo "#define TARGET_I386 1" >> $config_h | |
811 | echo "#define TARGET_X86_64 1" >> $config_h | |
07f4ddbf FB |
812 | if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" ; then |
813 | echo "#define USE_KQEMU 1" >> $config_h | |
814 | fi | |
c20eb473 | 815 | elif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then |
d3258560 FB |
816 | echo "TARGET_ARCH=mips" >> $config_mak |
817 | echo "#define TARGET_ARCH \"mips\"" >> $config_h | |
818 | echo "#define TARGET_MIPS 1" >> $config_h | |
6ea83fed FB |
819 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
820 | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | |
908f52b0 | 821 | elif test "$target_cpu" = "sh4" -o "$target_cpu" = "sh4eb" ; then |
fdf9b3e8 FB |
822 | echo "TARGET_ARCH=sh4" >> $config_mak |
823 | echo "#define TARGET_ARCH \"sh4\"" >> $config_h | |
824 | echo "#define TARGET_SH4 1" >> $config_h | |
4dbed897 | 825 | bflt="yes" |
e6e5906b PB |
826 | elif test "$target_cpu" = "m68k" ; then |
827 | echo "TARGET_ARCH=m68k" >> $config_mak | |
828 | echo "#define TARGET_ARCH \"m68k\"" >> $config_h | |
829 | echo "#define TARGET_M68K 1" >> $config_h | |
830 | bflt="yes" | |
de83cd02 FB |
831 | else |
832 | echo "Unsupported target CPU" | |
833 | exit 1 | |
834 | fi | |
835 | if test "$target_bigendian" = "yes" ; then | |
97a847bc FB |
836 | echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak |
837 | echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h | |
de83cd02 | 838 | fi |
97a847bc FB |
839 | if test "$target_softmmu" = "yes" ; then |
840 | echo "CONFIG_SOFTMMU=yes" >> $config_mak | |
841 | echo "#define CONFIG_SOFTMMU 1" >> $config_h | |
43ce4dfe | 842 | fi |
997344f3 FB |
843 | if test "$target_user_only" = "yes" ; then |
844 | echo "CONFIG_USER_ONLY=yes" >> $config_mak | |
845 | echo "#define CONFIG_USER_ONLY 1" >> $config_h | |
846 | fi | |
97a847bc | 847 | |
e6e5906b | 848 | if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" -o "$target_cpu" = "sparc" -o "$target_cpu" = "sparc64" -o "$target_cpu" = "m68k"; then |
158142c2 FB |
849 | echo "CONFIG_SOFTFLOAT=yes" >> $config_mak |
850 | echo "#define CONFIG_SOFTFLOAT 1" >> $config_h | |
851 | fi | |
e5fe0c52 PB |
852 | if test "$target_user_only" = "yes" -a "$bflt" = "yes"; then |
853 | echo "TARGET_HAS_BFLT=yes" >> $config_mak | |
854 | echo "#define TARGET_HAS_BFLT 1" >> $config_h | |
855 | fi | |
7c1f25b4 FB |
856 | # sdl defines |
857 | ||
858 | if test "$target_user_only" = "no"; then | |
859 | if test "$target_softmmu" = "no" -o "$static" = "yes"; then | |
dbb2c921 | 860 | sdl1=$sdl_static |
7c1f25b4 | 861 | else |
dbb2c921 FB |
862 | sdl1=$sdl |
863 | fi | |
864 | if test "$sdl1" = "yes" ; then | |
865 | echo "#define CONFIG_SDL 1" >> $config_h | |
866 | echo "CONFIG_SDL=yes" >> $config_mak | |
867 | if test "$target_softmmu" = "no" -o "$static" = "yes"; then | |
868 | echo "SDL_LIBS=$sdl_static_libs" >> $config_mak | |
869 | else | |
7c1f25b4 FB |
870 | echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak |
871 | fi | |
dbb2c921 | 872 | if [ "${aa}" = "yes" ] ; then |
b1a550a0 PB |
873 | echo "SDL_CFLAGS=`$sdl_config --cflags` `aalib-config --cflags`" >> $config_mak |
874 | else | |
875 | echo "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak | |
dbb2c921 | 876 | fi |
7c1f25b4 | 877 | fi |
7c1f25b4 FB |
878 | fi |
879 | ||
5b0753e0 FB |
880 | if test "$cocoa" = "yes" ; then |
881 | echo "#define CONFIG_COCOA 1" >> $config_h | |
882 | echo "CONFIG_COCOA=yes" >> $config_mak | |
883 | fi | |
884 | ||
97a847bc | 885 | done # for target in $targets |
7d13299d FB |
886 | |
887 | # build tree in object directory if source path is different from current one | |
888 | if test "$source_path_used" = "yes" ; then | |
889 | DIRS="tests" | |
890 | FILES="Makefile tests/Makefile" | |
891 | for dir in $DIRS ; do | |
892 | mkdir -p $dir | |
893 | done | |
ec530c81 | 894 | # remove the link and recreate it, as not all "ln -sf" overwrite the link |
7d13299d | 895 | for f in $FILES ; do |
ec530c81 FB |
896 | rm -f $f |
897 | ln -s $source_path/$f $f | |
7d13299d FB |
898 | done |
899 | fi | |
7d13299d | 900 | |
97a847bc | 901 | rm -f $TMPO $TMPC $TMPE $TMPS |