Merge pull request #3942 from stapelberg/iconv

configure.ac: test for iconv_open with #include <iconv.h>
This commit is contained in:
Ingo Bürk 2020-02-16 18:50:54 +01:00 committed by GitHub
commit 2914c7fb43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -84,8 +84,11 @@ AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_ru
AC_SEARCH_LIBS([shm_open], [rt], [], [], [-pthread]) AC_SEARCH_LIBS([shm_open], [rt], [], [], [-pthread])
AC_SEARCH_LIBS([iconv_open], [iconv], , AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <iconv.h>], [iconv_open(0, 0)])], ,
AC_SEARCH_LIBS([libiconv_open], [iconv], , [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])])) [LIBS="-liconv $LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <iconv.h>], [iconv_open(0, 0)])], ,
[AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])])]
)
AX_PTHREAD AX_PTHREAD