Re: [Chicken-users] Mac OS X: chicken-setup's access to fink-installed libraries

2007-01-12 Thread felix winkelmann

On 1/11/07, Stephen C. Gilardi [EMAIL PROTECTED] wrote:


It would be nice if options like that that I'll nearly always want to
specify could be provided via an environment variable rather than
always typed.

Feature request:

- chicken automatically includes options specified in the
environment variable CHICKEN_OPTIONS.  Can we extend that mechanism
to csc csi and chicken-setup?  Environment variable names that
follow the pattern would be CSC_OPTIONS CSI_OPTIONS and
CHICKEN_SETUP_OPTIONS.

In this case, I would specify CSC_OPTIONS.


CSI_OPTIONS is already available, and CHICKEN_SETUP_OPTIONS
has been added recently (available in the darcs repository and the
current development snapshot). I'll add CSC_OPTIONS, though.
Thanks for the suggestion.


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Mac OS X: chicken-setup's access to fink-installed libraries

2007-01-12 Thread Zbigniew

Stephen,

I haven't tried this in a few months, but last time I checked, chicken
will use any options you provided at ./configure time.  So for example
you could probably say

./configure CFLAGS=-O2 -L/sw/lib -I/sw/include

and the options should be used automatically in the future.  Some
people have other ways of passing arguments to configure (there was a
discussion about it on the list) but for me that way always works.
This assumes you -always- want /sw to be looked at, which may be a
problem if you also install stuff in /usr/local/lib occasionally.

Otherwise I have been using the -c option to chicken-setup as you have found.

On 1/11/07, Stephen C. Gilardi [EMAIL PROTECTED] wrote:


I found an option to chicken-setup itself: -csc-option (abbreviated
-c).  It works:

# chicken-setup -c -I/sw/include -L/sw/lib numbers
   gunzip -c ../numbers.egg | tar xf -
   /usr/local/bin/csc -feature compiling-extension -I/sw/include -L/
sw/lib -s -O2 -d1 numbers-base.scm -lgmp -X easyffi
Warning: invalid compiler option `-I/sw/include' - ignored
Warning: invalid compiler option `-L/sw/lib' - ignored
   rm -fr /usr/local/lib/chicken/1/numbers-base.so
   cp -r numbers-base.so /usr/local/lib/chicken/1/numbers-base.so
   cp -r numbers.scm /usr/local/lib/chicken/1/numbers.scm
   cp -r numbers.html /usr/local/lib/chicken/1/numbers.html

* The following documentation files have been installed in /usr/local/
lib/chicken/1/index.html:
   * numbers.html

   rm -fr numbers.egg-dir

It would be nice if options like that that I'll nearly always want to
specify could be provided via an environment variable rather than
always typed.




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Mac OS X: chicken-setup's access to fink-installed libraries

2007-01-11 Thread Stephen C. Gilardi
I use Fink (http://fink.sourceforge.net) to access ports of many  
packages to Mac OS X.  Fink stores the software it installs in the / 
sw tree (/sw/include, /sw/lib, etc).


Currently it appears that chicken-2.5 (in particular chicken-setup)  
doesn't know about /sw as a hierarchy (fair enough) and also  
doesn't provide a way for me to configure additional search paths so  
I can tell it  (could be better).


It would be great if:

sudo chicken-setup numbers

worked on a Mac when the gmp library is installed via fink at /sw/ 
lib.  Instead it gives compilation errors related to not being able  
to find gmp.h:


% sudo chicken-setup numbers
Password:

The extension numbers does not exist.
Do you want to download it ? (yes/no/abort) [yes]
downloading catalog ...
downloading catalog from www.call-with-current-continuation.org ...
downloading numbers.egg from (www.call-with-current-continuation.org  
eggs 80)

  gunzip -c ../numbers.egg | tar xf -
  /usr/local/bin/csc -feature compiling-extension -s -O2 -d1 numbers- 
base.scm -lgmp -X easyffi

In file included from numbers-base.c:18:
numbers-c.c:4:17: error: gmp.h: No such file or directory
[...]

% locate gmp.h
[...]
/sw/include/gmp.h

%

Questions:

[1] Is there a way to configure chicken to provide additional library  
search paths (and include file search paths)?


[2] Alternatively, can chicken be made to know that on Mac OS X  
(Darwin), if /sw exists, it's a place to find libraries and include  
files?


Thanks,

--Steve



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Mac OS X: chicken-setup's access to fink-installed libraries

2007-01-11 Thread Peter Bex
On Thu, Jan 11, 2007 at 01:20:50PM -0500, Stephen C. Gilardi wrote:
 Questions:
 
 [1] Is there a way to configure chicken to provide additional library  
 search paths (and include file search paths)?

 [2] Alternatively, can chicken be made to know that on Mac OS X  
 (Darwin), if /sw exists, it's a place to find libraries and include  
 files?

This wouldn't be a good move.  People use Fink, pkgsrc and Darwinports
as packaging system under OS X.  You can never be sure what to use.
Also, many people install some software under /usr/local and some
distros and application even insist on installing stuff under /opt or
other weird paths.

I've occasionaly had library path problems too, but these were most
often because of Linuxisms rather than path issues.  If you install
Chicken from pkgsrc, it adds /usr/pkg/lib to its search path because
the Chicken support libraries are there too.  I assume this works the
same with Fink.

If you can't do that, you can still export CHICKEN_OPTIONS into the
environment.  This variable should contain additional flags that
should be passed to the Chicken compiler.  You could add the necessary
include and library paths there.

Peter
-- 
http://sjamaan.ath.cx
--
The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music.
-- Donald Knuth


pgpGnybwZW5T4.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Mac OS X: chicken-setup's access to fink-installed libraries

2007-01-11 Thread Peter Bex
On Thu, Jan 11, 2007 at 03:14:08PM -0500, Stephen C. Gilardi wrote:
 Thanks for the info.  It appears that csc offers the options I need  
 -I/sw/include -L/sw/lib, but chicken (according to The User  
 Manual and chicken -help) doesn't.  When I include these in  
 CHICKEN_OPTIONS, chicken complains that they are unrecognized.  I  
 tried setting CSC_OPTIONS, but it didn't have any effect.
 
 Where can I specify these options so that they work with chicken-setup?

Hmm, you're right, it doesn't appear to be possible to pass options to csc
itself, only to chicken.  chicken only compiles to C.  Otoh, csc first
calls chicken on an scm to get a C file, then calls a C compiler on the
output to generate a binary.  So chicken can't do it.  I'm not sure how you
can instruct csc to accept extra options for the C compiler.

Maybe someone else on the list knows.

Regards,
Peter
-- 
http://sjamaan.ath.cx
--
The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music.
-- Donald Knuth


pgpxMzE6exWeE.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Mac OS X: chicken-setup's access to fink-installed libraries

2007-01-11 Thread Stephen C. Gilardi


On Jan 11, 2007, at 3:39 PM, Peter Bex wrote:


On Thu, Jan 11, 2007 at 03:14:08PM -0500, Stephen C. Gilardi wrote:

Thanks for the info.  It appears that csc offers the options I need
-I/sw/include -L/sw/lib, but chicken (according to The User
Manual and chicken -help) doesn't.  When I include these in
CHICKEN_OPTIONS, chicken complains that they are unrecognized.  I
tried setting CSC_OPTIONS, but it didn't have any effect.

Where can I specify these options so that they work with chicken- 
setup?


Hmm, you're right, it doesn't appear to be possible to pass options  
to csc

itself, only to chicken.  chicken only compiles to C.  Otoh, csc first
calls chicken on an scm to get a C file, then calls a C compiler on  
the
output to generate a binary.  So chicken can't do it.  I'm not sure  
how you

can instruct csc to accept extra options for the C compiler.

Maybe someone else on the list knows.


I found an option to chicken-setup itself: -csc-option (abbreviated  
-c).  It works:


# chicken-setup -c -I/sw/include -L/sw/lib numbers
  gunzip -c ../numbers.egg | tar xf -
  /usr/local/bin/csc -feature compiling-extension -I/sw/include -L/ 
sw/lib -s -O2 -d1 numbers-base.scm -lgmp -X easyffi

Warning: invalid compiler option `-I/sw/include' - ignored
Warning: invalid compiler option `-L/sw/lib' - ignored
  rm -fr /usr/local/lib/chicken/1/numbers-base.so
  cp -r numbers-base.so /usr/local/lib/chicken/1/numbers-base.so
  cp -r numbers.scm /usr/local/lib/chicken/1/numbers.scm
  cp -r numbers.html /usr/local/lib/chicken/1/numbers.html

* The following documentation files have been installed in /usr/local/ 
lib/chicken/1/index.html:

  * numbers.html

  rm -fr numbers.egg-dir

It would be nice if options like that that I'll nearly always want to  
specify could be provided via an environment variable rather than  
always typed.


Feature request:

	- chicken automatically includes options specified in the  
environment variable CHICKEN_OPTIONS.  Can we extend that mechanism  
to csc csi and chicken-setup?  Environment variable names that  
follow the pattern would be CSC_OPTIONS CSI_OPTIONS and  
CHICKEN_SETUP_OPTIONS.


In this case, I would specify CSC_OPTIONS.

Thanks,

--Steve



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users