* rs6000.c (output_function_profiler): Put label address in r0, and
[official-gcc.git] / libio / configure.in
blob2fc3a962afaa14c07aa44b86fd0b1614db5183c4
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.
5 configdirs="tests dbz stdio testsuite"
6 srctrigger=libioP.h
7 srcname="input/output library"
8 package_makefile_frag=Make.pack
10 # per-host:
12 # per-target:
14 echo "# Warning: this fragment is automatically generated" > temp.mt
15 frags=
17 case "${target}" in
18   *-hpux*)       frags=hpux.mt ;;
19   *-linux-gnulibc1)
20                  frags=linuxlibc1.mt ;;
21   *-linux-gnu)   frags="linux.mt mtsafe.mt" ;;
22   *-sco3.2v[45]*)   frags=sco4.mt ;;
23   *-isc*)        frags=isc.mt ;;
24   *-netware*)    frags=netware.mt ;;
25   *)             frags=${target_cpu}.mt ;;
26 esac
28 case "${enable_shared}" in
29   yes) shared=yes ;;
30   no) shared=no ;;
31   *libio*) shared=yes ;;
32   *) shared=no ;;
33 esac
35 if [ "${shared}" = "yes" ]; then
36   case "${target}" in
37     hppa*-*)     frags="${frags} ../../config/mh-papic" ;;
38     i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
39     alpha-*-linux*)
40                  frags="${frags} ../../config/mh-elfalphapic" ;;
41     *)           frags="${frags} ../../config/mh-${target_cpu}pic" ;;
42   esac
45 # Make a link for the correct stdio-lock.h file.
46 case "${target}" in
47   *-linux-gnu)
48     # We have a correct file in glibc but the libioP.h file is written
49     # with glibc 2.1 in mind which has the internals headers in special
50     # directory while glibc 2.0 has them in /usr/include.  Create a wrapper
51     # if necessary.
52     (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
53       {
54         rm -fr bits
55         mkdir bits
56         echo "#include <libc-lock.h>" > bits/libc-lock.h
57         echo 'asm (".weak _pthread_cleanup_pop_restore");' >> bits/libc-lock.h
58         echo 'asm (".weak _pthread_cleanup_push_defer");' >> bits/libc-lock.h
60         echo "#include <stdio-lock.h>" > bits/stdio-lock.h
61       }
62     ;;
63   *)
64     rm -fr bits
65     mkdir bits
66     ln -s ${srcdir}/include/empty.h bits/stdio-lock.h
67     ;;
68 esac
70 for frag in ${frags}; do
71   frag=${srcdir}/config/$frag
72   if [ -f ${frag} ]; then
73     echo "Appending ${frag} to target-mkfrag"
74     echo "# Following fragment copied from ${frag}" >> temp.mt
75     cat ${frag} >> temp.mt
76   fi
77 done
79 target_makefile_frag=target-mkfrag
80 ${moveifchange} temp.mt target-mkfrag
82 LIBDIR=yes
83 TO_TOPDIR=../
84 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
85 XCINCLUDES='-I. -I$(srcdir)'
86 XCXXINCLUDES='-I. -I$(srcdir)'
87 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
88 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
89 CLEAN='_G_config.h *.a'
90 INFO_FILES=iostream
91 if [ -n "${with_cross_host}" ] ; then
92     CHECK_SUBDIRS=testsuite
94 (. ${srcdir}/config.shared) >${package_makefile_frag}
96 # post-target:
98 # If cross-compiling, don't build gperf or the utils.  They
99 # will get built by the target compiler, which is confusing.
100 # We cannot test the installation.  We install in $(tooldir).
101 if [ -n "${with_cross_host}" ] ; then
102     rm -f Makefile.tem
103     sed \
104         -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
105         Makefile >Makefile.tem
106     mv -f Makefile.tem Makefile
109 if [ "${srcdir}" = "." ] ; then
110   if [ "${with_target_subdir}" != "." ] ; then
111     . ${with_multisrctop}../../config-ml.in
112   else
113     . ${with_multisrctop}../config-ml.in
114   fi
115 else
116   . ${srcdir}/../config-ml.in