diff --git a/ChangeLog b/ChangeLog index 8ff4f7d3ccff43899fbc7ed277079d1083d0ab2e..8b5b3b59a142be0e278ed3c0beac6852432c88a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ * src/winio.c: Relocate and correct a few comments. * README.SVN: To build nano from svn, ssh is not required. * src/*.c: Normalize whitespace around '==' comparison. + * configure.ac: Check for the availability of snprintf(), + fixes Savannah bug #42070 reported by David Lawrence Ramsey. 2014-04-14 Benno Schulenberg <bensberg@justemail.net> * src/{proto.h,cut.c,nano.c,text.c}: Remove the unused parameter diff --git a/configure.ac b/configure.ac index f9889e1e3cb2a073e1eb213c76aa927ab3c126d2..f0bdf7eb0442d7aaa1d282e0cc3aff7f1f9260f8 100644 --- a/configure.ac +++ b/configure.ac @@ -419,18 +419,27 @@ int main(void) dnl Checks for functions. -AC_CHECK_FUNCS(getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen vsnprintf) +AC_CHECK_FUNCS(getdelim getline isblank strcasecmp strcasestr strncasecmp strnlen snprintf vsnprintf) if test "x$enable_utf8" != xno; then AC_CHECK_FUNCS(iswalnum iswblank iswpunct iswspace nl_langinfo mblen mbstowcs mbtowc wctomb wcwidth) fi +if test x$ac_cv_func_snprintf = xno; then + AM_PATH_GLIB_2_0(2.0.0,, + AC_MSG_ERROR([ +*** snprintf() not found. GLIB 2.x not found either. +*** You should install the GLIB 2.x library which can +*** be found at http://ftp.gtk.org/.]), + glib) +fi + if test x$ac_cv_func_vsnprintf = xno; then AM_PATH_GLIB_2_0(2.0.0,, AC_MSG_ERROR([ -*** vsnprintf() not found. GLIB 2.x not found either. You should -*** install the GLIB 2.x library which can be found at -*** ftp://ftp.gtk.org/.]), +*** vsnprintf() not found. GLIB 2.x not found either. +*** You should install the GLIB 2.x library which can +*** be found at http://ftp.gtk.org/.]), glib) fi