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:
36 . ${srcdir}/configure.host
42 AC_SUBST(HOSTING_CRT0)
43 AC_SUBST(HOSTING_LIBS)
44 AC_SUBST(NATIVE_LIB_DIRS)
46 # For most hosts we can use a simple definition to pick up the BFD and
47 # opcodes libraries. However, if we are building shared libraries, we
48 # need to handle some hosts specially.
49 BFDLIB='-L../bfd -lbfd'
50 if test "${shared}" = "true"; then
53 # On SunOS, we must link against the name we are going to install,
54 # not -lbfd, since SunOS does not support SONAME.
55 BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`'
61 AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
67 BFD_NEED_DECLARATION(free)
69 # target-specific stuff:
71 # Canonicalize the secondary target names.
72 if test -n "$enable_targets"; then
73 for targ in `echo $enable_targets | sed 's/,/ /g'`
75 result=`$ac_config_sub $targ 2>/dev/null`
76 if test -n "$result"; then
77 canon_targets="$canon_targets $result"
79 # Allow targets that config.sub doesn't recognize, like "all".
80 canon_targets="$canon_targets $targ"
89 for targ in $target $canon_targets
91 if test "x$targ" = "xall"; then
94 . ${srcdir}/configure.tgt
96 if test "x$targ" = "x$target"; then
100 all_emuls="${all_emuls} ${targ_emul} ${targ_extra_emuls}"
106 if test x${all_targets} = xfalse; then
109 for i in $all_emuls ; do
116 EMULATION_OFILES="$f"
118 else # all_targets is true
119 EMULATION_OFILES='$(ALL_EMULATIONS)'
120 fi # all_targets is true
122 AC_SUBST(EMULATION_OFILES)
125 [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])