[PATCH xwininfo] Use AM_ICONV

Guillem Jover guillem at hadrons.org
Tue Aug 23 12:24:37 PDT 2011


Hi!

On Mon, 2011-08-22 at 14:34:45 -0500, Yaakov (Cygwin/X) wrote:
> AC_SEARCH_LIBS does not detect GNU libiconv because its symbols are
> exported in the "libiconv" namespace instead of "iconv".  The AM_ICONV
> macro correctly detects both glibc and GNU libiconv, defines HAVE_ICONV,
> ICONV_CONST, and LIBICONV depending on the system.  The config.rpath
> file is required by this macro.
> 
> This adds a dependency on the aclocal macros from gettext (gettext-devel
> in some distros) when building from git, but not when building from a
> tarball.
> ---
>  config.rpath |  690 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  configure.ac |    5 +-

Needing to include config.rpath in the repository seems quite
annoying to me, as it will get out of sync with the upstream version.
The problem is that autoreconf and autopoint, do not handle packages
just using AM_ICONV.

But this can be worked around by declaring we need AM_GNU_GETTEXT, which
is a bit of a heavy hammer solution, but oh well...

> diff --git a/configure.ac b/configure.ac
> index b86aa20..e712ba6 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -45,9 +45,7 @@ if test "x$ac_cv_func_strnlen_working" = xyes; then
>    AC_DEFINE(HAVE_STRNLEN, 1, [Define to 1 if you have a working strnlen function.])
>  fi
>  
> -# Check for iconv in libc, then libiconv
> -AC_SEARCH_LIBS([iconv], [iconv], [AC_DEFINE([HAVE_ICONV], 1,
> -	[Define to 1 if you have the iconv() function])])

# XXX: Declare that we need GNU gettext so that autopoint installs
# config.rpath for us on autoreconf.
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external])

> +AM_ICONV
>  
>  # Allow using xcb-icccm, but don't make it the default while the API is
>  # still being changed.

regards,
guillem


More information about the xorg-devel mailing list