patch-configure_in 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --- libxml2-2.9.1.orig/configure.in 2013-04-19 09:25:20.000000000 +0200
  2. +++ libxml2-2.9.1/configure.in 2013-11-23 23:02:06.000000000 +0100
  3. @@ -748,80 +748,16 @@ PYTHON_SITE_PACKAGES=
  4. PYTHON_TESTS=
  5. pythondir=
  6. if test "$with_python" != "no" ; then
  7. - if test -x "$with_python/bin/python"
  8. - then
  9. - echo Found python in $with_python/bin/python
  10. - PYTHON="$with_python/bin/python"
  11. - else
  12. - if test -x "$with_python/python.exe"
  13. - then
  14. - echo Found python in $with_python/python.exe
  15. - PYTHON="$with_python/python.exe"
  16. - else
  17. - if test -x "$with_python"
  18. - then
  19. - echo Found python in $with_python
  20. - PYTHON="$with_python"
  21. - else
  22. - if test -x "$PYTHON"
  23. - then
  24. - echo Found python in environment PYTHON=$PYTHON
  25. - with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
  26. - else
  27. - AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
  28. - fi
  29. - fi
  30. - fi
  31. - fi
  32. + AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
  33. if test "$PYTHON" != ""
  34. then
  35. PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"`
  36. - PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
  37. -# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python
  38. -#
  39. -# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
  40. echo Found Python version $PYTHON_VERSION
  41. fi
  42. - if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
  43. - then
  44. - if test -r $with_python/include/python$PYTHON_VERSION/Python.h
  45. - then
  46. - PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
  47. - else
  48. - if test -r $prefix/include/python$PYTHON_VERSION/Python.h
  49. - then
  50. - PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
  51. - else
  52. - if test -r /usr/include/python$PYTHON_VERSION/Python.h
  53. - then
  54. - PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
  55. - else
  56. - if test -r $with_python/include/Python.h
  57. - then
  58. - PYTHON_INCLUDES=$with_python/include
  59. - else
  60. - echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
  61. - fi
  62. - fi
  63. - fi
  64. - fi
  65. - fi
  66. - if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
  67. - then
  68. - if test -d $libdir/python$PYTHON_VERSION/site-packages
  69. - then
  70. - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
  71. - else
  72. - if test -d $with_python/lib/site-packages
  73. - then
  74. - PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
  75. - else
  76. - PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
  77. - fi
  78. - fi
  79. - fi
  80. - pythondir='$(PYTHON_SITE_PACKAGES)'
  81. + PYTHON_INCLUDES=`python$PYTHON_VERSION-config --includes`
  82. PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
  83. + PYTHON_SITE_PACKAGES=${prefix}/lib/python$PYTHON_VERSION/site-packages
  84. + pythondir='$(PYTHON_SITE_PACKAGES)'
  85. else
  86. PYTHON=
  87. fi