暫無描述
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 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. AC_INIT([lodel], [0.1], [contact@openedition.org])
  2. AM_INIT_AUTOMAKE
  3. AC_CONFIG_FILES([Makefile \
  4. lodel/buildconf.py.am \
  5. lodel/Makefile \
  6. lodel/auth/Makefile \
  7. lodel/editorial_model/Makefile \
  8. lodel/editorial_model/translator/Makefile \
  9. lodel/leapi/Makefile \
  10. lodel/leapi/datahandlers/Makefile \
  11. lodel/plugin/Makefile \
  12. lodel/settings/Makefile \
  13. lodel/utils/Makefile \
  14. progs/Makefile \
  15. progs/slim/Makefile \
  16. lodel/plugins/Makefile \
  17. lodelsites/Makefile \
  18. ])
  19. ###
  20. #Kind of dangerous mix between default aclocal's macro and pyconfigure macros...
  21. #
  22. #pyconfigure macros are prefixed by PC_
  23. ###
  24. AC_PROG_LN_S
  25. m4_include([m4/python.m4]) # Patched version of aclocal python.m4 file
  26. m4_include([m4/python_pyconfigure.m4]) #Renamed because we use a patched version of aclocal python.m4 file
  27. m4_define(python_min_ver, 3.4.2)
  28. AM_PATH_PYTHON([3.4.2]) #init aclocal's default python support
  29. PC_INIT([3.4.2], [3.5]) #init pyconfigure aclocal's macro
  30. PC_PYTHON_VERIFY_VERSION([>=], python_min_ver, ,
  31. [AC_MSG_ERROR(Python interpreter too old)])
  32. AC_ARG_VAR([SITEPACKAGES], [If installed in /usr or /System* specify the name of the site directory (default value "site-packages"])
  33. PC_PYTHON_CHECK_MODULE([lxml], ,
  34. AC_MSG_ERROR([Module lxml not found but mandatory for lodel2]))
  35. #Webui deps
  36. AC_SUBST([WEBUI], 'True')
  37. PC_PYTHON_CHECK_MODULE_VERSION([jinja2], [2.7.3], [], ,
  38. AC_MSG_WARN([Module jinja2 not found but mandatory for default web interface])
  39. AC_SUBST([WEBUI], 'False'))
  40. PC_PYTHON_CHECK_MODULE_VERSION([werkzeug], [0.9], [], ,
  41. AC_MSG_WARN([Module werkzeug not found but mandatory for default web interface])
  42. AC_SUBST([WEBUI], 'False'))
  43. #Mongo datasource deps
  44. AC_SUBST([PYMONGO], 'True') #Can be found in lodel/buildconf.py
  45. PC_PYTHON_CHECK_MODULE_VERSION([pymongo], [2.7], [2.8], ,
  46. AC_MSG_WARN([Module pymongo not found. The mongodb datasource will not be able to work])
  47. AC_SUBST([PYMONGO], 'False')
  48. )
  49. #Documentation checks
  50. AC_SUBST([DOCOK], 'OK')
  51. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  52. if test -z "$DOXYGEN";
  53. then
  54. AC_MSG_WARN([Doxygen not found - You will not be able to generate documentation])
  55. AC_SUBST([DOCOK], '')
  56. fi
  57. AC_CHECK_PROGS([GRAPHVIZ], [dot neato twopi])
  58. if test -z "$GRAPHVIZ";
  59. then
  60. AC_MSG_WARN([Graphviz not found (dot executable missing) - You will not be able to generate documentation])
  61. AC_SUBST([DOCOK], '')
  62. fi
  63. AC_CHECK_PROGS([DOXYPY], [doxypy])
  64. if test -z "$DOXYPY";
  65. then
  66. AC_MSG_WARN([Doxypy script not found (https://pypi.python.org/pypi/doxypy/0.3) - You will not be able to generate documentation])
  67. AC_SUBST([DOCOK], '')
  68. fi
  69. AC_OUTPUT
  70. if test -z "$DOCOK";
  71. then AC_MSG_WARN([You will not be able to generate doxygen documentation. See up for reasons])
  72. fi
  73. if test "$WEBUI" = 'False';
  74. then AC_MSG_WARN([Mandatory components are missing for running default web UI. See up for reasons])
  75. fi
  76. if test "$PYMONGO" = 'False';
  77. then AC_MSG_WARN([You will not be able to user mongodb datasource. See up for reasons])
  78. fi