# 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).

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.)

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,

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to