| 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, 2004, 2005 |
dnl Copyright FreeWnn Project |
| 14 |
|
dnl 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
| 15 |
dnl |
dnl |
| 16 |
dnl Maintainer: FreeWnn Project |
dnl Maintainer: FreeWnn Project |
| 17 |
dnl |
dnl |
| 33 |
dnl |
dnl |
| 34 |
dnl Process this file with autoconf to produce a configure script. |
dnl Process this file with autoconf to produce a configure script. |
| 35 |
dnl |
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) |
AC_INIT(Wnn/conv/cvt_head.h) |
| 40 |
AC_CONFIG_HEADER(config.h) |
AC_CONFIG_HEADER(config.h) |
| 41 |
|
|
| 366 |
AC_CHECK_LIB(socket, connect) |
AC_CHECK_LIB(socket, connect) |
| 367 |
AC_CHECK_LIB(bind, getservbyname) |
AC_CHECK_LIB(bind, getservbyname) |
| 368 |
AC_CHECK_LIB(nsl, gethostbyname) |
AC_CHECK_LIB(nsl, gethostbyname) |
| 369 |
|
dnl libutil only needed by uum w/openpty... |
| 370 |
|
dnl FIXME: deals with Linux that have both ptsname & openpty |
| 371 |
|
AC_CHECK_LIB(util, openpty) |
| 372 |
|
|
| 373 |
dnl |
dnl |
| 374 |
dnl Checks for header files. |
dnl Checks for header files. |
| 381 |
sys/file.h sys/ioctl.h sys/time.h sys/types.h sys/param.h \ |
sys/file.h sys/ioctl.h sys/time.h sys/types.h sys/param.h \ |
| 382 |
malloc.h strings.h memory.h \ |
malloc.h strings.h memory.h \ |
| 383 |
curses.h ncurses.h sgtty.h term.h termio.h termios.h \ |
curses.h ncurses.h sgtty.h term.h termio.h termios.h \ |
| 384 |
|
termcap.h sys/termio.h libutil.h\ |
| 385 |
) |
) |
| 386 |
|
|
| 387 |
dnl |
dnl |
| 388 |
|
dnl Terminal library selection. |
| 389 |
|
dnl ported from vim6.1 via canuum (Canna 3.6p3) for uum. |
| 390 |
|
dnl FIXME: cross compilation |
| 391 |
|
dnl |
| 392 |
|
olibs="$LIBS" |
| 393 |
|
AC_MSG_CHECKING(--with-term-libs argument) |
| 394 |
|
AC_ARG_WITH(tlib, |
| 395 |
|
[ --with-term-libs=-lLIB terminal library to be used ],) |
| 396 |
|
if test -n "$with_term_libs"; then |
| 397 |
|
AC_MSG_RESULT($with_term_libs) |
| 398 |
|
dnl LIBS="$LIBS $with_term_libs" |
| 399 |
|
TERMLIB=$with_term_libs |
| 400 |
|
else |
| 401 |
|
AC_MSG_RESULT([automatic terminal library selection]) |
| 402 |
|
dnl On HP-UX 10.10 termcap or termlib should be used instead of |
| 403 |
|
dnl curses, because curses is much slower. |
| 404 |
|
dnl Newer versions of ncurses are preferred over anything. |
| 405 |
|
dnl Older versions of ncurses have bugs, get a new one! |
| 406 |
|
dnl Digital Unix (OSF1) should use curses (Ronald Schild). |
| 407 |
|
case "`uname -s 2>/dev/null`" in |
| 408 |
|
OSF1) tlibs="ncurses curses termlib termcap";; |
| 409 |
|
*) tlibs="ncurses termlib termcap curses";; |
| 410 |
|
esac |
| 411 |
|
for libname in $tlibs; do |
| 412 |
|
AC_CHECK_LIB(${libname}, tgetent, [ |
| 413 |
|
dnl It's possible that a library is found but it doesn't work |
| 414 |
|
dnl e.g., shared library that cannot be found. |
| 415 |
|
dnl compile and run a test program to be sure |
| 416 |
|
LIBS="${LIBS} -l${libname}" |
| 417 |
|
AC_TRY_RUN([ |
| 418 |
|
#ifdef HAVE_TERMCAP_H |
| 419 |
|
# include <termcap.h> |
| 420 |
|
#endif |
| 421 |
|
main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }], |
| 422 |
|
res="OK", res="FAIL", res="FAIL") |
| 423 |
|
if test "$res" = "OK"; then |
| 424 |
|
TERMLIB="${TERMLIB} -l${libname}" |
| 425 |
|
lname=translit(${libname}, 'a-z', 'A-Z') |
| 426 |
|
AC_DEFINE(HAVE_${lname}, 1, [use ${libname} for terminal control]) |
| 427 |
|
break |
| 428 |
|
fi |
| 429 |
|
AC_MSG_RESULT($libname library is not usable) |
| 430 |
|
],) |
| 431 |
|
LIBS=${olibs} |
| 432 |
|
done |
| 433 |
|
fi |
| 434 |
|
if test "x$TERMLIB" != "x"; then |
| 435 |
|
LIBS="${LIBS} ${TERMLIB}" |
| 436 |
|
AC_MSG_CHECKING(whether we talk terminfo) |
| 437 |
|
AC_TRY_RUN([ |
| 438 |
|
#ifdef HAVE_TERMCAP_H |
| 439 |
|
# include <termcap.h> |
| 440 |
|
#endif |
| 441 |
|
main() |
| 442 |
|
{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }], |
| 443 |
|
AC_MSG_RESULT([no -- we are in termcap land]), |
| 444 |
|
[ AC_DEFINE(HAVE_TERMINFO, 1, [terminfo spoken here]) |
| 445 |
|
AC_MSG_RESULT([yes -- terminfo spoken here]) ], |
| 446 |
|
AC_MSG_ERROR(failed to compile test program.)) |
| 447 |
|
else |
| 448 |
|
AC_MSG_RESULT(none found) |
| 449 |
|
fi |
| 450 |
|
LIBS=${olibs} |
| 451 |
|
AC_SUBST(TERMLIB) |
| 452 |
|
|
| 453 |
|
|
| 454 |
|
dnl |
| 455 |
dnl Checks for typedefs, structures, and compiler characteristics. |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 456 |
dnl |
dnl |
| 457 |
AC_TYPE_MODE_T |
AC_TYPE_MODE_T |
| 489 |
dnl FreeWnn do not use the 3rd parameter of wait3(). |
dnl FreeWnn do not use the 3rd parameter of wait3(). |
| 490 |
dnl AC_FUNC_WAIT3 |
dnl AC_FUNC_WAIT3 |
| 491 |
|
|
| 492 |
|
dnl NOTE: FD_SET is defined as macro on many systems. But this check |
| 493 |
|
dnl will be done in Wnn/include/wnn_os.h , so don't care... |
| 494 |
AC_CHECK_FUNCS(random drand48 fchmod getopt killpg \ |
AC_CHECK_FUNCS(random drand48 fchmod getopt killpg \ |
| 495 |
FD_SET \ |
FD_SET \ |
| 496 |
gethostname select socket closesocket setsockopt send recv \ |
gethostname select socket closesocket setsockopt send recv \ |
| 497 |
getdtablesize getrlimit syslog vsyslog setenv snprintf) |
getdtablesize getrlimit syslog vsyslog setenv snprintf \ |
| 498 |
|
ptsname openpty) |
| 499 |
dnl for bcopy/index -> memcpy/strchr conversion (preparation): |
dnl for bcopy/index -> memcpy/strchr conversion (preparation): |
| 500 |
AC_CHECK_FUNCS(bcopy bzero bcmp index rindex \ |
AC_CHECK_FUNCS(bcopy bzero bcmp index rindex \ |
| 501 |
memcpy memmove memset strchr strrchr) |
memcpy memmove memset strchr strrchr) |
| 508 |
|
|
| 509 |
|
|
| 510 |
dnl |
dnl |
| 511 |
|
dnl File Existence |
| 512 |
|
dnl Checking file at compile time may bring false result when cross- |
| 513 |
|
dnl compiling. So, one have to check generated config.h and edit it |
| 514 |
|
dnl if necessary after running configure. |
| 515 |
|
dnl |
| 516 |
|
dnl AC_CHECK_FILE(/dev/ptmx, AC_DEFINE(HAVE_DEV_PTMX, 1, [/dev/ptmx found]),) |
| 517 |
|
AC_CHECK_FILES(/dev/ptmx,,) |
| 518 |
|
|
| 519 |
|
|
| 520 |
|
dnl |
| 521 |
|
dnl FIXME: libspt support |
| 522 |
|
dnl for example: |
| 523 |
|
dnl |
| 524 |
|
dnl --with-libspt[=/path/to/libspt-config] |
| 525 |
|
dnl |
| 526 |
|
dnl LIBSPT_CFLAGS=`/path/to/libspt-config --cflags` |
| 527 |
|
dnl LIBSPT_LIBS=`/path/to/libspt-config --libs` |
| 528 |
|
dnl AC_SUBST(LIBSPT_CFLAGS) |
| 529 |
|
dnl AC_SUBST(LIBSPT_LIBS) |
| 530 |
|
dnl AC_DEFINE(HAVE_LIBSPT, 1, [Define if you have libspt support.]) |
| 531 |
|
|
| 532 |
|
dnl |
| 533 |
dnl TCP Wrapper. |
dnl TCP Wrapper. |
| 534 |
dnl |
dnl |
| 535 |
WRAPLIB= |
WRAPLIB= |