*** pgsql/config/python.m4 2006/10/16 17:24:54 1.14 --- pgsql/config/python.m4 2009/01/04 00:54:15 1.15 *************** *** 1,7 **** # # Autoconf macros for configuring the build of Python extension modules # ! # $PostgreSQL: pgsql/config/python.m4,v 1.13 2005/10/13 20:40:04 momjian Exp $ # # PGAC_PATH_PYTHON --- 1,7 ---- # # Autoconf macros for configuring the build of Python extension modules # ! # $PostgreSQL: pgsql/config/python.m4,v 1.14 2006/10/16 17:24:54 petere Exp $ # # PGAC_PATH_PYTHON *************** else *** 30,38 **** AC_MSG_ERROR([distutils module not found]) fi AC_MSG_CHECKING([Python configuration directory]) ! python_version=`${PYTHON} -c "import sys; print sys.version[[:3]]"` ! python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print os.path.join(f(plat_specific=1,standard_lib=1),'config')"` ! python_includespec=`${PYTHON} -c "import distutils.sysconfig; print '-I'+distutils.sysconfig.get_python_inc()"` AC_SUBST(python_version)[]dnl AC_SUBST(python_configdir)[]dnl --- 30,38 ---- AC_MSG_ERROR([distutils module not found]) fi AC_MSG_CHECKING([Python configuration directory]) ! python_version=`${PYTHON} -c "import sys; print(sys.version[[:3]])"` ! python_configdir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib as f; import os; print(os.path.join(f(plat_specific=1,standard_lib=1),'config'))"` ! python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"` AC_SUBST(python_version)[]dnl AC_SUBST(python_configdir)[]dnl *************** AC_DEFUN([PGAC_CHECK_PYTHON_EMBED_SETUP] *** 54,62 **** [AC_REQUIRE([_PGAC_CHECK_PYTHON_DIRS]) AC_MSG_CHECKING([how to link an embedded Python application]) ! python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR')))"` ! python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY')))"` ! python_so=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('SO')))"` ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"` if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}" --- 54,62 ---- [AC_REQUIRE([_PGAC_CHECK_PYTHON_DIRS]) AC_MSG_CHECKING([how to link an embedded Python application]) ! python_libdir=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"` ! python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"` ! python_so=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"` ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"` if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}" *************** else *** 70,76 **** python_libspec="-L${python_libdir} -lpython${python_version}" fi ! python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print string.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS')))"` AC_MSG_RESULT([${python_libspec} ${python_additional_libs}]) --- 70,76 ---- python_libspec="-L${python_libdir} -lpython${python_version}" fi ! python_additional_libs=`${PYTHON} -c "import distutils.sysconfig,string; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','LOCALMODLIBS','BASEMODLIBS'))))"` AC_MSG_RESULT([${python_libspec} ${python_additional_libs}]) *************** AC_SUBST(python_additional_libs)[]dnl *** 80,86 **** # threaded python is not supported on bsd's AC_MSG_CHECKING(whether Python is compiled with thread support) ! pythreads=`${PYTHON} -c "import sys; print int('thread' in sys.builtin_module_names)"` if test "$pythreads" = "1"; then AC_MSG_RESULT(yes) case $host_os in --- 80,86 ---- # threaded python is not supported on bsd's AC_MSG_CHECKING(whether Python is compiled with thread support) ! pythreads=`${PYTHON} -c "import sys; print(int('thread' in sys.builtin_module_names))"` if test "$pythreads" = "1"; then AC_MSG_RESULT(yes) case $host_os in