041cf289a806e8b9a3aac165f7fadd8d4d989438
[pspp] / tests / atlocal.in
1 # -*- shell-script -*-
2
3 # PSPP - a program for statistical analysis.
4 # Copyright (C) 2017 Free Software Foundation, Inc.
5
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
20
21 # Variables used internally by the testsuite.
22 EXEEXT='@EXEEXT@'
23 PERL='@PERL@'
24 WITH_PERL_MODULE='@WITH_PERL_MODULE@'
25 host='@host@'
26 PACKAGE_STRING='@PACKAGE_STRING@'
27 PACKAGE_BUGREPORT='@PACKAGE_BUGREPORT@'
28
29 XMLLINT='@XMLLINT@'
30 if echo | $XMLLINT - >/dev/null 2>&1; then
31     HAVE_XMLLINT=no
32 else
33     HAVE_XMLLINT=yes
34 fi
35
36 PSQL_SUPPORT='@PSQL_SUPPORT@'
37 if test "$PSQL_SUPPORT" = yes; then
38     : ${PG_CONFIG:='@PG_CONFIG@'}
39     : ${PG_DBASE:=pspptest}
40     : ${PG_PORT:=6543}
41     : ${PG_PATH:=`$PG_CONFIG --bindir`}
42
43     # PSQL_SUPPORT indicates that PSPP was built against the PostgreSQL client
44     # library, but it does not mean that the PostgreSQL utilities are
45     # installed.  So check for them and turn off PSQL_SUPPORT if they are not
46     # available.
47     if (PATH=$PG_PATH:$PATH; export PATH; initdb --version) >/dev/null 2>&1
48     then
49         :
50     else
51         PSQL_SUPPORT=no
52     fi
53 fi
54
55 # Variables used by programs invoked by the testsuite.
56 CHARSETALIASDIR="$abs_top_builddir/gl"
57 export CHARSETALIASDIR
58
59 GZIP=
60 export GZIP
61
62 WINEPREFIX=$HOME/.wine    # Work around the following kludge to keep wine happy
63 export WINEPREFIX
64
65
66 HOME=/nonexistent               # Kluge to make PSPP ignore $HOME/.pspprc.
67 export HOME
68
69 # Avoids error messages during tests if $TERM is set to an unknown terminal.
70 TERM=; unset TERM
71
72 pspp_diff=`which diff`
73 if test X"$RUNNER" = Xwine; then
74     diff () {
75         $pspp_diff -w  "$@"
76     }
77 fi