./raddb/radiusd.conf
])
AC_OUTPUT
+
+FR_LIBRARY_REPORT
FR_MODULE_REPORT
AC_ARG_WITH([$1],
[AS_HELP_STRING([--without-$1],[build without ]ifelse([$2],[],[$1],[$2]))])
])
+
+AC_DEFUN([FR_INIT_LIBRARY], m4_defn([FR_INIT_MODULE]))
echo
])
-if test x"$with_[]modname" != xno; then
+if test x"$with_[]modname_useropt" != xno; then
])
+AC_DEFUN([FR_LIBRARY_START_TESTS], m4_defn([FR_MODULE_START_TESTS]))
+
dnl
dnl FR_MODULE_END_TESTS
AC_SUBST(targetname)
])
+AC_DEFUN([FR_LIBRARY_END_TESTS], m4_defn([FR_MODULE_END_TESTS]))
+
dnl
dnl FR_MODULE_TEST_FAIL_DO
fi
])
+AC_DEFUN([FR_LIBRARY_TEST_FAIL_DO], m4_defn([FR_MODULE_TEST_FAIL_DO]))
+
+
dnl
dnl FR_MODULE_TEST_PASS_DO
dnl
fi
])
+AC_DEFUN([FR_LIBRARY_TEST_PASS_DO], m4_defn([FR_MODULE_TEST_PASS_DO]))
+
+
dnl
dnl FR_MODULE_REPORT
echo "$module_print $module_status"
done
])
+
+
+dnl
+dnl FR_LIBRARY_REPORT
+dnl
+dnl Usage:
+dnl FR_LIBRARY_REPORT
+dnl
+dnl Outputs a summary list of all libraries and any configure errors.
+dnl
+AC_DEFUN([FR_LIBRARY_REPORT], [
+library_list=$(find src/lib/ -mindepth 1 -maxdepth 1 -type d -print | sort)
+
+echo
+echo Library configure status report
+echo -------------------------------
+
+for library in $library_list; do
+ library_name="$(basename $library)"
+ library_print="$(echo "$library_name ........................" | cut -c 1-25)"
+ library_status="OK"
+
+ if test -r $library/configure.ac; then
+ if test -r $library/FR_STATUS_FILE; then
+ library_status=$(head -1 $library/FR_STATUS_FILE)
+ fi
+ fi
+
+ echo "$library_print $library_status"
+done
+])
AC_INIT
AC_CONFIG_SRCDIR([base.c])
AC_REVISION($Revision$)
-FR_INIT_MODULE([libfreeradius-curl], [libcurl support])
-AC_DEFUN([modname_useropt],[m4_bpatsubst([]modname,[[-+.]],[_])])
+FR_INIT_LIBRARY([libfreeradius-curl], [libcurl support])
AC_CONFIG_HEADERS([config.h])
-if test x$with_[]modname_useropt != xno; then
+FR_LIBRARY_START_TESTS
AC_PROG_CC
AC_PROG_CPP
fi
fi
- targetname=modname
version="$libcurl_cv_lib_curl_version"
-else
- targetname=
- echo \*\*\* module modname is disabled.
-fi
-
-dnl Don't change this section.
-if test x"$fail" != x""; then
- if test x"${enable_strict_dependencies}" = x"yes"; then
- AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
- else
- AC_MSG_WARN([silently not building ]modname[.])
- AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
- targetname=""
- fi
-fi
+FR_LIBRARY_END_TESTS
mod_ldflags="$LIBCURL"
mod_cflags="$LIBCURL_CPPFLAGS"
AC_SUBST(mod_cflags)
AC_SUBST(mod_ldflags)
-
AC_SUBST(version)
-AC_SUBST(targetname)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
-
AC_INIT
AC_CONFIG_SRCDIR([json.c])
AC_REVISION($Revision$)
-FR_INIT_MODULE([libfreeradius-json], [JSON support from json-c])
-AC_DEFUN([modname_useropt],[m4_bpatsubst([]modname,[[-+.]],[_])])
-AC_CONFIG_HEADERS([config.h])
+FR_INIT_LIBRARY([libfreeradius-json], [JSON support from json-c])
-if test x$with_[]modname_useropt != xno; then
+FR_LIBRARY_START_TESTS
AC_PROG_CC
AC_PROG_CPP
fail="$fail json-c >= 0.13"
fi
- targetname=modname
-else
- targetname=
- echo \*\*\* module modname is disabled.
-fi
+FR_LIBRARY_END_TESTS
-dnl Don't change this section.
-if test x"$fail" != x""; then
- if test x"${enable_strict_dependencies}" = x"yes"; then
- AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
- else
- AC_MSG_WARN([silently not building ]modname[.])
- AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
- targetname=""
- fi
-else
- AC_DEFINE([HAVE_JSON],[1],[Build with JSON support from json-c])
-fi
+FR_MODULE_TEST_PASS_DO([
+ AC_DEFINE([HAVE_JSON],[1],[Build with JSON support from json-c])
+])
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
AC_SUBST(mod_cflags)
AC_SUBST(mod_ldflags)
-AC_SUBST(targetname)
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([all.mk])
+
AC_OUTPUT
AH_BOTTOM([#include <freeradius-devel/automask.h>])
-
AC_INIT
AC_CONFIG_SRCDIR([base.c])
AC_REVISION($Revision$)
-FR_INIT_MODULE([libfreeradius-kafka], [rdkafka support])
+FR_INIT_LIBRARY([libfreeradius-kafka], [rdkafka support])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname_useropt != xno; then
+FR_LIBRARY_START_TESTS
+
dnl ############################################################
dnl # Check for command line options
dnl ############################################################
fail="$fail libhirdkafka"
fi
- targetname=modname
-else
- targetname=
- echo \*\*\* module modname is disabled.
-fi
-
-dnl Don't change this section.
-if test "x$fail" != x; then
- if test "x${enable_strict_dependencies}" = xyes; then
- AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
- else
- AC_MSG_WARN([silently not building ]modname[.])
- AC_MSG_WARN([FAILURE: ]modname[ requires:$fail.]);
- targetname=
- fi
-fi
+FR_LIBRARY_END_TESTS
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_INIT
AC_CONFIG_SRCDIR([base.c])
AC_REVISION($Revision$)
-FR_INIT_MODULE([libfreeradius-ldap], [LDAP support])
-AC_DEFUN([modname_useropt],[m4_bpatsubst([]modname,[[-+.]],[_])])
+FR_INIT_LIBRARY([libfreeradius-ldap], [LDAP support])
-fail=
SMART_LIBS=
SMART_CLFAGS=
SASL=
-if test x$with_[]modname_useropt != xno; then
+FR_LIBRARY_START_TESTS
dnl ############################################################
dnl # Check for compiler
fi
fi
- targetname=modname
-else
- targetname=
- echo \*\*\* module modname is disabled.
-fi
-
-if test x"$fail" != x""; then
- if test x"${enable_strict_dependencies}" = x"yes"; then
- AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
- else
- AC_MSG_WARN([silently not building ]modname[.])
- AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.])
- if test x"$headersuggestion" != x; then
- AC_MSG_WARN([$headersuggestion])
- fi
- if test x"$libsuggestion" != x; then
- AC_MSG_WARN([$libsuggestion])
- fi
- targetname=""
- fi
-fi
+FR_LIBRARY_END_TESTS
AC_DEFINE(WITH_EDIR, 1, [Build the server with support for Novell eDir Universal Password])
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
AC_SUBST(SASL)
-AC_SUBST(targetname)
-AC_CONFIG_HEADERS([config.h])
-dnl # This is needed so that all.mk is not created unless configure is run
-dnl # so that it doesn't attempt to include libfreeradius-redis.mk which
-dnl # is also dependent on configure being run.
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_INIT
AC_CONFIG_SRCDIR([redis.c])
AC_REVISION($Revision$)
-FR_INIT_MODULE([libfreeradius-redis], [redis support])
-AC_DEFUN([modname_useropt],[m4_bpatsubst([]modname,[[-+.]],[_])])
+FR_INIT_LIBRARY([libfreeradius-redis], [redis support])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname_useropt != xno; then
+FR_LIBRARY_START_TESTS
+
dnl ############################################################
dnl # Check for command line options
dnl ############################################################
fail="$fail libhiredis"
fi
- targetname=modname
-else
- targetname=
- echo \*\*\* module modname is disabled.
-fi
-
-dnl Don't change this section.
-if test "x$fail" != x; then
- if test "x${enable_strict_dependencies}" = xyes; then
- AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
- else
- AC_MSG_WARN([silently not building ]modname[.])
- AC_MSG_WARN([FAILURE: ]modname[ requires:$fail.]);
- targetname=
- fi
-fi
+FR_LIBRARY_END_TESTS
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_FILES([all.mk])
AC_OUTPUT