--- SheepShaver/src/Unix/configure.ac 2005/07/03 22:42:48 1.34 +++ SheepShaver/src/Unix/configure.ac 2005/12/04 16:26:57 1.42 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Written in 2002 by Christian Bauer -AC_INIT([SheepShaver], 2.2, [Christian.Bauer@uni-mainz.de], SheepShaver) +AC_INIT([SheepShaver], 2.3, [Christian.Bauer@uni-mainz.de], SheepShaver) AC_CONFIG_SRCDIR(main_unix.cpp) AC_PREREQ(2.52) AC_CONFIG_HEADER(config.h) @@ -125,6 +125,7 @@ AC_SUBST(MONSRCS) dnl Checks for libraries. AC_CHECK_LIB(posix4, sem_init) +AC_CHECK_LIB(m, cos) dnl Do we need SDL? WANT_SDL=no @@ -452,6 +453,7 @@ AC_DEFUN(AC_CHECK_FRAMEWORK, [ dnl Check for some MacOS X frameworks AC_CHECK_FRAMEWORK(Carbon, [#include ]) AC_CHECK_FRAMEWORK(IOKit, [#include ]) +AC_CHECK_FRAMEWORK(CoreFoundation, [#include ]) dnl Select system-dependant sources. SERIALSRC=serial_unix.cpp @@ -466,7 +468,7 @@ linux*) AUDIOSRC=audio_oss_esd.cpp SCSISRC=Linux/scsi_linux.cpp if [[ "x$EMULATED_PPC" = "xno" ]]; then - EXTRASYSSRCS="Linux/paranoia.cpp Linux/sheepthreads.c ppc_asm.S" + EXTRASYSSRCS="paranoia.cpp Linux/sheepthreads.c ppc_asm.S" fi ;; freebsd*) @@ -475,21 +477,27 @@ freebsd*) netbsd*) ETHERSRC=ether_unix.cpp if [[ "x$EMULATED_PPC" = "xno" ]]; then - EXTRASYSSRCS="NetBSD/paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S" + EXTRASYSSRCS="paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S" fi ;; darwin*) ETHERSRC=ether_unix.cpp if [[ "x$EMULATED_PPC" = "xno" ]]; then - EXTRASYSSRCS="Darwin/paranoia.cpp ppc_asm.S" + EXTRASYSSRCS="paranoia.cpp ppc_asm.S" fi - if [[ "x$ac_cv_framework_IOKit" = "xyes" ]]; then + if [[ "x$ac_cv_framework_IOKit" = "xyes" -a "x$ac_cv_framework_CoreFoundation" = "xyes" ]]; then EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/sys_darwin.cpp" fi if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then EXTFSSRC=../MacOSX/extfs_macosx.mm fi ;; +irix*) + ETHERSRC=ether_unix.cpp + AUDIOSRC=Irix/audio_irix.cpp + LIBS="$LIBS -laudio" + WANT_ESD=no + ;; esac dnl Is the slirp library supported? @@ -1175,20 +1183,22 @@ fi dnl Check for GCC 2.7 or higher. HAVE_GCC27=no AC_MSG_CHECKING(for GCC 2.7 or higher) -AC_EGREP_CPP(xyes, -[#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5 - xyes -#endif -], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no)) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5) + # error gcc < 2.7 + #endif + ]])], + [AC_MSG_RESULT(yes); HAVE_GCC27=yes], + [AC_MSG_RESULT(no)]) dnl Check for GCC 3.0 or higher. HAVE_GCC30=no AC_MSG_CHECKING(for GCC 3.0 or higher) -AC_EGREP_CPP(xyes, -[#if __GNUC__ >= 3 - xyes -#endif -], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no)) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 3) + # error gcc < 3 + #endif + ]])], + [AC_MSG_RESULT(yes); HAVE_GCC30=yes], + [AC_MSG_RESULT(no)]) dnl Check for ICC. AC_MSG_CHECKING(for ICC) @@ -1232,8 +1242,8 @@ if [[ "x$HAVE_GCC30" = "xyes" ]]; then CFLAGS="$SAVED_CFLAGS" fi -dnl Add -mdynamic-no-pic for MacOS X -if [[ "x$HAVE_GCC30" = "xyes" ]]; then +dnl Add -mdynamic-no-pic for MacOS X (XXX icc10 will support MacOS X) +if [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then SAVED_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdynamic-no-pic" AC_CACHE_CHECK([whether the compiler supports -mdynamic-no-pic], @@ -1275,6 +1285,9 @@ if [[ "x$EMULATED_PPC" = "xyes" ]]; then powerpc:mach) ac_cv_use_dyngen=yes ;; + i?86:mach) + ac_cv_use_dyngen=yes + ;; *:*) ac_cv_use_dyngen=no ;; @@ -1312,7 +1325,7 @@ if [[ "x$EMULATED_PPC" = "xyes" ]]; then else DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0" fi - DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-limit=10000 -fno-exceptions -g0" + DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-functions -finline-limit=10000 -fno-exceptions -g0" if [[ "x$HAVE_GCC30" = "xyes" ]]; then DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-reorder-blocks -fno-optimize-sibling-calls" fi