[Java patch] AM_ICONV fix
Craig Rodrigues
rodrigc@mediaone.net
Sun Jan 27 16:56:00 GMT 2002
On Sun, Jan 27, 2002 at 10:32:57PM -0200, Alexandre Oliva wrote:
> On Jan 27, 2002, Craig Rodrigues <rodrigc@mediaone.net> wrote:
>
> > Is it OK for the java directory as well?
>
> Not exactly. You must patch acinclude.m4 instead, since aclocal.m4 is
> generated from that. I suppose I could approve the modified patch,
OK. For whoever as approval privileges on libjava, is this OK?
2002-01-27 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
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libjava/acinclude.m4,v
retrieving revision 1.14
diff -u -r1.14 acinclude.m4
--- acinclude.m4 2002/01/11 23:00:56 1.14
+++ acinclude.m4 2002/01/28 00:53:38
@@ -131,11 +131,12 @@
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
+ am_cv_lib_iconv_ldpath=
AC_ARG_WITH([libiconv-prefix],
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
for dir in `echo "$withval" | tr : ' '`; do
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
])
@@ -150,7 +151,7 @@
am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
- LIBS="$LIBS -liconv"
+ LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
@@ -187,7 +188,7 @@
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
- LIBICONV="-liconv"
+ LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
fi
AC_SUBST(LIBICONV)
])
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/libjava/aclocal.m4,v
retrieving revision 1.21
diff -u -r1.21 aclocal.m4
--- aclocal.m4 2002/01/11 23:00:56 1.21
+++ aclocal.m4 2002/01/28 00:53:38
@@ -143,11 +143,12 @@
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
+ am_cv_lib_iconv_ldpath=
AC_ARG_WITH([libiconv-prefix],
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
for dir in `echo "$withval" | tr : ' '`; do
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
])
@@ -162,7 +163,7 @@
am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
- LIBS="$LIBS -liconv"
+ LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
@@ -199,7 +200,7 @@
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
- LIBICONV="-liconv"
+ LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
fi
AC_SUBST(LIBICONV)
])
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net
More information about the Java-patches
mailing list