mirror of
https://github.com/eclipse/paho.mqtt.cpp.git
synced 2025-05-08 19:04:59 +08:00

--------------------------------------------------------------------- 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>
Fix the problem aclocal: error: couldn't open directory 'm4': No such file or directory