summaryrefslogtreecommitdiff
path: root/configure.ac
blob: f242d929422d2f0d59a205be43413ebda733dfda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# This script is in the public domain.
AC_PREREQ(2.61)
AC_INIT([taler-bank], [0.5.0], [taler@gnu.org])

AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE
AC_PROG_AWK
AC_PROG_SED


AC_ARG_ENABLE([[doc]],
  [AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], ,
    [enable_doc=yes])
test "x$enable_doc" = "xno" || enable_doc=yes
AM_CONDITIONAL([ENABLE_DOC], [test "x$enable_doc" = "xyes"])


#
# Check for Python
#

PC_INIT([3.4])
pyheaders=0
PC_PYTHON_CHECK_HEADERS([pyheaders=1])

# Get Python version
PC_PYTHON_CHECK_VERSION()

#
# Check for pip3
#

AC_MSG_CHECKING([pip3])
pip3 --version >/dev/null
if test $? -ne 0;
  then
  AC_MSG_ERROR([Please install pip3>=6.0])
fi

PIP_VERSION=$(pip3 --version | $AWK '{ print $2 }')

AC_MSG_RESULT([$PIP_VERSION])

AX_COMPARE_VERSION([$PIP_VERSION],[lt],[6.0], [AC_MSG_ERROR([Please install pip3>=6.0])])

# On Debian systems, we may need to pass "--system" to pip3 to get
# to the desired installation target directory
pip3 install --help | grep '\-\-system' >> /dev/null
if test $? -ne 0;
then
   DEBIAN_PIP3_SYSTEM=""
else
   DEBIAN_PIP3_SYSTEM="--system"
fi
AC_SUBST(DEBIAN_PIP3_SYSTEM)

#
# Check for PostgreSQL
#
AC_MSG_CHECKING([Checking for Postgres])
pg_config --version > /dev/null
if test $? -ne 0;
  then
  AC_MSG_ERROR([Please install PostgreSQL])
fi

psql --version > /dev/null
if test $? -ne 0;
  then
  AC_MSG_WARN([PostgreSQL present but 'psql' is not in $PATH])
fi

#
# Check for tsc
#
AC_CHECK_PROG([tsc],[tsc],[yes],[no])
AM_CONDITIONAL([HAVE_TSC], [test "x$tsc" = xyes])

if test x$pyheaders != x1; then
  AC_MSG_WARN([Python headers not installed, might be required to build uwsgi])
fi

#
# Check for pylint
#

AC_MSG_CHECKING([pip3])
pylint --version >/dev/null
if test $? -ne 0;
  then
  AC_MSG_NOTICE([WARNING: pylint NOT found.])
else
  AC_MSG_NOTICE([NOTICE: pylint found, make sure plugin 'pylint-django' is installed.])
fi

#
# Finish
#

AC_CONFIG_FILES([
 Makefile
 bank.wsgi
 doc/Makefile
 install-dev.py
 taler-bank-manage
 talerbank/Makefile
 talerbank/app/Makefile
 talerbank/app/management/Makefile
 talerbank/app/management/commands/Makefile
 talerbank/app/migrations/Makefile
 talerbank/app/static/Makefile
 talerbank/app/static/web-common/Makefile
 talerbank/app/templates/Makefile
])

AC_OUTPUT