| Current File : //opt/RZperl536/man/man3/Crypt::OpenSSL::Guess.3 |
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Crypt::OpenSSL::Guess 3"
.TH Crypt::OpenSSL::Guess 3 "2022-02-11" "perl v5.36.1" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Crypt::OpenSSL::Guess \- Guess OpenSSL include path
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 2
\& use ExtUtils::MakeMaker;
\& use Crypt::OpenSSL::Guess;
\&
\& WriteMakefile(
\& # ...
\& LIBS => [openssl_lib_paths() . \*(Aq \-lssl \-lcrypto\*(Aq],
\& INC => openssl_inc_paths(), # guess include path or get from $ENV{OPENSSL_PREFIX}
\& );
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Crypt::OpenSSL::Guess provides helpers to guess OpenSSL include path on any platforms.
.PP
Often macOS's homebrew OpenSSL cause a problem on installation due to include path is not added.
Some \s-1CPAN\s0 module provides to modify include path with configure-args, but Carton or Module::CPANfile
is not supported to pass configure-args to each modules. Crypt::OpenSSL::* modules should use it on your Makefile.PL.
.PP
This module resolves the include path by Net::SSLeay's workaround.
Original code is taken from \f(CW\*(C`inc/Module/Install/PRIVATE/Net/SSLeay.pm\*(C'\fR by Net::SSLeay.
.SH "FUNCTIONS"
.IX Header "FUNCTIONS"
.IP "\fBopenssl_inc_paths()\fR" 4
.IX Item "openssl_inc_paths()"
This functions returns include paths in the format passed to \s-1CC.\s0 If OpenSSL could not find, then empty string is returned.
.Sp
.Vb 1
\& openssl_inc_paths(); # on macOS: "\-I/usr/local/opt/openssl/include"
.Ve
.IP "\fBopenssl_lib_paths()\fR" 4
.IX Item "openssl_lib_paths()"
This functions returns library paths in the format passed to \s-1CC.\s0 If OpenSSL could not find, then empty string is returned.
.Sp
.Vb 1
\& openssl_lib_paths(); # on macOS: "\-L/usr/local/opt/openssl/lib"
.Ve
.IP "find_openssl_prefix([$dir])" 4
.IX Item "find_openssl_prefix([$dir])"
This function returns OpenSSL's prefix. If set \f(CW\*(C`OPENSSL_PREFIX\*(C'\fR environment variable, you can overwrite the return value.
.Sp
.Vb 1
\& find_openssl_prefix(); # on macOS: "/usr/local/opt/openssl"
.Ve
.IP "find_openssl_exec($prefix)" 4
.IX Item "find_openssl_exec($prefix)"
This functions returns OpenSSL's executable path.
.Sp
.Vb 1
\& find_openssl_exec(); # on macOS: "/usr/local/opt/openssl/bin/openssl"
.Ve
.ie n .IP "($major, $minor, $letter) = \fBopenssl_version()\fR" 4
.el .IP "($major, \f(CW$minor\fR, \f(CW$letter\fR) = \fBopenssl_version()\fR" 4
.IX Item "($major, $minor, $letter) = openssl_version()"
This functions returns OpenSSL's version as major, minor, letter.
.Sp
.Vb 1
\& openssl_version(); # ("1.0", "2", "n")
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
Net::SSLeay
.SH "LICENSE"
.IX Header "LICENSE"
Copyright (C) Takumi Akiyama.
.PP
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
.SH "AUTHOR"
.IX Header "AUTHOR"
Takumi Akiyama <t.akiym@gmail.com>