Line 0
Link Here
|
|
|
1 |
# - Find obstack |
2 |
# Figure out if obstack is in glibc or if it musl-obstack or elsewhere |
3 |
# |
4 |
# OBSTACK_LIBRARY - Library to use obstack |
5 |
# OBSTACK_FOUND - True if found. |
6 |
message(STATUS "Checking availability of obstack library") |
7 |
INCLUDE(CheckLibraryExists) |
8 |
if (OBSTACK_LIBRARY) |
9 |
# Already in cache, be silent |
10 |
set(OBSTACK_FIND_QUIETLY TRUE) |
11 |
endif (OBSTACK_LIBRARY) |
12 |
find_library(OBSTACK_LIBRARY |
13 |
NAMES obstack |
14 |
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 ~/usr/local/lib ~/usr/local/lib64 |
15 |
) |
16 |
if (OBSTACK_LIBRARY) |
17 |
set(OBSTACK_FOUND TRUE) |
18 |
set(OBSTACK_LIBRARY ${OBSTACK_LIBRARY}) |
19 |
set(CMAKE_REQUIRED_LIBRARIES ${OBSTACK_LIBRARY}) |
20 |
else (OBSTACK_LIBRARY) |
21 |
set(OBSTACK_LIBRARY "") |
22 |
endif (OBSTACK_LIBRARY) |
23 |
if (OBSTACK_FOUND) |
24 |
if (NOT OBSTACK_FIND_QUIETLY) |
25 |
message(STATUS "Found obstack library: ${OBSTACK_LIBRARY}") |
26 |
endif (NOT OBSTACK_FIND_QUIETLY) |
27 |
else (OBSTACK_FOUND) |
28 |
set(OBSTACK_FOUND TRUE) |
29 |
message(STATUS "Assuming obstack is in libc") |
30 |
endif (OBSTACK_FOUND) |
31 |
mark_as_advanced(OBSTACK_LIBRARY) |
32 |
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/config.h) |
33 |
message(STATUS "Checking availability of obstack library - done") |