1
0
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:
Sébastien Helleu
2025-05-25 09:44:06 +02:00
parent e8ce75f20c
commit 75c01e8c8d
+5 -3
View File
@@ -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()