1dnl add plugin status message, e.g. GP_STATUS_PLUGIN_ADD(plugin,yes)
2AC_DEFUN([GP_STATUS_PLUGIN_ADD],
3[
4    plugins_statusmsg="${plugins_statusmsg}$1:$2
5"
6])
7
8dnl add feature status message, e.g. GP_STATUS_FEATURE_ADD(feature,yes)
9AC_DEFUN([GP_STATUS_FEATURE_ADD],
10[
11    feature_statusmsg="${feature_statusmsg}$1:$2
12"
13])
14
15dnl add build feature status message, e.g.
16dnl GP_STATUS_BUIL_FEATURE_ADD(build_feature,yes)
17AC_DEFUN([GP_STATUS_BUILD_FEATURE_ADD],
18[
19    build_feature_statusmsg="${build_feature_statusmsg}$1:$2
20"
21])
22
23dnl indent $1_statusmsg with RHS at col $2
24AC_DEFUN([_GP_STATUS_PRINT_INDENT_],
25[
26    while read line; do
27        test -z "$line" && break;
28        plugin="    ${line%:*}:"
29        status=${line#*:}
30        printf "%-*s%s\n" "$2" "$plugin" "$status"
31    done << GPEOF
32$$1_statusmsg
33GPEOF
34])
35
36dnl print status message
37AC_DEFUN([GP_STATUS_PRINT],
38[
39    GP_EXPAND_DIR(datadir)
40    GP_EXPAND_DIR(libdir)
41    GP_EXPAND_DIR(docdir)
42
43    cat <<GPEOF
44
45${PACKAGE}-${VERSION}
46
47  Build Environment:
48    Geany version:                ${GEANY_VERSION} (GTK${GP_GTK_VERSION_MAJOR})
49    Install prefix:               ${prefix}
50    Datadir:                      ${expanded_datadir}/${PACKAGE_TARNAME}
51    Libdir:                       ${expanded_libdir}/${PACKAGE_TARNAME}
52    Docdir:                       ${expanded_docdir}
53    Plugins path:                 ${geanypluginsdir}
54
55  Build Features:
56GPEOF
57
58    _GP_STATUS_PRINT_INDENT_(build_feature, 34)
59    echo
60    echo "  Plugins:"
61    _GP_STATUS_PRINT_INDENT_(plugins, 34)
62    echo
63    echo "  Features:"
64    _GP_STATUS_PRINT_INDENT_(feature, 34)
65    echo
66])
67