| 10 |
dnl 1987, 1988, 1989, 1990, 1991, 1992 |
dnl 1987, 1988, 1989, 1990, 1991, 1992 |
| 11 |
dnl Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999 |
dnl Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999 |
| 12 |
dnl Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992 |
dnl Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992 |
| 13 |
dnl Copyright FreeWnn Project 1999, 2000, 2001, 2002, 2003 |
dnl Copyright FreeWnn Project 1999, 2000, 2001, 2002, 2003, 2004 |
| 14 |
dnl |
dnl |
| 15 |
dnl Maintainer: FreeWnn Project <freewnn@tomo.gr.jp> |
dnl Maintainer: FreeWnn Project <freewnn@tomo.gr.jp> |
| 16 |
dnl |
dnl |
| 39 |
dnl Check optional features |
dnl Check optional features |
| 40 |
dnl ==================================================================== |
dnl ==================================================================== |
| 41 |
|
|
| 42 |
|
# 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 |
AC_CANONICAL_HOST |
AC_CANONICAL_HOST |
| 48 |
|
|
| 49 |
dnl build and install libraries, server or client |
dnl build and install libraries, server or client |
| 269 |
CCOPTIONS="-Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE" |
CCOPTIONS="-Dlinux -D_POSIX_SOURCE -D_BSD_SOURCE" |
| 270 |
;; |
;; |
| 271 |
*-*-darwin*) |
*-*-darwin*) |
| 272 |
|
if test $GCC = yes; then |
| 273 |
# Unfortunately, autoconf (at least 2.57) does not recognize |
# Unfortunately, autoconf (at least 2.57) does not recognize |
| 274 |
# proper CPP. (Normal cpp-precomp nor auto-retrying in basic mode does |
# proper CPP. (Normal cpp-precomp nor auto-retrying in basic mode does |
| 275 |
# not work with pubdic+ processing.) So define here .... |
# not work with pubdic+ processing.) So define here .... |
| 276 |
CPP=${CPP:-"gcc -E -no-cpp-precomp"} |
# 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 |
;; |
;; |
| 281 |
*-*-sunos*) |
*-*-sunos*) |
| 282 |
if test $GCC = yes; then |
if test $GCC = yes; then |
| 432 |
dnl |
dnl |
| 433 |
dnl TCP Wrapper. |
dnl TCP Wrapper. |
| 434 |
dnl |
dnl |
| 435 |
|
WRAPLIB= |
| 436 |
AC_MSG_CHECKING(whether to use libwrap) |
AC_MSG_CHECKING(whether to use libwrap) |
| 437 |
AC_ARG_WITH(libwrap, |
AC_ARG_WITH(libwrap, |
| 438 |
[ --with-libwrap[=PATH] Compile in libwrap (tcp_wrappers) support.], |
[ --with-libwrap[[=DIR]] Compile in libwrap (tcp_wrappers) support [[default=try to find libwrap]]], |
| 439 |
[ case "$withval" in |
[ case "$withval" in |
| 440 |
no) |
no) |
| 441 |
AC_MSG_RESULT(no) |
AC_MSG_RESULT(no) |
| 442 |
|
WRAP_TRY=no |
| 443 |
;; |
;; |
| 444 |
yes) |
yes) |
| 445 |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(yes) |
| 446 |
AC_CHECK_LIB(wrap, request_init, [ |
WRAP_TRY=yes |
|
LIBS="-lwrap $LIBS" |
|
|
AC_DEFINE(HAVE_LIBWRAP, 1, |
|
|
[Define libwrap (TCP Wrapper) support.]) ]) |
|
|
CFLAGS="-DHAVE_LIBWRAP $CFLAGS" |
|
| 447 |
;; |
;; |
| 448 |
*) |
*) |
| 449 |
AC_MSG_RESULT(yes) |
AC_MSG_RESULT(yes) |
| 450 |
|
WRAP_TRY=yes |
| 451 |
if test -d "$withval"; then |
if test -d "$withval"; then |
| 452 |
WRAPINCLUDES="-I$withval" |
WRAPINCLUDES="-I$withval" |
| 453 |
WRAPLIBS="-L$withval -lwrap" |
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 |
else |
else |
| 461 |
WRAPINCLUDES="$withval" |
WRAPINCLUDES="$withval" |
| 462 |
fi |
fi |
|
OLDLIBS="$LIBS" |
|
|
CFLAGS="-DHAVE_LIBWRAP $WRAPINCLUDES $CFLAGS" |
|
|
LIBS="$WRAPLIBS $LIBS" |
|
|
|
|
|
AC_TRY_LINK([ int allow_severity; int deny_severity; ], |
|
|
[ hosts_access(); ], |
|
|
[], |
|
|
[ AC_MSG_ERROR(Could not find the $withval library. You must first install tcp_wrappers.) ]) |
|
| 463 |
;; |
;; |
| 464 |
esac ], |
esac ], |
| 465 |
AC_MSG_RESULT(no) |
[AC_MSG_RESULT([try to find]) |
| 466 |
|
WRAP_TRY=auto] |
| 467 |
) |
) |
| 468 |
|
# 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 |
|
|
| 494 |
|
|
| 495 |
dnl |
dnl |
| 496 |
dnl Creating Makefiles. |
dnl Creating Makefiles. |
| 497 |
dnl |
dnl |
| 498 |
# mkdir -p Contrib/dic/gerodic in case builddir != srcdir |
# mkdir -p Contrib/dic/gerodic in case builddir != srcdir |
| 499 |
for dir in Contrib Contrib/dic Contrib/dic/gerodic; do |
dir=Contrib/dic/gerodic |
| 500 |
if test ! -d $dir; then |
if test ! -d $dir; then |
| 501 |
echo "creating $dir ..." |
echo "creating $dir ..." |
| 502 |
mkdir $dir |
$ac_install_sh -d $dir |
| 503 |
fi |
fi |
|
done |
|
| 504 |
|
|
| 505 |
dnl |
dnl |
| 506 |
dnl Generate Makefiles |
dnl Generate Makefiles |