]> git.draconx.ca Git - dxcommon.git/blobdiff - m4/linguas.m4
Add "join" detection macro.
[dxcommon.git] / m4 / linguas.m4
index eb6701e2dd92c5696e3fd891b77f44af7ccce2b4..fce4e0c07c919569360b3ca7ebdfd5cbef2c0d7a 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright © 2011, 2021 Nick Bowler
+dnl Copyright © 2011, 2021-2022 Nick Bowler
 dnl
 dnl Computes the set of .po and .mo files based on the LINGUAS environment
 dnl variable.  The variable POFILES is set to the complete list of .po files,
@@ -12,6 +12,7 @@ dnl There is NO WARRANTY, to the extent permitted by law.
 
 AC_DEFUN([DX_LINGUAS],
 [AC_REQUIRE([AM_GNU_GETTEXT])dnl
+AC_REQUIRE([DX_PROG_JOIN])dnl
 
 POFILES=
 MOFILES=
@@ -21,7 +22,7 @@ if test -f "$srcdir/po/LINGUAS"; then
     for (i = 1; i <= NF; i++) {
       print $(i)
     }
-  }' "$srcdir/po/LINGUAS" | sort -u >conftest.all
+  }' "$srcdir/po/LINGUAS" | LC_ALL=C sort -u >conftest.all
 
   : "${LINGUAS=all}"
   if test x"$LINGUAS" = x"all"; then
@@ -40,7 +41,7 @@ if test -f "$srcdir/po/LINGUAS"; then
           ;;
         esac
       done
-    } | sort -u >conftest.ena
+    } | LC_ALL=C sort -u >conftest.ena
   fi
 
   exec 3<conftest.all
@@ -49,7 +50,7 @@ if test -f "$srcdir/po/LINGUAS"; then
   done
 
   if test x"$USE_NLS" = x"yes"; then
-    join conftest.ena conftest.all >conftest.out
+    LC_ALL=C $JOIN conftest.ena conftest.all >conftest.out
     exec 3<conftest.out
     while read x <&3; do
       AS_VAR_APPEND([MOFILES], ["${MOFILES:+ }po/$x.mo"])