]> git.proxmox.com Git - mirror_qemu.git/blame - configure
SPARC merge
[mirror_qemu.git] / configure
CommitLineData
7d13299d
FB
1#!/bin/sh
2#
3ef693a0 3# qemu configure script (c) 2003 Fabrice Bellard
7d13299d
FB
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
3ef693a0
FB
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"
7d13299d
FB
18
19# default parameters
11d9f695 20prefix=""
1e43adfc 21interp_prefix="/usr/gnemul/qemu-%M"
43ce4dfe 22static="no"
7d13299d
FB
23cross_prefix=""
24cc="gcc"
25host_cc="gcc"
26ar="ar"
27make="make"
28strip="strip"
29cpu=`uname -m`
e95c8d51 30target_list="i386-user i386 i386-softmmu arm-user sparc-user ppc-user ppc-softmmu sparc-softmmu"
7d13299d
FB
31case "$cpu" in
32 i386|i486|i586|i686|i86pc|BePC)
97a847bc 33 cpu="i386"
7d13299d
FB
34 ;;
35 armv4l)
36 cpu="armv4l"
37 ;;
38 alpha)
39 cpu="alpha"
40 ;;
295defa5 41 "Power Macintosh"|ppc|ppc64)
7d13299d
FB
42 cpu="powerpc"
43 ;;
44 mips)
45 cpu="mips"
46 ;;
fb3e5849
FB
47 s390)
48 cpu="s390"
49 ;;
ae228531
FB
50 sparc)
51 cpu="sparc"
52 ;;
53 sparc64)
54 cpu="sparc64"
55 ;;
a8baa8c5
FB
56 ia64)
57 cpu="ia64"
58 ;;
38e584a0
FB
59 m68k)
60 cpu="m68k"
61 ;;
bc51c5c9
FB
62 x86_64|amd64)
63 cpu="amd64"
64 ;;
7d13299d
FB
65 *)
66 cpu="unknown"
67 ;;
68esac
69gprof="no"
70bigendian="no"
67b915a5
FB
71mingw32="no"
72EXESUF=""
73gdbstub="yes"
443f1376 74slirp="yes"
fb065187
FB
75adlib="no"
76oss="no"
102a52e4
FB
77fmod="no"
78fmod_lib=""
79fmod_inc=""
7d13299d
FB
80
81# OS specific
82targetos=`uname -s`
83case $targetos in
67b915a5
FB
84MINGW32*)
85mingw32="yes"
86;;
7d3505c5
FB
87FreeBSD)
88bsd="yes"
fb065187 89oss="yes"
7d3505c5
FB
90;;
91NetBSD)
92bsd="yes"
fb065187 93oss="yes"
7d3505c5
FB
94;;
95OpenBSD)
96bsd="yes"
fb065187 97oss="yes"
7d3505c5 98;;
83fb7adf
FB
99Darwin)
100bsd="yes"
101darwin="yes"
102;;
fb065187
FB
103*)
104oss="yes"
105;;
7d13299d
FB
106esac
107
7d3505c5 108if [ "$bsd" = "yes" ] ; then
83fb7adf
FB
109 if [ ! "$darwin" = "yes" ] ; then
110 make="gmake"
111 fi
e95c8d51 112 target_list="i386-softmmu ppc-softmmu sparc-softmmu"
7d3505c5
FB
113fi
114
7d13299d
FB
115# find source path
116# XXX: we assume an absolute path is given when launching configure,
117# except in './configure' case.
118source_path=${0%configure}
119source_path=${source_path%/}
120source_path_used="yes"
121if test -z "$source_path" -o "$source_path" = "." ; then
122 source_path=`pwd`
123 source_path_used="no"
124fi
125
126for opt do
127 case "$opt" in
128 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
129 ;;
32ce6337
FB
130 --interp-prefix=*) interp_prefix=`echo $opt | cut -d '=' -f 2`
131 ;;
7d13299d
FB
132 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
133 ;;
134 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
135 ;;
136 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
137 ;;
138 --make=*) make=`echo $opt | cut -d '=' -f 2`
139 ;;
140 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
141 ;;
142 --extra-ldflags=*) LDFLAGS="${opt#--extra-ldflags=}"
143 ;;
144 --extra-libs=*) extralibs=${opt#--extra-libs=}
145 ;;
146 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
147 ;;
97a847bc 148 --target-list=*) target_list=${opt#--target-list=}
de83cd02 149 ;;
7d13299d
FB
150 --enable-gprof) gprof="yes"
151 ;;
43ce4dfe
FB
152 --static) static="yes"
153 ;;
97a847bc
FB
154 --disable-sdl) sdl="no"
155 ;;
102a52e4
FB
156 --enable-fmod) fmod="yes"
157 ;;
158 --fmod-lib=*) fmod_lib=${opt#--fmod-lib=}
159 ;;
160 --fmod-inc=*) fmod_inc=${opt#--fmod-inc=}
161 ;;
67b915a5
FB
162 --enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-"
163 ;;
443f1376 164 --disable-slirp) slirp="no"
c20709aa 165 ;;
fb065187
FB
166 --enable-adlib) adlib="yes"
167 ;;
7d13299d
FB
168 esac
169done
170
171# Checking for CFLAGS
172if test -z "$CFLAGS"; then
173 CFLAGS="-O2"
174fi
175
176cc="${cross_prefix}${cc}"
177ar="${cross_prefix}${ar}"
178strip="${cross_prefix}${strip}"
179
67b915a5 180if test "$mingw32" = "yes" ; then
e95c8d51 181 target_list="i386-softmmu ppc-softmmu sparc-softmmu"
67b915a5
FB
182 EXESUF=".exe"
183 gdbstub="no"
9f059eca 184 oss="no"
67b915a5
FB
185fi
186
7d13299d
FB
187if test -z "$cross_prefix" ; then
188
189# ---
190# big/little endian test
191cat > $TMPC << EOF
192#include <inttypes.h>
193int main(int argc, char ** argv){
194 volatile uint32_t i=0x01234567;
195 return (*((uint8_t*)(&i))) == 0x67;
196}
197EOF
198
199if $cc -o $TMPE $TMPC 2>/dev/null ; then
200$TMPE && bigendian="yes"
201else
202echo big/little test failed
203fi
204
205else
206
207# if cross compiling, cannot launch a program, so make a static guess
38e584a0 208if test "$cpu" = "powerpc" -o "$cpu" = "mips" -o "$cpu" = "s390" -o "$cpu" = "sparc" -o "$cpu" = "sparc64" -o "$cpu" = "m68k"; then
7d13299d
FB
209 bigendian="yes"
210fi
211
212fi
213
e8cd23de 214# check gcc options support
04369ff2
FB
215cat > $TMPC <<EOF
216int main(void) {
04369ff2
FB
217}
218EOF
219
e8cd23de
FB
220have_gcc3_options="no"
221if $cc -fno-reorder-blocks -fno-optimize-sibling-calls -o $TMPO $TMPC 2> /dev/null ; then
222 have_gcc3_options="yes"
04369ff2 223fi
ca735206 224
11d9f695
FB
225##########################################
226# SDL probe
227
228sdl_too_old=no
229
230if test -z "$sdl" ; then
231
a6e022ad
FB
232sdl_config="sdl-config"
233sdl=no
7c1f25b4 234sdl_static=no
a6e022ad
FB
235
236if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
237# win32 cross compilation case
238 sdl_config="i386-mingw32msvc-sdl-config"
239 sdl=yes
240else
241# normal SDL probe
11d9f695
FB
242cat > $TMPC << EOF
243#include <SDL.h>
244#undef main /* We don't want SDL to override our main() */
245int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
246EOF
247
a6e022ad
FB
248if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then
249_sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
11d9f695
FB
250if test "$_sdlversion" -lt 121 ; then
251sdl_too_old=yes
252else
253sdl=yes
254fi
7c1f25b4
FB
255
256# static link with sdl ?
257if test "$sdl" = "yes" ; then
258aa="no"
259`$sdl_config --static-libs | grep \\\-laa > /dev/null` && aa="yes"
260sdl_static_libs=`$sdl_config --static-libs`
261if [ "$aa" = "yes" ] ; then
d8d8aa4e 262 sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`"
7c1f25b4
FB
263fi
264
265if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then
266 sdl_static=yes
11d9f695
FB
267fi
268
7c1f25b4
FB
269fi # static link
270
271fi # sdl compile test
272
a6e022ad
FB
273fi # cross compilation
274fi # -z $sdl
11d9f695 275
7d13299d
FB
276if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
277cat << EOF
278
279Usage: configure [options]
280Options: [defaults in brackets after descriptions]
281
282EOF
283echo "Standard options:"
284echo " --help print this message"
285echo " --prefix=PREFIX install in PREFIX [$prefix]"
1e43adfc
FB
286echo " --interp-prefix=PREFIX where to find shared libraries, etc."
287echo " use %M for cpu name [$interp_prefix]"
97a847bc 288echo " --target-list=LIST set target list [$target_list]"
7d13299d
FB
289echo ""
290echo "Advanced options (experts only):"
291echo " --source-path=PATH path of source code [$source_path]"
292echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
293echo " --cc=CC use C compiler CC [$cc]"
294echo " --make=MAKE use specified make [$make]"
43ce4dfe 295echo " --static enable static build [$static]"
67b915a5 296echo " --enable-mingw32 enable Win32 cross compilation with mingw32"
102a52e4
FB
297echo " --enable-fmod enable FMOD audio output driver"
298echo " --fmod-lib path to FMOD library"
299echo " --fmod-inc path to FMOD includes"
7d13299d
FB
300echo ""
301echo "NOTE: The object files are build at the place where configure is launched"
302exit 1
303fi
304
11d9f695
FB
305if test "$mingw32" = "yes" ; then
306if test -z "$prefix" ; then
307 prefix="/c/Program Files/Qemu"
308fi
309mandir="$prefix"
7efa4387 310datadir="$prefix"
1f50f8d1 311docdir="$prefix"
11d9f695
FB
312bindir="$prefix"
313else
314if test -z "$prefix" ; then
315 prefix="/usr/local"
316fi
5a67135a 317mandir="$prefix/share/man"
7efa4387 318datadir="$prefix/share/qemu"
1f50f8d1 319docdir="$prefix/share/doc/qemu"
11d9f695
FB
320bindir="$prefix/bin"
321fi
5a67135a 322
43ce4dfe 323echo "Install prefix $prefix"
7efa4387 324echo "BIOS directory $datadir"
11d9f695
FB
325echo "binary directory $bindir"
326if test "$mingw32" = "no" ; then
327echo "Manual directory $mandir"
43ce4dfe 328echo "ELF interp prefix $interp_prefix"
11d9f695 329fi
5a67135a 330echo "Source path $source_path"
43ce4dfe
FB
331echo "C compiler $cc"
332echo "make $make"
333echo "host CPU $cpu"
de83cd02 334echo "host big endian $bigendian"
97a847bc 335echo "target list $target_list"
43ce4dfe
FB
336echo "gprof enabled $gprof"
337echo "static build $static"
97a847bc 338echo "SDL support $sdl"
7c1f25b4 339echo "SDL static link $sdl_static"
67b915a5 340echo "mingw32 support $mingw32"
fb065187 341echo "Adlib support $adlib"
102a52e4
FB
342echo -n "FMOD support $fmod"
343if test $fmod = "yes"; then
344 echo -n " (lib='$fmod_lib' include='$fmod_inc')"
345fi
346echo ""
67b915a5 347
97a847bc
FB
348if test $sdl_too_old = "yes"; then
349echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
350fi
7c1f25b4
FB
351if test "$sdl_static" = "no"; then
352 echo "WARNING: cannot compile statically with SDL - qemu-fast won't have a graphical output"
353fi
97a847bc
FB
354
355config_mak="config-host.mak"
356config_h="config-host.h"
7d13299d 357
7c1f25b4 358#echo "Creating $config_mak and $config_h"
7d13299d 359
97a847bc
FB
360echo "# Automatically generated by configure - do not modify" > $config_mak
361echo "/* Automatically generated by configure - do not modify */" > $config_h
7d13299d 362
97a847bc 363echo "prefix=$prefix" >> $config_mak
11d9f695 364echo "bindir=$bindir" >> $config_mak
5a67135a 365echo "mandir=$mandir" >> $config_mak
7efa4387 366echo "datadir=$datadir" >> $config_mak
1f50f8d1 367echo "docdir=$docdir" >> $config_mak
7efa4387 368echo "#define CONFIG_QEMU_SHAREDIR \"$datadir\"" >> $config_h
97a847bc
FB
369echo "MAKE=$make" >> $config_mak
370echo "CC=$cc" >> $config_mak
e8cd23de 371if test "$have_gcc3_options" = "yes" ; then
97a847bc 372 echo "HAVE_GCC3_OPTIONS=yes" >> $config_mak
e8cd23de 373fi
97a847bc
FB
374echo "HOST_CC=$host_cc" >> $config_mak
375echo "AR=$ar" >> $config_mak
376echo "STRIP=$strip -s -R .comment -R .note" >> $config_mak
377echo "CFLAGS=$CFLAGS" >> $config_mak
378echo "LDFLAGS=$LDFLAGS" >> $config_mak
67b915a5 379echo "EXESUF=$EXESUF" >> $config_mak
97a847bc
FB
380if test "$cpu" = "i386" ; then
381 echo "ARCH=i386" >> $config_mak
382 echo "#define HOST_I386 1" >> $config_h
bc51c5c9
FB
383elif test "$cpu" = "amd64" ; then
384 echo "ARCH=amd64" >> $config_mak
385 echo "#define HOST_AMD64 1" >> $config_h
7d13299d 386elif test "$cpu" = "armv4l" ; then
97a847bc
FB
387 echo "ARCH=arm" >> $config_mak
388 echo "#define HOST_ARM 1" >> $config_h
7d13299d 389elif test "$cpu" = "powerpc" ; then
97a847bc
FB
390 echo "ARCH=ppc" >> $config_mak
391 echo "#define HOST_PPC 1" >> $config_h
7d13299d 392elif test "$cpu" = "mips" ; then
97a847bc
FB
393 echo "ARCH=mips" >> $config_mak
394 echo "#define HOST_MIPS 1" >> $config_h
fb3e5849 395elif test "$cpu" = "s390" ; then
97a847bc
FB
396 echo "ARCH=s390" >> $config_mak
397 echo "#define HOST_S390 1" >> $config_h
295defa5 398elif test "$cpu" = "alpha" ; then
97a847bc
FB
399 echo "ARCH=alpha" >> $config_mak
400 echo "#define HOST_ALPHA 1" >> $config_h
ae228531 401elif test "$cpu" = "sparc" ; then
97a847bc
FB
402 echo "ARCH=sparc" >> $config_mak
403 echo "#define HOST_SPARC 1" >> $config_h
ae228531 404elif test "$cpu" = "sparc64" ; then
97a847bc
FB
405 echo "ARCH=sparc64" >> $config_mak
406 echo "#define HOST_SPARC64 1" >> $config_h
a8baa8c5 407elif test "$cpu" = "ia64" ; then
97a847bc
FB
408 echo "ARCH=ia64" >> $config_mak
409 echo "#define HOST_IA64 1" >> $config_h
38e584a0 410elif test "$cpu" = "m68k" ; then
38ca2abc
FB
411 echo "ARCH=m68k" >> $config_mak
412 echo "#define HOST_M68K 1" >> $config_h
7d13299d
FB
413else
414 echo "Unsupported CPU"
415 exit 1
416fi
417if test "$bigendian" = "yes" ; then
97a847bc
FB
418 echo "WORDS_BIGENDIAN=yes" >> $config_mak
419 echo "#define WORDS_BIGENDIAN 1" >> $config_h
420fi
67b915a5
FB
421if test "$mingw32" = "yes" ; then
422 echo "CONFIG_WIN32=yes" >> $config_mak
11d9f695 423 echo "#define CONFIG_WIN32 1" >> $config_h
7d3505c5 424elif test -f "/usr/include/byteswap.h" ; then
67b915a5
FB
425 echo "#define HAVE_BYTESWAP_H 1" >> $config_h
426fi
83fb7adf
FB
427if test "$darwin" = "yes" ; then
428 echo "CONFIG_DARWIN=yes" >> $config_mak
429 echo "#define CONFIG_DARWIN 1" >> $config_h
430fi
67b915a5
FB
431if test "$gdbstub" = "yes" ; then
432 echo "CONFIG_GDBSTUB=yes" >> $config_mak
433 echo "#define CONFIG_GDBSTUB 1" >> $config_h
434fi
97a847bc
FB
435if test "$gprof" = "yes" ; then
436 echo "TARGET_GPROF=yes" >> $config_mak
437 echo "#define HAVE_GPROF 1" >> $config_h
438fi
439if test "$static" = "yes" ; then
440 echo "CONFIG_STATIC=yes" >> $config_mak
50863472 441 echo "#define CONFIG_STATIC 1" >> $config_h
7d13299d 442fi
c20709aa
FB
443if test "$slirp" = "yes" ; then
444 echo "CONFIG_SLIRP=yes" >> $config_mak
445 echo "#define CONFIG_SLIRP 1" >> $config_h
446fi
fb065187
FB
447if test "$adlib" = "yes" ; then
448 echo "CONFIG_ADLIB=yes" >> $config_mak
449 echo "#define CONFIG_ADLIB 1" >> $config_h
450fi
451if test "$oss" = "yes" ; then
452 echo "CONFIG_OSS=yes" >> $config_mak
453 echo "#define CONFIG_OSS 1" >> $config_h
454fi
102a52e4
FB
455if test "$fmod" = "yes" ; then
456 echo "CONFIG_FMOD=yes" >> $config_mak
457 echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak
458 echo "CONFIG_FMOD_INC=$fmod_inc" >> $config_mak
459 echo "#define CONFIG_FMOD 1" >> $config_h
460fi
97a847bc
FB
461echo -n "VERSION=" >>$config_mak
462head $source_path/VERSION >>$config_mak
463echo "" >>$config_mak
464echo -n "#define QEMU_VERSION \"" >> $config_h
465head $source_path/VERSION >> $config_h
466echo "\"" >> $config_h
467
468echo "SRC_PATH=$source_path" >> $config_mak
469echo "TARGET_DIRS=$target_list" >> $config_mak
470
83fb7adf 471# XXX: suppress that
7d3505c5 472if [ "$bsd" = "yes" ] ; then
43003046 473 echo "#define O_LARGEFILE 0" >> $config_h
43003046 474 echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
7d3505c5
FB
475 echo "#define _BSD 1" >> $config_h
476fi
477
97a847bc
FB
478for target in $target_list; do
479
480target_dir="$target"
481config_mak=$target_dir/config.mak
482config_h=$target_dir/config.h
483target_cpu=`echo $target | cut -d '-' -f 1`
484target_bigendian="no"
1e43adfc 485[ "$target_cpu" = "sparc" ] && target_bigendian=yes
67867308 486[ "$target_cpu" = "ppc" ] && target_bigendian=yes
97a847bc
FB
487target_softmmu="no"
488if expr $target : '.*-softmmu' > /dev/null ; then
489 target_softmmu="yes"
490fi
997344f3
FB
491target_user_only="no"
492if expr $target : '.*-user' > /dev/null ; then
493 target_user_only="yes"
494fi
97a847bc 495
7c1f25b4 496#echo "Creating $config_mak, $config_h and $target_dir/Makefile"
97a847bc
FB
497
498mkdir -p $target_dir
69de927c
FB
499if test "$target" = "arm-user" ; then
500 mkdir -p $target_dir/nwfpe
501fi
a7e61ed4
FB
502if test "$target_user_only" = "no" ; then
503 mkdir -p $target_dir/slirp
504fi
69de927c 505
97a847bc
FB
506ln -sf $source_path/Makefile.target $target_dir/Makefile
507
508echo "# Automatically generated by configure - do not modify" > $config_mak
509echo "/* Automatically generated by configure - do not modify */" > $config_h
510
de83cd02 511
97a847bc
FB
512echo "include ../config-host.mak" >> $config_mak
513echo "#include \"../config-host.h\"" >> $config_h
1e43adfc
FB
514
515interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"`
516echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h
97a847bc
FB
517
518if test "$target_cpu" = "i386" ; then
519 echo "TARGET_ARCH=i386" >> $config_mak
520 echo "#define TARGET_ARCH \"i386\"" >> $config_h
521 echo "#define TARGET_I386 1" >> $config_h
de83cd02 522elif test "$target_cpu" = "arm" ; then
97a847bc
FB
523 echo "TARGET_ARCH=arm" >> $config_mak
524 echo "#define TARGET_ARCH \"arm\"" >> $config_h
525 echo "#define TARGET_ARM 1" >> $config_h
1e43adfc
FB
526elif test "$target_cpu" = "sparc" ; then
527 echo "TARGET_ARCH=sparc" >> $config_mak
528 echo "#define TARGET_ARCH \"sparc\"" >> $config_h
529 echo "#define TARGET_SPARC 1" >> $config_h
67867308
FB
530elif test "$target_cpu" = "ppc" ; then
531 echo "TARGET_ARCH=ppc" >> $config_mak
532 echo "#define TARGET_ARCH \"ppc\"" >> $config_h
533 echo "#define TARGET_PPC 1" >> $config_h
de83cd02
FB
534else
535 echo "Unsupported target CPU"
536 exit 1
537fi
538if test "$target_bigendian" = "yes" ; then
97a847bc
FB
539 echo "TARGET_WORDS_BIGENDIAN=yes" >> $config_mak
540 echo "#define TARGET_WORDS_BIGENDIAN 1" >> $config_h
de83cd02 541fi
97a847bc
FB
542if test "$target_softmmu" = "yes" ; then
543 echo "CONFIG_SOFTMMU=yes" >> $config_mak
544 echo "#define CONFIG_SOFTMMU 1" >> $config_h
43ce4dfe 545fi
997344f3
FB
546if test "$target_user_only" = "yes" ; then
547 echo "CONFIG_USER_ONLY=yes" >> $config_mak
548 echo "#define CONFIG_USER_ONLY 1" >> $config_h
549fi
97a847bc 550
7c1f25b4
FB
551# sdl defines
552
553if test "$target_user_only" = "no"; then
554 if test "$target_softmmu" = "no" -o "$static" = "yes"; then
dbb2c921 555 sdl1=$sdl_static
7c1f25b4 556 else
dbb2c921
FB
557 sdl1=$sdl
558 fi
559 if test "$sdl1" = "yes" ; then
560 echo "#define CONFIG_SDL 1" >> $config_h
561 echo "CONFIG_SDL=yes" >> $config_mak
562 if test "$target_softmmu" = "no" -o "$static" = "yes"; then
563 echo "SDL_LIBS=$sdl_static_libs" >> $config_mak
564 else
7c1f25b4
FB
565 echo "SDL_LIBS=`$sdl_config --libs`" >> $config_mak
566 fi
dbb2c921
FB
567 echo -n "SDL_CFLAGS=`$sdl_config --cflags`" >> $config_mak
568 if [ "${aa}" = "yes" ] ; then
569 echo -n " `aalib-config --cflags`" >> $config_mak ;
570 fi
571 echo "" >> $config_mak
7c1f25b4 572 fi
7c1f25b4
FB
573fi
574
97a847bc 575done # for target in $targets
7d13299d
FB
576
577# build tree in object directory if source path is different from current one
578if test "$source_path_used" = "yes" ; then
579 DIRS="tests"
580 FILES="Makefile tests/Makefile"
581 for dir in $DIRS ; do
582 mkdir -p $dir
583 done
584 for f in $FILES ; do
585 ln -sf $source_path/$f $f
586 done
587fi
7d13299d 588
97a847bc 589rm -f $TMPO $TMPC $TMPE $TMPS