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.9 by gbeauche, 2004-11-22T22:51:54Z

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines