diff options
author | Andreas Schneider <asn@samba.org> | 2019-02-15 13:26:42 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2019-02-28 12:49:23 +0100 |
commit | 36fe8b5c55f791154103a7aa3737261b6608b728 (patch) | |
tree | 58425148531b5fb6bd2762ad4c3581d2d1007112 | |
parent | f67c82ec074444b25b0c4f51013c9804ebd8aff3 (diff) | |
download | nss_wrapper-36fe8b5c55f791154103a7aa3737261b6608b728.tar.gz nss_wrapper-36fe8b5c55f791154103a7aa3737261b6608b728.tar.xz nss_wrapper-36fe8b5c55f791154103a7aa3737261b6608b728.zip |
cmake: Fix configure check for libdl
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r-- | ConfigureChecks.cmake | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 2d90f8f..040aaee 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -259,11 +259,15 @@ int main(void) { return 0; }" HAVE_DESTRUCTOR_ATTRIBUTE) -check_library_exists(dl dlopen "" HAVE_LIBDL) -if (HAVE_LIBDL) - find_library(DLFCN_LIBRARY dl) +find_library(DLFCN_LIBRARY dl) +if (DLFCN_LIBRARY) list(APPEND _REQUIRED_LIBRARIES ${DLFCN_LIBRARY}) -endif (HAVE_LIBDL) +else() + check_function_exists(dlopen HAVE_DLOPEN) + if (NOT HAVE_DLOPEN) + message(FATAL_ERROR "FATAL: No dlopen() function detected") + endif() +endif() # ENDIAN if (NOT WIN32) |