OSDN Git Service

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