paho.mqtt.cpp/m4
Guilherme Maciel Ferreira 2c2df375ec Add support for the Autotools build system
---------------------------------------------------------------------
 Advantages
---------------------------------------------------------------------

1. Automatically find the Paho MQTT C library. Which is required by
   Paho MQTT C++ library;

2. Detect if the doxygen program is available in order to build (or
   not) the documentation;

3. Detect if the compiler supports C++11;

4. Choose whether to build static, dynamic or both kinds of libraries;

5. Choose whether or not to build documentation or sample programs;

6. Easier cross compilation;

7. Adds standard make targets, like "install";

8. Automatic handling of portability issues. For example, library
   naming differs accross OS;

---------------------------------------------------------------------
 Build instructions
---------------------------------------------------------------------

The first step is to run the bootstrap script:

  $ ./bootstrap

Create the build directory, to build out-of-tree:

  $ mkdir mybuild && cd mybuild
  $ export PAHO_CPP_DIR=$PWD

Next, in order to build only the static library:

  $ $PAHO_CPP_DIR/configure --disable-shared --enable-static
  $ make

the commands above build

  libpaho-mqttpp3.a

Or, in order to build only the dynamic library:

  $ $PAHO_CPP_DIR/configure --enable-shared --disable-static
  $ make

the previous commands build:

  libpaho-mqttpp3.so.0.2

and its respective link and soname.

If the Paho MQTT C is installed on a non-standard directory, you can
provide the path to the configure script:

  $ $PAHO_CPP_DIR/configure --with-paho-mqtt-c=/opt/paho.mqtt.c/

---------------------------------------------------------------------
 Remarks
---------------------------------------------------------------------

The regular Make version is around 2.5 times faster than the Autotools
version. The overall time for Autotools include the time of bootstrap,
configure and make. The regular Make time include only the make command.

Remove the .dep files from "src/obj/" directory. The "make" sets its
current directory to "src/obj/" in order to compile. And "make" does
find the libtool script, because its current directory should be "src/".

Successfully built on with C++11 restriction:
- Ubuntu 10.04 (x86 32-bit) with g++ 4.8.2, GNU libc 2.11.1 and libstdc++ 6.0.13;
- Fedora 23.10 (64-bit) with g++ 5.3.1, GNU libc 2.22 and libstdc++ 6.0.21;
- FreeBSD 10.3 (64-bit) with clang++ 3.4.1;

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2017-04-03 18:10:10 -05:00
..
.gitignore Add support for the Autotools build system 2017-04-03 18:10:10 -05:00
README Add support for the Autotools build system 2017-04-03 18:10:10 -05:00
m4_ax_cxx_compile_stdcxx.m4 Add support for the Autotools build system 2017-04-03 18:10:10 -05:00
m4_ax_cxx_compile_stdcxx_11.m4 Add support for the Autotools build system 2017-04-03 18:10:10 -05:00

README

Fix the problem

aclocal: error: couldn't open directory 'm4': No such file or directory