fix for people without libiconv in glibc
authorMatthias Braun <matze@braunis.de>
Fri, 10 Dec 2004 21:52:13 +0000 (21:52 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 10 Dec 2004 21:52:13 +0000 (21:52 +0000)
SVN-Revision: 2252

configure.ac

index ca7065c..65568c0 100644 (file)
@@ -79,9 +79,15 @@ else
     AC_MSG_RESULT([no])
 fi
 
-AC_CHECK_LIB([iconv], [iconv_open])
-AC_TRY_LINK([#include <iconv.h>], [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.h>], [iconv_open(0, 0);], [iconv_found="yes"])
+AS_IF([test "$iconv_found" = no],
+    LIBS="$LIBS -liconv"
+    AC_TRY_LINK([#include <iconv.h>], [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