Commit | Line | Data |
---|---|---|
0d07716f | 1 | (defun configure-cflags (config-program) |
2 | (let ((process | |
3 | (run-program | |
4 | config-program '("--cflags") :wait t :output :stream))) | |
5 | (unless process | |
6 | (error "Unable to run %A" config-program)) | |
7 | (labels ((split (string) | |
8 | (let ((position (position #\sp string))) | |
9 | (if position | |
10 | (cons | |
11 | (subseq string 0 position) | |
12 | (split (subseq string (1+ position)))) | |
13 | (list string))))) | |
14 | (prog1 | |
15 | (split (read-line (process-output process))) | |
16 | (process-close process))))) |