Skip to content

Commit

Permalink
configure.ac: move some gettext checks to conditional block
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdcr committed Dec 1, 2010
1 parent 4e8cc69 commit fb41a54
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ AC_CONFIG_MACRO_DIR([m4])

AC_CHECK_HEADERS([dbox/fp.h dbox/lcd-ks0713.h])

AC_PATH_PROG(MSGFMT,[msgfmt])
AC_PATH_PROG(MSGINIT,[msginit])
AC_PATH_PROG(MSGMERGE,[msgmerge])
AC_PATH_PROG(MSGUNIQ,[msguniq])
AC_PATH_PROG(XGETTEXT,[xgettext])
if test -z "$MSGFMT" -o -z "$MSGINIT" -o -z "$MSGMERGE" -o -z "$MSGUNIQ" -o -z "$XGETTEXT"; then
AC_MSG_ERROR([Could not find required gettext tools])
fi
AC_PATH_PROG(MSGFMT, msgfmt, AC_MSG_ERROR(Could not find msgfmt))

AM_PATH_PYTHON
AX_PYTHON_DEVEL
Expand Down Expand Up @@ -88,6 +81,15 @@ fi
AC_ARG_WITH(po,
AS_HELP_STRING([--with-po],[enable updating of po files]),
[with_po="$withval"],[with_po="no"])
if test "$with_po" = "yes"; then
AC_PATH_PROG(MSGINIT, msginit)
AC_PATH_PROG(MSGMERGE, msgmerge)
AC_PATH_PROG(MSGUNIQ, msguniq)
AC_PATH_PROG(XGETTEXT, xgettext)
if test -z "$MSGINIT" -o -z "$MSGMERGE" -o -z "$MSGUNIQ" -o -z "$XGETTEXT"; then
AC_MSG_ERROR([Could not find required gettext tools])
fi
fi
AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")

CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
Expand Down

0 comments on commit fb41a54

Please sign in to comment.