kismet-libnl-30-support.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. ---
  2. configure | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
  3. 1 file changed, 78 insertions(+), 1 deletion(-)
  4. Index: b/configure
  5. ===================================================================
  6. --- a/configure
  7. +++ b/configure
  8. @@ -601,6 +601,8 @@
  9. libnl1_CFLAGS
  10. libnl20_LIBS
  11. libnl20_CFLAGS
  12. +libnl30_LIBS
  13. +libnl30_CFLAGS
  14. PKG_CONFIG_LIBDIR
  15. PKG_CONFIG_PATH
  16. PKG_CONFIG
  17. @@ -712,6 +714,8 @@
  18. PKG_CONFIG
  19. PKG_CONFIG_PATH
  20. PKG_CONFIG_LIBDIR
  21. +libnl30_CFLAGS
  22. +libnl30_LIBS
  23. libnl20_CFLAGS
  24. libnl20_LIBS
  25. libnl1_CFLAGS
  26. @@ -1361,6 +1365,10 @@
  27. directories to add to pkg-config's search path
  28. PKG_CONFIG_LIBDIR
  29. path overriding pkg-config's built-in search path
  30. + libnl30_CFLAGS
  31. + C compiler flags for libnl30, overriding pkg-config
  32. + libnl30_LIBS
  33. + linker flags for libnl30, overriding pkg-config
  34. libnl20_CFLAGS
  35. C compiler flags for libnl20, overriding pkg-config
  36. libnl20_LIBS
  37. @@ -6760,6 +6768,76 @@
  38. fi
  39. fi
  40. +#libnl-3.0
  41. +pkg_failed=no
  42. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl30" >&5
  43. +$as_echo_n "checking for libnl30... " >&6; }
  44. +
  45. +if test -n "$libnl30_CFLAGS"; then
  46. + pkg_cv_libnl20_CFLAGS="$libnl30_CFLAGS"
  47. + elif test -n "$PKG_CONFIG"; then
  48. + if test -n "$PKG_CONFIG" && \
  49. + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0\""; } >&5
  50. + ($PKG_CONFIG --exists --print-errors "libnl-3.0") 2>&5
  51. + ac_status=$?
  52. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  53. + test $ac_status = 0; }; then
  54. + pkg_cv_libnl30_CFLAGS=`$PKG_CONFIG --cflags "libnl-3.0" 2>/dev/null`
  55. +else
  56. + pkg_failed=yes
  57. +fi
  58. + else
  59. + pkg_failed=untried
  60. +fi
  61. +if test -n "$libnl30_LIBS"; then
  62. + pkg_cv_libnl20_LIBS="$libnl30_LIBS"
  63. + elif test -n "$PKG_CONFIG"; then
  64. + if test -n "$PKG_CONFIG" && \
  65. + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0\""; } >&5
  66. + ($PKG_CONFIG --exists --print-errors "libnl-3.0") 2>&5
  67. + ac_status=$?
  68. + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  69. + test $ac_status = 0; }; then
  70. + pkg_cv_libnl30_LIBS=`$PKG_CONFIG --libs "libnl-3.0" 2>/dev/null`
  71. +else
  72. + pkg_failed=yes
  73. +fi
  74. + else
  75. + pkg_failed=untried
  76. +fi
  77. +
  78. +if test $pkg_failed = yes; then
  79. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  80. +$as_echo "no" >&6; }
  81. +
  82. +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  83. + _pkg_short_errors_supported=yes
  84. +else
  85. + _pkg_short_errors_supported=no
  86. +fi
  87. + if test $_pkg_short_errors_supported = yes; then
  88. + libnl30_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libnl-3.0" 2>&1`
  89. + else
  90. + libnl30_PKG_ERRORS=`$PKG_CONFIG --print-errors "libnl-3.0" 2>&1`
  91. + fi
  92. + # Put the nasty error message in config.log where it belongs
  93. + echo "$libnl30_PKG_ERRORS" >&5
  94. +
  95. + libnl30=no
  96. +elif test $pkg_failed = untried; then
  97. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  98. +$as_echo "no" >&6; }
  99. + libnl30=no
  100. +else
  101. + libnl30_CFLAGS=$pkg_cv_libnl30_CFLAGS
  102. + libnl30_LIBS=$pkg_cv_libnl30_LIBS
  103. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  104. + CPPFLAGS="$CPPFLAGS $libnl30_CFLAGS"
  105. +$as_echo "yes" >&6; }
  106. + libnl30=yes
  107. +fi
  108. +
  109. +# libnl-2.0
  110. pkg_failed=no
  111. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl20" >&5
  112. $as_echo_n "checking for libnl20... " >&6; }
  113. @@ -6897,7 +6974,11 @@
  114. $as_echo "yes" >&6; }
  115. libnl1=yes
  116. fi
  117. - if test "$libnl20" = "yes"; then
  118. + if test "$libnl30" = "yes"; then
  119. +$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
  120. +$as_echo "#define HAVE_LIBNL20 1" >>confdefs.h
  121. + NLLIBS="-lnl-genl-3 -lnl-3"
  122. + elif test "$libnl20" = "yes"; then
  123. $as_echo "#define HAVE_LIBNL 1" >>confdefs.h