If you don't have a version already, you can install GNU
libiconv (http://www.gnu.org/software/libiconv/).
- * libintl, from GNU gettext (http://www.gnu.org/software/gettext).
- GNU libc includes an integrated libintl, so there is no need to
- separately install libintl on a GNU/Linux system.
-
* zlib (http://www.zlib.net/).
* libxml2 (http://xmlsoft.org/).
- * metainfo.its, provided by the appstream package. This is required
- by xgettext version lower then 0.20 to extract the translation
- strings from the org.fsf.pspp.metainfo.xml.in file. This is only
- required for building. It is not a runtime requirement.
+ * gettext version 0.20 or later.
The following packages are required to enable PSPP's graphing
features. If you cannot arrange to install them, you must run
PSPP NEWS -- history of user-visible changes.
-Copyright (C) 1996-2000, 2008-2016, 2017, 2019, 2020 Free Software Foundation, Inc.
+Copyright (C) 1996-2000, 2008-2016, 2017, 2019, 2020, 2021 Free Software Foundation, Inc.
See the end for copying conditions.
Please send PSPP bug reports to bug-gnu-pspp@gnu.org.
* The user manual, in its Info and HTML versions, now includes
graphical output examples and screenshots.
+ * gettext 0.20 or later is required for building.
+
* Output improvements:
- New drivers for output to TeX source files and to PNG files.
-dnl Copyright (C) 2005, 2006, 2007, 2009, 2014, 2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2006, 2007, 2009, 2014, 2015, 2021 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
pspp_cv_dot=no
fi])
AM_CONDITIONAL([HAVE_DOT], [test "$pspp_cv_dot" = yes])])
+
+
+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])])
+
dnl PSPP - a program for statistical analysis.
-dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl Copyright (C) 2017, 2021 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl Disable automatic po/ support, because PSPP provides its own po/ support.
AC_PROVIDE([AM_PO_SUBDIRS])
AM_GNU_GETTEXT([external], [need-ngettext])
+
LIBS="$LIBINTL $LIBS"
AC_CHECK_PROGS([MSGFMT], [msgfmt])
if test "x$MSGFMT" = x; then
if test "x$XGETTEXT" = x; then
PSPP_REQUIRED_PREREQ([xgettext (is usually provided with gettext)])
fi
-dnl appstream required for metainfo.its
-dnl if metainfo.its is not there, then the following small
-dnl file will not produce an outputfile
-$as_echo '<?xml version="1.0" encoding="UTF-8"?>' > test.metainfo.xml.in
-$as_echo '<component type="desktop">' >> test.metainfo.xml.in
-$as_echo '<name>Hallo</name>' >> test.metainfo.xml.in
-$as_echo '</component>' >> test.metainfo.xml.in
-xgettext -o mifc.po test.metainfo.xml.in
-if ! test -f ./mifc.po ; then
- PSPP_OPTIONAL_PREREQ([org.fsf.metainfo.xml will not be translated. Install gettext >=0.20 or appstream.])
+
+PSPP_CHECK_XGETTEXT
+
+if test "$pspp_cv_progrecent_xgettext" != "yes"; then
+ PSPP_REQUIRED_PREREQ([xgettext version 0.20 or greater])
fi
-rm -f mifc.po test.metainfo.xml.in
dnl Checks for libraries.
AC_SYS_LARGEFILE
# PSPP - a program for statistical analysis.
-# Copyright (C) 2017, 2020 Free Software Foundation, Inc.
+# Copyright (C) 2017, 2020, 2021 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
$(AM_V_at)test -z "$(UI_FILES)" || $(XGETTEXT) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=Glade -o $@,tmp
$(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) -j doc/org.fsf.pspp.metainfo.xml.in -o $@,tmp
$(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) -j doc/org.fsf.pspp.desktop.in -o $@,tmp
- $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: .*/d' $@,tmp > $@
- rm -f $@,tmp
+ $(AM_V_at)mv $@,tmp $@
$(LOCALPOFILES) $(POFILES): $(POTFILE)
$(AM_V_GEN)$(MSGMERGE) --previous --quiet $(top_srcdir)/$@ $? -o $@,tmp
touch $@,tmp ; \
msgcat --use-first $(top_srcdir)/$@,aux $@,tmp -o $@,tmp; \
fi ;
- $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: /d' $@,tmp > $@,tmp2
- $(RM) $@,tmp
- $(MSGFMT) -c $@,tmp2 -o - > /dev/null
- mv $@,tmp2 $@
+ $(MSGFMT) -c $@,tmp -o - > /dev/null
+ mv $@,tmp $@
SUFFIXES += .po .gmo
.po.gmo: