diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 41a4ed3ad..7f7acf0b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -487,14 +487,10 @@ check_function_exists( madvise HAVE_MADVISE ) check_function_exists( getgroups HAVE_GETGROUPS ) check_symbol_exists( posix_fadvise "fcntl.h" HAVE_FADVISE ) check_function_exists( getcwd HAVE_GETCWD ) +tde_save_and_set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS} ) +check_function_exists( dlopen HAVE_LIBDL check_function_exists( dlerror HAVE_DLERROR ) -if( NOT HAVE_DLERROR ) - check_library_exists( dl dlerror "" HAVE_DLERROR_LIB ) - if( HAVE_DLERROR_LIB ) - set( HAVE_DLERROR 1 ) - set( DLERROR_LIBRARIES dl ) - endif( HAVE_DLERROR_LIB ) -endif( NOT HAVE_DLERROR ) +tde_restore( CMAKE_REQUIRED_LIBRARIES ) check_function_exists( crypt HAVE_CRYPT ) if( NOT HAVE_CRYPT ) check_library_exists( crypt crypt "" HAVE_CRYPT_LIB ) @@ -652,20 +648,6 @@ if( WITH_TDEHWLIB ) endif( WITH_TDEHWLIB ) -##### check for libdl ########################### - -set( DL_LIBRARIES dl ) -check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL ) -if( NOT HAVE_LIBDL ) - unset( DL_LIBRARIES ) - check_function_exists( dlopen HAVE_DLOPEN ) - if( HAVE_DLOPEN ) - set( HAVE_LIBDL 1 ) - endif( HAVE_DLOPEN ) -endif( NOT HAVE_LIBDL ) -check_library_exists( dld, dld_link "" HAVE_DLD ) - - ##### check for magic ########################### set( MAGIC_LIBRARIES magic ) |