From fa5760aa677ddeb7f0f8f26d37c3a72e578c8186 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 7 Nov 2012 20:48:27 +0000 Subject: [PATCH] Handle libintl needing libiconv (for OpenBSD 5.2) Signed-off-by: David Woodhouse --- configure.ac | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 6288ea1..e3a97e9 100644 --- a/configure.ac +++ b/configure.ac @@ -171,9 +171,18 @@ if test "$USE_NLS" = "yes"; then (void)dgettext("openconnect", "foo");])], [AC_MSG_RESULT(yes (with -lintl))] LIBINTL="-lintl", - [AC_MSG_RESULT(no) - USE_NLS=no]) - LIBS="$oldLIBS"]) + [LIBS="$LIBS -liconv" + AC_LINK_IFELSE([AC_LANG_PROGRAM([ + #include + #include ],[ + setlocale(LC_ALL, ""); + bindtextdomain("openconnect", "/tmp"); + (void)dgettext("openconnect", "foo");])], + [AC_MSG_RESULT(yes (with -lintl -liconv))] + LIBINTL="-lintl", + [AC_MSG_RESULT(no) + USE_NLS=no]) + LIBS="$oldLIBS"])]) fi if test "$USE_NLS" = "yes"; then -- 2.7.4