diff configure.in @ 106:d63b130d8b24

- Added iconv tests for FreeBSD.
author jcid
date Sat, 19 Jan 2008 20:11:45 +0100
parents 6e6700dd252f
children 9478813e0c85
line wrap: on
line diff
--- a/configure.in	Sat Jan 19 14:20:52 2008 +0100
+++ b/configure.in	Sat Jan 19 20:11:45 2008 +0100
@@ -300,6 +300,17 @@
   AC_DEFINE([ENABLE_SSL], [], [Enable SSL support])
 fi
 
+dnl ----------------------
+dnl Test for iconv functionality in libc or for libiconv usability
+dnl ----------------------
+AC_CHECK_HEADER(iconv.h, iconv_ok=yes, iconv_ok=no)
+if test "x$iconv_ok" = "xyes"; then
+  AC_CHECK_LIB(c, iconv_open, LIBICONV_LIBS="",
+    AC_CHECK_LIB(iconv, iconv_open, LIBICONV_LIBS="-liconv", iconv_ok=no))
+fi
+if test "x$iconv_ok" = "xno"; then
+  AC_ERROR(libiconv must be installed!)
+fi
 
 dnl ----------------------
 dnl Test for POSIX threads
@@ -465,6 +476,7 @@
 AC_SUBST(LIBFLTK_CXXFLAGS)
 AC_SUBST(LIBFLTK_CFLAGS)
 AC_SUBST(LIBFLTK_LIBS)
+AC_SUBST(LIBICONV_LIBS)
 AC_SUBST(datadir)
 AC_SUBST(src doc)