On Thu, Feb 28, 2008 at 9:26 AM, via RT Andy Dougherty
<[EMAIL PROTECTED]> wrote:
> # New Ticket Created by  Andy Dougherty
>  # Please include the string:  [perl #51232]
>  # in the subject line of all future correspondence about this issue.
>  # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=51232 >
>
>
>  I applaud the addition of gettext() to parrot, but I worry that the way it
>  has been added to Configure.pl is heading down a path that is neither
>  efficient nor maintainable.  To be specific:
>
>  1.  I don't think adding things like -DHAS_GETTEXT to ccflags is the
>  right way to go in the long run.  Once parrot gets a few hundred of those
>  -DHAS_FOO flags, it'll undoubtedly run into some overly-long command
>  line problems.  (To give a sense of scale, perl 5's Configure has 430
>  d_foo variables.)
>
>  Also, subsequent users of parrot's configuration information (e.g. tools
>  that extend or embed parrot) will have to search through ccflags to look
>  for that flag, rather than consulting an entry in Parrot::Config.
>
>  Instead, such information ought to be encoded in Parrot::Config (or some
>  similar file) and automatically propagated by the build system to
>  <parrot/config.h> (or some similar file).
>
agreed. i stole the wrong code (auto::gdbm) to base this config step
on. -D flags aren't the proper way forward... it's been kicking around
in my head for the past few days.

although i didn't make any comment to the list as i committed the
code, i did so to test detection on other platforms, and as a way to
get feedback. thanks for the feedback--i'm glad it fits with what i'm
thinking.

i'm hoping to get to the meat of internationalization soon, but i'll
address the config issue first, so it doesn't get forgotten.

>  2.  It shouldn't have been that complicated to add the gettext()
>  detection. Currently, config/auto/gettext.pm is 119 lines long.  The
>  more-or-less equivalent command in perl5's Configure would be a mere 3
>  lines:
>
>         # See if gettext is available
>         set gettext d_gettext
>         eval $inlibc
>
>  (To give a sense of scale, perl 5's Configure has 268 such calls.  Parrot
>  currently has fewer than 10.  I don't think adding over 250 more
>  slightly-modified copies of config/auto/gettext.pm is a good plan.)
>
agreed. it's my feeling that parrot relies so heavily on perl's
config, we haven't needed such a succinct syntax to create config
probes. however, it is increasingly likely that parrot's config will
grow as we approach a 1.0 release, so a better probe creation tool is
increasingly necessary.

i'm not familiar with perl 5 config internals, and so was entirely
unaware of this prior art.

>  It should have been that easy here.  It should have been as simple as
>  calling a single function, something perhaps vaguely like
>
>     $d_gettext = has_function(name => "gettext",
>                             libs => "-lintl",
>                             ctest => "config/auto/functions/gettext.in");
>
>  I made a small initial start to move in that direction with this patch
>  over 4 years ago:
>
>   http://www.nntp.perl.org/group/perl.perl6.internals/2004/02/msg21568.html
>
>  but it was rejected without explanation.  Shortly after, there was a
>  nice somewhat relevant thread,
>
>  "Configure.pl and the history of the world"
>     http://www.nntp.perl.org/group/perl.perl6.internals/2004/03/msg22180.html
>
>  Anyway, no immediate action is required, but I thought it might be
>  useful to record somewhere my sense of where things ought to be headed.
>
>  Thanks for listening,
>
i'm reviewing these (ancient) threads now, thanks for posting them.

i wonder what we can steal from perl's config system in order to
improve parrot's config system, and break away from our heavy
dependence on perl. if there's anybody with interest and relevant
experience, i'd love to hear thoughts, musings, suggestions, et
cetera.
~jerry

Reply via email to