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 |
|
|
14 |
+ |
dnl FPU emulation core. |
15 |
+ |
AC_ARG_ENABLE(fpe, |
16 |
+ |
[ --enable-fpe=which specify which fpu emulator to use [default=opt]], |
17 |
+ |
[ case "$enableval" in |
18 |
+ |
default) FPE_CORE="default";; dnl fpu_x86.cpp if i386 architecture, fpu_uae.cpp otherwise |
19 |
+ |
uae) FPE_CORE="uae";; |
20 |
+ |
*) AC_MSG_ERROR([--enable-fpe takes only one of the following values: default, uae]);; |
21 |
+ |
esac |
22 |
+ |
], |
23 |
+ |
[ FPE_CORE="default" |
24 |
+ |
]) |
25 |
+ |
|
26 |
|
dnl Addressing modes. |
27 |
|
AC_ARG_ENABLE(addressing, |
28 |
|
[ --enable-addressing=AM specify the addressing mode to use [default=fastest]], |
222 |
|
CAN_NATIVE_M68K=no |
223 |
|
case "$target_os" in |
224 |
|
linux*) |
225 |
< |
ETHERSRC=Linux/ether_linux.cpp |
214 |
< |
SCSISRC=Linux/scsi_linux.cpp |
225 |
> |
ETHERSRC=ether_unix.cpp |
226 |
|
AUDIOSRC=audio_oss_esd.cpp |
227 |
+ |
SCSISRC=Linux/scsi_linux.cpp |
228 |
|
;; |
229 |
< |
freebsd*3.*) |
229 |
> |
freebsd*) |
230 |
> |
ETHERSRC=ether_unix.cpp |
231 |
|
AUDIOSRC=audio_oss_esd.cpp |
232 |
|
DEFINES="$DEFINES -DBSD_COMP" |
233 |
+ |
CXXFLAGS="$CXXFLAGS -fpermissive" |
234 |
|
dnl Check for the CAM library |
235 |
|
AC_CHECK_LIB(cam, cam_open_btl, HAVE_LIBCAM=yes, HAVE_LIBCAM=no) |
236 |
|
if [[ "x$HAVE_LIBCAM" = "xno" ]]; then |
237 |
|
AC_MSG_WARN([Cannot find libcam for SCSI management, disabling SCSI support.]) |
238 |
|
else |
239 |
|
dnl Check for the sys kernel includes |
240 |
< |
AC_CHECK_HEADER(/sys/cam/cam.h) |
241 |
< |
if [[ "x$ac_cv_header__sys_cam_cam_h" = "xno" ]]; then |
240 |
> |
AC_CHECK_HEADER(camlib.h) |
241 |
> |
if [[ "x$ac_cv_header_camlib_h" = "xno" ]]; then |
242 |
|
dnl In this case I should fix this thing including a "patch" |
243 |
|
dnl to access directly to the functions in the kernel :) --Orlando |
244 |
< |
AC_MSG_WARN([Cannot find kernel includes for CAM library, disabling SCSI support.]) |
244 |
> |
AC_MSG_WARN([Cannot find includes for CAM library, disabling SCSI support.]) |
245 |
|
else |
246 |
|
SCSISRC=FreeBSD/scsi_freebsd.cpp |
233 |
– |
CXXFLAGS="$CXXFLAGS -I/sys" |
234 |
– |
CFLAGS="$CFLAGS -I/sys" |
247 |
|
LIBS="$LIBS -lcam" |
248 |
|
DEFINES="$DEFINES -DCAM" |
249 |
|
fi |
250 |
|
fi |
251 |
|
;; |
240 |
– |
freebsd*) |
241 |
– |
DEFINES="$DEFINES -DBSD_COMP" |
242 |
– |
dnl Check for the SCSI library |
243 |
– |
AC_CHECK_LIB(scsi, scsi_open, HAVE_LIBSCSI=yes, HAVE_LIBSCSI=no) |
244 |
– |
if [[ "x$HAVE_LIBSCSI" = "xno" ]]; then |
245 |
– |
AC_MSG_WARN([Cannot find libscsi for SCSI management, disabling SCSI support.]) |
246 |
– |
else |
247 |
– |
dnl Check for the sys kernel includes |
248 |
– |
AC_CHECK_HEADER(scsi.h sys/scsiio.h) |
249 |
– |
if [[ "x$ac_cv_header_scsi_h" = "xno" ]]; then |
250 |
– |
AC_MSG_WARN([Cannot find includes for the SCSI library, disabling SCSI support.]) |
251 |
– |
else |
252 |
– |
SCSISRC=FreeBSD/scsi_freebsd.cpp |
253 |
– |
LIBS="$LIBS -lscsi" |
254 |
– |
fi |
255 |
– |
fi |
256 |
– |
;; |
252 |
|
netbsd*) |
253 |
|
CAN_NATIVE_M68K=yes |
254 |
|
;; |
262 |
|
dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS" |
263 |
|
DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS" |
264 |
|
LIBS="$LIBS -laudio" |
265 |
+ |
|
266 |
+ |
dnl Check if our compiler supports -Ofast (MIPSPro) |
267 |
+ |
HAVE_OFAST=no |
268 |
+ |
ocflags="$CFLAGS" |
269 |
+ |
CFLAGS=`echo $CFLAGS | sed -e 's/ -g / -Ofast /;s/^-g /-Ofast /;s/-g$/ -Ofast/;s/^-g$/-Ofast/'` |
270 |
+ |
AC_MSG_CHECKING(if "-Ofast" works) |
271 |
+ |
dnl Do a test compile of an empty function |
272 |
+ |
AC_TRY_COMPILE(,, [AC_MSG_RESULT(yes); HAVE_OFAST=yes], AC_MSG_RESULT(no)) |
273 |
+ |
CFLAGS="$ocflags" |
274 |
+ |
|
275 |
|
;; |
276 |
|
esac |
277 |
|
|
568 |
|
ASM_OPTIMIZATIONS=none |
569 |
|
CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" |
570 |
|
FPUSRCS="../uae_cpu/fpp.cpp" |
571 |
< |
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then |
571 |
> |
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" -a "x$OS_TYPE" != "xfreebsd" ]]; then |
572 |
|
dnl i386 CPU |
573 |
|
DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\"" |
574 |
|
if [[ "x$HAVE_GAS" = "xyes" ]]; then |
575 |
|
ASM_OPTIMIZATIONS=i386 |
576 |
|
DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS" |
577 |
< |
CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s" |
577 |
> |
CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s" |
578 |
|
FPUSRCS="../uae_cpu/fpu_x86.cpp" |
579 |
|
fi |
580 |
|
elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then |
606 |
|
CPUSRCS="asm_support.s" |
607 |
|
fi |
608 |
|
|
609 |
+ |
dnl Select appropriate FPU source. |
610 |
+ |
dnl 1. Optimized X86 assembly core if target is i386 architecture |
611 |
+ |
SAVED_DEFINES=$DEFINES |
612 |
+ |
if [[ "x$FPE_CORE" = "xdefault" ]]; then |
613 |
+ |
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then |
614 |
+ |
DEFINES="$DEFINES -DFPU_X86" |
615 |
+ |
FPE_CORE_STR="i386 optimized core" |
616 |
+ |
FPUSRCS="../uae_cpu/fpu/fpu_x86.cpp" |
617 |
+ |
else |
618 |
+ |
FPE_CORE="uae" |
619 |
+ |
fi |
620 |
+ |
fi |
621 |
+ |
|
622 |
+ |
dnl 2. JIT-FPU only supports IEEE-based implementation. |
623 |
+ |
if [[ "x$WANT_JIT_FPU" = "xyes" -a "x$FPE_CORE" != "xieee" ]]; then |
624 |
+ |
AC_MSG_WARN([Sorry, JIT-FPU supports only the "ieee" FPE implementation]) |
625 |
+ |
FPE_CORE="ieee" |
626 |
+ |
dnl Restore previous variables. FPE_CORE_STR and FPUSRCS are overwritten |
627 |
+ |
DEFINES=$SAVED_DEFINES |
628 |
+ |
fi |
629 |
+ |
|
630 |
+ |
dnl 3. Choose either IEEE-based implementation or the old UAE core |
631 |
+ |
if [[ "x$FPE_CORE" = "xieee" ]]; then |
632 |
+ |
AC_CHECK_HEADERS(fenv.h) |
633 |
+ |
AC_CHECK_FUNCS(feclearexcept fegetexceptflag feraiseexcept fesetexceptflag fetestexcept) |
634 |
+ |
AC_CHECK_FUNCS(fegetround fesetround) |
635 |
+ |
DEFINES="$DEFINES -DFPU_IEEE" |
636 |
+ |
FPE_CORE_STR="ieee-based fpu core" |
637 |
+ |
FPUSRCS="../uae_cpu/fpu/fpu_ieee.cpp" |
638 |
+ |
elif [[ "x$FPE_CORE" = "xuae" ]]; then |
639 |
+ |
DEFINES="$DEFINES -DFPU_UAE" |
640 |
+ |
FPE_CORE_STR="original uae core" |
641 |
+ |
FPUSRCS="../uae_cpu/fpu/fpu_uae.cpp" |
642 |
+ |
fi |
643 |
+ |
|
644 |
+ |
dnl Check for certain math functions |
645 |
+ |
AC_CHECK_FUNCS(atanh) |
646 |
+ |
AC_CHECK_FUNCS(isnan isinf) dnl C99 |
647 |
+ |
AC_CHECK_FUNCS(isnanl isinfl) dnl IEEE ? |
648 |
+ |
|
649 |
|
dnl UAE CPU sources for all non-m68k-native architectures. |
650 |
|
if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then |
651 |
|
CPUINCLUDES="-I../uae_cpu" |
659 |
|
CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'` |
660 |
|
fi |
661 |
|
|
662 |
+ |
dnl Or if we have -Ofast |
663 |
+ |
if [[ "x$HAVE_OFAST" = "xyes" ]]; then |
664 |
+ |
CFLAGS=`echo $CFLAGS | sed -e 's/ -g / -Ofast /;s/^-g /-Ofast /;s/-g$/ -Ofast/;s/^-g$/-Ofast/'` |
665 |
+ |
CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / -Ofast /;s/^-g /-Ofast /;s/ -g$/ -Ofast/;s/^-g$/-Ofast/'` |
666 |
+ |
CXXFLAGS="-LANG:std $CXXFLAGS" |
667 |
+ |
LDFLAGS="$LDFLAGS -Ofast" |
668 |
+ |
fi |
669 |
+ |
|
670 |
|
dnl Generate Makefile. |
671 |
|
AC_SUBST(DEFINES) |
672 |
|
AC_SUBST(SYSSRCS) |
686 |
|
echo GTK user interface ............... : $WANT_GTK |
687 |
|
echo mon debugger support ............. : $WANT_MON |
688 |
|
echo Running m68k code natively ....... : $WANT_NATIVE_M68K |
689 |
+ |
echo Floating-Point emulation core .... : $FPE_CORE_STR |
690 |
|
echo Assembly optimizations ........... : $ASM_OPTIMIZATIONS |
691 |
|
echo Addressing mode .................. : $ADDRESSING_MODE |
692 |
|
echo |