3 dnl This file was derived from libstdc++-v3/acinclude.m4 and heavily pruned.
4 dnl Its purpose is to check for glibc time, gettimeofday and
5 dnl float128 availability.
7 dnl GLIBCXX_CONDITIONAL (NAME, SHELL-TEST)
9 dnl Exactly like AM_CONDITIONAL, but delays evaluation of the test until the
10 dnl end of configure. This lets tested variables be reassigned, and the
11 dnl conditional will depend on the final state of the variable. For a simple
12 dnl example of why this is needed, see GLIBCXX_ENABLE_HOSTED.
14 m4_define([_m4_divert(glibcxx_diversion)], 8000)dnl
15 AC_DEFUN([GLIBCXX_CONDITIONAL], [dnl
16 m4_divert_text([glibcxx_diversion],dnl
17 AM_CONDITIONAL([$1],[$2])
20 AC_DEFUN([GLIBCXX_EVALUATE_CONDITIONALS], [m4_undivert([glibcxx_diversion])])dnl
24 dnl Check to see what architecture and operating system we are compiling
25 dnl for. Also, if architecture- or OS-specific flags are required for
26 dnl compilation, pick them up here.
28 AC_DEFUN([GLIBCXX_CHECK_HOST], [
29 . $glibcxx_srcdir/configure.host
30 AC_MSG_NOTICE([CPU config directory is $cpu_include_dir])
31 AC_MSG_NOTICE([OS config directory is $os_include_dir])
36 dnl Initialize the rest of the library configury. At this point we have
37 dnl variables like $host.
42 dnl glibcxx_builddir (absolute path)
43 dnl glibcxx_srcdir (absolute path)
44 dnl toplevel_builddir (absolute path)
45 dnl toplevel_srcdir (absolute path)
48 dnl with_target_subdir
50 dnl - the variables in GLIBCXX_CHECK_HOST / configure.host
51 dnl - default settings for all AM_CONFITIONAL test variables
52 dnl - lots of tools, like CC and CXX
54 AC_DEFUN([GLIBCXX_CONFIGURE], [
55 # Keep these sync'd with the list in Makefile.am. The first provides an
56 # expandable list at autoconf time; the second provides an expandable list
57 # (i.e., shell variable) at configure time.
58 m4_define([glibcxx_SUBDIRS],[])
59 SUBDIRS='glibcxx_SUBDIRS'
61 # These need to be absolute paths, yet at the same time need to
62 # canonicalize only relative paths, because then amd will not unmount
63 # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
64 glibcxx_builddir=`${PWDCMD-pwd}`
66 [\\/$]* | ?:[\\/]*) glibcxx_srcdir=${srcdir} ;;
67 *) glibcxx_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
69 toplevel_builddir=${glibcxx_builddir}/..
70 toplevel_srcdir=${glibcxx_srcdir}/..
71 AC_SUBST(glibcxx_builddir)
72 AC_SUBST(glibcxx_srcdir)
73 AC_SUBST(toplevel_builddir)
74 AC_SUBST(toplevel_srcdir)
76 # We use these options to decide which functions to include. They are
77 # set from the top level.
78 AC_ARG_WITH([target-subdir],
79 AC_HELP_STRING([--with-target-subdir=SUBDIR],
80 [configuring in a subdirectory]))
82 AC_ARG_WITH([cross-host],
83 AC_HELP_STRING([--with-cross-host=HOST],
84 [configuring with a cross compiler]))
87 AC_HELP_STRING([--with-newlib],
88 [assume newlib as a system C library]))
90 # Will set LN_S to either 'ln -s', 'ln', or 'cp -p' (if linking isn't
91 # available). Uncomment the next line to force a particular method.
97 AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
101 # Set up safe default values for all subsequent AM_CONDITIONAL tests
102 # which are themselves conditionally expanded.
103 ## (Right now, this only matters for enable_wchar_t, but nothing prevents
104 ## other macros from doing the same. This should be automated.) -pme
106 # Check for C library flavor since GNU/Linux platforms use different
107 # configuration directories depending on the C library in use.
108 AC_EGREP_CPP([_using_uclibc], [
113 ], uclibc=yes, uclibc=no)
115 AC_EGREP_CPP([_using_bionic], [
120 ], bionic=yes, bionic=no)
122 # Find platform-specific directories containing configuration info.
123 # Also possibly modify flags used elsewhere, as needed by the platform.
130 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
131 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
132 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
134 dnl See manual/appendix_porting.html#appendix.porting.build_hacking for
137 m4_define([GLIBCXX_ENABLE],[dnl
138 m4_define([_g_switch],[--enable-$1])dnl
139 m4_define([_g_help],[AC_HELP_STRING([_g_switch$3],[$4 @<:@default=$2@:>@])])dnl
140 AC_ARG_ENABLE([$1],m4_dquote(_g_help),
145 m4_bpatsubst([$5],[permit ])) ;;
146 *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
147 dnl Idea for future: generate a URL pointing to
148 dnl "onlinedocs/configopts.html#whatever"
155 *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
159 [enable_]m4_bpatsubst([$1],-,_)[=][$2])
160 m4_undefine([_g_switch])dnl
161 m4_undefine([_g_help])dnl
166 dnl Check for clock_gettime, nanosleep and sched_yield, used in the
167 dnl implementation of 20.11.7 [time.clock], and 30.3.2 [thread.thread.this]
168 dnl in the C++11 standard.
170 dnl --enable-libstdcxx-time
171 dnl --enable-libstdcxx-time=yes
172 dnl checks for the availability of monotonic and realtime clocks,
173 dnl nanosleep and sched_yield in libc.
174 dnl --enable-libstdcxx-time=rt
175 dnl also searches (and, if needed, links) librt. Note that this is
176 dnl not always desirable because, in glibc 2.16 and earlier, for
177 dnl example, in turn it triggers the linking of libpthread too,
178 dnl which activates locking,
179 dnl a large overhead for single-thread programs.
180 dnl --enable-libstdcxx-time=no
181 dnl --disable-libstdcxx-time
182 dnl disables the checks completely
184 dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX
185 dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test
186 dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in
187 dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD.
190 AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [
192 GLIBCXX_ENABLE(libstdcxx-time,auto,[[[=KIND]]],
193 [use KIND for check type],
198 ac_save_CXXFLAGS="$CXXFLAGS"
199 CXXFLAGS="$CXXFLAGS -fno-exceptions"
202 ac_has_clock_monotonic=no
203 ac_has_clock_realtime=no
205 ac_has_sched_yield=no
207 if test x"$enable_libstdcxx_time" = x"auto"; then
209 case "${target_os}" in
214 ac_has_win32_sleep=yes
215 ac_has_sched_yield=yes
219 ac_has_sched_yield=yes
221 # VxWorks has nanosleep as soon as the kernel is configured with
222 # INCLUDE_POSIX_TIMERS, which is normally/most-often the case.
226 gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
227 # Don't use link test for freestanding library, in case gcc_no_link=yes
228 if test x"$is_hosted" = xyes; then
229 # Versions of glibc before 2.17 needed -lrt for clock_gettime.
230 AC_SEARCH_LIBS(clock_gettime, [rt])
231 if test x"$ac_cv_search_clock_gettime" = x"none required"; then
232 ac_has_clock_monotonic=yes
233 ac_has_clock_realtime=yes
237 ac_has_sched_yield=yes
239 freebsd*|netbsd*|dragonfly*|rtems*)
240 ac_has_clock_monotonic=yes
241 ac_has_clock_realtime=yes
243 ac_has_sched_yield=yes
246 ac_has_clock_monotonic=yes
247 ac_has_clock_realtime=yes
251 ac_has_clock_monotonic=yes
252 ac_has_clock_realtime=yes
254 ac_has_sched_yield=yes
258 ac_has_sched_yield=yes
261 elif test x"$enable_libstdcxx_time" != x"no"; then
263 if test x"$enable_libstdcxx_time" = x"rt"; then
264 AC_SEARCH_LIBS(clock_gettime, [rt])
265 AC_SEARCH_LIBS(nanosleep, [rt])
267 AC_CHECK_FUNC(clock_gettime)
268 AC_CHECK_FUNC(nanosleep)
271 case "$ac_cv_search_clock_gettime" in
272 -l*) GLIBCXX_LIBS=$ac_cv_search_clock_gettime
275 case "$ac_cv_search_nanosleep" in
276 -l*) GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_nanosleep"
280 AC_SEARCH_LIBS(sched_yield, [rt])
282 case "$ac_cv_search_sched_yield" in
284 if test x"$enable_libstdcxx_time" = x"rt"; then
285 GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
286 ac_has_sched_yield=yes
290 ac_has_sched_yield=yes
294 AC_CHECK_HEADERS(unistd.h, ac_has_unistd_h=yes, ac_has_unistd_h=no)
296 if test x"$ac_has_unistd_h" = x"yes"; then
297 AC_MSG_CHECKING([for monotonic clock])
302 [#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
305 clock_gettime(CLOCK_MONOTONIC, &tp);
306 ], [ac_has_clock_monotonic=yes], [ac_has_clock_monotonic=no])
308 AC_MSG_RESULT($ac_has_clock_monotonic)
310 AC_MSG_CHECKING([for realtime clock])
315 [#if _POSIX_TIMERS > 0
318 clock_gettime(CLOCK_REALTIME, &tp);
319 ], [ac_has_clock_realtime=yes], [ac_has_clock_realtime=no])
321 AC_MSG_RESULT($ac_has_clock_realtime)
323 AC_MSG_CHECKING([for nanosleep])
328 [#if _POSIX_TIMERS > 0
332 ], [ac_has_nanosleep=yes], [ac_has_nanosleep=no])
334 AC_MSG_RESULT($ac_has_nanosleep)
338 if test x"$ac_has_clock_monotonic" != x"yes"; then
341 AC_MSG_CHECKING([for clock_gettime syscall])
345 #include <sys/syscall.h>
347 [#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
350 syscall(SYS_clock_gettime, CLOCK_MONOTONIC, &tp);
351 syscall(SYS_clock_gettime, CLOCK_REALTIME, &tp);
352 ], [ac_has_clock_gettime_syscall=yes], [ac_has_clock_gettime_syscall=no])
353 AC_MSG_RESULT($ac_has_clock_gettime_syscall)
354 if test x"$ac_has_clock_gettime_syscall" = x"yes"; then
355 AC_DEFINE(_GLIBCXX_USE_CLOCK_GETTIME_SYSCALL, 1,
356 [Defined if clock_gettime syscall has monotonic and realtime clock support. ])
357 ac_has_clock_monotonic=yes
358 ac_has_clock_realtime=yes
359 AC_MSG_CHECKING([for struct timespec that matches syscall])
362 #include <sys/syscall.h>
364 [#ifdef SYS_clock_gettime64
365 #if SYS_clock_gettime64 != SYS_clock_gettime
366 // We need to use SYS_clock_gettime and libc appears to
367 // also know about the SYS_clock_gettime64 syscall.
368 // Check that userspace doesn't use time64 version of timespec.
369 static_assert(sizeof(timespec::tv_sec) == sizeof(long),
370 "struct timespec must be compatible with SYS_clock_gettime");
374 [ac_timespec_matches_syscall=yes],
375 [ac_timespec_matches_syscall=no])
376 AC_MSG_RESULT($ac_timespec_matches_syscall)
377 if test x"$ac_timespec_matches_syscall" = no; then
378 AC_MSG_ERROR([struct timespec is not compatible with SYS_clock_gettime, please report a bug to http://gcc.gnu.org/bugzilla])
384 if test x"$ac_has_clock_monotonic" = x"yes"; then
385 AC_DEFINE(_GLIBCXX_USE_CLOCK_MONOTONIC, 1,
386 [ Defined if clock_gettime has monotonic clock support. ])
389 if test x"$ac_has_clock_realtime" = x"yes"; then
390 AC_DEFINE(_GLIBCXX_USE_CLOCK_REALTIME, 1,
391 [ Defined if clock_gettime has realtime clock support. ])
394 if test x"$ac_has_sched_yield" = x"yes"; then
395 AC_DEFINE(_GLIBCXX_USE_SCHED_YIELD, 1,
396 [ Defined if sched_yield is available. ])
399 if test x"$ac_has_nanosleep" = x"yes"; then
400 AC_DEFINE(_GLIBCXX_USE_NANOSLEEP, 1,
401 [ Defined if nanosleep is available. ])
402 elif test x"$ac_has_win32_sleep" = x"yes"; then
403 AC_DEFINE(_GLIBCXX_USE_WIN32_SLEEP, 1,
404 [Defined if Sleep exists.])
406 AC_MSG_CHECKING([for sleep])
407 AC_TRY_COMPILE([#include <unistd.h>],
409 [ac_has_sleep=yes],[ac_has_sleep=no])
410 if test x"$ac_has_sleep" = x"yes"; then
411 AC_DEFINE(HAVE_SLEEP,1, [Defined if sleep exists.])
413 AC_MSG_RESULT($ac_has_sleep)
414 AC_MSG_CHECKING([for usleep])
415 AC_TRY_COMPILE([#include <unistd.h>],
418 [ac_has_usleep=yes],[ac_has_usleep=no])
419 if test x"$ac_has_usleep" = x"yes"; then
420 AC_DEFINE(HAVE_USLEEP,1, [Defined if usleep exists.])
422 AC_MSG_RESULT($ac_has_usleep)
425 if test x"$ac_has_nanosleep$ac_has_win32_sleep$ac_has_sleep" = x"nonono"; then
426 AC_DEFINE(_GLIBCXX_NO_SLEEP,1, [Defined if no way to sleep is available.])
429 AC_SUBST(GLIBCXX_LIBS)
431 CXXFLAGS="$ac_save_CXXFLAGS"
437 dnl Check for gettimeofday, used in the implementation of 20.11.7
438 dnl [time.clock] in the C++11 standard.
441 AC_DEFUN([GLIBCXX_CHECK_GETTIMEOFDAY], [
443 AC_MSG_CHECKING([for gettimeofday])
447 ac_save_CXXFLAGS="$CXXFLAGS"
448 CXXFLAGS="$CXXFLAGS -fno-exceptions"
450 ac_has_gettimeofday=no;
451 AC_CHECK_HEADERS(sys/time.h, ac_has_sys_time_h=yes, ac_has_sys_time_h=no)
452 if test x"$ac_has_sys_time_h" = x"yes"; then
453 AC_MSG_CHECKING([for gettimeofday])
454 GCC_TRY_COMPILE_OR_LINK([#include <sys/time.h>],
455 [timeval tv; gettimeofday(&tv, 0);],
456 [ac_has_gettimeofday=yes], [ac_has_gettimeofday=no])
458 AC_MSG_RESULT($ac_has_gettimeofday)
461 if test x"$ac_has_gettimeofday" = x"yes"; then
462 AC_DEFINE(_GLIBCXX_USE_GETTIMEOFDAY, 1,
463 [ Defined if gettimeofday is available. ])
466 CXXFLAGS="$ac_save_CXXFLAGS"
471 dnl Check for which locale library to use. The choice is mapped to
472 dnl a subdirectory of config/locale.
474 dnl Default is generic.
476 AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
477 GLIBCXX_ENABLE(clocale,auto,[[[=MODEL]]],
478 [use MODEL for target locale package],
479 [permit generic|gnu|ieee_1003.1-2001|newlib|yes|no|auto])
481 # Deal with gettext issues. Default to not using it (=no) until we detect
482 # support for it later. Let the user turn it off via --e/d, but let that
483 # default to on for easier handling.
486 AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
490 # Either a known package, or "auto"
491 if test $enable_clocale = no || test $enable_clocale = yes; then
494 enable_clocale_flag=$enable_clocale
496 # Probe for locale model to use if none specified.
497 # Default to "generic".
498 if test $enable_clocale_flag = auto; then
500 linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
501 enable_clocale_flag=gnu
504 enable_clocale_flag=darwin
507 enable_clocale_flag=vxworks
509 dragonfly* | freebsd*)
510 enable_clocale_flag=dragonfly
513 enable_clocale_flag=newlib
516 if test x"$with_newlib" = x"yes"; then
517 enable_clocale_flag=newlib
519 enable_clocale_flag=generic
525 # Sanity check model, and test for special functionality.
526 if test $enable_clocale_flag = gnu; then
527 AC_EGREP_CPP([_GLIBCXX_ok], [
528 #include <features.h>
529 #if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined(__UCLIBC__)
532 ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
534 # Set it to scream when it hurts.
535 ac_save_CFLAGS="$CFLAGS"
536 CFLAGS="-Wimplicit-function-declaration -Werror"
538 # Use strxfrm_l if available.
539 AC_TRY_COMPILE([#define _GNU_SOURCE 1
541 #include <locale.h>],
542 [char s[128]; __locale_t loc; strxfrm_l(s, "C", 5, loc);],
543 AC_DEFINE(HAVE_STRXFRM_L, 1,
544 [Define if strxfrm_l is available in <string.h>.]),)
546 # Use strerror_l if available.
547 AC_TRY_COMPILE([#define _GNU_SOURCE 1
549 #include <locale.h>],
550 [__locale_t loc; strerror_l(5, loc);],
551 AC_DEFINE(HAVE_STRERROR_L, 1,
552 [Define if strerror_l is available in <string.h>.]),)
554 CFLAGS="$ac_save_CFLAGS"
557 # Perhaps use strerror_r if available, and strerror_l isn't.
558 ac_save_CFLAGS="$CFLAGS"
559 CFLAGS="-Wimplicit-function-declaration -Werror"
560 AC_TRY_COMPILE([#define _GNU_SOURCE 1
562 #include <locale.h>],
563 [char s[128]; strerror_r(5, s, 128);],
564 AC_DEFINE(HAVE_STRERROR_R, 1,
565 [Define if strerror_r is available in <string.h>.]),)
566 CFLAGS="$ac_save_CFLAGS"
568 # Set configure bits for specified locale package
569 AC_MSG_CHECKING([for C locale to use])
570 case ${enable_clocale_flag} in
572 AC_MSG_RESULT(generic)
574 CLOCALE_H=config/locale/generic/c_locale.h
575 CLOCALE_CC=config/locale/generic/c_locale.cc
576 CCODECVT_CC=config/locale/generic/codecvt_members.cc
577 CCOLLATE_CC=config/locale/generic/collate_members.cc
578 CCTYPE_CC=config/locale/generic/ctype_members.cc
579 CMESSAGES_H=config/locale/generic/messages_members.h
580 CMESSAGES_CC=config/locale/generic/messages_members.cc
581 CMONEY_CC=config/locale/generic/monetary_members.cc
582 CNUMERIC_CC=config/locale/generic/numeric_members.cc
583 CTIME_H=config/locale/generic/time_members.h
584 CTIME_CC=config/locale/generic/time_members.cc
585 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
588 AC_MSG_RESULT(darwin)
590 CLOCALE_H=config/locale/generic/c_locale.h
591 CLOCALE_CC=config/locale/generic/c_locale.cc
592 CCODECVT_CC=config/locale/generic/codecvt_members.cc
593 CCOLLATE_CC=config/locale/generic/collate_members.cc
594 CCTYPE_CC=config/locale/darwin/ctype_members.cc
595 CMESSAGES_H=config/locale/generic/messages_members.h
596 CMESSAGES_CC=config/locale/generic/messages_members.cc
597 CMONEY_CC=config/locale/generic/monetary_members.cc
598 CNUMERIC_CC=config/locale/generic/numeric_members.cc
599 CTIME_H=config/locale/generic/time_members.h
600 CTIME_CC=config/locale/generic/time_members.cc
601 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
604 AC_MSG_RESULT(vxworks)
606 CLOCALE_H=config/locale/generic/c_locale.h
607 CLOCALE_CC=config/locale/generic/c_locale.cc
608 CCODECVT_CC=config/locale/generic/codecvt_members.cc
609 CCOLLATE_CC=config/locale/generic/collate_members.cc
610 CCTYPE_CC=config/locale/vxworks/ctype_members.cc
611 CMESSAGES_H=config/locale/generic/messages_members.h
612 CMESSAGES_CC=config/locale/generic/messages_members.cc
613 CMONEY_CC=config/locale/generic/monetary_members.cc
614 CNUMERIC_CC=config/locale/generic/numeric_members.cc
615 CTIME_H=config/locale/generic/time_members.h
616 CTIME_CC=config/locale/generic/time_members.cc
617 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
620 AC_MSG_RESULT(dragonfly or freebsd)
622 CLOCALE_H=config/locale/dragonfly/c_locale.h
623 CLOCALE_CC=config/locale/dragonfly/c_locale.cc
624 CCODECVT_CC=config/locale/dragonfly/codecvt_members.cc
625 CCOLLATE_CC=config/locale/dragonfly/collate_members.cc
626 CCTYPE_CC=config/locale/dragonfly/ctype_members.cc
627 CMESSAGES_H=config/locale/generic/messages_members.h
628 CMESSAGES_CC=config/locale/generic/messages_members.cc
629 CMONEY_CC=config/locale/dragonfly/monetary_members.cc
630 CNUMERIC_CC=config/locale/dragonfly/numeric_members.cc
631 CTIME_H=config/locale/dragonfly/time_members.h
632 CTIME_CC=config/locale/dragonfly/time_members.cc
633 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
639 # Declare intention to use gettext, and add support for specific
641 # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
644 # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
645 AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
646 if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
649 # Export the build objects.
650 for ling in $ALL_LINGUAS; do \
651 glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
652 glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
654 AC_SUBST(glibcxx_MOFILES)
655 AC_SUBST(glibcxx_POFILES)
657 CLOCALE_H=config/locale/gnu/c_locale.h
658 CLOCALE_CC=config/locale/gnu/c_locale.cc
659 CCODECVT_CC=config/locale/gnu/codecvt_members.cc
660 CCOLLATE_CC=config/locale/gnu/collate_members.cc
661 CCTYPE_CC=config/locale/gnu/ctype_members.cc
662 CMESSAGES_H=config/locale/gnu/messages_members.h
663 CMESSAGES_CC=config/locale/gnu/messages_members.cc
664 CMONEY_CC=config/locale/gnu/monetary_members.cc
665 CNUMERIC_CC=config/locale/gnu/numeric_members.cc
666 CTIME_H=config/locale/gnu/time_members.h
667 CTIME_CC=config/locale/gnu/time_members.cc
668 CLOCALE_INTERNAL_H=config/locale/gnu/c++locale_internal.h
671 AC_MSG_RESULT(IEEE 1003.1)
673 CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
674 CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
675 CCODECVT_CC=config/locale/generic/codecvt_members.cc
676 CCOLLATE_CC=config/locale/generic/collate_members.cc
677 CCTYPE_CC=config/locale/generic/ctype_members.cc
678 CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
679 CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
680 CMONEY_CC=config/locale/generic/monetary_members.cc
681 CNUMERIC_CC=config/locale/generic/numeric_members.cc
682 CTIME_H=config/locale/generic/time_members.h
683 CTIME_CC=config/locale/generic/time_members.cc
684 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
687 AC_MSG_RESULT(newlib)
689 CLOCALE_H=config/locale/generic/c_locale.h
690 CLOCALE_CC=config/locale/generic/c_locale.cc
691 CCODECVT_CC=config/locale/generic/codecvt_members.cc
692 CCOLLATE_CC=config/locale/generic/collate_members.cc
693 CCTYPE_CC=config/locale/newlib/ctype_members.cc
694 CMESSAGES_H=config/locale/generic/messages_members.h
695 CMESSAGES_CC=config/locale/generic/messages_members.cc
696 CMONEY_CC=config/locale/generic/monetary_members.cc
697 CNUMERIC_CC=config/locale/generic/numeric_members.cc
698 CTIME_H=config/locale/generic/time_members.h
699 CTIME_CC=config/locale/generic/time_members.cc
700 CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
704 # This is where the testsuite looks for locale catalogs, using the
705 # -DLOCALEDIR define during testsuite compilation.
706 glibcxx_localedir=${glibcxx_builddir}/po/share/locale
707 AC_SUBST(glibcxx_localedir)
709 # A standalone libintl (e.g., GNU libintl) may be in use.
710 if test $USE_NLS = yes; then
711 AC_CHECK_HEADERS([libintl.h], [], USE_NLS=no)
712 AC_SEARCH_LIBS(gettext, intl, [], USE_NLS=no)
714 if test $USE_NLS = yes; then
715 AC_DEFINE(_GLIBCXX_USE_NLS, 1,
716 [Define if NLS translations are to be used.])
721 AC_SUBST(CMESSAGES_H)
722 AC_SUBST(CCODECVT_CC)
723 AC_SUBST(CCOLLATE_CC)
725 AC_SUBST(CMESSAGES_CC)
727 AC_SUBST(CNUMERIC_CC)
731 AC_SUBST(CLOCALE_INTERNAL_H)
736 dnl Check for GNU 128-bit floating point type.
738 dnl Note: also checks that the type isn't a standard types.
743 AC_DEFUN([GLIBCXX_ENABLE_FLOAT128], [
748 # Fake what AC_TRY_COMPILE does, without linking as this is
749 # unnecessary for this test.
751 cat > conftest.$ac_ext << EOF
752 [#]line __oline__ "configure"
753 template<typename T1, typename T2>
755 { typedef T2 type; };
762 typename same<double, __float128>::type f1;
763 typename same<long double, __float128>::type f2;
767 AC_MSG_CHECKING([for __float128])
768 if AC_TRY_EVAL(ac_compile); then
773 AC_MSG_RESULT($enable_float128)
774 GLIBCXX_CONDITIONAL(ENABLE_FLOAT128, test $enable_float128 = yes)
780 # Macros from the top-level gcc directory.
781 m4_include([../config/gc++filt.m4])
782 m4_include([../config/tls.m4])
783 m4_include([../config/gthr.m4])
784 m4_include([../config/cet.m4])