OSDN Git Service

update version to 0.3.1.20180131.0
[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.1.20180131.0],
23 [canna-yubin-misc@lists.osdn.me])
24 AM_INIT_AUTOMAKE
25
26 # Checks for options.
27
28 AC_ARG_WITH([canna],
29 [--with-canna   build Canna dictionary [[default=/var/lib/canna/dic/canna/]]],
30 [], [with_canna=yes])
31 AC_ARG_WITH([wnn], [--with-wnn  build Wnn dictionary [[default=no]]], [],
32 [with_wnn=no])
33
34 case "x$with_canna" in
35 'xno') ;;
36 'xyes') CANNADICDIR='/var/lib/canna/dic/canna/' ;;
37 *) CANNADICDIR="$with_canna" ;;
38 esac
39 case "x$CANNADICDIR" in
40 'x') ;;
41 *) CANNATARGETS='yubin7.cbd yubin7.cld' ;;
42 esac
43
44 case "x$with_wnn" in
45 'xno') ;;
46 'xyes') WNNDICDIR='/usr/local/lib/wnn/ja_JP/dic/yubin/' ;;
47 *) WNNDICDIR="$with_wnn" ;;
48 esac
49 case "x$WNNDICDIR" in
50 'x') ;;
51 *) WNNTARGETS='yubin7.dic';;
52 esac
53
54 # Checks for programs.
55
56 AC_PROG_INSTALL
57 AC_PROG_MKDIR_P
58
59 case "x$CANNADICDIR" in
60 'x') ;;
61 x*)
62         AC_CHECK_PROGS(MKBINDIC, [mkbindic], [])
63         case "x$MKBINDIC" in
64         'x') AC_MSG_ERROR([could not find mkbindic.  Did you install Canna?]) ;;
65         esac
66         ;;
67 esac
68
69 case "x$WNNDICDIR" in
70 'x') ;;
71 x*)
72         AC_CHECK_PROGS(ATOD, [atod], [])
73         case "x$ATOD" in
74         'x') 
75                 AC_MSG_ERROR([could not find atod.  Did you install Wnn and set your PATH?  FreeWnn default, atod is installed /usr/local/bin/Wnn4/!])
76                 ;;
77         esac
78         ;;
79 esac
80
81 AC_SUBST(CANNATARGETS)
82 AC_SUBST(WNNTARGETS)
83 AC_SUBST(CANNADICDIR)
84 AC_SUBST(WNNDICDIR)
85
86 # Checks for libraries.
87
88 # Checks for header files.
89
90 # Checks for typedefs, structures, and compiler characteristics.
91
92 # Checks for library functions.
93
94 AC_CONFIG_FILES([Makefile])
95 AC_OUTPUT