;;;; g2.setup (define has-x11 (test-compile "int main(){ return 0; }" ldflags: "-L/usr/X11R6/lib -lX11")) (define has-gd (test-compile "int main(){ return 0; }" ldflags: "-lgd")) (define has-fig (test-compile "#include \nint main(){ return 0; }" ldflags: "-lg2")) (print "X11: " (if has-x11 "yes" "no")) (print "gd: " (if has-gd "yes" "no")) (print "FIG: " (if has-fig "yes" "no")) (run (csc g2.scm -J -s -O2 -d0 -lg2 -X easyffi ,@(if has-fig '(-feature have-fig) '()) ,@(if has-x11 '(-feature have-x11 -C -DHAVE_X11 -L -L/usr/X11R6/lib -lX11) '()) ,@(if has-gd '(-feature have-gd -C -DHAVE_GD -lgd) '()) ) ) (run (csc g2.import.scm -s -O2 -d0 -lg2 -X easyffi ,@(if has-fig '(-feature have-fig) '()) ,@(if has-x11 '(-feature have-x11 -C -DHAVE_X11 -L -L/usr/X11R6/lib -lX11) '()) ,@(if has-gd '(-feature have-gd -C -DHAVE_GD -lgd) '()) ) ) (install-extension 'g2 '("g2.so" "g2.import.so"))