aboutsummaryrefslogtreecommitdiff
path: root/Makefile.PL
diff options
context:
space:
mode:
authormertz2003-09-22 10:01:03 +0000
committermertz2003-09-22 10:01:03 +0000
commit6085b4be38ba9f29abb4b519c2ca3b11e385f6af (patch)
treea29a28ff9f8ea88621c9f1c12d1b64a8ffb6c244 /Makefile.PL
parent8daa27ba4d05254cbe23563c5675e91f2e45bae7 (diff)
downloadtkzinc-6085b4be38ba9f29abb4b519c2ca3b11e385f6af.zip
tkzinc-6085b4be38ba9f29abb4b519c2ca3b11e385f6af.tar.gz
tkzinc-6085b4be38ba9f29abb4b519c2ca3b11e385f6af.tar.bz2
tkzinc-6085b4be38ba9f29abb4b519c2ca3b11e385f6af.tar.xz
tclConfigs.sh and tkConfigs.sh are not needed for Tk::Zinc,
but they are currently required by the configure scriot. So we points to fake scripts created for CPAN delivery only
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";