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.5 by cebix, 1999-10-15T12:27:24Z vs.
Revision 1.52 by cebix, 2002-01-22T17:15:09Z

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines