summaryrefslogtreecommitdiffstats
path: root/wifi/ConfigureChecks.cmake
blob: 0d2972b1a47aa24bfdeccb5c07a20ce92e9f3f6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

# check for aRts
if( WITH_ARTS )
  pkg_search_module( ARTS arts )
  if( NOT ARTS_FOUND )
    tde_message_fatal( "aRts is requested, but was not found on your system" )
  endif( )
else( )
  set( WITHOUT_ARTS 1 CACHE INTERNAL "" FORCE )
endif( )


# check for wireless tools
tde_save_and_set( CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-lm" )
check_library_exists( iw iw_get_stats "" HAVE_IW )
tde_restore( CMAKE_REQUIRED_FLAGS )
if( HAVE_IW )
  check_include_file( iwlib.h HAVE_IWLIB_H )
  # we need at least wireless tools >= 27
  add_definitions( -DHAVE_IW_27 -DHAVE_IW_27pre19 )
endif( )
if( HAVE_IW AND HAVE_IWLIB_H )
  set( IW_LIBRARY iw )
else( )
  tde_message_fatal( "wifi support needs wireless tools >= 27, but was not found on your system" )
endif( )