chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stephen C. Gilardi
Subject: Re: [Chicken-users] Mac OS X: chicken-setup's access to fink-installed libraries
Date: Thu, 11 Jan 2007 16:27:54 -0500


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]