+
+ # shlib and shlib_simple both take a static library name and figure
+ # out what the shlib name should be.
+ #
+ # When OpenSSL is configured "no-shared", these functions will just
+ # return empty lists, making them suitable to join().
+ #
+ # With Windows DLL producers, shlib($libname) will return the shared
+ # library name (which usually is different from the static library
+ # name) with the default shared extension appended to it, while
+ # shlib_simple($libname) will return the static library name with
+ # the shared extension followed by ".a" appended to it. The former
+ # result is used as the runtime shared library while the latter is
+ # used as the DLL import library.
+ #
+ # On all Unix systems, shlib($libname) will return the library name
+ # with the default shared extension, while shlib_simple($libname)
+ # will return the name from shlib($libname) with any SO version number
+ # removed. On some systems, they may therefore return the exact same
+ # string.
+ sub shlib {
+ return () if $config{no_shared};
+ my $lib = shift;
+ return $unified_info{sharednames}->{$lib} . '$(SHLIB_EXT)';
+ }
+ sub shlib_simple {
+ return () if $config{no_shared};
+
+ my $lib = shift;
+ if (windowsdll()) {
+ return $lib . '$(SHLIB_EXT_IMPORT)';
+ }
+ return $lib . '$(SHLIB_EXT_SIMPLE)';
+ }
+
+ # dso is a complement to shlib / shlib_simple that returns the
+ # given libname with the simple shared extension (possible SO version
+ # removed). This differs from shlib_simple() by being unconditional.
+ sub dso {
+ return () if $config{no_shared};
+ my $engine = shift;
+
+ return $engine . '$(DSO_EXT)';
+ }