diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/configure.in b/configure.in index cce438fe..bc47064f 100644 --- a/configure.in +++ b/configure.in @@ -290,13 +290,20 @@ AM_CONDITIONAL(BITQ, test $build_bitq = yes) AC_LANG_C AC_PROG_CC AC_PROG_RANLIB -AC_PATH_PROG(TCLSH, tclsh) -# quit if we have no tclsh -if test "x${TCLSH}" = "x"; then - AC_MSG_ERROR([no working tclsh found]) +AC_CHECK_PROG(OBJDUMP, objdump, objdump) +AC_CHECK_PROG(OBJCOPY, objcopy, objcopy) + +if test x${OBJDUMP} != x -a x${OBJCOPY} != x ; then + AC_MSG_CHECKING(objcopy command line) + AC_TRY_COMPILE(,,[OBJCOPY_format=`${OBJDUMP} -f conftest.$ac_objext | sed -e '/file format/!d' -e 's/.*format \(.*\)/\1/'` + OBJCOPY_arch=`${OBJDUMP} -f conftest.$ac_objext | sed -e '/architecture/!d' -e 's/.*architecture: \(.*\),.*/\1/'`]) + AC_MSG_RESULT(-I binary -O ${OBJCOPY_format} -B ${OBJCOPY_arch}) fi +AC_SUBST(OBJCOPY_FORMAT, ${OBJCOPY_format}) +AC_SUBST(OBJCOPY_ARCH, ${OBJCOPY_arch}) + AC_SUBST(WITH_FTD2XX, $with_ftd2xx) AC_OUTPUT(Makefile src/Makefile src/helper/Makefile src/jtag/Makefile src/xsvf/Makefile src/target/Makefile src/server/Makefile src/flash/Makefile src/pld/Makefile doc/Makefile) |