Hi,

I hear that the config directory of Python3 will be changed on
Ubuntu 13.04 because of multiarch support.  E.g. it becomes
/usr/lib/python3.3/config-3.3m-i386-linux-gnu/ on Ubuntu 13.04 32bit.
Currently the configure script can't find this directory.
The config directory of Python2/3 can be retrieved by the following code:

  import distutils.sysconfig
  print(distutils.sysconfig.get_config_var('LIBPL'))

Attached patch uses distutils.sysconfig first, then the old routine
to retrieve the config directory.
Tested on Ubuntu 13.04 32bit (beta), 12.04 64bit, 10.04 64bit and Cygwin.

I also attached a patch to fix some indents in the configure.in.

Best regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


# HG changeset patch
# Parent 553c5f55b1ec5a5a5e766cca25df618f98e9bad7

diff --git a/src/configure.in b/src/configure.in
--- a/src/configure.in
+++ b/src/configure.in
@@ -895,14 +895,19 @@
       AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python_conf,
       [
 	vi_cv_path_python_conf=
-	for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
-	  for subdir in lib64 lib share; do
-	    d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
-	    if test -d "$d" && test -f "$d/config.c"; then
-	      vi_cv_path_python_conf="$d"
-	    fi
+	d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
+	if test -d "$d" && test -f "$d/config.c"; then
+	  vi_cv_path_python_conf="$d"
+	else
+	  for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
+	    for subdir in lib64 lib share; do
+	      d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
+	      if test -d "$d" && test -f "$d/config.c"; then
+		vi_cv_path_python_conf="$d"
+	      fi
+	    done
 	  done
-	done
+	fi
       ])
 
       PYTHON_CONFDIR="${vi_cv_path_python_conf}"
@@ -1093,14 +1098,19 @@
      if test "${vi_cv_var_python3_abiflags}" != ""; then
        config_dir="${config_dir}-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
      fi
-     for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
-       for subdir in lib64 lib share; do
-         d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
-         if test -d "$d" && test -f "$d/config.c"; then
-           vi_cv_path_python3_conf="$d"
-         fi
+     d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
+     if test -d "$d" && test -f "$d/config.c"; then
+       vi_cv_path_python3_conf="$d"
+     else
+       for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
+	 for subdir in lib64 lib share; do
+	   d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
+	   if test -d "$d" && test -f "$d/config.c"; then
+	     vi_cv_path_python3_conf="$d"
+	   fi
+	 done
        done
-     done
+     fi
     ])
 
     PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
# HG changeset patch
# Parent c9662ddae72ddc8c4bc381df4db6dc4e32c07adb
diff --git a/src/configure.in b/src/configure.in
--- a/src/configure.in
+++ b/src/configure.in
@@ -1486,14 +1486,14 @@
 	fi
 	librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBYARG']])"`
 	librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBY_A']])"`
-  rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['libdir']])"`
+	rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['libdir']])"`
 	if test -f "$rubylibdir/$librubya"; then
 	  librubyarg="$librubyarg"
-    RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
-  elif test "$librubyarg" = "libruby.a"; then
-    dnl required on Mac OS 10.3 where libruby.a doesn't exist
-    librubyarg="-lruby"
-    RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
+	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
+	elif test "$librubyarg" = "libruby.a"; then
+	  dnl required on Mac OS 10.3 where libruby.a doesn't exist
+	  librubyarg="-lruby"
+	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
 	fi
 
 	if test "X$librubyarg" != "X"; then

Raspunde prin e-mail lui