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

Comparing BasiliskII/src/Unix/configure.ac (file contents):
Revision 1.36 by gbeauche, 2004-11-14T23:24:51Z vs.
Revision 1.45 by gbeauche, 2005-05-14T17:40:05Z

# Line 21 | Line 21 | AC_ARG_ENABLE(fbdev-dga,     [  --enable
21   AC_ARG_ENABLE(vosf,          [  --enable-vosf           enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes])
22  
23   dnl SDL options.
24 + AC_ARG_ENABLE(sdl-static,    [  --enable-sdl-static     use SDL static libraries for linking [default=no]], [WANT_SDL_STATIC=$enableval], [WANT_SDL_STATIC=no])
25   AC_ARG_ENABLE(sdl-video,     [  --enable-sdl-video      use SDL for video graphics [default=no]], [WANT_SDL_VIDEO=$enableval], [WANT_SDL_VIDEO=no])
26   AC_ARG_ENABLE(sdl-audio,     [  --enable-sdl-audio      use SDL for audio [default=no]], [WANT_SDL_AUDIO=$enableval], [WANT_SDL_AUDIO=no])
27  
# Line 153 | Line 154 | if [[ "x$WANT_SDL" = "xyes" ]]; then
154        ;;
155      *)
156        sdl_cflags=`$sdl_config --cflags`
157 <      sdl_libs=`$sdl_config --libs`
157 >      if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then
158 >        sdl_libs=`$sdl_config --static-libs`
159 >      else
160 >        sdl_libs=`$sdl_config --libs`
161 >      fi
162        ;;
163      esac
164      CFLAGS="$CFLAGS $sdl_cflags"
# Line 275 | Line 280 | dnl Checks for header files.
280   AC_HEADER_STDC
281   AC_CHECK_HEADERS(unistd.h fcntl.h sys/types.h sys/time.h sys/mman.h mach/mach.h)
282   AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
283 < AC_CHECK_HEADERS(sys/socket.h)
283 > AC_CHECK_HEADERS(sys/socket.h sys/ioctl.h sys/filio.h sys/bitypes.h sys/wait.h)
284 > AC_CHECK_HEADERS(sys/poll.h sys/select.h)
285 > AC_CHECK_HEADERS(arpa/inet.h)
286   AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h, [], [], [
287 + #ifdef HAVE_SYS_TYPES_H
288 + #include <sys/types.h>
289 + #endif
290   #ifdef HAVE_SYS_SOCKET_H
291   #include <sys/socket.h>
292   #endif
# Line 321 | Line 331 | if [[ "x$ac_cv_type_socklen_t" != "xyes"
331   fi
332  
333   dnl Checks for library functions.
334 < AC_CHECK_FUNCS(strdup cfmakeraw)
334 > AC_CHECK_FUNCS(strdup strerror cfmakeraw)
335   AC_CHECK_FUNCS(clock_gettime timer_create)
336   AC_CHECK_FUNCS(sigaction signal)
337   AC_CHECK_FUNCS(mmap mprotect munmap)
338   AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect)
339 + AC_CHECK_FUNCS(poll inet_aton)
340  
341   dnl Darwin seems to define mach_task_self() instead of task_self().
342   AC_CHECK_FUNCS(mach_task_self task_self)
# Line 404 | Line 415 | SERIALSRC=serial_unix.cpp
415   ETHERSRC=../dummy/ether_dummy.cpp
416   SCSISRC=../dummy/scsi_dummy.cpp
417   AUDIOSRC=../dummy/audio_dummy.cpp
418 + EXTFSSRC=extfs_unix.cpp
419   EXTRASYSSRCS=
420   CAN_NATIVE_M68K=no
421   case "$target_os" in
# Line 437 | Line 449 | freebsd*)
449    ;;
450   netbsd*)
451    CAN_NATIVE_M68K=yes
452 +  ETHERSRC=ether_unix.cpp
453    ;;
454   solaris*)
455    AUDIOSRC=Solaris/audio_solaris.cpp
# Line 461 | Line 474 | irix*)
474    CFLAGS="$ocflags"
475    ;;
476   darwin*)
477 +  ETHERSRC=ether_unix.cpp
478    if [[ "x$ac_cv_framework_IOKit" = "xyes" ]]; then
479      EXTRASYSSRCS="../MacOSX/sys_darwin.cpp"
480    fi
481 +  if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
482 +    EXTFSSRC=../MacOSX/extfs_macosx.mm
483 +  fi
484    ;;
485   cygwin*)
486    SERIALSRC="../dummy/serial_dummy.cpp"
487 +  EXTRASYSSRCS="../Windows/BasiliskII.rc"
488    ;;
489   esac
490 +
491 + dnl Is the slirp library supported?
492 + if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then
493 +  AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported])
494 +  SLIRP_SRCS="\
495 +    ../slirp/bootp.c     ../slirp/ip_output.c  ../slirp/tcp_input.c  \
496 +    ../slirp/cksum.c     ../slirp/mbuf.c       ../slirp/tcp_output.c \
497 +    ../slirp/debug.c     ../slirp/misc.c       ../slirp/tcp_subr.c   \
498 +    ../slirp/if.c        ../slirp/sbuf.c       ../slirp/tcp_timer.c  \
499 +    ../slirp/ip_icmp.c   ../slirp/slirp.c      ../slirp/tftp.c       \
500 +    ../slirp/ip_input.c  ../slirp/socket.c     ../slirp/udp.c"
501 + fi
502 + AC_SUBST(SLIRP_SRCS)
503 +
504   dnl SDL overrides
505   if [[ "x$WANT_SDL" = "xyes" ]]; then
506    AC_DEFINE(USE_SDL, 1, [Define to enble SDL support])
# Line 480 | Line 512 | if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; th
512    if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
513      EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp"
514    else
515 <    EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
515 >    case "$target_os" in
516 >    cygwin*)
517 >      EXTRASYSSRCS="$EXTRASYSSRCS ../Windows/clip_windows.cpp"
518 >      ;;
519 >    *)
520 >      EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp"
521 >      ;;
522 >    esac
523    fi
524   else
525    VIDEOSRCS="video_x.cpp"
# Line 506 | Line 545 | if [[ "x$HAVE_PTHREADS" = "xno" ]]; then
545    ETHERSRC=../dummy/ether_dummy.cpp
546    AUDIOSRC=../dummy/audio_dummy.cpp
547   fi
548 < SYSSRCS="$VIDEOSRCS $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
548 > SYSSRCS="$VIDEOSRCS $EXTFSSRC $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS"
549  
550   dnl Define a macro that translates a yesno-variable into a C macro definition
551   dnl to be put into the config.h file
# Line 1055 | Line 1094 | AC_EGREP_CPP(xyes,
1094   #endif
1095   ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
1096  
1097 + dnl Check for ICC.
1098 + AC_MSG_CHECKING(for ICC)
1099 + HAVE_ICC=no
1100 + if $CXX -V -v 2>&1 | grep -q "Intel(R) C++ Compiler"; then
1101 +  HAVE_ICC=yes
1102 + fi
1103 + AC_MSG_RESULT($HAVE_ICC)
1104 +
1105   dnl Set "-fomit-frame-pointer" on i386 GCC 2.7 or higher.
1106   dnl Also set "-fno-exceptions" for C++ because exception handling requires
1107   dnl the frame pointer.
# Line 1068 | Line 1115 | dnl As of 2001/08/02, this affects the f
1115   dnl Official: probably gcc-3.1 (mainline CVS)
1116   dnl Mandrake: gcc-2.96 >= 0.59mdk, gcc-3.0.1 >= 0.1mdk
1117   dnl Red Hat : gcc-2.96 >= 89, gcc-3.0 >= 1
1118 < if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1118 > if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
1119    SAVED_CXXFLAGS="$CXXFLAGS"
1120    CXXFLAGS="$CXXFLAGS -fno-merge-constants"
1121    AC_CACHE_CHECK([whether GCC supports constants merging], ac_cv_gcc_constants_merging, [
# Line 1084 | Line 1131 | fi
1131  
1132   dnl Store motion was introduced in 3.3-hammer branch and any gcc >= 3.4
1133   dnl However, there are some corner cases exposed on x86-64
1134 < if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1134 > if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
1135    SAVED_CXXFLAGS="$CXXFLAGS"
1136    CXXFLAGS="$CXXFLAGS -fno-gcse-sm"
1137    AC_CACHE_CHECK([whether GCC supports store motion], ac_cv_gcc_store_motion, [
# Line 1098 | Line 1145 | if [[ "x$HAVE_GCC27" = "xyes" ]]; then
1145    fi
1146   fi
1147  
1148 + dnl Add -fno-strict-aliasing for slirp sources
1149 + if [[ "x$HAVE_GCC30" = "xyes" ]]; then
1150 +  SAVED_CFLAGS="$CFLAGS"
1151 +  CFLAGS="$CFLAGS -fno-strict-aliasing"
1152 +  AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing],
1153 +    ac_cv_gcc_no_strict_aliasing, [
1154 +    AC_TRY_COMPILE([],[],
1155 +      [ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "$CFLAGS")],
1156 +      [ac_cv_gcc_no_strict_aliasing=no])
1157 +  ])
1158 +  CFLAGS="$SAVED_CFLAGS"
1159 + fi
1160 +
1161   dnl Select appropriate CPU source and REGPARAM define.
1162   ASM_OPTIMIZATIONS=none
1163   CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines