* tree-cfg.c (dump_function_to_file): Use cfun info only if it
[official-gcc.git] / libcpp / configure.ac
blobb56a7443619038093d3cb36fd414011b460f59a5
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.59)
5 AC_INIT(cpplib, [ ], gcc-bugs@gcc.gnu.org, cpplib)
6 AC_CONFIG_SRCDIR(ucnid.h)
7 AC_CONFIG_MACRO_DIR(../config)
8 AC_CANONICAL_SYSTEM
10 # Checks for programs.
11 AC_PROG_MAKE_SET
12 AC_PROG_INSTALL
13 AC_PROG_CC
14 AC_PROG_RANLIB
16 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
17 AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
18 AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
19 AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
21 # Figure out what compiler warnings we can enable.
22 # See config/warnings.m4 for details.
24 ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
25                           -Wmissing-prototypes -Wold-style-definition])
26 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
28 # Only enable with --enable-werror-always until existing warnings are
29 # corrected.
30 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
32 # Checks for header files.
33 AC_HEADER_TIME
34 ACX_HEADER_STRING
35 AC_CHECK_HEADERS(iconv.h locale.h fcntl.h limits.h stddef.h \
36         stdlib.h strings.h string.h sys/file.h unistd.h)
38 # Checks for typedefs, structures, and compiler characteristics.
39 AC_C_CONST
40 AC_C_INLINE
41 AC_FUNC_OBSTACK
42 AC_TYPE_OFF_T
43 AC_TYPE_SIZE_T
44 AC_STRUCT_TM
45 AC_CHECK_SIZEOF(int)
46 AC_CHECK_SIZEOF(long)
47 define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
48   ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
49   fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
50   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
51   putchar_unlocked putc_unlocked)
52 AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS)
53 AC_CHECK_DECLS(m4_split(m4_normalize(abort basename errno getopt libcpp_UNLOCKED_FUNCS)))
55 # Checks for library functions.
56 AC_FUNC_ALLOCA
57 AC_HEADER_STDC
58 AM_LANGINFO_CODESET
59 ZW_GNU_GETTEXT_SISTER_DIR
61 AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar,
62 [AC_TRY_COMPILE([
63 #include <sys/types.h>
65 [if ((uchar *)0) return 0;
66  if (sizeof(uchar)) return 0;],
67 ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
68 if test $ac_cv_type_uchar = yes; then
69   AC_DEFINE(HAVE_UCHAR, 1,
70   [Define if <sys/types.h> defines \`uchar'.])
73 AM_ICONV
75 # More defines and substitutions.
76 PACKAGE="$PACKAGE_TARNAME"
77 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of this package.])
78 AC_SUBST(PACKAGE)
80 if test "x$enable_nls" != xno; then
81   USED_CATALOGS='$(CATALOGS)'
82 else
83   USED_CATALOGS=
85 AC_SUBST(USED_CATALOGS)
87 AC_ARG_ENABLE(maintainer-mode,
88 [  --enable-maintainer-mode enable rules only needed by maintainers],,
89 enable_maintainer_mode=no)
91 if test "x$enable_maintainer_mode" = xno; then
92   MAINT='#'
93 else
94   MAINT=
96 AC_SUBST(MAINT)
98 AC_ARG_ENABLE(checking,
99 [  --enable-checking      enable expensive run-time checks],,
100 enable_checking=no)
102 if test $enable_checking != no ; then
103   AC_DEFINE(ENABLE_CHECKING, 1,
104 [Define if you want more run-time sanity checks.])
107 m4_changequote(,)
108 case $target in
109         alpha*-*-* | \
110         arm*-*-eabi* | \
111         arm*-*-symbianelf* | \
112         x86_64-*-* | \
113         ia64-*-* | \
114         hppa*64*-*-* | parisc*64*-*-* | \
115         i[34567]86-*-solaris2.1[0-9]* | \
116         mips*-*-* | \
117         mmix-*-* | \
118         powerpc*-*-* | \
119         rs6000*-*-* | \
120         s390*-*-* | \
121         sparc64*-*-* | ultrasparc-*-freebsd* | \
122         sparcv9-*-solaris2* | \
123         sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \
124         sh[123456789l]*-*-*)
125                 need_64bit_hwint=yes ;;
126         *)
127                 need_64bit_hwint=no ;;
128 esac
130 case $need_64bit_hwint:$ac_cv_sizeof_long in
131         *:8 | no:*) host_wide_int=long ;;
132         *) host_wide_int='long long' ;;
133 esac
134 m4_changequote([,])
136 AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int,
137 [Define to the widest efficient host integer type at least
138    as wide as the target's size_t type.])
140 # Output.
142 AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
143 AC_CONFIG_FILES(Makefile)
144 AC_OUTPUT