autom4te.cache
aclocal.m4
config.guess
+config.info
config.sub
config.h
src/bin/unit_test_attribute
./raddb/radiusd.conf
])
AC_OUTPUT
+FR_MODULE_REPORT
AC_DEFUN([FR_INIT_MODULE],
[
AC_DEFUN([modname],$1)
+ AC_DEFUN([modname_useropt],[m4_bpatsubst([]modname,[[-+.]],[_])])
AC_ARG_WITH([$1],
[AS_HELP_STRING([--without-$1],[build without ]ifelse([$2],[],[$1],[$2]))])
--- /dev/null
+AC_DEFUN([FR_STATUS_FILE], [config.info])
+
+dnl
+dnl Store status about module configure state.
+dnl
+dnl Usage:
+dnl FR_MODULE_STATUS([status])
+dnl FR_MODULE_STATUS([status], [reason])
+dnl
+dnl First argument is the status to report, likely "OK",
+dnl "skipping" or "disabled".
+dnl
+dnl Second optional argument is the reason for skipping this
+dnl module (likely dependencies not met).
+dnl
+AC_DEFUN([FR_MODULE_STATUS],[
+ifelse([$2], [], [
+fr_status="$1"
+], [
+fr_status="$1 ($2)"
+])])
+
+
+dnl
+dnl FR_MODULE_START_TESTS
+dnl
+dnl Usage:
+dnl FR_MODULE_START_TESTS
+dnl
+dnl Set up ready to do module-specific tests. Clears variables and
+dnl adds code to output a header before the tests to make the
+dnl configure output easier to read.
+dnl
+AC_DEFUN([FR_MODULE_START_TESTS],
+[
+fail=
+fr_status=
+
+m4_divert_text([SHELL_FN], [
+echo
+echo Running tests for modname
+echo
+])
+
+if test x"$with_[]modname" != xno; then
+])
+
+
+dnl
+dnl FR_MODULE_END_TESTS
+dnl
+dnl Usage:
+dnl FR_MODULE_END_TESTS
+dnl FR_MODULE_END_TESTS([nostrict])
+dnl
+dnl If passed "nostrict", checks will be made for the
+dnl enable_strict_dependencies flag.
+dnl
+dnl Called at the end of module-specific tests. This outputs
+dnl information on whether the module is disabled or not, or why
+dnl configuration failed. It also stores the status for a summary
+dnl to be printed at the end of the main configure script.
+dnl
+AC_DEFUN([FR_MODULE_END_TESTS], [
+ targetname=modname
+else
+ targetname=
+ echo \*\*\* module modname is disabled.
+ FR_MODULE_STATUS([disabled])
+fi
+
+if test x"$fail" != x""; then
+ targetname=""
+
+ifelse([$1], [nostrict], [], [
+ 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.]);
+ fail="$(echo $fail)"
+ FR_MODULE_STATUS([skipping], [requires $fail])
+ifelse([$1], [nostrict], [], [
+ fi
+])
+else
+ FR_MODULE_STATUS([OK])
+fi
+
+echo "$fr_status" > FR_STATUS_FILE
+
+AC_SUBST(targetname)
+])
+
+
+dnl
+dnl FR_MODULE_TEST_FAIL_DO
+dnl
+dnl Usage:
+dnl FR_MODULE_TEST_FAIL_DO([commands])
+dnl
+dnl Run commands when the module tests fail and the module is not
+dnl going to be built.
+dnl
+AC_DEFUN([FR_MODULE_TEST_FAIL_DO], [
+if test x"$fail" != x""; then :
+ $1
+fi
+])
+
+dnl
+dnl FR_MODULE_TEST_PASS_DO
+dnl
+dnl Usage:
+dnl FR_MODULE_TEST_PASS_DO([commands])
+dnl
+dnl Run commands when the module tests succeed and the module is
+dnl going to be built.
+dnl
+AC_DEFUN([FR_MODULE_TEST_PASS_DO], [
+if test x"$fail" = x""; then :
+ $1
+fi
+])
+
+
+dnl
+dnl FR_MODULE_REPORT
+dnl
+dnl Usage:
+dnl FR_MODULE_REPORT
+dnl
+dnl Outputs a summary list of all modules and any configure errors.
+dnl
+AC_DEFUN([FR_MODULE_REPORT], [
+module_list=$(find src/modules/ -type d -name 'rlm_*' -print | sort)
+
+echo
+echo Module configure status report
+echo ------------------------------
+
+for module in $module_list; do
+ module_name="$(basename $module)"
+ module_print="$(echo "$module_name ........................" | cut -c 1-25)"
+ module_status="OK"
+
+ if test -r $module/configure.ac; then
+ if test -r $module/FR_STATUS_FILE; then
+ module_status=$(head -1 $module/FR_STATUS_FILE)
+ fi
+ fi
+
+ echo "$module_print $module_status"
+done
+])
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_cache])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
dnl # Don't bother looking for errors in the child directories
dnl #
- targetname=modname
-else
- targetname=
- echo \*\*\* module modname is disabled.
-fi
+FR_MODULE_END_TESTS([nostrict])
-AC_SUBST(targetname)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_cache_memcached])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
,, [fail="memached functions"])
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}" = 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_MODULE_END_TESTS
mod_ldflags="$LIBCURL $SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
AC_SUBST(mod_cflags)
AC_SUBST(mod_ldflags)
-AC_SUBST(targetname)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_CONFIG_SRCDIR([rlm_couchbase.c])
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_couchbase])
-AC_CONFIG_HEADER(config.h)
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
fail="$fail libcouchbase"
fi
- dnl ############################################################
- dnl # Checks done - set targetname
- dnl ############################################################
-
- 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}" = 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_MODULE_END_TESTS
mod_ldflags="${SMART_LIBS}"
mod_cflags="${SMART_CPPFLAGS}"
AC_SUBST(mod_cflags)
AC_SUBST(mod_ldflags)
-AC_SUBST(targetname)
+AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_eap])
-fail=
SMART_LIBS=
SMART_CLFAGS=
+eapsubdirs=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
- eapsubdirs=
for foo in `find ./types -name configure -print`; do
bar=`echo $foo | sed 's%/configure$%%g'`
eapsubdirs="$eapsubdirs $bar"
dnl # Don't bother looking for errors in the child directories
dnl #
- targetname=modname
-else
- targetname=
- echo \*\*\* module modname is disabled.
-fi
+FR_MODULE_END_TESTS
-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=""
- eapsubdirs=""
- fi
-fi
+FR_MODULE_TEST_FAIL_DO([eapsubdirs=""])
eaptypes=types
if test x"$eapsubdirs" = x""; then
AC_SUBST(eaptypes)
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_idn])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
if test "$ac_cv_header_idna_h" != "yes"; then
fail="$fail idna.h"
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.]);
- targetname=""
- fi
-fi
+
+FR_MODULE_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_REVISION($Revision$)
FR_INIT_MODULE([rlm_krb5])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
else
krb5mod_cflags="$krb5mod_cflags -DHEIMDAL_KRB5"
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.]);
- targetname=""
- fi
-fi
+
+FR_MODULE_END_TESTS(strict)
mod_ldflags="$krb5mod_ldflags $krb5libcrypto $SMART_LIBS"
mod_cflags="$krb5mod_cflags $krb5threadsafe $SMART_CPPFLAGS"
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_lua], [lua support])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
+
AC_PROG_CC
AC_PROG_CPP
fi
- targetname=modname # keep this! Don't change!
-else
- targetname= # keep this! Don't change!
- echo \*\*\* module modname is disabled. # keep this! Don't change!
-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_MODULE_END_TESTS
AC_SUBST(lua_cflags)
AC_SUBST(lua_ldflags)
-
-AC_SUBST(targetname) # keep this! Don't change!
AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk rlm_lua.mk libfreeradius-lua.mk])
AC_OUTPUT # keep this! Don't change!
-
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_mruby])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
+
AC_PROG_CC
AC_PROG_CPP
fail="$fail libm"
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.]);
- targetname=""
- fi
-fi
+FR_MODULE_END_TESTS
mod_cflags="${SMART_CPPFLAGS}"
AC_SUBST(mod_cflags)
AC_SUBST(mod_ldflags)
-AC_SUBST(targetname)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_mschap])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
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.]);
- targetname=""
- fi
-fi
+FR_MODULE_END_TESTS
mod_ldflags="$mod_ldflags $SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mschap_sources)
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
-AC_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([rlm_mschap.mk])
AC_OUTPUT
-
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_opendirectory])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
[mod_cflags="${mod_cflags} -DHAVE_DECL_MBR_CHECK_MEMBERSHIP_REFRESH"],
[],[#include <membership.h>])
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.])
- targetname=""
- fi
-fi
+
+FR_MODULE_END_TESTS
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_CONFIG_SRCDIR([rlm_pam.c])
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_pam])
-AC_DEFUN([modname_useropt],[m4_bpatsubst([]modname,[[-+.]],[_])])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
)
mod_cflags="-I."
- 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.]);
- targetname=""
- fi
-fi
+FR_MODULE_END_TESTS
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_perl])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
+
AC_PROG_CC
AC_PROG_CPP
FR_SMART_CHECK_INCLUDE(EXTERN.h)
if test "x$ac_cv_header_EXTERN_h" != "xyes"; then
fail="$fail EXTERN.h"
- targetname=
fi
FR_SMART_CHECK_INCLUDE(perl.h, [#include <EXTERN.h>])
if test "x$ac_cv_header_perl_h" != "xyes"; then
fail="$fail EXTERN.h"
- targetname=
fi
dnl ############################################################
AC_MSG_RESULT($LINKS)
if test "x$LINKS" = "xno"; then
fail="$fail libperl.so"
- targetname=
fi
AC_MSG_CHECKING([we can link to Perl_hv_store()])
AC_MSG_RESULT($LINKS)
if test "x$LINKS" = "xno"; then
fail="$fail libperl.so"
- targetname=
fi
CFLAGS="$old_CFLAGS"
LIBS="$old_LIBS"
-
- targetname=modname
- fi
-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_MODULE_END_TESTS
AC_SUBST(mod_cflags)
AC_SUBST(mod_ldflags)
AC_CONFIG_HEADER(config.h)
-
-AC_SUBST(targetname)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_python])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
AC_MSG_RESULT($LINKS)
if test "x$LINKS" = "xno"; then
fail="$fail working python libraries"
- targetname=
fi
CFLAGS=$old_CFLAGS
LDFLAGS=$old_LDFLAGS
-
- targetname="rlm_python"
- fi
-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.]);
- targetname=""
fi
-fi
+
+FR_MODULE_END_TESTS
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_radutmp])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
- AC_CHECK_HEADERS(sys/mman.h)
+AC_CHECK_HEADERS(sys/mman.h)
- targetname=modname
-else
- targetname=
- echo \*\*\* module modname is disabled.
-fi
+FR_MODULE_END_TESTS([nostrict])
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_securid])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
dnl ############################################################
dnl # Check for command line options
fail="$fail libaceclnt"
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_MODULE_END_TESTS
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_OUTPUT(all.mk)
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_sigtran])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
+
dnl ############################################################
dnl # Check for command line options
dnl ############################################################
AC_MSG_WARN([libmtp libraries not found. Use --with-sigtran-lib-dir=<path>.])
fail="$fail libmtp"
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_MODULE_END_TESTS
mod_ldflags="$SMART_LIBS $(pkg-config --libs-only-other libosmocore) $(pkg-config --libs-only-other libosmo-sccp) $(pkg-config --libs-only-other libosmo-xua) $(pkg-config --libs-only-other libosmo-mtp) $(net-snmp-config --agent-libs 2>&-) -lsctp"
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
-
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
dnl # Don't bother looking for errors in the child directories
dnl #
- 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_MODULE_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_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql_cassandra])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
dnl ############################################################
dnl # Check for command line options
fi
CFLAGS="$SMART_CPPFLAGS"
- 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.]);
- AC_MSG_WARN([available from https://github.com/datastax/cpp-driver]);
- targetname=
- fi
-fi
+FR_MODULE_END_TESTS
+
+FR_MODULE_TEST_FAIL_DO([
+ AC_MSG_WARN([available from https://github.com/datastax/cpp-driver]);
+])
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_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql_db2])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
dnl extra argument: --with-ibmdb2-include-dir
ibmdb2_include_dir=
fail="$fail sqlcli.h"
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_MODULE_END_TESTS
sql_ibmdb2_ldflags="$SMART_LIBS"
sql_ibmdb2_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(sql_ibmdb2_ldflags)
AC_SUBST(sql_ibmdb2_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql_firebird])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
+
dnl extra argument: --with-firebird-include-dir
firebird_include_dir=
AC_ARG_WITH(firebird-include-dir,
fail="$fail ibase.h"
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_MODULE_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_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql_freetds])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
dnl ############################################################
dnl # Check for command line options
fail="$fail libct"
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_MODULE_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_CONFIG_SRCDIR([rlm_sql_mysql.c])
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql_mysql])
-AC_CONFIG_HEADER(config.h)
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
+
dnl ############################################################
dnl # Check for command line options
dnl ############################################################
fi
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_MODULE_END_TESTS
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
+AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
FR_INIT_MODULE([rlm_sql_oracle])
oracle_supported_versions="19 18 12 11"
-fail=
+
mod_ldflags=
mod_cflags=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
dnl ############################################################
dnl # Check for command line options
fail=["$fail libclntsh libnnz[9-12]"]
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_MODULE_END_TESTS
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql_postgresql])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
PQinitOpenSSL \
PQinitSSL \
)
- 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_MODULE_END_TESTS
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql_sqlite])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
dnl ############################################################
dnl # Check for command line options
CFLAGS="$SMART_CPPFLAGS"
AC_CHECK_TYPES([sqlite3_int64], [], [], [[#include <sqlite3.h>]])
- 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_MODULE_END_TESTS
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
+
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
AC_CONFIG_HEADER(config.h)
-
-AC_SUBST(targetname)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_sql_unixodbc])
-fail=
SMART_LIBS=
SMART_CLFAGS=
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
dnl extra argument: --with-unixodbc-include-dir
unixodbc_include_dir=
fail="$fail sql.h"
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_MODULE_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_REVISION($Revision$)
FR_INIT_MODULE([rlm_unbound])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
+
dnl extra argument: --with-rlm-unbound-lib-dir
rlm_unbound_lib_dir=
AC_ARG_WITH(rlm-unbound-lib-dir,
fail="$fail unbound-event.h"
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.]);
- targetname=""
- fi
-fi
+FR_MODULE_END_TESTS
mod_ldflags="${SMART_LIBS}"
mod_cflags="${SMART_CFLAGS}"
AC_SUBST(mod_ldflags)
AC_CONFIG_HEADER(config.h)
-
-AC_SUBST(targetname)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_unix])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
]
)
- 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.]);
- targetname=""
- fi
-fi
+FR_MODULE_END_TESTS
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_winbind])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
AC_PROG_CC
AC_PROG_CPP
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.]);
- targetname=""
- fi
-fi
+FR_MODULE_END_TESTS
mod_ldflags="$mod_ldflags $SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
-AC_SUBST(targetname)
+
AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT
AC_REVISION($Revision$)
FR_INIT_MODULE([rlm_yubikey])
-if test x$with_[]modname != xno; then
+FR_MODULE_START_TESTS
+
dnl ############################################################
dnl # Check for command line options
dnl ############################################################
AC_MSG_WARN([silently building without yubicloud support. requires: ykclient])
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}" = 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_MODULE_END_TESTS
mod_ldflags="$SMART_LIBS"
mod_cflags="$SMART_CPPFLAGS"
AC_SUBST(mod_cflags)
AC_SUBST(mod_ldflags)
-AC_SUBST(targetname)
+
AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk])
AC_OUTPUT