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