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.19 - (show annotations) (download)
Sun Mar 3 12:53:56 2002 UTC (22 years, 1 month ago) by hiroo
Branch: MAIN
Changes since 1.18: +22 -53 lines
Fix from [freewnn:00764]

1 dnl
2 dnl $Id: configure.in,v 1.18 2001/09/24 08:36:12 hiroo 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 �������������������������������� comment out ����������
42 dnl
43 dnl case "$top_srcdir" in
44 dnl .) abs_top_srcdir=`pwd` ;;
45 dnl /*) abs_top_srcdir=top_srcdir;;
46 dnl *) # Relative path.
47 dnl abs_top_srcdir=`pwd`$ac_dots$ac_given_srcdir ;;
48 dnl esac
49 dnl AC_SUBST(abs_top_srcdir)
50
51 dnl ====================================================================
52 dnl Check optional features
53 dnl ====================================================================
54
55 AC_CANONICAL_HOST
56
57 dnl build and install libraries, server or client
58
59 AC_ARG_ENABLE(debug,
60 [ --enable-debug enable debug options [default=no]],
61 [case "${enableval}" in
62 yes) debug=true ;;
63 no) debug=false ;;
64 *) AC_MSG_ERROR(bad value for --enable-debug)
65 esac], debug=false)
66
67 AC_ARG_ENABLE(libraries,
68 [ --enable-libraries build and install libraries [default=yes]],
69 [case "${enableval}" in
70 yes) libraries=true ;;
71 no) libraries=false ;;
72 *) AC_MSG_ERROR(bad value for --enable-libraries) ;;
73 esac], libraries=true)
74
75 AC_ARG_ENABLE(server,
76 [ --enable-server build and install server [default=yes]],
77 [case "${enableval}" in
78 yes) server=true ;;
79 no) server=false ;;
80 *) AC_MSG_ERROR(bad value for --enable-server) ;;
81 esac], server=true)
82
83 AC_ARG_ENABLE(client,
84 [ --enable-client build and install clients [default=no]],
85 [case "${enableval}" in
86 yes) client=true ;;
87 no) client=false ;;
88 *) AC_MSG_ERROR(bad value for --enable-client) ;;
89 esac], client=false)
90
91 if test $libraries = true; then
92 SUBDIRS="\$(LIB_SUBDIRS)"
93 WNNMANDIR="\$(LIB_WNNMANDIR)"
94 fi
95 if test $server = true; then
96 SUBDIRS="$SUBDIRS \$(SERVER_SUBDIRS)"
97 WNNMANDIR="$WNNMANDIR \$(SERVER_WNNMANDIR)"
98 fi
99 if test $client = true; then
100 SUBDIRS="$SUBDIRS \$(CLIENT_SUBDIRS)"
101 dnl currently client is only uum and its man is in SERVER_WNNMANDIR
102 dnl WNNMANDIR=$WNNMANDIR \$(CLIENT_WNNMANDIR)"
103 fi
104
105 AC_SUBST(SUBDIRS)
106 AC_SUBST(WNNMANDIR)
107
108 dnl For Severs
109
110 AC_ARG_ENABLE(Wnn,
111 [ --enable-Wnn build and install Wnn [default=yes]],
112 [case "${enableval}" in
113 yes) Wnn="Wnn";;
114 no) Wnn="" ;;
115 *) AC_MSG_ERROR(bad value for --enable-Wnn) ;;
116 esac], Wnn="Wnn")
117 AC_SUBST(Wnn)
118
119 if test "$server" = true -a "$Wnn" = Wnn; then
120 # JSERVER_SUBDIRS1="\$(JSERVER_SUBDIRS1)"
121 JSERVER_SUBDIRS2="\$(JSERVER_SUBDIRS2)"
122 else
123 # JSERVER_SUBDIRS1=""
124 JSERVER_SUBDIRS2=""
125 fi
126 dnl AC_SUBST(JSERVER_SUBDIRS1)
127 AC_SUBST(JSERVER_SUBDIRS2)
128
129 AC_ARG_ENABLE(cWnn,
130 [ --enable-cWnn build and install cWnn [default=yes]],
131 [case "${enableval}" in
132 yes) cWnn="cWnn" ;;
133 no) cWnn="" ;;
134 *) AC_MSG_ERROR(bad value for --enable-cWnn) ;;
135 esac], cWnn="cWnn")
136 AC_SUBST(cWnn)
137
138 AC_ARG_ENABLE(kWnn,
139 [ --enable-kWnn build and install kWnn [default=yes]],
140 [case "${enableval}" in
141 yes) kWnn="kWnn" ;;
142 no) kWnn="" ;;
143 *) AC_MSG_ERROR(bad value for --enable-kWnn) ;;
144 esac], kWnn="kWnn")
145 AC_SUBST(kWnn)
146
147 dnl For a library libwnn
148
149 dnl AC_ARG_WITH(libwnn,
150 dnl [ --with-libwnn use installed Wnn library [default=no]],
151 dnl [case "${withval}" in
152 dnl yes|no) with_libwnn=${withval};;
153 dnl *) AC_MSG_ERROR(invalid argument to --with-libwnn) ;;
154 dnl esac], with_libwnn=no)
155 dnl
156
157 AC_ARG_WITH(libwnn,
158 [ --with-libwnn use installed Wnn library [default=no]],
159 [ with_libwnn="${withval}"
160 AC_ARG_WITH(wnn-includes,
161 [ --with-wnn-includes=DIR WNN include files are in DIR],
162 [wnnincludedir="-I${withval}"], [wnnincludedir=''])
163 AC_ARG_WITH(wnn-libraries,
164 [ --with-wnn-libraries=DIR Search for WNN libraries in DIR[default=/usr/local/lib]],
165 [wnnlibdir="${withval}"], [wnnlibdir='/usr/local/lib'])
166 if test "X${with_libwnn}" = X-lwnn; then
167 WNNJLIB="-L${wnnlibdir} -lwnn"
168 elif test X"`echo ${with_libwnn} | grep '^/.*'`" != X ; then
169 WNNJLIB="${with_libwnn}"
170 else
171 WNNJLIB="${wnnlibdir}/libwnn.a"
172 fi
173 DEPWNNJLIB=""
174 HINSI_DATA="\$(JWNNWNNDIR)/hinsi.data"
175 ],
176 [ WNNJLIB="\$(WNNJLIBSRC)/libwnn.la"
177 DEPWNNJLIB="\$(WNNJLIB)"
178 HINSI_DATA="\$(WNNJDSRC)/hinsi.data"
179 ])
180 AC_SUBST(WNNJLIB)
181 AC_SUBST(DEPWNNJLIB)
182 AC_SUBST(HINSI_DATA)
183
184 AC_ARG_WITH(libcwnn,
185 [ --with-libcwnn use installed cWnn library [default=no]],
186 [
187 AC_ARG_WITH(cwnn-includes,
188 [ --with-cwnn-includes=DIR CWNN include files are in DIR],
189 [cwnnincludedir="-I${withval}"], [cwnnincludedir=''])
190 AC_ARG_WITH(cwnn-libraries,
191 [ --with-cwnn-libraries=DIR Search for CWNN libraries in DIR[default=/usr/local/lib]],
192 [cwnnlibdir="${withval}"], [cwnnlibdir='/usr/local/lib'])
193 if test "X${with_libcwnn}" = X-lcwnn; then
194 CWNNJLIB="-L${cwnnlibdir} -lcwnn"
195 elif test X"`echo ${with_libcwnn} | grep '^/.*'`" != X ; then
196 CWNNJLIB="${with_libcwnn}"
197 else
198 CWNNJLIB="${cwnnlibdir}/libcwnn.a"
199 fi
200 DEPCWNNJLIB=""
201 CHINSI_DATA="\$(CWNNWNNDIR)/cixing.data"
202 THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
203 ],
204 [ CWNNJLIB="\$(CWNNJLIBSRC)/libcwnn.la"
205 DEPCWNNJLIB="\$(CWNNJLIB)"
206 CHINSI_DATA="\$(CWNNCDSRC)/cixing.data"
207 THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
208 ])
209 AC_SUBST(CWNNJLIB)
210 AC_SUBST(DEPCWNNJLIB)
211 AC_SUBST(CHINSI_DATA)
212 AC_SUBST(THINSI_DATA)
213
214 AC_ARG_WITH(libkwnn,
215 [ --with-libkwnn use installed kWnn library [default=no]],
216 [
217 AC_ARG_WITH(kwnn-includes,
218 [ --with-kwnn-includes=DIR KWNN include files are in DIR],
219 [kwnnincludedir="-I${withval}"], [kwnnincludedir=''])
220 AC_ARG_WITH(kwnn-libraries,
221 [ --with-kwnn-libraries=DIR Search for KWNN libraries in DIR[default=/usr/local/lib]],
222 [kwnnlibdir="${withval}"], [kwnnlibdir='/usr/local/lib'])
223 if test "X${with_libkwnn}" = X-lkwnn; then
224 KWNNJLIB="-L${kwnnlibdir} -lkwnn"
225 elif test X"`echo ${with_libkwnn} | grep '^/.*'`" != X ; then
226 KWNNJLIB="${with_libkwnn}"
227 else
228 KWNNJLIB="${kwnnlibdir}/libkwnn.a"
229 fi
230 DEPKWNNJLIB=""
231 KHINSI_DATA="\$(KWNNWNNDIR)/hinsi.data"
232 ],
233 [ KWNNJLIB="\$(KWNNJLIBSRC)/libkwnn.la"
234 DEPKWNNJLIB="\$(KWNNJLIB)"
235 KHINSI_DATA="\$(KWNNKDSRC)/hinsi.data"
236 ])
237 AC_SUBST(KWNNJLIB)
238 AC_SUBST(DEPKWNNJLIB)
239 AC_SUBST(KHINSI_DATA)
240
241 AC_ARG_ENABLE(ipv6,
242 [ --enable-ipv6 build and install IPv6 [default=no]],
243 [case "${enableval}" in
244 yes) ipv6="-DINET6";;
245 no) ipv6="" ;;
246 *) AC_MSG_ERROR(bad value for --enable-ipv6) ;;
247 esac], ipv6="")
248 AC_SUBST(ipv6)
249
250 AC_ARG_ENABLE(unsafe-path,
251 [ --enable-unsafe-path allow creating files in an arbitrary path [default=no]],
252 [case "${enableval}" in
253 yes) unsafe_path=true;;
254 no) unsafe_path=false;;
255 *) AC_MSG_ERROR(bad value for --enable-unsafe-path) ;;
256 esac], unsafe_path=false)
257 AC_SUBST(unsafe_path)
258
259 if test ${unsafe_path} = true; then
260 AC_DEFINE(WNN_ALLOW_UNSAFE_PATH)
261 fi
262
263 dnl
264 dnl Checks for cc and cpp.
265 dnl
266 AC_PROG_CC
267
268 dnl Use environment variable (if set). It will be overridden
269 dnl in supported system though...
270 CDEBUGFLAGS=${CDEBUGFLAGS:-"-O"}
271 case $host in
272 *-*-linux*)
273 CCOPTIONS="-Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE"
274 CDEBUGFLAGS="-O2 -fno-strength-reduce"
275 ;;
276 *-*-freebsd*|*-*-netbsd*|*-*-openbsd*)
277 CCOPTIONS="-DCSRG_BASED"
278 CDEBUGFLAGS="-O2 -fno-strength-reduce"
279 ;;
280 *-*-bsdi*)
281 CCOPTIONS="-DCSRG_BASED"
282 CDEBUGFLAGS="-O2 -fno-strength-reduce"
283 ;;
284 *-*-sunos*)
285 if test $GCC = yes; then
286 CCOPTIONS="-Dsun -Dsparc"
287 CDEBUGFLAGS=-O2
288 else
289 CCOPTIONS=""
290 CDEBUGFLAGS=-O4
291 fi
292 ;;
293 *-*-solaris2.*)
294 # Will 'solaris*' be OK?
295 if test $GCC = yes; then
296 CCOPTIONS="-Dsun -D`uname -p` -DSVR4 -DSYSV"
297 CDEBUGFLAGS=-O2
298 else
299 CCOPTIONS="-Xc -xF -xcg92 -Dsun -D`uname -p` -DSVR4 -DSYSV"
300 CDEBUGFLAGS=-O4
301 fi
302 ;;
303 *-*-hpux*)
304 if test $GCC = yes; then
305 CCOPTIONS="-Dhpux -DSYSV"
306 CDEBUGFLAGS=-O2
307 else
308 CCOPTIONS="-Ae -Dhpux -DSYSV"
309 fi
310 ;;
311 i[[34567]]86-pc-beos*)
312 CCOPTIONS="-DBEOS -D_POSIX_SOURCE -D_BSD_SOURCE"
313 CDEBUGFLAGS="-O2 -fno-strength-reduce"
314 ;;
315 powerpc-*-beos*)
316 CCOPTIONS="-DBEOS -D_POSIX_SOURCE -D_BSD_SOURCE"
317 ;;
318 *-*-aix*)
319 if test $GCC = yes; then
320 CDEBUGFLAGS=-O2
321 else
322 CDEBUGFLAGS=-O
323 fi
324 CCOPTIONS="-DSYSV"
325 ;;
326 *)
327 AC_MSG_WARN("It is not reported if FreeWnn works on this system. But continuing...")
328 AC_MSG_WARN([(It may or may not work if you set CCOPTIONS properly.)])
329 ;;
330 esac
331
332 dnl Checking if we use gcc or not
333 if test $debug = true; then
334 if test $GCC = yes; then
335 CDEBUGFLAGS="-g2 -Wall -fstack-check $CDEBUGFLAGS"
336 fi
337 fi
338
339 if test ${debug} = true; then
340 INSTPGMFLAGS=
341 else
342 INSTPGMFLAGS="-s"
343 fi
344 AC_SUBST(INSTPGMFLAGS)
345
346 echo "Set CDEBUGFLAGS and CCOPTIONS to following:"
347 echo ' CDEBUGFLAGS="'"$CDEBUGFLAGS"'"'
348 echo ' CCOPTIONS="'"$CCOPTIONS"'"'
349
350 dnl ��������������������������������configure������������CPP������������
351 dnl ������������������������������������CPP������������������������
352 dnl ��CPP=${CPP:-"/usr/ccs/lib/cpp"}������������������������������������
353 dnl ����������������
354 AC_PROG_CPP
355
356 dnl
357 dnl Checks for programs.
358 dnl
359 dnl ### AC_PROG_YACC
360 dnl ### AC_PROG_LEX
361 AC_PROG_INSTALL
362 AC_PROG_LN_S
363 AC_PROG_MAKE_SET
364 AC_PROG_LIBTOOL
365 AC_SUBST(LIBTOOL_DEPS)
366 AC_SUBST(CCOPTIONS)
367 AC_SUBST(CDEBUGFLAGS)
368
369 dnl Checks for libraries.
370 dnl ### dnl Replace `main' with a function in -lFS:
371 dnl ### AC_CHECK_LIB(FS, main)
372 dnl ### dnl Replace `main' with a function in -lFresco:
373 dnl ### AC_CHECK_LIB(Fresco, main)
374 dnl ### dnl Replace `main' with a function in -lICE:
375 dnl ### AC_CHECK_LIB(ICE, main)
376 dnl ### dnl Replace `main' with a function in -lPEX5:
377 dnl ### AC_CHECK_LIB(PEX5, main)
378 dnl ### dnl Replace `main' with a function in -lSM:
379 dnl ### AC_CHECK_LIB(SM, main)
380 dnl ### dnl Replace `main' with a function in -lX11:
381 dnl ### AC_CHECK_LIB(X11, main)
382 dnl ### dnl Replace `main' with a function in -lXIE:
383 dnl ### AC_CHECK_LIB(XIE, main)
384 dnl ### dnl Replace `main' with a function in -lXau:
385 dnl ### AC_CHECK_LIB(Xau, main)
386 dnl ### dnl Replace `main' with a function in -lXaw:
387 dnl ### AC_CHECK_LIB(Xaw, main)
388 dnl ### dnl Replace `main' with a function in -lXbsd:
389 dnl ### AC_CHECK_LIB(Xbsd, main)
390 dnl ### dnl Replace `main' with a function in -lXdmcp:
391 dnl ### AC_CHECK_LIB(Xdmcp, main)
392 dnl ### dnl Replace `main' with a function in -lXext:
393 dnl ### AC_CHECK_LIB(Xext, main)
394 dnl ### dnl Replace `main' with a function in -lXi:
395 dnl ### AC_CHECK_LIB(Xi, main)
396 dnl ### dnl Replace `main' with a function in -lXmu:
397 dnl ### AC_CHECK_LIB(Xmu, main)
398 dnl ### dnl Replace `main' with a function in -lXt:
399 dnl ### AC_CHECK_LIB(Xt, main)
400 dnl ### dnl Replace `main' with a function in -lXtf:
401 dnl ### AC_CHECK_LIB(Xtf, main)
402 dnl ### dnl Replace `main' with a function in -lXtst:
403 dnl ### AC_CHECK_LIB(Xtst, main)
404 dnl ### dnl Replace `main' with a function in -lcurses:
405 dnl ### AC_CHECK_LIB(curses, main)
406 dnl ### dnl Replace `main' with a function in -lfl:
407 dnl ### AC_CHECK_LIB(fl, main)
408 dnl ### dnl Replace `main' with a function in -lfont:
409 dnl ### AC_CHECK_LIB(font, main)
410 dnl ### dnl Replace `main' with a function in -loldX:
411 dnl ### AC_CHECK_LIB(oldX, main)
412 dnl ### dnl Replace `main' with a function in -lphigs:
413 dnl ### AC_CHECK_LIB(phigs, main)
414 dnl ### dnl Replace `main' with a function in -lxpg4:
415 dnl ### AC_CHECK_LIB(xpg4, main)
416
417 AC_CHECK_LIB(crypt, crypt)
418 AC_CHECK_LIB(socket, connect)
419 AC_CHECK_LIB(nsl, gethostbyname)
420
421 dnl
422 dnl Checks for header files.
423 dnl
424 AC_PATH_X
425 AC_HEADER_STDC
426 AC_HEADER_SYS_WAIT
427 AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sgtty.h strings.h termio.h unistd.h)
428 AC_CHECK_HEADERS(sys/file.h sys/ioctl.h sys/time.h sys/types.h sys/param.h)
429
430 dnl
431 dnl Checks for typedefs, structures, and compiler characteristics.
432 dnl
433 AC_TYPE_MODE_T
434 AC_HEADER_TIME
435 AC_CHECK_TYPE(time_t, long)
436
437 dnl
438 dnl socklen_t �� sys/socket.h �� bits/socket.h ����������������������
439 dnl AC_CHECK_TYPE ����������������
440 dnl
441 AC_MSG_CHECKING(for socklen_t)
442 AC_EGREP_CPP(socklen_t, [#include <sys/socket.h>], AC_MSG_RESULT(yes),
443 [
444 AC_DEFINE(socklen_t, int)
445 AC_MSG_RESULT(no)
446 ])
447
448 dnl
449 dnl Checks for symbol
450 dnl
451
452 AC_MSG_CHECKING(for RAND_MAX)
453 AC_EGREP_CPP(yes,
454 [#include <stdlib.h>
455 #ifdef RAND_MAX
456 yes
457 #endif
458 ],AC_DEFINE(HAVE_RAND_MAX))
459
460 dnl
461 dnl Checks for library functions.
462 dnl
463 AC_PROG_GCC_TRADITIONAL
464 AC_FUNC_MEMCMP
465 AC_TYPE_SIGNAL
466 AC_FUNC_WAIT3
467 AC_CHECK_FUNCS(gethostname mkdir select socket strtol)
468 AC_CHECK_FUNCS(drand48)
469 AC_CHECK_FUNCS(perror)
470 AC_CHECK_FUNCS(closesocket setsockopt send recv)
471 AC_CHECK_FUNC(setpgrp)
472 AC_FUNC_SETPGRP
473
474
475 dnl
476 dnl Creating Makefiles.
477 dnl
478 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