__CONFIG_H__ check.
	* config.in: Regenerate.
+2012-11-05  Alan Modra  <amodra@gmail.com>
+
+       * configure.in: Apply 2012-09-10 change to config.in here.  Add
+       __CONFIG_H__ check.
+       * config.in: Regenerate.
+
 2012-11-01  Tom Tromey  <tromey@redhat.com>
 
        * readelf.c (get_note_type): Handle NT_386_TLS, NT_386_IOPERM.
 
 
 /* Check that config.h is #included before system headers
    (this works only for glibc, but that should be enough).  */
-#if defined(__GLIBC__)
+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
 #  error config.h must be #included before system headers
 #endif
+#define __CONFIG_H__ 1
 
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
 
 AH_VERBATIM([00_CONFIG_H_CHECK],
 [/* Check that config.h is #included before system headers
    (this works only for glibc, but that should be enough).  */
-#if defined(__GLIBC__)
+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
 #  error config.h must be #included before system headers
-#endif])
+#endif
+#define __CONFIG_H__ 1])
 
 if test -z "$target" ; then
     AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)