OSDN Git Service

a7395d5bc5f877a0d40a4384d368940fea0e3625
[canna-yubin/canna-yubin.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Copyright (C) 2015 Mitsutoshi NAKANO <bkbin005@rinku.zaq.ne.jp>
3 #
4 # This program is free software; you can redistribute it and/or modify it 
5 # under the terms of the GNU General Public License as published 
6 # by the Free Software Foundation; either version 2 of the License,
7 # or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty
11 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 # See the GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program;
16 # if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19 # Process this file with autoconf to produce a configure script.
20
21 AC_PREREQ([2.69])
22 AC_INIT([canna-yubin], [0.3.0.20141226.0],
23 [canna-yubin-misc@lists.sourceforge.jp])
24 AM_INIT_AUTOMAKE
25
26 #
27
28 AC_ARG_WITH([canna],
29 [--with-canna   build Canna dictionary [[default=/var/lib/canna/dic/canna/]]],
30 [], [with_canna=yes])
31
32 AC_ARG_WITH([wnn], [--with-wnn  build Wnn dictionary [[default=no]]], [],
33 [with_wnn=no])
34
35 case "x$with_canna" in
36 'xno') ;;
37 'xyes') CANNADICDIR='/var/lib/canna/dic/canna/' ;;
38 *) CANNADICDIR="$with_canna" ;;
39 esac
40
41 case "x$with_wnn" in
42 'xno') ;;
43 'xyes') WNNDICDIR='/usr/local/lib/wnn/ja_JP/dic/yubin/' ;;
44 *) WNNDICDIR="$with_wnn" ;;
45 esac
46
47 AC_SUBST(IMES)
48 AC_SUBST(CANNADICDIR)
49 AC_SUBST(WNNDICDIR)
50
51 # Checks for programs.
52 AC_PROG_INSTALL
53 AC_PROG_MKDIR_P
54
55 case "x$with_canna" in
56 'xno') ;;
57 x*)
58         AC_CHECK_PROGS(MKBINDIC, [mkbindic], [])
59         case "x$MKBINDIC" in
60         'x') AC_MSG_ERROR([could not find mkbindic.  Did you install Canna?]) ;;
61         esac
62         ;;
63 esac
64
65 case "x$with_wnn" in
66 'xno') ;;
67 x*)
68         AC_CHECK_PROGS(ATOD, [atod], [])
69         case "x$ATOD" in
70         'x') 
71                 AC_MSG_ERROR([could not find atod.  Did you install Wnn and set your PATH?  FreeWnn default, atod is installed /usr/local/bin/Wnn4/!])
72                 ;;
73         esac
74         ;;
75 esac
76
77 # Checks for libraries.
78
79 # Checks for header files.
80
81 # Checks for typedefs, structures, and compiler characteristics.
82
83 # Checks for library functions.
84
85
86 AC_CONFIG_FILES([
87                  Makefile
88                  Canna/Makefile
89                  Wnn/Makefile
90                  ])
91 AC_OUTPUT