SF.net SVN: geany:[6008] trunk
colombanw at users.sourceforge.net
colombanw at xxxxx
Thu Oct 6 00:45:34 UTC 2011
Revision: 6008
http://geany.svn.sourceforge.net/geany/?rev=6008&view=rev
Author: colombanw
Date: 2011-10-06 00:45:33 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Auto-generate final configure summary
Add and use macros to generate final configure summary rather than
hard-code it. This allows for the status to be registered from where
they comes rather than all in the end.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
trunk/m4/geany-binreloc.m4
trunk/m4/geany-gnu-regex.m4
trunk/m4/geany-plugins.m4
trunk/m4/geany-revision.m4
trunk/m4/geany-socket.m4
trunk/m4/geany-vte.m4
Added Paths:
-----------
trunk/m4/geany-status.m4
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-06 00:45:08 UTC (rev 6007)
+++ trunk/ChangeLog 2011-10-06 00:45:33 UTC (rev 6008)
@@ -5,7 +5,7 @@
* configure.ac, m4/geany-revision.m4, m4/geany-binreloc.m4,
m4/geany-gnu-regex.m4, m4/geany-plugins.m4, m4/geany-i18n.m4,
m4/geany-mingw.m4, m4/geany-socket.m4, m4/geany-vte.m4,
- m4/geany-utils.m4:
+ m4/geany-utils.m4, m4/geany-status.m4:
Extract some configure logic to separate files for better
readability.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-10-06 00:45:08 UTC (rev 6007)
+++ trunk/configure.ac 2011-10-06 00:45:33 UTC (rev 6008)
@@ -45,6 +45,13 @@
GEANY_PREFIX
GEANY_DOCDIR
+GEANY_STATUS_ADD([Install Geany in], [${prefix}])
+if test -n "${build}" -a -n "${target}"; then
+ GEANY_STATUS_ADD([Building Geany on], [${build}])
+ GEANY_STATUS_ADD([Building Geany for], [${target}])
+fi
+
+
# check for SVN revision
GEANY_CHECK_REVISION([dnl force debug mode for a SVN working copy
CFLAGS="-g -DGEANY_DEBUG $CFLAGS"])
@@ -60,6 +67,7 @@
AC_SUBST([GTK_CFLAGS])
AC_SUBST([GTK_LIBS])
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
+GEANY_STATUS_ADD([Using GTK version], [${GTK_VERSION}])
# GTHREAD checks
gthread_modules="gthread-2.0"
PKG_CHECK_MODULES([GTHREAD], [$gthread_modules])
@@ -139,25 +147,7 @@
# Summary
-echo "----------------------------------------"
-echo "Install Geany in : ${prefix}"
-if test -n "${build}" -a -n "${target}"; then
- echo "Building Geany on : ${build}"
- echo "Building Geany for : ${target}"
-fi
-echo "Using GTK version : ${GTK_VERSION}"
-echo "Build with plugin support : ${geany_enable_plugins}"
-echo "Use virtual terminal support : ${geany_enable_vte}"
-echo "Use (UNIX domain) socket support : ${geany_enable_socket}"
-if test "x$enable_gnu_regex" = "xyes" ; then
- echo "GNU regex library : built-in"
-else
- echo "GNU regex library : system"
-fi
-
-if test "${REVISION}" != "-1"; then
- echo "Compiling Subversion revision : ${REVISION}"
-fi
+GEANY_STATUS_OUTPUT
echo ""
echo "Configuration is done OK."
echo ""
Modified: trunk/m4/geany-binreloc.m4
===================================================================
--- trunk/m4/geany-binreloc.m4 2011-10-06 00:45:08 UTC (rev 6007)
+++ trunk/m4/geany-binreloc.m4 2011-10-06 00:45:33 UTC (rev 6008)
@@ -55,4 +55,6 @@
if test "$enable_binreloc" = "yes"; then
AC_DEFINE([ENABLE_BINRELOC],,[Use AutoPackage?])
fi
+
+ GEANY_STATUS_ADD([Enable binary relocation], [$enable_binreloc])
])
Modified: trunk/m4/geany-gnu-regex.m4
===================================================================
--- trunk/m4/geany-gnu-regex.m4 2011-10-06 00:45:08 UTC (rev 6007)
+++ trunk/m4/geany-gnu-regex.m4 2011-10-06 00:45:33 UTC (rev 6008)
@@ -18,7 +18,9 @@
AC_DEFINE([USE_INCLUDED_REGEX], [1], [Define if included GNU regex code should be used.])
AC_DEFINE([HAVE_REGCOMP], [1], [Define if you have the 'regcomp' function.])
AM_CONDITIONAL([USE_INCLUDED_REGEX], true)
+ GEANY_STATUS_ADD([GNU regex library], [built-in])
else
AM_CONDITIONAL([USE_INCLUDED_REGEX], false)
+ GEANY_STATUS_ADD([GNU regex library], [system])
fi
])
Modified: trunk/m4/geany-plugins.m4
===================================================================
--- trunk/m4/geany-plugins.m4 2011-10-06 00:45:08 UTC (rev 6007)
+++ trunk/m4/geany-plugins.m4 2011-10-06 00:45:33 UTC (rev 6008)
@@ -24,4 +24,6 @@
else
AM_CONDITIONAL([PLUGINS], false)
fi
+
+ GEANY_STATUS_ADD([Build with plugin support], [$geany_enable_plugins])
])
Modified: trunk/m4/geany-revision.m4
===================================================================
--- trunk/m4/geany-revision.m4 2011-10-06 00:45:08 UTC (rev 6007)
+++ trunk/m4/geany-revision.m4 2011-10-06 00:45:33 UTC (rev 6008)
@@ -30,6 +30,7 @@
if test "x${REVISION}" != "xr0"; then
AC_MSG_RESULT([$REVISION])
+ GEANY_STATUS_ADD([Compiling Subversion revision], [$REVISION])
# call action-if-found
$1
Modified: trunk/m4/geany-socket.m4
===================================================================
--- trunk/m4/geany-socket.m4 2011-10-06 00:45:08 UTC (rev 6007)
+++ trunk/m4/geany-socket.m4 2011-10-06 00:45:33 UTC (rev 6008)
@@ -37,6 +37,7 @@
AC_SEARCH_LIBS([connect],[socket])
fi
+ GEANY_STATUS_ADD([Use (UNIX domain) socket support], [$geany_enable_socket])
_geany_enable_socket_done=yes
fi
])
Added: trunk/m4/geany-status.m4
===================================================================
--- trunk/m4/geany-status.m4 (rev 0)
+++ trunk/m4/geany-status.m4 2011-10-06 00:45:33 UTC (rev 6008)
@@ -0,0 +1,45 @@
+dnl GEANY_STATUS_ADD(description, value)
+dnl Add a status message to be displayed by GEANY_STATUS_OUTPUT
+AC_DEFUN([GEANY_STATUS_ADD],
+[
+ _GEANY_STATUS="$_GEANY_STATUS
+$1:$2"
+])
+
+dnl GEANY_STATUS_OUTPUT
+dnl Nicely displays all messages registered with GEANY_STATUS_ADD
+AC_DEFUN([GEANY_STATUS_OUTPUT],
+[
+ # Count the max lengths
+ dlen=0
+ vlen=0
+ while read l; do
+ d=`echo "$l" | cut -d: -f1`
+ v=`echo "$l" | cut -d: -f2`
+ dl=${#d}
+ vl=${#v}
+ test $dlen -lt $dl && dlen=$dl
+ test $vlen -lt $vl && vlen=$vl
+ done << EOF
+$_GEANY_STATUS
+EOF
+
+ # Print a nice top bar
+ # description + ' : ' + value
+ total=`expr $dlen + 3 + $vlen`
+ for i in `seq 1 $total`; do echo -n '-'; done
+ echo
+
+ # And print the actual content
+ # format is:
+ # key1 : value1
+ # second key : second value
+ while read l; do
+ test -z "$l" && continue
+ d=`echo "$l" | cut -d: -f1`
+ v=`echo "$l" | cut -d: -f2`
+ printf '%-*s : %s\n' $dlen "$d" "$v"
+ done << EOF
+$_GEANY_STATUS
+EOF
+])
Modified: trunk/m4/geany-vte.m4
===================================================================
--- trunk/m4/geany-vte.m4 2011-10-06 00:45:08 UTC (rev 6007)
+++ trunk/m4/geany-vte.m4 2011-10-06 00:45:33 UTC (rev 6008)
@@ -41,6 +41,7 @@
AC_DEFINE([HAVE_VTE], [1], [Define if you want VTE support])
fi
+ GEANY_STATUS_ADD([Use virtual terminal support], [$geany_enable_vte])
_geany_enable_vte_done=yes
fi
])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list