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.10 by gbeauche, 2004-11-24T22:48:02Z

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines