dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
- AC_INIT([gnushogi],[1.4.1-rc0+],[https://savannah.gnu.org/bugs/?group=gnushogi])
+ AC_INIT([gnushogi],[1.4.1-rc1+],[https://savannah.gnu.org/bugs/?group=gnushogi])
AC_CONFIG_SRCDIR([gnushogi/gnushogi.h])
AC_CONFIG_HEADER(config.h)
if [[ $ac_cv_c_compiler_gnu = yes ]]
then
-WARNINGS="-Wall -Wno-implicit-int -Wstrict-prototypes -ansi -pedantic"
+WARNINGS="-Wall -Wno-implicit-int -Wstrict-prototypes -ansi"
CEXTRAFLAGS="-fsigned-char -funroll-loops"
- # For profiling targets:
- CEXTRAFLAGS2="-fsigned-char -pg -fprofile-arcs -ftest-coverage"
else
# Who knows what warnings your compiler uses?
WARNINGS=
AC_SUBST(WARNINGS)
AC_SUBST(CEXTRAFLAGS)
- AC_SUBST(CEXTRAFLAGS2)
##########
AC_MSG_NOTICE([header files])
##########
AC_CONFIG_FILES([Makefile
gnushogi/Makefile
- gnushogi/Makefile.profile
+ win32/config.h
doc/Makefile
xshogi/Makefile])
AC_OUTPUT
CC = @CC@
CWARNINGS = @WARNINGS@
CEXTRAFLAGS = @CEXTRAFLAGS@
- CFLAGS = @CFLAGS@ $(HASH) $(CEXTRAFLAGS) $(CWARNINGS) -I$(ROOT) -I@top_builddir@ -I.
+ CFLAGS = @CFLAGS@ $(HASH) $(CEXTRAFLAGS) $(CWARNINGS) -I. -I@top_builddir@ -I$(ROOT)
LDFLAGS = @LDFLAGS@
# The hashfile is a record of positions seen. It is used by
book.o \
commondsp.o \
@CURSESDSP@ \
- dspwrappers.o \
eval.o \
genmove.o \
init.o \
cursesdsp.o: cursesdsp.c
$(CC) $(CFLAGS) -c $<
-dspwrappers.o: dspwrappers.c
- $(CC) $(CFLAGS) -c $<
-
genmove.o: genmove.c
$(CC) $(CFLAGS) -c $<
# Files specific to particular targets.
pat2inc.o: pat2inc.c
- $(CC) $(CFLAGS) $(BINBOOK) $(PATTERN) -c $<
+ $(CC) $(CFLAGS) -c $<
sizetest.o: sizetest.c
$(CC) $(CFLAGS) -c $<
book.o: book.c gnushogi.h
commondsp.o: commondsp.c gnushogi.h
cursesdsp.o: cursesdsp.c gnushogi.h
-dspwrappers.o: dspwrappers.c gnushogi.h
genmove.o: genmove.c gnushogi.h
globals.o: globals.c gnushogi.h
eval.o: eval.c eval.h gnushogi.h $(SRCDIR)/pattern.h
init.o: init.c gnushogi.h $(SRCDIR)/pattern.h
+init-common.o: init-common.c gnushogi.h
main.o: main.c gnushogi.h
makepattern.o: pattern.c gnushogi.h $(SRCDIR)/pattern.h
pattern.o: pattern.c gnushogi.h $(SRCDIR)/pattern.h pattern.inc
#define MAX_OPENING_SEQUENCE 20
#define MAX_PATTERN 200
- char *patternfile = PATTERNFILE;
+ static char *patternfile = PATTERNFILE;
small_short pattern_data[MAX_PATTERN_DATA];
/* minimal ShowMessage to avoid dependency on extraneous display code */
-void
-ShowMessage(char *s)
+static void
+Dummy_ShowMessage(char *s)
{
printf("%s\n", s);
}
+static struct display dummydsp = {
+ .ShowMessage = Dummy_ShowMessage,
+};
+struct display *dsp = &dummydsp;
#define is_digit(c) (((c) >= '0') && ((c) <= '9'))
#define is_alpha(c) ((((c) >= 'a') && ((c) <= 'z')) \
void
ReadOpeningSequences (short *pindex)
-
{
FILE *fd;
char s[256];
{
if (ScanPattern(s, pindex))
{
- ShowMessage("error in pattern sequence...");
+ dsp->ShowMessage("error in pattern sequence...");
exit(1);
}
else
sprintf(s,
"Pattern: %d bytes for %d sequences with %d patterns.\n",
*pindex, max_opening_sequence, max_pattern);
- ShowMessage(s);
+ dsp->ShowMessage(s);
fclose(fd);
} else {
sprintf(s, "no pattern file '%s'", patternfile);
- ShowMessage(s);
+ dsp->ShowMessage(s);
}
}