aboutsummaryrefslogtreecommitdiff
path: root/Perl
diff options
context:
space:
mode:
Diffstat (limited to 'Perl')
-rw-r--r--Perl/Makefile.PL10
1 files changed, 10 insertions, 0 deletions
diff --git a/Perl/Makefile.PL b/Perl/Makefile.PL
index a2e46df..d3125f4 100644
--- a/Perl/Makefile.PL
+++ b/Perl/Makefile.PL
@@ -81,6 +81,7 @@ WriteMakefile(
'NAME' => 'Tk::Zinc',
'PREREQ_PM' => $WIN ? {Tk => 8.004} : {Tk => 8.0},
'LIBS' => $NeededLibs,
+ 'OPTIMIZE' => &optimize,
'DEFINE' => &get_flags,
'INC' => $INC,
'C' => [@C],
@@ -91,6 +92,15 @@ WriteMakefile(
'LDFROM' => "\$(O_FILES) $ZincObj",
);
+sub optimize {
+ foreach my $arg (@ARGV) {
+ if ($arg =~ /(enable-symbols)/i) {
+ return "-g";
+ }
+ }
+ return "-O";
+}
+
sub get_flags {
my %DEF_FLAGS = ('GL' => 1,
'SHAPE' => 1,