summaryrefslogtreecommitdiffstats
path: root/src/appl/bsd/configure.in
blob: b68eeb59f39b0d262d3644b855bf02c449a7daaa (plain)
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
AC_INIT(krlogind.c)
CONFIG_RULES
AC_PROG_INSTALL
dnl dbm libs for use of an_to_ln
AC_CHECK_LIB(util,main)
AC_CHECK_LIB(crypt,crypt)
dnl
dnl AIX has them all; SCO might too
LOGINLIBS=
AC_CHECK_LIB(odm,main,
  AC_CHECK_LIB(s,main,
    AC_CHECK_LIB(cfg,main, 
      LOGINLIBS="-lodm -ls -lcfg" 
      )))
dnl
dnl Make our operating system-specific security checks and definitions for
dnl login.
dnl
case $krb5_cv_host in
alpha-dec-osf*)
	AC_CHECK_LIB(security,main,
		AC_DEFINE(HAVE_SETLUID)
		LOGINLIBS="$LOGINLIBS -lsecurity"
	)
	;;
esac
dnl
AC_SUBST(LOGINLIBS)
dnl
AC_VFORK
AC_TYPE_MODE_T
AC_FUNC_CHECK(strsave,AC_DEFINE(HAS_STRSAVE))
AC_FUNC_CHECK(utimes,AC_DEFINE(HAS_UTIMES))
AC_FUNC_CHECK(getutent,AC_DEFINE(HAVE_GETUTENT))
AC_FUNC_CHECK(setreuid,AC_DEFINE(HAVE_SETREUID))
AC_FUNC_CHECK(gettosbyname,AC_DEFINE(HAVE_GETTOSBYNAME))
AC_FUNC_CHECK(killpg,AC_DEFINE(HAVE_KILLPG))
AC_FUNC_CHECK(initgroups,AC_DEFINE(HAVE_INITGROUPS))
AC_FUNC_CHECK(setpriority,AC_DEFINE(HAVE_SETPRIORITY))
AC_FUNC_CHECK(setreuid,AC_DEFINE(HAVE_SETREUID))
AC_FUNC_CHECK(setresuid,AC_DEFINE(HAVE_SETRESUID))
AC_FUNC_CHECK(waitpid,AC_DEFINE(HAVE_WAITPID))
AC_FUNC_CHECK(setsid,AC_DEFINE(HAVE_SETSID))
AC_FUNC_CHECK(ttyname,AC_DEFINE(HAVE_TTYNAME))
AC_FUNC_CHECK(line_push,AC_DEFINE(HAVE_LINE_PUSH))
AC_FUNC_CHECK(ptsname,AC_DEFINE(HAVE_PTSNAME))
AC_FUNC_CHECK(grantpt,AC_DEFINE(HAVE_GRANTPT))
AC_FUNC_CHECK(openpty,AC_DEFINE(HAVE_OPENPTY))
AC_FUNC_CHECK(setlogin,AC_DEFINE(HAVE_SETLOGIN))
AC_FUNC_CHECK(logwtmp,AC_DEFINE(HAVE_LOGWTMP))
AC_CHECK_HEADERS(unistd.h stdlib.h string.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h)
AC_REPLACE_FUNCS(getdtablesize)
DECLARE_SYS_ERRLIST
KRB5_SIGTYPE
CHECK_SIGNALS
CHECK_SETJMP
CHECK_DIRENT
CHECK_WAIT_TYPE
AC_HEADER_CHECK(termios.h,AC_FUNC_CHECK(cfsetispeed,AC_DEFINE(POSIX_TERMIOS)))
CHECK_UTMP
dnl
dnl Check for where the BSD rlogin, rcp, and rsh programs live.
dnl
save_path=$PATH
AC_PROG_ECHO_N
PATH=/bin:/usr/bin:/usr/bsd:/usr/ucb
AC_PATH_PROG(UCB_RLOGIN,rlogin,/usr/ucb/rlogin)
AC_PATH_PROG(UCB_RSH,rsh,/usr/ucb/rsh)
AC_PATH_PROG(UCB_RCP,rcp,/usr/ucb/rcp)
PATH=$save_path
AC_PROG_ECHO_N
dnl
dnl
AC_MSG_CHECKING([streams interface])
AC_CACHE_VAL(krb5_cv_has_streams,
[AC_TRY_COMPILE(
[#include <sys/stream.h>
#include <sys/stropts.h>], [],
krb5_cv_has_streams=yes, krb5_cv_has_streams=no)])
AC_MSG_RESULT($krb5_cv_has_streams)
if test $krb5_cv_has_streams = yes; then
AC_DEFINE(HAVE_STREAMS)
fi
dnl
dnl
AC_MSG_CHECKING([F_SETOWN])
AC_CACHE_VAL(krb5_cv_f_setown,
[AC_TRY_COMPILE(
[#include <sys/types.h>
#include <fcntl.h>], [1+F_SETOWN;],
krb5_cv_f_setown=yes,krb5_cv_f_setown=no)])
AC_MSG_RESULT($krb5_cv_f_setown)
if test $krb5_cv_f_setown = yes; then
AC_DEFINE(HAVE_SETOWN)
fi
dnl
dnl
AC_MSG_CHECKING([setenv])
AC_CACHE_VAL(krb5_cv_setenv,
[AC_TRY_LINK(
[],[setenv("PATH","/bin",0);],
krb5_cv_setenv=yes,krb5_cv_setenv=no)])
AC_MSG_RESULT($krb5_cv_setenv)
if test $krb5_cv_setenv = no; then
SETENVSRC=setenv.c
SETENVOBJ=setenv.o
AC_SUBST([SETENVSRC])
AC_SUBST([SETENVOBJ])
fi
dnl
dnl
AC_MSG_CHECKING([arguments to getpgrp])
AC_CACHE_VAL(krb5_cv_getpgrp_args,
[AC_TRY_COMPILE(
[#ifndef __STDC__
#define __STDC__ 1
#endif
#include <unistd.h>
#include <sys/types.h>], [pid_t pid = getpgrp(getpid())],
krb5_cv_getpgrp_args=pid, krb5_cv_getpgrp_args=void)])
AC_MSG_RESULT($krb5_cv_getpgrp_args)
if test $krb5_cv_getpgrp_args = pid; then
AC_DEFINE(GETPGRP_ONEARG)
fi
dnl
dnl
AC_MSG_CHECKING([number of arguments to setpgrp])
AC_CACHE_VAL(krb5_cv_setpgrp_args,
[AC_TRY_COMPILE(
[#ifndef __STDC__
#define __STDC__ 1
#endif
#include <unistd.h>],[setpgrp(0,0)],
krb5_cv_setpgrp_args=two, krb5_cv_setpgrp_args=void)])
AC_MSG_RESULT($krb5_cv_setpgrp_args)
if test $krb5_cv_setpgrp_args = two; then
AC_DEFINE(SETPGRP_TWOARG)
fi
dnl
dnl
AC_MSG_CHECKING([shadow password support])
AC_CACHE_VAL(krb5_cv_shadow_pwd,
[AC_TRY_LINK(
[#include <sys/types.h>
#include <pwd.h>
#include <shadow.h>],
[struct spwd *sp = getspnam("root")],
krb5_cv_shadow_pwd=yes, krb5_cv_shadow_pwd=no)])
AC_MSG_RESULT($krb5_cv_shadow_pwd)
if test $krb5_cv_shadow_pwd = yes; then
AC_DEFINE(HAVE_SHADOW)
fi
dnl
dnl
ADD_DEF(-DKERBEROS)
AC_CONST
USE_KADM_LIBRARY
USE_KRB4_LIBRARY
KRB5_LIBRARIES
V5_USE_SHARED_LIB
V5_AC_OUTPUT_MAKEFILE