2003-10-10 Dave Brolley <brolley@redhat.com>
[platform/upstream/binutils.git] / sim / testsuite / configure.in
index ea0740b..0bebb7a 100644 (file)
@@ -5,8 +5,7 @@ dnl script appropriate for this directory.  For more information, check
 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)
@@ -16,14 +15,24 @@ AC_CANONICAL_SYSTEM
 # 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)