Commit 1c24f830 by Craig Rodrigues

re PR java/4972 (undefined reference to `libiconv')

2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>

        PR java/4972
        * aclocal.m4, acinclude.m4 (AM_ICONV): Put linking flags
        for libiconv in LIBICONV variable.
        * configure: Regenerated.

From-SVN: r49411
parent 58fae3f7
2002-02-01 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR java/4972
* aclocal.m4, acinclude.m4 (AM_ICONV): Put linking flags
for libiconv in LIBICONV variable.
* configure: Regenerated.
2002-01-31 Tom Tromey <tromey@redhat.com> 2002-01-31 Tom Tromey <tromey@redhat.com>
* verify.cc (state::enter_subroutine): New method. * verify.cc (state::enter_subroutine): New method.
......
...@@ -131,11 +131,12 @@ AC_DEFUN([AM_ICONV], ...@@ -131,11 +131,12 @@ AC_DEFUN([AM_ICONV],
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed). dnl those with the standalone portable GNU libiconv installed).
am_cv_lib_iconv_ldpath=
AC_ARG_WITH([libiconv-prefix], AC_ARG_WITH([libiconv-prefix],
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
for dir in `echo "$withval" | tr : ' '`; do for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
done done
]) ])
...@@ -150,7 +151,7 @@ AC_DEFUN([AM_ICONV], ...@@ -150,7 +151,7 @@ AC_DEFUN([AM_ICONV],
am_cv_func_iconv=yes) am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS" am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
AC_TRY_LINK([#include <stdlib.h> AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>], #include <iconv.h>],
[iconv_t cd = iconv_open("",""); [iconv_t cd = iconv_open("","");
...@@ -187,7 +188,7 @@ size_t iconv(); ...@@ -187,7 +188,7 @@ size_t iconv();
fi fi
LIBICONV= LIBICONV=
if test "$am_cv_lib_iconv" = yes; then if test "$am_cv_lib_iconv" = yes; then
LIBICONV="-liconv" LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
fi fi
AC_SUBST(LIBICONV) AC_SUBST(LIBICONV)
]) ])
......
...@@ -143,11 +143,12 @@ AC_DEFUN([AM_ICONV], ...@@ -143,11 +143,12 @@ AC_DEFUN([AM_ICONV],
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed). dnl those with the standalone portable GNU libiconv installed).
am_cv_lib_iconv_ldpath=
AC_ARG_WITH([libiconv-prefix], AC_ARG_WITH([libiconv-prefix],
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
for dir in `echo "$withval" | tr : ' '`; do for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
done done
]) ])
...@@ -162,7 +163,7 @@ AC_DEFUN([AM_ICONV], ...@@ -162,7 +163,7 @@ AC_DEFUN([AM_ICONV],
am_cv_func_iconv=yes) am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS" am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv" LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
AC_TRY_LINK([#include <stdlib.h> AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>], #include <iconv.h>],
[iconv_t cd = iconv_open("",""); [iconv_t cd = iconv_open("","");
...@@ -199,7 +200,7 @@ size_t iconv(); ...@@ -199,7 +200,7 @@ size_t iconv();
fi fi
LIBICONV= LIBICONV=
if test "$am_cv_lib_iconv" = yes; then if test "$am_cv_lib_iconv" = yes; then
LIBICONV="-liconv" LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
fi fi
AC_SUBST(LIBICONV) AC_SUBST(LIBICONV)
]) ])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment