OSDN Git Service

5b59bdcbc8fa29de29e814af3cca6b95a3b3c383
[pf3gnuchains/gcc-fork.git] / libcpp / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.59)
5 AC_INIT(cpplib, [ ], gcc-bugs@gcc.gnu.org, cpplib)
6 AC_CONFIG_SRCDIR(ucnid.h)
7 AC_CANONICAL_SYSTEM
8 AC_PROG_MAKE_SET
9 AC_PROG_INSTALL
10
11 # Checks for programs.
12 AC_PROG_CC
13 AC_PROG_RANLIB
14
15 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
16 AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
17 AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
18 AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
19
20 # Checks for header files.
21 AC_HEADER_TIME
22 ACX_HEADER_STRING
23 AC_CHECK_HEADERS(iconv.h locale.h fcntl.h limits.h stddef.h \
24         stdlib.h strings.h string.h sys/file.h unistd.h)
25
26 # Checks for typedefs, structures, and compiler characteristics.
27 AC_C_CONST
28 AC_C_INLINE
29 AC_FUNC_OBSTACK
30 AC_TYPE_OFF_T
31 AC_TYPE_SIZE_T
32 AC_STRUCT_TM
33 AC_CHECK_SIZEOF(int)
34 AC_CHECK_SIZEOF(long)
35 AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \
36         fwrite_unlocked fprintf_unlocked)
37 AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked,
38         fputs_unlocked, fwrite_unlocked, fprintf_unlocked])
39
40 # Checks for library functions.
41 AC_FUNC_ALLOCA
42 AC_HEADER_STDC
43 AM_LANGINFO_CODESET
44 ZW_GNU_GETTEXT_SISTER_DIR
45
46 AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar,
47 [AC_TRY_COMPILE([
48 #include "ansidecl.h"
49 #include "system.h"
50 ],
51 [if ((uchar *)0) return 0;
52  if (sizeof(uchar)) return 0;],
53 ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
54 if test $ac_cv_type_uchar = yes; then
55   AC_DEFINE(HAVE_UCHAR, 1,
56   [Define if <sys/types.h> defines \`uchar'.])
57 fi
58
59 AM_ICONV
60
61 # More defines and substitutions.
62 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of this package.])
63 AC_SUBST(PACKAGE)
64
65 if test "x$enable_nls" != xno; then
66   USED_CATALOGS='$(CATALOGS)'
67 else
68   USED_CATALOGS=
69 fi
70 AC_SUBST(USED_CATALOGS)
71
72 AC_ARG_ENABLE(maintainer-mode,
73 [  --enable-maintainer-mode enable rules only needed by maintainers],,
74 enable_maintainer_mode=no)
75
76 if test "x$enable_maintainer_mode" = xno; then
77   MAINT='#'
78 else
79   MAINT=
80 fi
81 AC_SUBST(MAINT)
82
83 AC_ARG_ENABLE(checking,
84 [  --enable-checking      enable expensive run-time checks],,
85 enable_checking=no)
86
87 if test $enable_checking != no ; then
88   AC_DEFINE(ENABLE_CHECKING, 1,
89 [Define if you want more run-time sanity checks.])
90 fi
91
92 m4_changequote(,)
93 case $target in
94         alpha*-*-* | \
95         arm*-*-eabi* | \
96         arm*-*-symbianelf* | \
97         x86_64-*-* | \
98         ia64-*-* | \
99         hppa*64*-*-* | parisc*64*-*-* | \
100         mips*-*-* | \
101         mmix-*-* | \
102         powerpc*-*-* | \
103         rs6000*-*-* | \
104         s390*-*-* | \
105         sparc64*-*-* | ultrasparc-*-freebsd* | \
106         sparcv9-*-solaris2* | \
107         sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9] | \
108         sh[123456789l]*-*-*)
109                 need_64bit_hwint=yes ;;
110         *)
111                 need_64bit_hwint=no ;;
112 esac
113
114 case $need_64bit_hwint:$ac_cv_sizeof_long in
115         *:8 | no:*) host_wide_int=long ;;
116         *) host_wide_int='long long' ;;
117 esac
118 m4_changequote([,])
119
120 AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int,
121 [Define to the widest efficient host integer type at least
122    as wide as the target's size_t type.])
123
124 # Output.
125
126 AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
127 AC_CONFIG_FILES(Makefile)
128 AC_OUTPUT