bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 03/15] libunistring: improve diagnostics


From: Paolo Bonzini
Subject: [PATCH 03/15] libunistring: improve diagnostics
Date: Sat, 10 Apr 2010 13:24:13 +0200

* m4/libunistring.m4: Do not repeat twice "no, consider installing GNU
libunistring".  Also add a missing-message parameter like the one
of AM_LIB_HAVE_LINKFLAGS.
---
 m4/libunistring.m4 |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/m4/libunistring.m4 b/m4/libunistring.m4
index 8f9f07b..6e546f3 100644
--- a/m4/libunistring.m4
+++ b/m4/libunistring.m4
@@ -4,7 +4,7 @@ dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-dnl gl_LIBUNISTRING
+dnl gl_LIBUNISTRING([missing-message])
 dnl Searches for an installed libunistring.
 dnl If found, it sets and AC_SUBSTs HAVE_LIBUNISTRING=yes and the LIBUNISTRING
 dnl and LTLIBUNISTRING variables and augments the CPPFLAGS variable, and
@@ -16,18 +16,24 @@ AC_DEFUN([gl_LIBUNISTRING],
   dnl First, try to link without -liconv. libunistring often depends on
   dnl libiconv, but we don't know (and often don't need to know) where
   dnl libiconv is installed.
+  AC_REQUIRE([AM_ICONV])
+  if test -n "$LIBICONV"; then
+    glus_missing_message="no, trying again with -liconv"
+  else
+    glus_missing_message="m4_default_quoted([$1], [no, consider installing GNU 
libunistring])"
+  fi
   AC_LIB_HAVE_LINKFLAGS([unistring], [],
     [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
-    [no, consider installing GNU libunistring])
+    [${glus_missing_message}])
   if test "$ac_cv_libunistring" != yes; then
     dnl Second try, with -liconv.
-    AC_REQUIRE([AM_ICONV])
     if test -n "$LIBICONV"; then
+      glus_missing_message="m4_default_quoted([$1], [no, consider installing 
GNU libunistring])"
       glus_save_LIBS="$LIBS"
       LIBS="$LIBS $LIBICONV"
       AC_LIB_HAVE_LINKFLAGS([unistring], [],
         [#include <uniconv.h>], [u8_strconv_from_locale((char*)0);],
-        [no, consider installing GNU libunistring])
+        [${glus_missing_message}])
       if test -n "$LIBUNISTRING"; then
         LIBUNISTRING="$LIBUNISTRING $LIBICONV"
       fi
-- 
1.6.6.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]