| 1 | dnl -*-m4-*- |
| 2 | dnl |
| 3 | dnl $Id: configure.in,v 1.4 2003/11/29 23:38:37 mdw Exp $ |
| 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 | |
| 28 | dnl ----- Revision history -------------------------------------------------- |
| 29 | dnl |
| 30 | dnl $Log: configure.in,v $ |
| 31 | dnl Revision 1.4 2003/11/29 23:38:37 mdw |
| 32 | dnl Debianization. |
| 33 | dnl |
| 34 | dnl Revision 1.3 2002/08/11 12:59:00 mdw |
| 35 | dnl New Tcl/Tk interface; regular expression support. |
| 36 | dnl |
| 37 | dnl Revision 1.2 2001/02/06 10:06:25 mdw |
| 38 | dnl Find a suitable Java compiler. If there isn't one, don't compile the |
| 39 | dnl Java bits. |
| 40 | dnl |
| 41 | dnl Revision 1.1 2001/02/04 17:14:42 mdw |
| 42 | dnl Initial checkin |
| 43 | dnl |
| 44 | |
| 45 | AC_INIT(anag.c) |
| 46 | AM_INIT_AUTOMAKE(anag, 1.1.0) |
| 47 | AM_CONFIG_HEADER(config.h) |
| 48 | AC_PROG_CC |
| 49 | mdw_GCC_FLAGS |
| 50 | |
| 51 | AC_CHECK_PROGS([JAVAC], [jikes javac], [none]) |
| 52 | if test "$JAVAC" = "none"; then |
| 53 | AC_MSG_WARN([No Java compiler found]) |
| 54 | JARFILES="" |
| 55 | else |
| 56 | JARFILES="anag.jar" |
| 57 | fi |
| 58 | AC_SUBST([JARFILES]) |
| 59 | |
| 60 | AC_CHECK_PROGS([WISH], [wish wish8], [none]) |
| 61 | if test "$WISH" = "none"; then |
| 62 | AC_MSG_WARN([No Tcl/Tk interpreter found]) |
| 63 | TKPROGS="" |
| 64 | else |
| 65 | TKPROGS="anag-gui" |
| 66 | fi |
| 67 | AC_SUBST([TKPROGS]) |
| 68 | |
| 69 | EXTNODE="" |
| 70 | AC_CHECK_FUNCS([regcomp]) |
| 71 | mdw_CHECK_MANYLIBS([pcre_fullinfo], [pcre], [AC_DEFINE([HAVE_PCRE])]) |
| 72 | |
| 73 | AC_ARG_WITH(dictionary, |
| 74 | [ --with-dictionary=DICT set default word list to be DICT], |
| 75 | [DICTIONARY=$withval], |
| 76 | [DICTIONARY="/usr/dict/words"]) |
| 77 | AC_DEFINE_UNQUOTED([DICTIONARY], ["$DICTIONARY"]) |
| 78 | AC_SUBST([DICTIONARY]) |
| 79 | |
| 80 | mdw_DEFINE_PATHS([ |
| 81 | ANAG=mdw_PATH([${bindir}])/mdw_PROG([anag]) |
| 82 | ]) |
| 83 | |
| 84 | AC_SUBST([ANAG]) |
| 85 | AC_OUTPUT(Makefile anag-gui) |
| 86 | |
| 87 | dnl ----- That's all, folks ------------------------------------------------- |