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