From 9d3af100c7a626ed2b501fb7d0a97936f72ce9ac Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 3 Jun 2010 23:54:36 +0200 Subject: [PATCH] Simplify gl_LIBUNISTRING_VERSION_CMP expansion. --- ChangeLog | 8 ++++++++ m4/libunistring-base.m4 | 11 ++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe373ee07..ec1c80f9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-06-03 Bruno Haible + Simplify gl_LIBUNISTRING_VERSION_CMP expansion. + * m4/libunistring-base.m4 (gl_LIBUNISTRING_VERSION_CMP): Ensure + expansion does not end with a newline. + (gl_LIBUNISTRING_LIBSOURCE, gl_LIBUNISTRING_LIBHEADER): Avoid + unnecessary newline. + +2010-06-03 Bruno Haible + Reduce dependencies. * tests/test-quotearg.h: New file, extracted from tests/test-quotearg.c. diff --git a/m4/libunistring-base.m4 b/m4/libunistring-base.m4 index a36e5f492..09165c5fc 100644 --- a/m4/libunistring-base.m4 +++ b/m4/libunistring-base.m4 @@ -1,4 +1,4 @@ -# libunistring-base.m4 serial 3 +# libunistring-base.m4 serial 4 dnl Copyright (C) 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, @@ -23,8 +23,7 @@ AC_DEFUN([gl_LIBUNISTRING_LIBSOURCE], AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from dnl gl_LIBUNISTRING_CORE if that macro has been run. - if gl_LIBUNISTRING_VERSION_CMP([$1]) - then + if gl_LIBUNISTRING_VERSION_CMP([$1]); then m4_foreach_w([gl_source_file], [$2], [AC_LIBOBJ(m4_bpatsubst(m4_defn([gl_source_file]), [\.c$], [])) ]) @@ -53,8 +52,7 @@ AC_DEFUN([gl_LIBUNISTRING_LIBHEADER], AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE]) dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from dnl gl_LIBUNISTRING_CORE if that macro has been run. - if gl_LIBUNISTRING_VERSION_CMP([$1]) - then + if gl_LIBUNISTRING_VERSION_CMP([$1]); then LIBUNISTRING_[]AS_TR_CPP([$2])='$2' else LIBUNISTRING_[]AS_TR_CPP([$2])= @@ -138,8 +136,7 @@ AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP], } ]) } - } -]) + }]) dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the dnl same as ORIG, otherwise to 0. -- 2.11.0