-AC_DEFUN([FR_STATUS_FILE], [config.info])
+dnl Where module/library report is stored
+AC_DEFUN([FR_REPORT_FILE], [config.report])
+
+dnl Where feature list is built up
+AC_DEFUN([FR_REPORT_TMP], [config.report.tmp])
+
+dnl Space prefix for non-first lines of feature list
+AC_DEFUN([FR_REPORT_PREFIX], [ ])
dnl
dnl Store status about module configure state.
[
fail=
fr_status=
+fr_features=
+: > "FR_REPORT_FILE"
+: > "FR_REPORT_TMP"
m4_divert_text([SHELL_FN], [
echo
AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
fail="$(echo $fail)"
FR_MODULE_STATUS([skipping], [requires $fail])
+ fr_features=
ifelse([$1], [nostrict], [], [
fi
])
FR_MODULE_STATUS([OK])
fi
-echo "$fr_status" > FR_STATUS_FILE
+if test x"$fr_features" = x""; then
+ $as_echo "$fr_status" > "FR_REPORT_FILE"
+else
+ $as_echo_n "$fr_status ... " > "FR_REPORT_FILE"
+ cat "FR_REPORT_TMP" >> "FR_REPORT_FILE"
+fi
+
+rm "FR_REPORT_TMP"
AC_SUBST(targetname)
])
AC_DEFUN([FR_LIBRARY_END_TESTS], m4_defn([FR_MODULE_END_TESTS]))
+dnl
+dnl FR_MODULE_FEATURE
+dnl
+dnl Usage:
+dnl FR_MODULE_FEATURE([name], [description])
+dnl
+dnl Declare that a module feature is or is not available (but the
+dnl module can still be built).
+dnl
+AC_DEFUN([FR_MODULE_FEATURE], [
+if echo "$fr_features" | grep -q "+$1+"; then :
+dnl feature already declared
+else :
+ fr_report_prefix=""
+ if test x"$fr_features" != x""; then
+ fr_report_prefix="FR_REPORT_PREFIX"
+ fi
+ $as_echo "$fr_report_prefix""$2" >> FR_REPORT_TMP
+ fr_features="$fr_features +$1+"
+fi
+])
+
dnl
dnl FR_MODULE_TEST_FAIL_DO
dnl
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)
+ if test -r $module/FR_REPORT_FILE; then
+ module_status=$(cat $module/FR_REPORT_FILE)
fi
fi
- echo "$module_print $module_status"
+ $as_echo "$module_print $module_status"
done
])
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)
+ if test -r $library/FR_REPORT_FILE; then
+ library_status=$(cat $library/FR_REPORT_FILE)
fi
fi
AC_DEFINE([HAVE_MEMBERSHIP_H],[1],[Build with Apple Open Directory support])
mschap_sources="$mschap_sources opendir.c"
mod_ldflags="-F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService"
+ FR_MODULE_FEATURE([opendirectory], [with opendirectory support])
+else
+ FR_MODULE_FEATURE([opendirectory], [without opendirectory support])
fi
smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
if test "x$ac_cv_header_wbclient_h" != "xyes"; then
AC_MSG_WARN([wbclient.h not found. Use --with-winbind-include-dir=<path>.])
AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
+ FR_MODULE_FEATURE([wbclient], [without direct winbind support])
fi
FR_SMART_CHECK_INCLUDE(core/ntstatus.h, [#include <stdint.h>
if test "x$ac_cv_header_core_ntstatus_h" != "xyes"; then
AC_MSG_WARN([core/ntstatus.h not found. Use --with-winbind-include-dir=<path>.])
AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
+ FR_MODULE_FEATURE([wbclient], [without direct winbind support])
fi
dnl ############################################################
if test "x$ac_cv_lib_wbclient_wbcCtxAuthenticateUserEx" != "xyes"; then
AC_MSG_WARN([winbind libraries not found. Use --with-winbind-lib-dir=<path>.])
AC_MSG_WARN([Samba must be version 4.2.1 or higher to use this feature.])
+ FR_MODULE_FEATURE([wbclient], [without direct winbind support])
else
mschap_sources="$mschap_sources auth_wbclient.c"
AC_DEFINE([WITH_AUTH_WINBIND],[1],[Build with direct winbind auth support])
+ FR_MODULE_FEATURE([wbclient], [with direct winbind support])
fi
fi
AC_DEFINE([HAVE_YUBIKEY],[1],[Build with yubikey token decryption support support from yubikey])
else
AC_MSG_WARN([silently building without yubikey token decryption support. requires: yubikey])
+ FR_MODULE_FEATURE([yubikey], [without yubikey token decryption support])
fi
dnl ############################################################
AC_DEFINE([HAVE_YKCLIENT],[1],[Build with yubicloud support from ykclient])
else
AC_MSG_WARN([silently building without yubicloud support. requires: ykclient])
+ FR_MODULE_FEATURE([ykclient], [without yubicloud support])
fi
FR_MODULE_END_TESTS