diff options
Diffstat (limited to 'libjava/aclocal.m4')
-rw-r--r-- | libjava/aclocal.m4 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libjava/aclocal.m4 b/libjava/aclocal.m4 index aa0c001..3bd8d2b 100644 --- a/libjava/aclocal.m4 +++ b/libjava/aclocal.m4 @@ -143,11 +143,12 @@ AC_DEFUN([AM_ICONV], 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 @@ AC_DEFUN([AM_ICONV], 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 @@ size_t iconv(); fi LIBICONV= if test "$am_cv_lib_iconv" = yes; then - LIBICONV="-liconv" + LIBICONV="$am_cv_lib_iconv_ldpath -liconv" fi AC_SUBST(LIBICONV) ]) |