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 -Wmissing-format-attribute])
27 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])
29 # Only enable with --enable-werror-always until existing warnings are
31 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])
33 # Dependency checking.
35 ZW_PROG_COMPILER_DEPENDENCIES([CC])
37 # Checks for header files.
40 AC_CHECK_HEADERS(iconv.h locale.h fcntl.h limits.h stddef.h \
41 stdlib.h strings.h string.h sys/file.h unistd.h)
43 # Checks for typedefs, structures, and compiler characteristics.
52 define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
53 ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
54 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
55 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
56 putchar_unlocked putc_unlocked)
57 AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS)
58 AC_CHECK_DECLS(m4_split(m4_normalize(abort asprintf basename errno getopt \
59 libcpp_UNLOCKED_FUNCS vasprintf)))
61 # Checks for library functions.
65 ZW_GNU_GETTEXT_SISTER_DIR
67 AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar,
69 #include <sys/types.h>
71 [if ((uchar *)0) return 0;
72 if (sizeof(uchar)) return 0;],
73 ac_cv_type_uchar=yes, ac_cv_type_uchar=no)])
74 if test $ac_cv_type_uchar = yes; then
75 AC_DEFINE(HAVE_UCHAR, 1,
76 [Define if <sys/types.h> defines \`uchar'.])
81 # More defines and substitutions.
82 PACKAGE="$PACKAGE_TARNAME"
83 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of this package.])
86 if test "x$enable_nls" != xno; then
87 USED_CATALOGS='$(CATALOGS)'
91 AC_SUBST(USED_CATALOGS)
93 AC_ARG_ENABLE(maintainer-mode,
94 [ --enable-maintainer-mode enable rules only needed by maintainers],,
95 enable_maintainer_mode=no)
97 if test "x$enable_maintainer_mode" = xno; then
104 AC_ARG_ENABLE(checking,
105 [ --enable-checking enable expensive run-time checks],,
108 if test $enable_checking != no ; then
109 AC_DEFINE(ENABLE_CHECKING, 1,
110 [Define if you want more run-time sanity checks.])
117 arm*-*-symbianelf* | \
120 hppa*64*-*-* | parisc*64*-*-* | \
121 i[34567]86-*-darwin* | \
122 i[34567]86-*-solaris2.1[0-9]* | \
128 sparc64*-*-* | ultrasparc-*-freebsd* | \
129 sparcv9-*-solaris2* | \
130 sparc-*-solaris2.[789] | sparc-*-solaris2.1[0-9]* | \
133 need_64bit_hwint=yes ;;
135 if test "x$enable_targets" = xall; then
142 need_64bit_hwint=no ;;
145 case $need_64bit_hwint:$ac_cv_sizeof_long in
146 *:8 | no:*) host_wide_int=long ;;
147 *) host_wide_int='long long' ;;
151 AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int,
152 [Define to the widest efficient host integer type at least
153 as wide as the target's size_t type.])
157 AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
158 AC_CONFIG_FILES(Makefile)