]> git.ozlabs.org Git - ppp.git/blob - pppd/plugins/radius/radiusclient/configure.in
Add these files, used with TDB.
[ppp.git] / pppd / plugins / radius / radiusclient / configure.in
1
2 #  $Id: configure.in,v 1.1 2002/01/22 16:03:00 dfs Exp $
3
4 #  Copyright (C) 1996,1997 Lars Fenneberg
5
6 #  See the file COPYRIGHT for the respective terms and conditions. 
7 #  If the file is missing contact me at lf@elemental.net 
8 #  and I'll send you a copy.
9
10
11
12 AC_INIT(src/radlogin.c)
13 AC_CANONICAL_SYSTEM
14
15 case "$target" in
16         *)
17         ;;
18 esac
19
20 AM_INIT_AUTOMAKE(radiusclient,0.3.1)
21
22 LIBVERSION=0:1:0
23 AC_SUBST(LIBVERSION)
24
25 pkgsysconfdir=${sysconfdir}/$PACKAGE
26 AC_SUBST(pkgsysconfdir)
27
28 AC_PROG_CC
29
30 dnl Needed for normal compile
31 AC_PATH_PROG(AR, ar)
32 AM_PROG_LIBTOOL
33
34 dnl HAVE_SHADOW_PASSWORDS
35 AC_MSG_CHECKING(whether to include shadow password support)
36 AC_ARG_ENABLE(shadow,
37 [  --enable-shadow         Enable shadow password support],
38 [
39         AC_MSG_RESULT(yes)
40         AC_DEFINE(HAVE_SHADOW_PASSWORDS)
41         shadow_passwords=yes
42 ],
43 [
44         AC_MSG_RESULT(no)
45         shadow_passwords=no
46 ]
47 )
48
49 dnl Checks for libraries.
50 AC_CHECK_LIB(nsl, gethostbyname)
51 AC_CHECK_LIB(socket, socket)
52 if test "$shadow_passwords" = "yes"
53 then
54         AC_CHECK_LIB(c, getspnam,:,
55                 AC_CHECK_LIB(shadow, getspnam,
56                         LIBS="$LIBS -lshadow"
57                 )
58         )
59 fi
60 AC_CHECK_LIB(crypt, crypt)
61
62 dnl Checks for header files.
63 AC_HEADER_DIRENT
64 AC_HEADER_STDC
65 AC_CHECK_HEADERS(crypt.h signal.h sys/signal.h sys/stat.h)
66 AC_CHECK_HEADERS(fcntl.h sys/fcntl.h)
67 AC_CHECK_HEADERS(sys/utsname.h getopt.h unistd.h)
68 AC_CHECK_HEADERS(sys/file.h termios.h sys/ioctl.h)
69 if test "$shadow_passwords" = "yes"
70 then
71         AC_CHECK_HEADER(shadow.h)
72 fi
73
74
75 dnl Checks for typedefs, structures, and compiler characteristics.
76 AC_C_CONST
77 AC_TYPE_OFF_T
78 AC_TYPE_SIZE_T
79 AC_HEADER_TIME
80 AC_STRUCT_TM
81
82 dnl Checks for library functions.
83 AC_PROG_GCC_TRADITIONAL
84 AC_FUNC_MEMCMP
85 AC_FUNC_SETVBUF_REVERSED
86 AC_TYPE_SIGNAL
87 AC_FUNC_STRFTIME
88 AC_REPLACE_FUNCS(strdup strerror strcasecmp)
89 AC_CHECK_FUNCS(flock fcntl uname gethostname sysinfo getdomainname)
90 AC_CHECK_FUNCS(stricmp random rand snprintf vsnprintf)
91
92 if test "$ac_cv_func_uname" = 'yes'
93 then
94         AC_MSG_CHECKING([for field domainname in struct utsname])
95         AC_TRY_RUN([
96         #include <sys/utsname.h>
97         
98         main(int argc, char **argv)
99         {
100                 struct utsname uts;
101                 uts.domainname[0] = '\0';
102         }
103         ],
104         AC_MSG_RESULT(yes)
105         AC_DEFINE(HAVE_STRUCT_UTSNAME_DOMAINNAME),
106         AC_MSG_RESULT(no)
107         )
108 fi
109
110 AC_MSG_CHECKING([for /dev/urandom])
111 if test -c /dev/urandom
112 then
113         AC_MSG_RESULT(yes)
114         AC_DEFINE(HAVE_DEV_URANDOM)
115 else
116         AC_MSG_RESULT(no)
117 fi
118
119 dnl Determine PATH setting
120 echo $ac_n "using the following PATH setting for exec'ed programs... $ac_c" 1>&6
121 AC_ARG_WITH(secure-path,
122 [  --with-secure-path      PATH setting for exec'ed programs],
123 [
124         AC_MSG_RESULT($withval)
125         RC_SECURE_PATH=$withval
126 ],
127 [
128         AC_MSG_RESULT(/bin:/usr/bin:/usr/local/bin)
129         RC_SECURE_PATH=/bin:/usr/bin:/usr/local/bin
130 ]
131 )
132
133 dnl Checking which syslog facility to use
134 AC_MSG_CHECKING(which syslog facility to use)
135 AC_ARG_WITH(facility,
136 [  --with-facility         Syslog facility to use],
137 [
138         AC_MSG_RESULT($withval)
139         RC_LOG_FACILITY=$withval
140 ],
141 [
142         AC_MSG_RESULT(LOG_DAEMON)
143         RC_LOG_FACILITY=LOG_DAEMON
144 ]
145 )
146
147 dnl RADIUS_116
148 AC_MSG_CHECKING(whether to include Livingston's RADIUS server 1.16 kludge)
149 AC_ARG_ENABLE(radius-116,
150 [  --enable-radius-116     Include support for Livingston's RADIUS server 1.16],
151 [
152         AC_MSG_RESULT(yes)
153         AC_DEFINE(RADIUS_116)
154         AC_MSG_WARN([!! This is a bug in Livingston's RADIUS server v1.16. There])
155         AC_MSG_WARN([!! is a patch included with radiusclient which fixes this])
156         AC_MSG_WARN([!! problem. See patches/radiusd-1.16.accounting.diff. With])
157         AC_MSG_WARN([!! the patched RADIUS server you no longer need to activate])
158         AC_MSG_WARN([!! this hack.])
159 ],
160 [
161         AC_MSG_RESULT(no)
162 ]
163 )
164
165 dnl SCP
166 AC_MSG_CHECKING(whether to add service type hints derived from username prefix)
167 AC_ARG_ENABLE(scp,
168 [  --enable-scp            Add service type hints derived from username prefix],
169 [
170         AC_MSG_RESULT(yes)
171         AC_DEFINE(SCP)
172 ],
173 [
174         AC_MSG_RESULT(no)
175 ]
176 )
177
178 AC_SUBST(RC_SECURE_PATH)
179 AC_SUBST(RC_LOG_FACILITY)
180
181 AM_CONFIG_HEADER(config.h)
182 LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
183 AC_SUBST(LTLIBOBJS)
184 AC_OUTPUT([
185 Makefile
186 include/Makefile lib/Makefile src/Makefile man/Makefile etc/Makefile
187 doc/Makefile patches/Makefile
188 login.radius/Makefile login.radius/migs/Makefile
189 ], [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])