]> gcc.gnu.org Git - gcc.git/blame - libio/configure.in
config.table: Make locating frag files failsafe even for the special case if...
[gcc.git] / libio / 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.
4
4b52c114
L
5if [ "${srcdir}" = "." ] ; then
6 if [ "${with_target_subdir}" != "." ] ; then
7 topsrcdir=${with_multisrctop}../..
8 else
9 topsrcdir=${with_multisrctop}..
10 fi
11else
12 topsrcdir=${srcdir}/..
13fi
14
15if [ -d ${topsrcdir}/gcc ] ; then
af2de9e6
L
16 configdirs="tests dbz stdio testsuite"
17else
18 configdirs="tests dbz stdio"
19fi
6599da04
JM
20srctrigger=libioP.h
21srcname="input/output library"
22package_makefile_frag=Make.pack
c3880e45 23package_makefile_rules_frag=Make.pack.r
6599da04
JM
24
25# per-host:
26
27# per-target:
28
29echo "# Warning: this fragment is automatically generated" > temp.mt
30frags=
31
32case "${target}" in
33 *-hpux*) frags=hpux.mt ;;
20a2fbe2
RH
34 alpha*-*-linux-gnulibc1)
35 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
36 powerpc*-*-linux-gnulibc1)
37 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
e693cc28 38 *-linux-gnulibc1)
e693cc28 39 frags=linuxlibc1.mt ;;
d604f4c6 40 *-linux-gnu) frags="linux.mt mtsafe.mt" ;;
6599da04
JM
41 *-sco3.2v[45]*) frags=sco4.mt ;;
42 *-isc*) frags=isc.mt ;;
43 *-netware*) frags=netware.mt ;;
44 *) frags=${target_cpu}.mt ;;
45esac
46
47case "${enable_shared}" in
48 yes) shared=yes ;;
49 no) shared=no ;;
50 *libio*) shared=yes ;;
51 *) shared=no ;;
52esac
53
54if [ "${shared}" = "yes" ]; then
55 case "${target}" in
56 hppa*-*) frags="${frags} ../../config/mh-papic" ;;
57 i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
20a2fbe2 58 alpha*-*-linux*)
d604f4c6 59 frags="${frags} ../../config/mh-elfalphapic" ;;
6599da04
JM
60 *) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
61 esac
62fi
63
20a2fbe2 64# Take care of header file lossage.
e693cc28 65case "${target}" in
20a2fbe2
RH
66 alpha*-*-linux-gnulibc1)
67 # For some reason stdio-lock.h is not installed on Red Hat systems.
68 # Further, libc-lock.h needs to define the pthreads stuff weak, and
69 # fails to do this for other than _LIBC. Install our own versions
70 # of these files.
71 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
72 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
e693cc28 73 ;;
20a2fbe2
RH
74 powerpc*-*-linux-gnulibc1)
75 # For some reason stdio-lock.h is not installed on Red Hat systems.
76 # Further, libc-lock.h needs to define the pthreads stuff weak, and
77 # fails to do this for other than _LIBC. Install our own versions
78 # of these files.
79 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
80 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
e693cc28 81 ;;
f49b1654
L
82 *-linux-gnu)
83 # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
84 # Create a wrapper if necessary.
85 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
86 {
87 echo "#include_next <libc-lock.h>" > libc-lock.h
88 echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
89 echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
90
91 }
92 ;;
e693cc28
UD
93esac
94
6599da04
JM
95for frag in ${frags}; do
96 frag=${srcdir}/config/$frag
97 if [ -f ${frag} ]; then
98 echo "Appending ${frag} to target-mkfrag"
99 echo "# Following fragment copied from ${frag}" >> temp.mt
100 cat ${frag} >> temp.mt
101 fi
102done
103
104target_makefile_frag=target-mkfrag
105${moveifchange} temp.mt target-mkfrag
106
107LIBDIR=yes
108TO_TOPDIR=../
dbfcb4be 109ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
2b63596a
JL
110case "${target}" in
111 *-*-cygwin32*)
112 XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
113 XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
114 ;;
115 *)
116 XCINCLUDES='-I. -I$(srcdir)'
117 XCXXINCLUDES='-I. -I$(srcdir)'
118 ;;
119esac
6599da04
JM
120MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
121DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
122CLEAN='_G_config.h *.a'
123INFO_FILES=iostream
4b52c114 124if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then
6599da04
JM
125 CHECK_SUBDIRS=testsuite
126fi
c3880e45 127(. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
6599da04
JM
128
129# post-target:
130
131# If cross-compiling, don't build gperf or the utils. They
132# will get built by the target compiler, which is confusing.
133# We cannot test the installation. We install in $(tooldir).
134if [ -n "${with_cross_host}" ] ; then
135 rm -f Makefile.tem
136 sed \
137 -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
138 Makefile >Makefile.tem
139 mv -f Makefile.tem Makefile
140fi
141
4b52c114 142. ${topsrcdir}/config-ml.in
This page took 0.113497 seconds and 5 git commands to generate.