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.15 - (hide annotations) (download)
Mon Jun 18 09:09:20 2001 UTC (22 years, 9 months ago) by ura
Branch: MAIN
CVS Tags: freewnn-1-1-1-a018
Changes since 1.14: +186 -13 lines
FreeWnn-1.1.1-a018 is released.

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