ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/configure.in
(Generate patch)

Comparing BasiliskII/src/Unix/configure.in (file contents):
Revision 1.15 by cebix, 1999-10-26T16:56:44Z vs.
Revision 1.53 by cebix, 2002-02-07T16:10:55Z

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines