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.56 by gbeauche, 2005-12-04T15:45:09Z vs.
Revision 1.67 by gbeauche, 2006-04-16T21:25:41Z

# 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 + AC_ARG_ENABLE(standalone-gui,[  --enable-standalone-gui enable a standalone GUI prefs editor [default=no]], [WANT_STANDALONE_GUI=$enableval], [WANT_STANDALONE_GUI=no])
18 +
19   dnl Video options.
20   AC_ARG_ENABLE(xf86-dga,      [  --enable-xf86-dga       use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes])
21   AC_ARG_ENABLE(xf86-vidmode,  [  --enable-xf86-vidmode   use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes])
# Line 252 | Line 254 | case "x$WANT_GTK" in
254   xgtk2*)
255    AM_PATH_GTK_2_0(1.3.15, [
256      AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
257 <    CFLAGS="$CFLAGS $GTK_CFLAGS"
258 <    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
257 <    LIBS="$LIBS $GTK_LIBS"
257 >    GUI_CFLAGS="$GTK_CFLAGS"
258 >    GUI_LIBS="$GTK_LIBS"
259      UISRCS=prefs_editor_gtk.cpp
260      WANT_GTK=gtk2
261    ], [
# Line 274 | Line 275 | esac
275   if [[ "x$WANT_GTK" = "xgtk" ]]; then
276    AM_PATH_GTK(1.2.0, [
277      AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.])
278 <    CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
279 <    LIBS="$LIBS $GTK_LIBS"
278 >    GUI_CFLAGS="$GTK_CFLAGS"
279 >    GUI_LIBS="$GTK_LIBS"
280      UISRCS=prefs_editor_gtk.cpp
281      dnl somehow, <gnome-i18n.h> would redefine gettext() to nothing if
282      dnl ENABLE_NLS is not set, thusly conflicting with C++ <string> which
# Line 283 | Line 284 | if [[ "x$WANT_GTK" = "xgtk" ]]; then
284      AM_GNU_GETTEXT
285      B2_PATH_GNOMEUI([
286        AC_DEFINE(HAVE_GNOMEUI, 1, [Define if libgnomeui is available.])
287 <      CXXFLAGS="$CXXFLAGS $GNOMEUI_CFLAGS"
288 <      LIBS="$LIBS $GNOMEUI_LIBS"
287 >      GUI_CFLAGS="$GUI_CFLAGS $GNOMEUI_CFLAGS"
288 >      GUI_LIBS="$GUI_LIBS $GNOMEUI_LIBS"
289      ], [])
290    ], [
291      AC_MSG_WARN([Could not find GTK+, disabling user interface.])
292      WANT_GTK=no
293    ])
294   fi
295 + AC_SUBST(GUI_CFLAGS)
296 + AC_SUBST(GUI_LIBS)
297 +
298 + dnl Enable standalone GUI?
299 + if [[ "$WANT_STANDALONE_GUI" != "yes" ]]; then
300 +  WANT_STANDALONE_GUI=no
301 + fi
302 + if [[ "$WANT_GTK" = "no" ]]; then
303 +  WANT_STANDALONE_GUI=no
304 + fi
305 + if [[ "$WANT_STANDALONE_GUI" = "yes" ]]; then
306 +  UISRCS=""
307 +  AC_DEFINE(STANDALONE_GUI, 1, [Define to use build a standalone GUI prefs editor.])
308 + fi
309 + AC_SUBST(STANDALONE_GUI, [$WANT_STANDALONE_GUI])
310  
311   dnl We use ESD if possible.
312   if [[ "x$WANT_ESD" = "xyes" ]]; then
# Line 422 | Line 438 | AC_CHECK_FILE([/dev/ptc],
438   dnl (end of code from openssh-3.2.2p1 configure.ac)
439  
440  
441 + dnl Check for systems where POSIX-style non-blocking I/O (O_NONBLOCK)
442 + dnl doesn't work or is unimplemented. On these systems (mostly older
443 + dnl ones), use the old BSD-style FIONBIO approach instead. [tcl.m4]
444 + AC_CACHE_CHECK([FIONBIO vs. O_NONBLOCK for non-blocking I/O],
445 +  ac_cv_nonblocking_io, [
446 +  case "$host" in
447 +  *-*-osf*)
448 +    ac_cv_nonblocking_io=FIONBIO
449 +    ;;
450 +  *-*-sunos4*)
451 +    ac_cv_nonblocking_io=FIONBIO
452 +    ;;
453 +  *-*-ultrix*)
454 +    ac_cv_nonblocking_io=FIONBIO
455 +    ;;
456 +  *)
457 +    ac_cv_nonblocking_io=O_NONBLOCK
458 +    ;;
459 +  esac
460 + ])
461 + if [[ "$ac_cv_nonblocking_io" = "FIONBIO" ]]; then
462 +  AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used])
463 + fi
464 +
465 + dnl Check whether compiler supports byte bit-fields
466 + AC_CACHE_CHECK([whether compiler supports byte bit-fields],
467 +  ac_cv_have_byte_bitfields, [
468 +  AC_LANG_SAVE
469 +  AC_LANG_CPLUSPLUS
470 +  AC_TRY_RUN([
471 +    struct A {
472 +      unsigned char b1:4;
473 +      unsigned char b2:4;
474 +      unsigned char c;
475 +      unsigned short s;
476 +      unsigned char a[4];
477 +    };
478 +
479 +    int main(void) {
480 +      A a;
481 +      return ! (sizeof(A) == 8 && &a.c == ((unsigned char *)&a + 1));
482 +    }],
483 +    [ac_cv_have_byte_bitfields=yes],
484 +    [ac_cv_have_byte_bitfields=no],
485 +    dnl When cross-compiling, assume only GCC supports this
486 +    [if [[ "$GCC" = "yes" ]]; then
487 +      ac_cv_have_byte_bitfields="guessing yes"
488 +    else
489 +      ac_cv_have_byte_bitfields="guessing no"
490 +    fi]
491 +    )
492 +  AC_LANG_RESTORE
493 + ])
494 +
495   dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES)
496   AC_DEFUN([AC_CHECK_FRAMEWORK], [
497    AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
# Line 430 | Line 500 | AC_DEFUN([AC_CHECK_FRAMEWORK], [
500      saved_LIBS="$LIBS"
501      LIBS="$LIBS -framework $1"
502      AC_TRY_LINK(
503 <      [$2], [int main(void) { return 0; }],
503 >      [$2], [],
504        [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"]
505      )
506    ])
# Line 441 | Line 511 | AC_DEFUN([AC_CHECK_FRAMEWORK], [
511   ])
512  
513   dnl Check for some MacOS X frameworks
514 + AC_CHECK_FRAMEWORK(AppKit, [])
515   AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>])
516   AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>])
517   AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>])
# Line 491 | Line 562 | solaris*)
562    DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS"
563    ;;
564   irix*)
494  ETHERSRC=ether_unix.cpp
565    AUDIOSRC=Irix/audio_irix.cpp
566    EXTRASYSSRCS=Irix/unaligned.c
567    LIBS="$LIBS -laudio"
# Line 524 | Line 594 | cygwin*)
594   esac
595  
596   dnl Is the slirp library supported?
597 < if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then
597 > case "$ac_cv_have_byte_bitfields" in
598 > yes|"guessing yes")
599 >  CAN_SLIRP=yes
600 >  ETHERSRC=ether_unix.cpp
601 >  ;;
602 > esac
603 > if [[ -n "$CAN_SLIRP" ]]; then
604    AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported])
605    SLIRP_SRCS="\
606      ../slirp/bootp.c     ../slirp/ip_output.c  ../slirp/tcp_input.c  \
# Line 1037 | Line 1113 | fi
1113   dnl A dummy program that returns always true
1114   AC_PATH_PROG([BLESS], "true")
1115  
1116 + dnl Check for linker script support
1117 + case $target_os:$target_cpu in
1118 + linux*:i?86)    LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1119 + linux*:x86_64)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-x86_64.ld";;
1120 + linux*:powerpc) LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-ppc.ld";;
1121 + netbsd*:i?86)   LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1122 + freebsd*:i?86)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/freebsd-i386.ld";;
1123 + darwin*:*)      LINKER_SCRIPT_FLAGS="-Wl,-seg1addr,0x78048000";;
1124 + esac
1125 + if [[ -n "$LINKER_SCRIPT_FLAGS" ]]; then
1126 +  AC_CACHE_CHECK([whether linker script is usable],
1127 +    ac_cv_linker_script_works, [
1128 +    AC_LANG_SAVE
1129 +    AC_LANG_CPLUSPLUS
1130 +    saved_LDFLAGS="$LDFLAGS"
1131 +    LDFLAGS="$LDFLAGS $LINKER_SCRIPT_FLAGS"
1132 +    AC_TRY_RUN(
1133 +      [int main() {if ((char *)&main < (char *)0x70000000) return 1;}],
1134 +      [ac_cv_linker_script_works=yes],
1135 +      [ac_cv_linker_script_works=no],
1136 +      dnl When cross-compiling, assume it works
1137 +      [ac_cv_linker_script_works="guessing yes"]
1138 +    )
1139 +    AC_LANG_RESTORE
1140 +    if [[ "$ac_cv_linker_script_works" = "no" ]]; then
1141 +      LDFLAGS="$saved_LDFLAGS"
1142 +      LINKER_SCRIPT_FLAGS=""
1143 +    fi
1144 +  ])
1145 + fi
1146 + AC_TRANSLATE_DEFINE(HAVE_LINKER_SCRIPT, "$ac_cv_linker_script_works",
1147 +  [Define if there is a linker script to relocate the executable above 0x70000000.])
1148 +
1149   dnl Determine the addressing mode to use
1150   if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
1151    ADDRESSING_MODE="real"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines