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.32 by gbeauche, 2005-07-03T13:05:36Z vs.
Revision 1.37 by gbeauche, 2005-07-10T15:43:33Z

# 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 + dnl Invite Cygwin users to build within the Windows/ directory
18 + case $target_os in
19 + *cygwin* | *mingw32*)
20 +  AC_MSG_ERROR([You can only build the Windows version from its directory, Cygwin/X11 is not supported.])
21 +  ;;
22 + esac
23 +
24   dnl Options.
25   AC_ARG_ENABLE(jit,          [  --enable-jit            enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes])
26   AC_ARG_ENABLE(ppc-emulator, [  --enable-ppc-emulator   use the selected PowerPC emulator [default=auto]], [WANT_EMULATED_PPC=$enableval], [WANT_EMULATED_PPC=auto])
# Line 135 | Line 142 | fi
142   if [[ "x$WANT_SDL" = "xyes" ]]; then
143    AC_PATH_PROG(sdl_config, "sdl-config")
144    if [[ -n "$sdl_config" ]]; then
145 <    case $target_os in
146 <    # Special treatment for Cygwin so that we can still use the POSIX layer
147 <    *cygwin*)
148 <      sdl_cflags="-I`$sdl_config --prefix`/include/SDL"
149 <      sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL"
150 <      ;;
144 <    *)
145 <      sdl_cflags=`$sdl_config --cflags`
146 <      if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
147 <        sdl_libs=`$sdl_config --static-libs`
148 <      else
149 <        sdl_libs=`$sdl_config --libs`
150 <      fi
151 <      ;;
152 <    esac
145 >    sdl_cflags=`$sdl_config --cflags`
146 >    if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
147 >      sdl_libs=`$sdl_config --static-libs`
148 >    else
149 >      sdl_libs=`$sdl_config --libs`
150 >    fi
151      CFLAGS="$CFLAGS $sdl_cflags"
152      CXXFLAGS="$CXXFLAGS $sdl_cflags"
153      LIBS="$LIBS $sdl_libs"
# Line 192 | Line 190 | no:linux*|no:netbsd*)
190      ])
191    ])
192    AC_CHECK_FUNCS(pthread_cancel)
193 <  AC_CHECK_FUNCS(pthread_cond_init)
193 >  AC_CHECK_FUNCS(pthread_cond_init pthread_testcancel)
194    AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
195    AC_CHECK_FUNCS(pthread_mutexattr_settype)
196    AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
# Line 333 | Line 331 | AC_TYPE_SIGNAL
331   AC_HEADER_TIME
332   AC_STRUCT_TM
333  
334 + dnl Check whether sys/socket.h defines type socklen_t.
335 + dnl (extracted from ac-archive/Miscellaneous)
336 + AC_CACHE_CHECK([for socklen_t],
337 +  ac_cv_type_socklen_t, [
338 +  AC_TRY_COMPILE([
339 +    #include <sys/types.h>
340 +    #include <sys/socket.h>
341 +  ], [socklen_t len = 42; return 0;],
342 +  ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no,
343 +  dnl When cross-compiling, do not assume anything.
344 +  ac_cv_type_socklen_t="guessing no"
345 +  )
346 + ])
347 + if [[ "x$ac_cv_type_socklen_t" != "xyes" ]]; then
348 +  AC_DEFINE(socklen_t, int, [Define to 'int' if <sys/types.h> doesn't define.])
349 + fi
350 +
351   dnl Check whether struct sigaction has sa_restorer member.
352   AC_CACHE_CHECK([whether struct sigaction has sa_restorer],
353    ac_cv_signal_sa_restorer, [
# Line 437 | Line 452 | AC_DEFUN(AC_CHECK_FRAMEWORK, [
452   dnl Check for some MacOS X frameworks
453   AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>])
454   AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>])
455 + AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>])
456  
457   dnl Select system-dependant sources.
458   SERIALSRC=serial_unix.cpp
# Line 451 | Line 467 | linux*)
467    AUDIOSRC=audio_oss_esd.cpp
468    SCSISRC=Linux/scsi_linux.cpp
469    if [[ "x$EMULATED_PPC" = "xno" ]]; then
470 <    EXTRASYSSRCS="Linux/paranoia.cpp Linux/sheepthreads.c ppc_asm.S"
470 >    EXTRASYSSRCS="paranoia.cpp Linux/sheepthreads.c ppc_asm.S"
471    fi
472    ;;
473   freebsd*)
# Line 460 | Line 476 | freebsd*)
476   netbsd*)
477    ETHERSRC=ether_unix.cpp
478    if [[ "x$EMULATED_PPC" = "xno" ]]; then
479 <    EXTRASYSSRCS="NetBSD/paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S"
479 >    EXTRASYSSRCS="paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S"
480    fi
481    ;;
482   darwin*)
483    ETHERSRC=ether_unix.cpp
484    if [[ "x$EMULATED_PPC" = "xno" ]]; then
485 <    EXTRASYSSRCS="Darwin/paranoia.cpp ppc_asm.S"
485 >    EXTRASYSSRCS="paranoia.cpp ppc_asm.S"
486    fi
487 <  if [[ "x$ac_cv_framework_IOKit" = "xyes" ]]; then
487 >  if [[ "x$ac_cv_framework_IOKit" = "xyes" -a "x$ac_cv_framework_CoreFoundation" = "xyes" ]]; then
488      EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/sys_darwin.cpp"
489    fi
490    if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
491      EXTFSSRC=../MacOSX/extfs_macosx.mm
492    fi
493    ;;
478 cygwin*)
479  SERIALSRC="../dummy/serial_dummy.cpp"
480  ;;
494   esac
495  
496   dnl Is the slirp library supported?
# Line 504 | Line 517 | if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; th
517    if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
518      EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp"
519    else
520 <    case "$target_os" in
508 <    cygwin*)
509 <      EXTRASYSSRCS="$EXTRASYSSRCS ../Windows/clip_windows.cpp"
510 <      ;;
511 <    *)
512 <      EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
513 <      ;;
514 <    esac
520 >    EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
521    fi
522   else
523    VIDEOSRCS="video_x.cpp"
# Line 939 | Line 945 | fi
945  
946   dnl Check addressing mode to use
947   AC_MSG_CHECKING([for addressing mode to use])
942 case "$os_target" in
943 cygwin*)
944  WANT_ADDRESSING_MODE="direct,cygwin-hack"
945  NATMEM_OFFSET=
946  ;;
947 esac
948   if [[ "$EMULATED_PPC" != "yes" ]]; then
949    if [[ "$WANT_ADDRESSING_MODE" != "real" ]]; then
950      AC_MSG_WARN([Running in native PowerPC mode, force use of Real Addressing.])
# Line 1176 | Line 1176 | fi
1176   dnl Check for GCC 2.7 or higher.
1177   HAVE_GCC27=no
1178   AC_MSG_CHECKING(for GCC 2.7 or higher)
1179 < AC_EGREP_CPP(xyes,
1180 < [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
1181 <  xyes
1182 < #endif
1183 < ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
1179 > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5)
1180 >                                     # error gcc < 2.7
1181 >                                     #endif
1182 >                                   ]])],
1183 >                  [AC_MSG_RESULT(yes); HAVE_GCC27=yes],
1184 >                  [AC_MSG_RESULT(no)])
1185  
1186   dnl Check for GCC 3.0 or higher.
1187   HAVE_GCC30=no
1188   AC_MSG_CHECKING(for GCC 3.0 or higher)
1189 < AC_EGREP_CPP(xyes,
1190 < [#if __GNUC__ >= 3
1191 <  xyes
1192 < #endif
1193 < ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
1189 > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 3)
1190 >                                     # error gcc < 3
1191 >                                     #endif
1192 >                                   ]])],
1193 >                  [AC_MSG_RESULT(yes); HAVE_GCC30=yes],
1194 >                  [AC_MSG_RESULT(no)])
1195  
1196   dnl Check for ICC.
1197   AC_MSG_CHECKING(for ICC)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines