Skip to content

Commit 0cd1ee4

Browse files
BoulangerAnthonyLeonardoGracio
Boulanger
authored andcommitted
Regenerate config files and adapt them to python3.11
eng/ide/gnatstudio#192 (cherry picked from commit 8f9196f)
1 parent c9d7de6 commit 0cd1ee4

File tree

3 files changed

+2327
-1708
lines changed

3 files changed

+2327
-1708
lines changed

aclocal.m4

+207-86
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
1+
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
22

3-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
3+
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
44

55
# This file is free software; the Free Software Foundation
66
# gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,7 @@
1212
# PARTICULAR PURPOSE.
1313

1414
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15-
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
15+
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1616
#
1717
# This file is free software; the Free Software Foundation
1818
# gives unlimited permission to copy and/or distribute it,
@@ -47,6 +47,7 @@ AC_DEFUN([AM_PATH_PYTHON],
4747
dnl supported. (2.0 was released on October 16, 2000).
4848
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
4949
[python python2 python3 dnl
50+
python3.11 python3.10 dnl
5051
python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 dnl
5152
python3.2 python3.1 python3.0 dnl
5253
python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 dnl
@@ -91,34 +92,141 @@ AC_DEFUN([AM_PATH_PYTHON],
9192
])
9293
9394
if test "$PYTHON" = :; then
94-
dnl Run any user-specified action, or abort.
95+
dnl Run any user-specified action, or abort.
9596
m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
9697
else
9798
98-
dnl Query Python for its version number. Getting [:3] seems to be
99-
dnl the best way to do this; it's what "site.py" does in the standard
100-
dnl library.
101-
99+
dnl Query Python for its version number. Although site.py simply uses
100+
dnl sys.version[:3], printing that failed with Python 3.10, since the
101+
dnl trailing zero was eliminated. So now we output just the major
102+
dnl and minor version numbers, as numbers. Apparently the tertiary
103+
dnl version is not of interest.
104+
dnl
102105
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
103-
[am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
106+
[am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[[:2]])"`])
104107
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
105108
106-
dnl Use the values of $prefix and $exec_prefix for the corresponding
107-
dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
108-
dnl distinct variables so they can be overridden if need be. However,
109-
dnl general consensus is that you shouldn't need this ability.
110-
111-
AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
112-
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
113-
114-
dnl At times (like when building shared libraries) you may want
109+
dnl At times, e.g., when building shared libraries, you may want
115110
dnl to know which OS platform Python thinks this is.
116-
111+
dnl
117112
AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
118113
[am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
119114
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
120115
121-
# Just factor out some code duplication.
116+
dnl emacs-page
117+
dnl If --with-python-sys-prefix is given, use the values of sys.prefix
118+
dnl and sys.exec_prefix for the corresponding values of PYTHON_PREFIX
119+
dnl and PYTHON_EXEC_PREFIX. Otherwise, use the GNU ${prefix} and
120+
dnl ${exec_prefix} variables.
121+
dnl
122+
dnl The two are made distinct variables so they can be overridden if
123+
dnl need be, although general consensus is that you shouldn't need
124+
dnl this separation.
125+
dnl
126+
dnl Also allow directly setting the prefixes via configure options,
127+
dnl overriding any default.
128+
dnl
129+
if test "x$prefix" = xNONE; then
130+
am__usable_prefix=$ac_default_prefix
131+
else
132+
am__usable_prefix=$prefix
133+
fi
134+
135+
# Allow user to request using sys.* values from Python,
136+
# instead of the GNU $prefix values.
137+
AC_ARG_WITH([python-sys-prefix],
138+
[AS_HELP_STRING([--with-python-sys-prefix],
139+
[use Python's sys.prefix and sys.exec_prefix values])],
140+
[am_use_python_sys=:],
141+
[am_use_python_sys=false])
142+
143+
# Allow user to override whatever the default Python prefix is.
144+
AC_ARG_WITH([python_prefix],
145+
[AS_HELP_STRING([--with-python_prefix],
146+
[override the default PYTHON_PREFIX])],
147+
[am_python_prefix_subst=$withval
148+
am_cv_python_prefix=$withval
149+
AC_MSG_CHECKING([for explicit $am_display_PYTHON prefix])
150+
AC_MSG_RESULT([$am_cv_python_prefix])],
151+
[
152+
if $am_use_python_sys; then
153+
# using python sys.prefix value, not GNU
154+
AC_CACHE_CHECK([for python default $am_display_PYTHON prefix],
155+
[am_cv_python_prefix],
156+
[am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`])
157+
158+
dnl If sys.prefix is a subdir of $prefix, replace the literal value of
159+
dnl $prefix with a variable reference so it can be overridden.
160+
case $am_cv_python_prefix in
161+
$am__usable_prefix*)
162+
am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'`
163+
am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"`
164+
;;
165+
*)
166+
am_python_prefix_subst=$am_cv_python_prefix
167+
;;
168+
esac
169+
else # using GNU prefix value, not python sys.prefix
170+
am_python_prefix_subst='${prefix}'
171+
am_python_prefix=$am_python_prefix_subst
172+
AC_MSG_CHECKING([for GNU default $am_display_PYTHON prefix])
173+
AC_MSG_RESULT([$am_python_prefix])
174+
fi])
175+
# Substituting python_prefix_subst value.
176+
AC_SUBST([PYTHON_PREFIX], [$am_python_prefix_subst])
177+
178+
# emacs-page Now do it all over again for Python exec_prefix, but with yet
179+
# another conditional: fall back to regular prefix if that was specified.
180+
AC_ARG_WITH([python_exec_prefix],
181+
[AS_HELP_STRING([--with-python_exec_prefix],
182+
[override the default PYTHON_EXEC_PREFIX])],
183+
[am_python_exec_prefix_subst=$withval
184+
am_cv_python_exec_prefix=$withval
185+
AC_MSG_CHECKING([for explicit $am_display_PYTHON exec_prefix])
186+
AC_MSG_RESULT([$am_cv_python_exec_prefix])],
187+
[
188+
# no explicit --with-python_exec_prefix, but if
189+
# --with-python_prefix was given, use its value for python_exec_prefix too.
190+
AS_IF([test -n "$with_python_prefix"],
191+
[am_python_exec_prefix_subst=$with_python_prefix
192+
am_cv_python_exec_prefix=$with_python_prefix
193+
AC_MSG_CHECKING([for python_prefix-given $am_display_PYTHON exec_prefix])
194+
AC_MSG_RESULT([$am_cv_python_exec_prefix])],
195+
[
196+
# Set am__usable_exec_prefix whether using GNU or Python values,
197+
# since we use that variable for pyexecdir.
198+
if test "x$exec_prefix" = xNONE; then
199+
am__usable_exec_prefix=$am__usable_prefix
200+
else
201+
am__usable_exec_prefix=$exec_prefix
202+
fi
203+
#
204+
if $am_use_python_sys; then # using python sys.exec_prefix, not GNU
205+
AC_CACHE_CHECK([for python default $am_display_PYTHON exec_prefix],
206+
[am_cv_python_exec_prefix],
207+
[am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`])
208+
dnl If sys.exec_prefix is a subdir of $exec_prefix, replace the
209+
dnl literal value of $exec_prefix with a variable reference so it can
210+
dnl be overridden.
211+
case $am_cv_python_exec_prefix in
212+
$am__usable_exec_prefix*)
213+
am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'`
214+
am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"`
215+
;;
216+
*)
217+
am_python_exec_prefix_subst=$am_cv_python_exec_prefix
218+
;;
219+
esac
220+
else # using GNU $exec_prefix, not python sys.exec_prefix
221+
am_python_exec_prefix_subst='${exec_prefix}'
222+
am_python_exec_prefix=$am_python_exec_prefix_subst
223+
AC_MSG_CHECKING([for GNU default $am_display_PYTHON exec_prefix])
224+
AC_MSG_RESULT([$am_python_exec_prefix])
225+
fi])])
226+
# Substituting python_exec_prefix_subst.
227+
AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst])
228+
229+
# Factor out some code duplication into this shell variable.
122230
am_python_setup_sysconfig="\
123231
import sys
124232
# Prefer sysconfig over distutils.sysconfig, for better compatibility
@@ -138,96 +246,109 @@ try:
138246
except ImportError:
139247
pass"
140248
141-
dnl Set up 4 directories:
249+
dnl emacs-page Set up 4 directories:
142250
143-
dnl pythondir -- where to install python scripts. This is the
144-
dnl site-packages directory, not the python standard library
145-
dnl directory like in previous automake betas. This behavior
146-
dnl is more consistent with lispdir.m4 for example.
251+
dnl 1. pythondir: where to install python scripts. This is the
252+
dnl site-packages directory, not the python standard library
253+
dnl directory like in previous automake betas. This behavior
254+
dnl is more consistent with lispdir.m4 for example.
147255
dnl Query distutils for this directory.
148-
AC_CACHE_CHECK([for $am_display_PYTHON script directory],
149-
[am_cv_python_pythondir],
150-
[if test "x$prefix" = xNONE
151-
then
152-
am_py_prefix=$ac_default_prefix
153-
else
154-
am_py_prefix=$prefix
155-
fi
156-
am_cv_python_pythondir=`$PYTHON -c "
256+
dnl
257+
AC_CACHE_CHECK([for $am_display_PYTHON script directory (pythondir)],
258+
[am_cv_python_pythondir],
259+
[if test "x$am_cv_python_prefix" = x; then
260+
am_py_prefix=$am__usable_prefix
261+
else
262+
am_py_prefix=$am_cv_python_prefix
263+
fi
264+
am_cv_python_pythondir=`$PYTHON -c "
157265
$am_python_setup_sysconfig
158266
if can_use_sysconfig:
159-
sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
267+
if hasattr(sysconfig, 'get_default_scheme'):
268+
scheme = sysconfig.get_default_scheme()
269+
else:
270+
scheme = sysconfig._get_default_scheme()
271+
if scheme == 'posix_local':
272+
# Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
273+
scheme = 'posix_prefix'
274+
sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'})
160275
else:
161-
from distutils import sysconfig
162-
sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
276+
from distutils import sysconfig
277+
sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
163278
sys.stdout.write(sitedir)"`
164-
case $am_cv_python_pythondir in
165-
$am_py_prefix*)
166-
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
167-
am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
168-
;;
169-
*)
170-
case $am_py_prefix in
171-
/usr|/System*) ;;
172-
*)
173-
am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
174-
;;
175-
esac
176-
;;
279+
#
280+
case $am_cv_python_pythondir in
281+
$am_py_prefix*)
282+
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
283+
am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
284+
;;
285+
*)
286+
case $am_py_prefix in
287+
/usr|/System*) ;;
288+
*) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
289+
;;
177290
esac
178-
])
291+
;;
292+
esac
293+
])
179294
AC_SUBST([pythondir], [$am_cv_python_pythondir])
180295
181-
dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
182-
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
183-
dnl more consistent with the rest of automake.
184-
296+
dnl 2. pkgpythondir: $PACKAGE directory under pythondir. Was
297+
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
298+
dnl more consistent with the rest of automake.
299+
dnl
185300
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
186301
187-
dnl pyexecdir -- directory for installing python extension modules
188-
dnl (shared libraries)
302+
dnl 3. pyexecdir: directory for installing python extension modules
303+
dnl (shared libraries).
189304
dnl Query distutils for this directory.
190-
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
191-
[am_cv_python_pyexecdir],
192-
[if test "x$exec_prefix" = xNONE
193-
then
194-
am_py_exec_prefix=$am_py_prefix
195-
else
196-
am_py_exec_prefix=$exec_prefix
197-
fi
198-
am_cv_python_pyexecdir=`$PYTHON -c "
305+
dnl
306+
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory (pyexecdir)],
307+
[am_cv_python_pyexecdir],
308+
[if test "x$am_cv_python_exec_prefix" = x; then
309+
am_py_exec_prefix=$am__usable_exec_prefix
310+
else
311+
am_py_exec_prefix=$am_cv_python_exec_prefix
312+
fi
313+
am_cv_python_pyexecdir=`$PYTHON -c "
199314
$am_python_setup_sysconfig
200315
if can_use_sysconfig:
201-
sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
316+
if hasattr(sysconfig, 'get_default_scheme'):
317+
scheme = sysconfig.get_default_scheme()
318+
else:
319+
scheme = sysconfig._get_default_scheme()
320+
if scheme == 'posix_local':
321+
# Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
322+
scheme = 'posix_prefix'
323+
sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'})
202324
else:
203-
from distutils import sysconfig
204-
sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
325+
from distutils import sysconfig
326+
sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
205327
sys.stdout.write(sitedir)"`
206-
case $am_cv_python_pyexecdir in
207-
$am_py_exec_prefix*)
208-
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
209-
am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
210-
;;
211-
*)
212-
case $am_py_exec_prefix in
213-
/usr|/System*) ;;
214-
*)
215-
am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
216-
;;
217-
esac
218-
;;
328+
#
329+
case $am_cv_python_pyexecdir in
330+
$am_py_exec_prefix*)
331+
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
332+
am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"`
333+
;;
334+
*)
335+
case $am_py_exec_prefix in
336+
/usr|/System*) ;;
337+
*) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
338+
;;
219339
esac
220-
])
340+
;;
341+
esac
342+
])
221343
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
222344
223-
dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
224-
345+
dnl 4. pkgpyexecdir: $(pyexecdir)/$(PACKAGE)
346+
dnl
225347
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
226348
227349
dnl Run any user-specified action.
228350
$2
229351
fi
230-
231352
])
232353

233354

0 commit comments

Comments
 (0)