For PR java/2812:

* configure: Rebuilt.
	* configure.in: Don't check for iconv.h or iconv(); use AM_ICONV
	instead.
	* aclocal.m4 (AM_ICONV): New macro from Bruno Haible.

From-SVN: r44119
This commit is contained in:
Tom Tromey 2001-07-18 17:17:03 +00:00 committed by Tom Tromey
parent 0728902f90
commit f91abfce7b
5 changed files with 527 additions and 304 deletions

View File

@ -1,3 +1,11 @@
2001-07-18 Tom Tromey <tromey@redhat.com>
For PR java/2812:
* configure: Rebuilt.
* configure.in: Don't check for iconv.h or iconv(); use AM_ICONV
instead.
* aclocal.m4 (AM_ICONV): New macro from Bruno Haible.
Wed Jul 18 18:46:30 CEST 2001 Richard Henderson <rth@cygnus.com>
Jan Hubicka <jh@suse.cz>

70
gcc/aclocal.m4 vendored
View File

@ -1469,3 +1469,73 @@ if test -n "$fbigend"; then
multi-word integers.])
fi
])
#serial AM2
dnl From Bruno Haible.
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).
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
done
])
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
LIBS="$am_save_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(am_cv_proto_iconv, [
AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:-
}[$]am_cv_proto_iconv)
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
[Define as const if the declaration of iconv() needs const.])
fi
LIBICONV=
if test "$am_cv_lib_iconv" = yes; then
LIBICONV="-liconv"
fi
AC_SUBST(LIBICONV)
])

View File

@ -125,9 +125,6 @@
/* Define if you have the gettimeofday function. */
#undef HAVE_GETTIMEOFDAY
/* Define if you have the iconv function. */
#undef HAVE_ICONV
/* Define if you have the isascii function. */
#undef HAVE_ISASCII
@ -200,9 +197,6 @@
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <iconv.h> header file. */
#undef HAVE_ICONV_H
/* Define if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
@ -365,6 +359,12 @@
/* Define if read-only mmap of a plain file works. */
#undef HAVE_MMAP_FILE
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* Define to 1 if we found this declaration otherwise define to 0. */
#undef HAVE_DECL_GETENV

735
gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -457,7 +457,7 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
fcntl.h unistd.h sys/file.h sys/time.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
direct.h malloc.h langinfo.h iconv.h)
direct.h malloc.h langinfo.h)
# Check for thread headers.
AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
@ -578,7 +578,7 @@ dnl gcc_AC_C_ENUM_BF_UNSIGNED
AC_CHECK_FUNCS(strtoul bsearch popen times clock \
strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
fputs_unlocked getrusage iconv nl_langinfo lstat)
fputs_unlocked getrusage nl_langinfo lstat)
AC_CHECK_TYPE(ssize_t, int)
@ -617,6 +617,8 @@ AC_FUNC_VFORK
AC_FUNC_MMAP_ANYWHERE
AC_FUNC_MMAP_FILE
AM_ICONV
# We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"