+if test "$opsys" = "cygwin"; then
+ CYGWIN_OBJ="sheap.o"
+ ## Cygwin differs because of its unexec().
+ PRE_ALLOC_OBJ=
+ POST_ALLOC_OBJ="lastfile.o vm-limit.o"
+else
+ CYGWIN_OBJ=
+ PRE_ALLOC_OBJ=lastfile.o
+ POST_ALLOC_OBJ="\$(vmlimitobj)"
+fi
+AC_SUBST(CYGWIN_OBJ)
+AC_SUBST(PRE_ALLOC_OBJ)
+AC_SUBST(POST_ALLOC_OBJ)
+
+
+case "$opsys" in
+ aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
+
+ darwin)
+ ## The -headerpad option tells ld (see man page) to leave room at the
+ ## end of the header for adding load commands. Needed for dumping.
+ ## 0x690 is the total size of 30 segment load commands (at 56
+ ## each); under Cocoa 31 commands are required.
+ if test "$HAVE_NS" = "yes"; then
+ libs_nsgui="-framework AppKit"
+ headerpad_extra=6C8
+ else
+ libs_nsgui=
+ headerpad_extra=690
+ fi
+ LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
+ ;;
+
+ *) LD_SWITCH_SYSTEM_TEMACS= ;;
+esac
+AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
+
+
+## This exists because src/Makefile.in did some extra fiddling around
+## with LD_SWITCH_SYSTEM. The cpp logic was:
+## #ifndef LD_SWITCH_SYSTEM
+## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
+## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
+## not using gcc, darwin system not on an alpha (ie darwin, since
+## darwin + alpha does not occur).
+## Note that unlike L_S_S, this is not used in ac_link.
+if test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
+ test "$opsys" = "darwin"; then
+ LD_SWITCH_SYSTEM_EXTRA="-X"
+else
+ LD_SWITCH_SYSTEM_EXTRA=
+fi
+AC_SUBST(LD_SWITCH_SYSTEM_EXTRA)
+
+
+LIB_GCC=
+if test "x$GCC" = "xyes"; then
+
+ case "$opsys" in
+ ## cygwin: don't link against static libgcc.
+ cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
+
+ gnu-*)
+ ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
+ ## build on ARM EABI under GNU/Linux. (Bug#5518)
+ ## Note that m/arm.h never bothered to undefine LIB_GCC first.
+ if test "$machine" = "arm"; then
+ LIB_GCC="-lgcc_s"
+ else
+ ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
+ ## immediately undefine it again and redefine it to empty.
+ ## Was the C_SWITCH_X_SITE part really necessary?
+## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
+ LIB_GCC=
+ fi
+ ;;
+
+ ## Ask GCC where to find libgcc.a.
+ *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
+ esac
+fi dnl if $GCC
+AC_SUBST(LIB_GCC)
+
+
+TOOLTIP_SUPPORT=
+WINDOW_SUPPORT=
+## If we're using X11/GNUstep, define some consequences.
+if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
+ AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.])
+ AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.])
+ MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
+ TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
+
+ WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
+ test "$HAVE_X_WINDOWS" = "yes" && \
+ WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
+
+fi
+AC_SUBST(MOUSE_SUPPORT)
+AC_SUBST(TOOLTIP_SUPPORT)
+AC_SUBST(WINDOW_SUPPORT)
+
+