Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ lt*.m4
*.cache
config.*
configure
configure~
libtool
libtool.m4
*.log
Expand Down Expand Up @@ -123,3 +124,4 @@ examples/websocket/websocket_client
# Never exclude Espressif config.h files
!/IDE/Espressif/**/config.h

src/mqtt_broker
17 changes: 16 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ then
[ ENABLED_PROPCB=$enableval ],
[ ENABLED_PROPCB=yes ]
)

if test "x$ENABLED_PROPCB" = "xyes"
then
AM_CFLAGS="$AM_CFLAGS -DWOLFMQTT_PROPERTY_CB"
Expand Down Expand Up @@ -405,6 +405,19 @@ then
[AC_MSG_ERROR([libwebsockets not found. Install libwebsockets or use --disable-websocket])])
fi

# Broker
AC_ARG_ENABLE([broker],
[AS_HELP_STRING([--enable-broker],[Enable lightweight broker support (default: disabled)])],
[ ENABLED_BROKER=$enableval ],
[ ENABLED_BROKER=no ]
)

if test "x$ENABLED_BROKER" = "xyes"
then
AM_CFLAGS="$AM_CFLAGS -DWOLFMQTT_BROKER"
fi


AM_CONDITIONAL([HAVE_LIBWOLFSSL], [test "x$ENABLED_TLS" = "xyes"])
AM_CONDITIONAL([HAVE_LIBCURL], [test "x$ENABLED_CURL" = "xyes"])
AM_CONDITIONAL([BUILD_STRESS], [test "x$ENABLED_STRESS" != "xno"])
Expand All @@ -415,6 +428,8 @@ AM_CONDITIONAL([BUILD_MQTT5], [test "x$ENABLED_MQTTV50" = "xyes"])
AM_CONDITIONAL([BUILD_NONBLOCK], [test "x$ENABLED_NONBLOCK" = "xyes"])
AM_CONDITIONAL([BUILD_MULTITHREAD], [test "x$ENABLED_MULTITHREAD" = "xyes"])
AM_CONDITIONAL([BUILD_WEBSOCKET], [test "x$ENABLED_WEBSOCKET" = "xyes"])
AM_CONDITIONAL([BUILD_BROKER], [test "x$ENABLED_BROKER" = "xyes"])



# HARDEN FLAGS
Expand Down
9 changes: 9 additions & 0 deletions src/include.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ src_libwolfmqtt_la_LDFLAGS = ${AM_LDFLAGS} -no-undefined -version-info ${WO
src_libwolfmqtt_la_DEPENDENCIES =

EXTRA_DIST +=

if BUILD_BROKER
bin_PROGRAMS += src/mqtt_broker
src_mqtt_broker_SOURCES = src/mqtt_broker.c
src_mqtt_broker_CFLAGS =
src_mqtt_broker_LDFLAGS = -Lsrc
src_mqtt_broker_LDADD = src/libwolfmqtt.la $(LTLIBEVENT) $(LIB_STATIC_ADD)
src_mqtt_broker_DEPENDENCIES = src/libwolfmqtt.la
endif
Loading
Loading