X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.ac;h=28f70cfacab63aa96e60434d1f7a51678e319b10;hb=aaf08d6e2852ba7ff5a59baf4a31e36abc89203d;hp=d98631fcfcd08b184d6c223db679684d90ef1936;hpb=13ca98079f4cb3cd80deb10b173813548b1f3ddc;p=pspp diff --git a/configure.ac b/configure.ac index d98631fcfc..28f70cfaca 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ 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 @@ -18,7 +18,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Initialize. AC_PREREQ(2.64) -AC_INIT([GNU PSPP], [1.5.2], [bug-gnu-pspp@gnu.org], [pspp]) +AC_INIT([GNU PSPP], [1.5.3], [bug-gnu-pspp@gnu.org], [pspp]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_TESTDIR([tests]) @@ -28,11 +28,23 @@ dnl Checks for programs. AC_GNU_SOURCE AC_PROG_CC gl_EARLY +if test x"$cross_compiling" = x"yes"; then + if test x"$srcdir" = x"."; then + AC_ERROR([Cross compiling must be done out of source.]) + fi +fi + AM_PROG_CC_C_O AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL AC_HEADER_TIOCGWINSZ + +AC_CHECK_SIZEOF([ptrdiff_t]) +binary_width=`expr 8 '*' $ac_cv_sizeof_ptrdiff_t` +AC_SUBST([binary_width]) + + PKG_PROG_PKG_CONFIG m4_pattern_forbid([PKG_CHECK_MODULES]) PSPP_CHECK_CLICKSEQUENCE @@ -42,8 +54,8 @@ PSPP_CHECK_DOT PSPP_ENABLE_WERROR AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" ) +AM_CONDITIONAL(host_is_w32, [case $host_os in mingw*) true;; *) false;; esac] ) -PSPP_CC_FOR_BUILD PSPP_PERL PSPP_PYTHON AC_CHECK_PROGS([TEX], [tex], [no]) @@ -60,6 +72,7 @@ CFLAGS="$CFLAGS -DGCC_LINT" 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 @@ -70,18 +83,12 @@ 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 '' > test.metainfo.xml.in -$as_echo '' >> test.metainfo.xml.in -$as_echo 'Hallo' >> test.metainfo.xml.in -$as_echo '' >> 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 @@ -93,20 +100,9 @@ AC_ARG_VAR([PSPP_LDFLAGS], [linker flags to be used for linking the pspp binary AC_ARG_VAR([PSPPIRE_LDFLAGS], [linker flags to be used for linking the psppire binary only]) # Support for Cairo and Pango. -AC_ARG_WITH([cairo], - [AS_HELP_STRING( - [--without-cairo], - [Don't build support for charts (using Cairo and Pango); - implies --without-gui])], - [], [with_cairo=yes]) -AM_CONDITIONAL([HAVE_CAIRO], [test "$with_cairo" != no]) -if test "$with_cairo" != no; then - PKG_CHECK_MODULES([CAIRO], [cairo >= 1.5 pango >= 1.22 pangocairo], - [CPPFLAGS="$CPPFLAGS $CAIRO_CFLAGS" - AC_DEFINE([HAVE_CAIRO], 1, - [Define to 1 if Cairo and Pango are available.])], - [PSPP_REQUIRED_PREREQ([cairo 1.5 or later and pango 1.22 or later (or use --without-cairo)])]) -fi +PKG_CHECK_MODULES([CAIRO], [cairo >= 1.5 pango >= 1.22 pangocairo], + [CPPFLAGS="$CPPFLAGS $CAIRO_CFLAGS"], + [PSPP_REQUIRED_PREREQ([cairo 1.5 or later and pango 1.22 or later])]) dnl One of the tests uses xmllint. AC_CACHE_CHECK([for an xmllint program which fits our needs],[ac_cv_path_XMLLINT], @@ -123,9 +119,8 @@ AC_ARG_WITH([gui], [AS_HELP_STRING([--without-gui], [Don't build the PSPPIRE GUI (using GTK+)])], [], [with_gui=yes]) -AM_CONDITIONAL([building_gui], - [test "$with_cairo" != no && test "$with_gui" != "no"]) -if test "$with_cairo" != no && test "$with_gui" != "no"; then +AM_CONDITIONAL([building_gui], [test "$with_gui" != "no"]) +if test "$with_gui" != "no"; then PKG_CHECK_MODULES([GTHREAD], [gthread-2.0], [], [PSPP_REQUIRED_PREREQ([gthread 2.0 (or use --without-gui)])])