]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/configure.in
Daily bump.
[gcc.git] / libstdc++-v3 / configure.in
CommitLineData
b2dad0e3 1# Process this file with autoconf to produce a configure script, like so:
d2caef2e 2# aclocal && autoconf && autoheader && automake
b2dad0e3
BK
3
4AC_PREREQ(2.13)
1228c7b6 5AC_INIT(src/ios.cc)
e2c20fae 6
6706f116
AO
7# This works around the fact that libtool configuration may change LD
8# for this particular configuration, but some shells, instead of
9# keeping the changes in LD private, export them just because LD is
2c839a4e 10# exported. Only used at the end of this file.
6706f116
AO
11ORIGINAL_LD_FOR_MULTILIBS=$LD
12
33590f13 13PACKAGE=libstdc++
33590f13 14AC_SUBST(PACKAGE)
4e10943d 15# For libtool versioning info, format is CURRENT:REVISION:AGE
8d9872d2 16libtool_VERSION=5:2:0
4e10943d 17AC_SUBST(libtool_VERSION)
b2dad0e3 18
aebb8c22
DD
19GLIBCPP_TOPREL_CONFIGURE
20
58b08ac3 21# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
2c839a4e
PE
22#
23# You will slowly go insane if you do not grok the following fact: when
24# building v3 as part of the compiler, the top-level /target/ becomes the
25# library's /host/. `configure' then causes --target to default to --host,
26# exactly like any other package using autoconf. Therefore, 'target' and
27# 'host' will always be the same. This makes sense both for native and
28# cross compilers, just think about it for a little while. :-)
29#
30# Also, if v3 is being configured as part of a cross compiler, the top-level
31# configure script will pass the "real" host as $with_cross_host.
32#
d2caef2e
PE
33# AC 2.5x sets target_alias iff the user specified --target, but we use it
34# everywhere, so we set it here just to be sure. In AC 2.13
35# AC_CANONICAL_TARGET was known as AC_CANONICAL_SYSTEM.
b2dad0e3 36AC_CANONICAL_SYSTEM
52b55e7d
PE
37target_alias=${target_alias-$target}
38AC_SUBST(target_alias)
b2dad0e3 39
2c839a4e
PE
40# Runs configure.target, finds CC, CXX and assorted other critical bits.
41# Must run this before the GLIBCPP_ENABLE_* macros below.
b2dad0e3 42GLIBCPP_CONFIGURE(.)
f4c79fef 43
2f235b6d
PE
44AM_INIT_AUTOMAKE($PACKAGE, $gcc_version)
45AM_CONFIG_HEADER(config.h)
46
b2dad0e3 47AC_LIBTOOL_DLOPEN
5780a46b 48AM_PROG_LIBTOOL
34791641
PE
49AC_SUBST(enable_shared)
50AC_SUBST(enable_static)
04e78786 51
b2dad0e3 52# Check for c++ or library specific bits that don't require linking.
33590f13
BK
53#GLIBCPP_CHECK_COMPILER_VERSION
54GLIBCPP_CHECK_GNU_MAKE
b2dad0e3 55
33590f13 56# Enable all the variable C++ stuff. C_MBCHAR must come early.
7f586614 57GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
b2dad0e3 58GLIBCPP_ENABLE_CSTDIO
0214010c 59GLIBCPP_ENABLE_CLOCALE
e26cb7ab 60GLIBCPP_ENABLE_C_MBCHAR([yes])
7cda84dc
BK
61GLIBCPP_ENABLE_C99([yes])
62GLIBCPP_ENABLE_LONG_LONG([yes])
e01c9849 63GLIBCPP_ENABLE_CHEADERS([$c_model])
b2dad0e3 64GLIBCPP_ENABLE_THREADS
32a4595e 65GLIBCPP_ENABLE_CXX_FLAGS([none])
52a11cbf 66GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
263c6fa8 67GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
4d16bdbb 68GLIBCPP_ENABLE_CONCEPT_CHECKS
b2dad0e3 69
7e90efc4
KG
70# Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
71AC_CHECK_HEADERS(string.h stdlib.h)
33590f13 72
974e336b
PE
73# No surprises, no surprises...
74if test $ATOMICITYH = cpu/generic ; then
75 AC_MSG_WARN([No native atomic operations are provided yet for this platform.])
76 if test $target_thread_file = single; then
77 AC_MSG_WARN([They cannot be faked when thread support is disabled.])
78 AC_MSG_WARN([Thread-safety of certain classes is not guaranteed.])
79 else
80 AC_MSG_WARN([They will be faked using a mutex.])
81 AC_MSG_WARN([Performance of certain classes will degrade as a result.])
82 fi
83fi
84
85
39f5fa33 86if test -n "$with_cross_host" || test x"$build" != x"$host"; then
b2dad0e3 87
39f5fa33 88 # We are being configured with some form of cross compiler.
4a9d5109 89 GLIBCPP_IS_CROSS_COMPILING=1
eebc608e 90
2c839a4e
PE
91 # This lets us hard-code the functionality we know we'll have in the cross
92 # target environment. "Let" is a sugar-coated word placed on an especially
93 # dull and tedious hack, actually.
94 #
95 # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
96 # that involve linking, can't be used:
97 # "cannot open sim-crt0.o"
98 # "cannot open crt0.o"
99 # etc. All this is because there currently exists no unified, consistent
100 # way for top level CC information to be passed down to target directories:
101 # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
102 # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
103 # crosses can be removed.
104
105 # If Canadian cross, then don't pick up tools from the build directory.
106 # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
39f5fa33 107 if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
b2dad0e3 108 CANADIAN=yes
b2dad0e3
BK
109 else
110 CANADIAN=no
b2dad0e3
BK
111 fi
112
75940b88
SE
113 # Construct crosses by hand, eliminating bits that need ld...
114 # GLIBCPP_CHECK_COMPILER_FEATURES
115 # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
116 # GLIBCPP_CHECK_MATH_SUPPORT
117
a0f27776 118 case "$target" in
1d8939ef 119 *-linux*)
2c839a4e 120 os_include_dir="os/gnu-linux"
75940b88 121 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
2c839a4e
PE
122 machine/endian.h machine/param.h sys/machine.h sys/types.h \
123 fp.h locale.h float.h inttypes.h])
75940b88
SE
124 SECTION_FLAGS='-ffunction-sections -fdata-sections'
125 AC_SUBST(SECTION_FLAGS)
126 GLIBCPP_CHECK_LINKER_FEATURES
127 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
128 GLIBCPP_CHECK_WCHAR_T_SUPPORT
75940b88
SE
129 AC_DEFINE(HAVE_COPYSIGN)
130 AC_DEFINE(HAVE_COPYSIGNF)
a616effa 131 AC_DEFINE(HAVE_FINITE)
75940b88
SE
132 AC_DEFINE(HAVE_FINITEF)
133 AC_DEFINE(HAVE_FREXPF)
134 AC_DEFINE(HAVE_HYPOTF)
a616effa
SE
135 AC_DEFINE(HAVE_ISINF)
136 AC_DEFINE(HAVE_ISINFF)
137 AC_DEFINE(HAVE_ISNAN)
138 AC_DEFINE(HAVE_ISNANF)
75940b88
SE
139 AC_DEFINE(HAVE_SINCOS)
140 AC_DEFINE(HAVE_SINCOSF)
141 if test x"long_double_math_on_this_cpu" = x"yes"; then
a616effa 142 AC_DEFINE(HAVE_FINITEL)
2c839a4e 143 AC_DEFINE(HAVE_HYPOTL)
a616effa
SE
144 AC_DEFINE(HAVE_ISINFL)
145 AC_DEFINE(HAVE_ISNANL)
75940b88
SE
146 fi
147 ;;
148 *-hpux*)
149 # Check for available headers.
150 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
2c839a4e
PE
151 machine/endian.h machine/param.h sys/machine.h sys/types.h \
152 fp.h locale.h float.h inttypes.h])
75940b88
SE
153 SECTION_FLAGS='-ffunction-sections -fdata-sections'
154 AC_SUBST(SECTION_FLAGS)
155 GLIBCPP_CHECK_LINKER_FEATURES
156 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
157 GLIBCPP_CHECK_WCHAR_T_SUPPORT
2c839a4e 158 os_include_dir="os/hpux"
75940b88
SE
159 AC_DEFINE(HAVE_COPYSIGN)
160 AC_DEFINE(HAVE_COPYSIGNF)
75940b88
SE
161 AC_DEFINE(HAVE_FREXPF)
162 AC_DEFINE(HAVE_HYPOT)
a0f27776 163 case "$target" in
a616effa
SE
164 *-hpux10*)
165 AC_DEFINE(HAVE_FINITE)
166 AC_DEFINE(HAVE_FINITEF)
167 AC_DEFINE(HAVE_ISINF)
168 AC_DEFINE(HAVE_ISINFF)
169 AC_DEFINE(HAVE_ISNAN)
170 AC_DEFINE(HAVE_ISNANF)
171 ;;
172 esac
173
75940b88 174 ;;
40ded872
JT
175 *-netbsd*)
176 # Check for available headers.
177 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
2c839a4e
PE
178 machine/endian.h machine/param.h sys/machine.h sys/types.h \
179 fp.h locale.h float.h inttypes.h])
40ded872
JT
180 SECTION_FLAGS='-ffunction-sections -fdata-sections'
181 AC_SUBST(SECTION_FLAGS)
182 GLIBCPP_CHECK_LINKER_FEATURES
183 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
184 GLIBCPP_CHECK_WCHAR_T_SUPPORT
2c839a4e 185 os_include_dir="os/bsd/netbsd"
40ded872
JT
186 AC_DEFINE(HAVE_COPYSIGN)
187 AC_DEFINE(HAVE_COPYSIGNF)
188 AC_DEFINE(HAVE_FINITEF)
a616effa 189 AC_DEFINE(HAVE_FINITE)
40ded872
JT
190 AC_DEFINE(HAVE_FREXPF)
191 AC_DEFINE(HAVE_HYPOTF)
a616effa
SE
192 AC_DEFINE(HAVE_ISINF)
193 AC_DEFINE(HAVE_ISINFF)
194 AC_DEFINE(HAVE_ISNAN)
195 AC_DEFINE(HAVE_ISNANF)
196 if test x"long_double_math_on_this_cpu" = x"yes"; then
197 AC_DEFINE(HAVE_FINITEL)
198 AC_DEFINE(HAVE_ISINFL)
199 AC_DEFINE(HAVE_ISNANL)
200 fi
40ded872 201 ;;
58be1883
MV
202 *-freebsd*)
203 # Check for available headers.
204 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
205 machine/endian.h machine/param.h sys/machine.h sys/types.h \
206 fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
207 sys/time.h unistd.h])
208 SECTION_FLAGS='-ffunction-sections -fdata-sections'
209 AC_SUBST(SECTION_FLAGS)
210 GLIBCPP_CHECK_LINKER_FEATURES
211 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
212 GLIBCPP_CHECK_WCHAR_T_SUPPORT
213 os_include_dir="os/bsd/freebsd"
214 AC_DEFINE(HAVE_LC_MESSAGES)
215 AC_DEFINE(HAVE_DRAND48)
216 AC_DEFINE(HAVE_GETPAGESIZE)
217 AC_DEFINE(HAVE_SETENV)
218 AC_DEFINE(HAVE_SIGSETJMP)
219 AC_DEFINE(HAVE_COPYSIGN)
220 AC_DEFINE(HAVE_COPYSIGNF)
221 AC_DEFINE(HAVE_FINITEF)
222 AC_DEFINE(HAVE_FINITE)
223 AC_DEFINE(HAVE_FREXPF)
224 AC_DEFINE(HAVE_HYPOT)
225 AC_DEFINE(HAVE_HYPOTF)
226 AC_DEFINE(HAVE_ISINF)
227 AC_DEFINE(HAVE_ISNAN)
228 AC_DEFINE(HAVE_ISNANF)
229 if test x"long_double_math_on_this_cpu" = x"yes"; then
230 AC_DEFINE(HAVE_FINITEL)
231 AC_DEFINE(HAVE_ISINFL)
232 AC_DEFINE(HAVE_ISNANL)
233 fi
234 ;;
660bdf36
AG
235 *-mingw32*)
236 AC_CHECK_HEADERS([sys/types.h locale.h float.h])
237 GLIBCPP_CHECK_LINKER_FEATURES
238 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
239 GLIBCPP_CHECK_WCHAR_T_SUPPORT
2c839a4e 240 os_include_dir="os/mingw32"
660bdf36 241 ;;
522e3d22 242 *-windiss*)
2c839a4e 243 os_include_dir="os/windiss"
522e3d22 244 ;;
6203ef88 245changequote(,)dnl
f62bef48 246 *-qnx6.[12]*)
6203ef88 247changequote([,])dnl
f62bef48
C
248 SECTION_FLAGS='-ffunction-sections -fdata-sections'
249 AC_SUBST(SECTION_FLAGS)
250 GLIBCPP_CHECK_LINKER_FEATURES
251 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
252 GLIBCPP_CHECK_WCHAR_T_SUPPORT
2c839a4e 253 os_include_dir="os/qnx/qnx6.1"
f62bef48
C
254 AC_DEFINE(HAVE_COSF)
255 AC_DEFINE(HAVE_COSL)
256 AC_DEFINE(HAVE_COSHF)
257 AC_DEFINE(HAVE_COSHL)
258 AC_DEFINE(HAVE_LOGF)
259 AC_DEFINE(HAVE_LOGL)
260 AC_DEFINE(HAVE_LOG10F)
261 AC_DEFINE(HAVE_LOG10L)
262 AC_DEFINE(HAVE_SINF)
263 AC_DEFINE(HAVE_SINL)
264 AC_DEFINE(HAVE_SINHF)
265 AC_DEFINE(HAVE_SINHL)
266 ;;
b2dad0e3 267 *)
2c839a4e 268 os_include_dir="os/newlib"
75940b88
SE
269 AC_DEFINE(HAVE_HYPOT)
270 ;;
b2dad0e3 271 esac
75940b88 272
a0f27776 273 case "$target" in
660bdf36
AG
274 *-mingw32*)
275 ;;
522e3d22
MM
276 *-windiss*)
277 AC_DEFINE(HAVE_ACOSF)
278 AC_DEFINE(HAVE_ASINF)
279 AC_DEFINE(HAVE_ATAN2F)
280 AC_DEFINE(HAVE_ATANF)
58be1883
MV
281 AC_DEFINE(HAVE_CEILF)
282 AC_DEFINE(HAVE_COPYSIGN)
283 AC_DEFINE(HAVE_COPYSIGNF)
284 AC_DEFINE(HAVE_COSF)
285 AC_DEFINE(HAVE_COSHF)
286 AC_DEFINE(HAVE_EXPF)
287 AC_DEFINE(HAVE_FABSF)
288 AC_DEFINE(HAVE_FLOORF)
289 AC_DEFINE(HAVE_FMODF)
290 AC_DEFINE(HAVE_FREXPF)
291 AC_DEFINE(HAVE_LDEXPF)
292 AC_DEFINE(HAVE_LOG10F)
293 AC_DEFINE(HAVE_LOGF)
294 AC_DEFINE(HAVE_MODFF)
295 AC_DEFINE(HAVE_POWF)
296 AC_DEFINE(HAVE_SINF)
297 AC_DEFINE(HAVE_SINHF)
298 AC_DEFINE(HAVE_SQRTF)
299 AC_DEFINE(HAVE_TANF)
300 AC_DEFINE(HAVE_TANHF)
301 ;;
302 *-freebsd*)
303 # Must replicate generic section since we don't have strtof or strtold.
304 AC_DEFINE(HAVE_MMAP)
305 AC_DEFINE(HAVE_ACOSF)
306 AC_DEFINE(HAVE_ASINF)
307 AC_DEFINE(HAVE_ATAN2F)
308 AC_DEFINE(HAVE_ATANF)
522e3d22
MM
309 AC_DEFINE(HAVE_CEILF)
310 AC_DEFINE(HAVE_COPYSIGN)
311 AC_DEFINE(HAVE_COPYSIGNF)
312 AC_DEFINE(HAVE_COSF)
313 AC_DEFINE(HAVE_COSHF)
314 AC_DEFINE(HAVE_EXPF)
315 AC_DEFINE(HAVE_FABSF)
316 AC_DEFINE(HAVE_FLOORF)
317 AC_DEFINE(HAVE_FMODF)
318 AC_DEFINE(HAVE_FREXPF)
319 AC_DEFINE(HAVE_LDEXPF)
320 AC_DEFINE(HAVE_LOG10F)
321 AC_DEFINE(HAVE_LOGF)
322 AC_DEFINE(HAVE_MODFF)
323 AC_DEFINE(HAVE_POWF)
324 AC_DEFINE(HAVE_SINF)
325 AC_DEFINE(HAVE_SINHF)
326 AC_DEFINE(HAVE_SQRTF)
327 AC_DEFINE(HAVE_TANF)
328 AC_DEFINE(HAVE_TANHF)
329 ;;
660bdf36
AG
330 *)
331 # GLIBCPP_CHECK_STDLIB_SUPPORT
332 AC_DEFINE(HAVE_STRTOF)
333 AC_DEFINE(HAVE_STRTOLD)
334 # AC_FUNC_MMAP
335 AC_DEFINE(HAVE_MMAP)
336
337 AC_DEFINE(HAVE_ACOSF)
338 AC_DEFINE(HAVE_ASINF)
339 AC_DEFINE(HAVE_ATAN2F)
340 AC_DEFINE(HAVE_ATANF)
341 AC_DEFINE(HAVE_CEILF)
342 AC_DEFINE(HAVE_COPYSIGN)
343 AC_DEFINE(HAVE_COPYSIGNF)
344 AC_DEFINE(HAVE_COSF)
345 AC_DEFINE(HAVE_COSHF)
346 AC_DEFINE(HAVE_EXPF)
347 AC_DEFINE(HAVE_FABSF)
660bdf36
AG
348 AC_DEFINE(HAVE_FLOORF)
349 AC_DEFINE(HAVE_FMODF)
350 AC_DEFINE(HAVE_FREXPF)
660bdf36
AG
351 AC_DEFINE(HAVE_LDEXPF)
352 AC_DEFINE(HAVE_LOG10F)
353 AC_DEFINE(HAVE_LOGF)
354 AC_DEFINE(HAVE_MODFF)
355 AC_DEFINE(HAVE_POWF)
356 AC_DEFINE(HAVE_SINF)
357 AC_DEFINE(HAVE_SINHF)
358 AC_DEFINE(HAVE_SQRTF)
359 AC_DEFINE(HAVE_TANF)
360 AC_DEFINE(HAVE_TANHF)
361 ;;
362 esac
75940b88
SE
363
364 # At some point, we should differentiate between architectures
365 # like x86, which have long double versions, and alpha/powerpc/etc.,
366 # which don't. For the time being, punt.
367 if test x"long_double_math_on_this_cpu" = x"yes"; then
368 AC_DEFINE(HAVE_ACOSL)
369 AC_DEFINE(HAVE_ASINL)
370 AC_DEFINE(HAVE_ATAN2L)
371 AC_DEFINE(HAVE_ATANL)
372 AC_DEFINE(HAVE_CEILL)
373 AC_DEFINE(HAVE_COPYSIGNL)
374 AC_DEFINE(HAVE_COSL)
375 AC_DEFINE(HAVE_COSHL)
376 AC_DEFINE(HAVE_EXPL)
377 AC_DEFINE(HAVE_FABSL)
75940b88
SE
378 AC_DEFINE(HAVE_FLOORL)
379 AC_DEFINE(HAVE_FMODL)
380 AC_DEFINE(HAVE_FREXPL)
75940b88
SE
381 AC_DEFINE(HAVE_LDEXPL)
382 AC_DEFINE(HAVE_LOG10L)
383 AC_DEFINE(HAVE_LOGL)
384 AC_DEFINE(HAVE_MODFL)
385 AC_DEFINE(HAVE_POWL)
386 AC_DEFINE(HAVE_SINCOSL)
387 AC_DEFINE(HAVE_SINL)
388 AC_DEFINE(HAVE_SINHL)
389 AC_DEFINE(HAVE_SQRTL)
390 AC_DEFINE(HAVE_TANL)
391 AC_DEFINE(HAVE_TANHL)
392 fi
2c839a4e 393
b2dad0e3
BK
394else
395
396 # We are being configured natively. We can do more elaborate tests
397 # that include AC_TRY_COMPILE now, as the linker is assumed to be
398 # working.
4a9d5109 399 GLIBCPP_IS_CROSS_COMPILING=0
b2dad0e3 400 CANADIAN=no
b2dad0e3
BK
401
402 # Check for available headers.
403 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
de215bc6 404 machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h sys/types.h])
b2dad0e3 405
c470c17d
BK
406 GLIBCPP_CHECK_COMPILER_FEATURES
407 GLIBCPP_CHECK_LINKER_FEATURES
b2dad0e3
BK
408 GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
409 GLIBCPP_CHECK_MATH_SUPPORT
2f103494 410 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
b2dad0e3 411 GLIBCPP_CHECK_WCHAR_T_SUPPORT
e7140677 412 GLIBCPP_CHECK_STDLIB_SUPPORT
74af99e5 413 GLIBCPP_CHECK_UNISTD_SUPPORT
58b08ac3 414 AC_LC_MESSAGES
b2dad0e3 415
48dbafe4 416 AC_TRY_COMPILE([
f295ecef
BK
417 #include <setjmp.h>
418 ], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
419 [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
420 ])
48dbafe4 421
b2dad0e3 422 AC_FUNC_MMAP
33590f13 423
58b08ac3
BK
424 # Establish limits on memory usage during 'make check'
425 GLIBCPP_CONFIGURE_TESTSUITE
b2dad0e3
BK
426fi
427
c98b201b 428# This depends on the possibly-skipped linker test above.
ab3bc736 429GLIBCPP_ENABLE_SYMVERS([yes])
fe413112 430
4a9d5109 431# Propagate the target-specific source directories through the build chain.
ca017eef 432# (Nothing currently uses cpu_include_dir directly; only ATOMICITYH
974e336b 433# uses it, and it only gets used in this file.)
d32e25df
PE
434OS_INC_SRCDIR=config/${os_include_dir}
435ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
4a9d5109
SW
436AC_SUBST(OS_INC_SRCDIR)
437AC_SUBST(ATOMICITY_INC_SRCDIR)
eebc608e 438
4a9d5109 439# Set up cross-compile flags
2c839a4e 440AC_SUBST(GLIBCPP_IS_CROSS_COMPILING) dnl Unused so far.
6e138b89 441AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
c4d3f801 442
5e53dba6 443AC_CACHE_SAVE
b2dad0e3 444
b2dad0e3
BK
445if test "${multilib}" = "yes"; then
446 multilib_arg="--enable-multilib"
447else
448 multilib_arg=
449fi
450
43ba4a58
BK
451# Export all the install information
452GLIBCPP_EXPORT_INSTALL_INFO
1fd2f510 453
e466dc8a
BK
454# Export all the include and flag information to makefiles.
455GLIBCPP_EXPORT_INCLUDES
456GLIBCPP_EXPORT_FLAGS
457
f8e4b51d
AO
458if ${CONFIG_SHELL-/bin/sh} ./libtool --tag CXX --features |
459 grep "enable shared" > /dev/null; then
460 LIBSUPCXX_PICFLAGS=-prefer-pic
461else
462 LIBSUPCXX_PICFLAGS=
463fi
464AC_SUBST(LIBSUPCXX_PICFLAGS)
465
4a9d5109 466# Generate the various Makefiles, include files, and scripts.
b2dad0e3 467# NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
c8f33f22
CD
468# and libsupc++/Makefile.am so that multilib installs will end up
469# installed in the correct place. To work around this not being passed
470# down from config-ml.in -> top_srcdir/Makefile.am ->
471# top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
4a9d5109
SW
472AC_OUTPUT(Makefile \
473 include/Makefile src/Makefile \
474 libmath/Makefile libio/Makefile libsupc++/Makefile \
4e10943d 475 po/Makefile testsuite/Makefile mkcheck testsuite_flags,
b2dad0e3 476[if test -n "$CONFIG_FILES"; then
6706f116 477 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
b2dad0e3
BK
478 ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
479 grep '^MULTISUBDIR =' Makefile >> src/Makefile
c8f33f22 480 grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
be5aeb60
MM
481fi
482chmod +x mkcheck
c6192d88 483chmod +x testsuite_flags
be5aeb60 484],
b2dad0e3
BK
485srcdir=${srcdir}
486host=${host}
487target=${target}
488with_multisubdir=${with_multisubdir}
489ac_configure_args="${multilib_arg} ${ac_configure_args}"
490CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
491glibcpp_basedir=${glibcpp_basedir}
492CC="${CC}"
493CXX="${CXX}"
494)
d2caef2e
PE
495dnl In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros:
496dnl AC_CONFIG_FILES(Makefile \
497dnl include/Makefile src/Makefile \
498dnl libmath/Makefile libio/Makefile libsupc++/Makefile \
499dnl po/Makefile testsuite/Makefile mkcheck testsuite_flags)
500dnl AC_CONFIG_COMMANDS([default],
501dnl [if test -n "$CONFIG_FILES"; then
502dnl ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
503dnl grep '^MULTISUBDIR =' Makefile >> src/Makefile
504dnl grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
505dnl fi
506dnl chmod +x mkcheck
507dnl chmod +x testsuite_flags
508dnl ],
509dnl srcdir=${srcdir}
510dnl host=${host}
511dnl target=${target}
512dnl with_multisubdir=${with_multisubdir}
513dnl ac_configure_args="${multilib_arg} ${ac_configure_args}"
514dnl CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
515dnl glibcpp_basedir=${glibcpp_basedir}
516dnl CC="${CC}"
517dnl CXX="${CXX}"
518dnl )
519dnl AC_OUTPUT
b2dad0e3
BK
520
521
29bd52c8
PE
522# Sanity checking & User-visible messages.
523# Checks down here, otherwise they get scrolled off before
524# the user will notice.
29bd52c8 525
5780a46b
BK
526# Trying to get more people to read documentation. Possibly remove
527# check and warn all the time. There is no "informational" AC_MSG_
528# macro, so these are going to be printed even when --quiet/--silent
529# is given.
99b51359
BK
530if test ! -f stamp-sanity-warned; then
531 touch stamp-sanity-warned
5780a46b
BK
532 echo ""
533 echo "Please make certain that you read the installation information here:"
d6ab05a0 534 echo " faster => ${srcdir}/docs/html/install.html"
a9ab8db1 535 echo " slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/install.html>"
5780a46b
BK
536 echo ""
537 echo "and the configuration information here:"
d6ab05a0 538 echo " faster => ${srcdir}/docs/html/configopts.html"
a9ab8db1 539 echo " slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html>"
5780a46b 540 echo ""
421173e6 541 echo "before proceeding with ${_cv_gnu_make_command}."
5780a46b 542 echo ""
29bd52c8 543fi
This page took 0.271748 seconds and 5 git commands to generate.