generate moc
[kdenetwork.git] / ConfigureChecks.cmake
blobce6783baeb58803a9b6d35cf61234a8c27877c38
1 include(CheckIncludeFile)
2 include(CheckIncludeFiles)
3 include(CheckSymbolExists)
4 include(CheckFunctionExists)
5 include(CheckLibraryExists)
6 include(CheckPrototypeExists)
7 include(CheckTypeSize)
8 include(MacroBoolTo01)
10 # The FindKDE4.cmake module sets _KDE4_PLATFORM_DEFINITIONS with
11 # definitions like _GNU_SOURCE that are needed on each platform.
12 set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
14 macro_bool_to_01(LIBXSLT_FOUND HAVE_XSLT)
15 macro_bool_to_01(XMMS_FOUND HAVE_XMMS)
16 macro_bool_to_01(SLP_FOUND HAVE_SLP)
17 macro_bool_to_01(X11_Xrender_FOUND HAVE_XRENDER)
18 macro_bool_to_01(STRINGPREP_FOUND HAVE_STRINGPREP_H)
20 #now check for dlfcn.h using the cmake supplied CHECK_include_FILE() macro
21 # If definitions like -D_GNU_SOURCE are needed for these checks they
22 # should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
23 # defined outside this file.  Here we include these definitions in
24 # CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
25 # checks below.
26 set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
27 if (WIN32)
28    set(CMAKE_REQUIRED_LIBRARIES ${KDEWIN32_LIBRARIES} )
29    set(CMAKE_REQUIRED_INCLUDES  ${KDEWIN32_INCLUDES} )
30 endif (WIN32)
32 check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H)
33 check_include_files(inttypes.h HAVE_INTTYPES_H)
34 check_include_files(stdint.h HAVE_STDINT_H)
35 check_include_files(strings.h HAVE_STRINGS_H)
36 check_include_files(string.h HAVE_STRING_H)
37 check_include_files(sys/stat.h HAVE_SYS_STAT_H)
38 check_include_files(sys/types.h HAVE_SYS_TYPES_H)
39 check_include_files(paths.h HAVE_PATHS_H)
40 check_include_files(net/if_ppp.h HAVE_NET_IF_PPP_H)
41 check_include_files(linux/if_ppp.h HAVE_LINUX_IF_PPP_H)
42 check_include_files(iLBC_decode.h HAVE_ILBC_DECODE_H)
43 check_include_files(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H)
44 check_include_files(speex.h HAVE_SPEEX_H)
45 check_include_files(speex/speex.h HAVE_SPEEX_SPEEX_H)
46 check_include_files(sys/param.h HAVE_SYS_PARAM_H)
47 check_include_files(sys/select.h HAVE_SYS_SELECT_H)
48 check_include_files(sys/sockio.h HAVE_SYS_SOCKIO_H)
49 check_include_files(sys/time.h HAVE_SYS_TIME_H)
50 check_include_files("sys/time.h;time.h" TIME_WITH_SYS_TIME)
51 check_include_files(valgrind/valgrind.h HAVE_VALGRIND_H)
54 check_function_exists(_NSGetEnviron   HAVE_NSGETENVIRON)
55 check_function_exists(usleep     HAVE_USLEEP)
58 check_symbol_exists(getnameinfo     "sys/socket.h;netdb.h"     HAVE_GETNAMEINFO)
59 check_symbol_exists(getifaddrs     "sys/socket.h;netdb.h;ifaddrs.h"     HAVE_GETIFADDRS)
61 check_symbol_exists(vsnprintf       "stdio.h"                  HAVE_VSNPRINTF)
63 check_prototype_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT_PROTO)
64 check_prototype_exists(usleep unistd.h HAVE_USLEEP_PROTO)
65 check_prototype_exists(getdomainname "stdlib.h;unistd.h;netdb.h" HAVE_GETDOMAINNAME_PROTO)
67 check_type_size("int" SIZEOF_INT)
68 check_type_size("char *"  SIZEOF_CHAR_P)
69 check_type_size("long" SIZEOF_LONG)
70 check_type_size("short" SIZEOF_SHORT)
71 check_type_size("size_t" SIZEOF_SIZE_T)
72 check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)