added appstream as a build requirement
[pspp] / configure.ac
index 93395f1809fe3c7a3e2f78e945e775867bd57ffc..ab68fe2e132be8548201391de87aa1d56fc58b93 100644 (file)
@@ -62,6 +62,22 @@ if test "x$MSGFMT" = x; then
   PSPP_REQUIRED_PREREQ([msgfmt (is usually provided with gettext)])
 fi
 
+AC_CHECK_PROGS([XGETTEXT], [xgettext])
+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_REQUIRED_PREREQ([appstream 0.12 or later for metainfo.its])
+fi
+rm -f mifc.po test.metainfo.xml.in
 
 dnl Checks for libraries.
 AC_SYS_LARGEFILE
@@ -286,14 +302,6 @@ AC_CHECK_FUNCS([__setfpucw fork execl isinf isnan finite getpid feholdexcept fps
 
 AC_PROG_LN_S
 
-AC_ARG_ENABLE(
-  debug,
-  [AS_HELP_STRING([--enable-debug],
-                  [Turn on diagnostic features in the program])])
-if test x"$enable_debug" = x"yes"  ; then
-  AC_DEFINE(DEBUGGING, 1, [Define to 1 if debugging is enabled.])
-fi
-
 # iconv is required
 AM_ICONV
 if test "$am_cv_func_iconv" != "yes"; then