Hi,

At Wed, 30 Oct 2002 04:21:08 +0900,
Raymond Blum wrote:
>   I have been debugging a problem trying to install strscan on MacOS
>   10.2 which is failing with the msg "can't find header files for
>   ruby".

It means you have not installed ruby development package (I
don't know what it is called in MacOS X).

> In the course of tracing through the problem I have become completely
> mystified by the mkmf.rb file.  When it calls Config, that loads up
> the CONFIG hash with reasonable keys such as "archdir" of which the
> values are [what looks like] shell vars (i.e. "$(libdir)/$(arch)"
>    (It looks like it is writing a shell script)

It comes from Makefile macro rather than shell.  $() is command
substitution in POSIX shells.

> The problem appears to be that the values for vars (such as archdir)
> contain these unresolved variables ("$(arch)" for example) as opposed
> to the path which has been assigned to $arch.

$(arch) will be expanded to CONFIG["arch"] recursively.  You
can examine how CONFIG["archdir"] will be expanded to:

  $ ruby -rmkmf -e 'p Config::CONFIG["archdir"]'

>   2-  Is there a good explanation for how mkmf works? (i.e. the above)

AFAIK, just an explanation to *use* mkmf in README.EXT.

-- 
Nobu Nakada