>From aa4780cde60b76252e47bc6b00c111afbd2a9110 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 15 Dec 2021 23:24:48 +0100 Subject: [PATCH 3/3] automake-subdir support: Support the libunistring modules. * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIBHEADER): Use the value of the gl_source_base_prefix variable. --- ChangeLog | 6 ++++++ m4/libunistring-base.m4 | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 197d497f8..1a8a8e79a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-12-15 Bruno Haible + + automake-subdir support: Support the libunistring modules. + * m4/libunistring-base.m4 (gl_LIBUNISTRING_LIBHEADER): Use the value of + the gl_source_base_prefix variable. + 2021-12-15 Bruno Haible automake-subdir support: Support arbitrary --source-base value. diff --git a/m4/libunistring-base.m4 b/m4/libunistring-base.m4 index 657bc0ded..1c2063f57 100644 --- a/m4/libunistring-base.m4 +++ b/m4/libunistring-base.m4 @@ -1,4 +1,4 @@ -# libunistring-base.m4 serial 5 +# libunistring-base.m4 serial 6 dnl Copyright (C) 2010-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -51,7 +51,11 @@ AC_DEFUN([gl_LIBUNISTRING_LIBHEADER], 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 - LIBUNISTRING_[]AS_TR_CPP([$2])='$2' + dnl It is OK to use a .h file in lib/ from within tests/, but not vice + dnl versa. + if test -z "$LIBUNISTRING_[]AS_TR_CPP([$2])"; then + LIBUNISTRING_[]AS_TR_CPP([$2])="${gl_source_base_prefix}$2" + fi else LIBUNISTRING_[]AS_TR_CPP([$2])= fi -- 2.25.1