]>
Commit | Line | Data |
---|---|---|
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 |
5 | if [ "${srcdir}" = "." ] ; then |
6 | if [ "${with_target_subdir}" != "." ] ; then | |
7 | topsrcdir=${with_multisrctop}../.. | |
8 | else | |
9 | topsrcdir=${with_multisrctop}.. | |
10 | fi | |
11 | else | |
12 | topsrcdir=${srcdir}/.. | |
13 | fi | |
14 | ||
15 | if [ -d ${topsrcdir}/gcc ] ; then | |
af2de9e6 L |
16 | configdirs="tests dbz stdio testsuite" |
17 | else | |
18 | configdirs="tests dbz stdio" | |
19 | fi | |
6599da04 JM |
20 | srctrigger=libioP.h |
21 | srcname="input/output library" | |
22 | package_makefile_frag=Make.pack | |
c3880e45 | 23 | package_makefile_rules_frag=Make.pack.r |
6599da04 JM |
24 | |
25 | # per-host: | |
26 | ||
27 | # per-target: | |
28 | ||
29 | echo "# Warning: this fragment is automatically generated" > temp.mt | |
30 | frags= | |
31 | ||
32 | case "${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 ;; | |
45 | esac | |
46 | ||
47 | case "${enable_shared}" in | |
48 | yes) shared=yes ;; | |
49 | no) shared=no ;; | |
50 | *libio*) shared=yes ;; | |
51 | *) shared=no ;; | |
52 | esac | |
53 | ||
54 | if [ "${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 | |
62 | fi | |
63 | ||
20a2fbe2 | 64 | # Take care of header file lossage. |
e693cc28 | 65 | case "${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 |
93 | esac |
94 | ||
6599da04 JM |
95 | for 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 | |
102 | done | |
103 | ||
104 | target_makefile_frag=target-mkfrag | |
105 | ${moveifchange} temp.mt target-mkfrag | |
106 | ||
107 | LIBDIR=yes | |
108 | TO_TOPDIR=../ | |
dbfcb4be | 109 | ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list' |
6599da04 JM |
110 | XCINCLUDES='-I. -I$(srcdir)' |
111 | XCXXINCLUDES='-I. -I$(srcdir)' | |
112 | MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list' | |
113 | DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out' | |
114 | CLEAN='_G_config.h *.a' | |
115 | INFO_FILES=iostream | |
4b52c114 | 116 | if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then |
6599da04 JM |
117 | CHECK_SUBDIRS=testsuite |
118 | fi | |
c3880e45 | 119 | (. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag} |
6599da04 JM |
120 | |
121 | # post-target: | |
122 | ||
123 | # If cross-compiling, don't build gperf or the utils. They | |
124 | # will get built by the target compiler, which is confusing. | |
125 | # We cannot test the installation. We install in $(tooldir). | |
126 | if [ -n "${with_cross_host}" ] ; then | |
127 | rm -f Makefile.tem | |
128 | sed \ | |
129 | -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \ | |
130 | Makefile >Makefile.tem | |
131 | mv -f Makefile.tem Makefile | |
132 | fi | |
133 | ||
4b52c114 | 134 | . ${topsrcdir}/config-ml.in |