From 652d7a3d677a7cfa5322e1d093dfae86285828ca Mon Sep 17 00:00:00 2001
From: Chris Hanson <org/chris-hanson/cph>
Date: Fri, 28 Feb 1992 23:06:16 +0000
Subject: [PATCH] Handle case where "options" directory is missing.

---
 v7/src/runtime/option.scm | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/v7/src/runtime/option.scm b/v7/src/runtime/option.scm
index d1ad4d7f8..cdd44237c 100644
--- a/v7/src/runtime/option.scm
+++ b/v7/src/runtime/option.scm
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/option.scm,v 14.12 1991/11/04 20:29:31 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/option.scm,v 14.13 1992/02/28 23:06:16 cph Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-92 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -39,7 +39,7 @@ MIT in each case. |#
 
 (define (load-option name)
   (let ((entry (assq name options))
-	(directory (system-library-directory-pathname "options")))
+	(directory (library-directory-pathname "options")))
     (if (not entry)
 	(error "Unknown option name" name))
     (if (not (memq name loaded-options))
@@ -59,6 +59,16 @@ MIT in each case. |#
 	  (set! loaded-options (cons name loaded-options))))
     name))
 
+(define (library-directory-pathname name)
+  (or (system-library-directory-pathname name)
+      (library-directory-pathname
+       (error:file-operation name
+			     "find"
+			     "directory"
+			     "no such directory in system library path"
+			     library-directory-pathname
+			     (list name)))))
+
 (define options
   '((ARITHMETIC-INTERFACE ((RUNTIME NUMBER INTERFACE) #F "numint"))
     (FORMAT ((RUNTIME FORMAT) (INITIALIZE-PACKAGE!) "format"))
-- 
2.25.1