From db85ac7564d574e94fccef33cdfef9145f02d326 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Mon, 18 Oct 2004 14:13:28 +0000
Subject: [PATCH] rely on glib 2.x only if the system doesn't have
 v?snprintf(), and update README.CVS accordingly

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2000 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog    |  6 ++++++
 README.CVS   | 20 ++++++++++----------
 configure.ac |  9 ++++-----
 3 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index df9a72ad..01f0a057 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -261,12 +261,18 @@ CVS code -
 	  initscr(), which ncurses, curses, and pdcurses should all
 	  have, and not tgetent(), which is a termcap-specific function.
 	  (DLR)
+	- Check only for glib 2.x, as it's much more common than
+	  glib 1.2.x now, and it has a better v?snprintf()
+	  implementation. (DLR, suggested by Jordi)
 - nanorc.sample:
 	- Remove specific references to control key shortcuts other than
 	  XON and XOFF. (DLR)
 	- Add continue and goto to the "c-file" regexes. (DLR)
 - doc/man/fr/nano.1, doc/man/fr/nanorc.1:
 	- Updated manpage translations by Jean-Philippe Gu�rard.
+- README.CVS:
+	- Mention the requirement for glib 2.x on systems lacking
+	  v?snprintf(), and add minor formatting changes.
 
 GNU nano 1.3.4 - 2004.08.17
 - General:
diff --git a/README.CVS b/README.CVS
index adad0191..7ddbe31e 100644
--- a/README.CVS
+++ b/README.CVS
@@ -1,21 +1,21 @@
 INSTRUCTIONS TO COMPILE AND INSTALL NANO CVS VERSIONS
 -----------------------------------------------------
 
-GNU nano is available from CVS, but building this needs a bit
-more care than the official stable and unstable tarballs.
+GNU nano is available from CVS, but building this needs a bit more care
+than the official stable and unstable tarballs.
 
-To successfully compile GNU nano from CVS, you'll need the
-following packages:
+To successfully compile GNU nano from CVS, you'll need the following
+packages:
 
 - autoconf (version >= 2.54)
 - automake (version >= 1.7)
 - gettext (version >= 0.11.5)
 - texinfo
 - cvs
-- glib (if your system doesn't have snprintf() and/or vsnprintf())
-- make, gcc and the normal development libraries (ncurses, etc)
-These should be available on your GNU mirror.
+- glib 2.x (if your system doesn't have snprintf() and/or vsnprintf())
+- make, gcc and the normal development libraries (ncurses, etc.)
 
+These should be available on your GNU mirror.
 
 To download the CVS tree, execute the following command:
 $ cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/nano login
@@ -27,12 +27,12 @@ If you want to checkout the stable CVS branch, append -r nano_1_0_branch:
 $ cvs -z3 -d:pserver:anonymous@subversions.gnu.org:/cvsroot/nano checkout -r nano_1_0_branch nano
 
 Once you have the sources in the "nano" directory, cd into it, and
-execute the "autogen.sh" script in the top dir. This will setup a
-configure script and Makefile.in, and you will be ready to compile with
+execute the "autogen.sh" script in the top directory.  This will set up
+a configure script and Makefile.in, and you will be ready to compile
+with
 $ ./configure [--add-options-here] && make
 Once it's done compiling,
 $ make install
 (as root) should put the required files in their respective directories.
 
-
 Please submit any bugs in the CVS branch to nano-devel@gnu.org.
diff --git a/configure.ac b/configure.ac
index b62382c8..9f325a98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -296,12 +296,11 @@ AC_CHECK_FUNCS(snprintf vsnprintf isblank strcasecmp strncasecmp strcasestr strn
 if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno"
 then
 	AM_PATH_GLIB_2_0(2.0.0,,
-	    [AM_PATH_GLIB(1.2.4,,
-		[AC_MSG_ERROR([
-*** snprintf() and/or vsnprintf() not found.  GLIB not found either.
+	    AC_MSG_ERROR([
+*** snprintf() and/or vsnprintf() not found.  GLIB 2.x not found either.
 *** You need both snprintf() and vsnprintf().  Alternatively you can
-*** install the GLIB library which can be found at ftp://ftp.gtk.org/.])],
-		glib)])
+*** install the GLIB library which can be found at ftp://ftp.gtk.org/.]),
+	    glib)
 fi
 
 dnl Checks for typedefs, structures, and compiler characteristics.