[pygobject] aclocal: make local file discover by reading AC_CONFIG_MACRO_DIR work
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] aclocal: make local file discover by reading AC_CONFIG_MACRO_DIR work
- Date: Mon, 20 Mar 2017 15:50:01 +0000 (UTC)
commit bb5aa249f1ab6be81f88fdcfb56cee8b3ae2465d
Author: Christoph Reiter <creiter src gnome org>
Date: Tue Jan 24 21:17:07 2017 +0100
aclocal: make local file discover by reading AC_CONFIG_MACRO_DIR work
aclocal needs to know where the local macros are for including them and
for having a place to put the required system ones in.
Since 1.13 it can parse configure.ac and get the path from AC_CONFIG_MACRO_DIR.
This didn't work because for some reasons it complains if the local macros
start with "AM_" even if they are there (I guess it assumes they can't be local).
To work around that, change the AM prefix to PYG, bump the automake version so
we can asume aclocal finds it and remove the hardcoded paths from both
autogen.sh and Makefile.am.
https://bugzilla.gnome.org/show_bug.cgi?id=777713
Makefile.am | 2 --
autogen.sh | 2 +-
configure.ac | 12 +++++-------
m4/python.m4 | 12 ++++++------
4 files changed, 12 insertions(+), 16 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1664aa1..4c91362 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,3 @@
-ACLOCAL_AMFLAGS = -I m4
-
# Limit PyFlakes and PEP8 to these directories.
pycheck_dirs = examples gi tests pygtkcompat
diff --git a/autogen.sh b/autogen.sh
index 7c1aaa4..56b7d0a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -22,7 +22,7 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
echo "" >&2
fi
-aclocal -I m4 --install || exit 1
+aclocal --install || exit 1
autoreconf --verbose --force --install || exit 1
cd "$olddir"
diff --git a/configure.ac b/configure.ac
index db256a7..b9358ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,9 +44,7 @@ AC_SUBST(PYGOBJECT_MICRO_VERSION, pygobject_micro_version)
AC_CONFIG_HEADERS(config.h)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
-# 1.12.6 to get a py-compile supporting newer Python 3 versions.
-# See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8847
-AM_INIT_AUTOMAKE([1.12.6 foreign no-dist-gzip dist-xz])
+AM_INIT_AUTOMAKE([1.13 foreign no-dist-gzip dist-xz])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
@@ -116,9 +114,9 @@ fi
PYTHON_SO=`$PYTHON -c "import distutils.sysconfig, sys; get = distutils.sysconfig.get_config_var;
sys.stdout.write(get('EXT_SUFFIX') or get('SO') or '.so');"`
AC_SUBST(PYTHON_SO)
-AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
+PYG_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
if test "x$link_python_libs" = "xyes"; then
- AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows and Darwin require Python modules to
be explicitly linked to libpython.]))
+ PYG_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows and Darwin require Python modules to
be explicitly linked to libpython.]))
fi
AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
@@ -140,10 +138,10 @@ AC_ARG_ENABLE(thread,
AS_HELP_STRING([--disable-thread],[Disable pygobject threading support]),,
enable_thread=yes)
-AM_CHECK_PYMOD(thread,,,enable_thread=check_for_py3_module)
+PYG_CHECK_PYMOD(thread,,,enable_thread=check_for_py3_module)
if test "x$enable_thread" = xcheck_for_py3_module; then
dnl Python 3 uses the _thread module so check for that
- AM_CHECK_PYMOD(_thread,,enable_thread=yes,enable_thread=no)
+ PYG_CHECK_PYMOD(_thread,,enable_thread=yes,enable_thread=no)
fi
AC_MSG_CHECKING(whether to enable threading in pygobject)
diff --git a/m4/python.m4 b/m4/python.m4
index cf9d5b1..1275d7f 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -1,7 +1,7 @@
## this one is commonly used with AM_PATH_PYTHONDIR ...
-dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
+dnl PYG_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
dnl Check if a module containing a given symbol is visible to python.
-AC_DEFUN([AM_CHECK_PYMOD],
+AC_DEFUN([PYG_CHECK_PYMOD],
[AC_REQUIRE([AM_PATH_PYTHON])
py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
@@ -37,9 +37,9 @@ fi
])
dnl a macro to check for ability to create python extensions
-dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl PYG_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
dnl function also defines PYTHON_INCLUDES
-AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+AC_DEFUN([PYG_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for headers required to compile python extensions)
dnl deduce PYTHON_INCLUDES
@@ -65,9 +65,9 @@ CPPFLAGS="$save_CPPFLAGS"
])
dnl a macro to check for ability to embed python
-dnl AM_CHECK_PYTHON_LIBS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
+dnl PYG_CHECK_PYTHON_LIBS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
dnl function also defines PYTHON_LIBS
-AC_DEFUN([AM_CHECK_PYTHON_LIBS],
+AC_DEFUN([PYG_CHECK_PYTHON_LIBS],
[AC_REQUIRE([AM_PATH_PYTHON])
AC_MSG_CHECKING(for libraries required to embed python)
dnl deduce PYTHON_LIBS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]