]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2012-08-17 Diego Novillo <dnovillo@google.com>
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Aug 2012 15:37:57 +0000 (15:37 +0000)
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Aug 2012 15:37:57 +0000 (15:37 +0000)
PR bootstrap/54281
* configure.ac: Add libintl.h to AC_CHECK_HEADERS list.
* config.in: Regenerate.
* configure: Regenerate.
* intl.h: Always include libintl.h if HAVE_LIBINTL_H is
set.

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

gcc/ChangeLog
gcc/config.in
gcc/configure
gcc/configure.ac
gcc/intl.h

index c9a81d14b73d3c1d45ca697e9836bb3d96f4b9ca..9f74dc09d2c5fbd75c93ca94a70432562415c18f 100644 (file)
@@ -1,3 +1,12 @@
+2012-08-17  Diego Novillo  <dnovillo@google.com>
+
+       PR bootstrap/54281
+       * configure.ac: Add libintl.h to AC_CHECK_HEADERS list.
+       * config.in: Regenerate.
+       * configure: Regenerate.
+       * intl.h: Always include libintl.h if HAVE_LIBINTL_H is
+       set.
+
 2012-08-17  Richard Guenther  <rguenther@suse.de>
 
        * bitmap.h (struct bitmap_element_def): GTY annotate next/prev.
index 6d986bec56ae16810c84ac41f6db48c2d8f02088..a9417dfd80b704f4912e44884cd18ad1ab8279e1 100644 (file)
 #endif
 
 
+/* Define to 1 if you have the <libintl.h> header file. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_LIBINTL_H
+#endif
+
+
 /* Define to 1 if you have the <limits.h> header file. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_LIMITS_H
index 1585bae34c89e2dcc526900b8819630a42097cdc..7f3489d0e8f4e68e5fabdabdd9c2981cb7dd949c 100755 (executable)
@@ -8248,7 +8248,7 @@ fi
 for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
                 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
                 sys/resource.h sys/param.h sys/times.h sys/stat.h \
-                direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h
+                direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h libintl.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
@@ -17742,7 +17742,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 17744 "configure"
+#line 17745 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17848,7 +17848,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 17850 "configure"
+#line 17851 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 579d9a803be64ea4809719c0e7743a24854d12cb..6bfbf354d1c8120016d063eb2481885b2cf2e28a 100644 (file)
@@ -912,7 +912,7 @@ AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
                 fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
                 sys/resource.h sys/param.h sys/times.h sys/stat.h \
-                direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h)
+                direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h libintl.h)
 
 # Check for thread headers.
 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
index c4db35458938d68853db51bae2a78b9d8ea03907..03be420fe68d0a219af8ea62df903113bc4cd771 100644 (file)
 # define setlocale(category, locale) (locale)
 #endif
 
+/* If libintl.h is available, include it before testing for NLS. If we
+   are building with --disable-nls and another header file includes
+   libintl.h, the stubs defined down below will cause syntax errors
+   when parsing libintl.h. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281
+   for details.  */
+#if defined(HAVE_LIBINTL_H) || defined(ENABLE_NLS)
+# include <libintl.h>
+#endif
+
 #ifdef ENABLE_NLS
-#include <libintl.h>
 extern void gcc_init_libintl (void);
 extern size_t gcc_gettext_width (const char *);
 #else