davemds pushed a commit to branch master. http://git.enlightenment.org/enlightenment/modules/edgar.git/commit/?id=af2bd6a42f21e75bdbab6ba10cefacd68d81bce3
commit af2bd6a42f21e75bdbab6ba10cefacd68d81bce3 Author: davemds <[email protected]> Date: Thu Aug 28 23:35:26 2014 +0200 Use a more recent version of the python m4 macro --- configure.ac | 2 +- m4/ax_python_devel.m4 | 55 +++++++++++++++++++++++++-------------------------- src/Makefile.am | 4 ++-- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/configure.ac b/configure.ac index 8faea4d..1468eea 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,7 @@ PKG_CHECK_MODULES(EO, [eo]) # Check for python3 and required modules # PKG_CHECK_MODULES(PYTHON3, [python3 >= 3.2]) -AC_PYTHON_DEVEL([>= '3.2']) +AX_PYTHON_DEVEL([>= '3.2']) AC_SUBST([PYTHON]) AX_PYTHON3_MODULE(efl, "required") diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 index a62b860..59a2ff0 100644 --- a/m4/ax_python_devel.m4 +++ b/m4/ax_python_devel.m4 @@ -34,11 +34,12 @@ # LICENSE # # Copyright (c) 2009 Sebastian Huber <[email protected]> -# Copyright (c) 2009 Alan W. Irwin <[email protected]> +# Copyright (c) 2009 Alan W. Irwin # Copyright (c) 2009 Rafael Laboissiere <[email protected]> -# Copyright (c) 2009 Andrew Collier <[email protected]> +# Copyright (c) 2009 Andrew Collier # Copyright (c) 2009 Matteo Settenvini <[email protected]> # Copyright (c) 2009 Horst Knorr <[email protected]> +# Copyright (c) 2013 Daniel Mullner <[email protected]> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -66,7 +67,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 8 +#serial 17 AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) AC_DEFUN([AX_PYTHON_DEVEL],[ @@ -153,8 +154,14 @@ $ac_distutils_result]) if test -z "$PYTHON_CPPFLAGS"; then python_path=`$PYTHON -c "import distutils.sysconfig; \ print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` if test -n "${python_path}"; then - python_path="-I$python_path" + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi fi PYTHON_CPPFLAGS=$python_path fi @@ -173,11 +180,9 @@ $ac_distutils_result]) # join all versioning strings, on some systems # major/minor numbers could be in different list elements from distutils.sysconfig import * -ret = '' -for e in get_config_vars ('VERSION'): - if (e != None): - ret += e -print (ret) +e = get_config_var('VERSION') +if e is not None: + print(e) EOD` if test -z "$ac_python_version"; then @@ -198,33 +203,27 @@ EOD` # There should be only one import distutils.sysconfig -for e in distutils.sysconfig.get_config_vars ('LIBDIR'): - if e != None: - print (e) - break +e = distutils.sysconfig.get_config_var('LIBDIR') +if e is not None: + print (e) EOD` - # Before checking for libpythonX.Y, we need to know - # the extension the OS we're on uses for libraries - # (we take the first one, if there's more than one fix me!): - ac_python_soext=`$PYTHON -c \ - "import distutils.sysconfig; \ - print (distutils.sysconfig.get_config_vars('SO')[[0]])"` - # Now, for the library: - ac_python_soname=`$PYTHON -c \ - "import distutils.sysconfig; \ - print (distutils.sysconfig.get_config_vars('LDLIBRARY')[[0]])"` + ac_python_library=`cat<<EOD | $PYTHON - - # Strip away extension from the end to canonicalize its name: - ac_python_library=`echo "$ac_python_soname" | sed "s/${ac_python_soext}$//"` +import distutils.sysconfig +c = distutils.sysconfig.get_config_vars() +if 'LDVERSION' in c: + print ('python'+c[['LDVERSION']]) +else: + print ('python'+c[['VERSION']]) +EOD` # This small piece shamelessly adapted from PostgreSQL python macro; # credits goes to momjian, I think. I'd like to put the right name # in the credits, if someone can point me in the right direction... ? # - if test -n "$ac_python_libdir" -a -n "$ac_python_library" \ - -a x"$ac_python_library" != x"$ac_python_soname" + if test -n "$ac_python_libdir" -a -n "$ac_python_library" then # use the official shared library ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"` @@ -266,7 +265,7 @@ EOD` if test -z "$PYTHON_EXTRA_LIBS"; then PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ conf = distutils.sysconfig.get_config_var; \ - print (conf('LOCALMODLIBS') + ' ' + conf('LIBS'))"` + print (conf('LIBS') + ' ' + conf('SYSLIBS'))"` fi AC_MSG_RESULT([$PYTHON_EXTRA_LIBS]) AC_SUBST(PYTHON_EXTRA_LIBS) diff --git a/src/Makefile.am b/src/Makefile.am index c8b5177..1dc0fd7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,8 +13,8 @@ module_la_SOURCES = e_mod_main.h \ e_mod_edgar.h module_la_CPPFLAGS = -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -module_la_LIBADD = @EO_LIBS@ @E_LIBS@ @PYTHON_LDFLAGS@ @PYTHON_EXTRA_LIBS@ \ - @PYTHON_EXTRA_LDFLAGS@ +module_la_LIBADD = @EO_LIBS@ @E_LIBS@ @PYTHON_LDFLAGS@ \ + @PYTHON_EXTRA_LIBS@ @PYTHON_EXTRA_LDFLAGS@ module_la_LDFLAGS = -module -avoid-version module_la_DEPENDENCIES = $(top_builddir)/config.h --
