File: configure.in

package info (click to toggle)
python-gd 0.26-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 216 kB
  • ctags: 103
  • sloc: ansic: 1,350; makefile: 64; python: 26
file content (49 lines) | stat: -rw-r--r-- 1,372 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(gdmodule.c)
AC_PATH_PROG(PYTHON, python)

changequote(<<, >>)dnl
PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"`
changequote([, ])dnl

dnl AC_PREFIX_DEFAULT(/usr/lib/python1.5)

dnl Checks for programs.
AC_PROG_CC

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h)

dnl Check for the Python include dir. Use AC_PREFIX_DEFAULT....

AC_MSG_CHECKING(for headers required to compile python extensions)
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
PYTHON_INCLUDE="${py_prefix}/include/python${PYTHON_VERSION}"
PYTHON_LIB="${py_prefix}/lib/python${PYTHON_VERSION}/lib-dynload/"
PYTHON_PREFIX="${py_prefix}/lib/python${PYTHON_VERSION}"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDE="$PYTHON_INCLUDE -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
fi
AC_SUBST(PYTHON_INCLUDE)
AC_SUBST(PYTHON_LIB)
AC_SUBST(PYTHON_PREFIX)
dnl check if the headers exist:
if test -f "${py_exec_prefix}/include/python${PYTHON_VERSION}/Python.h"
then
  AC_MSG_RESULT(ok)
else
  AC_MSG_ERROR([not found])
fi

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.

dnl Check for files

AC_OUTPUT(Makefile)