diff configure.in @ 108:9478813e0c85

- Another try at iconv detection for OpenBSD
author jcid
date Wed, 30 Jan 2008 18:49:39 +0100
parents d63b130d8b24
children 9ca877f93161
line wrap: on
line diff
--- a/configure.in	Wed Jan 30 14:42:47 2008 +0100
+++ b/configure.in	Wed Jan 30 18:49:39 2008 +0100
@@ -300,15 +300,21 @@
   AC_DEFINE([ENABLE_SSL], [], [Enable SSL support])
 fi
 
-dnl ----------------------
+dnl --------------------------------------------------------------
 dnl Test for iconv functionality in libc or for libiconv usability
-dnl ----------------------
+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
+  dnl Test for OpenBSD
+  AC_TRY_COMPILE([#include <iconv.h>],[iconv_open("","");],
+                 iconv_ok=yes, iconv_ok=no)
+fi
+
+if test "x$iconv_ok" = "xno"; then
   AC_ERROR(libiconv must be installed!)
 fi