Skip to content

Commit 3ad727d

Browse files
committed
Fix dev/ptmx test for cross-compile.
1 parent 3c224ba commit 3ad727d

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

Tools/configure/conf_filesystem.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,17 @@ def check_device_files(v):
5656
v.ac_cv_file__dev_ptc = False
5757
else:
5858
if v.cross_compiling:
59-
if not v.ac_cv_file__dev_ptmx:
59+
# autoconf uses ${ac_cv_file__dev_ptmx+set} — test whether the
60+
# variable has been provided at all (via CONFIG_SITE), not
61+
# whether its value is truthy.
62+
if not v.is_set("ac_cv_file__dev_ptmx"):
6063
pyconf.checking("for /dev/ptmx")
6164
pyconf.result("not set")
6265
pyconf.error(
6366
"set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE "
6467
"file when cross compiling"
6568
)
66-
if not v.ac_cv_file__dev_ptc:
69+
if not v.is_set("ac_cv_file__dev_ptc"):
6770
pyconf.checking("for /dev/ptc")
6871
pyconf.result("not set")
6972
pyconf.error(

configure-new

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3804,12 +3804,12 @@ function u_check_device_files() {
38043804
V["ac_cv_file__dev_ptc"] = "no"
38053805
} else {
38063806
if (((V["cross_compiling"] != "") && (V["cross_compiling"] != "no"))) {
3807-
if ((!((V["ac_cv_file__dev_ptmx"] != "") && (V["ac_cv_file__dev_ptmx"] != "no")))) {
3807+
if ((!("ac_cv_file__dev_ptmx" in V))) {
38083808
pyconf_checking("for /dev/ptmx")
38093809
pyconf_result("not set")
38103810
pyconf_error("set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling")
38113811
}
3812-
if ((!((V["ac_cv_file__dev_ptc"] != "") && (V["ac_cv_file__dev_ptc"] != "no")))) {
3812+
if ((!("ac_cv_file__dev_ptc" in V))) {
38133813
pyconf_checking("for /dev/ptc")
38143814
pyconf_result("not set")
38153815
pyconf_error("set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling")

0 commit comments

Comments
 (0)