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

Comparing BasiliskII/src/Unix/configure.ac (file contents):
Revision 1.52 by gbeauche, 2005-07-01T05:57:07Z vs.
Revision 1.75 by asvitkine, 2009-03-03T08:04:42Z

# Line 14 | Line 14 | dnl Some systems do not put corefiles in
14   dnl cores for the configure tests since some are intended to dump core.
15   ulimit -c 0
16  
17 + AC_ARG_ENABLE(standalone-gui,[  --enable-standalone-gui enable a standalone GUI prefs editor [default=no]], [WANT_STANDALONE_GUI=$enableval], [WANT_STANDALONE_GUI=no])
18 +
19   dnl Video options.
20   AC_ARG_ENABLE(xf86-dga,      [  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
21   AC_ARG_ENABLE(xf86-vidmode,  [  --enable-xf86-vidmode   use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
# Line 24 | Line 26 | dnl SDL options.
26   AC_ARG_ENABLE(sdl-static,    [  --enable-sdl-static     use SDL static libraries for linking [default=no]], [WANT_SDL_STATIC=$enableval], [WANT_SDL_STATIC=no])
27   AC_ARG_ENABLE(sdl-video,     [  --enable-sdl-video      use SDL for video graphics [default=no]], [WANT_SDL_VIDEO=$enableval], [WANT_SDL_VIDEO=no])
28   AC_ARG_ENABLE(sdl-audio,     [  --enable-sdl-audio      use SDL for audio [default=no]], [WANT_SDL_AUDIO=$enableval], [WANT_SDL_AUDIO=no])
29 + AC_ARG_ENABLE(sdl-framework,    [  --enable-sdl-framework  use SDL framework [default=no]], [WANT_SDL_FRAMEWORK=$enableval], [WANT_SDL_FRAMEWORK=no])
30 + AC_ARG_ENABLE(sdl-framework-prefix,    [  --enable-sdl-framework-prefix=PFX    default=/Library/Frameworks], [SDL_FRAMEWORK="$enableval"], [SDL_FRAMEWORK=/Library/Frameworks])
31  
32   dnl JIT compiler options.
33   AC_ARG_ENABLE(jit-compiler,  [  --enable-jit-compiler   enable JIT compiler [default=no]], [WANT_JIT=$enableval], [WANT_JIT=no])
# Line 116 | Line 120 | if [[ "x$WANT_MON" = "xyes" ]]; then
120    if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then
121      AC_MSG_RESULT(yes)
122      AC_DEFINE(ENABLE_MON, 1, [Define if using "mon".])
123 <    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"
123 >    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"
124      CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass"
125      AC_CHECK_LIB(ncurses, tgetent, ,
126        AC_CHECK_LIB(termcap, tgetent, ,
# Line 136 | Line 140 | dnl Checks for libraries.
140   AC_CHECK_LIB(posix4, sem_init)
141   AC_CHECK_LIB(rt, timer_create)
142   AC_CHECK_LIB(rt, shm_open)
143 + AC_CHECK_LIB(m, cos)
144 +
145 + dnl AC_CHECK_SDLFRAMEWORK($1=NAME, $2=INCLUDES)
146 + dnl AC_TRY_LINK uses main() but SDL needs main to take args,
147 + dnl therefore main is undefined with #undef.
148 + dnl Framework can be in an custom location.
149 + AC_DEFUN([AC_CHECK_SDLFRAMEWORK], [
150 +  AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])
151 +  AC_CACHE_CHECK([whether compiler supports framework $1],
152 +    ac_Framework, [
153 +    saved_LIBS="$LIBS"
154 +    LIBS="$LIBS -framework $1"
155 +    if [[ "x$SDL_FRAMEWORK" != "x/Library/Frameworks" ]]; then
156 +      if [[ "x$SDL_FRAMEWORK" != "x/System/Library/Frameworks" ]]; then
157 +        LIBS="$saved_LIBS -F$SDL_FRAMEWORK -framework $1"
158 +      fi
159 +    fi
160 +    saved_CPPFLAGS="$CPPFLAGS"
161 +    CPPFLAGS="$CPPFLAGS -I$SDL_FRAMEWORK/SDL.framework/Headers"
162 +    AC_TRY_LINK(
163 +      [$2
164 + #undef main], [],
165 +      [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no);
166 + LIBS="$saved_LIBS"; CPPFLAGS="$saved_CPPFLAGS"]
167 +    )
168 +  ])
169 +  AS_IF([test AS_VAR_GET(ac_Framework) = yes],
170 +    [AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])]
171 +  )
172 +  AS_VAR_POPDEF([ac_Framework])
173 + ])
174  
175   dnl Do we need SDL?
176   WANT_SDL=no
# Line 151 | Line 186 | if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; th
186    SDL_SUPPORT="$SDL_SUPPORT audio"
187   fi
188   if [[ "x$WANT_SDL" = "xyes" ]]; then
189 <  AC_PATH_PROG(sdl_config, "sdl-config")
190 <  if [[ -n "$sdl_config" ]]; then
156 <    case $target_os in
157 <    # Special treatment for Cygwin so that we can still use the POSIX layer
158 <    *cygwin*)
159 <      sdl_cflags="-I`$sdl_config --prefix`/include/SDL"
160 <      sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL"
161 <      ;;
162 <    *)
163 <      sdl_cflags=`$sdl_config --cflags`
164 <      if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
165 <        sdl_libs=`$sdl_config --static-libs`
166 <      else
167 <        sdl_libs=`$sdl_config --libs`
168 <      fi
169 <      ;;
170 <    esac
171 <    CFLAGS="$CFLAGS $sdl_cflags"
172 <    CXXFLAGS="$CXXFLAGS $sdl_cflags"
173 <    LIBS="$LIBS $sdl_libs"
189 >  if [[ "x$WANT_SDL_FRAMEWORK" = "xyes" ]]; then
190 >    AC_CHECK_SDLFRAMEWORK(SDL, [#include <SDL.h>])
191    else
192 <    WANT_SDL=no
192 >    ac_cv_framework_SDL=no
193 >  fi
194 >  if [[ "x$ac_cv_framework_SDL" = "xno" ]]; then
195 >    AC_PATH_PROG(sdl_config, "sdl-config")
196 >    if [[ -n "$sdl_config" ]]; then
197 >      case $target_os in
198 >      # Special treatment for Cygwin so that we can still use the POSIX layer
199 >      *cygwin*)
200 >        sdl_cflags="-I`$sdl_config --prefix`/include/SDL"
201 >        sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL"
202 >        ;;
203 >      *)
204 >        sdl_cflags=`$sdl_config --cflags`
205 >        if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
206 >          sdl_libs=`$sdl_config --static-libs`
207 >        else
208 >          sdl_libs=`$sdl_config --libs`
209 >        fi
210 >        ;;
211 >      esac
212 >      CFLAGS="$CFLAGS $sdl_cflags"
213 >      CXXFLAGS="$CXXFLAGS $sdl_cflags"
214 >      LIBS="$LIBS $sdl_libs"
215 >    else
216 >      WANT_SDL=no
217 >    fi
218    fi
219    SDL_SUPPORT=`echo "$SDL_SUPPORT" | sed -e "s/^ //"`
220   else
# Line 250 | Line 292 | UISRCS=../dummy/prefs_editor_dummy.cpp
292   case "x$WANT_GTK" in
293   xgtk2*)
294    AM_PATH_GTK_2_0(1.3.15, [
295 <    AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
296 <    CFLAGS="$CFLAGS $GTK_CFLAGS"
255 <    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
256 <    LIBS="$LIBS $GTK_LIBS"
257 <    UISRCS=prefs_editor_gtk.cpp
295 >    GUI_CFLAGS="$GTK_CFLAGS"
296 >    GUI_LIBS="$GTK_LIBS"
297      WANT_GTK=gtk2
298    ], [
299      case "x${WANT_GTK}x" in
# Line 272 | Line 311 | xgtk2*)
311   esac
312   if [[ "x$WANT_GTK" = "xgtk" ]]; then
313    AM_PATH_GTK(1.2.0, [
314 <    AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
315 <    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
277 <    LIBS="$LIBS $GTK_LIBS"
278 <    UISRCS=prefs_editor_gtk.cpp
314 >    GUI_CFLAGS="$GTK_CFLAGS"
315 >    GUI_LIBS="$GTK_LIBS"
316      dnl somehow, <gnome-i18n.h> would redefine gettext() to nothing if
317      dnl ENABLE_NLS is not set, thusly conflicting with C++ <string> which
318      dnl includes <libintl.h>
319      AM_GNU_GETTEXT
320      B2_PATH_GNOMEUI([
321        AC_DEFINE(HAVE_GNOMEUI, 1, [Define if libgnomeui is available.])
322 <      CXXFLAGS="$CXXFLAGS $GNOMEUI_CFLAGS"
323 <      LIBS="$LIBS $GNOMEUI_LIBS"
322 >      GUI_CFLAGS="$GUI_CFLAGS $GNOMEUI_CFLAGS"
323 >      GUI_LIBS="$GUI_LIBS $GNOMEUI_LIBS"
324      ], [])
325    ], [
326      AC_MSG_WARN([Could not find GTK+, disabling user interface.])
327      WANT_GTK=no
328    ])
329   fi
330 + if [[ "x$WANT_GTK" != "xno" -a "x$WANT_STANDALONE_GUI" = "xno" ]]; then
331 +  AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
332 +  UISRCS=prefs_editor_gtk.cpp
333 + fi
334 + AC_SUBST(GUI_CFLAGS)
335 + AC_SUBST(GUI_LIBS)
336 +
337 + dnl Build external GUI if requested.
338 + if [[ "$WANT_STANDALONE_GUI" != "yes" ]]; then
339 +  WANT_STANDALONE_GUI=no
340 + fi
341 + if [[ "$WANT_GTK" = "no" ]]; then
342 +  WANT_STANDALONE_GUI=no
343 + fi
344 + AC_SUBST(STANDALONE_GUI, [$WANT_STANDALONE_GUI])
345  
346   dnl We use ESD if possible.
347   if [[ "x$WANT_ESD" = "xyes" ]]; then
# Line 399 | Line 451 | mips-sony-bsd|mips-sony-newsos4)
451   *-*-cygwin*)
452          no_dev_ptmx=1
453          ;;
454 + *-*-darwin*)
455 +        no_dev_ptmx=1
456 +        ;;
457   esac
458  
459   if test -z "$no_dev_ptmx" ; then
# Line 421 | Line 476 | AC_CHECK_FILE([/dev/ptc],
476   dnl (end of code from openssh-3.2.2p1 configure.ac)
477  
478  
479 + dnl Check for systems where POSIX-style non-blocking I/O (O_NONBLOCK)
480 + dnl doesn't work or is unimplemented. On these systems (mostly older
481 + dnl ones), use the old BSD-style FIONBIO approach instead. [tcl.m4]
482 + AC_CACHE_CHECK([FIONBIO vs. O_NONBLOCK for non-blocking I/O],
483 +  ac_cv_nonblocking_io, [
484 +  case "$host" in
485 +  *-*-osf*)
486 +    ac_cv_nonblocking_io=FIONBIO
487 +    ;;
488 +  *-*-sunos4*)
489 +    ac_cv_nonblocking_io=FIONBIO
490 +    ;;
491 +  *-*-ultrix*)
492 +    ac_cv_nonblocking_io=FIONBIO
493 +    ;;
494 +  *)
495 +    ac_cv_nonblocking_io=O_NONBLOCK
496 +    ;;
497 +  esac
498 + ])
499 + if [[ "$ac_cv_nonblocking_io" = "FIONBIO" ]]; then
500 +  AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used])
501 + fi
502 +
503 + dnl Check whether compiler supports byte bit-fields
504 + AC_CACHE_CHECK([whether compiler supports byte bit-fields],
505 +  ac_cv_have_byte_bitfields, [
506 +  AC_LANG_SAVE
507 +  AC_LANG_CPLUSPLUS
508 +  AC_TRY_RUN([
509 +    struct A {
510 +      unsigned char b1:4;
511 +      unsigned char b2:4;
512 +      unsigned char c;
513 +      unsigned short s;
514 +      unsigned char a[4];
515 +    };
516 +
517 +    int main(void) {
518 +      A a;
519 +      return ! (sizeof(A) == 8 && &a.c == ((unsigned char *)&a + 1));
520 +    }],
521 +    [ac_cv_have_byte_bitfields=yes],
522 +    [ac_cv_have_byte_bitfields=no],
523 +    dnl When cross-compiling, assume only GCC supports this
524 +    [if [[ "$GCC" = "yes" ]]; then
525 +      ac_cv_have_byte_bitfields="guessing yes"
526 +    else
527 +      ac_cv_have_byte_bitfields="guessing no"
528 +    fi]
529 +    )
530 +  AC_LANG_RESTORE
531 + ])
532 +
533   dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES)
534   AC_DEFUN([AC_CHECK_FRAMEWORK], [
535    AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
# Line 429 | Line 538 | AC_DEFUN([AC_CHECK_FRAMEWORK], [
538      saved_LIBS="$LIBS"
539      LIBS="$LIBS -framework $1"
540      AC_TRY_LINK(
541 <      [$2], [int main(void) { return 0; }],
541 >      [$2], [],
542        [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"]
543      )
544    ])
# Line 440 | Line 549 | AC_DEFUN([AC_CHECK_FRAMEWORK], [
549   ])
550  
551   dnl Check for some MacOS X frameworks
552 + AC_CHECK_FRAMEWORK(AppKit, [])
553   AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>])
554   AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>])
555   AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>])
# Line 490 | Line 600 | solaris*)
600    DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
601    ;;
602   irix*)
493  ETHERSRC=ether_unix.cpp
603    AUDIOSRC=Irix/audio_irix.cpp
604    EXTRASYSSRCS=Irix/unaligned.c
496  dnl IRIX headers work fine, but somehow don't define or use "STDC_HEADERS"
497  DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200 -DSTDC_HEADERS"
605    LIBS="$LIBS -laudio"
606    WANT_ESD=no
607  
# Line 504 | Line 611 | irix*)
611    CFLAGS=`echo "$CFLAGS -IPA" | sed -e "s/-g//g"`
612    AC_MSG_CHECKING(if "-IPA" works)
613    dnl Do a test compile of an empty function
614 <  AC_TRY_COMPILE(,, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no))
614 >  AC_TRY_COMPILE([#if defined __GNUC__
615 >                  # error GCC does not support IPA yet
616 >                  #endif],, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no))
617    CFLAGS="$ocflags"
618    ;;
619   darwin*)
# Line 513 | Line 622 | darwin*)
622      EXTRASYSSRCS="../MacOSX/sys_darwin.cpp"
623    fi
624    if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
625 <    EXTFSSRC=../MacOSX/extfs_macosx.mm
625 >    EXTFSSRC=../MacOSX/extfs_macosx.cpp
626    fi
627    ;;
628   cygwin*)
# Line 523 | Line 632 | cygwin*)
632   esac
633  
634   dnl Is the slirp library supported?
635 < if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then
635 > case "$ac_cv_have_byte_bitfields" in
636 > yes|"guessing yes")
637 >  CAN_SLIRP=yes
638 >  ETHERSRC=ether_unix.cpp
639 >  ;;
640 > esac
641 > if [[ -n "$CAN_SLIRP" ]]; then
642    AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported])
643    SLIRP_SRCS="\
644      ../slirp/bootp.c     ../slirp/ip_output.c  ../slirp/tcp_input.c  \
# Line 538 | Line 653 | AC_SUBST(SLIRP_SRCS)
653   dnl SDL overrides
654   if [[ "x$WANT_SDL" = "xyes" ]]; then
655    AC_DEFINE(USE_SDL, 1, [Define to enble SDL support])
656 +  if [[ "x$WANT_SDL_FRAMEWORK" = "xyes" ]]; then
657 +    EXTRASYSSRCS="$EXTRASYSSRCS ../SDL/SDLMain.m"
658 +  fi
659   fi
660   if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
661    AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support])
# Line 797 | Line 915 | AC_CACHE_CHECK([whether we can map Low M
915    ]
916   )
917  
800 dnl Check if we have POSIX shared memory support
801 AC_CACHE_CHECK([whether POSIX shared memory is working],
802  ac_cv_have_posix_shm, [
803  AC_LANG_SAVE
804  AC_LANG_CPLUSPLUS
805  AC_TRY_RUN([
806    #define HAVE_POSIX_SHM
807    #include "vm_alloc.cpp"
808    int main(void) { /* returns 0 if we have working POSIX shm */
809      if (vm_init() < 0) exit(2);
810      char *m1 = (char *)vm_acquire(32768, VM_MAP_DEFAULT | VM_MAP_33BIT);
811      if (m1 == VM_MAP_FAILED) exit(3);
812      vm_exit(); exit(0);
813    }
814  ], ac_cv_have_posix_shm=yes, ac_cv_have_posix_shm=no,
815  dnl When cross-compiling, do not assume anything.
816  ac_cv_have_posix_shm="guessing no"
817  )
818  AC_LANG_RESTORE
819  ]
820 )
821 AC_TRANSLATE_DEFINE(HAVE_POSIX_SHM, "$ac_cv_have_posix_shm",
822  [Define if your system supports POSIX shared memory.])
823
824 dnl Check if we have working 33-bit memory addressing
825 AC_CACHE_CHECK([whether 33-bit memory addressing is working],
826  ac_cv_have_33bit_addressing, [
827  AC_LANG_SAVE
828  AC_LANG_CPLUSPLUS
829  AC_TRY_RUN([
830    #define USE_33BIT_ADDRESSING 1
831    #include "vm_alloc.cpp"
832    int main(void) { /* returns 0 if we have working 33-bit addressing */
833      if (sizeof(void *) < 8) exit(1);
834      if (vm_init() < 0) exit(2);
835      char *m1 = (char *)vm_acquire(32768, VM_MAP_DEFAULT | VM_MAP_33BIT);
836      if (m1 == VM_MAP_FAILED) exit(3);
837      char *m2 = m1 + (1L << 32);
838      m1[0] = 0x12; if (m2[0] != 0x12) exit(4);
839      m2[0] = 0x34; if (m1[0] != 0x34) exit(5);
840      vm_exit(); exit(0);
841    }
842  ], ac_cv_have_33bit_addressing=yes, ac_cv_have_33bit_addressing=no,
843  dnl When cross-compiling, do not assume anything.
844  ac_cv_have_33bit_addressing="guessing no"
845  )
846  AC_LANG_RESTORE
847  ]
848 )
849
918   dnl Check signal handlers need to be reinstalled
919   AC_CACHE_CHECK([whether signal handlers need to be reinstalled],
920    ac_cv_signal_need_reinstall, [
# Line 1036 | Line 1104 | fi
1104   dnl A dummy program that returns always true
1105   AC_PATH_PROG([BLESS], "true")
1106  
1107 + dnl Check for linker script support
1108 + case $target_os:$target_cpu in
1109 + linux*:i?86)    LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1110 + linux*:x86_64)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-x86_64.ld";;
1111 + linux*:powerpc) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-ppc.ld";;
1112 + netbsd*:i?86)   LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1113 + freebsd*:i?86)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/freebsd-i386.ld";;
1114 + darwin*:*)      LINKER_SCRIPT_FLAGS="-Wl,-seg1addr,0x78048000";;
1115 + esac
1116 + if [[ -n "$LINKER_SCRIPT_FLAGS" ]]; then
1117 +  AC_CACHE_CHECK([whether linker script is usable],
1118 +    ac_cv_linker_script_works, [
1119 +    AC_LANG_SAVE
1120 +    AC_LANG_CPLUSPLUS
1121 +    saved_LDFLAGS="$LDFLAGS"
1122 +    LDFLAGS="$LDFLAGS $LINKER_SCRIPT_FLAGS"
1123 +    AC_TRY_RUN(
1124 +      [int main() {if ((char *)&main < (char *)0x70000000) return 1;}],
1125 +      [ac_cv_linker_script_works=yes],
1126 +      [ac_cv_linker_script_works=no],
1127 +      dnl When cross-compiling, assume it works
1128 +      [ac_cv_linker_script_works="guessing yes"]
1129 +    )
1130 +    AC_LANG_RESTORE
1131 +    if [[ "$ac_cv_linker_script_works" = "no" ]]; then
1132 +      LDFLAGS="$saved_LDFLAGS"
1133 +      LINKER_SCRIPT_FLAGS=""
1134 +    fi
1135 +  ])
1136 + fi
1137 + AC_TRANSLATE_DEFINE(HAVE_LINKER_SCRIPT, "$ac_cv_linker_script_works",
1138 +  [Define if there is a linker script to relocate the executable above 0x70000000.])
1139 +
1140   dnl Determine the addressing mode to use
1141   if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
1142    ADDRESSING_MODE="real"
# Line 1113 | Line 1214 | AC_MSG_RESULT($HAVE_GAS)
1214   dnl Check for GCC 2.7 or higher.
1215   HAVE_GCC27=no
1216   AC_MSG_CHECKING(for GCC 2.7 or higher)
1217 < AC_EGREP_CPP(xyes,
1218 < [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
1219 <  xyes
1220 < #endif
1221 < ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
1217 > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5)
1218 >                                     # error gcc < 2.7
1219 >                                     #endif
1220 >                                   ]])],
1221 >                  [AC_MSG_RESULT(yes); HAVE_GCC27=yes],
1222 >                  [AC_MSG_RESULT(no)])
1223  
1224   dnl Check for GCC 3.0 or higher.
1225   HAVE_GCC30=no
1226   AC_MSG_CHECKING(for GCC 3.0 or higher)
1227 < AC_EGREP_CPP(xyes,
1228 < [#if __GNUC__ >= 3
1229 <  xyes
1230 < #endif
1231 < ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
1227 > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 3)
1228 >                                     # error gcc < 3
1229 >                                     #endif
1230 >                                   ]])],
1231 >                  [AC_MSG_RESULT(yes); HAVE_GCC30=yes],
1232 >                  [AC_MSG_RESULT(no)])
1233  
1234   dnl Check for ICC.
1235   AC_MSG_CHECKING(for ICC)
# Line 1192 | Line 1295 | if [[ "x$HAVE_GCC30" = "xyes" ]]; then
1295    CFLAGS="$SAVED_CFLAGS"
1296   fi
1297  
1298 < dnl Add -mdynamic-no-pic for MacOS X
1299 < if [[ "x$HAVE_GCC30" = "xyes" ]]; then
1298 > dnl Add -mdynamic-no-pic for MacOS X (XXX icc10 will support MacOS X)
1299 > if [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
1300    SAVED_CFLAGS="$CFLAGS"
1301    CFLAGS="$CFLAGS -mdynamic-no-pic"
1302    AC_CACHE_CHECK([whether the compiler supports -mdynamic-no-pic],
# Line 1233 | Line 1336 | elif [[ "x$HAVE_GCC30" = "xyes" -a "x$HA
1336      DEFINES="$DEFINES -DX86_64_ASSEMBLY -DOPTIMIZED_FLAGS"
1337      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"
1338      CAN_JIT=yes
1236    WANT_33BIT_ADDRESSING=yes
1339    fi
1340   elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then
1341    dnl SPARC CPU
# Line 1290 | Line 1392 | else
1392    JITSRCS=""
1393   fi
1394  
1293 dnl Use 33-bit memory addressing?
1294 if [[ "$ac_cv_have_33bit_addressing:$WANT_33BIT_ADDRESSING" = "yes:yes" ]]; then
1295  use_33bit_addressing=yes
1296 fi
1297 AC_TRANSLATE_DEFINE(USE_33BIT_ADDRESSING, "$use_33bit_addressing",
1298  [Define to use 33-bit memory addressing on 64-bit JIT capable systems.])
1299
1395   dnl Utility macro used by next two tests.
1396   dnl AC_EXAMINE_OBJECT(C source code,
1397   dnl     commands examining object file,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines