configure: search for iconv_open as well as libiconv_open
authorAlexander Barton <alex@barton.de>
Fri, 15 Feb 2013 20:32:08 +0000 (21:32 +0100)
committerAlexander Barton <alex@barton.de>
Fri, 15 Feb 2013 20:32:08 +0000 (21:32 +0100)
On some installations iconv_open() is actually libiconv_open().
iconv_open() is the glibc version while libiconv_open() is the libiconv
version. This patch enables ngIRCd to detect both cases.

Tested on OpenBSD 5.1.

Closes bug #151.

configure.ng

index c030996..6c28f39 100644 (file)
@@ -528,7 +528,10 @@ if test "$x_ircplus_on" = "yes"; then
                        fi
                        AC_CHECK_LIB(iconv, iconv_open)
                        AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes,
-                               AC_MSG_ERROR([Can't enable libiconv support!])
+                               AC_CHECK_LIB(iconv, libiconv_open)
+                               AC_CHECK_FUNCS(libiconv_open, x_iconv_on=yes,
+                                       AC_MSG_ERROR([Can't enable libiconv support!])
+                               )
                        )
                  fi
                ]