summaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2012-09-10 18:35:56 +0000
committerJörg Mayer <jmayer@loplof.de>2012-09-10 18:35:56 +0000
commit8363dc43b235b851c84a525be258019bec95b2ad (patch)
treecb72934568f431578343f0fc9bb938222769ff5f /ConfigureChecks.cmake
parent8f4a2e5f28f241f2afb6004833528db20ff5e013 (diff)
downloadwireshark-8363dc43b235b851c84a525be258019bec95b2ad.tar.gz
Make the check for NL80211_CMD_SET_CHANNEL work by copying
the logic of the autofoo test. Using Cmake's check_symbol_exists is not an option as it will not work for enums and types. As this is documented in the manpage this is to be considered a feature and not a bug. svn path=/trunk/; revision=44851
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake17
1 files changed, 14 insertions, 3 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 07b0e80b11..1b453e46e2 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -76,7 +76,18 @@ check_function_exists("mkdtemp" HAVE_MKDTEMP)
check_function_exists("mkstemp" HAVE_MKSTEMP)
check_function_exists("sysconf" HAVE_SYSCONF)
-#Symbols
-include(CheckSymbolExists)
-check_symbol_exists(NL80211_CMD_SET_CHANNEL "linux/nl80211.h" HAVE_NL80211_CMD_SET_CHANNEL)
+#Symbols but NOT enums or types
+#include(CheckSymbolExists)
+#check_symbol_exists(NL80211_CMD_SET_CHANNEL "linux/nl80211.h" HAVE_NL80211_CMD_SET_CHANNEL)
+
+# Check for stuff that isn't testable via the tests above
+#include(CheckCSourceCompiles)
+check_c_source_compiles(
+ "#include <linux/nl80211.h>
+ int main() {
+ enum nl80211_commands x = NL80211_CMD_SET_CHANNEL;
+ }"
+ HAVE_NL80211_CMD_SET_CHANNEL
+)
+