* config.bfd: Rewrite to incorporate the contents of the Makefile
[deliverable/binutils-gdb.git] / binutils / configure.in
CommitLineData
db19f828
RP
1# This file is a shell script that supplies the information necessary
2# to tailor a template configure script into the configure script
3# appropriate for this directory. For more information, check any
4# existing configure script.
5
6srctrigger=ar.c
a8cd562d 7srcname="Binutils"
db19f828 8
0019b190 9# per-host:
db19f828 10
b5775df3
DHW
11. ${srcdir}/../bfd/configure.host
12
a8cd562d
SEF
13host_makefile_frag=
14if [ -f ${srcdir}/../bfd/config/${my_host}.mh ] ; then
15 host_makefile_frag=../bfd/config/${my_host}.mh
16fi
db19f828 17
a8cd562d 18# per-target:
b5775df3
DHW
19
20# Canonicalize the secondary target names.
99ac7754
JM
21if [ -n "$enable_targets" ]; then
22 for targ in `echo $enable_targets | sed 's/,/ /g'`
b5775df3
DHW
23 do
24 result=`$configsub $targ 2>/dev/null`
25 if [ -n "$result" ]; then
26 canon_targets="$canon_targets $result"
27 else
28 # Allow targets that config.sub doesn't recognize, like "all".
29 canon_targets="$canon_targets $targ"
30 fi
31 done
32else
33# If our target is rs6000 _and nothing else_ then we build only nm!
34 case $target in
35 rs6000-*-lynx*) target_makefile_frag=config/rslynx ;;
36 esac
37fi
38
39all_targets=false
40build_nlmconv=false
99ac7754 41nlmconv_defs=
b5775df3 42build_srconv=false
99ac7754
JM
43build_dlltool=false
44dlltool_defs=
b5775df3
DHW
45
46for targ in $target $canon_targets
47do
99ac7754 48 bfd_target=`${config_shell} $srcdir/../bfd/config.bfd $targ`
b5775df3
DHW
49
50 if [ "x$bfd_target" = "xall" ]; then
51 all_targets=true
52 build_nlmconv=true
53 build_srconv=true
99ac7754 54 nlmconv_defs="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
b5775df3
DHW
55 else
56 case $targ in
99ac7754
JM
57 i[345]86*-*-netware*)
58 build_nlmconv=true
59 nlmconv_defs="$nlmconv_defs -DNLMCONV_I386"
60 ;;
61 alpha*-*-netware*)
62 build_nlmconv=true
63 nlmconv_defs="$nlmconv_defs -DNLMCONV_ALPHA"
64 ;;
65 powerpc*-*-netware*)
66 build_nlmconv=true
67 nlmconv_defs="$nlmconv_defs -DNLMCONV_POWERPC"
68 ;;
69 sparc*-*-netware*)
70 build_nlmconv=true
71 nlmconv_defs="$nlmconv_defs -DNLMCONV_SPARC"
72 ;;
b5775df3 73 esac
b5775df3
DHW
74 case $targ in
75 *-*-hms*) build_srconv=true ;;
76 esac
99ac7754
JM
77 case $targ in
78 arm-*pe*)
79 build_dlltool=true;
80 dlltool_defs="$dlltool_defs -DDLLTOOL_ARM"
81 ;;
82 i[3-6]86-*pe* | i[3-6]86-*-win32)
83 build_dlltool=true;
84 dlltool_defs="$dlltool_defs -DDLLTOOL_I386"
85 ;;
86 esac
b5775df3
DHW
87 fi
88done
89
90# We don't do any links based on the target system, just makefile config.
91
92# post-target:
93
94rm -f Makefile.tmp Makefile.2
95mv Makefile Makefile.tmp
96
97if [ "x${build_nlmconv}" = "xtrue" ]; then
98 echo 'BUILD_NLMCONV = $(NLMCONV_PROG)' >> Makefile.2
99ac7754 99 echo "NLMCONV_DEFS = ${nlmconv_defs}" >> Makefile.2
b5775df3
DHW
100fi
101
102if [ "x${build_srconv}" = "xtrue" ]; then
103 echo 'BUILD_SRCONV = $(SRCONV_PROG)' >> Makefile.2
104fi
105
99ac7754
JM
106if [ "x${build_dlltool}" = "xtrue" ]; then
107 echo 'BUILD_DLLTOOL = $(DLLTOOL_PROG)' >> Makefile.2
108 echo "DLLTOOL_DEFS = ${dlltool_defs}" >> Makefile.2
109fi
110
111if [ "x`${config_shell} $srcdir/../bfd/config.bfd $target _`" = "xyes" ]; then
6f88f031
ILT
112 underscore=1
113else
114 underscore=0
115fi
116echo "UNDERSCORE = ${underscore}" >> Makefile.2
117
b5775df3
DHW
118cat Makefile.tmp >> Makefile.2
119rm -f Makefile.tmp
120mv Makefile.2 Makefile
This page took 0.125205 seconds and 4 git commands to generate.