unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@giblet.glug.org>
Subject: Re: 1.6.0 problems with libguilereadline-v-12 and fix
Date: Fri, 20 Sep 2002 13:42:06 -0700	[thread overview]
Message-ID: <E17sUbF-0007rQ-00@giblet> (raw)
In-Reply-To: <rmiit10euk9.fsf@fnord.ir.bbn.com> (message from Greg Troxel on 20 Sep 2002 08:04:22 -0400)

   From: Greg Troxel <gdt@ir.bbn.com>
   Date: 20 Sep 2002 08:04:22 -0400

   Your point about apps needing to link with the srfi libs is one I had
   not considered.  If they link at compile time, then one either has
   them in a default path, uses LD_LIBRARY_PATH, or uses -rpath/-R  (or
   loses).  This is exactly the situation for libguile today.

another option is to provide "guile-config link-internal".  e.g.:

  $ guile-config link
  -L/home/ttn/local/lib -lguile -lltdl -lm

  $ guile-config link-internal
  guileqthreads
  guilereadline
  guilesrfi_13_14
  guilesrfi_4

  $ guile-config link-internal guilesrfi_13_14
  -L/home/ttn/local/lib/guile/1.4.1.89/modules -lguilesrfi_13_14

this way, the large majority of people who don't care about these
internal libraries can remain blissfully unaware of them, but yet the
necessary info is available to those who have the need.  their makefiles
would look like:

  LIBS = `guile-config link` `guile-config link-internal guilesrfi_13_14`

problem solved, everybody's happy.  in fact, i like this idea so much,
see below for a diff against scripts/guile-config that implements this
in cvs (will appear in 1.4.1.90).

thi


_________________________________________________
Index: guile-config
===================================================================
RCS file: /home/ttn/cvs/guile-core/scripts/guile-config,v
retrieving revision 1.4
diff -w -c -b -c -r1.4 guile-config
*** guile-config	1 Sep 2002 10:18:26 -0000	1.4
--- guile-config	20 Sep 2002 20:33:07 -0000
***************
*** 56,61 ****
--- 56,67 ----
  ;;   Print the linker command-line flags necessary to link against
  ;;   libguile, and any other libraries it requires.
  ;;
+ ;; * Usage: guile-config link-internal [LIB ...]
+ ;;
+ ;;   If LIB is given, print the linker command-line flags necessary
+ ;;   to link against internal libraries LIB ..., otherwise, print a list
+ ;;   of the internal libraries.
+ ;;
  ;; * Usage: guile-config compile
  ;;
  ;;   Print C compiler flags for compiling code that uses Guile.
***************
*** 99,105 ****
  
  (define *this-module* (current-module))
  
! (define *commands* '(link compile info re-prefix-info scmconfig acsubst))
  
  (define *me* "guile-config")
  
--- 105,117 ----
  
  (define *this-module* (current-module))
  
! (define *commands* '(link
!                      link-internal
!                      compile
!                      info
!                      re-prefix-info
!                      scmconfig
!                      acsubst))
  
  (define *me* "guile-config")
  
***************
*** 183,188 ****
--- 195,212 ----
              (else
               (cons (car libs) (loop (cdr libs))))))))
    (newline))
+ 
+ \f
+ ;;; the "link-internal" subcommand
+ 
+ (define (COMMAND:link-internal args)
+   (let ((m (format #f "~A/~A/modules" (GBI 'pkglibdir) (GBI 'guileversion))))
+     (if (null? args)
+         (system (format #f "cd ~A && ls *.la | sed 's/^lib//;s/.la$//'" m))
+         (begin
+           (format #t "-L~A" m)
+           (for-each (lambda (lib) (format #t " -l~A" lib)) args)
+           (format #t "\n")))))
  
  \f
  ;;; the "compile" subcommand


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  parent reply	other threads:[~2002-09-20 20:42 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-18 20:33 1.6.0 problems with libguilereadline-v-12 and fix Greg Troxel
2002-09-18 21:14 ` Marius Vollmer
2002-09-18 21:53   ` Paul Jarc
2002-09-18 22:40     ` Rob Browning
2002-09-18 22:43       ` Paul Jarc
2002-09-19  3:22         ` Rob Browning
2002-09-19  4:13           ` Robert Uhl <ruhl@4dv.net>
2002-09-19 10:03           ` rm
2002-09-19 15:02             ` Rob Browning
2002-09-19 15:18               ` Paul Jarc
2002-09-19 15:27               ` rm
2002-09-19 18:29                 ` Rob Browning
2002-10-03 16:03                 ` Marius Vollmer
2002-10-03 15:56             ` Marius Vollmer
2002-10-03 17:22               ` Paul Jarc
2002-10-04 11:58                 ` Marius Vollmer
2002-10-03 19:19               ` tomas
2002-10-04 12:04                 ` Marius Vollmer
2002-10-04 13:04                   ` rm
2002-10-08 21:16                     ` Marius Vollmer
2002-10-08 21:54                       ` Dale P. Smith
2002-10-09  6:47                       ` tomas
2002-09-19 10:11           ` rm
2002-09-19 15:10           ` Paul Jarc
2002-09-19 21:21           ` Neil Jerram
2002-09-19 22:06             ` Rob Browning
2002-09-19 22:17               ` Paul Jarc
2002-09-19 23:13                 ` Rob Browning
2002-09-19  4:02         ` Thien-Thi Nguyen
2002-09-19 16:17           ` Paul Jarc
2002-09-19 18:52             ` Thien-Thi Nguyen
2002-09-19 19:33               ` Paul Jarc
2002-09-19 19:58                 ` Thien-Thi Nguyen
2002-09-19 22:17                   ` Thien-Thi Nguyen
2002-09-20  1:28                     ` Thien-Thi Nguyen
2002-09-20 15:45                       ` Paul Jarc
2002-10-03 15:38     ` Marius Vollmer
2002-10-04 16:43       ` Paul Jarc
2002-10-08 21:26         ` Marius Vollmer
2002-10-08 21:38           ` Paul Jarc
2002-10-08 22:47             ` Marius Vollmer
2002-10-09  4:34               ` Paul Jarc
2002-10-09  6:51               ` tomas
2002-09-19 13:17   ` Arno Peters
2002-09-19 14:07     ` Rob Browning
2002-10-03 16:06     ` Marius Vollmer
2002-10-03 19:44       ` Rob Browning
2002-09-19 13:43   ` Greg Troxel
2002-09-19 14:53     ` Rob Browning
2002-09-19 15:57       ` Paul Jarc
2002-09-19 18:47         ` Rob Browning
2002-09-19 19:32           ` Paul Jarc
2002-09-19 21:07             ` Rob Browning
2002-09-20 11:47       ` Greg Troxel
2002-09-20 12:04       ` Greg Troxel
2002-09-20 15:23         ` Rob Browning
2002-09-20 22:47           ` Paul Jarc
2002-09-21  3:00             ` Rob Browning
2002-09-21 15:46             ` Robert Uhl <ruhl@4dv.net>
2002-09-21 21:45               ` Paul Jarc
2002-09-23  4:35                 ` Robert Uhl <ruhl@4dv.net>
2002-09-23 15:47                   ` Paul Jarc
2002-09-23 19:20                     ` Robert Uhl <ruhl@4dv.net>
2002-09-23 20:06                       ` Paul Jarc
2002-09-23 21:29                         ` Eric E Moore
2002-09-23 21:37                           ` Paul Jarc
2002-09-20 17:59         ` Rob Browning
2002-09-20 21:32           ` Paul Jarc
2002-09-20 20:27         ` Paul Jarc
2002-09-20 20:42         ` Thien-Thi Nguyen [this message]
2002-09-20 21:16           ` Paul Jarc
2002-09-20 21:43             ` Paul Jarc
2002-09-21  1:56             ` Thien-Thi Nguyen
2002-09-21 21:51               ` Paul Jarc
2002-09-25  6:09                 ` Thien-Thi Nguyen
2002-09-22 18:52         ` Gary Houston
2002-09-23  1:50           ` Rob Browning
2002-10-03 16:33           ` Marius Vollmer
2002-10-03 17:51         ` Marius Vollmer
2002-10-03 17:37     ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E17sUbF-0007rQ-00@giblet \
    --to=ttn@giblet.glug.org \
    --cc=ttn@glug.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).