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.
11 . ${srcdir}/../bfd/configure.host
14 if [ -f ${srcdir}/../bfd/config/${my_host}.mh ] ; then
15 host_makefile_frag=../bfd/config/${my_host}.mh
20 # Canonicalize the secondary target names.
21 if [ -n "$enable_targets" ]; then
22 for targ in `echo $enable_targets | sed 's/,/ /g'`
24 result=`$configsub $targ 2>/dev/null`
25 if [ -n "$result" ]; then
26 canon_targets="$canon_targets $result"
28 # Allow targets that config.sub doesn't recognize, like "all".
29 canon_targets="$canon_targets $targ"
33 # If our target is rs6000 _and nothing else_ then we build only nm!
35 rs6000-*-lynx*) target_makefile_frag=config/rslynx ;;
46 for targ in $target $canon_targets
48 bfd_target=`${config_shell} $srcdir/../bfd/config.bfd $targ`
50 if [ "x$bfd_target" = "xall" ]; then
54 nlmconv_defs="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
59 nlmconv_defs="$nlmconv_defs -DNLMCONV_I386"
63 nlmconv_defs="$nlmconv_defs -DNLMCONV_ALPHA"
67 nlmconv_defs="$nlmconv_defs -DNLMCONV_POWERPC"
71 nlmconv_defs="$nlmconv_defs -DNLMCONV_SPARC"
75 *-*-hms*) build_srconv=true ;;
80 dlltool_defs="$dlltool_defs -DDLLTOOL_ARM"
82 i[3-6]86-*pe* | i[3-6]86-*-win32)
84 dlltool_defs="$dlltool_defs -DDLLTOOL_I386"
90 # We don't do any links based on the target system, just makefile config.
94 rm -f Makefile.tmp Makefile.2
95 mv Makefile Makefile.tmp
97 if [ "x${build_nlmconv}" = "xtrue" ]; then
98 echo 'BUILD_NLMCONV = $(NLMCONV_PROG)' >> Makefile.2
99 echo "NLMCONV_DEFS = ${nlmconv_defs}" >> Makefile.2
102 if [ "x${build_srconv}" = "xtrue" ]; then
103 echo 'BUILD_SRCONV = $(SRCONV_PROG)' >> Makefile.2
106 if [ "x${build_dlltool}" = "xtrue" ]; then
107 echo 'BUILD_DLLTOOL = $(DLLTOOL_PROG)' >> Makefile.2
108 echo "DLLTOOL_DEFS = ${dlltool_defs}" >> Makefile.2
111 if [ "x`${config_shell} $srcdir/../bfd/config.bfd $target _`" = "xyes" ]; then
116 echo "UNDERSCORE = ${underscore}" >> Makefile.2
118 cat Makefile.tmp >> Makefile.2
120 mv Makefile.2 Makefile