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.7KB

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