Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3942 from stapelberg/iconv
Browse files Browse the repository at this point in the history
configure.ac: test for iconv_open with #include <iconv.h>
  • Loading branch information
Airblader authored Feb 16, 2020
2 parents f517b5a + 91b00c5 commit 2914c7f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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([iconv_open], [iconv], ,
AC_SEARCH_LIBS([libiconv_open], [iconv], , [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])]))
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <iconv.h>], [iconv_open(0, 0)])], ,
[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

Expand Down

0 comments on commit 2914c7f

Please sign in to comment.