Index: src/nano.h =================================================================== --- src/nano.h (revision 5172) +++ src/nano.h (working copy) @@ -600,4 +600,10 @@ /* The maximum number of bytes buffered at one time. */ #define MAX_BUF_SIZE 128 +#ifdef REVISION +#define BRANDING "nano SVN "REVISION +#else +#define BRANDING PACKAGE_STRING +#endif + #endif /* !NANO_H */ Index: src/winio.c =================================================================== --- src/winio.c (revision 5172) +++ src/winio.c (working copy) @@ -2125,8 +2125,7 @@ if (space >= 4) { /* Add a space after the version message, and account for both * it and the two spaces before it. */ - mvwaddnstr(topwin, 0, 2, PACKAGE_STRING, - actual_x(PACKAGE_STRING, verlen)); + mvwaddnstr(topwin, 0, 2, BRANDING, actual_x(BRANDING, verlen)); verlen += 3; /* Account for the full length of the version message. */ Index: src/nano.c =================================================================== --- src/nano.c (revision 5172) +++ src/nano.c (working copy) @@ -960,7 +960,11 @@ * it was compiled with. */ void version(void) { +#ifdef REVISION + printf(" GNU nano, from %s, SVN revision %s\n", VERSION, REVISION); +#else printf(_(" GNU nano, version %s\n"), VERSION); +#endif printf(" (C) 1999..2015 Free Software Foundation, Inc.\n"); printf( _(" Email: address@hidden Web: http://www.nano-editor.org/")); Index: configure.ac =================================================================== --- configure.ac (revision 5172) +++ configure.ac (working copy) @@ -20,7 +20,7 @@ # # $Id$ -AC_INIT([GNU nano], [2.4.0-svn], address@hidden, [nano]) +AC_INIT([GNU nano], [2.4.0], address@hidden, [nano]) AC_CONFIG_SRCDIR([src/nano.c]) AC_CANONICAL_HOST AM_INIT_AUTOMAKE @@ -680,6 +680,16 @@ AC_CHECK_PROG(haveit, makeinfo, yes, no) AM_CONDITIONAL(HAVE_MAKEINFO, test x$haveit = xyes) +AC_MSG_CHECKING([whether building from SVN]) +if test -d .svn ; then + AC_MSG_RESULT([yes]) + AC_PATH_PROG([SVNVERSION], [svnversion]) + REVISION=`($SVNVERSION >/dev/null 2>&1) && ($SVNVERSION -n)` + AC_SUBST(REVISION) + AC_DEFINE_UNQUOTED([REVISION],"${REVISION}","Setting REVISION in config.h.") +else + AC_MSG_RESULT([no]) +fi AC_CONFIG_FILES([ Makefile