mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: fix build on FreeBSD (issue #2251)
Check if the resolv library is found before checking if it has res_init.
This commit is contained in:
+5
-3
@@ -227,9 +227,11 @@ check_symbol_exists("eat_newline_glitch" "term.h" HAVE_EAT_NEWLINE_GLITCH)
|
||||
check_function_exists(res_init, LIBC_HAS_RES_INIT)
|
||||
if(NOT LIBC_HAS_RES_INIT)
|
||||
find_library(RESOLV_LIBRARY resolv)
|
||||
check_library_exists("${RESOLV_LIBRARY}" res_init "" LIBRESOLV_HAS_RES_INIT)
|
||||
if(LIBRESOLV_HAS_RES_INIT)
|
||||
list(APPEND EXTRA_LIBS ${RESOLV_LIBRARY})
|
||||
if(RESOLV_LIBRARY)
|
||||
check_library_exists("${RESOLV_LIBRARY}" res_init "" LIBRESOLV_HAS_RES_INIT)
|
||||
if(LIBRESOLV_HAS_RES_INIT)
|
||||
list(APPEND EXTRA_LIBS ${RESOLV_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user