Make $Id$ work again
[freeradius.git] / configure.in
1 dnl #############################################################
2 dnl #
3 dnl #  For information about autoconf, see:
4 dnl #
5 dnl #  http://www.gnu.org/software/autoconf/
6 dnl #
7 dnl #  The recommended order is:
8 dnl #
9 dnl #  AC_INIT(file)
10 dnl #  0. checks for compiler, libtool, and command line options
11 dnl #  1. checks for programs
12 dnl #  2. checks for libraries
13 dnl #  3. checks for header files
14 dnl #  4. checks for typedefs
15 dnl #  5. checks for structures and functions
16 dnl #  6. checks for compiler characteristics
17 dnl #  7. checks for library functions
18 dnl #  8. checks for system services
19 dnl #  AC_OUTPUT([file...])
20 dnl #
21 dnl #############################################################
22
23 AC_PREREQ([2.59])
24 export CFLAGS LIBS LDFLAGS CPPFLAGS
25
26 m4_define(PACKAGE_MAIN, freeradius)
27
28 AC_INIT(PACKAGE_MAIN,[$]Id[$],http://bugs.freeradius.org,,http://www.freeradius.org)
29 AC_CONFIG_SRCDIR(src/main/radiusd.c)
30 AC_CONFIG_HEADER(src/include/autoconf.h)
31
32 dnl # The version of the software
33
34 RADIUSD_MAJOR_VERSION=`cat VERSION | sed 's/\..*//'`
35 RADIUSD_MINOR_VERSION=`cat VERSION | sed 's/^[^\.]*\.//' | sed 's/\..*$//'`
36 RADIUSD_INCRM_VERSION=`cat VERSION | sed 's/^.*\..*\.//' | sed 's/-.*$//'`
37
38 RADIUSD_VERSION=`echo | awk -v major="$RADIUSD_MAJOR_VERSION" \
39 -v minor="$RADIUSD_MINOR_VERSION" \
40 -v incrm="$RADIUSD_INCRM_VERSION" \
41 '{ printf "%02i%02i%02i", major, minor, incrm }'`
42
43 dnl # Still useful for custom builds
44 RADIUSD_VERSION_STRING=`cat VERSION`
45 PACKAGE=PACKAGE_MAIN
46
47 dnl #############################################################
48 dnl #
49 dnl #  0. Checks for compiler, libtool, and command line options.
50 dnl #
51 dnl #############################################################
52
53 dnl Check for GNU cc
54 AC_PROG_CC
55 AC_PROG_CXX
56
57 dnl #
58 dnl # check for AIX, to allow us to use some BSD functions
59 dnl # must be before macros that call the compiler.
60 dnl #
61 AC_AIX
62
63 AC_PROG_GCC_TRADITIONAL
64 AC_PROG_CC_SUNPRO
65 AC_PROG_RANLIB
66
67 dnl #
68 dnl # Set Default CFLAGS
69 dnl #
70 if test "x$GCC" = "xyes"; then
71     CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
72 fi
73
74 dnl Compile in large (2G+) file support.
75 AC_SYS_LARGEFILE
76
77 dnl # check for system bytesex
78 dnl # AC_DEFINES WORDS_BIGENDIAN
79 AC_C_BIGENDIAN
80
81 dnl Find GNU Make.
82 AC_CHECK_PROG(GMAKE, gmake, yes, no)
83 if test $GMAKE = no; then
84   AC_PATH_PROG(MAKE, make, /usr/local/bin/make)
85 else
86   AC_PATH_PROG(MAKE, gmake, /usr/local/gnu/bin/make)
87 fi
88 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
89 if test -z "$makever"; then
90   AC_MSG_ERROR(GNU Make is not installed.  Please download and install it
91                 from ftp://prep.ai.mit.edu/pub/gnu/make/ before continuing.)
92 fi
93
94 dnl See if we have Git.
95 AC_CHECK_PROG(GIT, git, yes, no)
96
97 AC_ARG_WITH(system-libltdl,
98 [  --with-system-libltdl   Use the libltdl installed in your system (default=use dlopen)],
99 [],
100 [with_system_libltdl=no])
101
102 AS_IF([test "x$with_system_libltdl" = "xyes" ],
103 [ LIBLTDL="-lltdl"
104 INCLTDL=-DWITH_SYSTEM_LTDL])
105
106 dnl use system-wide libtool, if it exists
107 AC_ARG_WITH(system-libtool,
108 [  --with-system-libtool   Use the libtool installed in your system (default=use our own)],
109 [],
110 [with_system_libtool=no])
111
112 AS_IF([test "x$with_system_libtool" = "xyes" ],
113 [ AC_PATH_PROG(LIBTOOL, libtool,,$PATH:/usr/local/bin) AC_LIBTOOL_DLOPEN
114  AC_PROG_LIBTOOL],
115 [
116   LIBTOOL='${top_srcdir}/scripts/jlibtool'
117   AC_SUBST(LIBTOOL)
118   dnl ensure that we're looking for dlopen
119   AC_LIBTOOL_DLOPEN
120 ])
121
122
123 dnl Put this in later, when all distributed modules use autoconf.
124 dnl AC_ARG_WITH(disablemodulefoo,
125 dnl [  --without-rlm_foo       Disables module compilation.  Module list:]
126 dnl esyscmd([find src/modules -type d -name rlm_\* -print |\
127 dnl     sed -e 's%src/modules/.*/% (sub)- %; s%.*/%- %' |\
128 dnl     awk '{print "                            "$0}']))
129
130 AC_ARG_ENABLE(strict-dependencies,
131 [  --enable-strict-dependencies  Fail configure on lack of module dependancy.])
132
133 dnl extra argument: --with-docdir
134 docdir='${datadir}/doc/freeradius'
135 AC_MSG_CHECKING(docdir)
136 AC_ARG_WITH(docdir,
137 [  --with-docdir=DIR       Directory for documentation [DATADIR/doc/freeradius] ],
138 [ case "$withval" in
139     no)
140         docdir=no
141         ;;
142     yes)
143         ;;
144     [[\\/$]]* | ?:[[\\/]]* )
145         docdir="$withval"
146         ;;
147     *)
148         AC_MSG_ERROR([expected an absolute directory name for --with-docdir: $withval])
149         ;;
150   esac ]
151 )
152 AC_SUBST(docdir)
153 AC_MSG_RESULT($docdir)
154 if test "x$docdir" = xno; then
155         AC_MSG_WARN(Documentation files will NOT be installed.)
156 fi
157
158 dnl extra argument: --with-logdir
159 logdir='${localstatedir}/log/radius'
160 AC_MSG_CHECKING(logdir)
161 AC_ARG_WITH(logdir,
162 [  --with-logdir=DIR       Directory for logfiles [LOCALSTATEDIR/log/radius] ],
163 [ case "$withval" in
164     no)
165         AC_MSG_ERROR(Need logdir)
166         ;;
167     yes)
168         ;;
169     [[\\/$]]* | ?:[[\\/]]* )
170         logdir="$withval"
171         ;;
172     *)
173         AC_MSG_ERROR([expected an absolute directory name for --with-logdir: $withval])
174         ;;
175   esac ]
176 )
177 AC_SUBST(logdir)
178 AC_MSG_RESULT($logdir)
179
180 dnl extra argument: --with-radacctdir
181 radacctdir='${logdir}/radacct'
182 AC_MSG_CHECKING(radacctdir)
183 AC_ARG_WITH(radacctdir,
184 [  --with-radacctdir=DIR   Directory for detail files [LOGDIR/radacct] ],
185 [ case "$withval" in
186     no)
187         AC_MSG_ERROR(Need radacctdir)
188         ;;
189     yes)
190         ;;
191     [[\\/$]]* | ?:[[\\/]]* )
192         radacctdir="$withval"
193         ;;
194     *)
195         AC_MSG_ERROR([expected an absolute directory name for --with-radacctdir: $withval])
196         ;;
197   esac ]
198 )
199 AC_SUBST(radacctdir)
200 AC_MSG_RESULT($radacctdir)
201
202 dnl extra argument: --with-raddbdir
203 raddbdir='${sysconfdir}/raddb'
204 AC_MSG_CHECKING(raddbdir)
205 AC_ARG_WITH(raddbdir,
206 [  --with-raddbdir=DIR     Directory for config files [SYSCONFDIR/raddb] ],
207 [ case "$withval" in
208     no)
209         AC_MSG_ERROR(Need raddbdir)
210         ;;
211     yes)
212         ;;
213     [[\\/$]]* | ?:[[\\/]]* )
214         raddbdir="$withval"
215         ;;
216     *)
217         AC_MSG_ERROR([expected an absolute directory name for --with-raddbdir: $withval])
218         ;;
219   esac ]
220 )
221 AC_SUBST(raddbdir)
222 AC_MSG_RESULT($raddbdir)
223
224 dnl extra argument: --with-ascend-binary
225 ASCEND_BINARY=yes
226 AC_ARG_WITH(ascend-binary,
227 [  --with-ascend-binary    Include support for Ascend binary filter attributes (default=yes)],
228 [ case "$withval" in
229     yes)
230         ;;
231     *)
232         ASCEND_BINARY=""
233   esac ]
234 )
235 if test "X$ASCEND_BINARY" = "Xyes"; then
236   AC_DEFINE(ASCEND_BINARY, [], [Include support for Ascend binary filter attributes])
237 fi
238
239 dnl extra argument: --with-threads
240 WITH_THREADS=yes
241 AC_ARG_WITH(threads,
242 [  --with-threads          Use threads, if available.  (default=yes) ],
243 [ case "$withval" in
244     yes)
245         ;;
246     *)
247         WITH_THREADS=""
248   esac ]
249 )
250
251 dnl extra argument: --with-vmps
252 WITH_VMPS=yes
253 AC_ARG_WITH(vmps,
254 [  --with-vmps             Compile in VMPS support. (default=yes)],
255 [ case "$withval" in
256     yes)
257         ;;
258     *)
259         WITH_VMPS=no
260   esac ]
261 )
262 if test "x$WITH_VMPS" = "xyes"; then
263         AC_DEFINE(WITH_VMPS, [1], [define if you want VMPS support])
264 fi
265
266 dnl extra argument: --with-dhcp
267 WITH_DHCP=yes
268 AC_ARG_WITH(dhcp,
269 [  --with-dhcp             Compile in DHCP support. (default=yes)],
270 [ case "$withval" in
271     yes)
272         ;;
273     *)
274         WITH_DHCP=no
275   esac ]
276 )
277 if test "x$WITH_DHCP" = "xyes"; then
278         AC_DEFINE(WITH_DHCP, [1], [define if you want DHCP support])
279 fi
280
281
282 dnl #
283 dnl #  Allow the user to specify a list of modules to be linked
284 dnl #  statically to the server.
285 dnl #
286 STATIC_MODULES=
287 AC_ARG_WITH(static_modules,
288 [  --with-static-modules=QUOTED-MODULE-LIST],[
289   for i in $withval; do
290     STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
291   done
292 ])
293
294 MODULES=
295 AC_ARG_WITH(modules,
296 [ --with-modules=QUOTED-MODULE-LIST],[
297  for i in $withval; do
298    MODULES="$MODULES $i"
299  done
300 ])
301
302 dnl #
303 dnl #  Enable developer C compiler warnings
304 dnl #
305 AC_ARG_ENABLE(developer,
306 [  --enable-developer               Enables features of interest to developers.],
307 [ case "$enableval" in
308     no)
309         developer=no
310         ;;
311     *)
312         developer=yes
313   esac ]
314 )
315
316 if test -d $srcdir/.git; then
317   if test "x$developer" != "xno"; then
318     dnl turn on the developer flag when taken from a git checkout (not a release)
319     developer="yes"
320   fi  
321   
322   dnl append the current git hash onto the version string
323   if test $GIT = yes; then
324         RADIUSD_VERSION_COMMIT=`git log --pretty=format:'%h' -n 1`
325   fi
326 fi
327
328 dnl extra argument: --with-experimental-modules
329 EXPERIMENTAL=
330 AC_ARG_WITH(experimental-modules,
331 [  --with-experimental-modules      Use experimental and unstable modules. (default=no) ],
332 [ case "$withval" in
333     yes)
334         EXPERIMENTAL=yes
335         ;;
336     *)
337   esac ]
338 )
339
340 dnl extra argument: --with-openssl
341 WITH_OPENSSL=yes
342 AC_ARG_WITH(openssl,
343 [  --with-openssl                   Use OpenSSL. (default=yes)],
344 [ case "$withval" in
345     no)
346         WITH_OPENSSL=no
347         ;;
348     *)
349         WITH_OPENSSL=yes
350         ;;
351   esac ]
352 )
353
354 dnl #
355 dnl # extra argument: --with-openssl-includes=dir
356 dnl #
357 OPENSSL_INCLUDE_DIR=
358 AC_ARG_WITH(openssl-includes,
359 [  --with-openssl-includes=DIR      Directory to look for OpenSSL include files],
360 [ case "$withval" in
361     *) OPENSSL_INCLUDE_DIR="$withval"
362         ;;
363   esac ]
364 )
365
366 dnl #
367 dnl # extra argument: --with-openssl-libraries=dir
368 dnl #
369 OPENSSL_LIB_DIR=
370 AC_ARG_WITH(openssl-libraries,
371 [  --with-openssl-libraries=DIR     Directory to look for OpenSSL library files],
372 [ case "$withval" in
373     *) OPENSSL_LIB_DIR="$withval"
374         ;;
375   esac ]
376 )
377
378 dnl #
379 dnl #  These next two arguments don't actually do anything.  They're
380 dnl #  place holders so that the top-level configure script can tell
381 dnl #  the user how to configure lower-level modules
382 dnl #
383
384 dnl #
385 dnl # extra argument: --with-rlm-FOO-lib-dir
386 dnl #
387 AC_ARG_WITH(rlm-FOO-lib-dir,
388 [  --with-rlm-FOO-lib-dir=DIR       Directory to look for library files used by module FOO],
389 [ case "$withval" in
390     *)
391         ;;
392   esac ]
393 )
394
395 dnl #
396 dnl # extra argument: --with-rlm-FOO-include-dir
397 dnl #
398 AC_ARG_WITH(rlm-FOO-include-dir,
399 [  --with-rlm-FOO-include-dir=DIR   Directory to look for include files used by module FOO],
400 [ case "$withval" in
401     *)
402         ;;
403   esac ]
404 )
405
406 dnl See what include-style is used by the make program.
407 dnl AC_MSG_CHECKING(include style for make)
408 dnl echo "include /dev/null" > testmake.$$
409 dnl echo "all:" >> testmake.$$
410 dnl make -f testmake.$$ >/dev/null 2>&1
411 dnl if test $? = 0
412 dnl then
413 dnl     INCLUDE=include
414 dnl     IQUOTE=
415 dnl else
416 dnl     INCLUDE=.include
417 dnl     IQUOTE='"'
418 dnl fi
419 dnl rm -f testmake.$$
420 dnl AC_MSG_RESULT(" $INCLUDE")
421 dnl AC_SUBST(INCLUDE)
422 dnl AC_SUBST(IQUOTE)
423
424 dnl extra argument: --with-udpfromto
425 WITH_UDPFROMTO=no
426 AC_ARG_WITH(udpfromto,
427 [  --with-udpfromto        Compile in UDPFROMTO support. (default=no)],
428 [ case "$withval" in
429     yes)
430         WITH_UDPFROMTO=yes
431         ;;
432     *)
433         WITH_UDPFROMTO=no
434   esac ]
435 )
436
437 if test "x$WITH_UDPFROMTO" = "xyes"; then
438         AC_DEFINE(WITH_UDPFROMTO, [], [define if you want udpfromto])
439 fi
440
441 dnl #############################################################
442 dnl #
443 dnl #  1. Checks for programs
444 dnl #
445 dnl #############################################################
446
447 CHECKRAD=checkrad.pl
448 AC_PATH_PROG(PERL, perl, /usr/local/bin/perl)
449 if test "x$ac_cv_path_PERL" = "x"; then
450   AC_MSG_WARN(perl not found - Simultaneous-Use and checkrad.pl may not work)
451 fi
452 AC_PATH_PROG(SNMPGET, snmpget)
453 if test "x$ac_cv_path_SNMPGET" = "x"; then
454   AC_MSG_WARN(snmpget not found - Simultaneous-Use and checkrad.pl may not work)
455 fi
456
457 AC_PATH_PROG(SNMPWALK, snmpwalk)
458 if test "x$ac_cv_path_SNMPWALK" = "x"; then
459   AC_MSG_WARN(snmpwalk not found - Simultaneous-Use and checkrad.pl may not work)
460 fi
461
462 AC_PATH_PROG(RUSERS, rusers, /usr/bin/rusers)
463
464 dnl FIXME This is truly gross.
465 missing_dir=`cd $ac_aux_dir && pwd`
466 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
467 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
468 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
469
470 AC_PATH_PROG(LOCATE,locate)
471 AC_PATH_PROG(DIRNAME,dirname)
472 AC_PATH_PROG(GREP,grep)
473
474 dnl #############################################################
475 dnl #
476 dnl #  2. Checks for libraries
477 dnl #
478 dnl #############################################################
479
480 dnl If using pthreads, check for -lpthread (posix) or -lc_r (*BSD)
481 old_CFLAGS=$CFLAGS
482 if test "x$WITH_THREADS" = "xyes"; then
483   if test $ac_cv_prog_suncc = "yes"; then
484     CFLAGS="$CFLAGS -mt"
485   fi
486
487   AC_CHECK_HEADERS(pthread.h, [], [ WITH_THREADS="no" ])
488
489 dnl #
490 dnl # pthread stuff is usually in -lpthread
491 dnl # or in -lc_r, on *BSD
492 dnl #
493 dnl # On Some systems, we need extra pre-processor flags, to get them to
494 dnl # to do the threading properly.
495 dnl #
496   AC_CHECK_LIB(pthread, pthread_create,
497                 [ CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
498                   LIBS="-lpthread $LIBS" ],
499                 AC_CHECK_LIB(c_r, pthread_create,
500                             [ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE" ],
501                             [ WITH_THREADS="no" ]
502                             )
503                 )
504 fi
505
506 dnl #
507 dnl # If we have NO pthread libraries, remove any knowledge of threads.
508 dnl #
509 if test "x$WITH_THREADS" != "xyes"; then
510   CFLAGS=$old_CFLAGS
511   ac_cv_header_pthread_h="no"
512   WITH_THREADS=no
513 else
514   dnl #
515   dnl #  We need sem_init() and friends, as they're the friendliest
516   dnl #  semaphore functions for threading.
517   dnl #
518   dnl # HP/UX requires linking with librt, too, to get the sem_* symbols.
519   dnl # Some systems have them in -lsem
520   dnl # Solaris has them in -lposix4
521   dnl # NetBSD has them in -lsemaphore
522
523   AC_SEARCH_LIBS(sem_init, pthread sem posix4 rt semaphore,
524         [],
525         [AC_MSG_ERROR(-lsem not found.  You may want to download it from ftp://ftp.to.gd-es.com/pub/BSDI/libsem.tar.bz2 or ftp://ftp.freeradius.org/pub/radius/contrib/libsem.tar.gz)]
526    )
527 fi
528
529 dnl Check if we need -lsocket
530 AC_CHECK_LIB(dl, dlopen)
531
532 dnl Check if we need -lsocket
533 AC_CHECK_LIB(socket, getsockname)
534
535 dnl Check for -lresolv
536 dnl This library may be needed later.
537 AC_CHECK_LIB(resolv, inet_aton)
538
539 dnl Check if we need -lnsl. Usually if we want to
540 dnl link against -lsocket we need to include -lnsl as well.
541 AC_CHECK_LIB(nsl, inet_ntoa)
542
543 dnl Check for OpenSSL libraries.
544 OPENSSL_LIBS=
545 if test "x$WITH_OPENSSL" = xyes; then
546   old_LIBS=$LIBS
547   old_LDFLAGS="$LDFLAGS"
548   if test "x$OPENSSL_LIB_DIR" != "x"; then
549     LDFLAGS="$LDFLAGS -L$OPENSSL_LIB_DIR"
550   fi
551   AC_CHECK_LIB(crypto, DH_new,
552     [
553         LIBS="-lcrypto $LIBS"
554         AC_DEFINE(HAVE_LIBCRYPTO, 1,
555             [Define to 1 if you have the `crypto' library (-lcrypto).])
556         AC_CHECK_LIB(ssl, SSL_new,
557             [
558                 AC_DEFINE(HAVE_LIBSSL, 1,
559                     [Define to 1 if you have the `ssl' library (-lssl).])
560                 if test "x$OPENSSL_LIB_DIR" != "x"; then
561                     OPENSSL_LIBS="-L$OPENSSL_LIB_DIR"
562                 fi
563                 OPENSSL_LIBS="$OPENSSL_LIBS -lcrypto -lssl -lcrypto"
564             ], [])
565     ], [])
566   LIBS=$old_LIBS
567   LDFLAGS="$old_LDFLAGS"
568 fi
569
570 AC_CHECK_LIB(ws2_32, htonl)
571
572 dnl Check the pcap library for the RADIUS sniffer.
573 PCAP_LIBS=
574 AC_CHECK_LIB(pcap, pcap_open_live,
575         [ PCAP_LIBS="-lpcap"
576         AC_DEFINE(HAVE_LIBPCAP, 1,
577                 [Define to 1 if you have the `pcap' library (-lpcap).])
578         ],
579         [ AC_MSG_WARN([pcap library not found, silently disabling the RADIUS sniffer.]) ])
580
581 AC_LIB_READLINE
582
583 dnl #############################################################
584 dnl #
585 dnl #  3. Checks for header files
586 dnl #
587 dnl #############################################################
588
589 dnl #
590 dnl # Interix requires us to set -D_ALL_SOURCE, otherwise
591 dnl # getopt will be #included, but won't link.  <sigh>
592 dnl #
593 dnl #
594 case "$host" in
595 *-interix*)
596         CFLAGS="$CFLAGS -D_ALL_SOURCE"
597         ;;
598 *-darwin*)
599         CFLAGS="$CFLAGS -DDARWIN"
600         LIBS="-framework DirectoryService $LIBS"
601         ;;
602 esac
603
604 AC_HEADER_DIRENT
605 AC_HEADER_STDC
606 AC_HEADER_TIME
607 AC_HEADER_SYS_WAIT
608
609 AC_CHECK_HEADERS( \
610         unistd.h \
611         crypt.h \
612         errno.h \
613         resource.h \
614         sys/resource.h \
615         getopt.h \
616         malloc.h \
617         utmp.h \
618         utmpx.h \
619         signal.h \
620         sys/select.h \
621         syslog.h \
622         inttypes.h \
623         stdint.h \
624         stdio.h \
625         netdb.h \
626         semaphore.h \
627         arpa/inet.h \
628         netinet/in.h \
629         sys/types.h \
630         sys/socket.h \
631         winsock.h \
632         utime.h \
633         sys/time.h \
634         sys/wait.h \
635         sys/security.h \
636         fcntl.h \
637         sys/fcntl.h \
638         sys/prctl.h \
639         sys/un.h \
640         glob.h \
641         prot.h \
642         pwd.h \
643         grp.h \
644         stddef.h \
645         fnmatch.h \
646         sia.h \
647         siad.h
648 )
649
650 dnl FreeBSD requires sys/socket.h before net/if.h
651 AC_CHECK_HEADERS(net/if.h, [], [],
652 [#ifdef HAVE_SYS_SOCKET_H
653 # include <sys/socket.h>
654 # endif
655 ])
656
657 REGEX=no
658 AC_CHECK_HEADER(pcreposix.h, AC_DEFINE(HAVE_PCREPOSIX_H, [], [define this if we have the <pcreposix.h> header file]))
659 if test "x$ac_cv_header_pcreposix_h" = "xyes"; then
660   AC_DEFINE(HAVE_REGEX_H, [], [define if we have any regex])
661   REGEX_EXTENDED=yes
662   REGEX_PCRE=yes
663   REGEX=yes
664   LIBS="$LIBS -lpcreposix"
665 else
666
667 AC_CHECK_HEADER(regex.h, AC_DEFINE(HAVE_REGEX_H, [], [define this if we have the <regex.h> header file]))
668 if test "x$ac_cv_header_regex_h" = "xyes"; then
669   REGEX_EXTENDED=no
670   REGEX_PCRE=no
671   REGEX=yes
672   AC_EGREP_CPP(yes,
673     [#include <regex.h>
674      #ifdef REG_EXTENDED
675        yes
676      #endif
677      ], [AC_DEFINE(HAVE_REG_EXTENDED, [], [define this if we have REG_EXTENDED (from <regex.h>)]) REGEX_EXTENDED=yes])
678 fi
679 fi
680
681 AC_SUBST(REGEX)
682 AC_SUBST(REGEX_PCRE)
683 AC_SUBST(REGEX_EXTENDED)
684
685 dnl #
686 dnl #  other checks which require headers
687 dnl #
688 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
689 then
690   AC_DEFINE(OSFC2, [], [define if you have OSFC2 authentication])
691 fi
692
693 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
694 then
695   AC_DEFINE(OSFSIA, [], [define if you have OSFSIA authentication])
696 fi
697
698 dnl Check for OpenSSL includes.
699 OPENSSL_INCLUDE="-DNO_OPENSSL"
700 if test "x$WITH_OPENSSL" = xyes; then
701   if test "x$OPENSSL_LIBS" = "x"; then
702     AC_MSG_NOTICE([skipping test for openssl/ssl.h])
703   else
704     old_CPPFLAGS=$CPPFLAGS
705     if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
706         CPPFLAGS="$CPPFLAGS -I$OPENSSL_INCLUDE_DIR"
707     fi
708     dnl # stupid RedHat shit
709     CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_KRB5"
710     AC_CHECK_HEADERS( \
711         openssl/ssl.h \
712         openssl/crypto.h \
713         openssl/err.h \
714         openssl/evp.h \
715         openssl/md5.h \
716         openssl/md4.h \
717         openssl/sha.h \
718         openssl/ocsp.h \
719         openssl/engine.h,
720         [],
721         OPENSSL_LIBS=
722     )
723     if test "x$OPENSSL_LIBS" != "x"; then
724         AC_MSG_CHECKING([for OpenSSL version >= 0.9.7])
725         AC_EGREP_CPP(yes,
726             [#include <openssl/crypto.h>
727              #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
728              yes
729              #endif
730             ], goodssl="yes")
731         if test "x$goodssl" != "xyes"; then
732             AC_MSG_RESULT(no)
733             OPENSSL_LIBS=
734         else
735             AC_MSG_RESULT(yes)
736             if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
737                 OPENSSL_INCLUDE="-I$OPENSSL_INCLUDE_DIR -DOPENSSL_NO_KRB5"
738             else
739                 OPENSSL_INCLUDE="-DOPENSSL_NO_KRB5"
740             fi
741         fi
742     fi
743     CPPFLAGS=$old_CPPFLAGS
744   fi
745 fi
746 AC_SUBST(OPENSSL_INCLUDE)
747 AC_SUBST(OPENSSL_LIBS)
748 export OPENSSL_LIBS
749
750 dnl Check the pcap includes for the RADIUS sniffer.
751 if test "x$PCAP_LIBS" = x; then
752     AC_MSG_NOTICE([skipping test for pcap.h.])
753 else
754     AC_CHECK_HEADER(pcap.h,
755         AC_DEFINE(HAVE_PCAP_H, 1,
756                 [Define to 1 if you have the <pcap.h> header file.]),
757         [ PCAP_LIBS=
758         AC_MSG_WARN([pcap.h not found, silently disabling the RADIUS sniffer.])
759         ])
760
761     AC_CHECK_LIB(pcap, pcap_fopen_offline,
762         [ AC_DEFINE(HAVE_PCAP_FOPEN_OFFLINE, 1,
763                 [Define to 1 if you have the function pcap_fopen_offline.])
764         ])
765     AC_CHECK_LIB(pcap, pcap_dump_fopen,
766         [ AC_DEFINE(HAVE_PCAP_DUMP_FOPEN, 1,
767                 [Define to 1 if you have the function pcap_dump_fopen.])
768         ])
769 fi
770 AC_SUBST(PCAP_LIBS)
771
772 dnl #############################################################
773 dnl #
774 dnl #  4. Checks for typedefs
775 dnl #
776 dnl #############################################################
777
778 dnl #
779 dnl # Ensure that these are defined
780 dnl #
781 AC_TYPE_OFF_T
782 AC_TYPE_PID_T
783 AC_TYPE_SIZE_T
784 AC_TYPE_UID_T
785
786 dnl check for socklen_t
787 FR_CHECK_TYPE_INCLUDE([
788 #ifdef HAVE_SYS_TYPES_H
789 #include <sys/types.h>
790 #endif
791 #ifdef HAVE_SYS_SOCKET_H
792 #include <sys/socket.h>
793 #endif
794 ],socklen_t, int, [socklen_t is generally 'int' on systems which don't use it])
795
796 dnl check for uint8_t
797 FR_CHECK_TYPE_INCLUDE([
798 #ifdef HAVE_INTTYPES_H
799 #include <inttypes.h>
800 #endif
801 #ifdef HAVE_STDINT_H
802 #include <stdint.h>
803 #endif
804 ],uint8_t, unsigned char, [uint8_t should be the canonical 'octet' for network traffic])
805
806 dnl check for uint16_t
807 FR_CHECK_TYPE_INCLUDE([
808 #ifdef HAVE_INTTYPES_H
809 #include <inttypes.h>
810 #endif
811 #ifdef HAVE_STDINT_H
812 #include <stdint.h>
813 #endif
814 ],uint16_t, unsigned short, [uint16_t should be the canonical '2 octets' for network traffic])
815
816 dnl check for uint32_t
817 FR_CHECK_TYPE_INCLUDE([
818 #ifdef HAVE_INTTYPES_H
819 #include <inttypes.h>
820 #endif
821 #ifdef HAVE_STDINT_H
822 #include <stdint.h>
823 #endif
824 ],uint32_t, unsigned int, [uint32_t should be the canonical 'network integer])
825
826 AC_CHECK_TYPE(struct in6_addr, AC_DEFINE(HAVE_STRUCT_IN6_ADDR, 1, [IPv6 address structure]), [], [
827 #ifdef HAVE_NETINET_IN_H
828 #include <netinet/in.h>
829 #endif
830 ])
831
832 AC_CHECK_TYPE(struct sockaddr_storage, AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, [Generic socket addresses]), [], [
833 #ifdef HAVE_NETINET_IN_H
834 #include <netinet/in.h>
835 #endif
836 #ifdef HAVE_SYS_SOCKET_H
837 #include <sys/socket.h>
838 #endif
839 ])
840
841 AC_CHECK_TYPE(struct sockaddr_in6, AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1, [IPv6 socket addresses]), [], [
842 #ifdef HAVE_NETINET_IN_H
843 #include <netinet/in.h>
844 #endif
845 ])
846
847 AC_CHECK_TYPE(struct addrinfo, AC_DEFINE(HAVE_STRUCT_ADDRINFO, 1, [Generic DNS lookups]), [], [
848 #ifdef HAVE_SYS_TYPES_H
849 #include <sys/types.h>
850 #endif
851 #ifdef HAVE_SYS_SOCKET_H
852 #include <sys/socket.h>
853 #endif
854 #ifdef HAVE_NETDB_H
855 #include <netdb.h>
856 #endif
857 ])
858
859 dnl #############################################################
860 dnl #
861 dnl #  5. Checks for structures and functions
862 dnl #
863 dnl #############################################################
864 AC_CHECK_FUNCS( \
865         getopt_long \
866         lockf \
867         strsignal \
868         sigaction \
869         sigprocmask \
870         pthread_sigmask \
871         snprintf \
872         vsnprintf \
873         setsid \
874         strncasecmp \
875         strcasecmp \
876         localtime_r \
877         ctime_r \
878         gmtime_r \
879         strsep \
880         inet_aton \
881         inet_pton \
882         inet_ntop \
883         setlinebuf \
884         setvbuf \
885         getusershell \
886         initgroups \
887         getaddrinfo \
888         getnameinfo \
889         closefrom \
890         gettimeofday \
891         getpeereid \
892         setuid \
893         setresuid \
894         getresuid \
895         strlcat \
896         strlcpy
897 )
898 RADIUSD_NEED_DECLARATIONS( \
899         crypt \
900         strncasecmp \
901         strcasecmp \
902         inet_aton \
903         setlinebuf \
904         getusershell \
905         endusershell
906 )
907
908 AC_TYPE_SIGNAL
909
910 dnl # check if we have utmpx.h
911 dnl # if so, check if struct utmpx has entry ut_xtime
912 dnl # if not, set it to define ut_xtime == ut_tv.tv_sec
913 if test "x$ac_cv_header_utmpx_h" = "xyes"
914 then
915  FR_CHECK_STRUCT_HAS_MEMBER([#include <utmpx.h>], [struct utmpx], ut_xtime)
916  if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"
917  then
918    AC_DEFINE(ut_xtime,ut_tv.tv_sec, [define to something if you don't have ut_xtime in struct utmpx])
919  fi
920 fi
921
922 dnl # struct ip_pktinfo
923 FR_CHECK_STRUCT_HAS_MEMBER([#include <netinet/in.h>], [struct in_pktinfo], ipi_addr)
924 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"
925 then
926         AC_DEFINE(HAVE_IP_PKTINFO, [], [define if you have IP_PKTINFO (Linux)])
927 fi
928
929 dnl # struct in6_pktinfo
930 FR_CHECK_STRUCT_HAS_MEMBER([#include <netinet/in.h>], [struct in6_pktinfo], ipi6_addr)
931 if test "x$ac_cv_type_struct_in6_pktinfo_has_ipi6_addr" = "xyes"
932 then
933         AC_DEFINE(HAVE_IN6_PKTINFO, [], [define if you have IN6_PKTINFO (Linux)])
934 fi
935
936 dnl #############################################################
937 dnl #
938 dnl #  6. Checks for compiler characteristics
939 dnl #
940 dnl #############################################################
941
942 dnl #
943 dnl # Ensure that these are defined
944 dnl #
945 AC_C_CONST
946
947 dnl #
948 dnl # See if this is OS/2
949 dnl #
950 AC_MSG_CHECKING(type of OS)
951 OS=`uname -s`
952 AC_MSG_RESULT($OS)
953 if test "$OS" = "OS/2"; then
954         LIBPREFIX=
955 else
956         LIBPREFIX=lib
957 fi
958 AC_SUBST(LIBPREFIX)
959
960 AC_MSG_CHECKING(for developer gcc flags)
961 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
962   devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef -Wformat-y2k -Wno-format-extra-args -Wno-format-zero-length  -Wformat-nonliteral -Wformat-security -Wformat=2"
963   CFLAGS="$CFLAGS $devflags"
964   INSTALLSTRIP=""
965   AC_MSG_RESULT(yes.  Using $devflags)
966 else
967   devflags=""
968   CFLAGS="$CFLAGS -DNDEBUG"
969   INSTALLSTRIP=""
970   AC_MSG_RESULT(no.)
971 fi
972
973 FR_TLS
974
975 dnl #############################################################
976 dnl #
977 dnl #  7. Checks for library functions
978 dnl #
979 dnl #############################################################
980
981 old_LIBS="$LIBS"
982 LIBS="$LIBS $LIBLTDL"
983 AC_CHECK_FUNC(lt_dladvise_init, AC_DEFINE(HAVE_LT_DLADVISE_INIT, [], [Do we have the lt_dladvise_init function]))
984 LIBS="$old_LIBS"
985
986 dnl Check for libcrypt
987 dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD)
988 AC_CHECK_LIB(crypt, crypt,
989   CRYPTLIB="-lcrypt"
990 )
991 if test "$CRYPTLIB" != ""; then
992   AC_DEFINE(HAVE_CRYPT, [], [Do we have the crypt function])
993 else
994   AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT, [], [Do we have the crypt function]))
995 fi
996
997 dnl Check for libcipher
998 AC_CHECK_LIB(cipher, setkey,
999    CRYPTLIB="${CRYPTLIB} -lcipher"
1000 )
1001 AC_SUBST(CRYPTLIB)
1002
1003 dnl Check the style of gethostbyaddr, in order of preference
1004 dnl GNU (_r eight args)
1005 AC_DEFINE(GNUSTYLE, [1], [GNU-Style get*byaddr_r])
1006 dnl SYSV (_r six args)
1007 AC_DEFINE(SYSVSTYLE, [2], [SYSV-Style get*byaddr_r])
1008 dnl BSD (three args, may not be thread safe)
1009 AC_DEFINE(BSDSTYLE, [3], [BSD-Style get*byaddr_r])
1010 dnl Tru64 has BSD version, but it is thread safe
1011 dnl     http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/1739____.HTM
1012 dnl We need #stdio.h to define NULL on FreeBSD (at least)
1013 gethostbyaddrrstyle=""
1014 AC_MSG_CHECKING([gethostbyaddr_r() syntax])
1015 case "$host" in
1016 *-freebsd*)
1017 dnl With FreeBSD, check if there's a prototype for gethostbyaddr_r.
1018 dnl Some versions (FreeBSD 5.1?) have a symbol but no prototype - so we
1019 dnl override this test to BSDSTYLE. FreeBSD 6.2 and up have proper GNU
1020 dnl style support.
1021         AC_CHECK_DECLS([gethostbyaddr_r], [], [
1022                 AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE,
1023                         [style of gethostbyaddr_r functions ])
1024                 gethostbyaddrrstyle=BSD
1025                 AC_MSG_WARN([FreeBSD overridden to BSD-style])
1026         ], [
1027 #ifdef HAVE_NETDB_H
1028 #include <netdb.h>
1029 #endif
1030 ])
1031         ;;
1032 esac
1033 if test "x$gethostbyaddrrstyle" = "x"; then
1034         AC_TRY_LINK([
1035 #include <stdio.h>
1036 #include <netdb.h>
1037 ], [ gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) ], [
1038         AC_DEFINE(GETHOSTBYADDRRSTYLE, GNUSTYLE, [style of gethostbyaddr_r functions ])
1039         gethostbyaddrrstyle=GNU
1040 ])
1041 fi
1042 if test "x$gethostbyaddrrstyle" = "x"; then
1043         AC_TRY_LINK([
1044 #include <stdio.h>
1045 #include <netdb.h>
1046 ], [ gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL) ] , [
1047                 AC_DEFINE(GETHOSTBYADDRRSTYLE, SYSVSTYLE, [style of gethostbyaddr_r functions ])
1048                 gethostbyaddrrstyle=SYSV
1049         ])
1050 fi
1051 if test "x$gethostbyaddrrstyle" = "x"; then
1052         AC_TRY_LINK([
1053 #include <stdio.h>
1054 #include <netdb.h>
1055 ], [ gethostbyaddr(NULL, 0, 0)  ], [
1056                 AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE, [style of gethostbyaddr_r functions ])
1057                 gethostbyaddrrstyle=BSD
1058         ])
1059 fi
1060
1061 if test "x$gethostbyaddrrstyle" = "x"; then
1062         AC_MSG_RESULT([none!  It must not exist, here.])
1063 else
1064         AC_MSG_RESULT([${gethostbyaddrrstyle}-style])
1065 fi
1066
1067 if test "x$gethostbyaddrrstyle" = "xBSD"; then
1068         AC_MSG_WARN([ ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** ])
1069 fi
1070
1071 dnl Check the style of gethostbyname, in order of preference
1072 dnl GNU (_r seven args)
1073 dnl SYSV (_r five args)
1074 dnl BSD (two args, may not be thread safe)
1075 dnl Tru64 has BSD version, but it _is_ thread safe
1076 dnl     http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/1946____.HTM
1077 dnl We need #stdio.h to define NULL on FreeBSD (at least)
1078 gethostbynamerstyle=""
1079 AC_MSG_CHECKING([gethostbyname_r() syntax])
1080 AC_TRY_LINK([
1081 #include <stdio.h>
1082 #include <netdb.h>
1083 ], [ gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL) ], [
1084         AC_DEFINE(GETHOSTBYNAMERSTYLE, GNUSTYLE, [style of gethostbyname_r functions ])
1085         gethostbynamerstyle=GNU
1086 ])
1087 if test "x$gethostbynamerstyle" = "x"; then
1088         AC_TRY_LINK([
1089 #include <stdio.h>
1090 #include <netdb.h>
1091 ], [ gethostbyname_r(NULL, NULL, NULL, 0, NULL) ] , [
1092                 AC_DEFINE(GETHOSTBYNAMERSTYLE, SYSVSTYLE, [style of gethostbyname_r functions ])
1093                 gethostbynamerstyle=SYSV
1094         ])
1095 fi
1096 if test "x$gethostbynamerstyle" = "x"; then
1097         AC_TRY_LINK([
1098 #include <stdio.h>
1099 #include <netdb.h>
1100 ], [ gethostbyname(NULL)  ], [
1101                 AC_DEFINE(GETHOSTBYNAMERSTYLE, BSDSTYLE, [style of gethostbyname_r functions ])
1102                 gethostbynamerstyle=BSD
1103         ])
1104 fi
1105
1106 if test "x$gethostbynamerstyle" = "x"; then
1107         AC_MSG_RESULT([none!  It must not exist, here.])
1108 else
1109         AC_MSG_RESULT([${gethostbynamerstyle}-style])
1110 fi
1111
1112 if test "x$gethostbynamerstyle" = "xBSD"; then
1113         AC_MSG_WARN([ ****** BSD-style gethostbyname might NOT be thread-safe! ****** ])
1114 fi
1115
1116 dnl check for non-posix solaris ctime_r (extra buflen int arg)
1117 AC_DEFINE(POSIXSTYLE, [1], [Posix-Style ctime_r])
1118 AC_DEFINE(SOLARISSTYLE, [2], [Solaris-Style ctime_r])
1119 ctimerstyle=""
1120 AC_MSG_CHECKING([ctime_r() syntax])
1121 AC_TRY_LINK([
1122 #include <time.h>
1123 ], [ ctime_r(NULL, NULL, 0) ], [
1124         AC_DEFINE(CTIMERSTYLE, SOLARISSTYLE, [style of ctime_r function])
1125         ctimerstyle="SOLARIS"
1126 ])
1127 if test "x$ctimerstyle" = "x"; then
1128         AC_TRY_LINK([
1129 #include <time.h>
1130 ], [ ctime_r(NULL, NULL) ], [
1131                 AC_DEFINE(CTIMERSTYLE, POSIXSTYLE, [style of ctime_r function])
1132                 ctimerstyle="POSIX"
1133         ])
1134 fi
1135
1136 if test "x$ctimerstyle" = "x"; then
1137         AC_MSG_RESULT([none!  It must not exist, here.])
1138 else
1139         AC_MSG_RESULT([${ctimerstyle}-style])
1140 fi
1141
1142 AC_SUBST(HOSTINFO, $host)
1143
1144 dnl #############################################################
1145 dnl #
1146 dnl #  8. Checks for system services
1147 dnl #
1148 dnl #############################################################
1149
1150 dnl #
1151 dnl # Figure out where libtool is located,
1152 dnl #
1153 top_builddir=`pwd`
1154 export top_builddir
1155 AC_MSG_RESULT([top_builddir=$top_builddir])
1156 dnl # AC_SUBST(top_builddir)
1157 AC_SUBST(LIBLTDL)
1158 AC_SUBST(INCLTDL)
1159
1160 dnl import libtool stuff
1161
1162 dnl #############################################################
1163 dnl #
1164 dnl #  Configure in any module directories.
1165 dnl #
1166 dnl #############################################################
1167
1168 mysubdirs=""
1169 if test "x$EXPERIMENTAL" = "xyes"; then
1170   bar=`ls -1 "${srcdir}"/src/modules/rlm_*/configure | sed 's%/configure%%'`
1171   dnl # get rid of LF's.
1172   mysubdirs=`echo $mysubdirs $bar`
1173 else
1174   dnl #
1175   dnl # Find 'configure' in ONLY the stable modules
1176   dnl #
1177   for bar in `cat "${srcdir}"/src/modules/stable`; do
1178     if test -f "${srcdir}"/src/modules/$bar/configure; then
1179       mysubdirs="$mysubdirs src/modules/$bar"
1180     fi
1181   done
1182 fi
1183
1184 dnl ############################################################
1185 dnl # make modules by list
1186 dnl #############################################################
1187 if test "x$EXPERIMENTAL" = "xyes"; then
1188   for foo in `ls -1 "${srcdir}"/src/modules | grep rlm_`; do
1189     MODULES="$MODULES $foo"
1190   done
1191 else
1192    dnl #
1193    dnl # make ONLY the stable modules
1194    dnl #
1195    for foo in `cat "${srcdir}"/src/modules/stable`; do
1196     MODULES="$MODULES $foo"
1197    done
1198 fi
1199
1200 dnl #
1201 dnl #  Don't change the variable name here.  Autoconf goes bonkers
1202 dnl #  if you do.
1203 dnl #
1204 AC_CONFIG_SUBDIRS($mysubdirs)
1205 AC_SUBST(MODULES)
1206
1207 dnl #############################################################
1208 dnl #
1209 dnl #  And finally, output the results.
1210 dnl #
1211 dnl #############################################################
1212
1213 AC_CONFIG_COMMANDS([stamp-h], [echo timestamp > src/include/stamp-h])
1214 AC_CONFIG_COMMANDS([build-radpaths-h], [(cd ./src/include && /bin/sh ./build-radpaths-h)])
1215 AC_CONFIG_COMMANDS([main-chmod], [(cd ./src/main   && chmod +x checkrad.pl radlast radtest)])
1216 AC_CONFIG_COMMANDS([scripts-chmod], [(cd ./scripts    && chmod +x rc.radiusd radiusd.cron.daily radiusd.cron.monthly cryptpasswd)])
1217
1218 dnl #
1219 dnl #  Substitute whatever libraries we found to be necessary
1220 dnl #
1221 AC_SUBST(LIBS)
1222 AC_SUBST(INSTALLSTRIP)
1223
1224 USE_SHARED_LIBS=$enable_shared
1225 AC_SUBST(USE_SHARED_LIBS)
1226 USE_STATIC_LIBS=$enable_static
1227 AC_SUBST(USE_STATIC_LIBS)
1228 AC_SUBST(STATIC_MODULES)
1229 AC_SUBST(RADIUSD_MAJOR_VERSION)
1230 AC_SUBST(RADIUSD_MINOR_VERSION)
1231 AC_SUBST(RADIUSD_INCRM_VERSION)
1232 AC_SUBST(RADIUSD_VERSION)
1233 AC_SUBST(RADIUSD_VERSION_STRING)
1234 AC_SUBST(RADIUSD_VERSION_COMMIT)
1235
1236 AC_OUTPUT(\
1237         ./Make.inc \
1238         ./src/include/build-radpaths-h \
1239         ./src/main/Makefile \
1240         ./src/main/radsniff.mk \
1241         ./src/main/checkrad.pl \
1242         ./src/main/radlast \
1243         ./src/main/radtest \
1244         ./scripts/rc.radiusd \
1245         ./scripts/radiusd.cron.daily \
1246         ./scripts/radiusd.cron.monthly \
1247         ./scripts/cryptpasswd \
1248         ./raddb/dictionary \
1249         ./raddb/radrelay.conf \
1250         ./raddb/radiusd.conf
1251 )