* natCollator.cc: New file.
[official-gcc.git] / libstdc++ / configure.in
blob0f556cac551c0dcc83223f8a17cc1ce8d9e9a5ec
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.
5 # find a possible extension of the just-built C++ compiler. Note that this
6 # is not the only choice, taking into cross and canadian cross into
7 # account, and we need to search for with and without the extension.
8 case "${host_alias}" in
9 *cygwin* | *mingw32*)
10   EXEEXT=.exe
11   ;;
13   EXEEXT=
14   ;;
15 esac
17 # If the language specific compiler does not exist, but the "gcc" directory 
18 # does, we do not build anything. Note, $r is set by the top-level Makefile.
19 # Note that when we look for the compiler, we search both with and without
20 # extension to handle cross and canadian cross builds. 
21 compiler_name=cc1plus
22 rm -f skip-this-dir
23 if test -n "$r"; then
24   if test -d "$r"/gcc; then
25     if test -f "$r"/gcc/$compiler_name \
26        || test -f "$r"/gcc/$compiler_name$EXEEXT; then
27       true
28     else
29       echo "rm -f multilib.out" > skip-this-dir
30     fi
31   fi
34 if [ "${srcdir}" = "." ] ; then
35   if [ "${with_target_subdir}" != "." ] ; then
36     topsrcdir=${with_multisrctop}../..
37   else
38     topsrcdir=${with_multisrctop}..
39   fi
40 else
41   topsrcdir=${srcdir}/..
44 if [ -d ${topsrcdir}/gcc ] ; then
45   configdirs="tests testsuite"
46 else
47   configdirs="tests"
49 srctrigger=sinst.cc
50 srcname="ANSI C++ library"
51 package_makefile_frag=Make.pack
52 package_makefile_rules_frag=Make.pack.r
54 # per-host:
56 # per-target:
58 echo "# Warning: this fragment is automatically generated" > temp.mt
59 frags=
61 # If they didn't specify --enable-shared, don't generate shared libs.
62 case "${enable_shared}" in
63   yes) shared=yes ;;
64   no) shared=no ;;
65   *libstdc++*) shared=yes ;;
66   *) shared=no ;;
67 esac
69 if [ "${shared}" = "yes" ]; then
70   case "${target}" in
71     alpha*-*-linux*)    frags=../../config/mh-elfalphapic ;;
72     arm*-*-*)           frags=../../config/mh-armpic ;;
73     hppa*-*-*)          frags=../../config/mh-papic ;;
74     i[3456]86-*-*)      frags=../../config/mh-x86pic ;;
75     powerpc*-*-aix*)    ;;
76     powerpc*-*-*)       frags=../../config/mh-ppcpic ;;
77     *-*-*)              frags=../../config/mh-${target_cpu}pic ;;
78   esac
79   case "${target}" in
80     *-dec-osf*)         frags="${frags} dec-osf.ml";;
81     *-*-hpux*)          frags="${frags} hpux.ml" ;;
82     *-*-irix[56]*)      frags="${frags} irix5.ml" ;;
83     *-*-linux*aout*)    ;;
84     *-*-freebsd2)       ;;
85     *-*-freebsd*)       frags="${frags} freebsd.ml" ;;
86     *-*-linux*)         frags="${frags} linux.ml" ;;
87     *-*-openbsd*)               frags="${frags} openbsd.ml" ;;
88     *-*-sysv[45]*|*-*-udk*)     frags="${frags} elf.ml" ;;
89     *-*-solaris*)       frags="${frags} sol2shm.ml" ;;
90     *-*-sunos4*)        frags="${frags} sunos4.ml" ;;
91     *-*-aix*)           frags="${frags} aix.ml" ;;
92     i[3456]86-*-interix*)       frags="${frags} x86-interix.ml" ;;
93   esac
96 # Make sure the right flags are defined for multi-threading.
97 case "${target}" in
98   alpha*-*-linux-gnulibc1)      frags="${frags} linux.mt" ;;
99   powerpc*-*-linux-gnulibc1)    frags="${frags} linux.mt" ;;
100   *-*-linux-gnu)                frags="${frags} linux.mt" ;;
101   *-*-openbsd*)         
102         case "x${enable_threads}" in
103                 xyes|xposix)    frags="${frags} openbsd.mt" ;;
104         esac;;
105   m68k-motorola-sysv)           frags="${frags} delta.mt" ;;
106   *-*-solaris*)
107     case "x${enable_threads}" in
108       xposix)                   frags="${frags} sol2pth.mt" ;;
109       xsolaris)                 frags="${frags} sol2solth.mt" ;;
110     esac ;;
111   *)
112     case "x${enable_threads}" in
113       xposix)                   frags="${frags} posix.mt" ;;
114     esac ;;
115 esac
117 for frag in ${frags}; do
118   case ${frag} in
119     ../* )
120       if [ ${srcdir} = . ]; then
121         [ -n "${with_target_subdir}" ] && frag=../${frag}
122         [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
123       fi
124       ;;
125   esac
126   frag=${srcdir}/config/$frag
127   if [ -f ${frag} ]; then
128     echo "Appending ${frag} to target-mkfrag"
129     echo "# Following fragment copied from ${frag}" >> temp.mt
130     cat ${frag} >> temp.mt
131   fi
132 done
134 target_makefile_frag=target-mkfrag
135 ${moveifchange} temp.mt target-mkfrag
137 LIBDIR=yes
138 TO_TOPDIR=../
139 ALL='libs'
140 XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
141 MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
142 CLEAN='$(CLEAN_JUNK)'
143 EXTRA_DISTCLEAN='target-mkfrag'
145 (. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
147 . ${topsrcdir}/config.if
148 echo "
149 LIBSTDCXX_INTERFACE=${libstdcxx_interface}
150 CXX_INTERFACE=${cxx_interface}
151 LIBC_INTERFACE=${libc_interface}
152 " >> ${package_makefile_frag}
154 # This duplicated the AC_PROG_LN_S macro in GNU autoconf.
155 rm -f conttestdata
156 if ln -s X conftestdata 2>/dev/null
157 then
158   rm -f conftestdata
159   LN_S="ln -s"
160 else
161   LN_S=ln
163 echo "
164 LN_S=$LN_S
165 " >> ${package_makefile_frag}
167 # post-target:
169 # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
170 # depending on --enable-version-specific-runtime-libs.
171 if [ -n "${with_cross_host}" ] ; then
172     rm -f Makefile.tem
173     sed \
174         -e 's|^\([      ]*INSTALLDIR[   ]*=[    ]*\)\$(libdir)|\1$(tooldir)/lib|' \
175         Makefile >Makefile.tem
176     mv -f Makefile.tem Makefile
179 # enable multilib-ing by default.
180 if [ -z "${enable_multilib}" ]; then
181     enable_multilib=yes
184 . ${topsrcdir}/config-ml.in
186 gxx_include_dir=
187 # Specify the g++ header file directory
188 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
189 if test "${with_gxx_include_dir+set}" = set; then
190   withval="$with_gxx_include_dir"
191   case "${withval}" in
192     yes)
193       echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
194       exit 1
195       ;;
196     no) ;;
197     *)  gxx_include_dir=$with_gxx_include_dir ;;
198   esac
201 if test x${gxx_include_dir} = x; then
202   if test x${enable_version_specific_runtime_libs} = xyes; then
203     gxx_include_dir='${libsubdir}/include/g++'
204   else
205     gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
206   fi
209 rm -f Makefile.tem
210 sed -e "s%^gxx_include_dir[     ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
211        Makefile >Makefile.tem
212 mv -f Makefile.tem Makefile