ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure.ac
Revision: 1.40
Committed: 2005-05-13T11:13:26Z (19 years, 6 months ago) by gbeauche
Branch: MAIN
Changes since 1.39: +1 -1 lines
Log Message:
fix CFLAGS preservation

File Contents

# Content
1 dnl Process this file with autoconf to produce a configure script.
2 dnl Written in 2002 by Christian Bauer et al.
3
4 AC_INIT([Basilisk II], 1.0, [Christian.Bauer@uni-mainz.de], BasiliskII)
5 AC_CONFIG_SRCDIR(main_unix.cpp)
6 AC_PREREQ(2.52)
7 AC_CONFIG_HEADER(config.h)
8
9 dnl Aliases for PACKAGE and VERSION macros.
10 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE_NAME", [Define this program name.])
11 AC_DEFINE_UNQUOTED(VERSION, "$PACKAGE_VERSION", [Define this program version.])
12
13 dnl Some systems do not put corefiles in the currect directory, avoid saving
14 dnl cores for the configure tests since some are intended to dump core.
15 ulimit -c 0
16
17 dnl Video options.
18 AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
19 AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
20 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])
21 AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes])
22
23 dnl SDL options.
24 AC_ARG_ENABLE(sdl-video, [ --enable-sdl-video use SDL for video graphics [default=no]], [WANT_SDL_VIDEO=$enableval], [WANT_SDL_VIDEO=no])
25 AC_ARG_ENABLE(sdl-audio, [ --enable-sdl-audio use SDL for audio [default=no]], [WANT_SDL_AUDIO=$enableval], [WANT_SDL_AUDIO=no])
26
27 dnl JIT compiler options.
28 AC_ARG_ENABLE(jit-compiler, [ --enable-jit-compiler enable JIT compiler [default=no]], [WANT_JIT=$enableval], [WANT_JIT=no])
29 AC_ARG_ENABLE(jit-debug, [ --enable-jit-debug activate native code disassemblers [default=no]], [WANT_JIT_DEBUG=$enableval], [WANT_JIT_DEBUG=no])
30
31 dnl FPU emulation core.
32 AC_ARG_ENABLE(fpe,
33 [ --enable-fpe=FPE specify which fpu emulator to use [default=auto]],
34 [ case "$enableval" in
35 dnl default is always ieee, if architecture has this fp format
36 auto) FPE_CORE_TEST_ORDER="ieee uae";;
37 ieee) FPE_CORE_TEST_ORDER="ieee";;
38 uae) FPE_CORE_TEST_ORDER="uae";;
39 x86) FPE_CORE_TEST_ORDER="x86";;
40 *) AC_MSG_ERROR([--enable-fpe takes only one of the following values: auto, x86, ieee, uae]);;
41 esac
42 ],
43 [ FPE_CORE_TEST_ORDER="ieee uae"
44 ])
45
46 dnl Addressing modes.
47 AC_ARG_ENABLE(addressing,
48 [ --enable-addressing=AM specify the addressing mode to use [default=fastest]],
49 [ case "$enableval" in
50 real) ADDRESSING_TEST_ORDER="real";;
51 direct) ADDRESSING_TEST_ORDER="direct";;
52 banks) ADDRESSING_TEST_ORDER="banks";;
53 fastest)ADDRESSING_TEST_ORDER="direct banks";;
54 *) AC_MSG_ERROR([--enable-addressing takes only one of the following values: fastest, real, direct, banks]);;
55 esac
56 ],
57 [ ADDRESSING_TEST_ORDER="direct banks"
58 ])
59
60 dnl External packages.
61 AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
62 AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
63 AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
64
65 dnl Canonical system information.
66 AC_CANONICAL_HOST
67 AC_CANONICAL_TARGET
68
69 dnl Target OS type (target is host if not cross-compiling).
70 case "$target_os" in
71 linux*) OS_TYPE=linux;;
72 netbsd*) OS_TYPE=netbsd;;
73 freebsd*) OS_TYPE=freebsd;;
74 solaris*) OS_TYPE=solaris;;
75 darwin*) OS_TYPE=darwin;;
76 *) OS_TYPE=`echo $target_os | sed -e 's/-/_/g' | sed -e 's/\./_/g'`;;
77 esac
78 DEFINES="$DEFINES -DOS_$OS_TYPE"
79
80 dnl Target CPU type.
81 HAVE_I386=no
82 HAVE_M68K=no
83 HAVE_SPARC=no
84 HAVE_POWERPC=no
85 HAVE_X86_64=no
86 case "$target_cpu" in
87 i386* | i486* | i586* | i686* | i786* ) HAVE_I386=yes;;
88 m68k* ) HAVE_M68K=yes;;
89 sparc* ) HAVE_SPARC=yes;;
90 powerpc* ) HAVE_POWERPC=yes;;
91 x86_64* ) HAVE_X86_64=yes;;
92 esac
93
94 dnl Checks for programs.
95 AC_PROG_CC
96 AC_PROG_CC_C_O
97 AC_PROG_CPP
98 AC_PROG_CXX
99 AC_PROG_MAKE_SET
100 AC_PROG_INSTALL
101 AC_PROG_EGREP
102
103 dnl We use mon if possible.
104 MONSRCS=
105 if [[ "x$WANT_MON" = "xyes" ]]; then
106 AC_MSG_CHECKING(for mon)
107 mon_srcdir=../../../mon/src
108 if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
109 AC_MSG_RESULT(yes)
110 AC_DEFINE(ENABLE_MON, 1, [Define if using "mon".])
111 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"
112 CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
113 AC_CHECK_LIB(ncurses, tgetent, ,
114 AC_CHECK_LIB(termcap, tgetent, ,
115 AC_CHECK_LIB(termlib, tgetent, ,
116 AC_CHECK_LIB(terminfo, tgetent, ,
117 AC_CHECK_LIB(Hcurses, tgetent, ,
118 AC_CHECK_LIB(curses, tgetent))))))
119 AC_CHECK_LIB(readline, readline)
120 else
121 AC_MSG_RESULT(no)
122 AC_MSG_WARN([Could not find mon, ignoring --with-mon.])
123 WANT_MON=no
124 fi
125 fi
126
127 dnl Checks for libraries.
128 AC_CHECK_LIB(posix4, sem_init)
129 AC_CHECK_LIB(rt, timer_create)
130 AC_CHECK_LIB(rt, shm_open)
131
132 dnl Do we need SDL?
133 WANT_SDL=no
134 if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
135 WANT_SDL=yes
136 WANT_XF86_DGA=no
137 WANT_XF86_VIDMODE=no
138 WANT_FBDEV_DGA=no
139 SDL_SUPPORT="$SDL_SUPPORT video"
140 fi
141 if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then
142 WANT_SDL=yes
143 SDL_SUPPORT="$SDL_SUPPORT audio"
144 fi
145 if [[ "x$WANT_SDL" = "xyes" ]]; then
146 AC_PATH_PROG(sdl_config, "sdl-config")
147 if [[ -n "$sdl_config" ]]; then
148 case $target_os in
149 # Special treatment for Cygwin so that we can still use the POSIX layer
150 *cygwin*)
151 sdl_cflags="-I`$sdl_config --prefix`/include/SDL"
152 sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL"
153 ;;
154 *)
155 sdl_cflags=`$sdl_config --cflags`
156 sdl_libs=`$sdl_config --libs`
157 ;;
158 esac
159 CFLAGS="$CFLAGS $sdl_cflags"
160 CXXFLAGS="$CXXFLAGS $sdl_cflags"
161 LIBS="$LIBS $sdl_libs"
162 else
163 WANT_SDL=no
164 fi
165 SDL_SUPPORT=`echo "$SDL_SUPPORT" | sed -e "s/^ //"`
166 else
167 SDL_SUPPORT="none"
168 fi
169
170 dnl We need X11, if not using SDL.
171 if [[ "x$WANT_SDL" = "xno" ]]; then
172 AC_PATH_XTRA
173 if [[ "x$no_x" = "xyes" ]]; then
174 AC_MSG_ERROR([You need X11 to run Basilisk II.])
175 fi
176 CFLAGS="$CFLAGS $X_CFLAGS"
177 CXXFLAGS="$CXXFLAGS $X_CFLAGS"
178 LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
179 fi
180
181 dnl We want pthreads. Try libpthread first, then libc_r (FreeBSD), then PTL.
182 HAVE_PTHREADS=yes
183 AC_CHECK_LIB(pthread, pthread_create, , [
184 AC_CHECK_LIB(c_r, pthread_create, , [
185 AC_CHECK_LIB(PTL, pthread_create, , [
186 HAVE_PTHREADS=no
187 ])
188 ])
189 ])
190 if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then
191 AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.])
192 fi
193 AC_CHECK_FUNCS(pthread_cancel)
194 AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
195 AC_CHECK_FUNCS(pthread_mutexattr_settype)
196 AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
197
198 dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
199 SEMSRC=
200 AC_CHECK_FUNCS(sem_init, , [
201 if test "x$HAVE_PTHREADS" = "xyes"; then
202 SEMSRC=posix_sem.cpp
203 fi
204 ])
205
206 dnl We use DGA (XFree86 or fbdev) if possible.
207 if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then
208 AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, [
209 AC_DEFINE(ENABLE_XF86_DGA, 1, [Define if using XFree86 DGA extension.])
210 LIBS="$LIBS -lXxf86dga"
211 if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then
212 AC_MSG_WARN([Cannot have both --enable-xf86-dga and --enable-fbdev-dga, ignoring --enable-fbdev-dga.])
213 WANT_FBDEV_DGA=no
214 fi
215 ], [
216 AC_MSG_WARN([Could not find XFree86 DGA extension, ignoring --enable-xf86-dga.])
217 WANT_XF86_DGA=no
218 ])
219 fi
220 if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then
221 AC_DEFINE(ENABLE_FBDEV_DGA, 1, [Define if using DGA with framebuffer device.])
222 fi
223
224 dnl We use XFree86 VidMode if possible.
225 if [[ "x$WANT_XF86_VIDMODE" = "xyes" ]]; then
226 AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, [
227 AC_DEFINE(ENABLE_XF86_VIDMODE, 1, [Define if using XFree86 DGA extension.])
228 LIBS="$LIBS -lXxf86vm"
229 ], [
230 AC_MSG_WARN([Could not find XFree86 VidMode extension, ignoring --enable-xf86-vidmode.])
231 WANT_XF86_VIDMODE=no
232 ])
233 fi
234
235 dnl We use GTK+ if possible.
236 UISRCS=../dummy/prefs_editor_dummy.cpp
237 if [[ "x$WANT_GTK" = "xyes" ]]; then
238 AM_PATH_GTK(1.2.0, [
239 AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
240 CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
241 LIBS="$LIBS $GTK_LIBS"
242 UISRCS=prefs_editor_gtk.cpp
243 dnl somehow, <gnome-i18n.h> would redefine gettext() to nothing if
244 dnl ENABLE_NLS is not set, thusly conflicting with C++ <string> which
245 dnl includes <libintl.h>
246 AM_GNU_GETTEXT
247 B2_PATH_GNOMEUI([
248 AC_DEFINE(HAVE_GNOMEUI, 1, [Define if libgnomeui is available.])
249 CXXFLAGS="$CXXFLAGS $GNOMEUI_CFLAGS"
250 LIBS="$LIBS $GNOMEUI_LIBS"
251 ], [])
252 ], [
253 AC_MSG_WARN([Could not find GTK+, disabling user interface.])
254 WANT_GTK=no
255 ])
256 fi
257
258 dnl We use ESD if possible.
259 if [[ "x$WANT_ESD" = "xyes" ]]; then
260 AM_PATH_ESD(0.2.8, [
261 AC_DEFINE(ENABLE_ESD, 1, [Define is using ESD.])
262 CFLAGS="$CFLAGS $ESD_CFLAGS"
263 CXXFLAGS="$CXXFLAGS $ESD_CFLAGS"
264 LIBS="$LIBS $ESD_LIBS"
265 ], [
266 AC_MSG_WARN([Could not find ESD, disabling ESD support.])
267 WANT_ESD=no
268 ])
269 fi
270
271 dnl We use 64-bit file size support if possible.
272 AC_SYS_LARGEFILE
273
274 dnl Checks for header files.
275 AC_HEADER_STDC
276 AC_CHECK_HEADERS(unistd.h fcntl.h sys/types.h sys/time.h sys/mman.h mach/mach.h)
277 AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
278 AC_CHECK_HEADERS(sys/socket.h sys/ioctl.h sys/filio.h sys/bitypes.h sys/wait.h sys/select.h)
279 AC_CHECK_HEADERS(arpa/inet.h)
280 AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h, [], [], [
281 #ifdef HAVE_SYS_SOCKET_H
282 #include <sys/socket.h>
283 #endif
284 ])
285 AC_CHECK_HEADERS(AvailabilityMacros.h)
286
287 dnl Checks for typedefs, structures, and compiler characteristics.
288 AC_C_BIGENDIAN
289 AC_C_CONST
290 AC_C_INLINE
291 AC_CHECK_SIZEOF(short, 2)
292 AC_CHECK_SIZEOF(int, 4)
293 AC_CHECK_SIZEOF(long, 4)
294 AC_CHECK_SIZEOF(long long, 8)
295 AC_CHECK_SIZEOF(float, 4)
296 AC_CHECK_SIZEOF(double, 8)
297 AC_CHECK_SIZEOF(long double, 12)
298 AC_CHECK_SIZEOF(void *, 4)
299 AC_TYPE_OFF_T
300 AC_CHECK_TYPES(loff_t)
301 AC_CHECK_TYPES(caddr_t)
302 AC_TYPE_SIZE_T
303 AC_TYPE_SIGNAL
304 AC_HEADER_TIME
305 AC_STRUCT_TM
306
307 dnl Check whether sys/socket.h defines type socklen_t.
308 dnl (extracted from ac-archive/Miscellaneous)
309 AC_CACHE_CHECK([for socklen_t],
310 ac_cv_type_socklen_t, [
311 AC_TRY_COMPILE([
312 #include <sys/types.h>
313 #include <sys/socket.h>
314 ], [socklen_t len = 42; return 0;],
315 ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no,
316 dnl When cross-compiling, do not assume anything.
317 ac_cv_type_socklen_t="guessing no"
318 )
319 ])
320 if [[ "x$ac_cv_type_socklen_t" != "xyes" ]]; then
321 AC_DEFINE(socklen_t, int, [Define to 'int' if <sys/types.h> doesn't define.])
322 fi
323
324 dnl Checks for library functions.
325 AC_CHECK_FUNCS(strdup strerror cfmakeraw)
326 AC_CHECK_FUNCS(clock_gettime timer_create)
327 AC_CHECK_FUNCS(sigaction signal)
328 AC_CHECK_FUNCS(mmap mprotect munmap)
329 AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect)
330 AC_CHECK_FUNCS(inet_aton)
331
332 dnl Darwin seems to define mach_task_self() instead of task_self().
333 AC_CHECK_FUNCS(mach_task_self task_self)
334
335 dnl Check for headers and functions related to pty support (sshpty.c)
336 dnl From openssh-3.2.2p1 configure.ac
337
338 AC_CHECK_HEADERS(strings.h login.h sys/bsdtty.h sys/stat.h util.h pty.h)
339 AC_CHECK_FUNCS(_getpty vhangup strlcpy)
340
341 case "$host" in
342 *-*-hpux10.26)
343 disable_ptmx_check=yes
344 ;;
345 *-*-linux*)
346 no_dev_ptmx=1
347 ;;
348 mips-sony-bsd|mips-sony-newsos4)
349 AC_DEFINE(HAVE_NEWS4, 1, [Define if you are on NEWS-OS (additions from openssh-3.2.2p1, for sshpty.c).])
350 ;;
351 *-*-sco3.2v4*)
352 no_dev_ptmx=1
353 ;;
354 *-*-sco3.2v5*)
355 no_dev_ptmx=1
356 ;;
357 *-*-cygwin*)
358 no_dev_ptmx=1
359 ;;
360 esac
361
362 if test -z "$no_dev_ptmx" ; then
363 if test "x$disable_ptmx_check" != "xyes" ; then
364 AC_CHECK_FILE([/dev/ptmx],
365 [
366 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx.])
367 have_dev_ptmx=1
368 ]
369 )
370 fi
371 fi
372 AC_CHECK_FILE([/dev/ptc],
373 [
374 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC, 1, [Define if you have /dev/ptc.])
375 have_dev_ptc=1
376 ]
377 )
378
379 dnl (end of code from openssh-3.2.2p1 configure.ac)
380
381
382 dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES)
383 AC_DEFUN(AC_CHECK_FRAMEWORK, [
384 AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
385 AC_CACHE_CHECK([whether compiler supports framework $1],
386 ac_Framework, [
387 saved_LIBS="$LIBS"
388 LIBS="$LIBS -framework $1"
389 AC_TRY_LINK(
390 [$2], [int main(void) { return 0; }],
391 [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"]
392 )
393 ])
394 AS_IF([test AS_VAR_GET(ac_Framework) = yes],
395 [AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])]
396 )
397 AS_VAR_POPDEF([ac_Framework])dnl
398 ])
399
400 dnl Check for some MacOS X frameworks
401 AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>])
402 AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>])
403
404 dnl Select system-dependant source files.
405 SERIALSRC=serial_unix.cpp
406 ETHERSRC=../dummy/ether_dummy.cpp
407 SCSISRC=../dummy/scsi_dummy.cpp
408 AUDIOSRC=../dummy/audio_dummy.cpp
409 EXTRASYSSRCS=
410 CAN_NATIVE_M68K=no
411 case "$target_os" in
412 linux*)
413 ETHERSRC=ether_unix.cpp
414 AUDIOSRC=audio_oss_esd.cpp
415 SCSISRC=Linux/scsi_linux.cpp
416 ;;
417 freebsd*)
418 ETHERSRC=ether_unix.cpp
419 AUDIOSRC=audio_oss_esd.cpp
420 DEFINES="$DEFINES -DBSD_COMP"
421 CXXFLAGS="$CXXFLAGS -fpermissive"
422 dnl Check for the CAM library
423 AC_CHECK_LIB(cam, cam_open_btl, HAVE_LIBCAM=yes, HAVE_LIBCAM=no)
424 if [[ "x$HAVE_LIBCAM" = "xno" ]]; then
425 AC_MSG_WARN([Cannot find libcam for SCSI management, disabling SCSI support.])
426 else
427 dnl Check for the sys kernel includes
428 AC_CHECK_HEADER(camlib.h)
429 if [[ "x$ac_cv_header_camlib_h" = "xno" ]]; then
430 dnl In this case I should fix this thing including a "patch"
431 dnl to access directly to the functions in the kernel :) --Orlando
432 AC_MSG_WARN([Cannot find includes for CAM library, disabling SCSI support.])
433 else
434 SCSISRC=FreeBSD/scsi_freebsd.cpp
435 LIBS="$LIBS -lcam"
436 DEFINES="$DEFINES -DCAM"
437 fi
438 fi
439 ;;
440 netbsd*)
441 CAN_NATIVE_M68K=yes
442 ;;
443 solaris*)
444 AUDIOSRC=Solaris/audio_solaris.cpp
445 DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
446 ;;
447 irix*)
448 ETHERSRC=ether_unix.cpp
449 AUDIOSRC=Irix/audio_irix.cpp
450 EXTRASYSSRCS=Irix/unaligned.c
451 dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
452 DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
453 LIBS="$LIBS -laudio"
454 WANT_ESD=no
455
456 dnl Check if our compiler supports -IPA (MIPSPro)
457 HAVE_IPA=no
458 ocflags="$CFLAGS"
459 CFLAGS=`echo "$CFLAGS -IPA" | sed -e "s/-g//g"`
460 AC_MSG_CHECKING(if "-IPA" works)
461 dnl Do a test compile of an empty function
462 AC_TRY_COMPILE(,, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no))
463 CFLAGS="$ocflags"
464 ;;
465 darwin*)
466 if [[ "x$ac_cv_framework_IOKit" = "xyes" ]]; then
467 EXTRASYSSRCS="../MacOSX/sys_darwin.cpp"
468 fi
469 ;;
470 cygwin*)
471 SERIALSRC="../dummy/serial_dummy.cpp"
472 EXTRASYSSRCS="../Windows/BasiliskII.rc"
473 ;;
474 esac
475 dnl SDL overrides
476 if [[ "x$WANT_SDL" = "xyes" ]]; then
477 AC_DEFINE(USE_SDL, 1, [Define to enble SDL support])
478 fi
479 if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
480 AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support])
481 VIDEOSRCS="../SDL/video_sdl.cpp"
482 KEYCODES="../SDL/keycodes"
483 if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
484 EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp"
485 else
486 case "$target_os" in
487 cygwin*)
488 EXTRASYSSRCS="$EXTRASYSSRCS ../Windows/clip_windows.cpp"
489 ;;
490 *)
491 EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
492 ;;
493 esac
494 fi
495 else
496 VIDEOSRCS="video_x.cpp"
497 KEYCODES="keycodes"
498 EXTRASYSSRCS="$EXTRASYSSRCS clip_unix.cpp"
499 fi
500 if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then
501 AC_DEFINE(USE_SDL_AUDIO, 1, [Define to enable SDL audio support])
502 AUDIOSRC="../SDL/audio_sdl.cpp"
503 fi
504
505 dnl Use 68k CPU natively?
506 WANT_NATIVE_M68K=no
507 if [[ "x$HAVE_M68K" = "xyes" -a "x$CAN_NATIVE_M68K" = "xyes" ]]; then
508 AC_DEFINE(ENABLE_NATIVE_M68K, 1, [Define if using native 68k mode.])
509 WANT_NATIVE_M68K=yes
510 fi
511
512 if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
513 dnl Serial, ethernet and audio support needs pthreads
514 AC_MSG_WARN([You don't have pthreads, disabling serial, ethernet and audio support.])
515 SERIALSRC=../dummy/serial_dummy.cpp
516 ETHERSRC=../dummy/ether_dummy.cpp
517 AUDIOSRC=../dummy/audio_dummy.cpp
518 fi
519 SYSSRCS="$VIDEOSRCS $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
520
521 dnl Define a macro that translates a yesno-variable into a C macro definition
522 dnl to be put into the config.h file
523 dnl $1 -- the macro to define
524 dnl $2 -- the value to translate
525 dnl $3 -- template name
526 AC_DEFUN(AC_TRANSLATE_DEFINE, [
527 if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then
528 AC_DEFINE($1, 1, $3)
529 fi
530 ])
531
532 dnl Check that the host supports TUN/TAP devices
533 AC_CACHE_CHECK([whether TUN/TAP is supported],
534 ac_cv_tun_tap_support, [
535 AC_TRY_COMPILE([
536 #if defined(HAVE_LINUX_IF_H) && defined(HAVE_LINUX_IF_TUN_H)
537 #include <linux/if.h>
538 #include <linux/if_tun.h>
539 #endif
540 #if defined(HAVE_NET_IF_H) && defined(HAVE_NET_IF_TUN_H)
541 #include <net/if.h>
542 #include <net/if_tun.h>
543 #endif
544 ], [
545 struct ifreq ifr;
546 memset(&ifr, 0, sizeof(ifr));
547 ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
548 ],
549 ac_cv_tun_tap_support=yes, ac_cv_tun_tap_support=no
550 )
551 ])
552 AC_TRANSLATE_DEFINE(ENABLE_TUNTAP, "$ac_cv_tun_tap_support",
553 [Define if your system supports TUN/TAP devices.])
554
555 dnl Various checks if the system supports vm_allocate() and the like functions.
556 have_mach_vm=no
557 if [[ "x$ac_cv_func_vm_allocate" = "xyes" -a "x$ac_cv_func_vm_deallocate" = "xyes" -a \
558 "x$ac_cv_func_vm_protect" = "xyes" ]]; then
559 have_mach_vm=yes
560 fi
561 AC_TRANSLATE_DEFINE(HAVE_MACH_VM, "$have_mach_vm",
562 [Define if your system has a working vm_allocate()-based memory allocator.])
563
564 dnl Check that vm_allocate(), vm_protect() work
565 if [[ "x$have_mach_vm" = "xyes" ]]; then
566
567 AC_CACHE_CHECK([whether vm_protect works],
568 ac_cv_vm_protect_works, [
569 AC_LANG_SAVE
570 AC_LANG_CPLUSPLUS
571 ac_cv_vm_protect_works=yes
572 dnl First the tests that should segfault
573 for test_def in NONE_READ NONE_WRITE READ_WRITE; do
574 AC_TRY_RUN([
575 #define CONFIGURE_TEST_VM_MAP
576 #define TEST_VM_PROT_$test_def
577 #include "vm_alloc.cpp"
578 ], ac_cv_vm_protect_works=no, rm -f core,
579 dnl When cross-compiling, do not assume anything
580 ac_cv_vm_protect_works="guessing no"
581 )
582 done
583 AC_TRY_RUN([
584 #define CONFIGURE_TEST_VM_MAP
585 #define TEST_VM_PROT_RDWR_WRITE
586 #include "vm_alloc.cpp"
587 ], , ac_cv_vm_protect_works=no,
588 dnl When cross-compiling, do not assume anything
589 ac_cv_vm_protect_works="guessing no"
590 )
591 AC_LANG_RESTORE
592 ]
593 )
594
595 dnl Remove support for vm_allocate() if vm_protect() does not work
596 if [[ "x$have_mach_vm" = "xyes" ]]; then
597 case $ac_cv_vm_protect_works in
598 *yes) have_mach_vm=yes;;
599 *no) have_mach_vm=no;;
600 esac
601 fi
602 AC_TRANSLATE_DEFINE(HAVE_MACH_VM, "$have_mach_vm",
603 [Define if your system has a working vm_allocate()-based memory allocator.])
604
605 fi dnl HAVE_MACH_VM
606
607 dnl Various checks if the system supports mmap() and the like functions.
608 dnl ... and Mach memory allocators are not supported
609 have_mmap_vm=no
610 if [[ "x$ac_cv_func_mmap" = "xyes" -a "x$ac_cv_func_munmap" = "xyes" -a \
611 "x$ac_cv_func_mprotect" = "xyes" ]]; then
612 if [[ "x$have_mach_vm" = "xno" ]]; then
613 have_mmap_vm=yes
614 fi
615 fi
616 AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, "$have_mmap_vm",
617 [Define if your system has a working mmap()-based memory allocator.])
618
619 dnl Check that mmap() and associated functions work.
620 if [[ "x$have_mmap_vm" = "xyes" ]]; then
621
622 dnl Check if we have a working anonymous mmap()
623 AC_CACHE_CHECK([whether mmap supports MAP_ANON],
624 ac_cv_mmap_anon, [
625 AC_LANG_SAVE
626 AC_LANG_CPLUSPLUS
627 AC_TRY_RUN([
628 #define HAVE_MMAP_ANON
629 #define CONFIGURE_TEST_VM_MAP
630 #define TEST_VM_MMAP_ANON
631 #include "vm_alloc.cpp"
632 ], ac_cv_mmap_anon=yes, ac_cv_mmap_anon=no,
633 dnl When cross-compiling, do not assume anything.
634 ac_cv_mmap_anon="guessing no"
635 )
636 AC_LANG_RESTORE
637 ]
638 )
639 AC_TRANSLATE_DEFINE(HAVE_MMAP_ANON, "$ac_cv_mmap_anon",
640 [Define if <sys/mman.h> defines MAP_ANON and mmap()'ing with MAP_ANON works.])
641
642 AC_CACHE_CHECK([whether mmap supports MAP_ANONYMOUS],
643 ac_cv_mmap_anonymous, [
644 AC_LANG_SAVE
645 AC_LANG_CPLUSPLUS
646 AC_TRY_RUN([
647 #define HAVE_MMAP_ANONYMOUS
648 #define CONFIGURE_TEST_VM_MAP
649 #define TEST_VM_MMAP_ANON
650 #include "vm_alloc.cpp"
651 ], ac_cv_mmap_anonymous=yes, ac_cv_mmap_anonymous=no,
652 dnl When cross-compiling, do not assume anything.
653 ac_cv_mmap_anonymous="guessing no"
654 )
655 AC_LANG_RESTORE
656 ]
657 )
658 AC_TRANSLATE_DEFINE(HAVE_MMAP_ANONYMOUS, "$ac_cv_mmap_anonymous",
659 [Define if <sys/mman.h> defines MAP_ANONYMOUS and mmap()'ing with MAP_ANONYMOUS works.])
660
661 AC_CACHE_CHECK([whether mprotect works],
662 ac_cv_mprotect_works, [
663 AC_LANG_SAVE
664 AC_LANG_CPLUSPLUS
665 ac_cv_mprotect_works=yes
666 dnl First the tests that should segfault
667 for test_def in NONE_READ NONE_WRITE READ_WRITE; do
668 AC_TRY_RUN([
669 #define CONFIGURE_TEST_VM_MAP
670 #define TEST_VM_PROT_$test_def
671 #include "vm_alloc.cpp"
672 ], ac_cv_mprotect_works=no, rm -f core,
673 dnl When cross-compiling, do not assume anything
674 ac_cv_mprotect_works="guessing no"
675 )
676 done
677 AC_TRY_RUN([
678 #define CONFIGURE_TEST_VM_MAP
679 #define TEST_VM_PROT_RDWR_WRITE
680 #include "vm_alloc.cpp"
681 ], , ac_cv_mprotect_works=no,
682 dnl When cross-compiling, do not assume anything
683 ac_cv_mprotect_works="guessing no"
684 )
685 AC_LANG_RESTORE
686 ]
687 )
688
689 dnl Remove support for mmap() if mprotect() does not work
690 if [[ "x$have_mmap_vm" = "xyes" ]]; then
691 case $ac_cv_mprotect_works in
692 *yes) have_mmap_vm=yes;;
693 *no) have_mmap_vm=no;;
694 esac
695 fi
696 AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_mmap_vm,
697 [Define if your system has a working mmap()-based memory allocator.])
698
699 fi dnl HAVE_MMAP_VM
700
701 dnl Check if we can modify the __PAGEZERO segment for use as Low Memory
702 AC_CACHE_CHECK([whether __PAGEZERO can be Low Memory area 0x0000-0x2000],
703 ac_cv_pagezero_hack, [
704 ac_cv_pagezero_hack=no
705 if AC_TRY_COMMAND([Darwin/testlmem.sh 0x2000]); then
706 ac_cv_pagezero_hack=yes
707 dnl might as well skip the test for mmap-able low memory
708 ac_cv_can_map_lm=no
709 fi
710 ])
711 AC_TRANSLATE_DEFINE(PAGEZERO_HACK, "$ac_cv_pagezero_hack",
712 [Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this system.])
713
714 dnl Check if we can mmap 0x2000 bytes from 0x0000
715 AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x2000],
716 ac_cv_can_map_lm, [
717 AC_LANG_SAVE
718 AC_LANG_CPLUSPLUS
719 AC_TRY_RUN([
720 #include "vm_alloc.cpp"
721 int main(void) { /* returns 0 if we could map the lowmem globals */
722 volatile char * lm = 0;
723 if (vm_init() < 0) exit(1);
724 if (vm_acquire_fixed(0, 0x2000) < 0) exit(1);
725 lm[0] = 'z';
726 if (vm_release((char *)lm, 0x2000) < 0) exit(1);
727 vm_exit(); exit(0);
728 }
729 ], ac_cv_can_map_lm=yes, ac_cv_can_map_lm=no,
730 dnl When cross-compiling, do not assume anything.
731 ac_cv_can_map_lm="guessing no"
732 )
733 AC_LANG_RESTORE
734 ]
735 )
736
737 dnl Check if we have POSIX shared memory support
738 AC_CACHE_CHECK([whether POSIX shared memory is working],
739 ac_cv_have_posix_shm, [
740 AC_LANG_SAVE
741 AC_LANG_CPLUSPLUS
742 AC_TRY_RUN([
743 #define HAVE_POSIX_SHM
744 #include "vm_alloc.cpp"
745 int main(void) { /* returns 0 if we have working POSIX shm */
746 if (vm_init() < 0) exit(2);
747 char *m1 = (char *)vm_acquire(32768, VM_MAP_DEFAULT | VM_MAP_33BIT);
748 if (m1 == VM_MAP_FAILED) exit(3);
749 vm_exit(); exit(0);
750 }
751 ], ac_cv_have_posix_shm=yes, ac_cv_have_posix_shm=no,
752 dnl When cross-compiling, do not assume anything.
753 ac_cv_have_posix_shm="guessing no"
754 )
755 AC_LANG_RESTORE
756 ]
757 )
758 AC_TRANSLATE_DEFINE(HAVE_POSIX_SHM, "$ac_cv_have_posix_shm",
759 [Define if your system supports POSIX shared memory.])
760
761 dnl Check if we have working 33-bit memory addressing
762 AC_CACHE_CHECK([whether 33-bit memory addressing is working],
763 ac_cv_have_33bit_addressing, [
764 AC_LANG_SAVE
765 AC_LANG_CPLUSPLUS
766 AC_TRY_RUN([
767 #define USE_33BIT_ADDRESSING 1
768 #include "vm_alloc.cpp"
769 int main(void) { /* returns 0 if we have working 33-bit addressing */
770 if (sizeof(void *) < 8) exit(1);
771 if (vm_init() < 0) exit(2);
772 char *m1 = (char *)vm_acquire(32768, VM_MAP_DEFAULT | VM_MAP_33BIT);
773 if (m1 == VM_MAP_FAILED) exit(3);
774 char *m2 = m1 + (1L << 32);
775 m1[0] = 0x12; if (m2[0] != 0x12) exit(4);
776 m2[0] = 0x34; if (m1[0] != 0x34) exit(5);
777 vm_exit(); exit(0);
778 }
779 ], ac_cv_have_33bit_addressing=yes, ac_cv_have_33bit_addressing=no,
780 dnl When cross-compiling, do not assume anything.
781 ac_cv_have_33bit_addressing="guessing no"
782 )
783 AC_LANG_RESTORE
784 ]
785 )
786
787 dnl Check signal handlers need to be reinstalled
788 AC_CACHE_CHECK([whether signal handlers need to be reinstalled],
789 ac_cv_signal_need_reinstall, [
790 AC_LANG_SAVE
791 AC_LANG_CPLUSPLUS
792 AC_TRY_RUN([
793 #include <stdlib.h>
794 #ifdef HAVE_UNISTD_H
795 #include <unistd.h>
796 #endif
797 #include <signal.h>
798 static int handled_signal = 0;
799 RETSIGTYPE sigusr1_handler(int) { handled_signal++; }
800 int main(void) { /* returns 0 if signals need not to be reinstalled */
801 signal(SIGUSR1, sigusr1_handler); raise(SIGUSR1); raise(SIGUSR1);
802 exit(handled_signal == 2);
803 }
804 ], ac_cv_signal_need_reinstall=yes, ac_cv_signal_need_reinstall=no,
805 dnl When cross-compiling, do not assume anything.
806 ac_cv_signal_need_reinstall="guessing yes"
807 )
808 AC_LANG_RESTORE
809 ]
810 )
811 AC_TRANSLATE_DEFINE(SIGNAL_NEED_REINSTALL, "$ac_cv_signal_need_reinstall",
812 [Define if your system requires signals to be reinstalled.])
813
814 dnl Check if sigaction handlers need to be reinstalled
815 AC_CACHE_CHECK([whether sigaction handlers need to be reinstalled],
816 ac_cv_sigaction_need_reinstall, [
817 AC_LANG_SAVE
818 AC_LANG_CPLUSPLUS
819 AC_TRY_RUN([
820 #include <stdlib.h>
821 #ifdef HAVE_UNISTD_H
822 #include <unistd.h>
823 #endif
824 #include <signal.h>
825 static int handled_signal = 0;
826 RETSIGTYPE sigusr1_handler(int) { handled_signal++; }
827 typedef RETSIGTYPE (*signal_handler)(int);
828 static signal_handler mysignal(int sig, signal_handler handler) {
829 struct sigaction old_sa;
830 struct sigaction new_sa;
831 new_sa.sa_handler = handler;
832 return ((sigaction(sig,&new_sa,&old_sa) < 0) ? SIG_IGN : old_sa.sa_handler);
833 }
834 int main(void) { /* returns 0 if signals need not to be reinstalled */
835 mysignal(SIGUSR1, sigusr1_handler); raise(SIGUSR1); raise(SIGUSR1);
836 exit(handled_signal == 2);
837 }
838 ], ac_cv_sigaction_need_reinstall=yes, ac_cv_sigaction_need_reinstall=no,
839 dnl When cross-compiling, do not assume anything.
840 ac_cv_sigaction_need_reinstall="guessing yes"
841 )
842 AC_LANG_RESTORE
843 ]
844 )
845 AC_TRANSLATE_DEFINE(SIGACTION_NEED_REINSTALL, "$ac_cv_sigaction_need_reinstall",
846 [Define if your system requires sigactions to be reinstalled.])
847
848 dnl Check if Mach exceptions supported.
849 AC_CACHE_CHECK([whether your system supports Mach exceptions],
850 ac_cv_have_mach_exceptions, [
851 AC_LANG_SAVE
852 AC_LANG_CPLUSPLUS
853 AC_TRY_RUN([
854 #define HAVE_MACH_EXCEPTIONS 1
855 #define CONFIGURE_TEST_SIGSEGV_RECOVERY
856 #include "vm_alloc.cpp"
857 #include "sigsegv.cpp"
858 ], [
859 sigsegv_recovery=mach
860 ac_cv_have_mach_exceptions=yes
861 ],
862 ac_cv_have_mach_exceptions=no,
863 dnl When cross-compiling, do not assume anything.
864 ac_cv_have_mach_exceptions=no
865 )
866 AC_LANG_RESTORE
867 ]
868 )
869 AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions",
870 [Define if your system supports Mach exceptions.])
871
872 dnl Check if Windows exceptions are supported.
873 AC_CACHE_CHECK([whether your system supports Windows exceptions],
874 ac_cv_have_win32_exceptions, [
875 AC_LANG_SAVE
876 AC_LANG_CPLUSPLUS
877 AC_TRY_RUN([
878 #define HAVE_WIN32_EXCEPTIONS 1
879 #define CONFIGURE_TEST_SIGSEGV_RECOVERY
880 #include "vm_alloc.cpp"
881 #include "sigsegv.cpp"
882 ], [
883 sigsegv_recovery=win32
884 ac_cv_have_win32_exceptions=yes
885 ],
886 ac_cv_have_win32_exceptions=no,
887 dnl When cross-compiling, do not assume anything.
888 ac_cv_have_win32_exceptions=no
889 )
890 AC_LANG_RESTORE
891 ]
892 )
893 AC_TRANSLATE_DEFINE(HAVE_WIN32_EXCEPTIONS, "$ac_cv_have_win32_exceptions",
894 [Define if your system supports Windows exceptions.])
895
896 dnl Otherwise, check if extended signals are supported.
897 if [[ -z "$sigsegv_recovery" ]]; then
898 AC_CACHE_CHECK([whether your system supports extended signal handlers],
899 ac_cv_have_extended_signals, [
900 AC_LANG_SAVE
901 AC_LANG_CPLUSPLUS
902 AC_TRY_RUN([
903 #define HAVE_SIGINFO_T 1
904 #define CONFIGURE_TEST_SIGSEGV_RECOVERY
905 #include "vm_alloc.cpp"
906 #include "sigsegv.cpp"
907 ], [
908 sigsegv_recovery=siginfo
909 ac_cv_have_extended_signals=yes
910 ],
911 ac_cv_have_extended_signals=no,
912 dnl When cross-compiling, do not assume anything.
913 ac_cv_have_extended_signals=no
914 )
915 AC_LANG_RESTORE
916 ]
917 )
918 AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
919 [Define if your system support extended signals.])
920 fi
921
922 dnl Otherwise, check for subterfuges.
923 if [[ -z "$sigsegv_recovery" ]]; then
924 AC_CACHE_CHECK([whether we then have a subterfuge for your system],
925 ac_cv_have_sigcontext_hack, [
926 AC_LANG_SAVE
927 AC_LANG_CPLUSPLUS
928 AC_TRY_RUN([
929 #define HAVE_SIGCONTEXT_SUBTERFUGE 1
930 #define CONFIGURE_TEST_SIGSEGV_RECOVERY
931 #include "vm_alloc.cpp"
932 #include "sigsegv.cpp"
933 ], [
934 sigsegv_recovery=sigcontext
935 ac_cv_have_sigcontext_hack=yes
936 ],
937 ac_cv_have_sigcontext_hack=no,
938 dnl When cross-compiling, do not assume anything.
939 ac_cv_have_sigcontext_hack=no
940 )
941 AC_LANG_RESTORE
942 ])
943 AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, "$ac_cv_have_sigcontext_hack",
944 [Define if we know a hack to replace siginfo_t->si_addr member.])
945 fi
946
947 dnl Check if we can ignore the fault (instruction skipping in SIGSEGV handler)
948 AC_CACHE_CHECK([whether we can skip instruction in SIGSEGV handler],
949 ac_cv_have_skip_instruction, [
950 AC_LANG_SAVE
951 AC_LANG_CPLUSPLUS
952 AC_TRY_RUN([
953 #define HAVE_SIGSEGV_SKIP_INSTRUCTION 1
954 #define CONFIGURE_TEST_SIGSEGV_RECOVERY
955 #include "vm_alloc.cpp"
956 #include "sigsegv.cpp"
957 ], ac_cv_have_skip_instruction=yes, ac_cv_have_skip_instruction=no,
958 dnl When cross-compiling, do not assume anything.
959 ac_cv_have_skip_instruction=no
960 )
961 AC_LANG_RESTORE
962 ]
963 )
964 AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_INSTRUCTION, "$ac_cv_have_skip_instruction",
965 [Define if we can ignore the fault (instruction skipping in SIGSEGV handler).])
966
967 dnl Can we do Video on SEGV Signals ?
968 CAN_VOSF=no
969 if [[ -n "$sigsegv_recovery" ]]; then
970 CAN_VOSF=yes
971 fi
972
973 dnl A dummy program that returns always true
974 AC_PATH_PROG([BLESS], "true")
975
976 dnl Determine the addressing mode to use
977 if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
978 ADDRESSING_MODE="real"
979 else
980 ADDRESSING_MODE=""
981 AC_MSG_CHECKING([for the addressing mode to use])
982 for am in $ADDRESSING_TEST_ORDER; do
983 case $am in
984 real)
985 dnl Requires ability to mmap() Low Memory globals
986 if [[ "x$ac_cv_can_map_lm$ac_cv_pagezero_hack" = "xnono" ]]; then
987 continue
988 fi
989 dnl Requires VOSF screen updates
990 if [[ "x$CAN_VOSF" = "xno" ]]; then
991 continue
992 fi
993 dnl Real addressing will probably work.
994 ADDRESSING_MODE="real"
995 WANT_VOSF=yes dnl we can use VOSF and we need it actually
996 DEFINES="$DEFINES -DREAL_ADDRESSING"
997 if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then
998 BLESS=Darwin/lowmem
999 LDFLAGS="$LDFLAGS -pagezero_size 0x2000"
1000 fi
1001 break
1002 ;;
1003 direct)
1004 dnl Requires VOSF screen updates
1005 if [[ "x$CAN_VOSF" = "xyes" ]]; then
1006 ADDRESSING_MODE="direct"
1007 WANT_VOSF=yes dnl we can use VOSF and we need it actually
1008 DEFINES="$DEFINES -DDIRECT_ADDRESSING"
1009 break
1010 fi
1011 ;;
1012 banks)
1013 dnl Default addressing mode
1014 ADDRESSING_MODE="memory banks"
1015 break
1016 ;;
1017 *)
1018 AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
1019 esac
1020 done
1021 AC_MSG_RESULT($ADDRESSING_MODE)
1022 if [[ "x$ADDRESSING_MODE" = "x" ]]; then
1023 AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
1024 ADDRESSING_MODE="memory banks"
1025 fi
1026 fi
1027
1028 dnl Banked Memory Addressing mode is not supported by the JIT compiler
1029 if [[ "x$WANT_JIT" = "xyes" -a "x$ADDRESSING_MODE" = "xmemory banks" ]]; then
1030 AC_MSG_ERROR([Sorry, the JIT Compiler requires Direct Addressing, at least])
1031 fi
1032
1033 dnl Enable VOSF screen updates with this feature is requested and feasible
1034 if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then
1035 AC_DEFINE(ENABLE_VOSF, 1, [Define if using video enabled on SEGV signals.])
1036 else
1037 WANT_VOSF=no
1038 fi
1039
1040 dnl Check for GAS.
1041 HAVE_GAS=no
1042 AC_MSG_CHECKING(for GAS .p2align feature)
1043 cat >conftest.S << EOF
1044 .text
1045 .p2align 5
1046 EOF
1047 if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVE_GAS=yes; fi
1048 AC_MSG_RESULT($HAVE_GAS)
1049
1050 dnl Check for GCC 2.7 or higher.
1051 HAVE_GCC27=no
1052 AC_MSG_CHECKING(for GCC 2.7 or higher)
1053 AC_EGREP_CPP(xyes,
1054 [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
1055 xyes
1056 #endif
1057 ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
1058
1059 dnl Check for GCC 3.0 or higher.
1060 HAVE_GCC30=no
1061 AC_MSG_CHECKING(for GCC 3.0 or higher)
1062 AC_EGREP_CPP(xyes,
1063 [#if __GNUC__ >= 3
1064 xyes
1065 #endif
1066 ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
1067
1068 dnl Check for ICC.
1069 AC_MSG_CHECKING(for ICC)
1070 HAVE_ICC=no
1071 if $CXX -V -v 2>&1 | grep -q "Intel(R) C++ Compiler"; then
1072 HAVE_ICC=yes
1073 fi
1074 AC_MSG_RESULT($HAVE_ICC)
1075
1076 dnl Set "-fomit-frame-pointer" on i386 GCC 2.7 or higher.
1077 dnl Also set "-fno-exceptions" for C++ because exception handling requires
1078 dnl the frame pointer.
1079 if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
1080 CFLAGS="$CFLAGS -fomit-frame-pointer"
1081 CXXFLAGS="$CXXFLAGS -fomit-frame-pointer -fno-exceptions"
1082 fi
1083
1084 dnl (gb) Do not merge constants since it breaks fpu/fpu_x86.cpp.
1085 dnl As of 2001/08/02, this affects the following compilers:
1086 dnl Official: probably gcc-3.1 (mainline CVS)
1087 dnl Mandrake: gcc-2.96 >= 0.59mdk, gcc-3.0.1 >= 0.1mdk
1088 dnl Red Hat : gcc-2.96 >= 89, gcc-3.0 >= 1
1089 if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
1090 SAVED_CXXFLAGS="$CXXFLAGS"
1091 CXXFLAGS="$CXXFLAGS -fno-merge-constants"
1092 AC_CACHE_CHECK([whether GCC supports constants merging], ac_cv_gcc_constants_merging, [
1093 AC_LANG_SAVE
1094 AC_LANG_CPLUSPLUS
1095 AC_TRY_COMPILE([],[],[ac_cv_gcc_constants_merging=yes],[ac_cv_gcc_constants_merging=no])
1096 AC_LANG_RESTORE
1097 ])
1098 if [[ "x$ac_cv_gcc_constants_merging" != "xyes" ]]; then
1099 CXXFLAGS="$SAVED_CXXFLAGS"
1100 fi
1101 fi
1102
1103 dnl Store motion was introduced in 3.3-hammer branch and any gcc >= 3.4
1104 dnl However, there are some corner cases exposed on x86-64
1105 if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
1106 SAVED_CXXFLAGS="$CXXFLAGS"
1107 CXXFLAGS="$CXXFLAGS -fno-gcse-sm"
1108 AC_CACHE_CHECK([whether GCC supports store motion], ac_cv_gcc_store_motion, [
1109 AC_LANG_SAVE
1110 AC_LANG_CPLUSPLUS
1111 AC_TRY_COMPILE([],[],[ac_cv_gcc_store_motion=yes],[ac_cv_gcc_store_motion=no])
1112 AC_LANG_RESTORE
1113 ])
1114 if [[ "x$ac_cv_gcc_store_motion" != "xyes" ]]; then
1115 CXXFLAGS="$SAVED_CXXFLAGS"
1116 fi
1117 fi
1118
1119 dnl Add -fno-strict-aliasing for slirp sources
1120 if [[ "x$HAVE_GCC30" = "xyes" ]]; then
1121 SAVED_CFLAGS="$CFLAGS"
1122 CFLAGS="$CFLAGS -fno-strict-aliasing"
1123 AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing],
1124 ac_cv_gcc_no_strict_aliasing, [
1125 AC_TRY_COMPILE([],[],
1126 [ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "$CFLAGS")],
1127 [ac_cv_gcc_no_strict_aliasing=no])
1128 ])
1129 CFLAGS="$SAVED_CFLAGS"
1130 fi
1131
1132 dnl Select appropriate CPU source and REGPARAM define.
1133 ASM_OPTIMIZATIONS=none
1134 CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
1135
1136 dnl (gb) JITSRCS will be emptied later if the JIT is not available
1137 dnl Other platforms should define their own set of noflags file variants
1138 CAN_JIT=no
1139 JITSRCS="compemu1.cpp compemu2.cpp compemu3.cpp compemu4.cpp compemu5.cpp compemu6.cpp compemu7.cpp compemu8.cpp"
1140
1141 if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
1142 dnl i386 CPU
1143 DEFINES="$DEFINES -DUNALIGNED_PROFITABLE -DREGPARAM=\"__attribute__((regparm(3)))\""
1144 if [[ "x$HAVE_GAS" = "xyes" ]]; then
1145 ASM_OPTIMIZATIONS=i386
1146 DEFINES="$DEFINES -DX86_ASSEMBLY -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE"
1147 JITSRCS="cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp $JITSRCS"
1148 CAN_JIT=yes
1149 fi
1150 elif [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_X86_64" = "xyes" ]]; then
1151 dnl x86-64 CPU
1152 DEFINES="$DEFINES -DUNALIGNED_PROFITABLE"
1153 if [[ "x$HAVE_GAS" = "xyes" ]]; then
1154 ASM_OPTIMIZATIONS="x86-64"
1155 DEFINES="$DEFINES -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS"
1156 JITSRCS="cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp $JITSRCS"
1157 CAN_JIT=yes
1158 WANT_33BIT_ADDRESSING=yes
1159 fi
1160 elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
1161 dnl SPARC CPU
1162 case "$target_os" in
1163 solaris*)
1164 AC_MSG_CHECKING(SPARC CPU architecture)
1165 SPARC_TYPE=`Solaris/which_sparc`
1166 AC_MSG_RESULT($SPARC_TYPE)
1167 case "$SPARC_TYPE" in
1168 SPARC_V8)
1169 ASM_OPTIMIZATIONS="SPARC V8 architecture"
1170 DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
1171 CFLAGS="$CFLAGS -Wa,-Av8"
1172 CXXFLAGS="$CXXFLAGS -Wa,-Av8"
1173 ;;
1174 SPARC_V9)
1175 ASM_OPTIMIZATIONS="SPARC V9 architecture"
1176 DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
1177 CFLAGS="$CFLAGS -Wa,-Av9"
1178 CXXFLAGS="$CXXFLAGS -Wa,-Av9"
1179 ;;
1180 esac
1181 ;;
1182 esac
1183 elif [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
1184 dnl Native m68k, no emulation
1185 CPUINCLUDES="-I../native_cpu"
1186 CPUSRCS="asm_support.s"
1187 fi
1188
1189 dnl Enable JIT compiler, if possible.
1190 if [[ "x$WANT_JIT" = "xyes" -a "x$CAN_JIT" ]]; then
1191 JITSRCS="$JITSRCS ../uae_cpu/compiler/compemu_support.cpp ../uae_cpu/compiler/compemu_fpp.cpp compstbl.o cpustbl_nf.o"
1192 DEFINES="$DEFINES -DUSE_JIT -DUSE_JIT_FPU"
1193
1194 if [[ "x$WANT_JIT_DEBUG" = "xyes" ]]; then
1195 if [[ "x$WANT_MON" = "xyes" ]]; then
1196 DEFINES="$DEFINES -DJIT_DEBUG=1"
1197 else
1198 AC_MSG_WARN([cxmon not found, ignoring --enable-jit-debug])
1199 WANT_JIT_DEBUG=no
1200 fi
1201 fi
1202
1203 dnl IEEE core is the only FPU emulator to use with the JIT compiler
1204 case $FPE_CORE_TEST_ORDER in
1205 ieee*) ;;
1206 *) AC_MSG_WARN([Forcing use of the IEEE FPU core, as the JIT compiler supports only this one.]) ;;
1207 esac
1208 FPE_CORE_TEST_ORDER="ieee"
1209 else
1210 WANT_JIT=no
1211 WANT_JIT_DEBUG=no
1212 JITSRCS=""
1213 fi
1214
1215 dnl Use 33-bit memory addressing?
1216 if [[ "$ac_cv_have_33bit_addressing:$WANT_33BIT_ADDRESSING" = "yes:yes" ]]; then
1217 use_33bit_addressing=yes
1218 fi
1219 AC_TRANSLATE_DEFINE(USE_33BIT_ADDRESSING, "$use_33bit_addressing",
1220 [Define to use 33-bit memory addressing on 64-bit JIT capable systems.])
1221
1222 dnl Utility macro used by next two tests.
1223 dnl AC_EXAMINE_OBJECT(C source code,
1224 dnl commands examining object file,
1225 dnl [commands to run if compile failed]):
1226 dnl
1227 dnl Compile the source code to an object file; then convert it into a
1228 dnl printable representation. All unprintable characters and
1229 dnl asterisks (*) are replaced by dots (.). All white space is
1230 dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the
1231 dnl output, but runs of newlines are compressed to a single newline.
1232 dnl Finally, line breaks are forcibly inserted so that no line is
1233 dnl longer than 80 columns and the file ends with a newline. The
1234 dnl result of all this processing is in the file conftest.dmp, which
1235 dnl may be examined by the commands in the second argument.
1236 dnl
1237 AC_DEFUN([gcc_AC_EXAMINE_OBJECT],
1238 [AC_LANG_SAVE
1239 AC_LANG_C
1240 dnl Next bit cribbed from AC_TRY_COMPILE.
1241 cat > conftest.$ac_ext <<EOF
1242 [#line __oline__ "configure"
1243 #include "confdefs.h"
1244 $1
1245 ]EOF
1246 if AC_TRY_EVAL(ac_compile); then
1247 od -c conftest.o |
1248 sed ['s/^[0-7]*[ ]*/ /
1249 s/\*/./g
1250 s/ \\n/*/g
1251 s/ [0-9][0-9][0-9]/./g
1252 s/ \\[^ ]/./g'] |
1253 tr -d '
1254 ' | tr -s '*' '
1255 ' | fold | sed '$a\
1256 ' > conftest.dmp
1257 $2
1258 ifelse($3, , , else
1259 $3
1260 )dnl
1261 fi
1262 rm -rf conftest*
1263 AC_LANG_RESTORE])
1264
1265 dnl Floating point format probe.
1266 dnl The basic concept is the same as the above: grep the object
1267 dnl file for an interesting string. We have to watch out for
1268 dnl rounding changing the values in the object, however; this is
1269 dnl handled by ignoring the least significant byte of the float.
1270 dnl
1271 dnl Does not know about VAX G-float or C4x idiosyncratic format.
1272 dnl It does know about PDP-10 idiosyncratic format, but this is
1273 dnl not presently supported by GCC. S/390 "binary floating point"
1274 dnl is in fact IEEE (but maybe we should have that in EBCDIC as well
1275 dnl as ASCII?)
1276 dnl
1277 AC_DEFUN([gcc_AC_C_FLOAT_FORMAT],
1278 [AC_CACHE_CHECK(floating point format, ac_cv_c_float_format,
1279 [gcc_AC_EXAMINE_OBJECT(
1280 [/* This will not work unless sizeof(double) == 8. */
1281 extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
1282
1283 /* This structure must have no internal padding. */
1284 struct possibility {
1285 char prefix[8];
1286 double candidate;
1287 char postfix[8];
1288 };
1289
1290 #define C(cand) { "\nformat:", cand, ":tamrof\n" }
1291 struct possibility table [] =
1292 {
1293 C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
1294 C( 3.53802595280598432000e+18), /* D__float - VAX */
1295 C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
1296 C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
1297 C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
1298 };],
1299 [if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
1300 ac_cv_c_float_format='IEEE (big-endian)'
1301 elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
1302 ac_cv_c_float_format='IEEE (big-endian)'
1303 elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
1304 ac_cv_c_float_format='IEEE (little-endian)'
1305 elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
1306 ac_cv_c_float_format='IEEE (little-endian)'
1307 elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
1308 ac_cv_c_float_format='VAX D-float'
1309 elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
1310 ac_cv_c_float_format='PDP-10'
1311 elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
1312 ac_cv_c_float_format='IBM 370 hex'
1313 else
1314 AC_MSG_ERROR(Unknown floating point format)
1315 fi],
1316 [AC_MSG_ERROR(compile failed)])
1317 ])
1318 # IEEE is the default format. If the float endianness isn't the same
1319 # as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
1320 # (which is a tristate: yes, no, default). This is only an issue with
1321 # IEEE; the other formats are only supported by a few machines each,
1322 # all with the same endianness.
1323 format=IEEE_FLOAT_FORMAT
1324 fbigend=
1325 case $ac_cv_c_float_format in
1326 'IEEE (big-endian)' )
1327 if test $ac_cv_c_bigendian = no; then
1328 fbigend=1
1329 fi
1330 ;;
1331 'IEEE (little-endian)' )
1332 if test $ac_cv_c_bigendian = yes; then
1333 fbigend=0
1334 fi
1335 ;;
1336 'VAX D-float' )
1337 format=VAX_FLOAT_FORMAT
1338 ;;
1339 'PDP-10' )
1340 format=PDP10_FLOAT_FORMAT
1341 ;;
1342 'IBM 370 hex' )
1343 format=IBM_FLOAT_FORMAT
1344 ;;
1345 esac
1346 AC_DEFINE_UNQUOTED(HOST_FLOAT_FORMAT, $format,
1347 [Define to the floating point format of the host machine.])
1348 if test -n "$fbigend"; then
1349 AC_DEFINE_UNQUOTED(HOST_FLOAT_WORDS_BIG_ENDIAN, $fbigend,
1350 [Define to 1 if the host machine stores floating point numbers in
1351 memory with the word containing the sign bit at the lowest address,
1352 or to 0 if it does it the other way around.
1353
1354 This macro should not be defined if the ordering is the same as for
1355 multi-word integers.])
1356 fi
1357 ])
1358
1359 dnl Select appropriate FPU source.
1360 gcc_AC_C_FLOAT_FORMAT
1361 AC_CHECK_HEADERS(ieee754.h ieeefp.h floatingpoint.h nan.h)
1362
1363 for fpe in $FPE_CORE_TEST_ORDER; do
1364 case $fpe in
1365 ieee)
1366 case $ac_cv_c_float_format in
1367 IEEE*)
1368 FPE_CORE="IEEE fpu core"
1369 DEFINES="$DEFINES -DFPU_IEEE"
1370 FPUSRCS="../uae_cpu/fpu/fpu_ieee.cpp"
1371 dnl Math functions not mandated by C99 standard
1372 AC_CHECK_FUNCS(isnanl isinfl)
1373 dnl Math functions required by C99 standard, but probably not
1374 dnl implemented everywhere. In that case, we fall back to the
1375 dnl regular variant for doubles.
1376 AC_CHECK_FUNCS(logl log10l expl powl fabsl sqrtl)
1377 AC_CHECK_FUNCS(sinl cosl tanl sinhl coshl tanhl)
1378 AC_CHECK_FUNCS(asinl acosl atanl asinhl acoshl atanhl)
1379 AC_CHECK_FUNCS(floorl ceill)
1380 break
1381 ;;
1382 esac
1383 ;;
1384 x86)
1385 if [[ ":$HAVE_GCC27:$HAVE_I386:$HAVE_GAS:" = ":yes:yes:yes:" ]]; then
1386 FPE_CORE="i387 fpu core"
1387 DEFINES="$DEFINES -DFPU_X86"
1388 FPUSRCS="../uae_cpu/fpu/fpu_x86.cpp"
1389 break
1390 fi
1391 ;;
1392 uae)
1393 FPE_CORE="uae fpu core"
1394 DEFINES="$DEFINES -DFPU_UAE"
1395 FPUSRCS="../uae_cpu/fpu/fpu_uae.cpp"
1396 break
1397 ;;
1398 *)
1399 AC_MSG_ERROR([Internal configure.in script error for $fpe fpu core])
1400 ;;
1401 esac
1402 done
1403 if [[ "x$FPE_CORE" = "x" ]]; then
1404 AC_MSG_ERROR([Sorry, no suitable FPU core found in $FPE_CORE_TEST_ORDER])
1405 fi
1406
1407 dnl Check for certain math functions
1408 AC_CHECK_FUNCS(atanh)
1409 AC_CHECK_FUNCS(isnan isinf finite isnormal signbit)
1410
1411 dnl UAE CPU sources for all non-m68k-native architectures.
1412 if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then
1413 CPUINCLUDES="-I../uae_cpu"
1414 CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS $JITSRCS"
1415 fi
1416
1417 dnl Remove the "-g" option if set for GCC.
1418 if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1419 CFLAGS=`echo $CFLAGS | sed -e 's/-g\b//g'`
1420 CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-g\b//g'`
1421 fi
1422
1423 dnl Or if we have -IPA (MIPSPro compilers)
1424 if [[ "x$HAVE_IPA" = "xyes" ]]; then
1425 CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA"
1426 CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA"
1427 CXXFLAGS="-LANG:std $CXXFLAGS"
1428 LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA"
1429 fi
1430
1431 dnl Generate Makefile.
1432 AC_SUBST(DEFINES)
1433 AC_SUBST(SYSSRCS)
1434 AC_SUBST(CPUINCLUDES)
1435 AC_SUBST(CPUSRCS)
1436 AC_SUBST(BLESS)
1437 AC_SUBST(KEYCODES)
1438 AC_CONFIG_FILES([Makefile])
1439 AC_OUTPUT
1440
1441 dnl Print summary.
1442 echo
1443 echo Basilisk II configuration summary:
1444 echo
1445 echo SDL support ............................ : $SDL_SUPPORT
1446 echo XFree86 DGA support .................... : $WANT_XF86_DGA
1447 echo XFree86 VidMode support ................ : $WANT_XF86_VIDMODE
1448 echo fbdev DGA support ...................... : $WANT_FBDEV_DGA
1449 echo Enable video on SEGV signals ........... : $WANT_VOSF
1450 echo ESD sound support ...................... : $WANT_ESD
1451 echo GTK user interface ..................... : $WANT_GTK
1452 echo mon debugger support ................... : $WANT_MON
1453 echo Running m68k code natively ............. : $WANT_NATIVE_M68K
1454 echo Use JIT compiler ....................... : $WANT_JIT
1455 echo JIT debug mode ......................... : $WANT_JIT_DEBUG
1456 echo Floating-Point emulation core .......... : $FPE_CORE
1457 echo Assembly optimizations ................. : $ASM_OPTIMIZATIONS
1458 echo Addressing mode ........................ : $ADDRESSING_MODE
1459 echo Bad memory access recovery type ........ : $sigsegv_recovery
1460 echo
1461 echo "Configuration done. Now type \"make\" (or \"gmake\")."