X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpandora_with_gettext.m4;h=9b13e56ffccb18d9dfbf577b66cef008903bb384;hb=49fc1e5ea4ea006f4a2ac71428833760f6fac030;hp=2b22d1b8ee90061f18535aedb650db0fce5a7c10;hpb=55b5455291498ef63c1c34976552d58708a74732;p=awesomized%2Flibmemcached diff --git a/m4/pandora_with_gettext.m4 b/m4/pandora_with_gettext.m4 index 2b22d1b8..9b13e56f 100644 --- a/m4/pandora_with_gettext.m4 +++ b/m4/pandora_with_gettext.m4 @@ -11,10 +11,11 @@ dnl From Monty Taylor AC_DEFUN([PANDORA_WITH_GETTEXT],[ + m4_syscmd([if test -d po ; then echo "# This file is auto-generated from configure. Do not edit directly" > po/POTFILES.in.stamp - PACKAGE=`grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d]` - for f in `find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort` + PACKAGE=$(grep ^AC_INIT configure.ac | cut -f2-3 -d[ | cut -f1 -d]) + for f in $(find . | grep -v "${PACKAGE}-" | egrep '\.(cc|c|h|yy)$' | cut -c3- | sort) do if grep gettext.h "$f" | grep include >/dev/null 2>&1 then @@ -29,13 +30,15 @@ AC_DEFUN([PANDORA_WITH_GETTEXT],[ fi fi]) - AM_GNU_GETTEXT(external, need-formatstring-macros) - AM_GNU_GETTEXT_VERSION([0.17]) - AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[ - AM_PATH_PROG_WITH_TEST(GMSGMERGE, gmsgmerge, - [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - MSGMERGE="${GMSGMERGE}" + m4_if(m4_substr(m4_esyscmd(test -d po && echo 0),0,1),0, [ + AM_GNU_GETTEXT(external, need-formatstring-macros) + AM_GNU_GETTEXT_VERSION([0.17]) + AS_IF([test "x$MSGMERGE" = "x" -o "x$MSGMERGE" = "x:"],[ + AM_PATH_PROG_WITH_TEST([GMSGMERGE], gmsgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + MSGMERGE="${GMSGMERGE}" + ]) + AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"]) ]) - AM_CONDITIONAL([BUILD_GETTEXT],[test "x$MSGMERGE" != "x" -a "x$MSGMERGE" != "x:"]) ])