diff --git a/jtag/ChangeLog b/jtag/ChangeLog index c8d65bfd..41f120fa 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,10 +1,16 @@ +2008-02-24 Mike Frysinger + + * configure.ac: Fix building out of tree (1899908), only use libusb flags + as needed (1899930), provide flag about wchar.h presence (1899922) + * src/cmd/print.c: Fix dependency on wchar.h (1899922) + 2008-02-23 Arnim Laeuger * extra/fjmem/README: new file * doc/UrJTAG.txt: mention fjmem driver, document bus driver internals * src/svf/Makefile.am (svf_flex.o svf.o): fix dependencies to svf_bison.h * src/bsdl/Makefile.am (bsdl_flex.o bsdl_sem.o): fix dependencies to bsdl_bison.h - -> resolves [ 1899911 ] + -> resolves [ 1899911 ] * src/tap/cable/ft2232.c (send_and_receive): only flush if not TO_OUTPUT * src/tap/chain.c (chain_shift_data_registers_mode): flush TO_OUTPUT instead of CONSERVATIVELY diff --git a/jtag/THANKS b/jtag/THANKS index e6640b99..5efb05b4 100644 --- a/jtag/THANKS +++ b/jtag/THANKS @@ -19,6 +19,7 @@ Andrew Dyer Chris Ellec Ralf Engels Thomas Fröhlich +Mike Frysinger Robin Getz Christophe Grenier Jiun-Shian Ho diff --git a/jtag/configure.ac b/jtag/configure.ac index 84a1025b..e4dffa20 100644 --- a/jtag/configure.ac +++ b/jtag/configure.ac @@ -35,12 +35,12 @@ AC_MSG_CHECKING([code revision]) SVN=`which svn` SVN_REVISION=0 if test -n "$SVN" -a -x "$SVN"; then - SVN_REVISION=`LC_ALL=C svn info -R | awk 'BEGIN { x=0 } /^Revision: / { if($2>x) x=$2; } END { printf "%d\n",x }'` + SVN_REVISION=`LC_ALL=C svn info -R "$srcdir" | awk 'BEGIN { x=0 } /^Revision: / { if($2>x) x=$2; } END { printf "%d\n",x }'` if test "$SVN_REVISION" -ne "0" ; then AC_MSG_RESULT([from svn info: $SVN_REVISION]) fi fi -if test "$SVN_REVISION" -eq 0 -a -e "ChangeLog"; then +if test "$SVN_REVISION" -eq 0 -a -e "$srcdir/ChangeLog"; then SVN_REVISION=`awk 'BEGIN { x=0 } /Revision: / { if($2>x) x=$2; } END { printf "%d\n",x }' ChangeLog` if test "$SVN_REVISION" -ne "0" ; then AC_MSG_RESULT([from ChangeLog: $SVN_REVISION]) @@ -107,6 +107,7 @@ AC_CHECK_FUNC(clock_gettime, [], [ AC_CHECK_LIB(rt, clock_gettime) ]) AC_CHECK_HEADERS(linux/ppdev.h) AC_CHECK_HEADERS(dev/ppbus/ppi.h) AC_CHECK_HEADERS(stropts.h) +AC_CHECK_HEADERS(wchar.h) VL_LIB_READLINE @@ -162,15 +163,21 @@ AS_IF([test "x$with_libusb" != xno], [ ],[ AC_PATH_PROG(LIBUSB_CONFIG, libusb-config, no) AS_IF([test "$LIBUSB_CONFIG" != "no"],[ - LIBS="$LIBS `$LIBUSB_CONFIG --libs`" - CFLAGS="$CFLAGS `$LIBUSB_CONFIG --cflags`" + USBLIBS=`$LIBUSB_CONFIG --libs` + USBCFLAGS=`$LIBUSB_CONFIG --cflags` ],) ]) + save_LIBS=$LIBS + save_CFLAGS=$CFLAGS + LIBS="$LIBS $USBLIBS" + CFLAGS="$CFLAGS $USBCFLAGS" AC_CHECK_FUNC([usb_find_devices], [ AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb]) HAVELIBUSB=yes ],[ AC_MSG_WARN([*** libusb not detected. No support for USB JTAG cables via libusb.]) + LIBS=$save_LIBS + CFLAGS=$save_CFLAGS ]) ],) diff --git a/jtag/src/cmd/print.c b/jtag/src/cmd/print.c index 5ca2330e..58d55004 100644 --- a/jtag/src/cmd/print.c +++ b/jtag/src/cmd/print.c @@ -22,12 +22,21 @@ * */ +#include + #include "sysdep.h" #include #include #include + +#ifdef HAVE_WCHAR_H #include +#else +typedef char wchar_t; +# define mbstowcs(dst,src,n) 0 +# define wcslen(str) strlen(str) +#endif #include "part.h" #include "jtag.h"