AIX.pm 1.6 KB

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