Check for iconv_* in -liconv as well as libiconv_* in -liconv since AIX

Mon Feb 25 23:01:53 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in acconfig.h config.h.win32.in
        glib/gconvert.c: Check for iconv_* in -liconv
        as well as libiconv_* in -liconv since AIX ships
        the system iconv in a separate library.
        Patch from Miroslaw Dobrzanski-Neumann (#72569)
This commit is contained in:
Owen Taylor 2002-02-26 04:12:52 +00:00 committed by Owen Taylor
parent 11026f6538
commit 7e620ee072
12 changed files with 105 additions and 25 deletions

View File

@ -1,3 +1,11 @@
Mon Feb 25 23:01:53 2002 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h config.h.win32.in
glib/gconvert.c: Check for iconv_* in -liconv
as well as libiconv_* in -liconv since AIX ships
the system iconv in a separate library.
Patch from Miroslaw Dobrzanski-Neumann (#72569)
Mon Feb 25 22:46:29 2002 Owen Taylor <otaylor@redhat.com>
* glib/gdebug.h: Fix trailing , in enumeration

View File

@ -1,3 +1,11 @@
Mon Feb 25 23:01:53 2002 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h config.h.win32.in
glib/gconvert.c: Check for iconv_* in -liconv
as well as libiconv_* in -liconv since AIX ships
the system iconv in a separate library.
Patch from Miroslaw Dobrzanski-Neumann (#72569)
Mon Feb 25 22:46:29 2002 Owen Taylor <otaylor@redhat.com>
* glib/gdebug.h: Fix trailing , in enumeration

View File

@ -1,3 +1,11 @@
Mon Feb 25 23:01:53 2002 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h config.h.win32.in
glib/gconvert.c: Check for iconv_* in -liconv
as well as libiconv_* in -liconv since AIX ships
the system iconv in a separate library.
Patch from Miroslaw Dobrzanski-Neumann (#72569)
Mon Feb 25 22:46:29 2002 Owen Taylor <otaylor@redhat.com>
* glib/gdebug.h: Fix trailing , in enumeration

View File

@ -1,3 +1,11 @@
Mon Feb 25 23:01:53 2002 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h config.h.win32.in
glib/gconvert.c: Check for iconv_* in -liconv
as well as libiconv_* in -liconv since AIX ships
the system iconv in a separate library.
Patch from Miroslaw Dobrzanski-Neumann (#72569)
Mon Feb 25 22:46:29 2002 Owen Taylor <otaylor@redhat.com>
* glib/gdebug.h: Fix trailing , in enumeration

View File

@ -1,3 +1,11 @@
Mon Feb 25 23:01:53 2002 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h config.h.win32.in
glib/gconvert.c: Check for iconv_* in -liconv
as well as libiconv_* in -liconv since AIX ships
the system iconv in a separate library.
Patch from Miroslaw Dobrzanski-Neumann (#72569)
Mon Feb 25 22:46:29 2002 Owen Taylor <otaylor@redhat.com>
* glib/gdebug.h: Fix trailing , in enumeration

View File

@ -1,3 +1,11 @@
Mon Feb 25 23:01:53 2002 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h config.h.win32.in
glib/gconvert.c: Check for iconv_* in -liconv
as well as libiconv_* in -liconv since AIX ships
the system iconv in a separate library.
Patch from Miroslaw Dobrzanski-Neumann (#72569)
Mon Feb 25 22:46:29 2002 Owen Taylor <otaylor@redhat.com>
* glib/gdebug.h: Fix trailing , in enumeration

View File

@ -1,3 +1,11 @@
Mon Feb 25 23:01:53 2002 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h config.h.win32.in
glib/gconvert.c: Check for iconv_* in -liconv
as well as libiconv_* in -liconv since AIX ships
the system iconv in a separate library.
Patch from Miroslaw Dobrzanski-Neumann (#72569)
Mon Feb 25 22:46:29 2002 Owen Taylor <otaylor@redhat.com>
* glib/gdebug.h: Fix trailing , in enumeration

View File

@ -1,3 +1,11 @@
Mon Feb 25 23:01:53 2002 Owen Taylor <otaylor@redhat.com>
* configure.in acconfig.h config.h.win32.in
glib/gconvert.c: Check for iconv_* in -liconv
as well as libiconv_* in -liconv since AIX ships
the system iconv in a separate library.
Patch from Miroslaw Dobrzanski-Neumann (#72569)
Mon Feb 25 22:46:29 2002 Owen Taylor <otaylor@redhat.com>
* glib/gdebug.h: Fix trailing , in enumeration

View File

@ -49,4 +49,5 @@
#undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES
#undef SANE_MALLOC_PROTOS
#undef USE_LIBICONV
#undef USE_LIBICONV_GNU
#undef USE_LIBICONV_NATIVE

View File

@ -55,7 +55,7 @@
#else /* _MSC_VER */
/* #undef SANE_MALLOC_PROTOS */
#endif /* _MSC_VER */
#define USE_LIBICONV 1
#define USE_LIBICONV_GNU 1
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.

View File

@ -1520,32 +1520,47 @@ dnl ***********************
dnl *** Tests for iconv ***
dnl ***********************
AC_ARG_WITH(libiconv, [ --with-libiconv use the libiconv library ],,with_libiconv=maybe)
AC_ARG_WITH(libiconv, [ --with-libiconv=[no/gnu/native] use the libiconv library ],,with_libiconv=maybe)
found_iconv=no
if test "x$with_libiconv" != "xyes" ; then
#
# Check in the C library
#
AC_CHECK_FUNC(iconv_open, with_libiconv=no; found_iconv=yes)
fi
if test "x$with_libiconv" != "xno" ; then
#
# Check for libiconv
#
AC_CHECK_LIB(iconv, libiconv_open, with_libiconv=yes; found_iconv=yes)
fi
case $with_libiconv in
maybe)
# Check in the C library first
AC_CHECK_FUNC(iconv_open, with_libiconv=no; found_iconv=yes)
# Check if we have GNU libiconv
if test $found_iconv = "no"; then
AC_CHECK_LIB(iconv, libiconv_open, with_libiconv=gnu; found_iconv=yes)
fi
# Check if we have a iconv in -liconv, possibly from vendor
if test $found_iconv = "no"; then
AC_CHECK_LIB(iconv, iconv_open, with_libiconv=native; found_iconv=yes)
fi
;;
no)
AC_CHECK_FUNC(iconv_open, with_libiconv=no; found_iconv=yes)
;;
gnu|yes)
AC_CHECK_LIB(iconv, libiconv_open, with_libiconv=gnu; found_iconv=yes)
;;
native)
AC_CHECK_LIB(iconv, iconv_open, with_libiconv=native; found_iconv=yes)
;;
esac
if test "x$found_iconv" = "xno" ; then
AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv])
fi
if test "x$with_libiconv" = "xyes" ; then
ICONV_LIBS="-liconv"
AC_DEFINE(USE_LIBICONV)
fi
case $with_libiconv in
gnu)
ICONV_LIBS="-liconv"
AC_DEFINE(USE_LIBICONV_GNU, [Using GNU libiconv])
;;
native)
ICONV_LIBS="-liconv"
AC_DEFINE(USE_LIBICONV_NATIVE, [Using a native implementation of iconv in a separate library])
;;
esac
AC_SUBST(ICONV_LIBS)
dnl If the system doesn't define EILSEQ, we should define EILSEQ ourselves

View File

@ -38,11 +38,11 @@
#include "glibintl.h"
#if defined(USE_LIBICONV) && !defined (_LIBICONV_H)
#error libiconv in use but included iconv.h not from libiconv
#if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H)
#error GNU libiconv in use but included iconv.h not from libiconv
#endif
#if !defined(USE_LIBICONV) && defined (_LIBICONV_H)
#error libiconv not in use but included iconv.h is from libiconv
#if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
#error GNU libiconv not in use but included iconv.h is from libiconv
#endif
GQuark