Tk

 view release on metacpan or  search on metacpan

myConfig  view on Meta::CPAN

# -*- cperl -*-
require 5.00404;
my $path = "$Config{'archlibexp'}/CORE/perl.h";
die "Cannot find '$path' have you installed $^X?\n" unless (-r $path);
print "$^X is installed in $Config{'archlibexp'} okay\n";
use Config;
use Cwd;
use Tk::MMtry;
warn "No VERSION" unless (defined $VERSION);

my %define = ();

$inc    = "";
$xlib   = "";
$define = '';
$gccopt = "";
@macro = ( macro => {} );
$is_maintainer = 0;
eval{
    $is_maintainer = (getpwuid($<))[6]
        =~ /(Nick\s+Ing-Simmons|Slaven\s+Rezic)/;
};
if (defined $Config{'gccversion'})
 {
  $ver = $Config{'gccversion'};
  if ($ver ge "2.8")
   {
    # retain author's favourite warnings if using gcc
    $gccopt .= " -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__";
    eval
     {
      if (0 && $is_maintainer)
       {
        # This is the author - catch as many bugs as possible
        # XXX libpng causes some warnings, so this is not enabled anymore
        $gccopt .= "  -MMD -Werror -Wno-format";
       }
     }
   }
 }

if ($] >= 5.005)
 {
  # Add PPM support stuff
  push(@macro,
       ABSTRACT => 'Tk - a Graphical User Interface Toolkit',
       AUTHOR   => 'nick@ing-simmons.net (Nick Ing-Simmons)'
      );
  my $arch = ($^O eq 'MSWin32') ? $ENV{'PROCESSOR_ARCHITECTURE'} : $Config{'archname'};
  my $binloc = "BINARY_LOCATION=$arch/Tk$VERSION-PPM.tar.gz";
  if (!grep { $binloc eq $_ } @ARGV)
   {
    push(@ARGV,$binloc);
   }
  warn "PPM for perl$]\n";
 }
else
 {
  warn "No PPM for perl$]\n";
 }

$macro[1]->{WINARCH} = $win_arch;

#
# Convert perls Config info into -DXXXX for Tk
#

$define{'USE_PROTOTYPE'} = 1     if ($Config{'prototype'});
$define{'HAVE_INTTYPES_H'} = 1   if ($Config{'i_inttypes'});
$define{'HAVE_UNISTD_H'} = 1     if ($Config{'i_unistd'});
$define{'HAVE_SYS_SELECT_H'} = 1 if ($Config{'i_sysselct'});
$define{'NO_STDLIB_H'} = 1       unless ($Config{'i_stdlib'});
if ($Config{'i_systime'})
 {
  $define{'HAVE_SYS_TIME_H'} = 1;
  if ($Config{'i_time'})
   {
    $define{'TIME_WITH_SYS_TIME'} = 1;
   }
 }



( run in 2.488 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )