Avoid expanding two macros in the wrong order.
[gnulib.git] / m4 / libunistring.m4
index 7a10efe..5e4e7d9 100644 (file)
@@ -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 augments the CPPFLAGS variable, and #defines HAVE_LIBUNISTRING to 1.
 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])