Changeset 13768

Show
Ignore:
Timestamp:
02/12/08 14:21:30 (5 months ago)
Author:
ajolma
Message:

Support Cygwin by adding -lstdc++ to LIBS if OS is cygwin. http://lists.osgeo.org/pipermail/gdal-dev/2008-January/015728.html

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/swig/perl/Makefile.PL

    r11321 r13768  
    11use ExtUtils::MakeMaker; 
    22 
     3$libs = ''; 
     4 
    35$libdir = $ENV{'PREFIX'} ? "-L$ENV{'PREFIX'}/lib" : ''; 
     6$libdir .= ' -L/msys/1.0/local/lib'; # for MinGW, should do no harm in other systems 
    47 
    58$ext = $^O eq 'MSWin32' ? '.dll' : ''; # works with MinGW but probably not with ActivePerl 
     9 
     10$libs .= " -lgdal$ext"; 
     11$libs .= ' -lstdc++' if $^O eq 'cygwin'; 
    612 
    713# for old-style, use gdal, gdalconst,ogr, and osr as keys 
     
    1824                   VERSION_FROM => 'lib/Geo/GDAL.pm', 
    1925                   MAKEFILE => 'Makefile_'.$add, 
    20                    LIBS => "$libdir -L/msys/1.0/local/lib -L../../.libs -L../.. -lgdal$ext", 
     26                   LIBS => "$libdir -L../../.libs -L../.. $libs", 
    2127                   INC => '-I../../gcore -I../../alg -I../../ogr -I../../port', 
    2228                   OBJECT => $object{$module}