1 dnl Process this file with autoconf to produce a configure script.
2 dnl ====================================================================
6 dnl Host side implementation of the eCos infrastructure.
8 dnl ====================================================================
9 dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN####
10 dnl ----------------------------------------------------------------------------
11 dnl Copyright (C) 2002 Bart Veer
12 dnl Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
14 dnl This file is part of the eCos host tools.
16 dnl This program is free software; you can redistribute it and/or modify it
17 dnl under the terms of the GNU General Public License as published by the Free
18 dnl Software Foundation; either version 2 of the License, or (at your option)
19 dnl any later version.
21 dnl This program is distributed in the hope that it will be useful, but WITHOUT
22 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
26 dnl You should have received a copy of the GNU General Public License along with
27 dnl this program; if not, write to the Free Software Foundation, Inc.,
28 dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 dnl ----------------------------------------------------------------------------
31 dnl ####ECOSHOSTGPLCOPYRIGHTEND####
32 dnl ====================================================================
33 dnl#####DESCRIPTIONBEGIN####
40 dnl####DESCRIPTIONEND####
41 dnl ====================================================================
43 dnl No infrastructure is complete without assertions.
46 dnl Pick up the support files from the top-level acsupport directory.
47 AC_CONFIG_AUX_DIR(../../acsupport)
49 ECOS_CHECK_BUILD_ne_SRC
51 dnl Other standard options.
54 dnl This package is called cyginfra, partly for historical reasons
55 dnl and partly to avoid reorganizing the testsuite subdirectory.
56 dnl The generated header file may get #include'd indirectly by other
57 dnl packages, so it is not a good idea to define package and version.
58 AM_INIT_AUTOMAKE(cyginfra, 0.1,0)
59 ECOS_SUBST_VERSION(CYGNUM_INFRA_VERSION)
62 dnl The package contains a library implemented in C++. It has to be
63 dnl buildable under NT. Only a static version of the library is
64 dnl of interest at the moment.
71 ECOS_PROG_STANDARD_COMPILER_FLAGS
73 dnl Work out the endianness. The standard macro for this is used
74 dnl even though it will give warnings at autoconf time.
77 dnl Work out a suitable datatype for 64 bit arithmetic.
80 dnl Check the sizes of the pointer and long data types, so that
81 dnl CYG_ADDRWORD can be defined correctly.
82 AC_CHECK_SIZEOF(int *)
85 dnl See whether or not the compiler provides __PRETTY_FUNCTION__
86 ECOS_C_PRETTY_FUNCTION
88 dnl What function should be used to create a temporary file?
89 dnl tmpnam() is deprecated for security reasons.
90 AC_CHECK_FUNCS(mkstemp)
92 dnl --------------------------------------------------------------------
93 dnl User-settable options. Currently these are handled via --enable
94 dnl command line options, in the absence of an accepted and more rational
97 AC_ARG_ENABLE(tracebufsize,[ --enable-tracebufsize=X size of the trace buffer],[
98 if test "$enableval" = "no" -o "$enableval" = "yes"; then
99 AC_MSG_ERROR("--enable-tracebufsize should be given a suitable value")
101 AC_DEFINE_UNQUOTED(CYGNUM_INFRA_TRACE_VECTOR_SIZE,$enableval)
105 dnl --------------------------------------------------------------------
106 dnl Directory structures.
108 dnl The purpose of this infrastructure implementation is to provide a way
109 dnl of giving host code access to the same set of assertions and tracing
110 dnl facilities as are available on the target side. The implementations
111 dnl of these facilities has to be rather different, for example the host
112 dnl side has to worry about running in both command-line and GUI tools,
113 dnl not to mention supporting different languages such as Tcl as well
116 dnl After a successful build there should be a library libcyginfra.a
117 dnl which can be linked with the application code and which can get
118 dnl installed. In addition there will be a set of header files.
120 dnl The infrastructure exports four main header files:
122 dnl cyg/infra/cyg_type.h data types, useful macros, and a
123 dnl few compiler-related odds and ends
125 dnl cyg/infra/cyg_ass.h lots of lovely assertion macros
127 dnl cyg/infra/cyg_trac.h lots of lovely trace macros
129 dnl cyg/infra/testcase.h routines for use in testcases
131 dnl These header files are shared between host and target side, to make
132 dnl sure that a consistent set of macros is used between the two. There
133 dnl are a number of host-specific extensions in the header files as
136 dnl The header files rely on a number of other header files:
139 dnl cyg/hal/basetype.h
141 dnl Obviously cyg/hal/basetype.h cannot be shared between host and target,
142 dnl instead it has to depend on autoconf information.
144 dnl Sharing pkgconf/infra.h between host and target is slightly more feasible,
145 dnl especially if we get the configuration tool to a point where it can
146 dnl be used for both host and target. However for now this would create a
147 dnl bit of confusion because two configuration systems would be in use, and
148 dnl it seems better to stick with just autoconf for now. Therefore
149 dnl pkgconf/infra.h #include's the file generated by autoconf and
150 dnl generates the appropriate #define's (it is not a good idea to have
151 dnl autoconf generate pkgconf/infra.h directly, autoconf is slightly too
152 dnl eager to do substitutions).
154 dnl The configuration header file that is normally generated is
155 dnl config.h. It is more in keeping with eCos conventions to have
156 dnl a different header file hostinfra.h instead. This can
157 dnl achieved using the appropriate AM_CONFIG_HEADER macro.
159 dnl Making the copies of cyg_type.h etc. is the responsibility of
160 dnl Makefile.am, configure is responsible only for the makefile and for
163 AM_CONFIG_HEADER(hostinfra.h:config.h.in)
164 AC_OUTPUT(Makefile:Makefile.in testsuite/Makefile:testsuite/Makefile.in)