~ubuntu-branches/ubuntu/vivid/basilisk2/vivid

« back to all changes in this revision

Viewing changes to src/MacOSX/configure.in

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard, Jonas Smedegaard, Jérémy Lal, Giulio Paci
  • Date: 2012-05-19 02:08:30 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120519020830-o59ui1wsfftg55m6
Tags: 0.9.20120331-1
* Upstream update

[ Jonas Smedegaard ]
* Drop local CDBS snippets: All included in main cdbs now.
* Use source format 3.0 (quilt), and stop including patchsys-quilt.mk.
  Stop build-depending on quilt, patchutils.
* Add full licensing header to debian/rules, and update copyright
  years.
* Add README.source (and drop outdated README.cdbs-tweaks).
* Refresh patches with shortening quilt options --no-index
  --no-timestamps -pab, and fix their path prefix.
* Rewrite copyright file using draft DEP-5 format.
* Update control file Vcs-* fields: Packaging moved to Git.
* Ease building with git-buildpackage:
  + Add gbp.conf, enabling pristine-tar and tag signing.
  + Git-ignore quilt .pc dir.
* Bump debhelper compat level to 7.
* Update Vcs-Browser field to use anonscm.debian.org.
* Add Giulio Paci and Jérémy Lal as uploaders, and permit Debian
  Maintainers to upload.

[ Jérémy Lal ]
* Drop patch 1002 to fix capitalized flag: corrected upstream.

[ Giulio Paci ]
* Restart package development.
  Closes: #662175.
* Add patches to fix compilation and documentation.
* Provide JIT flavor on supported architectures (i386 and amd64).
* Bump standards-version to 3.9.3.
* Update copyright file:
  + Adjust licenses now clarified/improved upstream.
* Update ChangeLog.cvs.
* Enable CDBS autogeneration of autotools files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl Mac OS X configuration driver
2
 
dnl $Id: configure.in,v 1.21 2007/01/13 18:21:30 gbeauche Exp $
 
2
dnl $Id: configure.in,v 1.28 2011/03/11 16:44:46 asvitkine Exp $
3
3
dnl Process this file with autoconf to produce a configure script.
4
4
dnl Based on Unix/configure.in
5
5
dnl Written in 1999 by Christian Bauer et al.
10
10
dnl AC_INIT([Basilisk II], 1.0, [Christian.Bauer@uni-mainz.de], BasiliskII)
11
11
dnl AC_CONFIG_SRCDIR(main_macosx.mm)
12
12
AC_INIT(main_macosx.mm)
 
13
AC_CONFIG_AUX_DIR(../Unix)
13
14
AC_PREREQ(2.12)
14
15
AC_CONFIG_HEADER(config.h)
 
16
AH_TOP([
 
17
/* Include MacOS X macros determined at compile-time */
 
18
#include "config_macosx.h"
 
19
])
15
20
 
16
21
dnl Aliases for PACKAGE and VERSION macros.
17
22
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE_NAME", [Define this program name.])
21
26
dnl cores for the configure tests since some are intended to dump core.
22
27
ulimit -c 0
23
28
 
 
29
dnl Universal binaries.
 
30
AC_ARG_ENABLE(universal,
 
31
[  --enable-universal      enable universal binaries for selected arches [default=no]],
 
32
[ WANT_UNIVERSAL=""
 
33
  for arch in $enableval; do
 
34
    case $arch in
 
35
    yes) WANT_UNIVERSAL="i386 ppc";;
 
36
    ppc|ppc64|i386|x86_64) WANT_UNIVERSAL="$WANT_UNIVERSAL $arch";;
 
37
    esac
 
38
  done
 
39
])
 
40
AC_ARG_WITH(ppc-sdk,         [  --with-ppc-sdk=VERSION  use specific SDK VERSION for ppc builds [default=earliest]], [PPC_SDK_VERSION=$withval])
 
41
 
24
42
dnl Video options.
25
43
AC_ARG_ENABLE(multiwin,
26
 
[  --enable-multiwin    allow multiple emulator windows [default=no]], [ENABLE_MULTIPLE=$enableval], [ENABLE_MULTIPLE=no])
 
44
[  --enable-multiwin       allow multiple emulator windows [default=no]], [ENABLE_MULTIPLE=$enableval], [ENABLE_MULTIPLE=no])
27
45
 
28
46
dnl JIT compiler options.
29
47
AC_ARG_ENABLE(jit-compiler,  [  --enable-jit-compiler   enable JIT compiler [default=no]], [WANT_JIT=$enableval], [WANT_JIT=no])
30
48
AC_ARG_ENABLE(jit-debug,     [  --enable-jit-debug      activate native code disassemblers [default=no]], [WANT_JIT_DEBUG=$enableval], [WANT_JIT_DEBUG=no])
31
49
 
32
 
dnl FPU emulation core.
33
 
AC_ARG_ENABLE(fpe,
34
 
[  --enable-fpe=FPE        specify which fpu emulator to use [default=auto]],
35
 
[ case "$enableval" in
36
 
    dnl default is always ieee, if architecture has this fp format
37
 
    auto)       FPE_CORE_TEST_ORDER="ieee uae";;
38
 
    ieee)       FPE_CORE_TEST_ORDER="ieee";;
39
 
    uae)        FPE_CORE_TEST_ORDER="uae";;
40
 
    x86)        FPE_CORE_TEST_ORDER="x86";;
41
 
        *)              AC_MSG_ERROR([--enable-fpe takes only one of the following values: auto, x86, ieee, uae]);;
42
 
  esac
43
 
],
44
 
[ FPE_CORE_TEST_ORDER="ieee uae"
45
 
])
46
 
 
47
50
dnl Addressing modes.
48
51
AC_ARG_ENABLE(addressing,
49
52
[  --enable-addressing=AM  specify the addressing mode to use [default=fastest]],
59
62
])
60
63
 
61
64
dnl External packages.
62
 
AC_ARG_WITH(mon,             [  --with-mon              use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
 
65
AC_ARG_WITH(mon,             [  --with-mon              use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=no])
63
66
 
64
67
dnl Canonical system information.
65
68
AC_CANONICAL_HOST
107
110
  if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
108
111
    AC_MSG_RESULT(yes)
109
112
    AC_DEFINE(ENABLE_MON, 1, [Define if using "mon".])
110
 
    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"
 
113
    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 $mon_srcdir/disass/mips-dis.c $mon_srcdir/disass/mips-opc.c $mon_srcdir/disass/mips16-opc.c"
 
114
    AC_SUBST(MONSRCS)
111
115
    CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
112
116
    AC_CHECK_LIB(ncurses, tgetent, ,
113
 
      AC_CHECK_LIB(termcap, tgetent, ,
114
 
        AC_CHECK_LIB(termlib, tgetent, ,
115
 
          AC_CHECK_LIB(terminfo, tgetent, ,
116
 
            AC_CHECK_LIB(Hcurses, tgetent, ,
117
 
              AC_CHECK_LIB(curses, tgetent))))))
 
117
      [AC_CHECK_LIB(termcap, tgetent, ,
 
118
        [AC_CHECK_LIB(termlib, tgetent, ,
 
119
          [AC_CHECK_LIB(terminfo, tgetent, ,
 
120
            [AC_CHECK_LIB(Hcurses, tgetent, ,
 
121
              [AC_CHECK_LIB(curses, tgetent)])])])])])
118
122
    AC_CHECK_LIB(readline, readline)
119
123
  else
120
124
    AC_MSG_RESULT(no)
180
184
AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDevice.h)
181
185
 
182
186
dnl Checks for typedefs, structures, and compiler characteristics.
183
 
AC_C_BIGENDIAN
184
187
AC_C_CONST
185
188
AC_C_INLINE
186
 
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(float, 4)
191
 
AC_CHECK_SIZEOF(double, 8)
192
 
AC_CHECK_SIZEOF(long double, 12)
193
 
AC_CHECK_SIZEOF(void *, 4)
194
189
AC_TYPE_OFF_T
195
190
dnl These two symbols are not defined in 10.1's autoconf:
196
191
dnl AC_CHECK_TYPE(loff_t, off_t)
224
219
AC_CHECK_FUNCS(strdup strerror cfmakeraw)
225
220
AC_CHECK_FUNCS(clock_gettime timer_create)
226
221
AC_CHECK_FUNCS(sigaction signal)
227
 
AC_CHECK_FUNCS(mmap mprotect munmap)
228
 
AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect)
229
222
AC_CHECK_FUNCS(poll inet_aton)
230
223
 
231
224
dnl Darwin seems to define mach_task_self() instead of task_self().
333
326
AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>])
334
327
AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>])
335
328
AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>])
 
329
AC_CHECK_FRAMEWORK(CoreAudio, [#include <CoreAudio/CoreAudio.h>])
 
330
AC_CHECK_FRAMEWORK(AudioUnit, [#include <AudioUnit/AudioUnit.h>])
 
331
AC_CHECK_FRAMEWORK(AudioToolbox, [#include <AudioToolbox/AudioToolbox.h>])
336
332
 
337
333
dnl Select system-dependant source files.
338
334
  ETHERSRC=ether_unix.cpp
357
353
  fi
358
354
 
359
355
dnl Is the slirp library supported?
 
356
WANT_SLIRP=no
360
357
case "$ac_cv_have_byte_bitfields" in
361
358
yes|"guessing yes")
362
 
  CAN_SLIRP=yes
 
359
  WANT_SLIRP=yes
363
360
  ETHERSRC=ether_unix.cpp
364
361
  ;;
365
362
esac
366
 
if [[ -n "$CAN_SLIRP" ]]; then
 
363
if [[ "x$WANT_SLIRP" = "xyes" ]]; then
367
364
  AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported])
368
365
  SLIRP_SRCS="\
369
366
    ../slirp/bootp.c     ../slirp/ip_output.c  ../slirp/tcp_input.c  \
373
370
    ../slirp/ip_icmp.c   ../slirp/slirp.c      ../slirp/tftp.c       \
374
371
    ../slirp/ip_input.c  ../slirp/socket.c     ../slirp/udp.c"
375
372
fi
 
373
AC_SUBST(WANT_SLIRP)
376
374
AC_SUBST(SLIRP_SRCS)
377
375
 
378
 
dnl Use 68k CPU natively?
379
 
WANT_NATIVE_M68K=no
380
 
 
381
376
 
382
377
dnl Define a macro that translates a yesno-variable into a C macro definition
383
378
dnl to be put into the config.h file
413
408
AC_TRANSLATE_DEFINE(ENABLE_TUNTAP, "$ac_cv_tun_tap_support",
414
409
  [Define if your system supports TUN/TAP devices.])
415
410
 
416
 
dnl Various checks if the system supports vm_allocate() and the like functions.
417
 
have_mach_vm=no
418
 
if [[ "x$ac_cv_func_vm_allocate" = "xyes" -a "x$ac_cv_func_vm_deallocate" = "xyes" -a \
419
 
      "x$ac_cv_func_vm_protect" = "xyes" ]]; then
420
 
  have_mach_vm=yes
421
 
fi
422
 
AC_TRANSLATE_DEFINE(HAVE_MACH_VM, "$have_mach_vm",
423
 
  [Define if your system has a working vm_allocate()-based memory allocator.])
424
 
 
425
 
dnl Check that vm_allocate(), vm_protect() work
426
 
if [[ "x$have_mach_vm" = "xyes" ]]; then
427
 
 
428
 
AC_CACHE_CHECK([whether vm_protect works],
429
 
  ac_cv_vm_protect_works, [
430
 
  AC_LANG_SAVE
431
 
  AC_LANG_CPLUSPLUS
432
 
  ac_cv_vm_protect_works=yes
433
 
  dnl First the tests that should segfault
434
 
  for test_def in NONE_READ NONE_WRITE READ_WRITE; do
435
 
    AC_TRY_RUN([
436
 
      #define CONFIGURE_TEST_VM_MAP
437
 
      #define TEST_VM_PROT_$test_def
438
 
      #include "../Unix/vm_alloc.cpp"
439
 
    ], ac_cv_vm_protect_works=no, rm -f core,
440
 
    dnl When cross-compiling, do not assume anything
441
 
    ac_cv_vm_protect_works="guessing no"
442
 
    )
443
 
  done
444
 
  AC_TRY_RUN([
445
 
    #define CONFIGURE_TEST_VM_MAP
446
 
    #define TEST_VM_PROT_RDWR_WRITE
447
 
    #include "../Unix/vm_alloc.cpp"
448
 
  ], , ac_cv_vm_protect_works=no,
449
 
  dnl When cross-compiling, do not assume anything
450
 
  ac_cv_vm_protect_works="guessing no"
451
 
  )
452
 
  AC_LANG_RESTORE
453
 
  ]
454
 
)
455
 
 
456
 
dnl Remove support for vm_allocate() if vm_protect() does not work
457
 
if [[ "x$have_mach_vm" = "xyes" ]]; then
458
 
  case $ac_cv_vm_protect_works in
459
 
    *yes) have_mach_vm=yes;;
460
 
    *no) have_mach_vm=no;;
461
 
  esac
462
 
fi
463
 
AC_TRANSLATE_DEFINE(HAVE_MACH_VM, "$have_mach_vm",
464
 
  [Define if your system has a working vm_allocate()-based memory allocator.])
465
 
 
466
 
fi dnl HAVE_MACH_VM
467
 
 
468
 
dnl Various checks if the system supports mmap() and the like functions.
469
 
dnl ... and Mach memory allocators are not supported
470
 
have_mmap_vm=no
471
 
if [[ "x$ac_cv_func_mmap" = "xyes" -a "x$ac_cv_func_munmap" = "xyes" -a \
472
 
      "x$ac_cv_func_mprotect" = "xyes" ]]; then
473
 
  if [[ "x$have_mach_vm" = "xno" ]]; then
474
 
    have_mmap_vm=yes
475
 
  fi
476
 
fi
477
 
AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, "$have_mmap_vm",
478
 
  [Define if your system has a working mmap()-based memory allocator.])
479
 
 
480
 
dnl Check that mmap() and associated functions work.
481
 
if [[ "x$have_mmap_vm" = "xyes" ]]; then
482
 
 
483
 
dnl Check if we have a working anonymous mmap()
484
 
AC_CACHE_CHECK([whether mmap supports MAP_ANON],
485
 
  ac_cv_mmap_anon, [
486
 
  AC_LANG_SAVE
487
 
  AC_LANG_CPLUSPLUS
488
 
  AC_TRY_RUN([
489
 
    #define HAVE_MMAP_ANON
490
 
    #define CONFIGURE_TEST_VM_MAP
491
 
    #define TEST_VM_MMAP_ANON
492
 
    #include "../Unix/vm_alloc.cpp"
493
 
  ], ac_cv_mmap_anon=yes, ac_cv_mmap_anon=no,
494
 
  dnl When cross-compiling, do not assume anything.
495
 
  ac_cv_mmap_anon="guessing no"
496
 
  )
497
 
  AC_LANG_RESTORE
498
 
  ]
499
 
)
500
 
AC_TRANSLATE_DEFINE(HAVE_MMAP_ANON, "$ac_cv_mmap_anon",
501
 
  [Define if <sys/mman.h> defines MAP_ANON and mmap()'ing with MAP_ANON works.])
502
 
 
503
 
AC_CACHE_CHECK([whether mmap supports MAP_ANONYMOUS],
504
 
  ac_cv_mmap_anonymous, [
505
 
  AC_LANG_SAVE
506
 
  AC_LANG_CPLUSPLUS
507
 
  AC_TRY_RUN([
508
 
    #define HAVE_MMAP_ANONYMOUS
509
 
    #define CONFIGURE_TEST_VM_MAP
510
 
    #define TEST_VM_MMAP_ANON
511
 
    #include "../Unix/vm_alloc.cpp"
512
 
  ], ac_cv_mmap_anonymous=yes, ac_cv_mmap_anonymous=no,
513
 
  dnl When cross-compiling, do not assume anything.
514
 
  ac_cv_mmap_anonymous="guessing no"
515
 
  )
516
 
  AC_LANG_RESTORE
517
 
  ]
518
 
)
519
 
AC_TRANSLATE_DEFINE(HAVE_MMAP_ANONYMOUS, "$ac_cv_mmap_anonymous",
520
 
  [Define if <sys/mman.h> defines MAP_ANONYMOUS and mmap()'ing with MAP_ANONYMOUS works.])
521
 
 
522
 
AC_CACHE_CHECK([whether mprotect works],
523
 
  ac_cv_mprotect_works, [
524
 
  AC_LANG_SAVE
525
 
  AC_LANG_CPLUSPLUS
526
 
  ac_cv_mprotect_works=yes
527
 
  dnl First the tests that should segfault
528
 
  for test_def in NONE_READ NONE_WRITE READ_WRITE; do
529
 
    AC_TRY_RUN([
530
 
      #define CONFIGURE_TEST_VM_MAP
531
 
      #define TEST_VM_PROT_$test_def
532
 
      #include "../Unix/vm_alloc.cpp"
533
 
    ], ac_cv_mprotect_works=no, rm -f core,
534
 
    dnl When cross-compiling, do not assume anything
535
 
    ac_cv_mprotect_works="guessing no"
536
 
    )
537
 
  done
538
 
  AC_TRY_RUN([
539
 
    #define CONFIGURE_TEST_VM_MAP
540
 
    #define TEST_VM_PROT_RDWR_WRITE
541
 
    #include "../Unix/vm_alloc.cpp"
542
 
  ], , ac_cv_mprotect_works=no,
543
 
  dnl When cross-compiling, do not assume anything
544
 
  ac_cv_mprotect_works="guessing no"
545
 
  )
546
 
  AC_LANG_RESTORE
547
 
  ]
548
 
)
549
 
 
550
 
dnl Remove support for mmap() if mprotect() does not work
551
 
if [[ "x$have_mmap_vm" = "xyes" ]]; then
552
 
  case $ac_cv_mprotect_works in
553
 
    *yes) have_mmap_vm=yes;;
554
 
    *no) have_mmap_vm=no;;
555
 
  esac
556
 
fi
557
 
AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_mmap_vm,
558
 
  [Define if your system has a working mmap()-based memory allocator.])
559
 
 
560
 
fi dnl HAVE_MMAP_VM
561
 
 
562
 
dnl Check if we can modify the __PAGEZERO segment for use as Low Memory
563
 
AC_CACHE_CHECK([whether __PAGEZERO can be Low Memory area 0x0000-0x2000],
564
 
  ac_cv_pagezero_hack, [
565
 
  ac_cv_pagezero_hack=no 
566
 
  if AC_TRY_COMMAND([Darwin/testlmem.sh 0x2000]); then
567
 
    ac_cv_pagezero_hack=yes
568
 
    dnl might as well skip the test for mmap-able low memory
569
 
    ac_cv_can_map_lm=no
570
 
  fi
571
 
])
572
 
AC_TRANSLATE_DEFINE(PAGEZERO_HACK, "$ac_cv_pagezero_hack",
573
 
  [Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this system.])
574
 
 
575
 
dnl Check if we can mmap 0x2000 bytes from 0x0000
576
 
AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x2000],
577
 
  ac_cv_can_map_lm, [
578
 
  AC_LANG_SAVE
579
 
  AC_LANG_CPLUSPLUS
580
 
  AC_TRY_RUN([
581
 
    #include "../Unix/vm_alloc.cpp"
582
 
    int main(void) { /* returns 0 if we could map the lowmem globals */
583
 
      volatile char * lm = 0;
584
 
      if (vm_init() < 0) exit(1);
585
 
      if (vm_acquire_fixed(0, 0x2000) < 0) exit(1);
586
 
      lm[0] = 'z';
587
 
      if (vm_release((char *)lm, 0x2000) < 0) exit(1);
588
 
      vm_exit(); exit(0);
589
 
    }
590
 
  ], ac_cv_can_map_lm=yes, ac_cv_can_map_lm=no,
591
 
  dnl When cross-compiling, do not assume anything.
592
 
  ac_cv_can_map_lm="guessing no"
593
 
  )
594
 
  AC_LANG_RESTORE
595
 
  ]
596
 
)
597
 
 
598
411
dnl Check signal handlers need to be reinstalled
599
412
AC_CACHE_CHECK([whether signal handlers need to be reinstalled],
600
413
  ac_cv_signal_need_reinstall, [
656
469
AC_TRANSLATE_DEFINE(SIGACTION_NEED_REINSTALL, "$ac_cv_sigaction_need_reinstall",
657
470
  [Define if your system requires sigactions to be reinstalled.])
658
471
 
659
 
dnl Check if Mach exceptions supported.
660
 
AC_CACHE_CHECK([whether your system supports Mach exceptions],
661
 
  ac_cv_have_mach_exceptions, [
662
 
  AC_LANG_SAVE
663
 
  AC_LANG_CPLUSPLUS
664
 
  AC_TRY_RUN([
665
 
    #define HAVE_MACH_EXCEPTIONS 1
666
 
    #define CONFIGURE_TEST_SIGSEGV_RECOVERY
667
 
    #include "../Unix/vm_alloc.cpp"
668
 
    #include "../Unix/sigsegv.cpp"
669
 
  ], [
670
 
  sigsegv_recovery=mach
671
 
  ac_cv_have_mach_exceptions=yes
672
 
  ],
673
 
  ac_cv_have_mach_exceptions=no,
674
 
  dnl When cross-compiling, do not assume anything.
675
 
  ac_cv_have_mach_exceptions=no
676
 
  )
677
 
  AC_LANG_RESTORE
678
 
  ]
679
 
)
680
 
AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions",
681
 
  [Define if your system supports Mach exceptions.])
682
 
 
683
 
dnl Otherwise, check if extended signals are supported.
684
 
if [[ -z "$sigsegv_recovery" ]]; then
685
 
  AC_CACHE_CHECK([whether your system supports extended signal handlers],
686
 
    ac_cv_have_extended_signals, [
687
 
    AC_LANG_SAVE
688
 
    AC_LANG_CPLUSPLUS
689
 
    AC_TRY_RUN([
690
 
      #define HAVE_SIGINFO_T 1
691
 
      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
692
 
      #include "../Unix/vm_alloc.cpp"
693
 
      #include "../Unix/sigsegv.cpp"
694
 
    ], [
695
 
    sigsegv_recovery=siginfo
696
 
    ac_cv_have_extended_signals=yes
697
 
    ],
698
 
    ac_cv_have_extended_signals=no,
699
 
    dnl When cross-compiling, do not assume anything.
700
 
    ac_cv_have_extended_signals=no
701
 
    )
702
 
    AC_LANG_RESTORE
703
 
    ]
704
 
  )
705
 
  AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals",
706
 
    [Define if your system support extended signals.])
707
 
fi
708
 
 
709
 
dnl Otherwise, check for subterfuges.
710
 
if [[ -z "$sigsegv_recovery" ]]; then
711
 
  AC_CACHE_CHECK([whether we then have a subterfuge for your system],
712
 
  ac_cv_have_sigcontext_hack, [
713
 
    AC_LANG_SAVE
714
 
    AC_LANG_CPLUSPLUS
715
 
    AC_TRY_RUN([
716
 
      #define HAVE_SIGCONTEXT_SUBTERFUGE 1
717
 
      #define CONFIGURE_TEST_SIGSEGV_RECOVERY
718
 
      #include "../Unix/vm_alloc.cpp"
719
 
      #include "../Unix/sigsegv.cpp"
720
 
    ], [
721
 
    sigsegv_recovery=sigcontext
722
 
    ac_cv_have_sigcontext_hack=yes
723
 
    ],
724
 
    ac_cv_have_sigcontext_hack=no,
725
 
    dnl When cross-compiling, do not assume anything.
726
 
    ac_cv_have_sigcontext_hack=no
727
 
    )
728
 
    AC_LANG_RESTORE
729
 
  ])
730
 
  AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, "$ac_cv_have_sigcontext_hack",
731
 
    [Define if we know a hack to replace siginfo_t->si_addr member.])
732
 
fi
733
 
 
734
472
dnl Check if we can ignore the fault (instruction skipping in SIGSEGV handler)
735
473
AC_CACHE_CHECK([whether we can skip instruction in SIGSEGV handler],
736
474
  ac_cv_have_skip_instruction, [
737
475
  AC_LANG_SAVE
738
476
  AC_LANG_CPLUSPLUS
739
477
  AC_TRY_RUN([
 
478
    #include "config_macosx.h"
740
479
    #define HAVE_SIGSEGV_SKIP_INSTRUCTION 1
741
480
    #define CONFIGURE_TEST_SIGSEGV_RECOVERY
742
481
    #include "../Unix/vm_alloc.cpp"
751
490
AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_INSTRUCTION, "$ac_cv_have_skip_instruction",
752
491
  [Define if we can ignore the fault (instruction skipping in SIGSEGV handler).])
753
492
 
754
 
dnl Can we do Video on SEGV Signals ?
755
 
CAN_VOSF=no
756
 
if [[ -n "$sigsegv_recovery" ]]; then
757
 
  CAN_VOSF=yes
758
 
fi
 
493
dnl We can do Video on SEGV Signals
 
494
CAN_VOSF=yes
759
495
 
760
496
dnl A dummy program that returns always true
761
497
AC_PATH_PROG([BLESS], "true")
794
530
  [Define if there is a linker script to relocate the executable above 0x70000000.])
795
531
 
796
532
dnl Determine the addressing mode to use
797
 
if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
798
 
  ADDRESSING_MODE="real"
799
 
else
800
 
  ADDRESSING_MODE=""
801
 
  AC_MSG_CHECKING([for the addressing mode to use])
 
533
ADDRESSING_MODE=""
 
534
AC_MSG_CHECKING([for the addressing mode to use])
802
535
  for am in $ADDRESSING_TEST_ORDER; do
803
536
    case $am in
804
537
    real)
805
 
      dnl Requires ability to mmap() Low Memory globals
806
 
      if [[ "x$ac_cv_can_map_lm$ac_cv_pagezero_hack" = "xnono" ]]; then
807
 
        continue
808
 
      fi
809
538
      dnl Requires VOSF screen updates
810
539
      if [[ "x$CAN_VOSF" = "xno" ]]; then
811
540
        continue
815
544
      WANT_VOSF=yes dnl we can use VOSF and we need it actually
816
545
      DEFINES="$DEFINES -DREAL_ADDRESSING"
817
546
      AC_DEFINE(REAL_ADDRESSING, 1, [Emulated memory is memory mapped to actual address.])
818
 
      if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then
819
 
        BLESS=Darwin/lowmem
820
 
        LDFLAGS="$LDFLAGS -pagezero_size 0x2000"
821
 
      fi
 
547
      LDFLAGS="$LDFLAGS -pagezero_size 0x2000"
822
548
      break
823
549
      ;;
824
550
    direct)
840
566
      AC_MSG_ERROR([Internal configure.in script error for $am addressing mode])
841
567
    esac
842
568
  done
843
 
  AC_MSG_RESULT($ADDRESSING_MODE)
844
 
  if [[ "x$ADDRESSING_MODE" = "x" ]]; then
845
 
    AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
846
 
    ADDRESSING_MODE="memory banks"
847
 
  fi
 
569
AC_MSG_RESULT($ADDRESSING_MODE)
 
570
if [[ "x$ADDRESSING_MODE" = "x" ]]; then
 
571
  AC_MSG_WARN([Sorry, no suitable addressing mode in $ADDRESSING_TEST_ORDER])
 
572
  ADDRESSING_MODE="memory banks"
848
573
fi
849
574
 
850
575
dnl Banked Memory Addressing mode is not supported by the JIT compiler
946
671
  CFLAGS="$CFLAGS -fno-strict-aliasing"
947
672
  AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing],
948
673
    ac_cv_gcc_no_strict_aliasing, [
949
 
    AC_TRY_COMPILE([],[],
950
 
      [ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")],
951
 
      [ac_cv_gcc_no_strict_aliasing=no])
 
674
    AC_TRY_COMPILE([],[],[ac_cv_gcc_no_strict_aliasing=yes],[ac_cv_gcc_no_strict_aliasing=no])
952
675
  ])
 
676
  if [[ "x$ac_cv_gcc_no_strict_aliasing" = "xyes" ]]; then
 
677
    AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")
 
678
  fi
953
679
  CFLAGS="$SAVED_CFLAGS"
954
680
fi
955
681
 
968
694
  fi
969
695
fi
970
696
 
971
 
dnl Select appropriate CPU source and REGPARAM define.
972
 
ASM_OPTIMIZATIONS=none
973
 
CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"
974
 
 
975
 
dnl (gb) JITSRCS will be emptied later if the JIT is not available
976
 
dnl Other platforms should define their own set of noflags file variants
977
 
CAN_JIT=no
978
 
JITSRCS="compemu1.cpp compemu2.cpp compemu3.cpp compemu4.cpp compemu5.cpp compemu6.cpp compemu7.cpp compemu8.cpp"
979
 
 
980
 
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
981
 
  dnl i386 CPU
982
 
  DEFINES="$DEFINES -DUNALIGNED_PROFITABLE -DREGPARAM=\"__attribute__((regparm(3)))\""
983
 
  if [[ "x$HAVE_GAS" = "xyes" ]]; then
984
 
    ASM_OPTIMIZATIONS=i386
985
 
    DEFINES="$DEFINES -DX86_ASSEMBLY -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE"
986
 
    JITSRCS="cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp $JITSRCS"
987
 
    CAN_JIT=yes
988
 
  fi
989
 
elif [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_X86_64" = "xyes" ]]; then
990
 
  dnl x86-64 CPU
991
 
  DEFINES="$DEFINES -DUNALIGNED_PROFITABLE"
992
 
  if [[ "x$HAVE_GAS" = "xyes" ]]; then
993
 
    ASM_OPTIMIZATIONS="x86-64"
994
 
    DEFINES="$DEFINES -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS"
995
 
    JITSRCS="cpuemu1_nf.cpp cpuemu2_nf.cpp cpuemu3_nf.cpp cpuemu4_nf.cpp cpuemu5_nf.cpp cpuemu6_nf.cpp cpuemu7_nf.cpp cpuemu8_nf.cpp $JITSRCS"
996
 
    CAN_JIT=yes
997
 
  fi
998
 
elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
999
 
  dnl SPARC CPU
1000
 
  case "$target_os" in
1001
 
  solaris*)
1002
 
    AC_MSG_CHECKING(SPARC CPU architecture)
1003
 
    SPARC_TYPE=`Solaris/which_sparc`
1004
 
    AC_MSG_RESULT($SPARC_TYPE)
1005
 
    case "$SPARC_TYPE" in
1006
 
    SPARC_V8)
1007
 
      ASM_OPTIMIZATIONS="SPARC V8 architecture"
1008
 
      DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
1009
 
      CFLAGS="$CFLAGS -Wa,-Av8"
1010
 
      CXXFLAGS="$CXXFLAGS -Wa,-Av8"
1011
 
      ;;
1012
 
    SPARC_V9)
1013
 
      ASM_OPTIMIZATIONS="SPARC V9 architecture"
1014
 
      DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" dnl -DOPTIMIZED_FLAGS"
1015
 
      CFLAGS="$CFLAGS -Wa,-Av9"
1016
 
      CXXFLAGS="$CXXFLAGS -Wa,-Av9"
1017
 
      ;;
1018
 
    esac
1019
 
    ;;
1020
 
  esac
1021
 
elif [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
1022
 
  dnl Native m68k, no emulation
1023
 
  CPUINCLUDES="-I../native_cpu"
1024
 
  CPUSRCS="asm_support.s"
1025
 
fi
1026
 
 
1027
 
dnl Enable JIT compiler, if possible.
1028
 
if [[ "x$WANT_JIT" = "xyes" -a "x$CAN_JIT" ]]; then
1029
 
  JITSRCS="$JITSRCS ../uae_cpu/compiler/compemu_support.cpp ../uae_cpu/compiler/compemu_fpp.cpp compstbl.o cpustbl_nf.o"
1030
 
  DEFINES="$DEFINES -DUSE_JIT -DUSE_JIT_FPU"
1031
 
  
1032
 
  if [[ "x$WANT_JIT_DEBUG" = "xyes" ]]; then
1033
 
    if [[ "x$WANT_MON" = "xyes" ]]; then
1034
 
      DEFINES="$DEFINES -DJIT_DEBUG=1"
1035
 
    else
1036
 
      AC_MSG_WARN([cxmon not found, ignoring --enable-jit-debug])
1037
 
      WANT_JIT_DEBUG=no
1038
 
    fi
1039
 
  fi
1040
 
 
1041
 
  dnl IEEE core is the only FPU emulator to use with the JIT compiler
1042
 
  case $FPE_CORE_TEST_ORDER in
1043
 
  ieee*) ;;
1044
 
  *) AC_MSG_WARN([Forcing use of the IEEE FPU core, as the JIT compiler supports only this one.]) ;;
1045
 
  esac
1046
 
  FPE_CORE_TEST_ORDER="ieee"
1047
 
else
1048
 
  WANT_JIT=no
1049
 
  WANT_JIT_DEBUG=no
1050
 
  JITSRCS=""
1051
 
fi
1052
 
 
1053
 
dnl Utility macro used by next two tests.
1054
 
dnl AC_EXAMINE_OBJECT(C source code,
1055
 
dnl     commands examining object file,
1056
 
dnl     [commands to run if compile failed]):
1057
 
dnl
1058
 
dnl Compile the source code to an object file; then convert it into a
1059
 
dnl printable representation.  All unprintable characters and
1060
 
dnl asterisks (*) are replaced by dots (.).  All white space is
1061
 
dnl deleted.  Newlines (ASCII 0x10) in the input are preserved in the
1062
 
dnl output, but runs of newlines are compressed to a single newline.
1063
 
dnl Finally, line breaks are forcibly inserted so that no line is
1064
 
dnl longer than 80 columns and the file ends with a newline.  The
1065
 
dnl result of all this processing is in the file conftest.dmp, which
1066
 
dnl may be examined by the commands in the second argument.
1067
 
dnl
1068
 
AC_DEFUN([gcc_AC_EXAMINE_OBJECT],
1069
 
[AC_LANG_SAVE
1070
 
AC_LANG_C
1071
 
dnl Next bit cribbed from AC_TRY_COMPILE.
1072
 
cat > conftest.$ac_ext <<EOF
1073
 
[#line __oline__ "configure"
1074
 
#include "confdefs.h"
1075
 
$1
1076
 
]EOF
1077
 
if AC_TRY_EVAL(ac_compile); then
1078
 
  od -c conftest.o |
1079
 
    sed ['s/^[0-7]*[    ]*/ /
1080
 
          s/\*/./g
1081
 
          s/ \\n/*/g
1082
 
          s/ [0-9][0-9][0-9]/./g
1083
 
          s/  \\[^ ]/./g'] |
1084
 
    tr -d '
1085
 
 ' | tr -s '*' '
1086
 
' | fold | sed '$a\
1087
 
' > conftest.dmp
1088
 
  $2
1089
 
ifelse($3, , , else
1090
 
  $3
1091
 
)dnl
1092
 
fi
1093
 
rm -rf conftest*
1094
 
AC_LANG_RESTORE])
1095
 
 
1096
 
dnl Floating point format probe.
1097
 
dnl The basic concept is the same as the above: grep the object
1098
 
dnl file for an interesting string.  We have to watch out for
1099
 
dnl rounding changing the values in the object, however; this is
1100
 
dnl handled by ignoring the least significant byte of the float.
1101
 
dnl
1102
 
dnl Does not know about VAX G-float or C4x idiosyncratic format.
1103
 
dnl It does know about PDP-10 idiosyncratic format, but this is
1104
 
dnl not presently supported by GCC.  S/390 "binary floating point"
1105
 
dnl is in fact IEEE (but maybe we should have that in EBCDIC as well
1106
 
dnl as ASCII?)
1107
 
dnl
1108
 
AC_DEFUN([gcc_AC_C_FLOAT_FORMAT],
1109
 
[AC_CACHE_CHECK(floating point format, ac_cv_c_float_format,
1110
 
[gcc_AC_EXAMINE_OBJECT(
1111
 
[/* This will not work unless sizeof(double) == 8.  */
1112
 
extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
1113
 
 
1114
 
/* This structure must have no internal padding.  */
1115
 
struct possibility {
1116
 
  char prefix[8];
1117
 
  double candidate;
1118
 
  char postfix[8];
1119
 
};
1120
 
 
1121
 
#define C(cand) { "\nformat:", cand, ":tamrof\n" }
1122
 
struct possibility table [] =
1123
 
{
1124
 
  C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
1125
 
  C( 3.53802595280598432000e+18), /* D__float - VAX */
1126
 
  C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
1127
 
  C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
1128
 
  C(-5.22995989424860458374e+10)  /* IBMHEXFP - s/390 format, EBCDIC */
1129
 
};],
1130
 
 [if   grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then
1131
 
    ac_cv_c_float_format='IEEE (big-endian)'
1132
 
  elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then
1133
 
    ac_cv_c_float_format='IEEE (big-endian)'
1134
 
  elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then
1135
 
    ac_cv_c_float_format='IEEE (little-endian)'
1136
 
  elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then
1137
 
    ac_cv_c_float_format='IEEE (little-endian)'
1138
 
  elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then
1139
 
    ac_cv_c_float_format='VAX D-float'
1140
 
  elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then
1141
 
    ac_cv_c_float_format='PDP-10'
1142
 
  elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then
1143
 
    ac_cv_c_float_format='IBM 370 hex'
1144
 
  else
1145
 
    AC_MSG_ERROR(Unknown floating point format)
1146
 
  fi],
1147
 
  [AC_MSG_ERROR(compile failed)])
1148
 
])
1149
 
# IEEE is the default format.  If the float endianness isn't the same
1150
 
# as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN
1151
 
# (which is a tristate: yes, no, default).  This is only an issue with
1152
 
# IEEE; the other formats are only supported by a few machines each,
1153
 
# all with the same endianness.
1154
 
format=IEEE_FLOAT_FORMAT
1155
 
fbigend=
1156
 
case $ac_cv_c_float_format in
1157
 
    'IEEE (big-endian)' )
1158
 
        if test $ac_cv_c_bigendian = no; then
1159
 
            fbigend=1
1160
 
        fi
1161
 
        ;;
1162
 
    'IEEE (little-endian)' )
1163
 
        if test $ac_cv_c_bigendian = yes; then
1164
 
            fbigend=0
1165
 
        fi
1166
 
        ;;
1167
 
    'VAX D-float' )
1168
 
        format=VAX_FLOAT_FORMAT
1169
 
        ;;
1170
 
    'PDP-10' )
1171
 
        format=PDP10_FLOAT_FORMAT
1172
 
        ;;
1173
 
    'IBM 370 hex' )
1174
 
        format=IBM_FLOAT_FORMAT
1175
 
        ;;
1176
 
esac
1177
 
AC_DEFINE_UNQUOTED(HOST_FLOAT_FORMAT, $format,
1178
 
  [Define to the floating point format of the host machine.])
1179
 
if test -n "$fbigend"; then
1180
 
        AC_DEFINE_UNQUOTED(HOST_FLOAT_WORDS_BIG_ENDIAN, $fbigend,
1181
 
  [Define to 1 if the host machine stores floating point numbers in
1182
 
   memory with the word containing the sign bit at the lowest address,
1183
 
   or to 0 if it does it the other way around.
1184
 
 
1185
 
   This macro should not be defined if the ordering is the same as for
1186
 
   multi-word integers.])
1187
 
fi
1188
 
])
1189
 
 
1190
 
dnl Select appropriate FPU source.
1191
 
gcc_AC_C_FLOAT_FORMAT
 
697
dnl Make sure we can enable JIT debug mode.
 
698
if [[ "x$WANT_JIT_DEBUG" = "xyes" ]]; then
 
699
  if [[ ":$WANT_JIT:$WANT_MON:" != ":yes:yes:" ]]; then
 
700
    AC_MSG_WARN([cxmon not found, ignoring --enable-jit-debug])
 
701
    WANT_JIT_DEBUG=no
 
702
  fi
 
703
fi
 
704
 
 
705
dnl Additionnal checks for the IEEE FPU emulation code.
1192
706
AC_CHECK_HEADERS(ieee754.h ieeefp.h floatingpoint.h nan.h)
1193
 
 
1194
 
for fpe in $FPE_CORE_TEST_ORDER; do
1195
 
  case $fpe in
1196
 
  ieee)
1197
 
    case $ac_cv_c_float_format in
1198
 
    IEEE*)
1199
 
      FPE_CORE="IEEE fpu core"
1200
 
      DEFINES="$DEFINES -DFPU_IEEE"
1201
 
      AC_DEFINE(FPU_IEEE, 1, [Floating Point Core emulation method is IEEE.])
1202
 
      FPUSRCS="../uae_cpu/fpu/fpu_ieee.cpp"
1203
 
      dnl Math functions not mandated by C99 standard
1204
 
      AC_CHECK_FUNCS(isnanl isinfl)
1205
 
      dnl Math functions required by C99 standard, but probably not
1206
 
      dnl implemented everywhere. In that case, we fall back to the
1207
 
      dnl regular variant for doubles.
1208
 
      AC_CHECK_FUNCS(logl log10l expl powl fabsl sqrtl)
1209
 
      AC_CHECK_FUNCS(sinl cosl tanl sinhl coshl tanhl)
1210
 
      AC_CHECK_FUNCS(asinl acosl atanl asinhl acoshl atanhl)
1211
 
      AC_CHECK_FUNCS(floorl ceill)
1212
 
      break
1213
 
      ;;
1214
 
    esac
1215
 
    ;;
1216
 
  x86)
1217
 
    if [[ ":$HAVE_GCC27:$HAVE_I386:$HAVE_GAS:" = ":yes:yes:yes:" ]]; then
1218
 
      FPE_CORE="i387 fpu core"
1219
 
      DEFINES="$DEFINES -DFPU_X86"
1220
 
      FPUSRCS="../uae_cpu/fpu/fpu_x86.cpp"
1221
 
      break
1222
 
    fi
1223
 
    ;;
1224
 
  uae)
1225
 
    FPE_CORE="uae fpu core"
1226
 
    DEFINES="$DEFINES -DFPU_UAE"
1227
 
    AC_DEFINE(FPU_UAE, 1, [Floating Point Core emulation is standard UAE.])
1228
 
    FPUSRCS="../uae_cpu/fpu/fpu_uae.cpp"
1229
 
    break
1230
 
    ;;
1231
 
  *)
1232
 
    AC_MSG_ERROR([Internal configure.in script error for $fpe fpu core])
1233
 
    ;;
1234
 
  esac
1235
 
done
1236
 
if [[ "x$FPE_CORE" = "x" ]]; then
1237
 
  AC_MSG_ERROR([Sorry, no suitable FPU core found in $FPE_CORE_TEST_ORDER])
1238
 
fi
1239
 
 
1240
 
dnl Check for certain math functions
1241
707
AC_CHECK_FUNCS(atanh)
1242
708
AC_CHECK_FUNCS(isnan isinf finite isnormal signbit)
1243
 
 
1244
 
dnl UAE CPU sources for all non-m68k-native architectures.
1245
 
if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then
1246
 
  CPUINCLUDES="-I../uae_cpu"
1247
 
  CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS $JITSRCS"
1248
 
fi
 
709
dnl Math functions not mandated by C99 standard
 
710
AC_CHECK_FUNCS(isnanl isinfl)
 
711
dnl Math functions required by C99 standard, but probably not
 
712
dnl implemented everywhere. In that case, we fall back to the
 
713
dnl regular variant for doubles.
 
714
AC_CHECK_FUNCS(logl log10l expl powl fabsl sqrtl)
 
715
AC_CHECK_FUNCS(sinl cosl tanl sinhl coshl tanhl)
 
716
AC_CHECK_FUNCS(asinl acosl atanl asinhl acoshl atanhl)
 
717
AC_CHECK_FUNCS(floorl ceill)
1249
718
 
1250
719
dnl Remove the "-g" option if set for GCC.
1251
720
if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1253
722
  CXXFLAGS=`echo $CXXFLAGS | sed -e 's/-g\b//g'`
1254
723
fi
1255
724
 
1256
 
dnl Or if we have -IPA (MIPSPro compilers)
1257
 
if [[ "x$HAVE_IPA" = "xyes" ]]; then
1258
 
  CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA"
1259
 
  CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA"
1260
 
  CXXFLAGS="-LANG:std $CXXFLAGS"
1261
 
  LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA"
1262
 
fi
1263
 
 
1264
725
dnl
1265
726
dnl Some Mac OS X specific stuff:
1266
727
dnl
1281
742
  IDEARGS=""
1282
743
fi
1283
744
 
1284
 
AC_DEFINE(HAVE_SLIRP, 1, [Try to compile network emulation library!])
 
745
dnl Universal binaries
 
746
if [[ -z "$WANT_UNIVERSAL" ]]; then
 
747
  WANT_UNIVERSAL=`echo $target_cpu | sed -e 's/i.86/i386/'`
 
748
fi
 
749
AC_SUBST(TARGET_ARCHES, [$WANT_UNIVERSAL])
 
750
 
 
751
AC_MSG_CHECKING(for PowerPC SDK)
 
752
for version in $PPC_SDK_VERSION 10.2.8 10.3.9 10.4; do
 
753
  sdk=`echo /Developer/SDKs/MacOSX$version*.sdk`
 
754
  if [[ -d "$sdk" ]]; then
 
755
    PPC_SDK_VERSION="$version"
 
756
        break
 
757
  fi
 
758
done
 
759
AC_MSG_RESULT($PPC_SDK_VERSION)
 
760
AC_SUBST(PPC_SDK_VERSION)
 
761
 
1285
762
AC_DEFINE(DATADIR, "~", [unix_ether needs this!])
1286
763
 
1287
764
dnl Generate Makefile.
1288
765
AC_SUBST(DEFINES)
1289
 
AC_SUBST(SYSSRCS)
 
766
AC_SUBST(MONSRCS)
1290
767
AC_SUBST(CPUINCLUDES)
1291
 
AC_SUBST(CPUSRCS)
1292
768
AC_SUBST(BLESS)
1293
769
AC_SUBST(IDE)
1294
770
AC_SUBST(PROJECT)
1295
771
AC_SUBST(IDEARGS)
1296
772
AC_SUBST(SLIRP_SRCS)
1297
773
AC_SUBST(KEYCODES)
 
774
AC_SUBST(WANT_JIT)
 
775
AC_SUBST(WANT_JIT_DEBUG)
1298
776
dnl autoconf on 10.1 doesn't understand these
1299
777
dnl AC_CONFIG_FILES([Makefile])
1300
778
dnl AC_OUTPUT
1304
782
echo
1305
783
echo Basilisk II configuration summary:
1306
784
echo
 
785
echo Build binaries for ..................... : $WANT_UNIVERSAL
1307
786
echo Multiple emulator windows .............. : $ENABLE_MULTIPLE
1308
787
echo Enable video on SEGV signals ........... : $WANT_VOSF
1309
788
echo mon debugger support ................... : $WANT_MON
1310
 
echo Running m68k code natively ............. : $WANT_NATIVE_M68K
1311
 
echo Use JIT compiler ....................... : $WANT_JIT
1312
 
echo JIT debug mode ......................... : $WANT_JIT_DEBUG
1313
 
echo Floating-Point emulation core .......... : $FPE_CORE
1314
 
echo Assembly optimizations ................. : $ASM_OPTIMIZATIONS
 
789
echo Build JIT compiler ..................... : $WANT_JIT
 
790
echo Build JIT with debug code .............. : $WANT_JIT_DEBUG
1315
791
echo Addressing mode ........................ : $ADDRESSING_MODE
1316
 
echo Bad memory access recovery type ........ : $sigsegv_recovery
1317
792
echo Mac OS X development environment ....... : $IDE
1318
793
echo
1319
794
echo "Configuration done. Now type \"make\" (or \"make ide\")."