Fix Edwin to recognize the x11-screen option during testing.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sun, 16 Sep 2018 22:12:04 +0000 (15:12 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sun, 16 Sep 2018 22:12:04 +0000 (15:12 -0700)
src/edwin/xterm.scm
src/x11-screen/x11-screen-check.sh

index fc741bc6fee15a503a3e2d83c5f0fbc78f67686c..731155fa7513b4e8fd32a03b631e705db9ecd799 100644 (file)
@@ -38,9 +38,14 @@ USA.
      (and (let ((display (get-environment-variable "DISPLAY")))
            (and (string? display)
                 (not (string-null? display))))
-         (let ((dirpath (system-library-directory-pathname "x11-screen/")))
-           (and dirpath
-                (file-directory? dirpath)))))
+         (or (let ((dirpath (system-library-directory-pathname "x11-screen/")))
+               (and dirpath
+                    (file-directory? dirpath)))
+             ;; The subsystem is on the library path (not in a subdirectory on
+             ;; the path) when testing.
+             (let ((filepath (system-library-pathname "x11-screen.bin" #f)))
+               (and filepath
+                    (file-loadable? filepath))))))
    (named-lambda (make-x11-screen #!optional geometry)
      (load-option-quietly 'x11-screen)
      (make-xterm-screen geometry))
index 00ec66b919bf8d2552223d48393327ef5efacb93..1fcd946f4ea05aacd776f9e467a93e624048d9db 100755 (executable)
@@ -11,7 +11,6 @@ ${MIT_SCHEME_EXE} --prepend-library . <<\EOF
            (string-null? display)))
       (warn "DISPLAY not set")
       (let ((edwin (->environment '(edwin))))
-       (load-option 'X11-SCREEN)
        (set! (access os/init-file-name edwin)
              (let ((pathname (merge-pathnames "x11-screen-test.scm")))
                (named-lambda (os/init-file-name/x11-screen-test)