From: Matthias Braun Date: Fri, 10 Dec 2004 21:52:13 +0000 (+0000) Subject: fix for people without libiconv in glibc X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b7257628126eb59bdca2052e9369d61edcda6b0f;p=supertux.git fix for people without libiconv in glibc SVN-Revision: 2252 --- diff --git a/configure.ac b/configure.ac index ca7065c0d..65568c034 100644 --- a/configure.ac +++ b/configure.ac @@ -79,9 +79,15 @@ else AC_MSG_RESULT([no]) fi -AC_CHECK_LIB([iconv], [iconv_open]) -AC_TRY_LINK([#include ], [iconv_open(0, 0);],, - AC_MSG_ERROR([Couldn't find iconv library])) +iconv_found=no +AC_MSG_CHECKING([for iconv]) +AC_TRY_LINK([#include ], [iconv_open(0, 0);], [iconv_found="yes"]) +AS_IF([test "$iconv_found" = no], + LIBS="$LIBS -liconv" + AC_TRY_LINK([#include ], [iconv_open(0, 0);], [iconv_found="yes"])) +AS_IF([test "$iconv_found" = no], + AC_MSG_ERROR([Couldn't find iconv library]), + AC_MSG_RESULT([found])) dnl =========================================================================== dnl Check for SDL