X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=fixincludes%2Fconfigure.ac;h=2c488e70338411b85975ecaa362d891a3d4896d2;hp=8499032db816210cbd5e5012c48f01c452fd1614;hb=050318d9e2c2b0c94959a97a0be729e16ea1f780;hpb=4f80d25b87fcbbec22e05d3894d0e6e47b2f1163 diff --git a/fixincludes/configure.ac b/fixincludes/configure.ac index 8499032db81..2c488e70338 100644 --- a/fixincludes/configure.ac +++ b/fixincludes/configure.ac @@ -1,17 +1,49 @@ -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 + +# Specify the local prefix +local_prefix= +AC_ARG_WITH(local-prefix, +[ --with-local-prefix=DIR specifies directory to put local include], +[case "${withval}" in +yes) AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;; +no) ;; +*) local_prefix=$with_local_prefix ;; +esac]) + +# Default local prefix if it is empty +if test x$local_prefix = x; then + local_prefix=/usr/local +fi # Choose one or two-process fix methodology. Systems that cannot handle # bi-directional pipes must use the two process method. # AC_ARG_ENABLE([twoprocess], [ --enable-twoprocess Use a separate process to apply the fixes], -[if test "x$enable_twoprocess" = yes; then +[if test "x$enable_twoprocess" = xyes; then TARGET=twoprocess else TARGET=oneprocess @@ -19,6 +51,7 @@ fi], [case $host in i?86-*-msdosdjgpp* | \ i?86-*-mingw32* | \ + x86_64-*-mingw32* | \ *-*-beos* ) TARGET=twoprocess ;; @@ -48,10 +81,14 @@ 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([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 @@ -72,7 +109,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) +AC_CONFIG_FILES(Makefile mkheaders.almost:mkheaders.in) AC_OUTPUT