summaryrefslogtreecommitdiffstats
path: root/libstdc++/configure.in
blob: 58b468e8ec8dff52b14cf5a7a7516eb15dd260c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# This file is a shell script fragment that supplies the information
# necessary for a configure script to process the program in
# this directory.  For more information, look at ../configure.

if [ -d ${srcdir}/../gcc ] ; then
  configdirs="tests testsuite"
else
  configdirs="tests"
fi
srctrigger=sinst.cc
srcname="ANSI C++ library"
package_makefile_frag=Make.pack

# per-host:

# per-target:

echo "# Warning: this fragment is automatically generated" > temp.mt
frags=

# If they didn't specify --enable-shared, don't generate shared libs.
case "${enable_shared}" in
  yes) shared=yes ;;
  no) shared=no ;;
  *libstdc++*) shared=yes ;;
  *) shared=no ;;
esac

if [ "${shared}" = "yes" ]; then
  case "${target}" in
    hppa*-*-*)		frags=../../config/mh-papic ;;
    i[3456]86-*-*)	frags=../../config/mh-x86pic ;;
    *-*-*) 		frags=../../config/mh-${target_cpu}pic ;;
  esac
  case "${target}" in
    *-dec-osf*)		frags="${frags} dec-osf.ml";;
    *-*-hpux*)		frags="${frags} hpux.ml" ;;
    *-*-irix[56]*)	frags="${frags} irix5.ml" ;;
    *-*-linux*aout*)	;;
    *-*-linux*)		frags="${frags} linux.ml" ;;
    *-*-sysv4*)		frags="${frags} elf.ml" ;;
    *-*-solaris*)	frags="${frags} sol2shm.ml" ;;
    *-*-sunos4*)	frags="${frags} sunos4.ml" ;;
    *-*-aix*)		frags="${frags} aix.ml" ;;
  esac
fi

# Make sure the right flags are defined for multi-threading.
case "${target}" in
  alpha*-*-linux-gnulibc1)	frags="${frags} linux.mt" ;;
  powerpc*-*-linux-gnulibc1)	frags="${frags} linux.mt" ;;
  *-*-linux-gnu)		frags="${frags} linux.mt" ;;
  m68k-motorola-sysv)		frags="${frags} delta.mt" ;;
esac

for frag in ${frags}; do
  frag=${srcdir}/config/$frag
  if [ -f ${frag} ]; then
    echo "Appending ${frag} to target-mkfrag"
    echo "# Following fragment copied from ${frag}" >> temp.mt
    cat ${frag} >> temp.mt
  fi
done

target_makefile_frag=target-mkfrag
${moveifchange} temp.mt target-mkfrag

LIBDIR=yes
TO_TOPDIR=../
ALL='libs'
XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
CLEAN='$(CLEAN_JUNK)'
EXTRA_DISTCLEAN='target-mkfrag'

(. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag}

# post-target:

# If cross-compiling, we install in $(tooldir).
if [ -n "${with_cross_host}" ] ; then
    rm -f Makefile.tem
    sed \
        -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
        Makefile >Makefile.tem
    mv -f Makefile.tem Makefile
fi

if [ "${srcdir}" = "." ] ; then
  if [ "${with_target_subdir}" != "." ] ; then
    . ${with_multisrctop}../../config-ml.in
  else
    . ${with_multisrctop}../config-ml.in
  fi
else
  . ${srcdir}/../config-ml.in
fi
OpenPOWER on IntegriCloud