configure.ac revision 1.5.4.1 1 1.1 mrg # Process this file with autoreconf to produce a configure script.
2 1.1 mrg
3 1.1 mrg AC_PREREQ(2.64)
4 1.1 mrg AC_INIT(package-unused, version-unused,, libstdc++)
5 1.3 mrg AC_CONFIG_SRCDIR(src/shared/hashtable-aux.cc)
6 1.1 mrg AC_CONFIG_HEADER(config.h)
7 1.1 mrg
8 1.1 mrg # This works around the fact that libtool configuration may change LD
9 1.1 mrg # for this particular configuration, but some shells, instead of
10 1.1 mrg # keeping the changes in LD private, export them just because LD is
11 1.1 mrg # exported. Only used at the end of this file.
12 1.1 mrg ### am handles this now? ORIGINAL_LD_FOR_MULTILIBS=$LD
13 1.1 mrg
14 1.1 mrg # Find the rest of the source tree framework.
15 1.1 mrg AM_ENABLE_MULTILIB(, ..)
16 1.1 mrg
17 1.1 mrg # Gets build, host, target, *_vendor, *_cpu, *_os, etc.
18 1.1 mrg #
19 1.1 mrg # You will slowly go insane if you do not grok the following fact: when
20 1.1 mrg # building v3 as part of the compiler, the top-level /target/ becomes the
21 1.1 mrg # library's /host/. configure then causes --target to default to --host,
22 1.1 mrg # exactly like any other package using autoconf. Therefore, 'target' and
23 1.1 mrg # 'host' will always be the same. This makes sense both for native and
24 1.1 mrg # cross compilers, just think about it for a little while. :-)
25 1.1 mrg #
26 1.1 mrg # Also, if v3 is being configured as part of a cross compiler, the top-level
27 1.1 mrg # configure script will pass the "real" host as $with_cross_host.
28 1.1 mrg #
29 1.1 mrg # Do not delete or change the following two lines. For why, see
30 1.1 mrg # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
31 1.1 mrg AC_CANONICAL_SYSTEM
32 1.1 mrg target_alias=${target_alias-$host_alias}
33 1.1 mrg
34 1.1 mrg # Handy for debugging:
35 1.1 mrg #AC_MSG_NOTICE($build / $host / $target / $host_alias / $target_alias); sleep 5
36 1.1 mrg
37 1.1 mrg if test "$build" != "$host"; then
38 1.1 mrg # We are being configured with some form of cross compiler.
39 1.1 mrg GLIBCXX_IS_NATIVE=false
40 1.1 mrg case "$host","$target" in
41 1.3 mrg *-*-netbsd*,*-*-netbsd*)
42 1.3 mrg GLIBCXX_IS_NATIVE=true
43 1.3 mrg ;;
44 1.1 mrg # Darwin crosses can use the host system's libraries and headers,
45 1.1 mrg # because of the fat library support. Of course, it must be the
46 1.1 mrg # same version of Darwin on both sides. Allow the user to
47 1.1 mrg # just say --target=foo-darwin without a version number to mean
48 1.1 mrg # "the version on this system".
49 1.1 mrg *-*-darwin*,*-*-darwin*)
50 1.1 mrg hostos=`echo $host | sed 's/.*-darwin/darwin/'`
51 1.1 mrg targetos=`echo $target | sed 's/.*-darwin/darwin/'`
52 1.1 mrg if test $hostos = $targetos -o $targetos = darwin ; then
53 1.1 mrg GLIBCXX_IS_NATIVE=true
54 1.1 mrg fi
55 1.1 mrg ;;
56 1.1 mrg
57 1.1 mrg *)
58 1.1 mrg GCC_NO_EXECUTABLES
59 1.1 mrg ;;
60 1.1 mrg esac
61 1.1 mrg else
62 1.1 mrg GLIBCXX_IS_NATIVE=true
63 1.1 mrg fi
64 1.1 mrg
65 1.1 mrg # Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the
66 1.1 mrg # following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
67 1.1 mrg # 1.x: minimum required version
68 1.1 mrg # no-define: PACKAGE and VERSION will not be #define'd in config.h (a bunch
69 1.1 mrg # of other PACKAGE_* variables will, however, and there's nothing
70 1.1 mrg # we can do about that; they come from AC_INIT).
71 1.1 mrg # foreign: we don't follow the normal rules for GNU packages (no COPYING
72 1.1 mrg # file in the top srcdir, etc, etc), so stop complaining.
73 1.1 mrg # no-dependencies: turns off auto dependency generation (just for now)
74 1.3 mrg # no-dist: we don't want 'dist' and related rules.
75 1.1 mrg # -Wall: turns on all automake warnings...
76 1.1 mrg # -Wno-portability: ...except this one, since GNU make is now required.
77 1.3 mrg AM_INIT_AUTOMAKE([1.9.3 no-define foreign no-dependencies no-dist -Wall -Wno-portability -Wno-override])
78 1.1 mrg AH_TEMPLATE(PACKAGE, [Name of package])
79 1.1 mrg AH_TEMPLATE(VERSION, [Version number of package])
80 1.1 mrg
81 1.1 mrg # -fno-builtin must be present here so that a non-conflicting form of
82 1.1 mrg # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
83 1.1 mrg
84 1.1 mrg save_CXXFLAGS="$CXXFLAGS"
85 1.1 mrg CXXFLAGS="$CXXFLAGS -fno-builtin"
86 1.1 mrg AC_PROG_CC
87 1.1 mrg AC_PROG_CXX
88 1.1 mrg CXXFLAGS="$save_CXXFLAGS"
89 1.1 mrg
90 1.1 mrg # Runs configure.host, and assorted other critical bits. Sets
91 1.1 mrg # up critical shell variables.
92 1.1 mrg GLIBCXX_CONFIGURE
93 1.1 mrg
94 1.3 mrg # Libtool setup.
95 1.1 mrg if test "x${with_newlib}" != "xyes"; then
96 1.1 mrg AC_LIBTOOL_DLOPEN
97 1.1 mrg fi
98 1.1 mrg AM_PROG_LIBTOOL
99 1.3 mrg ACX_LT_HOST_FLAGS
100 1.1 mrg AC_SUBST(enable_shared)
101 1.1 mrg AC_SUBST(enable_static)
102 1.1 mrg
103 1.5 mrg if test "$enable_vtable_verify" = yes; then
104 1.5 mrg predep_objects_CXX="${predep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_start.o"
105 1.5 mrg postdep_objects_CXX="${postdep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_end.o"
106 1.5 mrg fi
107 1.5 mrg
108 1.5 mrg
109 1.3 mrg # libtool variables for C++ shared and position-independent compiles.
110 1.3 mrg #
111 1.3 mrg # Use glibcxx_lt_pic_flag to designate the automake variable
112 1.3 mrg # used to encapsulate the default libtool approach to creating objects
113 1.3 mrg # with position-independent code. Default: -prefer-pic.
114 1.3 mrg #
115 1.3 mrg # Use glibcxx_compiler_shared_flag to designate a compile-time flags for
116 1.3 mrg # creating shared objects. Default: -D_GLIBCXX_SHARED.
117 1.3 mrg #
118 1.3 mrg # Use glibcxx_compiler_pic_flag to designate a compile-time flags for
119 1.3 mrg # creating position-independent objects. This varies with the target
120 1.3 mrg # hardware and operating system, but is often: -DPIC -fPIC.
121 1.3 mrg if test "$enable_shared" = yes; then
122 1.3 mrg glibcxx_lt_pic_flag="-prefer-pic"
123 1.3 mrg glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
124 1.3 mrg glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"
125 1.3 mrg
126 1.3 mrg else
127 1.3 mrg glibcxx_lt_pic_flag=
128 1.3 mrg glibcxx_compiler_pic_flag=
129 1.3 mrg glibcxx_compiler_shared_flag=
130 1.3 mrg fi
131 1.3 mrg AC_SUBST(glibcxx_lt_pic_flag)
132 1.3 mrg AC_SUBST(glibcxx_compiler_pic_flag)
133 1.3 mrg AC_SUBST(glibcxx_compiler_shared_flag)
134 1.3 mrg
135 1.3 mrg # Override the libtool's pic_flag and pic_mode.
136 1.3 mrg # Do this step after AM_PROG_LIBTOOL, but before AC_OUTPUT.
137 1.3 mrg # NB: this impacts --with-pic and --without-pic.
138 1.3 mrg lt_prog_compiler_pic_CXX="$glibcxx_compiler_pic_flag $glibcxx_compiler_shared_flag"
139 1.3 mrg pic_mode='default'
140 1.3 mrg
141 1.1 mrg # Eliminate -lstdc++ addition to postdeps for cross compiles.
142 1.1 mrg postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
143 1.1 mrg
144 1.1 mrg # Possibly disable most of the library.
145 1.1 mrg ## TODO: Consider skipping unncessary tests altogether in this case, rather
146 1.1 mrg ## than just ignoring the results. Faster /and/ more correct, win win.
147 1.1 mrg GLIBCXX_ENABLE_HOSTED
148 1.1 mrg
149 1.3 mrg # Enable descriptive messages to standard output on termination.
150 1.3 mrg GLIBCXX_ENABLE_VERBOSE
151 1.3 mrg
152 1.1 mrg # Enable compiler support that doesn't require linking.
153 1.1 mrg GLIBCXX_ENABLE_PCH($is_hosted)
154 1.1 mrg GLIBCXX_ENABLE_THREADS
155 1.1 mrg GLIBCXX_ENABLE_ATOMIC_BUILTINS
156 1.1 mrg GLIBCXX_ENABLE_DECIMAL_FLOAT
157 1.3 mrg GLIBCXX_ENABLE_INT128_FLOAT128
158 1.5 mrg if test "$enable_float128" = yes; then
159 1.5 mrg port_specific_symbol_files="$port_specific_symbol_files \$(top_srcdir)/config/abi/pre/float128.ver"
160 1.5 mrg fi
161 1.1 mrg
162 1.1 mrg # Checks for compiler support that doesn't require linking.
163 1.1 mrg GLIBCXX_CHECK_COMPILER_FEATURES
164 1.1 mrg
165 1.1 mrg # Enable all the variable C++ runtime options that don't require linking.
166 1.1 mrg GLIBCXX_ENABLE_CSTDIO
167 1.1 mrg GLIBCXX_ENABLE_CLOCALE
168 1.1 mrg GLIBCXX_ENABLE_ALLOCATOR
169 1.1 mrg GLIBCXX_ENABLE_CHEADERS($c_model) dnl c_model from configure.host
170 1.1 mrg GLIBCXX_ENABLE_LONG_LONG([yes])
171 1.1 mrg GLIBCXX_ENABLE_WCHAR_T([yes])
172 1.1 mrg GLIBCXX_ENABLE_C99([yes])
173 1.1 mrg GLIBCXX_ENABLE_CONCEPT_CHECKS([no])
174 1.3 mrg GLIBCXX_ENABLE_DEBUG_FLAGS(["-gdwarf-4 -g3 -O0"])
175 1.1 mrg GLIBCXX_ENABLE_DEBUG([no])
176 1.1 mrg GLIBCXX_ENABLE_PARALLEL([yes])
177 1.1 mrg GLIBCXX_ENABLE_CXX_FLAGS
178 1.1 mrg GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING([no])
179 1.3 mrg GLIBCXX_ENABLE_EXTERN_TEMPLATE([yes])
180 1.3 mrg GLIBCXX_ENABLE_PYTHON
181 1.3 mrg GLIBCXX_ENABLE_WERROR([yes])
182 1.5 mrg GLIBCXX_ENABLE_VTABLE_VERIFY([no])
183 1.1 mrg
184 1.1 mrg # Checks for operating systems support that doesn't require linking.
185 1.3 mrg GLIBCXX_CHECK_STDIO_PROTO
186 1.5 mrg GLIBCXX_CHECK_MATH11_PROTO
187 1.1 mrg GLIBCXX_CHECK_SYSTEM_ERROR
188 1.5.4.1 christos GLIBCXX_CHECK_UCHAR_H
189 1.1 mrg
190 1.1 mrg # For the streamoff typedef.
191 1.1 mrg GLIBCXX_CHECK_INT64_T
192 1.1 mrg
193 1.1 mrg # For LFS support.
194 1.1 mrg GLIBCXX_CHECK_LFS
195 1.1 mrg
196 1.1 mrg # For showmanyc_helper().
197 1.1 mrg AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
198 1.1 mrg GLIBCXX_CHECK_POLL
199 1.1 mrg GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
200 1.1 mrg
201 1.1 mrg # For xsputn_2().
202 1.1 mrg AC_CHECK_HEADERS(sys/uio.h)
203 1.1 mrg GLIBCXX_CHECK_WRITEV
204 1.1 mrg
205 1.5 mrg # Check for fenv.h and complex.h before GLIBCXX_CHECK_C99_TR1
206 1.5 mrg # so that the check is done with the C compiler (not C++).
207 1.5 mrg # Checking with C++ can break a canadian cross build if either
208 1.5 mrg # file does not exist in C but does in C++.
209 1.5 mrg AC_CHECK_HEADERS(fenv.h complex.h)
210 1.5 mrg
211 1.1 mrg # For C99 support to TR1.
212 1.1 mrg GLIBCXX_CHECK_C99_TR1
213 1.1 mrg
214 1.3 mrg # For the EOF, SEEK_CUR, and SEEK_END integer constants.
215 1.3 mrg GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS
216 1.1 mrg
217 1.1 mrg # For gettimeofday support.
218 1.1 mrg GLIBCXX_CHECK_GETTIMEOFDAY
219 1.1 mrg
220 1.1 mrg # For clock_gettime, nanosleep and sched_yield support.
221 1.5 mrg GLIBCXX_ENABLE_LIBSTDCXX_TIME
222 1.5 mrg
223 1.5 mrg # Check for tmpnam which is obsolescent in POSIX.1-2008
224 1.5 mrg GLIBCXX_CHECK_TMPNAM
225 1.1 mrg
226 1.3 mrg AC_LC_MESSAGES
227 1.1 mrg
228 1.3 mrg # For hardware_concurrency
229 1.3 mrg AC_CHECK_HEADERS(sys/sysinfo.h)
230 1.3 mrg GLIBCXX_CHECK_GET_NPROCS
231 1.3 mrg AC_CHECK_HEADERS(unistd.h)
232 1.3 mrg GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
233 1.3 mrg GLIBCXX_CHECK_SC_NPROC_ONLN
234 1.3 mrg GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
235 1.3 mrg GLIBCXX_CHECK_SYSCTL_HW_NCPU
236 1.3 mrg GLIBCXX_CHECK_SDT_H
237 1.1 mrg
238 1.1 mrg # Check for available headers.
239 1.1 mrg AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
240 1.1 mrg locale.h machine/endian.h machine/param.h nan.h stdint.h stdlib.h string.h \
241 1.1 mrg strings.h sys/ipc.h sys/isa_defs.h sys/machine.h sys/param.h \
242 1.1 mrg sys/resource.h sys/sem.h sys/stat.h sys/time.h sys/types.h unistd.h \
243 1.1 mrg wchar.h wctype.h])
244 1.1 mrg
245 1.1 mrg # Only do link tests if native. Else, hardcode.
246 1.1 mrg if $GLIBCXX_IS_NATIVE; then
247 1.1 mrg
248 1.1 mrg # We can do more elaborate tests that assume a working linker.
249 1.1 mrg CANADIAN=no
250 1.1 mrg
251 1.1 mrg GLIBCXX_CHECK_LINKER_FEATURES
252 1.1 mrg GLIBCXX_CHECK_MATH_SUPPORT
253 1.1 mrg GLIBCXX_CHECK_STDLIB_SUPPORT
254 1.1 mrg
255 1.1 mrg # For /dev/random and /dev/urandom for TR1.
256 1.1 mrg GLIBCXX_CHECK_RANDOM_TR1
257 1.1 mrg
258 1.1 mrg # For TLS support.
259 1.1 mrg GCC_CHECK_TLS
260 1.1 mrg
261 1.3 mrg AC_CHECK_FUNCS(__cxa_thread_atexit_impl)
262 1.3 mrg
263 1.1 mrg # For iconv support.
264 1.1 mrg AM_ICONV
265 1.1 mrg
266 1.1 mrg else
267 1.1 mrg
268 1.1 mrg # This lets us hard-code the functionality we know we'll have in the cross
269 1.1 mrg # target environment. "Let" is a sugar-coated word placed on an especially
270 1.1 mrg # dull and tedious hack, actually.
271 1.1 mrg #
272 1.1 mrg # Here's why GLIBCXX_CHECK_MATH_SUPPORT, and other autoconf macros
273 1.1 mrg # that involve linking, can't be used:
274 1.1 mrg # "cannot open sim-crt0.o"
275 1.1 mrg # "cannot open crt0.o"
276 1.1 mrg # etc. All this is because there currently exists no unified, consistent
277 1.1 mrg # way for top level CC information to be passed down to target directories:
278 1.1 mrg # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
279 1.1 mrg # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
280 1.1 mrg # crosses can be removed.
281 1.1 mrg
282 1.1 mrg # If Canadian cross, then don't pick up tools from the build directory.
283 1.1 mrg # Used only in GLIBCXX_EXPORT_INCLUDES.
284 1.1 mrg if test -n "$with_cross_host" &&
285 1.1 mrg test x"$build_alias" != x"$with_cross_host" &&
286 1.1 mrg test x"$build" != x"$target";
287 1.1 mrg then
288 1.1 mrg CANADIAN=yes
289 1.1 mrg else
290 1.1 mrg CANADIAN=no
291 1.1 mrg fi
292 1.1 mrg
293 1.1 mrg # Construct crosses by hand, eliminating bits that need ld...
294 1.1 mrg # GLIBCXX_CHECK_MATH_SUPPORT
295 1.1 mrg
296 1.1 mrg # First, test for "known" system libraries. We may be using newlib even
297 1.1 mrg # on a hosted environment.
298 1.1 mrg if test "x${with_newlib}" = "xyes"; then
299 1.1 mrg os_include_dir="os/newlib"
300 1.1 mrg AC_DEFINE(HAVE_HYPOT)
301 1.1 mrg
302 1.1 mrg # GLIBCXX_CHECK_STDLIB_SUPPORT
303 1.3 mrg AC_DEFINE(HAVE_STRTOF)
304 1.1 mrg
305 1.1 mrg AC_DEFINE(HAVE_ACOSF)
306 1.1 mrg AC_DEFINE(HAVE_ASINF)
307 1.1 mrg AC_DEFINE(HAVE_ATAN2F)
308 1.1 mrg AC_DEFINE(HAVE_ATANF)
309 1.1 mrg AC_DEFINE(HAVE_CEILF)
310 1.1 mrg AC_DEFINE(HAVE_COSF)
311 1.1 mrg AC_DEFINE(HAVE_COSHF)
312 1.1 mrg AC_DEFINE(HAVE_EXPF)
313 1.1 mrg AC_DEFINE(HAVE_FABSF)
314 1.1 mrg AC_DEFINE(HAVE_FLOORF)
315 1.1 mrg AC_DEFINE(HAVE_FMODF)
316 1.1 mrg AC_DEFINE(HAVE_FREXPF)
317 1.1 mrg AC_DEFINE(HAVE_LDEXPF)
318 1.1 mrg AC_DEFINE(HAVE_LOG10F)
319 1.1 mrg AC_DEFINE(HAVE_LOGF)
320 1.1 mrg AC_DEFINE(HAVE_MODFF)
321 1.1 mrg AC_DEFINE(HAVE_POWF)
322 1.1 mrg AC_DEFINE(HAVE_SINF)
323 1.1 mrg AC_DEFINE(HAVE_SINHF)
324 1.1 mrg AC_DEFINE(HAVE_SQRTF)
325 1.1 mrg AC_DEFINE(HAVE_TANF)
326 1.1 mrg AC_DEFINE(HAVE_TANHF)
327 1.1 mrg
328 1.1 mrg AC_DEFINE(HAVE_ICONV)
329 1.1 mrg else
330 1.1 mrg GLIBCXX_CROSSCONFIG
331 1.1 mrg fi
332 1.1 mrg
333 1.1 mrg # At some point, we should differentiate between architectures
334 1.1 mrg # like x86, which have long double versions, and alpha/powerpc/etc.,
335 1.1 mrg # which don't. For the time being, punt.
336 1.1 mrg if test x"long_double_math_on_this_cpu" = x"yes"; then
337 1.1 mrg AC_DEFINE(HAVE_ACOSL)
338 1.1 mrg AC_DEFINE(HAVE_ASINL)
339 1.1 mrg AC_DEFINE(HAVE_ATAN2L)
340 1.1 mrg AC_DEFINE(HAVE_ATANL)
341 1.1 mrg AC_DEFINE(HAVE_CEILL)
342 1.1 mrg AC_DEFINE(HAVE_COSL)
343 1.1 mrg AC_DEFINE(HAVE_COSHL)
344 1.1 mrg AC_DEFINE(HAVE_EXPL)
345 1.1 mrg AC_DEFINE(HAVE_FABSL)
346 1.1 mrg AC_DEFINE(HAVE_FLOORL)
347 1.1 mrg AC_DEFINE(HAVE_FMODL)
348 1.1 mrg AC_DEFINE(HAVE_FREXPL)
349 1.1 mrg AC_DEFINE(HAVE_LDEXPL)
350 1.1 mrg AC_DEFINE(HAVE_LOG10L)
351 1.1 mrg AC_DEFINE(HAVE_LOGL)
352 1.1 mrg AC_DEFINE(HAVE_MODFL)
353 1.1 mrg AC_DEFINE(HAVE_POWL)
354 1.1 mrg AC_DEFINE(HAVE_SINCOSL)
355 1.1 mrg AC_DEFINE(HAVE_SINL)
356 1.1 mrg AC_DEFINE(HAVE_SINHL)
357 1.1 mrg AC_DEFINE(HAVE_SQRTL)
358 1.1 mrg AC_DEFINE(HAVE_TANL)
359 1.1 mrg AC_DEFINE(HAVE_TANHL)
360 1.1 mrg fi
361 1.1 mrg fi
362 1.1 mrg
363 1.1 mrg # Check for _Unwind_GetIPInfo.
364 1.1 mrg GCC_CHECK_UNWIND_GETIPINFO
365 1.1 mrg
366 1.1 mrg GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall is available.])])
367 1.1 mrg
368 1.1 mrg GCC_HEADER_STDINT(include/gstdint.h)
369 1.1 mrg
370 1.1 mrg GLIBCXX_ENABLE_SYMVERS([yes])
371 1.3 mrg AC_SUBST(libtool_VERSION)
372 1.3 mrg
373 1.3 mrg GLIBCXX_ENABLE_LIBSTDCXX_VISIBILITY([yes])
374 1.1 mrg
375 1.5 mrg GLIBCXX_ENABLE_LIBSTDCXX_DUAL_ABI([yes])
376 1.5 mrg GLIBCXX_DEFAULT_ABI
377 1.5 mrg
378 1.1 mrg ac_ldbl_compat=no
379 1.1 mrg case "$target" in
380 1.1 mrg powerpc*-*-linux* | \
381 1.1 mrg sparc*-*-linux* | \
382 1.1 mrg s390*-*-linux* | \
383 1.1 mrg alpha*-*-linux*)
384 1.1 mrg AC_TRY_COMPILE(, [
385 1.1 mrg #if !defined __LONG_DOUBLE_128__ || (defined(__sparc__) && defined(__arch64__))
386 1.1 mrg #error no need for long double compatibility
387 1.1 mrg #endif
388 1.1 mrg ], [ac_ldbl_compat=yes], [ac_ldbl_compat=no])
389 1.1 mrg if test "$ac_ldbl_compat" = yes; then
390 1.1 mrg AC_DEFINE([_GLIBCXX_LONG_DOUBLE_COMPAT],1,
391 1.1 mrg [Define if compatibility should be provided for -mlong-double-64.])
392 1.1 mrg port_specific_symbol_files="\$(top_srcdir)/config/os/gnu-linux/ldbl-extra.ver"
393 1.1 mrg fi
394 1.1 mrg esac
395 1.1 mrg GLIBCXX_CONDITIONAL(GLIBCXX_LDBL_COMPAT, test $ac_ldbl_compat = yes)
396 1.1 mrg
397 1.3 mrg # Check if assembler supports disabling hardware capability support.
398 1.3 mrg GLIBCXX_CHECK_ASSEMBLER_HWCAP
399 1.3 mrg
400 1.3 mrg # Check if assembler supports rdrand opcode.
401 1.3 mrg GLIBCXX_CHECK_X86_RDRAND
402 1.3 mrg
403 1.1 mrg # This depends on GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE.
404 1.1 mrg GLIBCXX_CONFIGURE_TESTSUITE
405 1.1 mrg
406 1.3 mrg # For gthread support. Depends on GLIBCXX_ENABLE_SYMVERS.
407 1.3 mrg GLIBCXX_CHECK_GTHREADS
408 1.3 mrg
409 1.5 mrg # For Filesystem TS.
410 1.5 mrg AC_CHECK_HEADERS([fcntl.h dirent.h sys/statvfs.h utime.h])
411 1.5 mrg GLIBCXX_ENABLE_FILESYSTEM_TS
412 1.5 mrg GLIBCXX_CHECK_FILESYSTEM_DEPS
413 1.5 mrg
414 1.5.4.1 christos # For Transactional Memory TS
415 1.5.4.1 christos GLIBCXX_CHECK_SIZE_T_MANGLING
416 1.5.4.1 christos
417 1.3 mrg # Define documentation rules conditionally.
418 1.3 mrg
419 1.3 mrg # See if makeinfo has been installed and is modern enough
420 1.3 mrg # that we can use it.
421 1.3 mrg ACX_CHECK_PROG_VER([MAKEINFO], [makeinfo], [--version],
422 1.3 mrg [GNU texinfo.* \([0-9][0-9.]*\)],
423 1.3 mrg [4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
424 1.3 mrg AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
425 1.3 mrg
426 1.3 mrg # Check for doxygen
427 1.3 mrg AC_CHECK_PROG([DOXYGEN], doxygen, yes, no)
428 1.3 mrg AC_CHECK_PROG([DOT], dot, yes, no)
429 1.3 mrg
430 1.3 mrg # Check for docbook
431 1.3 mrg AC_CHECK_PROG([XSLTPROC], xsltproc, yes, no)
432 1.3 mrg AC_CHECK_PROG([XMLLINT], xmllint, yes, no)
433 1.3 mrg GLIBCXX_CONFIGURE_DOCBOOK
434 1.3 mrg
435 1.3 mrg # Check for xml/html dependencies.
436 1.3 mrg AM_CONDITIONAL(BUILD_XML,
437 1.3 mrg test $ac_cv_prog_DOXYGEN = "yes" &&
438 1.3 mrg test $ac_cv_prog_DOT = "yes" &&
439 1.3 mrg test $ac_cv_prog_XSLTPROC = "yes" &&
440 1.3 mrg test $ac_cv_prog_XMLLINT = "yes" &&
441 1.3 mrg test $glibcxx_stylesheets = "yes")
442 1.3 mrg
443 1.3 mrg AM_CONDITIONAL(BUILD_HTML,
444 1.3 mrg test $ac_cv_prog_DOXYGEN = "yes" &&
445 1.3 mrg test $ac_cv_prog_DOT = "yes" &&
446 1.3 mrg test $ac_cv_prog_XSLTPROC = "yes" &&
447 1.3 mrg test $ac_cv_prog_XMLLINT = "yes" &&
448 1.3 mrg test $glibcxx_stylesheets = "yes")
449 1.3 mrg
450 1.3 mrg # Check for man dependencies.
451 1.3 mrg AM_CONDITIONAL(BUILD_MAN,
452 1.3 mrg test $ac_cv_prog_DOXYGEN = "yes" &&
453 1.3 mrg test $ac_cv_prog_DOT = "yes")
454 1.3 mrg
455 1.3 mrg # Check for pdf dependencies.
456 1.3 mrg AC_CHECK_PROG([DBLATEX], dblatex, yes, no)
457 1.3 mrg AC_CHECK_PROG([PDFLATEX], pdflatex, yes, no)
458 1.3 mrg AM_CONDITIONAL(BUILD_PDF,
459 1.3 mrg test $ac_cv_prog_DBLATEX = "yes" &&
460 1.3 mrg test $ac_cv_prog_PDFLATEX = "yes")
461 1.3 mrg
462 1.5.4.1 christos case "$build" in
463 1.5.4.1 christos *-*-darwin* ) glibcxx_include_dir_notparallel=yes ;;
464 1.5.4.1 christos * ) glibcxx_include_dir_notparallel=no ;;
465 1.5.4.1 christos esac
466 1.5.4.1 christos AM_CONDITIONAL(INCLUDE_DIR_NOTPARALLEL,
467 1.5.4.1 christos test $glibcxx_include_dir_notparallel = "yes")
468 1.3 mrg
469 1.1 mrg # Propagate the target-specific source directories through the build chain.
470 1.1 mrg ATOMICITY_SRCDIR=config/${atomicity_dir}
471 1.1 mrg ATOMIC_WORD_SRCDIR=config/${atomic_word_dir}
472 1.1 mrg ATOMIC_FLAGS=${atomic_flags}
473 1.1 mrg CPU_DEFINES_SRCDIR=config/${cpu_defines_dir}
474 1.1 mrg OS_INC_SRCDIR=config/${os_include_dir}
475 1.1 mrg ERROR_CONSTANTS_SRCDIR=config/${error_constants_dir}
476 1.1 mrg ABI_TWEAKS_SRCDIR=config/${abi_tweaks_dir}
477 1.3 mrg CPU_OPT_EXT_RANDOM=config/${cpu_opt_ext_random}
478 1.3 mrg CPU_OPT_BITS_RANDOM=config/${cpu_opt_bits_random}
479 1.1 mrg AC_SUBST(ATOMICITY_SRCDIR)
480 1.1 mrg AC_SUBST(ATOMIC_WORD_SRCDIR)
481 1.1 mrg AC_SUBST(ATOMIC_FLAGS)
482 1.1 mrg AC_SUBST(CPU_DEFINES_SRCDIR)
483 1.1 mrg AC_SUBST(ABI_TWEAKS_SRCDIR)
484 1.1 mrg AC_SUBST(OS_INC_SRCDIR)
485 1.1 mrg AC_SUBST(ERROR_CONSTANTS_SRCDIR)
486 1.3 mrg AC_SUBST(CPU_OPT_EXT_RANDOM)
487 1.3 mrg AC_SUBST(CPU_OPT_BITS_RANDOM)
488 1.1 mrg
489 1.1 mrg
490 1.1 mrg # Determine cross-compile flags and AM_CONDITIONALs.
491 1.1 mrg #AC_SUBST(GLIBCXX_IS_NATIVE)
492 1.1 mrg #AM_CONDITIONAL(CANADIAN, test $CANADIAN = yes)
493 1.1 mrg GLIBCXX_EVALUATE_CONDITIONALS
494 1.3 mrg
495 1.1 mrg AC_CACHE_SAVE
496 1.1 mrg
497 1.1 mrg if test ${multilib} = yes; then
498 1.1 mrg multilib_arg="--enable-multilib"
499 1.1 mrg else
500 1.1 mrg multilib_arg=
501 1.1 mrg fi
502 1.1 mrg
503 1.1 mrg # Export all the install information.
504 1.1 mrg GLIBCXX_EXPORT_INSTALL_INFO
505 1.1 mrg
506 1.1 mrg # Export all the include and flag information to Makefiles.
507 1.1 mrg GLIBCXX_EXPORT_INCLUDES
508 1.1 mrg GLIBCXX_EXPORT_FLAGS
509 1.1 mrg
510 1.1 mrg dnl In autoconf 2.5x, AC_OUTPUT is replaced by four AC_CONFIG_* macros,
511 1.1 mrg dnl which can all be called multiple times as needed, plus one (different)
512 1.1 mrg dnl AC_OUTPUT macro. This one lists the files to be created:
513 1.1 mrg AC_CONFIG_FILES(Makefile)
514 1.1 mrg AC_CONFIG_FILES([scripts/testsuite_flags],[chmod +x scripts/testsuite_flags])
515 1.3 mrg AC_CONFIG_FILES([scripts/extract_symvers],[chmod +x scripts/extract_symvers])
516 1.3 mrg AC_CONFIG_FILES([doc/xsl/customization.xsl])
517 1.1 mrg
518 1.1 mrg # Multilibs need MULTISUBDIR defined correctly in certain makefiles so
519 1.1 mrg # that multilib installs will end up installed in the correct place.
520 1.1 mrg # The testsuite needs it for multilib-aware ABI baseline files.
521 1.1 mrg # To work around this not being passed down from config-ml.in ->
522 1.1 mrg # srcdir/Makefile.am -> srcdir/{src,libsupc++,...}/Makefile.am, manually
523 1.1 mrg # append it here. Only modify Makefiles that have just been created.
524 1.1 mrg #
525 1.1 mrg # Also, get rid of this simulated-VPATH thing that automake does.
526 1.1 mrg AC_CONFIG_FILES(AC_FOREACH([DIR], glibcxx_SUBDIRS, [DIR/Makefile ]),
527 1.1 mrg [cat > vpsed$$ << \_EOF
528 1.1 mrg s!`test -f '$<' || echo '$(srcdir)/'`!!
529 1.1 mrg _EOF
530 1.1 mrg sed -f vpsed$$ $ac_file > tmp$$
531 1.1 mrg mv tmp$$ $ac_file
532 1.1 mrg rm vpsed$$
533 1.1 mrg echo 'MULTISUBDIR =' >> $ac_file
534 1.1 mrg ml_norecursion=yes
535 1.1 mrg . ${multi_basedir}/config-ml.in
536 1.1 mrg AS_UNSET([ml_norecursion])
537 1.1 mrg ])
538 1.1 mrg
539 1.1 mrg AC_CONFIG_COMMANDS([generate-headers],
540 1.1 mrg [(cd include && ${MAKE-make} pch_build= )])
541 1.1 mrg
542 1.1 mrg dnl And this actually makes things happen:
543 1.1 mrg AC_OUTPUT
544