2 # ABSTRACT: detect and/or install zeromq
7 use String
::ShellQuote qw
/shell_quote/;
11 Upon installation, the target system is probed for the presence of libzmq. If
12 it is not found, zeromq 3.2.2 is installed in a shared directory. In short,
13 modules that need libzmq can depend on this module to make sure that it is
20 my $version = Alien::ZMQ::lib_version;
24 These options to F<Build.PL> affect the installation of this module.
28 =item --zmq-skip-probe
30 By default, zeromq is not compiled and installed if it is detected to already
31 be on the system. Use this to skip those checks and always install zeromq.
33 =item --zmq-config=...
35 Pass extra flags to zeromq's F<configure> script. You may want to consider
36 passing either C<--with-pgm> or C<--with-system-pgm> if you need support for
37 PGM; this is not enabled by default because it is not supported by every
42 Pass extra flags to the linker when probing for an existing installation of
43 zeromq. In particular, if your F<libzmq.so> file is installed to a special
44 location, you may pass flags such as C<-L/opt/libzmq2/lib -lzmq>.
46 =item --zmq-cflags=...
48 Pass extra flags to the compiler when probing for an existing installation of
49 zeromq. These flags will not be used when actually compiling zeromq from
50 source. For that, just use the C<CFLAGS> environment variable.
56 Probing is only done upon installation, so if you are using a system-installed
57 version of libzmq and you uninstall or upgrade it, you will also need to
58 reinstall this module.
62 Windows is not yet supported. Patches are welcome.
68 =item * L<GitHub project|https://github.com/chazmcgarvey/p5-Alien-ZMQ>
70 =item * L<ZMQ> - good perl bindings for zeromq
72 =item * L<ZeroMQ|http://www.zeromq.org/> - official libzmq website
76 =head1 ACKNOWLEDGEMENTS
78 The design and implementation of this module were influenced by other L<Alien>
79 modules, including L<Alien::GMP> and L<Alien::Tidyp>.
83 Get the version number of libzmq as a dotted version string according to the
92 Get the version number of libzmq as a dotted version string according to the
101 Get the directory containing the F
<zmq
.h
> header file
.
109 Get the directory containing the F
<libzmq
.so
> file
.
117 Get the C compiler flags required to compile a program that uses libzmq
. This
118 is a shortcut
for constructing a C
<-I
> flag using C
<inc_dir
>.
123 "-I" . shell_quote
(inc_dir
);
128 Get the linker flags required to
link a program against libzmq
. This
is
129 a shortcut
for constructing a C
<-L
> flag using C
<lib_dir
>, plus C
<-lzmq
>.
134 "-L" . shell_quote
(lib_dir
) . " -lzmq";