Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / libstdc++ / tests / configure.in
1 # This file is a shell script fragment that supplies the information
2 # necessary for a configure script to process the program in
3 # this directory.  For more information, look at ../../configure.
4
5 configdirs=
6 srctrigger=tcomplex.cc
7 srcname="tests for ANSI C++ library"
8 package_makefile_frag=Make.pack
9 package_makefile_rules_frag=Make.pack.r
10
11 # per-host:
12
13 # per-target:
14
15 target_makefile_frag=../target-mkfrag
16
17 TO_TOPDIR=../../
18 ALL=' '
19 XCXXINCLUDES="-I${srcdir}/.. -I${srcdir}/../stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
20 SIMPLE_TESTS='tstring tlist tmap tvector'
21 TESTS="tcomplex ${SIMPLE_TESTS}"
22 MOSTLYCLEAN="*.o core ${TESTS} *.out"
23 (. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
24
25 # post-target:
26
27 CHECK=""
28
29 for TEST in ${SIMPLE_TESTS} ; do
30   echo "${TEST}: ${TEST}.o" '$(DEPLIBS)
31         $(CXX) $(CXXFLAGS) -o' "${TEST} ${TEST}.o" '$(LDLIBS)
32 ' >> Makefile
33 done
34
35 for TEST in ${TESTS} ; do
36   echo ".PHONY: check-${TEST}" >>Makefile
37   if [ -f ${srcdir}/${TEST}.inp ] ; then
38     echo "check-${TEST}: ${TEST}" '$(srcdir)'"/${TEST}.inp
39         ./${TEST} < "'$(srcdir)'"/${TEST}.inp > ${TEST}.out 2>&1" >>Makefile
40   else
41     echo "check-${TEST}: ${TEST}
42         ./${TEST} > ${TEST}.out 2>&1"  >>Makefile
43   fi
44   echo '        diff -c $(srcdir)/'"${TEST}.exp ${TEST}.out"  >>Makefile
45   CHECK="${CHECK} check-${TEST}"
46 done
47
48 if [ "${srcdir}" = "." ] ; then
49   if [ "${with_target_subdir}" != "." ] ; then
50     topsrcdir=${with_multisrctop}../../..
51   else
52     topsrcdir=${with_multisrctop}../..
53   fi
54 else
55   topsrcdir=${srcdir}/../..
56 fi
57
58 if [ -d ${topsrcdir}/gcc ] ; then
59   echo "
60 check:
61 check-old: ${CHECK}" >>Makefile
62 else
63   echo "
64 check: ${CHECK}" >>Makefile
65 fi