| 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 |
dnl Copyright FreeWnn Project |
| 14 |
dnl 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
dnl 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 |
| 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... |
AC_INIT(FreeWnn, [1.1.1-cvs-a022], [freewnn-users-owner@lists.sourceforge.jp], FreeWnn) |
| 37 |
dnl AC_INIT("FreeWnn", "1.11-pl21", "freewnn-users-owner@lists.sourceforge.jp") |
AC_CONFIG_SRCDIR(Wnn/conv/cvt_head.h) |
| 38 |
dnl AC_CONFIG_SRC_DIR(Wnn/conv/cvt_head.h) |
dnl old-style AC_INIT ... |
| 39 |
AC_INIT(Wnn/conv/cvt_head.h) |
dnl AC_INIT(Wnn/conv/cvt_head.h) |
| 40 |
AC_CONFIG_HEADER(config.h) |
AC_CONFIG_HEADER(config.h) |
| 41 |
|
|
| 42 |
dnl ==================================================================== |
dnl ==================================================================== |
| 43 |
dnl Check optional features |
dnl Check optional features |
| 44 |
dnl ==================================================================== |
dnl ==================================================================== |
| 45 |
|
|
| 46 |
# Quick and Dirty workaround for Autoconf-2.53 and Libtools-1.5 pair ... |
# Quick and Dirty workaround for Autoconf-2.53 and Libtools-1.5.* pair ... |
| 47 |
# not to use additional tagged configuration. (default: CXX F77) |
# not to use additional tagged configuration. (default: CXX F77) |
| 48 |
# NOTICE: Please remove next line if situation changes. (aono) |
# NOTICE: Please remove next line if situation changes. (aono) |
| 49 |
tagnames= |
tagnames= |
| 94 |
client_utmp=auto |
client_utmp=auto |
| 95 |
) |
) |
| 96 |
|
|
| 97 |
|
dnl If you set set-[ug]id user/group to (ex.) 'yes', |
| 98 |
|
dnl you can configure this with setting UUMOWNER / UUMGROUP . |
| 99 |
|
AC_ARG_ENABLE(client-setuid, |
| 100 |
|
[ --enable-client-setuid[[=user]] Install client with setuid and specified user [[default=guess if your system need this]]], |
| 101 |
|
[case "${enableval}" in |
| 102 |
|
yes) client_setuid=true; UUMOWNER=${UUMOWNER:-root} ;; |
| 103 |
|
no) client_setuid=false ;; |
| 104 |
|
*) client_setuid=true; UUMOWNER=${enableval} ;; |
| 105 |
|
esac], |
| 106 |
|
[client_setuid=auto # guess later ... |
| 107 |
|
UUMOWNER=root] |
| 108 |
|
) |
| 109 |
|
|
| 110 |
|
AC_ARG_ENABLE(client-setgid, |
| 111 |
|
[ --enable-client-setgid=group Install client with setgid and specified group [[default=guess if your system need this]]], |
| 112 |
|
[case "${enableval}" in |
| 113 |
|
yes) |
| 114 |
|
if test "x$UUMGROUP" = "x"; then |
| 115 |
|
AC_ERROR([You must set group name with --enable-client-setgid.]) |
| 116 |
|
else |
| 117 |
|
client_setgid=true; # we already defined UUMGROUP ... |
| 118 |
|
fi |
| 119 |
|
;; |
| 120 |
|
no) client_setgid=false ;; |
| 121 |
|
*) client_setgid=true; UUMGROUP=${enableval} ;; |
| 122 |
|
esac], |
| 123 |
|
[client_setgid=auto # guess later ... |
| 124 |
|
UUMGROUP=] |
| 125 |
|
) |
| 126 |
|
|
| 127 |
if test $libraries = true; then |
if test $libraries = true; then |
| 128 |
SUBDIRS="\$(LIB_SUBDIRS)" |
SUBDIRS="\$(LIB_SUBDIRS)" |
| 129 |
WNNMANDIR="\$(LIB_WNNMANDIR)" |
WNNMANDIR="\$(LIB_WNNMANDIR)" |
| 494 |
AC_SUBST(TERMLIB) |
AC_SUBST(TERMLIB) |
| 495 |
AC_SUBST(CNVFILE_SUBDIR) |
AC_SUBST(CNVFILE_SUBDIR) |
| 496 |
|
|
|
dnl delayed check for --enable-client-utmp |
|
|
if test $client = true; then |
|
|
if test $client_utmp = auto; then |
|
|
AC_EGREP_CPP(yes, [ |
|
|
#if HAVE_SYS_PARAM_H |
|
|
# include <sys/param.h> |
|
|
#endif |
|
|
#if defined(BSD) && (BSD >= 199306) |
|
|
yes |
|
|
#endif |
|
|
], client_utmp=false, client_utmp=true) |
|
|
fi |
|
|
|
|
|
dnl for Debug |
|
|
AC_MSG_CHECKING([whether we're using utmp with uum]) |
|
|
if test $client_utmp = true; then |
|
|
dnl We need to look again if we introduce libspt check |
|
|
AC_DEFINE(USE_UTMP, 1, [Define to 1 if uum writes utmp entry]) |
|
|
AC_MSG_RESULT(yes) |
|
|
else |
|
|
AC_MSG_RESULT(no) |
|
|
fi |
|
|
fi |
|
|
|
|
|
dnl |
|
| 497 |
dnl Checks for typedefs, structures, and compiler characteristics. |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 498 |
dnl |
dnl |
| 499 |
AC_TYPE_MODE_T |
AC_TYPE_MODE_T |
| 557 |
[JS_SUPPORTOBJS="${JS_SUPPORTOBJS} ${ac_func}.o"]) |
[JS_SUPPORTOBJS="${JS_SUPPORTOBJS} ${ac_func}.o"]) |
| 558 |
AC_SUBST(JS_SUPPORTOBJS) |
AC_SUBST(JS_SUPPORTOBJS) |
| 559 |
|
|
| 560 |
|
dnl delayed check for --enable-client-utmp |
| 561 |
|
if test $client = true; then |
| 562 |
|
if test $client_utmp = auto; then |
| 563 |
|
AC_EGREP_CPP(yes, [ |
| 564 |
|
#if HAVE_SYS_PARAM_H |
| 565 |
|
# include <sys/param.h> |
| 566 |
|
#endif |
| 567 |
|
#if defined(BSD) && (BSD >= 199306) && !defined(HAVE_PUTUTXLINE) && !defined(HAVE_PUTUTLINE) |
| 568 |
|
yes |
| 569 |
|
#endif |
| 570 |
|
], client_utmp=false, client_utmp=true) |
| 571 |
|
fi |
| 572 |
|
|
| 573 |
|
dnl for Debug |
| 574 |
|
AC_MSG_CHECKING([whether we're using utmp with uum]) |
| 575 |
|
if test $client_utmp = true; then |
| 576 |
|
dnl We need to look again if we introduce libspt check |
| 577 |
|
AC_DEFINE(USE_UTMP, 1, [Define to 1 if uum writes utmp entry]) |
| 578 |
|
AC_MSG_RESULT(yes) |
| 579 |
|
else |
| 580 |
|
AC_MSG_RESULT(no) |
| 581 |
|
fi |
| 582 |
|
fi |
| 583 |
|
|
| 584 |
|
dnl delayed check for --enable-client-set[ug]id |
| 585 |
|
if test $client = true; then |
| 586 |
|
guess_setuid= |
| 587 |
|
guess_setgid=false |
| 588 |
|
dnl Note: (HAVE_OPENPTY && defined(TIOCPTMGET)): for recent OpenBSD |
| 589 |
|
if test $client_utmp = true; then |
| 590 |
|
AC_EGREP_CPP(yes, [ |
| 591 |
|
#if HAVE_SYS_IOCTL_H |
| 592 |
|
# include <sys/ioctl.h> |
| 593 |
|
#endif |
| 594 |
|
#if HAVE_PTSNAME || (HAVE_OPENPTY && defined(TIOCPTMGET)) |
| 595 |
|
# if HAVE_PUTUTLINE || HAVE_PUTUTXLINE |
| 596 |
|
yes |
| 597 |
|
# endif |
| 598 |
|
#endif |
| 599 |
|
], [ |
| 600 |
|
case $host_os in |
| 601 |
|
linux*) |
| 602 |
|
# On recent Linux, it has both ptsname() and putut*line(). |
| 603 |
|
# But putut*line() will take effect only if prog is installed |
| 604 |
|
# with set-gid to group utmp. |
| 605 |
|
guess_setgid=true |
| 606 |
|
UUMGROUP=${UUMGROUP:-utmp} |
| 607 |
|
;; |
| 608 |
|
esac |
| 609 |
|
guess_setuid=false |
| 610 |
|
], guess_setuid=true) |
| 611 |
|
else |
| 612 |
|
# $client_utmp != true |
| 613 |
|
AC_EGREP_CPP(yes, [ |
| 614 |
|
#if HAVE_SYS_IOCTL_H |
| 615 |
|
# include <sys/ioctl.h> |
| 616 |
|
#endif |
| 617 |
|
#if HAVE_PTSNAME || (HAVE_OPENPTY && defined(TIOCPTMGET)) |
| 618 |
|
yes |
| 619 |
|
#endif |
| 620 |
|
], guess_setuid=false, guess_setuid=true) |
| 621 |
|
fi |
| 622 |
|
# $client_utmp != true |
| 623 |
|
|
| 624 |
|
if test $client_setuid = auto; then |
| 625 |
|
client_setuid=$guess_setuid |
| 626 |
|
# UUMOWNER is already set ... |
| 627 |
|
fi |
| 628 |
|
if test $client_setgid = auto; then |
| 629 |
|
client_setgid=$guess_setgid |
| 630 |
|
# UUMGROUP is already set (if it needs) |
| 631 |
|
fi |
| 632 |
|
|
| 633 |
|
dnl set install flag (at last) |
| 634 |
|
if test $client_setuid = true; then |
| 635 |
|
INSTUUMFLAGS="-o \$(UUMOWNER)" |
| 636 |
|
if test $client_setgid = true; then |
| 637 |
|
INSTUUMFLAGS="-m 6711 $INSTUUMFLAGS -g \$(UUMGROUP)" |
| 638 |
|
else |
| 639 |
|
# client_setuid && !client_setgid |
| 640 |
|
INSTUUMFLAGS="-m 4711 $INSTUUMFLAGS" |
| 641 |
|
fi |
| 642 |
|
else |
| 643 |
|
if test $client_setgid = true; then |
| 644 |
|
# !client_setuid && client_setgid |
| 645 |
|
INSTUUMFLAGS="-m 2711 -g \$(UUMGROUP)" |
| 646 |
|
else |
| 647 |
|
# !client_setuid && !client_setgid |
| 648 |
|
INSTUUMFLAGS="-m 0711" |
| 649 |
|
fi |
| 650 |
|
fi |
| 651 |
|
|
| 652 |
|
dnl for Debug |
| 653 |
|
AC_MSG_CHECKING([whether we need to install uum as setuid program]) |
| 654 |
|
if test $client_setuid = true; then |
| 655 |
|
AC_MSG_RESULT([yes, $UUMOWNER]) |
| 656 |
|
else |
| 657 |
|
AC_MSG_RESULT(no) |
| 658 |
|
fi |
| 659 |
|
AC_MSG_CHECKING([whether we need to install uum as setgid program]) |
| 660 |
|
if test $client_setgid = true; then |
| 661 |
|
AC_MSG_RESULT([yes, $UUMGROUP]) |
| 662 |
|
else |
| 663 |
|
AC_MSG_RESULT(no) |
| 664 |
|
fi |
| 665 |
|
else |
| 666 |
|
# $client != true |
| 667 |
|
INSTUUMFLAGS="-m 4711 -o \$(UUMOWNER)" |
| 668 |
|
fi |
| 669 |
|
# $client = true |
| 670 |
|
|
| 671 |
|
AC_SUBST(INSTUUMFLAGS) |
| 672 |
|
AC_SUBST(UUMOWNER) |
| 673 |
|
AC_SUBST(UUMGROUP) |
| 674 |
|
|
| 675 |
|
dnl |
| 676 |
|
|
| 677 |
dnl |
dnl |
| 678 |
dnl File Existence |
dnl File Existence |