changeset 106:d63b130d8b24

- Added iconv tests for FreeBSD.
author jcid
date Sat, 19 Jan 2008 20:11:45 +0100
parents 73cc1bdeb695
children 32abda14aa0a
files ChangeLog configure.in src/Makefile.am
diffstat 3 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Jan 19 14:20:52 2008 +0100
+++ b/ChangeLog	Sat Jan 19 20:11:45 2008 +0100
@@ -110,7 +110,7 @@
  - Made dialogs use font_factor (e.g. view source).
  - Implemented the SELECT element in FORMS!
    Patches: Jeremy Henty
-+- Added an int32_t include-test, and an EAI_NODATA check for FreeBSD.
++- Added int32_t, EAI_NODATA and iconv tests for FreeBSD.
    Patch: Thomas-Martin Seck
 
  TODO:
--- 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)
 
--- a/src/Makefile.am	Sat Jan 19 14:20:52 2008 +0100
+++ b/src/Makefile.am	Sat Jan 19 20:11:45 2008 +0100
@@ -14,7 +14,7 @@
 	../../dw-testbed/dw/libDw-fltk.a \
 	../../dw-testbed/dw/libDw-core.a \
 	../../dw-testbed/lout/liblout.a \
-	@LIBJPEG_LIBS@ @LIBPNG_LIBS@ @LIBFLTK_LIBS@ @LIBZ_LIBS@
+	@LIBJPEG_LIBS@ @LIBPNG_LIBS@ @LIBFLTK_LIBS@ @LIBZ_LIBS@ @LIBICONV_LIBS@
 
 dillo_fltk_SOURCES = \
 	dillo.cc \