patch-configure_ac 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --- libxml2-2.9.2.orig/configure.ac 2014-10-15 23:06:15.000000000 -0500
  2. +++ libxml2-2.9.2/configure.ac 2015-02-11 12:53:35.494162888 -0600
  3. @@ -837,62 +837,13 @@ if test "$with_python" != "no" ; then
  4. echo Found python in environment PYTHON=$PYTHON
  5. with_python=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
  6. else
  7. - AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
  8. - fi
  9. - fi
  10. - fi
  11. - fi
  12. - if test "$PYTHON" != ""
  13. - then
  14. - PYTHON_VERSION=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_version())"`
  15. - PYTHON_INCLUDES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"`
  16. -# does not work as it produce a /usr/lib/python path instead of/usr/lib64/python
  17. -#
  18. -# PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
  19. - echo Found Python version $PYTHON_VERSION
  20. - fi
  21. - if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = ""
  22. - then
  23. - if test -r $with_python/include/python$PYTHON_VERSION/Python.h
  24. - then
  25. - PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
  26. - else
  27. - if test -r $prefix/include/python$PYTHON_VERSION/Python.h
  28. - then
  29. - PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
  30. - else
  31. - if test -r /usr/include/python$PYTHON_VERSION/Python.h
  32. - then
  33. - PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
  34. - else
  35. - if test -r $with_python/include/Python.h
  36. - then
  37. - PYTHON_INCLUDES=$with_python/include
  38. - else
  39. - echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h
  40. - fi
  41. + AC_PATH_PROG(PYTHON, python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
  42. fi
  43. fi
  44. fi
  45. fi
  46. - if test "$with_python_install_dir" != ""
  47. - then
  48. - PYTHON_SITE_PACKAGES="$with_python_install_dir"
  49. - fi
  50. - if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
  51. - then
  52. - if test -d $libdir/python$PYTHON_VERSION/site-packages
  53. - then
  54. - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
  55. - else
  56. - if test -d $with_python/lib/site-packages
  57. - then
  58. - PYTHON_SITE_PACKAGES=$with_python/lib/site-packages
  59. - else
  60. - PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib())"`
  61. - fi
  62. - fi
  63. - fi
  64. + PYTHON_INCLUDES=`python$PYTHON_VERSION-config --includes`
  65. + PYTHON_SITE_PACKAGES=${prefix}/lib/python$PYTHON_VERSION/site-packages
  66. pythondir='$(PYTHON_SITE_PACKAGES)'
  67. PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags`
  68. else
  69. @@ -1065,26 +1016,7 @@ else
  70. THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS"
  71. ;;
  72. *linux*)
  73. - if test "${GCC}" = "yes" ; then
  74. - GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
  75. - GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'`
  76. - GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[[0-9]]*\.++' | sed 's+\..*++'`
  77. - if test "${THREAD_LIBS}" = "-lpthread" ; then
  78. - if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null
  79. - then
  80. - THREAD_LIBS=""
  81. - BASE_THREAD_LIBS="-lpthread"
  82. - else
  83. - if expr ${GCC_MAJOR} \> 3 > /dev/null
  84. - then
  85. - THREAD_LIBS=""
  86. - BASE_THREAD_LIBS="-lpthread"
  87. - else
  88. - echo old GCC disabling weak symbols for pthread
  89. - fi
  90. - fi
  91. - fi
  92. - fi
  93. + THREAD_LIBS="-lpthread"
  94. ;;
  95. esac
  96. if test "$WITH_THREADS" = "1" ; then