chiark / gitweb /
build: Fix for newer Auto tools.
[anag] / configure.in
CommitLineData
d9af4a2b 1dnl -*-m4-*-
6e403221 2dnl
345f33ea 3dnl $Id: configure.in,v 1.6 2004/04/08 01:36:19 mdw Exp $
6e403221 4dnl
5dnl Configuration script
6dnl
7dnl (c) 2001 Mark Wooding
8dnl
9
10dnl ----- Licensing notice --------------------------------------------------
11dnl
12dnl This file is part of Anag: a simple wordgame helper.
13dnl
14dnl Anag is free software; you can redistribute it and/or modify
15dnl it under the terms of the GNU General Public License as published by
16dnl the Free Software Foundation; either version 2 of the License, or
17dnl (at your option) any later version.
18dnl
19dnl Anag is distributed in the hope that it will be useful,
20dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22dnl GNU General Public License for more details.
23dnl
24dnl You should have received a copy of the GNU General Public License
25dnl along with Anag; if not, write to the Free Software Foundation,
26dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
6e403221 28AC_INIT(anag.c)
50959b4c 29AM_INIT_AUTOMAKE(anag, 1.1.0)
6e403221 30AM_CONFIG_HEADER(config.h)
31AC_PROG_CC
32mdw_GCC_FLAGS
d9af4a2b 33
fd2edfa6 34AC_CHECK_PROGS([JAVAC], [javac jikes], [none])
0484a0d9 35if test "$JAVAC" = "none"; then
36 AC_MSG_WARN([No Java compiler found])
50959b4c 37 JARFILES=""
38else
39 JARFILES="anag.jar"
40fi
d9af4a2b 41AC_SUBST([JARFILES])
42
50959b4c 43AC_CHECK_PROGS([WISH], [wish wish8], [none])
44if test "$WISH" = "none"; then
45 AC_MSG_WARN([No Tcl/Tk interpreter found])
46 TKPROGS=""
0484a0d9 47else
50959b4c 48 TKPROGS="anag-gui"
0484a0d9 49fi
d9af4a2b 50AC_SUBST([TKPROGS])
51
50959b4c 52EXTNODE=""
53AC_CHECK_FUNCS([regcomp])
cdb48095
MW
54mdw_CHECK_MANYLIBS([pcre_fullinfo], [pcre],
55 [AC_DEFINE([HAVE_PCRE], [1],
56 [Define if you have libpcre lying around somewhere.])])
d9af4a2b 57
6e403221 58AC_ARG_WITH(dictionary,
59[ --with-dictionary=DICT set default word list to be DICT],
50959b4c 60[DICTIONARY=$withval],
cdb48095
MW
61[AC_CACHE_CHECK([dictionary], [mdw_cv_dictionary],
62 [for mdw_cv_dictionary in \
63 /usr/share/dict/words \
64 /usr/dict/words; do
65 test -r "$i" && break
66 done])
67 DICTIONARY=$mdw_cv_dictionary])
68AC_DEFINE_UNQUOTED([DICTIONARY], ["$DICTIONARY"],
69 [Define this to be your default wordlist location.])
50959b4c 70AC_SUBST([DICTIONARY])
d9af4a2b 71
50959b4c 72mdw_DEFINE_PATHS([
73 ANAG=mdw_PATH([${bindir}])/mdw_PROG([anag])
74])
d9af4a2b 75
50959b4c 76AC_SUBST([ANAG])
77AC_OUTPUT(Makefile anag-gui)
6e403221 78
79dnl ----- That's all, folks -------------------------------------------------