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.21 by cebix, 2000-07-22T18:12:34Z vs.
Revision 1.32 by gbeauche, 2001-01-28T14:04:32Z

# Line 9 | Line 9 | dnl Options.
9   AC_ARG_ENABLE(xf86-dga,      [  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
10   AC_ARG_ENABLE(xf86-vidmode,  [  --enable-xf86-vidmode   use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
11   AC_ARG_ENABLE(fbdev-dga,     [  --enable-fbdev-dga      use direct frame buffer access via /dev/fb [default=yes]], [WANT_FBDEV_DGA=$enableval], [WANT_FBDEV_DGA=yes])
12 + AC_ARG_ENABLE(vosf,          [  --enable-vosf           enable video on SEGV signals [default=no]], [WANT_VOSF=$enableval], [WANT_VOSF=no])
13 +
14 + dnl Addressing modes.
15 + AC_ARG_ENABLE(addressing,
16 + [  --enable-addressing=AM  specify the addressing mode to use [default=fastest]],
17 + [ case "$enableval" in
18 +    real)       ADDRESSING_TEST_ORDER="real";;
19 +    direct)     ADDRESSING_TEST_ORDER="direct";;
20 +    banks)      ADDRESSING_TEST_ORDER="banks";;
21 +    fastest)ADDRESSING_TEST_ORDER="direct banks";;
22 +    *)          AC_MSG_ERROR([--enable-addressing takes only one of the following values: fastest, real, direct, banks]);;
23 +  esac
24 + ],
25 + [ ADDRESSING_TEST_ORDER="direct banks"
26 + ])
27 +
28 + dnl External packages.
29   AC_ARG_WITH(esd,             [  --with-esd              support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
30   AC_ARG_WITH(gtk,             [  --with-gtk              use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
31   AC_ARG_WITH(mon,             [  --with-mon              use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
32  
33 + dnl Canonical system information.
34 + AC_CANONICAL_HOST
35 + AC_CANONICAL_TARGET
36 +
37 + dnl Target OS type (target is host if not cross-compiling).
38 + case "$target_os" in
39 +  linux*)       OS_TYPE=linux;;
40 +  netbsd*)      OS_TYPE=netbsd;;
41 +  freebsd*)     OS_TYPE=freebsd;;
42 +  solaris*)     OS_TYPE=solaris;;
43 +  *)            OS_TYPE=`echo $target_os | sed -e 's/-/_/' | sed -e 's/\./_/'`;;
44 + esac
45 + DEFINES="$DEFINES -DOS_$OS_TYPE"
46 +
47 + dnl Target CPU type.
48 + HAVE_I386=no
49 + HAVE_M68K=no
50 + HAVE_SPARC=no
51 + case "$target_cpu" in
52 +  i386* | i486* | i586* | i686* | i786* ) CPU_TYPE=i386 HAVE_I386=yes;;
53 +  m68k* ) CPU_TYPE=m68k HAVE_M68K=yes;;
54 +  sparc* ) CPU_TYPE=sparc HAVE_SPARC=yes;;
55 +  *) CPU_TYPE=`echo $target_cpu | sed -e 's/-/_/'`;;
56 + esac
57 + DEFINES="$DEFINES -DCPU_$CPU_TYPE"
58 +
59   dnl Checks for programs.
60   AC_PROG_CC
61 + AC_PROG_CC_C_O
62   AC_PROG_CPP
63   AC_PROG_CXX
64   AC_PROG_MAKE_SET
65   AC_PROG_INSTALL
66  
23 dnl Check for i386 target CPU.
24 HAVE_I386=no
25 AC_MSG_CHECKING(for x86 target CPU)
26 AC_EGREP_CPP(yes,
27 [
28 #ifdef __i386__
29  yes
30 #endif
31 ], [AC_MSG_RESULT(yes); HAVE_I386=yes], AC_MSG_RESULT(no))
32
33 dnl Check for SPARC target CPU.
34 HAVE_SPARC=no
35 AC_MSG_CHECKING(for SPARC target CPU)
36 AC_EGREP_CPP(yes,
37 [
38 #ifdef __sparc__
39  yes
40 #endif
41 ], [AC_MSG_RESULT(yes); HAVE_SPARC=yes], AC_MSG_RESULT(no))
42
43 dnl Check for m68k target CPU.
44 HAVE_M68K=no
45 AC_MSG_CHECKING(for m68k target CPU)
46 AC_EGREP_CPP(yes,
47 [
48 #ifdef __m68k__
49  yes
50 #endif
51 ], [AC_MSG_RESULT(yes); HAVE_M68K=yes], AC_MSG_RESULT(no))
52
67   dnl We use mon if possible.
68   MONSRCS=
69   if [[ "x$WANT_MON" = "xyes" ]]; then
70    AC_MSG_CHECKING(for mon)
71 <  if grep mon_init ../../../mon/src/mon.h >/dev/null 2>/dev/null; then
71 >  mon_srcdir=../../../mon/src
72 >  if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
73      AC_MSG_RESULT(yes)
74      AC_DEFINE(ENABLE_MON)
75 <    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"
76 <    CXXFLAGS="$CXXFLAGS -I../../../mon/src"
75 >    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/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c"
76 >    CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
77      AC_CHECK_LIB(readline, readline)
78      AC_CHECK_LIB(termcap, tputs)
79      AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
# Line 98 | Line 113 | AC_CHECK_FUNCS(pthread_cancel)
113   dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes.
114   SEMSRC=
115   AC_CHECK_FUNCS(sem_init, , [
116 <  if [ "x$HAVE_PTHREADS" = "xyes" ]; then
116 >  if test "x$HAVE_PTHREADS" = "xyes"; then
117      SEMSRC=posix_sem.cpp
118    fi
119   ])
# Line 172 | Line 187 | AC_CHECK_SIZEOF(short, 2)
187   AC_CHECK_SIZEOF(int, 4)
188   AC_CHECK_SIZEOF(long, 4)
189   AC_CHECK_SIZEOF(long long, 8)
190 + AC_CHECK_SIZEOF(void *, 4)
191   AC_TYPE_OFF_T
192   AC_CHECK_TYPE(loff_t, off_t)
193   AC_TYPE_SIZE_T
194 + AC_TYPE_SIGNAL
195   AC_HEADER_TIME
196   AC_STRUCT_TM
197  
# Line 188 | Line 205 | ETHERSRC=../dummy/ether_dummy.cpp
205   SCSISRC=../dummy/scsi_dummy.cpp
206   AUDIOSRC=../dummy/audio_dummy.cpp
207   EXTRASYSSRCS=
208 < SUPPORTS_NATIVE_M68K=no
209 < if MACHINE=`uname -s 2>/dev/null`; then
210 <  case "$MACHINE" in
211 <  Linux*)
212 <    ETHERSRC=Linux/ether_linux.cpp
213 <    SCSISRC=Linux/scsi_linux.cpp
214 <    AUDIOSRC=audio_oss_esd.cpp
215 <    ;;
216 <  FreeBSD*3.*)
217 <    AUDIOSRC=audio_oss_esd.cpp
218 <    DEFINES="$DEFINES -DBSD_COMP"
219 <    dnl Check for the CAM library
220 <    AC_CHECK_LIB(cam, cam_open_btl, HAVE_LIBCAM=yes, HAVE_LIBCAM=no)
221 <    if [[ "x$HAVE_LIBCAM" = "xno" ]]; then
222 <      AC_MSG_WARN([Cannot find libcam for SCSI management, disabling SCSI support.])
208 > CAN_NATIVE_M68K=no
209 > case "$target_os" in
210 > linux*)
211 >  ETHERSRC=Linux/ether_linux.cpp
212 >  SCSISRC=Linux/scsi_linux.cpp
213 >  AUDIOSRC=audio_oss_esd.cpp
214 >  ;;
215 > freebsd*3.*)
216 >  AUDIOSRC=audio_oss_esd.cpp
217 >  DEFINES="$DEFINES -DBSD_COMP"
218 >  dnl Check for the CAM library
219 >  AC_CHECK_LIB(cam, cam_open_btl, HAVE_LIBCAM=yes, HAVE_LIBCAM=no)
220 >  if [[ "x$HAVE_LIBCAM" = "xno" ]]; then
221 >    AC_MSG_WARN([Cannot find libcam for SCSI management, disabling SCSI support.])
222 >  else
223 >    dnl Check for the sys kernel includes
224 >    AC_CHECK_HEADER(/sys/cam/cam.h)
225 >    if [[ "x$ac_cv_header__sys_cam_cam_h" = "xno" ]]; then
226 >      dnl In this case I should fix this thing including a "patch"
227 >      dnl to access directly to the functions in the kernel :) --Orlando
228 >      AC_MSG_WARN([Cannot find kernel includes for CAM library, disabling SCSI support.])
229      else
230 <      dnl Check for the sys kernel includes
231 <      AC_CHECK_HEADER(/sys/cam/cam.h)
232 <      if [[ "x$ac_cv_header__sys_cam_cam_h" = "xno" ]]; then
233 <        dnl In this case I should fix this thing including a "patch"
234 <        dnl to access directly to the functions in the kernel :) --Orlando
212 <        AC_MSG_WARN([Cannot find kernel includes for CAM library, disabling SCSI support.])
213 <      else
214 <        SCSISRC=FreeBSD/scsi_freebsd.cpp
215 <        CXXFLAGS="$CXXFLAGS -I/sys"
216 <        CFLAGS="$CFLAGS -I/sys"
217 <        LIBS="$LIBS -lcam"
218 <        DEFINES="$DEFINES -DCAM"
219 <      fi
230 >      SCSISRC=FreeBSD/scsi_freebsd.cpp
231 >      CXXFLAGS="$CXXFLAGS -I/sys"
232 >      CFLAGS="$CFLAGS -I/sys"
233 >      LIBS="$LIBS -lcam"
234 >      DEFINES="$DEFINES -DCAM"
235      fi
236 <    ;;
237 <  FreeBSD*)
238 <    DEFINES="$DEFINES -DBSD_COMP"
239 <    dnl Check for the SCSI library
240 <    AC_CHECK_LIB(scsi, scsi_open, HAVE_LIBSCSI=yes, HAVE_LIBSCSI=no)
241 <    if [[ "x$HAVE_LIBSCSI" = "xno" ]]; then
242 <      AC_MSG_WARN([Cannot find libscsi for SCSI management, disabling SCSI support.])
236 >  fi
237 >  ;;
238 > freebsd*)
239 >  DEFINES="$DEFINES -DBSD_COMP"
240 >  dnl Check for the SCSI library
241 >  AC_CHECK_LIB(scsi, scsi_open, HAVE_LIBSCSI=yes, HAVE_LIBSCSI=no)
242 >  if [[ "x$HAVE_LIBSCSI" = "xno" ]]; then
243 >    AC_MSG_WARN([Cannot find libscsi for SCSI management, disabling SCSI support.])
244 >  else
245 >    dnl Check for the sys kernel includes
246 >    AC_CHECK_HEADER(scsi.h sys/scsiio.h)
247 >    if [[ "x$ac_cv_header_scsi_h" = "xno" ]]; then
248 >      AC_MSG_WARN([Cannot find includes for the SCSI library, disabling SCSI support.])
249      else
250 <      dnl Check for the sys kernel includes
251 <      AC_CHECK_HEADER(scsi.h sys/scsiio.h)
231 <      if [[ "x$ac_cv_header_scsi_h" = "xno" ]]; then
232 <        AC_MSG_WARN([Cannot find includes for the SCSI library, disabling SCSI support.])
233 <      else
234 <        SCSISRC=FreeBSD/scsi_freebsd.cpp
235 <        LIBS="$LIBS -lscsi"
236 <      fi
250 >      SCSISRC=FreeBSD/scsi_freebsd.cpp
251 >      LIBS="$LIBS -lscsi"
252      fi
253 <    ;;
254 <  NetBSD*)
255 <    SUPPORTS_NATIVE_M68K=yes
256 <    ;;
257 <  SunOS*)
258 <    AUDIOSRC=Solaris/audio_solaris.cpp
259 <    DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
260 <    ;;
261 <  IRIX*)
262 <    EXTRASYSSRCS=Irix/unaligned.c
263 <    DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200"
264 <    LIBS="$LIBS -lm"
265 <    ;;
266 <  esac
253 >  fi
254 >  ;;
255 > netbsd*)
256 >  CAN_NATIVE_M68K=yes
257 >  ;;
258 > solaris*)
259 >  AUDIOSRC=Solaris/audio_solaris.cpp
260 >  DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
261 >  ;;
262 > irix*)
263 >  AUDIOSRC=Irix/audio_irix.cpp
264 >  EXTRASYSSRCS=Irix/unaligned.c
265 >  dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
266 >  DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
267 >  LIBS="$LIBS -laudio"
268 >  ;;
269 > esac
270 >
271 > dnl Use 68k CPU natively?
272 > WANT_NATIVE_M68K=no
273 > if [[ "x$HAVE_M68K" = "xyes" -a "x$CAN_NATIVE_M68K" = "xyes" ]]; then
274 >  AC_DEFINE(ENABLE_NATIVE_M68K)
275 >  WANT_NATIVE_M68K=yes
276   fi
277 +
278   if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
279    dnl Serial, ethernet and audio support needs pthreads
280    AC_MSG_WARN([You don't have pthreads, disabling serial, ethernet and audio support.])
# Line 259 | Line 284 | if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
284   fi
285   SYSSRCS="$SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
286  
287 + dnl Define a macro that translates a yesno-variable into a C macro definition
288 + dnl to be put into the config.h file
289 + dnl $1 -- the macro to define
290 + dnl $2 -- the value to translate
291 + AC_DEFUN(AC_TRANSLATE_DEFINE, [
292 +    if [[ "x$2" = "xyes" ]]; then
293 +        AC_DEFINE($1)
294 +    fi
295 + ])
296 +
297 + dnl Check if we can mmap 0x2000 bytes from 0x0000
298 + AC_CACHE_CHECK("whether we can map Low Memory area 0x0000-0x2000",
299 +  ac_cv_can_map_lm, [
300 +  AC_LANG_SAVE
301 +  AC_LANG_CPLUSPLUS
302 +  AC_TRY_RUN([
303 +    #include <unistd.h>
304 +    #include <fcntl.h>
305 +    #include <sys/mman.h>
306 +    
307 +    int main()
308 +    { int zero_fd; char * lm;
309 +      if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
310 +      if ((lm = (char *)mmap((caddr_t)0x0000, 0x2000, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, zero_fd, 0)) == MAP_FAILED) exit(1);
311 +      lm[0] = 0x12;
312 +          munmap(lm, 0x2000);
313 +      close(zero_fd);
314 +      exit(0);
315 +    }
316 +  ],
317 +  [ac_cv_can_map_lm=yes],
318 +  [ac_cv_can_map_lm=no]
319 +  )
320 +  AC_LANG_RESTORE
321 +  ]
322 + )
323 +
324 + dnl Check if extended signals are supported.
325 + AC_CACHE_CHECK("whether your system supports extended signal handlers",
326 +  ac_cv_have_extended_signals, [
327 +  AC_LANG_SAVE
328 +  AC_LANG_CPLUSPLUS
329 +  AC_TRY_RUN([
330 +    #include <unistd.h>
331 +    #include <stdlib.h>
332 +    #include <signal.h>
333 +    #include <fcntl.h>
334 +    #include <sys/mman.h>
335 +
336 +    static volatile caddr_t mem = 0;
337 +    static int zero_fd = -1;
338 +
339 +    static RETSIGTYPE segfault_handler(int, siginfo_t * sip, void *)
340 +    { if ((caddr_t)(sip->si_addr) != mem) exit(1);
341 +      munmap(mem, getpagesize()); close(zero_fd); exit(0); }
342 +
343 +    int main()
344 +    { if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
345 +      if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
346 +      struct sigaction sa; sa.sa_sigaction = segfault_handler; sa.sa_flags = SA_SIGINFO;
347 +      sigaction(SIGSEGV, &sa, 0);
348 +      mem[0] = 0;
349 +      exit(1); // should not be reached
350 +    }
351 +  ],
352 +  [ac_cv_have_extended_signals=yes],
353 +  [ac_cv_have_extended_signals=no]
354 +  )
355 +  AC_LANG_RESTORE
356 +  ]
357 + )
358 + AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals")
359 +
360 + dnl Otherwise, check for subterfuges.
361 + if [[ "x$ac_cv_have_extended_signals" = "xno" ]]; then
362 +  case "$target_os" in
363 +    linux*)
364 +      if [[ "x$HAVE_I386" = "xyes" ]]; then
365 +        AC_CACHE_CHECK("whether we then have a subterfuge for your system",
366 +                  ac_cv_have_sigcontext_hack, [
367 +          AC_LANG_SAVE
368 +          AC_LANG_CPLUSPLUS
369 +          AC_TRY_RUN([
370 +            #include <unistd.h>
371 +            #include <signal.h>
372 +            #include <fcntl.h>
373 +            #include <sys/mman.h>
374 +
375 +            static volatile caddr_t mem = 0;
376 +            static int zero_fd = -1;
377 +
378 +            static RETSIGTYPE segfault_handler(int, struct sigcontext scs)
379 +            { if ((caddr_t)(scs.cr2) != mem) exit(1);
380 +              munmap(mem, getpagesize()); close(zero_fd); exit(0); }
381 +
382 +            int main()
383 +            { if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
384 +              if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
385 +              struct sigaction sa; sa.sa_flags = 0;
386 +              sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
387 +              sigaction(SIGSEGV, &sa, 0);
388 +              mem[0] = 0;
389 +              exit(1); // should not be reached
390 +            }
391 +          ],
392 +          [ac_cv_have_sigcontext_hack=yes],
393 +          [ac_cv_have_sigcontext_hack=no]
394 +          )
395 +          AC_LANG_RESTORE
396 +        ])
397 +        AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
398 +      fi
399 +      ;;
400 +    netbsd*)
401 +      if [[ "x$HAVE_M68K" = "xyes" ]]; then
402 +        AC_CACHE_CHECK("whether we then have a subterfuge for your system",
403 +                  ac_cv_have_sigcontext_hack, [
404 +          AC_LANG_SAVE
405 +          AC_LANG_CPLUSPLUS
406 +          AC_TRY_RUN([
407 +            #include <unistd.h>
408 +            #include <signal.h>
409 +            #include <fcntl.h>
410 +            #include <sys/mman.h>
411 +
412 +            static volatile caddr_t mem = 0;
413 +            static int zero_fd = -1;
414 +
415 +            static RETSIGTYPE segfault_handler(int, int code)
416 +            { if ((caddr_t)code != mem) exit(1);
417 +              munmap(mem, getpagesize()); close(zero_fd); exit(0); }
418 +
419 +            int main()
420 +            { if ((zero_fd = open("/dev/zero", O_RDWR)) < 0) exit(1);
421 +              if ((mem = (caddr_t)mmap(0, getpagesize(), PROT_READ, MAP_PRIVATE, zero_fd, 0)) == (caddr_t)MAP_FAILED) exit(1);
422 +              struct sigaction sa; sa.sa_flags = 0;
423 +              sa.sa_handler = (RETSIGTYPE (*)(int))segfault_handler;
424 +              sigaction(SIGSEGV, &sa, 0);
425 +              mem[0] = 0;
426 +              exit(1); // should not be reached
427 +            }
428 +          ],
429 +          [ac_cv_have_sigcontext_hack=yes],
430 +          [ac_cv_have_sigcontext_hack=no]
431 +          )
432 +          AC_LANG_RESTORE
433 +        ])
434 +        AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, $ac_cv_have_sigcontext_hack)
435 +      fi
436 +    ;;
437 +  esac
438 + fi
439 +
440 + dnl Can we do Video on SEGV Signals ?
441 + CAN_VOSF=no
442 + if [[ "$ac_cv_have_extended_signals" = "yes" -o "$ac_cv_have_sigcontext_hack" = "yes" ]]; then
443 +  CAN_VOSF=yes
444 + fi
445 +
446 + dnl Determine the addressing mode to use
447 + if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
448 +  ADDRESSING_MODE="real"
449 + else
450 +  ADDRESSING_MODE=""
451 +  AC_MSG_CHECKING([for the addressing mode to use])
452 +  for am in $ADDRESSING_TEST_ORDER; do
453 +    case $am in
454 +    real)
455 +      dnl Requires ability to mmap() Low Memory globals
456 +      if [[ "x$ac_cv_can_map_lm" = "xno" ]]; then
457 +        continue
458 +      fi
459 +          dnl Requires VOSF screen updates
460 +      if [[ "x$CAN_VOSF" = "xno" ]]; then
461 +        continue
462 +      fi
463 +      dnl Real addressing will probably work.
464 +      ADDRESSING_MODE="real"
465 +      WANT_VOSF=yes dnl we can use VOSF and we need it actually
466 +      DEFINES="$DEFINES -DREAL_ADDRESSING"
467 +      break
468 +      ;;
469 +    direct)
470 +      dnl Requires VOSF screen updates
471 +      if [[ "x$CAN_VOSF" = "xyes" ]]; then
472 +        ADDRESSING_MODE="direct"
473 +        WANT_VOSF=yes dnl we can use VOSF and we need it actually
474 +        DEFINES="$DEFINES -DDIRECT_ADDRESSING"
475 +        break
476 +      fi
477 +      ;;
478 +    banks)
479 +      dnl Default addressing mode
480 +      ADDRESSING_MODE="memory banks"
481 +      break
482 +      ;;
483 +    *)
484 +      AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
485 +    esac
486 +  done
487 +  AC_MSG_RESULT($ADDRESSING_MODE)
488 +  if [[ "x$ADDRESSING_MODE" = "x" ]]; then
489 +    AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
490 +    ADDRESSING_MODE="memory banks"
491 +  fi
492 + fi
493 +
494 + dnl Enable VOSF screen updates with this feature is requested and feasible
495 + if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then
496 +    AC_DEFINE(ENABLE_VOSF)
497 + else
498 +    WANT_VOSF=no
499 + fi
500 +
501   dnl Check for GAS.
502   HAVE_GAS=no
503   AC_MSG_CHECKING(for GAS .p2align feature)
# Line 285 | Line 524 | if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE
524   fi
525  
526   dnl Select appropriate CPU source and REGPARAM define.
527 < WANT_X86_ASSEMBLY=no
289 < WANT_SPARC_V8_ASSEMBLY=no
290 < WANT_SPARC_V9_ASSEMBLY=no
291 < WANT_NATIVE_M68K=no
527 > ASM_OPTIMIZATIONS=none
528   CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
529 + FPUSRCS="../uae_cpu/fpp.cpp"
530   if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
531    dnl i386 CPU
532    DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\""
533    if [[ "x$HAVE_GAS" = "xyes" ]]; then
534 <    WANT_X86_ASSEMBLY=yes
535 <    DEFINES="$DEFINES -DX86_ASSEMBLY"
534 >    ASM_OPTIMIZATIONS=i386
535 >    DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS"
536      CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
537 +    FPUSRCS="../uae_cpu/fpu_x86.cpp"
538    fi
539   elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
540    dnl SPARC CPU
541 <  case "$MACHINE" in
542 <  SunOS*)
541 >  case "$target_os" in
542 >  solaris*)
543      AC_MSG_CHECKING(SPARC CPU architecture)
544      SPARC_TYPE=`Solaris/which_sparc`
545      AC_MSG_RESULT($SPARC_TYPE)
546      case "$SPARC_TYPE" in
547      SPARC_V8)
548 <      WANT_SPARC_V8_ASSEMBLY=yes
549 <      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY"
548 >      ASM_OPTIMIZATIONS="SPARC V8 architecture"
549 >      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
550        CFLAGS="$CFLAGS -Wa,-Av8"
551        CXXFLAGS="$CXXFLAGS -Wa,-Av8"
552        ;;
553      SPARC_V9)
554 <      WANT_SPARC_V9_ASSEMBLY=yes
555 <      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY"
554 >      ASM_OPTIMIZATIONS="SPARC V9 architecture"
555 >      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
556        CFLAGS="$CFLAGS -Wa,-Av9"
557        CXXFLAGS="$CXXFLAGS -Wa,-Av9"
558        ;;
559      esac
560      ;;
561    esac
562 < elif [[ "x$HAVE_M68K" = "xyes" -a "x$SUPPORTS_NATIVE_M68K" = "xyes" ]]; then
562 > elif [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
563    dnl Native m68k, no emulation
564 <  CPUSRCS=""
565 <  AC_DEFINE(ENABLE_NATIVE_M68K)
328 <  WANT_NATIVE_M68K=yes
564 >  CPUINCLUDES="-I../native_cpu"
565 >  CPUSRCS="asm_support.s"
566   fi
567  
568   dnl UAE CPU sources for all non-m68k-native architectures.
569   if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then
570    CPUINCLUDES="-I../uae_cpu"
571 <  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"
572 < else
573 <  CPUINCLUDES="-I../native_cpu"
574 <  CPUSRCS="asm_support.s"
571 >  CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS"
572 > fi
573 >
574 > dnl Remove the "-g" option if set for GCC.
575 > if [[ "x$HAVE_GCC27" = "xyes" ]]; then
576 >  dnl gb-- Probably not the cleanest way to take
577 >  CFLAGS=`echo $CFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
578 >  CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -g / /;s/^-g / /;s/ -g$/ /;s/^-g$//'`
579   fi
580  
581   dnl Generate Makefile.
# Line 351 | Line 592 | echo
592   echo XFree86 DGA support .............. : $WANT_XF86_DGA
593   echo XFree86 VidMode support .......... : $WANT_XF86_VIDMODE
594   echo fbdev DGA support ................ : $WANT_FBDEV_DGA
595 + echo Enable video on SEGV signals ..... : $WANT_VOSF
596   echo ESD sound support ................ : $WANT_ESD
597   echo GTK user interface ............... : $WANT_GTK
598   echo mon debugger support ............. : $WANT_MON
357 echo i386 assembly optimizations ...... : $WANT_X86_ASSEMBLY
358 echo SPARC V8 assembly optimizations .. : $WANT_SPARC_V8_ASSEMBLY
359 echo SPARC V9 assembly optimizations .. : $WANT_SPARC_V9_ASSEMBLY
599   echo Running m68k code natively ....... : $WANT_NATIVE_M68K
600 + echo Assembly optimizations ........... : $ASM_OPTIMIZATIONS
601 + echo Addressing mode .................. : $ADDRESSING_MODE
602   echo
603   echo "Configuration done. Now type \"make\" (or \"gmake\")."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines