summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDenis Kozadaev <denis@dilos.org>2023-05-14 12:34:44 +0300
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-05-22 10:41:26 +0900
commite5acdb1b39fa7d97d7153741202709e078b463a6 (patch)
tree8fdda91a64ae0c7f35474d44e29139f38f297958 /CMakeLists.txt
parent394b5ef0fb0e0555d16bced7c4c2c1b2ac1a8463 (diff)
downloadtdelibs-e5acdb1b39fa7d97d7153741202709e078b463a6.tar.gz
tdelibs-e5acdb1b39fa7d97d7153741202709e078b463a6.zip
Add SunOS specific patches
Signed-off-by: Denis Kozadaev <denis@dilos.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 21 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5230577e3..cd431dfda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,7 @@ set( PACKAGE tdelibs )
include( FindPkgConfig )
include( CheckIncludeFile )
+include( CheckIncludeFiles )
include( CheckSymbolExists )
include( CheckFunctionExists )
include( CheckCSourceCompiles )
@@ -225,6 +226,7 @@ check_include_file( "dirent.h" HAVE_DIRENT_H )
check_include_file( "dld.h" HAVE_DLD_H )
check_include_file( "dlfcn.h" HAVE_DLFCN_H )
check_include_file( "dl.h" HAVE_DL_H )
+check_include_files( "sys/types.h;sys/dl.h" HAVE_SYS_DL_H )
check_include_file( "float.h" HAVE_FLOAT_H )
check_include_file( "fstab.h" HAVE_FSTAB_H )
check_include_file( "ieeefp.h" HAVE_IEEEFP_H )
@@ -237,6 +239,7 @@ check_include_file( "machine/soundcard.h" HAVE_MACHINE_SOUNDCARD_H )
check_include_file( "malloc.h" HAVE_MALLOC_H )
check_include_file( "memory.h" HAVE_MEMORY_H )
check_include_file( "mntent.h" HAVE_MNTENT_H )
+check_include_file( "sys/mntent.h" HAVE_SYS_MNTENT_H )
check_include_file( "ndir.h" HAVE_NDIR_H )
check_include_file( "netinet/in.h" HAVE_NETINET_IN_H )
check_include_file( "net/if.h" HAVE_NET_IF_H )
@@ -260,7 +263,7 @@ check_include_file( "sys/dir.h" HAVE_SYS_DIR_H )
check_include_file( "sys/filio.h" HAVE_SYS_FILIO_H )
check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H )
check_include_file( "sys/mntent.h" HAVE_SYS_MNTENT_H )
-check_include_file( "sys/mnttab.h" HAVE_SYS_MNTTAB_H )
+check_include_files( "stdio.h;sys/mnttab.h" HAVE_SYS_MNTTAB_H )
check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H )
if( NOT HAVE_SYS_MOUNT_H )
find_path( SYS_MOUNT_PATH "sys/mount.h" )
@@ -280,9 +283,16 @@ check_include_file( "sys/ucred.h" HAVE_SYS_UCRED_H )
if( NOT HAVE_SYS_UCRED_H )
find_path( SYS_UCRED_PATH "sys/ucred.h" )
if( SYS_UCRED_PATH )
- set( HAVE_SYS_UCRED_H "1" )
+ set( HAVE_SYS_UCRED_H 1 )
endif( )
endif( )
+check_include_file( "ucred.h" HAVE_UCRED_H )
+if( NOT HAVE_UCRED_H )
+ find_path( UCRED_PATH "ucred.h" )
+ if( UCRED_PATH )
+ set( HAVE_UCRED_H 1 )
+ endif()
+endif()
check_include_file( "sys/xattr.h" HAVE_SYS_XATTR_H )
check_include_file( "termios.h" HAVE_TERMIOS_H )
check_include_file( "termio.h" HAVE_TERMIO_H )
@@ -427,6 +437,7 @@ endif( HAVE_GETMNTINFO )
check_function_exists( getnameinfo HAVE_GETNAMEINFO )
check_function_exists( getpagesize HAVE_GETPAGESIZE )
check_function_exists( getpeereid HAVE_GETPEEREID )
+check_function_exists( getpeerucred HAVE_GETPEERUCRED )
check_function_exists( getpeername HAVE_GETPEERNAME )
check_function_exists( getprotobyname_r HAVE_GETPROTOBYNAME_R )
check_function_exists( getpt HAVE_GETPT )
@@ -466,6 +477,14 @@ check_function_exists( __argz_count HAVE___ARGZ_COUNT )
check_function_exists( __argz_next HAVE___ARGZ_NEXT )
check_function_exists( __argz_stringify HAVE___ARGZ_STRINGIFY )
check_function_exists( sendfile HAVE_SENDFILE )
+set( SENDFILE_LIBRARIES "" )
+if( NOT HAVE_SENDFILE)
+ check_library_exists( sendfile sendfile "" HAVE_SENDFILE_LIB )
+ if( HAVE_SENDFILE_LIB )
+ set( HAVE_SENDFILE 1 )
+ set( SENDFILE_LIBRARIES sendfile )
+ endif( HAVE_SENDFILE_LIB )
+endif()
check_function_exists( rindex HAVE_RINDEX )
check_function_exists( putenv HAVE_PUTENV )
check_function_exists( poll HAVE_POLL )