diff options
Diffstat (limited to 'config/CMakeLists.txt')
-rw-r--r-- | config/CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index e794a8c5b9..c3643db205 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -26,13 +26,17 @@ if(NOT HAVE_SYS_WAIT_H AND UNIX) message(SEND_ERROR "header sys/wait.h is required for Unix") endif() check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) +check_include_files(termios.h HAVE_TERMIOS_H) check_include_files(utime.h HAVE_UTIME_H) +check_include_files(sys/uio.h HAVE_SYS_UIO_H) # Functions check_function_exists(fseeko HAVE_FSEEKO) check_function_exists(getpwent HAVE_GETPWENT) check_function_exists(getpwnam HAVE_GETPWNAM) check_function_exists(getpwuid HAVE_GETPWUID) +check_function_exists(uv_translate_sys_error HAVE_UV_TRANSLATE_SYS_ERROR) +check_function_exists(readv HAVE_READV) if(Iconv_FOUND) set(HAVE_ICONV 1) @@ -139,12 +143,16 @@ configure_file ( find_program(WHOAMI_PROG whoami) find_program(HOSTNAME_PROG hostname) -if (NOT DEFINED USERNAME AND EXISTS ${WHOAMI_PROG}) +if (DEFINED ENV{USERNAME}) + set(USERNAME $ENV{USERNAME}) +elseif (NOT DEFINED USERNAME AND EXISTS ${WHOAMI_PROG}) execute_process(COMMAND ${WHOAMI_PROG} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE USERNAME) endif() -if (EXISTS ${HOSTNAME_PROG}) +if (DEFINED ENV{HOSTNAME}) + set(HOSTNAME $ENV{HOSTNAME}) +elseif (EXISTS ${HOSTNAME_PROG}) execute_process(COMMAND ${HOSTNAME_PROG} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE HOSTNAME) |