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

Comparing SheepShaver/src/Unix/configure.ac (file contents):
Revision 1.8 by gbeauche, 2004-11-13T14:09:15Z vs.
Revision 1.11 by gbeauche, 2004-11-25T19:14:15Z

# Line 48 | Line 48 | AC_PROG_CXX
48   AC_PROG_MAKE_SET
49   AC_PROG_INSTALL
50   AC_PROG_EGREP
51 + AC_CHECK_PROGS(FILE, [file false])
52  
53   dnl Check for PowerPC target CPU.
54   HAVE_PPC=no
# Line 104 | Line 105 | if [[ "x$WANT_MON" = "xyes" ]]; then
105      WANT_MON=no
106    fi
107   fi
108 + AC_SUBST(MONSRCS)
109  
110   dnl Checks for libraries.
111   AC_CHECK_LIB(posix4, sem_init)
# Line 124 | Line 126 | fi
126   if [[ "x$WANT_SDL" = "xyes" ]]; then
127    AC_PATH_PROG(sdl_config, "sdl-config")
128    if [[ -n "$sdl_config" ]]; then
129 <    sdl_cflags=`$sdl_config --cflags`
130 <    if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
131 <      sdl_libs=`$sdl_config --static-libs`
132 <    else
133 <      sdl_libs=`$sdl_config --libs`
134 <    fi
129 >    case $target_os in
130 >    # Special treatment for Cygwin so that we can still use the POSIX layer
131 >    *cygwin*)
132 >      sdl_cflags="-I`$sdl_config --prefix`/include/SDL"
133 >      sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL"
134 >      ;;
135 >    *)
136 >      sdl_cflags=`$sdl_config --cflags`
137 >      if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
138 >        sdl_libs=`$sdl_config --static-libs`
139 >      else
140 >        sdl_libs=`$sdl_config --libs`
141 >      fi
142 >      ;;
143 >    esac
144      CFLAGS="$CFLAGS $sdl_cflags"
145      CXXFLAGS="$CXXFLAGS $sdl_cflags"
146      LIBS="$LIBS $sdl_libs"
# Line 240 | Line 251 | AC_SYS_LARGEFILE
251   dnl Checks for header files.
252   AC_HEADER_STDC
253   AC_HEADER_SYS_WAIT
254 + AC_CHECK_HEADERS(malloc.h)
255   AC_CHECK_HEADERS(mach/vm_map.h mach/mach_init.h sys/mman.h)
256   AC_CHECK_HEADERS(sys/time.h sys/times.h sys/socket.h)
257   AC_CHECK_HEADERS(unistd.h fcntl.h byteswap.h dirent.h)
# Line 249 | Line 261 | AC_CHECK_HEADERS(linux/if.h, [], [], [
261   #endif
262   ])
263   AC_CHECK_HEADERS(linux/if_tun.h net/if.h net/if_tun.h)
264 + AC_CHECK_HEADERS(fenv.h)
265  
266   dnl Checks for typedefs, structures, and compiler characteristics.
267   AC_C_BIGENDIAN
# Line 305 | Line 318 | no:linux*)
318    ;;
319   esac
320  
321 + dnl Check for headers and functions related to pty support (sshpty.c)
322 + dnl From openssh-3.2.2p1 configure.ac
323 + AC_CHECK_HEADERS(strings.h login.h sys/bsdtty.h sys/stat.h util.h pty.h)
324 + AC_CHECK_FUNCS(_getpty vhangup strlcpy)
325 +
326 + case "$host" in
327 + *-*-hpux10.26)
328 +        disable_ptmx_check=yes
329 +        ;;
330 + *-*-linux*)
331 +        no_dev_ptmx=1
332 +        ;;
333 + mips-sony-bsd|mips-sony-newsos4)
334 +        AC_DEFINE(HAVE_NEWS4, 1, [Define if you are on NEWS-OS (additions from openssh-3.2.2p1, for sshpty.c).])
335 +        ;;
336 + *-*-sco3.2v4*)
337 +        no_dev_ptmx=1
338 +        ;;
339 + *-*-sco3.2v5*)
340 +        no_dev_ptmx=1
341 +        ;;
342 + *-*-cygwin*)
343 +        no_dev_ptmx=1
344 +        ;;
345 + esac
346 +
347 + if test -z "$no_dev_ptmx" ; then
348 +        if test "x$disable_ptmx_check" != "xyes" ; then
349 +                AC_CHECK_FILE([/dev/ptmx],
350 +                        [
351 +                                AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx.])
352 +                                have_dev_ptmx=1
353 +                        ]
354 +                )
355 +        fi
356 + fi
357 + AC_CHECK_FILE([/dev/ptc],
358 +        [
359 +                AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC, 1, [Define if you have /dev/ptc.])
360 +                have_dev_ptc=1
361 +        ]
362 + )
363 + dnl (end of code from openssh-3.2.2p1 configure.ac)
364 +
365   dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES)
366   AC_DEFUN(AC_CHECK_FRAMEWORK, [
367    AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
# Line 354 | Line 411 | darwin*)
411      EXTFSSRC=../MacOSX/extfs_macosx.mm
412    fi
413    ;;
414 + cygwin*)
415 +  SERIALSRC="../dummy/serial_dummy.cpp"
416 +  ;;
417   esac
418  
419   dnl SDL overrides
# Line 367 | Line 427 | if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; th
427    if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
428      EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp"
429    else
430 <    EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
430 >    case "$target_os" in
431 >    cygwin*)
432 >      EXTRASYSSRCS="$EXTRASYSSRCS ../Windows/clip_windows.cpp"
433 >      ;;
434 >    *)
435 >      EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
436 >      ;;
437 >    esac
438    fi
439   else
440    VIDEOSRCS="video_x.cpp"
# Line 379 | Line 446 | if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; th
446    AUDIOSRC="../SDL/audio_sdl.cpp"
447   fi
448  
449 < SYSSRCS="$VIDEOSRCS $EXTFSSRC $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
449 > SYSSRCS="$VIDEOSRCS $EXTFSSRC $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $EXTRASYSSRCS"
450  
451   dnl Define a macro that translates a yesno-variable into a C macro definition
452   dnl to be put into the config.h file
# Line 683 | Line 750 | fi
750   AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions",
751    [Define if your system supports Mach exceptions.])
752  
753 + dnl Check if Windows exceptions are supported.
754 + AC_CACHE_CHECK([whether your system supports Windows exceptions],
755 +  ac_cv_have_win32_exceptions, [
756 +  AC_LANG_SAVE
757 +  AC_LANG_CPLUSPLUS
758 +  AC_TRY_RUN([
759 +    #define HAVE_WIN32_EXCEPTIONS 1
760 +    #define CONFIGURE_TEST_SIGSEGV_RECOVERY
761 +    #include "vm_alloc.cpp"
762 +    #include "sigsegv.cpp"
763 +  ], [
764 +  sigsegv_recovery=win32
765 +  ac_cv_have_win32_exceptions=yes
766 +  ],
767 +  ac_cv_have_win32_exceptions=no,
768 +  dnl When cross-compiling, do not assume anything.
769 +  ac_cv_have_win32_exceptions=no
770 +  )
771 +  AC_LANG_RESTORE
772 +  ]
773 + )
774 + AC_TRANSLATE_DEFINE(HAVE_WIN32_EXCEPTIONS, "$ac_cv_have_win32_exceptions",
775 +  [Define if your system supports Windows exceptions.])
776 +
777   dnl Otherwise, check if extended signals are supported.
778   if [[ -z "$sigsegv_recovery" ]]; then
779    AC_CACHE_CHECK([whether your system supports extended signal handlers],
# Line 771 | Line 862 | fi
862  
863   dnl Check addressing mode to use
864   AC_MSG_CHECKING([for addressing mode to use])
865 + case "$os_target" in
866 + cygwin*)
867 +  WANT_ADDRESSING_MODE="direct,cygwin-hack"
868 +  NATMEM_OFFSET=
869 +  ;;
870 + esac
871   if [[ "$EMULATED_PPC" != "yes" ]]; then
872    if [[ "$WANT_ADDRESSING_MODE" != "real" ]]; then
873      AC_MSG_WARN([Running in native PowerPC mode, force use of Real Addressing.])
# Line 833 | Line 930 | EOF
930    doit='$CXX conftest.$ac_ext -o conftest.$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS $LIBS $NATMEM_OFFSET_DEF >& AS_MESSAGE_LOG_FD'
931    if AC_TRY_EVAL(doit); then
932      NATMEM_OFFSET=`./conftest.$ac_exeext`
933 <    if [[ -z "$NATMEM_OFFSET" ]]; then
934 <      AC_MSG_ERROR([could not determine a sensible NATMEM_OFFSET value])
838 <    else
839 <      WANT_ADDRESSING_MODE="direct,$NATMEM_OFFSET"
840 <    fi
933 >  else
934 >    NATMEM_OFFSET=
935    fi
936    rm -f conftest*
937    AC_LANG_RESTORE
844 fi
845 AC_MSG_RESULT($WANT_ADDRESSING_MODE)
938  
939 < if [[ -z "$NATMEM_OFFSET" ]]; then
940 <  NATMEM_OFFSET=0
939 >  if [[ -z "$NATMEM_OFFSET" ]]; then
940 >    AC_MSG_ERROR([could not determine a sensible NATMEM_OFFSET value])
941 >  else
942 >    WANT_ADDRESSING_MODE="direct,$NATMEM_OFFSET"
943 >    AC_DEFINE_UNQUOTED(NATMEM_OFFSET, $NATMEM_OFFSET,
944 >      [Define constant offset for Mac address translation])
945 >  fi
946   fi
947 < AC_DEFINE_UNQUOTED(NATMEM_OFFSET, $NATMEM_OFFSET,
851 <  [Define constant offset for Mac address translation])
947 > AC_MSG_RESULT($WANT_ADDRESSING_MODE)
948  
949   dnl Platform specific binary postprocessor
950   AC_PATH_PROG(BLESS, "true")
# Line 883 | Line 979 | if $CXX -V -v 2>&1 | grep -q "Intel(R) C
979   fi
980   AC_MSG_RESULT($HAVE_ICC)
981  
982 < dnl Test if the compiler can generate ELF objects
982 > dnl Determine the generated object format
983   AC_CACHE_CHECK([whether the compiler can generate ELF objects],
984 <  ac_cv_elf_objects, [
984 >  ac_cv_object_format, [
985    echo 'int i;' > conftest.$ac_ext
986 <  ac_cv_elf_objects=no
986 >  ac_cv_object_format=no
987    if AC_TRY_EVAL(ac_compile); then
988      case `/usr/bin/file conftest.$ac_objext` in
989      *"ELF"*)
990 <      ac_cv_elf_objects=yes
990 >      ac_cv_object_format=elf
991 >      ;;
992 >    *)
993 >      ac_cv_object_format=unknown
994        ;;
995      esac
996    fi
997    rm -rf conftest*
998   ])
900 ELF_OBJECTS=$ac_cv_elf_objects
999  
1000   dnl CPU emulator sources
1001   if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1002    CPUSRCS="\
1003 +    ../kpx_cpu/src/mathlib/ieeefp.cpp \
1004      ../kpx_cpu/src/cpu/ppc/ppc-cpu.cpp \
1005      ../kpx_cpu/src/cpu/ppc/ppc-decode.cpp \
1006      ../kpx_cpu/src/cpu/ppc/ppc-execute.cpp \
# Line 912 | Line 1011 | if [[ "x$EMULATED_PPC" = "xyes" ]]; then
1011    if [[ "x$WANT_JIT" = "xyes" ]]; then
1012      AC_CACHE_CHECK([whether dyngen can be used],
1013        ac_cv_use_dyngen, [
1014 <      case $host_cpu:$ELF_OBJECTS in
1015 <      powerpc:yes)
1014 >      case $host_cpu:$ac_cv_object_format in
1015 >      powerpc:elf)
1016          ac_cv_use_dyngen=yes
1017          ;;
1018 <      x86_64:yes)
1018 >      x86_64:elf)
1019          ac_cv_use_dyngen=yes
1020          ;;
1021 <      i?86:yes)
1021 >      i?86:elf)
1022          ac_cv_use_dyngen=yes
1023          ;;
1024        *:*)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines