dnl any existing configure script.
AC_PREREQ(2.5)
-dnl FIXME - think of a truly uniq file to this directory
-AC_INIT(d30v-elf)
+AC_INIT(common/bits-tst.c)
CC=${CC-cc}
AC_SUBST(CC)
# Directories to use in all configurations.
configdirs=""
-
# add test sub-directory for appropriate targets
-case "${target}" in
-# start-sanitize-d30v
- d30v-*-elf) configdirs="${configdirs} d30v-elf" ;;
-# end-sanitize-d30v
- *) ;;
+testdir=`echo ${target} | sed -e 's/-.*-/-/'`
+if test -r ${srcdir}/${testdir}/configure ; then
+ configdirs="${configdirs} $testdir"
+fi
+
+# add any extra subdirectories
+case $target in
+ *) ;;
+esac
+
+# Compute the target architecture.
+# FIXME: Will need to canonicalize some values.
+# FIXME: Should be in generally accessable place.
+case $target in
+ *) arch=${target_cpu} ;;
esac
+AC_SUBST(arch)
# configure the subdirectories too
AC_CONFIG_SUBDIRS($configdirs)