aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/acinclude.m43
-rw-r--r--gdb/config.in9
-rwxr-xr-xgdb/configure69
-rw-r--r--gdb/configure.ac5
5 files changed, 89 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 233ea29..19a4275 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-09 Tom Tromey <tromey@redhat.com>
+
+ * config.in, configure: Rebuild.
+ * configure.ac: Check for locale.h, setlocale. Call
+ AM_LC_MESSAGES.
+ * acinclude.m4: Include lcmessage.m4.
+
2008-12-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* remote.c (remote_parse_stop_reply): Use REG only after its NULL check.
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index 4e8f590..2a951e2 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -26,6 +26,9 @@ sinclude(../config/tcl.m4)
dnl For dependency tracking macros.
sinclude([../config/depstand.m4])
+dnl For AM_LC_MESSAGES
+sinclude([../config/lcmessage.m4])
+
#
# Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
# makes configure think it's cross compiling. If --target wasn't used, then
diff --git a/gdb/config.in b/gdb/config.in
index 46e2467..bceba76 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -175,6 +175,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
@@ -208,6 +211,9 @@
/* Define to 1 if you have the <link.h> header file. */
#undef HAVE_LINK_H
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
/* Define to 1 if the compiler supports long double. */
#undef HAVE_LONG_DOUBLE
@@ -325,6 +331,9 @@
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
+
/* Define to 1 if you have the `setpgid' function. */
#undef HAVE_SETPGID
diff --git a/gdb/configure b/gdb/configure
index aafbf32..bb2f7a5 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -12065,6 +12065,7 @@ fi
+
for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
thread_db.h gnu/libc-version.h signal.h stddef.h \
stdlib.h string.h memory.h strings.h sys/fault.h \
@@ -12072,7 +12073,7 @@ for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
sys/types.h sys/wait.h wait.h termios.h termio.h \
- sgtty.h unistd.h elf_hp.h ctype.h time.h
+ sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -13216,6 +13217,69 @@ fi
+ echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
+if test "${am_cv_val_LC_MESSAGES+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 <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+ ;
+ 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_val_LC_MESSAGES=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
+ if test $am_cv_val_LC_MESSAGES = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+ fi
+
+
# ----------------------- #
# Checks for structures. #
# ----------------------- #
@@ -15355,10 +15419,11 @@ fi
+
for ac_func in canonicalize_file_name realpath getrusage getuid \
getgid poll pread64 sbrk setpgid setpgrp setsid \
sigaction sigprocmask sigsetmask socketpair syscall \
- ttrace wborder
+ ttrace wborder setlocale
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 8725aa6..4e0cf7d 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -696,7 +696,7 @@ AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
sys/types.h sys/wait.h wait.h termios.h termio.h \
- sgtty.h unistd.h elf_hp.h ctype.h time.h])
+ sgtty.h unistd.h elf_hp.h ctype.h time.h locale.h])
AC_CHECK_HEADERS(link.h, [], [],
[#if HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -740,6 +740,7 @@ AC_CHECK_HEADERS(term.h, [], [],
AC_CHECK_DECLS([free, malloc, realloc, strerror, strstr, getopt,
snprintf, vsnprintf])
+AM_LC_MESSAGES
# ----------------------- #
# Checks for structures. #
@@ -775,7 +776,7 @@ AC_FUNC_VFORK
AC_CHECK_FUNCS([canonicalize_file_name realpath getrusage getuid \
getgid poll pread64 sbrk setpgid setpgrp setsid \
sigaction sigprocmask sigsetmask socketpair syscall \
- ttrace wborder])
+ ttrace wborder setlocale])
# Check the return and argument types of ptrace. No canned test for
# this, so roll our own.