acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Substitute GLIBCPP_TEST_WCHAR_T if building wchar_t bits in the library.

2003-01-15  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Substitute
	GLIBCPP_TEST_WCHAR_T if building wchar_t bits in the library.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.am (all-local): Add conditional rule to
	generate testsuite_wchar_t.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/lib/libstdc++-v3-dg.exp
	(libstdc++-v3-list-sourcefiles): Remove wchar_t files if
	testsuite_wchar_t is not present in the build directory.
	* testsuite/libstdc++-v3.dg/dg.exp: Add -g -O2 to DEFAULT_CXXFLAGS.
	Remove setulimit bits.
	* testsuite/26_numerics/complex_value.cc: Set to noopts.
	* testsuite/Makefile.am (CLEANFILES): Add.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r61373
This commit is contained in:
Benjamin Kosnik 2003-01-16 00:50:20 +00:00 committed by Benjamin Kosnik
parent 4af6a06372
commit 6b543e86f4
9 changed files with 1279 additions and 1175 deletions

View File

@ -1,3 +1,21 @@
2003-01-15 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Substitute
GLIBCPP_TEST_WCHAR_T if building wchar_t bits in the library.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* testsuite/Makefile.am (all-local): Add conditional rule to
generate testsuite_wchar_t.
* testsuite/Makefile.in: Regenerate.
* testsuite/lib/libstdc++-v3-dg.exp
(libstdc++-v3-list-sourcefiles): Remove wchar_t files if
testsuite_wchar_t is not present in the build directory.
* testsuite/libstdc++-v3.dg/dg.exp: Add -g -O2 to DEFAULT_CXXFLAGS.
Remove setulimit bits.
* testsuite/26_numerics/complex_value.cc: Set to noopts.
* testsuite/Makefile.am (CLEANFILES): Add.
* testsuite/Makefile.in: Regenerate.
2003-01-15 John David Anglin <dave@hiauly1.hia.nrc.ca>
* config/os/hpux/os_defines.h (_GLIBCPP_GTHREAD_USE_WEAK): Define for

View File

@ -940,6 +940,8 @@ dnl Define HAVE_MBSTATE_T if mbstate_t is not in wchar.h
dnl
dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl Wide characters disabled by default.
enable_wchar_t=no
dnl Test wchar.h for mbstate_t, which is needed for char_traits and
dnl others even if wchar_t support is not on.
@ -985,7 +987,7 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
ac_wfuncs=no)
dnl Checks for names injected into std:: by the c_std headers.
AC_CHECK_FUNCS(btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
AC_CHECK_FUNCS(btowc wctob fgetwc fgetws fputwc fputws fwide \
fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
@ -1030,18 +1032,15 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl At the moment, only enable wchar_t specializations if all the
dnl above support is present.
AC_MSG_CHECKING([for enabled wchar_t specializations])
if test x"$ac_isoC99_wchar_t" = xyes &&
test x"$ac_XPG2_wchar_t" = xyes; then
if test x"$ac_isoC99_wchar_t" = xyes &&
test x"$ac_XPG2_wchar_t" = xyes; then
AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
enable_wchar_t=yes
fi
else
dnl Wide characters disabled by the user.
AC_MSG_WARN([wchar_t support disabled.])
fi
AC_MSG_CHECKING([for enabled wchar_t specializations])
AC_MSG_RESULT($enable_wchar_t)
AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
])

View File

@ -952,6 +952,8 @@ dnl Define HAVE_MBSTATE_T if mbstate_t is not in wchar.h
dnl
dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl Wide characters disabled by default.
enable_wchar_t=no
dnl Test wchar.h for mbstate_t, which is needed for char_traits and
dnl others even if wchar_t support is not on.
@ -997,7 +999,7 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
ac_wfuncs=no)
dnl Checks for names injected into std:: by the c_std headers.
AC_CHECK_FUNCS(btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
AC_CHECK_FUNCS(btowc wctob fgetwc fgetws fputwc fputws fwide \
fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
@ -1042,18 +1044,15 @@ AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
dnl At the moment, only enable wchar_t specializations if all the
dnl above support is present.
AC_MSG_CHECKING([for enabled wchar_t specializations])
if test x"$ac_isoC99_wchar_t" = xyes &&
test x"$ac_XPG2_wchar_t" = xyes; then
if test x"$ac_isoC99_wchar_t" = xyes &&
test x"$ac_XPG2_wchar_t" = xyes; then
AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
enable_wchar_t=yes
fi
else
dnl Wide characters disabled by the user.
AC_MSG_WARN([wchar_t support disabled.])
fi
AC_MSG_CHECKING([for enabled wchar_t specializations])
AC_MSG_RESULT($enable_wchar_t)
AM_CONDITIONAL(GLIBCPP_TEST_WCHAR_T, test "$enable_wchar_t" = yes)
])

2321
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,8 @@
// { dg-options "-O0" }
// 2000-11-20
// Benjamin Kosnik bkoz@redhat.com
// Copyright (C) 2000 Free Software Foundation, Inc.
// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the

View File

@ -1,6 +1,6 @@
## Makefile for the testsuite subdirectory of the GNU C++ Standard library.
##
## Copyright (C) 2001, 2002 Free Software Foundation, Inc.
## Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
##
## This file is part of the libstdc++ version 3 distribution.
## Process this file with automake to produce Makefile.in.
@ -61,3 +61,18 @@ else
noinst_PROGRAMS =
endif
abi_check_SOURCES = abi_check.cc
# Enable wchar_t tests if capable.
if GLIBCPP_TEST_WCHAR_T
all-local: stamp_wchar
else
all-local:
endif
stamp_wchar:
touch testsuite_wchar_t
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp ostream_* *.log *.sum \
testsuite_files testsuite_wchar_t \
site.exp abi_check

View File

@ -178,6 +178,12 @@ libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
@GLIBCPP_BUILD_ABI_CHECK_TRUE@noinst_PROGRAMS = @GLIBCPP_BUILD_ABI_CHECK_TRUE@abi_check
@GLIBCPP_BUILD_ABI_CHECK_FALSE@noinst_PROGRAMS =
abi_check_SOURCES = abi_check.cc
# By adding these files here, automake will remove them for 'make clean'
CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp ostream_* *.log *.sum \
testsuite_files testsuite_wchar_t \
site.exp abi_check
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
@ -400,7 +406,7 @@ install-am: all-am
install: install-am
uninstall-am:
uninstall: uninstall-am
all-am: Makefile $(LIBRARIES) $(PROGRAMS)
all-am: Makefile $(LIBRARIES) $(PROGRAMS) all-local
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
@ -410,6 +416,7 @@ installdirs:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
@ -454,11 +461,18 @@ maintainer-clean-noinstPROGRAMS tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir check-DEJAGNU info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-info-am \
install-info install-exec-am install-exec install-data-am install-data \
install-am install uninstall-am uninstall all-redirect all-am all \
installdirs mostlyclean-generic distclean-generic clean-generic \
install-am install uninstall-am uninstall all-local all-redirect all-am \
all installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Enable wchar_t tests if capable.
@GLIBCPP_TEST_WCHAR_T_TRUE@all-local: stamp_wchar
@GLIBCPP_TEST_WCHAR_T_FALSE@all-local:
stamp_wchar:
touch testsuite_wchar_t
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,4 +1,4 @@
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -240,6 +240,23 @@ proc libstdc++-v3-list-sourcefiles { } {
cd $where_we_were
}
close $f
return $sfiles
}
# Disable wchar_t tests if library not configured to support
# wchar_t testing.
set wchar_file "${outdir}/testsuite_wchar_t"
if { [file exists $wchar_file] } {
return $sfiles
} else {
# Remove wchar_t tests files from list.
set res {}
foreach w $sfiles {
if [regexp "wchar_t" $w] {
verbose "element out list is $w"
} else {
verbose "element in list is $w"
lappend res $w
}
}
return $res
}
}

View File

@ -1,4 +1,4 @@
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -22,23 +22,13 @@ load_lib libstdc++-v3-dg.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CXXFLAGS
if ![info exists DEFAULT_CXXFLAGS] then {
set DEFAULT_CXXFLAGS " -DDEBUG_ASSERT"
set DEFAULT_CXXFLAGS "-g -O2 -DDEBUG_ASSERT"
}
# Initialize 'dg' last or dejagnu exits with an error...
libstdc++-v3-init
dg-init
## Set ulimits.
## This should normally be handled on a per-test basis through @xxx@-keywords.
## The following limit is expressed in kilobytes. For history, have a
## look at http://gcc.gnu.org/ml/libstdc++/2000-10/msg00029.html
set maximum-memory-usage 16384
set shell-ulimit-command ulimit
remote_exec host ${shell-ulimit-command} "-d ${maximum-memory-usage}"
remote_exec host ${shell-ulimit-command} "-v ${maximum-memory-usage}"
# Main loop.
dg-runtest [libstdc++-v3-list-sourcefiles] "" $DEFAULT_CXXFLAGS