@@ -128,6 +128,20 @@ AC_RUN_IFELSE(
128128
129129AC_MSG_RESULT ( [ $libzmq_tipc_support] )
130130
131+
132+ # check vsock support
133+ AC_MSG_CHECKING ( [ if vsock is available ] )
134+
135+ AC_CHECK_HEADERS ( [ linux/vm_sockets.h] ,
136+ [ libzmq_vsock_support=yes] ,
137+ [ libzmq_vsock_support=no] ,
138+ [
139+ #include <sys/socket.h>
140+ #include <linux/vm_sockets.h>
141+ ]
142+ )
143+
144+
131145AC_ARG_ENABLE ( [ pedantic] ,
132146 [ AS_HELP_STRING ( [ --disable-pedantic] , [ disable pedantic compiler checks [ default=enabled] ] ) ] ,
133147 [ libzmq_pedantic=$enableval] , [ libzmq_pedantic=yes] )
@@ -235,6 +249,10 @@ case "${host_os}" in
235249 if test "x$libzmq_tipc_support" = "xyes"; then
236250 AC_DEFINE ( ZMQ_HAVE_TIPC , 1 , [ Have TIPC support] )
237251 fi
252+
253+ if test "x$libzmq_vsock_support" = "xyes"; then
254+ AC_DEFINE ( ZMQ_HAVE_VSOCK , 1 , [ Have vsock support] )
255+ fi
238256 case "${host_os}" in
239257 *android*)
240258 AC_DEFINE ( ZMQ_HAVE_ANDROID , 1 , [ Have Android OS] )
774792
775793AM_CONDITIONAL(HAVE_VMCI, test "x$have_vmci_ext" != "xno")
776794
795+
777796# Set -Wall, -Werror and -pedantic
778797AC_LANG_PUSH ( [ C++] )
779798
@@ -789,6 +808,7 @@ if test "x$libzmq_pedantic" = "xyes"; then
789808fi
790809AC_LANG_POP ( [ C++] )
791810
811+ AM_CONDITIONAL(BUILD_VSOCK, test "x$libzmq_vsock_support" = "xyes")
792812AM_CONDITIONAL(BUILD_TIPC, test "x$libzmq_tipc_support" = "xyes")
793813AM_CONDITIONAL(ON_MINGW, test "x$libzmq_on_mingw" = "xyes")
794814AM_CONDITIONAL(ON_CYGWIN, test "x$libzmq_on_cygwin" = "xyes")
0 commit comments