X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=fixincludes%2Fconfigure.ac;h=d885e3c9a1fb234be2e7f0523e3daa7f2029b7f9;hb=3f8217c21938bc1d867bd2a0c4dbb41e836aaf70;hp=16d2b7e3e2534a1438fa728effee2e592fcfe75c;hpb=50e7e370529f5c08cc6c4611c4a4c512968178e6;p=pf3gnuchains%2Fgcc-fork.git diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index 16d2b7e3e25..d885e3c9a1f 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -3,8 +3,22 @@ AC_PREREQ(2.59) 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 ;; @@ -52,12 +67,6 @@ if test $TARGET = twoprocess; then [Define if testing and fixing are done by separate process]) fi -# Get GCC's version number. -changequote(,)dnl -gcc_version=`sed -n '/version_string/ { s/.*"\([^ "]*\)[^"]*".*/\1/p ; }' ${srcdir}/../gcc/version.c` -changequote([,])dnl -AC_SUBST(gcc_version) - case $host in vax-dec-bsd* ) AC_DEFINE(exit, xexit, [Define to xexit if the host system does not support atexit]) @@ -72,10 +81,13 @@ AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeext", AC_HEADER_STDC AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \ sys/stat.h]) -AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \ - fwrite_unlocked fprintf_unlocked) -AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked, - fputs_unlocked, fwrite_unlocked, fprintf_unlocked]) +define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl + ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl + fileno_unlocked fprintf_unlocked fputc_unlocked fputs_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 asprintf basename errno vasprintf fixincludes_UNLOCKED_FUNCS))) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -96,7 +108,9 @@ 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) +AC_CONFIG_FILES(Makefile mkheaders.almost:mkheaders.in) AC_OUTPUT