diff options
author | Julian Andres Klode <jak@debian.org> | 2016-08-23 13:42:54 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-08-26 15:49:14 +0200 |
commit | ad5282bb0c97fd0254b20fb71a59d0f755c3ed65 (patch) | |
tree | 55af94cc08cc0e0ab1e8d3e2c9c1ff8d6d52e618 /CMakeLists.txt | |
parent | 374ab017c262108c0f12bcdc8d15ff242c7adc56 (diff) |
CMake: Do not use -lresolv if res_init exists in libc
Gbp-Dch: ignore
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 08e431740..8c41534ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,6 +143,14 @@ if (NOT HAVE_SIGHANDLER_T) endif() endif() +# Handle resolving +check_function_exists(res_init HAVE_LIBC_RESOLV) +if(HAVE_LIBC_RESOLV) + set(RESOLV_LIBRARIES) +else() + set(RESOLV_LIBRARIES -lresolv) +endif() + # Configure some variables like package, version and architecture. set(PACKAGE ${PROJECT_NAME}) set(PACKAGE_MAIL "APT Development Team <deity@lists.debian.org>") |