blob: 5b78c13e4f7a04fe3722b7dc83bad91b8ededd8c (
plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
Index: libvirt-1.0.3/configure.ac
===================================================================
--- libvirt-1.0.3.orig/configure.ac
+++ libvirt-1.0.3/configure.ac
@@ -1878,6 +1878,11 @@ fi
PYTHON_VERSION=
PYTHON_INCLUDES=
+
+AC_ARG_WITH(python-inc-dir,
+ AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
+ [PYTHON_INCLUDES="${withval}"], [])
+
if test "$with_python" != "no" ; then
if test -x "$with_python/bin/python"
then
@@ -1901,31 +1906,32 @@ if test "$with_python" != "no" ; then
if test "$with_python" = "yes" ; then
AM_PATH_PYTHON(,, [:])
-
+ pyexecdir=$prefix/lib/python$PYTHON_VERSION/site-packages
if test "$PYTHON" != : ; then
- PYTHON_CONFIG="$PYTHON-config"
-
- if test -x "$PYTHON_CONFIG"
- then
- PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
- else
- if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
- then
- PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
- else
- if test -r $prefix/include/python$PYTHON_VERSION/Python.h
- then
- PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
- else
- if test -r /usr/include/python$PYTHON_VERSION/Python.h
- then
- PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
- else
- AC_MSG_ERROR([You must install python-devel to build Python bindings])
- fi
+ if ! test -n "$PYTHON_INCLUDES"; then
+ PYTHON_CONFIG="$PYTHON-config"
+ if test -x "$PYTHON_CONFIG"
+ then
+ PYTHON_INCLUDES=`$PYTHON_CONFIG --includes`
+ else
+ if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION
+ else
+ if test -r $prefix/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION
+ else
+ if test -r /usr/include/python$PYTHON_VERSION/Python.h
+ then
+ PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION
+ else
+ AC_MSG_ERROR([You must install python-devel to build Python bindings])
+ fi
+ fi
fi
fi
- fi
+ fi
else
AC_MSG_ERROR([You must install python to build Python bindings])
fi
|