Develop and Download Open Source Software

Browse CVS Repository

Contents of /freewnn/FreeWnn/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.16 - (show annotations) (download)
Tue Aug 14 13:43:20 2001 UTC (22 years, 8 months ago) by hiroo
Branch: MAIN
Changes since 1.15: +44 -62 lines
IPv6+CPP patch [freewnn:00673] Katsuomi Hamajima, Tomoki Aono
beos patch for configure.in [freewnn:00677] Hiroaki Abe
libtoolized by libtool-1.4

1 dnl
2 dnl $Id: configure.in,v 1.15 2001/06/18 09:09:20 ura Exp $
3 dnl
4
5 dnl
6 dnl FreeWnn is a network-extensible Kana-to-Kanji conversion system.
7 dnl This file is part of FreeWnn.
8 dnl
9 dnl Copyright Kyoto University Research Institute for Mathematical Sciences
10 dnl 1987, 1988, 1989, 1990, 1991, 1992
11 dnl Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
12 dnl Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
13 dnl Copyright FreeWnn Project 1999, 2000, 2001
14 dnl
15 dnl Maintainer: FreeWnn Project <freewnn@tomo.gr.jp>
16 dnl
17 dnl This program is free software; you can redistribute it and/or modify
18 dnl it under the terms of the GNU General Public License as published by
19 dnl the Free Software Foundation; either version 2 of the License, or
20 dnl (at your option) any later version.
21 dnl
22 dnl This program is distributed in the hope that it will be useful,
23 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
24 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 dnl GNU General Public License for more details.
26 dnl
27 dnl You should have received a copy of the GNU General Public License
28 dnl along with this program; if not, write to the Free Software
29 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 dnl
31
32 dnl
33 dnl Process this file with autoconf to produce a configure script.
34 dnl
35 AC_INIT(Wnn/conv/cvt_head.h)
36 AC_CONFIG_HEADER(config.h)
37
38 dnl
39 dnl srcdir ������������������������������������������������������������
40 dnl ���������� Makefile.in ��������������������������������������������
41 dnl ��������������
42 dnl
43 case "$top_srcdir" in
44 .) abs_top_srcdir=`pwd` ;;
45 /*) abs_top_srcdir=top_srcdir;;
46 *) # Relative path.
47 abs_top_srcdir=`pwd`$ac_dots$ac_given_srcdir ;;
48 esac
49 AC_SUBST(abs_top_srcdir)
50
51 dnl ====================================================================
52 dnl Check optional features
53 dnl ====================================================================
54
55 AC_CANONICAL_HOST
56 dnl AM_PROG_LIBTOOL
57
58 AC_ARG_ENABLE(sharedlib,
59 [ --enable-sharedlib build shared library using GNU libtool],
60 [if test "$enableval" = yes
61 then
62 use_sharedlib=yes
63 else
64 use_sharedlib=no
65 fi], [use_sharedlib=default])
66
67
68 dnl build and install libraries or server
69
70 AC_ARG_ENABLE(libraries,
71 [ --enable-libraries build and install libraries [default=yes]],
72 [case "${enableval}" in
73 yes) libraries=true ;;
74 no) libraries=false ;;
75 *) AC_MSG_ERROR(bad value for --enable-libraries) ;;
76 esac], libraries=true)
77
78 AC_ARG_ENABLE(server,
79 [ --enable-server build and install server [default=yes]],
80 [case "${enableval}" in
81 yes) server=true ;;
82 no) server=false ;;
83 *) AC_MSG_ERROR(bad value for --enable-server) ;;
84 esac], server=true)
85
86
87 if test $libraries = true; then
88 SUBDIRS="\$(LIB_SUBDIRS)"
89 WNNMANDIR="\$(LIB_WNNMANDIR)"
90 fi
91 if test $server = true; then
92 SUBDIRS="$SUBDIRS \$(SERVER_SUBDIRS)"
93 WNNMANDIR="$WNNMANDIR \$(SERVER_WNNMANDIR)"
94 fi
95
96 AC_SUBST(SUBDIRS)
97 AC_SUBST(WNNMANDIR)
98
99 dnl For Severs
100
101 AC_ARG_ENABLE(Wnn,
102 [ --enable-Wnn build and install Wnn [default=true]],
103 [case "${enableval}" in
104 yes) Wnn="Wnn";;
105 no) Wnn="" ;;
106 *) AC_MSG_ERROR(bad value for --enable-Wnn) ;;
107 esac], Wnn="Wnn")
108 AC_SUBST(Wnn)
109
110 if test "$server" = true -a "$Wnn" = Wnn; then
111 # JSERVER_SUBDIRS1="\$(JSERVER_SUBDIRS1)"
112 JSERVER_SUBDIRS2="\$(JSERVER_SUBDIRS2)"
113 else
114 # JSERVER_SUBDIRS1=""
115 JSERVER_SUBDIRS2=""
116 fi
117 dnl AC_SUBST(JSERVER_SUBDIRS1)
118 AC_SUBST(JSERVER_SUBDIRS2)
119
120 AC_ARG_ENABLE(cWnn,
121 [ --enable-cWnn build and install cWnn [default=true]],
122 [case "${enableval}" in
123 yes) cWnn="cWnn" ;;
124 no) cWnn="" ;;
125 *) AC_MSG_ERROR(bad value for --enable-cWnn) ;;
126 esac], cWnn="cWnn")
127 AC_SUBST(cWnn)
128
129 AC_ARG_ENABLE(kWnn,
130 [ --enable-kWnn build and install kWnn [default=true]],
131 [case "${enableval}" in
132 yes) kWnn="kWnn" ;;
133 no) kWnn="" ;;
134 *) AC_MSG_ERROR(bad value for --enable-kWnn) ;;
135 esac], kWnn="kWnn")
136 AC_SUBST(kWnn)
137
138 dnl For a library libwnn
139
140 dnl AC_ARG_WITH(libwnn,
141 dnl [ --with-libwnn use installed Wnn library [default=no]],
142 dnl [case "${withval}" in
143 dnl yes|no) with_libwnn=${withval};;
144 dnl *) AC_MSG_ERROR(invalid argument to --with-libwnn) ;;
145 dnl esac], with_libwnn=no)
146 dnl
147
148 AC_ARG_WITH(libwnn,
149 [ --with-libwnn use installed Wnn library [default=no]],
150 [ with_libwnn="${withval}"
151 AC_ARG_WITH(wnn-includes,
152 [ --with-wnn-includes=DIR WNN include files are in DIR],
153 [wnnincludedir="-I${withval}"], [wnnincludedir=''])
154 AC_ARG_WITH(wnn-libraries,
155 [ --with-wnn-libraries=DIR Search for WNN libraries in DIR[default=/usr/local/lib]],
156 [wnnlibdir="${withval}"], [wnnlibdir='/usr/local/lib'])
157 if test "X${with_libwnn}" = X-lwnn; then
158 WNNJLIB="-L${wnnlibdir} -lwnn"
159 elif test X"`echo ${with_libwnn} | grep '^/.*'`" != X ; then
160 WNNJLIB="${with_libwnn}"
161 else
162 WNNJLIB="${wnnlibdir}/libwnn.a"
163 fi
164 DEPWNNJLIB=""
165 HINSI_DATA="\$(JWNNWNNDIR)/hinsi.data"
166 ],
167 [ WNNJLIB="\$(WNNJLIBSRC)/libwnn.la"
168 DEPWNNJLIB="\$(WNNJLIB)"
169 HINSI_DATA="\$(WNNJDSRC)/hinsi.data"
170 ])
171 AC_SUBST(WNNJLIB)
172 AC_SUBST(DEPWNNJLIB)
173 AC_SUBST(HINSI_DATA)
174
175 AC_ARG_WITH(libcwnn,
176 [ --with-libcwnn use installed cWnn library [default=no]],
177 [
178 AC_ARG_WITH(cwnn-includes,
179 [ --with-cwnn-includes=DIR CWNN include files are in DIR],
180 [cwnnincludedir="-I${withval}"], [cwnnincludedir=''])
181 AC_ARG_WITH(cwnn-libraries,
182 [ --with-cwnn-libraries=DIR Search for CWNN libraries in DIR[default=/usr/local/lib]],
183 [cwnnlibdir="${withval}"], [cwnnlibdir='/usr/local/lib'])
184 if test "X${with_libcwnn}" = X-lcwnn; then
185 CWNNJLIB="-L${cwnnlibdir} -lcwnn"
186 elif test X"`echo ${with_libcwnn} | grep '^/.*'`" != X ; then
187 CWNNJLIB="${with_libcwnn}"
188 else
189 CWNNJLIB="${cwnnlibdir}/libcwnn.a"
190 fi
191 DEPCWNNJLIB=""
192 CHINSI_DATA="\$(CWNNWNNDIR)/cixing.data"
193 THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
194 ],
195 [ CWNNJLIB="\$(CWNNJLIBSRC)/libcwnn.la"
196 DEPCWNNJLIB="\$(CWNNJLIB)"
197 CHINSI_DATA="\$(CWNNCDSRC)/cixing.data"
198 THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
199 ])
200 AC_SUBST(CWNNJLIB)
201 AC_SUBST(DEPCWNNJLIB)
202 AC_SUBST(CHINSI_DATA)
203 AC_SUBST(THINSI_DATA)
204
205 AC_ARG_WITH(libkwnn,
206 [ --with-libkwnn use installed kWnn library [default=no]],
207 [
208 AC_ARG_WITH(kwnn-includes,
209 [ --with-kwnn-includes=DIR KWNN include files are in DIR],
210 [kwnnincludedir="-I${withval}"], [kwnnincludedir=''])
211 AC_ARG_WITH(kwnn-libraries,
212 [ --with-kwnn-libraries=DIR Search for KWNN libraries in DIR[default=/usr/local/lib]],
213 [kwnnlibdir="${withval}"], [kwnnlibdir='/usr/local/lib'])
214 if test "X${with_libkwnn}" = X-lkwnn; then
215 KWNNJLIB="-L${kwnnlibdir} -lkwnn"
216 elif test X"`echo ${with_libkwnn} | grep '^/.*'`" != X ; then
217 KWNNJLIB="${with_libkwnn}"
218 else
219 KWNNJLIB="${kwnnlibdir}/libkwnn.a"
220 fi
221 DEPKWNNJLIB=""
222 KHINSI_DATA="\$(KWNNWNNDIR)/hinsi.data"
223 ],
224 [ KWNNJLIB="\$(KWNNJLIBSRC)/libkwnn.la"
225 DEPKWNNJLIB="\$(KWNNJLIB)"
226 KHINSI_DATA="\$(KWNNKDSRC)/hinsi.data"
227 ])
228 AC_SUBST(KWNNJLIB)
229 AC_SUBST(DEPKWNNJLIB)
230 AC_SUBST(KHINSI_DATA)
231
232 AC_ARG_ENABLE(inet6,
233 [ --enable-inet6 build and install inet6 [default=false]],
234 [case "${enableval}" in
235 yes) inet6="-DINET6";;
236 no) inet6="" ;;
237 *) AC_MSG_ERROR(bad value for --enable-inet6) ;;
238 esac], inet6="")
239 AC_SUBST(inet6)
240
241 dnl
242 dnl Checks for cc and cpp.
243 dnl
244 AC_PROG_CC
245
246 dnl Use environment variable (if set). It will be overridden
247 dnl in supported system though...
248 # CCOPTIONS=""
249 CDEBUGFLAGS=${CDEBUGFLAGS:-"-O"}
250 case $host in
251 *-*-linux*)
252 CCOPTIONS="-Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE"
253 CDEBUGFLAGS="-O2 -fno-strength-reduce"
254 ;;
255 *-*-freebsd*|*-*-netbsd*|*-*-openbsd*)
256 CCOPTIONS="-DCSRG_BASED"
257 CDEBUGFLAGS="-O2 -fno-strength-reduce"
258 ;;
259 *-*-bsdi*)
260 CCOPTIONS="-DCSRG_BASED"
261 CDEBUGFLAGS="-O2 -fno-strength-reduce"
262 ;;
263 *-*-sunos*)
264 if test $CC = gcc; then
265 CDEBUGFLAGS=-O2
266 CCOPTIONS="-Dsun -Dsparc"
267 else
268 CDEBUGFLAGS=-O4
269 CCOPTIONS=""
270 fi
271 ;;
272 *-*-solaris2.*)
273 # Will 'solaris*' be OK?
274 if test $CC = gcc; then
275 CDEBUGFLAGS=-O2
276 CCOPTIONS="-Dsun -D`uname -p` -DSVR4 -DSYSV"
277 else
278 CCOPTIONS="-Xc -xF -xcg92 -Dsun -D`uname -p` -DSVR4 -DSYSV"
279 fi
280 ;;
281 *-*-hpux*)
282 if test $CC = gcc; then
283 CDEBUGFLAGS=-O2
284 CCOPTIONS="-Dhpux -DSYSV"
285 else
286 CCOPTIONS="-Ae -Dhpux -DSYSV"
287 fi
288 ;;
289 i[[34567]]86-pc-beos*)
290 CCOPTIONS="-DBEOS -D_POSIX_SOURCE -D_BSD_SOURCE"
291 CDEBUGFLAGS="-O2 -fno-strength-reduce"
292 ;;
293 powerpc-*-beos*)
294 CCOPTIONS="-DBEOS -D_POSIX_SOURCE -D_BSD_SOURCE"
295 ;;
296 *-*-aix*)
297 if test $CC = gcc; then
298 CDEBUGFLAGS=-O2
299 else
300 CDEBUGFLAGS=-O
301 fi
302 CCOPTIONS="-DSYSV"
303 ;;
304 *)
305 AC_MSG_WARN("It is not reported if FreeWnn works on this system. But continuing...")
306 AC_MSG_WARN([(It may or may not work if you set CCOPTIONS properly.)])
307 ;;
308 esac
309
310 echo "Set CDEBUGFLAGS and CCOPTIONS to following:"
311 echo ' CDEBUGFLAGS="'"$CDEBUGFLAGS"'"'
312 echo ' CCOPTIONS="'"$CCOPTIONS"'"'
313
314 dnl ��������������������������������configure������������CPP������������
315 dnl ������������������������������������CPP������������������������
316 dnl ��CPP=${CPP:-"/usr/ccs/lib/cpp"}������������������������������������
317 dnl ����������������
318 AC_PROG_CPP
319
320 dnl
321 dnl Checks for programs.
322 dnl
323 dnl ### AC_PROG_YACC
324 dnl ### AC_PROG_LEX
325 AC_PROG_INSTALL
326 AC_PROG_LN_S
327 AC_PROG_MAKE_SET
328 AC_PROG_LIBTOOL
329 AC_SUBST(LIBTOOL_DEPS)
330 AC_SUBST(CCOPTIONS)
331 AC_SUBST(CDEBUGFLAGS)
332
333 dnl Checks for libraries.
334 dnl ### dnl Replace `main' with a function in -lFS:
335 dnl ### AC_CHECK_LIB(FS, main)
336 dnl ### dnl Replace `main' with a function in -lFresco:
337 dnl ### AC_CHECK_LIB(Fresco, main)
338 dnl ### dnl Replace `main' with a function in -lICE:
339 dnl ### AC_CHECK_LIB(ICE, main)
340 dnl ### dnl Replace `main' with a function in -lPEX5:
341 dnl ### AC_CHECK_LIB(PEX5, main)
342 dnl ### dnl Replace `main' with a function in -lSM:
343 dnl ### AC_CHECK_LIB(SM, main)
344 dnl ### dnl Replace `main' with a function in -lX11:
345 dnl ### AC_CHECK_LIB(X11, main)
346 dnl ### dnl Replace `main' with a function in -lXIE:
347 dnl ### AC_CHECK_LIB(XIE, main)
348 dnl ### dnl Replace `main' with a function in -lXau:
349 dnl ### AC_CHECK_LIB(Xau, main)
350 dnl ### dnl Replace `main' with a function in -lXaw:
351 dnl ### AC_CHECK_LIB(Xaw, main)
352 dnl ### dnl Replace `main' with a function in -lXbsd:
353 dnl ### AC_CHECK_LIB(Xbsd, main)
354 dnl ### dnl Replace `main' with a function in -lXdmcp:
355 dnl ### AC_CHECK_LIB(Xdmcp, main)
356 dnl ### dnl Replace `main' with a function in -lXext:
357 dnl ### AC_CHECK_LIB(Xext, main)
358 dnl ### dnl Replace `main' with a function in -lXi:
359 dnl ### AC_CHECK_LIB(Xi, main)
360 dnl ### dnl Replace `main' with a function in -lXmu:
361 dnl ### AC_CHECK_LIB(Xmu, main)
362 dnl ### dnl Replace `main' with a function in -lXt:
363 dnl ### AC_CHECK_LIB(Xt, main)
364 dnl ### dnl Replace `main' with a function in -lXtf:
365 dnl ### AC_CHECK_LIB(Xtf, main)
366 dnl ### dnl Replace `main' with a function in -lXtst:
367 dnl ### AC_CHECK_LIB(Xtst, main)
368 dnl ### dnl Replace `main' with a function in -lcurses:
369 dnl ### AC_CHECK_LIB(curses, main)
370 dnl ### dnl Replace `main' with a function in -lfl:
371 dnl ### AC_CHECK_LIB(fl, main)
372 dnl ### dnl Replace `main' with a function in -lfont:
373 dnl ### AC_CHECK_LIB(font, main)
374 dnl ### dnl Replace `main' with a function in -loldX:
375 dnl ### AC_CHECK_LIB(oldX, main)
376 dnl ### dnl Replace `main' with a function in -lphigs:
377 dnl ### AC_CHECK_LIB(phigs, main)
378 dnl ### dnl Replace `main' with a function in -lxpg4:
379 dnl ### AC_CHECK_LIB(xpg4, main)
380
381 AC_CHECK_LIB(crypt, crypt)
382 AC_CHECK_LIB(socket, connect)
383 AC_CHECK_LIB(nsl, gethostbyname)
384
385 dnl
386 dnl Checks for header files.
387 dnl
388 AC_PATH_X
389 AC_HEADER_STDC
390 AC_HEADER_SYS_WAIT
391 AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sgtty.h strings.h termio.h unistd.h)
392 AC_CHECK_HEADERS(sys/file.h sys/ioctl.h sys/time.h sys/types.h sys/param.h)
393
394 dnl
395 dnl Checks for typedefs, structures, and compiler characteristics.
396 dnl
397 AC_TYPE_MODE_T
398 AC_HEADER_TIME
399 AC_CHECK_TYPE(time_t, long)
400
401 dnl
402 dnl socklen_t �� sys/socket.h �� bits/socket.h ����������������������
403 dnl AC_CHECK_TYPE ����������������
404 dnl
405 AC_MSG_CHECKING(for socklen_t)
406 AC_EGREP_CPP(socklen_t, [#include <sys/socket.h>], AC_MSG_RESULT(yes),
407 [
408 AC_DEFINE(socklen_t, int)
409 AC_MSG_RESULT(no)
410 ])
411
412 dnl
413 dnl Checks for symbol
414 dnl
415
416 AC_MSG_CHECKING(for RAND_MAX)
417 AC_EGREP_CPP(yes,
418 [#include <stdlib.h>
419 #ifdef RAND_MAX
420 yes
421 #endif
422 ],AC_DEFINE(HAVE_RAND_MAX))
423
424 dnl
425 dnl Checks for library functions.
426 dnl
427 AC_PROG_GCC_TRADITIONAL
428 AC_FUNC_MEMCMP
429 AC_TYPE_SIGNAL
430 AC_FUNC_WAIT3
431 AC_CHECK_FUNCS(gethostname mkdir select socket strtol)
432 AC_CHECK_FUNCS(drand48)
433 AC_CHECK_FUNCS(perror)
434 AC_CHECK_FUNCS(closesocket setsockopt send recv)
435 AC_CHECK_FUNC(setpgrp)
436 AC_FUNC_SETPGRP
437
438
439 dnl
440 dnl Creating Makefiles.
441 dnl
442 AC_OUTPUT(makerule.mk Wnn/man/2.env/wnn/Makefile Wnn/pubdicplus/Makefile cWnn/uum/Makefile cWnn/man/6.jutil/Makefile cWnn/man/Makefile Wnn/man/4.cmd/Makefile kWnn/uum/Makefile cWnn/td/rk/Makefile cWnn/include/Makefile Wnn/jd/rk.vi/Makefile Wnn/jd/Makefile Makefile kWnn/include/Makefile Wnn/ld/Makefile Wnn/man/2.env/dic/Makefile Wnn/man/2.env/Makefile Wnn/man/3.libwnn/Makefile Wnn/man/6.jutil/Makefile Wnn/uum/Makefile cWnn/man/1.intro/Makefile cWnn/conv/Makefile Wnn/jd/rk/Makefile cWnn/td/Makefile Wnn/man/Makefile cWnn/td/rk_z/Makefile kWnn/conv/Makefile cWnn/man/4.cmd/Makefile cWnn/jlib/Makefile Wnn/include/Makefile Wnn/jutil/Makefile kWnn/jlib/Makefile cWnn/cd/rk_z/Makefile cWnn/Makefile cWnn/cdic/Makefile cWnn/man/2.env/Makefile Wnn/man/3.libwnn/js_lib/Makefile Wnn/man/3.libwnn/rk_lib/Makefile Contrib/dic/gerodic/Makefile kWnn/Makefile cWnn/jserver/Makefile kWnn/kdic/Makefile cWnn/tdic/Makefile Wnn/romkan/Makefile cWnn/cd/Makefile cWnn/jutil/Makefile cWnn/romkan/Makefile kWnn/jserver/Makefile Wnn/Makefile Wnn/man/3.libwnn/jl_lib/Makefile kWnn/romkan/Makefile kWnn/jutil/Makefile PubdicPlus/Makefile Wnn/conv/Makefile cWnn/cd/rk/Makefile cWnn/td/rk_p/Makefile Wnn/jlib.V3/Makefile kWnn/kd/Makefile Wnn/ld/rk/Makefile cWnn/etc/Makefile Wnn/jlib/Makefile Wnn/jserver/Makefile Wnn/wnncons/dic/Makefile cWnn/cd/rk_p/Makefile kWnn/kd/rk/Makefile Wnn/wnncons/Makefile Wnn/man/3.libwnn/misc_lib/Makefile kWnn/etc/Makefile)

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26