Mercurial > hg > octave-lyh > gnulib-hg
changeset 13383:27aa5a0e75a5
Choose among AC_DEFUN_ONCE, AC_DEFUN in a way that aclocal understands.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 03 Jun 2010 13:55:01 +0200 |
parents | 64c19ce2ffa0 |
children | cc6f2130863b |
files | ChangeLog m4/iconv.m4 m4/libunistring.m4 |
diffstat | 3 files changed, 37 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-06-03 Bruno Haible <bruno@clisp.org> + + Choose among AC_DEFUN_ONCE, AC_DEFUN in a way that aclocal understands. + * m4/iconv.m4 (gl_iconv_AC_DEFUN): New macro. + (AM_ICONV): Define it through gl_iconv_AC_DEFUN. + * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): New macro. + (gl_LIBUNISTRING): Define it through gl_libunistring_AC_DEFUN. + Reported by Ludovic Courtès <ludo@gnu.org>. + 2010-06-02 Eric Blake <eblake@redhat.com> time: work with mingw + pthreads-win32 library
--- a/m4/iconv.m4 +++ b/m4/iconv.m4 @@ -1,4 +1,4 @@ -# iconv.m4 serial 10 (gettext-0.18.1) +# iconv.m4 serial 11 (gettext-0.18.1) dnl Copyright (C) 2000-2002, 2007-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, @@ -173,7 +173,19 @@ dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -m4_version_prereq([2.64],[AC_DEFUN_ONCE],[AC_DEFUN])([AM_ICONV], +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])) +gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then
--- a/m4/libunistring.m4 +++ b/m4/libunistring.m4 @@ -1,4 +1,4 @@ -# libunistring.m4 serial 7 +# libunistring.m4 serial 8 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, @@ -15,7 +15,19 @@ 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], +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_libunistring_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])) +gl_libunistring_AC_DEFUN([gl_LIBUNISTRING], [ AC_BEFORE([$0], [gl_LIBUNISTRING_LIBSOURCE]) AC_BEFORE([$0], [gl_LIBUNISTRING_LIBHEADER])