From 262a1501c25d57e39848d21647e607c8319c2088 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 22 Aug 2009 23:14:11 -0700 Subject: [PATCH] fixed enable zippy in configure script and added some checks for OS X 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;) --- Makefile.am | 9 ++++++++- configure.ac | 14 ++++++++++---- xboard.c | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index b72e3e5..f84d4bc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,12 @@ + +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@ diff --git a/configure.ac b/configure.ac index b985632..8b39396 100644 --- a/configure.ac +++ b/configure.ac @@ -328,6 +328,14 @@ dnl| USE_PTYS=1 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], @@ -388,11 +396,9 @@ AC_ARG_ENABLE( [zippy], 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)])], diff --git a/xboard.c b/xboard.c index 05af22b..d539705 100644 --- a/xboard.c +++ b/xboard.c @@ -1022,7 +1022,7 @@ XtResource clientResources[] = { { "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 }, -- 1.7.0.4