0.6.12.7.flaky1.2:
[sbcl.git] / tests / foreign.test.sh
index 69702f6..3fa04e8 100644 (file)
@@ -19,10 +19,11 @@ echo 'int summish(int x, int y) { return 1 + x + y; }' > $testfilestem.c
 make $testfilestem.o
 ld -shared -o $testfilestem.so $testfilestem.o
 
-sbcl --noinform --noprint --sysinit /dev/null --userinit /dev/null <<EOF
-  (load-foreign '("$testfilestem.so"))
-  (def-alien-routine summish int (x int) (y int))
-  (assert (= (summish 10 20) 31))
+${SBCL:-sbcl} <<EOF
+  (when (fboundp 'load-foreign) ; not necessarily supported on all OSes..
+    (load-foreign '("$testfilestem.so"))
+    (def-alien-routine summish int (x int) (y int))
+    (assert (= (summish 10 20) 31)))
   (sb-ext:quit :unix-status 52) ; success convention for Lisp program
 EOF
 if [ $? != 52 ]; then