24
24
$gccopt .= " -Wall -Wno-implicit-int -Wno-comment -Wno-unused -D__USE_FIXED_PROTOTYPES__";
27
if ((getpwuid($<))[6] =~ /Nick\s+Ing-Simmons/)
27
if ((getpwuid($<))[6] =~ /(Nick\s+Ing-Simmons|XXXSlaven\s+Rezic)/)
29
29
# This is the author - catch as many bugs as possible
30
# libpng causes some warnings, so this is not enabled for me - srt
30
31
$gccopt .= " -MMD -Werror -Wno-format";
31
# @macro = ( macro => { INSTALLDIRS => 'perl' });
42
42
AUTHOR => 'nick@ing-simmons.net (Nick Ing-Simmons)'
44
44
my $arch = ($^O eq 'MSWin32') ? $ENV{'PROCESSOR_ARCHITECTURE'} : $Config{'archname'};
45
push(@ARGV,"BINARY_LOCATION=$arch/Tk$VERSION-PPM.tar.gz");
45
my $binloc = "BINARY_LOCATION=$arch/Tk$VERSION-PPM.tar.gz";
46
if (!grep { $binloc eq $_ } @ARGV)
46
50
warn "PPM for perl$]\n";
92
96
$define{'NOVOID'} = 1 if (($voidflags & $voidused) != $voidused);
93
97
$define{'NOCONST'} = 1 unless ($Config{'d_const'});
95
if (try_compile("config/signedchar.c"))
97
$define{'ANSI_SIGNED_CHAR'} = 1;
101
if (try_run("config/unsigned.c"))
103
$define{'CHAR_UNSIGNED'} = 1;
107
if (!try_compile("config/Ksprintf.c") &&
108
try_compile("-DSPRINTF_RETURN_CHAR config/Ksprintf.c"))
110
$define{'SPRINTF_RETURN_CHAR'} = 1;
115
if (!try_compile("config/tod.c"))
119
foreach $d (qw(TZ NO_TZ DOTS))
121
if (try_compile("-DTIMEOFDAY_$d config/tod.c"))
123
$def = "TIMEOFDAY_$d";
124
print STDERR "$d gettimeofday()\n";
134
print STDERR "Problem gettimeofday()\n";
139
print STDERR "Generic gettimeofday()\n";
144
100
# Hunt down X Library - first a function
202
158
if ($arg =~ /^(X11\w*|XFT)=(.*)$/)
161
# Pushing these args to @ARGV will generate MakeMaker warnings
162
# ("... is not a known MakeMaker parameter name") but
163
# will asure that the parameters are reused when automatically
164
# re-building Makefiles.
166
elsif ($arg eq 'VERBOSE=1')
168
$Tk::MMtry::VERBOSE = 1;
208
172
$MakefileName = $1 if ($arg =~ /^MAKEFILE=(.*)$/);
178
# Now we have possibly $Tk::MMtry::VERBOSE set, we can
179
# use the try_compile stuff
180
if (try_compile("config/perlrx.c", ["-I$Config{'archlibexp'}/CORE"]))
182
$define{'USE_NEWSTYLE_REGEXP_STRUCT'} = 1;
185
if (try_compile("config/pmop.c", ["-I$Config{'archlibexp'}/CORE"]))
187
$define{'HAS_PMOP_EXTRA_FLAGS'} = 1;
190
if (try_compile("config/pregcomp2.c", ["-I$Config{'archlibexp'}/CORE"], undef, ["-c"]))
192
$define{'USE_PREGCOMP_31027'} = 1; # pregcomp after perl change 31027
195
if (try_compile("config/signedchar.c"))
197
$define{'ANSI_SIGNED_CHAR'} = 1;
201
if (try_run("config/unsigned.c"))
203
$define{'CHAR_UNSIGNED'} = 1;
207
if (!try_compile("config/Ksprintf.c") &&
208
try_compile("-DSPRINTF_RETURN_CHAR config/Ksprintf.c"))
210
$define{'SPRINTF_RETURN_CHAR'} = 1;
215
if (!try_compile("config/tod.c"))
219
foreach $d (qw(TZ NO_TZ DOTS))
221
if (try_compile("-DTIMEOFDAY_$d config/tod.c"))
223
$def = "TIMEOFDAY_$d";
224
print STDERR "$d gettimeofday()\n";
234
print STDERR "Problem gettimeofday()\n";
239
print STDERR "Generic gettimeofday()\n";
214
243
$win_arch or die '$win_arch not set in myConfig';
216
245
if ($win_arch eq 'x') {
322
# Prefer 64bit libraries on certain architectures
324
unless (defined $xlib and $Config{'archname'} =~ m/x86_64/)
326
$xlib = &lX11(0, chooseX11(</usr/X11*/lib64>));
293
330
# If no luck there try "common" places
295
332
unless (defined $xlib)
345
382
# Found basic X libraries now see if we can find -lXft
347
my $ftinc = Ift("/usr/include","/usr/local/include");
384
my $ftinc = Ift("/usr/include","/usr/local/include",$X11INC||());
350
387
print "xlib='$xlib' xinc='$xinc'\n";
351
if (try_run("config/xft.c",[$xinc,$ftinc],[$xlib,'-lXft','-lfontconfig']))
389
# Including ft2build.h additionally seems to be necessary
390
# on an old RedHat 8.0 system
391
for my $def ([], ["-DNEED_FT2BUILD_H"])
354
warn "Seem to have -lXft\n";
355
$define{USE_XFT_FONTS} = 1;
357
$xtra = ' -lfontconfig';
393
if (try_run("config/xft.c",[$xinc,$ftinc],[$xlib,'-lXft','-lfontconfig'],$def))
396
warn "Seem to have -lXft\n";
397
$define{USE_XFT_FONTS} = 1;
399
$xtra = ' -lfontconfig';
361
warn "Xft and/or fontconfig libraries and/or includes are missing\n";
414
warn "Xft and/or fontconfig libraries and/or includes are missing" .
415
(!$Tk::MMtry::VERBOSE ? ",\ntry perl Makefile.PL VERBOSE=1 for more information" : "") .
429
484
if (!defined($MakefileName) || $MakefileName eq 'Makefile')
431
my $config = "package Tk::Config;\nrequire Exporter;\nuse base qw(Exporter);\n";
486
my $config = "# DO NOT EDIT. CREATED AUTOMATICALLY BY myConfig\npackage Tk::Config;\nrequire Exporter;\nuse base qw(Exporter);\n";
434
489
foreach $sym (qw(VERSION inc define xlib xinc gccopt win_arch))