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.45 by gbeauche, 2005-05-14T17:40:05Z vs.
Revision 1.54 by gbeauche, 2005-08-18T22:10:15Z

# Line 60 | Line 60 | AC_ARG_ENABLE(addressing,
60  
61   dnl External packages.
62   AC_ARG_WITH(esd,             [  --with-esd              support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes])
63 < AC_ARG_WITH(gtk,             [  --with-gtk              use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes])
63 > AC_ARG_WITH(gtk,             [  --with-gtk              use GTK user interface [default=yes]],
64 >  [case "$withval" in
65 >   gtk1)      WANT_GTK="gtk";;
66 >   gtk|gtk2)  WANT_GTK="$withval";;
67 >   yes)       WANT_GTK="gtk2 gtk";;
68 >   *)         WANT_GTK="no";;
69 >   esac],
70 >  [WANT_GTK="gtk2 gtk"])
71   AC_ARG_WITH(mon,             [  --with-mon              use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes])
72  
73   dnl Canonical system information.
# Line 195 | Line 202 | AC_CHECK_LIB(pthread, pthread_create, ,
202   if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then
203    AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.])
204   fi
205 < AC_CHECK_FUNCS(pthread_cancel)
205 > AC_CHECK_FUNCS(pthread_cond_init)
206 > AC_CHECK_FUNCS(pthread_cancel pthread_testcancel)
207   AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
208   AC_CHECK_FUNCS(pthread_mutexattr_settype)
209   AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
# Line 239 | Line 247 | fi
247  
248   dnl We use GTK+ if possible.
249   UISRCS=../dummy/prefs_editor_dummy.cpp
250 < if [[ "x$WANT_GTK" = "xyes" ]]; then
250 > case "x$WANT_GTK" in
251 > xgtk2*)
252 >  AM_PATH_GTK_2_0(1.3.15, [
253 >    AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
254 >    CFLAGS="$CFLAGS $GTK_CFLAGS"
255 >    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
256 >    LIBS="$LIBS $GTK_LIBS"
257 >    UISRCS=prefs_editor_gtk.cpp
258 >    WANT_GTK=gtk2
259 >  ], [
260 >    case "x${WANT_GTK}x" in
261 >    *gtkx)
262 >      AC_MSG_WARN([Could not find GTK+ 2.0, trying with GTK+ 1.2.])
263 >      WANT_GTK=gtk
264 >      ;;
265 >    *)
266 >      AC_MSG_WARN([Could not find GTK+, disabling user interface.])
267 >      WANT_GTK=no
268 >      ;;
269 >    esac
270 >  ])
271 >  ;;
272 > esac
273 > if [[ "x$WANT_GTK" = "xgtk" ]]; then
274    AM_PATH_GTK(1.2.0, [
275      AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
276      CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
# Line 278 | Line 309 | AC_SYS_LARGEFILE
309  
310   dnl Checks for header files.
311   AC_HEADER_STDC
312 + AC_CHECK_HEADERS(stdlib.h stdint.h)
313   AC_CHECK_HEADERS(unistd.h fcntl.h sys/types.h sys/time.h sys/mman.h mach/mach.h)
314   AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h)
315   AC_CHECK_HEADERS(sys/socket.h sys/ioctl.h sys/filio.h sys/bitypes.h sys/wait.h)
# Line 292 | Line 324 | AC_CHECK_HEADERS(linux/if.h linux/if_tun
324   #endif
325   ])
326   AC_CHECK_HEADERS(AvailabilityMacros.h)
327 + AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDevice.h)
328  
329   dnl Checks for typedefs, structures, and compiler characteristics.
330   AC_C_BIGENDIAN
# Line 389 | Line 422 | dnl (end of code from openssh-3.2.2p1 co
422  
423  
424   dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES)
425 < AC_DEFUN(AC_CHECK_FRAMEWORK, [
425 > AC_DEFUN([AC_CHECK_FRAMEWORK], [
426    AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
427    AC_CACHE_CHECK([whether compiler supports framework $1],
428      ac_Framework, [
# Line 409 | Line 442 | AC_DEFUN(AC_CHECK_FRAMEWORK, [
442   dnl Check for some MacOS X frameworks
443   AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>])
444   AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>])
445 + AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>])
446  
447   dnl Select system-dependant source files.
448   SERIALSRC=serial_unix.cpp
# Line 475 | Line 509 | irix*)
509    ;;
510   darwin*)
511    ETHERSRC=ether_unix.cpp
512 <  if [[ "x$ac_cv_framework_IOKit" = "xyes" ]]; then
512 >  if [[ "x$ac_cv_framework_IOKit" = "xyes" -a "x$ac_cv_framework_CoreFoundation" = "xyes" ]]; then
513      EXTRASYSSRCS="../MacOSX/sys_darwin.cpp"
514    fi
515    if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
# Line 552 | Line 586 | dnl to be put into the config.h file
586   dnl $1 -- the macro to define
587   dnl $2 -- the value to translate
588   dnl $3 -- template name
589 < AC_DEFUN(AC_TRANSLATE_DEFINE, [
589 > AC_DEFUN([AC_TRANSLATE_DEFINE], [
590      if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then
591          AC_DEFINE($1, 1, $3)
592      fi
# Line 1079 | Line 1113 | AC_MSG_RESULT($HAVE_GAS)
1113   dnl Check for GCC 2.7 or higher.
1114   HAVE_GCC27=no
1115   AC_MSG_CHECKING(for GCC 2.7 or higher)
1116 < AC_EGREP_CPP(xyes,
1117 < [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
1118 <  xyes
1119 < #endif
1120 < ], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no))
1116 > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5)
1117 >                                     # error gcc < 2.7
1118 >                                     #endif
1119 >                                   ]])],
1120 >                  [AC_MSG_RESULT(yes); HAVE_GCC27=yes],
1121 >                  [AC_MSG_RESULT(no)])
1122  
1123   dnl Check for GCC 3.0 or higher.
1124   HAVE_GCC30=no
1125   AC_MSG_CHECKING(for GCC 3.0 or higher)
1126 < AC_EGREP_CPP(xyes,
1127 < [#if __GNUC__ >= 3
1128 <  xyes
1129 < #endif
1130 < ], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no))
1126 > AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 3)
1127 >                                     # error gcc < 3
1128 >                                     #endif
1129 >                                   ]])],
1130 >                  [AC_MSG_RESULT(yes); HAVE_GCC30=yes],
1131 >                  [AC_MSG_RESULT(no)])
1132  
1133   dnl Check for ICC.
1134   AC_MSG_CHECKING(for ICC)
# Line 1152 | Line 1188 | if [[ "x$HAVE_GCC30" = "xyes" ]]; then
1188    AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing],
1189      ac_cv_gcc_no_strict_aliasing, [
1190      AC_TRY_COMPILE([],[],
1191 <      [ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "$CFLAGS")],
1191 >      [ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")],
1192        [ac_cv_gcc_no_strict_aliasing=no])
1193    ])
1194    CFLAGS="$SAVED_CFLAGS"
1195   fi
1196  
1197 + dnl Add -mdynamic-no-pic for MacOS X (XXX icc10 will support MacOS X)
1198 + if [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then
1199 +  SAVED_CFLAGS="$CFLAGS"
1200 +  CFLAGS="$CFLAGS -mdynamic-no-pic"
1201 +  AC_CACHE_CHECK([whether the compiler supports -mdynamic-no-pic],
1202 +    ac_cv_gcc_mdynamic_no_pic, [
1203 +    AC_TRY_COMPILE([],[],[ac_cv_gcc_mdynamic_no_pic=yes],[ac_cv_gcc_mdynamic_no_pic=no])
1204 +  ])
1205 +  if [[ "x$ac_cv_gcc_mdynamic_no_pic" = "xyes" ]]; then
1206 +    CXXFLAGS="$CXXFLAGS -mdynamic-no-pic"
1207 +  else
1208 +    CFLAGS="$SAVED_CFLAGS"
1209 +  fi
1210 + fi
1211 +
1212   dnl Select appropriate CPU source and REGPARAM define.
1213   ASM_OPTIMIZATIONS=none
1214   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