forked from emacsattic/sdic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
189 lines (162 loc) · 4.65 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#
# $Id$
#
AC_INIT(lisp/stem.el)
AM_INIT_AUTOMAKE(sdic, 2.1.3)
AM_PATH_LISPDIR
AC_PATH_PROG(NKF, nkf, no)
if test "$NKF" = "no"; then
AC_MSG_WARN(nkf not found)
fi
AC_PATH_PROG(PERL, perl, no)
if test "$PERL" = "no"; then
AC_MSG_WARN(perl not found)
fi
AC_PATH_PROG(GZIP, gzip, no)
if test "$GZIP" = "no"; then
AC_MSG_WARN(gzip not found)
fi
AC_PATH_PROG(BZIP2, bzip2, no)
if test "$BZIP2" = "no"; then
AC_MSG_WARN(bzip2 not found)
fi
AC_PATH_PROG(CP, cp, no)
if test "$CP" = "no"; then
AC_MSG_WARN(cp not found)
fi
AC_PATH_PROG(SORT, sort, no)
if test "$SORT" = "no"; then
AC_MSG_WARN(sort not found)
fi
DICTDIR=/usr/local/share/dict
AC_ARG_WITH(
dictdir,
[ --with-dictdir=DIR dictionary files go to DIR [/usr/local/share/dict]],
DICTDIR=$with_dictdir,
)
AC_SUBST(DICTDIR)
DICTTYPE=sdic
AC_ARG_WITH(
dicttype,
[ --with-dicttype=TYPE use TYPE of dictionaries (sdic|compat) [sdic]],
[case "${withval}" in
dic|sdic) DICTTYPE=${withval} ;;
compat) DICTTYPE=dic ;;
*) AC_MSG_ERROR([Unknown dictionary type is specified.]) ;;
esac],
)
EIJIROU_DIR="./eijirou"
AC_ARG_WITH(
eijirou,
[ --with-eijirou=DIR eijirou files are in DIR [./eijirou]],
EIJIROU_DIR=$with_eijirou,
)
AC_SUBST(EIJIROU_DIR)
WAEIJIROU_DIR="./waeijirou"
AC_ARG_WITH(
waeijirou,
[ --with-waeijirou=DIR waeijirou files are in DIR [./waeijirou]],
WAEIJIROU_DIR=$with_waeijirou,
)
AC_SUBST(WAEIJIROU_DIR)
MULTI_DICT="no"
AC_ARG_WITH(
multidict,
[ --with-multidict(=ARG) use multiple dictionaries (yes|no) [no]],
[case "${withval}" in
yes|no) MULTI_DICT=$withval ;;
*) AC_MSG_ERROR([Illegal value is specified.]) ;;
esac],
)
AC_SUBST(MULTI_DICT)
EIWA_DICT=""
AC_MSG_CHECKING(for EIWA Dictionary)
for dict in gene.sdic eedict.sdic eijirou.sdic \
gene.dic eedict.dic eijirou.dic \
e4jwords.sdic ecompdic.sdic eenamdict.sdic \
e4jwords.dic ecompdic.dic eenamdict.dic ; do
if test -f "$DICTDIR/$dict"; then
EIWA_DICT="$EIWA_DICT $dict"
EIWA_DICT_LIST="$EIWA_DICT_LIST $DICTDIR/$dict"
test "$MULTI_DICT" = "no" && break
fi
done
if test -n "$EIWA_DICT"; then
AC_MSG_RESULT($EIWA_DICT_LIST (already installed))
else
if test -f gene95.lzh -o -f gene95.tar.gz -o -f gene95.tar.bz2; then
if test -z "$EIWA_DICT" -o "$MULTI_DICT" = "yes"; then
NAME="gene.$DICTTYPE"
EIWA_DICT="$EIWA_DICT $NAME"
EIWA_DICT_LIST="$EIWA_DICT_LIST $DICTDIR/$NAME"
fi
fi
if test -d "$EIJIROU_DIR"; then
if test -z "$EIWA_DICT" -o "$MULTI_DICT" = "yes"; then
NAME="eijirou.$DICTTYPE"
EIWA_DICT="$EIWA_DICT $NAME"
EIWA_DICT_LIST="$EIWA_DICT_LIST $DICTDIR/$NAME"
fi
fi
for dict in edict 4jwords compdic enamdict; do
if test -f $dict.gz -o -f $dict.bz2; then
if test -z "$EIWA_DICT" -o "$MULTI_DICT" = "yes"; then
if test -z "$EIWA_DICT" -o "$MULTI_DICT" = "yes"; then
NAME="e$dict.$DICTTYPE"
EIWA_DICT="$EIWA_DICT $NAME"
EIWA_DICT_LIST="$EIWA_DICT_LIST $DICTDIR/$NAME"
fi
fi
fi
done
AC_MSG_RESULT($EIWA_DICT)
fi
EIWA_DICT_LIST='"'`echo "$EIWA_DICT_LIST" | sed 's/^ //;s/ /" "/g'`'"'
AC_SUBST(EIWA_DICT)
AC_SUBST(EIWA_DICT_LIST)
AC_MSG_CHECKING(for WAEI Dictionary)
WAEI_DICT=""
for dict in jedict.sdic jgene.sdic waeijirou.sdic \
jedict.dic jgene.dic waeijirou.dic \
j4jwords.sdic jcompdic.sdic jenamdict.sdic \
j4jwords.dic jcompdic.dic jenamdict.dic ; do
if test -f "$DICTDIR/$dict"; then
WAEI_DICT="$WAEI_DICT $dict"
WAEI_DICT_LIST="$WAEI_DICT_LIST $DICTDIR/$dict"
test "$MULTI_DICT" = "no" && break
fi
done
if test -n "$WAEI_DICT"; then
AC_MSG_RESULT($WAEI_DICT_LIST (already installed))
else
for dict in edict 4jwords compdic enamdict; do
if test -f $dict.gz -o -f $dict.bz2; then
if test -z "$WAEI_DICT" -o "$MULTI_DICT" = "yes"; then
if test -z "$WAEI_DICT" -o "$MULTI_DICT" = "yes"; then
NAME="j$dict.$DICTTYPE"
WAEI_DICT="$WAEI_DICT $NAME"
WAEI_DICT_LIST="$WAEI_DICT_LIST $DICTDIR/$NAME"
fi
fi
fi
done
if test -f gene95.lzh -o -f gene95.tar.gz -o -f gene95.tar.bz2; then
if test -z "$WAEI_DICT" -o "$MULTI_DICT" = "yes"; then
NAME="jgene.$DICTTYPE"
WAEI_DICT="$WAEI_DICT $NAME"
WAEI_DICT_LIST="$WAEI_DICT_LIST $DICTDIR/$NAME"
fi
fi
if test -d "$WAEIJIROU_DIR"; then
if test -z "$WAEI_DICT" -o "$MULTI_DICT" = "yes"; then
NAME="waeijirou.$DICTTYPE"
WAEI_DICT="$WAEI_DICT $NAME"
WAEI_DICT_LIST="$WAEI_DICT_LIST $DICTDIR/$NAME"
fi
fi
AC_MSG_RESULT($WAEI_DICT)
fi
WAEI_DICT_LIST='"'`echo "$WAEI_DICT_LIST" | sed 's/^ //;s/ /" "/g'`'"'
AC_SUBST(WAEI_DICT)
AC_SUBST(WAEI_DICT_LIST)
AC_OUTPUT(Makefile lisp/Makefile lisp/sdic.el lisp/sample.emacs install.el)