]> Dogcows Code - chaz/p5-Alien-ZMQ/blob - lib/Alien/ZMQ.pm
4c0e2f9cdbddebecf5648c421f0345e7a5bd5d0b
[chaz/p5-Alien-ZMQ] / lib / Alien / ZMQ.pm
1 package Alien::ZMQ;
2 # ABSTRACT: detect and/or install zeromq
3
4 use warnings;
5 use strict;
6
7 =head1 DESCRIPTION
8
9 Upon installation, the target system is probed for the presence of libzmq. If
10 it is not found, zeromq 3.2.2 is installed in a shared directory. In short,
11 modules that need libzmq can depend on this module to make sure that it is
12 available.
13
14 =head1 SYNOPSIS
15
16 use Alien::ZMQ;
17
18 my $version = Alien::ZMQ::lib_version;
19
20 =head1 OPTIONS
21
22 These options to F<Build.PL> affect the installation of this module.
23
24 =over 4
25
26 =item --zmq-skip-probe
27
28 By default, zeromq is not compiled and installed if it is detected to already
29 be on the system. Use this to skip those checks and always install zeromq.
30
31 =item --zmq-config=...
32
33 Pass extra flags to zeromq's F<configure> script. You may want to consider
34 passing either C<--with-pgm> or C<--with-system-pgm> if you need support for
35 PGM; this is not enabled by default because it is not supported by every
36 system.
37
38 =item --zmq-libs=...
39
40 Pass extra flags to the linker when probing for an existing installation of
41 zeromq. In particular, if your F<libzmq.so> file is installed to a special
42 location, you may pass flags such as C<-L/opt/libzmq2/lib -lzmq>.
43
44 =item --zmq-cflags=...
45
46 Pass extra flags to the compiler when probing for an existing installation of
47 zeromq. These flags will not be used when actually compiling zeromq from
48 source. For that, just use the C<CFLAGS> environment variable.
49
50 =back
51
52 =head1 CAVEATS
53
54 Probing is only done upon installation, so if you are using a system-installed
55 version of libzmq and you uninstall or upgrade it, you will also need to
56 reinstall this module.
57
58 =head1 BUGS
59
60 Windows is not yet supported. Patches are welcome.
61
62 =head1 SEE ALSO
63
64 =over 4
65
66 =item * L<GitHub project|https://github.com/chazmcgarvey/p5-Alien-ZMQ>
67
68 =item * L<ZMQ> - good perl bindings for zeromq
69
70 =item * L<ZeroMQ|http://www.zeromq.org/> - official libzmq website
71
72 =back
73
74 =head1 ACKNOWLEDGEMENTS
75
76 The design and implementation of this module were influenced by other L<Alien>
77 modules, including L<Alien::GMP> and L<Alien::Tidyp>.
78
79 =method inc_version
80
81 Get the version number of libzmq as a dotted version string according to the
82 F<zmq.h> header file.
83
84 =cut
85
86 sub inc_version { }
87
88 =method lib_version
89
90 Get the version number of libzmq as a dotted version string according to the
91 F<libzmq.so> file.
92
93 =cut
94
95 sub lib_version { }
96
97 =method inc_dir
98
99 Get the directory containing the F<zmq.h> header file.
100
101 =cut
102
103 sub inc_dir { }
104
105 =method lib_dir
106
107 Get the directory containing the F<libzmq.so> file.
108
109 =cut
110
111 sub lib_dir { }
112
113 =method cflags
114
115 Get the C compiler flags required to compile a program that uses libzmq. This
116 is a shortcut for constructing a C<-I> flag using C<inc_dir>.
117
118 =cut
119
120 sub cflags {
121 "-I'" . inc_dir . "'";
122 }
123
124 =method libs
125
126 Get the linker flags required to link a program against libzmq. This is
127 a shortcut for constructing a C<-L> flag using C<lib_dir>, plus C<-lzmq>.
128
129 =cut
130
131 sub libs {
132 "-L'" . lib_dir . "' -lzmq";
133 }
134
135 1;
This page took 0.043837 seconds and 3 git commands to generate.