forked from squash/sudosh2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
146 lines (129 loc) · 3.88 KB
/
configure.in
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.5)
AC_INIT(sudosh2, [1.0.6], [josh@shortcutsolutions.net])
AC_CONFIG_SRCDIR([src/])
AC_CANONICAL_SYSTEM
# Override default
test "$sysconfdir" = '${prefix}/etc' && sysconfdir='/etc'
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE(sudosh2, 1.0.6)
AC_PROG_CC
recordinput=0
AC_MSG_CHECKING(to see if you want to log input too)
AC_ARG_ENABLE(recordinput,
[ --enable-recordinput Enable recording of input keystrokes, default off],
[recordinput=1])
if test $recordinput = "1"; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED(RECORDINPUT,"$recordinput",[input will be recorded])
else
AC_MSG_RESULT(no)
fi
logdir=
AC_MSG_CHECKING(for logdir)
AC_ARG_WITH(logdir,
[ --with-logdir=PATH specify path where logfiles will be written],
[
if test "x$withval" != "x" ; then
logdir=$withval
fi
])
if test "x$logdir" = "x" ; then
case "$host_os" in
*linux*)
logdir="/var/log/sudosh"
;;
*solaris*)
logdir="/var/adm/sudosh"
;;
*hp*)
logdir="/var/adm/sudosh"
;;
*aix*)
logdir="/var/adm/sudosh"
;;
*)
logdir="/tmp/sudosh"
;;
esac
fi
AC_MSG_RESULT($logdir)
AC_DEFINE_UNQUOTED(LOGDIR,"$logdir",[directory for session output])
# Check for /etc/shells
etcshells=
AC_MSG_CHECKING(for /etc/shells)
if test -f /etc/shells; then
AC_MSG_RESULT(found)
AC_DEFINE(HAS_ETC_SHELLS, 1,[have /etc/shells])
else
AC_MSG_RESULT(not found)
AC_DEFINE(HAS_ETC_SHELLS, 0,[does not have /etc/shells])
fi
# Checks for libraries.
if test "x$prefix" = "xNONE" ; then
prefix="/usr/local"
prefix_nondefault="NONE"
fi
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h stdlib.h string.h errno.h stdarg.h stdio.h)
AC_CHECK_HEADERS(sgtty.h pty.h signal.h time.h sys/time.h fcntl.h stropts.h)
AC_CHECK_HEADERS(util.h termios.h sys/termios.h sys/types.h libutil.h)
AC_CHECK_HEADERS(features.h sys/ioctl.h pwd.h syslog.h usersec.h)
AC_CHECK_HEADERS(limits.h sys/stat.h sys/param.h dirent.h ctype.h strings.h)
AC_CHECK_FUNCS(openpty, openpty=1, openpty=0)
AC_CHECK_FUNCS([getusershell gettimeofday])
AC_CHECK_FUNCS([mkdir rmdir])
AC_CHECK_FUNCS([setpenv])
AC_CHECK_FUNCS([atoi sscanf open read close fflush fclose fopen fread fputs fprintf])
AC_CHECK_FUNCS([strncpy snprintf strcmp strlen strftime isspace localtime])
AC_CHECK_FUNCS([opendir readdir closedir])
AC_CHECK_FUNCS([memchr memmove memset select strrchr bzero])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
# Checks for library functions.
AC_FUNC_FORK
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
VLOGDIR=$logdir
VFDL=$filedelimit
PREFIX=$prefix
RECORDINPUT=$recordinput
AC_SUBST([RECORDINPUT])
AC_SUBST([VLOGDIR])
AC_SUBST([VFDL])
AC_SUBST([PREFIX])
AC_DEFINE_UNQUOTED(SYSCONFDIR,"$sysconfdir", [directory to place sudosh.conf])
AC_CONFIG_FILES([Makefile src/Makefile src/sudosh.conf sudosh.1 sudosh-replay.8 sudosh.conf.5])
CFLAGS="$CFLAGS -Werror"
AC_OUTPUT
temp_mandir=`eval echo $mandir` ; temp_mandir=`eval echo $temp_mandir`
echo "Configuration summary:"
echo "======================"
echo ""
echo " Host type................: $target"
echo " CC.......................: $CC"
echo " CFLAGS...................: $CFLAGS"
echo ""
echo " Package..................: $PACKAGE_NAME"
echo " Version..................: $VERSION"
echo ""
echo " Installation prefix......: $prefix"
echo " Man directory............: $temp_mandir"
echo " sysconfdir...............: $sysconfdir"
echo -n " recording input..........: "
if test $recordinput = "1"; then
echo "yes"
else
echo "no"
fi
echo ""
echo "If this summary looks good, type 'make' or 'gmake' to compile"
echo "then 'make install' or 'gmake install' as root to install the"
echo "programs to the above installation prefix."