@@ -1726,10 +1726,9 @@ Optional Packages:
1726
1726
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1727
1727
--with-freeze-module=Programs/_freeze_module
1728
1728
path to _freeze_module binary for cross compiling
1729
- (default: self-hosted Programs/_freeze_module
1730
- binary)
1731
- --with-build-python path to build python binary for cross compiling
1732
- (default: self-hosted ./python binary)
1729
+ --with-build-python=python3.11
1730
+ path to build python binary for cross compiling
1731
+ (default: python3.11)
1733
1732
--with-pkg-config=[yes|no|check]
1734
1733
use pkg-config to detect build options (default is
1735
1734
check)
@@ -3195,13 +3194,16 @@ fi
3195
3194
rm -f pybuilddir.txt
3196
3195
3197
3196
3198
- # Check whether --with-freeze_module was given.
3197
+ # Check whether --with-freeze-module was given.
3199
3198
if test "${with_freeze_module+set}" = set; then :
3200
3199
withval=$with_freeze_module;
3201
3200
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-freeze-module" >&5
3202
3201
$as_echo_n "checking for --with-freeze-module... " >&6; }
3203
- if test "$with_freeze_module" = yes -o "$with_freeze_module" = no; then
3204
- as_fn_error $? "invalid --with-freeze-module option: expect path, not \"$with_freeze_module\"" "$LINENO" 5
3202
+ if test "x$cross_compiling" = xno; then :
3203
+ as_fn_error $? "--with-freeze-module only applies to cross compiling" "$LINENO" 5
3204
+ fi
3205
+ if test "$with_freeze_module" = yes -o "$with_freeze_module" = no; then
3206
+ as_fn_error $? "invalid --with-freeze-module option: expected path, not \"$with_freeze_module\"" "$LINENO" 5
3205
3207
fi
3206
3208
if ! $(command -v "$with_freeze_module" >/dev/null 2>&1); then
3207
3209
as_fn_error $? "invalid or missing freeze module binary \"$with_freeze_module\"" "$LINENO" 5
@@ -3229,20 +3231,28 @@ if test "${with_build_python+set}" = set; then :
3229
3231
withval=$with_build_python;
3230
3232
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-build-python" >&5
3231
3233
$as_echo_n "checking for --with-build-python... " >&6; }
3232
- if test "$with_build_python" = yes -o "$with_build_python" = no; then
3233
- as_fn_error $? "invalid --with-freeze-module option: expect path, not \"$with_build_python\"" "$LINENO" 5
3234
- fi
3234
+
3235
+ if test "x$cross_compiling" = xno; then :
3236
+ as_fn_error $? "--with-build-python only applies to cross compiling" "$LINENO" 5
3237
+ fi
3238
+ if test "x$with_build_python" = xyes; then :
3239
+ with_build_python=python$PACKAGE_VERSION
3240
+ fi
3241
+ if test "x$with_build_python" = xno; then :
3242
+ as_fn_error $? "invalid --with-build-python option: expected path, not \"no\"" "$LINENO" 5
3243
+ fi
3244
+
3235
3245
if ! $(command -v "$with_build_python" >/dev/null 2>&1); then
3236
- as_fn_error $? "invalid or missing build Python binary \"$with_build_python\"" "$LINENO" 5
3246
+ as_fn_error $? "invalid or missing build python binary \"$with_build_python\"" "$LINENO" 5
3237
3247
fi
3238
3248
build_python_ver=$($with_build_python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
3239
3249
if test "$build_python_ver" != "$PACKAGE_VERSION"; then
3240
3250
as_fn_error $? "\"$with_build_python\" has incompatible version $build_python_ver (expected: $PACKAGE_VERSION)" "$LINENO" 5
3241
3251
fi
3242
3252
ac_cv_prog_PYTHON_FOR_REGEN=$with_build_python
3243
3253
PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$with_build_python
3244
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_BUILD " >&5
3245
- $as_echo "$PYTHON_FOR_BUILD " >&6; }
3254
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_build_python " >&5
3255
+ $as_echo "$with_build_python " >&6; }
3246
3256
3247
3257
else
3248
3258
0 commit comments