1 |
1026 |
ivang |
# aclocal.m4 generated automatically by aclocal 1.6.2 -*- Autoconf -*-
|
2 |
|
|
|
3 |
|
|
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
4 |
|
|
# Free Software Foundation, Inc.
|
5 |
|
|
# This file is free software; the Free Software Foundation
|
6 |
|
|
# gives unlimited permission to copy and/or distribute it,
|
7 |
|
|
# with or without modifications, as long as this notice is preserved.
|
8 |
|
|
|
9 |
|
|
# This program is distributed in the hope that it will be useful,
|
10 |
|
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
11 |
|
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
12 |
|
|
# PARTICULAR PURPOSE.
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
dnl RTEMS_ARG_VAR(VAR,HELP-STRING)
|
17 |
|
|
dnl An internal macros to have help strings pretty
|
18 |
|
|
dnl printed with configure --help, without letting autoconf spoil config subdir
|
19 |
|
|
dnl environments by trying to propagate them
|
20 |
|
|
dnl Stripped down version of autoconf-2.52's AC_ARG_VAR.
|
21 |
|
|
|
22 |
|
|
AC_DEFUN([_RTEMS_ARG_VAR],
|
23 |
|
|
[
|
24 |
|
|
m4_expand_once([m4_divert_once([HELP_VAR],
|
25 |
|
|
[AC_HELP_STRING([$1], [$2], [ ])])],
|
26 |
|
|
[$0($1)])dnl
|
27 |
|
|
])
|
28 |
|
|
|
29 |
|
|
AC_DEFUN([_RTEMS_SUBST_IFNOT],
|
30 |
|
|
[AS_IF([`echo " [$]$1 " | grep " $2 " > /dev/null`],
|
31 |
|
|
[],
|
32 |
|
|
[AC_SUBST([$1],["[$]$1 $2"])])
|
33 |
|
|
])
|
34 |
|
|
|
35 |
|
|
AC_DEFUN([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS],
|
36 |
|
|
[
|
37 |
|
|
AC_CONFIG_COMMANDS_PRE([
|
38 |
|
|
_RTEMS_BUILD_CONFIG_PREPARE
|
39 |
|
|
_RTEMS_HOST_CONFIG_PREPARE
|
40 |
|
|
_RTEMS_TARGET_CONFIG_PREPARE
|
41 |
|
|
|
42 |
|
|
AS_IF([test $build = $host],
|
43 |
|
|
[
|
44 |
|
|
AS_IF([test $host = $target],
|
45 |
|
|
[dnl b=h, h=t, t=b
|
46 |
|
|
BUILD_SUBDIRS="${build_configdirs}"
|
47 |
|
|
build_configdirs="${build_configdirs}"
|
48 |
|
|
HOST_SUBDIRS=""
|
49 |
|
|
host_configdirs=""
|
50 |
|
|
TARGET_SUBDIRS=""
|
51 |
|
|
target_configdirs=""],
|
52 |
|
|
[dnl b=h, h!=t, t!=b
|
53 |
|
|
BUILD_SUBDIRS="${build_configdirs}"
|
54 |
|
|
build_configdirs="${build_configdirs}"
|
55 |
|
|
HOST_SUBDIRS=""
|
56 |
|
|
host_configdirs=""
|
57 |
|
|
TARGET_SUBDIRS=`echo "${target_configdirs}" | \
|
58 |
|
|
sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
|
59 |
|
|
target_configdirs="${target_configdirs}"
|
60 |
|
|
])
|
61 |
|
|
],[
|
62 |
|
|
AS_IF([test $host = $target],
|
63 |
|
|
[ dnl b!=h, h=t, b!=t
|
64 |
|
|
BUILD_SUBDIRS="${build_configdirs}"
|
65 |
|
|
build_configdirs="${build_configdirs}"
|
66 |
|
|
HOST_SUBDIRS=`echo "${host_configdirs}" | \
|
67 |
|
|
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
|
68 |
|
|
host_configdirs="${host_configdirs}"
|
69 |
|
|
TARGET_SUBDIRS=""
|
70 |
|
|
target_configdirs=""],
|
71 |
|
|
[
|
72 |
|
|
AS_IF([test $build = $target],
|
73 |
|
|
[dnl b!=h, h!=t, b=t
|
74 |
|
|
BUILD_SUBDIRS="${build_configdirs}"
|
75 |
|
|
build_configdirs="${build_configdirs}"
|
76 |
|
|
HOST_SUBDIRS=`echo "${host_configdirs}" | \
|
77 |
|
|
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
|
78 |
|
|
host_configdirs="${host_configdirs}"
|
79 |
|
|
TARGET_SUBDIRS=""
|
80 |
|
|
target_configdirs=""],
|
81 |
|
|
[dnl b!=h, h!=t, b!=t
|
82 |
|
|
BUILD_SUBDIRS="${build_configdirs}"
|
83 |
|
|
build_configdirs="${build_configdirs}"
|
84 |
|
|
HOST_SUBDIRS=`echo "${host_configdirs}" | \
|
85 |
|
|
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
|
86 |
|
|
host_configdirs="${host_configdirs}"
|
87 |
|
|
TARGET_SUBDIRS=`echo "${target_configdirs}" | \
|
88 |
|
|
sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
|
89 |
|
|
target_configdirs="${target_configdirs}"
|
90 |
|
|
])
|
91 |
|
|
])
|
92 |
|
|
])
|
93 |
|
|
|
94 |
|
|
AC_SUBST(HOST_SUBDIRS)
|
95 |
|
|
AC_SUBST(TARGET_SUBDIRS)
|
96 |
|
|
AC_SUBST(BUILD_SUBDIRS)
|
97 |
|
|
])
|
98 |
|
|
|
99 |
|
|
AC_CONFIG_COMMANDS_POST([
|
100 |
|
|
_RTEMS_OUTPUT_SUBDIRS([build],[BUILD])
|
101 |
|
|
_RTEMS_OUTPUT_SUBDIRS([host],[HOST])
|
102 |
|
|
_RTEMS_OUTPUT_SUBDIRS([target],[TARGET])
|
103 |
|
|
])
|
104 |
|
|
])
|
105 |
|
|
|
106 |
|
|
dnl _RTEMS_SRCPATHS(BUILD-DIR-NAME)
|
107 |
|
|
dnl ----------------------------
|
108 |
|
|
dnl Inputs:
|
109 |
|
|
dnl - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src'
|
110 |
|
|
dnl - `$srcdir' is `top-build -> top-src'
|
111 |
|
|
dnl
|
112 |
|
|
dnl Outputs:
|
113 |
|
|
dnl - `ac_builddir' is `.', for symmetry only.
|
114 |
|
|
dnl - `ac_top_builddir' is `build -> top_build'.
|
115 |
|
|
dnl If not empty, has a trailing slash.
|
116 |
|
|
dnl - `ac_srcdir' is `build -> src'.
|
117 |
|
|
dnl - `ac_top_srcdir' is `build -> top-src'.
|
118 |
|
|
dnl
|
119 |
|
|
dnl and `ac_buildpath' etc., the absolute paths.
|
120 |
|
|
m4_define([_RTEMS_SRCPATHS],
|
121 |
|
|
[
|
122 |
|
|
m4_if([$2],,
|
123 |
|
|
[dstdir=$1],
|
124 |
|
|
[case "$2" in
|
125 |
|
|
"." | "" ) # No subdir was given
|
126 |
|
|
dstdir=$1;;
|
127 |
|
|
* ) # A subdir was given
|
128 |
|
|
dstdir=$2/$1;;
|
129 |
|
|
esac])
|
130 |
|
|
ac_builddir=.
|
131 |
|
|
|
132 |
|
|
AS_IF([test $dstdir != .],
|
133 |
|
|
[ # Strip off leading ./
|
134 |
|
|
ac_builddir_suffix=/`echo $dstdir | sed 's,^\.[[\\/]],,'`
|
135 |
|
|
ac_srcdir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'`
|
136 |
|
|
# A "../" for each directory in $ac_dir_suffix.
|
137 |
|
|
ac_top_builddir=`echo "$ac_builddir_suffix" | sed 's,/[[^\\/]]*,../,g'`
|
138 |
|
|
],[
|
139 |
|
|
ac_dir_suffix= ac_top_builddir=
|
140 |
|
|
])
|
141 |
|
|
|
142 |
|
|
case $srcdir in
|
143 |
|
|
.) # No --srcdir option. We are building in place.
|
144 |
|
|
ac_srcdir=.
|
145 |
|
|
if test -z "$ac_top_builddir"; then
|
146 |
|
|
ac_top_srcdir=.
|
147 |
|
|
else
|
148 |
|
|
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
|
149 |
|
|
fi ;;
|
150 |
|
|
[[\\/]]* | ?:[[\\/]]* ) # Absolute path.
|
151 |
|
|
ac_srcdir=$srcdir$ac_srcdir_suffix;
|
152 |
|
|
ac_top_srcdir=$srcdir;
|
153 |
|
|
;;
|
154 |
|
|
*) # Relative path.
|
155 |
|
|
ac_srcdir=$ac_top_builddir$srcdir$ac_srcdir_suffix;
|
156 |
|
|
ac_top_srcdir=$ac_top_builddir$srcdir;
|
157 |
|
|
;;
|
158 |
|
|
esac
|
159 |
|
|
dnl Don't blindly perform a `cd $1/$ac_foo && pwd` since $ac_foo can be
|
160 |
|
|
dnl absolute.
|
161 |
|
|
|
162 |
|
|
ac_buildpath=`cd $dstdir && cd $ac_builddir && pwd`
|
163 |
|
|
ac_top_buildpath=`cd $dstdir && cd $ac_top_builddir && pwd`
|
164 |
|
|
ac_srcpath=`cd $dstdir && cd $ac_srcdir && pwd`
|
165 |
|
|
ac_top_srcpath=`cd $dstdir && cd $ac_top_srcdir && pwd`
|
166 |
|
|
])# _AC_SRCPATHS
|
167 |
|
|
|
168 |
|
|
dnl _RTEMS_OUTPUT_SUBDIRS([host|target|build],[HOST|TARGET|BUILD])
|
169 |
|
|
AC_DEFUN([_RTEMS_OUTPUT_SUBDIRS],[
|
170 |
|
|
m4_ifdef([_RTEMS_$2_CONFIGDIRS_LIST],
|
171 |
|
|
[
|
172 |
|
|
_RTEMS_ARG_VAR([CC_FOR_$2],
|
173 |
|
|
[c-compiler to be used for $1 subdirs (default: auto-detected)])
|
174 |
|
|
_RTEMS_ARG_VAR([CFLAGS_FOR_$2],
|
175 |
|
|
[c-flags to be used for $1 subdirs (default: provided by autoconf)])
|
176 |
|
|
if test "$no_recursion" != yes; then
|
177 |
|
|
|
178 |
|
|
if test -n "${$2_SUBDIRS}"; then
|
179 |
|
|
ac_sub_configure_args=
|
180 |
|
|
ac_prev=
|
181 |
|
|
for ac_arg in $$1args; do
|
182 |
|
|
if test -n "$ac_prev"; then
|
183 |
|
|
ac_prev=
|
184 |
|
|
continue
|
185 |
|
|
fi
|
186 |
|
|
case $ac_arg in
|
187 |
|
|
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
188 |
|
|
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
|
189 |
|
|
ac_prev=cache_file ;;
|
190 |
|
|
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
|
191 |
|
|
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
|
192 |
|
|
| --c=*)
|
193 |
|
|
;;
|
194 |
|
|
--config-cache | -C)
|
195 |
|
|
;;
|
196 |
|
|
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
197 |
|
|
ac_prev=srcdir ;;
|
198 |
|
|
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
199 |
|
|
;;
|
200 |
|
|
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
201 |
|
|
ac_prev=prefix ;;
|
202 |
|
|
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
203 |
|
|
;;
|
204 |
|
|
*) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
|
205 |
|
|
esac
|
206 |
|
|
done
|
207 |
|
|
|
208 |
|
|
# Always prepend --prefix to ensure using the same prefix
|
209 |
|
|
# in subdir configurations.
|
210 |
|
|
ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
|
211 |
|
|
|
212 |
|
|
case "$$1_subdir" in
|
213 |
|
|
"." ) ;;
|
214 |
|
|
* )
|
215 |
|
|
ac_sub_configure_args="$ac_sub_configure_args --with-target-subdir=$$1_subdir --exec-prefix=${prefix}/$$1_subdir"
|
216 |
|
|
;;
|
217 |
|
|
esac
|
218 |
|
|
|
219 |
|
|
# make sure that $1_subdir is not empty
|
220 |
|
|
test -n "$$1_subdir" || $1_subdir="."
|
221 |
|
|
|
222 |
|
|
ac_popdir=`pwd`
|
223 |
|
|
for ac_dir in $$1_configdirs; do
|
224 |
|
|
|
225 |
|
|
# Do not complain, so a configure script can configure whichever
|
226 |
|
|
# parts of a large source tree are present.
|
227 |
|
|
test -d $srcdir/$ac_dir || continue
|
228 |
|
|
|
229 |
|
|
AC_MSG_NOTICE([configuring in $$1_subdir/$ac_dir])
|
230 |
|
|
AS_MKDIR_P(["$$1_subdir/$ac_dir"])
|
231 |
|
|
_RTEMS_SRCPATHS(["$ac_dir"],["$$1_subdir"])
|
232 |
|
|
|
233 |
|
|
cd $$1_subdir/$ac_dir
|
234 |
|
|
|
235 |
|
|
# Check for guested configure; otherwise get Cygnus style configure.
|
236 |
|
|
if test -f $ac_srcdir/configure.gnu; then
|
237 |
|
|
ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
|
238 |
|
|
elif test -f $ac_srcdir/configure; then
|
239 |
|
|
ac_sub_configure="$SHELL '$ac_srcdir/configure'"
|
240 |
|
|
elif test -f $ac_srcdir/configure.in; then
|
241 |
|
|
ac_sub_configure=$ac_configure
|
242 |
|
|
else
|
243 |
|
|
AC_MSG_WARN([no configuration information is in $ac_dir])
|
244 |
|
|
ac_sub_configure=
|
245 |
|
|
fi
|
246 |
|
|
|
247 |
|
|
# The recursion is here.
|
248 |
|
|
if test -n "$ac_sub_configure"; then
|
249 |
|
|
# Make the cache file name correct relative to the subdirectory.
|
250 |
|
|
case $cache_file in
|
251 |
|
|
[[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
|
252 |
|
|
*) # Relative path.
|
253 |
|
|
ac_sub_cache_file=$ac_top_builddir$cache_file ;;
|
254 |
|
|
esac
|
255 |
|
|
|
256 |
|
|
AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args \
|
257 |
|
|
--cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
|
258 |
|
|
# The eval makes quoting arguments work.
|
259 |
|
|
ac_sub_configure_vars=
|
260 |
|
|
test -n "[$]CC_FOR_$2" && \
|
261 |
|
|
ac_sub_configure_vars="CC='[$]CC_FOR_$2'"
|
262 |
|
|
test -n "[$]CFLAGS_FOR_$2" && \
|
263 |
|
|
ac_sub_configure_vars="$ac_sub_configure_vars CFLAGS='[$]CFLAGS_FOR_$2'"
|
264 |
|
|
eval $ac_sub_configure_vars \
|
265 |
|
|
$ac_sub_configure $ac_sub_configure_args \
|
266 |
|
|
--cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
|
267 |
|
|
AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
|
268 |
|
|
fi
|
269 |
|
|
|
270 |
|
|
cd $ac_popdir
|
271 |
|
|
done
|
272 |
|
|
fi
|
273 |
|
|
fi
|
274 |
|
|
])
|
275 |
|
|
])
|
276 |
|
|
|
277 |
|
|
# subdirs to be built for the build environment
|
278 |
|
|
AC_DEFUN([RTEMS_BUILD_CONFIG_SUBDIRS],[
|
279 |
|
|
m4_append([_RTEMS_BUILD_CONFIGDIRS_LIST],[ $1])
|
280 |
|
|
dnl Always append to build_configdirs
|
281 |
|
|
AC_SUBST(build_configdirs,"$build_configdirs $1")
|
282 |
|
|
|
283 |
|
|
m4_divert_text([DEFAULTS],
|
284 |
|
|
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
|
285 |
|
|
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
|
286 |
|
|
])
|
287 |
|
|
|
288 |
|
|
AC_DEFUN(_RTEMS_BUILD_CONFIG_PREPARE,[
|
289 |
|
|
# Record the configure arguments in Makefile.
|
290 |
|
|
m4_ifdef([_RTEMS_BUILD_CONFIGDIRS_LIST],
|
291 |
|
|
[
|
292 |
|
|
buildargs=`echo "${ac_configure_args}" | \
|
293 |
|
|
sed -e 's/--no[[^ ]]*//' \
|
294 |
|
|
-e 's/--cache[[a-z-]]*=[[^ ]]*//' \
|
295 |
|
|
-e 's/--ho[[a-z-]]*=[[^ ]]*//' \
|
296 |
|
|
-e 's/--bu[[a-z-]]*=[[^ ]]*//' \
|
297 |
|
|
-e 's/--ta[[a-z-]]*=[[^ ]]*//' \
|
298 |
|
|
-e 's/[[^ ]]*alias=[[^ ]]*//g'` ;
|
299 |
|
|
|
300 |
|
|
buildargs="--host=${build} --build=${build} --target=${target_alias} ${buildargs}"
|
301 |
|
|
AC_SUBST(buildargs)
|
302 |
|
|
|
303 |
|
|
build_subdir="."
|
304 |
|
|
],[])
|
305 |
|
|
])
|
306 |
|
|
|
307 |
|
|
# subdirs to be build for the host environment
|
308 |
|
|
AC_DEFUN([RTEMS_HOST_CONFIG_SUBDIRS],[
|
309 |
|
|
m4_append([_RTEMS_HOST_CONFIGDIRS_LIST],[ $1])dnl
|
310 |
|
|
|
311 |
|
|
if test $build = $host;
|
312 |
|
|
then
|
313 |
|
|
if test $host = $target;
|
314 |
|
|
then
|
315 |
|
|
_RTEMS_SUBST_IFNOT([build_configdirs],[$1])
|
316 |
|
|
else
|
317 |
|
|
_RTEMS_SUBST_IFNOT([build_configdirs],[$1])
|
318 |
|
|
fi
|
319 |
|
|
else
|
320 |
|
|
if test $host = $target;
|
321 |
|
|
then
|
322 |
|
|
_RTEMS_SUBST_IFNOT([host_configdirs],[$1])
|
323 |
|
|
else
|
324 |
|
|
if test $build = $target;
|
325 |
|
|
then
|
326 |
|
|
_RTEMS_SUBST_IFNOT([host_configdirs],[$1])
|
327 |
|
|
else
|
328 |
|
|
_RTEMS_SUBST_IFNOT([host_configdirs],[$1])
|
329 |
|
|
fi
|
330 |
|
|
fi
|
331 |
|
|
fi
|
332 |
|
|
|
333 |
|
|
m4_divert_text([DEFAULTS],
|
334 |
|
|
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
|
335 |
|
|
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
|
336 |
|
|
])
|
337 |
|
|
|
338 |
|
|
AC_DEFUN(_RTEMS_HOST_CONFIG_PREPARE,[
|
339 |
|
|
m4_ifdef([_RTEMS_HOST_CONFIGDIRS_LIST],
|
340 |
|
|
[
|
341 |
|
|
# Record configure arguments in Makefile.
|
342 |
|
|
hostargs=`echo "${ac_configure_args}" | \
|
343 |
|
|
sed -e 's/--no[[^ ]]*//' \
|
344 |
|
|
-e 's/--cache[[a-z-]]*=[[^ ]]*//' \
|
345 |
|
|
-e 's/--ho[[a-z-]]*=[[^ ]]*//' \
|
346 |
|
|
-e 's/--bu[[a-z-]]*=[[^ ]]*//' \
|
347 |
|
|
-e 's/--ta[[a-z-]]*=[[^ ]]*//' \
|
348 |
|
|
-e 's/[[^ ]]*alias=[[^ ]]*//g'` ;
|
349 |
|
|
|
350 |
|
|
hostargs="--host=${host_alias} --build=${build} --target=${target_alias} ${hostargs}"
|
351 |
|
|
AC_SUBST(hostargs)
|
352 |
|
|
|
353 |
|
|
host_subdir="${host_alias}"
|
354 |
|
|
],[])
|
355 |
|
|
])
|
356 |
|
|
|
357 |
|
|
# subdirs to be build for the target environment
|
358 |
|
|
AC_DEFUN([RTEMS_TARGET_CONFIG_SUBDIRS],[
|
359 |
|
|
m4_append([_RTEMS_TARGET_CONFIGDIRS_LIST],[ $1])
|
360 |
|
|
|
361 |
|
|
if test $build = $host;
|
362 |
|
|
then
|
363 |
|
|
if test $host = $target;
|
364 |
|
|
then
|
365 |
|
|
_RTEMS_SUBST_IFNOT([build_configdirs],[$1])
|
366 |
|
|
else
|
367 |
|
|
_RTEMS_SUBST_IFNOT([target_configdirs],[$1])
|
368 |
|
|
fi
|
369 |
|
|
else
|
370 |
|
|
if test $host = $target;
|
371 |
|
|
then
|
372 |
|
|
_RTEMS_SUBST_IFNOT([host_configdirs],[$1])
|
373 |
|
|
else
|
374 |
|
|
if test $build = $target;
|
375 |
|
|
then
|
376 |
|
|
_RTEMS_SUBST_IFNOT([build_configdirs],[$1])
|
377 |
|
|
else
|
378 |
|
|
_RTEMS_SUBST_IFNOT([target_configdirs],[$1])
|
379 |
|
|
fi
|
380 |
|
|
fi
|
381 |
|
|
fi
|
382 |
|
|
|
383 |
|
|
m4_divert_text([DEFAULTS],
|
384 |
|
|
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
|
385 |
|
|
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
|
386 |
|
|
])
|
387 |
|
|
|
388 |
|
|
AC_DEFUN(_RTEMS_TARGET_CONFIG_PREPARE,[
|
389 |
|
|
m4_ifdef([_RTEMS_TARGET_CONFIGDIRS_LIST],
|
390 |
|
|
[
|
391 |
|
|
# Record the configure arguments in Makefile.
|
392 |
|
|
targetargs=`echo "${ac_configure_args}" | \
|
393 |
|
|
sed -e 's/--no[[^ ]]*//' \
|
394 |
|
|
-e 's/--cache[[a-z-]]*=[[^ ]]*//' \
|
395 |
|
|
-e 's/--ho[[a-z-]]*=[[^ ]]*//' \
|
396 |
|
|
-e 's/--bu[[a-z-]]*=[[^ ]]*//' \
|
397 |
|
|
-e 's/--ta[[a-z-]]*=[[^ ]]*//' \
|
398 |
|
|
-e 's/[[^ ]]*alias=[[^ ]]*//g'` ;
|
399 |
|
|
|
400 |
|
|
targetargs="--host=${target_alias} --build=${build} --target=${target_alias} ${targetargs}"
|
401 |
|
|
AC_SUBST(targetargs)
|
402 |
|
|
|
403 |
|
|
target_subdir="${target_alias}"
|
404 |
|
|
],[])
|
405 |
|
|
])
|
406 |
|
|
|
407 |
|
|
dnl rtems-top.m4,v 1.14 2002/03/28 13:53:19 joel Exp
|
408 |
|
|
|
409 |
|
|
dnl
|
410 |
|
|
dnl RTEMS_TOP($1)
|
411 |
|
|
dnl
|
412 |
|
|
dnl $1 .. relative path from this configure.in to the toplevel configure.in
|
413 |
|
|
dnl
|
414 |
|
|
AC_DEFUN(RTEMS_TOP,
|
415 |
|
|
[dnl
|
416 |
|
|
AC_REQUIRE([RTEMS_VERSIONING])
|
417 |
|
|
AC_CHECK_PROGS(MAKE, gmake make)
|
418 |
|
|
AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
|
419 |
|
|
AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
|
420 |
|
|
|
421 |
|
|
AC_PREFIX_DEFAULT([/opt/rtems])
|
422 |
|
|
|
423 |
|
|
ENDIF=endif
|
424 |
|
|
AC_SUBST(ENDIF)
|
425 |
|
|
|
426 |
|
|
RTEMS_TOPdir="$1";
|
427 |
|
|
AC_SUBST(RTEMS_TOPdir)
|
428 |
|
|
|
429 |
|
|
test -n "$with_target_subdir" || with_target_subdir="."
|
430 |
|
|
|
431 |
|
|
if test "$with_target_subdir" = "." ; then
|
432 |
|
|
# Native
|
433 |
|
|
PROJECT_TOPdir=${RTEMS_TOPdir}/'$(top_builddir)'
|
434 |
|
|
else
|
435 |
|
|
# Cross
|
436 |
|
|
dots=`echo $with_target_subdir|\
|
437 |
|
|
sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
|
438 |
|
|
PROJECT_TOPdir=${dots}${RTEMS_TOPdir}/'$(top_builddir)'
|
439 |
|
|
fi
|
440 |
|
|
AC_SUBST(PROJECT_TOPdir)
|
441 |
|
|
|
442 |
|
|
if test "$with_target_subdir" = "." ; then
|
443 |
|
|
# Native
|
444 |
|
|
PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
|
445 |
|
|
else
|
446 |
|
|
# Cross
|
447 |
|
|
PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
|
448 |
|
|
fi
|
449 |
|
|
AC_SUBST(PROJECT_ROOT)
|
450 |
|
|
|
451 |
|
|
AC_MSG_CHECKING([for RTEMS Version])
|
452 |
|
|
AS_IF([test -r "${srcdir}/${RTEMS_TOPdir}/aclocal/version.m4"],
|
453 |
|
|
[],
|
454 |
|
|
[AC_MSG_ERROR([Unable to find ${RTEMS_TOPdir}/aclocal/version.m4])])
|
455 |
|
|
AC_MSG_RESULT([_RTEMS_VERSION])
|
456 |
|
|
])dnl
|
457 |
|
|
|
458 |
|
|
AC_DEFUN([RTEMS_VERSIONING],
|
459 |
|
|
m4_define([_RTEMS_VERSION],[ss-20020807]))
|
460 |
|
|
|
461 |
|
|
# Do all the work for Automake. -*- Autoconf -*-
|
462 |
|
|
|
463 |
|
|
# This macro actually does too much some checks are only needed if
|
464 |
|
|
# your package does certain things. But this isn't really a big deal.
|
465 |
|
|
|
466 |
|
|
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
467 |
|
|
# Free Software Foundation, Inc.
|
468 |
|
|
|
469 |
|
|
# This program is free software; you can redistribute it and/or modify
|
470 |
|
|
# it under the terms of the GNU General Public License as published by
|
471 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
472 |
|
|
# any later version.
|
473 |
|
|
|
474 |
|
|
# This program is distributed in the hope that it will be useful,
|
475 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
476 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
477 |
|
|
# GNU General Public License for more details.
|
478 |
|
|
|
479 |
|
|
# You should have received a copy of the GNU General Public License
|
480 |
|
|
# along with this program; if not, write to the Free Software
|
481 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
482 |
|
|
# 02111-1307, USA.
|
483 |
|
|
|
484 |
|
|
# serial 8
|
485 |
|
|
|
486 |
|
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
487 |
|
|
# written in clear, in which case automake, when reading aclocal.m4,
|
488 |
|
|
# will think it sees a *use*, and therefore will trigger all it's
|
489 |
|
|
# C support machinery. Also note that it means that autoscan, seeing
|
490 |
|
|
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
491 |
|
|
|
492 |
|
|
|
493 |
|
|
AC_PREREQ([2.52])
|
494 |
|
|
|
495 |
|
|
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
|
496 |
|
|
# the ones we care about.
|
497 |
|
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
498 |
|
|
|
499 |
|
|
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
500 |
|
|
# AM_INIT_AUTOMAKE([OPTIONS])
|
501 |
|
|
# -----------------------------------------------
|
502 |
|
|
# The call with PACKAGE and VERSION arguments is the old style
|
503 |
|
|
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
504 |
|
|
# and VERSION should now be passed to AC_INIT and removed from
|
505 |
|
|
# the call to AM_INIT_AUTOMAKE.
|
506 |
|
|
# We support both call styles for the transition. After
|
507 |
|
|
# the next Automake release, Autoconf can make the AC_INIT
|
508 |
|
|
# arguments mandatory, and then we can depend on a new Autoconf
|
509 |
|
|
# release and drop the old call support.
|
510 |
|
|
AC_DEFUN([AM_INIT_AUTOMAKE],
|
511 |
|
|
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
512 |
|
|
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
513 |
|
|
# test to see if srcdir already configured
|
514 |
|
|
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
515 |
|
|
test -f $srcdir/config.status; then
|
516 |
|
|
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
517 |
|
|
fi
|
518 |
|
|
|
519 |
|
|
# Define the identity of the package.
|
520 |
|
|
dnl Distinguish between old-style and new-style calls.
|
521 |
|
|
m4_ifval([$2],
|
522 |
|
|
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
523 |
|
|
AC_SUBST([PACKAGE], [$1])dnl
|
524 |
|
|
AC_SUBST([VERSION], [$2])],
|
525 |
|
|
[_AM_SET_OPTIONS([$1])dnl
|
526 |
|
|
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
|
527 |
|
|
AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
|
528 |
|
|
|
529 |
|
|
_AM_IF_OPTION([no-define],,
|
530 |
|
|
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
531 |
|
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
532 |
|
|
|
533 |
|
|
# Some tools Automake needs.
|
534 |
|
|
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
535 |
|
|
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
536 |
|
|
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
537 |
|
|
AM_MISSING_PROG(AUTOCONF, autoconf)
|
538 |
|
|
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
539 |
|
|
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
540 |
|
|
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
541 |
|
|
AM_MISSING_PROG(AMTAR, tar)
|
542 |
|
|
AM_PROG_INSTALL_SH
|
543 |
|
|
AM_PROG_INSTALL_STRIP
|
544 |
|
|
# We need awk for the "check" target. The system "awk" is bad on
|
545 |
|
|
# some platforms.
|
546 |
|
|
AC_REQUIRE([AC_PROG_AWK])dnl
|
547 |
|
|
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
548 |
|
|
|
549 |
|
|
_AM_IF_OPTION([no-dependencies],,
|
550 |
|
|
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
|
551 |
|
|
[_AM_DEPENDENCIES(CC)],
|
552 |
|
|
[define([AC_PROG_][CC],
|
553 |
|
|
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
|
554 |
|
|
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
|
555 |
|
|
[_AM_DEPENDENCIES(CXX)],
|
556 |
|
|
[define([AC_PROG_][CXX],
|
557 |
|
|
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
558 |
|
|
])
|
559 |
|
|
])
|
560 |
|
|
|
561 |
|
|
# Copyright 2002 Free Software Foundation, Inc.
|
562 |
|
|
|
563 |
|
|
# This program is free software; you can redistribute it and/or modify
|
564 |
|
|
# it under the terms of the GNU General Public License as published by
|
565 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
566 |
|
|
# any later version.
|
567 |
|
|
|
568 |
|
|
# This program is distributed in the hope that it will be useful,
|
569 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
570 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
571 |
|
|
# GNU General Public License for more details.
|
572 |
|
|
|
573 |
|
|
# You should have received a copy of the GNU General Public License
|
574 |
|
|
# along with this program; if not, write to the Free Software
|
575 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
576 |
|
|
|
577 |
|
|
# AM_AUTOMAKE_VERSION(VERSION)
|
578 |
|
|
# ----------------------------
|
579 |
|
|
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
580 |
|
|
# generated from the m4 files accompanying Automake X.Y.
|
581 |
|
|
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
|
582 |
|
|
|
583 |
|
|
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
584 |
|
|
# -------------------------------
|
585 |
|
|
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
586 |
|
|
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
587 |
|
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
588 |
|
|
[AM_AUTOMAKE_VERSION([1.6.2])])
|
589 |
|
|
|
590 |
|
|
# Helper functions for option handling. -*- Autoconf -*-
|
591 |
|
|
|
592 |
|
|
# Copyright 2001, 2002 Free Software Foundation, Inc.
|
593 |
|
|
|
594 |
|
|
# This program is free software; you can redistribute it and/or modify
|
595 |
|
|
# it under the terms of the GNU General Public License as published by
|
596 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
597 |
|
|
# any later version.
|
598 |
|
|
|
599 |
|
|
# This program is distributed in the hope that it will be useful,
|
600 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
601 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
602 |
|
|
# GNU General Public License for more details.
|
603 |
|
|
|
604 |
|
|
# You should have received a copy of the GNU General Public License
|
605 |
|
|
# along with this program; if not, write to the Free Software
|
606 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
607 |
|
|
# 02111-1307, USA.
|
608 |
|
|
|
609 |
|
|
# serial 2
|
610 |
|
|
|
611 |
|
|
# _AM_MANGLE_OPTION(NAME)
|
612 |
|
|
# -----------------------
|
613 |
|
|
AC_DEFUN([_AM_MANGLE_OPTION],
|
614 |
|
|
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
615 |
|
|
|
616 |
|
|
# _AM_SET_OPTION(NAME)
|
617 |
|
|
# ------------------------------
|
618 |
|
|
# Set option NAME. Presently that only means defining a flag for this option.
|
619 |
|
|
AC_DEFUN([_AM_SET_OPTION],
|
620 |
|
|
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
621 |
|
|
|
622 |
|
|
# _AM_SET_OPTIONS(OPTIONS)
|
623 |
|
|
# ----------------------------------
|
624 |
|
|
# OPTIONS is a space-separated list of Automake options.
|
625 |
|
|
AC_DEFUN([_AM_SET_OPTIONS],
|
626 |
|
|
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
627 |
|
|
|
628 |
|
|
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
629 |
|
|
# -------------------------------------------
|
630 |
|
|
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
631 |
|
|
AC_DEFUN([_AM_IF_OPTION],
|
632 |
|
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
633 |
|
|
|
634 |
|
|
#
|
635 |
|
|
# Check to make sure that the build environment is sane.
|
636 |
|
|
#
|
637 |
|
|
|
638 |
|
|
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
|
639 |
|
|
|
640 |
|
|
# This program is free software; you can redistribute it and/or modify
|
641 |
|
|
# it under the terms of the GNU General Public License as published by
|
642 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
643 |
|
|
# any later version.
|
644 |
|
|
|
645 |
|
|
# This program is distributed in the hope that it will be useful,
|
646 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
647 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
648 |
|
|
# GNU General Public License for more details.
|
649 |
|
|
|
650 |
|
|
# You should have received a copy of the GNU General Public License
|
651 |
|
|
# along with this program; if not, write to the Free Software
|
652 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
653 |
|
|
# 02111-1307, USA.
|
654 |
|
|
|
655 |
|
|
# serial 3
|
656 |
|
|
|
657 |
|
|
# AM_SANITY_CHECK
|
658 |
|
|
# ---------------
|
659 |
|
|
AC_DEFUN([AM_SANITY_CHECK],
|
660 |
|
|
[AC_MSG_CHECKING([whether build environment is sane])
|
661 |
|
|
# Just in case
|
662 |
|
|
sleep 1
|
663 |
|
|
echo timestamp > conftest.file
|
664 |
|
|
# Do `set' in a subshell so we don't clobber the current shell's
|
665 |
|
|
# arguments. Must try -L first in case configure is actually a
|
666 |
|
|
# symlink; some systems play weird games with the mod time of symlinks
|
667 |
|
|
# (eg FreeBSD returns the mod time of the symlink's containing
|
668 |
|
|
# directory).
|
669 |
|
|
if (
|
670 |
|
|
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
671 |
|
|
if test "$[*]" = "X"; then
|
672 |
|
|
# -L didn't work.
|
673 |
|
|
set X `ls -t $srcdir/configure conftest.file`
|
674 |
|
|
fi
|
675 |
|
|
rm -f conftest.file
|
676 |
|
|
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
677 |
|
|
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
678 |
|
|
|
679 |
|
|
# If neither matched, then we have a broken ls. This can happen
|
680 |
|
|
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
681 |
|
|
# broken ls alias from the environment. This has actually
|
682 |
|
|
# happened. Such a system could not be considered "sane".
|
683 |
|
|
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
684 |
|
|
alias in your environment])
|
685 |
|
|
fi
|
686 |
|
|
|
687 |
|
|
test "$[2]" = conftest.file
|
688 |
|
|
)
|
689 |
|
|
then
|
690 |
|
|
# Ok.
|
691 |
|
|
:
|
692 |
|
|
else
|
693 |
|
|
AC_MSG_ERROR([newly created file is older than distributed files!
|
694 |
|
|
Check your system clock])
|
695 |
|
|
fi
|
696 |
|
|
AC_MSG_RESULT(yes)])
|
697 |
|
|
|
698 |
|
|
# -*- Autoconf -*-
|
699 |
|
|
|
700 |
|
|
|
701 |
|
|
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
702 |
|
|
|
703 |
|
|
# This program is free software; you can redistribute it and/or modify
|
704 |
|
|
# it under the terms of the GNU General Public License as published by
|
705 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
706 |
|
|
# any later version.
|
707 |
|
|
|
708 |
|
|
# This program is distributed in the hope that it will be useful,
|
709 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
710 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
711 |
|
|
# GNU General Public License for more details.
|
712 |
|
|
|
713 |
|
|
# You should have received a copy of the GNU General Public License
|
714 |
|
|
# along with this program; if not, write to the Free Software
|
715 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
716 |
|
|
# 02111-1307, USA.
|
717 |
|
|
|
718 |
|
|
# serial 3
|
719 |
|
|
|
720 |
|
|
# AM_MISSING_PROG(NAME, PROGRAM)
|
721 |
|
|
# ------------------------------
|
722 |
|
|
AC_DEFUN([AM_MISSING_PROG],
|
723 |
|
|
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
724 |
|
|
$1=${$1-"${am_missing_run}$2"}
|
725 |
|
|
AC_SUBST($1)])
|
726 |
|
|
|
727 |
|
|
|
728 |
|
|
# AM_MISSING_HAS_RUN
|
729 |
|
|
# ------------------
|
730 |
|
|
# Define MISSING if not defined so far and test if it supports --run.
|
731 |
|
|
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
732 |
|
|
AC_DEFUN([AM_MISSING_HAS_RUN],
|
733 |
|
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
734 |
|
|
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
735 |
|
|
# Use eval to expand $SHELL
|
736 |
|
|
if eval "$MISSING --run true"; then
|
737 |
|
|
am_missing_run="$MISSING --run "
|
738 |
|
|
else
|
739 |
|
|
am_missing_run=
|
740 |
|
|
AC_MSG_WARN([`missing' script is too old or missing])
|
741 |
|
|
fi
|
742 |
|
|
])
|
743 |
|
|
|
744 |
|
|
# AM_AUX_DIR_EXPAND
|
745 |
|
|
|
746 |
|
|
# Copyright 2001 Free Software Foundation, Inc.
|
747 |
|
|
|
748 |
|
|
# This program is free software; you can redistribute it and/or modify
|
749 |
|
|
# it under the terms of the GNU General Public License as published by
|
750 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
751 |
|
|
# any later version.
|
752 |
|
|
|
753 |
|
|
# This program is distributed in the hope that it will be useful,
|
754 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
755 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
756 |
|
|
# GNU General Public License for more details.
|
757 |
|
|
|
758 |
|
|
# You should have received a copy of the GNU General Public License
|
759 |
|
|
# along with this program; if not, write to the Free Software
|
760 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
761 |
|
|
# 02111-1307, USA.
|
762 |
|
|
|
763 |
|
|
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
764 |
|
|
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
765 |
|
|
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
766 |
|
|
#
|
767 |
|
|
# Of course, Automake must honor this variable whenever it calls a
|
768 |
|
|
# tool from the auxiliary directory. The problem is that $srcdir (and
|
769 |
|
|
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
770 |
|
|
# depending on how configure is run. This is pretty annoying, since
|
771 |
|
|
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
772 |
|
|
# source directory, any form will work fine, but in subdirectories a
|
773 |
|
|
# relative path needs to be adjusted first.
|
774 |
|
|
#
|
775 |
|
|
# $ac_aux_dir/missing
|
776 |
|
|
# fails when called from a subdirectory if $ac_aux_dir is relative
|
777 |
|
|
# $top_srcdir/$ac_aux_dir/missing
|
778 |
|
|
# fails if $ac_aux_dir is absolute,
|
779 |
|
|
# fails when called from a subdirectory in a VPATH build with
|
780 |
|
|
# a relative $ac_aux_dir
|
781 |
|
|
#
|
782 |
|
|
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
783 |
|
|
# are both prefixed by $srcdir. In an in-source build this is usually
|
784 |
|
|
# harmless because $srcdir is `.', but things will broke when you
|
785 |
|
|
# start a VPATH build or use an absolute $srcdir.
|
786 |
|
|
#
|
787 |
|
|
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
788 |
|
|
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
789 |
|
|
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
790 |
|
|
# and then we would define $MISSING as
|
791 |
|
|
# MISSING="\${SHELL} $am_aux_dir/missing"
|
792 |
|
|
# This will work as long as MISSING is not called from configure, because
|
793 |
|
|
# unfortunately $(top_srcdir) has no meaning in configure.
|
794 |
|
|
# However there are other variables, like CC, which are often used in
|
795 |
|
|
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
796 |
|
|
#
|
797 |
|
|
# Another solution, used here, is to always expand $ac_aux_dir to an
|
798 |
|
|
# absolute PATH. The drawback is that using absolute paths prevent a
|
799 |
|
|
# configured tree to be moved without reconfiguration.
|
800 |
|
|
|
801 |
|
|
# Rely on autoconf to set up CDPATH properly.
|
802 |
|
|
AC_PREREQ([2.50])
|
803 |
|
|
|
804 |
|
|
AC_DEFUN([AM_AUX_DIR_EXPAND], [
|
805 |
|
|
# expand $ac_aux_dir to an absolute path
|
806 |
|
|
am_aux_dir=`cd $ac_aux_dir && pwd`
|
807 |
|
|
])
|
808 |
|
|
|
809 |
|
|
# AM_PROG_INSTALL_SH
|
810 |
|
|
# ------------------
|
811 |
|
|
# Define $install_sh.
|
812 |
|
|
|
813 |
|
|
# Copyright 2001 Free Software Foundation, Inc.
|
814 |
|
|
|
815 |
|
|
# This program is free software; you can redistribute it and/or modify
|
816 |
|
|
# it under the terms of the GNU General Public License as published by
|
817 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
818 |
|
|
# any later version.
|
819 |
|
|
|
820 |
|
|
# This program is distributed in the hope that it will be useful,
|
821 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
822 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
823 |
|
|
# GNU General Public License for more details.
|
824 |
|
|
|
825 |
|
|
# You should have received a copy of the GNU General Public License
|
826 |
|
|
# along with this program; if not, write to the Free Software
|
827 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
828 |
|
|
# 02111-1307, USA.
|
829 |
|
|
|
830 |
|
|
AC_DEFUN([AM_PROG_INSTALL_SH],
|
831 |
|
|
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
832 |
|
|
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
833 |
|
|
AC_SUBST(install_sh)])
|
834 |
|
|
|
835 |
|
|
# AM_PROG_INSTALL_STRIP
|
836 |
|
|
|
837 |
|
|
# Copyright 2001 Free Software Foundation, Inc.
|
838 |
|
|
|
839 |
|
|
# This program is free software; you can redistribute it and/or modify
|
840 |
|
|
# it under the terms of the GNU General Public License as published by
|
841 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
842 |
|
|
# any later version.
|
843 |
|
|
|
844 |
|
|
# This program is distributed in the hope that it will be useful,
|
845 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
846 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
847 |
|
|
# GNU General Public License for more details.
|
848 |
|
|
|
849 |
|
|
# You should have received a copy of the GNU General Public License
|
850 |
|
|
# along with this program; if not, write to the Free Software
|
851 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
852 |
|
|
# 02111-1307, USA.
|
853 |
|
|
|
854 |
|
|
# One issue with vendor `install' (even GNU) is that you can't
|
855 |
|
|
# specify the program used to strip binaries. This is especially
|
856 |
|
|
# annoying in cross-compiling environments, where the build's strip
|
857 |
|
|
# is unlikely to handle the host's binaries.
|
858 |
|
|
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
859 |
|
|
# always use install-sh in `make install-strip', and initialize
|
860 |
|
|
# STRIPPROG with the value of the STRIP variable (set by the user).
|
861 |
|
|
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
862 |
|
|
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
863 |
|
|
# Installed binaries are usually stripped using `strip' when the user
|
864 |
|
|
# run `make install-strip'. However `strip' might not be the right
|
865 |
|
|
# tool to use in cross-compilation environments, therefore Automake
|
866 |
|
|
# will honor the `STRIP' environment variable to overrule this program.
|
867 |
|
|
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
868 |
|
|
if test "$cross_compiling" != no; then
|
869 |
|
|
AC_CHECK_TOOL([STRIP], [strip], :)
|
870 |
|
|
fi
|
871 |
|
|
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
872 |
|
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
873 |
|
|
|
874 |
|
|
# serial 4 -*- Autoconf -*-
|
875 |
|
|
|
876 |
|
|
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
|
877 |
|
|
|
878 |
|
|
# This program is free software; you can redistribute it and/or modify
|
879 |
|
|
# it under the terms of the GNU General Public License as published by
|
880 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
881 |
|
|
# any later version.
|
882 |
|
|
|
883 |
|
|
# This program is distributed in the hope that it will be useful,
|
884 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
885 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
886 |
|
|
# GNU General Public License for more details.
|
887 |
|
|
|
888 |
|
|
# You should have received a copy of the GNU General Public License
|
889 |
|
|
# along with this program; if not, write to the Free Software
|
890 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
891 |
|
|
# 02111-1307, USA.
|
892 |
|
|
|
893 |
|
|
|
894 |
|
|
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
895 |
|
|
# written in clear, in which case automake, when reading aclocal.m4,
|
896 |
|
|
# will think it sees a *use*, and therefore will trigger all it's
|
897 |
|
|
# C support machinery. Also note that it means that autoscan, seeing
|
898 |
|
|
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
899 |
|
|
|
900 |
|
|
|
901 |
|
|
|
902 |
|
|
# _AM_DEPENDENCIES(NAME)
|
903 |
|
|
# ----------------------
|
904 |
|
|
# See how the compiler implements dependency checking.
|
905 |
|
|
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
906 |
|
|
# We try a few techniques and use that to set a single cache variable.
|
907 |
|
|
#
|
908 |
|
|
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
909 |
|
|
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
910 |
|
|
# dependency, and given that the user is not expected to run this macro,
|
911 |
|
|
# just rely on AC_PROG_CC.
|
912 |
|
|
AC_DEFUN([_AM_DEPENDENCIES],
|
913 |
|
|
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
914 |
|
|
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
915 |
|
|
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
916 |
|
|
AC_REQUIRE([AM_DEP_TRACK])dnl
|
917 |
|
|
|
918 |
|
|
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
919 |
|
|
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
920 |
|
|
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
921 |
|
|
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
922 |
|
|
[depcc="$$1" am_compiler_list=])
|
923 |
|
|
|
924 |
|
|
AC_CACHE_CHECK([dependency style of $depcc],
|
925 |
|
|
[am_cv_$1_dependencies_compiler_type],
|
926 |
|
|
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
927 |
|
|
# We make a subdir and do the tests there. Otherwise we can end up
|
928 |
|
|
# making bogus files that we don't know about and never remove. For
|
929 |
|
|
# instance it was reported that on HP-UX the gcc test will end up
|
930 |
|
|
# making a dummy file named `D' -- because `-MD' means `put the output
|
931 |
|
|
# in D'.
|
932 |
|
|
mkdir conftest.dir
|
933 |
|
|
# Copy depcomp to subdir because otherwise we won't find it if we're
|
934 |
|
|
# using a relative directory.
|
935 |
|
|
cp "$am_depcomp" conftest.dir
|
936 |
|
|
cd conftest.dir
|
937 |
|
|
|
938 |
|
|
am_cv_$1_dependencies_compiler_type=none
|
939 |
|
|
if test "$am_compiler_list" = ""; then
|
940 |
|
|
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
941 |
|
|
fi
|
942 |
|
|
for depmode in $am_compiler_list; do
|
943 |
|
|
# We need to recreate these files for each test, as the compiler may
|
944 |
|
|
# overwrite some of them when testing with obscure command lines.
|
945 |
|
|
# This happens at least with the AIX C compiler.
|
946 |
|
|
echo '#include "conftest.h"' > conftest.c
|
947 |
|
|
echo 'int i;' > conftest.h
|
948 |
|
|
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
|
949 |
|
|
|
950 |
|
|
case $depmode in
|
951 |
|
|
nosideeffect)
|
952 |
|
|
# after this tag, mechanisms are not by side-effect, so they'll
|
953 |
|
|
# only be used when explicitly requested
|
954 |
|
|
if test "x$enable_dependency_tracking" = xyes; then
|
955 |
|
|
continue
|
956 |
|
|
else
|
957 |
|
|
break
|
958 |
|
|
fi
|
959 |
|
|
;;
|
960 |
|
|
none) break ;;
|
961 |
|
|
esac
|
962 |
|
|
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
963 |
|
|
# mode. It turns out that the SunPro C++ compiler does not properly
|
964 |
|
|
# handle `-M -o', and we need to detect this.
|
965 |
|
|
if depmode=$depmode \
|
966 |
|
|
source=conftest.c object=conftest.o \
|
967 |
|
|
depfile=conftest.Po tmpdepfile=conftest.TPo \
|
968 |
|
|
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
|
969 |
|
|
grep conftest.h conftest.Po > /dev/null 2>&1 &&
|
970 |
|
|
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
971 |
|
|
am_cv_$1_dependencies_compiler_type=$depmode
|
972 |
|
|
break
|
973 |
|
|
fi
|
974 |
|
|
done
|
975 |
|
|
|
976 |
|
|
cd ..
|
977 |
|
|
rm -rf conftest.dir
|
978 |
|
|
else
|
979 |
|
|
am_cv_$1_dependencies_compiler_type=none
|
980 |
|
|
fi
|
981 |
|
|
])
|
982 |
|
|
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
983 |
|
|
])
|
984 |
|
|
|
985 |
|
|
|
986 |
|
|
# AM_SET_DEPDIR
|
987 |
|
|
# -------------
|
988 |
|
|
# Choose a directory name for dependency files.
|
989 |
|
|
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
990 |
|
|
AC_DEFUN([AM_SET_DEPDIR],
|
991 |
|
|
[rm -f .deps 2>/dev/null
|
992 |
|
|
mkdir .deps 2>/dev/null
|
993 |
|
|
if test -d .deps; then
|
994 |
|
|
DEPDIR=.deps
|
995 |
|
|
else
|
996 |
|
|
# MS-DOS does not allow filenames that begin with a dot.
|
997 |
|
|
DEPDIR=_deps
|
998 |
|
|
fi
|
999 |
|
|
rmdir .deps 2>/dev/null
|
1000 |
|
|
AC_SUBST([DEPDIR])
|
1001 |
|
|
])
|
1002 |
|
|
|
1003 |
|
|
|
1004 |
|
|
# AM_DEP_TRACK
|
1005 |
|
|
# ------------
|
1006 |
|
|
AC_DEFUN([AM_DEP_TRACK],
|
1007 |
|
|
[AC_ARG_ENABLE(dependency-tracking,
|
1008 |
|
|
[ --disable-dependency-tracking Speeds up one-time builds
|
1009 |
|
|
--enable-dependency-tracking Do not reject slow dependency extractors])
|
1010 |
|
|
if test "x$enable_dependency_tracking" != xno; then
|
1011 |
|
|
am_depcomp="$ac_aux_dir/depcomp"
|
1012 |
|
|
AMDEPBACKSLASH='\'
|
1013 |
|
|
fi
|
1014 |
|
|
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
1015 |
|
|
AC_SUBST([AMDEPBACKSLASH])
|
1016 |
|
|
])
|
1017 |
|
|
|
1018 |
|
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
1019 |
|
|
|
1020 |
|
|
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
1021 |
|
|
|
1022 |
|
|
# This program is free software; you can redistribute it and/or modify
|
1023 |
|
|
# it under the terms of the GNU General Public License as published by
|
1024 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
1025 |
|
|
# any later version.
|
1026 |
|
|
|
1027 |
|
|
# This program is distributed in the hope that it will be useful,
|
1028 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1029 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1030 |
|
|
# GNU General Public License for more details.
|
1031 |
|
|
|
1032 |
|
|
# You should have received a copy of the GNU General Public License
|
1033 |
|
|
# along with this program; if not, write to the Free Software
|
1034 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
1035 |
|
|
# 02111-1307, USA.
|
1036 |
|
|
|
1037 |
|
|
#serial 2
|
1038 |
|
|
|
1039 |
|
|
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
1040 |
|
|
# ------------------------------
|
1041 |
|
|
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
1042 |
|
|
[for mf in $CONFIG_FILES; do
|
1043 |
|
|
# Strip MF so we end up with the name of the file.
|
1044 |
|
|
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
1045 |
|
|
# Check whether this is an Automake generated Makefile or not.
|
1046 |
|
|
# We used to match only the files named `Makefile.in', but
|
1047 |
|
|
# some people rename them; so instead we look at the file content.
|
1048 |
|
|
# Grep'ing the first line is not enough: some people post-process
|
1049 |
|
|
# each Makefile.in and add a new line on top of each file to say so.
|
1050 |
|
|
# So let's grep whole file.
|
1051 |
|
|
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
1052 |
|
|
dirpart=`AS_DIRNAME("$mf")`
|
1053 |
|
|
else
|
1054 |
|
|
continue
|
1055 |
|
|
fi
|
1056 |
|
|
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
|
1057 |
|
|
# Extract the definition of DEP_FILES from the Makefile without
|
1058 |
|
|
# running `make'.
|
1059 |
|
|
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
|
1060 |
|
|
test -z "$DEPDIR" && continue
|
1061 |
|
|
# When using ansi2knr, U may be empty or an underscore; expand it
|
1062 |
|
|
U=`sed -n -e '/^U = / s///p' < "$mf"`
|
1063 |
|
|
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
|
1064 |
|
|
# We invoke sed twice because it is the simplest approach to
|
1065 |
|
|
# changing $(DEPDIR) to its actual value in the expansion.
|
1066 |
|
|
for file in `sed -n -e '
|
1067 |
|
|
/^DEP_FILES = .*\\\\$/ {
|
1068 |
|
|
s/^DEP_FILES = //
|
1069 |
|
|
:loop
|
1070 |
|
|
s/\\\\$//
|
1071 |
|
|
p
|
1072 |
|
|
n
|
1073 |
|
|
/\\\\$/ b loop
|
1074 |
|
|
p
|
1075 |
|
|
}
|
1076 |
|
|
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
|
1077 |
|
|
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
1078 |
|
|
# Make sure the directory exists.
|
1079 |
|
|
test -f "$dirpart/$file" && continue
|
1080 |
|
|
fdir=`AS_DIRNAME(["$file"])`
|
1081 |
|
|
AS_MKDIR_P([$dirpart/$fdir])
|
1082 |
|
|
# echo "creating $dirpart/$file"
|
1083 |
|
|
echo '# dummy' > "$dirpart/$file"
|
1084 |
|
|
done
|
1085 |
|
|
done
|
1086 |
|
|
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
1087 |
|
|
|
1088 |
|
|
|
1089 |
|
|
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
1090 |
|
|
# -----------------------------
|
1091 |
|
|
# This macro should only be invoked once -- use via AC_REQUIRE.
|
1092 |
|
|
#
|
1093 |
|
|
# This code is only required when automatic dependency tracking
|
1094 |
|
|
# is enabled. FIXME. This creates each `.P' file that we will
|
1095 |
|
|
# need in order to bootstrap the dependency handling code.
|
1096 |
|
|
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
1097 |
|
|
[AC_CONFIG_COMMANDS([depfiles],
|
1098 |
|
|
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
1099 |
|
|
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
1100 |
|
|
])
|
1101 |
|
|
|
1102 |
|
|
# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
|
1103 |
|
|
|
1104 |
|
|
# This program is free software; you can redistribute it and/or modify
|
1105 |
|
|
# it under the terms of the GNU General Public License as published by
|
1106 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
1107 |
|
|
# any later version.
|
1108 |
|
|
|
1109 |
|
|
# This program is distributed in the hope that it will be useful,
|
1110 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1111 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1112 |
|
|
# GNU General Public License for more details.
|
1113 |
|
|
|
1114 |
|
|
# You should have received a copy of the GNU General Public License
|
1115 |
|
|
# along with this program; if not, write to the Free Software
|
1116 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
1117 |
|
|
# 02111-1307, USA.
|
1118 |
|
|
|
1119 |
|
|
# serial 2
|
1120 |
|
|
|
1121 |
|
|
# AM_MAKE_INCLUDE()
|
1122 |
|
|
# -----------------
|
1123 |
|
|
# Check to see how make treats includes.
|
1124 |
|
|
AC_DEFUN([AM_MAKE_INCLUDE],
|
1125 |
|
|
[am_make=${MAKE-make}
|
1126 |
|
|
cat > confinc << 'END'
|
1127 |
|
|
doit:
|
1128 |
|
|
@echo done
|
1129 |
|
|
END
|
1130 |
|
|
# If we don't find an include directive, just comment out the code.
|
1131 |
|
|
AC_MSG_CHECKING([for style of include used by $am_make])
|
1132 |
|
|
am__include="#"
|
1133 |
|
|
am__quote=
|
1134 |
|
|
_am_result=none
|
1135 |
|
|
# First try GNU make style include.
|
1136 |
|
|
echo "include confinc" > confmf
|
1137 |
|
|
# We grep out `Entering directory' and `Leaving directory'
|
1138 |
|
|
# messages which can occur if `w' ends up in MAKEFLAGS.
|
1139 |
|
|
# In particular we don't look at `^make:' because GNU make might
|
1140 |
|
|
# be invoked under some other name (usually "gmake"), in which
|
1141 |
|
|
# case it prints its new name instead of `make'.
|
1142 |
|
|
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
|
1143 |
|
|
am__include=include
|
1144 |
|
|
am__quote=
|
1145 |
|
|
_am_result=GNU
|
1146 |
|
|
fi
|
1147 |
|
|
# Now try BSD make style include.
|
1148 |
|
|
if test "$am__include" = "#"; then
|
1149 |
|
|
echo '.include "confinc"' > confmf
|
1150 |
|
|
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
1151 |
|
|
am__include=.include
|
1152 |
|
|
am__quote="\""
|
1153 |
|
|
_am_result=BSD
|
1154 |
|
|
fi
|
1155 |
|
|
fi
|
1156 |
|
|
AC_SUBST(am__include)
|
1157 |
|
|
AC_SUBST(am__quote)
|
1158 |
|
|
AC_MSG_RESULT($_am_result)
|
1159 |
|
|
rm -f confinc confmf
|
1160 |
|
|
])
|
1161 |
|
|
|
1162 |
|
|
# AM_CONDITIONAL -*- Autoconf -*-
|
1163 |
|
|
|
1164 |
|
|
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
|
1165 |
|
|
|
1166 |
|
|
# This program is free software; you can redistribute it and/or modify
|
1167 |
|
|
# it under the terms of the GNU General Public License as published by
|
1168 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
1169 |
|
|
# any later version.
|
1170 |
|
|
|
1171 |
|
|
# This program is distributed in the hope that it will be useful,
|
1172 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1173 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1174 |
|
|
# GNU General Public License for more details.
|
1175 |
|
|
|
1176 |
|
|
# You should have received a copy of the GNU General Public License
|
1177 |
|
|
# along with this program; if not, write to the Free Software
|
1178 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
1179 |
|
|
# 02111-1307, USA.
|
1180 |
|
|
|
1181 |
|
|
# serial 5
|
1182 |
|
|
|
1183 |
|
|
AC_PREREQ(2.52)
|
1184 |
|
|
|
1185 |
|
|
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
1186 |
|
|
# -------------------------------------
|
1187 |
|
|
# Define a conditional.
|
1188 |
|
|
AC_DEFUN([AM_CONDITIONAL],
|
1189 |
|
|
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
1190 |
|
|
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
1191 |
|
|
AC_SUBST([$1_TRUE])
|
1192 |
|
|
AC_SUBST([$1_FALSE])
|
1193 |
|
|
if $2; then
|
1194 |
|
|
$1_TRUE=
|
1195 |
|
|
$1_FALSE='#'
|
1196 |
|
|
else
|
1197 |
|
|
$1_TRUE='#'
|
1198 |
|
|
$1_FALSE=
|
1199 |
|
|
fi
|
1200 |
|
|
AC_CONFIG_COMMANDS_PRE(
|
1201 |
|
|
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
1202 |
|
|
AC_MSG_ERROR([conditional \"$1\" was never defined.
|
1203 |
|
|
Usually this means the macro was only invoked conditionally.])
|
1204 |
|
|
fi])])
|
1205 |
|
|
|
1206 |
|
|
# Add --enable-maintainer-mode option to configure.
|
1207 |
|
|
# From Jim Meyering
|
1208 |
|
|
|
1209 |
|
|
# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
|
1210 |
|
|
|
1211 |
|
|
# This program is free software; you can redistribute it and/or modify
|
1212 |
|
|
# it under the terms of the GNU General Public License as published by
|
1213 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
1214 |
|
|
# any later version.
|
1215 |
|
|
|
1216 |
|
|
# This program is distributed in the hope that it will be useful,
|
1217 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1218 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1219 |
|
|
# GNU General Public License for more details.
|
1220 |
|
|
|
1221 |
|
|
# You should have received a copy of the GNU General Public License
|
1222 |
|
|
# along with this program; if not, write to the Free Software
|
1223 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
1224 |
|
|
# 02111-1307, USA.
|
1225 |
|
|
|
1226 |
|
|
# serial 1
|
1227 |
|
|
|
1228 |
|
|
AC_DEFUN([AM_MAINTAINER_MODE],
|
1229 |
|
|
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
1230 |
|
|
dnl maintainer-mode is disabled by default
|
1231 |
|
|
AC_ARG_ENABLE(maintainer-mode,
|
1232 |
|
|
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
1233 |
|
|
(and sometimes confusing) to the casual installer],
|
1234 |
|
|
USE_MAINTAINER_MODE=$enableval,
|
1235 |
|
|
USE_MAINTAINER_MODE=no)
|
1236 |
|
|
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
1237 |
|
|
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
|
1238 |
|
|
MAINT=$MAINTAINER_MODE_TRUE
|
1239 |
|
|
AC_SUBST(MAINT)dnl
|
1240 |
|
|
]
|
1241 |
|
|
)
|
1242 |
|
|
|
1243 |
|
|
dnl enable-multiprocessing.m4,v 1.5 2002/06/30 06:27:36 ralf Exp
|
1244 |
|
|
|
1245 |
|
|
AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING,
|
1246 |
|
|
[
|
1247 |
|
|
AC_ARG_ENABLE(multiprocessing,
|
1248 |
|
|
AC_HELP_STRING([--enable-multiprocessing],[enable multiprocessing interface]),
|
1249 |
|
|
[case "${enable_multiprocessing}" in
|
1250 |
|
|
yes) ;;
|
1251 |
|
|
no) ;;
|
1252 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
|
1253 |
|
|
esac],[enable_multiprocessing=no])
|
1254 |
|
|
])
|
1255 |
|
|
|
1256 |
|
|
dnl enable-posix.m4,v 1.11 2001/09/13 13:14:30 joel Exp
|
1257 |
|
|
|
1258 |
|
|
AC_DEFUN(RTEMS_ENABLE_POSIX,
|
1259 |
|
|
[
|
1260 |
|
|
|
1261 |
|
|
AC_ARG_ENABLE(posix,
|
1262 |
|
|
AC_HELP_STRING([--enable-posix],[enable posix interface]),
|
1263 |
|
|
[case "${enableval}" in
|
1264 |
|
|
yes) RTEMS_HAS_POSIX_API=yes ;;
|
1265 |
|
|
no) RTEMS_HAS_POSIX_API=no ;;
|
1266 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
|
1267 |
|
|
esac],[RTEMS_HAS_POSIX_API=yes])
|
1268 |
|
|
|
1269 |
|
|
case "${host}" in
|
1270 |
|
|
# hpux unix port should go here
|
1271 |
|
|
i[[34567]]86-pc-linux*) # unix "simulator" port
|
1272 |
|
|
RTEMS_HAS_POSIX_API=no
|
1273 |
|
|
;;
|
1274 |
|
|
i[[34567]]86-*freebsd*) # unix "simulator" port
|
1275 |
|
|
RTEMS_HAS_POSIX_API=no
|
1276 |
|
|
;;
|
1277 |
|
|
no_cpu-*rtems*)
|
1278 |
|
|
RTEMS_HAS_POSIX_API=no
|
1279 |
|
|
;;
|
1280 |
|
|
sparc-sun-solaris*) # unix "simulator" port
|
1281 |
|
|
RTEMS_HAS_POSIX_API=no
|
1282 |
|
|
;;
|
1283 |
|
|
*)
|
1284 |
|
|
;;
|
1285 |
|
|
esac
|
1286 |
|
|
AC_SUBST(RTEMS_HAS_POSIX_API)
|
1287 |
|
|
])
|
1288 |
|
|
|
1289 |
|
|
dnl enable-itron.m4,v 1.8 2001/09/13 13:14:30 joel Exp
|
1290 |
|
|
|
1291 |
|
|
AC_DEFUN(RTEMS_ENABLE_ITRON,
|
1292 |
|
|
[
|
1293 |
|
|
|
1294 |
|
|
AC_ARG_ENABLE(itron,
|
1295 |
|
|
AC_HELP_STRING([--enable-itron],[enable itron interface]),
|
1296 |
|
|
[case "${enableval}" in
|
1297 |
|
|
yes) RTEMS_HAS_ITRON_API=yes ;;
|
1298 |
|
|
no) RTEMS_HAS_ITRON_API=no ;;
|
1299 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-itron option) ;;
|
1300 |
|
|
esac],[RTEMS_HAS_ITRON_API=yes])
|
1301 |
|
|
|
1302 |
|
|
case "${host}" in
|
1303 |
|
|
# hpux unix port should go here
|
1304 |
|
|
i[[34567]]86-pc-linux*) # unix "simulator" port
|
1305 |
|
|
RTEMS_HAS_ITRON_API=no
|
1306 |
|
|
;;
|
1307 |
|
|
i[[34567]]86-*freebsd*) # unix "simulator" port
|
1308 |
|
|
RTEMS_HAS_ITRON_API=no
|
1309 |
|
|
;;
|
1310 |
|
|
no_cpu-*rtems*)
|
1311 |
|
|
RTEMS_HAS_ITRON_API=no
|
1312 |
|
|
;;
|
1313 |
|
|
sparc-sun-solaris*) # unix "simulator" port
|
1314 |
|
|
RTEMS_HAS_ITRON_API=no
|
1315 |
|
|
;;
|
1316 |
|
|
*)
|
1317 |
|
|
;;
|
1318 |
|
|
esac
|
1319 |
|
|
AC_SUBST(RTEMS_HAS_ITRON_API)
|
1320 |
|
|
])
|
1321 |
|
|
|
1322 |
|
|
dnl enable-networking.m4,v 1.6 2001/09/13 13:14:30 joel Exp
|
1323 |
|
|
|
1324 |
|
|
AC_DEFUN(RTEMS_ENABLE_NETWORKING,
|
1325 |
|
|
[
|
1326 |
|
|
|
1327 |
|
|
AC_ARG_ENABLE(networking,
|
1328 |
|
|
AC_HELP_STRING([--enable-networking],[enable TCP/IP stack]),
|
1329 |
|
|
[case "${enableval}" in
|
1330 |
|
|
yes) RTEMS_HAS_NETWORKING=yes ;;
|
1331 |
|
|
no) RTEMS_HAS_NETWORKING=no ;;
|
1332 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;;
|
1333 |
|
|
esac],[RTEMS_HAS_NETWORKING=yes])
|
1334 |
|
|
AC_SUBST(RTEMS_HAS_NETWORKING)dnl
|
1335 |
|
|
])
|
1336 |
|
|
|
1337 |
|
|
dnl enable-rdbg.m4,v 1.5 2001/09/13 13:14:30 joel Exp
|
1338 |
|
|
|
1339 |
|
|
AC_DEFUN(RTEMS_ENABLE_RDBG,
|
1340 |
|
|
[
|
1341 |
|
|
AC_BEFORE([$0], [RTEMS_CHECK_RDBG])dnl
|
1342 |
|
|
|
1343 |
|
|
AC_ARG_ENABLE(rdbg,
|
1344 |
|
|
AC_HELP_STRING([--enable-rdbg],[enable remote debugger]),
|
1345 |
|
|
[case "${enableval}" in
|
1346 |
|
|
yes) RTEMS_HAS_RDBG=yes ;;
|
1347 |
|
|
no) RTEMS_HAS_RDBG=no ;;
|
1348 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;;
|
1349 |
|
|
esac],[RTEMS_HAS_RDBG=no])
|
1350 |
|
|
AC_SUBST(RTEMS_HAS_RDBG)dnl
|
1351 |
|
|
])
|
1352 |
|
|
|
1353 |
|
|
dnl check-rdbg.m4,v 1.9 2001/10/17 20:30:38 joel Exp
|
1354 |
|
|
dnl
|
1355 |
|
|
AC_DEFUN(RTEMS_CHECK_RDBG,
|
1356 |
|
|
[dnl
|
1357 |
|
|
AC_REQUIRE([RTEMS_TOP])dnl
|
1358 |
|
|
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
|
1359 |
|
|
AC_REQUIRE([RTEMS_CHECK_NETWORKING])dnl
|
1360 |
|
|
AC_REQUIRE([RTEMS_ENABLE_RDBG])dnl
|
1361 |
|
|
AC_CACHE_CHECK([whether BSP supports librdbg],
|
1362 |
|
|
rtems_cv_HAS_RDBG,
|
1363 |
|
|
[
|
1364 |
|
|
if test -d "$srcdir/${RTEMS_TOPdir}/c/src/librdbg/src/${RTEMS_CPU}/${$1}";
|
1365 |
|
|
then
|
1366 |
|
|
rtems_cv_HAS_RDBG="yes" ;
|
1367 |
|
|
elif test -d "$srcdir/${RTEMS_TOPdir}/c/src/librdbg/src/${RTEMS_CPU}/any";
|
1368 |
|
|
then
|
1369 |
|
|
rtems_cv_HAS_RDBG="yes" ;
|
1370 |
|
|
elif test "${RTEMS_CPU}" = "powerpc";
|
1371 |
|
|
then
|
1372 |
|
|
A=`grep -l RTEMS_PPC_EXCEPTION_PROCESSING_MODEL $srcdir/${RTEMS_TOPdir}/make/custom/* 2>/dev/null`;
|
1373 |
|
|
C=""
|
1374 |
|
|
for i in ${A} ;
|
1375 |
|
|
do
|
1376 |
|
|
B=`basename ${i} .cfg`;
|
1377 |
|
|
C="${C} ${B}";
|
1378 |
|
|
done
|
1379 |
|
|
rtems_cv_HAS_RDBG="no";
|
1380 |
|
|
for j in ${C} ;
|
1381 |
|
|
do
|
1382 |
|
|
if test "${$1}" = "${j}" ;
|
1383 |
|
|
then
|
1384 |
|
|
rtems_cv_HAS_RDBG="yes";
|
1385 |
|
|
fi
|
1386 |
|
|
done
|
1387 |
|
|
else
|
1388 |
|
|
rtems_cv_HAS_RDBG="no";
|
1389 |
|
|
fi
|
1390 |
|
|
])
|
1391 |
|
|
HAS_RDBG="$rtems_cv_HAS_RDBG"
|
1392 |
|
|
AC_SUBST(HAS_RDBG)
|
1393 |
|
|
])
|
1394 |
|
|
|
1395 |
|
|
dnl check-cpu.m4,v 1.6 2002/07/22 10:13:20 ralf Exp
|
1396 |
|
|
|
1397 |
|
|
dnl check if RTEMS support a cpu
|
1398 |
|
|
AC_DEFUN(RTEMS_CHECK_CPU,
|
1399 |
|
|
[dnl
|
1400 |
|
|
AC_REQUIRE([RTEMS_TOP])
|
1401 |
|
|
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
|
1402 |
|
|
|
1403 |
|
|
# Is this a supported CPU?
|
1404 |
|
|
AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
|
1405 |
|
|
# FIXME: Temporary hack
|
1406 |
|
|
if test -d "$srcdir/$RTEMS_TOPdir/cpukit/score/cpu/$RTEMS_CPU"; then
|
1407 |
|
|
AC_MSG_RESULT(yes)
|
1408 |
|
|
else
|
1409 |
|
|
AC_MSG_ERROR(no)
|
1410 |
|
|
fi
|
1411 |
|
|
])dnl
|
1412 |
|
|
|
1413 |
|
|
|
1414 |
|
|
dnl
|
1415 |
|
|
dnl canonical-target-name.m4,v 1.12 2001/09/14 17:30:22 joel Exp
|
1416 |
|
|
dnl
|
1417 |
|
|
|
1418 |
|
|
dnl canonicalize target cpu
|
1419 |
|
|
dnl NOTE: Most rtems targets do not fullfil autoconf's
|
1420 |
|
|
dnl target naming conventions "processor-vendor-os"
|
1421 |
|
|
dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
|
1422 |
|
|
dnl and we have to fix it for rtems ourselves
|
1423 |
|
|
|
1424 |
|
|
AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
|
1425 |
|
|
[
|
1426 |
|
|
AC_CANONICAL_TARGET
|
1427 |
|
|
AC_MSG_CHECKING(rtems target cpu)
|
1428 |
|
|
case "${target}" in
|
1429 |
|
|
# hpux unix port should go here
|
1430 |
|
|
i[[34567]]86-*linux*) # unix "simulator" port
|
1431 |
|
|
RTEMS_CPU=unix
|
1432 |
|
|
;;
|
1433 |
|
|
i[[34567]]86-*freebsd*) # unix "simulator" port
|
1434 |
|
|
RTEMS_CPU=unix
|
1435 |
|
|
;;
|
1436 |
|
|
i[[34567]]86-pc-cygwin*) # Cygwin is just enough unix like :)
|
1437 |
|
|
RTEMS_CPU=unix
|
1438 |
|
|
;;
|
1439 |
|
|
no_cpu-*rtems*)
|
1440 |
|
|
RTEMS_CPU=no_cpu
|
1441 |
|
|
;;
|
1442 |
|
|
sparc-sun-solaris*) # unix "simulator" port
|
1443 |
|
|
RTEMS_CPU=unix
|
1444 |
|
|
;;
|
1445 |
|
|
*)
|
1446 |
|
|
RTEMS_CPU=`echo $target | sed 's%^\([[^-]]*\)-\(.*\)$%\1%'`
|
1447 |
|
|
;;
|
1448 |
|
|
esac
|
1449 |
|
|
AC_SUBST(RTEMS_CPU)
|
1450 |
|
|
AC_MSG_RESULT($RTEMS_CPU)
|
1451 |
|
|
])
|
1452 |
|
|
|
1453 |
|
|
dnl check-networking.m4,v 1.4 2000/11/02 15:44:04 joel Exp
|
1454 |
|
|
dnl
|
1455 |
|
|
AC_DEFUN(RTEMS_CHECK_NETWORKING,
|
1456 |
|
|
[dnl
|
1457 |
|
|
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
|
1458 |
|
|
AC_REQUIRE([RTEMS_ENABLE_NETWORKING])dnl
|
1459 |
|
|
|
1460 |
|
|
AC_CACHE_CHECK([whether BSP supports networking],
|
1461 |
|
|
rtems_cv_HAS_NETWORKING,
|
1462 |
|
|
[dnl
|
1463 |
|
|
case "$RTEMS_CPU" in
|
1464 |
|
|
unix*)
|
1465 |
|
|
rtems_cv_HAS_NETWORKING="no"
|
1466 |
|
|
;;
|
1467 |
|
|
*)
|
1468 |
|
|
if test "${RTEMS_HAS_NETWORKING}" = "yes"; then
|
1469 |
|
|
rtems_cv_HAS_NETWORKING="yes";
|
1470 |
|
|
else
|
1471 |
|
|
rtems_cv_HAS_NETWORKING="disabled";
|
1472 |
|
|
fi
|
1473 |
|
|
;;
|
1474 |
|
|
esac])
|
1475 |
|
|
if test "$rtems_cv_HAS_NETWORKING" = "yes"; then
|
1476 |
|
|
HAS_NETWORKING="yes";
|
1477 |
|
|
else
|
1478 |
|
|
HAS_NETWORKING="no";
|
1479 |
|
|
fi
|
1480 |
|
|
AC_SUBST(HAS_NETWORKING)dnl
|
1481 |
|
|
])
|
1482 |
|
|
|
1483 |
|
|
dnl enable-inlines.m4,v 1.6 2001/09/13 13:14:30 joel Exp
|
1484 |
|
|
|
1485 |
|
|
AC_DEFUN(RTEMS_ENABLE_INLINES,
|
1486 |
|
|
[AC_ARG_ENABLE(rtems-inlines,
|
1487 |
|
|
AC_HELP_STRING([--enable-rtems-inlines],[enable RTEMS inline functions (default:enabled, disable to use macros)]),
|
1488 |
|
|
[case "${enableval}" in
|
1489 |
|
|
yes) RTEMS_USE_MACROS=no ;;
|
1490 |
|
|
no) RTEMS_USE_MACROS=yes ;;
|
1491 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
|
1492 |
|
|
esac],[RTEMS_USE_MACROS=no])
|
1493 |
|
|
AC_SUBST(RTEMS_USE_MACROS)dnl
|
1494 |
|
|
|
1495 |
|
|
if test x"${RTEMS_USE_MACROS}" = x"yes";
|
1496 |
|
|
then
|
1497 |
|
|
AC_DEFINE_UNQUOTED(USE_MACROS,1,[if using macros])
|
1498 |
|
|
else
|
1499 |
|
|
AC_DEFINE_UNQUOTED(USE_INLINES,1,[if using inlines])
|
1500 |
|
|
fi
|
1501 |
|
|
|
1502 |
|
|
|
1503 |
|
|
])
|
1504 |
|
|
|
1505 |
|
|
dnl enable-cxx.m4,v 1.3 2001/09/13 13:14:30 joel Exp
|
1506 |
|
|
|
1507 |
|
|
AC_DEFUN(RTEMS_ENABLE_CXX,
|
1508 |
|
|
[
|
1509 |
|
|
AC_ARG_ENABLE(cxx,
|
1510 |
|
|
AC_HELP_STRING([--enable-cxx],[enable C++ support and build the rtems++
|
1511 |
|
|
library]),
|
1512 |
|
|
[case "${enableval}" in
|
1513 |
|
|
yes) RTEMS_HAS_CPLUSPLUS=yes ;;
|
1514 |
|
|
no) RTEMS_HAS_CPLUSPLUS=no ;;
|
1515 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
|
1516 |
|
|
esac], [RTEMS_HAS_CPLUSPLUS=no])
|
1517 |
|
|
])
|
1518 |
|
|
|
1519 |
|
|
dnl enable-tests.m4,v 1.5 2001/09/13 13:14:30 joel Exp
|
1520 |
|
|
|
1521 |
|
|
AC_DEFUN(RTEMS_ENABLE_TESTS,
|
1522 |
|
|
[
|
1523 |
|
|
# If the tests are enabled, then find all the test suite Makefiles
|
1524 |
|
|
AC_MSG_CHECKING([if the test suites are enabled? ])
|
1525 |
|
|
AC_ARG_ENABLE(tests,
|
1526 |
|
|
AC_HELP_STRING([--enable-tests],[enable tests (default:disabled)]),
|
1527 |
|
|
[case "${enableval}" in
|
1528 |
|
|
yes) tests_enabled=yes ;;
|
1529 |
|
|
no) tests_enabled=no ;;
|
1530 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for tests option) ;;
|
1531 |
|
|
esac], [tests_enabled=no])
|
1532 |
|
|
AC_MSG_RESULT([$tests_enabled])
|
1533 |
|
|
])
|
1534 |
|
|
|
1535 |
|
|
|
1536 |
|
|
AC_DEFUN(RTEMS_ENABLE_RTEMS_DEBUG,
|
1537 |
|
|
[
|
1538 |
|
|
AC_ARG_ENABLE(rtems-debug,
|
1539 |
|
|
AC_HELP_STRING([--enable-rtems-debug],[enable RTEMS_DEBUG]),
|
1540 |
|
|
[case "${enable_rtems_debug}" in
|
1541 |
|
|
yes) enable_rtems_debug=yes ;;
|
1542 |
|
|
no) enable_rtems_debug=no ;;
|
1543 |
|
|
*) AC_MSG_ERROR([bad value ${enable_rtems_debug} for RTEMS_DEBUG]) ;;
|
1544 |
|
|
esac],[enable_rtems_debug=no])
|
1545 |
|
|
])
|
1546 |
|
|
|
1547 |
|
|
AC_DEFUN(RTEMS_CHECK_RTEMS_DEBUG,
|
1548 |
|
|
[AC_REQUIRE([RTEMS_ENABLE_RTEMS_DEBUG])
|
1549 |
|
|
AS_IF([test x"${enable_rtems_debug}" = x"yes"]
|
1550 |
|
|
[AC_DEFINE_UNQUOTED(RTEMS_DEBUG,1,[if RTEMS_DEBUG is enabled])])
|
1551 |
|
|
])
|
1552 |
|
|
|
1553 |
|
|
|
1554 |
|
|
dnl enable-rtemsbsp.m4,v 1.10 2001/09/13 13:14:30 joel Exp
|
1555 |
|
|
|
1556 |
|
|
dnl Override the set of BSPs to be built.
|
1557 |
|
|
dnl used by the toplevel configure script
|
1558 |
|
|
dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
|
1559 |
|
|
AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
|
1560 |
|
|
[
|
1561 |
|
|
AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
|
1562 |
|
|
AC_ARG_ENABLE(rtemsbsp,
|
1563 |
|
|
AC_HELP_STRING([--enable-rtemsbsp="bsp1 bsp2 .."],
|
1564 |
|
|
[BSPs to include in build]),
|
1565 |
|
|
[case "${enableval}" in
|
1566 |
|
|
yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
|
1567 |
|
|
*) $1=$enableval;;
|
1568 |
|
|
esac],[$1=""])
|
1569 |
|
|
])
|
1570 |
|
|
|
1571 |
|
|
dnl env-rtemsbsp.m4,v 1.7 2002/08/06 07:31:47 ralf Exp
|
1572 |
|
|
|
1573 |
|
|
dnl Pass a single BSP via an environment variable
|
1574 |
|
|
dnl used by per BSP configure scripts
|
1575 |
|
|
AC_DEFUN(RTEMS_ENV_RTEMSBSP,
|
1576 |
|
|
[dnl
|
1577 |
|
|
AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
|
1578 |
|
|
AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
|
1579 |
|
|
AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
|
1580 |
|
|
|
1581 |
|
|
AC_ARG_VAR([RTEMS_BSP],[RTEMS_BSP to build])
|
1582 |
|
|
AC_MSG_CHECKING([for RTEMS_BSP])
|
1583 |
|
|
AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
|
1584 |
|
|
[dnl
|
1585 |
|
|
test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
|
1586 |
|
|
])dnl
|
1587 |
|
|
if test -z "$rtems_cv_RTEMS_BSP"; then
|
1588 |
|
|
AC_MSG_ERROR([Missing RTEMS_BSP])
|
1589 |
|
|
fi
|
1590 |
|
|
RTEMS_BSP="$rtems_cv_RTEMS_BSP"
|
1591 |
|
|
AC_MSG_RESULT(${RTEMS_BSP})
|
1592 |
|
|
AC_SUBST(RTEMS_BSP)
|
1593 |
|
|
|
1594 |
|
|
RTEMS_BSP_SPECS="-specs bsp_specs -qrtems"
|
1595 |
|
|
AC_SUBST(RTEMS_BSP_SPECS)
|
1596 |
|
|
|
1597 |
|
|
GCC_SPECS="-B\$(PROJECT_ROOT)/lib/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/"
|
1598 |
|
|
AC_SUBST(GCC_SPECS)
|
1599 |
|
|
|
1600 |
|
|
PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
|
1601 |
|
|
AC_SUBST(PROJECT_INCLUDE)
|
1602 |
|
|
|
1603 |
|
|
PROJECT_RELEASE="\$(PROJECT_ROOT)/$RTEMS_BSP"
|
1604 |
|
|
AC_SUBST(PROJECT_RELEASE)
|
1605 |
|
|
|
1606 |
|
|
RTEMS_ROOT=$PROJECT_ROOT/c/$RTEMS_BSP
|
1607 |
|
|
AC_SUBST(RTEMS_ROOT)
|
1608 |
|
|
|
1609 |
|
|
RTEMS_ENABLE_BARE
|
1610 |
|
|
AC_SUBST(BARE_CPU_MODEL)
|
1611 |
|
|
AC_SUBST(BARE_CPU_CFLAGS)
|
1612 |
|
|
|
1613 |
|
|
AM_CONDITIONAL([MULTILIB],[false])
|
1614 |
|
|
|
1615 |
|
|
includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include"
|
1616 |
|
|
libdir="\${exec_prefix}/${RTEMS_BSP}/lib"
|
1617 |
|
|
|
1618 |
|
|
bsplibdir="\${exec_prefix}/${RTEMS_BSP}/lib"
|
1619 |
|
|
AC_SUBST(bsplibdir)
|
1620 |
|
|
])
|
1621 |
|
|
|
1622 |
|
|
dnl
|
1623 |
|
|
dnl project-root.m4,v 1.6 2001/12/20 17:33:23 joel Exp
|
1624 |
|
|
dnl
|
1625 |
|
|
|
1626 |
|
|
dnl
|
1627 |
|
|
dnl PROJECT_TOPdir .. relative path to the top of the build-tree
|
1628 |
|
|
dnl PROJECT_ROOT .. relative path to the top of the temporary
|
1629 |
|
|
dnl installation directory inside the build-tree
|
1630 |
|
|
dnl RTEMS_TOPdir .. relative path of a subpackage's configure.in to the
|
1631 |
|
|
dnl toplevel configure.in of the source-tree
|
1632 |
|
|
dnl RTEMS_ROOT .. path to the top of a bsp's build directory
|
1633 |
|
|
dnl [Applied by custom/*.cfg, depredicated otherwise]
|
1634 |
|
|
dnl
|
1635 |
|
|
|
1636 |
|
|
AC_DEFUN(RTEMS_PROJECT_ROOT,
|
1637 |
|
|
[dnl
|
1638 |
|
|
AC_REQUIRE([RTEMS_TOP])
|
1639 |
|
|
|
1640 |
|
|
PACKHEX="\$(PROJECT_TOPdir)/tools/build/packhex"
|
1641 |
|
|
AC_SUBST(PACKHEX)
|
1642 |
|
|
])
|
1643 |
|
|
|
1644 |
|
|
|
1645 |
|
|
dnl check-bsps.m4,v 1.18 2001/11/21 18:36:51 joel Exp
|
1646 |
|
|
|
1647 |
|
|
dnl Report all available bsps for a target,
|
1648 |
|
|
dnl check if a bsp-subdirectory is present for all bsps found
|
1649 |
|
|
dnl
|
1650 |
|
|
dnl RTEMS_CHECK_BSPS(bsp_list)
|
1651 |
|
|
AC_DEFUN(RTEMS_CHECK_BSPS,
|
1652 |
|
|
[
|
1653 |
|
|
AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target
|
1654 |
|
|
AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
|
1655 |
|
|
AC_MSG_CHECKING([for bsps])
|
1656 |
|
|
files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU`
|
1657 |
|
|
for file in $files; do
|
1658 |
|
|
if test -r $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/$file/bsp_specs; then
|
1659 |
|
|
case $file in
|
1660 |
|
|
# Now account for BSPs with build variants
|
1661 |
|
|
c4xsim) $1="[$]$1 c4xsim c3xsim";;
|
1662 |
|
|
gen68360) $1="[$]$1 gen68360 gen68360_040";;
|
1663 |
|
|
p4000) $1="[$]$1 p4600 p4650";;
|
1664 |
|
|
mvme162) $1="[$]$1 mvme162 mvme162lx";;
|
1665 |
|
|
mbx8xx) $1="[$]$1 mbx821_001 mbx860_002 mbx860_005b";;
|
1666 |
|
|
motorola_powerpc) $1="[$]$1 mvme2307 mcp750";;
|
1667 |
|
|
pc386) $1="[$]$1 pc386 pc386dx pc486 pc586 pc686 pck6";;
|
1668 |
|
|
erc32) $1="[$]$1 erc32 erc32nfp";;
|
1669 |
|
|
leon) $1="[$]$1 leon1 leon2";;
|
1670 |
|
|
sim68000) $1="[$]$1 sim68000 simcpu32";;
|
1671 |
|
|
shsim) $1="[$]$1 simsh7032 simsh7045";;
|
1672 |
|
|
*) $1="[$]$1 $file";;
|
1673 |
|
|
esac;
|
1674 |
|
|
fi
|
1675 |
|
|
done
|
1676 |
|
|
AC_MSG_RESULT([[$]$1 .. done])
|
1677 |
|
|
])dnl
|
1678 |
|
|
|
1679 |
|
|
AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
|
1680 |
|
|
[dnl
|
1681 |
|
|
AC_REQUIRE([RTEMS_TOP])
|
1682 |
|
|
|
1683 |
|
|
AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
|
1684 |
|
|
if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
|
1685 |
|
|
AC_MSG_RESULT([yes])
|
1686 |
|
|
else
|
1687 |
|
|
AC_MSG_ERROR([no])
|
1688 |
|
|
fi
|
1689 |
|
|
])dnl
|
1690 |
|
|
|
1691 |
|
|
AC_DEFUN(RTEMS_ENABLE_BARE,
|
1692 |
|
|
[
|
1693 |
|
|
AC_ARG_ENABLE(bare-cpu-cflags,
|
1694 |
|
|
AC_HELP_STRING([--enable-bare-cpu-cflags],[specify a particular cpu cflag (bare bsp specific)]),
|
1695 |
|
|
[case "${enableval}" in
|
1696 |
|
|
no) BARE_CPU_CFLAGS="" ;;
|
1697 |
|
|
*) BARE_CPU_CFLAGS="${enableval}" ;;
|
1698 |
|
|
esac],
|
1699 |
|
|
[BARE_CPU_CFLAGS=""])
|
1700 |
|
|
|
1701 |
|
|
AC_ARG_ENABLE(bare-cpu-model,
|
1702 |
|
|
AC_HELP_STRING([--enable-bare-cpu-model],[specify a particular cpu model (bare bsp specific)]),
|
1703 |
|
|
[case "${enableval}" in
|
1704 |
|
|
no) BARE_CPU_MODEL="" ;;
|
1705 |
|
|
*) BARE_CPU_MODEL="${enableval}" ;;
|
1706 |
|
|
esac],
|
1707 |
|
|
[BARE_CPU_MODEL=""])
|
1708 |
|
|
])
|
1709 |
|
|
|
1710 |
|
|
|
1711 |
|
|
dnl This provides configure definitions used for multilib support
|
1712 |
|
|
|
1713 |
|
|
dnl parts of these macros are derived from newlib-1.8.2's multilib support
|
1714 |
|
|
|
1715 |
|
|
AC_DEFUN(RTEMS_ENABLE_MULTILIB,
|
1716 |
|
|
[
|
1717 |
|
|
AC_ARG_ENABLE(multilib,
|
1718 |
|
|
AC_HELP_STRING([--enable-multilib],
|
1719 |
|
|
[build many library versions (default=no)]),
|
1720 |
|
|
[case "${enableval}" in
|
1721 |
|
|
yes) multilib=yes ;;
|
1722 |
|
|
no) multilib=no ;;
|
1723 |
|
|
*) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
|
1724 |
|
|
esac], [multilib=no])dnl
|
1725 |
|
|
|
1726 |
|
|
AM_CONDITIONAL(MULTILIB,test x"${multilib}" = x"yes")
|
1727 |
|
|
])
|
1728 |
|
|
|