17d13299dSbellard#!/bin/sh 27d13299dSbellard# 33ef693a0Sbellard# qemu configure script (c) 2003 Fabrice Bellard 47d13299dSbellard# 57d13299dSbellard# set temporary file name 67d13299dSbellardif test ! -z "$TMPDIR" ; then 77d13299dSbellard TMPDIR1="${TMPDIR}" 87d13299dSbellardelif test ! -z "$TEMPDIR" ; then 97d13299dSbellard TMPDIR1="${TEMPDIR}" 107d13299dSbellardelse 117d13299dSbellard TMPDIR1="/tmp" 127d13299dSbellardfi 137d13299dSbellard 143ef693a0SbellardTMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c" 153ef693a0SbellardTMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o" 163ef693a0SbellardTMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}" 173ef693a0SbellardTMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S" 187d13299dSbellard 197d13299dSbellard# default parameters 2011d9f695Sbellardprefix="" 211e43adfcSbellardinterp_prefix="/usr/gnemul/qemu-%M" 2243ce4dfeSbellardstatic="no" 237d13299dSbellardcross_prefix="" 247d13299dSbellardcc="gcc" 257d13299dSbellardhost_cc="gcc" 267d13299dSbellardar="ar" 277d13299dSbellardmake="make" 287d13299dSbellardstrip="strip" 297d13299dSbellardcpu=`uname -m` 305327cf48Sbellardtarget_list="" 317d13299dSbellardcase "$cpu" in 327d13299dSbellard i386|i486|i586|i686|i86pc|BePC) 3397a847bcSbellard cpu="i386" 347d13299dSbellard ;; 35ba68055eSbellard armv*b) 36808c4954Sbellard cpu="armv4b" 37808c4954Sbellard ;; 38ba68055eSbellard armv*l) 397d13299dSbellard cpu="armv4l" 407d13299dSbellard ;; 417d13299dSbellard alpha) 427d13299dSbellard cpu="alpha" 437d13299dSbellard ;; 44295defa5Sbellard "Power Macintosh"|ppc|ppc64) 457d13299dSbellard cpu="powerpc" 467d13299dSbellard ;; 477d13299dSbellard mips) 487d13299dSbellard cpu="mips" 497d13299dSbellard ;; 50fb3e5849Sbellard s390) 51fb3e5849Sbellard cpu="s390" 52fb3e5849Sbellard ;; 53ae228531Sbellard sparc) 54ae228531Sbellard cpu="sparc" 55ae228531Sbellard ;; 56ae228531Sbellard sparc64) 57ae228531Sbellard cpu="sparc64" 58ae228531Sbellard ;; 59a8baa8c5Sbellard ia64) 60a8baa8c5Sbellard cpu="ia64" 61a8baa8c5Sbellard ;; 6238e584a0Sbellard m68k) 6338e584a0Sbellard cpu="m68k" 6438e584a0Sbellard ;; 65bc51c5c9Sbellard x86_64|amd64) 660b0babc6Sbellard cpu="x86_64" 67bc51c5c9Sbellard ;; 687d13299dSbellard *) 697d13299dSbellard cpu="unknown" 707d13299dSbellard ;; 717d13299dSbellardesac 727d13299dSbellardgprof="no" 737d13299dSbellardbigendian="no" 7467b915a5Sbellardmingw32="no" 7567b915a5SbellardEXESUF="" 7667b915a5Sbellardgdbstub="yes" 77443f1376Sbellardslirp="yes" 78fb065187Sbellardadlib="no" 79fb065187Sbellardoss="no" 801d14ffa9Sbellarddsound="no" 811d14ffa9Sbellardcoreaudio="no" 821d14ffa9Sbellardalsa="no" 83102a52e4Sbellardfmod="no" 84102a52e4Sbellardfmod_lib="" 85102a52e4Sbellardfmod_inc="" 865327cf48Sbellardlinux="no" 87c9ec1fe4Sbellardkqemu="no" 88c9ec1fe4Sbellardkernel_path="" 895b0753e0Sbellardcocoa="no" 9097ccc689Sbellardcheck_gfx="yes" 911aff381fSbellardcheck_gcc="yes" 927d13299dSbellard 937d13299dSbellard# OS specific 947d13299dSbellardtargetos=`uname -s` 957d13299dSbellardcase $targetos in 96c326e0afSbellardCYGWIN*) 97c326e0afSbellardmingw32="yes" 98c326e0afSbellardCFLAGS="-O2 -mno-cygwin" 99c326e0afSbellard;; 10067b915a5SbellardMINGW32*) 10167b915a5Sbellardmingw32="yes" 10267b915a5Sbellard;; 1037d3505c5SbellardFreeBSD) 1047d3505c5Sbellardbsd="yes" 105fb065187Sbellardoss="yes" 106e99f9060Sbellardif [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then 10707f4ddbfSbellard kqemu="yes" 10807f4ddbfSbellardfi 1097d3505c5Sbellard;; 1107d3505c5SbellardNetBSD) 1117d3505c5Sbellardbsd="yes" 112fb065187Sbellardoss="yes" 1137d3505c5Sbellard;; 1147d3505c5SbellardOpenBSD) 1157d3505c5Sbellardbsd="yes" 116fb065187Sbellardoss="yes" 1177d3505c5Sbellard;; 11883fb7adfSbellardDarwin) 11983fb7adfSbellardbsd="yes" 12083fb7adfSbellarddarwin="yes" 12183fb7adfSbellard;; 122fb065187Sbellard*) 123fb065187Sbellardoss="yes" 1245327cf48Sbellardlinux="yes" 12507f4ddbfSbellardif [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then 126c9ec1fe4Sbellard kqemu="yes" 127c9ec1fe4Sbellardfi 128fb065187Sbellard;; 1297d13299dSbellardesac 1307d13299dSbellard 1317d3505c5Sbellardif [ "$bsd" = "yes" ] ; then 13283fb7adfSbellard if [ ! "$darwin" = "yes" ] ; then 1337d3505c5Sbellard make="gmake" 13483fb7adfSbellard fi 1357d3505c5Sbellardfi 1367d3505c5Sbellard 1377d13299dSbellard# find source path 1387d13299dSbellard# XXX: we assume an absolute path is given when launching configure, 1397d13299dSbellard# except in './configure' case. 1407d13299dSbellardsource_path=${0%configure} 1417d13299dSbellardsource_path=${source_path%/} 1427d13299dSbellardsource_path_used="yes" 1437d13299dSbellardif test -z "$source_path" -o "$source_path" = "." ; then 1447d13299dSbellard source_path=`pwd` 1457d13299dSbellard source_path_used="no" 1467d13299dSbellardfi 1477d13299dSbellard 1487d13299dSbellardfor opt do 1497d13299dSbellard case "$opt" in 1502efc3265Sbellard --help|-h) show_help=yes 1512efc3265Sbellard ;; 1527d13299dSbellard --prefix=*) prefix=`echo $opt | cut -d '=' -f 2` 1537d13299dSbellard ;; 15432ce6337Sbellard --interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2` 15532ce6337Sbellard ;; 1567d13299dSbellard --source-path=*) source_path=`echo $opt | cut -d '=' -f 2` 1577d13299dSbellard ;; 1587d13299dSbellard --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2` 1597d13299dSbellard ;; 1607d13299dSbellard --cc=*) cc=`echo $opt | cut -d '=' -f 2` 1617d13299dSbellard ;; 16283469015Sbellard --host-cc=*) host_cc=`echo $opt | cut -d '=' -f 2` 16383469015Sbellard ;; 1647d13299dSbellard --make=*) make=`echo $opt | cut -d '=' -f 2` 1657d13299dSbellard ;; 1667d13299dSbellard --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}" 1677d13299dSbellard ;; 1687d13299dSbellard --extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}" 1697d13299dSbellard ;; 1707d13299dSbellard --cpu=*) cpu=`echo $opt | cut -d '=' -f 2` 1717d13299dSbellard ;; 17297a847bcSbellard --target-list=*) target_list=${opt#--target-list=} 173de83cd02Sbellard ;; 1747d13299dSbellard --enable-gprof) gprof="yes" 1757d13299dSbellard ;; 17643ce4dfeSbellard --static) static="yes" 17743ce4dfeSbellard ;; 17897a847bcSbellard --disable-sdl) sdl="no" 17997a847bcSbellard ;; 1801d14ffa9Sbellard --enable-coreaudio) coreaudio="yes" 1811d14ffa9Sbellard ;; 1821d14ffa9Sbellard --enable-alsa) alsa="yes" 1831d14ffa9Sbellard ;; 1841d14ffa9Sbellard --enable-dsound) dsound="yes" 1851d14ffa9Sbellard ;; 186102a52e4Sbellard --enable-fmod) fmod="yes" 187102a52e4Sbellard ;; 188102a52e4Sbellard --fmod-lib=*) fmod_lib=${opt#--fmod-lib=} 189102a52e4Sbellard ;; 190102a52e4Sbellard --fmod-inc=*) fmod_inc=${opt#--fmod-inc=} 191102a52e4Sbellard ;; 19267b915a5Sbellard --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" 19367b915a5Sbellard ;; 194443f1376Sbellard --disable-slirp) slirp="no" 195c20709aaSbellard ;; 196fb065187Sbellard --enable-adlib) adlib="yes" 197fb065187Sbellard ;; 198c9ec1fe4Sbellard --disable-kqemu) kqemu="no" 199c9ec1fe4Sbellard ;; 200c9ec1fe4Sbellard --kernel-path=*) kernel_path=${opt#--kernel-path=} 201c9ec1fe4Sbellard ;; 2021d14ffa9Sbellard --enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no" 2035b0753e0Sbellard ;; 20497ccc689Sbellard --disable-gfx-check) check_gfx="no" 20597ccc689Sbellard ;; 2061aff381fSbellard --disable-gcc-check) check_gcc="no" 2071aff381fSbellard ;; 2087d13299dSbellard esac 2097d13299dSbellarddone 2107d13299dSbellard 2117d13299dSbellard# Checking for CFLAGS 2127d13299dSbellardif test -z "$CFLAGS"; then 2137d13299dSbellard CFLAGS="-O2" 2147d13299dSbellardfi 2157d13299dSbellard 2167d13299dSbellardcc="${cross_prefix}${cc}" 2177d13299dSbellardar="${cross_prefix}${ar}" 2187d13299dSbellardstrip="${cross_prefix}${strip}" 2197d13299dSbellard 22067b915a5Sbellardif test "$mingw32" = "yes" ; then 2215327cf48Sbellard linux="no" 22267b915a5Sbellard EXESUF=".exe" 22367b915a5Sbellard gdbstub="no" 2249f059ecaSbellard oss="no" 22507f4ddbfSbellard if [ "$cpu" = "i386" ] ; then 22607f4ddbfSbellard kqemu="yes" 22707f4ddbfSbellard fi 22867b915a5Sbellardfi 22967b915a5Sbellard 2305327cf48Sbellardif test -z "$target_list" ; then 2315327cf48Sbellard# these targets are portable 232b5ff1b31Sbellard target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu arm-softmmu" 2335327cf48Sbellard# the following are Linux specific 2345327cf48Sbellard if [ "$linux" = "yes" ] ; then 235c20eb473Sbellard target_list="i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user $target_list" 2365327cf48Sbellard fi 2376e20a45fSbellardelse 2386e20a45fSbellard target_list=$(echo "$target_list" | sed -e 's/,/ /g') 2395327cf48Sbellardfi 2405327cf48Sbellard 2417d13299dSbellardif test -z "$cross_prefix" ; then 2427d13299dSbellard 2437d13299dSbellard# --- 2447d13299dSbellard# big/little endian test 2457d13299dSbellardcat > $TMPC << EOF 2467d13299dSbellard#include <inttypes.h> 2477d13299dSbellardint main(int argc, char ** argv){ 2487d13299dSbellard volatile uint32_t i=0x01234567; 2497d13299dSbellard return (*((uint8_t*)(&i))) == 0x67; 2507d13299dSbellard} 2517d13299dSbellardEOF 2527d13299dSbellard 2537d13299dSbellardif $cc -o $TMPE $TMPC 2>/dev/null ; then 2547d13299dSbellard$TMPE && bigendian="yes" 2557d13299dSbellardelse 2567d13299dSbellardecho big/little test failed 2577d13299dSbellardfi 2587d13299dSbellard 2597d13299dSbellardelse 2607d13299dSbellard 2617d13299dSbellard# if cross compiling, cannot launch a program, so make a static guess 262808c4954Sbellardif test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then 2637d13299dSbellard bigendian="yes" 2647d13299dSbellardfi 2657d13299dSbellard 2667d13299dSbellardfi 2677d13299dSbellard 268b6853697Sbellard# host long bits test 269b6853697Sbellardhostlongbits="32" 270b6853697Sbellardif test "$cpu" = "sparc64" -o "$cpu" = "ia64" -o "$cpu" = "x86_64" -o "$cpu" = "alpha"; then 271b6853697Sbellard hostlongbits="64" 272b6853697Sbellardfi 273b6853697Sbellard 274e8cd23deSbellard# check gcc options support 27504369ff2Sbellardcat > $TMPC <<EOF 27604369ff2Sbellardint main(void) { 27704369ff2Sbellard} 27804369ff2SbellardEOF 27904369ff2Sbellard 280e8cd23deSbellardhave_gcc3_options="no" 281e8cd23deSbellardif $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then 282e8cd23deSbellard have_gcc3_options="yes" 28304369ff2Sbellardfi 284ca735206Sbellard 2851aff381fSbellard# Check for gcc4 2861aff381fSbellardif test "$check_gcc" = "yes" ; then 2871aff381fSbellard cat > $TMPC <<EOF 2881aff381fSbellard#if __GNUC__ >= 4 2891aff381fSbellard#error gcc4 2901aff381fSbellard#endif 2911aff381fSbellardint main(){return 0;} 2921aff381fSbellardEOF 2931aff381fSbellard if ! $cc -o $TMPO $TMPC 2>/dev/null ; then 2941aff381fSbellard echo "ERROR: \"$cc\" looks like gcc 4.x" 2951aff381fSbellard echo "QEMU is known to have problems when compiled with gcc 4.x" 2961aff381fSbellard echo "It is recommended that you use gcc 3.x to build QEMU" 2971aff381fSbellard echo "To use this compiler anyway, configure with --disable-gcc-check" 2981aff381fSbellard exit 1; 2991aff381fSbellard fi 3001aff381fSbellardfi 3011aff381fSbellard 30211d9f695Sbellard########################################## 30311d9f695Sbellard# SDL probe 30411d9f695Sbellard 30511d9f695Sbellardsdl_too_old=no 30611d9f695Sbellard 30711d9f695Sbellardif test -z "$sdl" ; then 30811d9f695Sbellard 309a6e022adSbellardsdl_config="sdl-config" 310a6e022adSbellardsdl=no 3117c1f25b4Sbellardsdl_static=no 312a6e022adSbellard 313a6e022adSbellardif test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then 314a6e022adSbellard# win32 cross compilation case 315a6e022adSbellard sdl_config="i386-mingw32msvc-sdl-config" 316a6e022adSbellard sdl=yes 317a6e022adSbellardelse 318a6e022adSbellard# normal SDL probe 31911d9f695Sbellardcat > $TMPC << EOF 32011d9f695Sbellard#include <SDL.h> 32111d9f695Sbellard#undef main /* We don't want SDL to override our main() */ 32211d9f695Sbellardint main( void ) { return SDL_Init (SDL_INIT_VIDEO); } 32311d9f695SbellardEOF 32411d9f695Sbellard 325a6e022adSbellardif $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then 326a6e022adSbellard_sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` 32711d9f695Sbellardif test "$_sdlversion" -lt 121 ; then 32811d9f695Sbellardsdl_too_old=yes 32911d9f695Sbellardelse 33011d9f695Sbellardsdl=yes 33111d9f695Sbellardfi 3327c1f25b4Sbellard 3337c1f25b4Sbellard# static link with sdl ? 3347c1f25b4Sbellardif test "$sdl" = "yes" ; then 3357c1f25b4Sbellardaa="no" 3367c1f25b4Sbellard`$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes" 3377c1f25b4Sbellardsdl_static_libs=`$sdl_config --static-libs` 3387c1f25b4Sbellardif [ "$aa" = "yes" ] ; then 339d8d8aa4eSbellard sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" 34011d9f695Sbellardfi 34111d9f695Sbellard 3427c1f25b4Sbellardif $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then 3437c1f25b4Sbellard sdl_static=yes 3447c1f25b4Sbellardfi 3457c1f25b4Sbellard 3467c1f25b4Sbellardfi # static link 3477c1f25b4Sbellard 3487c1f25b4Sbellardfi # sdl compile test 3497c1f25b4Sbellard 350a6e022adSbellardfi # cross compilation 351a6e022adSbellardfi # -z $sdl 35211d9f695Sbellard 3532efc3265Sbellardif test x"$show_help" = x"yes" ; then 3547d13299dSbellardcat << EOF 3557d13299dSbellard 3567d13299dSbellardUsage: configure [options] 3577d13299dSbellardOptions: [defaults in brackets after descriptions] 3587d13299dSbellard 3597d13299dSbellardEOF 3607d13299dSbellardecho "Standard options:" 3617d13299dSbellardecho " --help print this message" 3627d13299dSbellardecho " --prefix=PREFIX install in PREFIX [$prefix]" 3631e43adfcSbellardecho " --interp-prefix=PREFIX where to find shared libraries, etc." 3641e43adfcSbellardecho " use %M for cpu name [$interp_prefix]" 36597a847bcSbellardecho " --target-list=LIST set target list [$target_list]" 3667d13299dSbellardecho "" 367c9ec1fe4Sbellardecho "kqemu kernel acceleration support:" 368c9ec1fe4Sbellardecho " --disable-kqemu disable kqemu build" 369c9ec1fe4Sbellardecho " --kernel-path=PATH set the kernel path (configure probes it)" 370c9ec1fe4Sbellardecho "" 3717d13299dSbellardecho "Advanced options (experts only):" 3727d13299dSbellardecho " --source-path=PATH path of source code [$source_path]" 3737d13299dSbellardecho " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]" 3747d13299dSbellardecho " --cc=CC use C compiler CC [$cc]" 3752efc3265Sbellardecho " --host-cc=CC use C compiler CC [$host_cc] for dyngen etc." 3767d13299dSbellardecho " --make=MAKE use specified make [$make]" 37743ce4dfeSbellardecho " --static enable static build [$static]" 378*8147cfcaSbellardecho " --enable-cocoa enable COCOA (Mac OS X only)" 37967b915a5Sbellardecho " --enable-mingw32 enable Win32 cross compilation with mingw32" 380d37282adSbellardecho " --enable-adlib enable Adlib emulation" 3811d14ffa9Sbellardecho " --enable-coreaudio enable Coreaudio audio driver" 3821d14ffa9Sbellardecho " --enable-alsa enable ALSA audio driver" 3831d14ffa9Sbellardecho " --enable-fmod enable FMOD audio driver" 3841d14ffa9Sbellardecho " --enabled-dsound enable DirectSound audio driver" 385102a52e4Sbellardecho " --fmod-lib path to FMOD library" 386102a52e4Sbellardecho " --fmod-inc path to FMOD includes" 3877d13299dSbellardecho "" 3887d13299dSbellardecho "NOTE: The object files are build at the place where configure is launched" 3897d13299dSbellardexit 1 3907d13299dSbellardfi 3917d13299dSbellard 39211d9f695Sbellardif test "$mingw32" = "yes" ; then 39311d9f695Sbellardif test -z "$prefix" ; then 39411d9f695Sbellard prefix="/c/Program Files/Qemu" 39511d9f695Sbellardfi 39611d9f695Sbellardmandir="$prefix" 3977efa4387Sbellarddatadir="$prefix" 3981f50f8d1Sbellarddocdir="$prefix" 39911d9f695Sbellardbindir="$prefix" 40011d9f695Sbellardelse 40111d9f695Sbellardif test -z "$prefix" ; then 40211d9f695Sbellard prefix="/usr/local" 40311d9f695Sbellardfi 4045a67135aSbellardmandir="$prefix/share/man" 4057efa4387Sbellarddatadir="$prefix/share/qemu" 4061f50f8d1Sbellarddocdir="$prefix/share/doc/qemu" 40711d9f695Sbellardbindir="$prefix/bin" 40811d9f695Sbellardfi 4095a67135aSbellard 41007f4ddbfSbellard# kqemu support 411c9ec1fe4Sbellardif test $kqemu = "yes" ; then 412441c72baSbellard # test if the source code is installed 413441c72baSbellard if test '!' -f "kqemu/Makefile" ; then 414441c72baSbellard kqemu="no" 415441c72baSbellard fi 416441c72baSbellardfi 417441c72baSbellard 41807f4ddbfSbellard# Linux specific kqemu configuration 41907f4ddbfSbellardif test $kqemu = "yes" -a $linux = "yes" ; then 420c9ec1fe4Sbellard# find the kernel path 421c9ec1fe4Sbellardif test -z "$kernel_path" ; then 422c9ec1fe4Sbellardkernel_version=`uname -r` 423c9ec1fe4Sbellardkernel_path="/lib/modules/$kernel_version/build" 424c9ec1fe4Sbellardif test '!' -d "$kernel_path/include" ; then 425c9ec1fe4Sbellard kernel_path="/usr/src/linux" 426c9ec1fe4Sbellard if test '!' -d "$kernel_path/include" ; then 427c9ec1fe4Sbellard echo "Could not find kernel includes in /lib/modules or /usr/src/linux - cannot build the kqemu module" 428c9ec1fe4Sbellard kqemu="no" 429c9ec1fe4Sbellard fi 430c9ec1fe4Sbellardfi 431c9ec1fe4Sbellardfi 432c9ec1fe4Sbellard 433c9ec1fe4Sbellardif test $kqemu = "yes" ; then 434c9ec1fe4Sbellard 435c9ec1fe4Sbellard# test that the kernel config is present 436c9ec1fe4Sbellardif test '!' -f "$kernel_path/Makefile" ; then 437f94daeddSbellard echo "No Makefile file present in $kernel_path - kqemu cannot be built" 438c9ec1fe4Sbellard kqemu="no" 439c9ec1fe4Sbellardfi 440c9ec1fe4Sbellard 441c9ec1fe4Sbellard# find build system (2.6 or legacy) 442c9ec1fe4Sbellardkbuild26="yes" 443c9ec1fe4Sbellardif grep -q "PATCHLEVEL = 4" $kernel_path/Makefile ; then 444c9ec1fe4Sbellardkbuild26="no" 445c9ec1fe4Sbellardfi 446c9ec1fe4Sbellard 447c9ec1fe4Sbellardfi # kqemu 448c9ec1fe4Sbellard 44907f4ddbfSbellardfi # kqemu and linux 450c9ec1fe4Sbellard 451c9ec1fe4Sbellard 4527d13299dSbellardecho "Install prefix $prefix" 4537efa4387Sbellardecho "BIOS directory $datadir" 45411d9f695Sbellardecho "binary directory $bindir" 45511d9f695Sbellardif test "$mingw32" = "no" ; then 45611d9f695Sbellardecho "Manual directory $mandir" 45743ce4dfeSbellardecho "ELF interp prefix $interp_prefix" 45811d9f695Sbellardfi 4595a67135aSbellardecho "Source path $source_path" 4607d13299dSbellardecho "C compiler $cc" 46183469015Sbellardecho "Host C compiler $host_cc" 4627d13299dSbellardecho "make $make" 463a98fd896Sbellardecho "host CPU $cpu" 464de83cd02Sbellardecho "host big endian $bigendian" 46597a847bcSbellardecho "target list $target_list" 4667d13299dSbellardecho "gprof enabled $gprof" 46743ce4dfeSbellardecho "static build $static" 4685b0753e0Sbellardif test "$darwin" = "yes" ; then 4695b0753e0Sbellard echo "Cocoa support $cocoa" 4705b0753e0Sbellardfi 47197a847bcSbellardecho "SDL support $sdl" 472e4afee97Sbellardif test "$sdl" != "no" ; then 4737c1f25b4Sbellard echo "SDL static link $sdl_static" 474e4afee97Sbellardfi 47567b915a5Sbellardecho "mingw32 support $mingw32" 476fb065187Sbellardecho "Adlib support $adlib" 4771d14ffa9Sbellardecho "CoreAudio support $coreaudio" 4781d14ffa9Sbellardecho "ALSA support $alsa" 4791d14ffa9Sbellardecho "DSound support $dsound" 480102a52e4Sbellardecho -n "FMOD support $fmod" 4811d14ffa9Sbellardif test "$fmod" = "yes"; then 4821d14ffa9Sbellard if test -z $fmod_lib || test -z $fmod_inc; then 4831d14ffa9Sbellard echo 4841d14ffa9Sbellard echo "Error: You must specify path to FMOD library and headers" 4851d14ffa9Sbellard echo "Example: --fmod-inc=/path/include/fmod --fmod-lib=/path/lib/libfmod-3.74.so" 4861d14ffa9Sbellard echo 4871d14ffa9Sbellard exit 1 4881d14ffa9Sbellard fi 489102a52e4Sbellard echo -n " (lib='$fmod_lib' include='$fmod_inc')" 490102a52e4Sbellardfi 491102a52e4Sbellardecho "" 49207f4ddbfSbellardecho "kqemu support $kqemu" 49307f4ddbfSbellardif test $kqemu = "yes" -a $linux = "yes" ; then 494c9ec1fe4Sbellardecho "" 49507f4ddbfSbellardecho "KQEMU Linux module configuration:" 496c9ec1fe4Sbellardecho "kernel sources $kernel_path" 497c9ec1fe4Sbellardecho -n "kbuild type " 498c9ec1fe4Sbellardif test $kbuild26 = "yes"; then 499c9ec1fe4Sbellardecho "2.6" 500c9ec1fe4Sbellardelse 501c9ec1fe4Sbellardecho "2.4" 502c9ec1fe4Sbellardfi 503c9ec1fe4Sbellardfi 50467b915a5Sbellard 50597a847bcSbellardif test $sdl_too_old = "yes"; then 50624b55b96Sbellardecho "-> Your SDL version is too old - please upgrade to have SDL support" 507e8cd23deSbellardfi 50824b55b96Sbellard#if test "$sdl_static" = "no"; then 50924b55b96Sbellard# echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output" 51024b55b96Sbellard#fi 51197a847bcSbellard 51297a847bcSbellardconfig_mak="config-host.mak" 51397a847bcSbellardconfig_h="config-host.h" 51497a847bcSbellard 5157c1f25b4Sbellard#echo "Creating $config_mak and $config_h" 51697a847bcSbellard 51797a847bcSbellardecho "# Automatically generated by configure - do not modify" > $config_mak 51897a847bcSbellardecho "/* Automatically generated by configure - do not modify */" > $config_h 51997a847bcSbellard 52097a847bcSbellardecho "prefix=$prefix" >> $config_mak 52111d9f695Sbellardecho "bindir=$bindir" >> $config_mak 5225a67135aSbellardecho "mandir=$mandir" >> $config_mak 5237efa4387Sbellardecho "datadir=$datadir" >> $config_mak 5241f50f8d1Sbellardecho "docdir=$docdir" >> $config_mak 5257efa4387Sbellardecho "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h 52697a847bcSbellardecho "MAKE=$make" >> $config_mak 52797a847bcSbellardecho "CC=$cc" >> $config_mak 52897a847bcSbellardif test "$have_gcc3_options" = "yes" ; then 52997a847bcSbellard echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak 53097a847bcSbellardfi 53197a847bcSbellardecho "HOST_CC=$host_cc" >> $config_mak 53297a847bcSbellardecho "AR=$ar" >> $config_mak 53397a847bcSbellardecho "STRIP=$strip -s -R .comment -R .note" >> $config_mak 53497a847bcSbellardecho "CFLAGS=$CFLAGS" >> $config_mak 53597a847bcSbellardecho "LDFLAGS=$LDFLAGS" >> $config_mak 53667b915a5Sbellardecho "EXESUF=$EXESUF" >> $config_mak 53797a847bcSbellardif test "$cpu" = "i386" ; then 53897a847bcSbellard echo "ARCH=i386" >> $config_mak 53997a847bcSbellard echo "#define HOST_I386 1" >> $config_h 5400b0babc6Sbellardelif test "$cpu" = "x86_64" ; then 5410b0babc6Sbellard echo "ARCH=x86_64" >> $config_mak 5420b0babc6Sbellard echo "#define HOST_X86_64 1" >> $config_h 543808c4954Sbellardelif test "$cpu" = "armv4b" ; then 544808c4954Sbellard echo "ARCH=arm" >> $config_mak 545808c4954Sbellard echo "#define HOST_ARM 1" >> $config_h 5467d13299dSbellardelif test "$cpu" = "armv4l" ; then 54797a847bcSbellard echo "ARCH=arm" >> $config_mak 54897a847bcSbellard echo "#define HOST_ARM 1" >> $config_h 5497d13299dSbellardelif test "$cpu" = "powerpc" ; then 55097a847bcSbellard echo "ARCH=ppc" >> $config_mak 55197a847bcSbellard echo "#define HOST_PPC 1" >> $config_h 5527d13299dSbellardelif test "$cpu" = "mips" ; then 55397a847bcSbellard echo "ARCH=mips" >> $config_mak 55497a847bcSbellard echo "#define HOST_MIPS 1" >> $config_h 555fb3e5849Sbellardelif test "$cpu" = "s390" ; then 55697a847bcSbellard echo "ARCH=s390" >> $config_mak 55797a847bcSbellard echo "#define HOST_S390 1" >> $config_h 558295defa5Sbellardelif test "$cpu" = "alpha" ; then 55997a847bcSbellard echo "ARCH=alpha" >> $config_mak 56097a847bcSbellard echo "#define HOST_ALPHA 1" >> $config_h 561ae228531Sbellardelif test "$cpu" = "sparc" ; then 56297a847bcSbellard echo "ARCH=sparc" >> $config_mak 56397a847bcSbellard echo "#define HOST_SPARC 1" >> $config_h 564ae228531Sbellardelif test "$cpu" = "sparc64" ; then 56597a847bcSbellard echo "ARCH=sparc64" >> $config_mak 56697a847bcSbellard echo "#define HOST_SPARC64 1" >> $config_h 567a8baa8c5Sbellardelif test "$cpu" = "ia64" ; then 56897a847bcSbellard echo "ARCH=ia64" >> $config_mak 56997a847bcSbellard echo "#define HOST_IA64 1" >> $config_h 57038e584a0Sbellardelif test "$cpu" = "m68k" ; then 57138ca2abcSbellard echo "ARCH=m68k" >> $config_mak 57238ca2abcSbellard echo "#define HOST_M68K 1" >> $config_h 5737d13299dSbellardelse 5747d13299dSbellard echo "Unsupported CPU" 5757d13299dSbellard exit 1 5767d13299dSbellardfi 5777d13299dSbellardif test "$bigendian" = "yes" ; then 57897a847bcSbellard echo "WORDS_BIGENDIAN=yes" >> $config_mak 57997a847bcSbellard echo "#define WORDS_BIGENDIAN 1" >> $config_h 58097a847bcSbellardfi 581b6853697Sbellardecho "#define HOST_LONG_BITS $hostlongbits" >> $config_h 58267b915a5Sbellardif test "$mingw32" = "yes" ; then 58367b915a5Sbellard echo "CONFIG_WIN32=yes" >> $config_mak 58411d9f695Sbellard echo "#define CONFIG_WIN32 1" >> $config_h 5857d3505c5Sbellardelif test -f "/usr/include/byteswap.h" ; then 58697a847bcSbellard echo "#define HAVE_BYTESWAP_H 1" >> $config_h 58767b915a5Sbellardfi 58883fb7adfSbellardif test "$darwin" = "yes" ; then 58983fb7adfSbellard echo "CONFIG_DARWIN=yes" >> $config_mak 59083fb7adfSbellard echo "#define CONFIG_DARWIN 1" >> $config_h 59183fb7adfSbellardfi 59267b915a5Sbellardif test "$gdbstub" = "yes" ; then 59367b915a5Sbellard echo "CONFIG_GDBSTUB=yes" >> $config_mak 59467b915a5Sbellard echo "#define CONFIG_GDBSTUB 1" >> $config_h 59567b915a5Sbellardfi 59697a847bcSbellardif test "$gprof" = "yes" ; then 59797a847bcSbellard echo "TARGET_GPROF=yes" >> $config_mak 59897a847bcSbellard echo "#define HAVE_GPROF 1" >> $config_h 59997a847bcSbellardfi 60097a847bcSbellardif test "$static" = "yes" ; then 60197a847bcSbellard echo "CONFIG_STATIC=yes" >> $config_mak 60250863472Sbellard echo "#define CONFIG_STATIC 1" >> $config_h 60397a847bcSbellardfi 604c20709aaSbellardif test "$slirp" = "yes" ; then 605c20709aaSbellard echo "CONFIG_SLIRP=yes" >> $config_mak 606c20709aaSbellard echo "#define CONFIG_SLIRP 1" >> $config_h 607c20709aaSbellardfi 608fb065187Sbellardif test "$adlib" = "yes" ; then 609fb065187Sbellard echo "CONFIG_ADLIB=yes" >> $config_mak 610fb065187Sbellard echo "#define CONFIG_ADLIB 1" >> $config_h 611fb065187Sbellardfi 612fb065187Sbellardif test "$oss" = "yes" ; then 613fb065187Sbellard echo "CONFIG_OSS=yes" >> $config_mak 614fb065187Sbellard echo "#define CONFIG_OSS 1" >> $config_h 615fb065187Sbellardfi 6161d14ffa9Sbellardif test "$coreaudio" = "yes" ; then 6171d14ffa9Sbellard echo "CONFIG_COREAUDIO=yes" >> $config_mak 6181d14ffa9Sbellard echo "#define CONFIG_COREAUDIO 1" >> $config_h 6191d14ffa9Sbellardfi 6201d14ffa9Sbellardif test "$alsa" = "yes" ; then 6211d14ffa9Sbellard echo "CONFIG_ALSA=yes" >> $config_mak 6221d14ffa9Sbellard echo "#define CONFIG_ALSA 1" >> $config_h 6231d14ffa9Sbellardfi 6241d14ffa9Sbellardif test "$dsound" = "yes" ; then 6251d14ffa9Sbellard echo "CONFIG_DSOUND=yes" >> $config_mak 6261d14ffa9Sbellard echo "#define CONFIG_DSOUND 1" >> $config_h 6271d14ffa9Sbellardfi 628102a52e4Sbellardif test "$fmod" = "yes" ; then 629102a52e4Sbellard echo "CONFIG_FMOD=yes" >> $config_mak 630102a52e4Sbellard echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak 631102a52e4Sbellard echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak 632102a52e4Sbellard echo "#define CONFIG_FMOD 1" >> $config_h 633102a52e4Sbellardfi 63497a847bcSbellardecho -n "VERSION=" >>$config_mak 63597a847bcSbellardhead $source_path/VERSION >>$config_mak 63697a847bcSbellardecho "" >>$config_mak 63797a847bcSbellardecho -n "#define QEMU_VERSION \"" >> $config_h 63897a847bcSbellardhead $source_path/VERSION >> $config_h 63997a847bcSbellardecho "\"" >> $config_h 64097a847bcSbellard 641c9ec1fe4Sbellardif test $kqemu = "yes" ; then 642c9ec1fe4Sbellard echo "CONFIG_KQEMU=yes" >> $config_mak 6431026f133Sbellard if test $linux = "yes" ; then 644c9ec1fe4Sbellard echo "KERNEL_PATH=$kernel_path" >> $config_mak 645c9ec1fe4Sbellard if test $kbuild26 = "yes" ; then 646c9ec1fe4Sbellard echo "CONFIG_KBUILD26=yes" >> $config_mak 647c9ec1fe4Sbellard fi 648c9ec1fe4Sbellard fi 6491026f133Sbellardfi 65097a847bcSbellardecho "SRC_PATH=$source_path" >> $config_mak 65197a847bcSbellardecho "TARGET_DIRS=$target_list" >> $config_mak 65297a847bcSbellard 65383fb7adfSbellard# XXX: suppress that 6547d3505c5Sbellardif [ "$bsd" = "yes" ] ; then 65543003046Sbellard echo "#define O_LARGEFILE 0" >> $config_h 65643003046Sbellard echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h 6577d3505c5Sbellard echo "#define _BSD 1" >> $config_h 6587d3505c5Sbellardfi 6597d3505c5Sbellard 66097a847bcSbellardfor target in $target_list; do 66197a847bcSbellard 66297a847bcSbellardtarget_dir="$target" 66397a847bcSbellardconfig_mak=$target_dir/config.mak 66497a847bcSbellardconfig_h=$target_dir/config.h 66597a847bcSbellardtarget_cpu=`echo $target | cut -d '-' -f 1` 66697a847bcSbellardtarget_bigendian="no" 667808c4954Sbellard[ "$target_cpu" = "armeb" ] && target_bigendian=yes 6681e43adfcSbellard[ "$target_cpu" = "sparc" ] && target_bigendian=yes 66964b3ab24Sbellard[ "$target_cpu" = "sparc64" ] && target_bigendian=yes 67067867308Sbellard[ "$target_cpu" = "ppc" ] && target_bigendian=yes 671a2458627Sbellard[ "$target_cpu" = "ppc64" ] && target_bigendian=yes 672d3258560Sbellard[ "$target_cpu" = "mips" ] && target_bigendian=yes 67397a847bcSbellardtarget_softmmu="no" 67497a847bcSbellardif expr $target : '.*-softmmu' > /dev/null ; then 67597a847bcSbellard target_softmmu="yes" 6767d13299dSbellardfi 677997344f3Sbellardtarget_user_only="no" 678997344f3Sbellardif expr $target : '.*-user' > /dev/null ; then 679997344f3Sbellard target_user_only="yes" 680997344f3Sbellardfi 681de83cd02Sbellard 68297ccc689Sbellardif test "$target_user_only" = "no" -a "$check_gfx" = "yes" \ 68397ccc689Sbellard -a "$sdl" = "no" -a "$cocoa" = "no" ; then 68497ccc689Sbellard echo "ERROR: QEMU requires SDL or Cocoa for graphical output" 68597ccc689Sbellard echo "To build QEMU with graphical output configure with --disable-gfx-check" 68697ccc689Sbellard echo "Note that this will disable all output from the virtual graphics card." 68797ccc689Sbellard exit 1; 68897ccc689Sbellardfi 68997ccc689Sbellard 6907c1f25b4Sbellard#echo "Creating $config_mak, $config_h and $target_dir/Makefile" 69197a847bcSbellard 69297a847bcSbellardmkdir -p $target_dir 693158142c2Sbellardmkdir -p $target_dir/fpu 694808c4954Sbellardif test "$target" = "arm-user" -o "$target" = "armeb-user" ; then 69569de927cSbellard mkdir -p $target_dir/nwfpe 69669de927cSbellardfi 697a7e61ed4Sbellardif test "$target_user_only" = "no" ; then 698a7e61ed4Sbellard mkdir -p $target_dir/slirp 699a7e61ed4Sbellardfi 70069de927cSbellard 70197a847bcSbellardln -sf $source_path/Makefile.target $target_dir/Makefile 70297a847bcSbellard 70397a847bcSbellardecho "# Automatically generated by configure - do not modify" > $config_mak 70497a847bcSbellardecho "/* Automatically generated by configure - do not modify */" > $config_h 70597a847bcSbellard 70697a847bcSbellard 70797a847bcSbellardecho "include ../config-host.mak" >> $config_mak 70897a847bcSbellardecho "#include \"../config-host.h\"" >> $config_h 7091e43adfcSbellard 7101e43adfcSbellardinterp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"` 7111e43adfcSbellardecho "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h 71297a847bcSbellard 71397a847bcSbellardif test "$target_cpu" = "i386" ; then 71497a847bcSbellard echo "TARGET_ARCH=i386" >> $config_mak 71597a847bcSbellard echo "#define TARGET_ARCH \"i386\"" >> $config_h 71697a847bcSbellard echo "#define TARGET_I386 1" >> $config_h 71707f4ddbfSbellard if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "i386" ; then 718824d560fSbellard echo "#define USE_KQEMU 1" >> $config_h 719824d560fSbellard fi 720808c4954Sbellardelif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then 72197a847bcSbellard echo "TARGET_ARCH=arm" >> $config_mak 72297a847bcSbellard echo "#define TARGET_ARCH \"arm\"" >> $config_h 72397a847bcSbellard echo "#define TARGET_ARM 1" >> $config_h 7241e43adfcSbellardelif test "$target_cpu" = "sparc" ; then 7251e43adfcSbellard echo "TARGET_ARCH=sparc" >> $config_mak 7261e43adfcSbellard echo "#define TARGET_ARCH \"sparc\"" >> $config_h 7271e43adfcSbellard echo "#define TARGET_SPARC 1" >> $config_h 72864b3ab24Sbellardelif test "$target_cpu" = "sparc64" ; then 72964b3ab24Sbellard echo "TARGET_ARCH=sparc64" >> $config_mak 73064b3ab24Sbellard echo "#define TARGET_ARCH \"sparc64\"" >> $config_h 73164b3ab24Sbellard echo "#define TARGET_SPARC 1" >> $config_h 73264b3ab24Sbellard echo "#define TARGET_SPARC64 1" >> $config_h 73367867308Sbellardelif test "$target_cpu" = "ppc" ; then 73467867308Sbellard echo "TARGET_ARCH=ppc" >> $config_mak 73567867308Sbellard echo "#define TARGET_ARCH \"ppc\"" >> $config_h 73667867308Sbellard echo "#define TARGET_PPC 1" >> $config_h 737a2458627Sbellardelif test "$target_cpu" = "ppc64" ; then 738a2458627Sbellard echo "TARGET_ARCH=ppc64" >> $config_mak 739a2458627Sbellard echo "#define TARGET_ARCH \"ppc64\"" >> $config_h 740a2458627Sbellard echo "#define TARGET_PPC 1" >> $config_h 741a2458627Sbellard echo "#define TARGET_PPC64 1" >> $config_h 7420b0babc6Sbellardelif test "$target_cpu" = "x86_64" ; then 7430b0babc6Sbellard echo "TARGET_ARCH=x86_64" >> $config_mak 7440b0babc6Sbellard echo "#define TARGET_ARCH \"x86_64\"" >> $config_h 7450b0babc6Sbellard echo "#define TARGET_I386 1" >> $config_h 7460b0babc6Sbellard echo "#define TARGET_X86_64 1" >> $config_h 74707f4ddbfSbellard if test $kqemu = "yes" -a "$target_softmmu" = "yes" -a $cpu = "x86_64" ; then 74807f4ddbfSbellard echo "#define USE_KQEMU 1" >> $config_h 74907f4ddbfSbellard fi 750c20eb473Sbellardelif test "$target_cpu" = "mips" -o "$target_cpu" = "mipsel" ; then 751d3258560Sbellard echo "TARGET_ARCH=mips" >> $config_mak 752d3258560Sbellard echo "#define TARGET_ARCH \"mips\"" >> $config_h 753d3258560Sbellard echo "#define TARGET_MIPS 1" >> $config_h 754de83cd02Sbellardelse 755de83cd02Sbellard echo "Unsupported target CPU" 756de83cd02Sbellard exit 1 757de83cd02Sbellardfi 758de83cd02Sbellardif test "$target_bigendian" = "yes" ; then 75997a847bcSbellard echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak 76097a847bcSbellard echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h 76197a847bcSbellardfi 76297a847bcSbellardif test "$target_softmmu" = "yes" ; then 76397a847bcSbellard echo "CONFIG_SOFTMMU=yes" >> $config_mak 76497a847bcSbellard echo "#define CONFIG_SOFTMMU 1" >> $config_h 765de83cd02Sbellardfi 766997344f3Sbellardif test "$target_user_only" = "yes" ; then 767997344f3Sbellard echo "CONFIG_USER_ONLY=yes" >> $config_mak 768997344f3Sbellard echo "#define CONFIG_USER_ONLY 1" >> $config_h 769997344f3Sbellardfi 770de83cd02Sbellard 771158142c2Sbellardif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then 772158142c2Sbellard echo "CONFIG_SOFTFLOAT=yes" >> $config_mak 773158142c2Sbellard echo "#define CONFIG_SOFTFLOAT 1" >> $config_h 774158142c2Sbellardfi 7757c1f25b4Sbellard# sdl defines 7767c1f25b4Sbellard 7777c1f25b4Sbellardif test "$target_user_only" = "no"; then 7787c1f25b4Sbellard if test "$target_softmmu" = "no" -o "$static" = "yes"; then 779dbb2c921Sbellard sdl1=$sdl_static 7807c1f25b4Sbellard else 781dbb2c921Sbellard sdl1=$sdl 782dbb2c921Sbellard fi 783dbb2c921Sbellard if test "$sdl1" = "yes" ; then 7847c1f25b4Sbellard echo "#define CONFIG_SDL 1" >> $config_h 7857c1f25b4Sbellard echo "CONFIG_SDL=yes" >> $config_mak 786dbb2c921Sbellard if test "$target_softmmu" = "no" -o "$static" = "yes"; then 787dbb2c921Sbellard echo "SDL_LIBS=$sdl_static_libs" >> $config_mak 788dbb2c921Sbellard else 7897c1f25b4Sbellard echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak 7907c1f25b4Sbellard fi 7917c1f25b4Sbellard echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak 7927c1f25b4Sbellard if [ "${aa}" = "yes" ] ; then 7937c1f25b4Sbellard echo -n " `aalib-config --cflags`" >> $config_mak ; 7947c1f25b4Sbellard fi 7957c1f25b4Sbellard echo "" >> $config_mak 7967c1f25b4Sbellard fi 797dbb2c921Sbellardfi 7987c1f25b4Sbellard 7995b0753e0Sbellardif test "$cocoa" = "yes" ; then 8005b0753e0Sbellard echo "#define CONFIG_COCOA 1" >> $config_h 8015b0753e0Sbellard echo "CONFIG_COCOA=yes" >> $config_mak 8025b0753e0Sbellardfi 8035b0753e0Sbellard 80497a847bcSbellarddone # for target in $targets 8057d13299dSbellard 8067d13299dSbellard# build tree in object directory if source path is different from current one 8077d13299dSbellardif test "$source_path_used" = "yes" ; then 8087d13299dSbellard DIRS="tests" 8097d13299dSbellard FILES="Makefile tests/Makefile" 8107d13299dSbellard for dir in $DIRS ; do 8117d13299dSbellard mkdir -p $dir 8127d13299dSbellard done 8137d13299dSbellard for f in $FILES ; do 8147d13299dSbellard ln -sf $source_path/$f $f 8157d13299dSbellard done 8167d13299dSbellardfi 8177d13299dSbellard 81897a847bcSbellardrm -f $TMPO $TMPC $TMPE $TMPS 819