Discussion:
an AM_ICONV tweak
(too old to reply)
Bruno Haible
2016-10-22 21:11:32 UTC
Permalink
Raw Message
I'm pushing this tweak of the AM_ICONV macro. It should have an effect only
on GNU libiconv itself, when built on a platform that does not have iconv
so far. In this situation, AM_ICONV used to not define ICONV_CONST, which
was OK before but leads to a compilation error now after some internal changes
in GNU libiconv.


2016-10-22 Bruno Haible <***@clisp.org>

iconv: Avoid compilation error when bootstrapping GNU libiconv.
* m4/iconv.m4 (AM_ICONV): When the system does not have an iconv()
declaration yet, define ICONV_CONST to empty.

diff --git a/m4/iconv.m4 b/m4/iconv.m4
index aa159c5..bdafc54 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -1,4 +1,4 @@
-# iconv.m4 serial 19 (gettext-0.18.2)
+# iconv.m4 serial 20
dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -258,14 +258,18 @@ size_t iconv();
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([
$am_cv_proto_iconv])
- AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
- [Define as const if the declaration of iconv() needs const.])
- dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
- m4_ifdef([gl_ICONV_H_DEFAULTS],
- [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
- if test -n "$am_cv_proto_iconv_arg1"; then
- ICONV_CONST="const"
- fi
- ])
+ else
+ dnl When compiling GNU libiconv on a system that does not have iconv yet,
+ dnl pick the POSIX compliant declaration without 'const'.
+ am_cv_proto_iconv_arg1=""
fi
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
+ m4_ifdef([gl_ICONV_H_DEFAULTS],
+ [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test -n "$am_cv_proto_iconv_arg1"; then
+ ICONV_CONST="const"
+ fi
+ ])
])
Karl Berry
2016-10-24 21:17:10 UTC
Permalink
Raw Message
-# iconv.m4 serial 19 (gettext-0.18.2)
+# iconv.m4 serial 20

Bruno - some time ago, Daiki and the crew here made iconv.m4 and the
rest of the gettext files in gnulib synced from the most recent gettext
release. Should I undo that now so gnulib's gettext files are just on
their own again? Or taken from some gettext source repository?

The theory and practice we had seen was that if they were not synced,
they got out of sync. Not surprisingly. And updating from the source
repository could result in undesired changes being propagated ...

Whatever you want to do ... --karl


[From gnulib/config/srclist.txt.]

# Although gettext-runtime/m4 has other .m4 files, they are maintained
# in gnulib.
$GETTEXT/gettext-runtime/m4/codeset.m4 m4
$GETTEXT/gettext-runtime/m4/gettext.m4 m4
$GETTEXT/gettext-runtime/m4/iconv.m4 m4
$GETTEXT/gettext-runtime/m4/intl.m4 m4
$GETTEXT/gettext-runtime/m4/intldir.m4 m4
$GETTEXT/gettext-runtime/m4/intlmacosx.m4 m4
$GETTEXT/gettext-runtime/m4/lcmessage.m4 m4
$GETTEXT/gettext-runtime/m4/nls.m4 m4
$GETTEXT/gettext-runtime/m4/po.m4 m4

$GETTEXT/gettext-runtime/po/Makefile.in.in build-aux/po
$GETTEXT/gettext-runtime/po/remove-potcdate.sin build-aux/po
Bruno Haible
2016-10-24 22:25:19 UTC
Permalink
Raw Message
Hi Karl,
Post by Bruno Haible
-# iconv.m4 serial 19 (gettext-0.18.2)
+# iconv.m4 serial 20
Bruno - some time ago, Daiki and the crew here made iconv.m4 and the
rest of the gettext files in gnulib synced from the most recent gettext
release.
Thanks for the reminder. I have pushed the recent change into gettext.git,
so that they are in sync again now.

Nothing to do for you now.

But thanks for the reminder. It would have been too easy to forget about it.

Bruno
Karl Berry
2016-10-24 22:48:11 UTC
Permalink
Raw Message
Nothing to do for you now.

It's still unresolved. As I said, gnulib gettext is synced from
*released* gettext (ie, the tarball), not development gettext. Should I
switch gnulib to check against development gettext, then? -k

Loading...