From 562b76ee086a40b111111feeb894e679f9ee25be Mon Sep 17 00:00:00 2001 From: lecoanet Date: Sun, 5 Oct 2003 15:27:44 +0000 Subject: No shape extension on Windows for now. Reformatting. --- Perl/Makefile.PL | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'Perl/Makefile.PL') diff --git a/Perl/Makefile.PL b/Perl/Makefile.PL index 699b594..18fc3a5 100644 --- a/Perl/Makefile.PL +++ b/Perl/Makefile.PL @@ -23,6 +23,10 @@ if (!$TkLibDir) print "Configuring version $VERSION for $platform platform...\n"; print "Using $TkLibDir as Tk library...\n"; +# +# Humm! inclusion of Zinc.c here is needed to include Zinc.o in the link but it create +# a circular dependancy in the generated Makefile. Another solution ? +# my @GENERIC_C = ('Track.c', 'Tabular.c', 'Reticle.c', 'Map.c', 'Rectangle.c', 'Arc.c', 'Curve.c', 'Item.c', 'PostScript.c', 'MapInfo.c', 'Attrs.c', 'Draw.c', 'Geo.c', 'List.c', 'perfos.c', 'Transfo.c', 'Group.c', 'Icon.c', 'Text.c', 'Image.c', 'Color.c', @@ -37,10 +41,11 @@ my @WIN_C = ('WinPort.c'); my @C; +my $WIN = ($platform =~ /win/i); + push @C, @LIBTESS_C, @GENERIC_C ; -if ($platform =~ /win/i) -{ +if ($WIN) { push @C, @WIN_C; } @@ -62,49 +67,44 @@ WriteMakefile( 'LDFROM' => '$(O_FILES)', ); -sub get_flags -{ +sub get_flags { my %DEF_FLAGS = ('GL' => 1, 'SHAPE' => 1, 'GL_DAMAGE' => 1, 'OM' => 1 ); - foreach my $arg (@ARGV) - { + foreach my $arg (@ARGV) { print "$arg ....\n"; my ($name, $value) = split(/[=]+/, $arg); - if ($name =~ /(with-gl)/i) - { - if ($value =~ /no/i) - { + if ($name =~ /(with-gl)/i) { + if ($value =~ /no/i) { $DEF_FLAGS{'GL'} = 0; $DEF_FLAGS{'GL_DAMAGE'} = 0; } } - elsif ($name =~ /(with-om)/i) - { - if ($value =~ /no/i) - { + elsif ($name =~ /(with-om)/i) { + if ($value =~ /no/i) { $DEF_FLAGS{'OM'} = 0; } } - elsif ($name =~ /(with-shape)/i) - { - if ($value =~ /no/i) - { + elsif ($name =~ /(with-shape)/i) { + if ($value =~ /no/i) { $DEF_FLAGS{'SHAPE'} = 0; } } } + # + # No shape extension on Windows (planned later). + if ($WIN) { + $DEF_FLAGS{'SHAPE'} = 0; + } my $defines = '-DPTK'; print "Configuring with:\n "; - foreach my $flag (keys %DEF_FLAGS) - { - print "$flag=$DEF_FLAGS{$flag} "; - if ($DEF_FLAGS{$flag}) - { + foreach my $flag (keys %DEF_FLAGS) { + print "$flag=", $DEF_FLAGS{$flag} ? 'ok' : 'no', " "; + if ($DEF_FLAGS{$flag}) { $defines = $defines . " " . "-D$flag"; if ($flag eq 'OM') { push @C, @OM_C @@ -115,3 +115,7 @@ sub get_flags return $defines; } +# +# For the demo +# +# perl -Mblib demos/zinc-demos -- cgit v1.1