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
15 # Canonicalize the secondary target names.
16 if [ -n "$enable_targets" ]; then
17 for targ in `echo $enable_targets | sed 's/,/ /g'`
19 result=`$configsub $targ 2>/dev/null`
20 if [ -n "$result" ]; then
21 canon_targets="$canon_targets $result"
23 # Allow targets that config.sub doesn't recognize, like "all".
24 canon_targets="$canon_targets $targ"
28 # If our target is rs6000 _and nothing else_ then we build only nm!
30 rs6000-*-lynx*) target_makefile_frag=config/rslynx ;;
41 for targ in $target $canon_targets
43 if [ "x$targ" = "xall" ]; then
47 nlmconv_defs="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
52 nlmconv_defs="$nlmconv_defs -DNLMCONV_I386"
56 nlmconv_defs="$nlmconv_defs -DNLMCONV_ALPHA"
60 nlmconv_defs="$nlmconv_defs -DNLMCONV_POWERPC"
64 nlmconv_defs="$nlmconv_defs -DNLMCONV_SPARC"
68 *-*-hms*) build_srconv=true ;;
73 dlltool_defs="$dlltool_defs -DDLLTOOL_ARM"
75 i[3-6]86-*pe* | i[3-6]86-*-win32)
77 dlltool_defs="$dlltool_defs -DDLLTOOL_I386"
83 # We don't do any links based on the target system, just makefile config.
87 rm -f Makefile.tmp Makefile.2
88 mv Makefile Makefile.tmp
90 if [ "x${build_nlmconv}" = "xtrue" ]; then
91 echo 'BUILD_NLMCONV = $(NLMCONV_PROG)' >> Makefile.2
92 echo "NLMCONV_DEFS = ${nlmconv_defs}" >> Makefile.2
95 if [ "x${build_srconv}" = "xtrue" ]; then
96 echo 'BUILD_SRCONV = $(SRCONV_PROG)' >> Makefile.2
99 if [ "x${build_dlltool}" = "xtrue" ]; then
100 echo 'BUILD_DLLTOOL = $(DLLTOOL_PROG)' >> Makefile.2
101 echo "DLLTOOL_DEFS = ${dlltool_defs}" >> Makefile.2
105 . $srcdir/../bfd/config.bfd
106 if test "x$targ_underscore" = "xyes"; then
111 echo "UNDERSCORE = ${underscore}" >> Makefile.2
113 test -z "$CC" && CC=`egrep '^CC *=' ../Makefile | tail -1 | sed 's/^CC *= *//'`
114 test -z "$CC" && CC=cc
115 test -z "$CFLAGS" && CFLAGS=-g
116 sed -e "s%@CC@%${CC}%" \
117 -e "s%@CFLAGS@%${CFLAGS}%" \
118 -e "s%@HDEFINES@%${HDEFINES}%" \
119 -e "s%@LDFLAGS@%${LDFLAGS}%" < Makefile.tmp >> Makefile.2
122 mv Makefile.2 Makefile