See ChangeLog, ChangeLog.en (too many lines to be listed here) Please note minimum security fixes had been updated after 1.10 was committed, so not really whole thing between 1.10 and 1.1.1-a021 - And more, a021 to a022 (CVS version) equivalent patches - Thus PKGNAME= ja-FreeWnn-{lib,server}-1.11alpha22 - DESTDIR support (That's why a022 patches added) - package structure adjusted from (-lib -dict -server -server-bin) to (-lib -server) for minimum modification from DISTFILE to pkgsrc. - some common VARIABLES have been moved to ja-freewnn-lib/Makefile.common ja-freewnn-dict/{DESCR,Makefile,PLIST} ja-freewnn-server-bin/{DESCR,Makefile} Removed ja-freewnn-lib/Makefile.common More variables moved in ja-freewnn-lib/patches 70 files added for a021 -> a022 updates ja-freewnn-server/PLIST - some executable moved sbin to bin by following line in Makefile +CONFIGURE_ARGS+= --disable-traditional-layout - 23 of dictionary files in share/wnn/ja_JP/dic moved from ja-freewnn-dict/PLIST to ja-freewnn-server/PLIST Thanks obache@ for correcting/proofreading for above Changes.
682 lines
20 KiB
Text
682 lines
20 KiB
Text
$NetBSD: patch-configure.in,v 1.1 2011/09/13 07:23:21 mef Exp $
|
||
|
||
(Almost) Automatic generation to sourceforge cvs Repository 2011/05/31
|
||
|
||
--- configure.in.orig 2005-11-27 17:30:23.000000000 +0000
|
||
+++ configure.in
|
||
@@ -10,7 +10,9 @@ dnl Copyright Kyoto University Research
|
||
dnl 1987, 1988, 1989, 1990, 1991, 1992
|
||
dnl Copyright OMRON Corporation. 1987, 1988, 1989, 1990, 1991, 1992, 1999
|
||
dnl Copyright ASTEC, Inc. 1987, 1988, 1989, 1990, 1991, 1992
|
||
-dnl Copyright FreeWnn Project 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||
+dnl Copyright FreeWnn Project
|
||
+dnl 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||
+dnl 2010, 2011
|
||
dnl
|
||
dnl Maintainer: FreeWnn Project
|
||
dnl
|
||
@@ -32,20 +34,26 @@ dnl
|
||
dnl
|
||
dnl Process this file with autoconf to produce a configure script.
|
||
dnl
|
||
-AC_INIT(Wnn/conv/cvt_head.h)
|
||
+AC_INIT(FreeWnn, [1.1.1-cvs-a022], [freewnn-users-owner@lists.sourceforge.jp], FreeWnn)
|
||
+AC_CONFIG_SRCDIR(Wnn/conv/cvt_head.h)
|
||
+dnl old-style AC_INIT ...
|
||
+dnl AC_INIT(Wnn/conv/cvt_head.h)
|
||
AC_CONFIG_HEADER(config.h)
|
||
|
||
dnl ====================================================================
|
||
dnl Check optional features
|
||
dnl ====================================================================
|
||
|
||
-# 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 ...
|
||
# not to use additional tagged configuration. (default: CXX F77)
|
||
# NOTICE: Please remove next line if situation changes. (aono)
|
||
tagnames=
|
||
|
||
AC_CANONICAL_HOST
|
||
|
||
+dnl
|
||
+AC_ARG_PROGRAM
|
||
+
|
||
dnl build and install libraries, server or client
|
||
|
||
AC_ARG_ENABLE(debug,
|
||
@@ -80,6 +88,46 @@ AC_ARG_ENABLE(client,
|
||
*) AC_MSG_ERROR(bad value for --enable-client) ;;
|
||
esac], client=false)
|
||
|
||
+AC_ARG_ENABLE(client-utmp,
|
||
+[ --enable-client-utmp write utmp with client [[default=yes if not modern BSD]]],
|
||
+[case "${enableval}" in
|
||
+ yes) client_utmp=true ;;
|
||
+ no) client_utmp=false ;;
|
||
+ *) AC_MSG_ERROR(bad value for --enable-client-utmp) ;;
|
||
+esac],
|
||
+client_utmp=auto
|
||
+)
|
||
+
|
||
+dnl If you set set-[ug]id user/group to (ex.) 'yes',
|
||
+dnl you can configure this with setting UUMOWNER / UUMGROUP .
|
||
+AC_ARG_ENABLE(client-setuid,
|
||
+[ --enable-client-setuid[[=user]] Install client with setuid and specified user [[default=guess if your system need this]]],
|
||
+[case "${enableval}" in
|
||
+ yes) client_setuid=true; UUMOWNER=${UUMOWNER:-root} ;;
|
||
+ no) client_setuid=false ;;
|
||
+ *) client_setuid=true; UUMOWNER=${enableval} ;;
|
||
+esac],
|
||
+[client_setuid=auto # guess later ...
|
||
+ UUMOWNER=root]
|
||
+)
|
||
+
|
||
+AC_ARG_ENABLE(client-setgid,
|
||
+[ --enable-client-setgid=group Install client with setgid and specified group [[default=guess if your system need this]]],
|
||
+[case "${enableval}" in
|
||
+ yes)
|
||
+ if test "x$UUMGROUP" = "x"; then
|
||
+ AC_ERROR([You must set group name with --enable-client-setgid.])
|
||
+ else
|
||
+ client_setgid=true; # we already defined UUMGROUP ...
|
||
+ fi
|
||
+ ;;
|
||
+ no) client_setgid=false ;;
|
||
+ *) client_setgid=true; UUMGROUP=${enableval} ;;
|
||
+esac],
|
||
+[client_setgid=auto # guess later ...
|
||
+UUMGROUP=]
|
||
+)
|
||
+
|
||
if test $libraries = true; then
|
||
SUBDIRS="\$(LIB_SUBDIRS)"
|
||
WNNMANDIR="\$(LIB_WNNMANDIR)"
|
||
@@ -138,96 +186,115 @@ AC_SUBST(kWnn)
|
||
|
||
dnl For a library libwnn
|
||
|
||
-dnl AC_ARG_WITH(libwnn,
|
||
-dnl [ --with-libwnn use installed Wnn library [default=no]],
|
||
-dnl [case "${withval}" in
|
||
-dnl yes|no) with_libwnn=${withval};;
|
||
-dnl *) AC_MSG_ERROR(invalid argument to --with-libwnn) ;;
|
||
-dnl esac], with_libwnn=no)
|
||
-dnl
|
||
-
|
||
AC_ARG_WITH(libwnn,
|
||
[ --with-libwnn use installed Wnn library [[default=no]]],
|
||
-[ with_libwnn="${withval}"
|
||
+[ with_libwnn="${withval}"], [with_libwnn=no])
|
||
AC_ARG_WITH(wnn-includes,
|
||
-[ --with-wnn-includes=DIR WNN include files are in DIR],
|
||
+[ --with-wnn-includes=DIR Installed Wnn include files are in DIR],
|
||
[wnnincludedir="-I${withval}"], [wnnincludedir=''])
|
||
AC_ARG_WITH(wnn-libraries,
|
||
-[ --with-wnn-libraries=DIR Search for WNN libraries in DIR [[default=/usr/local/lib]]],
|
||
+[ --with-wnn-libraries=DIR Search for Wnn libraries in DIR [[default=/usr/local/lib]]],
|
||
[wnnlibdir="${withval}"], [wnnlibdir='/usr/local/lib'])
|
||
- if test "X${with_libwnn}" = X-lwnn; then
|
||
- WNNJLIB="-L${wnnlibdir} -lwnn"
|
||
- elif test X"`echo ${with_libwnn} | grep '^/.*'`" != X ; then
|
||
- WNNJLIB="${with_libwnn}"
|
||
- else
|
||
- WNNJLIB="${wnnlibdir}/libwnn.a"
|
||
- fi
|
||
+
|
||
+if test X${with_libwnn} != Xno; then
|
||
+ case X${with_libwnn} in
|
||
+ Xyes | X-lwnn)
|
||
+ WNNJLIB="-L${wnnlibdir} -lwnn" ;;
|
||
+ X/*)
|
||
+ WNNJLIB="${wnnlibdir}/libwnn.a" ;;
|
||
+ *)
|
||
+ # Honor specified value --with-libwnn
|
||
+ # (maybe wrong in most cases)
|
||
+ WNNJLIB="${with_libwnn}" ;;
|
||
+ esac
|
||
DEPWNNJLIB=""
|
||
+ dnl NOTICE: HINSI_DATA depends on --prefix (and makerule.mk).
|
||
HINSI_DATA="\$(JWNNWNNDIR)/hinsi.data"
|
||
-],
|
||
-[ WNNJLIB="\$(top_builddir)/Wnn/jlib/libwnn.la"
|
||
+ EXTWNNJINC=${wnnincludedir}
|
||
+else
|
||
+ WNNJLIB="\$(top_builddir)/Wnn/jlib/libwnn.la"
|
||
DEPWNNJLIB="\$(WNNJLIB)"
|
||
HINSI_DATA="\$(top_builddir)/Wnn/jd/hinsi.data"
|
||
-])
|
||
+ EXTWNNJINC=""
|
||
+fi
|
||
AC_SUBST(WNNJLIB)
|
||
AC_SUBST(DEPWNNJLIB)
|
||
+AC_SUBST(EXTWNNJINC)
|
||
AC_SUBST(HINSI_DATA)
|
||
|
||
AC_ARG_WITH(libcwnn,
|
||
[ --with-libcwnn use installed cWnn library [[default=no]]],
|
||
-[
|
||
+[ with_libcwnn="${withval}"], [with_libcwnn=no])
|
||
AC_ARG_WITH(cwnn-includes,
|
||
-[ --with-cwnn-includes=DIR CWNN include files are in DIR],
|
||
+[ --with-cwnn-includes=DIR Installed cWnn include files are in DIR],
|
||
[cwnnincludedir="-I${withval}"], [cwnnincludedir=''])
|
||
AC_ARG_WITH(cwnn-libraries,
|
||
-[ --with-cwnn-libraries=DIR Search for CWNN libraries in DIR [[default=/usr/local/lib]]],
|
||
+[ --with-cwnn-libraries=DIR Search for cWnn libraries in DIR [[default=/usr/local/lib]]],
|
||
[cwnnlibdir="${withval}"], [cwnnlibdir='/usr/local/lib'])
|
||
- if test "X${with_libcwnn}" = X-lcwnn; then
|
||
- CWNNJLIB="-L${cwnnlibdir} -lcwnn"
|
||
- elif test X"`echo ${with_libcwnn} | grep '^/.*'`" != X ; then
|
||
- CWNNJLIB="${with_libcwnn}"
|
||
- else
|
||
- CWNNJLIB="${cwnnlibdir}/libcwnn.a"
|
||
- fi
|
||
+
|
||
+if test X${with_libcwnn} != Xno; then
|
||
+ case X${with_libcwnn} in
|
||
+ Xyes | X-lcwnn)
|
||
+ CWNNJLIB="-L${cwnnlibdir} -lcwnn" ;;
|
||
+ X/*)
|
||
+ CWNNJLIB="${cwnnlibdir}/libcwnn.a" ;;
|
||
+ *)
|
||
+ # Honor specified value --with-libcwnn
|
||
+ # (maybe wrong in most cases)
|
||
+ CWNNJLIB="${with_libcwnn}" ;;
|
||
+ esac
|
||
DEPCWNNJLIB=""
|
||
+ dnl NOTICE: [CT]HINSI_DATA also depends on --prefix (and makerule.mk).
|
||
CHINSI_DATA="\$(CWNNWNNDIR)/cixing.data"
|
||
- THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
|
||
-],
|
||
-[ CWNNJLIB="\$(top_builddir)/cWnn/jlib/libcwnn.la"
|
||
+ THINSI_DATA="\$(TWNNWNNDIR)/cixing.data"
|
||
+ EXTCWNNJINC=${cwnnincludedir}
|
||
+else
|
||
+ CWNNJLIB="\$(top_builddir)/cWnn/jlib/libcwnn.la"
|
||
DEPCWNNJLIB="\$(CWNNJLIB)"
|
||
CHINSI_DATA="\$(CWNNCDSRC)/cixing.data"
|
||
THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
|
||
-])
|
||
+ EXTCWNNJINC=""
|
||
+fi
|
||
AC_SUBST(CWNNJLIB)
|
||
AC_SUBST(DEPCWNNJLIB)
|
||
+AC_SUBST(EXTCWNNJINC)
|
||
AC_SUBST(CHINSI_DATA)
|
||
AC_SUBST(THINSI_DATA)
|
||
|
||
AC_ARG_WITH(libkwnn,
|
||
[ --with-libkwnn use installed kWnn library [[default=no]]],
|
||
-[
|
||
+[ with_libkwnn="${withval}"], [with_libkwnn=no])
|
||
AC_ARG_WITH(kwnn-includes,
|
||
-[ --with-kwnn-includes=DIR KWNN include files are in DIR],
|
||
+[ --with-kwnn-includes=DIR Installed kWnn include files are in DIR],
|
||
[kwnnincludedir="-I${withval}"], [kwnnincludedir=''])
|
||
AC_ARG_WITH(kwnn-libraries,
|
||
-[ --with-kwnn-libraries=DIR Search for KWNN libraries in DIR [[default=/usr/local/lib]]],
|
||
+[ --with-kwnn-libraries=DIR Search for kWnn libraries in DIR [[default=/usr/local/lib]]],
|
||
[kwnnlibdir="${withval}"], [kwnnlibdir='/usr/local/lib'])
|
||
- if test "X${with_libkwnn}" = X-lkwnn; then
|
||
- KWNNJLIB="-L${kwnnlibdir} -lkwnn"
|
||
- elif test X"`echo ${with_libkwnn} | grep '^/.*'`" != X ; then
|
||
- KWNNJLIB="${with_libkwnn}"
|
||
- else
|
||
- KWNNJLIB="${kwnnlibdir}/libkwnn.a"
|
||
- fi
|
||
+
|
||
+if test X${with_libkwnn} != Xno; then
|
||
+ case X${with_libkwnn} in
|
||
+ Xyes | X-lkwnn)
|
||
+ KWNNJLIB="-L${kwnnlibdir} -lkwnn" ;;
|
||
+ X/*)
|
||
+ KWNNJLIB="${kwnnlibdir}/libkwnn.a" ;;
|
||
+ *)
|
||
+ # Honor specified value --with-libkwnn
|
||
+ # (maybe wrong in most cases)
|
||
+ KWNNJLIB="${with_libkwnn}" ;;
|
||
+ esac
|
||
DEPKWNNJLIB=""
|
||
+ dnl NOTICE: KHINSI_DATA also depends on --prefix (and makerule.mk).
|
||
KHINSI_DATA="\$(KWNNWNNDIR)/hinsi.data"
|
||
-],
|
||
-[ KWNNJLIB="\$(top_builddir)/kWnn/jlib/libkwnn.la"
|
||
+ EXTKWNNJINC=${kwnnincludedir}
|
||
+else
|
||
+ KWNNJLIB="\$(top_builddir)/kWnn/jlib/libkwnn.la"
|
||
DEPKWNNJLIB="\$(KWNNJLIB)"
|
||
KHINSI_DATA="\$(KWNNKDSRC)/hinsi.data"
|
||
-])
|
||
+ EXTKWNNJINC=""
|
||
+fi
|
||
AC_SUBST(KWNNJLIB)
|
||
AC_SUBST(DEPKWNNJLIB)
|
||
+AC_SUBST(EXTKWNNJINC)
|
||
AC_SUBST(KHINSI_DATA)
|
||
|
||
dnl
|
||
@@ -258,25 +325,81 @@ if test ${unsafe_path} = true; then
|
||
fi
|
||
|
||
dnl
|
||
+dnl Install layout controlling
|
||
+dnl
|
||
+AC_ARG_ENABLE(traditional-layout,
|
||
+[ --enable-traditional-layout Install files in traditional directories [[default=yes]]],
|
||
+[case "${enableval}" in
|
||
+ yes) trad_layout=true ;;
|
||
+ no) trad_layout=false ;;
|
||
+ *) AC_MSG_ERROR([bad value for --enable-traditional-layout]) ;;
|
||
+esac], trad_layout=true)
|
||
+
|
||
+if test $trad_layout = "true"; then
|
||
+ WNNSBINDIR="\$(bindir)"
|
||
+ # More path settings will come later ...
|
||
+else
|
||
+ WNNSBINDIR="\$(sbindir)"
|
||
+ # Same as above.
|
||
+fi
|
||
+AC_SUBST(WNNSBINDIR)
|
||
+dnl Same as above.
|
||
+
|
||
+AC_ARG_ENABLE(sub-bindir,
|
||
+[ --enable-sub-bindir Install executables to (ex.) $(bindir)/Wnn4 [[default=yes if --enable-traditional-layout, no otherwise]]],
|
||
+[case "${enableval}" in
|
||
+ yes) sub_bindir=true ;;
|
||
+ no) sub_bindir=false ;;
|
||
+ *) AC_MSG_ERROR([bad value for --enable-sub-bindir]) ;;
|
||
+esac], sub_bindir=guess)
|
||
+
|
||
+if test $sub_bindir = "guess"; then
|
||
+ if test $trad_layout = "true"; then
|
||
+ sub_bindir=true
|
||
+ else
|
||
+ sub_bindir=false
|
||
+ fi
|
||
+fi
|
||
+if test $sub_bindir = "true"; then
|
||
+ if_enable_sub_bindir=' '
|
||
+ if_disable_sub_bindir='#'
|
||
+else
|
||
+ if_enable_sub_bindir='#'
|
||
+ if_disable_sub_bindir=' '
|
||
+fi
|
||
+AC_SUBST(if_enable_sub_bindir)
|
||
+AC_SUBST(if_disable_sub_bindir)
|
||
+
|
||
+# for debug
|
||
+AC_MSG_CHECKING([if we use traditional layout])
|
||
+if test $trad_layout = "true"; then
|
||
+ AC_MSG_RESULT(yes)
|
||
+else
|
||
+ AC_MSG_RESULT(no)
|
||
+fi
|
||
+
|
||
+AC_MSG_CHECKING([if we install binaries on \$(bindir)/Wnn4 (etc.)])
|
||
+if test $sub_bindir = "true"; then
|
||
+ AC_MSG_RESULT(yes)
|
||
+else
|
||
+ AC_MSG_RESULT(no)
|
||
+fi
|
||
+
|
||
+dnl
|
||
dnl Checks for cc and cpp.
|
||
dnl
|
||
AC_PROG_CC
|
||
|
||
dnl System specific options
|
||
dnl Now that we are using autoconf, CCOPTIONS should be nuked...
|
||
+dnl But please report if your system needs specific settings (CCOPTIONS etc.)
|
||
case $host in
|
||
*-*-linux*)
|
||
CCOPTIONS="-Dlinux -D_GNU_SOURCE -D_POSIX_SOURCE -D_BSD_SOURCE"
|
||
;;
|
||
-*-*-darwin*)
|
||
- if test $GCC = yes; then
|
||
- # Unfortunately, autoconf (at least 2.57) does not recognize
|
||
- # proper CPP. (Normal cpp-precomp nor auto-retrying in basic mode does
|
||
- # not work with pubdic+ processing.) So define here ....
|
||
- # Note: It seems gcc-3.3 (or (probably) later) does not need this.
|
||
- CPP=${CPP:-"$CC -E -no-cpp-precomp"}
|
||
- fi
|
||
- # Don't care other CC-s.
|
||
+*-*-*-gnu)
|
||
+ # Non-Linux kernel with GNU libc.
|
||
+ CCOPTIONS="-D_GNU_SOURCE"
|
||
;;
|
||
*-*-sunos*)
|
||
if test $GCC = yes; then
|
||
@@ -290,6 +413,7 @@ case $host in
|
||
if test $GCC = yes; then
|
||
CCOPTIONS="-Dsun -D`uname -p` -DSVR4 -DSYSV"
|
||
else
|
||
+ # TODO: need change for sparcv9 / x64 architecture ...
|
||
CCOPTIONS="-Xc -xF -xcg92 -Dsun -D`uname -p` -DSVR4 -DSYSV"
|
||
fi
|
||
;;
|
||
@@ -309,16 +433,13 @@ powerpc-*-beos*)
|
||
*-*-aix*)
|
||
CCOPTIONS="-DSYSV"
|
||
;;
|
||
-*)
|
||
-dnl AC_MSG_WARN("It is not reported if FreeWnn works on this system. But continuing...")
|
||
-dnl AC_MSG_WARN([(It may or may not work if you set CCOPTIONS properly.)])
|
||
- ;;
|
||
esac
|
||
|
||
dnl Checking if we use gcc or not
|
||
if test $debug = true; then
|
||
if test $GCC = yes; then
|
||
- CDEBUGFLAGS=${CDEBUGFLAGS:-"-g2 -O2 -Wall -fstack-check"}
|
||
+ # FIXME: gcc -fstack-check doesn't work well on Linux/i386 ...
|
||
+ CDEBUGFLAGS=${CDEBUGFLAGS:-"-g2 -O2 -Wall"}
|
||
else
|
||
CDEBUGFLAGS=${CDEBUGFLAGS:-""}
|
||
fi
|
||
@@ -341,6 +462,17 @@ dnl <20><>CPP=${CPP:-"/usr/ccs/lib/cpp"}<7D>פ<EFBFBD>
|
||
dnl <20>褤<EFBFBD>Ȼפ<C8BB><D7A4><EFBFBD><EFBFBD>롣
|
||
AC_PROG_CPP
|
||
|
||
+dnl Define cpp for text processing.
|
||
+AC_MSG_CHECKING([cpp for text processing])
|
||
+if test "$GCC" = "yes" -a "$CPP" = "$CC -E"; then
|
||
+ # Need checking your gcc accepts '-traditional-cpp' option?
|
||
+ FZK_PP=${FZK_PP:-"$CPP -traditional-cpp"}
|
||
+else
|
||
+ FZK_PP=${FZK_PP:-"$CPP"}
|
||
+fi
|
||
+AC_MSG_RESULT($FZK_PP)
|
||
+AC_SUBST(FZK_PP)
|
||
+
|
||
dnl
|
||
dnl Checks for programs.
|
||
dnl
|
||
@@ -352,21 +484,27 @@ AC_PROG_MAKE_SET
|
||
AC_PROG_LIBTOOL
|
||
AC_SUBST(LIBTOOL_DEPS)
|
||
|
||
+# Libtool-2.4 needs more powerful shell (other than /bin/sh),
|
||
+# so we explicitly use this SHELL directly.
|
||
+LIBTOOL_MOD=`echo $LIBTOOL | sed 's,\$(SHELL),'${SHELL}','`
|
||
+AC_SUBST(LIBTOOL_MOD)
|
||
+
|
||
dnl Checks for libraries.
|
||
dnl ### dnl Replace `main' with a function in -lX11:
|
||
dnl ### AC_CHECK_LIB(X11, main)
|
||
-dnl ### dnl Replace `main' with a function in -lcurses:
|
||
-dnl ### AC_CHECK_LIB(curses, main)
|
||
|
||
AC_SEARCH_LIBS(crypt, crypt)
|
||
AC_CHECK_LIB(socket, connect)
|
||
AC_CHECK_LIB(bind, getservbyname)
|
||
-AC_CHECK_LIB(nsl, gethostbyname)
|
||
+AC_SEARCH_LIBS(gethostbyname, nsl)
|
||
+dnl libutil only needed by uum w/openpty...
|
||
+dnl FIXME: deals with Linux that have both ptsname & openpty
|
||
+AC_CHECK_LIB(util, openpty)
|
||
|
||
dnl
|
||
dnl Checks for header files.
|
||
dnl
|
||
-AC_PATH_X
|
||
+dnl disabled for now ...: dnl AC_PATH_X
|
||
AC_HEADER_STDC
|
||
AC_HEADER_SYS_WAIT
|
||
AC_HEADER_TIME
|
||
@@ -374,9 +512,82 @@ AC_CHECK_HEADERS(fcntl.h syslog.h unistd
|
||
sys/file.h sys/ioctl.h sys/time.h sys/types.h sys/param.h \
|
||
malloc.h strings.h memory.h \
|
||
curses.h ncurses.h sgtty.h term.h termio.h termios.h \
|
||
+ termcap.h sys/termio.h libutil.h\
|
||
)
|
||
|
||
dnl
|
||
+dnl Terminal library selection.
|
||
+dnl ported from vim6.1 via canuum (Canna 3.6p3) for uum.
|
||
+dnl FIXME: cross compilation
|
||
+dnl
|
||
+olibs="$LIBS"
|
||
+CNVFILE_SUBDIR=bsd
|
||
+AC_MSG_CHECKING(--with-term-libs argument)
|
||
+AC_ARG_WITH(tlib,
|
||
+[ --with-term-libs=-lLIB terminal library to be used ],)
|
||
+if test -n "$with_term_libs"; then
|
||
+ AC_MSG_RESULT($with_term_libs)
|
||
+dnl LIBS="$LIBS $with_term_libs"
|
||
+ TERMLIB=$with_term_libs
|
||
+else
|
||
+ AC_MSG_RESULT([automatic terminal library selection])
|
||
+ dnl On HP-UX 10.10 termcap or termlib should be used instead of
|
||
+ dnl curses, because curses is much slower.
|
||
+ dnl Newer versions of ncurses are preferred over anything.
|
||
+ dnl Older versions of ncurses have bugs, get a new one!
|
||
+ dnl Digital Unix (OSF1) should use curses (Ronald Schild).
|
||
+ case "`uname -s 2>/dev/null`" in
|
||
+ OSF1) tlibs="ncurses curses termlib termcap";;
|
||
+ *) tlibs="ncurses termlib termcap curses";;
|
||
+ esac
|
||
+ for libname in $tlibs; do
|
||
+ AC_CHECK_LIB(${libname}, tgetent, [
|
||
+ dnl It's possible that a library is found but it doesn't work
|
||
+ dnl e.g., shared library that cannot be found.
|
||
+ dnl compile and run a test program to be sure
|
||
+ LIBS="${LIBS} -l${libname}"
|
||
+ AC_TRY_RUN([
|
||
+#ifdef HAVE_TERMCAP_H
|
||
+# include <termcap.h>
|
||
+#endif
|
||
+main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }],
|
||
+ res="OK", res="FAIL", res="FAIL")
|
||
+ if test "$res" = "OK"; then
|
||
+ TERMLIB="${TERMLIB} -l${libname}"
|
||
+ dnl lname=`echo ${libname} | sed 'y/termcaplibnus/TERMCAPLIBNUS/'`
|
||
+ dnl AC_DEFINE_UNQUOTED(HAVE_${lname}, 1, [use ${libname} for terminal control])
|
||
+ dnl We need to define AH_TEMPLATE (if we really need this)
|
||
+ dnl ex. AH_TEMPLATE(HAVE_NCURSES, [use ncurses for terminal control])
|
||
+ break
|
||
+ fi
|
||
+ AC_MSG_RESULT($libname library is not usable)
|
||
+ ],)
|
||
+ LIBS=${olibs}
|
||
+ done
|
||
+fi
|
||
+if test "x$TERMLIB" != "x"; then
|
||
+ LIBS="${LIBS} ${TERMLIB}"
|
||
+ AC_MSG_CHECKING(whether we talk terminfo)
|
||
+ AC_TRY_RUN([
|
||
+#ifdef HAVE_TERMCAP_H
|
||
+# include <termcap.h>
|
||
+#endif
|
||
+main()
|
||
+{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }],
|
||
+ [ AC_MSG_RESULT([no -- we are in termcap land])
|
||
+ CNVFILE_SUBDIR=bsd ],
|
||
+ [ AC_DEFINE(HAVE_TERMINFO, 1, [terminfo spoken here])
|
||
+ AC_MSG_RESULT([yes -- terminfo spoken here])
|
||
+ CNVFILE_SUBDIR=sysV ],
|
||
+ AC_MSG_ERROR(failed to compile test program.))
|
||
+else
|
||
+ AC_MSG_RESULT(none found)
|
||
+fi
|
||
+LIBS=${olibs}
|
||
+AC_SUBST(TERMLIB)
|
||
+AC_SUBST(CNVFILE_SUBDIR)
|
||
+
|
||
+dnl
|
||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||
dnl
|
||
AC_TYPE_MODE_T
|
||
@@ -392,6 +603,15 @@ AC_CHECK_TYPES(socklen_t,,
|
||
#endif
|
||
#include <sys/socket.h>])
|
||
|
||
+AC_CHECK_MEMBERS([struct utmp.ut_user, struct utmp.ut_name, struct utmp.ut_id],,,[
|
||
+#include <sys/types.h>
|
||
+#if HAVE_UTMPX_H
|
||
+# include <utmpx.h>
|
||
+#endif
|
||
+#if HAVE_UTMP_H
|
||
+# include <utmp.h>
|
||
+#endif])
|
||
+
|
||
dnl
|
||
dnl Checks for symbol
|
||
dnl
|
||
@@ -414,10 +634,13 @@ AC_FUNC_SETPGRP
|
||
dnl FreeWnn do not use the 3rd parameter of wait3().
|
||
dnl AC_FUNC_WAIT3
|
||
|
||
+dnl NOTE: FD_SET is defined as macro on many systems. But this check
|
||
+dnl will be done in Wnn/include/wnn_os.h , so don't care...
|
||
AC_CHECK_FUNCS(random drand48 fchmod getopt killpg \
|
||
FD_SET \
|
||
gethostname select socket closesocket setsockopt send recv \
|
||
- getdtablesize getrlimit syslog vsyslog setenv snprintf)
|
||
+ getdtablesize getrlimit syslog vsyslog setenv snprintf \
|
||
+ ptsname posix_openpt openpty pututxline pututline setsid)
|
||
dnl for bcopy/index -> memcpy/strchr conversion (preparation):
|
||
AC_CHECK_FUNCS(bcopy bzero bcmp index rindex \
|
||
memcpy memmove memset strchr strrchr)
|
||
@@ -428,6 +651,142 @@ AC_CHECK_FUNCS(mkdir vasprintf, ,
|
||
[JS_SUPPORTOBJS="${JS_SUPPORTOBJS} ${ac_func}.o"])
|
||
AC_SUBST(JS_SUPPORTOBJS)
|
||
|
||
+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) && !defined(HAVE_PUTUTXLINE) && !defined(HAVE_PUTUTLINE)
|
||
+ 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 delayed check for --enable-client-set[ug]id
|
||
+if test $client = true; then
|
||
+ guess_setuid=
|
||
+ guess_setgid=false
|
||
+ dnl Note: (HAVE_OPENPTY && defined(TIOCPTMGET)): for recent OpenBSD
|
||
+ if test $client_utmp = true; then
|
||
+ AC_EGREP_CPP(yes, [
|
||
+#if HAVE_SYS_IOCTL_H
|
||
+# include <sys/ioctl.h>
|
||
+#endif
|
||
+#if HAVE_PTSNAME || (HAVE_OPENPTY && defined(TIOCPTMGET))
|
||
+# if HAVE_PUTUTLINE || HAVE_PUTUTXLINE
|
||
+ yes
|
||
+# endif
|
||
+#endif
|
||
+ ], [
|
||
+ case $host_os in
|
||
+ linux*)
|
||
+ # On recent Linux, it has both ptsname() and putut*line().
|
||
+ # But putut*line() will take effect only if prog is installed
|
||
+ # with set-gid to group utmp.
|
||
+ guess_setgid=true
|
||
+ UUMGROUP=${UUMGROUP:-utmp}
|
||
+ ;;
|
||
+ esac
|
||
+ guess_setuid=false
|
||
+ ], guess_setuid=true)
|
||
+ else
|
||
+ # $client_utmp != true
|
||
+ AC_EGREP_CPP(yes, [
|
||
+#if HAVE_SYS_IOCTL_H
|
||
+# include <sys/ioctl.h>
|
||
+#endif
|
||
+#if HAVE_PTSNAME || (HAVE_OPENPTY && defined(TIOCPTMGET))
|
||
+ yes
|
||
+#endif
|
||
+ ], guess_setuid=false, guess_setuid=true)
|
||
+ fi
|
||
+ # $client_utmp != true
|
||
+
|
||
+ if test $client_setuid = auto; then
|
||
+ client_setuid=$guess_setuid
|
||
+ # UUMOWNER is already set ...
|
||
+ fi
|
||
+ if test $client_setgid = auto; then
|
||
+ client_setgid=$guess_setgid
|
||
+ # UUMGROUP is already set (if it needs)
|
||
+ fi
|
||
+
|
||
+ dnl set install flag (at last)
|
||
+ if test $client_setuid = true; then
|
||
+ INSTUUMFLAGS="-o \$(UUMOWNER)"
|
||
+ if test $client_setgid = true; then
|
||
+ INSTUUMFLAGS="-m 6711 $INSTUUMFLAGS -g \$(UUMGROUP)"
|
||
+ else
|
||
+ # client_setuid && !client_setgid
|
||
+ INSTUUMFLAGS="-m 4711 $INSTUUMFLAGS"
|
||
+ fi
|
||
+ else
|
||
+ if test $client_setgid = true; then
|
||
+ # !client_setuid && client_setgid
|
||
+ INSTUUMFLAGS="-m 2711 -g \$(UUMGROUP)"
|
||
+ else
|
||
+ # !client_setuid && !client_setgid
|
||
+ INSTUUMFLAGS="-m 0711"
|
||
+ fi
|
||
+ fi
|
||
+
|
||
+ dnl for Debug
|
||
+ AC_MSG_CHECKING([whether we need to install uum as setuid program])
|
||
+ if test $client_setuid = true; then
|
||
+ AC_MSG_RESULT([yes, $UUMOWNER])
|
||
+ else
|
||
+ AC_MSG_RESULT(no)
|
||
+ fi
|
||
+ AC_MSG_CHECKING([whether we need to install uum as setgid program])
|
||
+ if test $client_setgid = true; then
|
||
+ AC_MSG_RESULT([yes, $UUMGROUP])
|
||
+ else
|
||
+ AC_MSG_RESULT(no)
|
||
+ fi
|
||
+else
|
||
+# $client != true
|
||
+ INSTUUMFLAGS="-m 4711 -o \$(UUMOWNER)"
|
||
+fi
|
||
+# $client = true
|
||
+
|
||
+AC_SUBST(INSTUUMFLAGS)
|
||
+AC_SUBST(UUMOWNER)
|
||
+AC_SUBST(UUMGROUP)
|
||
+
|
||
+dnl
|
||
+dnl File Existence
|
||
+dnl Checking file at compile time may bring false result when cross-
|
||
+dnl compiling. So, one have to check generated config.h and edit it
|
||
+dnl if necessary after running configure.
|
||
+dnl
|
||
+dnl AC_CHECK_FILE(/dev/ptmx, AC_DEFINE(HAVE_DEV_PTMX, 1, [/dev/ptmx found]),)
|
||
+AC_CHECK_FILES(/dev/ptmx,,)
|
||
+
|
||
+
|
||
+dnl
|
||
+dnl FIXME: libspt support
|
||
+dnl for example:
|
||
+dnl
|
||
+dnl --with-libspt[=/path/to/libspt-config]
|
||
+dnl
|
||
+dnl LIBSPT_CFLAGS=`/path/to/libspt-config --cflags`
|
||
+dnl LIBSPT_LIBS=`/path/to/libspt-config --libs`
|
||
+dnl AC_SUBST(LIBSPT_CFLAGS)
|
||
+dnl AC_SUBST(LIBSPT_LIBS)
|
||
+dnl AC_DEFINE(HAVE_LIBSPT, 1, [Define if you have libspt support.])
|
||
|
||
dnl
|
||
dnl TCP Wrapper.
|