From e1f58a92301cffe97e497e280b686b0bec39449c Mon Sep 17 00:00:00 2001 From: pino Date: Wed, 7 Feb 2007 12:16:50 +0000 Subject: [PATCH] - remove FindAlsa and its config-alsa.h skeleton, already provided by kdelibs - move all the kttsd-specific configure checks into an own file, using an own config-kttsd.h - remove the kdeaccessibility global config.h and ConfigureChecks.cmake, no more needed git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeaccessibility@631216 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- CMakeLists.txt | 3 --- ConfigureChecks.cmake | 28 ------------------------- cmake/modules/FindAlsa.cmake | 36 --------------------------------- cmake/modules/config-alsa.h.cmake | 34 ------------------------------- config.h.cmake | 19 ----------------- kttsd/CMakeLists.txt | 4 ++++ kttsd/KttsdConfigureChecks.cmake | 5 +++++ kttsd/config-kttsd.h.cmake | 6 ++++++ kttsd/players/alsaplayer/alsaplayer.cpp | 2 +- 9 files changed, 16 insertions(+), 121 deletions(-) delete mode 100644 ConfigureChecks.cmake delete mode 100644 cmake/modules/FindAlsa.cmake delete mode 100644 cmake/modules/config-alsa.h.cmake delete mode 100644 config.h.cmake create mode 100644 kttsd/KttsdConfigureChecks.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 92cb67f8..bc563258 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,9 +22,6 @@ add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) -include (ConfigureChecks.cmake) -configure_file (config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ) - FIND_PATH( KICKER_INCLUDE_DIR plasma/kpanelapplet.h ${KDE4_INCLUDE_DIR} /usr/include diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake deleted file mode 100644 index 52815ff8..00000000 --- a/ConfigureChecks.cmake +++ /dev/null @@ -1,28 +0,0 @@ -include(CheckIncludeFile) -include(CheckIncludeFiles) -include(CheckSymbolExists) -include(CheckFunctionExists) -include(CheckLibraryExists) -include(CheckPrototypeExists) -include(CheckTypeSize) - -# The FindKDE4.cmake module sets _KDE4_PLATFORM_DEFINITIONS with -# definitions like _GNU_SOURCE that are needed on each platform. -set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS}) - -#now check for dlfcn.h using the cmake supplied CHECK_include_FILE() macro -# If definitions like -D_GNU_SOURCE are needed for these checks they -# should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally -# defined outside this file. Here we include these definitions in -# CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of -# checks below. -set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS}) -if (WIN32) - set(CMAKE_REQUIRED_LIBRARIES ${KDEWIN32_LIBRARIES} ) - set(CMAKE_REQUIRED_INCLUDES ${KDEWIN32_INCLUDES} ) -endif (WIN32) - -check_include_files(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H) -check_include_files(sys/asoundlib.h HAVE_SYS_ASOUNDLIB_H) -check_include_files(sys/time.h HAVE_SYS_TIME_H) -check_include_files("sys/time.h;time.h" TIME_WITH_SYS_TIME) diff --git a/cmake/modules/FindAlsa.cmake b/cmake/modules/FindAlsa.cmake deleted file mode 100644 index e11aa530..00000000 --- a/cmake/modules/FindAlsa.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# David Faure , 2006 -# Alsa check, based on libkmid/configure.in.in. -# Only the support for Alsa >= 0.9.x was included; 0.5.x was dropped (but feel free to re-add it if you need it) - -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -include(CheckIncludeFiles) -include(CheckLibraryExists) - -# Already done by toplevel -#check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H) -#check_include_files(machine/soundcard.h HAVE_MACHINE_SOUNDCARD_H) - -check_include_files(linux/awe_voice.h HAVE_LINUX_AWE_VOICE_H) -check_include_files(awe_voice.h HAVE_AWE_VOICE_H) -check_include_files(/usr/src/sys/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H) -check_include_files(/usr/src/sys/gnu/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H) - -check_include_files(sys/asoundlib.h HAVE_SYS_ASOUNDLIB_H) -check_include_files(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H) - -check_library_exists(asound snd_seq_create_simple_port "" HAVE_LIBASOUND2) -if(HAVE_LIBASOUND2) - set(ASOUND_LIBRARY "asound") - check_library_exists(asound snd_pcm_resume ${ASOUND_LIBRARY} ASOUND_HAS_SND_PCM_RESUME) - message(STATUS "Found ALSA: ${ASOUND_LIBRARY}") - if(ASOUND_HAS_SND_PCM_RESUME) - set(HAVE_SND_PCM_RESUME 1) - endif(ASOUND_HAS_SND_PCM_RESUME) -else(HAVE_LIBASOUND2) - message(STATUS "ALSA not found") -endif(HAVE_LIBASOUND2) - -configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/config-alsa.h.cmake ${CMAKE_BINARY_DIR}/config-alsa.h ) diff --git a/cmake/modules/config-alsa.h.cmake b/cmake/modules/config-alsa.h.cmake deleted file mode 100644 index 9c9e1683..00000000 --- a/cmake/modules/config-alsa.h.cmake +++ /dev/null @@ -1,34 +0,0 @@ -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LINUX_AWE_VOICE_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_AWE_VOICE_H 1 - -/* Define to 1 if you have the - header file. */ -#cmakedefine HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H - -/* Define to 1 if you have the - header file. */ -#cmakedefine HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_AWE_VOICE_H 1 - - - -/* Define if you have libasound.so.1 (for ALSA 0.5.x support - disabled now) */ -/* #undef HAVE_LIBASOUND */ - -/* Define if you have libasound.so.2 (required for ALSA 0.9.x support) */ -#cmakedefine HAVE_LIBASOUND2 1 - -/* Define if libasound has snd_pcm_resume() */ -#cmakedefine HAVE_SND_PCM_RESUME 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_ALSA_ASOUNDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_ASOUNDLIB_H 1 - diff --git a/config.h.cmake b/config.h.cmake deleted file mode 100644 index e7411636..00000000 --- a/config.h.cmake +++ /dev/null @@ -1,19 +0,0 @@ -/* config.h. Generated by cmake from config.h.cmake */ - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_ASOUNDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TIME_H 1 - -/* Name of package */ -#define PACKAGE "kdeaccessibility" - -/* Define to 1 if you can safely include both and . */ -#cmakedefine TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define VERSION "1.0.0" - - - diff --git a/kttsd/CMakeLists.txt b/kttsd/CMakeLists.txt index f4ec07b7..6290391e 100644 --- a/kttsd/CMakeLists.txt +++ b/kttsd/CMakeLists.txt @@ -1,7 +1,11 @@ project(kttsd) +include(KttsdConfigureChecks.cmake) + configure_file (config-kttsd.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kttsd.h ) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + add_subdirectory( libkttsd ) add_subdirectory( players ) add_subdirectory( plugins ) diff --git a/kttsd/KttsdConfigureChecks.cmake b/kttsd/KttsdConfigureChecks.cmake new file mode 100644 index 00000000..a8c27cd4 --- /dev/null +++ b/kttsd/KttsdConfigureChecks.cmake @@ -0,0 +1,5 @@ +include(CheckIncludeFile) +include(CheckIncludeFiles) + +check_include_files(sys/time.h HAVE_SYS_TIME_H) +check_include_files("sys/time.h;time.h" TIME_WITH_SYS_TIME) diff --git a/kttsd/config-kttsd.h.cmake b/kttsd/config-kttsd.h.cmake index 2db98041..faf355f4 100644 --- a/kttsd/config-kttsd.h.cmake +++ b/kttsd/config-kttsd.h.cmake @@ -7,3 +7,9 @@ /* Define if you have libasound.so.2 (required for ALSA 0.9.x/1.x support) */ #define HAVE_LIBASOUND2 1 +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIME_H 1 + +/* Define to 1 if you can safely include both and . */ +#cmakedefine TIME_WITH_SYS_TIME 1 + diff --git a/kttsd/players/alsaplayer/alsaplayer.cpp b/kttsd/players/alsaplayer/alsaplayer.cpp index ae780699..dd9be1ed 100644 --- a/kttsd/players/alsaplayer/alsaplayer.cpp +++ b/kttsd/players/alsaplayer/alsaplayer.cpp @@ -26,7 +26,7 @@ // #include // System includes. -#include +#include #if TIME_WITH_SYS_TIME # include # include -- 2.11.4.GIT