diff -ruN DBD-Sybase-1.07.orig/Makefile.PL DBD-Sybase-1.07/Makefile.PL --- DBD-Sybase-1.07.orig/Makefile.PL 2007-01-12 12:13:02 +1000 +++ DBD-Sybase-1.07/Makefile.PL 2007-01-12 12:17:30 +1000 @@ -29,9 +29,9 @@ configPwd(); my $lddlflags = $Config{lddlflags}; -$lddlflags = "-L$SYBASE/lib $lddlflags" unless $^O eq 'VMS'; +$lddlflags = "-L$SYBASE/lib64 $lddlflags" unless $^O eq 'VMS'; my $ldflags = $Config{ldflags}; -$ldflags = "-L$SYBASE/lib $ldflags" unless $^O eq 'VMS'; +$ldflags = "-L$SYBASE/lib64 $ldflags" unless $^O eq 'VMS'; WriteMakefile('NAME' => 'DBD::Sybase', @@ -109,11 +109,11 @@ $SYBASE .= "/$ENV{SYBASE_OCS}"; } - if(! -d "$SYBASE/lib") { + if(! -d "$SYBASE/lib64") { die "Can't find the lib directory under $SYBASE!"; } - die "Can't find any Sybase libraries in $SYBASE/lib" unless checkLib($SYBASE); + die "Can't find any Sybase libraries in $SYBASE/lib64" unless checkLib($SYBASE); my $inc_found = 0; if(-d "$SYBASE/include" && -f "$SYBASE/include/cspublic.h") { @@ -139,11 +139,11 @@ # print "OS = $^O\n"; if($^O eq 'MSWin32') { - $lib_string = "-L$SYBASE/lib -llibct.lib -llibcs.lib -llibtcl.lib -llibcomn.lib -llibintl.lib -llibblk.lib $attr{EXTRA_LIBS} -lm"; + $lib_string = "-L$SYBASE/lib64 -llibct.lib -llibcs.lib -llibtcl.lib -llibcomn.lib -llibintl.lib -llibblk.lib $attr{EXTRA_LIBS} -lm"; } elsif($^O eq 'VMS') { - $lib_string = "-L$SYBASE/lib -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}"; + $lib_string = "-L$SYBASE/lib64 -llibct.olb -llibcs.olb -llibtcl.olb -llibcomn.olb -llibintl.olb -llibblk.olb $attr{EXTRA_LIBS}"; } elsif($^O =~ /cygwin/) { - $lib_string = "-L$SYBASE/lib -lct -lcs -lblk"; + $lib_string = "-L$SYBASE/lib64 -lct -lcs -lblk"; $inc_string .= " -D_MSC_VER=800"; } else { # Supplied by Erick Calder. I'm not sure why libsybsrv is needed... @@ -151,9 +151,9 @@ my $extra = getExtraLibs($SYBASE, $attr{EXTRA_LIBS}, $version); if($file) { - $lib_string = "-L$SYBASE/lib -lct -lcs -ltcl -lcomn -lblk $attr{EXTRA_LIBS} -ldl -lm"; + $lib_string = "-L$SYBASE/lib64 -lct -lcs -ltcl -lcomn -lblk $attr{EXTRA_LIBS} -ldl -lm"; } else { - $lib_string = "-L$SYBASE/lib -lct -lcs -ltcl -lcomn -lblk $extra -ldl -lm"; + $lib_string = "-L$SYBASE/lib64 -lct -lcs -ltcl -lcomn -lblk $extra -ldl -lm"; } if($newlibnames) { foreach (qw(ct cs tcl comn intl blk)) { @@ -168,14 +168,14 @@ # I have no idea if this works on Win32 systems (probably not!) if ( $Config{usethreads} ) { print "Running in threaded mode - looking for _r libraries...\n"; - opendir(SYBLIB,"$SYBASE/lib") - or die "Unable to opendir $SYBASE/lib: $!\n"; + opendir(SYBLIB,"$SYBASE/lib64") + or die "Unable to opendir $SYBASE/lib64: $!\n"; my %libname = (); foreach ( readdir(SYBLIB) ) { next unless /^lib(\S+)\.(so|a|sl)/; - next unless -f "$SYBASE/lib/$_"; + next unless -f "$SYBASE/lib64/$_"; $libname{$1} = 1; } @@ -204,13 +204,13 @@ $inc_string .= ' -DSYB_LP64' unless $^O eq 'dec_osf'; print "Running in 64bit mode - looking for '64' libraries...\n"; - opendir(SYBLIB,"$SYBASE/lib") - or die "Unable to opendir $SYBASE/lib: $!\n"; + opendir(SYBLIB,"$SYBASE/lib64") + or die "Unable to opendir $SYBASE/lib64: $!\n"; my %libname = (); foreach ( readdir(SYBLIB) ) { - next unless -f "$SYBASE/lib/$_"; + next unless -f "$SYBASE/lib64/$_"; next unless /^lib(\S+)\.(so|a|sl)/; $libname{$1} = 1; } @@ -254,7 +254,7 @@ sub getLibVersion { my $dir = shift; - my $lib = "$dir/lib"; + my $lib = "$dir/lib64"; opendir(DIR, $lib); # reverse to pick up libsybct before libct... my @files = reverse(grep(/lib(syb)?ct\./, readdir(DIR))); @@ -289,8 +289,8 @@ my $cfg = shift; my $version = shift; - opendir(DIR, "$dir/lib") || die "Can't access $dir/lib: $!"; - my %files = map { $_ =~ s/lib([^\.]+)\..*/$1/; $_ => 1 } grep(/lib/ && -f "$dir/lib/$_", readdir(DIR)); + opendir(DIR, "$dir/lib64") || die "Can't access $dir/lib64: $!"; + my %files = map { $_ =~ s/lib([^\.]+)\..*/$1/; $_ => 1 } grep(/lib/ && -f "$dir/lib64/$_", readdir(DIR)); closedir(DIR); my %x = map {$_ => 1} split(' ', $cfg); @@ -303,7 +303,7 @@ } foreach my $f (qw(insck tli sdna dnet_stub tds skrb gss)) { - $x{"-l$f"} = 1 if exists $files{$f} && -f "$dir/lib/lib$f.$dlext"; + $x{"-l$f"} = 1 if exists $files{$f} && -f "$dir/lib64/lib$f.$dlext"; } if($version gt '11') { delete($x{-linsck}); @@ -320,7 +320,7 @@ sub checkLib { my $dir = shift; - opendir(DIR, "$dir/lib") || die "Can't access $dir/lib: $!"; + opendir(DIR, "$dir/lib64") || die "Can't access $dir/lib64: $!"; my @files = grep(/libct|libsybct/i, readdir(DIR)); closedir(DIR); if(grep(/libsybct/, @files)) {