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.45 - (show annotations) (download)
Sun Jun 18 16:49:41 2006 UTC (17 years, 9 months ago) by aonoto
Branch: MAIN
Changes since 1.44: +47 -3 lines
Rewrote utmp code in uum (without libspt).
Recent BSD (4.4BSD or later based) developer: please write working
code specifying --enable-client-utmp . It works well (with
--enable-client-utmp) on recent NetBSD (that has putut(x)line()
implementation).

Other changes:
Because it cannot work on gcc with Linux/i386, temporally remove
-fstack-check from CDEBUGFLAGS if you specify --enable-debug
(and you're using gcc).

1 dnl
2 dnl $Id: configure.in,v 1.44 2006/03/07 17:15:33 aonoto 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
14 dnl 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
15 dnl
16 dnl Maintainer: FreeWnn Project
17 dnl
18 dnl This program is free software; you can redistribute it and/or modify
19 dnl it under the terms of the GNU General Public License as published by
20 dnl the Free Software Foundation; either version 2 of the License, or
21 dnl (at your option) any later version.
22 dnl
23 dnl This program is distributed in the hope that it will be useful,
24 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
25 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 dnl GNU General Public License for more details.
27 dnl
28 dnl You should have received a copy of the GNU General Public License
29 dnl along with this program; if not, write to the Free Software
30 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 dnl
32
33 dnl
34 dnl Process this file with autoconf to produce a configure script.
35 dnl
36 dnl new AC_INIT do not work. I seem to make a mistake...
37 dnl AC_INIT("FreeWnn", "1.11-pl21", "freewnn-users-owner@lists.sourceforge.jp")
38 dnl AC_CONFIG_SRC_DIR(Wnn/conv/cvt_head.h)
39 AC_INIT(Wnn/conv/cvt_head.h)
40 AC_CONFIG_HEADER(config.h)
41
42 dnl ====================================================================
43 dnl Check optional features
44 dnl ====================================================================
45
46 # Quick and Dirty workaround for Autoconf-2.53 and Libtools-1.5 pair ...
47 # not to use additional tagged configuration. (default: CXX F77)
48 # NOTICE: Please remove next line if situation changes. (aono)
49 tagnames=
50
51 AC_CANONICAL_HOST
52
53 dnl build and install libraries, server or client
54
55 AC_ARG_ENABLE(debug,
56 [ --enable-debug enable debug options [[default=no]]],
57 [case "${enableval}" in
58 yes) debug=true ;;
59 no) debug=false ;;
60 *) AC_MSG_ERROR(bad value for --enable-debug)
61 esac], debug=false)
62
63 AC_ARG_ENABLE(libraries,
64 [ --enable-libraries build and install libraries [[default=yes]]],
65 [case "${enableval}" in
66 yes) libraries=true ;;
67 no) libraries=false ;;
68 *) AC_MSG_ERROR(bad value for --enable-libraries) ;;
69 esac], libraries=true)
70
71 AC_ARG_ENABLE(server,
72 [ --enable-server build and install server [[default=yes]]],
73 [case "${enableval}" in
74 yes) server=true ;;
75 no) server=false ;;
76 *) AC_MSG_ERROR(bad value for --enable-server) ;;
77 esac], server=true)
78
79 AC_ARG_ENABLE(client,
80 [ --enable-client build and install clients [[default=no]]],
81 [case "${enableval}" in
82 yes) client=true ;;
83 no) client=false ;;
84 *) AC_MSG_ERROR(bad value for --enable-client) ;;
85 esac], client=false)
86
87 AC_ARG_ENABLE(client-utmp,
88 [ --enable-client-utmp write utmp with client [[default=yes if not modern BSD]]],
89 [case "${enableval}" in
90 yes) client_utmp=true ;;
91 no) client_utmp=false ;;
92 *) AC_MSG_ERROR(bad value for --enable-client-utmp) ;;
93 esac],
94 client_utmp=auto
95 )
96
97 if test $libraries = true; then
98 SUBDIRS="\$(LIB_SUBDIRS)"
99 WNNMANDIR="\$(LIB_WNNMANDIR)"
100 fi
101 if test $server = true; then
102 SUBDIRS="$SUBDIRS \$(SERVER_SUBDIRS)"
103 WNNMANDIR="$WNNMANDIR \$(SERVER_WNNMANDIR)"
104 fi
105 if test $client = true; then
106 SUBDIRS="$SUBDIRS \$(CLIENT_SUBDIRS)"
107 dnl currently client is only uum and its man is in SERVER_WNNMANDIR
108 dnl WNNMANDIR=$WNNMANDIR \$(CLIENT_WNNMANDIR)"
109 fi
110
111 AC_SUBST(SUBDIRS)
112 AC_SUBST(WNNMANDIR)
113
114 dnl For Severs
115
116 AC_ARG_ENABLE(Wnn,
117 [ --enable-Wnn build and install Wnn [[default=yes]]],
118 [case "${enableval}" in
119 yes) Wnn="Wnn";;
120 no) Wnn="" ;;
121 *) AC_MSG_ERROR(bad value for --enable-Wnn) ;;
122 esac], Wnn="Wnn")
123 AC_SUBST(Wnn)
124
125 if test "$server" = true -a "$Wnn" = Wnn; then
126 # JSERVER_SUBDIRS1="\$(JSERVER_SUBDIRS1)"
127 JSERVER_SUBDIRS2="\$(JSERVER_SUBDIRS2)"
128 else
129 # JSERVER_SUBDIRS1=""
130 JSERVER_SUBDIRS2=""
131 fi
132 dnl AC_SUBST(JSERVER_SUBDIRS1)
133 AC_SUBST(JSERVER_SUBDIRS2)
134
135 AC_ARG_ENABLE(cWnn,
136 [ --enable-cWnn build and install cWnn [[default=yes]]],
137 [case "${enableval}" in
138 yes) cWnn="cWnn" ;;
139 no) cWnn="" ;;
140 *) AC_MSG_ERROR(bad value for --enable-cWnn) ;;
141 esac], cWnn="cWnn")
142 AC_SUBST(cWnn)
143
144 AC_ARG_ENABLE(kWnn,
145 [ --enable-kWnn build and install kWnn [[default=yes]]],
146 [case "${enableval}" in
147 yes) kWnn="kWnn" ;;
148 no) kWnn="" ;;
149 *) AC_MSG_ERROR(bad value for --enable-kWnn) ;;
150 esac], kWnn="kWnn")
151 AC_SUBST(kWnn)
152
153 dnl For a library libwnn
154
155 dnl AC_ARG_WITH(libwnn,
156 dnl [ --with-libwnn use installed Wnn library [default=no]],
157 dnl [case "${withval}" in
158 dnl yes|no) with_libwnn=${withval};;
159 dnl *) AC_MSG_ERROR(invalid argument to --with-libwnn) ;;
160 dnl esac], with_libwnn=no)
161 dnl
162
163 AC_ARG_WITH(libwnn,
164 [ --with-libwnn use installed Wnn library [[default=no]]],
165 [ with_libwnn="${withval}"
166 AC_ARG_WITH(wnn-includes,
167 [ --with-wnn-includes=DIR WNN include files are in DIR],
168 [wnnincludedir="-I${withval}"], [wnnincludedir=''])
169 AC_ARG_WITH(wnn-libraries,
170 [ --with-wnn-libraries=DIR Search for WNN libraries in DIR [[default=/usr/local/lib]]],
171 [wnnlibdir="${withval}"], [wnnlibdir='/usr/local/lib'])
172 if test "X${with_libwnn}" = X-lwnn; then
173 WNNJLIB="-L${wnnlibdir} -lwnn"
174 elif test X"`echo ${with_libwnn} | grep '^/.*'`" != X ; then
175 WNNJLIB="${with_libwnn}"
176 else
177 WNNJLIB="${wnnlibdir}/libwnn.a"
178 fi
179 DEPWNNJLIB=""
180 HINSI_DATA="\$(JWNNWNNDIR)/hinsi.data"
181 ],
182 [ WNNJLIB="\$(top_builddir)/Wnn/jlib/libwnn.la"
183 DEPWNNJLIB="\$(WNNJLIB)"
184 HINSI_DATA="\$(top_builddir)/Wnn/jd/hinsi.data"
185 ])
186 AC_SUBST(WNNJLIB)
187 AC_SUBST(DEPWNNJLIB)
188 AC_SUBST(HINSI_DATA)
189
190 AC_ARG_WITH(libcwnn,
191 [ --with-libcwnn use installed cWnn library [[default=no]]],
192 [
193 AC_ARG_WITH(cwnn-includes,
194 [ --with-cwnn-includes=DIR CWNN include files are in DIR],
195 [cwnnincludedir="-I${withval}"], [cwnnincludedir=''])
196 AC_ARG_WITH(cwnn-libraries,
197 [ --with-cwnn-libraries=DIR Search for CWNN libraries in DIR [[default=/usr/local/lib]]],
198 [cwnnlibdir="${withval}"], [cwnnlibdir='/usr/local/lib'])
199 if test "X${with_libcwnn}" = X-lcwnn; then
200 CWNNJLIB="-L${cwnnlibdir} -lcwnn"
201 elif test X"`echo ${with_libcwnn} | grep '^/.*'`" != X ; then
202 CWNNJLIB="${with_libcwnn}"
203 else
204 CWNNJLIB="${cwnnlibdir}/libcwnn.a"
205 fi
206 DEPCWNNJLIB=""
207 CHINSI_DATA="\$(CWNNWNNDIR)/cixing.data"
208 THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
209 ],
210 [ CWNNJLIB="\$(top_builddir)/cWnn/jlib/libcwnn.la"
211 DEPCWNNJLIB="\$(CWNNJLIB)"
212 CHINSI_DATA="\$(CWNNCDSRC)/cixing.data"
213 THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
214 ])
215 AC_SUBST(CWNNJLIB)
216 AC_SUBST(DEPCWNNJLIB)
217 AC_SUBST(CHINSI_DATA)
218 AC_SUBST(THINSI_DATA)
219
220 AC_ARG_WITH(libkwnn,
221 [ --with-libkwnn use installed kWnn library [[default=no]]],
222 [
223 AC_ARG_WITH(kwnn-includes,
224 [ --with-kwnn-includes=DIR KWNN include files are in DIR],
225 [kwnnincludedir="-I${withval}"], [kwnnincludedir=''])
226 AC_ARG_WITH(kwnn-libraries,
227 [ --with-kwnn-libraries=DIR Search for KWNN libraries in DIR [[default=/usr/local/lib]]],
228 [kwnnlibdir="${withval}"], [kwnnlibdir='/usr/local/lib'])
229 if test "X${with_libkwnn}" = X-lkwnn; then
230 KWNNJLIB="-L${kwnnlibdir} -lkwnn"
231 elif test X"`echo ${with_libkwnn} | grep '^/.*'`" != X ; then
232 KWNNJLIB="${with_libkwnn}"
233 else
234 KWNNJLIB="${kwnnlibdir}/libkwnn.a"
235 fi
236 DEPKWNNJLIB=""
237 KHINSI_DATA="\$(KWNNWNNDIR)/hinsi.data"
238 ],
239 [ KWNNJLIB="\$(top_builddir)/kWnn/jlib/libkwnn.la"
240 DEPKWNNJLIB="\$(KWNNJLIB)"
241 KHINSI_DATA="\$(KWNNKDSRC)/hinsi.data"
242 ])
243 AC_SUBST(KWNNJLIB)
244 AC_SUBST(DEPKWNNJLIB)
245 AC_SUBST(KHINSI_DATA)
246
247 dnl
248 dnl Build Options
249 dnl
250
251 AC_ARG_ENABLE(ipv6,
252 [ --enable-ipv6 build and install IPv6 [[default=no]]],
253 [case "${enableval}" in
254 yes) ipv6="-DINET6";;
255 no) ipv6="" ;;
256 *) AC_MSG_ERROR(bad value for --enable-ipv6) ;;
257 esac], ipv6="")
258 AC_SUBST(ipv6)
259
260 AC_ARG_ENABLE(unsafe-path,
261 [ --enable-unsafe-path allow creating files in an arbitrary path [[default=no]]],
262 [case "${enableval}" in
263 yes) unsafe_path=true;;
264 no) unsafe_path=false;;
265 *) AC_MSG_ERROR(bad value for --enable-unsafe-path) ;;
266 esac], unsafe_path=false)
267 AC_SUBST(unsafe_path)
268
269 if test ${unsafe_path} = true; then
270 AC_DEFINE(WNN_ALLOW_UNSAFE_PATH, 1,
271 [Define to allow writing to other than JSERVERDIR.])
272 fi
273
274 dnl
275 dnl Checks for cc and cpp.
276 dnl
277 AC_PROG_CC
278
279 dnl System specific options
280 dnl Now that we are using autoconf, CCOPTIONS should be nuked...
281 case $host in
282 *-*-linux*)
283 CCOPTIONS="-Dlinux -D_GNU_SOURCE -D_POSIX_SOURCE -D_BSD_SOURCE"
284 ;;
285 *-*-darwin*)
286 if test $GCC = yes; then
287 # Unfortunately, autoconf (at least 2.57) does not recognize
288 # proper CPP. (Normal cpp-precomp nor auto-retrying in basic mode does
289 # not work with pubdic+ processing.) So define here ....
290 # Note: It seems gcc-3.3 (or (probably) later) does not need this.
291 CPP=${CPP:-"$CC -E -no-cpp-precomp"}
292 fi
293 # Don't care other CC-s.
294 ;;
295 *-*-sunos*)
296 if test $GCC = yes; then
297 CCOPTIONS="-Dsun -Dsparc"
298 else
299 CCOPTIONS=""
300 fi
301 ;;
302 *-*-solaris2.*)
303 # Will 'solaris*' be OK?
304 if test $GCC = yes; then
305 CCOPTIONS="-Dsun -D`uname -p` -DSVR4 -DSYSV"
306 else
307 CCOPTIONS="-Xc -xF -xcg92 -Dsun -D`uname -p` -DSVR4 -DSYSV"
308 fi
309 ;;
310 *-*-hpux*)
311 if test $GCC = yes; then
312 CCOPTIONS="-Dhpux -DSYSV"
313 else
314 CCOPTIONS="-Ae -Dhpux -DSYSV"
315 fi
316 ;;
317 i[[34567]]86-pc-beos*)
318 CCOPTIONS="-DBEOS -D_POSIX_SOURCE -D_BSD_SOURCE"
319 ;;
320 powerpc-*-beos*)
321 CCOPTIONS="-DBEOS -D_POSIX_SOURCE -D_BSD_SOURCE"
322 ;;
323 *-*-aix*)
324 CCOPTIONS="-DSYSV"
325 ;;
326 *)
327 dnl AC_MSG_WARN("It is not reported if FreeWnn works on this system. But continuing...")
328 dnl 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 # FIXME: gcc -fstack-check doesn't work well on Linux/i386 ...
336 CDEBUGFLAGS=${CDEBUGFLAGS:-"-g2 -O2 -Wall"}
337 else
338 CDEBUGFLAGS=${CDEBUGFLAGS:-""}
339 fi
340 INSTPGMFLAGS=
341 else
342 CDEBUGFLAGS=${CDEBUGFLAGS:-""}
343 INSTPGMFLAGS="-s"
344 fi
345 AC_SUBST(CCOPTIONS)
346 AC_SUBST(CDEBUGFLAGS)
347 AC_SUBST(INSTPGMFLAGS)
348
349 echo "Set CDEBUGFLAGS and CCOPTIONS to following:"
350 echo ' CDEBUGFLAGS="'"$CDEBUGFLAGS"'"'
351 echo ' CCOPTIONS="'"$CCOPTIONS"'"'
352
353 dnl ��������������������������������configure������������CPP������������
354 dnl ������������������������������������CPP������������������������
355 dnl ��CPP=${CPP:-"/usr/ccs/lib/cpp"}������������������������������������
356 dnl ����������������
357 AC_PROG_CPP
358
359 dnl
360 dnl Checks for programs.
361 dnl
362 dnl ### AC_PROG_YACC
363 dnl ### AC_PROG_LEX
364 AC_PROG_INSTALL
365 AC_PROG_LN_S
366 AC_PROG_MAKE_SET
367 AC_PROG_LIBTOOL
368 AC_SUBST(LIBTOOL_DEPS)
369
370 dnl Checks for libraries.
371 dnl ### dnl Replace `main' with a function in -lX11:
372 dnl ### AC_CHECK_LIB(X11, main)
373 dnl ### dnl Replace `main' with a function in -lcurses:
374 dnl ### AC_CHECK_LIB(curses, main)
375
376 AC_SEARCH_LIBS(crypt, crypt)
377 AC_CHECK_LIB(socket, connect)
378 AC_CHECK_LIB(bind, getservbyname)
379 AC_CHECK_LIB(nsl, gethostbyname)
380 dnl libutil only needed by uum w/openpty...
381 dnl FIXME: deals with Linux that have both ptsname & openpty
382 AC_CHECK_LIB(util, openpty)
383
384 dnl
385 dnl Checks for header files.
386 dnl
387 AC_PATH_X
388 AC_HEADER_STDC
389 AC_HEADER_SYS_WAIT
390 AC_HEADER_TIME
391 AC_CHECK_HEADERS(fcntl.h syslog.h unistd.h utmp.h utmpx.h \
392 sys/file.h sys/ioctl.h sys/time.h sys/types.h sys/param.h \
393 malloc.h strings.h memory.h \
394 curses.h ncurses.h sgtty.h term.h termio.h termios.h \
395 termcap.h sys/termio.h libutil.h\
396 )
397
398 dnl
399 dnl Terminal library selection.
400 dnl ported from vim6.1 via canuum (Canna 3.6p3) for uum.
401 dnl FIXME: cross compilation
402 dnl
403 olibs="$LIBS"
404 CNVFILE_SUBDIR=bsd
405 AC_MSG_CHECKING(--with-term-libs argument)
406 AC_ARG_WITH(tlib,
407 [ --with-term-libs=-lLIB terminal library to be used ],)
408 if test -n "$with_term_libs"; then
409 AC_MSG_RESULT($with_term_libs)
410 dnl LIBS="$LIBS $with_term_libs"
411 TERMLIB=$with_term_libs
412 else
413 AC_MSG_RESULT([automatic terminal library selection])
414 dnl On HP-UX 10.10 termcap or termlib should be used instead of
415 dnl curses, because curses is much slower.
416 dnl Newer versions of ncurses are preferred over anything.
417 dnl Older versions of ncurses have bugs, get a new one!
418 dnl Digital Unix (OSF1) should use curses (Ronald Schild).
419 case "`uname -s 2>/dev/null`" in
420 OSF1) tlibs="ncurses curses termlib termcap";;
421 *) tlibs="ncurses termlib termcap curses";;
422 esac
423 for libname in $tlibs; do
424 AC_CHECK_LIB(${libname}, tgetent, [
425 dnl It's possible that a library is found but it doesn't work
426 dnl e.g., shared library that cannot be found.
427 dnl compile and run a test program to be sure
428 LIBS="${LIBS} -l${libname}"
429 AC_TRY_RUN([
430 #ifdef HAVE_TERMCAP_H
431 # include <termcap.h>
432 #endif
433 main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }],
434 res="OK", res="FAIL", res="FAIL")
435 if test "$res" = "OK"; then
436 TERMLIB="${TERMLIB} -l${libname}"
437 lname=translit(${libname}, 'a-z', 'A-Z')
438 AC_DEFINE(HAVE_${lname}, 1, [use ${libname} for terminal control])
439 break
440 fi
441 AC_MSG_RESULT($libname library is not usable)
442 ],)
443 LIBS=${olibs}
444 done
445 fi
446 if test "x$TERMLIB" != "x"; then
447 LIBS="${LIBS} ${TERMLIB}"
448 AC_MSG_CHECKING(whether we talk terminfo)
449 AC_TRY_RUN([
450 #ifdef HAVE_TERMCAP_H
451 # include <termcap.h>
452 #endif
453 main()
454 {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }],
455 [ AC_MSG_RESULT([no -- we are in termcap land])
456 CNVFILE_SUBDIR=bsd ],
457 [ AC_DEFINE(HAVE_TERMINFO, 1, [terminfo spoken here])
458 AC_MSG_RESULT([yes -- terminfo spoken here])
459 CNVFILE_SUBDIR=sysV ],
460 AC_MSG_ERROR(failed to compile test program.))
461 else
462 AC_MSG_RESULT(none found)
463 fi
464 LIBS=${olibs}
465 AC_SUBST(TERMLIB)
466 AC_SUBST(CNVFILE_SUBDIR)
467
468 dnl delayed check for --enable-client-utmp
469 if test $client = true; then
470 if test $client_utmp = auto; then
471 AC_EGREP_CPP(yes, [
472 #if HAVE_SYS_PARAM_H
473 # include <sys/param.h>
474 #endif
475 #if defined(BSD) && (BSD >= 199306)
476 yes
477 #endif
478 ], client_utmp=false, client_utmp=true)
479 fi
480
481 dnl for Debug
482 AC_MSG_CHECKING([whether we're using utmp with uum])
483 if test $client_utmp = true; then
484 dnl We need to look again if we introduce libspt check
485 AC_DEFINE(USE_UTMP, 1, [Define to 1 if uum writes utmp entry])
486 AC_MSG_RESULT(yes)
487 else
488 AC_MSG_RESULT(no)
489 fi
490 fi
491
492 dnl
493 dnl Checks for typedefs, structures, and compiler characteristics.
494 dnl
495 AC_TYPE_MODE_T
496 AC_HEADER_TIME
497
498 dnl AC_CHECK_TYPES(time_t,,
499 dnl AC_DEFINE(time_t, long, [Define missing time_t.]),
500 dnl [INCLUDES = time.h])
501 AC_CHECK_TYPES(socklen_t,,
502 AC_DEFINE(socklen_t, int, [Define missing socklen_t.]), [
503 #if HAVE_SYS_TYPES_H
504 # include <sys/types.h>
505 #endif
506 #include <sys/socket.h>])
507
508 AC_CHECK_MEMBERS([struct utmp.ut_user, struct utmp.ut_name],,,[
509 #include <sys/types.h>
510 #if HAVE_UTMPX_H
511 # include <utmpx.h>
512 #endif
513 #if HAVE_UTMP_H
514 # include <utmp.h>
515 #endif])
516
517 dnl
518 dnl Checks for symbol
519 dnl
520
521 dnl
522 dnl Checks for library functions.
523 dnl
524 AC_PROG_GCC_TRADITIONAL
525
526 dnl idea borrowed from EB Library http://www.sra.co.jp/people/m-kasahr/eb/
527 AC_TYPE_SIGNAL
528 if test "$ac_cv_type_signal" = void; then
529 AC_DEFINE(RETSIGTYPE_VOID, 1, [Define if the signal function returns void.])
530 fi
531
532 AC_FUNC_MEMCMP
533 AC_CHECK_FUNCS(getpgid getpgrp setpgrp wait3)
534 AC_FUNC_GETPGRP
535 AC_FUNC_SETPGRP
536 dnl FreeWnn do not use the 3rd parameter of wait3().
537 dnl AC_FUNC_WAIT3
538
539 dnl NOTE: FD_SET is defined as macro on many systems. But this check
540 dnl will be done in Wnn/include/wnn_os.h , so don't care...
541 AC_CHECK_FUNCS(random drand48 fchmod getopt killpg \
542 FD_SET \
543 gethostname select socket closesocket setsockopt send recv \
544 getdtablesize getrlimit syslog vsyslog setenv snprintf \
545 ptsname openpty pututxline pututline)
546 dnl for bcopy/index -> memcpy/strchr conversion (preparation):
547 AC_CHECK_FUNCS(bcopy bzero bcmp index rindex \
548 memcpy memmove memset strchr strrchr)
549
550 dnl Check fallback functions for jserver (should use AC_REPLACE_FUNCS?)
551 JS_SUPPORTOBJS=
552 AC_CHECK_FUNCS(mkdir vasprintf, ,
553 [JS_SUPPORTOBJS="${JS_SUPPORTOBJS} ${ac_func}.o"])
554 AC_SUBST(JS_SUPPORTOBJS)
555
556
557 dnl
558 dnl File Existence
559 dnl Checking file at compile time may bring false result when cross-
560 dnl compiling. So, one have to check generated config.h and edit it
561 dnl if necessary after running configure.
562 dnl
563 dnl AC_CHECK_FILE(/dev/ptmx, AC_DEFINE(HAVE_DEV_PTMX, 1, [/dev/ptmx found]),)
564 AC_CHECK_FILES(/dev/ptmx,,)
565
566
567 dnl
568 dnl FIXME: libspt support
569 dnl for example:
570 dnl
571 dnl --with-libspt[=/path/to/libspt-config]
572 dnl
573 dnl LIBSPT_CFLAGS=`/path/to/libspt-config --cflags`
574 dnl LIBSPT_LIBS=`/path/to/libspt-config --libs`
575 dnl AC_SUBST(LIBSPT_CFLAGS)
576 dnl AC_SUBST(LIBSPT_LIBS)
577 dnl AC_DEFINE(HAVE_LIBSPT, 1, [Define if you have libspt support.])
578
579 dnl
580 dnl TCP Wrapper.
581 dnl
582 WRAPLIB=
583 AC_MSG_CHECKING(whether to use libwrap)
584 AC_ARG_WITH(libwrap,
585 [ --with-libwrap[[=DIR]] Compile in libwrap (tcp_wrappers) support [[default=try to find libwrap]]],
586 [ case "$withval" in
587 no)
588 AC_MSG_RESULT(no)
589 WRAP_TRY=no
590 ;;
591 yes)
592 AC_MSG_RESULT(yes)
593 WRAP_TRY=yes
594 ;;
595 *)
596 AC_MSG_RESULT(yes)
597 WRAP_TRY=yes
598 if test -d "$withval"; then
599 WRAPINCLUDES="-I$withval"
600 if test -d $withval/include; then
601 WRAPINCLUDES="-I$withval/include $WRAPINCLUDES"
602 fi
603 WRAPLIB="-L$withval -lwrap"
604 if test -d $withval/lib; then
605 WRAPLIB="-L$withval/lib $WRAPLIB"
606 fi
607 else
608 WRAPINCLUDES="$withval"
609 fi
610 ;;
611 esac],
612 [AC_MSG_RESULT([try to find])
613 WRAP_TRY=auto]
614 )
615 # Link test for libwrap
616 if test "$WRAP_TRY" = yes -o "$WRAP_TRY" = auto; then
617 OLDCFLAGS="$CFLAGS"
618 CFLAGS="$WRAPINCLUDES $CFLAGS"
619 OLDLIBS="$LIBS"
620 WRAPLIB=${WRAPLIB:-"-lwrap"}
621 LIBS="$WRAPLIB $OLDLIBS"
622 AC_MSG_CHECKING([libwrap is working])
623 AC_TRY_LINK([ int allow_severity; int deny_severity; ],
624 [ hosts_access(); ],
625 [ AC_MSG_RESULT(yes)
626 AC_DEFINE(HAVE_LIBWRAP, 1,
627 [Define if you have libwrap (TCP wrapper) support.])
628 AC_SUBST(WRAPLIB)],
629 [ AC_MSG_RESULT(no)
630 if test "$WRAP_TRY" = yes; then
631 AC_MSG_ERROR([Could not find libwrap. Please check config.log.])
632 else
633 # recover old flag / clear needless WRAPLIB and continue
634 CFLAGS=$OLDCFLAGS
635 WRAPLIB=
636 fi] )
637 # only jserver needs libwrap, recover LIBS also
638 LIBS=$OLDLIBS
639 fi
640
641
642 dnl
643 dnl Creating Makefiles.
644 dnl
645 # mkdir -p Contrib/dic/gerodic in case builddir != srcdir
646 dir=Contrib/dic/gerodic
647 if test ! -d $dir; then
648 echo "creating $dir ..."
649 $ac_install_sh -d $dir
650 fi
651
652 dnl
653 dnl Generate Makefiles
654 dnl
655
656 dnl Generic
657
658 makefiles_generic="makerule.mk Makefile"
659
660 dnl Japanese
661
662 if test "x${Wnn}" = "xWnn"; then
663 makefiles_wnn="Wnn/Makefile Wnn/conv/Makefile Wnn/include/Makefile \
664 Wnn/jd/Makefile Wnn/jd/rk/Makefile Wnn/jd/rk.vi/Makefile \
665 Wnn/jlib/Makefile Wnn/jlib.V3/Makefile Wnn/jserver/Makefile \
666 Wnn/jutil/Makefile Wnn/ld/Makefile Wnn/ld/rk/Makefile \
667 Wnn/romkan/Makefile Wnn/uum/Makefile \
668 Wnn/man/Makefile Wnn/man/2.env/Makefile Wnn/man/3.libwnn/Makefile \
669 Wnn/man/4.cmd/Makefile Wnn/man/6.jutil/Makefile \
670 Wnn/man/2.env/dic/Makefile Wnn/man/2.env/wnn/Makefile \
671 Wnn/man/3.libwnn/jl_lib/Makefile Wnn/man/3.libwnn/js_lib/Makefile \
672 Wnn/man/3.libwnn/misc_lib/Makefile Wnn/man/3.libwnn/rk_lib/Makefile"
673 makefiles_wnn_dic="Contrib/dic/gerodic/Makefile Wnn/pubdicplus/Makefile \
674 Wnn/wnncons/Makefile Wnn/wnncons/dic/Makefile"
675 fi
676
677 dnl Chinese and Taiwanese
678
679 if test "x$cWnn" = "xcWnn"; then
680 makefiles_cwnn="cWnn/Makefile cWnn/conv/Makefile cWnn/etc/Makefile \
681 cWnn/cd/Makefile cWnn/cd/rk/Makefile \
682 cWnn/cd/rk_p/Makefile cWnn/cd/rk_z/Makefile \
683 cWnn/td/Makefile cWnn/td/rk/Makefile \
684 cWnn/td/rk_z/Makefile cWnn/td/rk_p/Makefile \
685 cWnn/include/Makefile cWnn/jlib/Makefile \
686 cWnn/jserver/Makefile cWnn/jutil/Makefile \
687 cWnn/man/Makefile cWnn/man/1.intro/Makefile cWnn/man/2.env/Makefile \
688 cWnn/man/4.cmd/Makefile cWnn/man/6.jutil/Makefile \
689 cWnn/romkan/Makefile cWnn/uum/Makefile"
690 makefiles_cwnn_dic="cWnn/cdic/Makefile cWnn/tdic/Makefile"
691 fi
692
693 dnl Korean
694
695 if test "x$kWnn" = "xkWnn"; then
696 makefiles_kwnn="kWnn/Makefile kWnn/conv/Makefile kWnn/etc/Makefile \
697 kWnn/include/Makefile kWnn/jlib/Makefile kWnn/jutil/Makefile \
698 kWnn/jserver/Makefile kWnn/kd/Makefile kWnn/kd/rk/Makefile \
699 kWnn/romkan/Makefile kWnn/uum/Makefile"
700 makefiles_kwnn_dic="kWnn/kdic/Makefile"
701 fi
702
703 AC_OUTPUT(${makefiles_generic} \
704 ${makefiles_wnn} ${makefiles_wnn_dic} \
705 ${makefiles_cwnn} ${makefiles_cwnn_dic} \
706 ${makefiles_kwnn} ${makefiles_kwnn_dic})

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