1 dnl #############################################################
3 dnl # For information about autoconf, see:
5 dnl # http://www.gnu.org/software/autoconf/
7 dnl # The recommended order is:
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...])
21 dnl #############################################################
23 AC_INIT(src/main/radiusd.c)
24 AC_CONFIG_HEADER(src/include/autoconf.h)
25 AC_REVISION($Revision$)dnl
27 dnl # The version of the software
28 RADIUSD_MAJOR_VERSION=1
29 RADIUSD_MINOR_VERSION=1.0-pre0
30 RADIUSD_VERSION="${RADIUSD_MAJOR_VERSION}.${RADIUSD_MINOR_VERSION}"
32 dnl #############################################################
34 dnl # 0. Checks for compiler, libtool, and command line options.
36 dnl #############################################################
42 dnl # check for AIX, to allow us to use some BSD functions
43 dnl # must be before macros that call the compiler.
47 AC_PROG_GCC_TRADITIONAL
51 abs_top_builddir=`pwd`
52 AC_SUBST(abs_top_builddir)
58 dnl # check for system bytesex
59 dnl # AC_DEFINES WORDS_BIGENDIAN
63 AC_CHECK_PROG(GMAKE, gmake, yes, no)
64 if test $GMAKE = no; then
65 AC_PATH_PROG(MAKE, make, /usr/local/bin/make)
67 AC_PATH_PROG(MAKE, gmake, /usr/local/gnu/bin/make)
69 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
70 if test -z "$makever"; then
71 AC_MSG_ERROR(GNU Make is not installed. Please download and install it
72 from ftp://prep.ai.mit.edu/pub/gnu/make/ before continuing.)
75 dnl libltdl is installable
76 AC_LIBLTDL_INSTALLABLE
79 dnl use system-wide libtool, if it exists
80 AC_ARG_WITH(system-libtool,
81 [ --with-system-libtool try to use libtool installed in your system [default=use our own]],
82 [ AC_PATH_PROG(LIBTOOL, libtool,,$PATH:/usr/local/bin) ],
84 LIBTOOL="`pwd`/libtool"
86 dnl ensure that we're looking for dlopen
89 dnl Figure out how to build shared libraries
94 dnl Put this in later, when all distributed modules use autoconf.
95 dnl AC_ARG_WITH(disablemodulefoo,
96 dnl [ --without-rlm_foo Disables module compilation. Module list:]
97 dnl esyscmd([find src/modules -type d -name rlm_\* -print |\
98 dnl sed -e 's%src/modules/.*/% (sub)- %; s%.*/%- %' |\
99 dnl awk '{print " "$0}']))
101 AC_ARG_ENABLE(strict-dependencies,
102 [ --enable-strict-dependencies Fail configure on lack of module dependancy.])
104 dnl extra argument: --with-logdir
105 logdir='${localstatedir}/log/radius'
106 AC_MSG_CHECKING(logdir)
108 [ --with-logdir=DIR Directory for logfiles [LOCALSTATEDIR/log/radius] ],
111 AC_MSG_ERROR(Need logdir)
121 AC_MSG_RESULT($logdir)
123 dnl extra argument: --with-radacctdir
124 radacctdir='${logdir}/radacct'
125 AC_MSG_CHECKING(radacctdir)
126 AC_ARG_WITH(radacctdir,
127 [ --with-radacctdir=PATH Directory for detail files [LOGDIR/radacct] ],
130 AC_MSG_ERROR(Need radacctdir)
135 radacctdir="$withval"
140 AC_MSG_RESULT($radacctdir)
142 dnl extra argument: --with-raddbdir
143 raddbdir='${sysconfdir}/raddb'
144 AC_MSG_CHECKING(raddbdir)
145 AC_ARG_WITH(raddbdir,
146 [ --with-raddbdir=DIR Directory for config files [SYSCONFDIR/raddb] ],
149 AC_MSG_ERROR(Need raddbdir)
159 AC_MSG_RESULT($raddbdir)
161 dnl extra argument: --with-ascend-binary
163 AC_ARG_WITH(ascend-binary,
164 [ --with-ascend-binary Include support for Ascend binary filter attributes (default=yes)],
172 if test "X$ASCEND_BINARY" = "Xyes"; then
173 AC_DEFINE(ASCEND_BINARY, [], [Include support for Ascend binary filter attributes])
176 dnl extra argument: --with-threads
179 [ --with-threads Use threads, if available. (default=yes) ],
188 dnl extra argument: --with-snmp
191 [ --with-snmp Compile in SNMP support. (default=yes)],
200 dnl extra argument: --with-large-files
201 rad_enable_largefiles=no
202 AC_ARG_WITH(large-files,
203 [ --with-large-files Compile in large (2G+) file support. (default=no)],
206 rad_enable_largefiles=yes
214 dnl AC_ARG_ENABLE(ltdl-install,
215 dnl [ --disable-ltdl-install do not install libltdl])
216 dnl if test x"${enable_ltdl_install+set}" != xset; then
217 dnl enable_ltdl_install=yes
218 dnl ac_configure_args="$ac_configure_args --enable-ltdl-install"
220 dnl AC_CONFIG_SUBDIRS(libltdl)
223 dnl # Allow the user to specify a list of modules to be linked
224 dnl # statically to the server.
227 AC_ARG_WITH(static_modules,
228 [ --with-static-modules=QUOTED-MODULE-LIST],[
229 for i in $withval; do
230 STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
235 dnl # Enable developer C compiler warnings
237 AC_ARG_ENABLE(developer,
238 [ --enable-developer Enables features of interest to developers.],
239 [ case "$enableval" in
248 if test "x$developer" != "xno" -a -d $srcdir/CVS; then
249 dnl turn on the developer flag when taken from a CVS checkout (not a release)
253 dnl extra argument: --with-experimental-modules
255 AC_ARG_WITH(experimental-modules,
256 [ --with-experimental-modules Use experimental and unstable modules. (default=no) ],
266 dnl # extra argument: --openssl-includes=dir
268 AC_ARG_WITH(openssl-includes,
269 [ --with-openssl-includes=DIR Directory to look for OpenSSL include files],
271 *) OPENSSL_INCLUDE_DIR="$withval"
277 dnl # extra argument: --openssl-libraries=dir
279 AC_ARG_WITH(openssl-libraries,
280 [ --with-openssl-libraries=DIR Directory to look for OpenSSL library files],
282 *) OPENSSL_LIB_DIR="$withval"
288 dnl # These next two arguments don't actually do anything. They're
289 dnl # place holders so that the top-level configure script can tell
290 dnl # the user how to configure lower-level modules
294 dnl # extra argument: --with-rlm-FOO-lib-dir
296 AC_ARG_WITH(rlm-FOO-lib-dir,
297 [ --with-rlm-FOO-lib-dir=DIR Directory to look for library files used by module FOO],
305 dnl # extra argument: --with-rlm-FOO-include-dir
307 AC_ARG_WITH(rlm-FOO-include-dir,
308 [ --with-rlm-FOO-include-dir=DIR Directory to look for include files used by module FOO],
315 dnl See what include-style is used by the make program.
316 dnl AC_MSG_CHECKING(include style for make)
317 dnl echo "include /dev/null" > testmake.$$
318 dnl echo "all:" >> testmake.$$
319 dnl make -f testmake.$$ >/dev/null 2>&1
328 dnl rm -f testmake.$$
329 dnl AC_MSG_RESULT(" $INCLUDE")
330 dnl AC_SUBST(INCLUDE)
333 dnl extra argument: --with-udpfromto
335 AC_ARG_WITH(udpfromto,
336 [ --with-udpfromto Compile in UDPFROMTO support. (default=no)],
346 if test "x$WITH_UDPFROMTO" = "xyes"; then
347 AC_DEFINE(WITH_UDPFROMTO, [], [define if you want udpfromto])
350 dnl #############################################################
352 dnl # 1. Checks for programs
354 dnl #############################################################
357 AC_PATH_PROG(PERL, perl, /usr/local/bin/perl)
358 if test "x$ac_cv_path_PERL" = "x"; then
359 AC_MSG_WARN(perl not found - Simultaneous-Use and checkrad.pl may not work)
361 AC_PATH_PROG(SNMPGET, snmpget)
362 if test "x$ac_cv_path_SNMPGET" = "x"; then
363 AC_MSG_WARN(snmpget not found - Simultaneous-Use and checkrad.pl may not work)
366 AC_PATH_PROG(SNMPWALK, snmpwalk)
367 if test "x$ac_cv_path_SNMPWALK" = "x"; then
368 AC_MSG_WARN(snmpwalk not found - Simultaneous-Use and checkrad.pl may not work)
371 AC_PATH_PROG(RUSERS, rusers, /usr/bin/rusers)
373 dnl FIXME This is truly gross.
374 missing_dir=`cd $ac_aux_dir && pwd`
375 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
376 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
377 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
379 AC_PATH_PROG(LOCATE,locate)
380 AC_PATH_PROG(DIRNAME,dirname)
381 AC_PATH_PROG(GREP,grep)
383 dnl #############################################################
385 dnl # 2. Checks for libraries
387 dnl #############################################################
389 dnl If using pthreads, check for -lpthread (posix) or -lc_r (*BSD)
391 if test "x$WITH_THREADS" = "xyes"; then
392 if test $ac_cv_prog_suncc = "yes"; then
396 AC_CHECK_HEADERS(pthread.h, [], [ WITH_THREADS="no" ])
399 dnl # pthread stuff is usually in -lpthread
400 dnl # or in -lc_r, on *BSD
402 dnl # On Some systems, we need extra pre-processor flags, to get them to
403 dnl # to do the threading properly.
405 AC_CHECK_LIB(pthread, pthread_create,
406 [ CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
407 LIBS="$LIBS -lpthread" ],
408 AC_CHECK_LIB(c_r, pthread_create,
409 [ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE" ],
410 [ WITH_THREADS="no" ]
416 dnl # If we have NO pthread libraries, remove any knowledge of threads.
418 if test "x$WITH_THREADS" != "xyes"; then
420 ac_cv_header_pthread_h="no"
424 dnl # We need sem_init() and friends, as they're the friendliest
425 dnl # semaphore functions for threading.
427 dnl # HP/UX requires linking with librt, too, to get the sem_* symbols.
428 dnl # Some systems have them in -lsem
429 dnl # Solaris has them in -lposix4
431 AC_SEARCH_LIBS(sem_init, pthread sem posix4 rt,
433 [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)]
437 dnl Check if we need -lsocket
438 AC_CHECK_LIB(socket, getsockname)
440 dnl Check for -lresolv
441 dnl This library may be needed later.
442 AC_CHECK_LIB(resolv, inet_aton)
444 dnl Check if we need -lnsl. Usually if we want to
445 dnl link against -lsocket we need to include -lnsl as well.
446 AC_CHECK_LIB(nsl, inet_ntoa)
448 dnl #############################################################
450 dnl # 3. Checks for header files
452 dnl #############################################################
455 dnl # Interix requires us to set -D_ALL_SOURCE, otherwise
456 dnl # getopt will be #included, but won't link. <sigh>
461 CFLAGS="$CFLAGS -D_ALL_SOURCE"
502 AC_CHECK_HEADER(regex.h, AC_DEFINE(HAVE_REGEX_H, [], [define this if we have the <regex.h> header file]))
503 if test "x$ac_cv_header_regex_h" = "xyes"; then
511 ], [AC_DEFINE(HAVE_REG_EXTENDED, [], [define this if we have REG_EXTENDED (from <regex.h>)]) REGEX_EXTENDED=yes])
514 AC_SUBST(REGEX_EXTENDED)
517 dnl # other checks which require headers
519 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
521 AC_DEFINE(OSFC2, [], [define if you have OSFC2 authentication])
524 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
526 AC_DEFINE(OSFSIA, [], [define if you have OSFSIA authentication])
529 smart_try_dir="$OPENSSL_INCLUDE_DIR"
530 dnl # stupid RedHat shit
531 CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
532 FR_SMART_CHECK_INCLUDE(openssl/ssl.h)
535 if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
536 AC_DEFINE(HAVE_OPENSSL_SSL_H, [], [define if you have openssl/ssl.h])
537 old_CPPFLAGS="$CPPFLAGS"
538 if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
539 CPPFLAGS="-I$OPENSSL_INCLUDE_DIR $CPPFLAGS"
547 CPPFLAGS="$old_CPPFLAGS"
549 AC_MSG_CHECKING([for OpenSSL version >= 0.9.7])
550 old_CPPFLAGS=$CPPFLAGS
552 if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
553 CPPFLAGS="-I$OPENSSL_INCLUDE_DIR"
556 [#include <openssl/crypto.h>
557 #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
561 if test "x$goodssl" != "xyes"; then
568 # Look for the OpenSSL libraries.
569 smart_try_dir=$OPENSSL_LIB_DIR
570 FR_SMART_CHECK_LIB(crypto, DH_new)
571 if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
572 FR_SMART_CHECK_LIB(ssl, SSL_new)
573 if test "x$ac_cv_lib_ssl_SSL_new" = "xyes"; then
574 if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
575 OPENSSL_INCLUDE="-I$OPENSSL_INCLUDE_DIR"
577 if test "x$OPENSSL_LIB_DIR" != "x"; then
578 OPENSSL_LIBS="-L$OPENSSL_LIB_DIR"
580 OPENSSL_LIBS="$OPENSSL_LIBS -lcrypto -lssl -lcrypto"
587 CPPFLAGS=$old_CPPFLAGS
590 AC_SUBST(OPENSSL_INCLUDE)
591 AC_SUBST(OPENSSL_LIBS)
594 dnl #############################################################
596 dnl # 4. Checks for typedefs
598 dnl #############################################################
601 dnl # Ensure that these are defined
608 dnl check for socklen_t
609 FR_CHECK_TYPE_INCLUDE([
610 #ifdef HAVE_SYS_TYPES_H
611 #include <sys/types.h>
613 #ifdef HAVE_SYS_SOCKET_H
614 #include <sys/socket.h>
616 ],socklen_t, int, [socklen_t is generally 'int' on systems which don't use it])
618 dnl check for uint8_t
619 FR_CHECK_TYPE_INCLUDE([
620 #ifdef HAVE_INTTYPES_H
621 #include <inttypes.h>
626 ],uint8_t, unsigned char, [uint8_t should be the canonical 'octet' for network traffic])
628 dnl check for uint16_t
629 FR_CHECK_TYPE_INCLUDE([
630 #ifdef HAVE_INTTYPES_H
631 #include <inttypes.h>
636 ],uint16_t, unsigned short, [uint16_t should be the canonical '2 octets' for network traffic])
638 dnl check for uint32_t
639 FR_CHECK_TYPE_INCLUDE([
640 #ifdef HAVE_INTTYPES_H
641 #include <inttypes.h>
646 ],uint32_t, unsigned int, [uint32_t should be the canonical 'network integer])
648 dnl #############################################################
650 dnl # 5. Checks for structures and functions
652 dnl #############################################################
678 RADIUSD_NEED_DECLARATIONS( \
691 dnl # check if we have utmpx.h
692 dnl # if so, check if struct utmpx has entry ut_xtime
693 dnl # if not, set it to define ut_xtime == ut_tv.tv_sec
694 if test "x$ac_cv_header_utmpx_h" = "xyes"
696 FR_CHECK_STRUCT_HAS_MEMBER([#include <utmpx.h>], [struct utmpx], ut_xtime)
697 if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"
699 AC_DEFINE(ut_xtime,ut_tv.tv_sec, [define to something if you don't have ut_xtime in struct utmpx])
703 dnl # struct ip_pktinfo
704 FR_CHECK_STRUCT_HAS_MEMBER([#include <netinet/in.h>], [struct in_pktinfo], ipi_addr)
705 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"
707 AC_DEFINE(HAVE_IP_PKTINFO, [], [define if you have IP_PKTINFO (Linux)])
710 dnl #############################################################
712 dnl # 6. Checks for compiler characteristics
714 dnl #############################################################
717 dnl # Ensure that these are defined
722 dnl # See if this is OS/2
724 AC_MSG_CHECKING(type of OS)
727 if test "$OS" = "OS/2"; then
735 dnl # Set Default CFLAGS
737 if test "x$GCC" = "xyes"; then
738 CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
741 AC_MSG_CHECKING(for developer gcc flags)
742 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
743 devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef"
744 CFLAGS="$CFLAGS $devflags"
746 AC_MSG_RESULT(yes. Using $devflags)
749 CFLAGS="$CFLAGS -DNDEBUG"
754 dnl #############################################################
756 dnl # 7. Checks for library functions
758 dnl #############################################################
760 dnl Check for libcrypt
761 dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD)
762 AC_CHECK_LIB(crypt, crypt,
765 if test "$CRYPTLIB" != ""; then
766 AC_DEFINE(HAVE_CRYPT, [], [Do we have the crypt function])
768 AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT, [], [Do we have the crypt function]))
771 dnl Check for libcipher
772 AC_CHECK_LIB(cipher, setkey,
773 CRYPTLIB="${CRYPTLIB} -lcipher"
777 if test "x$WITH_SNMP" = "xyes"; then
781 dnl Check the style of gethostbyaddr, in order of preference
782 dnl GNU (_r eight args)
783 AC_DEFINE(GNUSTYLE, [1], [GNU-Style get*byaddr_r])
784 dnl SYSV (_r six args)
785 AC_DEFINE(SYSVSTYLE, [2], [SYSV-Style get*byaddr_r])
786 dnl BSD (three args, may not be thread safe)
787 AC_DEFINE(BSDSTYLE, [3], [BSD-Style get*byaddr_r])
788 dnl Tru64 has BSD version, but it is thread safe
789 dnl http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/1739____.HTM
790 dnl We need #stdio.h to define NULL on FreeBSD (at least)
791 gethostbyaddrrstyle=""
792 AC_MSG_CHECKING([gethostbyaddr_r() syntax])
795 AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE, [style of gethostbyaddr_r functions ])
796 gethostbyaddrrstyle=BSD
797 AC_MSG_WARN([FreeBSD overridden to BSD-style])
800 if test "x$gethostbyaddrrstyle" = "x"; then
804 ], [ gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) ], [
805 AC_DEFINE(GETHOSTBYADDRRSTYLE, GNUSTYLE, [style of gethostbyaddr_r functions ])
806 gethostbyaddrrstyle=GNU
809 if test "x$gethostbyaddrrstyle" = "x"; then
813 ], [ gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL) ] , [
814 AC_DEFINE(GETHOSTBYADDRRSTYLE, SYSVSTYLE, [style of gethostbyaddr_r functions ])
815 gethostbyaddrrstyle=SYSV
818 if test "x$gethostbyaddrrstyle" = "x"; then
822 ], [ gethostbyaddr(NULL, 0, 0) ], [
823 AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE, [style of gethostbyaddr_r functions ])
824 gethostbyaddrrstyle=BSD
828 if test "x$gethostbyaddrrstyle" = "x"; then
829 AC_MSG_RESULT([none! It must not exist, here.])
831 AC_MSG_RESULT([${gethostbyaddrrstyle}-style])
834 if test "x$gethostbyaddrrstyle" = "xBSD"; then
835 AC_MSG_WARN([ ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** ])
838 dnl Check the style of gethostbyname, in order of preference
839 dnl GNU (_r seven args)
840 dnl SYSV (_r five args)
841 dnl BSD (two args, may not be thread safe)
842 dnl Tru64 has BSD version, but it _is_ thread safe
843 dnl http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/1946____.HTM
844 dnl We need #stdio.h to define NULL on FreeBSD (at least)
845 gethostbynamerstyle=""
846 AC_MSG_CHECKING([gethostbyname_r() syntax])
850 ], [ gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL) ], [
851 AC_DEFINE(GETHOSTBYNAMERSTYLE, GNUSTYLE, [style of gethostbyname_r functions ])
852 gethostbynamerstyle=GNU
854 if test "x$gethostbynamerstyle" = "x"; then
858 ], [ gethostbyname_r(NULL, NULL, NULL, 0, NULL) ] , [
859 AC_DEFINE(GETHOSTBYNAMERSTYLE, SYSVSTYLE, [style of gethostbyname_r functions ])
860 gethostbynamerstyle=SYSV
863 if test "x$gethostbynamerstyle" = "x"; then
867 ], [ gethostbyname(NULL) ], [
868 AC_DEFINE(GETHOSTBYNAMERSTYLE, BSDSTYLE, [style of gethostbyname_r functions ])
869 gethostbynamerstyle=BSD
873 if test "x$gethostbynamerstyle" = "x"; then
874 AC_MSG_RESULT([none! It must not exist, here.])
876 AC_MSG_RESULT([${gethostbynamerstyle}-style])
879 if test "x$gethostbynamerstyle" = "xBSD"; then
880 AC_MSG_WARN([ ****** BSD-style gethostbyname might NOT be thread-safe! ****** ])
883 dnl check for non-posix solaris ctime_r (extra buflen int arg)
884 AC_DEFINE(POSIXSTYLE, [1], [Posix-Style ctime_r])
885 AC_DEFINE(SOLARISSTYLE, [2], [Solaris-Style ctime_r])
887 AC_MSG_CHECKING([ctime_r() syntax])
890 ], [ ctime_r(NULL, NULL, 0) ], [
891 AC_DEFINE(CTIMERSTYLE, SOLARISSTYLE, [style of ctime_r function])
892 ctimerstyle="SOLARIS"
894 if test "x$ctimerstyle" = "x"; then
897 ], [ ctime_r(NULL, NULL) ], [
898 AC_DEFINE(CTIMERSTYLE, POSIXSTYLE, [style of ctime_r function])
903 if test "x$ctimerstyle" = "x"; then
904 AC_MSG_RESULT([none! It must not exist, here.])
906 AC_MSG_RESULT([${ctimerstyle}-style])
909 AC_SUBST(HOSTINFO, $host)
911 dnl #############################################################
913 dnl # 8. Checks for system services
915 dnl #############################################################
918 dnl # Figure out where libtool is located,
922 AC_MSG_RESULT([top_builddir=$top_builddir])
923 dnl # AC_SUBST(top_builddir)
928 dnl # Work around stupid autoconf crap
930 if test "x$INCLTDL" != "x";then
931 INCLTDL='-I${top_builddir}/''libltdl'
934 dnl import libtool stuff
936 dnl #############################################################
938 dnl # Configure in any module directories.
940 dnl #############################################################
943 if test "x$EXPERIMENTAL" = "xyes"; then
944 bar=`ls -1 src/modules/rlm_*/configure | sed 's%/configure%%'`
945 dnl # get rid of LF's.
946 mysubdirs=`echo $bar`
949 dnl # Find 'configure' in ONLY the stable modules
951 for bar in `cat src/modules/stable`; do
952 if test -f src/modules/$bar/configure; then
953 mysubdirs="$mysubdirs src/modules/$bar"
958 dnl ############################################################
959 dnl # make modules by list
960 dnl #############################################################
962 if test "x$EXPERIMENTAL" = "xyes"; then
963 for foo in `ls -1 src/modules | grep rlm_`; do
964 MODULES="$MODULES $foo"
968 dnl # make ONLY the stable modules
970 for foo in `cat src/modules/stable`; do
971 MODULES="$MODULES $foo"
976 dnl # Don't change the variable name here. Autoconf goes bonkers
979 AC_CONFIG_SUBDIRS($mysubdirs)
982 dnl #############################################################
984 dnl # And finally, output the results.
986 dnl #############################################################
988 AC_CONFIG_COMMANDS([stamp-h], [echo timestamp > src/include/stamp-h])
989 AC_CONFIG_COMMANDS([build-radpaths-h], [(cd ./src/include && /bin/sh ./build-radpaths-h)])
990 AC_CONFIG_COMMANDS([main-chmod], [(cd ./src/main && chmod +x checkrad.pl radlast radtest)])
991 AC_CONFIG_COMMANDS([scripts-chmod], [(cd ./scripts && chmod +x rc.radiusd radwatch check-radiusd-config radiusd.cron.daily radiusd.cron.monthly cryptpasswd)])
994 dnl # Substitute whatever libraries we found to be necessary
997 AC_SUBST(INSTALLSTRIP)
999 USE_SHARED_LIBS=$enable_shared
1000 AC_SUBST(USE_SHARED_LIBS)
1001 USE_STATIC_LIBS=$enable_static
1002 AC_SUBST(USE_STATIC_LIBS)
1003 AC_SUBST(STATIC_MODULES)
1004 AC_SUBST(RADIUSD_MAJOR_VERSION)
1005 AC_SUBST(RADIUSD_MINOR_VERSION)
1006 AC_SUBST(RADIUSD_VERSION)
1011 ./src/include/build-radpaths-h \
1012 ./src/main/Makefile \
1013 ./src/main/checkrad.pl \
1014 ./src/main/radlast \
1015 ./src/main/radtest \
1016 ./scripts/rc.radiusd \
1017 ./scripts/radwatch \
1018 ./scripts/check-radiusd-config \
1019 ./scripts/radiusd.cron.daily \
1020 ./scripts/radiusd.cron.monthly \
1021 ./scripts/cryptpasswd \
1022 ./raddb/dictionary \
1023 ./raddb/radiusd.conf