OSDN Git Service

* config/v850/v850.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
[pf3gnuchains/gcc-fork.git] / fixincludes / configure.ac
index 4629604..2c488e7 100644 (file)
@@ -1,10 +1,24 @@
-AC_PREREQ(2.59)
+AC_PREREQ(2.64)
 
 AC_INIT(fixincludes, [ ])
 AC_CONFIG_SRCDIR(inclhack.def)
 AC_CONFIG_AUX_DIR(..)
+m4_sinclude(../libtool.m4)
 AC_CANONICAL_SYSTEM
 AC_PROG_CC
+AC_PROG_SED
+
+# Figure out what compiler warnings we can enable.
+# See config/warnings.m4 for details.
+
+ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
+                         -Wmissing-prototypes -Wold-style-definition \
+                         -Wmissing-format-attribute -Wno-overlength-strings])
+ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
+
+# Only enable with --enable-werror-always until existing warnings are
+# corrected.
+ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
 
 # Determine the noncanonical target name, for directory use.
 ACX_NONCANONICAL_TARGET
@@ -37,6 +51,7 @@ fi],
 [case $host in
        i?86-*-msdosdjgpp* | \
        i?86-*-mingw32* | \
+       x86_64-*-mingw32* | \
        *-*-beos* )
                TARGET=twoprocess
                ;;
@@ -72,7 +87,8 @@ define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
   putchar_unlocked putc_unlocked)
 AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS)
-AC_CHECK_DECLS(m4_split(m4_normalize(abort errno fixincludes_UNLOCKED_FUNCS)))
+AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, vasprintf])
+AC_CHECK_DECLS(m4_split(m4_normalize(fixincludes_UNLOCKED_FUNCS)))
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -93,6 +109,8 @@ else
   MAINT='#'
 fi     
 AC_SUBST(MAINT)
+AC_DEFINE_UNQUOTED([SED_PROGRAM], "${SED}",
+   [Defined to the best working sed program on the host system])
 
 AC_CONFIG_HEADERS(config.h, [echo timestamp > stamp-h])
 AC_CONFIG_FILES(Makefile mkheaders.almost:mkheaders.in)