1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00

Merge branch 'master' of git://git.omp.am/conky

This commit is contained in:
Nikolas Garofil 2012-07-25 21:34:32 +02:00
commit 79636ef8dd
3 changed files with 19 additions and 16 deletions

View File

@ -64,8 +64,9 @@ find_package(Threads)
set(conky_libs ${CMAKE_THREAD_LIBS_INIT})
set(conky_includes ${CMAKE_BINARY_DIR})
add_definitions(-D_LARGEFILE64_SOURCE) # Standard definitions
set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_LARGEFILE64_SOURCE")
add_definitions(-D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L) # Standard definitions
set(CMAKE_REQUIRED_DEFINITIONS
"${CMAKE_REQUIRED_DEFINITIONS} -D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L")
if(OS_DRAGONFLY)
set(conky_libs ${conky_libs} -L/usr/pkg/lib)
@ -128,18 +129,19 @@ macro(AC_SEARCH_LIBS FUNCTION_NAME INCLUDES TARGET_VAR)
check_symbol_exists(${FUNCTION_NAME} ${INCLUDES} AC_SEARCH_LIBS_TMP)
if(${AC_SEARCH_LIBS_TMP})
set(${TARGET_VAR} "" CACHE INTERNAL "Library containing ${FUNCTION_NAME}")
return()
else(${AC_SEARCH_LIBS_TMP})
foreach(LIB ${ARGN})
unset(AC_SEARCH_LIBS_TMP CACHE)
unset(AC_SEARCH_LIBS_FOUND CACHE)
find_library(AC_SEARCH_LIBS_TMP ${LIB})
check_library_exists(${LIB} ${FUNCTION_NAME} ${AC_SEARCH_LIBS_TMP}
AC_SEARCH_LIBS_FOUND)
if(${AC_SEARCH_LIBS_FOUND})
set(${TARGET_VAR} ${AC_SEARCH_LIBS_TMP} CACHE INTERNAL
"Library containing ${FUNCTION_NAME}")
break()
endif(${AC_SEARCH_LIBS_FOUND})
endforeach(LIB)
endif(${AC_SEARCH_LIBS_TMP})
foreach(LIB ${ARGN})
unset(AC_SEARCH_LIBS_TMP CACHE)
unset(AC_SEARCH_LIBS_FOUND CACHE)
find_library(AC_SEARCH_LIBS_TMP ${LIB})
check_library_exists(${LIB} ${FUNCTION_NAME} ${AC_SEARCH_LIBS_TMP} AC_SEARCH_LIBS_FOUND)
if(${AC_SEARCH_LIBS_FOUND})
set(${TARGET_VAR} ${AC_SEARCH_LIBS_TMP} CACHE INTERNAL "Library containing ${FUNCTION_NAME}")
break()
endif(${AC_SEARCH_LIBS_FOUND})
endforeach(LIB)
endif("${TARGET_VAR}" MATCHES "^${TARGET_VAR}$")
endmacro(AC_SEARCH_LIBS)

View File

@ -39,9 +39,9 @@ check_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)
check_symbol_exists(statfs64 "sys/statfs.h" HAVE_STATFS64)
AC_SEARCH_LIBS(clock_gettime "time.h" CLOCK_GETTIME_LIB "rt")
if(NOT CLOCK_GETTIME_LIB)
if(NOT DEFINED CLOCK_GETTIME_LIB)
message(FATAL_ERROR "clock_gettime not found.")
endif(NOT CLOCK_GETTIME_LIB)
endif(NOT DEFINED CLOCK_GETTIME_LIB)
set(conky_libs ${conky_libs} ${CLOCK_GETTIME_LIB})
# standard path to search for includes

View File

@ -25,6 +25,7 @@
#define SEMAPHORE_HH
#include <cerrno>
#include <cstdlib>
#include <cstring>
#include <stdexcept>