make tried to compile zippy even when --disable-zippy was given. Also fixed a bug in xboard.c where #ifdef instead of #if was used to test for ZIPPY (it's either 0 or 1, so we need #if).
Also added some special checks for OS X, not sure if these will do it, but it's a start;)
+
+if ZIPPY
+ ZPY = zippy.c
+else
+ ZPY =
+endif
+
bin_PROGRAMS = xboard
-xboard_SOURCES = backend.c lists.c pgntags.c xedittags.c xhistory.c zippy.c childio.c moves.c uci.c xengineoutput.c xoptions.c gamelist.c parser.l xboard.c xgamelist.c book.c
+xboard_SOURCES = backend.c lists.c pgntags.c xedittags.c xhistory.c $(ZPY) childio.c moves.c uci.c xengineoutput.c xoptions.c gamelist.c parser.l xboard.c xgamelist.c book.c
AM_CPPFLAGS=-DINFODIR='"$(infodir)"'
AM_LDFLAGS= -lm @XAW_LIBS@
CONF_CFLAGS="-fwritable-strings"
fi
;;
+dnl| OS X
+ *-apple-* )
+ if test -d /usr/X11/lib ; then
+ X_CFLAGS="$X_CFLAGS "
+ X_LIBS="$X_LIBS -L/usr/X11/lib -R/usr/X11/lib"
+ X_PRE_LIBS = "$X_PRE_LIBS -lXpm -lSM -lICE"
+ fi
+ ;;
esac
AC_ARG_ENABLE( [xpm],
if test x"$enable_zippy" != xno; then
AC_DEFINE(ZIPPY, 1,[should zippy be enabled])
- ZIPPY_O=zippy.o
- ZIPPY_H=zippy.h
fi
-AC_SUBST(ZIPPY_O)
-AC_SUBST(ZIPPY_H)
+AM_CONDITIONAL([ZIPPY], [test x$enable_zippy != xno])
+
AC_ARG_ENABLE(sigint,
[AS_HELP_STRING([--enable-sigint],[sending SIGINT (^C) wakes up GNU Chess (default)])],
{ "localLineEditing", "localLineEditing", XtRBoolean,
sizeof(Boolean), XtOffset(AppDataPtr, localLineEditing),
XtRImmediate, (XtPointer) True }, /* not implemented, must be True */
-#ifdef ZIPPY
+#if ZIPPY
{ "zippyTalk", "zippyTalk", XtRBoolean,
sizeof(Boolean), XtOffset(AppDataPtr, zippyTalk),
XtRImmediate, (XtPointer) ZIPPY_TALK },