1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
dnl configure.in for cvs
dnl "$CVSid$"
AC_INIT(src/cvs.h)
AC_PREREQ(2.4)dnl Required Autoconf version.
AC_CONFIG_HEADER(config.h src/options.h)
AC_PROG_CC
AC_AIX
AC_MINIX
AC_ISC_POSIX
if test "$ISC" = yes; then
CFLAGS="$CFLAGS -D_SYSV3"
LIBS="-lcrypt $LIBS"
fi
AC_PREFIX_PROGRAM(cvs)
AC_C_CROSS
AC_C_CONST
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_YACC
AC_PROG_MAKE_SET
AC_PATH_PROG(perl_path, perl, no)
AC_PATH_PROG(csh_path, csh, no)
AC_SYS_INTERPRETER
if test X"$ac_cv_sys_interpreter" != X"yes" ; then
# silly trick to avoid problems in AC macros...
ac_msg='perl scripts using #! may not be invoked properly'
AC_MSG_WARN($ac_msg)
fi
AC_HEADER_STDC
AC_CHECK_HEADERS(errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
sys/param.h sys/select.h sys/time.h sys/timeb.h \
io.h direct.h sys/bsdtypes.h sys/resource.h)
AC_HEADER_SYS_WAIT
AC_HEADER_STAT
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_TYPE_SIGNAL
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_REPLACE_FUNCS(getwd mkdir rename strdup strstr dup2 strerror valloc waitpid vasprintf strtoul)
AC_CHECK_FUNCS(fchmod fsync ftime mkfifo putenv setvbuf vfork vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock)
dnl
dnl Look for shadow password files before we go ahead and set getspnam.
dnl On some systems (Linux), the C library has getspnam but shadow
dnl passwords might not be in use.
dnl
AC_MSG_CHECKING([for evidence of shadow passwords])
if test -f /etc/shadow \
|| test -f /etc/security/passwd.adjunct \
|| test -d /etc/security ; then
echo "yup"
AC_CHECK_LIB(sec, getspnam)
AC_CHECK_FUNCS(getspnam)
else
echo "nope"
fi
AC_CHECK_FUNC(re_exec, :, LIBOBJS="$LIBOBJS regex.o")
AC_FUNC_UTIME_NULL
AC_SYS_LONG_FILE_NAMES
AC_MSG_CHECKING([for working fnmatch function])
AC_CACHE_VAL(ccvs_cv_sys_working_fnmatch,
[AC_TRY_RUN([
#include <fnmatch.h>
int
main ()
{
exit ((fnmatch ("a", "a", FNM_PATHNAME) == 0
&& fnmatch ("a", "b", FNM_PATHNAME) == FNM_NOMATCH)
? 0 : 1);
}],
ccvs_cv_sys_working_fnmatch=yes,
ccvs_cv_sys_working_fnmatch=no,
ccvs_cv_sys_working_fnmatch=no)])
if test $ccvs_cv_sys_working_fnmatch = no; then
LIBOBJS="$LIBOBJS fnmatch.o"
fi
AC_MSG_RESULT($ccvs_cv_sys_working_fnmatch)
dnl
dnl set $(KRB4) from --with-krb4=value -- WITH_KRB4
dnl
KRB4=/usr/kerberos
define(WITH_KRB4,[
AC_ARG_WITH([krb4],
[ --with-krb4=value set default \$(KRB4) from value],
[KRB4=$withval],
)dnl
echo "default place for krb4 is $KRB4"
AC_SUBST(KRB4)])dnl
WITH_KRB4
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
krb_h=
AC_MSG_CHECKING([for krb.h])
AC_TRY_LINK([#include <krb.h>],[int i;],
[krb_h=yes krb_incdir=],
[if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -I$KRB4/include"
AC_TRY_LINK([#include <krb.h>],[int i;],
[krb_h=yes krb_incdir=$KRB4/include])
CFLAGS=$hold_cflags
fi])
if test -z "$krb_h"; then
AC_TRY_LINK([#include <krb.h>],[int i;],
[krb_h=yes krb_incdir=],
[if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
AC_TRY_LINK([#include <krb.h>],[int i;],
[krb_h=yes krb_incdir=$KRB4/include/kerberosIV])
CFLAGS=$hold_cflags
fi])
fi
AC_MSG_RESULT($krb_h)
if test -n "$krb_h"; then
krb_lib=
AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=],
[if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
krb_lib=yes krb_libdir=$KRB4/lib
fi])
if test -n "$krb_lib"; then
AC_DEFINE(HAVE_KERBEROS)
test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
LIBS="${LIBS} -lkrb"
# Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
# -ldes in the command line. Don't do it permanently so that we honor
# the user's setting for LDFLAGS
hold_ldflags=$LDFLAGS
test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
AC_CHECK_LIB(des,printf,[LIBS="${LIBS} -ldes"])
LDFLAGS=$hold_ldflags
if test -n "$krb_incdir"; then
includeopt="${includeopt} -I$krb_incdir"
AC_SUBST(includeopt)
fi
fi
fi
AC_CHECK_FUNCS(krb_get_err_text)
dnl
dnl Use --with-encryption to turn on encryption support
dnl
AC_ARG_ENABLE(encryption,
[ --enable-encryption enable encryption support],
[case "${enableval}" in
yes) encryption=true ;;
no) encryption=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for encryption option) ;;
esac],
[encryption=false])
if test "$encryption" = "true"; then
AC_DEFINE(ENCRYPTION)
fi
# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
# libsocket.so which has a bad implementation of gethostbyname (it
# only looks in /etc/hosts), so we only look for -lsocket if we need
# it.
unset ac_cv_func_connect
AC_CHECK_FUNC(connect, :,
[case "$LIBS" in
*-lnsl*) ;;
*) AC_CHECK_LIB(nsl_s, printf) ;;
esac
case "$LIBS" in
*-lnsl*) ;;
*) AC_CHECK_LIB(nsl, printf) ;;
esac
case "$LIBS" in
*-lsocket*) ;;
*) AC_CHECK_LIB(socket, connect) ;;
esac
case "$LIBS" in
*-linet*) ;;
*) AC_CHECK_LIB(inet, connect) ;;
esac
unset ac_cv_func_connect
AC_CHECK_FUNCS(connect)])
AC_CHECK_FUNC(gethostname, :, LIBOBJS="$LIBOBJS hostname.o")
# If we have connect(), we want the full client & server arrangement.
if test "$ac_cv_func_connect" = yes; then
AC_DEFINE(CLIENT_SUPPORT)
AC_DEFINE(SERVER_SUPPORT)
# Define AUTH_SERVER_SUPPORT only if we could locate the crypt() function
unset ac_cv_func_crypt
AC_CHECK_FUNC(crypt, :,
[case "$LIBS" in
*-lcrypt*) ;;
*) AC_CHECK_LIB(crypt, crypt) ;;
esac
unset ac_cv_func_crypt
AC_CHECK_FUNCS(crypt)])
if test "$ac_cv_func_crypt" = yes; then
AC_DEFINE(AUTH_SERVER_SUPPORT)
fi
fi
test -f src/options.h && (
AC_MSG_WARN(saving ./src/options.h in ./src/options.h-SAVED)
AC_MSG_WARN(You may wish to check that local options have not been lost.)
AC_MSG_WARN(Do not re-run ./configure or ./config.status until you have....)
cp ./src/options.h ./src/options.h-SAVED
)
AC_OUTPUT(Makefile lib/Makefile src/Makefile zlib/Makefile doc/Makefile \
man/Makefile tools/Makefile tools/pcl-cvs/Makefile \
contrib/Makefile contrib/elib/Makefile \
windows-NT/Makefile os2/Makefile macintosh/Makefile vms/Makefile \
stamp-h)
|