OSDN Git Service

90707825428284173ad4202084148180fa1cb9ab
[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
36 IMES=''
37
38 case "$with_canna" in
39 no) ;;
40 yes)
41         IMES="$IMES Canna"
42         CANNADICDIR='/var/lib/canna/dic/canna/'
43         cannaMk='Canna/Makefile'
44         ;;
45 *)
46         IMES="$IMES Canna"
47         CANNADICDIR="$with_canna"
48         cannaMk='Canna/Makefile'
49         ;;
50 esac
51
52 case "$with_wnn" in
53 no) ;;
54 yes)
55         IMES="$IMES Wnn"
56         WNNDICDIR='/usr/local/lib/wnn/ja_JP/dic/yubin/'
57         wnnMk='Wnn/Makefile'
58         ;;
59 *)
60         IMES="$IMES Wnn"
61         WNNDICDIR="$with_wnn"
62         wnnMk='Wnn/Makefile'
63         ;;
64 esac
65
66 AC_SUBST(IMES)
67 AC_SUBST(CANNADICDIR)
68 AC_SUBST(WNNDICDIR)
69
70 # Checks for programs.
71 AC_PROG_INSTALL
72 AC_PROG_MKDIR_P
73
74 if test "x$with_canna" != 'xno'
75 then
76         AC_CHECK_PROGS(MKBINDIC, [mkbindic], [])
77         if test "x$MKBINDIC" == 'x'
78         then
79                 AC_MSG_ERROR([could not find mkbindic.  Did you install Canna?])
80         fi
81 fi
82
83
84 if test "x$with_wnn" != 'xno'
85 then
86         AC_CHECK_PROGS(ATOD, [atod], [])
87         if test "x$ATOD" == 'x'
88         then
89                 AC_MSG_ERROR([could not find atod.  Did you install Wnn and set your PATH?  FreeWnn default, atod is installed /usr/local/bin/Wnn4/!])
90         fi
91 fi
92
93 # Checks for libraries.
94
95 # Checks for header files.
96
97 # Checks for typedefs, structures, and compiler characteristics.
98
99 # Checks for library functions.
100
101
102 AC_CONFIG_FILES([
103                  Makefile
104                  $cannaMk
105                  $wnnMk
106                  ])
107 AC_OUTPUT