X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=configure.ac;h=e6ab85fbdc33656b0cca45fee2dd7fb511dc688f;hb=d43826fb9e4f50b20de90fead3bfc7c3e72b8a93;hp=5d16f66889431c307f6da89b4a0ca3b863bda6ce;hpb=8b72032924de9040facee8d8923536541a6b9390;p=gnushogi.git diff --git a/configure.ac b/configure.ac index 5d16f66..e6ab85f 100644 --- a/configure.ac +++ b/configure.ac @@ -5,8 +5,8 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT([gnushogi],[1.4.0+],[https://savannah.gnu.org/bugs/?group=gnushogi]) -AC_CONFIG_SRCDIR([version.h]) +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) ########## @@ -29,7 +29,7 @@ AC_MSG_NOTICE([libs]) # curses AC_ARG_WITH([curses], [AS_HELP_STRING([--with-curses], - [enable curses UI])], + [enable curses UI (default: yes if available)])], [], [with_curses=check]) @@ -41,13 +41,14 @@ AS_IF([test "x$with_curses" != xno], 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. -AC_CHECK_LIB(m, pow) -AC_CHECK_LIB(termcap, tgoto) +AC_CHECK_LIB([m], [pow]) +AC_CHECK_LIB([termcap], [tgoto]) @@ -56,19 +57,16 @@ AC_CHECK_LIB(termcap, tgoto) if [[ $ac_cv_c_compiler_gnu = yes ]] then -WARNINGS="-Wall -Wno-implicit-int -Wstrict-prototypes -ansi -pedantic" -CEXTRAFLAGS="-fsigned-char -funroll-loops \$(HASH)" -# For profiling targets: -CEXTRAFLAGS2="-fsigned-char -pg -fprofile-arcs -ftest-coverage \$(HASH)" +WARNINGS="-Wall -Wno-implicit-int -Wstrict-prototypes -ansi" +CEXTRAFLAGS="-fsigned-char -funroll-loops" else # Who knows what warnings your compiler uses? WARNINGS= -CEXTRAFLAGS="\$(HASH)" +CEXTRAFLAGS= fi AC_SUBST(WARNINGS) AC_SUBST(CEXTRAFLAGS) -AC_SUBST(CEXTRAFLAGS2) ########## AC_MSG_NOTICE([header files]) @@ -102,26 +100,25 @@ AC_MSG_NOTICE([library functions]) AC_FUNC_FORK AC_PROG_GCC_TRADITIONAL AC_FUNC_MALLOC -AC_FUNC_SETVBUF_REVERSED AC_TYPE_SIGNAL AC_CHECK_FUNCS([dup2 gethostname gettimeofday memset pow strcasecmp]) AC_CHECK_FUNCS([strchr strerror strrchr strstr strtol]) -AC_CHECK_FUNCS(memcpy bcopy) -AC_CHECK_FUNCS(setlinebuf setvbuf) +AC_CHECK_FUNCS([memcpy bcopy]) +AC_CHECK_FUNCS([setvbuf setlinebuf]) # # 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 @@ -129,37 +126,36 @@ SECOND_SHOGI_PROGRAM=gnushogi FIRST_HOST=localhost SECOND_HOST=localhost -AC_ARG_ENABLE(xshogi, -[ --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.], -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)], -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)], -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)], -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)], -SECOND_HOST=$withval) +AC_ARG_ENABLE([xshogi], +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], +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], +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], +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], +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], +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_SUBST(FIRST_SHOGI_PROGRAM) @@ -185,6 +181,7 @@ AC_SUBST(XSHOGICLEAN) ########## AC_CONFIG_FILES([Makefile gnushogi/Makefile - gnushogi/Makefile.profile + win32/config.h + doc/Makefile xshogi/Makefile]) AC_OUTPUT