This is an automated email from the git hooks/post-receive script. thansen pushed a commit to branch master in repository aseprite.
commit a22039cd16193b29b0ab165e92b434398e5da605 Author: David Capello <[email protected]> Date: Tue Mar 1 09:16:19 2016 -0300 Check dl library existence (fix #990) As FreeBSD includes dl functions in libc, dl library doesn't exist. (dlfcn.h header file must exist anyway.) --- src/base/CMakeLists.txt | 12 +++++++++++- src/base/config.h.cmakein | 3 ++- src/base/dll_unix.h | 7 ++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 77c1424..dbd6b13 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -20,6 +20,13 @@ int main() { } " HAVE_SCHED_YIELD) +check_c_source_compiles(" +#include <dlfcn.h> +int main() { + return 0; +} +" HAVE_DLFCN_H) + check_c_source_runs(" int main() { unsigned long value = 0x40302010ul; @@ -85,5 +92,8 @@ target_link_libraries(base-lib modp_b64) if(WIN32) target_link_libraries(base-lib dbghelp shlwapi) else() - target_link_libraries(base-lib dl) + find_library(DL_LIBRARY NAMES dl) + if(DL_LIBRARY_FOUND) + target_link_libraries(base-lib ${DL_LIBRARY}) + endif() endif() diff --git a/src/base/config.h.cmakein b/src/base/config.h.cmakein index ef43fb0..2684d7c 100644 --- a/src/base/config.h.cmakein +++ b/src/base/config.h.cmakein @@ -1,5 +1,5 @@ // Aseprite Base Library -*- C++ -*- -// Copyright (c) 2001-2015 David Capello +// Copyright (c) 2001-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -10,6 +10,7 @@ #cmakedefine HAVE_STDINT_H #cmakedefine HAVE_SCHED_YIELD +#cmakedefine HAVE_DLFCN_H #cmakedefine ASEPRITE_LITTLE_ENDIAN #cmakedefine ASEPRITE_BIG_ENDIAN diff --git a/src/base/dll_unix.h b/src/base/dll_unix.h index 127b283..8ea4294 100644 --- a/src/base/dll_unix.h +++ b/src/base/dll_unix.h @@ -5,7 +5,12 @@ // Read LICENSE.txt for more information. #include "base/string.h" -#include <dlfcn.h> + +#ifdef HAVE_DLFCN_H + #include <dlfcn.h> +#else + #error dlfcn.h is needed or include a file that defines dlopen/dlclose +#endif namespace base { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

