File: as-linguas.m4

package info (click to toggle)
mx 1.4.6-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,628 kB
  • sloc: ansic: 46,358; sh: 11,012; makefile: 645; xml: 13
file content (24 lines) | stat: -rw-r--r-- 776 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Set ALL_ALL_LINGUAS based on the .po files present. Optional argument is the
# name of the po directory. $podir/LINGUAS.ignore can be used to ignore a
# subset of the po files.

AC_DEFUN([AS_ALL_LINGUAS],
[
 AC_MSG_CHECKING([for linguas])
 podir="m4_default([$1],[$srcdir/po])"
 linguas=`cd $podir && ls *.po 2>/dev/null | awk 'BEGIN { FS="."; ORS=" " } { print $[]1 }'`
 if test -f "$podir/LINGUAS.ignore"; then
 ALL_LINGUAS="";
 ignore_linguas=`sed -n -e 's/^\s\+\|\s\+$//g' -e '/^#/b' -e '/\S/!b' \
 -e 's/\s\+/\n/g' -e p "$podir/LINGUAS.ignore"`;
 for lang in $linguas; do
 if ! echo "$ignore_linguas" | grep -q "^${lang}$"; then
 ALL_LINGUAS="$ALL_LINGUAS $lang";
 fi;
 done;
 else
 ALL_LINGUAS="$linguas";
 fi;
 AC_SUBST([ALL_LINGUAS])
 AC_MSG_RESULT($ALL_LINGUAS)
])