1
dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
dnl pandora-build: A pedantic build system
5
dnl Copyright (C) 2009 Sun Microsystems, Inc.
6
dnl This file is free software; Sun Microsystems
7
dnl gives unlimited permission to copy and/or distribute it,
8
dnl with or without modifications, as long as this notice is preserved.
12
AC_DEFUN([PANDORA_WITH_GETTEXT],[
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`
19
if grep gettext.h "$f" | grep include >/dev/null 2>&1
21
echo "$f" >> po/POTFILES.in.stamp
24
if diff po/POTFILES.in.stamp po/POTFILES.in >/dev/null 2>&1
26
rm po/POTFILES.in.stamp
28
mv po/POTFILES.in.stamp po/POTFILES.in
32
AM_GNU_GETTEXT(external, need-formatstring-macros)
33
AM_GNU_GETTEXT_VERSION([0.17])
34
AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[
35
AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge,
36
[$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
37
MSGMERGE="${GMSGMERGE}"
39
AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"])