From 9f6f419b9a93b40280bd2a622ed1561f032361bf Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Thu, 3 Oct 2013 12:44:30 -0400 Subject: [PATCH] build: more configure summary Improved configure summary, including a check for namei fileserver mode. Change-Id: Id5117ae8c27126c56e28eb3ab7f6e8ef7fd0558d Reviewed-on: http://gerrit.openafs.org/10372 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- acinclude.m4 | 13 --------- configure.ac | 5 +++- src/cf/summary.m4 | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 14 deletions(-) create mode 100644 src/cf/summary.m4 diff --git a/acinclude.m4 b/acinclude.m4 index 7b48850..6ed9d83 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1948,16 +1948,3 @@ AC_CHECK_FUNCS([uuid_generate]) ]) -AC_DEFUN([SUMMARY], [ - # Print a configuration summary -echo -echo "**************************************" -echo configure summary -echo -AS_IF([test $LIB_curses],[ -echo "LIB_curses : $LIB_curses" ],[ -echo "XXX LIB_curses not found! not building scout and afsmonitor!" -]) -echo -echo "**************************************" -]) diff --git a/configure.ac b/configure.ac index cf1931b..81a677a 100644 --- a/configure.ac +++ b/configure.ac @@ -111,6 +111,9 @@ AC_SUBST([AKLOG_KRB5_LIBS]) dnl Probe for GSSAPI RRA_LIB_GSSAPI +dnl Checks for summary +OPENAFS_SUMMARY_CHECK_NAMEI + AS_IF([test -d 'doc/man-pages'], [MAN_MAKEFILE="doc/man-pages/Makefile doc/man-pages/install-man"], [MAN_MAKEFILE=]) @@ -284,4 +287,4 @@ AC_OUTPUT([ chmod a+x src/config/shlib-install]) # print a final summary -SUMMARY +OPENAFS_SUMMARY diff --git a/src/cf/summary.m4 b/src/cf/summary.m4 new file mode 100644 index 0000000..ec180e1 --- /dev/null +++ b/src/cf/summary.m4 @@ -0,0 +1,84 @@ +dnl +dnl configure summary +dnl +dnl +dnl OPENAFS_SUMMARY_CHECK_NAME +dnl +dnl Check whether namei fileserver is enabled for this platform/configure options. +dnl When namei is enabled with a configure option, the AFS_NAMEI_ENV will be defined +dnl for the test program. AFS_NAMEI_ENV can also be defined in the platform and sysname +dnl param headers for this platform. Avoid including the afs/afs_sysnames.h header since +dnl it has not been installed to the `include/afs' system directory yet (and is not +dnl needed for this namei check). +dnl +dnl Note that, if set, AFS_PARAM_COMMON is the header filename, including the .h suffix. +dnl +AC_DEFUN([OPENAFS_SUMMARY_CHECK_NAMEI], + [AC_CACHE_CHECK([whether namei fileserver is enabled], [openafs_cv_summary_check_namei], + [rm -f conftestparam.h; touch conftestparam.h; # automatically cleaned up by configure + AS_IF([test "x${AFS_PARAM_COMMON}" != "x" && test -f "src/config/${AFS_PARAM_COMMON}"], + [grep -v '#include ' "src/config/${AFS_PARAM_COMMON}" >> conftestparam.h]) + AS_IF([test "x${AFS_SYSNAME}" != "x" && test -f "src/config/param.${AFS_SYSNAME}.h"], + [grep -v '#include ' "src/config/param.${AFS_SYSNAME}.h" >> conftestparam.h]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +#define IGNORE_STDS_H +#include "conftestparam.h" + ]], [[ +#ifndef AFS_NAMEI_ENV + namei_disabled +#endif + ]])], + [openafs_cv_summary_check_namei="yes"], + [openafs_cv_summary_check_namei="no"]) + ]) +]) +dnl +dnl OPENAFS_SUMMARY +dnl +dnl Print the configure summary. +dnl +AC_DEFUN([OPENAFS_SUMMARY],[ + AS_IF([test "x${LIB_curses}" = "x"], + [summary_build_scout="no"], + [summary_build_scout="yes"]) + AS_IF([test "x${DOCBOOK_STYLESHEETS}" = "x"], + [summary_docbook_stylesheets="no"], + [summary_docbook_stylesheets="yes"]) + + cat <