Final polisihing for KDE4:
[kdemultimedia.git] / ConfigureChecks.cmake
blob80a92576203cea0528c5f7688c49a9320525eaa6
1 include(CheckIncludeFiles)
2 include(CheckTypeSize)
3 include(CheckStructMember)
4 include(MacroBoolTo01)
6 # The FindKDE4.cmake module sets _KDE4_PLATFORM_DEFINITIONS with
7 # definitions like _GNU_SOURCE that are needed on each platform.
8 set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
10 macro_bool_to_01(CARBON_FOUND HAVE_CARBON)
12 macro_bool_to_01(AKODE_FOUND HAVE_AKODE)
14 macro_bool_to_01(OGGVORBIS_FOUND HAVE_VORBIS)
16 macro_bool_to_01(X11_XShm_FOUND  HAVE_XSHMGETEVENTBASE)
18 MACRO_PUSH_REQUIRED_VARS()
19 SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/include/cdda)
20 check_struct_member("struct cdrom_drive" "ioctl_device_name" "cdda_interface.h" CDDA_IOCTL_DEVICE_EXISTS)
21 MACRO_POP_REQUIRED_VARS()
22 macro_bool_to_01(CDDA_IOCTL_DEVICE_EXISTS HAVE_CDDA_IOCTL_DEVICE)
24 #now check for dlfcn.h using the cmake supplied CHECK_include_FILE() macro
25 # If definitions like -D_GNU_SOURCE are needed for these checks they
26 # should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
27 # defined outside this file.  Here we include these definitions in
28 # CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
29 # checks below.
30 set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
31 if (WIN32)
32    set(CMAKE_REQUIRED_LIBRARIES ${KDEWIN32_LIBRARIES} )
33    set(CMAKE_REQUIRED_INCLUDES  ${KDEWIN32_INCLUDES} )
34 endif (WIN32)
36 check_include_files(machine/soundcard.h HAVE_MACHINE_SOUNDCARD_H)
37 check_include_files(soundcard.h HAVE_SOUNDCARD_H)
38 check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
39 check_include_files(sys/stat.h HAVE_SYS_STAT_H)
40 check_include_files(linux/cdrom.h HAVE_LINUX_CDROM_H)
41 check_include_files(linux/ucdrom.h HAVE_LINUX_UCDROM_H)
42 check_include_files(machine/endian.h HAVE_MACHINE_ENDIAN_H)
43 check_include_files(sys/audioio.h HAVE_SYS_AUDIOIO_H)
44 check_include_files(Alib.h HAVE_ALIB_H)
45 check_include_files(alloca.h HAVE_ALLOCA_H)
46 # Linux has <endian.h>, FreeBSD has <sys/endian.h> and Solaris has neither.
47 check_include_files(endian.h HAVE_ENDIAN_H)
48 check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
50 check_type_size("long" SIZEOF_LONG)