Prefer using AC_DEFUN_ONCE over AC_DEFUN in projects with gnulib.
authorBruno Haible <bruno@clisp.org>
Sat, 28 Aug 2010 08:46:37 +0000 (10:46 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 28 Aug 2010 08:46:37 +0000 (10:46 +0200)
ChangeLog
m4/iconv.m4
m4/libunistring.m4

index 35e3989..d3f104a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-08-28  Bruno Haible  <bruno@clisp.org>
 
+       Prefer using AC_DEFUN_ONCE over AC_DEFUN in projects with gnulib.
+       * m4/iconv.m4 (gl_iconv_AC_DEFUN): Use AC_DEFUN_ONCE if gl_00GNULIB is
+       defined.
+       * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): Likewise.
+       Suggested by Eric Blake.
+
+2010-08-28  Bruno Haible  <bruno@clisp.org>
+
        sys_socket, netdb: Ensure socklen_t gets defined.
        * modules/sys_socket (Depends-on): Add socklen.
        * modules/netdb (Depends-on): Likewise.
index 5e838b0..425145c 100644 (file)
@@ -1,4 +1,4 @@
-# iconv.m4 serial 14 (gettext-0.18.2)
+# iconv.m4 serial 15 (gettext-0.18.2)
 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,
@@ -217,8 +217,11 @@ m4_define([gl_iconv_AC_DEFUN],
   m4_version_prereq([2.64],
     [[AC_DEFUN_ONCE(
         [$1], [$2])]],
-    [[AC_DEFUN(
-        [$1], [$2])]]))
+    [m4_ifdef([gl_00GNULIB],
+       [[AC_DEFUN_ONCE(
+           [$1], [$2])]],
+       [[AC_DEFUN(
+           [$1], [$2])]])]))
 gl_iconv_AC_DEFUN([AM_ICONV],
 [
   AM_ICONV_LINK
index 55f5334..61b7cc9 100644 (file)
@@ -1,4 +1,4 @@
-# libunistring.m4 serial 10
+# libunistring.m4 serial 11
 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,
@@ -25,8 +25,11 @@ m4_define([gl_libunistring_AC_DEFUN],
   m4_version_prereq([2.64],
     [[AC_DEFUN_ONCE(
         [$1], [$2])]],
-    [[AC_DEFUN(
-        [$1], [$2])]]))
+    [m4_ifdef([gl_00GNULIB],
+       [[AC_DEFUN_ONCE(
+           [$1], [$2])]],
+       [[AC_DEFUN(
+           [$1], [$2])]])]))
 gl_libunistring_AC_DEFUN([gl_LIBUNISTRING],
 [
   AC_BEFORE([$0], [gl_LIBUNISTRING_MODULE])