+
+
+dnl Check that xgettext is sufficiently recent
+dnl Before calling this function the variable XGETTEXT must point to the xgettext binary
+AC_DEFUN([PSPP_CHECK_XGETTEXT],
+ [AC_CACHE_CHECK([whether gettext is sufficiently recent],
+ [pspp_cv_progrecent_xgettext],
+ [pspp_cv_progrecent_xgettext=maybe
+ ver=`$ac_cv_prog_XGETTEXT --version | sed -n -e '/xgettext/s/[[^0-9]]*\([[0-9\.]][[0-9\.]]*\).*/\1/p'`
+ major=${ver%%.[[0-9]][[0-9]]*}
+ majmin=${ver%.[[0-9]][[0-9]]*}
+ minor=${majmin##[0-9]*.}
+ if test "$major" -lt 0; then
+ pspp_cv_progrecent_xgettext=no;
+ elif test "$minor" -lt 20; then
+ pspp_cv_progrecent_xgettext=no
+ else
+ pspp_cv_progrecent_xgettext=yes
+ fi])])
+