X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=configure.in;h=bc47064f8f7cfa2754eeaf60651b29077bf5daa6;hp=cce438fe076e67044a163451b3f9d87629e430e4;hb=2e832a399a10fc00253b342f8cde9c5b1062fa63;hpb=cebfbfa661b4e53cabf23bbb32c227e0b1962c77 diff --git a/configure.in b/configure.in index cce438fe07..bc47064f8f 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)