Mercurial > hg > CbC > CbC_gcc
annotate libcpp/configure.ac @ 120:f93fa5091070
fix conv1.c
author | mir3636 |
---|---|
date | Thu, 08 Mar 2018 14:53:42 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
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 |
0 | 20 MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing |
21 AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal]) | |
22 AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf]) | |
23 AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader]) | |
24 | |
25 # Figure out what compiler warnings we can enable. | |
26 # See config/warnings.m4 for details. | |
27 | |
111 | 28 ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wno-narrowing -Wwrite-strings \ |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
29 -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
|
30 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
|
31 -Wold-style-definition -Wc++-compat], [c_warn]) |
0 | 32 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long]) |
33 | |
111 | 34 # Disable exceptions and RTTI if building with g++ |
35 ACX_PROG_CC_WARNING_OPTS( | |
36 m4_quote(m4_do([-fno-exceptions -fno-rtti])), [noexception_flags]) | |
37 | |
0 | 38 # Only enable with --enable-werror-always until existing warnings are |
39 # corrected. | |
40 ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual]) | |
41 | |
42 # Dependency checking. | |
43 ZW_CREATE_DEPDIR | |
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
|
44 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
|
45 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
|
46 [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
|
47 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
|
48 ZW_PROG_COMPILER_DEPENDENCIES([CXX]) |
0 | 49 |
50 # Checks for header files. | |
51 AC_HEADER_TIME | |
52 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
|
53 |
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
|
54 AC_CHECK_HEADERS(locale.h fcntl.h limits.h stddef.h \ |
0 | 55 stdlib.h strings.h string.h sys/file.h unistd.h) |
56 | |
57 # 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
|
58 AC_C_BIGENDIAN |
0 | 59 AC_C_CONST |
60 AC_C_INLINE | |
61 AC_FUNC_OBSTACK | |
62 AC_TYPE_OFF_T | |
63 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
|
64 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
|
65 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
|
66 AC_CHECK_TYPE(ptrdiff_t, int) |
111 | 67 AC_TYPE_UINT64_T |
68 if test x"$ac_cv_c_uint64_t" = x"no"; then | |
69 AC_MSG_ERROR([uint64_t not found]) | |
70 fi | |
0 | 71 AC_STRUCT_TM |
72 AC_CHECK_SIZEOF(int) | |
73 AC_CHECK_SIZEOF(long) | |
74 define(libcpp_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl | |
75 ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked dnl | |
76 fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl | |
77 fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl | |
78 putchar_unlocked putc_unlocked) | |
79 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
|
80 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
|
81 AC_CHECK_DECLS(m4_split(m4_normalize(libcpp_UNLOCKED_FUNCS))) |
0 | 82 |
83 # Checks for library functions. | |
84 AC_FUNC_ALLOCA | |
85 AC_HEADER_STDC | |
86 AM_LANGINFO_CODESET | |
87 ZW_GNU_GETTEXT_SISTER_DIR | |
88 | |
89 AC_CACHE_CHECK(for uchar, gcc_cv_type_uchar, | |
90 [AC_TRY_COMPILE([ | |
91 #include <sys/types.h> | |
92 ], | |
93 [if ((uchar *)0) return 0; | |
94 if (sizeof(uchar)) return 0;], | |
95 ac_cv_type_uchar=yes, ac_cv_type_uchar=no)]) | |
96 if test $ac_cv_type_uchar = yes; then | |
97 AC_DEFINE(HAVE_UCHAR, 1, | |
98 [Define if <sys/types.h> defines \`uchar'.]) | |
99 fi | |
100 | |
111 | 101 # g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different |
102 # iconv() prototype. | |
103 AC_LANG_PUSH([C++]) | |
0 | 104 AM_ICONV |
111 | 105 AC_LANG_POP([C++]) |
0 | 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 | |
111 | 130 # Enable expensive internal checks |
131 is_release= | |
132 if test -f $srcdir/../gcc/DEV-PHASE \ | |
133 && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then | |
134 is_release=yes | |
0 | 135 fi |
136 | |
111 | 137 AC_ARG_ENABLE(checking, |
138 [AS_HELP_STRING([[--enable-checking[=LIST]]], | |
139 [enable expensive run-time checks. With LIST, | |
140 enable only specific categories of checks. | |
141 Categories are: yes,no,all,none,release. | |
142 Flags are: misc,valgrind or other strings])], | |
143 [ac_checking_flags="${enableval}"],[ | |
144 # Determine the default checks. | |
145 if test x$is_release = x ; then | |
146 ac_checking_flags=yes | |
147 else | |
148 ac_checking_flags=release | |
149 fi]) | |
150 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
151 for check in release $ac_checking_flags | |
152 do | |
153 case $check in | |
154 # these set all the flags to specific states | |
155 yes|all) ac_checking=1 ; ac_assert_checking=1 ; ac_valgrind_checking= ;; | |
156 no|none) ac_checking= ; ac_assert_checking= ; ac_valgrind_checking= ;; | |
157 release) ac_checking= ; ac_assert_checking=1 ; ac_valgrind_checking= ;; | |
158 # these enable particular checks | |
159 assert) ac_assert_checking=1 ;; | |
160 misc) ac_checking=1 ;; | |
161 valgrind) ac_valgrind_checking=1 ;; | |
162 # accept | |
163 *) ;; | |
164 esac | |
165 done | |
166 IFS="$ac_save_IFS" | |
167 | |
168 if test x$ac_checking != x ; then | |
169 AC_DEFINE(CHECKING_P, 1, | |
170 [Define to 1 if you want more run-time sanity checks.]) | |
171 else | |
172 AC_DEFINE(CHECKING_P, 0) | |
173 fi | |
0 | 174 |
111 | 175 if test x$ac_assert_checking != x ; then |
176 AC_DEFINE(ENABLE_ASSERT_CHECKING, 1, | |
177 [Define if you want assertions enabled. This is a cheap check.]) | |
178 fi | |
0 | 179 |
111 | 180 if test x$ac_valgrind_checking != x ; then |
181 AC_DEFINE(ENABLE_VALGRIND_CHECKING, 1, | |
182 [Define if you want to workaround valgrind (a memory checker) warnings about | |
183 possible memory leaks because of libcpp use of interior pointers.]) | |
184 fi | |
185 | |
186 AC_ARG_ENABLE(canonical-system-headers, | |
187 [ --enable-canonical-system-headers | |
188 enable or disable system headers canonicalization], | |
189 [], | |
190 enable_canonical_system_headers=yes) | |
191 if test $enable_canonical_system_headers != no; then | |
192 AC_DEFINE(ENABLE_CANONICAL_SYSTEM_HEADERS, | |
193 1, [Define to enable system headers canonicalization.]) | |
194 fi | |
0 | 195 |
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
|
196 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
|
197 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
|
198 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
|
199 [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
|
200 [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
|
201 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
|
202 |
111 | 203 # Enable --enable-host-shared. |
204 AC_ARG_ENABLE(host-shared, | |
205 [AS_HELP_STRING([--enable-host-shared], | |
206 [build host code as shared libraries])], | |
207 [PICFLAG=-fPIC], [PICFLAG=]) | |
208 AC_SUBST(PICFLAG) | |
209 | |
210 AC_ARG_ENABLE(valgrind-annotations, | |
211 [AS_HELP_STRING([--enable-valgrind-annotations], | |
212 [enable valgrind runtime interaction])], [], | |
213 [enable_valgrind_annotations=no]) | |
214 if test x$enable_valgrind_annotations != xno \ | |
215 || test x$ac_valgrind_checking != x; then | |
216 if (test $have_valgrind_h = no \ | |
217 && test $gcc_cv_header_memcheck_h = no \ | |
218 && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
219 AC_MSG_ERROR([*** Can't find valgrind/memcheck.h, memcheck.h or valgrind.h]) | |
220 fi | |
221 AC_DEFINE(ENABLE_VALGRIND_ANNOTATIONS, 1, | |
222 [Define to get calls to the valgrind runtime enabled.]) | |
223 fi | |
224 | |
0 | 225 # Output. |
226 | |
227 AC_CONFIG_HEADERS(config.h:config.in, [echo timestamp > stamp-h1]) | |
228 AC_CONFIG_FILES(Makefile) | |
229 AC_OUTPUT |