No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.ac 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #
  2. # This file is part of Lodel 2 (https://github.com/OpenEdition)
  3. #
  4. # Copyright (C) 2015-2017 Cléo UMS-3287
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Affero General Public License, version 3,
  8. # as published by the Free Software Foundation.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU Affero General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. #
  18. AC_INIT([lodel], [0.1], [contact@openedition.org])
  19. AM_INIT_AUTOMAKE
  20. AC_CONFIG_FILES([Makefile \
  21. lodel/buildconf.py.am \
  22. lodel/Makefile \
  23. lodel/auth/Makefile \
  24. lodel/editorial_model/Makefile \
  25. lodel/editorial_model/translator/Makefile \
  26. lodel/leapi/Makefile \
  27. lodel/leapi/datahandlers/Makefile \
  28. lodel/plugin/Makefile \
  29. lodel/settings/Makefile \
  30. lodel/validator/Makefile \
  31. lodel/mlnamedobject/Makefile \
  32. lodel/utils/Makefile \
  33. progs/Makefile \
  34. progs/slim/Makefile \
  35. lodel/plugins/Makefile \
  36. lodelsites/Makefile \
  37. ])
  38. ###
  39. #Kind of dangerous mix between default aclocal's macro and pyconfigure macros...
  40. #
  41. #pyconfigure macros are prefixed by PC_
  42. ###
  43. AC_PROG_LN_S
  44. m4_include([m4/python.m4]) # Patched version of aclocal python.m4 file
  45. m4_include([m4/python_pyconfigure.m4]) #Renamed because we use a patched version of aclocal python.m4 file
  46. m4_define(python_min_ver, 3.4.2)
  47. AM_PATH_PYTHON([3.4.2]) #init aclocal's default python support
  48. PC_INIT([3.4.2], [3.6]) #init pyconfigure aclocal's macro
  49. PC_PYTHON_VERIFY_VERSION([>=], python_min_ver, ,
  50. [AC_MSG_ERROR(Python interpreter too old)])
  51. AC_ARG_VAR([SITEPACKAGES], [If installed in /usr or /System* specify the name of the site directory (default value "site-packages"])
  52. PC_PYTHON_CHECK_MODULE([lxml], ,
  53. AC_MSG_ERROR([Module lxml not found but mandatory for lodel2]))
  54. #Webui deps
  55. AC_SUBST([WEBUI], 'True')
  56. PC_PYTHON_CHECK_MODULE_VERSION([jinja2], [2.7.3], [], ,
  57. AC_MSG_WARN([Module jinja2 not found but mandatory for default web interface])
  58. AC_SUBST([WEBUI], 'False'))
  59. PC_PYTHON_CHECK_MODULE_VERSION([werkzeug], [0.9], [], ,
  60. AC_MSG_WARN([Module werkzeug not found but mandatory for default web interface])
  61. AC_SUBST([WEBUI], 'False'))
  62. #Mongo datasource deps
  63. AC_SUBST([PYMONGO], 'True') #Can be found in lodel/buildconf.py
  64. PC_PYTHON_CHECK_MODULE_VERSION([pymongo], [2.7], [2.8], ,
  65. AC_MSG_WARN([Module pymongo not found. The mongodb datasource will not be able to work])
  66. AC_SUBST([PYMONGO], 'False')
  67. )
  68. #Documentation checks
  69. AC_SUBST([DOCOK], 'OK')
  70. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  71. if test -z "$DOXYGEN";
  72. then
  73. AC_MSG_WARN([Doxygen not found - You will not be able to generate documentation])
  74. AC_SUBST([DOCOK], '')
  75. fi
  76. AC_CHECK_PROGS([GRAPHVIZ], [dot neato twopi])
  77. if test -z "$GRAPHVIZ";
  78. then
  79. AC_MSG_WARN([Graphviz not found (dot executable missing) - You will not be able to generate documentation])
  80. AC_SUBST([DOCOK], '')
  81. fi
  82. AC_CHECK_PROGS([DOXYPY], [doxypy])
  83. if test -z "$DOXYPY";
  84. then
  85. AC_MSG_WARN([Doxypy script not found (https://pypi.python.org/pypi/doxypy/0.3) - You will not be able to generate documentation])
  86. AC_SUBST([DOCOK], '')
  87. fi
  88. AC_OUTPUT
  89. if test -z "$DOCOK";
  90. then AC_MSG_WARN([You will not be able to generate doxygen documentation. See up for reasons])
  91. fi
  92. if test "$WEBUI" = 'False';
  93. then AC_MSG_WARN([Mandatory components are missing for running default web UI. See up for reasons])
  94. fi
  95. if test "$PYMONGO" = 'False';
  96. then AC_MSG_WARN([You will not be able to user mongodb datasource. See up for reasons])
  97. fi