2014-01-31 06:39:15 -07:00
|
|
|
include(CheckTypeSize)
|
2014-02-28 03:33:31 -07:00
|
|
|
include(CheckIncludeFiles)
|
|
|
|
include(CheckSymbolExists)
|
2014-01-31 11:10:18 -07:00
|
|
|
|
2014-01-31 06:39:15 -07:00
|
|
|
check_type_size("int" SIZEOF_INT)
|
|
|
|
check_type_size("long" SIZEOF_LONG)
|
|
|
|
check_type_size("time_t" SIZEOF_TIME_T)
|
|
|
|
check_type_size("off_t" SIZEOF_OFF_T)
|
|
|
|
|
2014-02-28 03:33:31 -07:00
|
|
|
check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H)
|
|
|
|
check_symbol_exists(_NSGetEnviron "crt_externs.h" HAVE__NSGETENVIRON)
|
|
|
|
|
2014-01-31 06:39:15 -07:00
|
|
|
# generate configuration header and update include directories
|
|
|
|
configure_file (
|
|
|
|
"${PROJECT_SOURCE_DIR}/config/config.h.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/config/auto/config.h"
|
|
|
|
)
|
|
|
|
# generate pathdef.c
|
|
|
|
find_program(WHOAMI_PROG whoami)
|
|
|
|
find_program(HOSTNAME_PROG hostname)
|
|
|
|
|
|
|
|
if (EXISTS ${WHOAMI_PROG})
|
|
|
|
execute_process(COMMAND ${WHOAMI_PROG}
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
OUTPUT_VARIABLE USERNAME)
|
|
|
|
endif()
|
|
|
|
if (EXISTS ${HOSTNAME_PROG})
|
|
|
|
execute_process(COMMAND ${HOSTNAME_PROG}
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
OUTPUT_VARIABLE HOSTNAME)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
configure_file (
|
|
|
|
"${PROJECT_SOURCE_DIR}/config/pathdef.c.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/config/auto/pathdef.c"
|
|
|
|
ESCAPE_QUOTES)
|