2 # $Id: configure.in,v 1.1 2002/01/22 16:03:00 dfs Exp $
4 # Copyright (C) 1996,1997 Lars Fenneberg
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.
12 AC_INIT(src/radlogin.c)
20 AM_INIT_AUTOMAKE(radiusclient,0.3.1)
25 pkgsysconfdir=${sysconfdir}/$PACKAGE
26 AC_SUBST(pkgsysconfdir)
30 dnl Needed for normal compile
34 dnl HAVE_SHADOW_PASSWORDS
35 AC_MSG_CHECKING(whether to include shadow password support)
37 [ --enable-shadow Enable shadow password support],
40 AC_DEFINE(HAVE_SHADOW_PASSWORDS)
49 dnl Checks for libraries.
50 AC_CHECK_LIB(nsl, gethostbyname)
51 AC_CHECK_LIB(socket, socket)
52 if test "$shadow_passwords" = "yes"
54 AC_CHECK_LIB(c, getspnam,:,
55 AC_CHECK_LIB(shadow, getspnam,
60 AC_CHECK_LIB(crypt, crypt)
62 dnl Checks for header files.
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"
71 AC_CHECK_HEADER(shadow.h)
75 dnl Checks for typedefs, structures, and compiler characteristics.
82 dnl Checks for library functions.
83 AC_PROG_GCC_TRADITIONAL
85 AC_FUNC_SETVBUF_REVERSED
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)
92 if test "$ac_cv_func_uname" = 'yes'
94 AC_MSG_CHECKING([for field domainname in struct utsname])
96 #include <sys/utsname.h>
98 main(int argc, char **argv)
101 uts.domainname[0] = '\0';
105 AC_DEFINE(HAVE_STRUCT_UTSNAME_DOMAINNAME),
110 AC_MSG_CHECKING([for /dev/urandom])
111 if test -c /dev/urandom
114 AC_DEFINE(HAVE_DEV_URANDOM)
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],
124 AC_MSG_RESULT($withval)
125 RC_SECURE_PATH=$withval
128 AC_MSG_RESULT(/bin:/usr/bin:/usr/local/bin)
129 RC_SECURE_PATH=/bin:/usr/bin:/usr/local/bin
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],
138 AC_MSG_RESULT($withval)
139 RC_LOG_FACILITY=$withval
142 AC_MSG_RESULT(LOG_DAEMON)
143 RC_LOG_FACILITY=LOG_DAEMON
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],
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.])
166 AC_MSG_CHECKING(whether to add service type hints derived from username prefix)
168 [ --enable-scp Add service type hints derived from username prefix],
178 AC_SUBST(RC_SECURE_PATH)
179 AC_SUBST(RC_LOG_FACILITY)
181 AM_CONFIG_HEADER(config.h)
182 LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
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])