]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/configure.in
streambuf.tcc (basic_streambuf::sputbackc): Prefix "this->" to call to pbackfail.
[thirdparty/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
81eec873 16libtool_VERSION=5:1: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
39f5fa33 73if test -n "$with_cross_host" || test x"$build" != x"$host"; then
b2dad0e3 74
39f5fa33 75 # We are being configured with some form of cross compiler.
4a9d5109 76 GLIBCPP_IS_CROSS_COMPILING=1
eebc608e 77
2c839a4e
PE
78 # This lets us hard-code the functionality we know we'll have in the cross
79 # target environment. "Let" is a sugar-coated word placed on an especially
80 # dull and tedious hack, actually.
81 #
82 # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
83 # that involve linking, can't be used:
84 # "cannot open sim-crt0.o"
85 # "cannot open crt0.o"
86 # etc. All this is because there currently exists no unified, consistent
87 # way for top level CC information to be passed down to target directories:
88 # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
89 # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
90 # crosses can be removed.
91
92 # If Canadian cross, then don't pick up tools from the build directory.
93 # Used in GLIBCPP_EXPORT_INCLUDES (and nowhere else?).
39f5fa33 94 if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
b2dad0e3 95 CANADIAN=yes
b2dad0e3
BK
96 else
97 CANADIAN=no
b2dad0e3
BK
98 fi
99
75940b88
SE
100 # Construct crosses by hand, eliminating bits that need ld...
101 # GLIBCPP_CHECK_COMPILER_FEATURES
102 # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
103 # GLIBCPP_CHECK_MATH_SUPPORT
104
a0f27776 105 case "$target" in
1d8939ef 106 *-linux*)
2c839a4e 107 os_include_dir="os/gnu-linux"
75940b88 108 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
2c839a4e
PE
109 machine/endian.h machine/param.h sys/machine.h sys/types.h \
110 fp.h locale.h float.h inttypes.h])
75940b88
SE
111 SECTION_FLAGS='-ffunction-sections -fdata-sections'
112 AC_SUBST(SECTION_FLAGS)
113 GLIBCPP_CHECK_LINKER_FEATURES
114 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
115 GLIBCPP_CHECK_WCHAR_T_SUPPORT
75940b88
SE
116 AC_DEFINE(HAVE_COPYSIGN)
117 AC_DEFINE(HAVE_COPYSIGNF)
a616effa 118 AC_DEFINE(HAVE_FINITE)
75940b88
SE
119 AC_DEFINE(HAVE_FINITEF)
120 AC_DEFINE(HAVE_FREXPF)
121 AC_DEFINE(HAVE_HYPOTF)
a616effa
SE
122 AC_DEFINE(HAVE_ISINF)
123 AC_DEFINE(HAVE_ISINFF)
124 AC_DEFINE(HAVE_ISNAN)
125 AC_DEFINE(HAVE_ISNANF)
75940b88
SE
126 AC_DEFINE(HAVE_SINCOS)
127 AC_DEFINE(HAVE_SINCOSF)
128 if test x"long_double_math_on_this_cpu" = x"yes"; then
a616effa 129 AC_DEFINE(HAVE_FINITEL)
2c839a4e 130 AC_DEFINE(HAVE_HYPOTL)
a616effa
SE
131 AC_DEFINE(HAVE_ISINFL)
132 AC_DEFINE(HAVE_ISNANL)
75940b88
SE
133 fi
134 ;;
135 *-hpux*)
136 # Check for available headers.
137 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
2c839a4e
PE
138 machine/endian.h machine/param.h sys/machine.h sys/types.h \
139 fp.h locale.h float.h inttypes.h])
75940b88
SE
140 SECTION_FLAGS='-ffunction-sections -fdata-sections'
141 AC_SUBST(SECTION_FLAGS)
142 GLIBCPP_CHECK_LINKER_FEATURES
143 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
144 GLIBCPP_CHECK_WCHAR_T_SUPPORT
2c839a4e 145 os_include_dir="os/hpux"
75940b88
SE
146 AC_DEFINE(HAVE_COPYSIGN)
147 AC_DEFINE(HAVE_COPYSIGNF)
75940b88
SE
148 AC_DEFINE(HAVE_FREXPF)
149 AC_DEFINE(HAVE_HYPOT)
a0f27776 150 case "$target" in
a616effa
SE
151 *-hpux10*)
152 AC_DEFINE(HAVE_FINITE)
153 AC_DEFINE(HAVE_FINITEF)
154 AC_DEFINE(HAVE_ISINF)
155 AC_DEFINE(HAVE_ISINFF)
156 AC_DEFINE(HAVE_ISNAN)
157 AC_DEFINE(HAVE_ISNANF)
158 ;;
159 esac
160
75940b88 161 ;;
40ded872
JT
162 *-netbsd*)
163 # Check for available headers.
164 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
2c839a4e
PE
165 machine/endian.h machine/param.h sys/machine.h sys/types.h \
166 fp.h locale.h float.h inttypes.h])
40ded872
JT
167 SECTION_FLAGS='-ffunction-sections -fdata-sections'
168 AC_SUBST(SECTION_FLAGS)
169 GLIBCPP_CHECK_LINKER_FEATURES
170 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
171 GLIBCPP_CHECK_WCHAR_T_SUPPORT
2c839a4e 172 os_include_dir="os/bsd/netbsd"
40ded872
JT
173 AC_DEFINE(HAVE_COPYSIGN)
174 AC_DEFINE(HAVE_COPYSIGNF)
175 AC_DEFINE(HAVE_FINITEF)
a616effa 176 AC_DEFINE(HAVE_FINITE)
40ded872
JT
177 AC_DEFINE(HAVE_FREXPF)
178 AC_DEFINE(HAVE_HYPOTF)
a616effa
SE
179 AC_DEFINE(HAVE_ISINF)
180 AC_DEFINE(HAVE_ISINFF)
181 AC_DEFINE(HAVE_ISNAN)
182 AC_DEFINE(HAVE_ISNANF)
183 if test x"long_double_math_on_this_cpu" = x"yes"; then
184 AC_DEFINE(HAVE_FINITEL)
185 AC_DEFINE(HAVE_ISINFL)
186 AC_DEFINE(HAVE_ISNANL)
187 fi
40ded872 188 ;;
58be1883
MV
189 *-freebsd*)
190 # Check for available headers.
191 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
192 machine/endian.h machine/param.h sys/machine.h sys/types.h \
193 fp.h locale.h float.h inttypes.h sys/resource.h sys/stat.h \
194 sys/time.h unistd.h])
195 SECTION_FLAGS='-ffunction-sections -fdata-sections'
196 AC_SUBST(SECTION_FLAGS)
197 GLIBCPP_CHECK_LINKER_FEATURES
198 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
199 GLIBCPP_CHECK_WCHAR_T_SUPPORT
200 os_include_dir="os/bsd/freebsd"
201 AC_DEFINE(HAVE_LC_MESSAGES)
202 AC_DEFINE(HAVE_DRAND48)
203 AC_DEFINE(HAVE_GETPAGESIZE)
204 AC_DEFINE(HAVE_SETENV)
205 AC_DEFINE(HAVE_SIGSETJMP)
206 AC_DEFINE(HAVE_COPYSIGN)
207 AC_DEFINE(HAVE_COPYSIGNF)
208 AC_DEFINE(HAVE_FINITEF)
209 AC_DEFINE(HAVE_FINITE)
210 AC_DEFINE(HAVE_FREXPF)
211 AC_DEFINE(HAVE_HYPOT)
212 AC_DEFINE(HAVE_HYPOTF)
213 AC_DEFINE(HAVE_ISINF)
214 AC_DEFINE(HAVE_ISNAN)
215 AC_DEFINE(HAVE_ISNANF)
216 if test x"long_double_math_on_this_cpu" = x"yes"; then
217 AC_DEFINE(HAVE_FINITEL)
218 AC_DEFINE(HAVE_ISINFL)
219 AC_DEFINE(HAVE_ISNANL)
220 fi
221 ;;
660bdf36
AG
222 *-mingw32*)
223 AC_CHECK_HEADERS([sys/types.h locale.h float.h])
224 GLIBCPP_CHECK_LINKER_FEATURES
225 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
226 GLIBCPP_CHECK_WCHAR_T_SUPPORT
2c839a4e 227 os_include_dir="os/mingw32"
660bdf36 228 ;;
522e3d22 229 *-windiss*)
2c839a4e 230 os_include_dir="os/windiss"
522e3d22 231 ;;
6203ef88 232changequote(,)dnl
f62bef48 233 *-qnx6.[12]*)
6203ef88 234changequote([,])dnl
f62bef48
C
235 SECTION_FLAGS='-ffunction-sections -fdata-sections'
236 AC_SUBST(SECTION_FLAGS)
237 GLIBCPP_CHECK_LINKER_FEATURES
238 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
239 GLIBCPP_CHECK_WCHAR_T_SUPPORT
2c839a4e 240 os_include_dir="os/qnx/qnx6.1"
f62bef48
C
241 AC_DEFINE(HAVE_COSF)
242 AC_DEFINE(HAVE_COSL)
243 AC_DEFINE(HAVE_COSHF)
244 AC_DEFINE(HAVE_COSHL)
245 AC_DEFINE(HAVE_LOGF)
246 AC_DEFINE(HAVE_LOGL)
247 AC_DEFINE(HAVE_LOG10F)
248 AC_DEFINE(HAVE_LOG10L)
249 AC_DEFINE(HAVE_SINF)
250 AC_DEFINE(HAVE_SINL)
251 AC_DEFINE(HAVE_SINHF)
252 AC_DEFINE(HAVE_SINHL)
253 ;;
b2dad0e3 254 *)
2c839a4e 255 os_include_dir="os/newlib"
75940b88
SE
256 AC_DEFINE(HAVE_HYPOT)
257 ;;
b2dad0e3 258 esac
75940b88 259
a0f27776 260 case "$target" in
660bdf36
AG
261 *-mingw32*)
262 ;;
522e3d22
MM
263 *-windiss*)
264 AC_DEFINE(HAVE_ACOSF)
265 AC_DEFINE(HAVE_ASINF)
266 AC_DEFINE(HAVE_ATAN2F)
267 AC_DEFINE(HAVE_ATANF)
58be1883
MV
268 AC_DEFINE(HAVE_CEILF)
269 AC_DEFINE(HAVE_COPYSIGN)
270 AC_DEFINE(HAVE_COPYSIGNF)
271 AC_DEFINE(HAVE_COSF)
272 AC_DEFINE(HAVE_COSHF)
273 AC_DEFINE(HAVE_EXPF)
274 AC_DEFINE(HAVE_FABSF)
275 AC_DEFINE(HAVE_FLOORF)
276 AC_DEFINE(HAVE_FMODF)
277 AC_DEFINE(HAVE_FREXPF)
278 AC_DEFINE(HAVE_LDEXPF)
279 AC_DEFINE(HAVE_LOG10F)
280 AC_DEFINE(HAVE_LOGF)
281 AC_DEFINE(HAVE_MODFF)
282 AC_DEFINE(HAVE_POWF)
283 AC_DEFINE(HAVE_SINF)
284 AC_DEFINE(HAVE_SINHF)
285 AC_DEFINE(HAVE_SQRTF)
286 AC_DEFINE(HAVE_TANF)
287 AC_DEFINE(HAVE_TANHF)
288 ;;
289 *-freebsd*)
290 # Must replicate generic section since we don't have strtof or strtold.
291 AC_DEFINE(HAVE_MMAP)
292 AC_DEFINE(HAVE_ACOSF)
293 AC_DEFINE(HAVE_ASINF)
294 AC_DEFINE(HAVE_ATAN2F)
295 AC_DEFINE(HAVE_ATANF)
522e3d22
MM
296 AC_DEFINE(HAVE_CEILF)
297 AC_DEFINE(HAVE_COPYSIGN)
298 AC_DEFINE(HAVE_COPYSIGNF)
299 AC_DEFINE(HAVE_COSF)
300 AC_DEFINE(HAVE_COSHF)
301 AC_DEFINE(HAVE_EXPF)
302 AC_DEFINE(HAVE_FABSF)
303 AC_DEFINE(HAVE_FLOORF)
304 AC_DEFINE(HAVE_FMODF)
305 AC_DEFINE(HAVE_FREXPF)
306 AC_DEFINE(HAVE_LDEXPF)
307 AC_DEFINE(HAVE_LOG10F)
308 AC_DEFINE(HAVE_LOGF)
309 AC_DEFINE(HAVE_MODFF)
310 AC_DEFINE(HAVE_POWF)
311 AC_DEFINE(HAVE_SINF)
312 AC_DEFINE(HAVE_SINHF)
313 AC_DEFINE(HAVE_SQRTF)
314 AC_DEFINE(HAVE_TANF)
315 AC_DEFINE(HAVE_TANHF)
316 ;;
660bdf36
AG
317 *)
318 # GLIBCPP_CHECK_STDLIB_SUPPORT
319 AC_DEFINE(HAVE_STRTOF)
320 AC_DEFINE(HAVE_STRTOLD)
321 # AC_FUNC_MMAP
322 AC_DEFINE(HAVE_MMAP)
323
324 AC_DEFINE(HAVE_ACOSF)
325 AC_DEFINE(HAVE_ASINF)
326 AC_DEFINE(HAVE_ATAN2F)
327 AC_DEFINE(HAVE_ATANF)
328 AC_DEFINE(HAVE_CEILF)
329 AC_DEFINE(HAVE_COPYSIGN)
330 AC_DEFINE(HAVE_COPYSIGNF)
331 AC_DEFINE(HAVE_COSF)
332 AC_DEFINE(HAVE_COSHF)
333 AC_DEFINE(HAVE_EXPF)
334 AC_DEFINE(HAVE_FABSF)
660bdf36
AG
335 AC_DEFINE(HAVE_FLOORF)
336 AC_DEFINE(HAVE_FMODF)
337 AC_DEFINE(HAVE_FREXPF)
660bdf36
AG
338 AC_DEFINE(HAVE_LDEXPF)
339 AC_DEFINE(HAVE_LOG10F)
340 AC_DEFINE(HAVE_LOGF)
341 AC_DEFINE(HAVE_MODFF)
342 AC_DEFINE(HAVE_POWF)
343 AC_DEFINE(HAVE_SINF)
344 AC_DEFINE(HAVE_SINHF)
345 AC_DEFINE(HAVE_SQRTF)
346 AC_DEFINE(HAVE_TANF)
347 AC_DEFINE(HAVE_TANHF)
348 ;;
349 esac
75940b88
SE
350
351 # At some point, we should differentiate between architectures
352 # like x86, which have long double versions, and alpha/powerpc/etc.,
353 # which don't. For the time being, punt.
354 if test x"long_double_math_on_this_cpu" = x"yes"; then
355 AC_DEFINE(HAVE_ACOSL)
356 AC_DEFINE(HAVE_ASINL)
357 AC_DEFINE(HAVE_ATAN2L)
358 AC_DEFINE(HAVE_ATANL)
359 AC_DEFINE(HAVE_CEILL)
360 AC_DEFINE(HAVE_COPYSIGNL)
361 AC_DEFINE(HAVE_COSL)
362 AC_DEFINE(HAVE_COSHL)
363 AC_DEFINE(HAVE_EXPL)
364 AC_DEFINE(HAVE_FABSL)
75940b88
SE
365 AC_DEFINE(HAVE_FLOORL)
366 AC_DEFINE(HAVE_FMODL)
367 AC_DEFINE(HAVE_FREXPL)
75940b88
SE
368 AC_DEFINE(HAVE_LDEXPL)
369 AC_DEFINE(HAVE_LOG10L)
370 AC_DEFINE(HAVE_LOGL)
371 AC_DEFINE(HAVE_MODFL)
372 AC_DEFINE(HAVE_POWL)
373 AC_DEFINE(HAVE_SINCOSL)
374 AC_DEFINE(HAVE_SINL)
375 AC_DEFINE(HAVE_SINHL)
376 AC_DEFINE(HAVE_SQRTL)
377 AC_DEFINE(HAVE_TANL)
378 AC_DEFINE(HAVE_TANHL)
379 fi
2c839a4e 380
b2dad0e3
BK
381else
382
383 # We are being configured natively. We can do more elaborate tests
384 # that include AC_TRY_COMPILE now, as the linker is assumed to be
385 # working.
4a9d5109 386 GLIBCPP_IS_CROSS_COMPILING=0
b2dad0e3 387 CANADIAN=no
b2dad0e3
BK
388
389 # Check for available headers.
390 AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
de215bc6 391 machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h sys/types.h])
b2dad0e3 392
c470c17d
BK
393 GLIBCPP_CHECK_COMPILER_FEATURES
394 GLIBCPP_CHECK_LINKER_FEATURES
b2dad0e3
BK
395 GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
396 GLIBCPP_CHECK_MATH_SUPPORT
2f103494 397 GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
b2dad0e3 398 GLIBCPP_CHECK_WCHAR_T_SUPPORT
e7140677 399 GLIBCPP_CHECK_STDLIB_SUPPORT
74af99e5 400 GLIBCPP_CHECK_UNISTD_SUPPORT
58b08ac3 401 AC_LC_MESSAGES
b2dad0e3 402
48dbafe4 403 AC_TRY_COMPILE([
f295ecef
BK
404 #include <setjmp.h>
405 ], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
406 [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
407 ])
48dbafe4 408
b2dad0e3 409 AC_FUNC_MMAP
33590f13 410
58b08ac3
BK
411 # Establish limits on memory usage during 'make check'
412 GLIBCPP_CONFIGURE_TESTSUITE
b2dad0e3
BK
413fi
414
c98b201b 415# This depends on the possibly-skipped linker test above.
ab3bc736 416GLIBCPP_ENABLE_SYMVERS([yes])
fe413112 417
4a9d5109 418# Propagate the target-specific source directories through the build chain.
ca017eef
BK
419# (Nothing currently uses cpu_include_dir directly; only ATOMICITYH
420# uses it, and they only get used here.)
d32e25df
PE
421OS_INC_SRCDIR=config/${os_include_dir}
422ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
4a9d5109
SW
423AC_SUBST(OS_INC_SRCDIR)
424AC_SUBST(ATOMICITY_INC_SRCDIR)
eebc608e 425
4a9d5109 426# Set up cross-compile flags
2c839a4e 427AC_SUBST(GLIBCPP_IS_CROSS_COMPILING) dnl Unused so far.
6e138b89 428AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
c4d3f801 429
5e53dba6 430AC_CACHE_SAVE
b2dad0e3 431
b2dad0e3
BK
432if test "${multilib}" = "yes"; then
433 multilib_arg="--enable-multilib"
434else
435 multilib_arg=
436fi
437
43ba4a58
BK
438# Export all the install information
439GLIBCPP_EXPORT_INSTALL_INFO
1fd2f510 440
e466dc8a
BK
441# Export all the include and flag information to makefiles.
442GLIBCPP_EXPORT_INCLUDES
443GLIBCPP_EXPORT_FLAGS
444
f8e4b51d
AO
445if ${CONFIG_SHELL-/bin/sh} ./libtool --tag CXX --features |
446 grep "enable shared" > /dev/null; then
447 LIBSUPCXX_PICFLAGS=-prefer-pic
448else
449 LIBSUPCXX_PICFLAGS=
450fi
451AC_SUBST(LIBSUPCXX_PICFLAGS)
452
4a9d5109 453# Generate the various Makefiles, include files, and scripts.
b2dad0e3 454# NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
c8f33f22
CD
455# and libsupc++/Makefile.am so that multilib installs will end up
456# installed in the correct place. To work around this not being passed
457# down from config-ml.in -> top_srcdir/Makefile.am ->
458# top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
4a9d5109
SW
459AC_OUTPUT(Makefile \
460 include/Makefile src/Makefile \
461 libmath/Makefile libio/Makefile libsupc++/Makefile \
4e10943d 462 po/Makefile testsuite/Makefile mkcheck testsuite_flags,
b2dad0e3 463[if test -n "$CONFIG_FILES"; then
6706f116 464 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
b2dad0e3
BK
465 ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
466 grep '^MULTISUBDIR =' Makefile >> src/Makefile
c8f33f22 467 grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
be5aeb60
MM
468fi
469chmod +x mkcheck
c6192d88 470chmod +x testsuite_flags
be5aeb60 471],
b2dad0e3
BK
472srcdir=${srcdir}
473host=${host}
474target=${target}
475with_multisubdir=${with_multisubdir}
476ac_configure_args="${multilib_arg} ${ac_configure_args}"
477CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
478glibcpp_basedir=${glibcpp_basedir}
479CC="${CC}"
480CXX="${CXX}"
481)
d2caef2e
PE
482dnl In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros:
483dnl AC_CONFIG_FILES(Makefile \
484dnl include/Makefile src/Makefile \
485dnl libmath/Makefile libio/Makefile libsupc++/Makefile \
486dnl po/Makefile testsuite/Makefile mkcheck testsuite_flags)
487dnl AC_CONFIG_COMMANDS([default],
488dnl [if test -n "$CONFIG_FILES"; then
489dnl ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
490dnl grep '^MULTISUBDIR =' Makefile >> src/Makefile
491dnl grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
492dnl fi
493dnl chmod +x mkcheck
494dnl chmod +x testsuite_flags
495dnl ],
496dnl srcdir=${srcdir}
497dnl host=${host}
498dnl target=${target}
499dnl with_multisubdir=${with_multisubdir}
500dnl ac_configure_args="${multilib_arg} ${ac_configure_args}"
501dnl CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
502dnl glibcpp_basedir=${glibcpp_basedir}
503dnl CC="${CC}"
504dnl CXX="${CXX}"
505dnl )
506dnl AC_OUTPUT
b2dad0e3
BK
507
508
29bd52c8
PE
509# Sanity checking & User-visible messages.
510# Checks down here, otherwise they get scrolled off before
511# the user will notice.
29bd52c8 512
5780a46b
BK
513# Trying to get more people to read documentation. Possibly remove
514# check and warn all the time. There is no "informational" AC_MSG_
515# macro, so these are going to be printed even when --quiet/--silent
516# is given.
99b51359
BK
517if test ! -f stamp-sanity-warned; then
518 touch stamp-sanity-warned
5780a46b
BK
519 echo ""
520 echo "Please make certain that you read the installation information here:"
d6ab05a0 521 echo " faster => ${srcdir}/docs/html/install.html"
a9ab8db1 522 echo " slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/install.html>"
5780a46b
BK
523 echo ""
524 echo "and the configuration information here:"
d6ab05a0 525 echo " faster => ${srcdir}/docs/html/configopts.html"
a9ab8db1 526 echo " slower => <URL:http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html>"
5780a46b 527 echo ""
421173e6 528 echo "before proceeding with ${_cv_gnu_make_command}."
5780a46b 529 echo ""
29bd52c8 530fi