~ubuntu-branches/ubuntu/quantal/colord/quantal-proposed

« back to all changes in this revision

Viewing changes to m4/as-linguas.m4

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers
  • Date: 2012-03-01 17:33:00 UTC
  • mto: (1.1.4) (2.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20120301173300-q1s2bs8yubnybln8
ImportĀ upstreamĀ versionĀ 0.1.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Set ALL_ALL_LINGUAS based on the .po files present. Optional argument is the
 
2
# name of the po directory. $podir/LINGUAS.ignore can be used to ignore a
 
3
# subset of the po files.
 
4
 
 
5
AC_DEFUN([AS_ALL_LINGUAS],
 
6
[
 
7
 AC_MSG_CHECKING([for linguas])
 
8
 podir="m4_default([$1],[$srcdir/po])"
 
9
 linguas=`cd $podir && ls *.po 2>/dev/null | awk 'BEGIN { FS="."; ORS=" " } { print $[]1 }'`
 
10
 if test -f "$podir/LINGUAS.ignore"; then
 
11
   ALL_LINGUAS="";
 
12
   ignore_linguas=`sed -n -e 's/^\s\+\|\s\+$//g' -e '/^#/b' -e '/\S/!b' \
 
13
                       -e 's/\s\+/\n/g' -e p "$podir/LINGUAS.ignore"`;
 
14
   for lang in $linguas; do
 
15
     if ! echo "$ignore_linguas" | grep -q "^${lang}$"; then
 
16
       ALL_LINGUAS="$ALL_LINGUAS $lang";
 
17
     fi;
 
18
   done;
 
19
 else
 
20
   ALL_LINGUAS="$linguas";
 
21
 fi;
 
22
 AC_SUBST([ALL_LINGUAS])
 
23
 AC_MSG_RESULT($ALL_LINGUAS)
 
24
])