3 AC_INIT(fixincludes, [ ])
4 AC_CONFIG_SRCDIR(inclhack.def)
9 # Figure out what compiler warnings we can enable.
10 # See config/warnings.m4 for details.
12 ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
13 -Wmissing-prototypes -Wold-style-definition \
14 -Wmissing-format-attribute])
15 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
17 # Only enable with --enable-werror-always until existing warnings are
19 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
21 # Determine the noncanonical target name, for directory use.
22 ACX_NONCANONICAL_TARGET
24 # Specify the local prefix
26 AC_ARG_WITH(local-prefix,
27 [ --with-local-prefix=DIR specifies directory to put local include],
29 yes) AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;;
31 *) local_prefix=$with_local_prefix ;;
34 # Default local prefix if it is empty
35 if test x$local_prefix = x; then
36 local_prefix=/usr/local
39 # Choose one or two-process fix methodology. Systems that cannot handle
40 # bi-directional pipes must use the two process method.
42 AC_ARG_ENABLE([twoprocess],
43 [ --enable-twoprocess Use a separate process to apply the fixes],
44 [if test "x$enable_twoprocess" = xyes; then
50 i?86-*-msdosdjgpp* | \
62 if test $TARGET = twoprocess; then
63 AC_DEFINE(SEPARATE_FIX_PROC, 1,
64 [Define if testing and fixing are done by separate process])
69 AC_DEFINE(exit, xexit, [Define to xexit if the host system does not support atexit])
70 AC_DEFINE(atexit, xatexit, [Define to xatexit if the host system does not support atexit])
74 AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeext",
75 [Defined to the executable file extension on the host system])
77 # Checks for header files.
79 AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
81 define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
82 ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
83 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
84 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
85 putchar_unlocked putc_unlocked)
86 AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS)
87 AC_CHECK_DECLS(m4_split(m4_normalize(abort errno fixincludes_UNLOCKED_FUNCS)))
89 # Checks for typedefs, structures, and compiler characteristics.
92 # Checks for library functions.
93 gcc_AC_FUNC_MMAP_BLACKLIST
95 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
96 AC_ARG_ENABLE(maintainer-mode,
97 [ --enable-maintainer-mode enable make rules and dependencies not useful
98 (and sometimes confusing) to the casual installer],
99 USE_MAINTAINER_MODE=$enableval,
100 USE_MAINTAINER_MODE=no)
101 AC_MSG_RESULT($USE_MAINTAINER_MODE)
102 if test "$USE_MAINTAINER_MODE" = yes; then
109 AC_CONFIG_HEADERS(config.h, [echo timestamp > stamp-h])
110 AC_CONFIG_FILES(Makefile mkheaders.almost:mkheaders.in)