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
28 dnl # The version of the software
29 RADIUSD_MAJOR_VERSION=1
30 RADIUSD_MINOR_VERSION=1.2
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)
55 dnl # autoconf 2.50 and later
56 dnl # AC_SYS_LARGEFILE
60 dnl # check for system bytesex
61 dnl # AC_DEFINES WORDS_BIGENDIAN
65 AC_CHECK_PROG(GMAKE, gmake, yes, no)
66 if test $GMAKE = no; then
67 AC_PATH_PROG(MAKE, make, /usr/local/bin/make)
69 AC_PATH_PROG(MAKE, gmake, /usr/local/gnu/bin/make)
71 makever=`$ac_cv_path_MAKE --version 2>&1 | grep "GNU Make"`
72 if test -z "$makever"; then
73 AC_MSG_ERROR(GNU Make is not installed. Please download and install it
74 from ftp://prep.ai.mit.edu/pub/gnu/make/ before continuing.)
77 dnl libltdl is installable
78 AC_LIBLTDL_INSTALLABLE
80 dnl tell Makefile to build ltdl if needed
81 if test x"$enable_ltdl_install" = x"yes"; then
84 AC_SUBST(LTDL_SUBDIRS)
86 dnl use system-wide libtool, if it exists
87 AC_ARG_WITH(system-libtool,
88 [ --with-system-libtool try to use libtool installed in your system [default=use our own]],
89 [ AC_PATH_PROG(LIBTOOL, libtool,,$PATH:/usr/local/bin) ],
91 LIBTOOL="`pwd`/libtool"
93 dnl ensure that we're looking for dlopen
96 dnl Figure out how to build shared libraries
101 dnl Put this in later, when all distributed modules use autoconf.
102 dnl AC_ARG_WITH(disablemodulefoo,
103 dnl [ --without-rlm_foo Disables module compilation. Module list:]
104 dnl esyscmd([find src/modules -type d -name rlm_\* -print |\
105 dnl sed -e 's%src/modules/.*/% (sub)- %; s%.*/%- %' |\
106 dnl awk '{print " "$0}']))
108 AC_ARG_ENABLE(strict-dependencies,
109 [ --enable-strict-dependencies Fail configure on lack of module dependancy.])
111 dnl extra argument: --with-logdir
112 logdir='${localstatedir}/log/radius'
113 AC_MSG_CHECKING(logdir)
115 [ --with-logdir=DIR Directory for logfiles [LOCALSTATEDIR/log/radius] ],
118 AC_MSG_ERROR(Need logdir)
128 AC_MSG_RESULT($logdir)
130 dnl extra argument: --with-radacctdir
131 radacctdir='${logdir}/radacct'
132 AC_MSG_CHECKING(radacctdir)
133 AC_ARG_WITH(radacctdir,
134 [ --with-radacctdir=PATH Directory for detail files [LOGDIR/radacct] ],
137 AC_MSG_ERROR(Need radacctdir)
142 radacctdir="$withval"
147 AC_MSG_RESULT($radacctdir)
149 dnl extra argument: --with-raddbdir
150 raddbdir='${sysconfdir}/raddb'
151 AC_MSG_CHECKING(raddbdir)
152 AC_ARG_WITH(raddbdir,
153 [ --with-raddbdir=DIR Directory for config files [SYSCONFDIR/raddb] ],
156 AC_MSG_ERROR(Need raddbdir)
166 AC_MSG_RESULT($raddbdir)
168 dnl extra argument: --with-ascend-binary
170 AC_ARG_WITH(ascend-binary,
171 [ --with-ascend-binary Include support for Ascend binary filter attributes (default=yes)],
179 if test "X$ASCEND_BINARY" = "Xyes"; then
180 AC_DEFINE(ASCEND_BINARY)
183 dnl extra argument: --with-threads
186 [ --with-threads Use threads, if available. (default=yes) ],
195 dnl extra argument: --with-snmp
198 [ --with-snmp Compile in SNMP support. (default=yes)],
207 dnl extra argument: --with-large-files
208 rad_enable_largefiles=no
209 AC_ARG_WITH(large-files,
210 [ --with-large-files Compile in large (2G+) file support. (default=no)],
213 rad_enable_largefiles=yes
222 dnl # Allow the user to specify a list of modules to be linked
223 dnl # statically to the server.
226 AC_ARG_WITH(static_modules,
227 [ --with-static-modules=QUOTED-MODULE-LIST],[
228 for i in $withval; do
229 STATIC_MODULES="$STATIC_MODULES -dlpreopen ../modules/rlm_$i/rlm_$i.la"
235 [ --with-modules=QUOTED-MODULE-LIST],[
236 for i in $withval; do
237 MODULES="$MODULES $i"
242 dnl # Enable developer C compiler warnings
244 AC_ARG_ENABLE(developer,
245 [ --enable-developer Enables features of interest to developers.],
246 [ case "$enableval" in
255 if test "x$developer" != "xno" -a -d $srcdir/CVS; then
256 dnl turn on the developer flag when taken from a CVS checkout (not a release)
260 dnl extra argument: --with-experimental-modules
262 AC_ARG_WITH(experimental-modules,
263 [ --with-experimental-modules Use experimental and unstable modules. (default=no) ],
273 dnl # extra argument: --with-openssl-includes=dir
276 AC_ARG_WITH(openssl-includes,
277 [ --with-openssl-includes=DIR Directory to look for OpenSSL include files],
279 *) OPENSSL_INCLUDE_DIR="$withval"
285 dnl # extra argument: --with-openssl-libraries=dir
288 AC_ARG_WITH(openssl-libraries,
289 [ --with-openssl-libraries=DIR Directory to look for OpenSSL library files],
291 *) OPENSSL_LIB_DIR="$withval"
297 dnl # These next two arguments don't actually do anything. They're
298 dnl # place holders so that the top-level configure script can tell
299 dnl # the user how to configure lower-level modules
303 dnl # extra argument: --with-rlm-FOO-lib-dir
305 AC_ARG_WITH(rlm-FOO-lib-dir,
306 [ --with-rlm-FOO-lib-dir=DIR Directory to look for library files used by module FOO],
314 dnl # extra argument: --with-rlm-FOO-include-dir
316 AC_ARG_WITH(rlm-FOO-include-dir,
317 [ --with-rlm-FOO-include-dir=DIR Directory to look for include files used by module FOO],
324 dnl See what include-style is used by the make program.
325 dnl AC_MSG_CHECKING(include style for make)
326 dnl echo "include /dev/null" > testmake.$$
327 dnl echo "all:" >> testmake.$$
328 dnl make -f testmake.$$ >/dev/null 2>&1
337 dnl rm -f testmake.$$
338 dnl AC_MSG_RESULT(" $INCLUDE")
339 dnl AC_SUBST(INCLUDE)
342 dnl extra argument: --with-udpfromto
344 AC_ARG_WITH(udpfromto,
345 [ --with-udpfromto Compile in UDPFROMTO support. (default=no)],
355 if test "x$WITH_UDPFROMTO" = "xyes"; then
356 AC_DEFINE(WITH_UDPFROMTO)
359 dnl extra argument: --with-edir
360 dnl If using Novell eDirectory, enable UP and Novell specific code
362 [ --with-edir Enable Novell eDirectory integration. (default=no) ] , [] )
364 dnl #############################################################
366 dnl # 1. Checks for programs
368 dnl #############################################################
371 AC_PATH_PROG(PERL, perl, /usr/local/bin/perl)
372 if test "x$ac_cv_path_PERL" = "x"; then
373 AC_MSG_WARN(perl not found - Simultaneous-Use and checkrad.pl may not work)
375 AC_PATH_PROG(SNMPGET, snmpget)
376 if test "x$ac_cv_path_SNMPGET" = "x"; then
377 AC_MSG_WARN(snmpget not found - Simultaneous-Use and checkrad.pl may not work)
380 AC_PATH_PROG(SNMPWALK, snmpwalk)
381 if test "x$ac_cv_path_SNMPWALK" = "x"; then
382 AC_MSG_WARN(snmpwalk not found - Simultaneous-Use and checkrad.pl may not work)
385 AC_PATH_PROG(RUSERS, rusers, /usr/bin/rusers)
387 dnl FIXME This is truly gross.
388 missing_dir=`cd $ac_aux_dir && pwd`
389 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
390 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
391 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
393 AC_PATH_PROG(LOCATE,locate)
394 AC_PATH_PROG(DIRNAME,dirname)
395 AC_PATH_PROG(GREP,grep)
397 dnl #############################################################
399 dnl # 2. Checks for libraries
401 dnl #############################################################
403 dnl If using pthreads, check for -lpthread (posix) or -lc_r (*BSD)
405 if test "x$WITH_THREADS" = "xyes"; then
406 if test $ac_cv_prog_suncc = "yes"; then
410 AC_CHECK_HEADERS(pthread.h, [], [ WITH_THREADS="no" ])
413 dnl # pthread stuff is usually in -lpthread
414 dnl # or in -lc_r, on *BSD
416 dnl # On Some systems, we need extra pre-processor flags, to get them to
417 dnl # to do the threading properly.
419 AC_CHECK_LIB(pthread, pthread_create,
420 [ CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
421 LIBS="$LIBS -lpthread" ],
422 AC_CHECK_LIB(c_r, pthread_create,
423 [ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE" ],
424 [ WITH_THREADS="no" ]
430 dnl # If we have NO pthread libraries, remove any knowledge of threads.
432 if test "x$WITH_THREADS" != "xyes"; then
434 ac_cv_header_pthread_h="no"
438 dnl # We need sem_init() and friends, as they're the friendliest
439 dnl # semaphore functions for threading.
441 dnl # HP/UX requires linking with librt, too, to get the sem_* symbols.
442 dnl # Some systems have them in -lsem
443 dnl # Solaris has them in -lposix4
445 AC_SEARCH_LIBS(sem_init, pthread sem posix4 rt,
447 [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)]
451 dnl Check if we need -lsocket
452 AC_CHECK_LIB(socket, getsockname)
454 dnl Check for -lresolv
455 dnl This library may be needed later.
456 AC_CHECK_LIB(resolv, inet_aton)
458 dnl Check if we need -lnsl. Usually if we want to
459 dnl link against -lsocket we need to include -lnsl as well.
460 AC_CHECK_LIB(nsl, inet_ntoa)
462 dnl Check for OpenSSL libraries.
465 if test "x$OPENSSL_LIB_DIR" != "x"; then
466 LIBS="-L$OPENSSL_LIB_DIR $LIBS"
468 AC_CHECK_LIB(crypto, DH_new,
470 AC_DEFINE(HAVE_LIBCRYPTO, 1,
471 [Define to 1 if you have the `crypto' library (-lcrypto).])
472 AC_CHECK_LIB(ssl, SSL_new,
474 AC_DEFINE(HAVE_LIBSSL, 1,
475 [Define to 1 if you have the `ssl' library (-lssl).])
476 if test "x$OPENSSL_LIB_DIR" != "x"; then
477 OPENSSL_LIBS="-L$OPENSSL_LIB_DIR"
479 OPENSSL_LIBS="$OPENSSL_LIBS -lcrypto -lssl -lcrypto"
484 dnl #############################################################
486 dnl # 3. Checks for header files
488 dnl #############################################################
491 dnl # Interix requires us to set -D_ALL_SOURCE, otherwise
492 dnl # getopt will be #included, but won't link. <sigh>
497 CFLAGS="$CFLAGS -D_ALL_SOURCE"
500 CFLAGS="$CFLAGS -DDARWIN"
543 AC_CHECK_HEADER(regex.h, AC_DEFINE(HAVE_REGEX_H))
544 if test "x$ac_cv_header_regex_h" = "xyes"; then
552 ], [AC_DEFINE(HAVE_REG_EXTENDED) REGEX_EXTENDED=yes])
555 AC_SUBST(REGEX_EXTENDED)
558 dnl # other checks which require headers
560 if test "x$ac_cv_header_sys_security_h" = "xyes" && test "x$ac_cv_header_prot_h" = "xyes"
565 if test "x$ac_cv_header_sia_h" = "xyes" && test "x$ac_cv_header_siad_h" = "xyes"
570 dnl Check for OpenSSL includes.
571 OPENSSL_INCLUDE="-DNO_OPENSSL"
572 if test "x$OPENSSL_LIBS" = "x"; then
573 AC_MSG_WARN([skipping test for openssl/ssl.h])
575 old_CPPFLAGS=$CPPFLAGS
576 if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
577 CPPFLAGS="$CPPFLAGS -I$OPENSSL_INCLUDE_DIR"
579 dnl # stupid RedHat shit
580 CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_KRB5"
589 if test "x$OPENSSL_LIBS" != "x"; then
590 AC_MSG_CHECKING([for OpenSSL version >= 0.9.7])
592 [#include <openssl/crypto.h>
593 #if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
597 if test "x$goodssl" != "xyes"; then
602 if test "x$OPENSSL_INCLUDE_DIR" != "x"; then
603 OPENSSL_INCLUDE="-I$OPENSSL_INCLUDE_DIR -DOPENSSL_NO_KRB5"
605 OPENSSL_INCLUDE="-DOPENSSL_NO_KRB5"
609 CPPFLAGS=$old_CPPFLAGS
611 AC_SUBST(OPENSSL_INCLUDE)
612 AC_SUBST(OPENSSL_LIBS)
615 dnl #############################################################
617 dnl # 4. Checks for typedefs
619 dnl #############################################################
622 dnl # Ensure that these are defined
629 dnl check for socklen_t
630 AC_CHECK_TYPE_INCLUDE([
631 #ifdef HAVE_SYS_TYPES_H
632 #include <sys/types.h>
634 #ifdef HAVE_SYS_SOCKET_H
635 #include <sys/socket.h>
639 dnl check for uint8_t
640 AC_CHECK_TYPE_INCLUDE([
641 #ifdef HAVE_INTTYPES_H
642 #include <inttypes.h>
647 ],uint8_t, unsigned char)
649 dnl check for uint16_t
650 AC_CHECK_TYPE_INCLUDE([
651 #ifdef HAVE_INTTYPES_H
652 #include <inttypes.h>
657 ],uint16_t, unsigned short)
659 dnl check for uint32_t
660 AC_CHECK_TYPE_INCLUDE([
661 #ifdef HAVE_INTTYPES_H
662 #include <inttypes.h>
667 ],uint32_t, unsigned int)
669 dnl #############################################################
671 dnl # 5. Checks for structures and functions
673 dnl #############################################################
700 RADIUSD_NEED_DECLARATIONS( \
713 dnl # check if we have utmpx.h
714 dnl # if so, check if struct utmpx has entry ut_xtime
715 dnl # if not, set it to define ut_xtime == ut_tv.tv_sec
716 if test "x$ac_cv_header_utmpx_h" = "xyes"
718 AC_CHECK_STRUCT_HAS_MEMBER([#include <utmpx.h>], [struct utmpx], ut_xtime)
719 if test "x$ac_cv_type_struct_utmpx_has_ut_xtime" = "x"
721 AC_DEFINE(ut_xtime,ut_tv.tv_sec)
725 dnl # struct ip_pktinfo
726 AC_CHECK_STRUCT_HAS_MEMBER([#include <netinet/in.h>], [struct in_pktinfo], ipi_addr)
727 if test "x$ac_cv_type_struct_in_pktinfo_has_ipi_addr" = "xyes"
729 AC_DEFINE(HAVE_IP_PKTINFO)
732 dnl #############################################################
734 dnl # 6. Checks for compiler characteristics
736 dnl #############################################################
739 dnl # Ensure that these are defined
744 dnl # See if this is OS/2
746 AC_MSG_CHECKING(type of OS)
749 if test "$OS" = "OS/2"; then
757 dnl # Set Default CFLAGS
759 if test "x$GCC" = "xyes"; then
760 CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE"
763 AC_MSG_CHECKING(for developer gcc flags)
764 if test "x$developer" = "xyes" -a "x$GCC" = "xyes"; then
765 devflags="-g -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -W -Wredundant-decls -Wundef"
766 CFLAGS="$CFLAGS $devflags"
768 AC_MSG_RESULT(yes. Using $devflags)
771 CFLAGS="$CFLAGS -DNDEBUG"
776 dnl #############################################################
778 dnl # 7. Checks for library functions
780 dnl #############################################################
782 dnl Check for libcrypt
783 dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD)
784 AC_CHECK_LIB(crypt, crypt,
787 if test "$CRYPTLIB" != ""; then
788 AC_DEFINE(HAVE_CRYPT)
790 AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT))
793 dnl Check for libcipher
794 AC_CHECK_LIB(cipher, setkey,
795 CRYPTLIB="${CRYPTLIB} -lcipher"
799 if test "x$WITH_SNMP" = "xyes"; then
803 dnl Check the style of gethostbyaddr, in order of preference
804 dnl GNU (_r eight args)
805 dnl SYSV (_r six args)
806 dnl BSD (three args, may not be thread safe)
807 dnl Tru64 has BSD version, but it is thread safe
808 dnl http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/1739____.HTM
809 dnl We need #stdio.h to define NULL on FreeBSD (at least)
810 gethostbyaddrrstyle=""
811 AC_MSG_CHECKING([gethostbyaddr_r() syntax])
814 AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE)
815 gethostbyaddrrstyle=BSD
816 AC_MSG_WARN([FreeBSD overridden to BSD-style])
819 if test "x$gethostbyaddrrstyle" = "x"; then
823 ], [ gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL, NULL) ], [
824 AC_DEFINE(GETHOSTBYADDRRSTYLE, GNUSTYLE)
825 gethostbyaddrrstyle=GNU
828 if test "x$gethostbyaddrrstyle" = "x"; then
832 ], [ gethostbyaddr_r(NULL, 0, 0, NULL, NULL, 0, NULL) ] , [
833 AC_DEFINE(GETHOSTBYADDRRSTYLE, SYSVSTYLE)
834 gethostbyaddrrstyle=SYSV
837 if test "x$gethostbyaddrrstyle" = "x"; then
841 ], [ gethostbyaddr(NULL, 0, 0) ], [
842 AC_DEFINE(GETHOSTBYADDRRSTYLE, BSDSTYLE)
843 gethostbyaddrrstyle=BSD
847 if test "x$gethostbyaddrrstyle" = "x"; then
848 AC_MSG_RESULT([none! It must not exist, here.])
850 AC_MSG_RESULT([${gethostbyaddrrstyle}-style])
853 if test "x$gethostbyaddrrstyle" = "xBSD"; then
854 AC_MSG_WARN([ ****** BSD-style gethostbyaddr might NOT be thread-safe! ****** ])
857 dnl Check the style of gethostbyname, in order of preference
858 dnl GNU (_r seven args)
859 dnl SYSV (_r five args)
860 dnl BSD (two args, may not be thread safe)
861 dnl Tru64 has BSD version, but it _is_ thread safe
862 dnl http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/1946____.HTM
863 dnl We need #stdio.h to define NULL on FreeBSD (at least)
864 gethostbynamerstyle=""
865 AC_MSG_CHECKING([gethostbyname_r() syntax])
869 ], [ gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL) ], [
870 AC_DEFINE(GETHOSTBYNAMERSTYLE, GNUSTYLE)
871 gethostbynamerstyle=GNU
873 if test "x$gethostbynamerstyle" = "x"; then
877 ], [ gethostbyname_r(NULL, NULL, NULL, 0, NULL) ] , [
878 AC_DEFINE(GETHOSTBYNAMERSTYLE, SYSVSTYLE)
879 gethostbynamerstyle=SYSV
882 if test "x$gethostbynamerstyle" = "x"; then
886 ], [ gethostbyname(NULL) ], [
887 AC_DEFINE(GETHOSTBYNAMERSTYLE, BSDSTYLE)
888 gethostbynamerstyle=BSD
892 if test "x$gethostbynamerstyle" = "x"; then
893 AC_MSG_RESULT([none! It must not exist, here.])
895 AC_MSG_RESULT([${gethostbynamerstyle}-style])
898 if test "x$gethostbynamerstyle" = "xBSD"; then
899 AC_MSG_WARN([ ****** BSD-style gethostbyname might NOT be thread-safe! ****** ])
902 dnl check for non-posix solaris ctime_r (extra buflen int arg)
904 AC_MSG_CHECKING([ctime_r() syntax])
907 ], [ ctime_r(NULL, NULL, 0) ], [
908 AC_DEFINE(CTIMERSTYLE, SOLARISSTYLE)
909 ctimerstyle="SOLARIS"
911 if test "x$ctimerstyle" = "x"; then
914 ], [ ctime_r(NULL, NULL) ], [
915 AC_DEFINE(CTIMERSTYLE, POSIXSTYLE)
920 if test "x$ctimerstyle" = "x"; then
921 AC_MSG_RESULT([none! It must not exist, here.])
923 AC_MSG_RESULT([${ctimerstyle}-style])
927 dnl If configuring with large file support, determine the right flags to
928 dnl use based on the platform. This is the wrong approach; autoconf 2.50
929 dnl comes with a macro that takes the right approach. But this works well
930 dnl enough until we switch to autoconf 2.50 or later.
931 if test x"$rad_enable_largefiles" = xyes ; then
932 AC_MSG_CHECKING(for largefile linkage)
936 AC_MSG_ERROR([AIX before 4.2 does not support large files])
940 LFS_CFLAGS="-D_LARGE_FILES"
946 LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
952 AC_MSG_ERROR([Large files not supported on this platform])
956 LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
959 AC_DEFINE([_GNU_SOURCE], 1,
960 [Some versions of glibc need this defined for pread/pwrite.])
964 AC_PATH_PROG(GETCONF, getconf)
965 if test -z "$GETCONF" ; then
966 AC_MSG_ERROR([getconf required to configure large file support])
968 LFS_CFLAGS=`$GETCONF LFS_CFLAGS`
969 LFS_LDFLAGS=`$GETCONF LFS_LDFLAGS`
970 LFS_LIBS=`$GETCONF LFS_LIBS`
974 LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
980 AC_SUBST(LFS_LDFLAGS)
984 AC_SUBST(HOSTINFO, $host)
986 dnl #############################################################
988 dnl # 8. Checks for system services
990 dnl #############################################################
993 dnl # Figure out where libtool is located,
997 AC_MSG_RESULT([top_builddir=$top_builddir])
998 dnl # AC_SUBST(top_builddir)
1002 dnl import libtool stuff
1004 dnl #############################################################
1006 dnl # Configure in any module directories.
1008 dnl #############################################################
1011 if test "x$EXPERIMENTAL" = "xyes"; then
1012 bar=`ls -1 src/modules/rlm_*/configure | sed 's%/configure%%'`
1013 dnl # get rid of LF's.
1014 mysubdirs=`echo $bar`
1017 dnl # Find 'configure' in ONLY the stable modules
1019 for bar in `cat src/modules/stable`; do
1020 if test -f src/modules/$bar/configure; then
1021 mysubdirs="$mysubdirs src/modules/$bar"
1026 dnl ############################################################
1027 dnl # make modules by list
1028 dnl #############################################################
1029 if test "x$EXPERIMENTAL" = "xyes"; then
1030 for foo in `ls -1 src/modules | grep rlm_`; do
1031 MODULES="$MODULES $foo"
1035 dnl # make ONLY the stable modules
1037 for foo in `cat src/modules/stable`; do
1038 MODULES="$MODULES $foo"
1043 dnl # Don't change the variable name here. Autoconf goes bonkers
1046 AC_CONFIG_SUBDIRS($LTDL_SUBDIRS $mysubdirs)
1049 dnl #############################################################
1051 dnl # And finally, output the results.
1053 dnl #############################################################
1056 dnl # Substitute whatever libraries we found to be necessary
1059 AC_SUBST(INSTALLSTRIP)
1061 USE_SHARED_LIBS=$enable_shared
1062 AC_SUBST(USE_SHARED_LIBS)
1063 USE_STATIC_LIBS=$enable_static
1064 AC_SUBST(USE_STATIC_LIBS)
1065 AC_SUBST(STATIC_MODULES)
1066 AC_SUBST(RADIUSD_MAJOR_VERSION)
1067 AC_SUBST(RADIUSD_MINOR_VERSION)
1068 AC_SUBST(RADIUSD_VERSION)
1073 ./src/include/build-radpaths-h \
1074 ./src/main/Makefile \
1075 ./src/main/checkrad.pl \
1076 ./src/main/radlast \
1077 ./src/main/radtest \
1078 ./scripts/rc.radiusd \
1079 ./scripts/radwatch \
1080 ./scripts/check-radiusd-config \
1081 ./scripts/radiusd.cron.daily \
1082 ./scripts/radiusd.cron.monthly \
1083 ./scripts/cryptpasswd \
1084 ./raddb/dictionary \
1085 ./raddb/radiusd.conf
1088 AC_OUTPUT_COMMANDS([echo timestamp > src/include/stamp-h])
1089 AC_OUTPUT_COMMANDS([(cd ./src/include && /bin/sh ./build-radpaths-h)])
1090 AC_OUTPUT_COMMANDS([(cd ./src/main && chmod +x checkrad.pl radlast radtest)])
1091 AC_OUTPUT_COMMANDS([(cd ./scripts && chmod +x rc.radiusd radwatch check-radiusd-config radiusd.cron.daily radiusd.cron.monthly cryptpasswd)])