aboutsummaryrefslogtreecommitdiff
path: root/Makefile.PL
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL31
1 files changed, 16 insertions, 15 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 6951853..7753b22 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,4 +1,5 @@
# this code has been developped by Somanos Sar from CENA
+# and modified par C.Mertz from CENA
# $Id$
use 5.00404;
@@ -15,12 +16,6 @@ BEGIN
my %opt = parse_opt();
-# tcl / tk libraries are not needed for perl!
-#my $tkConfig = $opt{'--tkConfig'};
-#my $tclConfig = $opt{'--tclConfig'};
-
-#$tkConfig = guess_libs('tkConfig.sh') if (!($tkConfig and -d $tkConfig));
-#$tclConfig = guess_libs('tclConfig.sh') if (!($tclConfig and -d $tclConfig));
print "Trying to find a libGL by myself (may be long)...\n";
my $gl_lib = guess_libs('libGL.so');
@@ -28,9 +23,9 @@ if ($gl_lib)
{
my $gl_lib_a = guess_libs('libGL.a');
if ($gl_lib_a) {
- warn ("you have both libGL.so [in $gl_lib] and libGL.a [in $gl_lib_a].
-Tk::Zinc may have trouble building a correct libTkzinc3.x.yy.so library.
-We suggest you to put the libGL.a aside ....")
+ warn ("### you have both libGL.so [in $gl_lib] and libGL.a [in $gl_lib_a].
+### Tk::Zinc may have trouble building a correct libTkzinc3.x.yy.so library.
+### We suggest you to put the libGL.a aside ....")
}
$gl_lib = 'yes';
}
@@ -40,11 +35,8 @@ else
}
# Directories
-my $prefix = $Config{'prefix'};
-
-# in fact for the CPAN, the default prefix is /usr/local
-#$prefix = '/usr/local';
-$prefix = $opt{'--prefix'} if ($opt{'--prefix'});
+my $prefix="";
+$prefix = "--prefix=" . $opt{'--prefix'} if ($opt{'--prefix'});
#############################################
@@ -89,11 +81,20 @@ sub parse_opt
#print "Installing in $prefix gl_lib=$gl_lib\n";
+my @withTclTk=();
+if (-f "fake_TCL_libs/tclConfig.sh" &&
+ -f "fake_TCL_libs/tkConfig.sh") {
+ @withTclTk = ("--with-tcl=fake_TCL_libs", "--with-tk=fake_TCL_libs");
+}
+else {
+ print "### configure will search tcl / tk configs in thje system\n";
+}
my @args = ("./configure",
"--enable-ptk=yes",
"--enable-gl=$gl_lib",
"--enable-shared=yes",
-# "--prefix=$prefix",
+ @withTclTk,
+ $prefix,
# INSTALL_PERL=\"yes\""
);
print "\nConfiguring with... ", join (' ', @args), "\n";