2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(cpplib, [ ], gcc-bugs@gcc.gnu.org, cpplib)
6 AC_CONFIG_SRCDIR(ucnid.h)
7 AC_CONFIG_MACRO_DIR(../config)
10 # Checks for programs.
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
30 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
32 # Checks for header files.
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.
47 AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \
48 fwrite_unlocked fprintf_unlocked)
49 AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked,
50 fputs_unlocked, fwrite_unlocked, fprintf_unlocked])
52 # Checks for library functions.
56 ZW_GNU_GETTEXT_SISTER_DIR
58 AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar,
63 [if ((uchar *)0) return 0;
64 if (sizeof(uchar)) return 0;],
65 ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
66 if test $ac_cv_type_uchar = yes; then
67 AC_DEFINE(HAVE_UCHAR, 1,
68 [Define if <sys/types.h> defines \`uchar'.])
73 # More defines and substitutions.
74 PACKAGE="$PACKAGE_TARNAME"
75 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of this package.])
78 if test "x$enable_nls" != xno; then
79 USED_CATALOGS='$(CATALOGS)'
83 AC_SUBST(USED_CATALOGS)
85 AC_ARG_ENABLE(maintainer-mode,
86 [ --enable-maintainer-mode enable rules only needed by maintainers],,
87 enable_maintainer_mode=no)
89 if test "x$enable_maintainer_mode" = xno; then
96 AC_ARG_ENABLE(checking,
97 [ --enable-checking enable expensive run-time checks],,
100 if test $enable_checking != no ; then
101 AC_DEFINE(ENABLE_CHECKING, 1,
102 [Define if you want more run-time sanity checks.])
109 arm*-*-symbianelf* | \
112 hppa*64*-*-* | parisc*64*-*-* | \
118 sparc64*-*-* | ultrasparc-*-freebsd* | \
119 sparcv9-*-solaris2* | \
120 sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9] | \
122 need_64bit_hwint=yes ;;
124 need_64bit_hwint=no ;;
127 case $need_64bit_hwint:$ac_cv_sizeof_long in
128 *:8 | no:*) host_wide_int=long ;;
129 *) host_wide_int='long long' ;;
133 AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int,
134 [Define to the widest efficient host integer type at least
135 as wide as the target's size_t type.])
139 AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
140 AC_CONFIG_FILES(Makefile)