~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_with_gettext.m4

Migrated pandora_with_gettext.m4 to use m4_syscmd so that the code runs at the right time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
AC_DEFUN([PANDORA_WITH_GETTEXT],[
13
13
 
14
 
  mkdir -p po
15
 
  echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.in
16
 
  # The grep -v '${PACKAGE}-' is to exclude any distcheck leftovers
17
 
  for f in `cd ${srcdir} ; find . | grep -v "${PACKAGE}-" | ${EGREP} '\.(cc|c|h|yy)$' | cut -c3- | sort`
 
14
  m4_syscmd([if test -d po ; then
 
15
    echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp
 
16
    PACKAGE=`grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d]`
 
17
    for f in `find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort`
18
18
    do
19
 
      if grep gettext.h "${srcdir}/$f" | grep include >/dev/null 2>&1
 
19
      if grep gettext.h "$f" | grep include >/dev/null 2>&1
20
20
      then
21
 
        echo "$f" >> po/POTFILES.in.in
 
21
        echo "$f" >> po/POTFILES.in.stamp
22
22
      fi
23
23
    done
24
 
    if diff po/POTFILES.in.in po/POTFILES.in >/dev/null 2>&1
 
24
    if diff po/POTFILES.in.stamp po/POTFILES.in >/dev/null 2>&1
25
25
    then
26
 
      rm po/POTFILES.in.in
 
26
      rm po/POTFILES.in.stamp
27
27
    else
28
 
      mv po/POTFILES.in.in po/POTFILES.in
 
28
      mv po/POTFILES.in.stamp po/POTFILES.in
29
29
    fi
 
30
  fi])
30
31
 
31
32
  AM_GNU_GETTEXT(external, need-formatstring-macros)
32
33
  AM_GNU_GETTEXT_VERSION([0.17])