Google Groups Home
Help | Sign in
Message from discussion Detecting C compiler in Makefile.PL
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Jens Thoms Toerring  
View profile
 More options May 12, 5:27 pm
Newsgroups: comp.lang.perl.misc
From: j...@toerring.de (Jens Thoms Toerring)
Date: 12 May 2008 21:27:57 GMT
Local: Mon, May 12 2008 5:27 pm
Subject: Detecting C compiler in Makefile.PL
Hello,

   a CPAN module of mine that needs a C compiler for installation
fails in some of the tests since the C compiler isn't found. The
offending lines are

if ( system $Config{cc}, qw( -o cc_test cc_test.c ) ) {
    unlink 'cc_test.c';
    die "Can't run C compiler '$Config{cc}'\n";

}

where 'cc_test.c' is a simple program that gets created
automatically just for this test.

The problem is that on one of the testers machines $Config{cc}
is set to 'ccache cc' and system() obviously does not like the
space in the name of the program it's supposed to execute.

Now I probably can get around that by using a line like

if ( system split /\s+/, $Config{cc}, qw( -o cc_test cc_test.c ) ) {

or something similar but it looks ugly and I suspect that there
is a better method to invoke the correct C compiler. Does anybody
have an idea?
                         Thanks and regards, Jens
--
  \   Jens Thoms Toerring  ___      j...@toerring.de
   \__________________________      http://toerring.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google