cdrom-async: Fix subchannel read with hardware CD-ROM
[pcsx_rearmed.git] / configure
CommitLineData
4132e8ca 1#!/bin/sh
2# some elements originated from qemu configure
3set -e
4
5TMPC="/tmp/pcsx-conf-${RANDOM}-$$-${RANDOM}.c"
6TMPO="/tmp/pcsx-conf-${RANDOM}-$$-${RANDOM}.o"
07c13dfd 7TMPB="/tmp/pcsx-conf-${RANDOM}-$$-${RANDOM}"
8trap "rm -f $TMPC $TMPO $TMPB" EXIT INT QUIT TERM
4132e8ca 9rm -f config.log
10
11compile_object()
12{
07c13dfd 13 c="$CC $CFLAGS -c $TMPC -o $TMPO $@"
14 echo $c >> config.log
15 $c >> config.log 2>&1
16}
17
18compile_binary()
19{
20 c="$CC $CFLAGS $TMPC -o $TMPB $LDFLAGS $MAIN_LDLIBS $@"
4132e8ca 21 echo $c >> config.log
22 $c >> config.log 2>&1
23}
24
25check_define()
26{
fad9f755 27 $CC -E -dD $CFLAGS include/arm_features.h | grep -v '#undef' | grep -q "$1" || return 1
cc376814 28 return 0
29}
30
31check_define_val()
32{
fad9f755 33 $CC -E -dD $CFLAGS include/arm_features.h | grep -v '#undef' | grep "$1" | awk '{print $3}'
4132e8ca 34 return 0
35}
36
37# setting options to "yes" or "no" will make that choice default,
38# "" means "autodetect".
39
8cf3ffc7 40platform_list="generic pandora maemo caanoo miyoo"
4132e8ca 41platform="generic"
5ddc3a7a 42builtin_gpu_list="neon peops unai"
a4c71501 43dynarec_list="ari64 lightrec none"
61bc6d40 44builtin_gpu=""
fad9f755 45sound_driver_list="oss alsa pulseaudio sdl"
07c13dfd 46sound_drivers=""
60ff60f5 47plugins=""
4132e8ca 48drc_cache_base="no"
00a212aa 49have_armv5=""
4132e8ca 50have_armv6=""
51have_armv7=""
52have_arm_neon=""
57467c77 53have_arm_neon_asm=""
49040d98 54have_neon_gpu=""
4132e8ca 55have_tslib=""
f49a4c48 56have_evdev=""
5b9aa749 57have_gles=""
5514a050 58have_c64x_dsp=""
f49a4c48 59have_fsections="yes"
2e4073b2 60have_dynamic="yes"
f49a4c48 61gnu_linker="yes"
a4c71501 62dynarec=""
fad9f755 63multithreading="yes"
f89fa2d9 64need_sdl="no"
955f9af0 65need_xlib="no"
cc56203b 66need_libpicofe="yes"
67need_warm="no"
5b9aa749 68CFLAGS_GLES=""
69LDLIBS_GLES=""
4132e8ca 70# these are for known platforms
71optimize_cortexa8="no"
72optimize_arm926ej="no"
73
74# hardcoded stuff
f49a4c48 75case "${OSTYPE}" in
76 *BSD*|*darwin*)
77 CC="clang"
78 CXX="clang++"
79 if test -d /opt/local/include; then
80 # MacPorts
81 CFLAGS="$CFLAGS -I/opt/local/include"
82 LDFLAGS="$LDFLAGS -L/opt/local/lib"
83 fi
84 if test -d /opt/local/include; then
85 CFLAGS="$CFLAGS -I/usr/local/include"
86 LDFLAGS="$LDFLAGS -L/usr/local/lib"
87 fi
88 MAKE=gmake
89 gnu_linker="no"
90 ;;
91 *)
92 CC="${CC-${CROSS_COMPILE}gcc}"
93 CXX="${CXX-${CROSS_COMPILE}g++}"
94 ;;
95esac
4132e8ca 96AS="${AS-${CROSS_COMPILE}as}"
97AR="${AS-${CROSS_COMPILE}ar}"
9aff1963 98MAIN_LDLIBS="$LDLIBS -ldl -lm -lpthread"
4132e8ca 99config_mak="config.mak"
100
f49a4c48 101case "${OSTYPE}" in
102 *BSD*|*darwin*)
103 SYSROOT="$sysroot"
104 [ "x${SDL_CONFIG}" = "x" ] && SDL_CONFIG="${SYSROOT}/usr/local/bin/sdl-config"
105 ;;
106 *)
107 SYSROOT="$(${CC} --print-sysroot 2> /dev/null || true)"
108 [ "x${SDL_CONFIG}" = "x" ] && SDL_CONFIG="${SYSROOT}/usr/bin/sdl-config"
109 ;;
110esac
3d037671 111
07c13dfd 112fail()
113{
114 echo "$@"
5d53bb85 115 if test -n "$DUMP_CONFIG_LOG"; then cat config.log; fi
07c13dfd 116 exit 1
117}
118
4132e8ca 119# call during arg parsing, so that cmd line can override platform defaults
120set_platform()
121{
122 platform=$1
123 case "$platform" in
124 generic)
125 ;;
126 pandora)
07c13dfd 127 sound_drivers="oss alsa"
4132e8ca 128 drc_cache_base="yes"
129 optimize_cortexa8="yes"
130 have_arm_neon="yes"
49040d98 131 have_neon_gpu="yes"
955f9af0 132 need_xlib="yes"
fad9f755 133 multithreading="no"
4132e8ca 134 ;;
135 maemo)
4132e8ca 136 drc_cache_base="yes"
137 optimize_cortexa8="yes"
138 have_arm_neon="yes"
49040d98 139 have_neon_gpu="yes"
fad9f755 140 multithreading="no"
4132e8ca 141 ;;
8cf3ffc7
A
142 miyoo)
143 sound_drivers="alsa"
144 drc_cache_base="yes"
145 optimize_arm926ej="yes"
146 multithreading="no"
147 ;;
4132e8ca 148 caanoo)
07c13dfd 149 sound_drivers="oss"
4132e8ca 150 drc_cache_base="yes"
151 optimize_arm926ej="yes"
cc56203b 152 need_warm="yes"
fad9f755 153 multithreading="no"
38c2028e 154 ;;
4132e8ca 155 *)
07c13dfd 156 fail "unsupported platform: $platform"
4132e8ca 157 ;;
158 esac
159}
160
161for opt do
162 optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'` || true
163 case "$opt" in
164 --help|-h) show_help="yes"
165 ;;
166 --platform=*) set_platform "$optarg"
167 ;;
61bc6d40 168 --gpu=*) builtin_gpu="$optarg"
169 ;;
07c13dfd 170 --sound-drivers=*) sound_drivers="$optarg"
4132e8ca 171 ;;
172 --enable-neon) have_arm_neon="yes"
173 ;;
174 --disable-neon) have_arm_neon="no"
175 ;;
fad9f755 176 --enable-threads) multithreading="yes"
177 ;;
178 --disable-threads) multithreading="no"
179 ;;
2e4073b2
A
180 --enable-dynamic) have_dynamic="yes"
181 ;;
182 --disable-dynamic) have_dynamic="no"
183 ;;
a4c71501 184 --dynarec=*) dynarec="$optarg"
185 ;;
186 --disable-dynarec) dynarec="no"
4132e8ca 187 ;;
188 *) echo "ERROR: unknown option $opt"; show_help="yes"
189 ;;
190 esac
191done
192
193if [ "$show_help" = "yes" ]; then
194 echo "options:"
195 echo " --help print this message"
196 echo " --platform=NAME target platform [$platform]"
197 echo " available: $platform_list"
61bc6d40 198 echo " --gpu=NAME builtin gpu plugin [guessed]"
199 echo " available: $builtin_gpu_list"
07c13dfd 200 echo " --sound-drivers=LIST sound output drivers [guessed]"
4132e8ca 201 echo " available: $sound_driver_list"
202 echo " --enable-neon"
203 echo " --disable-neon enable/disable ARM NEON optimizations [guessed]"
fad9f755 204 echo " --enable-threads"
205 echo " --disable-threads enable/disable multithreaded features [guessed]"
2e4073b2
A
206 echo " --enable-dynamic"
207 echo " --disable-dynamic enable/disable dynamic loading obj. eg.plugins [guessed]"
a4c71501 208 echo " --dynarec=NAME select dynamic recompiler [guessed]"
209 echo " available: $dynarec_list"
4132e8ca 210 echo "influential environment variables:"
ac6575cd 211 echo " CROSS_COMPILE CC CXX AS AR CFLAGS ASFLAGS LDFLAGS LDLIBS"
4132e8ca 212 exit 1
213fi
214
07c13dfd 215# validate selections
61bc6d40 216if [ "x$builtin_gpu" != "x" ]; then
07c13dfd 217 if ! echo $builtin_gpu_list | grep -q "\<$builtin_gpu\>"; then
218 fail "unsupported builtin gpu plugin: $builtin_gpu"
219 fi
61bc6d40 220fi
221
07c13dfd 222if [ "x$sound_drivers" != "x" ]; then
223 for d in $sound_drivers; do
224 if ! echo $sound_driver_list | grep -q "\<$d\>"; then
225 fail "unsupported sound driver: $sound_driver"
226 fi
227 done
228fi
4132e8ca 229
cc56203b 230if [ "$need_libpicofe" = "yes" ]; then
231 if ! test -f "frontend/libpicofe/README"; then
232 fail "libpicofe is missing, please run 'git submodule init && git submodule update'"
233 fi
234fi
235
236if [ "$need_warm" = "yes" ]; then
237 if ! test -f "frontend/warm/README"; then
238 fail "wARM is missing, please run 'git submodule init && git submodule update'"
239 fi
240fi
241
00a212aa 242# basic compiler test
243cat > $TMPC <<EOF
244#include <zlib.h>
245int main(void) { return 0; }
246EOF
247if ! compile_binary; then
0dc1b4a9 248 fail "compiler test failed, please check config.log"
00a212aa 249fi
250
4132e8ca 251if [ -z "$ARCH" ]; then
0dc1b4a9 252 ARCH=`$CC -dumpmachine | awk -F '-' '{print $1}'`
4132e8ca 253fi
254
0dc1b4a9 255case "$ARCH" in
f49a4c48 256aarch64|arm64)
257 have_arm_neon="yes"
49040d98 258 have_neon_gpu="yes"
f49a4c48 259 have_arm_neon_asm="no"
260 if [ "x$dynarec" = "x" ]; then
261 dynarec="ari64"
262 fi
f49a4c48 263 ;;
0dc1b4a9 264arm*)
265 # ARM stuff
266 ARCH="arm"
267
4132e8ca 268 if [ "$optimize_cortexa8" = "yes" ]; then
4132e8ca 269 CFLAGS="$CFLAGS -mcpu=cortex-a8 -mtune=cortex-a8"
270 ASFLAGS="$ASFLAGS -mcpu=cortex-a8"
271 fi
272 if [ "$optimize_arm926ej" = "yes" ]; then
273 CFLAGS="$CFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s"
274 ASFLAGS="$ASFLAGS -mcpu=arm926ej-s -mfloat-abi=softfp"
275 fi
276
277 if [ "x$have_arm_neon" = "x" ]; then
57467c77 278 # detect NEON from user-supplied cflags to enable neon code
4132e8ca 279 have_arm_neon=`check_define __ARM_NEON__ && echo yes` || true
280 fi
4132e8ca 281 if [ "x$have_armv7" = "x" ]; then
00a212aa 282 if check_define HAVE_ARMV7; then
4132e8ca 283 have_armv7="yes"
00a212aa 284 have_armv6="yes"
285 have_armv5="yes"
4132e8ca 286 fi
287 fi
00a212aa 288 if [ "x$have_armv6" = "x" ]; then
289 if check_define HAVE_ARMV6; then
290 have_armv6="yes"
291 have_armv5="yes"
292 fi
293 fi
294 if [ "x$have_armv5" = "x" ]; then
295 have_armv5=`check_define HAVE_ARMV5 && echo yes` || true
296 fi
4132e8ca 297
a4c71501 298 if [ "x$dynarec" = "x" ]; then
299 dynarec="ari64"
300 fi
301
4132e8ca 302 if [ "$have_arm_neon" = "yes" ]; then
49040d98 303 have_neon_gpu="yes"
40cf6975 304 fpu="neon"
4132e8ca 305 elif [ "$have_armv6" = "yes" ]; then
40cf6975 306 fpu="vfp"
4132e8ca 307 fi
49040d98 308 # automatically set mfpu and mfloat-abi if they are not set
40cf6975 309 if [ "x$fpu" != "x" ]; then
310 echo "$CFLAGS" | grep -q -- '-mfpu=' || CFLAGS="$CFLAGS -mfpu=$fpu"
311 echo "$ASFLAGS" | grep -q -- '-mfpu=' || ASFLAGS="$ASFLAGS -mfpu=$fpu"
312 floatabi_set_by_gcc=`$CC -v 2>&1 | grep -q -- --with-float= && echo yes` || true
313 if [ "$floatabi_set_by_gcc" != "yes" ]; then
314 echo "$CFLAGS" | grep -q -- '-mfloat-abi=' || CFLAGS="$CFLAGS -mfloat-abi=softfp"
315 echo "$ASFLAGS" | grep -q -- '-mfloat-abi=' || ASFLAGS="$ASFLAGS -mfloat-abi=softfp"
316 fi
4132e8ca 317 fi
318
9f704290 319 # must disable thumb as recompiler can't handle it
96751f36 320 if check_define __thumb__; then
9f704290 321 CFLAGS="$CFLAGS -marm"
96751f36 322 fi
00a212aa 323
324 # warn about common mistakes
325 if [ "$have_armv5" != "yes" ]; then
326 if ! echo "$CFLAGS" | grep -q -- '-mcpu=\|-march='; then
327 echo "Warning: compiling for ARMv4, is that really what you want?"
328 echo "You probably should specify -mcpu= or -march= like this:"
329 echo " CFLAGS=-march=armv6 ./configure ..."
330 fi
331 fi
332 if [ "$have_arm_neon" = "yes" -a "$have_armv7" != "yes" ]; then
333 echo "Warning: compiling for NEON, but not ARMv7?"
334 echo "You probably want to specify -mcpu= or -march= like this:"
335 echo " CFLAGS=-march=armv7-a ./configure ..."
336 fi
57467c77 337 have_arm_neon_asm=$have_arm_neon
0dc1b4a9 338 ;;
af486d6e 339x86_64)
a4c71501 340 if [ "x$dynarec" = "x" ]; then
341 dynarec="lightrec"
342 fi
49040d98 343 have_neon_gpu="yes"
af486d6e 344 ;;
0dc1b4a9 345*)
a4c71501 346 if [ "x$dynarec" = "x" ]; then
347 dynarec="lightrec"
348 fi
0dc1b4a9 349 ;;
350esac
4132e8ca 351
61bc6d40 352if [ "x$builtin_gpu" = "x" ]; then
49040d98 353 if [ "$have_neon_gpu" = "yes" ]; then
354 builtin_gpu="neon"
355 elif [ "$ARCH" = "arm" -a "$have_armv7" != "yes" ]; then
356 # pre-ARMv7 hardware is usually not fast enough for peops
357 builtin_gpu="unai"
358 else
359 builtin_gpu="peops"
360 fi
61bc6d40 361fi
362
4132e8ca 363# supposedly we can avoid -fPIC on armv5 for slightly better performace?
364if [ "$ARCH" != "arm" -o "$have_armv6" = "yes" ]; then
365 PLUGIN_CFLAGS="$PLUGIN_CFLAGS -fPIC"
a28b8a4b
A
366else
367 PLUGIN_CFLAGS="$PLUGIN_CFLAGS -fno-PIC"
4132e8ca 368fi
369
38c2028e 370case "$platform" in
371generic)
f89fa2d9 372 need_sdl="yes"
38c2028e 373 ;;
374maemo)
7010034e 375 CFLAGS="$CFLAGS -DMAEMO -DMAEMO_CHANGES"
38c2028e 376 ;;
8cf3ffc7
A
377miyoo)
378 need_sdl="yes"
379 CFLAGS="$CFLAGS -DMIYOO"
380 ;;
38c2028e 381esac
4132e8ca 382
07c13dfd 383# header/library presence tests
384check_zlib()
385{
386 cat > $TMPC <<EOF
387 #include <zlib.h>
791f6e3e 388 int main(void) { uncompress(0, 0, 0, 0); }
07c13dfd 389EOF
390 compile_binary
391}
392
07c13dfd 393check_libpng()
394{
395 cat > $TMPC <<EOF
396 #include <png.h>
397 void main() { png_init_io(0, 0); }
398EOF
399 compile_binary
400}
401
402check_oss()
403{
404 cat > $TMPC <<EOF
405 #include <sys/soundcard.h>
406 #include <sys/ioctl.h>
407 void main() { int a=0; ioctl(0, SNDCTL_DSP_SETFMT, &a); }
408EOF
409 compile_binary
410}
411
412check_alsa()
413{
414 cat > $TMPC <<EOF
415 #include <alsa/asoundlib.h>
416 void main() { snd_pcm_open(0, 0, 0, 0); }
417EOF
418 compile_binary "$@"
419}
420
b68bf5c2 421check_pulseaudio()
422{
423 cat > $TMPC <<EOF
424 #include <pulse/pulseaudio.h>
425 void main() { pa_threaded_mainloop_new(); }
426EOF
427 compile_binary "$@"
428}
429
07c13dfd 430check_sdl()
431{
432 cat > $TMPC <<EOF
433 #include <SDL.h>
f49a4c48 434 int main(int argc, char *argv[]) { SDL_OpenAudio(0, 0); }
07c13dfd 435EOF
436 compile_binary "$@"
437}
438
955f9af0 439check_xlib_headers()
440{
441 cat > $TMPC <<EOF
442 #include <X11/Xlib.h>
443 void *f() { return XOpenDisplay(0); }
444EOF
445 compile_object "$@"
446}
447
5514a050 448# see if we have c64_tools for TI C64x DSP
449check_c64_tools()
450{
451 cat > $TMPC <<EOF
452 #include <inc_libc64_mini.h>
453 int f() { return dsp_open(); }
454EOF
455 compile_object "$@"
456}
457
f89fa2d9 458MAIN_LDLIBS="$MAIN_LDLIBS -lz"
9f704290 459check_zlib || fail "please install zlib (libz-dev)"
f89fa2d9 460
f89fa2d9 461MAIN_LDLIBS="-lpng $MAIN_LDLIBS"
9f704290 462check_libpng || fail "please install libpng (libpng-dev)"
07c13dfd 463
464# find what audio support we can compile
465if [ "x$sound_drivers" = "x" ]; then
466 if check_oss; then sound_drivers="$sound_drivers oss"; fi
f89fa2d9 467 if check_alsa -lasound; then
468 sound_drivers="$sound_drivers alsa"
469 MAIN_LDLIBS="-lasound $MAIN_LDLIBS"
470 fi
b68bf5c2 471 if check_pulseaudio -lpulse; then
472 sound_drivers="$sound_drivers pulseaudio"
473 MAIN_LDLIBS="-lpulse $MAIN_LDLIBS"
474 fi
3d037671 475 if [ "$need_sdl" = "yes" ] || check_sdl `${SDL_CONFIG} --cflags --libs`; then
f89fa2d9 476 sound_drivers="$sound_drivers sdl"
477 need_sdl="yes"
478 fi
479else
480 if echo $sound_drivers | grep -q "\<oss\>"; then
481 check_oss || fail "oss support is missing"
482 fi
483 if echo $sound_drivers | grep -q "\<alsa\>"; then
484 MAIN_LDLIBS="-lasound $MAIN_LDLIBS"
485 check_alsa || fail "please install libasound2-dev"
486 fi
b68bf5c2 487 if echo $sound_drivers | grep -q "\<pulseaudio\>"; then
488 MAIN_LDLIBS="-lpulse $MAIN_LDLIBS"
489 check_pulseaudio || fail "pulseaudio support is missing"
490 fi
07c13dfd 491fi
492
9f704290 493if [ "$need_sdl" = "yes" ]; then
3d037671 494 which ${SDL_CONFIG} > /dev/null || \
9f704290 495 fail "sdl-config is missing; please install libsdl (libsdl1.2-dev)"
3d037671
PC
496 CFLAGS="$CFLAGS `${SDL_CONFIG} --cflags`"
497 MAIN_LDLIBS="`${SDL_CONFIG} --libs` $MAIN_LDLIBS"
9f704290 498 check_sdl || fail "please install libsdl (libsdl1.2-dev)"
07c13dfd 499fi
500
4132e8ca 501# check for tslib (only headers needed)
502if [ "x$have_tslib" = "x" ]; then
503 cat > $TMPC <<EOF
504 #include <tslib.h>
505 void test(struct ts_sample sample) {}
506EOF
507 if compile_object; then
508 have_tslib="yes"
509 else
510 have_tslib="no"
511 fi
512fi
513
f49a4c48 514# evdev
515if [ "x$have_evdev" = "x" ]; then
516 cat > $TMPC <<EOF
517 #include <linux/input.h>
518EOF
519 have_evdev="no"
520 if compile_object; then
521 have_evdev="yes"
522 else
523 cat > $TMPC <<EOF
524 #include <dev/evdev/input.h>
525EOF
526 if compile_object; then
527 have_evdev="yes"
528 fi
529 fi
530fi
531
dd4d5a35 532# check for GLES headers
533cat > $TMPC <<EOF
534#include <GLES/gl.h>
dd4d5a35 535#include <EGL/egl.h>
5b9aa749 536int main(void) {
537 return (int)eglGetDisplay( (EGLNativeDisplayType)0 );
dd4d5a35 538}
539EOF
ef701b2e 540if compile_binary $CFLAGS_GLES -lEGL -lGLES_CM $LDLIBS_GLES; then
5b9aa749 541 have_gles="yes"
542 LDLIBS_GLES="-lEGL -lGLES_CM $LDLIBS_GLES"
543elif compile_binary $CFLAGS_GLES -lEGL -lGLESv1_CM $LDLIBS_GLES; then
544 have_gles="yes"
545 LDLIBS_GLES="-lEGL -lGLESv1_CM $LDLIBS_GLES"
86e02a02 546elif compile_object $CFLAGS_GLES; then
547 have_gles="yes"
dd4d5a35 548fi
549
5514a050 550if check_c64_tools; then
551 have_c64x_dsp="yes"
552fi
553
60ff60f5 554# declare available dynamic plugins
2e4073b2
A
555if [ "$have_dynamic" = "yes" ]; then
556 plugins="plugins/spunull/spunull.so"
60ff60f5 557
2e4073b2
A
558 if [ "$builtin_gpu" != "peops" ]; then
559 plugins="$plugins plugins/dfxvideo/gpu_peops.so"
560 fi
561 if [ "$builtin_gpu" != "unai" ]; then
562 plugins="$plugins plugins/gpu_unai/gpu_unai.so"
563 fi
86e02a02 564 if [ "$have_gles" = "yes" -a "x$LDLIBS_GLES" != "x" ]; then
2e4073b2
A
565 plugins="$plugins plugins/gpu-gles/gpu_gles.so"
566 fi
567 if [ "$have_neon_gpu" = "yes" -a "$builtin_gpu" != "neon" ]; then
568 plugins="$plugins plugins/gpu_neon/gpu_neon.so"
569 fi
570else
571 have_dynamic="no"
572 CFLAGS="$CFLAGS -DNO_DYLIB"
61bc6d40 573fi
574
955f9af0 575# check for xlib (only headers needed)
576if [ "x$need_xlib" = "xyes" ]; then
577 check_xlib_headers || fail "please install libx11-dev"
578fi
579
cc376814 580sizeof_long=`check_define_val __SIZEOF_LONG__`
581if [ "x$sizeof_long" = "x4" ]; then
582 CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
583fi
584
9f704290 585cat > $TMPC <<EOF
586void test(void *f, void *d) { fread(d, 1, 1, f); }
587EOF
588if compile_object -Wno-unused-result; then
589 CFLAGS="$CFLAGS -Wno-unused-result"
590fi
591
dd4d5a35 592# short plugin list for display
593for p in $plugins; do
594 p1=`basename $p`
595 plugins_short="$p1 $plugins_short"
596done
597
4132e8ca 598# set things that failed to autodetect to "no"
599test "x$have_armv6" != "x" || have_armv6="no"
600test "x$have_armv7" != "x" || have_armv7="no"
601test "x$have_arm_neon" != "x" || have_arm_neon="no"
57467c77 602test "x$have_arm_neon_asm" != "x" || have_arm_neon_asm="no"
00a212aa 603test "x$have_gles" != "x" || have_gles="no"
5514a050 604test "x$have_c64x_dsp" != "x" || have_c64x_dsp="no"
4132e8ca 605
606echo "architecture $ARCH"
607echo "platform $platform"
61bc6d40 608echo "built-in GPU $builtin_gpu"
07c13dfd 609echo "sound drivers $sound_drivers"
dd4d5a35 610echo "plugins $plugins_short"
4132e8ca 611echo "C compiler $CC"
612echo "C compiler flags $CFLAGS"
07c13dfd 613echo "libraries $MAIN_LDLIBS"
22fa3f2b 614echo "linker flags $LDFLAGS$MAIN_LDFLAGS"
a4c71501 615echo "dynarec $dynarec"
57467c77 616if [ "$ARCH" = "arm" -o "$ARCH" = "aarch64" ]; then
617 echo "enable ARM NEON $have_arm_neon"
618fi
5514a050 619if [ "$ARCH" = "arm" ]; then
620 echo "ARMv7 optimizations $have_armv7"
5514a050 621 echo "TI C64x DSP support $have_c64x_dsp"
622fi
28bfade9
A
623if [ "$have_dynamic" = "yes" ]; then
624 echo "tslib support $have_tslib"
625else
626 echo "tslib does NOT support staticly linked build"
627fi
2c616080 628if [ "$platform" = "generic" ]; then
629 echo "OpenGL ES output $have_gles"
630fi
fad9f755 631echo "multithreading $multithreading"
4132e8ca 632
633echo "# Automatically generated by configure" > $config_mak
634printf "# Configured with:" >> $config_mak
635printf " '%s'" "$0" "$@" >> $config_mak
636echo >> $config_mak
637
638echo "CC = $CC" >> $config_mak
ac6575cd 639echo "CXX = $CXX" >> $config_mak
4132e8ca 640echo "AS = $AS" >> $config_mak
641echo "CFLAGS += $CFLAGS" >> $config_mak
642echo "ASFLAGS += $ASFLAGS" >> $config_mak
643echo "LDFLAGS += $LDFLAGS" >> $config_mak
22fa3f2b 644echo "MAIN_LDFLAGS += $MAIN_LDFLAGS" >> $config_mak
07c13dfd 645echo "MAIN_LDLIBS += $MAIN_LDLIBS" >> $config_mak
4132e8ca 646echo "PLUGIN_CFLAGS += $PLUGIN_CFLAGS" >> $config_mak
647echo >> $config_mak
648
649echo "ARCH = $ARCH" >> $config_mak
650echo "PLATFORM = $platform" >> $config_mak
61bc6d40 651echo "BUILTIN_GPU = $builtin_gpu" >> $config_mak
07c13dfd 652echo "SOUND_DRIVERS = $sound_drivers" >> $config_mak
ddd99692 653echo "PLUGINS = $plugins" >> $config_mak
5368e5b9
A
654if [ "$have_neon_gpu" = "yes" ]; then
655 echo "HAVE_NEON_GPU = 1" >> $config_mak
656fi
4132e8ca 657if [ "$have_arm_neon" = "yes" ]; then
658 echo "HAVE_NEON = 1" >> $config_mak
659fi
57467c77 660if [ "$have_arm_neon_asm" = "yes" ]; then
661 echo "HAVE_NEON_ASM = 1" >> $config_mak
662fi
28bfade9 663if [ "$have_tslib" = "yes" -a "$have_dynamic" = "yes" ]; then
4132e8ca 664 echo "HAVE_TSLIB = 1" >> $config_mak
665fi
f49a4c48 666if [ "$have_evdev" = "yes" ]; then
667 echo "HAVE_EVDEV = 1" >> $config_mak
668fi
5b9aa749 669if [ "$have_gles" = "yes" ]; then
670 echo "HAVE_GLES = 1" >> $config_mak
671 echo "CFLAGS_GLES = $CFLAGS_GLES" >> $config_mak
672 echo "LDLIBS_GLES = $LDLIBS_GLES" >> $config_mak
673fi
f49a4c48 674if [ "$have_fsections" = "no" ]; then
675 echo "NO_FSECTIONS = 1" >> $config_mak
676fi
677if [ "$gnu_linker" = "yes" ]; then
678 echo "GNU_LINKER = 1" >> $config_mak
679fi
a4c71501 680echo "DYNAREC = $dynarec" >> $config_mak
4132e8ca 681if [ "$drc_cache_base" = "yes" ]; then
2a014d73 682 echo "BASE_ADDR_DYNAMIC = 1" >> $config_mak
4132e8ca 683fi
5514a050 684if [ "$have_c64x_dsp" = "yes" ]; then
685 echo "HAVE_C64_TOOLS = 1" >> $config_mak
686fi
fad9f755 687if [ "$multithreading" = "yes" ]; then
688 echo "USE_ASYNC_CDROM = 1" >> $config_mak
689 echo "NDRC_THREAD = 1" >> $config_mak
690fi
4132e8ca 691
2e6189bc 692# use pandora's skin (for now)
693test -e skin || ln -s frontend/pandora/skin skin
694
4132e8ca 695# vim:shiftwidth=2:expandtab