]> git.ipfire.org Git - thirdparty/gcc.git/blame - fixincludes/configure.ac
configure.ac (fixincludes_UNLOCKED_FUNCS): New.
[thirdparty/gcc.git] / fixincludes / configure.ac
CommitLineData
71b5d516
PB
1AC_PREREQ(2.59)
2
3AC_INIT(fixincludes, [ ])
4AC_CONFIG_SRCDIR(inclhack.def)
5AC_CONFIG_AUX_DIR(..)
6AC_CANONICAL_SYSTEM
7AC_PROG_CC
8
53c7ffe7
GK
9# Determine the noncanonical target name, for directory use.
10ACX_NONCANONICAL_TARGET
11
12# Specify the local prefix
13local_prefix=
14AC_ARG_WITH(local-prefix,
15[ --with-local-prefix=DIR specifies directory to put local include],
16[case "${withval}" in
17yes) AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;;
18no) ;;
19*) local_prefix=$with_local_prefix ;;
20esac])
21
22# Default local prefix if it is empty
23if test x$local_prefix = x; then
24 local_prefix=/usr/local
25fi
26
71b5d516
PB
27# Choose one or two-process fix methodology. Systems that cannot handle
28# bi-directional pipes must use the two process method.
29#
ad643a75
PB
30AC_ARG_ENABLE([twoprocess],
31[ --enable-twoprocess Use a separate process to apply the fixes],
5ae4c565 32[if test "x$enable_twoprocess" = xyes; then
ad643a75
PB
33 TARGET=twoprocess
34else
35 TARGET=oneprocess
36fi],
37[case $host in
71b5d516 38 i?86-*-msdosdjgpp* | \
ad643a75 39 i?86-*-mingw32* | \
71b5d516
PB
40 *-*-beos* )
41 TARGET=twoprocess
71b5d516
PB
42 ;;
43
ad643a75 44 * )
71b5d516 45 TARGET=oneprocess
71b5d516 46 ;;
ad643a75
PB
47esac])
48AC_SUBST(TARGET)
71b5d516 49
ad643a75
PB
50if test $TARGET = twoprocess; then
51 AC_DEFINE(SEPARATE_FIX_PROC, 1,
52 [Define if testing and fixing are done by separate process])
53fi
54
55case $host in
56 vax-dec-bsd* )
57 AC_DEFINE(exit, xexit, [Define to xexit if the host system does not support atexit])
58 AC_DEFINE(atexit, xatexit, [Define to xatexit if the host system does not support atexit])
71b5d516
PB
59 ;;
60esac
ad643a75
PB
61
62AC_DEFINE_UNQUOTED([EXE_EXT], "$ac_exeext",
63 [Defined to the executable file extension on the host system])
71b5d516
PB
64
65# Checks for header files.
66AC_HEADER_STDC
67AC_CHECK_HEADERS([stddef.h stdlib.h strings.h unistd.h fcntl.h sys/file.h \
68 sys/stat.h])
0d667716
KG
69define(fixincludes_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
70 ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
71 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
72 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
73 putchar_unlocked putc_unlocked)
74AC_CHECK_FUNCS(fixincludes_UNLOCKED_FUNCS)
75AC_CHECK_DECLS(m4_split(m4_normalize(abort errno fixincludes_UNLOCKED_FUNCS)))
71b5d516
PB
76
77# Checks for typedefs, structures, and compiler characteristics.
78AC_C_CONST
79
80# Checks for library functions.
81gcc_AC_FUNC_MMAP_BLACKLIST
82
83AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
84AC_ARG_ENABLE(maintainer-mode,
85[ --enable-maintainer-mode enable make rules and dependencies not useful
86 (and sometimes confusing) to the casual installer],
87 USE_MAINTAINER_MODE=$enableval,
88 USE_MAINTAINER_MODE=no)
89AC_MSG_RESULT($USE_MAINTAINER_MODE)
90if test "$USE_MAINTAINER_MODE" = yes; then
91 MAINT=
92else
93 MAINT='#'
94fi
95AC_SUBST(MAINT)
96
97AC_CONFIG_HEADERS(config.h, [echo timestamp > stamp-h])
90ee1368 98AC_CONFIG_FILES(Makefile mkheaders.almost:mkheaders.in)
71b5d516 99AC_OUTPUT