(use files) (define libcrypt-presence-checker #< int main (void) { return crypt("foo", "bar") != NULL; } EOF ) (delete-file* "crypt-features") (cond ((try-compile libcrypt-presence-checker ldflags: "-lcrypt") (compile -L -lcrypt detect-native-crypt-features.scm) (run (./detect-native-crypt-features)) (let* ((features (with-input-from-file "crypt-features" read)) (flags (cons '-feature (intersperse features '-feature)))) (compile -s -O2 crypt.scm -L -lcrypt ,@flags -j crypt))) (else (print "NOTE: Your system does not have a native crypt() at all.") (print "All hashing implementations will be provided by the egg.") (compile -s -O2 crypt.scm -j crypt))) (compile -s -O2 crypt.import.scm) (install-extension 'crypt '("crypt.so" "crypt.import.so") `((version 0.1)))