1 dnl Process this file with autoconf to produce a configure script
7 [ --enable-targets alternative target configurations],
8 [case "${enableval}" in
9 yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
11 no) enable_targets= ;;
12 *) enable_targets=$enableval ;;
15 [ --enable-shared build shared BFD library],
16 [case "${enableval}" in
19 *) AC_MSG_ERROR([bad value ${enableval} for BFD shared option]) ;;
22 AC_CONFIG_HEADER(config.h:config.in)
24 AC_CONFIG_AUX_DIR(`cd $srcdir/..; pwd`)
26 if test -z "$target" ; then
27 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
29 if test -z "$host" ; then
30 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
34 # host-specific stuff:
38 . ${srcdir}/configure.host
42 AC_SUBST(RPATH_ENVVAR)
44 AC_SUBST(HOSTING_CRT0)
45 AC_SUBST(HOSTING_LIBS)
46 AC_SUBST(NATIVE_LIB_DIRS)
48 # For most hosts we can use a simple definition to pick up the BFD and
49 # opcodes libraries. However, if we are building shared libraries, we
50 # need to handle some hosts specially.
51 BFDLIB='-L../bfd -lbfd'
52 if test "${shared}" = "true"; then
55 # On SunOS, we must link against the name we are going to install,
56 # not -lbfd, since SunOS does not support SONAME.
57 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
63 AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
69 BFD_NEED_DECLARATION(free)
71 # target-specific stuff:
78 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
80 if test "$targ_alias" = "all"; then
83 # Canonicalize the secondary target names.
84 result=`$ac_config_sub $targ_alias 2>/dev/null`
85 if test -n "$result"; then
91 . ${srcdir}/configure.tgt
93 if test "$targ" = "$target"; then
97 for i in $targ_emul $targ_extra_emuls; do
98 case " $all_emuls " in
101 all_emuls="$all_emuls e${i}.o"
102 eval result=\$tdir_$i
103 test -z "$result" && result=$targ_alias
115 if test x${all_targets} = xtrue; then
116 EMULATION_OFILES='$(ALL_EMULATIONS)'
118 EMULATION_OFILES=$all_emuls
120 AC_SUBST(EMULATION_OFILES)
123 [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])