AC_PREREQ(2.57)
AC_INIT([gnushogi],[1.4.0+],[https://savannah.gnu.org/bugs/?group=gnushogi])
-AC_CONFIG_SRCDIR([version.h])
+AC_CONFIG_SRCDIR([gnushogi/gnushogi.h])
AC_CONFIG_HEADER(config.h)
##########
# curses
AC_ARG_WITH([curses],
[AS_HELP_STRING([--with-curses],
- [enable curses UI])],
+ [enable curses UI (default: yes if available)])],
[],
[with_curses=check])
LIBCURSES=
AS_IF([test "x$with_curses" != xno],
[AC_CHECK_LIB([curses], [clrtoeol],
- [AC_SUBST([LIBCURSES], ["-lcurses"])
+ [AC_SUBST([LIBCURSES], [-lcurses])
+ AC_SUBST([CURSESDSP], [cursesdsp.o])
AC_DEFINE([HAVE_LIBCURSES], [1],
[Define if you have lib])
],
- [AC_MSG_ERROR(
- [--with-curses was given, but test for curses failed])],
+ [AS_IF([test "x$with_curses" = xyes],
+ [AC_MSG_ERROR(
+ [--with-curses was given, but test for curses failed])])],
[-ltermcap])])
# other libraries.
#
# Set various user-definable options.
#
-# Valid OPT settings:
-# --with-top-part-bitmaps
-#
-# Other settings:
-# --with-first-shogi-program=PROGNAME
-# --with-second-shogi-program=PROGNAME
-# --with-first-host=HOSTNAME
-# --with-second-host=HOSTNAME
-#
+
+AC_ARG_ENABLE(minishogi,
+[ --enable-minishogi
+ Build gnuminishogi instead of gnushogi (default: no)],
+[AC_DEFINE([MINISHOGI], [], [Define to build gnuminishogi instead of gnushogi])
+AC_SUBST([PROGNAME], [gnuminishogi])
+],
+[AC_SUBST([PROGNAME], [gnushogi])
+])
OPT=
FIRST_SHOGI_PROGRAM=gnushogi
SECOND_HOST=localhost
AC_ARG_ENABLE(xshogi,
-[ --enable-xshogi
- Compile the xshogi graphical interface to GNU shogi (default: no)],
+AS_HELP_STRING([--enable-xshogi],
+ [compile the xshogi graphical interface to GNU shogi (default: no)]),
enable_xshogi=$enableval,
enable_xshogi=no)
AC_ARG_WITH(top-part-bitmaps,
-[ --with-top-part-bitmaps Use top part of Kanji bitmaps only in xshogi.],
+AS_HELP_STRING([--with-top-part-bitmaps],
+ [use top part of Kanji bitmaps only in xshogi]),
OPT=-DTOP_PART_BITMAPS)
AC_ARG_WITH(first-shogi-program,
-[ --with-first-shogi-program=PROGNAME
- Use PROGNAME as the first shogi program in xshogi (default: gnushogi)],
+AS_HELP_STRING([--with-first-shogi-program=PROGNAME],
+ [use PROGNAME as the first shogi program in xshogi (default: gnushogi)]),
FIRST_SHOGI_PROGRAM=$withval)
AC_ARG_WITH(second-shogi-program,
-[ --with-second-shogi-program=PROGNAME
- Use PROGNAME as the second shogi program in xshogi (default: gnushogi)],
+AS_HELP_STRING([--with-second-shogi-program=PROGNAME],
+ [use PROGNAME as the second shogi program in xshogi (default: gnushogi)]),
SECOND_SHOGI_PROGRAM=$withval)
AC_ARG_WITH(first-host,
-[ --with-first-host=HOSTNAME
- Use HOSTNAME as the machine on which the first shogi program
- runs in xshogi (default: localhost)],
+AS_HELP_STRING([--with-first-host=HOSTNAME],
+ [use HOSTNAME as the machine on which the first shogi program runs in xshogi (default: localhost)]),
FIRST_HOST=$withval)
AC_ARG_WITH(second-host,
-[ --with-second-host=HOSTNAME
- Use HOSTNAME as the machine on which the second shogi program
- runs in xshogi (default: localhost)],
+AS_HELP_STRING([--with-second-host=HOSTNAME],
+ [use HOSTNAME as the machine on which the second shogi program runs in xshogi (default: localhost)]),
SECOND_HOST=$withval)
AC_SUBST(OPT)
AC_CONFIG_FILES([Makefile
gnushogi/Makefile
gnushogi/Makefile.profile
+ doc/Makefile
xshogi/Makefile])
AC_OUTPUT