From 6085b4be38ba9f29abb4b519c2ca3b11e385f6af Mon Sep 17 00:00:00 2001 From: mertz Date: Mon, 22 Sep 2003 10:01:03 +0000 Subject: 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 --- Makefile.PL | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'Makefile.PL') 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"; -- cgit v1.1