32 |
AC_SUBST(YACC_OPTS) |
AC_SUBST(YACC_OPTS) |
33 |
AC_SUBST(RADIUS_PID) |
AC_SUBST(RADIUS_PID) |
34 |
|
|
|
case $target in |
|
|
*-*-linux*) SHADOW_SUPPORT=yes |
|
|
ST="BSD";; |
|
|
|
|
|
*-*-solaris*) SHADOW_SUPPORT=yes |
|
|
ST="SYSV";; |
|
|
|
|
|
*-*-*bsd*) ST="BSD";; |
|
|
|
|
|
*) ST="BSD";; |
|
|
esac |
|
|
|
|
35 |
## * Checks for programs. |
## * Checks for programs. |
36 |
AC_PROG_CC |
AC_PROG_CC |
37 |
AM_PROG_CC_STDC |
AM_PROG_CC_STDC |
157 |
netdb.h stdarg.h varargs.h termcap.h termios.h termio.h sgtty.h\ |
netdb.h stdarg.h varargs.h termcap.h termios.h termio.h sgtty.h\ |
158 |
crypt.h sys/uio.h sys/select.h sys/resources.h getopt.h libintl.h) |
crypt.h sys/uio.h sys/select.h sys/resources.h getopt.h libintl.h) |
159 |
|
|
160 |
|
## Check for shadow support |
161 |
|
AC_CHECK_HEADER([shadow.h], |
162 |
|
[AC_CHECK_FUNCS(getspnam) |
163 |
|
AC_CHECK_TYPES(struct spwd, , , |
164 |
|
[ #include <shadow.h> ]) |
165 |
|
AC_CHECK_MEMBERS([struct spwd.sp_expire], , , |
166 |
|
[ #include <shadow.h> ])], |
167 |
|
[AC_CHECK_HEADER([sys/security.h], |
168 |
|
[AC_CHECK_HEADER([prot.h], |
169 |
|
[AC_CHECK_TYPES(struct pr_passwd, , , |
170 |
|
[ #include <sys/security.h> |
171 |
|
#include <prot.h> ]) |
172 |
|
AC_CHECK_FUNCS(getprpwnam) |
173 |
|
AC_CHECK_MEMBERS([struct pr_passwd.uflg.fg_lock])])])]) |
174 |
|
|
175 |
|
AH_BOTTOM([ |
176 |
|
#if defined(HAVE_GETSPNAM) && defined(HAVE_STRUCT_SPWD) |
177 |
|
# define PWD_SHADOW SHADOW |
178 |
|
#elif defined(HAVE_STRUCT_PR_PASSWD) && defined(HAVE_GETPRPWNAM) |
179 |
|
# define PWD_SHADOW OSFC2 |
180 |
|
#endif]) |
181 |
|
|
182 |
## * Check for national language support |
## * Check for national language support |
183 |
AM_GNU_GETTEXT(no-libtool, need-ngettext) |
AM_GNU_GETTEXT(no-libtool, need-ngettext) |
184 |
AM_GNU_GETTEXT_VERSION(0.12.1) |
AM_GNU_GETTEXT_VERSION(0.12.1) |
238 |
inet_ntoa inet_aton setvbuf seteuid setreuid getdtablesize sigaction) |
inet_ntoa inet_aton setvbuf seteuid setreuid getdtablesize sigaction) |
239 |
AC_FUNC_OBSTACK |
AC_FUNC_OBSTACK |
240 |
|
|
241 |
AC_CHECK_DECLS([strncasecmp, strtok_r, localtime_r, asprintf, vasprintf, getline], , , |
AC_CHECK_DECLS([strncasecmp, strtok_r, localtime_r, asprintf, vasprintf, |
242 |
|
getline, crypt], , , |
243 |
[ |
[ |
244 |
#define _REENTRANT |
#define _REENTRANT |
245 |
#include <string.h> |
#include <string.h> |
254 |
#else |
#else |
255 |
# include <time.h> |
# include <time.h> |
256 |
#endif |
#endif |
257 |
|
#if defined(HAVE_CRYPT_H) |
258 |
|
# include <crypt.h> |
259 |
|
#endif |
260 |
#include <stdio.h>]) |
#include <stdio.h>]) |
261 |
|
|
262 |
# Restore CPPFLAGS |
# Restore CPPFLAGS |
376 |
AC_DEFINE_UNQUOTED(RADIUS_DEBUG, $RADIUS_DEBUG, |
AC_DEFINE_UNQUOTED(RADIUS_DEBUG, $RADIUS_DEBUG, |
377 |
[Define to 1 to enable debugging]) |
[Define to 1 to enable debugging]) |
378 |
|
|
|
case "$ST" in |
|
|
"BSD") RADLOG_DIR="/var/log" |
|
|
RADPID_DIR="/var/run" |
|
|
;; |
|
|
"SYSV") RADLOG_DIR="/usr/adm" |
|
|
RADPID_DIR='$(sysconfdir)/raddb' |
|
|
;; |
|
|
esac |
|
|
|
|
379 |
AC_MSG_CHECKING(for log directory path) |
AC_MSG_CHECKING(for log directory path) |
380 |
AC_ARG_WITH(log-dir, |
AC_ARG_WITH(log-dir, |
381 |
AC_HELP_STRING([--with-log-dir=PATH], |
AC_HELP_STRING([--with-log-dir=PATH], |
383 |
[case "x$withval" in |
[case "x$withval" in |
384 |
x/*) RADLOG_DIR=$withval;; |
x/*) RADLOG_DIR=$withval;; |
385 |
*) AC_MSG_ERROR(Argument must be an absolute pathname);; |
*) AC_MSG_ERROR(Argument must be an absolute pathname);; |
386 |
esac]) |
esac], |
387 |
|
[if test -d /var/log; then |
388 |
|
RADLOG_DIR="/var/log" |
389 |
|
elif test -d /usr/adm; then |
390 |
|
RADLOG_DIR="/usr/adm" |
391 |
|
else |
392 |
|
RADLOG_DIR="NONE" |
393 |
|
fi]) |
394 |
AC_MSG_RESULT($RADLOG_DIR) |
AC_MSG_RESULT($RADLOG_DIR) |
395 |
|
if test $RADLOG_DIR == NONE; then |
396 |
|
AC_MSG_ERROR("Don't know where to place default logging directory") |
397 |
|
fi |
398 |
|
|
399 |
AC_MSG_CHECKING(for pidfile directory path) |
AC_MSG_CHECKING(for pidfile directory path) |
400 |
AC_ARG_WITH(pid-dir, |
AC_ARG_WITH(pid-dir, |
403 |
[case "x$withval" in |
[case "x$withval" in |
404 |
x/*) RADPID_DIR=$withval;; |
x/*) RADPID_DIR=$withval;; |
405 |
*) AC_MSG_ERROR(Argument must be an absolute pathname);; |
*) AC_MSG_ERROR(Argument must be an absolute pathname);; |
406 |
esac]) |
esac], |
407 |
|
[if test -d /var/run; then |
408 |
|
RADPID_DIR="/var/run" |
409 |
|
else |
410 |
|
RADPID_DIR='$(sysconfdir)/raddb' |
411 |
|
fi]) |
412 |
AC_MSG_RESULT($RADPID_DIR) |
AC_MSG_RESULT($RADPID_DIR) |
413 |
|
|
414 |
AC_SUBST(PATHFLAGS) |
AC_SUBST(PATHFLAGS) |
455 |
AC_DEFINE_UNQUOTED(DEF_AUTH_PORT, $AUTH_PORT, [Default authentication port]) |
AC_DEFINE_UNQUOTED(DEF_AUTH_PORT, $AUTH_PORT, [Default authentication port]) |
456 |
AC_DEFINE_UNQUOTED(DEF_ACCT_PORT, $ACCT_PORT, [Default accounting port]) |
AC_DEFINE_UNQUOTED(DEF_ACCT_PORT, $ACCT_PORT, [Default accounting port]) |
457 |
|
|
|
|
|
|
## ************** |
|
|
## shadow support |
|
|
## ************** |
|
|
AC_MSG_CHECKING(whether to enable shadow support) |
|
|
AC_ARG_ENABLE(shadow, |
|
|
AC_HELP_STRING([--enable-shadow], |
|
|
[enable shadow support]), |
|
|
[case $enableval in |
|
|
yes) SHADOW_SUPPORT=yes;; |
|
|
*) SHADOW_SUPPORT=no;; |
|
|
esac]) |
|
|
AC_MSG_RESULT($SHADOW_SUPPORT) |
|
|
|
|
|
AH_TEMPLATE(PWD_SHADOW,1,[Define this if your system supports shadow suite]) |
|
|
if test x$SHADOW_SUPPORT = xyes; then |
|
|
AC_DEFINE(PWD_SHADOW) |
|
|
fi |
|
|
|
|
458 |
## ************** |
## ************** |
459 |
## PAM support |
## PAM support |
460 |
## ************** |
## ************** |
545 |
AC_HELP_STRING([--with-mysql], |
AC_HELP_STRING([--with-mysql], |
546 |
[Configure to work with MySQL]), |
[Configure to work with MySQL]), |
547 |
[case $withval in |
[case $withval in |
548 |
yes) RA_CHECK_LIB(mysqlclient, mysql_real_connect, [-lm -lz], |
yes) RA_CHECK_LIB(mysqlclient, |
549 |
|
mysql_real_connect, |
550 |
|
[-lm -lz], |
551 |
[ USE_SQL=1 |
[ USE_SQL=1 |
552 |
AC_DEFINE(USE_SQL_MYSQL) |
AC_DEFINE(USE_SQL_MYSQL) |
553 |
AC_DEFINE(HAVE_LIBMYSQL) |
AC_DEFINE(HAVE_LIBMYSQL) |
682 |
*) AC_DEFINE_UNQUOTED(DENY_SHELL, "$enableval");; |
*) AC_DEFINE_UNQUOTED(DENY_SHELL, "$enableval");; |
683 |
esac]) |
esac]) |
684 |
|
|
|
AC_ARG_ENABLE(osfc2, |
|
|
AC_HELP_STRING([--enable-osfc2], |
|
|
[enable OSFC2 support]), |
|
|
[case $enableval in |
|
|
yes) AC_DEFINE(OSFC2,1, |
|
|
[Define this to enable OSFC2 support<]);; |
|
|
no) ;; |
|
|
*) AC_MSG_ERROR(--enable-osfc2 can't be used with an argument) |
|
|
exit 1;; |
|
|
esac]) |
|
|
|
|
685 |
## *********************************************************************** |
## *********************************************************************** |
686 |
## * Do some final checks and create Makefiles * |
## * Do some final checks and create Makefiles * |
687 |
## *********************************************************************** |
## *********************************************************************** |