]> gcc.gnu.org Git - gcc.git/blame - xiberty/configure.in
osf2or3.h (LIB_SPEC): Restore missing defn.
[gcc.git] / xiberty / 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
5# We need multilib support.
6. ${srcdir}/../cfg-ml-com.in
7
8configdirs=
9srctrigger=../libiberty/getopt1.c
10srcname="cross -liberty library"
11Makefile_in=../libiberty/Makefile.in
12
13case "$srcdir" in
14 ".") ;;
15 *) srcdir=${srcdir}/../libiberty ;;
16esac
17
18# per-host:
19
20# per-target:
21
22files="../libiberty/alloca-norm.h"
23links="alloca-conf.h"
24
25xhost=${target}
26xsrcdir=../libiberty/
27. ${srcdir}/../libiberty/config.table
28target_makefile_frag=${frag}
29
30case "$srcdir" in
31 ".")
32 # Make sure we also make links to all the source files
33 source_files=`echo ../libiberty/*.[ch] ../libiberty/functions.def`
34 files="${files} ${source_files}"
35 source_links=`echo "$source_files" | sed -e 's|../libiberty/||g'`
36 links="${links} ${source_links}"
37 ;;
38 *)
39 ;;
40esac
41
42# post-target:
43
44# if we are candian crossing the we need to pick up host copies of
45# the tools, otherwise we can look in the current tree
46# but we shouldn't build xiberty if we're not canadian crossing.
47if [ "${host}" != "${target}" ] ; then
48 echo "CC = ${target_alias}-gcc" > Makefile.tem
49 echo "AR = ${target_alias}-ar " >> Makefile.tem
50 echo "RANLIB = ${target_alias}-ranlib " >> Makefile.tem
51else
52 echo > Makefile.tem
53fi
54
55echo "INSTALL_DEST = tooldir" >> Makefile.tem
56
57# If we are cross-compiling, check at compile time whether we are
58# using newlib. If we are, we already know the files we need, since
59# the linker will fail when run on some of the newlib targets.
60if [ "${host}" != "${target}" ] ; then
61 cat > Makefile.tem2 <<'!EOF!'
62CONFIG_H = xconfig.h
63NEEDED_LIST = xneeded-list
64
65xconfig.h: Makefile
66 if [ -f ../newlib/Makefile ]; then \
67 echo "#define NEED_sys_nerr 1" >xconfig.h; \
68 echo "#define NEED_sys_errlist 1" >>xconfig.h; \
69 echo "#define NEED_sys_siglist 1" >>xconfig.h; \
70 echo "#define NEED_psignal 1" >>xconfig.h; \
71 else \
72 $(MAKE) $(FLAGS_TO_PASS) lconfig.h; \
73 cp lconfig.h xconfig.h; \
74 fi
75
76xneeded-list: Makefile
77 if [ -f ../newlib/Makefile ]; then \
78 echo insque.o random.o strdup.o alloca.o >xneeded-list; \
79 else \
80 $(MAKE) $(FLAGS_TO_PASS) lneeded-list; \
81 cp lneeded-list xneeded-list; \
82 fi
83!EOF!
84fi
85sed -e "/^####/ r Makefile.tem" -e "/^####/ r Makefile.tem2" ${Makefile} > Makefile.tem3
86mv Makefile.tem3 ${Makefile}
87rm -f Makefile.tem Makefile.tem2
88
89if [ "${srcdir}" = "." ] ; then
90 echo "EXTRA_LINKS = ${source_links}" >>Makefile
91fi
92mv Makefile Makefile.tmp
93# Patch 'install' and 'Makefile' rules in Makefile
94# (The latter is only needed when "$srcdir" = ".".)
95sed <Makefile.tmp -e '/INSTALL_DEST =/s/libdir/tooldir/' \
96 -e '/Makefile/s|(srcdir)/Makefile.in|(srcdir)/../libiberty/Makefile.in|' \
97 >Makefile
98rm -f Makefile.tmp
99
100# We need multilib support.
101. ${srcdir}/../cfg-ml-pos.in
This page took 0.050546 seconds and 5 git commands to generate.