diff --git a/config.m4 b/config.m4 index 799f3aa..cc83328 100644 --- a/config.m4 +++ b/config.m4 @@ -14,7 +14,7 @@ if test "$PHP_LIBMOSQUITTO" != "no"; then # --with-libmosquitto -> check with-path SEARCH_PATH="/usr/local /usr" # you might want to change this - SEARCH_FOR="/include/libmosquitto.h" # you most likely want to change this + SEARCH_FOR="/include/mosquitto.h" # you most likely want to change this if test -r $PHP_LIBMOSQUITTO/$SEARCH_FOR; then # path given as parameter LIBMOSQUITTO_DIR=$PHP_LIBMOSQUITTO else # search default path list @@ -22,6 +22,7 @@ if test "$PHP_LIBMOSQUITTO" != "no"; then for i in $SEARCH_PATH ; do if test -r $i/$SEARCH_FOR; then LIBMOSQUITTO_DIR=$i + AC_MSG_CHECKING($LIBMOSQUITTO_DIR) AC_MSG_RESULT(found in $i) fi done @@ -36,18 +37,9 @@ if test "$PHP_LIBMOSQUITTO" != "no"; then PHP_ADD_INCLUDE($LIBMOSQUITTO_DIR/include) # --with-libmosquitto -> check for lib and symbol presence - LIBNAME=libmosquitto # you may want to change this - LIBSYMBOL=mosquitto_init # you most likely want to change this - - PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, - [ - PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $LIBMOSQUITTO_DIR/lib, LIBMOSQUITTO_SHARED_LIBADD) - AC_DEFINE(HAVE_LIBMOSQUITTOLIB,1,[ ]) - ],[ - AC_MSG_ERROR([wrong libmosquitto lib version or lib not found]) - ],[ - -L$LIBMOSQUITTO_DIR/lib -lm - ]) + LIBNAME=mosquitto # you may want to change this + + PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $LIBMOSQUITTO_DIR/lib, LIBMOSQUITTO_SHARED_LIBADD) PHP_SUBST(LIBMOSQUITTO_SHARED_LIBADD)