]> Savannah Git Hosting - gnulib.git/commitdiff
bison-i18n: Add support for mingw builds on Cygwin hosts.
authorBruno Haible <bruno@clisp.org>
Fri, 11 Oct 2024 15:43:02 +0000 (17:43 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 11 Oct 2024 15:43:02 +0000 (17:43 +0200)
* m4/bison-i18n.m4 (BISON_I18N): Define also BISON_LOCALEDIR_c and
BISON_LOCALEDIR_c_make.
* modules/bison-i18n (Files): Add m4/build-to-host.m4.

ChangeLog
m4/bison-i18n.m4
modules/bison-i18n

index 517236fa6b6cb7fea501994aa6d71f3c869662b3..e56b67a268bcfeb96ba3e219fe449d466391a7a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-11  Bruno Haible  <bruno@clisp.org>
+
+       bison-i18n: Add support for mingw builds on Cygwin hosts.
+       * m4/bison-i18n.m4 (BISON_I18N): Define also BISON_LOCALEDIR_c and
+       BISON_LOCALEDIR_c_make.
+       * modules/bison-i18n (Files): Add m4/build-to-host.m4.
+
 2024-10-11  Bruno Haible  <bruno@clisp.org>
 
        build-to-host.m4: Add one more convenience macro.
index ad8c1b2edf8ba46cef55b9623353c75187b0abf4..62aaa4f16eeb2196c4ff8e8e71fe41e98abe2599 100644 (file)
@@ -1,5 +1,5 @@
 # bison-i18n.m4
-# serial 4
+# serial 5
 dnl Copyright (C) 2005-2006, 2009-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -56,6 +56,26 @@ AC_DEFUN([BISON_I18N],
       fi
     fi
     AC_SUBST([BISON_LOCALEDIR])
+
+    dnl Define BISON_LOCALEDIR_c and BISON_LOCALEDIR_c_make.
+    dnl Find the final value of BISON_LOCALEDIR.
+    gl_saved_prefix="${prefix}"
+    gl_saved_datarootdir="${datarootdir}"
+    gl_saved_localedir="${localedir}"
+    gl_saved_bisonlocaledir="${BISON_LOCALEDIR}"
+    dnl Unfortunately, prefix gets only finally determined at the end of
+    dnl configure.
+    if test "X$prefix" = "XNONE"; then
+      prefix="$ac_default_prefix"
+    fi
+    eval datarootdir="$datarootdir"
+    eval localedir="$localedir"
+    eval BISON_LOCALEDIR="$BISON_LOCALEDIR"
+    gl_BUILD_TO_HOST([BISON_LOCALEDIR])
+    BISON_LOCALEDIR="${gl_saved_bisonlocaledir}"
+    localedir="${gl_saved_localedir}"
+    datarootdir="${gl_saved_datarootdir}"
+    prefix="${gl_saved_prefix}"
   fi
   if test $BISON_USE_NLS = yes; then
     AC_DEFINE([YYENABLE_NLS], [1],
index 0c763f1d92f43d2be49e32fe60ef0dc6af992643..b2bff0fadb0a718a9a44e0e4e7f7199e32e8213a 100644 (file)
@@ -3,6 +3,7 @@ Support for internationalization of bison-generated parsers.
 
 Files:
 m4/bison-i18n.m4
+m4/build-to-host.m4
 
 Depends-on:
 gettext