shchuko

Untitled

Nov 7th, 2021 (edited)
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.27 KB | None | 0 0
  1. support for vde network
  2. support for netmap network
  3. Linux io_uring support 
  4.  
  5. ##########################################
  6. # vde libraries probe
  7. if test "$vde" != "no" ; then
  8.   vde_libs="-lvdeplug"
  9.   cat > $TMPC << EOF
  10. #include <libvdeplug.h>
  11. int main(void)
  12. {
  13.     struct vde_open_args a = {0, 0, 0};
  14.     char s[] = "";
  15.     vde_open(s, s, &a);
  16.     return 0;
  17. }
  18. EOF
  19.   if compile_prog "" "$vde_libs" ; then
  20.     vde=yes
  21.   else
  22.     if test "$vde" = "yes" ; then
  23.       feature_not_found "vde" "Install vde (Virtual Distributed Ethernet) devel"
  24.     fi
  25.     vde=no
  26.   fi
  27. fi
  28.  
  29. ##########################################
  30. # vmnet.framework probe
  31. if test "$vmnet" != "no" ; then
  32.   vmnet_flags="-framework vmnet"
  33.   cat > $TMPC << EOF
  34. #include <vmnet/vmnet.h>
  35. int main(void)
  36. {
  37.     (void) vmnet_allocate_mac_address_key;
  38.     return 0;
  39. }
  40. EOF
  41.   if compile_prog "" "$vmnet_flags" ; then
  42.     vmnet=yes
  43.   else
  44.     if test "$vmnet" = "yes" ; then
  45.       feature_not_found "vmnet" "'vmnet.framework' in unsupported in this build"
  46.     fi
  47.     vmnet=no
  48.   fi
  49. fi
  50.  
  51. ##########################################
  52. # netmap support probe
  53. # Apart from looking for netmap headers, we make sure that the host API version
  54. # supports the netmap backend (>=11). The upper bound (15) is meant to simulate
  55. # a minor/major version number. Minor new features will be marked with values up
  56. # to 15, and if something happens that requires a change to the backend we will
  57. # move above 15, submit the backend fixes and modify this two bounds.
  58. if test "$netmap" != "no" ; then
  59.   cat > $TMPC << EOF
  60. #include <inttypes.h>
  61. #include <net/if.h>
  62. #include <net/netmap.h>
  63. #include <net/netmap_user.h>
  64. #if (NETMAP_API < 11) || (NETMAP_API > 15)
  65. #error
  66. #endif
  67. int main(void) { return 0; }
  68. EOF
  69.   if compile_prog "" "" ; then
  70.     netmap=yes
  71.   else
  72.     if test "$netmap" = "yes" ; then
  73.       feature_not_found "netmap"
  74.     fi
  75.     netmap=no
  76.   fi
  77. fi
  78.  
  79. ##########################################
  80. # detect CoreAudio
  81. if test "$coreaudio" != "no" ; then
  82.   coreaudio_libs="-framework CoreAudio"
  83.   cat > $TMPC << EOF
  84. #include <CoreAudio/CoreAudio.h>
  85. int main(void)
  86. {
  87.   return (int)AudioGetCurrentHostTime();
  88. }
  89. EOF
  90.   if compile_prog "" "$coreaudio_libs" ; then
  91.     coreaudio=yes
  92.   else
  93.     coreaudio=no
  94.   fi
  95. fi
  96.  
Add Comment
Please, Sign In to add comment