[Top][All Lists]
[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
- [PATCH 00/15] Add libunistring-optional module, Paolo Bonzini, 2010/04/10
- [PATCH 01/15] gnulib-tool: let macros access gnulib-tool parameters, Paolo Bonzini, 2010/04/10
- [PATCH 02/15] havelib: allow expansions in $5, Paolo Bonzini, 2010/04/10
- [PATCH 03/15] libunistring: improve diagnostics,
Paolo Bonzini <=
- [PATCH 04/15] libunistring-optional: infrastructure, Paolo Bonzini, 2010/04/10
- [PATCH 07/15] uniconv: support libunistring-optional, Paolo Bonzini, 2010/04/10
- [PATCH 05/15] unitypes: support libunistring-optional, Paolo Bonzini, 2010/04/10
- [PATCH 10/15] uniname: support libunistring-optional, Paolo Bonzini, 2010/04/10
- [PATCH 11/15] uninorm: support libunistring-optional, Paolo Bonzini, 2010/04/10
- [PATCH 09/15] unilbrk: support libunistring-optional, Paolo Bonzini, 2010/04/10
- [PATCH 15/15] uniwidth: support libunistring-optional, Paolo Bonzini, 2010/04/10
- [PATCH 06/15] unicase: support libunistring-optional, Paolo Bonzini, 2010/04/10