bug-gnulib
[Top][All Lists]
Advanced

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

Re: ‘libunistring’ module errors


From: Bruno Haible
Subject: Re: ‘libunistring’ module errors
Date: Tue, 1 Jun 2010 01:35:12 +0200
User-agent: KMail/1.9.9

Hi Ludo,

> If you want to examine the faulty ‘configure’, you can get it from the
> tarball at <http://hydra.nixos.org/build/429132>.

Ah, that's the failed build you were talking about. Yes, with this tarball
I can reproduce the problem.

> What happens is that these lines:
> 
> --8<---------------cut here---------------start------------->8---
>   if test "$HAVE_LIBUNISTRING" = yes; then
>     LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e 
> "$gl_libunistring_sed_extract_major"`
>     LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e 
> "$gl_libunistring_sed_extract_minor"`
>     LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e 
> "$gl_libunistring_sed_extract_subminor"`
>   fi
> --8<---------------cut here---------------end--------------->8---
> 
> ... are executed before $HAVE_LIBUNISTRING has been set, leaving
> $LIBUNISTRING_VERSION_* undefined.
> It looks like a problem of ordering among the libunistring macros.

Yes. I had put an AC_BEFORE into gl_LIBUNISTRING that was meant to catch
this problem at 'autoconf' time. But AC_BEFORE is buggy in this case, reported
at <http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00024.html>.

I have applied the fix below.

> configure.ac:67: warning: AC_REQUIRE: `AM_ICONV' was expanded before it was 
> required

This problem was fixed in gnulib/m4/iconv.m4 two weeks ago. Please update your
imports from gnulib.

Bruno


2010-05-31  Bruno Haible  <address@hidden>

        Avoid expanding two macros in the wrong order.
        * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIB_PREPARE): Require
        gl_LIBUNISTRING if it is defined.
        * m4/libunistring.m4 (gl_LIBUNISTRING): Define using AC_DEFUN_ONCE for
        autoconf >= 2.64.
        Reported by Ludovic Courtès <address@hidden>.

--- m4/libunistring-base.m4.orig        Tue Jun  1 01:23:15 2010
+++ m4/libunistring-base.m4     Tue Jun  1 01:20:57 2010
@@ -1,4 +1,4 @@
-# libunistring-base.m4 serial 2
+# libunistring-base.m4 serial 3
 dnl Copyright (C) 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,
@@ -66,6 +66,9 @@
 
 AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE],
 [
+  dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point.
+  m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])])
+
   AC_REQUIRE([AC_PROG_AWK])
 
 dnl Sed expressions to extract the parts of a version number.
--- m4/libunistring.m4.orig     Tue Jun  1 01:23:15 2010
+++ m4/libunistring.m4  Tue Jun  1 01:22:45 2010
@@ -1,4 +1,4 @@
-# libunistring.m4 serial 6
+# libunistring.m4 serial 7
 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,
@@ -12,7 +12,10 @@
 dnl Otherwise, it sets and AC_SUBSTs HAVE_LIBUNISTRING=no and LIBUNISTRING and
 dnl LTLIBUNISTRING to empty.
 
-AC_DEFUN([gl_LIBUNISTRING],
+dnl Define gl_LIBUNISTRING using AC_DEFUN_ONCE for Autoconf >= 2.64, in order
+dnl to avoid warnings like
+dnl "warning: AC_REQUIRE: `gl_LIBUNISTRING' was expanded before it was 
required".
+m4_version_prereq([2.64],[AC_DEFUN_ONCE],[AC_DEFUN])([gl_LIBUNISTRING],
 [
   AC_BEFORE([$0], [gl_LIBUNISTRING_LIBSOURCE])
   AC_BEFORE([$0], [gl_LIBUNISTRING_LIBHEADER])



reply via email to

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