1
dnl Process this file with autoconf to produce a configure script.
2
dnl $Id: configure.in,v 1.7.2.1 2003/02/23 13:50:21 amura Exp $
3
AC_REVISION($Revision: 1.7.2.1 $)
5
AC_CONFIG_HEADER(sysconfig.h:sys/unix/sysconfig.h.in)
6
AC_CONFIG_AUX_DIR(sys/unix)
8
dnl Checks for programs.
14
dnl Don't strip if we don't have it
15
AC_CHECK_PROG(STRIP, strip, strip, :)
17
dnl Set default value for CFLAGS if none is defined or it's empty
18
if test -z "$USER_CFLAGS"; then
20
test "$GCC" = yes && CFLAGS="-O2"
27
dnl Checks for libraries.
28
dnl Search tgetstr() in termcap, termlib, curses
30
[ --with-terminfo Build with terminfo library.],
31
[ts_with_terminfo="yes"], [ts_with_terminfo="no"])
33
[ --with-termcap Build with termcap library. (default)],
34
[ts_with_terminfo="no"])
35
if test "$ts_with_terminfo" = "yes"; then
36
AC_SEARCH_LIBS(tgetstr, curses ncurses termlib)
38
AC_SEARCH_LIBS(tgetstr, termcap curses ncurses)
41
dnl Checks for header files.
45
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h termio.h termios.h sgtty.h unistd.h sys/param.h)
47
dnl Checks for typedefs, structures, and compiler characteristics.
53
dnl CYGWIN has fd_set, but cannot detect it by AC_CHECK_TYPE
54
if test "$host_os" != "cygwin"; then
55
AC_CHECK_TYPE(fd_set, int)
57
dnl Minix define SIGTSTP but don't have suspend yet...
58
dnl I want to use $host_os, but cannot use it because Minix's sed has bug...
61
AC_DEFINE(UNDEF_SIGTSTP, 1);;
64
dnl Checks for library functions.
66
AC_PROG_GCC_TRADITIONAL
70
AC_CHECK_FUNCS(getcwd rmdir rename opendir select mkstemp bcopy bzero bcmp)
71
AC_CHECK_FUNCS(rindex symlink dup2 sigprocmask getgroups)
73
dnl Checks for commands called from dired
74
AC_PATH_PROG(cp_cmd, cp)
75
AC_DEFINE_UNQUOTED(CP_CMD, "$cp_cmd")
76
AC_PATH_PROG(mv_cmd, mv)
77
AC_DEFINE_UNQUOTED(MV_CMD, "$mv_cmd")
78
AC_PATH_PROG(ls_cmd, ls)
79
AC_DEFINE_UNQUOTED(LS_CMD, "$ls_cmd")
80
AC_PATH_PROG(rmdir_cmd, rmdir)
81
AC_DEFINE_UNQUOTED(RMDIR_CMD, "$rmdir_cmd")
83
dnl If the user wants canna support.
84
AC_MSG_CHECKING(if --enable-canna option specified)
86
[ --enable-canna[=DIR] Build a canna version.],
87
[cv_canna="yes"; cannapath=$enableval], [cv_canna="no"])
88
AC_MSG_RESULT($cv_canna)
89
if test "$cv_canna" = "yes"; then
91
dnl Some operating system include canna libraries by default.
92
dnl Use that pathname by default.
93
dnl for freebsd2.*, order DOES matter. don't bother.
94
if test "$cannapath" = "yes"; then
97
cannapath="/usr/contrib/canna";;
99
cannapath="/usr/pkg";;
101
cannapath="/usr/local";;
103
cannapath="/usr/local/canna";;
105
cannapath="/usr/local";;
107
cannapath="/usr/local/canna";;
111
if test "$cannapath" != "yes"; then
112
CFLAGS="-I$cannapath/include $CFLAGS"
113
LDFLAGS="-L$cannapath/lib $LDFLAGS"
116
dnl we use AC_TRY_COMPILE not AC_CHECK_HEADER, to avoid unnecessery
117
dnl use of CPPFLAGS. (why?)
118
AC_MSG_CHECKING(for canna/jrkanji.h)
119
AC_CACHE_VAL(ac_cv_cannahdrcheck, [dnl
120
AC_TRY_COMPILE([#include <canna/jrkanji.h>], jrKanjiStatus ks;,
121
[ac_cv_cannahdrcheck="yes"], [ac_cv_cannahdrcheck="no"])])
122
AC_MSG_RESULT($ac_cv_cannahdrcheck)
123
if test "$cannahdrcheck" = "no"; then
124
echo -n "Fatal error: no canna header in suggested path"
125
if test "$cannapath" != "yes"; then
126
echo ", $cannapath/include."
133
AC_CHECK_LIB(canna, jrKanjiControl,
134
[cv_cannalibcheck="yes"], [cv_cannalibcheck="no"])
135
if test "$cannalibcheck" = "no"; then
136
echo "Fatal error: no canna library in suggested path"
137
if test "$cannapath" != "yes"; then
138
echo ", $cannapath/lib."
148
AC_OUTPUT(Makefile:sys/unix/Makefile.in)