X-Git-Url: https://git.distorted.org.uk/~mdw/anag/blobdiff_plain/cdb480951031f64f4785da1787b16fe235b76f13..0279756ef8eb60878927c9e325a9ad25a4b0f150:/configure.ac?ds=sidebyside diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f1cac47 --- /dev/null +++ b/configure.ac @@ -0,0 +1,86 @@ +dnl -*-autoconf-*- +dnl +dnl Configuration script for `anag' +dnl +dnl (c) 2016 Mark Wooding +dnl + +dnl----- Licensing notice --------------------------------------------------- +dnl +dnl This file is part of Anag: a simple wordgame helper. +dnl +dnl Anag is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl Anag is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with Anag; if not, write to the Free Software Foundation, +dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +dnl-------------------------------------------------------------------------- +dnl Initialization. + +mdw_AUTO_VERSION +AC_INIT([anag], AUTO_VERSION, [mdw@distorted.org.uk]) +AC_CONFIG_SRCDIR([anag.c]) +AC_CONFIG_AUX_DIR([config]) +AM_INIT_AUTOMAKE([foreign]) +mdw_SILENT_RULES + +AC_PROG_CC +AX_CFLAGS_WARN_ALL + +dnl-------------------------------------------------------------------------- +dnl C programming environment. + +AC_CHECK_FUNCS([regcomp]) + +AC_SEARCH_LIBS([pcre_fullinfo], [pcre], + [AC_DEFINE([HAVE_PCRE], [1], [Define if you have libpcre available.])]) + +dnl-------------------------------------------------------------------------- +dnl Java. + +AC_CHECK_PROGS([JAVAC], [javac jikes], [none]) +if test "$JAVAC" = "none"; then AC_MSG_WARN([No Java compiler found]); fi +AM_CONDITIONAL([HAVE_JAVAC], [test "$JAVAC" != "none"]) + +dnl-------------------------------------------------------------------------- +dnl Tcl/Tk. + +AC_PATH_PROGS([WISH], [wish wish8 wish8.5 wish8.4], [none]) +if test "$WISH" = "none"; then AC_MSG_WARN([No Tcl/Tk interpreter found]); fi +AM_CONDITIONAL([HAVE_WISH], [test "$WISH" != "none"]) + +dnl-------------------------------------------------------------------------- +dnl Other configuration. + +AC_ARG_WITH(dictionary, +[ --with-dictionary=DICT set default word list to be DICT], +[DICTIONARY=$withval], +[AC_CACHE_CHECK([dictionary], [mdw_cv_dictionary], + [for mdw_cv_dictionary in \ + /usr/share/dict/words \ + /usr/dict/words; do + if test -r "$mdw_cv_dictionary"; then break; fi + done]) + DICTIONARY=$mdw_cv_dictionary]) + +AC_DEFINE_UNQUOTED([DICTIONARY], ["$DICTIONARY"], + [Define this to be your default wordlist location.]) +AC_SUBST([DICTIONARY]) + +dnl-------------------------------------------------------------------------- +dnl Produce output. + +AC_CONFIG_HEADER([config/config.h]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT + +dnl----- That's all, folks --------------------------------------------------