OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [io/] [usb/] [slave/] [current/] [host/] [configure.in] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
dnl Process this file with autoconf to produce a configure script.
2
dnl ====================================================================
3
dnl
4
dnl     configure.in
5
dnl
6
dnl     configure script for eCos USB host-side support
7
dnl
8
dnl ====================================================================
9
dnl ####ECOSGPLCOPYRIGHTBEGIN####
10
dnl -------------------------------------------
11
dnl This file is part of eCos, the Embedded Configurable Operating System.
12
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
13
dnl
14
dnl eCos is free software; you can redistribute it and/or modify it under
15
dnl the terms of the GNU General Public License as published by the Free
16
dnl Software Foundation; either version 2 or (at your option) any later
17
dnl version.
18
dnl
19
dnl eCos is distributed in the hope that it will be useful, but WITHOUT
20
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21
dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
22
dnl for more details.
23
dnl
24
dnl You should have received a copy of the GNU General Public License
25
dnl along with eCos; if not, write to the Free Software Foundation, Inc.,
26
dnl 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
27
dnl
28
dnl As a special exception, if other files instantiate templates or use
29
dnl macros or inline functions from this file, or you compile this file
30
dnl and link it with other works to produce a work based on this file,
31
dnl this file does not by itself cause the resulting work to be covered by
32
dnl the GNU General Public License. However the source code for this file
33
dnl must still be made available in accordance with section (3) of the GNU
34
dnl General Public License v2.
35
dnl
36
dnl This exception does not invalidate any other reasons why a work based
37
dnl on this file might be covered by the GNU General Public License.
38
dnl -------------------------------------------
39
dnl ####ECOSGPLCOPYRIGHTEND####
40
dnl ====================================================================
41
dnl#####DESCRIPTIONBEGIN####
42
dnl
43
dnl Author(s):  bartv
44
dnl Contact(s): bartv
45
dnl Date:       2002/01/10
46
dnl Version:    0.01
47
dnl
48
dnl####DESCRIPTIONEND####
49
dnl ====================================================================
50
 
51
 
52
AC_INIT(usbhost.c)
53
 
54
dnl Pick up the support files from the top-level acsupport directory.
55
AC_CONFIG_AUX_DIR(../../../../../../acsupport)
56
 
57
ECOS_CHECK_BUILD_ne_SRC
58
AC_CANONICAL_HOST
59
AM_INIT_AUTOMAKE(usbhost,0.1,0)
60
AM_MAINTAINER_MODE
61
AC_PROG_CC
62
AC_PROG_LN_S
63
AC_OBJEXT
64
AC_EXEEXT
65
ECOS_PROG_STANDARD_COMPILER_FLAGS
66
 
67
dnl The current version of the USB testing support depends on
68
dnl functionality provided only by Linux platforms, and has only been
69
dnl tested on x86 machines, so a test is appropriate here. However
70
dnl it is not a good idea for the configure script to report an error:
71
dnl that would prevent any top-level configury working for other
72
dnl platforms. Instead an automake conditional is used to suppress adding
73
dnl targets to the build.
74
case "${host}" in
75
    *-*-linux-gnu* ) SUPPORTED="yes";;
76
    * ) SUPPORTED="no"
77
esac
78
 
79
if test "${SUPPORTED}" = "no" ; then
80
    AC_MSG_WARN([USB testing is only supported on Linux hosts])
81
else
82
 
83
 
84
    ECOS_PACKAGE_DIRS
85
 
86
    ECOS_PATH_TCL
87
    dnl Check that the version of tcl is sufficiently recent.
88
    dnl e.g. "end" only became a valid index for the
89
    dnl string commands after 8.1
90
    if test "${TK_MAJOR_VERSION}" = "8" ; then
91
        if test ${TK_MINOR_VERSION} -lt 2 ; then
92
            AC_MSG_WARN([Version 8.2 or greater of Tcl/Tk is required])
93
            SUPPORTED="no"
94
        fi
95
    fi
96
    if test "${SUPPORTED}" = "yes" ; then
97
        AC_CHECK_HEADERS("linux/usb/ch9.h" "linux/usbdevice_fs.h",,SUPPORTED="no")
98
        if test "${SUPPORTED}" = "no" ; then
99
            AC_MSG_WARN([Required Linux kernel functionality does not appear to be available])
100
        else
101
          AC_TRY_COMPILE([
102
                  #include 
103
              ], [
104
                  static struct usbdevfs_ctrltransfer xx = { .bRequestType = 0 };
105
              ],
106
                  AC_DEFINE(CYGBLD_USE_NEW_FIELD_NAMES,[1],["use later version of Linux usb data structures])
107
              )
108
        fi
109
    fi
110
fi
111
 
112
if test "${SUPPORTED}" = "no" ; then
113
    AC_MSG_WARN([The USB testing support cannot be built on this platform.])
114
fi
115
 
116
AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
117
 
118
AM_CONFIG_HEADER(config.h:config.h.in)
119
AC_OUTPUT(Makefile:Makefile.in)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.