I'm trying to build cgminer on a RISC-V 64 system. I had compiled it fine on aarch64 (Raspberry pi).
After installing libusb-dev and libusb1.1-1.dev, and running ldconfig, I still get this error from the configure script:
checking whether NULL can be used in arbitrary expressions... yes^M
checking for egrep... (cached) /usr/bin/grep -E^M
checking for syslog.h... yes^M
checking for size_t... yes^M
checking for working alloca.h... yes^M
checking for alloca... yes^M
checking for pthread_create in -lpthread... yes^M
checking for library containing addstr... -lncurses^M
./configure: line 10668: syntax error near unexpected token `LIBUSB,'^M
./configure: line 10668: ` PKG_CHECK_MODULES(LIBUSB, libusb-1.0, AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb-1.0]), AC_MSG_ERROR([Could not find usb library - please install libusb-1.0]))'
At various points before this, autogen.sh urged me to re-run autoupdate, which I did. The autogen.sh script in general did not want to run to completion either.
Has anyone seen a syntax error in an automatically generated configure script before?