Skip to content

Commit cc367c4

Browse files
committed
Update aclocal.m4
1 parent 97d3fb3 commit cc367c4

File tree

1 file changed

+47
-16
lines changed

1 file changed

+47
-16
lines changed

Diff for: aclocal.m4

+47-16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
1+
# generated automatically by aclocal 1.15 -*- Autoconf -*-
22

33
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
44

@@ -11,20 +11,21 @@
1111
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1212
# PARTICULAR PURPOSE.
1313

14+
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
1415
# nls.m4 serial 5 (gettext-0.18)
15-
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
16+
dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
1617
dnl Inc.
1718
dnl This file is free software; the Free Software Foundation
1819
dnl gives unlimited permission to copy and/or distribute it,
1920
dnl with or without modifications, as long as this notice is preserved.
2021
dnl
21-
dnl This file can can be used in projects which are not available under
22+
dnl This file can be used in projects which are not available under
2223
dnl the GNU General Public License or the GNU Library General Public
2324
dnl License but which still want to provide support for the GNU gettext
2425
dnl functionality.
2526
dnl Please note that the actual code of the GNU gettext library is covered
2627
dnl by the GNU Library General Public License, and the rest of the GNU
27-
dnl gettext package package is covered by the GNU General Public License.
28+
dnl gettext package is covered by the GNU General Public License.
2829
dnl They are *not* in the public domain.
2930

3031
dnl Authors:
@@ -44,14 +45,12 @@ AC_DEFUN([AM_NLS],
4445
AC_SUBST([USE_NLS])
4546
])
4647

47-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009,
48-
# 2011 Free Software Foundation, Inc.
48+
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
4949
#
5050
# This file is free software; the Free Software Foundation
5151
# gives unlimited permission to copy and/or distribute it,
5252
# with or without modifications, as long as this notice is preserved.
5353

54-
# serial 2
5554

5655
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
5756
# ---------------------------------------------------------------------------
@@ -80,7 +79,7 @@ AC_DEFUN([AM_PATH_PYTHON],
8079
dnl Find a Python interpreter. Python versions prior to 2.0 are not
8180
dnl supported. (2.0 was released on October 16, 2000).
8281
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
83-
[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
82+
[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
8483
python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
8584
8685
AC_ARG_VAR([PYTHON], [the Python interpreter])
@@ -96,10 +95,11 @@ AC_DEFUN([AM_PATH_PYTHON],
9695
dnl A version check is needed.
9796
if test -n "$PYTHON"; then
9897
# If the user set $PYTHON, use it and don't search something else.
99-
AC_MSG_CHECKING([whether $PYTHON version >= $1])
98+
AC_MSG_CHECKING([whether $PYTHON version is >= $1])
10099
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
101-
[AC_MSG_RESULT(yes)],
102-
[AC_MSG_ERROR(too old)])
100+
[AC_MSG_RESULT([yes])],
101+
[AC_MSG_RESULT([no])
102+
AC_MSG_ERROR([Python interpreter is too old])])
103103
am_display_PYTHON=$PYTHON
104104
else
105105
# Otherwise, try each interpreter until we find one that satisfies
@@ -148,6 +148,25 @@ AC_DEFUN([AM_PATH_PYTHON],
148148
[am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
149149
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
150150
151+
# Just factor out some code duplication.
152+
am_python_setup_sysconfig="\
153+
import sys
154+
# Prefer sysconfig over distutils.sysconfig, for better compatibility
155+
# with python 3.x. See automake bug#10227.
156+
try:
157+
import sysconfig
158+
except ImportError:
159+
can_use_sysconfig = 0
160+
else:
161+
can_use_sysconfig = 1
162+
# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
163+
# <https://github.com/pypa/virtualenv/issues/118>
164+
try:
165+
from platform import python_implementation
166+
if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
167+
can_use_sysconfig = 0
168+
except ImportError:
169+
pass"
151170
152171
dnl Set up 4 directories:
153172
@@ -164,7 +183,14 @@ AC_DEFUN([AM_PATH_PYTHON],
164183
else
165184
am_py_prefix=$prefix
166185
fi
167-
am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
186+
am_cv_python_pythondir=`$PYTHON -c "
187+
$am_python_setup_sysconfig
188+
if can_use_sysconfig:
189+
sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
190+
else:
191+
from distutils import sysconfig
192+
sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
193+
sys.stdout.write(sitedir)"`
168194
case $am_cv_python_pythondir in
169195
$am_py_prefix*)
170196
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
@@ -199,7 +225,14 @@ AC_DEFUN([AM_PATH_PYTHON],
199225
else
200226
am_py_exec_prefix=$exec_prefix
201227
fi
202-
am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
228+
am_cv_python_pyexecdir=`$PYTHON -c "
229+
$am_python_setup_sysconfig
230+
if can_use_sysconfig:
231+
sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
232+
else:
233+
from distutils import sysconfig
234+
sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
235+
sys.stdout.write(sitedir)"`
203236
case $am_cv_python_pyexecdir in
204237
$am_py_exec_prefix*)
205238
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
@@ -247,14 +280,12 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
247280
sys.exit(sys.hexversion < minverhex)"
248281
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
249282

250-
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
283+
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
251284
#
252285
# This file is free software; the Free Software Foundation
253286
# gives unlimited permission to copy and/or distribute it,
254287
# with or without modifications, as long as this notice is preserved.
255288

256-
# serial 1
257-
258289
# AM_RUN_LOG(COMMAND)
259290
# -------------------
260291
# Run COMMAND, save the exit status in ac_status, and log it.

0 commit comments

Comments
 (0)