]> gcc.gnu.org Git - gcc.git/blame - libcpp/configure.ac
fix thinko
[gcc.git] / libcpp / configure.ac
CommitLineData
4f4e53dd
PB
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
2fac9c01 4AC_PREREQ(2.59)
4f4e53dd
PB
5AC_INIT(cpplib, [ ], gcc-bugs@gcc.gnu.org, cpplib)
6AC_CONFIG_SRCDIR(ucnid.h)
7AC_CANONICAL_SYSTEM
078e3ffe
PB
8AC_PROG_MAKE_SET
9AC_PROG_INSTALL
4f4e53dd
PB
10
11# Checks for programs.
12AC_PROG_CC
13AC_PROG_RANLIB
14
078e3ffe
PB
15MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
16AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
17AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
18AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
19
4f4e53dd
PB
20# Checks for header files.
21AC_HEADER_TIME
22ACX_HEADER_STRING
4f4e53dd
PB
23AC_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.
27AC_C_CONST
28AC_C_INLINE
29AC_FUNC_OBSTACK
30AC_TYPE_OFF_T
31AC_TYPE_SIZE_T
32AC_STRUCT_TM
33AC_CHECK_SIZEOF(int)
34AC_CHECK_SIZEOF(long)
35AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \
36 fwrite_unlocked fprintf_unlocked)
37AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked,
38 fputs_unlocked, fwrite_unlocked, fprintf_unlocked])
39
40# Checks for library functions.
41AC_FUNC_ALLOCA
42AC_HEADER_STDC
43AM_LANGINFO_CODESET
44ZW_GNU_GETTEXT_SISTER_DIR
45
46AC_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;],
53ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
54if test $ac_cv_type_uchar = yes; then
55 AC_DEFINE(HAVE_UCHAR, 1,
56 [Define if <sys/types.h> defines \`uchar'.])
57fi
58
59AM_ICONV
078e3ffe
PB
60
61# More defines and substitutions.
62AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of this package.])
63AC_SUBST(PACKAGE)
64
65if test "x$enable_nls" != xno; then
66 USED_CATALOGS='$(CATALOGS)'
67else
68 USED_CATALOGS=
69fi
70AC_SUBST(USED_CATALOGS)
71
72AC_ARG_ENABLE(maintainer-mode,
73[ --enable-maintainer-mode enable rules only needed by maintainers],,
74enable_maintainer_mode=no)
75
76if test "x$enable_maintainer_mode" = xno; then
77 MAINT='#'
78else
79 MAINT=
80fi
81AC_SUBST(MAINT)
82
4f4e53dd
PB
83AC_ARG_ENABLE(checking,
84[ --enable-checking enable expensive run-time checks],,
85enable_checking=no)
86
87if test $enable_checking != no ; then
88 AC_DEFINE(ENABLE_CHECKING, 1,
89[Define if you want more run-time sanity checks.])
90fi
91
963e23c5 92m4_changequote(,)
4f4e53dd
PB
93case $target in
94 alpha*-*-* | \
b3f8d95d
MM
95 arm*-*-eabi* | \
96 arm*-*-symbianelf* | \
4f4e53dd
PB
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 ;;
112esac
113
114case $need_64bit_hwint:$ac_cv_sizeof_long in
115 *:8 | no:*) host_wide_int=long ;;
116 *) host_wide_int='long long' ;;
117esac
963e23c5 118m4_changequote([,])
4f4e53dd
PB
119
120AC_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
078e3ffe
PB
124# Output.
125
126AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
4f4e53dd
PB
127AC_CONFIG_FILES(Makefile)
128AC_OUTPUT
This page took 0.084252 seconds and 5 git commands to generate.