ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure.in
Revision: 1.62
Committed: 2002-09-13T12:51:24Z (22 years, 2 months ago) by gbeauche
Branch: MAIN
Changes since 1.61: +20 -15 lines
Log Message:
Updates for new FPU core architecture, add "ieee" core (x86 for now)

File Contents

# User Rev Content
1 cebix 1.1 dnl Process this file with autoconf to produce a configure script.
2 cebix 1.50 dnl Written in 2002 by Christian Bauer et al.
3 cebix 1.1
4     AC_INIT(main_unix.cpp)
5     AC_PREREQ(2.12)
6     AC_CONFIG_HEADER(config.h)
7    
8     dnl Options.
9 cebix 1.17 AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
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 cebix 1.42 AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes])
13 gbeauche 1.32
14 gbeauche 1.35 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 gbeauche 1.62 dnl default is fpu_x86.cpp if i386 architecture, fpu_uae.cpp otherwise
19     default) FPE_CORE="default";;
20     ieee) FPE_CORE="ieee";;
21 gbeauche 1.35 uae) FPE_CORE="uae";;
22 gbeauche 1.62 *) AC_MSG_ERROR([--enable-fpe takes only one of the following values: default, uae, ieee]);;
23 gbeauche 1.35 esac
24     ],
25     [ FPE_CORE="default"
26     ])
27    
28 gbeauche 1.32 dnl Addressing modes.
29 gbeauche 1.23 AC_ARG_ENABLE(addressing,
30 gbeauche 1.32 [ --enable-addressing=AM specify the addressing mode to use [default=fastest]],
31 gbeauche 1.23 [ case "$enableval" in
32 cebix 1.24 real) ADDRESSING_TEST_ORDER="real";;
33     direct) ADDRESSING_TEST_ORDER="direct";;
34     banks) ADDRESSING_TEST_ORDER="banks";;
35 gbeauche 1.32 fastest)ADDRESSING_TEST_ORDER="direct banks";;
36     *) AC_MSG_ERROR([--enable-addressing takes only one of the following values: fastest, real, direct, banks]);;
37 gbeauche 1.23 esac
38     ],
39     [ ADDRESSING_TEST_ORDER="direct banks"
40     ])
41 gbeauche 1.32
42     dnl External packages.
43 cebix 1.17 AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
44     AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
45     AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
46 cebix 1.1
47 gbeauche 1.23 dnl Canonical system information.
48     AC_CANONICAL_HOST
49     AC_CANONICAL_TARGET
50    
51     dnl Target OS type (target is host if not cross-compiling).
52     case "$target_os" in
53     linux*) OS_TYPE=linux;;
54     netbsd*) OS_TYPE=netbsd;;
55     freebsd*) OS_TYPE=freebsd;;
56     solaris*) OS_TYPE=solaris;;
57 gbeauche 1.44 darwin*) OS_TYPE=darwin;;
58     *) OS_TYPE=`echo $target_os | sed -e 's/-/_/g' | sed -e 's/\./_/g'`;;
59 gbeauche 1.23 esac
60     DEFINES="$DEFINES -DOS_$OS_TYPE"
61    
62     dnl Target CPU type.
63     HAVE_I386=no
64     HAVE_M68K=no
65     HAVE_SPARC=no
66 cebix 1.33 HAVE_POWERPC=no
67 gbeauche 1.23 case "$target_cpu" in
68     i386* | i486* | i586* | i686* | i786* ) CPU_TYPE=i386 HAVE_I386=yes;;
69     m68k* ) CPU_TYPE=m68k HAVE_M68K=yes;;
70     sparc* ) CPU_TYPE=sparc HAVE_SPARC=yes;;
71 cebix 1.33 powerpc* ) CPU_TYPE=powerpc HAVE_POWERPC=yes;;
72 gbeauche 1.44 *) CPU_TYPE=`echo $target_cpu | sed -e 's/-/_/g'`;;
73 gbeauche 1.23 esac
74     DEFINES="$DEFINES -DCPU_$CPU_TYPE"
75    
76 cebix 1.1 dnl Checks for programs.
77     AC_PROG_CC
78 gbeauche 1.23 AC_PROG_CC_C_O
79 cebix 1.4 AC_PROG_CPP
80 cebix 1.1 AC_PROG_CXX
81     AC_PROG_MAKE_SET
82     AC_PROG_INSTALL
83    
84 cebix 1.11 dnl We use mon if possible.
85     MONSRCS=
86 cebix 1.18 if [[ "x$WANT_MON" = "xyes" ]]; then
87     AC_MSG_CHECKING(for mon)
88 cebix 1.24 mon_srcdir=../../../mon/src
89     if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
90 cebix 1.18 AC_MSG_RESULT(yes)
91 cebix 1.19 AC_DEFINE(ENABLE_MON)
92 cebix 1.51 MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/mon_lowmem.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c"
93 cebix 1.24 CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
94 gbeauche 1.58 AC_CHECK_LIB(ncurses, tgetent, ,
95     AC_CHECK_LIB(termcap, tgetent, ,
96     AC_CHECK_LIB(termlib, tgetent, ,
97     AC_CHECK_LIB(terminfo, tgetent, ,
98     AC_CHECK_LIB(Hcurses, tgetent, ,
99     AC_CHECK_LIB(curses, tgetent))))))
100 cebix 1.18 AC_CHECK_LIB(readline, readline)
101 cebix 1.19 AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
102 cebix 1.18 else
103     AC_MSG_RESULT(no)
104     AC_MSG_WARN([Could not find mon, ignoring --with-mon.])
105     WANT_MON=no
106     fi
107 cebix 1.11 fi
108    
109 cebix 1.1 dnl Checks for libraries.
110 cebix 1.10 AC_CHECK_LIB(posix4, sem_init)
111 cebix 1.45 AC_CHECK_LIB(rt, timer_create)
112 cebix 1.10
113     dnl We need X11.
114 cebix 1.1 AC_PATH_XTRA
115     if [[ "x$no_x" = "xyes" ]]; then
116     AC_MSG_ERROR([You need X11 to run Basilisk II.])
117     fi
118     CFLAGS="$CFLAGS $X_CFLAGS"
119     CXXFLAGS="$CXXFLAGS $X_CFLAGS"
120     LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
121    
122 cebix 1.19 dnl We want pthreads. Try libpthread first, then libc_r (FreeBSD), then PTL.
123     HAVE_PTHREADS=yes
124 cebix 1.10 AC_CHECK_LIB(pthread, pthread_create, , [
125     AC_CHECK_LIB(c_r, pthread_create, , [
126     AC_CHECK_LIB(PTL, pthread_create, , [
127 cebix 1.19 HAVE_PTHREADS=no
128 cebix 1.10 ])
129     ])
130     ])
131 cebix 1.19 if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then
132     AC_DEFINE(HAVE_PTHREADS)
133     fi
134     AC_CHECK_FUNCS(pthread_cancel)
135 cebix 1.53 AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
136     AC_CHECK_FUNCS(pthread_mutexattr_settype)
137 cebix 1.10
138     dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
139 cebix 1.19 SEMSRC=
140 cebix 1.10 AC_CHECK_FUNCS(sem_init, , [
141 cebix 1.26 if test "x$HAVE_PTHREADS" = "xyes"; then
142 cebix 1.19 SEMSRC=posix_sem.cpp
143     fi
144 cebix 1.10 ])
145 cebix 1.1
146 cebix 1.10 dnl We use DGA (XFree86 or fbdev) if possible.
147 cebix 1.8 if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then
148 cebix 1.10 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, [
149 cebix 1.19 AC_DEFINE(ENABLE_XF86_DGA)
150 cebix 1.1 LIBS="$LIBS -lXxf86dga"
151 cebix 1.8 if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then
152     AC_MSG_WARN([Cannot have both --enable-xf86-dga and --enable-fbdev-dga, ignoring --enable-fbdev-dga.])
153     WANT_FBDEV_DGA=no
154     fi
155 cebix 1.10 ], [
156     AC_MSG_WARN([Could not find XFree86 DGA extension, ignoring --enable-xf86-dga.])
157 cebix 1.13 WANT_XF86_DGA=no
158 cebix 1.10 ])
159 cebix 1.8 fi
160     if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then
161 cebix 1.19 AC_DEFINE(ENABLE_FBDEV_DGA)
162 cebix 1.1 fi
163    
164 cebix 1.17 dnl We use XFree86 VidMode if possible.
165     if [[ "x$WANT_XF86_VIDMODE" = "xyes" ]]; then
166     AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, [
167 cebix 1.19 AC_DEFINE(ENABLE_XF86_VIDMODE)
168 cebix 1.17 LIBS="$LIBS -lXxf86vm"
169     ], [
170     AC_MSG_WARN([Could not find XFree86 VidMode extension, ignoring --enable-xf86-vidmode.])
171     WANT_XF86_VIDMODE=no
172     ])
173     fi
174    
175 cebix 1.1 dnl We use GTK+ if possible.
176 cebix 1.10 UISRCS=../dummy/prefs_editor_dummy.cpp
177 cebix 1.14 if [[ "x$WANT_GTK" = "xyes" ]]; then
178 cebix 1.10 AM_PATH_GTK(1.2.0, [
179 cebix 1.19 AC_DEFINE(ENABLE_GTK)
180 cebix 1.10 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
181     LIBS="$LIBS $GTK_LIBS"
182     UISRCS=prefs_editor_gtk.cpp
183 cebix 1.52 B2_PATH_GNOMEUI([
184     AC_DEFINE(HAVE_GNOMEUI)
185     CXXFLAGS="$CXXFLAGS $GNOMEUI_CFLAGS"
186     LIBS="$LIBS $GNOMEUI_LIBS"
187     ], [])
188 cebix 1.10 ], [
189     AC_MSG_WARN([Could not find GTK+, disabling user interface.])
190 cebix 1.14 WANT_GTK=no
191 cebix 1.10 ])
192 cebix 1.1 fi
193    
194 cebix 1.10 dnl We use ESD if possible.
195     if [[ "x$WANT_ESD" = "xyes" ]]; then
196     AM_PATH_ESD(0.2.8, [
197 cebix 1.19 AC_DEFINE(ENABLE_ESD)
198 cebix 1.10 CFLAGS="$CFLAGS $ESD_CFLAGS"
199     CXXFLAGS="$CXXFLAGS $ESD_CFLAGS"
200     LIBS="$LIBS $ESD_LIBS"
201     ], [
202     AC_MSG_WARN([Could not find ESD, disabling ESD support.])
203     WANT_ESD=no
204     ])
205 gbeauche 1.56 fi
206    
207     dnl We use 64-bit file size support if possible.
208     dnl FIXME: Use AC_SYS_LARGEFILE from autoconf 2.5+
209     if [[ "x$OS_TYPE" = "xlinux" ]]; then
210     AC_DEFINE(_USE_LARGEFILE_SOURCE, 1, [Get more functions for correct standard I/O])
211     AC_DEFINE(_FILE_OFFSET_BITS, 64, [Get 64-bit file size support])
212 cebix 1.1 fi
213    
214     dnl Checks for header files.
215     AC_HEADER_STDC
216 gbeauche 1.44 AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/mman.h)
217 cebix 1.1
218     dnl Checks for typedefs, structures, and compiler characteristics.
219     AC_C_BIGENDIAN
220     AC_C_CONST
221     AC_C_INLINE
222     AC_CHECK_SIZEOF(short, 2)
223     AC_CHECK_SIZEOF(int, 4)
224     AC_CHECK_SIZEOF(long, 4)
225     AC_CHECK_SIZEOF(long long, 8)
226 gbeauche 1.62 AC_CHECK_SIZEOF(float, 4)
227     AC_CHECK_SIZEOF(double, 8)
228     AC_CHECK_SIZEOF(long double, 12)
229 gbeauche 1.23 AC_CHECK_SIZEOF(void *, 4)
230 cebix 1.1 AC_TYPE_OFF_T
231     AC_CHECK_TYPE(loff_t, off_t)
232 gbeauche 1.55 AC_CHECK_TYPE(caddr_t, [char *])
233 cebix 1.1 AC_TYPE_SIZE_T
234 gbeauche 1.23 AC_TYPE_SIGNAL
235 cebix 1.1 AC_HEADER_TIME
236     AC_STRUCT_TM
237 gbeauche 1.54
238     dnl Check whether sys/socket.h defines type socklen_t.
239     dnl (extracted from ac-archive/Miscellaneous)
240     AC_CACHE_CHECK("for socklen_t",
241     ac_cv_type_socklen_t, [
242     AC_TRY_COMPILE([
243     #include <sys/types.h>
244     #include <sys/socket.h>
245     ], [socklen_t len = 42; return 0;],
246     ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no,
247     dnl When cross-compiling, do not assume anything.
248     ac_cv_type_socklen_t="guessing no"
249     )
250     ])
251     if [[ "x$ac_cv_type_socklen_t" != "xyes" ]]; then
252     AC_DEFINE(socklen_t, int)
253     fi
254 cebix 1.1
255     dnl Checks for library functions.
256     AC_CHECK_FUNCS(strdup cfmakeraw)
257 cebix 1.21 AC_CHECK_FUNCS(clock_gettime timer_create)
258 gbeauche 1.40 AC_CHECK_FUNCS(sigaction signal)
259 gbeauche 1.44 AC_CHECK_FUNCS(mmap mprotect munmap)
260     AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect)
261    
262     dnl Darwin seems to define mach_task_self() instead of task_self().
263     AC_CHECK_FUNCS(mach_task_self task_self)
264 cebix 1.1
265 cebix 1.61 dnl Check for headers and functions related to pty support (sshpty.c)
266     dnl From openssh-3.2.2p1 configure.ac
267    
268     AC_CHECK_HEADERS(strings.h login.h sys/bsdtty.h sys/stat.h util.h pty.h)
269     AC_CHECK_FUNCS(_getpty vhangup strlcpy)
270    
271     case "$host" in
272     *-*-hpux10.26)
273     disable_ptmx_check=yes
274     ;;
275     *-*-linux*)
276     no_dev_ptmx=1
277     ;;
278     mips-sony-bsd|mips-sony-newsos4)
279     AC_DEFINE(HAVE_NEWS4)
280     ;;
281     *-*-sco3.2v4*)
282     no_dev_ptmx=1
283     ;;
284     *-*-sco3.2v5*)
285     no_dev_ptmx=1
286     ;;
287     esac
288    
289     if test -z "$no_dev_ptmx" ; then
290     if test "x$disable_ptmx_check" != "xyes" ; then
291     AC_CHECK_FILE("/dev/ptmx",
292     [
293     AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
294     have_dev_ptmx=1
295     ]
296     )
297     fi
298     fi
299     AC_CHECK_FILE("/dev/ptc",
300     [
301     AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
302     have_dev_ptc=1
303     ]
304     )
305    
306     dnl (end of code from openssh-3.2.2p1 configure.ac)
307    
308    
309 cebix 1.1 dnl Select system-dependant source files.
310 cebix 1.19 SERIALSRC=serial_unix.cpp
311     ETHERSRC=../dummy/ether_dummy.cpp
312     SCSISRC=../dummy/scsi_dummy.cpp
313     AUDIOSRC=../dummy/audio_dummy.cpp
314     EXTRASYSSRCS=
315 cebix 1.27 CAN_NATIVE_M68K=no
316 gbeauche 1.23 case "$target_os" in
317     linux*)
318 cebix 1.38 ETHERSRC=ether_unix.cpp
319     AUDIOSRC=audio_oss_esd.cpp
320 gbeauche 1.23 SCSISRC=Linux/scsi_linux.cpp
321     ;;
322 cebix 1.38 freebsd*)
323     ETHERSRC=ether_unix.cpp
324 gbeauche 1.23 AUDIOSRC=audio_oss_esd.cpp
325     DEFINES="$DEFINES -DBSD_COMP"
326 cebix 1.38 CXXFLAGS="$CXXFLAGS -fpermissive"
327 gbeauche 1.23 dnl Check for the CAM library
328     AC_CHECK_LIB(cam, cam_open_btl, HAVE_LIBCAM=yes, HAVE_LIBCAM=no)
329     if [[ "x$HAVE_LIBCAM" = "xno" ]]; then
330     AC_MSG_WARN([Cannot find libcam for SCSI management, disabling SCSI support.])
331     else
332     dnl Check for the sys kernel includes
333 cebix 1.38 AC_CHECK_HEADER(camlib.h)
334     if [[ "x$ac_cv_header_camlib_h" = "xno" ]]; then
335 gbeauche 1.23 dnl In this case I should fix this thing including a "patch"
336     dnl to access directly to the functions in the kernel :) --Orlando
337 cebix 1.38 AC_MSG_WARN([Cannot find includes for CAM library, disabling SCSI support.])
338 gbeauche 1.23 else
339     SCSISRC=FreeBSD/scsi_freebsd.cpp
340     LIBS="$LIBS -lcam"
341     DEFINES="$DEFINES -DCAM"
342     fi
343     fi
344     ;;
345     netbsd*)
346 cebix 1.27 CAN_NATIVE_M68K=yes
347 gbeauche 1.23 ;;
348     solaris*)
349     AUDIOSRC=Solaris/audio_solaris.cpp
350     DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
351     ;;
352     irix*)
353 cebix 1.48 ETHERSRC=ether_unix.cpp
354 cebix 1.30 AUDIOSRC=Irix/audio_irix.cpp
355 gbeauche 1.23 EXTRASYSSRCS=Irix/unaligned.c
356 cebix 1.28 dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
357     DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
358 cebix 1.30 LIBS="$LIBS -laudio"
359 cebix 1.48 WANT_ESD=no
360 cebix 1.37
361     dnl Check if our compiler supports -Ofast (MIPSPro)
362     HAVE_OFAST=no
363     ocflags="$CFLAGS"
364     CFLAGS=`echo $CFLAGS | sed -e 's/ -g / -Ofast /;s/^-g /-Ofast /;s/-g$/ -Ofast/;s/^-g$/-Ofast/'`
365     AC_MSG_CHECKING(if "-Ofast" works)
366     dnl Do a test compile of an empty function
367     AC_TRY_COMPILE(,, [AC_MSG_RESULT(yes); HAVE_OFAST=yes], AC_MSG_RESULT(no))
368     CFLAGS="$ocflags"
369    
370 gbeauche 1.23 ;;
371     esac
372    
373 cebix 1.27 dnl Use 68k CPU natively?
374     WANT_NATIVE_M68K=no
375     if [[ "x$HAVE_M68K" = "xyes" -a "x$CAN_NATIVE_M68K" = "xyes" ]]; then
376     AC_DEFINE(ENABLE_NATIVE_M68K)
377     WANT_NATIVE_M68K=yes
378     fi
379    
380 gbeauche 1.23 if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
381     dnl Serial, ethernet and audio support needs pthreads
382     AC_MSG_WARN([You don't have pthreads, disabling serial, ethernet and audio support.])
383     SERIALSRC=../dummy/serial_dummy.cpp
384     ETHERSRC=../dummy/ether_dummy.cpp
385     AUDIOSRC=../dummy/audio_dummy.cpp
386     fi
387     SYSSRCS="$SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
388    
389     dnl Define a macro that translates a yesno-variable into a C macro definition
390     dnl to be put into the config.h file
391     dnl $1 -- the macro to define
392     dnl $2 -- the value to translate
393     AC_DEFUN(AC_TRANSLATE_DEFINE, [
394 gbeauche 1.44 if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then
395 gbeauche 1.23 AC_DEFINE($1)
396     fi
397     ])
398    
399 gbeauche 1.44 dnl Various checks if the system supports vm_allocate() and the like functions.
400     have_mach_vm=no
401     if [[ "x$ac_cv_func_vm_allocate" = "xyes" -a "x$ac_cv_func_vm_deallocate" = "xyes" -a \
402     "x$ac_cv_func_vm_protect" = "xyes" ]]; then
403     have_mach_vm=yes
404     fi
405     AC_TRANSLATE_DEFINE(HAVE_MACH_VM, "$have_mach_vm")
406    
407     dnl Check that vm_allocate(), vm_protect() work
408     if [[ "x$have_mach_vm" = "xyes" ]]; then
409    
410     AC_CACHE_CHECK("whether vm_protect works",
411     ac_cv_vm_protect_works, [
412     AC_LANG_SAVE
413     AC_LANG_CPLUSPLUS
414     ac_cv_vm_protect_works=yes
415     dnl First the tests that should segfault
416     for test_def in NONE_READ NONE_WRITE READ_WRITE; do
417     AC_TRY_RUN([
418     #define CONFIGURE_TEST_VM_MAP
419     #define TEST_VM_PROT_$test_def
420     #include "vm_alloc.cpp"
421     ], ac_cv_vm_protect_works=no, rm -f core,
422     dnl When cross-compiling, do not assume anything
423     ac_cv_vm_protect_works="guessing no"
424     )
425     done
426     AC_TRY_RUN([
427     #define CONFIGURE_TEST_VM_MAP
428     #define TEST_VM_PROT_RDWR_WRITE
429     #include "vm_alloc.cpp"
430     ], , ac_cv_vm_protect_works=no,
431     dnl When cross-compiling, do not assume anything
432     ac_cv_vm_protect_works="guessing no"
433     )
434     AC_LANG_RESTORE
435     ]
436     )
437    
438     dnl Remove support for vm_allocate() if vm_protect() does not work
439     if [[ "x$have_mach_vm" = "xyes" ]]; then
440     case $ac_cv_vm_protect_works in
441     *yes) have_mach_vm=yes;;
442     *no) have_mach_vm=no;;
443     esac
444     fi
445     AC_TRANSLATE_DEFINE(HAVE_MACH_VM, "$have_mach_vm")
446    
447     fi dnl HAVE_MACH_VM
448    
449     dnl Various checks if the system supports mmap() and the like functions.
450     dnl ... and Mach memory allocators are not supported
451     have_mmap_vm=no
452     if [[ "x$ac_cv_func_mmap" = "xyes" -a "x$ac_cv_func_munmap" = "xyes" -a \
453     "x$ac_cv_func_mprotect" = "xyes" ]]; then
454     if [[ "x$have_mach_vm" = "xno" ]]; then
455     have_mmap_vm=yes
456     fi
457     fi
458     AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, "$have_mmap_vm")
459    
460     dnl Check that mmap() and associated functions work.
461     if [[ "x$have_mmap_vm" = "xyes" ]]; then
462    
463     dnl Check if we have a working anonymous mmap()
464     AC_CACHE_CHECK("whether mmap supports MAP_ANON",
465     ac_cv_mmap_anon, [
466     AC_LANG_SAVE
467     AC_LANG_CPLUSPLUS
468     AC_TRY_RUN([
469     #define HAVE_MMAP_ANON
470     #define CONFIGURE_TEST_VM_MAP
471     #define TEST_VM_MMAP_ANON
472     #include "vm_alloc.cpp"
473     ], ac_cv_mmap_anon=yes, ac_cv_mmap_anon=no,
474     dnl When cross-compiling, do not assume anything.
475     ac_cv_mmap_anon="guessing no"
476     )
477     AC_LANG_RESTORE
478     ]
479     )
480     AC_TRANSLATE_DEFINE(HAVE_MMAP_ANON, "$ac_cv_mmap_anon")
481    
482     AC_CACHE_CHECK("whether mmap supports MAP_ANONYMOUS",
483     ac_cv_mmap_anonymous, [
484     AC_LANG_SAVE
485     AC_LANG_CPLUSPLUS
486     AC_TRY_RUN([
487     #define HAVE_MMAP_ANONYMOUS
488     #define CONFIGURE_TEST_VM_MAP
489     #define TEST_VM_MMAP_ANON
490     #include "vm_alloc.cpp"
491     ], ac_cv_mmap_anonymous=yes, ac_cv_mmap_anonymous=no,
492     dnl When cross-compiling, do not assume anything.
493     ac_cv_mmap_anonymous="guessing no"
494     )
495     AC_LANG_RESTORE
496     ]
497     )
498     AC_TRANSLATE_DEFINE(HAVE_MMAP_ANONYMOUS, "$ac_cv_mmap_anonymous")
499    
500     AC_CACHE_CHECK("whether mprotect works",
501     ac_cv_mprotect_works, [
502     AC_LANG_SAVE
503     AC_LANG_CPLUSPLUS
504     ac_cv_mprotect_works=yes
505     dnl First the tests that should segfault
506     for test_def in NONE_READ NONE_WRITE READ_WRITE; do
507     AC_TRY_RUN([
508     #define CONFIGURE_TEST_VM_MAP
509     #define TEST_VM_PROT_$test_def
510     #include "vm_alloc.cpp"
511     ], ac_cv_mprotect_works=no, rm -f core,
512     dnl When cross-compiling, do not assume anything
513     ac_cv_mprotect_works="guessing no"
514     )
515     done
516     AC_TRY_RUN([
517     #define CONFIGURE_TEST_VM_MAP
518     #define TEST_VM_PROT_RDWR_WRITE
519     #include "vm_alloc.cpp"
520     ], , ac_cv_mprotect_works=no,
521     dnl When cross-compiling, do not assume anything
522     ac_cv_mprotect_works="guessing no"
523     )
524     AC_LANG_RESTORE
525     ]
526     )
527    
528     dnl Remove support for mmap() if mprotect() does not work
529     if [[ "x$have_mmap_vm" = "xyes" ]]; then
530     case $ac_cv_mprotect_works in
531     *yes) have_mmap_vm=yes;;
532     *no) have_mmap_vm=no;;
533     esac
534     fi
535     AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_mmap_vm)
536    
537     fi dnl HAVE_MMAP_VM
538    
539 gbeauche 1.23 dnl Check if we can mmap 0x2000 bytes from 0x0000
540     AC_CACHE_CHECK("whether we can map Low Memory area 0x0000-0x2000",
541     ac_cv_can_map_lm, [
542     AC_LANG_SAVE
543     AC_LANG_CPLUSPLUS
544     AC_TRY_RUN([
545 gbeauche 1.44 #include "vm_alloc.cpp"
546     int main(void) { /* returns 0 if we could map the lowmem globals */
547     volatile char * lm;
548     if (vm_init() < 0) exit(1);
549     if ((lm = (volatile char *)vm_acquire_fixed(0, 0x2000)) == VM_MAP_FAILED) exit(1);
550     lm[0] = 'z';
551     if (vm_release((char *)lm, 0x2000) < 0) exit(1);
552     vm_exit(); exit(0);
553 gbeauche 1.23 }
554 gbeauche 1.44 ], ac_cv_can_map_lm=yes, ac_cv_can_map_lm=no,
555     dnl When cross-compiling, do not assume anything.
556     ac_cv_can_map_lm="guessing no"
557 gbeauche 1.23 )
558     AC_LANG_RESTORE
559     ]
560     )
561    
562 gbeauche 1.40 dnl Check signal handlers need to be reinstalled
563     AC_CACHE_CHECK("whether signal handlers need to be reinstalled",
564 gbeauche 1.44 ac_cv_signal_need_reinstall, [
565     AC_LANG_SAVE
566     AC_LANG_CPLUSPLUS
567     AC_TRY_RUN([
568     #include <stdlib.h>
569     #ifdef HAVE_UNISTD_H
570     #include <unistd.h>
571     #endif
572     #include <signal.h>
573     static int handled_signal = 0;
574     RETSIGTYPE sigusr1_handler(int) { handled_signal++; }
575     int main(void) { /* returns 0 if signals need not to be reinstalled */
576     signal(SIGUSR1, sigusr1_handler); raise(SIGUSR1); raise(SIGUSR1);
577     exit(handled_signal == 2);
578     }
579     ], ac_cv_signal_need_reinstall=yes, ac_cv_signal_need_reinstall=no,
580     dnl When cross-compiling, do not assume anything.
581     ac_cv_signal_need_reinstall="guessing yes"
582     )
583     AC_LANG_RESTORE
584     ]
585 gbeauche 1.40 )
586     AC_TRANSLATE_DEFINE(SIGNAL_NEED_REINSTALL, "$ac_cv_signal_need_reinstall")
587    
588     dnl Check if sigaction handlers need to be reinstalled
589     AC_CACHE_CHECK("whether sigaction handlers need to be reinstalled",
590     ac_cv_sigaction_need_reinstall, [
591     AC_LANG_SAVE
592     AC_LANG_CPLUSPLUS
593     AC_TRY_RUN([
594     #include <stdlib.h>
595     #ifdef HAVE_UNISTD_H
596     #include <unistd.h>
597     #endif
598     #include <signal.h>
599     static int handled_signal = 0;
600     RETSIGTYPE sigusr1_handler(int) { handled_signal++; }
601     typedef RETSIGTYPE (*signal_handler)(int);
602     static signal_handler mysignal(int sig, signal_handler handler) {
603     struct sigaction old_sa;
604     struct sigaction new_sa;
605     new_sa.sa_handler = handler;
606     return ((sigaction(sig,&new_sa,&old_sa) < 0) ? SIG_IGN : old_sa.sa_handler);
607     }
608     int main(void) { /* returns 0 if signals need not to be reinstalled */
609     mysignal(SIGUSR1, sigusr1_handler); raise(SIGUSR1); raise(SIGUSR1);
610     exit(handled_signal == 2);
611     }
612 gbeauche 1.44 ], ac_cv_sigaction_need_reinstall=yes, ac_cv_sigaction_need_reinstall=no,
613     dnl When cross-compiling, do not assume anything.
614     ac_cv_sigaction_need_reinstall="guessing yes"
615 gbeauche 1.40 )
616     AC_LANG_RESTORE
617     ]
618     )
619     AC_TRANSLATE_DEFINE(SIGACTION_NEED_REINSTALL, "$ac_cv_sigaction_need_reinstall")
620    
621 gbeauche 1.23 dnl Check if extended signals are supported.
622     AC_CACHE_CHECK("whether your system supports extended signal handlers",
623     ac_cv_have_extended_signals, [
624     AC_LANG_SAVE
625     AC_LANG_CPLUSPLUS
626     AC_TRY_RUN([
627 gbeauche 1.40 #define HAVE_SIGINFO_T 1
628 gbeauche 1.44 #define CONFIGURE_TEST_SIGSEGV_RECOVERY
629     #include "vm_alloc.cpp"
630 gbeauche 1.40 #include "sigsegv.cpp"
631 gbeauche 1.44 ], ac_cv_have_extended_signals=yes, ac_cv_have_extended_signals=no,
632     dnl When cross-compiling, do not assume anything.
633     ac_cv_have_extended_signals=no
634 gbeauche 1.23 )
635     AC_LANG_RESTORE
636     ]
637     )
638     AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals")
639 gbeauche 1.60
640 gbeauche 1.23 dnl Otherwise, check for subterfuges.
641     if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
642 gbeauche 1.40 AC_CACHE_CHECK("whether we then have a subterfuge for your system",
643     ac_cv_have_sigcontext_hack, [
644     AC_LANG_SAVE
645     AC_LANG_CPLUSPLUS
646     AC_TRY_RUN([
647     #define HAVE_SIGCONTEXT_SUBTERFUGE 1
648 gbeauche 1.44 #define CONFIGURE_TEST_SIGSEGV_RECOVERY
649     #include "vm_alloc.cpp"
650 gbeauche 1.40 #include "sigsegv.cpp"
651 gbeauche 1.44 ], ac_cv_have_sigcontext_hack=yes, ac_cv_have_sigcontext_hack=no,
652     dnl When cross-compiling, do not assume anything.
653     ac_cv_have_sigcontext_hack=no
654 gbeauche 1.40 )
655     AC_LANG_RESTORE
656     ])
657     AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, "$ac_cv_have_sigcontext_hack")
658 gbeauche 1.23 fi
659 gbeauche 1.60
660     dnl Check if we can ignore the fault (instruction skipping in SIGSEGV handler)
661     AC_CACHE_CHECK("whether we can skip instruction in SIGSEGV handler",
662     ac_cv_have_skip_instruction, [
663     AC_LANG_SAVE
664     AC_LANG_CPLUSPLUS
665     AC_TRY_RUN([
666     #define HAVE_SIGSEGV_SKIP_INSTRUCTION 1
667     #define CONFIGURE_TEST_SIGSEGV_RECOVERY
668     #include "vm_alloc.cpp"
669     #include "sigsegv.cpp"
670     ], ac_cv_have_skip_instruction=yes, ac_cv_have_skip_instruction=no,
671     dnl When cross-compiling, do not assume anything.
672     ac_cv_have_skip_instruction=no
673     )
674     AC_LANG_RESTORE
675     ]
676     )
677     AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_INSTRUCTION, "$ac_cv_have_skip_instruction")
678 gbeauche 1.23
679     dnl Can we do Video on SEGV Signals ?
680     CAN_VOSF=no
681     if [[ "$ac_cv_have_extended_signals" = "yes" -o "$ac_cv_have_sigcontext_hack" = "yes" ]]; then
682     CAN_VOSF=yes
683     fi
684    
685     dnl Determine the addressing mode to use
686 cebix 1.27 if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
687     ADDRESSING_MODE="real"
688     else
689     ADDRESSING_MODE=""
690     AC_MSG_CHECKING([for the addressing mode to use])
691     for am in $ADDRESSING_TEST_ORDER; do
692     case $am in
693     real)
694 gbeauche 1.32 dnl Requires ability to mmap() Low Memory globals
695 cebix 1.27 if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
696     continue
697     fi
698 gbeauche 1.32 dnl Requires VOSF screen updates
699     if [[ "x$CAN_VOSF" = "xno" ]]; then
700     continue
701 cebix 1.1 fi
702 gbeauche 1.32 dnl Real addressing will probably work.
703 cebix 1.27 ADDRESSING_MODE="real"
704     WANT_VOSF=yes dnl we can use VOSF and we need it actually
705     DEFINES="$DEFINES -DREAL_ADDRESSING"
706     break
707     ;;
708     direct)
709 gbeauche 1.32 dnl Requires VOSF screen updates
710 cebix 1.27 if [[ "x$CAN_VOSF" = "xyes" ]]; then
711     ADDRESSING_MODE="direct"
712     WANT_VOSF=yes dnl we can use VOSF and we need it actually
713     DEFINES="$DEFINES -DDIRECT_ADDRESSING"
714     break
715 cebix 1.1 fi
716 cebix 1.27 ;;
717     banks)
718     dnl Default addressing mode
719     ADDRESSING_MODE="memory banks"
720 gbeauche 1.23 break
721 cebix 1.27 ;;
722     *)
723     AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
724     esac
725     done
726     AC_MSG_RESULT($ADDRESSING_MODE)
727     if [[ "x$ADDRESSING_MODE" = "x" ]]; then
728     AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
729 gbeauche 1.23 ADDRESSING_MODE="memory banks"
730 cebix 1.27 fi
731 cebix 1.8 fi
732 gbeauche 1.23
733 gbeauche 1.32 dnl Enable VOSF screen updates with this feature is requested and feasible
734     if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then
735     AC_DEFINE(ENABLE_VOSF)
736     else
737 gbeauche 1.23 WANT_VOSF=no
738 cebix 1.19 fi
739 cebix 1.9
740 cebix 1.3 dnl Check for GAS.
741 cebix 1.1 HAVE_GAS=no
742     AC_MSG_CHECKING(for GAS .p2align feature)
743     cat >conftest.S << EOF
744     .text
745     .p2align 5
746     EOF
747     if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVE_GAS=yes; fi
748     AC_MSG_RESULT($HAVE_GAS)
749    
750 cebix 1.3 dnl Check for GCC 2.7 or higher.
751 cebix 1.1 HAVE_GCC27=no
752     AC_MSG_CHECKING(for GCC 2.7 or higher)
753     AC_EGREP_CPP(yes,
754     [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
755     yes
756     #endif
757     ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
758    
759 gbeauche 1.46 dnl Check for GCC 3.0 or higher.
760     HAVE_GCC30=no
761     AC_MSG_CHECKING(for GCC 3.0 or higher)
762     AC_EGREP_CPP(yes,
763     [#if __GNUC__ >= 3
764     yes
765     #endif
766     ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
767    
768 cebix 1.19 dnl Set "-fomit-frame-pointer" on i386 GCC 2.7 or higher.
769 cebix 1.53 dnl Also set "-fno-exceptions" for C++ because exception handling requires
770     dnl the frame pointer.
771 cebix 1.19 if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
772 cebix 1.1 CFLAGS="$CFLAGS -fomit-frame-pointer"
773 cebix 1.53 CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -fno-exceptions"
774 cebix 1.1 fi
775    
776 gbeauche 1.46 dnl (gb) Do not merge constants since it breaks fpu/fpu_x86.cpp.
777     dnl As of 2001/08/02, this affects the following compilers:
778     dnl Official: probably gcc-3.1 (mainline CVS)
779     dnl Mandrake: gcc-2.96 >= 0.59mdk, gcc-3.0.1 >= 0.1mdk
780     dnl Red Hat : gcc-2.96 >= 89, gcc-3.0 >= 1
781     if [[ "x$HAVE_GCC27" = "xyes" ]]; then
782     SAVED_CXXFLAGS="$CXXFLAGS"
783 gbeauche 1.47 CXXFLAGS="$CXXFLAGS -fno-merge-constants"
784 gbeauche 1.46 AC_CACHE_CHECK([whether GCC supports constants merging], ac_cv_gcc_constants_merging, [
785     AC_LANG_SAVE
786     AC_LANG_CPLUSPLUS
787     AC_TRY_COMPILE([],[],[ac_cv_gcc_constants_merging=yes],[ac_cv_gcc_constants_merging=no])
788     AC_LANG_RESTORE
789     ])
790     if [[ "x$ac_cv_gcc_constants_merging" != "xyes" ]]; then
791     CXXFLAGS="$SAVED_CXXFLAGS"
792     fi
793     fi
794    
795 cebix 1.3 dnl Select appropriate CPU source and REGPARAM define.
796 gbeauche 1.23 ASM_OPTIMIZATIONS=none
797 cebix 1.9 CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
798 cebix 1.41 FPUSRCS="../uae_cpu/fpu/fpu_uae.cpp"
799 cebix 1.38 if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" -a "x$OS_TYPE" != "xfreebsd" ]]; then
800 cebix 1.9 dnl i386 CPU
801 cebix 1.1 DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
802     if [[ "x$HAVE_GAS" = "xyes" ]]; then
803 gbeauche 1.23 ASM_OPTIMIZATIONS=i386
804 gbeauche 1.31 DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS"
805 gbeauche 1.34 CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
806 gbeauche 1.22 FPUSRCS="../uae_cpu/fpu_x86.cpp"
807 cebix 1.1 fi
808 cebix 1.9 elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
809     dnl SPARC CPU
810 gbeauche 1.23 case "$target_os" in
811     solaris*)
812 cebix 1.9 AC_MSG_CHECKING(SPARC CPU architecture)
813     SPARC_TYPE=`Solaris/which_sparc`
814     AC_MSG_RESULT($SPARC_TYPE)
815     case "$SPARC_TYPE" in
816     SPARC_V8)
817 cebix 1.26 ASM_OPTIMIZATIONS="SPARC V8 architecture"
818 gbeauche 1.31 DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
819 cebix 1.9 CFLAGS="$CFLAGS -Wa,-Av8"
820     CXXFLAGS="$CXXFLAGS -Wa,-Av8"
821     ;;
822     SPARC_V9)
823 cebix 1.26 ASM_OPTIMIZATIONS="SPARC V9 architecture"
824 gbeauche 1.31 DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
825 cebix 1.9 CFLAGS="$CFLAGS -Wa,-Av9"
826     CXXFLAGS="$CXXFLAGS -Wa,-Av9"
827     ;;
828     esac
829     ;;
830     esac
831 cebix 1.27 elif [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
832 cebix 1.19 dnl Native m68k, no emulation
833 cebix 1.27 CPUINCLUDES="-I../native_cpu"
834     CPUSRCS="asm_support.s"
835 cebix 1.1 fi
836 cebix 1.9
837 gbeauche 1.35 dnl Select appropriate FPU source.
838 gbeauche 1.62 dnl 1. Optimized X86 assembly core if target is i386 architecture.
839 gbeauche 1.35 SAVED_DEFINES=$DEFINES
840     if [[ "x$FPE_CORE" = "xdefault" ]]; then
841     if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
842     DEFINES="$DEFINES -DFPU_X86"
843     FPE_CORE_STR="i386 optimized core"
844     FPUSRCS="../uae_cpu/fpu/fpu_x86.cpp"
845 gbeauche 1.46 FPE_CORE="i386"
846 gbeauche 1.36 else
847     FPE_CORE="uae"
848 gbeauche 1.35 fi
849     fi
850    
851     dnl 2. JIT-FPU only supports IEEE-based implementation.
852     if [[ "x$WANT_JIT_FPU" = "xyes" -a "x$FPE_CORE" != "xieee" ]]; then
853     AC_MSG_WARN([Sorry, JIT-FPU supports only the "ieee" FPE implementation])
854     FPE_CORE="ieee"
855     dnl Restore previous variables. FPE_CORE_STR and FPUSRCS are overwritten
856     DEFINES=$SAVED_DEFINES
857     fi
858    
859 gbeauche 1.62 dnl 3. Choose either IEEE-based implementation or the old UAE core.
860 gbeauche 1.35 if [[ "x$FPE_CORE" = "xieee" ]]; then
861     AC_CHECK_HEADERS(fenv.h)
862     AC_CHECK_FUNCS(feclearexcept fegetexceptflag feraiseexcept fesetexceptflag fetestexcept)
863     AC_CHECK_FUNCS(fegetround fesetround)
864     DEFINES="$DEFINES -DFPU_IEEE"
865     FPE_CORE_STR="ieee-based fpu core"
866     FPUSRCS="../uae_cpu/fpu/fpu_ieee.cpp"
867     elif [[ "x$FPE_CORE" = "xuae" ]]; then
868     DEFINES="$DEFINES -DFPU_UAE"
869     FPE_CORE_STR="original uae core"
870     FPUSRCS="../uae_cpu/fpu/fpu_uae.cpp"
871     fi
872    
873     dnl Check for certain math functions
874     AC_CHECK_FUNCS(atanh)
875     AC_CHECK_FUNCS(isnan isinf) dnl C99
876     AC_CHECK_FUNCS(isnanl isinfl) dnl IEEE ?
877    
878 cebix 1.19 dnl UAE CPU sources for all non-m68k-native architectures.
879     if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then
880 cebix 1.20 CPUINCLUDES="-I../uae_cpu"
881 gbeauche 1.22 CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS"
882 cebix 1.19 fi
883 cebix 1.1
884 gbeauche 1.23 dnl Remove the "-g" option if set for GCC.
885     if [[ "x$HAVE_GCC27" = "xyes" ]]; then
886 gbeauche 1.43 CFLAGS=`echo $CFLAGS | sed -e 's/-g//g'`
887     CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-g//g'`
888 cebix 1.37 fi
889    
890     dnl Or if we have -Ofast
891     if [[ "x$HAVE_OFAST" = "xyes" ]]; then
892 gbeauche 1.43 CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -Ofast"
893     CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -Ofast"
894 cebix 1.37 CXXFLAGS="-LANG:std $CXXFLAGS"
895 cebix 1.59 LDFLAGS="$LDFLAGS -ipa"
896 gbeauche 1.23 fi
897    
898 cebix 1.3 dnl Generate Makefile.
899 cebix 1.1 AC_SUBST(DEFINES)
900     AC_SUBST(SYSSRCS)
901     AC_SUBST(CPUINCLUDES)
902     AC_SUBST(CPUSRCS)
903     AC_OUTPUT(Makefile)
904 cebix 1.12
905     dnl Print summary.
906     echo
907     echo Basilisk II configuration summary:
908     echo
909 gbeauche 1.62 echo XFree86 DGA support .................... : $WANT_XF86_DGA
910     echo XFree86 VidMode support ................ : $WANT_XF86_VIDMODE
911     echo fbdev DGA support ...................... : $WANT_FBDEV_DGA
912     echo Enable video on SEGV signals ........... : $WANT_VOSF
913     echo ESD sound support ...................... : $WANT_ESD
914     echo GTK user interface ..................... : $WANT_GTK
915     echo mon debugger support ................... : $WANT_MON
916     echo Running m68k code natively ............. : $WANT_NATIVE_M68K
917     echo Floating-Point emulation core .......... : $FPE_CORE_STR
918     echo Assembly optimizations ................. : $ASM_OPTIMIZATIONS
919     echo Addressing mode ........................ : $ADDRESSING_MODE
920 cebix 1.12 echo
921 cebix 1.19 echo "Configuration done. Now type \"make\" (or \"gmake\")."