Mercurial > ecos
changeset 351:58836890b2a0
Only build this code if the Linux system provides the required support
| author | bartv |
|---|---|
| date | Mon, 23 Sep 2002 20:10:28 +0000 |
| parents | 60857f22ba51 |
| children | 1f5fe8f482d9 |
| files | packages/io/usb/slave/current/ChangeLog packages/io/usb/slave/current/host/configure packages/io/usb/slave/current/host/configure.in |
| diffstat | 3 files changed, 238 insertions(+), 84 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/usb/slave/current/ChangeLog +++ b/packages/io/usb/slave/current/ChangeLog @@ -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:
--- a/packages/io/usb/slave/current/host/configure +++ b/packages/io/usb/slave/current/host/configure @@ -853,20 +853,13 @@ case "${host}" in * ) SUPPORTED="no" esac - -if test "${SUPPORTED}" = "yes"; then - SUPPORTED_TRUE= - SUPPORTED_FALSE='#' -else - SUPPORTED_TRUE='#' - SUPPORTED_FALSE= -fi - -if test "${SUPPORTED}" = "yes" ; then +if test "${SUPPORTED}" = "no" ; then + echo "configure: warning: USB testing is only supported on Linux hosts" 1>&2 +else # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:870: checking for $ac_word" >&5 +echo "configure:863: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -896,7 +889,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:900: checking for $ac_word" >&5 +echo "configure:893: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -947,7 +940,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:951: checking for $ac_word" >&5 +echo "configure:944: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -979,7 +972,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -990,12 +983,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 994 "configure" +#line 987 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1021,12 +1014,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1025: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1018: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1030: checking whether we are using GNU C" >&5 +echo "configure:1023: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1035,7 +1028,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1054,7 +1047,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1058: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1051: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1090,7 +1083,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1094: checking for $ac_word" >&5 +echo "configure:1087: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1122,7 +1115,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1126: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:1119: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1133,12 +1126,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 1137 "configure" +#line 1130 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:1142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1164,12 +1157,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1168: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1161: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:1173: checking whether we are using GNU C++" >&5 +echo "configure:1166: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1178,7 +1171,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -1197,7 +1190,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:1201: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:1194: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1238,7 +1231,7 @@ for ac_declaration in \ 'void exit (int);' do cat > conftest.$ac_ext <<EOF -#line 1242 "configure" +#line 1235 "configure" #include "confdefs.h" #include <stdlib.h> $ac_declaration @@ -1246,7 +1239,7 @@ int main() { exit (42); ; return 0; } EOF -if { (eval echo configure:1250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -1256,14 +1249,14 @@ else fi rm -f conftest* cat > conftest.$ac_ext <<EOF -#line 1260 "configure" +#line 1253 "configure" #include "confdefs.h" $ac_declaration int main() { exit (42); ; return 0; } EOF -if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* break else @@ -1280,7 +1273,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1284: checking whether ln -s works" >&5 +echo "configure:1277: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1301,13 +1294,13 @@ else fi echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:1305: checking for object suffix" >&5 +echo "configure:1298: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:1311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -1325,12 +1318,12 @@ OBJEXT=$ac_cv_objext ac_objext=$ac_cv_objext echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:1329: checking for Cygwin environment" >&5 +echo "configure:1322: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1334 "configure" +#line 1327 "configure" #include "confdefs.h" int main() { @@ -1341,7 +1334,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:1345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -1358,19 +1351,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:1362: checking for mingw32 environment" >&5 +echo "configure:1355: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1367 "configure" +#line 1360 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -1389,7 +1382,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=y echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1393: checking for executable suffix" >&5 +echo "configure:1386: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1399,7 +1392,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1437,7 +1430,7 @@ ac_exeext=$EXEEXT echo $ac_n "checking "for Visual C++"""... $ac_c" 1>&6 -echo "configure:1441: checking "for Visual C++"" >&5 +echo "configure:1434: checking "for Visual C++"" >&5 MSVC="no"; if test "${CC}" = "cl" ; then MSVC="yes" @@ -1476,7 +1469,7 @@ fi echo $ac_n "checking "the default compiler flags"""... $ac_c" 1>&6 -echo "configure:1480: checking "the default compiler flags"" >&5 +echo "configure:1473: checking "the default compiler flags"" >&5 ecosflags_enable_debug="no" # Check whether --enable-debug or --disable-debug was given. @@ -1535,6 +1528,40 @@ fi echo "$ac_t""done" 1>&6 + + + package_dir=`cd ${srcdir} && /bin/pwd` + PACKAGE_VERSION=`dirname ${package_dir}` + PACKAGE_VERSION=`basename ${PACKAGE_VERSION}` + + package_dir=`dirname ${package_dir}` + package_dir=`dirname ${package_dir}` + + possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.." + possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.." + + repository_root="" + for i in ${possibles}; do + if test -d "$i/"acsupport""; then + repository_root=$i + break + fi + done + + if test "${repository_root}" = "" ; then + { echo "configure: error: Failed to identify this package's position within the eCos repository" 1>&2; exit 1; } + fi + ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd` + + PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"` + + PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}" + + + + + + @@ -1549,7 +1576,7 @@ fi echo $ac_n "checking for Tcl version""... $ac_c" 1>&6 -echo "configure:1553: checking for Tcl version" >&5 +echo "configure:1580: checking for Tcl version" >&5 # Check whether --with-tcl-version or --without-tcl-version was given. if test "${with_tcl_version+set}" = set; then withval="$with_tcl_version" @@ -1571,7 +1598,7 @@ fi echo "$ac_t""${ecos_tcl_version}" 1>&6 echo $ac_n "checking for Tcl installation""... $ac_c" 1>&6 -echo "configure:1575: checking for Tcl installation" >&5 +echo "configure:1602: checking for Tcl installation" >&5 # Check whether --with-tcl-header or --without-tcl-header was given. if test "${with_tcl_header+set}" = set; then @@ -1699,43 +1726,150 @@ fi if test "${TK_MAJOR_VERSION}" = "8" ; then if test ${TK_MINOR_VERSION} -lt 2 ; then - { echo "configure: error: The USB testing support requires at least version 8.2 of Tcl/Tk" 1>&2; exit 1; } + echo "configure: warning: Version 8.2 or greater of Tcl/Tk is required" 1>&2 + SUPPORTED="no" fi fi - - - package_dir=`cd ${srcdir} && /bin/pwd` - PACKAGE_VERSION=`dirname ${package_dir}` - PACKAGE_VERSION=`basename ${PACKAGE_VERSION}` - - package_dir=`dirname ${package_dir}` - package_dir=`dirname ${package_dir}` + if test "${SUPPORTED}" = "yes" ; then + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1736: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 1751 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 1768 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext <<EOF +#line 1785 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 - possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.." - possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.." - - repository_root="" - for i in ${possibles}; do - if test -d "$i/"acsupport""; then - repository_root=$i - break - fi - done +for ac_hdr in "linux/usb.h" "linux/usbdevice_fs.h" +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1819: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1824 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +SUPPORTED="no" +fi +done - if test "${repository_root}" = "" ; then - { echo "configure: error: Failed to identify this package's position within the eCos repository" 1>&2; exit 1; } + if test "${SUPPORTED}" = "no" ; then + echo "configure: warning: Required Linux kernel functionality does not appear to be available" 1>&2 + fi fi - ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd` - - PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"` +fi + +if test "${SUPPORTED}" = "no" ; then + echo "configure: warning: The USB testing support cannot be built on this platform." 1>&2 +fi + - PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}" - - - - - +if test "${SUPPORTED}" = "yes"; then + SUPPORTED_TRUE= + SUPPORTED_FALSE='#' +else + SUPPORTED_TRUE='#' + SUPPORTED_FALSE= fi @@ -1903,8 +2037,6 @@ s%@SET_MAKE@%$SET_MAKE%g s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g -s%@SUPPORTED_TRUE@%$SUPPORTED_TRUE%g -s%@SUPPORTED_FALSE@%$SUPPORTED_FALSE%g s%@CC@%$CC%g s%@CXX@%$CXX%g s%@LN_S@%$LN_S%g @@ -1918,11 +2050,14 @@ s%@ecos_LIBS@%$ecos_LIBS%g s%@MSVC_SRCDIR@%$MSVC_SRCDIR%g s%@MSVC_TRUE@%$MSVC_TRUE%g s%@MSVC_FALSE@%$MSVC_FALSE%g -s%@ecos_tk_libs@%$ecos_tk_libs%g s%@ECOS_REPOSITORY@%$ECOS_REPOSITORY%g s%@PACKAGE_DIR@%$PACKAGE_DIR%g s%@PACKAGE_VERSION@%$PACKAGE_VERSION%g s%@PACKAGE_INSTALL@%$PACKAGE_INSTALL%g +s%@ecos_tk_libs@%$ecos_tk_libs%g +s%@CPP@%$CPP%g +s%@SUPPORTED_TRUE@%$SUPPORTED_TRUE%g +s%@SUPPORTED_FALSE@%$SUPPORTED_FALSE%g CEOF EOF
--- a/packages/io/usb/slave/current/host/configure.in +++ b/packages/io/usb/slave/current/host/configure.in @@ -71,9 +71,10 @@ case "${host}" in *-*-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 @@ if test "${SUPPORTED}" = "yes" ; then 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 @@ if test "${SUPPORTED}" = "yes" ; then 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.
