File: configure.in

package info (click to toggle)
radiusclient 0.3.2-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,040 kB
  • ctags: 472
  • sloc: sh: 4,804; ansic: 3,645; perl: 258; makefile: 145
file content (189 lines) | stat: -rw-r--r-- 4,313 bytes parent folder | download | duplicates (5)
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
# 
#  $Id: configure.in,v 1.17 2002/02/03 13:51:40 lf Exp $
# 
#  Copyright (C) 1996,1997 Lars Fenneberg
# 
#  See the file COPYRIGHT for the respective terms and conditions. 
#  If the file is missing contact me at lf@elemental.net 
#  and I'll send you a copy.
# 
# 

AC_INIT(src/radlogin.c)
AC_CANONICAL_SYSTEM

case "$target" in
	*)
	;;
esac

AM_INIT_AUTOMAKE(radiusclient,0.3.2)

LIBVERSION=0:1:0
AC_SUBST(LIBVERSION)

pkgsysconfdir=${sysconfdir}/$PACKAGE
AC_SUBST(pkgsysconfdir)

AC_PROG_CC

dnl Needed for normal compile
AC_PATH_PROG(AR, ar)
AM_PROG_LIBTOOL

dnl HAVE_SHADOW_PASSWORDS
AC_MSG_CHECKING(whether to include shadow password support)
AC_ARG_ENABLE(shadow,
[  --enable-shadow         Enable shadow password support],
[
        AC_MSG_RESULT(yes)
	AC_DEFINE(HAVE_SHADOW_PASSWORDS)
	shadow_passwords=yes
],
[
        AC_MSG_RESULT(no)
	shadow_passwords=no
]
)

dnl Checks for libraries.
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(socket, socket)
if test "$shadow_passwords" = "yes"
then
	AC_CHECK_LIB(c, getspnam,:,
		AC_CHECK_LIB(shadow, getspnam,
		 	LIBS="$LIBS -lshadow"
                )
	)
fi
AC_CHECK_LIB(crypt, crypt)

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(crypt.h signal.h sys/signal.h sys/stat.h)
AC_CHECK_HEADERS(fcntl.h sys/fcntl.h)
AC_CHECK_HEADERS(sys/utsname.h getopt.h unistd.h)
AC_CHECK_HEADERS(sys/file.h termios.h sys/ioctl.h)
if test "$shadow_passwords" = "yes"
then
	AC_CHECK_HEADER(shadow.h)
fi


dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM

dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_REPLACE_FUNCS(strdup strerror strcasecmp)
AC_CHECK_FUNCS(flock fcntl uname gethostname sysinfo getdomainname)
AC_CHECK_FUNCS(stricmp random rand snprintf vsnprintf)

if test "$ac_cv_func_uname" = 'yes'
then
	AC_MSG_CHECKING([for field domainname in struct utsname])
	AC_TRY_RUN([
	#include <sys/utsname.h>
	
	main(int argc, char **argv)
	{
		struct utsname uts;
		uts.domainname[0] = '\0';
	}
	],
	AC_MSG_RESULT(yes)
	AC_DEFINE(HAVE_STRUCT_UTSNAME_DOMAINNAME),
	AC_MSG_RESULT(no)
	)
fi

AC_MSG_CHECKING([for /dev/urandom])
if test -c /dev/urandom
then
	AC_MSG_RESULT(yes)
	AC_DEFINE(HAVE_DEV_URANDOM)
else
	AC_MSG_RESULT(no)
fi

dnl Determine PATH setting
echo $ac_n "using the following PATH setting for exec'ed programs... $ac_c" 1>&6
AC_ARG_WITH(secure-path,
[  --with-secure-path      PATH setting for exec'ed programs],
[
        AC_MSG_RESULT($withval)
        RC_SECURE_PATH=$withval
],
[
        AC_MSG_RESULT(/bin:/usr/bin:/usr/local/bin)
	RC_SECURE_PATH=/bin:/usr/bin:/usr/local/bin
]
)

dnl Checking which syslog facility to use
AC_MSG_CHECKING(which syslog facility to use)
AC_ARG_WITH(facility,
[  --with-facility         Syslog facility to use],
[
        AC_MSG_RESULT($withval)
        RC_LOG_FACILITY=$withval
],
[
        AC_MSG_RESULT(LOG_DAEMON)
        RC_LOG_FACILITY=LOG_DAEMON
]
)

dnl RADIUS_116
AC_MSG_CHECKING(whether to include Livingston's RADIUS server 1.16 kludge)
AC_ARG_ENABLE(radius-116,
[  --enable-radius-116     Include support for Livingston's RADIUS server 1.16],
[
        AC_MSG_RESULT(yes)
	AC_DEFINE(RADIUS_116)
	AC_MSG_WARN([!! This is a bug in Livingston's RADIUS server v1.16. There])
	AC_MSG_WARN([!! is a patch included with radiusclient which fixes this])
	AC_MSG_WARN([!! problem. See patches/radiusd-1.16.accounting.diff. With])
	AC_MSG_WARN([!! the patched RADIUS server you no longer need to activate])
	AC_MSG_WARN([!! this hack.])
],
[
        AC_MSG_RESULT(no)
]
)

dnl SCP
AC_MSG_CHECKING(whether to add service type hints derived from username prefix)
AC_ARG_ENABLE(scp,
[  --enable-scp            Add service type hints derived from username prefix],
[
        AC_MSG_RESULT(yes)
	AC_DEFINE(SCP)
],
[
        AC_MSG_RESULT(no)
]
)

AC_SUBST(RC_SECURE_PATH)
AC_SUBST(RC_LOG_FACILITY)

AM_CONFIG_HEADER(config.h)
LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
AC_SUBST(LTLIBOBJS)
AC_OUTPUT([
Makefile
include/Makefile lib/Makefile src/Makefile man/Makefile etc/Makefile
doc/Makefile patches/Makefile
login.radius/Makefile login.radius/migs/Makefile
], [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])