* internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
[official-gcc.git] / fixincludes / configure.ac
blobf3eeb76c3b5526a8146c34eb307b9d64520b4527
1 AC_PREREQ(2.59)
3 AC_INIT(fixincludes, [ ])
4 AC_CONFIG_SRCDIR(inclhack.def)
5 AC_CONFIG_AUX_DIR(..)
6 AC_CANONICAL_SYSTEM
7 AC_PROG_CC
9 # Choose one or two-process fix methodology.  Systems that cannot handle
10 # bi-directional pipes must use the two process method.
12 AC_ARG_ENABLE([twoprocess],
13 [  --enable-twoprocess       Use a separate process to apply the fixes],
14 [if test "x$enable_twoprocess" = xyes; then
15         TARGET=twoprocess
16 else
17         TARGET=oneprocess
18 fi],
19 [case $host in
20         i?86-*-msdosdjgpp* | \
21         i?86-*-mingw32* | \
22         *-*-beos* )
23                 TARGET=twoprocess
24                 ;;
26         * )
27                 TARGET=oneprocess
28                 ;;
29 esac])
30 AC_SUBST(TARGET)
32 if test $TARGET = twoprocess; then
33         AC_DEFINE(SEPARATE_FIX_PROC, 1,
34                   [Define if testing and fixing are done by separate process])
37 case $host in
38         vax-dec-bsd* )
39                 AC_DEFINE(exit, xexit, [Define to xexit if the host system does not support atexit])
40                 AC_DEFINE(atexit, xatexit, [Define to xatexit if the host system does not support atexit])
41                 ;;
42 esac
44 AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeext",
45   [Defined to the executable file extension on the host system])
47 # Checks for header files.
48 AC_HEADER_STDC
49 AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
50         sys/stat.h])
51 AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \
52         fwrite_unlocked fprintf_unlocked)
53 AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked,
54         fputs_unlocked, fwrite_unlocked, fprintf_unlocked])
56 # Checks for typedefs, structures, and compiler characteristics.
57 AC_C_CONST
59 # Checks for library functions.
60 gcc_AC_FUNC_MMAP_BLACKLIST
62 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
63 AC_ARG_ENABLE(maintainer-mode,
64 [  --enable-maintainer-mode enable make rules and dependencies not useful
65                           (and sometimes confusing) to the casual installer],
66       USE_MAINTAINER_MODE=$enableval,
67       USE_MAINTAINER_MODE=no)
68 AC_MSG_RESULT($USE_MAINTAINER_MODE)
69 if test "$USE_MAINTAINER_MODE" = yes; then
70   MAINT=
71 else
72   MAINT='#'
73 fi      
74 AC_SUBST(MAINT)
76 AC_CONFIG_HEADERS(config.h, [echo timestamp > stamp-h])
77 AC_CONFIG_FILES(Makefile)
78 AC_OUTPUT