| 1 | # PureDocs autoconf input file |
|---|
| 2 | |
|---|
| 3 | AC_PREREQ(2.60) |
|---|
| 4 | AC_REVISION([$Revision$]) |
|---|
| 5 | |
|---|
| 6 | AC_INIT([PureDocs], [0.5], [puredocs@water-powered.com], [puredocs]) |
|---|
| 7 | |
|---|
| 8 | # A known file for autoconf to confirm the source directory |
|---|
| 9 | AC_CONFIG_SRCDIR([LICENSE]) |
|---|
| 10 | |
|---|
| 11 | # Checks for programs. |
|---|
| 12 | AC_PROG_CC |
|---|
| 13 | AC_PROG_LIBTOOL |
|---|
| 14 | AC_PROG_INSTALL |
|---|
| 15 | AC_PROG_LN_S |
|---|
| 16 | |
|---|
| 17 | # Checks for header files. |
|---|
| 18 | #AC_HEADER_STDC |
|---|
| 19 | AC_CHECK_HEADERS([Python.h stdlib.h unistd.h]) |
|---|
| 20 | |
|---|
| 21 | # Checks for typedefs, structures, and compiler characteristics. |
|---|
| 22 | AC_C_CONST |
|---|
| 23 | AC_STRUCT_TM |
|---|
| 24 | |
|---|
| 25 | # Checks for library functions. |
|---|
| 26 | AC_FUNC_MALLOC |
|---|
| 27 | AC_CHECK_FUNCS([inet_ntoa memset pow socket strerror]) |
|---|
| 28 | |
|---|
| 29 | # Check for Python |
|---|
| 30 | AZ_PYTHON_WITH( ) |
|---|
| 31 | AZ_PYTHON_PATH( ) |
|---|
| 32 | AZ_PYTHON_VERSION_ENSURE([2.5]) |
|---|
| 33 | |
|---|
| 34 | # Store the Python version |
|---|
| 35 | # This uses sys.version_info which was introduced in Python 2.0. Since we |
|---|
| 36 | # require a Python greater than 2.4 (with lxml), we can safely use this. |
|---|
| 37 | PYTHON_VERSION=`${PYTHON} -c 'import sys; print ".".join(map(str, sys.version_info.__getitem__(slice(0,2))))'` |
|---|
| 38 | AC_SUBST([PYTHON_VERSION]) |
|---|
| 39 | |
|---|
| 40 | ## Check for Python packages |
|---|
| 41 | # docutils |
|---|
| 42 | AC_MSG_CHECKING([for python docutils]) |
|---|
| 43 | AZ_PYTHON_RUN([import docutils]) |
|---|
| 44 | if test $az_python_cc -eq 0 |
|---|
| 45 | then |
|---|
| 46 | AC_MSG_RESULT([yes]) |
|---|
| 47 | else |
|---|
| 48 | AC_MSG_ERROR([Python package docutils not found. It can be installed from the third-party/ directory, the Python Cheese Shop, or http://docutils.sourceforge.net]) |
|---|
| 49 | fi |
|---|
| 50 | |
|---|
| 51 | # setuptools |
|---|
| 52 | AC_MSG_CHECKING([for python setuptools]) |
|---|
| 53 | AZ_PYTHON_RUN([import setuptools]) |
|---|
| 54 | if test $az_python_cc -eq 0 |
|---|
| 55 | then |
|---|
| 56 | AC_MSG_RESULT([yes]) |
|---|
| 57 | else |
|---|
| 58 | AC_MSG_ERROR([Python package setuptools not found. It can be installed from the third-party/ directory, the Python Cheese Shop, or http://peak.telecommunity.com/DevCenter/setuptools]) |
|---|
| 59 | fi |
|---|
| 60 | |
|---|
| 61 | # zope.interface |
|---|
| 62 | AC_MSG_CHECKING([for python zope.interface]) |
|---|
| 63 | AZ_PYTHON_RUN([import zope.interface]) |
|---|
| 64 | if test $az_python_cc -eq 0 |
|---|
| 65 | then |
|---|
| 66 | AC_MSG_RESULT([yes]) |
|---|
| 67 | else |
|---|
| 68 | AC_MSG_ERROR([Python package zope.interface not found. It can be installed from the third-party/ directory, the Python Cheese Shop, or http://www.zope.org/Products/ZopeInterface]) |
|---|
| 69 | fi |
|---|
| 70 | |
|---|
| 71 | # twisted |
|---|
| 72 | AC_MSG_CHECKING([for python twisted]) |
|---|
| 73 | AZ_PYTHON_RUN([import twisted]) |
|---|
| 74 | if test $az_python_cc -eq 0 |
|---|
| 75 | then |
|---|
| 76 | AC_MSG_RESULT([yes]) |
|---|
| 77 | else |
|---|
| 78 | AC_MSG_ERROR([Python package twisted not found. It can be installed from the third-party/ directory, the Python Cheese Shop, or http://twistedmatrix.com]) |
|---|
| 79 | fi |
|---|
| 80 | |
|---|
| 81 | AZ_PYTHON_CSPEC |
|---|
| 82 | AZ_PYTHON_LSPEC |
|---|
| 83 | |
|---|
| 84 | AC_CONFIG_FILES([Makefile |
|---|
| 85 | Mk/common.mk |
|---|
| 86 | Mk/shared.mk |
|---|
| 87 | src/libpuredocs/Makefile |
|---|
| 88 | src/core/puredocs/core/conf.py |
|---|
| 89 | src/core/setup.py |
|---|
| 90 | src/plugins/browserxhtml/setup.py |
|---|
| 91 | src/plugins/restdoc/setup.py |
|---|
| 92 | src/plugins/x_python/setup.py |
|---|
| 93 | ]) |
|---|
| 94 | |
|---|
| 95 | AC_OUTPUT |
|---|