Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 270276
Collapse All | Expand All

(-)kdelibs-4.2.85.orig/ConfigureChecks.cmake (-2 / +10 lines)
Lines 6-11 Link Here
6
include(CheckIncludeFile)
6
include(CheckIncludeFile)
7
include(CheckIncludeFiles)
7
include(CheckIncludeFiles)
8
include(CheckSymbolExists)
8
include(CheckSymbolExists)
9
include(CheckCXXSymbolExists)
9
include(CheckFunctionExists)
10
include(CheckFunctionExists)
10
include(CheckLibraryExists)
11
include(CheckLibraryExists)
11
include(CheckPrototypeExists)
12
include(CheckPrototypeExists)
Lines 232-238 Link Here
232
check_function_exists(random     HAVE_RANDOM)            # kdecore/fakes.c
233
check_function_exists(random     HAVE_RANDOM)            # kdecore/fakes.c
233
check_function_exists(strlcpy    HAVE_STRLCPY)           # kdecore/fakes.c
234
check_function_exists(strlcpy    HAVE_STRLCPY)           # kdecore/fakes.c
234
check_function_exists(strlcat    HAVE_STRLCAT)           # kdecore/fakes.c
235
check_function_exists(strlcat    HAVE_STRLCAT)           # kdecore/fakes.c
235
check_function_exists(strcasestr HAVE_STRCASESTR)        # kdecore/fakes.c
236
check_cxx_symbol_exists(__CORRECT_ISO_CPP_STRING_H_PROTO "string.h" HAVE_STRCASESTR_OVERLOAD) # glibc-2.9 strangeness
237
if (HAVE_STRCASESTR_OVERLOAD)
238
  message(STATUS "string.h defines __CORRECT_ISO_CPP_STRING_H_PROTO")
239
  set(HAVE_STRCASESTR 1)
240
  set(HAVE_STRCASESTR_PROTO 1)
241
else()
242
  check_function_exists(strcasestr HAVE_STRCASESTR)        # kdecore/fakes.c
243
  check_prototype_exists(strcasestr string.h          HAVE_STRCASESTR_PROTO)
244
endif()
236
check_function_exists(setenv     HAVE_SETENV)            # kdecore/fakes.c
245
check_function_exists(setenv     HAVE_SETENV)            # kdecore/fakes.c
237
check_function_exists(seteuid    HAVE_SETEUID)           # kdecore/fakes.c
246
check_function_exists(seteuid    HAVE_SETEUID)           # kdecore/fakes.c
238
check_function_exists(setmntent  HAVE_SETMNTENT)         # solid, kio, kdecore
247
check_function_exists(setmntent  HAVE_SETMNTENT)         # solid, kio, kdecore
Lines 245-251 Link Here
245
check_prototype_exists(mkdtemp "stdlib.h;unistd.h"  HAVE_MKDTEMP_PROTO)
254
check_prototype_exists(mkdtemp "stdlib.h;unistd.h"  HAVE_MKDTEMP_PROTO)
246
check_prototype_exists(mkstemp "stdlib.h;unistd.h"  HAVE_MKSTEMP_PROTO)
255
check_prototype_exists(mkstemp "stdlib.h;unistd.h"  HAVE_MKSTEMP_PROTO)
247
check_prototype_exists(strlcat string.h             HAVE_STRLCAT_PROTO)
256
check_prototype_exists(strlcat string.h             HAVE_STRLCAT_PROTO)
248
check_prototype_exists(strcasestr string.h          HAVE_STRCASESTR_PROTO)
249
check_prototype_exists(strlcpy string.h             HAVE_STRLCPY_PROTO)
257
check_prototype_exists(strlcpy string.h             HAVE_STRLCPY_PROTO)
250
check_prototype_exists(random stdlib.h              HAVE_RANDOM_PROTO)
258
check_prototype_exists(random stdlib.h              HAVE_RANDOM_PROTO)
251
check_prototype_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT_PROTO)
259
check_prototype_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT_PROTO)
(-)kdelibs-4.2.85.orig/cmake/modules/CheckCXXSymbolExists.cmake (+71 lines)
Line 0 Link Here
1
# - Check if the symbol exists in include files, in C++ mode
2
# Forked off cmake's CheckSymbolExists.cmake
3
# CHECK_CXX_SYMBOL_EXISTS(SYMBOL FILES VARIABLE)
4
#
5
#  SYMBOL   - symbol
6
#  FILES    - include files to check
7
#  VARIABLE - variable to return result
8
#
9
# The following variables may be set before calling this macro to
10
# modify the way the check is run:
11
#
12
#  CMAKE_REQUIRED_FLAGS = string of compile command line flags
13
#  CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
14
#  CMAKE_REQUIRED_INCLUDES = list of include directories
15
#  CMAKE_REQUIRED_LIBRARIES = list of libraries to link
16
17
MACRO(CHECK_CXX_SYMBOL_EXISTS SYMBOL FILES VARIABLE)
18
  IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
19
    SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
20
    SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
21
    IF(CMAKE_REQUIRED_LIBRARIES)
22
      SET(CHECK_SYMBOL_EXISTS_LIBS 
23
        "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
24
    ELSE(CMAKE_REQUIRED_LIBRARIES)
25
      SET(CHECK_SYMBOL_EXISTS_LIBS)
26
    ENDIF(CMAKE_REQUIRED_LIBRARIES)
27
    IF(CMAKE_REQUIRED_INCLUDES)
28
      SET(CMAKE_SYMBOL_EXISTS_INCLUDES
29
        "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
30
    ELSE(CMAKE_REQUIRED_INCLUDES)
31
      SET(CMAKE_SYMBOL_EXISTS_INCLUDES)
32
    ENDIF(CMAKE_REQUIRED_INCLUDES)
33
    FOREACH(FILE ${FILES})
34
      SET(CMAKE_CONFIGURABLE_FILE_CONTENT
35
        "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
36
    ENDFOREACH(FILE)
37
    SET(CMAKE_CONFIGURABLE_FILE_CONTENT
38
      "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n#ifndef ${SYMBOL}\n  cmakeRequireSymbol(0,&${SYMBOL});\n#endif\n  return 0;\n}\n")
39
40
    CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
41
      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx" @ONLY)
42
43
    MESSAGE(STATUS "Looking for ${SYMBOL}")
44
    TRY_COMPILE(${VARIABLE}
45
      ${CMAKE_BINARY_DIR}
46
      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx
47
      COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
48
      CMAKE_FLAGS 
49
      -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS}
50
      "${CHECK_SYMBOL_EXISTS_LIBS}"
51
      "${CMAKE_SYMBOL_EXISTS_INCLUDES}"
52
      OUTPUT_VARIABLE OUTPUT)
53
    IF(${VARIABLE})
54
      MESSAGE(STATUS "Looking for ${SYMBOL} - found")
55
      SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
56
      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 
57
        "Determining if the ${SYMBOL} "
58
        "exist passed with the following output:\n"
59
        "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx:\n"
60
        "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
61
    ELSE(${VARIABLE})
62
      MESSAGE(STATUS "Looking for ${SYMBOL} - not found.")
63
      SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
64
      FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 
65
        "Determining if the ${SYMBOL} "
66
        "exist failed with the following output:\n"
67
        "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.cxx:\n"
68
        "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
69
    ENDIF(${VARIABLE})
70
  ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
71
ENDMACRO(CHECK_CXX_SYMBOL_EXISTS)

Return to bug 270276