David Cantrell wrote: > David Golden wrote: >> use Config; >> if ( $Config{cc} =~ /gcc/ ) { ... } > Not sure that'll always work - what if cc is a link to gcc?
Here we go ... $ ls -l `which cc gcc` ... /usr/bin/cc -> /etc/alternatives/cc ... /usr/bin/gcc -> gcc-3.3 $ ls -l /etc/alternatives/cc ... /etc/alternatives/cc -> /usr/bin/gcc So on this machine, cc is (after a maze of twisty symlinks) a link to gcc. Let's build perl with cc: $ sh Configure -Dcc=cc -de && make ... $ ./perl -Ilib -MConfig -e 'print $Config{gccversion}' 3.3.5 (Debian 1:3.3.5-13) $ ./perl -Ilib -MConfig -e 'print $Config{cc}' cc Oh noes! -- David Cantrell | Cake Smuggler Extraordinaire If I could read only one thing it would be the future, in the entrails of the bastard denying me access to anything else.