summaryrefslogtreecommitdiffstats
path: root/kopete/ConfigureChecks.cmake
blob: c8e03e06fc07c2e919aadb7f7b7ac52dbb30ff78 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

# glib-2.0 (jabber, msn)
if( (BUILD_KOPETE_PROTOCOL_JABBER AND WITH_JINGLE) OR (BUILD_KOPETE_PROTOCOL_MSN AND WITH_WEBCAM) )
  pkg_search_module( GLIB2 glib-2.0 )
  if( GLIB2_FOUND )
    set( HAVE_GLIB 1 CACHE INTERNAL "" FORCE )
  else( )
    tde_message_fatal( "glib-2.0 is required, but was not found on your system" )
  endif( )
endif( )


# tqca (groupwise, jabber)
if( BUILD_KOPETE_PROTOCOL_GROUPWISE OR BUILD_KOPETE_PROTOCOL_JABBER )
  pkg_search_module( TQCA tqca )
  if( NOT TQCA_FOUND )
      tde_message_fatal( "tqca is required, but was not found on your system" )
  endif( )
endif( )


# libxslt (plugins/webpresence)

if( BUILD_KOPETE_PLUGIN_WEBPRESENCE AND WITH_LIBXSLT )
  pkg_search_module( LIBXML libxml-2.0 )
  if( NOT LIBXML_FOUND )
    tde_message_fatal( "libxml is required, but not found on your system" )
  endif( )
  pkg_search_module( LIBXSLT libxslt )
  if( NOT LIBXSLT_FOUND )
    tde_message_fatal( "libxslt is required, but not found on your system" )
  else( )
    set( HAVE_XSLT 1 CACHE INTERNAL "" )
  endif( )
endif( )


### Check for videodev header
check_include_file( "linux/videodev2.h" HAVE_VIDEODEV_H )
if( HAVE_VIDEODEV_H )
  set( VIDEODEV_HEADER "linux/videodev2.h" CACHE INTERNAL "" )
else( )
  check_include_file( "libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H )
  if( HAVE_LIBV4L1_VIDEODEV_H )
    set( VIDEODEV_HEADER "libv4l1-videodev.h" CACHE INTERNAL "" )
  else( )
    if( BUILD_KOPETE_PLUGIN_MOTIONAUTOAWAY )
      tde_message_fatal( "libv4l1-videodev.h or linux/videodev.h is required, but not found on your system" )
    endif( BUILD_KOPETE_PLUGIN_MOTIONAUTOAWAY )
  endif( )
endif( )


### Check for tm_gmtoff in tm struct
check_struct_has_member( "struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF )