diff options
author | Slávek Banko <[email protected]> | 2015-06-14 21:22:33 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2015-06-14 21:23:08 +0200 |
commit | 3977c5503e8789a6b63c2dc5a59d7d33d15415f0 (patch) | |
tree | 1a7537706afd75e8002c013849190ab41d1a7fa4 /tdeioslave | |
parent | f3f4cad2713fd7adb639f449f61befa77d4763b8 (diff) | |
download | tdebase-3977c5503e8789a6b63c2dc5a59d7d33d15415f0.tar.gz tdebase-3977c5503e8789a6b63c2dc5a59d7d33d15415f0.zip |
Fix openpty detection with util.h and libutil.h
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 4e9aeea22462957753950edc3ccad2549009b178)
Diffstat (limited to 'tdeioslave')
-rw-r--r-- | tdeioslave/fish/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tdeioslave/fish/ConfigureChecks.cmake | 32 |
2 files changed, 23 insertions, 11 deletions
diff --git a/tdeioslave/fish/CMakeLists.txt b/tdeioslave/fish/CMakeLists.txt index b0498131a..f3fdc22e4 100644 --- a/tdeioslave/fish/CMakeLists.txt +++ b/tdeioslave/fish/CMakeLists.txt @@ -40,6 +40,6 @@ set( target tdeio_fish ) tde_add_kpart( ${target} AUTOMOC SOURCES fish.cpp - LINK tdeio-shared util + LINK tdeio-shared ${LIB_UTIL} DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/tdeioslave/fish/ConfigureChecks.cmake b/tdeioslave/fish/ConfigureChecks.cmake index 46ea1c181..0bdc0ffe9 100644 --- a/tdeioslave/fish/ConfigureChecks.cmake +++ b/tdeioslave/fish/ConfigureChecks.cmake @@ -18,15 +18,27 @@ check_include_file( pty.h HAVE_PTY_H ) tde_save( CMAKE_REQUIRED_LIBRARIES ) set( CMAKE_REQUIRED_LIBRARIES util ) -check_c_source_runs(" - #include <pty.h> - int main(int argc, char* argv) { - int master_fd, slave_fd; - int result; - result = openpty(&master_fd, &slave_fd, 0, 0, 0); - return 0; - }" - HAVE_OPENPTY -) +if( HAVE_PTY_H ) + set( USE_OPENPTY_H pty.h ) +elseif( HAVE_UTIL_H ) + set( USE_OPENPTY_H util.h ) +elseif( HAVE_LIBUTIL_H ) + set( USE_OPENPTY_H libutil.h ) +endif( ) +if( USE_OPENPTY_H ) + check_c_source_runs(" + #include <${USE_OPENPTY_H}> + int main(int argc, char* argv[]) { + int master_fd, slave_fd; + int result; + result = openpty(&master_fd, &slave_fd, 0, 0, 0); + return 0; + }" + HAVE_OPENPTY + ) +endif( ) +if( HAVE_OPENPTY ) + set( LIB_UTIL util ) +endif( ) tde_restore( CMAKE_REQUIRED_LIBRARIES ) |