暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

configure.ac 2.9KB

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