summaryrefslogtreecommitdiff
path: root/package/libxml2/patches/patch-configure_ac
blob: 6cbef48457c67ef594894d53d0adf7c722feb8d5 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
--- libxml2-2.9.2.orig/configure.ac	2014-10-15 23:06:15.000000000 -0500
+++ libxml2-2.9.2/configure.ac	2015-02-11 12:53:35.494162888 -0600
@@ -837,62 +837,13 @@ if test "$with_python" != "no" ; then
                     echo Found python in environment PYTHON=$PYTHON
                     with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
                 else
-                    AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
-		fi
-	    fi
-	fi
-    fi
-    if test "$PYTHON" != ""
-    then
-        PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"`
-	PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
-# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python
-#
-#	PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
-	echo Found Python version $PYTHON_VERSION
-    fi
-    if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
-    then
-	if test -r $with_python/include/python$PYTHON_VERSION/Python.h
-	then
-	    PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
-	else
-	    if test -r $prefix/include/python$PYTHON_VERSION/Python.h
-	    then
-	        PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
-	    else
-		if test -r /usr/include/python$PYTHON_VERSION/Python.h
-		then
-		    PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
-		else
-	            if test -r $with_python/include/Python.h
-	            then
-	                PYTHON_INCLUDES=$with_python/include
-	            else
-		        echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
-		    fi
+                    AC_PATH_PROG(PYTHON, python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
 		fi
 	    fi
 	fi
     fi
-    if test "$with_python_install_dir" != ""
-    then
-	PYTHON_SITE_PACKAGES="$with_python_install_dir"
-    fi
-    if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
-    then
-	if test -d $libdir/python$PYTHON_VERSION/site-packages
-	then
-	    PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
-	else
-	    if test -d $with_python/lib/site-packages
-	    then
-		PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
-	    else
-		PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
-	    fi
-	fi
-    fi
+    PYTHON_INCLUDES=`python$PYTHON_VERSION-config --includes`
+    PYTHON_SITE_PACKAGES=${prefix}/lib/python$PYTHON_VERSION/site-packages
     pythondir='$(PYTHON_SITE_PACKAGES)'
     PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
 else
@@ -1065,26 +1016,7 @@ else
 	   THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
        ;;
        *linux*)
-           if test "${GCC}" = "yes" ; then
-	       GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
-	       GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
-	       GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[[0-9]]*\.++' | sed 's+\..*++'`
-	       if test "${THREAD_LIBS}" = "-lpthread" ; then
-	           if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
-		   then
-		       THREAD_LIBS=""
-		       BASE_THREAD_LIBS="-lpthread"
-		   else
-		   if expr ${GCC_MAJOR} \> 3 > /dev/null
-		   then
-		       THREAD_LIBS=""
-		       BASE_THREAD_LIBS="-lpthread"
-		   else
-		       echo old GCC disabling weak symbols for pthread
-		   fi
-		   fi
-	       fi
-	   fi
+	   THREAD_LIBS="-lpthread"
        ;;
     esac
     if test "$WITH_THREADS" = "1" ; then