10 |
|
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes]) |
11 |
|
AC_ARG_ENABLE(fbdev-dga, [ --enable-fbdev-dga use direct frame buffer access via /dev/fb [default=yes]], [WANT_FBDEV_DGA=$enableval], [WANT_FBDEV_DGA=yes]) |
12 |
|
AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV signals [default=no]], [WANT_VOSF=$enableval], [WANT_VOSF=no]) |
13 |
< |
AC_ARG_ENABLE(16bit-vidmode, [ --enable-16bit-vidmode enable 16-bit video if possible [default=yes]], [WANT_16BIT_VIDMODE=$enableval], [WANT_16BIT_VIDMODE=yes]) |
13 |
> |
|
14 |
> |
dnl Addressing modes. |
15 |
|
AC_ARG_ENABLE(addressing, |
16 |
< |
[ --enable-addressing=mode specify the addressing mode to use [default=fastest]], |
16 |
> |
[ --enable-addressing=AM specify the addressing mode to use [default=fastest]], |
17 |
|
[ case "$enableval" in |
18 |
|
real) ADDRESSING_TEST_ORDER="real";; |
19 |
|
direct) ADDRESSING_TEST_ORDER="direct";; |
20 |
|
banks) ADDRESSING_TEST_ORDER="banks";; |
21 |
< |
dnl fastest) ADDRESSING_TEST_ORDER="real direct banks";; gb-- will enable later... |
22 |
< |
fastest) ADDRESSING_TEST_ORDER="direct banks";; |
22 |
< |
*) AC_MSG_ERROR([--enable-mem-addressing takes only one of the following values: fastest, real, direct, banks]);; |
21 |
> |
fastest)ADDRESSING_TEST_ORDER="direct banks";; |
22 |
> |
*) AC_MSG_ERROR([--enable-addressing takes only one of the following values: fastest, real, direct, banks]);; |
23 |
|
esac |
24 |
|
], |
25 |
– |
dnl [ ADDRESSING_TEST_ORDER="real direct banks" gb-- will probably reactivate later |
25 |
|
[ ADDRESSING_TEST_ORDER="direct banks" |
26 |
|
]) |
27 |
+ |
|
28 |
+ |
dnl External packages. |
29 |
|
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) |
30 |
|
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) |
31 |
|
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes]) |
48 |
|
HAVE_I386=no |
49 |
|
HAVE_M68K=no |
50 |
|
HAVE_SPARC=no |
51 |
+ |
HAVE_POWERPC=no |
52 |
|
case "$target_cpu" in |
53 |
|
i386* | i486* | i586* | i686* | i786* ) CPU_TYPE=i386 HAVE_I386=yes;; |
54 |
|
m68k* ) CPU_TYPE=m68k HAVE_M68K=yes;; |
55 |
|
sparc* ) CPU_TYPE=sparc HAVE_SPARC=yes;; |
56 |
+ |
powerpc* ) CPU_TYPE=powerpc HAVE_POWERPC=yes;; |
57 |
|
*) CPU_TYPE=`echo $target_cpu | sed -e 's/-/_/'`;; |
58 |
|
esac |
59 |
|
DEFINES="$DEFINES -DCPU_$CPU_TYPE" |
397 |
|
AC_LANG_RESTORE |
398 |
|
]) |
399 |
|
AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack) |
400 |
+ |
elif [[ "x$HAVE_POWERPC" = "xyes" ]]; then |
401 |
+ |
AC_CACHE_CHECK("whether we then have a subterfuge for your system", |
402 |
+ |
ac_cv_have_sigcontext_hack, [ |
403 |
+ |
AC_LANG_SAVE |
404 |
+ |
AC_LANG_CPLUSPLUS |
405 |
+ |
AC_TRY_RUN([ |
406 |
+ |
#include <unistd.h> |
407 |
+ |
#include <signal.h> |
408 |
+ |
#include <fcntl.h> |
409 |
+ |
#include <sys/mman.h> |
410 |
+ |
|
411 |
+ |
static volatile caddr_t mem = 0; |
412 |
+ |
static int zero_fd = -1; |
413 |
+ |
|
414 |
+ |
static RETSIGTYPE segfault_handler(int, struct sigcontext_struct *scs) |
415 |
+ |
{ if ((caddr_t)(scs->regs->dar) != mem) exit(1); |
416 |
+ |
munmap(mem, getpagesize()); close(zero_fd); exit(0); } |
417 |
+ |
|
418 |
+ |
int main() |
419 |
+ |
{ if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1); |
420 |
+ |
if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1); |
421 |
+ |
struct sigaction sa; sa.sa_flags = 0; |
422 |
+ |
sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler; |
423 |
+ |
sigaction(SIGSEGV, &sa, 0); |
424 |
+ |
mem[0] = 0; |
425 |
+ |
exit(1); // should not be reached |
426 |
+ |
} |
427 |
+ |
], |
428 |
+ |
[ac_cv_have_sigcontext_hack=yes], |
429 |
+ |
[ac_cv_have_sigcontext_hack=no] |
430 |
+ |
) |
431 |
+ |
AC_LANG_RESTORE |
432 |
+ |
]) |
433 |
+ |
AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack) |
434 |
|
fi |
435 |
|
;; |
436 |
|
netbsd*) |
488 |
|
for am in $ADDRESSING_TEST_ORDER; do |
489 |
|
case $am in |
490 |
|
real) |
491 |
< |
dnl Requires ability to mmap Low Memory globals. |
491 |
> |
dnl Requires ability to mmap() Low Memory globals |
492 |
|
if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then |
493 |
|
continue |
494 |
|
fi |
495 |
< |
if [[ "x$ac_cv_c_bigendian" = "xyes" ]]; then |
496 |
< |
dnl Requires only VOSF if 16-bit vidmode enable |
497 |
< |
if [[ "x$WANT_16BIT_VIDMODE" = "xyes" ]]; then |
461 |
< |
if [[ "x$CAN_VOSF" = "xno" ]]; then |
462 |
< |
continue |
463 |
< |
fi |
464 |
< |
else |
465 |
< |
DEFINES="$DEFINES -DDISABLE_16BIT_VIDMODE" |
466 |
< |
fi |
467 |
< |
else |
468 |
< |
dnl Requires VOSF |
469 |
< |
if [[ "x$CAN_VOSF" = "xno" ]]; then |
470 |
< |
continue |
471 |
< |
fi |
495 |
> |
dnl Requires VOSF screen updates |
496 |
> |
if [[ "x$CAN_VOSF" = "xno" ]]; then |
497 |
> |
continue |
498 |
|
fi |
499 |
< |
dnl Real addressing will probably work |
499 |
> |
dnl Real addressing will probably work. |
500 |
|
ADDRESSING_MODE="real" |
501 |
|
WANT_VOSF=yes dnl we can use VOSF and we need it actually |
502 |
|
DEFINES="$DEFINES -DREAL_ADDRESSING" |
503 |
|
break |
504 |
|
;; |
505 |
|
direct) |
506 |
< |
dnl Requires VOSF |
506 |
> |
dnl Requires VOSF screen updates |
507 |
|
if [[ "x$CAN_VOSF" = "xyes" ]]; then |
508 |
|
ADDRESSING_MODE="direct" |
509 |
|
WANT_VOSF=yes dnl we can use VOSF and we need it actually |
527 |
|
fi |
528 |
|
fi |
529 |
|
|
530 |
< |
dnl Since real and direct addressing modes automatically activate VOSF, |
531 |
< |
dnl I put this test here. |
506 |
< |
if [[ "x$WANT_VOSF" = "xyes" ]]; then |
507 |
< |
if [[ "x$CAN_VOSF" = "xno" ]]; then |
508 |
< |
AC_MSG_WARN([Sorry, your system does not support Video on SEGV signals]) |
509 |
< |
WANT_VOSF=no |
510 |
< |
else |
530 |
> |
dnl Enable VOSF screen updates with this feature is requested and feasible |
531 |
> |
if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then |
532 |
|
AC_DEFINE(ENABLE_VOSF) |
533 |
< |
fi |
533 |
> |
else |
534 |
> |
WANT_VOSF=no |
535 |
|
fi |
536 |
|
|
537 |
|
dnl Check for GAS. |
568 |
|
DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\"" |
569 |
|
if [[ "x$HAVE_GAS" = "xyes" ]]; then |
570 |
|
ASM_OPTIMIZATIONS=i386 |
571 |
< |
DEFINES="$DEFINES -DX86_ASSEMBLY -DOPTFLAGS" |
571 |
> |
DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS" |
572 |
|
CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s" |
573 |
|
FPUSRCS="../uae_cpu/fpu_x86.cpp" |
574 |
|
fi |
582 |
|
case "$SPARC_TYPE" in |
583 |
|
SPARC_V8) |
584 |
|
ASM_OPTIMIZATIONS="SPARC V8 architecture" |
585 |
< |
DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTFLAGS" |
585 |
> |
DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS" |
586 |
|
CFLAGS="$CFLAGS -Wa,-Av8" |
587 |
|
CXXFLAGS="$CXXFLAGS -Wa,-Av8" |
588 |
|
;; |
589 |
|
SPARC_V9) |
590 |
|
ASM_OPTIMIZATIONS="SPARC V9 architecture" |
591 |
< |
DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTFLAGS" |
591 |
> |
DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS" |
592 |
|
CFLAGS="$CFLAGS -Wa,-Av9" |
593 |
|
CXXFLAGS="$CXXFLAGS -Wa,-Av9" |
594 |
|
;; |