comparison libcpp/configure.ac @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents 77e2b8dfacca
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
11 AC_PROG_MAKE_SET 11 AC_PROG_MAKE_SET
12 AC_PROG_INSTALL 12 AC_PROG_INSTALL
13 AC_PROG_CC 13 AC_PROG_CC
14 AC_PROG_CXX 14 AC_PROG_CXX
15 AC_PROG_RANLIB 15 AC_PROG_RANLIB
16
17 AC_USE_SYSTEM_EXTENSIONS
18 AC_SYS_LARGEFILE
16 19
17 # See if we are building gcc with C++. 20 # See if we are building gcc with C++.
18 # Do this early so setting lang to C++ affects following tests 21 # Do this early so setting lang to C++ affects following tests
19 AC_ARG_ENABLE(build-with-cxx, 22 AC_ARG_ENABLE(build-with-cxx,
20 [ --enable-build-with-cxx build with C++ compiler instead of C compiler], 23 [ --enable-build-with-cxx build with C++ compiler instead of C compiler],
43 # Dependency checking. 46 # Dependency checking.
44 ZW_CREATE_DEPDIR 47 ZW_CREATE_DEPDIR
45 if test "$ENABLE_BUILD_WITH_CXX" = "no"; then 48 if test "$ENABLE_BUILD_WITH_CXX" = "no"; then
46 ZW_PROG_COMPILER_DEPENDENCIES([CC]) 49 ZW_PROG_COMPILER_DEPENDENCIES([CC])
47 else 50 else
51 AC_LANG_PUSH([C++])
52 AC_COMPILE_IFELSE([[int i;]], [],
53 [AC_MSG_ERROR([C++ compiler missing or inoperational])])
54 AC_LANG_POP([C++])
48 ZW_PROG_COMPILER_DEPENDENCIES([CXX]) 55 ZW_PROG_COMPILER_DEPENDENCIES([CXX])
49 fi 56 fi
50 57
51 # Checks for header files. 58 # Checks for header files.
52 AC_HEADER_TIME 59 AC_HEADER_TIME
53 ACX_HEADER_STRING 60 ACX_HEADER_STRING
54 61
55 # AC_CHECK_HEADERS is repeated to work around apparent autoconf 2.59 bug. If 62 AC_CHECK_HEADERS(locale.h fcntl.h limits.h stddef.h \
56 # AC_CHECK_HEADERS comes after the if clause, the last AC_LANG call gets used,
57 # no matter which branch is taken.
58 if test "$ENABLE_BUILD_WITH_CXX" = "no"; then
59 AC_LANG(C)
60 AC_CHECK_HEADERS(locale.h fcntl.h limits.h stddef.h \
61 stdlib.h strings.h string.h sys/file.h unistd.h) 63 stdlib.h strings.h string.h sys/file.h unistd.h)
62 else
63 AC_LANG(C++)
64 AC_CHECK_HEADERS(locale.h fcntl.h limits.h stddef.h \
65 stdlib.h strings.h string.h sys/stat.h sys/file.h unistd.h)
66 fi
67 64
68 # Checks for typedefs, structures, and compiler characteristics. 65 # Checks for typedefs, structures, and compiler characteristics.
66 AC_C_BIGENDIAN
69 AC_C_CONST 67 AC_C_CONST
70 AC_C_INLINE 68 AC_C_INLINE
71 AC_FUNC_OBSTACK 69 AC_FUNC_OBSTACK
72 AC_TYPE_OFF_T 70 AC_TYPE_OFF_T
73 AC_TYPE_SIZE_T 71 AC_TYPE_SIZE_T
74 AC_CHECK_TYPE(ssize_t, int) 72 AC_TYPE_SSIZE_T
73 AC_TYPE_UINTPTR_T
74 AC_CHECK_TYPE(ptrdiff_t, int)
75 AC_STRUCT_TM 75 AC_STRUCT_TM
76 AC_CHECK_SIZEOF(int) 76 AC_CHECK_SIZEOF(int)
77 AC_CHECK_SIZEOF(long) 77 AC_CHECK_SIZEOF(long)
78 define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl 78 define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
79 ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl 79 ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl
80 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl 80 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
81 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl 81 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
82 putchar_unlocked putc_unlocked) 82 putchar_unlocked putc_unlocked)
83 AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS) 83 AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS)
84 AC_CHECK_DECLS(m4_split(m4_normalize(abort asprintf basename errno getopt \ 84 AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, getopt, vasprintf])
85 libcpp_UNLOCKED_FUNCS vasprintf))) 85 AC_CHECK_DECLS(m4_split(m4_normalize(libcpp_UNLOCKED_FUNCS)))
86 86
87 # Checks for library functions. 87 # Checks for library functions.
88 AC_FUNC_ALLOCA 88 AC_FUNC_ALLOCA
89 AC_HEADER_STDC 89 AC_HEADER_STDC
90 AM_LANGINFO_CODESET 90 AM_LANGINFO_CODESET
175 175
176 AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int, 176 AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int,
177 [Define to the widest efficient host integer type at least 177 [Define to the widest efficient host integer type at least
178 as wide as the target's size_t type.]) 178 as wide as the target's size_t type.])
179 179
180 case $target in
181 i?86-* | x86_64-*)
182 AC_TRY_COMPILE([], [asm ("pcmpestri %0, %%xmm0, %%xmm1" : : "i"(0))],
183 [AC_DEFINE([HAVE_SSE4], [1],
184 [Define to 1 if you can assemble SSE4 insns.])])
185 esac
186
180 # Output. 187 # Output.
181 188
182 AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1]) 189 AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1])
183 AC_CONFIG_FILES(Makefile) 190 AC_CONFIG_FILES(Makefile)
184 AC_OUTPUT 191 AC_OUTPUT