Home | History | Annotate | Line # | Download | only in platform
      1  1.1  christos package platform::AIX;
      2  1.1  christos 
      3  1.1  christos use strict;
      4  1.1  christos use warnings;
      5  1.1  christos use Carp;
      6  1.1  christos 
      7  1.1  christos use vars qw(@ISA);
      8  1.1  christos 
      9  1.1  christos require platform::Unix;
     10  1.1  christos @ISA = qw(platform::Unix);
     11  1.1  christos 
     12  1.1  christos # Assume someone set @INC right before loading this module
     13  1.1  christos use configdata;
     14  1.1  christos 
     15  1.1  christos sub dsoext              { '.so' }
     16  1.1  christos sub shlibextsimple      { return '.so' if $target{shared_target} eq "aix-solib";
     17  1.1  christos 			  '.a'}
     18  1.1  christos 
     19  1.1  christos # In shared mode, the default static library names clashes with the final
     20  1.1  christos # "simple" full shared library name, so we add '_a' to the basename of the
     21  1.1  christos # static libraries in that case, unless in solib mode (using only .so
     22  1.1  christos # files for shared libraries, and not packaging them inside archives)
     23  1.1  christos sub staticname {
     24  1.1  christos     return platform::Unix->staticname($_[1]) if $target{shared_target} eq "aix-solib";
     25  1.1  christos 
     26  1.1  christos     # Non-installed libraries are *always* static, and their names remain
     27  1.1  christos     # the same, except for the mandatory extension
     28  1.1  christos     my $in_libname = platform::BASE->staticname($_[1]);
     29  1.1  christos     return $in_libname
     30  1.1  christos         if $unified_info{attributes}->{libraries}->{$_[1]}->{noinst};
     31  1.1  christos 
     32  1.1  christos     return platform::BASE->staticname($_[1]) . ($disabled{shared} ? '' : '_a');
     33  1.1  christos }
     34  1.1  christos 
     35  1.1  christos # In solib mode, we do not install the simple symlink (we install the import
     36  1.1  christos # library).  In regular mode, we install the symlink.
     37  1.1  christos sub sharedlib_simple {
     38  1.1  christos     return undef if $target{shared_target} eq "aix-solib";
     39  1.1  christos     return platform::Unix->sharedlib_simple($_[1], $_[0]->shlibextsimple());
     40  1.1  christos }
     41  1.1  christos 
     42  1.1  christos # In solib mode, we install the import library.  In regular mode, we have
     43  1.1  christos # no import library.
     44  1.1  christos sub sharedlib_import {
     45  1.1  christos     return platform::Unix->sharedlib_simple($_[1]) if $target{shared_target} eq "aix-solib";
     46  1.1  christos     return undef;
     47  1.1  christos }
     48