* configure.in: Don't bother to call config.bfd for each target.
[deliverable/binutils-gdb.git] / binutils / configure.in
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
6 srctrigger=ar.c
7 srcname="Binutils"
8
9 # per-host:
10
11 . ${srcdir}/../bfd/configure.host
12
13 host_makefile_frag=
14 if [ -f ${srcdir}/../bfd/config/${my_host}.mh ] ; then
15 host_makefile_frag=../bfd/config/${my_host}.mh
16 fi
17
18 # per-target:
19
20 # Canonicalize the secondary target names.
21 if [ -n "$enable_targets" ]; then
22 for targ in `echo $enable_targets | sed 's/,/ /g'`
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
32 else
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
37 fi
38
39 all_targets=false
40 build_nlmconv=false
41 nlmconv_defs=
42 build_srconv=false
43 build_dlltool=false
44 dlltool_defs=
45
46 for targ in $target $canon_targets
47 do
48 if [ "x$targ" = "xall" ]; then
49 all_targets=true
50 build_nlmconv=true
51 build_srconv=true
52 nlmconv_defs="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
53 else
54 case $targ in
55 i[345]86*-*-netware*)
56 build_nlmconv=true
57 nlmconv_defs="$nlmconv_defs -DNLMCONV_I386"
58 ;;
59 alpha*-*-netware*)
60 build_nlmconv=true
61 nlmconv_defs="$nlmconv_defs -DNLMCONV_ALPHA"
62 ;;
63 powerpc*-*-netware*)
64 build_nlmconv=true
65 nlmconv_defs="$nlmconv_defs -DNLMCONV_POWERPC"
66 ;;
67 sparc*-*-netware*)
68 build_nlmconv=true
69 nlmconv_defs="$nlmconv_defs -DNLMCONV_SPARC"
70 ;;
71 esac
72 case $targ in
73 *-*-hms*) build_srconv=true ;;
74 esac
75 case $targ in
76 arm-*pe*)
77 build_dlltool=true;
78 dlltool_defs="$dlltool_defs -DDLLTOOL_ARM"
79 ;;
80 i[3-6]86-*pe* | i[3-6]86-*-win32)
81 build_dlltool=true;
82 dlltool_defs="$dlltool_defs -DDLLTOOL_I386"
83 ;;
84 esac
85 fi
86 done
87
88 # We don't do any links based on the target system, just makefile config.
89
90 # post-target:
91
92 rm -f Makefile.tmp Makefile.2
93 mv Makefile Makefile.tmp
94
95 if [ "x${build_nlmconv}" = "xtrue" ]; then
96 echo 'BUILD_NLMCONV = $(NLMCONV_PROG)' >> Makefile.2
97 echo "NLMCONV_DEFS = ${nlmconv_defs}" >> Makefile.2
98 fi
99
100 if [ "x${build_srconv}" = "xtrue" ]; then
101 echo 'BUILD_SRCONV = $(SRCONV_PROG)' >> Makefile.2
102 fi
103
104 if [ "x${build_dlltool}" = "xtrue" ]; then
105 echo 'BUILD_DLLTOOL = $(DLLTOOL_PROG)' >> Makefile.2
106 echo "DLLTOOL_DEFS = ${dlltool_defs}" >> Makefile.2
107 fi
108
109 targ=$target
110 . $srcdir/../bfd/config.bfd
111 if test "x$targ_underscore" = "xyes"; then
112 underscore=1
113 else
114 underscore=0
115 fi
116 echo "UNDERSCORE = ${underscore}" >> Makefile.2
117
118 cat Makefile.tmp >> Makefile.2
119 rm -f Makefile.tmp
120 mv Makefile.2 Makefile
This page took 0.04159 seconds and 5 git commands to generate.