1 dnl Process this file with autoconf to produce a configure script.
2 dnl ====================================================================
6 dnl configure script for eCos USB host-side support
8 dnl ====================================================================
9 dnl ####ECOSGPLCOPYRIGHTBEGIN####
10 dnl -------------------------------------------
11 dnl This file is part of eCos, the Embedded Configurable Operating System.
12 dnl Copyright (C) 2005 eCosCentric Ltd
13 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15 dnl eCos is free software; you can redistribute it and/or modify it under
16 dnl the terms of the GNU General Public License as published by the Free
17 dnl Software Foundation; either version 2 or (at your option) any later version.
19 dnl eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 dnl You should have received a copy of the GNU General Public License along
25 dnl with eCos; if not, write to the Free Software Foundation, Inc.,
26 dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 dnl As a special exception, if other files instantiate templates or use macros
29 dnl or inline functions from this file, or you compile this file and link it
30 dnl with other works to produce a work based on this file, this file does not
31 dnl by itself cause the resulting work to be covered by the GNU General Public
32 dnl License. However the source code for this file must still be made available
33 dnl in accordance with section (3) of the GNU General Public License.
35 dnl This exception does not invalidate any other reasons why a work based on
36 dnl this file might be covered by the GNU General Public License.
38 dnl Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39 dnl at http://sources.redhat.com/ecos/ecos-license/
40 dnl -------------------------------------------
41 dnl ####ECOSGPLCOPYRIGHTEND####
42 dnl ====================================================================
43 dnl#####DESCRIPTIONBEGIN####
50 dnl####DESCRIPTIONEND####
51 dnl ====================================================================
56 dnl Pick up the support files from the top-level acsupport directory.
57 AC_CONFIG_AUX_DIR(../../../../../../acsupport)
59 ECOS_CHECK_BUILD_ne_SRC
61 AM_INIT_AUTOMAKE(usbhost,0.1,0)
64 dnl The current version of the USB testing support depends on
65 dnl functionality provided only by Linux platforms, and has only been
66 dnl tested on x86 machines, so a test is appropriate here. However
67 dnl it is not a good idea for the configure script to report an error:
68 dnl that would prevent any top-level configury working for other
69 dnl platforms. Instead an automake conditional is used to suppress adding
70 dnl targets to the build.
72 *-*-linux-gnu* ) SUPPORTED="yes";;
76 if test "${SUPPORTED}" = "no" ; then
77 AC_MSG_WARN([USB testing is only supported on Linux hosts])
85 ECOS_PROG_STANDARD_COMPILER_FLAGS
89 dnl Check that the version of tcl is sufficiently recent.
90 dnl e.g. "end" only became a valid index for the
91 dnl string commands after 8.1
92 if test "${TK_MAJOR_VERSION}" = "8" ; then
93 if test ${TK_MINOR_VERSION} -lt 2 ; then
94 AC_MSG_WARN([Version 8.2 or greater of Tcl/Tk is required])
98 if test "${SUPPORTED}" = "yes" ; then
99 AC_CHECK_HEADERS("linux/usb.h" "linux/usbdevice_fs.h",,SUPPORTED="no")
100 if test "${SUPPORTED}" = "no" ; then
101 AC_MSG_WARN([Required Linux kernel functionality does not appear to be available])
104 #include <linux/usbdevice_fs.h>
106 static struct usbdevfs_ctrltransfer xx = { .bRequestType = 0 };
108 AC_DEFINE(CYGBLD_USE_NEW_FIELD_NAMES)
114 if test "${SUPPORTED}" = "no" ; then
115 AC_MSG_WARN([The USB testing support cannot be built on this platform.])
118 AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
120 AM_CONFIG_HEADER(config.h:config.h.in)
121 AC_OUTPUT(Makefile:Makefile.in)