From: Bruno Haible Date: Sun, 11 Apr 2010 16:26:02 +0000 (+0200) Subject: libunistring: Improve configure output. X-Git-Tag: v0.1~4271 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=f8d79a1c80cfdeecb03eb1675c3cabf7d3a165c5;p=gnulib.git libunistring: Improve configure output. --- diff --git a/ChangeLog b/ChangeLog index 49b6b6460..5c62459c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-04-11 Paolo Bonzini + Bruno Haible + + libunistring: Improve configure output. + * m4/libunistring.m4 (gl_LIBUNISTRING): Check for libiconv first. + Don't say "consider installing GNU libunistring" when checking again + with libiconv. + 2010-04-11 Bruno Haible libunistring: Correct value of $LTLIBUNISTRING. diff --git a/m4/libunistring.m4 b/m4/libunistring.m4 index ac9d11acf..0faedb947 100644 --- a/m4/libunistring.m4 +++ b/m4/libunistring.m4 @@ -1,4 +1,4 @@ -# libunistring.m4 serial 4 +# libunistring.m4 serial 5 dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -13,16 +13,16 @@ dnl HAVE_LIBUNISTRING=no and LIBUNISTRING and LTLIBUNISTRING to empty. 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_LIB_HAVE_LINKFLAGS([unistring], [], - [#include ], [u8_strconv_from_locale((char*)0);], - [no, consider installing GNU libunistring]) - if test "$ac_cv_libunistring" != yes; then - dnl Second try, with -liconv. - AC_REQUIRE([AM_ICONV]) - if test -n "$LIBICONV"; then + AC_REQUIRE([AM_ICONV]) + if test -n "$LIBICONV"; then + 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_LIB_HAVE_LINKFLAGS([unistring], [], + [#include ], [u8_strconv_from_locale((char*)0);], + [no, trying again together with libiconv]) + if test "$ac_cv_libunistring" != yes; then + dnl Second try, with -liconv. dnl We have to erase the cached result of the first AC_LIB_HAVE_LINKFLAGS dnl invocation, otherwise the second one will not be run. unset ac_cv_libunistring @@ -37,5 +37,9 @@ AC_DEFUN([gl_LIBUNISTRING], fi LIBS="$glus_save_LIBS" fi + else + AC_LIB_HAVE_LINKFLAGS([unistring], [], + [#include ], [u8_strconv_from_locale((char*)0);], + [no, consider installing GNU libunistring]) fi ])