#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# todo: result for NEED_... is wrong (inverted)
check_function_exists("mkdtemp" HAVE_MKDTEMP)
check_function_exists("mkstemp" HAVE_MKSTEMP)
check_function_exists("sysconf" HAVE_SYSCONF)
+
+#Struct members
+include(CheckStructHasMember)
+check_struct_has_member("struct tm" tm_zone time.h HAVE_TM_ZONE)
+
+#Symbols but NOT enums or types
+include(CheckSymbolExists)
+check_symbol_exists(tzname "time.h" HAVE_TZNAME)
+
+# 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
+)
+check_c_source_compiles(
+ "#include <linux/nl80211.h>
+ int main() {
+ int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER;
+ x = NL80211_ATTR_SUPPORTED_IFTYPES;
+ x = NL80211_ATTR_SUPPORTED_COMMANDS;
+ x = NL80211_ATTR_WIPHY_FREQ;
+ x = NL80211_CHAN_NO_HT;
+ }"
+ HAVE_NL80211
+)
+