Mercurial > ecos
annotate acsupport/acinclude.m4 @ 1192:797d8336bd8a
Updates for BGR233 mode
| author | gthomas |
|---|---|
| date | Tue, 02 Sep 2003 18:31:58 +0000 |
| parents | c2d1fd823f09 |
| children | a2fb80f5315f |
| rev | line source |
|---|---|
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
1 dnl Process this file with aclocal to get an aclocal.m4 file. Then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
2 dnl process that with autoconf. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
3 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
4 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
5 dnl acinclude.m4 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
6 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
7 dnl Various autoconf macros that are shared between different |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
8 dnl eCos packages. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
9 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
10 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
11 dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN#### |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
12 dnl ---------------------------------------------------------------------------- |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
13 dnl Copyright (C) 2002, 2003 Bart Veer |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
14 dnl Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
15 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
16 dnl This file is part of the eCos host tools. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
17 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
18 dnl This program is free software; you can redistribute it and/or modify it |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
19 dnl under the terms of the GNU General Public License as published by the Free |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
20 dnl Software Foundation; either version 2 of the License, or (at your option) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
21 dnl any later version. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
22 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
23 dnl This program is distributed in the hope that it will be useful, but WITHOUT |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
24 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
25 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
26 dnl more details. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
27 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
28 dnl You should have received a copy of the GNU General Public License along with |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
29 dnl this program; if not, write to the Free Software Foundation, Inc., |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
30 dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
31 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
32 dnl ---------------------------------------------------------------------------- |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
33 dnl ####ECOSHOSTGPLCOPYRIGHTEND#### |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
34 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
35 dnl#####DESCRIPTIONBEGIN#### |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
36 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
37 dnl Author(s): bartv |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
38 dnl Contact(s): bartv |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
39 dnl Date: 1998/12/16 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
40 dnl Version: 0.01 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
41 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
42 dnl####DESCRIPTIONEND#### |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
43 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
44 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
45 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
46 dnl Ensure that configure is not being run in the source tree, i.e. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
47 dnl that a separate build tree has been created. This is not absolutely |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
48 dnl necessary at the time of writing but may become so in future, and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
49 dnl is good practice. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
50 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
51 AC_DEFUN(ECOS_CHECK_BUILD_ne_SRC,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
52 AC_MSG_CHECKING([that a separate build tree is being used]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
53 ecos_cwd=`/bin/pwd` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
54 if test "${srcdir}" = "." ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
55 srcdir=${ecos_cwd} |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
56 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
57 if test "${ecos_cwd}" = "${srcdir}" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
58 AC_MSG_RESULT([no]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
59 AC_MSG_ERROR([This configure script should not be run inside the source tree. Instead please use a separate build tree]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
60 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
61 AC_MSG_RESULT(yes) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
62 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
63 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
64 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
65 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
66 dnl The AM_INIT_AUTOMAKE() will define a symbol VERSION for the |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
67 dnl package's version number. Unfortunately this symbol is rather |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
68 dnl hard to share if several different packages are involved, so this |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
69 dnl macro is used to define an alternative symbol |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
70 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
71 AC_DEFUN(ECOS_SUBST_VERSION,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
72 AC_REQUIRE([AM_INIT_AUTOMAKE]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
73 ifelse($#,1,,AC_MSG_ERROR([Invalid number of arguments passed to ECOS SUBST_VERSION])) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
74 AC_DEFINE_UNQUOTED($1, "$VERSION") |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
75 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
76 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
77 dnl -------------------------------------------------------------------- |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
78 dnl Convert a cygwin pathname to something acceptable to VC++ (but |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
79 dnl still invoked from bash and cygwin's make). This means using |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
80 dnl the cygpath utility and then translating any backslashes into |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
81 dnl forward slashes to avoid confusing make. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
82 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
83 AC_DEFUN(ECOS_MSVC_PATH, [ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
84 AC_REQUIRE([ECOS_PROG_MSVC]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
85 ifelse($#, 1, , AC_MSG_ERROR("Invalid number of arguments passed to ECOS MSVC_PATH")) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
86 if test "${MSVC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
87 $1=`cygpath -w ${$1} | tr \\\\\\\\ /` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
88 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
89 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
90 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
91 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
92 dnl An internal utility to define eCos variants of various compilation |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
93 dnl related flags. The aim is to avoid messing with CFLAGS, LIBS, and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
94 dnl so on because those are used for feature tests as well as for |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
95 dnl passing on to the application. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
96 AC_DEFUN(ECOS_PROG_DEFINE_COMPILER_FLAGS,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
97 ecos_CFLAGS="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
98 ecos_CXXFLAGS="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
99 ecos_LDADD="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
100 ecos_INCLUDES="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
101 ecos_LIBS="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
102 AC_SUBST(ecos_CFLAGS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
103 AC_SUBST(ecos_CXXFLAGS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
104 AC_SUBST(ecos_LDADD) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
105 AC_SUBST(ecos_INCLUDES) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
106 AC_SUBST(ecos_LIBS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
107 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
108 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
109 dnl For historical reasons some of the eCos host-side software can be |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
110 dnl built with Visual C++ as well as g++. The user can specify this |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
111 dnl at configure time using CC=cl, where cl.exe is the compiler driver. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
112 dnl This macro will set the variable MSVC to "yes" or to "no" depending |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
113 dnl on whether or not VC++ is being used, analogous to the variable |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
114 dnl GCC set by AC_PROG_CC. It provides support for an automake |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
115 dnl conditional thus allowing the makefile to adapt somewhat to the |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
116 dnl compiler being used. Finally it fills in the ECOS_INCLUDES, |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
117 dnl ECOS_LIBS and ECOS_LDADD variables with suitable initial values. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
118 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
119 AC_DEFUN(ECOS_PROG_MSVC,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
120 AC_REQUIRE([AC_PROG_CC]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
121 AC_REQUIRE([AC_PROG_CXX]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
122 AC_REQUIRE([ECOS_PROG_DEFINE_COMPILER_FLAGS]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
123 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
124 AC_MSG_CHECKING("for Visual C++") |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
125 MSVC="no"; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
126 if test "${CC}" = "cl" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
127 MSVC="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
128 CXX="cl" |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
129 MSVC_SRCDIR=${srcdir} |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
130 ECOS_MSVC_PATH(MSVC_SRCDIR) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
131 AC_SUBST(MSVC_SRCDIR) |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
132 ecos_INCLUDES="${ecos_INCLUDES} \"-I${MSVC_SRCDIR}\"" |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
133 ecos_LDADD="-link" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
134 ecos_LIBS="advapi32.lib" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
135 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
136 AM_CONDITIONAL(MSVC, test "${MSVC}" = "yes") |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
137 if test "${MSVC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
138 AC_MSG_RESULT([unfortunately yes]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
139 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
140 AC_MSG_RESULT([no]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
141 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
142 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
143 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
144 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
145 dnl Set up sensible flags for the various different compilers. This |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
146 dnl is achieved by manipulating AM-CFLAGS and AM-CXXFLAGS via a subst, |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
147 dnl plus undoing the setting of CFLAGS and CXXFLAGS done by |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
148 dnl the AC_PROC_CC and AC_PROG_CXX macros (e.g. setting the default |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
149 dnl compilation flags to -O2). Note that this relies |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
150 dnl on knowing about the internals of those macros. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
151 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
152 dnl There is little point in checking the cache: this macro does |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
153 dnl not do any feature tests so checking the cache would probably |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
154 dnl be more expensive than doing the work here. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
155 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
156 dnl For now the only supported compilers are gcc/g++ and VC++. Attempts |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
157 dnl to use another compiler will result in an error at configure-time. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
158 AC_DEFUN(ECOS_PROG_STANDARD_COMPILER_FLAGS, [ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
159 AC_REQUIRE([AC_PROG_CC]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
160 AC_REQUIRE([AC_PROG_CXX]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
161 AC_REQUIRE([ECOS_PROG_DEFINE_COMPILER_FLAGS]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
162 AC_REQUIRE([ECOS_PROG_MSVC]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
163 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
164 AC_MSG_CHECKING("the default compiler flags") |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
165 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
166 dnl Add a user-settable flag to control whether or debugging info is |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
167 dnl incorporated at compile-time. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
168 ecosflags_enable_debug="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
169 AC_ARG_ENABLE(debug,[ --enable-debug do a debug rather than a release build], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
170 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
171 yes) ecosflags_enable_debug="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
172 *) ecosflags_enable_debug="no" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
173 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
174 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
175 dnl For VC++ builds also provide a flag for ANSI vs. unicode builds. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
176 dnl For now this does not actually affect the compiler flags. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
177 dnl NOTE: there may also have to be a flag to control whether or |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
178 dnl the VC++ multi-threading flags are enabled. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
179 ecosflags_enable_ansi="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
180 if test "${MSVC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
181 AC_ARG_ENABLE(ansi,[ --enable-ansi do an ANSI rather than a unicode build], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
182 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
183 yes) ecosflags_enable_ansi="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
184 *) ecosflags_enable_ansi="no" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
185 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
186 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
187 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
188 dnl Now we know what the user is after. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
189 if test "${GCC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
190 ecos_CFLAGS="${ecos_CFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
191 ecos_CXXFLAGS="${ecos_CXXFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
192 elif test "${MSVC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
193 ecos_CFLAGS="${ecos_CFLAGS} -nologo -W3" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
194 ecos_CXXFLAGS="${ecos_CXXFLAGS} -nologo -W3 -GR -GX" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
195 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
196 AC_MSG_ERROR("default flags for ${CC} are not known") |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
197 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
198 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
199 dnl Choose between debugging and optimization. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
200 if test "${ecosflags_enable_debug}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
201 if test "${GCC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
202 ecos_CFLAGS="${ecos_CFLAGS} -g -O0" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
203 ecos_CXXFLAGS="${ecos_CXXFLAGS} -g -O0" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
204 elif test "${MSVC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
205 ecos_CFLAGS="${ecos_CFLAGS} -MDd -Zi" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
206 ecos_CXXFLAGS="${ecos_CXXFLAGS} -MDd -Zi" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
207 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
208 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
209 dnl For now building with g++ implies -O0 rather than -O2. The |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
210 dnl compile-time performance of g++ at -O2 has been disappointing |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
211 dnl for quite some time, and the eCos host-side code is not |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
212 dnl sufficiently cpu-intensive to require -O2. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
213 if test "${GCC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
214 ecos_CFLAGS="${ecos_CFLAGS} -O0" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
215 ecos_CXXFLAGS="${ecos_CXXFLAGS} -O0" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
216 elif test "${MSVC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
217 ecos_CFLAGS="${ecos_CFLAGS} -MD -O2" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
218 ecos_CXXFLAGS="${ecos_CXXFLAGS} -MD -O2" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
219 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
220 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
221 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
222 CFLAGS="${ac_save_CFLAGS}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
223 CXXFLAGS="${ac_save_CXXFLAGS}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
224 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
225 AC_MSG_RESULT(done) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
226 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
227 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
228 dnl -------------------------------------------------------------------- |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
229 dnl User-settable options for assertions and tracing. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
230 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
231 dnl The settable options are: |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
232 dnl --disable-asserts |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
233 dnl --disable-preconditions |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
234 dnl --disable-postconditions |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
235 dnl --disable-invariants |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
236 dnl --disable-loopinvariants |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
237 dnl --disable-tracing |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
238 dnl --disable-fntracing |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
239 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
240 AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
241 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
242 AC_REQUIRE([ECOS_PROG_STANDARD_COMPILER_FLAGS]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
243 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
244 if test "${ecosflags_enable_debug}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
245 ecosinfra_asserts="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
246 ecosinfra_preconditions="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
247 ecosinfra_postconditions="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
248 ecosinfra_invariants="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
249 ecosinfra_loopinvariants="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
250 ecosinfra_tracing="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
251 ecosinfra_fntracing="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
252 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
253 ecosinfra_asserts="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
254 ecosinfra_preconditions="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
255 ecosinfra_postconditions="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
256 ecosinfra_invariants="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
257 ecosinfra_loopinvariants="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
258 ecosinfra_tracing="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
259 ecosinfra_fntracing="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
260 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
261 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
262 AC_ARG_ENABLE(asserts,[ --disable-asserts disable all assertions], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
263 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
264 yes) ecosinfra_asserts="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
265 no) ecosinfra_asserts="no" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
266 *) AC_MSG_ERROR([bad value ${enableval} for disable-asserts option]) ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
267 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
268 if test "${ecosinfra_asserts}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
269 AC_DEFINE(CYGDBG_USE_ASSERTS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
270 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
271 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
272 AC_ARG_ENABLE(preconditions, [ --disable-preconditions disable a subset of the assertions], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
273 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
274 yes) ecosinfra_preconditions="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
275 no) ecosinfra_preconditions="no" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
276 *) AC_MSG_ERROR([bad value ${enableval} for disable-preconditions option]) ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
277 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
278 if test "${ecosinfra_preconditions}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
279 AC_DEFINE(CYGDBG_INFRA_DEBUG_PRECONDITIONS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
280 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
281 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
282 AC_ARG_ENABLE(postconditions, [ --disable-postconditions disable a subset of the assertions], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
283 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
284 yes) ecosinfra_postconditions="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
285 no) ecosinfra_postconditions="no" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
286 *) AC_MSG_ERROR([bad value ${enableval} for disable-postconditions option]) ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
287 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
288 if test "${ecosinfra_postconditions}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
289 AC_DEFINE(CYGDBG_INFRA_DEBUG_POSTCONDITIONS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
290 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
291 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
292 AC_ARG_ENABLE(invariants, [ --disable-invariants disable a subset of the assertions], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
293 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
294 yes) ecosinfra_invariants="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
295 no) ecosinfra_invariants="no" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
296 *) AC_MSG_ERROR([bad value ${enableval} for disable-invariants option]) ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
297 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
298 if test "${ecosinfra_invariants}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
299 AC_DEFINE(CYGDBG_INFRA_DEBUG_INVARIANTS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
300 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
301 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
302 AC_ARG_ENABLE(loopinvariants, [ --disable-loopinvariants disable a subset of the assertions], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
303 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
304 yes) ecosinfra_loopinvariants="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
305 no) ecosinfra_loopinvariants="no" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
306 *) AC_MSG_ERROR([bad value ${enableval} for disable-loopinvariants option]) ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
307 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
308 if test "${ecosinfra_loopinvariants}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
309 AC_DEFINE(CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
310 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
311 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
312 AC_ARG_ENABLE(tracing,[ --disable-tracing disable tracing], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
313 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
314 yes) ecosinfra_tracing="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
315 no) ecosinfra_tracing="no" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
316 *) AC_MSG_ERROR([bad value ${enableval} for disable-tracing option]) ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
317 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
318 if test "${ecosinfra_tracing}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
319 AC_DEFINE(CYGDBG_USE_TRACING) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
320 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
321 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
322 AC_ARG_ENABLE(fntracing,[ --disable-fntracing disable function entry/exit tracing], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
323 [case "${enableval}" in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
324 yes) ecosinfra_fntracing="yes" ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
325 no) ecosinfra_fntracing=no ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
326 *) AC_MSG_ERROR([bad value ${enableval} for disable-fntracing option]) ;; |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
327 esac]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
328 if test "${ecosinfra_fntracing}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
329 AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
330 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
331 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
332 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
333 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
334 dnl Inspired by KDE's autoconfig |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
335 dnl This macro takes three Arguments like this: |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
336 dnl AC_FIND_FILE(foo.h, $incdirs, incdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
337 dnl the filename to look for, the list of paths to check and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
338 dnl the variable with the result. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
339 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
340 AC_DEFUN(AC_FIND_FILE,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
341 $3="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
342 for i in $2; do |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
343 if test -r "$i/$1"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
344 $3=$i |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
345 break |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
346 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
347 done |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
348 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
349 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
350 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
351 dnl Variation of the above. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
352 dnl This macro takes three Arguments like this: |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
353 dnl AC_FIND_DIR(infra, $incdirs, incdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
354 dnl the directory name to look for, the list of paths to check and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
355 dnl the variable with the result. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
356 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
357 AC_DEFUN(AC_FIND_DIR,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
358 $3="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
359 for i in $2; do |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
360 if test -d "$i/$1"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
361 $3=$i |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
362 break |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
363 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
364 done |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
365 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
366 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
367 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
368 dnl Work out details of the Tcl/tk installation that should be used. |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
369 dnl In theory this is simple: when Tcl is installed in <tcl_prefix> |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
370 dnl (usually /usr) there should be a file <tcl_prefix>/lib/tclConfig.sh |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
371 dnl which defines exactly how to build Tcl-based applications. Of course |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
372 dnl Tcl may be installed anywhere, not just in /usr, so it is necessary |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
373 dnl to do some searching. There is a command-line argument |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
374 dnl --with-tcl=<path> to specify the Tcl installation, so the macro |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
375 dnl can search for <with_tcl>/lib/tclConfig.sh, <prefix>/lib/tclConfig.sh |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
376 dnl and /usr/lib/tclConfig.sh |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
377 dnl |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
378 dnl Unfortunately not all systems use this convention. For example, |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
379 dnl at the time of writing Debian installs tclConfig.sh in a versioned |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
380 dnl subdirectory /usr/lib/tcl8.3/tclConfig.sh. Hence there is an |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
381 dnl additional argument --with-tcl-version=<vsn> which is used to |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
382 dnl extend the search path. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
383 dnl |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
384 dnl For VC++ builds the situation is different again. Tcl may be |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
385 dnl installed anywhere, so the data in tclConfig.sh is not useful |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
386 dnl (and that file may not be provided at all). Instead --with-tcl |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
387 dnl must be used to specify the path. Alternatively separate paths |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
388 dnl for headers and libraries can be specified using --with-tcl-header |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
389 dnl and --with-tcl-lib. Usually it will also be necessary to specify |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
390 dnl the library version number using --with-tcl-version. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
391 |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
392 dnl This adds two main command-line options, --with-tcl=<prefix> to |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
393 dnl specify the Tcl install directory, and --with-tcl-version=<vsn> |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
394 dnl to control which version of Tcl should be used. For finer-grained |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
395 dnl control there are additional options --with-tcl-header and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
396 dnl --with-tcl-version. It is assumed that Tcl and Tk are installed |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
397 dnl in the same place. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
398 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
399 dnl On Unix systems and under cygwin there should be a file |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
400 dnl $(tcl_prefix)/lib/tclConfig.sh containing all the information |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
401 dnl needed for Tcl. This file is consulted and the appropriate |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
402 dnl variables extracted. Similar information for Tk lives in |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
403 dnl tkConfig.sh. As a useful side effect all variables defined |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
404 dnl in those scripts can be accessed. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
405 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
406 dnl To confuse matters, subtly different naming conventions are used |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
407 dnl under Unix and NT. Under Unix the Tcl library will be called |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
408 dnl libtcl8.0.a, libtcl8.1.a, etc. with a dot between the major and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
409 dnl minor version. Under NT (including cygwin) the library will be |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
410 dnl called tcl80.lib, tcl81.lib, libtcl80.a, libtcl81.a, etc. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
411 dnl without a dot. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
412 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
413 dnl Currently this macro assumes that Tcl is preinstalled, and not |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
414 dnl built alongside eCos. Specifically the macro checks that |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
415 dnl tcl.h can be found, plus on Unix systems tclConfig.sh and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
416 dnl tkConfig.sh as well. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
417 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
418 dnl This macro updates the build-related variables ecos_INCLUDES, |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
419 dnl ecos_LDADD, and ecos_LIBS. The latter assumes the application |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
420 dnl only needs Tcl. If Tk is needed as well then the variable |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
421 dnl ecos_tklibs should be used in addition. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
422 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
423 AC_DEFUN(ECOS_PATH_TCL, [ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
424 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
425 AC_REQUIRE([ECOS_PROG_MSVC]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
426 AC_REQUIRE([AC_CYGWIN]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
427 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
428 ecos_tk_libs="" |
|
345
3f4258400ba5
Fix host-side configury problems which can occur if you are not using
bartv
parents:
311
diff
changeset
|
429 ecos_tk_libdir="" |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
430 |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
431 dnl Where is the Tcl installation, and what version should be used? |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
432 AC_MSG_CHECKING(for Tcl installation) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
433 AC_ARG_WITH(tcl,[ --with-tcl=<path> location of Tcl header and libraries]) |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
434 AC_ARG_WITH(tcl-version,[ --with-tcl-version=<vsn> version of Tcl to be used]) |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
435 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
436 dnl If using VC++ then there are no sensible default directories |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
437 dnl to search for a Tcl installation. Instead the user must |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
438 dnl supply either --with-tcl, or both --with-tcl-header and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
439 dnl --with-tcl-lib. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
440 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
441 dnl Also when using VC++ there is no tclConfig.sh file to |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
442 dnl consult about which libraries are needed. Instead that |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
443 dnl information is hard-wired here. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
444 if test "${MSVC}" = "yes" ; then |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
445 AC_ARG_WITH(tcl-header,[ --with-tcl-header=<path> location of Tcl header]) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
446 AC_ARG_WITH(tcl-lib,[ --with-tcl-lib=<path> location of Tcl libraries]) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
447 ecos_tcl_incdir="" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
448 ecos_tcl_libdir="" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
449 if test "${with_tcl_version+set}" != set ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
450 AC_MSG_ERROR(You must specify a Tcl version using --with-tcl-version=<vsn>) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
451 fi |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
452 if test "${with_tcl_header+set}" = set ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
453 ecos_tcl_incdir=${with_tcl_header} |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
454 elif test "${with_tcl+set}" = set ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
455 ecos_tcl_incdir="${with_tcl}/include" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
456 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
457 AC_MSG_ERROR(You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-header=<path>) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
458 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
459 if test "${with_tcl_lib+set}" = set; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
460 ecos_tcl_libdir=${with_tcl_lib} |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
461 elif test "${with_tcl+set}" = set; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
462 ecos_tcl_libdir="${with_tcl}/lib" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
463 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
464 AC_MSG_ERROR(You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-lib=<path>) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
465 fi |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
466 |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
467 dnl Sanity check, make sure that there is a tcl.h header file. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
468 dnl If not then there is no point in proceeding. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
469 if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
470 AC_MSG_ERROR([unable to locate Tcl header file tcl.h]) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
471 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
472 |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
473 ECOS_MSVC_PATH(ecos_tcl_incdir) |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
474 ECOS_MSVC_PATH(ecos_tcl_libdir) |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
475 ecos_INCLUDES="${ecos_INCLUDES} \"-I${ecos_tcl_incdir}\"" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
476 ecos_LIBS="${ecos_LIBS} tcl${with_tcl_version}.lib" |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
477 ecos_LDADD="${ecos_LDADD} \"-libpath=${ecos_tcl_libdir}\"" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
478 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
479 dnl FIXME: what libraries are needed for a tk application under VC++? |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
480 dnl and can the version be determined more accurately? |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
481 ecos_tk_libs="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
482 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
483 else |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
484 dnl Try to find tclConfig.sh |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
485 possibles="" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
486 if test "${with_tcl+set}" = set ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
487 possibles="${with_tcl}/lib" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
488 if test "${with_tcl_version+set}" = set ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
489 possibles="${possibles} ${with_tcl}/lib/tcl${with_tcl_version}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
490 fi |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
491 fi |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
492 possibles="${possibles} ${prefix}/lib" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
493 if test "${with_tcl_version+set}" = set ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
494 possibles="${possibles} ${prefix}/lib/tcl${with_tcl_version}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
495 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
496 possibles="${possibles} /usr/lib" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
497 if test "${with_tcl_version+set}" = set ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
498 possibles="${possibles} /usr/lib/tcl${with_tcl_version}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
499 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
500 AC_FIND_FILE("tclConfig.sh", ${possibles}, tclconfig) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
501 if test \! -r "${tclconfig}/tclConfig.sh" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
502 AC_MSG_ERROR(unable to locate Tcl configuration file tclConfig.sh) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
503 else |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
504 . ${tclconfig}/tclConfig.sh |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
505 |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
506 dnl Now we need to figure out where to find the Tcl header files. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
507 dnl tclConfig.sh may define a variable TCL_INC_DIR, otherwise |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
508 dnl use TCL_PREFIX/include |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
509 if test -z "${TCL_INC_DIR}" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
510 ecos_tcl_incdir="${TCL_PREFIX}/include" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
511 else |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
512 ecos_tcl_incdir="${TCL_INC_DIR}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
513 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
514 if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
515 AC_MSG_ERROR(unable to locate Tcl header file tcl.h) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
516 else |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
517 dnl On Unix systems -I/usr/include is unnecessary, and can |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
518 dnl cause problems on hosts where gcc is not the platform's |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
519 dnl default compiler because of the use of unfixed headers. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
520 dnl Hence it is explicitly removed here. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
521 if test "${ecos_tcl_incdir}" != "/usr/include" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
522 ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_tcl_incdir}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
523 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
524 fi |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
525 |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
526 dnl There should be a variable TCL_LIB_SPEC which defines |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
527 dnl exactly how to link with Tcl. Unfortunately this is not |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
528 dnl 100% guaranteed, so a backup solution is still needed. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
529 dnl NOTE: there is also TCL_LIBS defining additional libraries |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
530 dnl such as -ldl. That may have to be added to ecos_LIBS. |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
531 if test -z "${TCL_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
532 AC_FIND_FILE("libtcl${with_tcl_version}.a", ${possibles}, libtcl) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
533 if test -r "${libtcl}/libtcl${with_tcl_version}.a" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
534 TCL_LIB_SPEC="-L${libtcl} -ltcl${with_tcl_version}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
535 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
536 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
537 if test -z "${TCL_LIB_SPEC}" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
538 AC_FIND_FILE("libtcl.a", ${possibles}, libtcl) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
539 if test -r "${libtcl}/libtcl.a" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
540 TCL_LIB_SPEC="-L${libtcl} -ltcl" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
541 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
542 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
543 if test -z "${TCL_LIB_SPEC}" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
544 AC_MSG_ERROR(${tclconfig}/tclConfig.sh does not define TCL_LIB_SPEC, and unable to find libtcl.a) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
545 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
546 ecos_LIBS="${ecos_LIBS} ${TCL_LIB_SPEC}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
547 |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
548 dnl Next, look for tkConfig.sh |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
549 possibles=`echo ${possibles} | sed -e 's,tcl,tk,g'` |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
550 AC_FIND_FILE("tkConfig.sh", ${possibles}, tkconfig) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
551 if test \! -r "${tkconfig}/tkConfig.sh" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
552 AC_MSG_ERROR(unable to locate Tk config file tkConfig.sh) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
553 else |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
554 . ${tkconfig}/tkConfig.sh |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
555 if test -z "${TK_INC_DIR}" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
556 if test "${TK_PREFIX}" = "/usr" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
557 ecos_tk_includes="${TK_XINCLUDES}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
558 else |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
559 ecos_tk_includes="-I${TK_PREFIX}/include ${TK_XINCLUDES}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
560 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
561 else |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
562 ecos_tk_includes="-I${TK_INC_DIR} ${TK_XINCLUDES}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
563 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
564 |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
565 dnl As with TCL_LIB_SPEC, TK_LIB_SPEC may be empty |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
566 if test -z "${TK_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
567 AC_FIND_FILE("libtk${with_tcl_version}.a", ${possibles}, libtk) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
568 if test -r "${libtk}/libtk${with_tcl_version}.a" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
569 TK_LIB_SPEC="-L${libtk} -ltk${with_tcl_version}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
570 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
571 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
572 if test -z "${TK_LIB_SPEC}" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
573 AC_FIND_FILE("libtk.a", ${possibles}, libtk) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
574 if test -r "${libtk}/libtk.a" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
575 TK_LIB_SPEC="-L${libtk} -ltk" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
576 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
577 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
578 if test -z "${TK_LIB_SPEC}" ; then |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
579 AC_MSG_ERROR(${tkconfig}/tkConfig.sh does not define TK_LIB_SPEC, and unable to find libtk.a) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
580 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
581 ecos_tk_libs="${TK_LIB_SPEC} ${TK_LIBS}" |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
582 fi |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
583 fi |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
584 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
585 |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
586 AC_MSG_RESULT([-I${ecos_tcl_incdir} ${TCL_LIB_SPEC}]) |
|
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
587 AC_SUBST(ecos_tk_includes) |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
588 AC_SUBST(ecos_tk_libs) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
589 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
590 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
591 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
592 dnl Search for the infrastructure headers. Usually these can be picked |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
593 dnl up from host/infra in the build tree. This macro updates |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
594 dnl ecos_INCLUDES, ecos_LDADD and ecos_LIBS appropriately. In addition |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
595 dnl it defines new variables ecos_infra_incdir and ecos_infra_libdir, |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
596 dnl useful for listing explicit dependencies. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
597 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
598 dnl This macro should only be used in configure scripts that run after |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
599 dnl the infrastructure has been configured because it relies on the |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
600 dnl infra directory already having been created in the build tree. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
601 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
602 AC_DEFUN(ECOS_PATH_INFRA, [ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
603 AC_MSG_CHECKING([for eCos host-side infrastructure]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
604 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
605 dnl Where are we in the build tree? First assume that we are in the host |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
606 dnl tree, thus allowing configury of just the host-side. If that fails |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
607 dnl assume we can be anywhere. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
608 infra_builddir="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
609 possibles=".. ../.. ../../.. ../../../.. ../../../../.." |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
610 AC_FIND_DIR("infra", ${possibles}, infra_builddir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
611 if test "${infra_builddir}" = "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
612 possibles="../host ../../host ../../../host ../../../../host ../../../../../host ../../../../../../host" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
613 AC_FIND_DIR("infra", ${possibles}, infra_builddir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
614 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
615 if test "${infra_builddir}" != "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
616 infra_builddir="${infra_builddir}/infra" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
617 infra_builddir=`cd ${infra_builddir} && /bin/pwd` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
618 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
619 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
620 ecos_infra_incdir="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
621 ecos_infra_libdir="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
622 ecos_infra_libs="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
623 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
624 AC_ARG_WITH(infra-header,[ --with-infra-header=<path> location of eCos infrastructure headers]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
625 AC_ARG_WITH(infra-lib,[ --with-infra-lib=<path> location of eCos infrastructure library]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
626 AC_ARG_WITH(infra,[ --with-infra=<path> location of eCos infrastructure installation]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
627 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
628 if test "${with_infra_header+set}" = "set"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
629 ecos_infra_incdir="${with_infra_header}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
630 elif test "${with_infra+set}" = "set"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
631 ecos_infra_incdir="${with_infra}/include" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
632 elif test "${infra_builddir}" != "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
633 ecos_infra_incdir="${infra_builddir}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
634 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
635 AC_MSG_ERROR([infrastructure headers not found]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
636 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
637 if test "${MSVC}" = "yes" ; then |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
638 ecos_msvc_infra_incdir=${ecos_infra_incdir} |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
639 ECOS_MSVC_PATH(ecos_msvc_infra_incdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
640 ecos_INCLUDES="${ecos_INCLUDES} \"-I${ecos_msvc_infra_incdir}\"" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
641 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
642 ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_infra_incdir}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
643 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
644 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
645 if test "${with_infra_lib+set}" = "set"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
646 ecos_infra_libdir="${with_infra_lib}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
647 elif test "${with_infra+set}" = "set"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
648 ecos_infra_libdir="${with_infra}/lib" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
649 elif test "${infra_builddir}" != "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
650 ecos_infra_libdir="${infra_builddir}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
651 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
652 AC_MSG_ERROR([infrastructure library not found]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
653 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
654 if test "${MSVC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
655 ecos_msvc_infra_libdir=${ecos_infra_libdir} |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
656 ECOS_MSVC_PATH(ecos_msvc_infra_libdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
657 ecos_LIBS="${ecos_LIBS} cyginfra.lib" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
658 ecos_LDADD="${ecos_LDADD} \"-libpath=${ecos_msvc_infra_libdir}\"" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
659 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
660 ecos_LIBS="${ecos_LIBS} -lcyginfra" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
661 ecos_LDADD="${ecos_LDADD} -L${ecos_infra_libdir}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
662 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
663 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
664 AC_SUBST(ecos_infra_incdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
665 AC_SUBST(ecos_infra_libdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
666 AC_MSG_RESULT(-I[${ecos_infra_incdir} -L${ecos_infra_libdir}]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
667 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
668 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
669 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
670 dnl And a very similar macro for libcdl, but note that the headers |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
671 dnl are in the source tree rather than the build tree. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
672 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
673 AC_DEFUN(ECOS_PATH_LIBCDL, [ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
674 AC_MSG_CHECKING([for libcdl]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
675 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
676 dnl Where are we in the source tree? |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
677 libcdl_srcdir="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
678 possibles="${srcdir}/.. ${srcdir}/../.. ${srcdir}/../../.. ${srcdir}/../../../.. ${srcdir}/../../../../.." |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
679 AC_FIND_DIR("libcdl", ${possibles}, libcdl_srcdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
680 if test "${libcdl_srcdir}" = "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
681 possibles="${srcdir}/../host ${srcdir}/../../host ${srcdir}/../../../host ${srcdir}/../../../../host ${srcdir}/../../../../../host ${srcdir}/../../../../../../host" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
682 AC_FIND_DIR("libcdl", ${possibles}, libcdl_srcdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
683 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
684 if test "${libcdl_srcdir}" != "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
685 libcdl_srcdir="${libcdl_srcdir}/libcdl" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
686 libcdl_srcdir=`cd ${libcdl_srcdir} && /bin/pwd` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
687 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
688 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
689 dnl And where are we in the build tree? |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
690 libcdl_builddir="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
691 possibles=".. ../.. ../../.. ../../../.. ../../../../.." |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
692 AC_FIND_DIR("libcdl", ${possibles}, libcdl_builddir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
693 if test "${libcdl_builddir}" = "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
694 possibles="../host ../../host ../../../host ../../../../host ../../../../../host ../../../../../../host" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
695 AC_FIND_DIR("libcdl", ${possibles}, libcdl_builddir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
696 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
697 if test "${libcdl_builddir}" != "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
698 libcdl_builddir="${libcdl_builddir}/libcdl" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
699 libcdl_builddir=`cd ${libcdl_builddir} && /bin/pwd` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
700 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
701 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
702 ecos_libcdl_incdir="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
703 ecos_libcdl_libdir="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
704 ecos_libcdl_libs="" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
705 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
706 AC_ARG_WITH(libcdl-header,[ --with-libcdl-header=<path> location of eCos libcdl headers]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
707 AC_ARG_WITH(libcdl-lib,[ --with-libcdl-lib=<path> location of eCos libcdl library]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
708 AC_ARG_WITH(libcdl,[ --with-libcdl=<path> location of eCos libcdl installation]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
709 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
710 if test "${with_libcdl_header+set}" = "set"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
711 ecos_libcdl_incdir="${with_libcdl_header}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
712 elif test "${with_libcdl+set}" = "set"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
713 ecos_libcdl_incdir="${with_libcdl}/include" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
714 elif test "${libcdl_srcdir}" != "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
715 ecos_libcdl_incdir="${libcdl_srcdir}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
716 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
717 if test \! -r "${ecos_libcdl_incdir}/cdl.hxx" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
718 AC_MSG_ERROR([libcdl headers not found]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
719 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
720 if test "${MSVC}" = "yes" ; then |
|
595
c2d1fd823f09
Update autoconf macro for Tcl, and regenerate affected files
bartv
parents:
392
diff
changeset
|
721 ecos_msvc_libcdl_incdir="${ecos_libcdl_incdir}" |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
722 ECOS_MSVC_PATH(ecos_msvc_libcdl_incdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
723 ecos_INCLUDES="${ecos_INCLUDES} \"-I${ecos_msvc_libcdl_incdir}\"" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
724 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
725 ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_libcdl_incdir}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
726 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
727 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
728 if test "${with_libcdl_lib+set}" = "set"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
729 ecos_libcdl_libdir="${with_libcdl_lib}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
730 elif test "${with_libcdl+set}" = "set"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
731 ecos_libcdl_libdir="${with_libcdl}/lib" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
732 elif test "${libcdl_builddir}" != "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
733 ecos_libcdl_libdir="${libcdl_builddir}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
734 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
735 AC_MSG_ERROR([libcdl library not found]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
736 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
737 if test "${MSVC}" = "yes" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
738 ecos_msvc_libcdl_libdir=${ecos_libcdl_libdir} |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
739 ECOS_MSVC_PATH(ecos_msvc_libcdl_libdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
740 ecos_LIBS="${ecos_LIBS} cdl.lib" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
741 ecos_LDADD="${ecos_LDADD} \"-libpath=${ecos_msvc_libcdl_libdir}\"" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
742 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
743 ecos_LIBS="${ecos_LIBS} -lcdl" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
744 ecos_LDADD="${ecos_LDADD} -L${ecos_libcdl_libdir}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
745 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
746 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
747 AC_SUBST(ecos_libcdl_incdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
748 AC_SUBST(ecos_libcdl_libdir) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
749 AC_MSG_RESULT([-I${ecos_libcdl_incdir} -L${ecos_libcdl_libdir}]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
750 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
751 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
752 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
753 dnl Look for a 64 bit data type. It is necessary to check both C and C++ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
754 dnl compilers. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
755 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
756 dnl A better implementation would check whether or not AC_PROG_CC and |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
757 dnl AC_PROG_CXX have been invoked and only test the appropriate |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
758 dnl compiler. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
759 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
760 dnl When cross-compiling, default to long long on the assumption that |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
761 dnl gcc/g++ must be used and long long is likely to be the 64 bit data |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
762 dnl type. This is not guaranteed, but sufficiently likely to meet |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
763 dnl the requirements for the time being. The CHECK_SIZEOF() macro |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
764 dnl might be another way to get the desired information. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
765 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
766 AC_DEFUN(ECOS_TYPE_64bit, [ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
767 AC_REQUIRE([AC_PROG_CC]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
768 AC_REQUIRE([AC_PROG_CXX]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
769 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
770 AC_CACHE_CHECK("for a 64 bit data type",ecos_cv_type_64bit,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
771 for type in "long" "long long" "__int64"; do |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
772 AC_LANG_SAVE |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
773 AC_LANG_C |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
774 AC_TRY_RUN([ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
775 main() { |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
776 return 8 != sizeof($type); |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
777 } |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
778 ],ctype_64bit=$type,ctype_64bit="unknown",ctype_64bit="long long") |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
779 AC_LANG_CPLUSPLUS |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
780 AC_TRY_RUN([ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
781 int main(int argc, char ** argv) { |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
782 return 8 != sizeof($type); |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
783 } |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
784 ],cxxtype_64bit=$type,cxxtype_64bit="unknown",cxxtype_64bit="long long") |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
785 AC_LANG_RESTORE |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
786 if test "${ctype_64bit}" = "${type}" -a "${cxxtype_64bit}" = "${type}"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
787 ecos_cv_type_64bit="${type}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
788 break |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
789 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
790 done |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
791 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
792 if test "${ecos_cv_type_64bit}" = ""; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
793 AC_MSG_ERROR(Unable to figure out how to do 64 bit arithmetic) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
794 else |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
795 if test "${ecos_cv_type_64bit}" != "long long"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
796 AC_DEFINE_UNQUOTED(cyg_halint64,${ecos_cv_type_64bit}) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
797 AC_DEFINE_UNQUOTED(cyg_halcount64,${ecos_cv_type_64bit}) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
798 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
799 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
800 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
801 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
802 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
803 dnl Check that both the C and C++ compilers support __PRETTY_FUNCTION__ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
804 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
805 AC_DEFUN(ECOS_C_PRETTY_FUNCTION,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
806 AC_REQUIRE([AC_PROG_CC]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
807 AC_REQUIRE([AC_PROG_CXX]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
808 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
809 AC_CACHE_CHECK("for __PRETTY_FUNCTION__ support",ecos_cv_c_pretty_function,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
810 AC_LANG_SAVE |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
811 AC_LANG_C |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
812 AC_TRY_LINK( |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
813 [#include <stdio.h>], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
814 [puts(__PRETTY_FUNCTION__);], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
815 c_ok="yes", |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
816 c_ok="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
817 ) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
818 AC_LANG_CPLUSPLUS |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
819 AC_TRY_LINK( |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
820 [#include <cstdio>], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
821 [puts(__PRETTY_FUNCTION__);], |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
822 cxx_ok="yes", |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
823 cxx_ok="no" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
824 ) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
825 AC_LANG_RESTORE |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
826 if test "${c_ok}" = "yes" -a "${cxx_ok}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
827 ecos_cv_c_pretty_function="yes" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
828 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
829 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
830 if test "${ecos_cv_c_pretty_function}" = "yes"; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
831 AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_PSEUDOMACRO) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
832 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
833 ]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
834 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
835 dnl ==================================================================== |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
836 dnl During installation eCos package-specific host-side code should be |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
837 dnl versioned in the same way as the packages themselves, allowing |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
838 dnl different versions to coexist in one installation. This is analogous |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
839 dnl to having multiple versions of a shared library installed so that |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
840 dnl applications can load whichever one they were linked with. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
841 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
842 dnl To support all this the host-side code needs access to a number |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
843 dnl of directory names: |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
844 dnl ECOS_REPOSITORY e.g. ~/ecc/ecc |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
845 dnl PACKAGE_DIR e.g. hal/synth/arch |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
846 dnl PACKAGE_VERSION e.g. current |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
847 dnl PACKAGE_INSTALL e.g. hal/synth/arch/current |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
848 dnl |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
849 dnl These, together with the standard variable libexecdir, allow |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
850 dnl the host-side code to navigate around both source and install |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
851 dnl trees. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
852 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
853 AC_DEFUN(ECOS_PACKAGE_DIRS,[ |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
854 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
855 dnl srcdir will be something like <path>/packages/<package_path>/<version>/host |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
856 package_dir=`cd ${srcdir} && /bin/pwd` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
857 PACKAGE_VERSION=`dirname ${package_dir}` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
858 PACKAGE_VERSION=`basename ${PACKAGE_VERSION}` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
859 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
860 dnl Now look for an "acsupport" directory as a good way of identifying |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
861 dnl the root of the repository. Assume that this does not clash with |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
862 dnl any real packages in the repository. Also assume that no silly games |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
863 dnl are being played with symlinks. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
864 package_dir=`dirname ${package_dir}` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
865 package_dir=`dirname ${package_dir}` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
866 |
|
311
c0ffaecb376e
Include the following patch, and update affected files.
bartv
parents:
283
diff
changeset
|
867 possibles="${package_dir}/.. ${package_dir}/../.. ${package_dir}/../../.. ${package_dir}/../../../.." |
|
c0ffaecb376e
Include the following patch, and update affected files.
bartv
parents:
283
diff
changeset
|
868 possibles="${possibles} ${package_dir}/../../../../.. ${package_dir}/../../../../../.." |
|
283
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
869 AC_FIND_DIR("acsupport", ${possibles}, repository_root) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
870 if test "${repository_root}" = "" ; then |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
871 AC_MSG_ERROR([Failed to identify this package's position within the eCos repository]) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
872 fi |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
873 dnl repository_root will still contain the ..'s, instead of an absolute path |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
874 ECOS_REPOSITORY=`cd "${repository_root}/packages/pkgconf/.." && /bin/pwd` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
875 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
876 dnl Now we have two absolute paths, so just remove one from the other |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
877 PACKAGE_DIR=`echo ${package_dir} | sed -e "s:${ECOS_REPOSITORY}/::"` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
878 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
879 dnl To avoid creating too many subdirectories on the host-side, turn |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
880 dnl e.g. hal/synth/arch into hal_synth_arch. Theoretically this could |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
881 dnl go wrong because multiple packages could map onto the same string, |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
882 dnl but in practice there should be a net reduction in complexity. |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
883 dnl bartv: / to _ conversion disabled for now, 5 March 2002 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
884 PACKAGE_INSTALL="${PACKAGE_DIR}/${PACKAGE_VERSION}" |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
885 dnl PACKAGE_INSTALL=`echo ${PACKAGE_INSTALL} | sed -e "s:/:_:g"` |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
886 |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
887 AC_SUBST(ECOS_REPOSITORY) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
888 AC_SUBST(PACKAGE_DIR) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
889 AC_SUBST(PACKAGE_VERSION) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
890 AC_SUBST(PACKAGE_INSTALL) |
|
f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff
changeset
|
891 ]) |
