@@ -128,6 +128,22 @@ 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+ AC_MSG_RESULT ( [ $libzmq_vsock_support] )
144+
145+
146+
131147AC_ARG_ENABLE ( [ pedantic] ,
132148 [ AS_HELP_STRING ( [ --disable-pedantic] , [ disable pedantic compiler checks [ default=enabled] ] ) ] ,
133149 [ libzmq_pedantic=$enableval] , [ libzmq_pedantic=yes] )
@@ -235,6 +251,10 @@ case "${host_os}" in
235251 if test "x$libzmq_tipc_support" = "xyes"; then
236252 AC_DEFINE ( ZMQ_HAVE_TIPC , 1 , [ Have TIPC support] )
237253 fi
254+
255+ if test "x$libzmq_vsock_support" = "xyes"; then
256+ AC_DEFINE ( ZMQ_HAVE_VSOCK , 1 , [ Have vsock support] )
257+ fi
238258 case "${host_os}" in
239259 *android*)
240260 AC_DEFINE ( ZMQ_HAVE_ANDROID , 1 , [ Have Android OS] )
774794
775795AM_CONDITIONAL(HAVE_VMCI, test "x$have_vmci_ext" != "xno")
776796
797+
777798# Set -Wall, -Werror and -pedantic
778799AC_LANG_PUSH ( [ C++] )
779800
@@ -789,6 +810,7 @@ if test "x$libzmq_pedantic" = "xyes"; then
789810fi
790811AC_LANG_POP ( [ C++] )
791812
813+ AM_CONDITIONAL(BUILD_VSOCK, test "x$libzmq_vsock_support" = "xyes")
792814AM_CONDITIONAL(BUILD_TIPC, test "x$libzmq_tipc_support" = "xyes")
793815AM_CONDITIONAL(ON_MINGW, test "x$libzmq_on_mingw" = "xyes")
794816AM_CONDITIONAL(ON_CYGWIN, test "x$libzmq_on_cygwin" = "xyes")
0 commit comments