Develop and Download Open Source Software

Browse CVS Repository

Annotation of /freewnn/FreeWnn/configure.in

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


Revision 1.41 - (hide annotations) (download)
Fri May 21 16:39:32 2004 UTC (19 years, 10 months ago) by aono
Branch: MAIN
Changes since 1.40: +53 -22 lines
Commit from my work area part 2. (Bit large ...)

Rewrote configure part of libwrap support:

- By default, configure finds if libwrap is installed.
- Do AC_TRY_LINK() on both $withval=yes and $withval=PATH case.
  (AC_CHECK_LIB() fails against original TCP wrapper ...)
- HAVE_LIBWRAP are defined in config.h.in, so remove "-DHAVE_LIBWRAP"
    from CFLAGS.
- Changed WRAPLIBS -> WRAPLIB .
- Add WRAPLIB on [kc]Wnn . Also add --mode=XXX to LIBTOOL lines.

Other changes:

- (configure) Running generated script by autoconf-2.53 (that we are
  using) fails on some Bourne shell family (lack of LINENO support.
  ex. FreeBSD). Add code to clear default --with-tag (Libtool issue?).
- (configure) Add -no-cpp-precomp on Darwin only if you are using gcc.
  (But I don't know other compilers running on Darwin.)
- (configure) Use $ac_install_sh to mkdir Contrib/dic/gerodic .
- (do_env.c) Convert non-printable character for logging on JS_OPEN /
  JS_CONNECT. Partial fix of Bugtraq id 7918 ([freewnn:01002]).
  Please don't install jserver as setuid *root* ... (^^;)
- (revdic.c) Fix compiler warnings.
- (some Makefiles) Some lines changed to build correctly if
  builddir != srcdir. (I think this don't break normal build.)

1 ura 1.1 dnl
2 aono 1.41 dnl $Id: configure.in,v 1.40 2004/05/21 13:55:53 aono Exp $
3 ura 1.1 dnl
4    
5 ura 1.12 dnl
6 ura 1.1 dnl FreeWnn is a network-extensible Kana-to-Kanji conversion system.
7     dnl This file is part of FreeWnn.
8 ura 1.12 dnl
9 ura 1.1 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 aono 1.41 dnl Copyright FreeWnn Project 1999, 2000, 2001, 2002, 2003, 2004
14 ura 1.12 dnl
15     dnl Maintainer: FreeWnn Project <freewnn@tomo.gr.jp>
16     dnl
17 ura 1.1 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 ura 1.12 dnl the Free Software Foundation; either version 2 of the License, or
20     dnl (at your option) any later version.
21     dnl
22 ura 1.1 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 ura 1.12 dnl
27 ura 1.1 dnl You should have received a copy of the GNU General Public License
28 ura 1.12 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 ura 1.1 dnl
31 ura 1.5
32 ura 1.1 dnl
33     dnl Process this file with autoconf to produce a configure script.
34     dnl
35     AC_INIT(Wnn/conv/cvt_head.h)
36 ura 1.10 AC_CONFIG_HEADER(config.h)
37 ura 1.1
38 ura 1.15 dnl ====================================================================
39     dnl Check optional features
40     dnl ====================================================================
41 ura 1.5
42 aono 1.41 # Quick and Dirty workaround for Autoconf-2.53 and Libtools-1.5 pair ...
43     # not to use additional tagged configuration. (default: CXX F77)
44     # NOTICE: Please remove next line if situation changes. (aono)
45     tagnames=
46    
47 hiroo 1.16 AC_CANONICAL_HOST
48 ura 1.15
49 hiroo 1.17 dnl build and install libraries, server or client
50 ura 1.15
51 hiroo 1.17 AC_ARG_ENABLE(debug,
52 aono 1.40 [ --enable-debug enable debug options [[default=no]]],
53 hiroo 1.17 [case "${enableval}" in
54     yes) debug=true ;;
55     no) debug=false ;;
56     *) AC_MSG_ERROR(bad value for --enable-debug)
57     esac], debug=false)
58 ura 1.15
59     AC_ARG_ENABLE(libraries,
60 aono 1.40 [ --enable-libraries build and install libraries [[default=yes]]],
61 ura 1.15 [case "${enableval}" in
62     yes) libraries=true ;;
63     no) libraries=false ;;
64     *) AC_MSG_ERROR(bad value for --enable-libraries) ;;
65     esac], libraries=true)
66    
67     AC_ARG_ENABLE(server,
68 aono 1.40 [ --enable-server build and install server [[default=yes]]],
69 ura 1.15 [case "${enableval}" in
70     yes) server=true ;;
71     no) server=false ;;
72     *) AC_MSG_ERROR(bad value for --enable-server) ;;
73     esac], server=true)
74    
75 hiroo 1.17 AC_ARG_ENABLE(client,
76 aono 1.40 [ --enable-client build and install clients [[default=no]]],
77 hiroo 1.17 [case "${enableval}" in
78     yes) client=true ;;
79     no) client=false ;;
80     *) AC_MSG_ERROR(bad value for --enable-client) ;;
81     esac], client=false)
82 ura 1.15
83     if test $libraries = true; then
84     SUBDIRS="\$(LIB_SUBDIRS)"
85     WNNMANDIR="\$(LIB_WNNMANDIR)"
86     fi
87     if test $server = true; then
88     SUBDIRS="$SUBDIRS \$(SERVER_SUBDIRS)"
89     WNNMANDIR="$WNNMANDIR \$(SERVER_WNNMANDIR)"
90     fi
91 hiroo 1.17 if test $client = true; then
92     SUBDIRS="$SUBDIRS \$(CLIENT_SUBDIRS)"
93     dnl currently client is only uum and its man is in SERVER_WNNMANDIR
94     dnl WNNMANDIR=$WNNMANDIR \$(CLIENT_WNNMANDIR)"
95     fi
96 ura 1.15
97     AC_SUBST(SUBDIRS)
98     AC_SUBST(WNNMANDIR)
99    
100     dnl For Severs
101    
102     AC_ARG_ENABLE(Wnn,
103 aono 1.40 [ --enable-Wnn build and install Wnn [[default=yes]]],
104 ura 1.15 [case "${enableval}" in
105     yes) Wnn="Wnn";;
106     no) Wnn="" ;;
107     *) AC_MSG_ERROR(bad value for --enable-Wnn) ;;
108     esac], Wnn="Wnn")
109     AC_SUBST(Wnn)
110    
111     if test "$server" = true -a "$Wnn" = Wnn; then
112 hiroo 1.16 # JSERVER_SUBDIRS1="\$(JSERVER_SUBDIRS1)"
113 ura 1.15 JSERVER_SUBDIRS2="\$(JSERVER_SUBDIRS2)"
114     else
115 hiroo 1.16 # JSERVER_SUBDIRS1=""
116 ura 1.15 JSERVER_SUBDIRS2=""
117     fi
118 hiroo 1.16 dnl AC_SUBST(JSERVER_SUBDIRS1)
119 ura 1.15 AC_SUBST(JSERVER_SUBDIRS2)
120    
121     AC_ARG_ENABLE(cWnn,
122 aono 1.40 [ --enable-cWnn build and install cWnn [[default=yes]]],
123 ura 1.15 [case "${enableval}" in
124     yes) cWnn="cWnn" ;;
125     no) cWnn="" ;;
126     *) AC_MSG_ERROR(bad value for --enable-cWnn) ;;
127     esac], cWnn="cWnn")
128     AC_SUBST(cWnn)
129    
130     AC_ARG_ENABLE(kWnn,
131 aono 1.40 [ --enable-kWnn build and install kWnn [[default=yes]]],
132 ura 1.15 [case "${enableval}" in
133     yes) kWnn="kWnn" ;;
134     no) kWnn="" ;;
135     *) AC_MSG_ERROR(bad value for --enable-kWnn) ;;
136     esac], kWnn="kWnn")
137     AC_SUBST(kWnn)
138    
139     dnl For a library libwnn
140    
141     dnl AC_ARG_WITH(libwnn,
142     dnl [ --with-libwnn use installed Wnn library [default=no]],
143     dnl [case "${withval}" in
144     dnl yes|no) with_libwnn=${withval};;
145     dnl *) AC_MSG_ERROR(invalid argument to --with-libwnn) ;;
146     dnl esac], with_libwnn=no)
147     dnl
148    
149     AC_ARG_WITH(libwnn,
150 aono 1.40 [ --with-libwnn use installed Wnn library [[default=no]]],
151 ura 1.15 [ with_libwnn="${withval}"
152     AC_ARG_WITH(wnn-includes,
153 aono 1.40 [ --with-wnn-includes=DIR WNN include files are in DIR],
154 ura 1.15 [wnnincludedir="-I${withval}"], [wnnincludedir=''])
155     AC_ARG_WITH(wnn-libraries,
156 aono 1.40 [ --with-wnn-libraries=DIR Search for WNN libraries in DIR [[default=/usr/local/lib]]],
157 ura 1.15 [wnnlibdir="${withval}"], [wnnlibdir='/usr/local/lib'])
158     if test "X${with_libwnn}" = X-lwnn; then
159     WNNJLIB="-L${wnnlibdir} -lwnn"
160     elif test X"`echo ${with_libwnn} | grep '^/.*'`" != X ; then
161     WNNJLIB="${with_libwnn}"
162     else
163     WNNJLIB="${wnnlibdir}/libwnn.a"
164     fi
165     DEPWNNJLIB=""
166     HINSI_DATA="\$(JWNNWNNDIR)/hinsi.data"
167     ],
168     [ WNNJLIB="\$(WNNJLIBSRC)/libwnn.la"
169     DEPWNNJLIB="\$(WNNJLIB)"
170     HINSI_DATA="\$(WNNJDSRC)/hinsi.data"
171     ])
172     AC_SUBST(WNNJLIB)
173     AC_SUBST(DEPWNNJLIB)
174     AC_SUBST(HINSI_DATA)
175    
176     AC_ARG_WITH(libcwnn,
177 aono 1.40 [ --with-libcwnn use installed cWnn library [[default=no]]],
178 ura 1.15 [
179     AC_ARG_WITH(cwnn-includes,
180     [ --with-cwnn-includes=DIR CWNN include files are in DIR],
181     [cwnnincludedir="-I${withval}"], [cwnnincludedir=''])
182     AC_ARG_WITH(cwnn-libraries,
183 aono 1.40 [ --with-cwnn-libraries=DIR Search for CWNN libraries in DIR [[default=/usr/local/lib]]],
184 ura 1.15 [cwnnlibdir="${withval}"], [cwnnlibdir='/usr/local/lib'])
185     if test "X${with_libcwnn}" = X-lcwnn; then
186     CWNNJLIB="-L${cwnnlibdir} -lcwnn"
187     elif test X"`echo ${with_libcwnn} | grep '^/.*'`" != X ; then
188     CWNNJLIB="${with_libcwnn}"
189     else
190     CWNNJLIB="${cwnnlibdir}/libcwnn.a"
191     fi
192     DEPCWNNJLIB=""
193     CHINSI_DATA="\$(CWNNWNNDIR)/cixing.data"
194     THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
195     ],
196     [ CWNNJLIB="\$(CWNNJLIBSRC)/libcwnn.la"
197     DEPCWNNJLIB="\$(CWNNJLIB)"
198     CHINSI_DATA="\$(CWNNCDSRC)/cixing.data"
199     THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
200     ])
201     AC_SUBST(CWNNJLIB)
202     AC_SUBST(DEPCWNNJLIB)
203     AC_SUBST(CHINSI_DATA)
204     AC_SUBST(THINSI_DATA)
205    
206     AC_ARG_WITH(libkwnn,
207 aono 1.40 [ --with-libkwnn use installed kWnn library [[default=no]]],
208 ura 1.15 [
209     AC_ARG_WITH(kwnn-includes,
210     [ --with-kwnn-includes=DIR KWNN include files are in DIR],
211     [kwnnincludedir="-I${withval}"], [kwnnincludedir=''])
212     AC_ARG_WITH(kwnn-libraries,
213 aono 1.40 [ --with-kwnn-libraries=DIR Search for KWNN libraries in DIR [[default=/usr/local/lib]]],
214 ura 1.15 [kwnnlibdir="${withval}"], [kwnnlibdir='/usr/local/lib'])
215     if test "X${with_libkwnn}" = X-lkwnn; then
216     KWNNJLIB="-L${kwnnlibdir} -lkwnn"
217     elif test X"`echo ${with_libkwnn} | grep '^/.*'`" != X ; then
218     KWNNJLIB="${with_libkwnn}"
219     else
220     KWNNJLIB="${kwnnlibdir}/libkwnn.a"
221     fi
222     DEPKWNNJLIB=""
223     KHINSI_DATA="\$(KWNNWNNDIR)/hinsi.data"
224     ],
225     [ KWNNJLIB="\$(KWNNJLIBSRC)/libkwnn.la"
226     DEPKWNNJLIB="\$(KWNNJLIB)"
227     KHINSI_DATA="\$(KWNNKDSRC)/hinsi.data"
228     ])
229     AC_SUBST(KWNNJLIB)
230     AC_SUBST(DEPKWNNJLIB)
231     AC_SUBST(KHINSI_DATA)
232 ura 1.5
233 hiroo 1.21 dnl
234     dnl Build Options
235     dnl
236    
237 hiroo 1.17 AC_ARG_ENABLE(ipv6,
238 aono 1.40 [ --enable-ipv6 build and install IPv6 [[default=no]]],
239 hiroo 1.16 [case "${enableval}" in
240 hiroo 1.17 yes) ipv6="-DINET6";;
241     no) ipv6="" ;;
242     *) AC_MSG_ERROR(bad value for --enable-ipv6) ;;
243     esac], ipv6="")
244     AC_SUBST(ipv6)
245    
246     AC_ARG_ENABLE(unsafe-path,
247 aono 1.40 [ --enable-unsafe-path allow creating files in an arbitrary path [[default=no]]],
248 hiroo 1.17 [case "${enableval}" in
249 hiroo 1.19 yes) unsafe_path=true;;
250     no) unsafe_path=false;;
251 hiroo 1.17 *) AC_MSG_ERROR(bad value for --enable-unsafe-path) ;;
252     esac], unsafe_path=false)
253     AC_SUBST(unsafe_path)
254    
255     if test ${unsafe_path} = true; then
256 hiroo 1.34 AC_DEFINE(WNN_ALLOW_UNSAFE_PATH, 1,
257     [Define to allow writing to other than JSERVERDIR.])
258 hiroo 1.17 fi
259 hiroo 1.16
260 ura 1.5 dnl
261 ura 1.1 dnl Checks for cc and cpp.
262     dnl
263     AC_PROG_CC
264 hiroo 1.16
265 hiroo 1.33 dnl System specific options
266     dnl Now that we are using autoconf, CCOPTIONS should be nuked...
267 hiroo 1.16 case $host in
268     *-*-linux*)
269 ura 1.1 CCOPTIONS="-Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE"
270     ;;
271 hiroo 1.34 *-*-darwin*)
272 aono 1.41 if test $GCC = yes; then
273 hiroo 1.34 # Unfortunately, autoconf (at least 2.57) does not recognize
274     # proper CPP. (Normal cpp-precomp nor auto-retrying in basic mode does
275     # not work with pubdic+ processing.) So define here ....
276 aono 1.41 # Note: It seems gcc-3.3 (or (probably) later) does not need this.
277     CPP=${CPP:-"$CC -E -no-cpp-precomp"}
278     fi
279     # Don't care other CC-s.
280 hiroo 1.34 ;;
281 hiroo 1.16 *-*-sunos*)
282 hiroo 1.19 if test $GCC = yes; then
283 ura 1.2 CCOPTIONS="-Dsun -Dsparc"
284     else
285 hiroo 1.17 CCOPTIONS=""
286 ura 1.2 fi
287     ;;
288 hiroo 1.16 *-*-solaris2.*)
289     # Will 'solaris*' be OK?
290 hiroo 1.19 if test $GCC = yes; then
291 hiroo 1.17 CCOPTIONS="-Dsun -D`uname -p` -DSVR4 -DSYSV"
292 ura 1.2 else
293 hiroo 1.17 CCOPTIONS="-Xc -xF -xcg92 -Dsun -D`uname -p` -DSVR4 -DSYSV"
294 ura 1.2 fi
295 ura 1.4 ;;
296 hiroo 1.16 *-*-hpux*)
297 hiroo 1.19 if test $GCC = yes; then
298 ura 1.4 CCOPTIONS="-Dhpux -DSYSV"
299     else
300     CCOPTIONS="-Ae -Dhpux -DSYSV"
301     fi
302 ura 1.2 ;;
303 hiroo 1.16 i[[34567]]86-pc-beos*)
304 hiroo 1.17 CCOPTIONS="-DBEOS -D_POSIX_SOURCE -D_BSD_SOURCE"
305 ura 1.5 ;;
306 hiroo 1.16 powerpc-*-beos*)
307 hiroo 1.17 CCOPTIONS="-DBEOS -D_POSIX_SOURCE -D_BSD_SOURCE"
308 ura 1.5 ;;
309 hiroo 1.16 *-*-aix*)
310 ura 1.6 CCOPTIONS="-DSYSV"
311     ;;
312 ura 1.1 *)
313 hiroo 1.33 dnl AC_MSG_WARN("It is not reported if FreeWnn works on this system. But continuing...")
314     dnl AC_MSG_WARN([(It may or may not work if you set CCOPTIONS properly.)])
315 ura 1.1 ;;
316     esac
317 hiroo 1.19
318     dnl Checking if we use gcc or not
319     if test $debug = true; then
320     if test $GCC = yes; then
321 hiroo 1.33 CDEBUGFLAGS=${CDEBUGFLAGS:-"-g2 -O2 -Wall -fstack-check"}
322     else
323     CDEBUGFLAGS=${CDEBUGFLAGS:-""}
324 hiroo 1.19 fi
325 hiroo 1.28 INSTPGMFLAGS=
326 hiroo 1.17 else
327 aono 1.38 CDEBUGFLAGS=${CDEBUGFLAGS:-""}
328 hiroo 1.28 INSTPGMFLAGS="-s"
329 hiroo 1.17 fi
330 hiroo 1.33 AC_SUBST(CCOPTIONS)
331     AC_SUBST(CDEBUGFLAGS)
332 hiroo 1.17 AC_SUBST(INSTPGMFLAGS)
333 hiroo 1.16
334     echo "Set CDEBUGFLAGS and CCOPTIONS to following:"
335     echo ' CDEBUGFLAGS="'"$CDEBUGFLAGS"'"'
336     echo ' CCOPTIONS="'"$CCOPTIONS"'"'
337    
338     dnl ��������������������������������configure������������CPP������������
339     dnl ������������������������������������CPP������������������������
340     dnl ��CPP=${CPP:-"/usr/ccs/lib/cpp"}������������������������������������
341     dnl ����������������
342 ura 1.1 AC_PROG_CPP
343    
344     dnl
345     dnl Checks for programs.
346     dnl
347 ura 1.7 dnl ### AC_PROG_YACC
348     dnl ### AC_PROG_LEX
349 ura 1.5 AC_PROG_INSTALL
350 ura 1.1 AC_PROG_LN_S
351     AC_PROG_MAKE_SET
352 hiroo 1.16 AC_PROG_LIBTOOL
353     AC_SUBST(LIBTOOL_DEPS)
354 ura 1.1
355     dnl Checks for libraries.
356 ura 1.7 dnl ### dnl Replace `main' with a function in -lX11:
357     dnl ### AC_CHECK_LIB(X11, main)
358     dnl ### dnl Replace `main' with a function in -lcurses:
359     dnl ### AC_CHECK_LIB(curses, main)
360 ura 1.1
361 ura 1.9 AC_CHECK_LIB(crypt, crypt)
362     AC_CHECK_LIB(socket, connect)
363 h-abe 1.27 AC_CHECK_LIB(bind, getservbyname)
364 ura 1.9 AC_CHECK_LIB(nsl, gethostbyname)
365 ura 1.1
366     dnl
367     dnl Checks for header files.
368     dnl
369     AC_PATH_X
370     AC_HEADER_STDC
371     AC_HEADER_SYS_WAIT
372 hiroo 1.32 AC_HEADER_TIME
373 hiroo 1.37 AC_CHECK_HEADERS(fcntl.h syslog.h unistd.h utmp.h utmpx.h \
374 hiroo 1.28 sys/file.h sys/ioctl.h sys/time.h sys/types.h sys/param.h \
375     malloc.h strings.h memory.h \
376 hiroo 1.35 curses.h ncurses.h sgtty.h term.h termio.h termios.h \
377 hiroo 1.28 )
378 ura 1.1
379     dnl
380     dnl Checks for typedefs, structures, and compiler characteristics.
381     dnl
382     AC_TYPE_MODE_T
383     AC_HEADER_TIME
384 ura 1.13
385 aono 1.38 dnl AC_CHECK_TYPES(time_t,,
386 hiroo 1.37 dnl AC_DEFINE(time_t, long, [Define missing time_t.]),
387     dnl [INCLUDES = time.h])
388 aono 1.38 AC_CHECK_TYPES(socklen_t,,
389 aono 1.39 AC_DEFINE(socklen_t, int, [Define missing socklen_t.]), [
390     #if HAVE_SYS_TYPES_H
391     # include <sys/types.h>
392     #endif
393     #include <sys/socket.h>])
394 ura 1.10
395     dnl
396     dnl Checks for symbol
397     dnl
398    
399 ura 1.1 dnl
400     dnl Checks for library functions.
401     dnl
402     AC_PROG_GCC_TRADITIONAL
403 hiroo 1.28
404     dnl idea borrowed from EB Library http://www.sra.co.jp/people/m-kasahr/eb/
405     AC_TYPE_SIGNAL
406     if test "$ac_cv_type_signal" = void; then
407     AC_DEFINE(RETSIGTYPE_VOID, 1, [Define if the signal function returns void.])
408     fi
409    
410 ura 1.1 AC_FUNC_MEMCMP
411 hiroo 1.37 AC_CHECK_FUNCS(getpgid getpgrp setpgrp wait3)
412     AC_FUNC_GETPGRP
413 hiroo 1.22 AC_FUNC_SETPGRP
414 hiroo 1.28 dnl FreeWnn do not use the 3rd parameter of wait3().
415     dnl AC_FUNC_WAIT3
416    
417 hiroo 1.37 AC_CHECK_FUNCS(random drand48 fchmod getopt killpg \
418     FD_SET \
419 hiroo 1.28 gethostname select socket closesocket setsockopt send recv \
420 hiroo 1.29 getdtablesize getrlimit syslog vsyslog setenv snprintf)
421 aono 1.20 dnl for bcopy/index -> memcpy/strchr conversion (preparation):
422 hiroo 1.28 AC_CHECK_FUNCS(bcopy bzero bcmp index rindex \
423     memcpy memmove memset strchr strrchr)
424 ura 1.1
425 aono 1.20 dnl Check fallback functions for jserver (should use AC_REPLACE_FUNCS?)
426     JS_SUPPORTOBJS=
427     AC_CHECK_FUNCS(mkdir vasprintf, ,
428 hiroo 1.28 [JS_SUPPORTOBJS="${JS_SUPPORTOBJS} ${ac_func}.o"])
429 aono 1.20 AC_SUBST(JS_SUPPORTOBJS)
430 hiroo 1.37
431    
432     dnl
433     dnl TCP Wrapper.
434     dnl
435 aono 1.41 WRAPLIB=
436 hiroo 1.37 AC_MSG_CHECKING(whether to use libwrap)
437     AC_ARG_WITH(libwrap,
438 aono 1.41 [ --with-libwrap[[=DIR]] Compile in libwrap (tcp_wrappers) support [[default=try to find libwrap]]],
439 hiroo 1.37 [ case "$withval" in
440     no)
441     AC_MSG_RESULT(no)
442 aono 1.41 WRAP_TRY=no
443 hiroo 1.37 ;;
444     yes)
445     AC_MSG_RESULT(yes)
446 aono 1.41 WRAP_TRY=yes
447 hiroo 1.37 ;;
448     *)
449     AC_MSG_RESULT(yes)
450 aono 1.41 WRAP_TRY=yes
451 hiroo 1.37 if test -d "$withval"; then
452     WRAPINCLUDES="-I$withval"
453 aono 1.41 if test -d $withval/include; then
454     WRAPINCLUDES="-I$withval/include $WRAPINCLUDES"
455     fi
456     WRAPLIB="-L$withval -lwrap"
457     if test -d $withval/lib; then
458     WRAPLIB="-L$withval/lib $WRAPLIB"
459     fi
460 hiroo 1.37 else
461     WRAPINCLUDES="$withval"
462     fi
463     ;;
464     esac ],
465 aono 1.41 [AC_MSG_RESULT([try to find])
466     WRAP_TRY=auto]
467 hiroo 1.37 )
468 aono 1.41 # Link test for libwrap
469     if test "$WRAP_TRY" = yes -o "$WRAP_TRY" = auto; then
470     OLDCFLAGS="$CFLAGS"
471     CFLAGS="$WRAPINCLUDES $CFLAGS"
472     OLDLIBS="$LIBS"
473     WRAPLIB=${WRAPLIB:-"-lwrap"}
474     LIBS="$WRAPLIB $OLDLIBS"
475     AC_MSG_CHECKING([libwrap is working])
476     AC_TRY_LINK([ int allow_severity; int deny_severity; ],
477     [ hosts_access(); ],
478     [ AC_MSG_RESULT(yes)
479     AC_DEFINE(HAVE_LIBWRAP, 1,
480     [Define if you have libwrap (TCP wrapper) support.])
481     AC_SUBST(WRAPLIB)],
482     [ AC_MSG_RESULT(no)
483     if test "$WRAP_TRY" = yes; then
484     AC_MSG_ERROR([Could not find libwrap. Please check config.log.])
485     else
486     # recover old flag / clear needless WRAPLIB and continue
487     CFLAGS=$OLDCFLAGS
488     WRAPLIB=
489     fi] )
490     # only jserver needs libwrap, recover LIBS also
491     LIBS=$OLDLIBS
492     fi
493 aono 1.20
494 ura 1.5
495     dnl
496 ura 1.1 dnl Creating Makefiles.
497     dnl
498 aono 1.20 # mkdir -p Contrib/dic/gerodic in case builddir != srcdir
499 aono 1.41 dir=Contrib/dic/gerodic
500 aono 1.20 if test ! -d $dir; then
501     echo "creating $dir ..."
502 aono 1.41 $ac_install_sh -d $dir
503 aono 1.20 fi
504    
505 hiroo 1.28 dnl
506     dnl Generate Makefiles
507     dnl
508    
509     dnl Generic
510    
511     makefiles_generic="makerule.mk Makefile"
512    
513     dnl Japanese
514    
515     if test "x${Wnn}" = "xWnn"; then
516     makefiles_wnn="Wnn/Makefile Wnn/conv/Makefile Wnn/include/Makefile \
517     Wnn/jd/Makefile Wnn/jd/rk/Makefile Wnn/jd/rk.vi/Makefile \
518     Wnn/jlib/Makefile Wnn/jlib.V3/Makefile Wnn/jserver/Makefile \
519     Wnn/jutil/Makefile Wnn/ld/Makefile Wnn/ld/rk/Makefile \
520     Wnn/romkan/Makefile Wnn/uum/Makefile \
521     Wnn/man/Makefile Wnn/man/2.env/Makefile Wnn/man/3.libwnn/Makefile \
522     Wnn/man/4.cmd/Makefile Wnn/man/6.jutil/Makefile \
523     Wnn/man/2.env/dic/Makefile Wnn/man/2.env/wnn/Makefile \
524     Wnn/man/3.libwnn/jl_lib/Makefile Wnn/man/3.libwnn/js_lib/Makefile \
525     Wnn/man/3.libwnn/misc_lib/Makefile Wnn/man/3.libwnn/rk_lib/Makefile"
526     makefiles_wnn_dic="Contrib/dic/gerodic/Makefile Wnn/pubdicplus/Makefile \
527     Wnn/wnncons/Makefile Wnn/wnncons/dic/Makefile"
528     fi
529    
530     dnl Chinese and Taiwanese
531    
532 aono 1.20 if test "x$cWnn" = "xcWnn"; then
533 hiroo 1.28 makefiles_cwnn="cWnn/Makefile cWnn/conv/Makefile cWnn/etc/Makefile \
534     cWnn/cd/Makefile cWnn/cd/rk/Makefile \
535     cWnn/cd/rk_p/Makefile cWnn/cd/rk_z/Makefile \
536     cWnn/td/Makefile cWnn/td/rk/Makefile \
537     cWnn/td/rk_z/Makefile cWnn/td/rk_p/Makefile \
538     cWnn/include/Makefile cWnn/jlib/Makefile \
539     cWnn/jserver/Makefile cWnn/jutil/Makefile \
540     cWnn/man/Makefile cWnn/man/1.intro/Makefile cWnn/man/2.env/Makefile \
541     cWnn/man/4.cmd/Makefile cWnn/man/6.jutil/Makefile \
542     cWnn/romkan/Makefile cWnn/uum/Makefile"
543     makefiles_cwnn_dic="cWnn/cdic/Makefile cWnn/tdic/Makefile"
544     fi
545    
546     dnl Korean
547    
548     if test "x$kWnn" = "xkWnn"; then
549     makefiles_kwnn="kWnn/Makefile kWnn/conv/Makefile kWnn/etc/Makefile \
550     kWnn/include/Makefile kWnn/jlib/Makefile kWnn/jutil/Makefile \
551     kWnn/jserver/Makefile kWnn/kd/Makefile kWnn/kd/rk/Makefile \
552     kWnn/romkan/Makefile kWnn/uum/Makefile"
553     makefiles_kwnn_dic="kWnn/kdic/Makefile"
554 aono 1.20 fi
555    
556 hiroo 1.28 AC_OUTPUT(${makefiles_generic} \
557     ${makefiles_wnn} ${makefiles_wnn_dic} \
558     ${makefiles_cwnn} ${makefiles_cwnn_dic} \
559     ${makefiles_kwnn} ${makefiles_kwnn_dic})

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