--- CMakeLists.txt.orig	2021-11-05 17:23:17 UTC
+++ CMakeLists.txt
@@ -521,6 +521,7 @@ endif(WITH_LIBDB)
 # ******************************
 
 set(CMAKE_REQUIRED_LIBRARIES "-liconv")
+set(CMAKE_REQUIRED_FLAGS "-L/usr/local/lib")
 CHECK_C_SOURCE_COMPILES("#include <iconv.h>
 			#include <stdlib.h>
 			int main(void) { iconv_t cd; cd = iconv_open (\"UTF-8\", \"ISO-8859-1\"); return 0; }" HAVE_LIBICONV)
