summaryrefslogtreecommitdiff
blob: d163d00844bc185fa62919efbc5d881d1fcb7d84 (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
1. make configure respect --with-python-incdir

diff --git a/configure b/configure
index 2d755b1..3db111f 100755
--- a/configure
+++ b/configure
@@ -330,18 +330,21 @@ echo "lib${clhep_lib}.${shlib}"
 # ---
 echo $ac_n "Checking for Python include dir (pyconfig.h) ... $ac_c"
 # check version
-if [ $with_python3 = 0 ]; then
-  set python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2
-else
-  set python3.1 python3.0
+if [ ! -d "$python_incdir" ]
+then
+    if [ $with_python3 = 0 ]; then
+	set python python2.7 python2.6 python2.5 python2.4 python2.3 python2.2
+    else
+	set python3.1 python3.0
+    fi
+    for aincdir in $*
+    do
+	if [ -d /usr/include/"$aincdir" ]; then
+	    python_incdir=/usr/include/$aincdir
+	    break
+	fi
+    done
 fi
-for aincdir in $*
-do
-  if [ -d /usr/include/"$aincdir" ]; then
-    python_incdir=/usr/include/$aincdir
-    break
-  fi
-done
 
 if [ ! -f "$python_incdir"/pyconfig.h ]; then
   echo "no"