diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/aclocal.m4 | 16 | ||||
-rw-r--r-- | gcc/config.in | 3 | ||||
-rwxr-xr-x | gcc/configure | 65 | ||||
-rw-r--r-- | gcc/configure.ac | 2 |
5 files changed, 93 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 937a0e16834..5ecd023d91f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-10-20 Bryce McKinlay <mckinlay@redhat.com> + + PR java/15575 + * configure.ac: Declare AM_LANGINFO_CODESET. + * aclocal.m4: Define AM_LANGINFO_CODESET. + * configure, config.in: Rebuilt. + 2004-10-20 Kazu Hirata <kazu@cs.umass.edu> * expr.c (store_expr): Remove code that is run when diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4 index 7bf291323e8..dfcc20be148 100644 --- a/gcc/aclocal.m4 +++ b/gcc/aclocal.m4 @@ -433,6 +433,22 @@ AC_CACHE_CHECK(for __int64, ac_cv_c___int64, fi ]) +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include <langinfo.h>], + [char* cs = nl_langinfo(CODESET);], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) + fi +]) + AC_DEFUN([gcc_AC_INITFINI_ARRAY], [AC_ARG_ENABLE(initfini-array, [ --enable-initfini-array use .init_array/.fini_array sections], diff --git a/gcc/config.in b/gcc/config.in index e71ac94de75..d819cf74cac 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -336,6 +336,9 @@ /* Define to 1 if you have the `kill' function. */ #undef HAVE_KILL +/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ +#undef HAVE_LANGINFO_CODESET + /* Define to 1 if you have the <langinfo.h> header file. */ #undef HAVE_LANGINFO_H diff --git a/gcc/configure b/gcc/configure index 6805f56cde1..402585e5b0f 100755 --- a/gcc/configure +++ b/gcc/configure @@ -11039,6 +11039,71 @@ _ACEOF fi + + echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 +if test "${am_cv_langinfo_codeset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <langinfo.h> +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + am_cv_langinfo_codeset=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_langinfo_codeset=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 + if test $am_cv_langinfo_codeset = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO_CODESET 1 +_ACEOF + + fi + + # We will need to find libiberty.h and ansidecl.h saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" diff --git a/gcc/configure.ac b/gcc/configure.ac index ee559a29fe7..7f943c6b7f9 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1024,6 +1024,8 @@ AC_SUBST(LIBICONV_DEP) AM_LC_MESSAGES +AM_LANGINFO_CODESET + # We will need to find libiberty.h and ansidecl.h saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" |