bug-gnulib
[Top][All Lists]
Advanced

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

Re: gettext vs. gnulib m4 macros


From: Karl Berry
Subject: Re: gettext vs. gnulib m4 macros
Date: Tue, 7 Apr 2015 16:46:46 GMT

Finally back on this mail from February, sorry.

    paul>     How about the following list of .m4 files to be maintained
    paul>     in gettext?
    paul>     codeset.m4 gettext.m4 iconv.m4 intldir.m4 intl.m4 intlmacosx.m4
    paul>     lcmessage.m4 nls.m4 po.m4

In the past, gettext files were only updated in gnulib at gettext
releases, not from the gettext development source.  (Since, unlike the
other things we sync, they are not all just standalone sources.) I
suppose we should continue that practice?

Anyway, I copied the files as released in gettext-0.19.4; there were
just a couple of nontrivial changes, included below for posterity.
Hope it doesn't disturb anything.

    Similarly, the Files section of modules/gettext could be arranged, by
    moving some of them to Depends-on, or at least adding a comment there.

Sounds sensible to me, FWIW.  Whatever you think best.

Thanks,
Karl

*** gnulib/m4/intl.m4   Thu Jan  1 00:22:56 2015
--- gettext/m4/intl.m4  Tue Apr  7 09:29:50 2015
***************
*** 1,4 ****
! # intl.m4 serial 27 (gettext-0.18.3)
! dnl Copyright (C) 1995-2015 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # intl.m4 serial 28 (gettext-0.19)
! dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***************
*** 43,46 ****
--- 43,48 ----
    AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
    AC_REQUIRE([gt_INTL_MACOSX])dnl
+   AC_REQUIRE([gl_EXTERN_INLINE])dnl
+   AC_REQUIRE([gt_GL_ATTRIBUTE])dnl
  
    dnl Support for automake's --enable-silent-rules.
***************
*** 241,246 ****
    dnl intl/plural.c is generated from intl/plural.y. It requires bison,
    dnl because plural.y uses bison specific features. It requires at least
!   dnl bison-1.26 because earlier versions generate a plural.c that doesn't
!   dnl compile.
    dnl bison is only needed for the maintainer (who touches plural.y). But in
    dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
--- 243,247 ----
    dnl intl/plural.c is generated from intl/plural.y. It requires bison,
    dnl because plural.y uses bison specific features. It requires at least
!   dnl bison-2.7 for %define api.pure.
    dnl bison is only needed for the maintainer (who touches plural.y). But in
    dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
***************
*** 259,263 ****
      case $ac_prog_version in
        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
!       1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
  changequote([,])dnl
           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
--- 260,264 ----
      case $ac_prog_version in
        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
!       2.[7-9]* | [3-9].*)
  changequote([,])dnl
           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
***************
*** 270,271 ****
--- 271,298 ----
    fi
  ])
+ 
+ dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from
+ dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib.
+ AC_DEFUN([gt_GL_ATTRIBUTE], [
+   m4_ifndef([gl_[]COMMON],
+     AH_VERBATIM([gt_gl_attribute],
+ [/* Define as a marker that can be attached to declarations that might not
+     be used.  This helps to reduce warnings, such as from
+     GCC -Wunused-parameter.  */
+ #ifndef _GL_UNUSED
+ # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+ #  define _GL_UNUSED __attribute__ ((__unused__))
+ # else
+ #  define _GL_UNUSED
+ # endif
+ #endif
+ 
+ /* The __pure__ attribute was added in gcc 2.96.  */
+ #ifndef _GL_ATTRIBUTE_PURE
+ # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+ #  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+ # else
+ #  define _GL_ATTRIBUTE_PURE /* empty */
+ # endif
+ #endif
+ ]))])

*** gnulib/m4/po.m4     Thu Jan  1 00:22:56 2015
--- gettext/m4/po.m4    Tue Apr  7 09:29:50 2015
***************
*** 1,4 ****
! # po.m4 serial 23 (gettext-0.18.3)
! dnl Copyright (C) 1995-2015 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # po.m4 serial 24 (gettext-0.19)
! dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
  dnl This file is free software; the Free Software Foundation
  dnl gives unlimited permission to copy and/or distribute it,
***************
*** 31,35 ****
    dnl Release version of the gettext macros. This is used to ensure that
    dnl the gettext macros and po/Makefile.in.in are in sync.
!   AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
  
    dnl Perform the following tests also if --disable-nls has been given,
--- 31,35 ----
    dnl Release version of the gettext macros. This is used to ensure that
    dnl the gettext macros and po/Makefile.in.in are in sync.
!   AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
  
    dnl Perform the following tests also if --disable-nls has been given,

diff finished at Tue Apr  7 09:29:50



reply via email to

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