]> Savannah Git Hosting - gnulib.git/commitdiff
automake-subdir support: Support the libunistring modules.
authorBruno Haible <bruno@clisp.org>
Wed, 15 Dec 2021 22:24:48 +0000 (23:24 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Dec 2021 22:24:48 +0000 (23:24 +0100)
* m4/libunistring-base.m4 (gl_LIBUNISTRING_LIBHEADER): Use the value of
the gl_source_base_prefix variable.

ChangeLog
m4/libunistring-base.m4

index 197d497f8915a251b77cec883ed5f704c6a183c1..1a8a8e79a734ec5ca6bc77663aedd2853771d84c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-12-15  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        automake-subdir support: Support arbitrary --source-base value.
index 657bc0dedee11608b4f91ad76607e1fa236101f0..1c2063f5780811b77164c170790f6ce78a9456eb 100644 (file)
@@ -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