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 AC_CONFIG_HEADER(config.h:config.in)
17 AC_CONFIG_AUX_DIR(`cd $srcdir/..; pwd`)
19 if test -z "$target" ; then
20 AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
22 if test -z "$host" ; then
23 AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
27 # host-specific stuff:
29 . ${srcdir}/configure.host
34 AC_SUBST(HOSTING_CRT0)
35 AC_SUBST(HOSTING_LIBS)
36 AC_SUBST(NATIVE_LIB_DIRS)
38 AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h)
43 # target-specific stuff:
45 # Canonicalize the secondary target names.
46 if test -n "$enable_targets"; then
47 for targ in `echo $enable_targets | sed 's/,/ /g'`
49 result=`$ac_config_sub $targ 2>/dev/null`
50 if test -n "$result"; then
51 canon_targets="$canon_targets $result"
53 # Allow targets that config.sub doesn't recognize, like "all".
54 canon_targets="$canon_targets $targ"
63 for targ in $target $canon_targets
65 if test "x$targ" = "xall"; then
68 . ${srcdir}/configure.tgt
70 if test "x$targ" = "x$target"; then
74 all_emuls="${all_emuls} ${targ_emul} ${targ_extra_emuls}"
80 if test x${all_targets} = xfalse; then
83 for i in $all_emuls ; do
92 else # all_targets is true
93 EMULATION_OFILES='$(ALL_EMULATIONS)'
94 fi # all_targets is true
96 AC_SUBST(EMULATION_OFILES)
99 [case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac])