Upon installation, the target system is probed for the presence of libzmq. If it is not found, libzmq 3.2.2 is installed in a shared directory. In short, modules that need libzmq can depend on this module to make sure that it is available.

This module is still EXPERIMENTAL. In particular, I'm still pondering on how libzmq-2.x should be handled. Currently, if libzmq-2.x is found on the system, Alien::ZMQ will use it, but there is no way to install libzmq-2.x with Alien::ZMQ. I'm not sure what the most useful behavior with regards to libzmq-2.x is, so please talk to me if you have any ideas.

Get the linker flags required to link a program against libzmq. This is a shortcut for constructing a -L flag using "lib_dir", plus -lzmq. On some platforms, you may also want to add the library path to your executable or library as a runtime path; this can be done by passing -rpath to the linker. Something like this could work:

my $mylibs = Alien::ZMQ::libs . " -Wl,-rpath=" . Alien::ZMQ::lib_dir;

This will allow your program to find libzmq, even if it is installed in a non-standard location, but this isn't necessary on some platforms.

Pass extra flags to the compiler when probing for an existing installation of libzmq. You can use this, along with "--zmq-libs", to help the probing function locate your libzmq installation if it is installed in an unexpected place. For example, if your libzmq is installed at /opt/zeromq, you can do something like this:

These flags are only used by the probing function to locate libzmq; they will not be used when compiling libzmq from source (if it needs to be). To affect the compiling of libzmq, using the "--zmq-config" flag instead.

A better alternative to using "--zmq-cflags" and "--zmq-libs" is to help the pkg-config(1) command find your libzmq using the PKG_CONFIG_PATH environment variable. Of course, this method requires that you have the pkg-config(1) program installed. Here's an example:

Pass extra flags to the linker when probing for an existing installation of libzmq. You can use this, along with "--zmq-cflags", to help the probing function locate your libzmq installation if it is installed in an unexpected place. Like "--zmq-cflags", these flags are only used by the probing function to locate libzmq.

Pass extra flags to the libzmq configure script. You may want to consider passing either --with-pgm or --with-system-pgm if you need support for PGM; this is not enabled by default because it is not supported by every system.