OSDN Git Service

2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 2004 21:36:47 +0000 (21:36 +0000)
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 2004 21:36:47 +0000 (21:36 +0000)
PR java/15575
* configure.ac: Declare AM_LANGINFO_CODESET.
* aclocal.m4: Define AM_LANGINFO_CODESET.
* configure, config.in: Rebuilt.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89345 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/aclocal.m4
gcc/config.in
gcc/configure
gcc/configure.ac

index 937a0e1..5ecd023 100644 (file)
@@ -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
index 7bf2913..dfcc20b 100644 (file)
@@ -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],
index e71ac94..d819cf7 100644 (file)
 /* 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
 
index 6805f56..402585e 100755 (executable)
@@ -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"
index ee559a2..7f943c6 100644 (file)
@@ -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"