Mercurial > hg > CbC > CbC_gcc
annotate libcpp/configure.ac @ 109:78d3881f2882
add CbC-example/rectype
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 14 Jun 2012 20:43:12 +0900 |
parents | f6334be47118 |
children | 04ced10e8804 |
rev | line source |
---|---|
0 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
4 AC_PREREQ(2.64) |
0 | 5 AC_INIT(cpplib, [ ], gcc-bugs@gcc.gnu.org, cpplib) |
6 AC_CONFIG_SRCDIR(ucnid.h) | |
7 AC_CONFIG_MACRO_DIR(../config) | |
8 AC_CANONICAL_SYSTEM | |
9 | |
10 # Checks for programs. | |
11 AC_PROG_MAKE_SET | |
12 AC_PROG_INSTALL | |
13 AC_PROG_CC | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
14 AC_PROG_CXX |
0 | 15 AC_PROG_RANLIB |
16 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
17 AC_USE_SYSTEM_EXTENSIONS |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
18 AC_SYS_LARGEFILE |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
19 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
20 # See if we are building gcc with C++. |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
21 # Do this early so setting lang to C++ affects following tests |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
22 AC_ARG_ENABLE(build-with-cxx, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
23 [ --enable-build-with-cxx build with C++ compiler instead of C compiler], |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
24 ENABLE_BUILD_WITH_CXX=$enableval, |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
25 ENABLE_BUILD_WITH_CXX=no) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
26 AC_SUBST(ENABLE_BUILD_WITH_CXX) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
27 |
0 | 28 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing |
29 AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal]) | |
30 AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf]) | |
31 AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader]) | |
32 | |
33 # Figure out what compiler warnings we can enable. | |
34 # See config/warnings.m4 for details. | |
35 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
36 ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
37 -Wmissing-format-attribute], [warn]) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
38 ACX_PROG_CC_WARNING_OPTS([-Wstrict-prototypes -Wmissing-prototypes \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
39 -Wold-style-definition -Wc++-compat], [c_warn]) |
0 | 40 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long]) |
41 | |
42 # Only enable with --enable-werror-always until existing warnings are | |
43 # corrected. | |
44 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual]) | |
45 | |
46 # Dependency checking. | |
47 ZW_CREATE_DEPDIR | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
48 if test "$ENABLE_BUILD_WITH_CXX" = "no"; then |
0 | 49 ZW_PROG_COMPILER_DEPENDENCIES([CC]) |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
50 else |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
51 AC_LANG_PUSH([C++]) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
52 AC_COMPILE_IFELSE([[int i;]], [], |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
53 [AC_MSG_ERROR([C++ compiler missing or inoperational])]) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
54 AC_LANG_POP([C++]) |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
55 ZW_PROG_COMPILER_DEPENDENCIES([CXX]) |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
56 fi |
0 | 57 |
58 # Checks for header files. | |
59 AC_HEADER_TIME | |
60 ACX_HEADER_STRING | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
61 |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
62 AC_CHECK_HEADERS(locale.h fcntl.h limits.h stddef.h \ |
0 | 63 stdlib.h strings.h string.h sys/file.h unistd.h) |
64 | |
65 # Checks for typedefs, structures, and compiler characteristics. | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
66 AC_C_BIGENDIAN |
0 | 67 AC_C_CONST |
68 AC_C_INLINE | |
69 AC_FUNC_OBSTACK | |
70 AC_TYPE_OFF_T | |
71 AC_TYPE_SIZE_T | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
72 AC_TYPE_SSIZE_T |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
73 AC_TYPE_UINTPTR_T |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
74 AC_CHECK_TYPE(ptrdiff_t, int) |
0 | 75 AC_STRUCT_TM |
76 AC_CHECK_SIZEOF(int) | |
77 AC_CHECK_SIZEOF(long) | |
78 define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl | |
79 ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl | |
80 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl | |
81 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl | |
82 putchar_unlocked putc_unlocked) | |
83 AC_CHECK_FUNCS(libcpp_UNLOCKED_FUNCS) | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
84 AC_CHECK_DECLS([abort, asprintf, basename(char *), errno, getopt, vasprintf]) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
85 AC_CHECK_DECLS(m4_split(m4_normalize(libcpp_UNLOCKED_FUNCS))) |
0 | 86 |
87 # Checks for library functions. | |
88 AC_FUNC_ALLOCA | |
89 AC_HEADER_STDC | |
90 AM_LANGINFO_CODESET | |
91 ZW_GNU_GETTEXT_SISTER_DIR | |
92 | |
93 AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar, | |
94 [AC_TRY_COMPILE([ | |
95 #include <sys/types.h> | |
96 ], | |
97 [if ((uchar *)0) return 0; | |
98 if (sizeof(uchar)) return 0;], | |
99 ac_cv_type_uchar=yes, ac_cv_type_uchar=no)]) | |
100 if test $ac_cv_type_uchar = yes; then | |
101 AC_DEFINE(HAVE_UCHAR, 1, | |
102 [Define if <sys/types.h> defines \`uchar'.]) | |
103 fi | |
104 | |
105 AM_ICONV | |
106 | |
107 # More defines and substitutions. | |
108 PACKAGE="$PACKAGE_TARNAME" | |
109 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Define to the name of this package.]) | |
110 AC_SUBST(PACKAGE) | |
111 | |
112 if test "x$enable_nls" != xno; then | |
113 USED_CATALOGS='$(CATALOGS)' | |
114 else | |
115 USED_CATALOGS= | |
116 fi | |
117 AC_SUBST(USED_CATALOGS) | |
118 | |
119 AC_ARG_ENABLE(maintainer-mode, | |
120 [ --enable-maintainer-mode enable rules only needed by maintainers],, | |
121 enable_maintainer_mode=no) | |
122 | |
123 if test "x$enable_maintainer_mode" = xno; then | |
124 MAINT='#' | |
125 else | |
126 MAINT= | |
127 fi | |
128 AC_SUBST(MAINT) | |
129 | |
130 AC_ARG_ENABLE(checking, | |
131 [ --enable-checking enable expensive run-time checks],, | |
132 enable_checking=no) | |
133 | |
134 if test $enable_checking != no ; then | |
135 AC_DEFINE(ENABLE_CHECKING, 1, | |
136 [Define if you want more run-time sanity checks.]) | |
137 fi | |
138 | |
139 m4_changequote(,) | |
140 case $target in | |
141 alpha*-*-* | \ | |
142 arm*-*-*eabi* | \ | |
143 arm*-*-symbianelf* | \ | |
144 x86_64-*-* | \ | |
145 ia64-*-* | \ | |
146 hppa*64*-*-* | \ | |
147 i[34567]86-*-darwin* | \ | |
148 i[34567]86-*-solaris2.1[0-9]* | \ | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
149 i[34567]86-w64-mingw* | \ |
0 | 150 mips*-*-* | \ |
151 mmix-*-* | \ | |
152 powerpc*-*-* | \ | |
153 rs6000*-*-* | \ | |
154 s390*-*-* | \ | |
155 sparc*-*-* | \ | |
156 spu-*-* | \ | |
157 sh[123456789lbe]*-*-* | sh-*-*) | |
158 need_64bit_hwint=yes ;; | |
159 i[34567]86-*-linux*) | |
160 if test "x$enable_targets" = xall; then | |
161 need_64bit_hwint=yes | |
162 else | |
163 need_64bit_hwint=no | |
164 fi | |
165 ;; | |
166 *) | |
167 need_64bit_hwint=no ;; | |
168 esac | |
169 | |
170 case $need_64bit_hwint:$ac_cv_sizeof_long in | |
171 *:8 | no:*) host_wide_int=long ;; | |
172 *) host_wide_int='long long' ;; | |
173 esac | |
174 m4_changequote([,]) | |
175 | |
176 AC_DEFINE_UNQUOTED(HOST_WIDE_INT, $host_wide_int, | |
177 [Define to the widest efficient host integer type at least | |
178 as wide as the target's size_t type.]) | |
179 | |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
180 case $target in |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
181 i?86-* | x86_64-*) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
182 AC_TRY_COMPILE([], [asm ("pcmpestri %0, %%xmm0, %%xmm1" : : "i"(0))], |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
183 [AC_DEFINE([HAVE_SSE4], [1], |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
184 [Define to 1 if you can assemble SSE4 insns.])]) |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
185 esac |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
55
diff
changeset
|
186 |
0 | 187 # Output. |
188 | |
189 AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1]) | |
190 AC_CONFIG_FILES(Makefile) | |
191 AC_OUTPUT |