###########################################
#                                         #
#  Improvements and feedback are welcome  #
#                                         #
#  This file is released under GPL >= 3   #
#                                         #
###########################################


# required stuff

tde_setup_architecture_flags( )

include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)

tde_setup_largefiles( )

find_package( TQt )
find_package( TDE )


##### check for gcc visibility support #########

if( WITH_GCC_VISIBILITY )
  tde_setup_gcc_visibility( )
endif( )


#### check for headers

check_include_file( "sys/select.h" HAVE_SYS_SELECT_H )
check_include_file( "paths.h"      HAVE_PATHS_H      )


#### set USE_SSL

if( WITH_SSL )
  # For SSL support is used KSSL in tdelibs.
  # Therefore, there is no need for a direct dependence on the SSL library.
  set( USE_SSL 1 )
endif( WITH_SSL )


#### check for ASUS Mail LED

if( WITH_MLED )
  if( EXISTS "/proc/acpi/asus/mled" )
    set( HAVE_MLED 1 )
  else( )
    tde_mesage_fatal( "ASUS Mail LED support was requested but not found in ACPI" )
  endif( )
endif( WITH_MLED )