From 8363dc43b235b851c84a525be258019bec95b2ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Mon, 10 Sep 2012 18:35:56 +0000 Subject: 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 --- ConfigureChecks.cmake | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'ConfigureChecks.cmake') 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 + int main() { + enum nl80211_commands x = NL80211_CMD_SET_CHANNEL; + }" + HAVE_NL80211_CMD_SET_CHANNEL +) + -- cgit v1.2.1