]> git.proxmox.com Git - qemu.git/blame_incremental - configure
new bochs BIOS - 16 bit APM support (initial patch by Struan Bartlett)
[qemu.git] / configure
... / ...
CommitLineData
1#!/bin/sh
2#
3# qemu configure script (c) 2003 Fabrice Bellard
4#
5# set temporary file name
6if test ! -z "$TMPDIR" ; then
7 TMPDIR1="${TMPDIR}"
8elif test ! -z "$TEMPDIR" ; then
9 TMPDIR1="${TEMPDIR}"
10else
11 TMPDIR1="/tmp"
12fi
13
14TMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c"
15TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o"
16TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}"
17TMPS="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.S"
18
19# default parameters
20prefix=""
21interp_prefix="/usr/gnemul/qemu-%M"
22static="no"
23cross_prefix=""
24cc="gcc"
25host_cc="gcc"
26ar="ar"
27make="make"
28strip="strip"
29cpu=`uname -m`
30target_list=""
31case "$cpu" in
32 i386|i486|i586|i686|i86pc|BePC)
33 cpu="i386"
34 ;;
35 armv*b)
36 cpu="armv4b"
37 ;;
38 armv*l)
39 cpu="armv4l"
40 ;;
41 alpha)
42 cpu="alpha"
43 ;;
44 "Power Macintosh"|ppc|ppc64)
45 cpu="powerpc"
46 ;;
47 mips)
48 cpu="mips"
49 ;;
50 s390)
51 cpu="s390"
52 ;;
53 sparc)
54 cpu="sparc"
55 ;;
56 sparc64)
57 cpu="sparc64"
58 ;;
59 ia64)
60 cpu="ia64"
61 ;;
62 m68k)
63 cpu="m68k"
64 ;;
65 x86_64|amd64)
66 cpu="x86_64"
67 ;;
68 *)
69 cpu="unknown"
70 ;;
71esac
72gprof="no"
73bigendian="no"
74mingw32="no"
75EXESUF=""
76gdbstub="yes"
77slirp="yes"
78adlib="no"
79oss="no"
80fmod="no"
81fmod_lib=""
82fmod_inc=""
83linux="no"
84kqemu="no"
85kernel_path=""
86cocoa="no"
87
88# OS specific
89targetos=`uname -s`
90case $targetos in
91MINGW32*)
92mingw32="yes"
93;;
94FreeBSD)
95bsd="yes"
96oss="yes"
97;;
98NetBSD)
99bsd="yes"
100oss="yes"
101;;
102OpenBSD)
103bsd="yes"
104oss="yes"
105;;
106Darwin)
107bsd="yes"
108darwin="yes"
109;;
110*)
111oss="yes"
112linux="yes"
113if [ "$cpu" = "i386" ] ; then
114 kqemu="yes"
115fi
116;;
117esac
118
119if [ "$bsd" = "yes" ] ; then
120 if [ ! "$darwin" = "yes" ] ; then
121 make="gmake"
122 fi
123fi
124
125# find source path
126# XXX: we assume an absolute path is given when launching configure,
127# except in './configure' case.
128source_path=${0%configure}
129source_path=${source_path%/}
130source_path_used="yes"
131if test -z "$source_path" -o "$source_path" = "." ; then
132 source_path=`pwd`
133 source_path_used="no"
134fi
135
136for opt do
137 case "$opt" in
138 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
139 ;;
140 --interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2`
141 ;;
142 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
143 ;;
144 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
145 ;;
146 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
147 ;;
148 --make=*) make=`echo $opt | cut -d '=' -f 2`
149 ;;
150 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
151 ;;
152 --extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}"
153 ;;
154 --extra-libs=*) extralibs=${opt#--extra-libs=}
155 ;;
156 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
157 ;;
158 --target-list=*) target_list=${opt#--target-list=}
159 ;;
160 --enable-gprof) gprof="yes"
161 ;;
162 --static) static="yes"
163 ;;
164 --disable-sdl) sdl="no"
165 ;;
166 --enable-fmod) fmod="yes"
167 ;;
168 --fmod-lib=*) fmod_lib=${opt#--fmod-lib=}
169 ;;
170 --fmod-inc=*) fmod_inc=${opt#--fmod-inc=}
171 ;;
172 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"
173 ;;
174 --disable-slirp) slirp="no"
175 ;;
176 --enable-adlib) adlib="yes"
177 ;;
178 --disable-kqemu) kqemu="no"
179 ;;
180 --kernel-path=*) kernel_path=${opt#--kernel-path=}
181 ;;
182 --enable-cocoa) cocoa="yes" ; sdl="no"
183 ;;
184 esac
185done
186
187# Checking for CFLAGS
188if test -z "$CFLAGS"; then
189 CFLAGS="-O2"
190fi
191
192cc="${cross_prefix}${cc}"
193ar="${cross_prefix}${ar}"
194strip="${cross_prefix}${strip}"
195
196if test "$mingw32" = "yes" ; then
197 linux="no"
198 EXESUF=".exe"
199 gdbstub="no"
200 oss="no"
201 kqemu="no"
202fi
203
204if test -z "$target_list" ; then
205# these targets are portable
206 target_list="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu"
207# the following are Linux specific
208 if [ "$linux" = "yes" ] ; then
209 target_list="i386-user arm-user armeb-user sparc-user ppc-user $target_list"
210 fi
211fi
212
213if test -z "$cross_prefix" ; then
214
215# ---
216# big/little endian test
217cat > $TMPC << EOF
218#include <inttypes.h>
219int main(int argc, char ** argv){
220 volatile uint32_t i=0x01234567;
221 return (*((uint8_t*)(&i))) == 0x67;
222}
223EOF
224
225if $cc -o $TMPE $TMPC 2>/dev/null ; then
226$TMPE && bigendian="yes"
227else
228echo big/little test failed
229fi
230
231else
232
233# if cross compiling, cannot launch a program, so make a static guess
234if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k" -o "$cpu" = "armv4b"; then
235 bigendian="yes"
236fi
237
238fi
239
240# check gcc options support
241cat > $TMPC <<EOF
242int main(void) {
243}
244EOF
245
246have_gcc3_options="no"
247if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then
248 have_gcc3_options="yes"
249fi
250
251##########################################
252# SDL probe
253
254sdl_too_old=no
255
256if test -z "$sdl" ; then
257
258sdl_config="sdl-config"
259sdl=no
260sdl_static=no
261
262if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
263# win32 cross compilation case
264 sdl_config="i386-mingw32msvc-sdl-config"
265 sdl=yes
266else
267# normal SDL probe
268cat > $TMPC << EOF
269#include <SDL.h>
270#undef main /* We don't want SDL to override our main() */
271int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
272EOF
273
274if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then
275_sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
276if test "$_sdlversion" -lt 121 ; then
277sdl_too_old=yes
278else
279sdl=yes
280fi
281
282# static link with sdl ?
283if test "$sdl" = "yes" ; then
284aa="no"
285`$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes"
286sdl_static_libs=`$sdl_config --static-libs`
287if [ "$aa" = "yes" ] ; then
288 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
289fi
290
291if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
292 sdl_static=yes
293fi
294
295fi # static link
296
297fi # sdl compile test
298
299fi # cross compilation
300fi # -z $sdl
301
302if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
303cat << EOF
304
305Usage: configure [options]
306Options: [defaults in brackets after descriptions]
307
308EOF
309echo "Standard options:"
310echo " --help print this message"
311echo " --prefix=PREFIX install in PREFIX [$prefix]"
312echo " --interp-prefix=PREFIX where to find shared libraries, etc."
313echo " use %M for cpu name [$interp_prefix]"
314echo " --target-list=LIST set target list [$target_list]"
315echo ""
316echo "kqemu kernel acceleration support:"
317echo " --disable-kqemu disable kqemu build"
318echo " --kernel-path=PATH set the kernel path (configure probes it)"
319echo ""
320echo "Advanced options (experts only):"
321echo " --source-path=PATH path of source code [$source_path]"
322echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
323echo " --cc=CC use C compiler CC [$cc]"
324echo " --make=MAKE use specified make [$make]"
325echo " --static enable static build [$static]"
326echo " --enable-mingw32 enable Win32 cross compilation with mingw32"
327echo " --enable-fmod enable FMOD audio output driver"
328echo " --fmod-lib path to FMOD library"
329echo " --fmod-inc path to FMOD includes"
330echo ""
331echo "NOTE: The object files are build at the place where configure is launched"
332exit 1
333fi
334
335if test "$mingw32" = "yes" ; then
336if test -z "$prefix" ; then
337 prefix="/c/Program Files/Qemu"
338fi
339mandir="$prefix"
340datadir="$prefix"
341docdir="$prefix"
342bindir="$prefix"
343else
344if test -z "$prefix" ; then
345 prefix="/usr/local"
346fi
347mandir="$prefix/share/man"
348datadir="$prefix/share/qemu"
349docdir="$prefix/share/doc/qemu"
350bindir="$prefix/bin"
351fi
352
353# kernel module support
354if test $kqemu = "yes" ; then
355 # test if the source code is installed
356 if test '!' -f "kqemu/Makefile" ; then
357 kqemu="no"
358 fi
359fi
360
361if test $kqemu = "yes" ; then
362# find the kernel path
363if test -z "$kernel_path" ; then
364kernel_version=`uname -r`
365kernel_path="/lib/modules/$kernel_version/build"
366if test '!' -d "$kernel_path/include" ; then
367 kernel_path="/usr/src/linux"
368 if test '!' -d "$kernel_path/include" ; then
369 echo "Could not find kernel includes in /lib/modules or /usr/src/linux - cannot build the kqemu module"
370 kqemu="no"
371 fi
372fi
373fi
374
375if test $kqemu = "yes" ; then
376
377# test that the kernel config is present
378if test '!' -f "$kernel_path/Makefile" ; then
379 echo "No Makefile file present in $kernel_path - kqemu cannot be built"
380 kqemu="no"
381fi
382
383# find build system (2.6 or legacy)
384kbuild26="yes"
385if grep -q "PATCHLEVEL = 4" $kernel_path/Makefile ; then
386kbuild26="no"
387fi
388
389fi # kqemu
390
391fi # kqemu
392
393
394echo "Install prefix $prefix"
395echo "BIOS directory $datadir"
396echo "binary directory $bindir"
397if test "$mingw32" = "no" ; then
398echo "Manual directory $mandir"
399echo "ELF interp prefix $interp_prefix"
400fi
401echo "Source path $source_path"
402echo "C compiler $cc"
403echo "make $make"
404echo "host CPU $cpu"
405echo "host big endian $bigendian"
406echo "target list $target_list"
407echo "gprof enabled $gprof"
408echo "static build $static"
409if test "$darwin" = "yes" ; then
410 echo "Cocoa support $cocoa"
411fi
412echo "SDL support $sdl"
413echo "SDL static link $sdl_static"
414echo "mingw32 support $mingw32"
415echo "Adlib support $adlib"
416echo -n "FMOD support $fmod"
417if test $fmod = "yes"; then
418 echo -n " (lib='$fmod_lib' include='$fmod_inc')"
419fi
420echo ""
421if test $kqemu = "yes" ; then
422echo ""
423echo "KQEMU module configuration:"
424echo "kernel sources $kernel_path"
425echo -n "kbuild type "
426if test $kbuild26 = "yes"; then
427echo "2.6"
428else
429echo "2.4"
430fi
431fi
432
433if test $sdl_too_old = "yes"; then
434echo "-> Your SDL version is too old - please upgrade to have SDL support"
435fi
436#if test "$sdl_static" = "no"; then
437# echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output"
438#fi
439
440config_mak="config-host.mak"
441config_h="config-host.h"
442
443#echo "Creating $config_mak and $config_h"
444
445echo "# Automatically generated by configure - do not modify" > $config_mak
446echo "/* Automatically generated by configure - do not modify */" > $config_h
447
448echo "prefix=$prefix" >> $config_mak
449echo "bindir=$bindir" >> $config_mak
450echo "mandir=$mandir" >> $config_mak
451echo "datadir=$datadir" >> $config_mak
452echo "docdir=$docdir" >> $config_mak
453echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h
454echo "MAKE=$make" >> $config_mak
455echo "CC=$cc" >> $config_mak
456if test "$have_gcc3_options" = "yes" ; then
457 echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
458fi
459echo "HOST_CC=$host_cc" >> $config_mak
460echo "AR=$ar" >> $config_mak
461echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
462echo "CFLAGS=$CFLAGS" >> $config_mak
463echo "LDFLAGS=$LDFLAGS" >> $config_mak
464echo "EXESUF=$EXESUF" >> $config_mak
465if test "$cpu" = "i386" ; then
466 echo "ARCH=i386" >> $config_mak
467 echo "#define HOST_I386 1" >> $config_h
468elif test "$cpu" = "x86_64" ; then
469 echo "ARCH=x86_64" >> $config_mak
470 echo "#define HOST_X86_64 1" >> $config_h
471elif test "$cpu" = "armv4b" ; then
472 echo "ARCH=arm" >> $config_mak
473 echo "#define HOST_ARM 1" >> $config_h
474elif test "$cpu" = "armv4l" ; then
475 echo "ARCH=arm" >> $config_mak
476 echo "#define HOST_ARM 1" >> $config_h
477elif test "$cpu" = "powerpc" ; then
478 echo "ARCH=ppc" >> $config_mak
479 echo "#define HOST_PPC 1" >> $config_h
480elif test "$cpu" = "mips" ; then
481 echo "ARCH=mips" >> $config_mak
482 echo "#define HOST_MIPS 1" >> $config_h
483elif test "$cpu" = "s390" ; then
484 echo "ARCH=s390" >> $config_mak
485 echo "#define HOST_S390 1" >> $config_h
486elif test "$cpu" = "alpha" ; then
487 echo "ARCH=alpha" >> $config_mak
488 echo "#define HOST_ALPHA 1" >> $config_h
489elif test "$cpu" = "sparc" ; then
490 echo "ARCH=sparc" >> $config_mak
491 echo "#define HOST_SPARC 1" >> $config_h
492elif test "$cpu" = "sparc64" ; then
493 echo "ARCH=sparc64" >> $config_mak
494 echo "#define HOST_SPARC64 1" >> $config_h
495elif test "$cpu" = "ia64" ; then
496 echo "ARCH=ia64" >> $config_mak
497 echo "#define HOST_IA64 1" >> $config_h
498elif test "$cpu" = "m68k" ; then
499 echo "ARCH=m68k" >> $config_mak
500 echo "#define HOST_M68K 1" >> $config_h
501else
502 echo "Unsupported CPU"
503 exit 1
504fi
505if test "$bigendian" = "yes" ; then
506 echo "WORDS_BIGENDIAN=yes" >> $config_mak
507 echo "#define WORDS_BIGENDIAN 1" >> $config_h
508fi
509if test "$mingw32" = "yes" ; then
510 echo "CONFIG_WIN32=yes" >> $config_mak
511 echo "#define CONFIG_WIN32 1" >> $config_h
512elif test -f "/usr/include/byteswap.h" ; then
513 echo "#define HAVE_BYTESWAP_H 1" >> $config_h
514fi
515if test "$darwin" = "yes" ; then
516 echo "CONFIG_DARWIN=yes" >> $config_mak
517 echo "#define CONFIG_DARWIN 1" >> $config_h
518fi
519if test "$gdbstub" = "yes" ; then
520 echo "CONFIG_GDBSTUB=yes" >> $config_mak
521 echo "#define CONFIG_GDBSTUB 1" >> $config_h
522fi
523if test "$gprof" = "yes" ; then
524 echo "TARGET_GPROF=yes" >> $config_mak
525 echo "#define HAVE_GPROF 1" >> $config_h
526fi
527if test "$static" = "yes" ; then
528 echo "CONFIG_STATIC=yes" >> $config_mak
529 echo "#define CONFIG_STATIC 1" >> $config_h
530fi
531if test "$slirp" = "yes" ; then
532 echo "CONFIG_SLIRP=yes" >> $config_mak
533 echo "#define CONFIG_SLIRP 1" >> $config_h
534fi
535if test "$adlib" = "yes" ; then
536 echo "CONFIG_ADLIB=yes" >> $config_mak
537 echo "#define CONFIG_ADLIB 1" >> $config_h
538fi
539if test "$oss" = "yes" ; then
540 echo "CONFIG_OSS=yes" >> $config_mak
541 echo "#define CONFIG_OSS 1" >> $config_h
542fi
543if test "$fmod" = "yes" ; then
544 echo "CONFIG_FMOD=yes" >> $config_mak
545 echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
546 echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
547 echo "#define CONFIG_FMOD 1" >> $config_h
548fi
549echo -n "VERSION=" >>$config_mak
550head $source_path/VERSION >>$config_mak
551echo "" >>$config_mak
552echo -n "#define QEMU_VERSION \"" >> $config_h
553head $source_path/VERSION >> $config_h
554echo "\"" >> $config_h
555
556if test $kqemu = "yes" ; then
557 echo "CONFIG_KQEMU=yes" >> $config_mak
558 echo "KERNEL_PATH=$kernel_path" >> $config_mak
559 if test $kbuild26 = "yes" ; then
560 echo "CONFIG_KBUILD26=yes" >> $config_mak
561 fi
562fi
563echo "SRC_PATH=$source_path" >> $config_mak
564echo "TARGET_DIRS=$target_list" >> $config_mak
565
566# XXX: suppress that
567if [ "$bsd" = "yes" ] ; then
568 echo "#define O_LARGEFILE 0" >> $config_h
569 echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
570 echo "#define _BSD 1" >> $config_h
571fi
572
573for target in $target_list; do
574
575target_dir="$target"
576config_mak=$target_dir/config.mak
577config_h=$target_dir/config.h
578target_cpu=`echo $target | cut -d '-' -f 1`
579target_bigendian="no"
580[ "$target_cpu" = "armeb" ] && target_bigendian=yes
581[ "$target_cpu" = "sparc" ] && target_bigendian=yes
582[ "$target_cpu" = "sparc64" ] && target_bigendian=yes
583[ "$target_cpu" = "ppc" ] && target_bigendian=yes
584target_softmmu="no"
585if expr $target : '.*-softmmu' > /dev/null ; then
586 target_softmmu="yes"
587fi
588target_user_only="no"
589if expr $target : '.*-user' > /dev/null ; then
590 target_user_only="yes"
591fi
592
593#echo "Creating $config_mak, $config_h and $target_dir/Makefile"
594
595mkdir -p $target_dir
596mkdir -p $target_dir/fpu
597if test "$target" = "arm-user" -o "$target" = "armeb-user" ; then
598 mkdir -p $target_dir/nwfpe
599fi
600if test "$target_user_only" = "no" ; then
601 mkdir -p $target_dir/slirp
602fi
603
604ln -sf $source_path/Makefile.target $target_dir/Makefile
605
606echo "# Automatically generated by configure - do not modify" > $config_mak
607echo "/* Automatically generated by configure - do not modify */" > $config_h
608
609
610echo "include ../config-host.mak" >> $config_mak
611echo "#include \"../config-host.h\"" >> $config_h
612
613interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
614echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
615
616if test "$target_cpu" = "i386" ; then
617 echo "TARGET_ARCH=i386" >> $config_mak
618 echo "#define TARGET_ARCH \"i386\"" >> $config_h
619 echo "#define TARGET_I386 1" >> $config_h
620 if test $kqemu = "yes" -a "$target_softmmu" = "yes" ; then
621 echo "#define USE_KQEMU 1" >> $config_h
622 fi
623elif test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then
624 echo "TARGET_ARCH=arm" >> $config_mak
625 echo "#define TARGET_ARCH \"arm\"" >> $config_h
626 echo "#define TARGET_ARM 1" >> $config_h
627elif test "$target_cpu" = "sparc" ; then
628 echo "TARGET_ARCH=sparc" >> $config_mak
629 echo "#define TARGET_ARCH \"sparc\"" >> $config_h
630 echo "#define TARGET_SPARC 1" >> $config_h
631elif test "$target_cpu" = "sparc64" ; then
632 echo "TARGET_ARCH=sparc64" >> $config_mak
633 echo "#define TARGET_ARCH \"sparc64\"" >> $config_h
634 echo "#define TARGET_SPARC 1" >> $config_h
635 echo "#define TARGET_SPARC64 1" >> $config_h
636elif test "$target_cpu" = "ppc" ; then
637 echo "TARGET_ARCH=ppc" >> $config_mak
638 echo "#define TARGET_ARCH \"ppc\"" >> $config_h
639 echo "#define TARGET_PPC 1" >> $config_h
640elif test "$target_cpu" = "x86_64" ; then
641 echo "TARGET_ARCH=x86_64" >> $config_mak
642 echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
643 echo "#define TARGET_I386 1" >> $config_h
644 echo "#define TARGET_X86_64 1" >> $config_h
645else
646 echo "Unsupported target CPU"
647 exit 1
648fi
649if test "$target_bigendian" = "yes" ; then
650 echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak
651 echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h
652fi
653if test "$target_softmmu" = "yes" ; then
654 echo "CONFIG_SOFTMMU=yes" >> $config_mak
655 echo "#define CONFIG_SOFTMMU 1" >> $config_h
656fi
657if test "$target_user_only" = "yes" ; then
658 echo "CONFIG_USER_ONLY=yes" >> $config_mak
659 echo "#define CONFIG_USER_ONLY 1" >> $config_h
660fi
661
662if test "$target_cpu" = "arm" -o "$target_cpu" = "armeb" ; then
663 echo "CONFIG_SOFTFLOAT=yes" >> $config_mak
664 echo "#define CONFIG_SOFTFLOAT 1" >> $config_h
665fi
666# sdl defines
667
668if test "$target_user_only" = "no"; then
669 if test "$target_softmmu" = "no" -o "$static" = "yes"; then
670 sdl1=$sdl_static
671 else
672 sdl1=$sdl
673 fi
674 if test "$sdl1" = "yes" ; then
675 echo "#define CONFIG_SDL 1" >> $config_h
676 echo "CONFIG_SDL=yes" >> $config_mak
677 if test "$target_softmmu" = "no" -o "$static" = "yes"; then
678 echo "SDL_LIBS=$sdl_static_libs" >> $config_mak
679 else
680 echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
681 fi
682 echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
683 if [ "${aa}" = "yes" ] ; then
684 echo -n " `aalib-config --cflags`" >> $config_mak ;
685 fi
686 echo "" >> $config_mak
687 fi
688fi
689
690if test "$cocoa" = "yes" ; then
691 echo "#define CONFIG_COCOA 1" >> $config_h
692 echo "CONFIG_COCOA=yes" >> $config_mak
693fi
694
695done # for target in $targets
696
697# build tree in object directory if source path is different from current one
698if test "$source_path_used" = "yes" ; then
699 DIRS="tests"
700 FILES="Makefile tests/Makefile"
701 for dir in $DIRS ; do
702 mkdir -p $dir
703 done
704 for f in $FILES ; do
705 ln -sf $source_path/$f $f
706 done
707fi
708
709rm -f $TMPO $TMPC $TMPE $TMPS