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.59 by gbeauche, 2006-01-27T23:41:43Z vs.
Revision 1.62 by gbeauche, 2006-03-14T21:18:44Z

# Line 579 | Line 579 | esac
579   dnl Is the slirp library supported?
580   case "$ac_cv_have_byte_bitfields" in
581   yes|"guessing yes")
582 +  CAN_SLIRP=yes
583    ETHERSRC=ether_unix.cpp
584    ;;
585   esac
586 < if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then
586 > if [[ -n "$CAN_SLIRP" ]]; then
587    AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported])
588    SLIRP_SRCS="\
589      ../slirp/bootp.c     ../slirp/ip_output.c  ../slirp/tcp_input.c  \
# Line 1095 | Line 1096 | fi
1096   dnl A dummy program that returns always true
1097   AC_PATH_PROG([BLESS], "true")
1098  
1099 + dnl Check for linker script support
1100 + case $target_os:$target_cpu in
1101 + linux*:i?86)    LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-i386.ld";;
1102 + linux*:x86_64)  LINKER_SCRIPT_FLAGS="-Wl,-T,ldscripts/linux-x86_64.ld";;
1103 + darwin*:powerpc)LINKER_SCRIPT_FLAGS="-Wl,-seg1addr,0x78048000";;
1104 + esac
1105 + if [[ -n "$LINKER_SCRIPT_FLAGS" ]]; then
1106 +  AC_CACHE_CHECK([whether linker script is usable],
1107 +    ac_cv_linker_script_works, [
1108 +    AC_LANG_SAVE
1109 +    AC_LANG_CPLUSPLUS
1110 +    saved_LDFLAGS="$LDFLAGS"
1111 +    LDFLAGS="$LDFLAGS $LINKER_SCRIPT_FLAGS"
1112 +    AC_TRY_RUN(
1113 +      [int main() {if ((char *)&main < (char *)0x70000000) return 1;}],
1114 +      [ac_cv_linker_script_works=yes],
1115 +      [ac_cv_linker_script_works=no],
1116 +      dnl When cross-compiling, assume it works
1117 +      [ac_cv_linker_script_works="guessing yes"]
1118 +    )
1119 +    AC_LANG_RESTORE
1120 +    if [[ "$ac_cv_linker_script_works" = "no" ]]; then
1121 +      LDFLAGS="$saved_LDFLAGS"
1122 +      LINKER_SCRIPT_FLAGS=""
1123 +    fi
1124 +  ])
1125 + fi
1126 + AC_TRANSLATE_DEFINE(HAVE_LINKER_SCRIPT, "$ac_cv_linker_script_works",
1127 +  [Define if there is a linker script to relocate the executable above 0x70000000.])
1128 +
1129   dnl Determine the addressing mode to use
1130   if [[ "x$WANT_NATIVE_M68K" = "xyes" ]]; then
1131    ADDRESSING_MODE="real"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines