]> gcc.gnu.org Git - gcc.git/blame - libstdc++/configure.in
configure.in: Test for "ln -s" and set LN_S in generated Makefile.
[gcc.git] / libstdc++ / configure.in
CommitLineData
6599da04
JM
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.
71205e0b
MH
4
5# If the language specific compiler does not exist, but the "gcc" directory does,
6# we do not build anything. Note, $r is set by the top-level Makefile.
7compiler_name=cc1plus
8rm -f skip-this-dir
9if test -n "$r"; then
10 if test -d "$r"/gcc; then
11 if test -f "$r"/gcc/$compiler_name; then
12 true
13 else
14 echo "rm -f multilib.out" > skip-this-dir
15 fi
16 fi
17fi
6599da04 18
3fdcc721
L
19if [ "${srcdir}" = "." ] ; then
20 if [ "${with_target_subdir}" != "." ] ; then
21 topsrcdir=${with_multisrctop}../..
22 else
23 topsrcdir=${with_multisrctop}..
24 fi
25else
26 topsrcdir=${srcdir}/..
27fi
28
29if [ -d ${topsrcdir}/gcc ] ; then
2c443622
JL
30 configdirs="tests testsuite"
31else
32 configdirs="tests"
33fi
6599da04
JM
34srctrigger=sinst.cc
35srcname="ANSI C++ library"
36package_makefile_frag=Make.pack
ef14509b 37package_makefile_rules_frag=Make.pack.r
6599da04
JM
38
39# per-host:
40
41# per-target:
42
43echo "# Warning: this fragment is automatically generated" > temp.mt
44frags=
45
46# If they didn't specify --enable-shared, don't generate shared libs.
47case "${enable_shared}" in
48 yes) shared=yes ;;
49 no) shared=no ;;
50 *libstdc++*) shared=yes ;;
51 *) shared=no ;;
52esac
53
54if [ "${shared}" = "yes" ]; then
55 case "${target}" in
56 hppa*-*-*) frags=../../config/mh-papic ;;
57 i[3456]86-*-*) frags=../../config/mh-x86pic ;;
58 *-*-*) frags=../../config/mh-${target_cpu}pic ;;
59 esac
60 case "${target}" in
61 *-dec-osf*) frags="${frags} dec-osf.ml";;
62 *-*-hpux*) frags="${frags} hpux.ml" ;;
63 *-*-irix[56]*) frags="${frags} irix5.ml" ;;
64 *-*-linux*aout*) ;;
65 *-*-linux*) frags="${frags} linux.ml" ;;
b07fe368 66 *-*-sysv[45]*|*-*-udk*) frags="${frags} elf.ml" ;;
6599da04
JM
67 *-*-solaris*) frags="${frags} sol2shm.ml" ;;
68 *-*-sunos4*) frags="${frags} sunos4.ml" ;;
69 *-*-aix*) frags="${frags} aix.ml" ;;
70 esac
71fi
72
e693cc28
UD
73# Make sure the right flags are defined for multi-threading.
74case "${target}" in
93ad003a
FS
75 alpha*-*-linux-gnulibc1) frags="${frags} linux.mt" ;;
76 powerpc*-*-linux-gnulibc1) frags="${frags} linux.mt" ;;
77 *-*-linux-gnu) frags="${frags} linux.mt" ;;
78 m68k-motorola-sysv) frags="${frags} delta.mt" ;;
e693cc28
UD
79esac
80
6599da04 81for frag in ${frags}; do
c940e627
MH
82 case ${frag} in
83 ../* )
84 if [ ${srcdir} = . ]; then
85 [ -n "${with_target_subdir}" ] && frag=../${frag}
86 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
87 fi
88 ;;
89 esac
6599da04
JM
90 frag=${srcdir}/config/$frag
91 if [ -f ${frag} ]; then
92 echo "Appending ${frag} to target-mkfrag"
93 echo "# Following fragment copied from ${frag}" >> temp.mt
94 cat ${frag} >> temp.mt
95 fi
96done
97
98target_makefile_frag=target-mkfrag
99${moveifchange} temp.mt target-mkfrag
100
101LIBDIR=yes
102TO_TOPDIR=../
103ALL='libs'
104XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
105MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
106CLEAN='$(CLEAN_JUNK)'
107EXTRA_DISTCLEAN='target-mkfrag'
108
ef14509b 109(. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
6599da04 110
1b371329
L
111. ${topsrcdir}/config.if
112echo "
113LIBSTDCXX_INTERFACE=${libstdcxx_interface}
114CXX_INTERFACE=${cxx_interface}
115LIBC_INTERFACE=${libc_interface}
116" >> ${package_makefile_frag}
117
39268973
UD
118# This duplicated the AC_PROG_LN_S macro in GNU autoconf.
119rm -f conttestdata
120if ln -s X conftestdata 2>/dev/null
121then
122 rm -f conftestdata
123 LN_S="ln -s"
124else
125 LN_S=ln
126fi
127echo "
128LN_S=$LN_S
129" >> ${package_makefile_frag}
130
6599da04
JM
131# post-target:
132
f012a9fd
MH
133# If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
134# depending on --enable-version-specific-runtime-libs.
6599da04
JM
135if [ -n "${with_cross_host}" ] ; then
136 rm -f Makefile.tem
137 sed \
f012a9fd 138 -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
6599da04
JM
139 Makefile >Makefile.tem
140 mv -f Makefile.tem Makefile
141fi
142
3fdcc721 143. ${topsrcdir}/config-ml.in
This page took 0.105663 seconds and 5 git commands to generate.