OSDN Git Service

[pf3gnuchains/gcc-fork.git] / libstdc++ / 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 if [ "${srcdir}" = "." ] ; then
6   if [ "${with_target_subdir}" != "." ] ; then
7     topsrcdir=${with_multisrctop}../..
8   else
9     topsrcdir=${with_multisrctop}..
10   fi
11 else
12   topsrcdir=${srcdir}/..
13 fi
14
15 if [ -d ${topsrcdir}/gcc ] ; then
16   configdirs="tests testsuite"
17 else
18   configdirs="tests"
19 fi
20 srctrigger=sinst.cc
21 srcname="ANSI C++ library"
22 package_makefile_frag=Make.pack
23 package_makefile_rules_frag=Make.pack.r
24
25 # per-host:
26
27 # per-target:
28
29 echo "# Warning: this fragment is automatically generated" > temp.mt
30 frags=
31
32 # If they didn't specify --enable-shared, don't generate shared libs.
33 case "${enable_shared}" in
34   yes) shared=yes ;;
35   no) shared=no ;;
36   *libstdc++*) shared=yes ;;
37   *) shared=no ;;
38 esac
39
40 if [ "${shared}" = "yes" ]; then
41   case "${target}" in
42     hppa*-*-*)          frags=../../config/mh-papic ;;
43     i[3456]86-*-*)      frags=../../config/mh-x86pic ;;
44     *-*-*)              frags=../../config/mh-${target_cpu}pic ;;
45   esac
46   case "${target}" in
47     *-dec-osf*)         frags="${frags} dec-osf.ml";;
48     *-*-hpux*)          frags="${frags} hpux.ml" ;;
49     *-*-irix[56]*)      frags="${frags} irix5.ml" ;;
50     *-*-linux*aout*)    ;;
51     *-*-linux*)         frags="${frags} linux.ml" ;;
52     *-*-sysv4*)         frags="${frags} elf.ml" ;;
53     *-*-solaris*)       frags="${frags} sol2shm.ml" ;;
54     *-*-sunos4*)        frags="${frags} sunos4.ml" ;;
55     *-*-aix*)           frags="${frags} aix.ml" ;;
56   esac
57 fi
58
59 # Make sure the right flags are defined for multi-threading.
60 case "${target}" in
61   alpha*-*-linux-gnulibc1)      frags="${frags} linux.mt" ;;
62   powerpc*-*-linux-gnulibc1)    frags="${frags} linux.mt" ;;
63   *-*-linux-gnu)                frags="${frags} linux.mt" ;;
64   m68k-motorola-sysv)           frags="${frags} delta.mt" ;;
65 esac
66
67 for frag in ${frags}; do
68   case ${frag} in
69     ../* )
70       if [ ${srcdir} = . ]; then
71         [ -n "${with_target_subdir}" ] && frag=../${frag}
72         [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
73       fi
74       ;;
75   esac
76   frag=${srcdir}/config/$frag
77   if [ -f ${frag} ]; then
78     echo "Appending ${frag} to target-mkfrag"
79     echo "# Following fragment copied from ${frag}" >> temp.mt
80     cat ${frag} >> temp.mt
81   fi
82 done
83
84 target_makefile_frag=target-mkfrag
85 ${moveifchange} temp.mt target-mkfrag
86
87 LIBDIR=yes
88 TO_TOPDIR=../
89 ALL='libs'
90 XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
91 MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
92 CLEAN='$(CLEAN_JUNK)'
93 EXTRA_DISTCLEAN='target-mkfrag'
94
95 (. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
96
97 # post-target:
98
99 # If cross-compiling, we install in $(tooldir).
100 if [ -n "${with_cross_host}" ] ; then
101     rm -f Makefile.tem
102     sed \
103         -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
104         Makefile >Makefile.tem
105     mv -f Makefile.tem Makefile
106 fi
107
108 . ${topsrcdir}/config-ml.in