X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.ac;h=76e5cf01e7a81cb11f531763a18a1bda16f3b320;hb=991b87b671dfda11f4aaae78b059c1450f9c8df1;hp=2edf516a95f8e6681181949c67868c580cc60a9b;hpb=6014da385d5f3f2a3971f0049d2d54c0dc6e95f8;p=pspp diff --git a/configure.ac b/configure.ac index 2edf516a95..76e5cf01e7 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 @@ -28,6 +28,12 @@ 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 @@ -60,6 +66,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 +77,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 +94,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 +113,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)])]) @@ -142,10 +131,6 @@ if test "$with_cairo" != no && test "$with_gui" != "no"; then [PSPP_REQUIRED_PREREQ([spread-sheet-widget 0.7 (or use --without-gui)])]) PKG_CHECK_VAR([SPREAD_SHEET_WIDGET_LIBDIR], [spread-sheet-widget], [libdir]) - PKG_CHECK_MODULES([LIBRSVG], [librsvg-2.0 >= 2.44], - [AC_DEFINE([HAVE_RSVG], 1, [Define to 1 if librsvg is available])], - [PSPP_OPTIONAL_PREREQ([librsvg >= 2.44 required for high dpi Copy and Paste])]) - AC_ARG_VAR([GLIB_GENMARSHAL]) AC_CHECK_PROGS([GLIB_GENMARSHAL], [glib-genmarshal]) if test "x$GLIB_GENMARSHAL" = x; then @@ -325,6 +310,10 @@ RELOCATABLE_STRIP=: PSPP_CHECK_PREREQS +dnl The makefile needs to know if we're cross compiling, so that +dnl it can make arrangements to build the documentation examples. +AM_CONDITIONAL(cross_compiling, test x"$cross_compiling" = x"yes" ) + AC_CONFIG_FILES( [Makefile gl/Makefile po/Makefile tests/atlocal perl-module/lib/PSPP.pm])