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)
8 AM_INIT_AUTOMAKE(foreign)
11 # Checks for programs.
15 # Checks for header files.
19 AC_CHECK_HEADERS(iconv.h locale.h fcntl.h limits.h stddef.h \
20 stdlib.h strings.h string.h sys/file.h unistd.h)
22 # Checks for typedefs, structures, and compiler characteristics.
31 AC_CHECK_FUNCS(putc_unlocked fputc_unlocked fputs_unlocked \
32 fwrite_unlocked fprintf_unlocked)
33 AC_CHECK_DECLS([abort, errno, putc_unlocked, fputc_unlocked,
34 fputs_unlocked, fwrite_unlocked, fprintf_unlocked])
36 # Checks for library functions.
40 ZW_GNU_GETTEXT_SISTER_DIR
42 AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar,
47 [if ((uchar *)0) return 0;
48 if (sizeof(uchar)) return 0;],
49 ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
50 if test $ac_cv_type_uchar = yes; then
51 AC_DEFINE(HAVE_UCHAR, 1,
52 [Define if <sys/types.h> defines \`uchar'.])
56 AM_CONDITIONAL(ENABLE_NLS, [test "x$enable_nls" != xno])
57 AC_ARG_ENABLE(checking,
58 [ --enable-checking enable expensive run-time checks],,
61 if test $enable_checking != no ; then
62 AC_DEFINE(ENABLE_CHECKING, 1,
63 [Define if you want more run-time sanity checks.])
70 hppa*64*-*-* | parisc*64*-*-* | \
76 sparc64*-*-* | ultrasparc-*-freebsd* | \
77 sparcv9-*-solaris2* | \
78 sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9] | \
80 need_64bit_hwint=yes ;;
82 need_64bit_hwint=no ;;
85 case $need_64bit_hwint:$ac_cv_sizeof_long in
86 *:8 | no:*) host_wide_int=long ;;
87 *) host_wide_int='long long' ;;
90 AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int,
91 [Define to the widest efficient host integer type at least
92 as wide as the target's size_t type.])
94 AC_CONFIG_HEADERS(config.h:config.in)
95 AC_CONFIG_FILES(Makefile)