# This script is in the public domain. AC_PREREQ(2.61) AC_INIT([taler-bank], [0.5.1], [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() # Get python executable name m4_define_default([_AM_PYTHON_INTERPRETER_LIST],[python3 python3.4 python3.5 python3.6 python3.7 python]) AM_PATH_PYTHON([3.4],, [:]) AC_SUBST([PYTHON]) AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) # # Check for pip3. # Since it is either pip3 or pip[3.4,3.5,3.6,3.7], # we check using python module loading. PIP_EXE="$PYTHON -m pip" PIP_VERSION=$($PIP_EXE -V | grep -v "No module named" | tr -d '\n' | $AWK '{ print $2 }') AC_MSG_RESULT([pip3 version: $PIP_VERSION]) AX_COMPARE_VERSION([$PIP_VERSION],[lt],[6.0], [AC_MSG_ERROR([Please install pip3>=6.0])]) AC_ARG_VAR(DEBIAN_PIP3_SYSTEM, "Custom flags to be used along 'pip install' (this is mandatory on some Debians to be set as '--system', in order to get 'make install' obey the --prefix switch.)") # # 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 # PYLINT_EXE="$PYTHON -m pylint --version" AC_MSG_CHECKING([for pylint]) # If module load does not return 'No module named', we have test == 0. # This implies having a grep implementation which supports the -v # switch to be 'invert-match' (select non-matching lines), which the # standard implementations support. $PYLINT_EXE | grep -v "No module named" >/dev/null if test $? -ne 0; then AC_MSG_WARN([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