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