2001-05-12 19:45:46 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#
|
|
|
|
# This script computes the various flags needed to run GNU C++ testsuites
|
|
|
|
# (compiler specific as well as library specific).
|
|
|
|
#
|
|
|
|
# Written by Benjamin Kosnik <bkoz@redhat.com>
|
|
|
|
# Gabriel Dos Reis <gdr@codesourcery.com>
|
|
|
|
#
|
|
|
|
|
|
|
|
# Print a message saying how this script is intended to be invoked
|
|
|
|
print_usage() {
|
|
|
|
cat <<EOF
|
|
|
|
Usage:
|
2001-05-14 03:15:36 +02:00
|
|
|
testsuite_flags --install-includes
|
|
|
|
--build-includes
|
|
|
|
--build-cxx
|
|
|
|
--install-cxx
|
|
|
|
--cxxflags
|
2001-05-12 19:45:46 +02:00
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
# Establish configure-generated directory structure.
|
|
|
|
BUILD_DIR=@glibcpp_builddir@
|
|
|
|
SRC_DIR=@glibcpp_srcdir@
|
|
|
|
PREFIX_DIR=@glibcpp_prefixdir@
|
|
|
|
query=$1
|
|
|
|
|
|
|
|
case ${query} in
|
|
|
|
--install-includes)
|
2001-08-07 05:38:33 +02:00
|
|
|
INCLUDES="-I${SRC_DIR}/testsuite -I${BUILD_DIR}/testsuite"
|
2001-05-12 19:45:46 +02:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--build-includes)
|
2001-07-13 18:47:56 +02:00
|
|
|
INCLUDES="-nostdinc++ @GLIBCPP_INCLUDES@
|
2001-05-12 19:45:46 +02:00
|
|
|
-I${SRC_DIR}/libsupc++ -I${SRC_DIR}/libio
|
2001-08-07 05:38:33 +02:00
|
|
|
-I${SRC_DIR}/testsuite -I${BUILD_DIR}/testsuite"
|
2001-05-12 19:45:46 +02:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--install-cxx)
|
|
|
|
CXX=${PREFIX_DIR}/bin/g++
|
|
|
|
echo ${CXX}
|
|
|
|
;;
|
|
|
|
--build-cxx)
|
2001-05-14 03:15:36 +02:00
|
|
|
CC_build="@glibcpp_CXX@"
|
2001-05-12 19:45:46 +02:00
|
|
|
CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
|
|
|
|
echo ${CXX}
|
|
|
|
;;
|
|
|
|
--cxxflags)
|
2001-08-08 04:49:01 +02:00
|
|
|
CXXFLAGS=' -ggdb3 @SECTION_FLAGS@ @SECTION_LDFLAGS@
|
|
|
|
-DDEBUG_ASSERT -DLOCALEDIR="@glibcpp_localedir@" '
|
2001-05-12 19:45:46 +02:00
|
|
|
echo ${CXXFLAGS}
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
print_usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|