$OpenBSD: patch-configure_py,v 1.6 2021/03/17 08:21:55 sthen Exp $

Index: configure.py
--- configure.py.orig
+++ configure.py
@@ -2157,7 +2157,18 @@ def run_command(cmd, verbose):
     """ Run a command and display the output if requested.  cmd is the command
     to run.  verbose is set if the output is to be displayed.
     """
+    try:
+        localbase = os.environ["LOCALBASE"]
+    except KeyError:
+        localbase = "/usr/local"
+    try:
+        x11base = os.environ["X11BASE"]
+    except KeyError:
+        x11base = "/usr/X11R6"
 
+    cmd = cmd.replace("${LOCALBASE}", localbase).replace("$(LOCALBASE)", localbase)
+    cmd = cmd.replace("${X11BASE}", x11base).replace("$(X11BASE)", x11base)
+
     if verbose:
         sys.stdout.write(cmd + "\n")
 
@@ -2902,7 +2913,7 @@ Type 'no' to decline the terms of the license.
             sys.stdout.flush()
 
             try:
-                resp = sys.stdin.readline()
+                resp = "yes"
             except KeyboardInterrupt:
                 raise SystemExit
             except:
