xref: /freebsd/crypto/openssl/util/local_shlib.com.in (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1${-
2  use File::Spec::Functions qw(rel2abs);
3
4  my $bldtop = rel2abs($config{builddir});
5  our %names = ( map { platform->sharedname($_) =>
6                           $bldtop.platform->sharedlib($_) }
7                 grep { !$unified_info{attributes}->{libraries}->{$_}->{noinst} }
8                 @{$unified_info{libraries}} );
9  "" -}
10$       ! Create a local environment with the shared library logical names
11$       ! properly set.  Undo this with unlocal_shlib.com
12$
13$       OPENSSL_NAMES := OPENSSL_NAMES_'F$GETJPI("","PID")'
14$       CREATE/NAME_TABLE/PARENT_TABLE=LNM$PROCESS_DIRECTORY 'OPENSSL_NAMES'
15$       DEFINE/TABLE='OPENSSL_NAMES' OSSL_FLAG YES
16$
17$       NAMES := {- join(",", keys %names); -}
18{-
19  join("\n", map { "\$       __$_ = \"".$names{$_}."\"" } sort keys %names);
20-}
21$       I = 0
22$       LOOP:
23$           E = F$ELEMENT(I,",",NAMES)
24$           I = I + 1
25$           IF E .EQS. "," THEN GOTO ENDLOOP
26$           EV = __'E'
27$           OLDV = F$TRNLNM(E,"LNM$PROCESS")
28$           IF OLDV .NES. "" THEN DEFINE/TABLE='OPENSSL_NAMES' 'E' 'OLDV'
29$           DEFINE 'E' 'EV'
30$           GOTO LOOP
31$       ENDLOOP:
32