This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
io/usb/slave/current/host configury
- From: Bart Veer <bartv at ecoscentric dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: Mon, 23 Sep 2002 21:09:48 +0100 (BST)
- Subject: io/usb/slave/current/host configury
As per ecos-discuss postings.
Bart
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/slave/current/ChangeLog,v
retrieving revision 1.7
diff -u -u -r1.7 ChangeLog
--- ChangeLog 21 Sep 2002 22:06:43 -0000 1.7
+++ ChangeLog 23 Sep 2002 20:06:27 -0000
@@ -1,3 +1,8 @@
+2002-09-23 Bart Veer <bartv@ecoscentric.com>
+
+ * host/configure.in:
+ Only build if the required Linux kernel support is present.
+
2002-09-21 Bart Veer <bartv@ecoscentric.com>
* host/usbhost.c:
Index: configure.in
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/slave/current/host/configure.in,v
retrieving revision 1.2
diff -u -u -r1.2 configure.in
--- configure.in 11 Aug 2002 21:46:35 -0000 1.2
+++ configure.in 23 Sep 2002 20:07:41 -0000
@@ -71,9 +71,10 @@
*-*-linux-gnu* ) SUPPORTED="yes";;
* ) SUPPORTED="no"
esac
-AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
-if test "${SUPPORTED}" = "yes" ; then
+if test "${SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([USB testing is only supported on Linux hosts])
+else
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LN_S
@@ -81,6 +82,7 @@
AC_EXEEXT
ECOS_PROG_MSVC
ECOS_PROG_STANDARD_COMPILER_FLAGS
+ ECOS_PACKAGE_DIRS
ECOS_PATH_TCL
dnl Check that the version of tcl is sufficiently recent.
@@ -88,11 +90,23 @@
dnl string commands after 8.1
if test "${TK_MAJOR_VERSION}" = "8" ; then
if test ${TK_MINOR_VERSION} -lt 2 ; then
- AC_MSG_ERROR([The USB testing support requires at least version 8.2 of Tcl/Tk])
+ AC_MSG_WARN([Version 8.2 or greater of Tcl/Tk is required])
+ SUPPORTED="no"
fi
fi
- ECOS_PACKAGE_DIRS
+ if test "${SUPPORTED}" = "yes" ; then
+ AC_CHECK_HEADERS("linux/usb.h" "linux/usbdevice_fs.h",,SUPPORTED="no")
+ if test "${SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([Required Linux kernel functionality does not appear to be available])
+ fi
+ fi
+fi
+
+if test "${SUPPORTED}" = "no" ; then
+ AC_MSG_WARN([The USB testing support cannot be built on this platform.])
fi
+
+AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
dnl There is no real need for a config.h file at this time, since the code
dnl is specific to Linux. This may change in future.