;;;; guile-config --- utility for linking programs with Guile
;;;; Jim Blandy <jim@red-bean.com> --- September 1997
;;;;
-;;;; Copyright (C) 1998, 2001, 2004 Free Software Foundation, Inc.
+;;;; Copyright (C) 1998, 2001, 2004, 2005 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
;; do something more dynamic (i.e. what do we need.
;; Display the flags, separated by spaces.
- (display-separated (list (get-build-info 'CFLAGS) ""))
- (if (or (string=? libdir "/usr/lib")
- (string=? libdir "/usr/lib/"))
- (display-separated (cons "-lguile -lguile-ltdl" other-flags))
- (display-separated (cons
- (string-append "-L" (get-build-info 'libdir))
- (cons "-lguile -lguile-ltdl" other-flags))))
+ (display (string-join
+ (list
+ (get-build-info 'CFLAGS)
+ "-lguile -lltdl"
+ (if (string=? libdir "/usr/lib/")
+ ""
+ (string-append "-L" (get-build-info 'libdir)))
+ (string-join other-flags)
+
+ )))
(newline)))
+
(define (help-link)
(let ((dle display-line-error))
(dle "Usage: " program-name " link")
;; See gcc manual wrt fixincludes. Search for "Use of
;; `-I/usr/include' may cause trouble." For now we hard-code this.
;; Later maybe we can do something more dynamic.
- (if (not (string=? (get-build-info 'includedir) "/usr/include"))
- (display-separated (list "-I" (get-build-info 'includedir) "")))
- (display-line (get-build-info 'CFLAGS)))
+ (display
+ (string-append
+ (if (not (string=? (get-build-info 'includedir) "/usr/include"))
+ (string-append "-I" (get-build-info 'includedir) " ")
+ " ")
+
+ (get-build-info 'CFLAGS)
+ "\n"
+ )))
(define (help-compile)
(let ((dle display-line-error))
args)
(newline port))
-(define (display-separated args)
- (if (not (null? args))
- (begin
- (display (car args))
- (for-each
- (lambda (arg) (display " ") (display arg))
- (cdr args)))))
-
\f
;;;; the command table