diff options
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/configure.in b/configure.in index 3d5f48b..d449b11 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ([2.68]) +AC_PREREQ([2.63]) AC_INIT AC_CONFIG_SRCDIR([entities.c]) AC_CONFIG_HEADERS([config.h]) @@ -8,7 +8,7 @@ AC_CANONICAL_HOST LIBXML_MAJOR_VERSION=2 LIBXML_MINOR_VERSION=9 -LIBXML_MICRO_VERSION=0 +LIBXML_MICRO_VERSION=1 LIBXML_MICRO_VERSION_SUFFIX= LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION @@ -62,7 +62,6 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MKDIR_P AC_PROG_CPP -AC_PATH_PROG(RM, rm, /bin/rm) AC_PATH_PROG(MV, mv, /bin/mv) AC_PATH_PROG(TAR, tar, /bin/tar) AC_PATH_PROG(PERL, perl, /usr/bin/perl) @@ -767,7 +766,7 @@ if test "$with_python" != "no" ; then if test -x "$PYTHON" then echo Found python in environment PYTHON=$PYTHON - with_python=`$PYTHON -c "import sys; print sys.exec_prefix"` + 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 @@ -776,50 +775,53 @@ if test "$with_python" != "no" ; then fi if test "$PYTHON" != "" then - PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` + 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" != "" + if test "$PYTHON_VERSION" != "" -a "$PYTHON_INCLUDES" = "" then - if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ - -d $with_python/lib/python$PYTHON_VERSION/site-packages + if test -r $with_python/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else if test -r $prefix/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else if test -r /usr/include/python$PYTHON_VERSION/Python.h then PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION - PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages else - if test -r $with_python/include/Python.h -a \ - -d $with_python/lib/site-packages + if test -r $with_python/include/Python.h then PYTHON_INCLUDES=$with_python/include - PYTHON_SITE_PACKAGES=$with_python/lib/site-packages else echo could not find python$PYTHON_VERSION/Python.h or $with_python/include/Python.h fi fi fi - if test ! -d "$PYTHON_SITE_PACKAGES" - then - PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` - fi fi - PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` fi - if test "$with_python" != "" + if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = "" then - pythondir='$(PYTHON_SITE_PACKAGES)' - else - pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages' + 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 + pythondir='$(PYTHON_SITE_PACKAGES)' + PYTHON_LIBS=`python$PYTHON_VERSION-config --ldflags` else PYTHON= fi @@ -954,6 +956,7 @@ WITH_THREADS=0 THREAD_CFLAGS="" TEST_THREADS="" THREADS_W32="" +WITH_THREAD_ALLOC=0 if test "$with_threads" = "no" ; then echo Disabling multithreaded support @@ -1017,7 +1020,7 @@ else fi fi if test "$with_thread_alloc" = "yes" -a "$WITH_THREADS" = "1" ; then - THREAD_CFLAGS="$THREAD_CFLAGS -DLIBXML_THREAD_ALLOC_ENABLED" + WITH_THREAD_ALLOC=1 fi AC_SUBST(THREAD_LIBS) @@ -1025,6 +1028,7 @@ AC_SUBST(BASE_THREAD_LIBS) AC_SUBST(WITH_THREADS) AC_SUBST(THREAD_CFLAGS) AC_SUBST(TEST_THREADS) +AC_SUBST(WITH_THREAD_ALLOC) AM_CONDITIONAL([THREADS_W32],[test -n "$THREADS_W32"]) dnl |
