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 #############################################################
24 AC_INIT(src/main/radiusd.c)
25 AC_CONFIG_HEADER(src/include/autoconf.h)
26 AC_REVISION($Revision$)dnl
28 dnl # The version of the software
29 RADIUSD_MAJOR_VERSION=1
30 RADIUSD_MINOR_VERSION=1.0-pre0
31 RADIUSD_VERSION="${RADIUSD_MAJOR_VERSION}.${RADIUSD_MINOR_VERSION}"
33 dnl #############################################################
35 dnl # 0. Checks for compiler, libtool, and command line options.
37 dnl #############################################################
43 dnl # check for AIX, to allow us to use some BSD functions
44 dnl # must be before macros that call the compiler.
48 AC_PROG_GCC_TRADITIONAL
52 abs_top_builddir=`pwd`
53 AC_SUBST(abs_top_builddir)
59 dnl # check for system bytesex
60 dnl # AC_DEFINES WORDS_BIGENDIAN
64 AC_CHECK_PROG(GMAKE, gmake, yes, no)
65 if test $GMAKE = no; then
66 AC_PATH_PROG(MAKE, make, /usr/local/bin/make)
68 AC_PATH_PROG(MAKE, gmake, /usr/local/gnu/bin/make)
70 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
71 if test -z "$makever"; then
72 AC_MSG_ERROR(GNU Make is not installed. Please download and install it
73 from ftp://prep.ai.mit.edu/pub/gnu/make/ before continuing.)
76 dnl libltdl is installable
77 AC_LIBLTDL_INSTALLABLE
80 dnl use system-wide libtool, if it exists
81 AC_ARG_WITH(system-libtool,
82 [ --with-system-libtool try to use libtool installed in your system [default=use our own]],
83 [ AC_PATH_PROG(LIBTOOL, libtool,,$PATH:/usr/local/bin) ],
85 LIBTOOL="`pwd`/libtool"
87 dnl ensure that we're looking for dlopen
90 dnl Figure out how to build shared libraries
95 dnl Put this in later, when all distributed modules use autoconf.
96 dnl AC_ARG_WITH(disablemodulefoo,
97 dnl [ --without-rlm_foo Disables module compilation. Module list:]
98 dnl esyscmd([find src/modules -type d -name rlm_\* -print |\
99 dnl sed -e 's%src/modules/.*/% (sub)- %; s%.*/%- %' |\
100 dnl awk '{print " "$0}']))
102 AC_ARG_ENABLE(strict-dependencies,
103 [ --enable-strict-dependencies Fail configure on lack of module dependancy.])
105 dnl extra argument: --with-logdir
106 logdir='${localstatedir}/log/radius'
107 AC_MSG_CHECKING(logdir)
109 [ --with-logdir=DIR Directory for logfiles [LOCALSTATEDIR/log/radius] ],
112 AC_MSG_ERROR(Need logdir)
122 AC_MSG_RESULT($logdir)
124 dnl extra argument: --with-radacctdir
125 radacctdir='${logdir}/radacct'
126 AC_MSG_CHECKING(radacctdir)
127 AC_ARG_WITH(radacctdir,
128 [ --with-radacctdir=PATH Directory for detail files [LOGDIR/radacct] ],
131 AC_MSG_ERROR(Need radacctdir)
136 radacctdir="$withval"
141 AC_MSG_RESULT($radacctdir)
143 dnl extra argument: --with-raddbdir
144 raddbdir='${sysconfdir}/raddb'
145 AC_MSG_CHECKING(raddbdir)
146 AC_ARG_WITH(raddbdir,
147 [ --with-raddbdir=DIR Directory for config files [SYSCONFDIR/raddb] ],
150 AC_MSG_ERROR(Need raddbdir)
160 AC_MSG_RESULT($raddbdir)
162 dnl extra argument: --with-ascend-binary
164 AC_ARG_WITH(ascend-binary,
165 [ --with-ascend-binary Include support for Ascend binary filter attributes (default=yes)],
173 if test "X$ASCEND_BINARY" = "Xyes"; then
174 AC_DEFINE(ASCEND_BINARY, [], [Include support for Ascend binary filter attributes])
177 dnl extra argument: --with-threads
180 [ --with-threads Use threads, if available. (default=yes) ],
189 dnl extra argument: --with-snmp
192 [ --with-snmp Compile in SNMP support. (default=yes)],
201 dnl extra argument: --with-large-files
202 rad_enable_largefiles=no
203 AC_ARG_WITH(large-files,
204 [ --with-large-files Compile in large (2G+) file support. (default=no)],
207 rad_enable_largefiles=yes
215 dnl AC_ARG_ENABLE(ltdl-install,
216 dnl [ --disable-ltdl-install do not install libltdl])
217 dnl if test x"${enable_ltdl_install+set}" != xset; then
218 dnl enable_ltdl_install=yes
219 dnl ac_configure_args="$ac_configure_args --enable-ltdl-install"
221 dnl AC_CONFIG_SUBDIRS(libltdl)
224 dnl # Allow the user to specify a list of modules to be linked
225 dnl # statically to the server.
228 AC_ARG_WITH(static_modules,
229 [ --with-static-modules=QUOTED-MODULE-LIST],[
230 for i in $withval; do
231 STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
236 dnl # Enable developer C compiler warnings
238 AC_ARG_ENABLE(developer,
239 [ --enable-developer Enables features of interest to developers.],
240 [ case "$enableval" in
249 if test "x$developer" != "xno" -a -d $srcdir/CVS; then
250 dnl turn on the developer flag when taken from a CVS checkout (not a release)
254 dnl extra argument: --with-experimental-modules
256 AC_ARG_WITH(experimental-modules,
257 [ --with-experimental-modules Use experimental and unstable modules. (default=no) ],
267 dnl # extra argument: --openssl-includes=dir
269 AC_ARG_WITH(openssl-includes,
270 [ --with-openssl-includes=DIR Directory to look for OpenSSL include files],
272 *) OPENSSL_INCLUDE_DIR="$withval"
278 dnl # extra argument: --openssl-libraries=dir
280 AC_ARG_WITH(openssl-libraries,
281 [ --with-openssl-libraries=DIR Directory to look for OpenSSL library files],
283 *) OPENSSL_LIB_DIR="$withval"
289 dnl # These next two arguments don't actually do anything. They're
290 dnl # place holders so that the top-level configure script can tell
291 dnl # the user how to configure lower-level modules
295 dnl # extra argument: --with-rlm-FOO-lib-dir
297 AC_ARG_WITH(rlm-FOO-lib-dir,
298 [ --with-rlm-FOO-lib-dir=DIR Directory to look for library files used by module FOO],
306 dnl # extra argument: --with-rlm-FOO-include-dir
308 AC_ARG_WITH(rlm-FOO-include-dir,
309 [ --with-rlm-FOO-include-dir=DIR Directory to look for include files used by module FOO],
316 dnl See what include-style is used by the make program.
317 dnl AC_MSG_CHECKING(include style for make)
318 dnl echo "include /dev/null" > testmake.$$
319 dnl echo "all:" >> testmake.$$
320 dnl make -f testmake.$$ >/dev/null 2>&1
329 dnl rm -f testmake.$$
330 dnl AC_MSG_RESULT(" $INCLUDE")
331 dnl AC_SUBST(INCLUDE)
334 dnl extra argument: --with-udpfromto
336 AC_ARG_WITH(udpfromto,
337 [ --with-udpfromto Compile in UDPFROMTO support. (default=no)],
347 if test "x$WITH_UDPFROMTO" = "xyes"; then
348 AC_DEFINE(WITH_UDPFROMTO, [], [define if you want udpfromto])
351 dnl #############################################################
353 dnl # 1. Checks for programs
355 dnl #############################################################
358 AC_PATH_PROG(PERL, perl, /usr/local/bin/perl)
359 if test "x$ac_cv_path_PERL" = "x"; then
360 AC_MSG_WARN(perl not found - Simultaneous-Use and checkrad.pl may not work)
362 AC_PATH_PROG(SNMPGET, snmpget)
363 if test "x$ac_cv_path_SNMPGET" = "x"; then
364 AC_MSG_WARN(snmpget not found - Simultaneous-Use and checkrad.pl may not work)
367 AC_PATH_PROG(SNMPWALK, snmpwalk)
368 if test "x$ac_cv_path_SNMPWALK" = "x"; then
369 AC_MSG_WARN(snmpwalk not found - Simultaneous-Use and checkrad.pl may not work)
372 AC_PATH_PROG(RUSERS, rusers, /usr/bin/rusers)
374 dnl FIXME This is truly gross.
375 missing_dir=`cd $ac_aux_dir && pwd`
376 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
377 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
378 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
380 AC_PATH_PROG(LOCATE,locate)
381 AC_PATH_PROG(DIRNAME,dirname)
382 AC_PATH_PROG(GREP,grep)
384 dnl #############################################################
386 dnl # 2. Checks for libraries
388 dnl #############################################################
390 dnl If using pthreads, check for -lpthread (posix) or -lc_r (*BSD)
392 if test "x$WITH_THREADS" = "xyes"; then
393 if test $ac_cv_prog_suncc = "yes"; then
397 AC_CHECK_HEADERS(pthread.h, [], [ WITH_THREADS="no" ])
400 dnl # pthread stuff is usually in -lpthread
401 dnl # or in -lc_r, on *BSD
403 dnl # On Some systems, we need extra pre-processor flags, to get them to
404 dnl # to do the threading properly.
406 AC_CHECK_LIB(pthread, pthread_create,
407 [ CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
408 LIBS="$LIBS -lpthread" ],
409 AC_CHECK_LIB(c_r, pthread_create,
410 [ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE" ],
411 [ WITH_THREADS="no" ]
417 dnl # If we have NO pthread libraries, remove any knowledge of threads.
419 if test "x$WITH_THREADS" != "xyes"; then
421 ac_cv_header_pthread_h="no"
425 dnl # We need sem_init() and friends, as they're the friendliest
426 dnl # semaphore functions for threading.
428 dnl # HP/UX requires linking with librt, too, to get the sem_* symbols.
429 dnl # Some systems have them in -lsem
430 dnl # Solaris has them in -lposix4
432 AC_SEARCH_LIBS(sem_init, pthread sem posix4 rt,
434 [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)]
438 dnl Check if we need -lsocket
439 AC_CHECK_LIB(socket, getsockname)
441 dnl Check for -lresolv
442 dnl This library may be needed later.
443 AC_CHECK_LIB(resolv, inet_aton)
445 dnl Check if we need -lnsl. Usually if we want to
446 dnl link against -lsocket we need to include -lnsl as well.
447 AC_CHECK_LIB(nsl, inet_ntoa)
449 dnl #############################################################
451 dnl # 3. Checks for header files
453 dnl #############################################################
456 dnl # Interix requires us to set -D_ALL_SOURCE, otherwise
457 dnl # getopt will be #included, but won't link. <sigh>
462 CFLAGS="$CFLAGS -D_ALL_SOURCE"
503 AC_CHECK_HEADER(regex.h, AC_DEFINE(HAVE_REGEX_H, [], [define this if we have the <regex.h> header file]))
504 if test "x$ac_cv_header_regex_h" = "xyes"; then
512 ], [AC_DEFINE(HAVE_REG_EXTENDED, [], [define this if we have REG_EXTENDED (from <regex.h>)]) REGEX_EXTENDED=yes])
515 AC_SUBST(REGEX_EXTENDED)
518 dnl # other checks which require headers
520 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
522 AC_DEFINE(OSFC2, [], [define if you have OSFC2 authentication])
525 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
527 AC_DEFINE(OSFSIA, [], [define if you have OSFSIA authentication])
530 smart_try_dir="$OPENSSL_INCLUDE_DIR"
531 dnl # stupid RedHat shit
532 CFLAGS="$CFLAGS -DOPENSSL_NO_KRB5"
533 FR_SMART_CHECK_INCLUDE(openssl/ssl.h)
536 if test "x$ac_cv_header_openssl_ssl_h" = "xyes"; then
537 AC_DEFINE(HAVE_OPENSSL_SSL_H, [], [define if you have openssl/ssl.h])
538 old_CPPFLAGS="$CPPFLAGS"
539 if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
540 CPPFLAGS="-I$OPENSSL_INCLUDE_DIR $CPPFLAGS"
548 CPPFLAGS="$old_CPPFLAGS"
550 AC_MSG_CHECKING([for OpenSSL version >= 0.9.7])
551 old_CPPFLAGS=$CPPFLAGS
553 if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
554 CPPFLAGS="-I$OPENSSL_INCLUDE_DIR"
557 [#include <openssl/crypto.h>
558 #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
562 if test "x$goodssl" != "xyes"; then
569 # Look for the OpenSSL libraries.
570 smart_try_dir=$OPENSSL_LIB_DIR
571 FR_SMART_CHECK_LIB(crypto, DH_new)
572 if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
573 FR_SMART_CHECK_LIB(ssl, SSL_new)
574 if test "x$ac_cv_lib_ssl_SSL_new" = "xyes"; then
575 if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
576 OPENSSL_INCLUDE="-I$OPENSSL_INCLUDE_DIR"
578 if test "x$OPENSSL_LIB_DIR" != "x"; then
579 OPENSSL_LIBS="-L$OPENSSL_LIB_DIR"
581 OPENSSL_LIBS="$OPENSSL_LIBS -lcrypto -lssl -lcrypto"
588 CPPFLAGS=$old_CPPFLAGS
591 AC_SUBST(OPENSSL_INCLUDE)
592 AC_SUBST(OPENSSL_LIBS)
595 dnl #############################################################
597 dnl # 4. Checks for typedefs
599 dnl #############################################################
602 dnl # Ensure that these are defined
609 dnl check for socklen_t
610 FR_CHECK_TYPE_INCLUDE([
611 #ifdef HAVE_SYS_TYPES_H
612 #include <sys/types.h>
614 #ifdef HAVE_SYS_SOCKET_H
615 #include <sys/socket.h>
617 ],socklen_t, int, [socklen_t is generally 'int' on systems which don't use it])
619 dnl check for uint8_t
620 FR_CHECK_TYPE_INCLUDE([
621 #ifdef HAVE_INTTYPES_H
622 #include <inttypes.h>
627 ],uint8_t, unsigned char, [uint8_t should be the canonical 'octet' for network traffic])
629 dnl check for uint16_t
630 FR_CHECK_TYPE_INCLUDE([
631 #ifdef HAVE_INTTYPES_H
632 #include <inttypes.h>
637 ],uint16_t, unsigned short, [uint16_t should be the canonical '2 octets' for network traffic])
639 dnl check for uint32_t
640 FR_CHECK_TYPE_INCLUDE([
641 #ifdef HAVE_INTTYPES_H
642 #include <inttypes.h>
647 ],uint32_t, unsigned int, [uint32_t should be the canonical 'network integer])
649 dnl #############################################################
651 dnl # 5. Checks for structures and functions
653 dnl #############################################################
679 RADIUSD_NEED_DECLARATIONS( \
692 dnl # check if we have utmpx.h
693 dnl # if so, check if struct utmpx has entry ut_xtime
694 dnl # if not, set it to define ut_xtime == ut_tv.tv_sec
695 if test "x$ac_cv_header_utmpx_h" = "xyes"
697 FR_CHECK_STRUCT_HAS_MEMBER([#include <utmpx.h>], [struct utmpx], ut_xtime)
698 if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"
700 AC_DEFINE(ut_xtime,ut_tv.tv_sec, [define to something if you don't have ut_xtime in struct utmpx])
704 dnl # struct ip_pktinfo
705 FR_CHECK_STRUCT_HAS_MEMBER([#include <netinet/in.h>], [struct in_pktinfo], ipi_addr)
706 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"
708 AC_DEFINE(HAVE_IP_PKTINFO, [], [define if you have IP_PKTINFO (Linux)])
711 dnl #############################################################
713 dnl # 6. Checks for compiler characteristics
715 dnl #############################################################
718 dnl # Ensure that these are defined
723 dnl # See if this is OS/2
725 AC_MSG_CHECKING(type of OS)
728 if test "$OS" = "OS/2"; then
736 dnl # Set Default CFLAGS
738 if test "x$GCC" = "xyes"; then
739 CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
742 AC_MSG_CHECKING(for developer gcc flags)
743 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
744 devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef"
745 CFLAGS="$CFLAGS $devflags"
747 AC_MSG_RESULT(yes. Using $devflags)
750 CFLAGS="$CFLAGS -DNDEBUG"
755 dnl #############################################################
757 dnl # 7. Checks for library functions
759 dnl #############################################################
761 dnl Check for libcrypt
762 dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD)
763 AC_CHECK_LIB(crypt, crypt,
766 if test "$CRYPTLIB" != ""; then
767 AC_DEFINE(HAVE_CRYPT, [], [Do we have the crypt function])
769 AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT, [], [Do we have the crypt function]))
772 dnl Check for libcipher
773 AC_CHECK_LIB(cipher, setkey,
774 CRYPTLIB="${CRYPTLIB} -lcipher"
778 if test "x$WITH_SNMP" = "xyes"; then
782 dnl Check the style of gethostbyaddr, in order of preference
783 dnl GNU (_r eight args)
784 AC_DEFINE(GNUSTYLE, [1], [GNU-Style get*byaddr_r])
785 dnl SYSV (_r six args)
786 AC_DEFINE(SYSVSTYLE, [2], [SYSV-Style get*byaddr_r])
787 dnl BSD (three args, may not be thread safe)
788 AC_DEFINE(BSDSTYLE, [3], [BSD-Style get*byaddr_r])
789 dnl Tru64 has BSD version, but it is thread safe
790 dnl http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/1739____.HTM
791 dnl We need #stdio.h to define NULL on FreeBSD (at least)
792 gethostbyaddrrstyle=""
793 AC_MSG_CHECKING([gethostbyaddr_r() syntax])
796 AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE, [style of gethostbyaddr_r functions ])
797 gethostbyaddrrstyle=BSD
798 AC_MSG_WARN([FreeBSD overridden to BSD-style])
801 if test "x$gethostbyaddrrstyle" = "x"; then
805 ], [ gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) ], [
806 AC_DEFINE(GETHOSTBYADDRRSTYLE, GNUSTYLE, [style of gethostbyaddr_r functions ])
807 gethostbyaddrrstyle=GNU
810 if test "x$gethostbyaddrrstyle" = "x"; then
814 ], [ gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL) ] , [
815 AC_DEFINE(GETHOSTBYADDRRSTYLE, SYSVSTYLE, [style of gethostbyaddr_r functions ])
816 gethostbyaddrrstyle=SYSV
819 if test "x$gethostbyaddrrstyle" = "x"; then
823 ], [ gethostbyaddr(NULL, 0, 0) ], [
824 AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE, [style of gethostbyaddr_r functions ])
825 gethostbyaddrrstyle=BSD
829 if test "x$gethostbyaddrrstyle" = "x"; then
830 AC_MSG_RESULT([none! It must not exist, here.])
832 AC_MSG_RESULT([${gethostbyaddrrstyle}-style])
835 if test "x$gethostbyaddrrstyle" = "xBSD"; then
836 AC_MSG_WARN([ ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** ])
839 dnl Check the style of gethostbyname, in order of preference
840 dnl GNU (_r seven args)
841 dnl SYSV (_r five args)
842 dnl BSD (two args, may not be thread safe)
843 dnl Tru64 has BSD version, but it _is_ thread safe
844 dnl http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/1946____.HTM
845 dnl We need #stdio.h to define NULL on FreeBSD (at least)
846 gethostbynamerstyle=""
847 AC_MSG_CHECKING([gethostbyname_r() syntax])
851 ], [ gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL) ], [
852 AC_DEFINE(GETHOSTBYNAMERSTYLE, GNUSTYLE, [style of gethostbyname_r functions ])
853 gethostbynamerstyle=GNU
855 if test "x$gethostbynamerstyle" = "x"; then
859 ], [ gethostbyname_r(NULL, NULL, NULL, 0, NULL) ] , [
860 AC_DEFINE(GETHOSTBYNAMERSTYLE, SYSVSTYLE, [style of gethostbyname_r functions ])
861 gethostbynamerstyle=SYSV
864 if test "x$gethostbynamerstyle" = "x"; then
868 ], [ gethostbyname(NULL) ], [
869 AC_DEFINE(GETHOSTBYNAMERSTYLE, BSDSTYLE, [style of gethostbyname_r functions ])
870 gethostbynamerstyle=BSD
874 if test "x$gethostbynamerstyle" = "x"; then
875 AC_MSG_RESULT([none! It must not exist, here.])
877 AC_MSG_RESULT([${gethostbynamerstyle}-style])
880 if test "x$gethostbynamerstyle" = "xBSD"; then
881 AC_MSG_WARN([ ****** BSD-style gethostbyname might NOT be thread-safe! ****** ])
884 dnl check for non-posix solaris ctime_r (extra buflen int arg)
885 AC_DEFINE(POSIXSTYLE, [1], [Posix-Style ctime_r])
886 AC_DEFINE(SOLARISSTYLE, [2], [Solaris-Style ctime_r])
888 AC_MSG_CHECKING([ctime_r() syntax])
891 ], [ ctime_r(NULL, NULL, 0) ], [
892 AC_DEFINE(CTIMERSTYLE, SOLARISSTYLE, [style of ctime_r function])
893 ctimerstyle="SOLARIS"
895 if test "x$ctimerstyle" = "x"; then
898 ], [ ctime_r(NULL, NULL) ], [
899 AC_DEFINE(CTIMERSTYLE, POSIXSTYLE, [style of ctime_r function])
904 if test "x$ctimerstyle" = "x"; then
905 AC_MSG_RESULT([none! It must not exist, here.])
907 AC_MSG_RESULT([${ctimerstyle}-style])
910 AC_SUBST(HOSTINFO, $host)
912 dnl #############################################################
914 dnl # 8. Checks for system services
916 dnl #############################################################
919 dnl # Figure out where libtool is located,
923 AC_MSG_RESULT([top_builddir=$top_builddir])
924 dnl # AC_SUBST(top_builddir)
929 dnl # Work around stupid autoconf crap
931 if test "x$INCLTDL" != "x";then
932 INCLTDL='-I${top_builddir}/''libltdl'
935 dnl import libtool stuff
937 dnl #############################################################
939 dnl # Configure in any module directories.
941 dnl #############################################################
944 if test "x$EXPERIMENTAL" = "xyes"; then
945 bar=`ls -1 src/modules/rlm_*/configure | sed 's%/configure%%'`
946 dnl # get rid of LF's.
947 mysubdirs=`echo $bar`
950 dnl # Find 'configure' in ONLY the stable modules
952 for bar in `cat src/modules/stable`; do
953 if test -f src/modules/$bar/configure; then
954 mysubdirs="$mysubdirs src/modules/$bar"
959 dnl ############################################################
960 dnl # make modules by list
961 dnl #############################################################
963 if test "x$EXPERIMENTAL" = "xyes"; then
964 for foo in `ls -1 src/modules | grep rlm_`; do
965 MODULES="$MODULES $foo"
969 dnl # make ONLY the stable modules
971 for foo in `cat src/modules/stable`; do
972 MODULES="$MODULES $foo"
977 dnl # Don't change the variable name here. Autoconf goes bonkers
980 AC_CONFIG_SUBDIRS($mysubdirs)
983 dnl #############################################################
985 dnl # And finally, output the results.
987 dnl #############################################################
989 AC_CONFIG_COMMANDS([stamp-h], [echo timestamp > src/include/stamp-h])
990 AC_CONFIG_COMMANDS([build-radpaths-h], [(cd ./src/include && /bin/sh ./build-radpaths-h)])
991 AC_CONFIG_COMMANDS([main-chmod], [(cd ./src/main && chmod +x checkrad.pl radlast radtest)])
992 AC_CONFIG_COMMANDS([scripts-chmod], [(cd ./scripts && chmod +x rc.radiusd radwatch check-radiusd-config radiusd.cron.daily radiusd.cron.monthly cryptpasswd)])
995 dnl # Substitute whatever libraries we found to be necessary
998 AC_SUBST(INSTALLSTRIP)
1000 USE_SHARED_LIBS=$enable_shared
1001 AC_SUBST(USE_SHARED_LIBS)
1002 USE_STATIC_LIBS=$enable_static
1003 AC_SUBST(USE_STATIC_LIBS)
1004 AC_SUBST(STATIC_MODULES)
1005 AC_SUBST(RADIUSD_MAJOR_VERSION)
1006 AC_SUBST(RADIUSD_MINOR_VERSION)
1007 AC_SUBST(RADIUSD_VERSION)
1012 ./src/include/build-radpaths-h \
1013 ./src/main/Makefile \
1014 ./src/main/checkrad.pl \
1015 ./src/main/radlast \
1016 ./src/main/radtest \
1017 ./scripts/rc.radiusd \
1018 ./scripts/radwatch \
1019 ./scripts/check-radiusd-config \
1020 ./scripts/radiusd.cron.daily \
1021 ./scripts/radiusd.cron.monthly \
1022 ./scripts/cryptpasswd \
1023 ./raddb/dictionary \
1024 ./raddb/radiusd.conf