#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

pkg_search_module( XTST xtst )
if( NOT XTST_FOUND )
  tde_message_fatal( "xtst is required, but was not found on your system" )
endif( )

check_function_exists( getnameinfo HAVE_GETNAMEINFO )
check_function_exists( getifaddrs HAVE_GETIFADDRS )
check_include_file( sys/sockio.h HAVE_SYS_SOCKIO_H )

check_struct_has_member(
 "struct sockaddr" sa_len
 "sys/types.h;sys/socket.h;netinet/in.h"
 HAVE_STRUCT_SOCKADDR_SA_LEN
)