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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [libblock/] [aclocal.m4] - Blame information for rev 1780

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
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
dnl rtems-top.m4,v 1.5 2002/07/31 14:40:48 ralf Exp
15
 
16
dnl
17
dnl RTEMS_TOP($1)
18
dnl
19
dnl $1 .. relative path from this configure.in to the toplevel configure.in
20
dnl
21
AC_DEFUN(RTEMS_TOP,
22
[dnl
23
AC_REQUIRE([RTEMS_VERSIONING])
24
AC_CHECK_PROGS(MAKE, gmake make)
25
AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
26
AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
27
 
28
AC_PREFIX_DEFAULT([/opt/rtems])
29
 
30
ENDIF=endif
31
AC_SUBST(ENDIF)
32
 
33
RTEMS_TOPdir="$1";
34
AC_SUBST(RTEMS_TOPdir)
35
 
36
test -n "$with_target_subdir" || with_target_subdir="."
37
 
38
if test "$with_target_subdir" = "." ; then
39
# Native
40
PROJECT_TOPdir="${with_project_root}${RTEMS_TOPdir}/\$(MULTIBUILDTOP)\$(top_builddir)"
41
else
42
# Cross
43
dots=`echo $with_target_subdir|\
44
sed -e 's%^\./%%' -e 's%[[^/]]$%&/%' -e 's%[[^/]]*/%../%g'`
45
PROJECT_TOPdir="${dots}${with_project_root}${RTEMS_TOPdir}/\$(MULTIBUILDTOP)\$(top_builddir)"
46
fi
47
AC_SUBST(PROJECT_TOPdir)
48
 
49
PROJECT_ROOT="${with_project_root}${RTEMS_TOPdir}/\$(MULTIBUILDTOP)\$(top_builddir)"
50
AC_SUBST(PROJECT_ROOT)
51
 
52
AC_MSG_CHECKING([for RTEMS Version])
53
AS_IF([test -r "${srcdir}/${RTEMS_TOPdir}/cpukit/aclocal/version.m4"],
54
[],
55
[AC_MSG_ERROR([Unable to find ${RTEMS_TOPdir}/cpukit/aclocal/version.m4])])
56
AC_MSG_RESULT([_RTEMS_VERSION])
57
])dnl
58
 
59
AC_DEFUN([RTEMS_VERSIONING],
60
m4_define([_RTEMS_VERSION],[ss-20020528]))
61
 
62
# Do all the work for Automake.                            -*- Autoconf -*-
63
 
64
# This macro actually does too much some checks are only needed if
65
# your package does certain things.  But this isn't really a big deal.
66
 
67
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
68
# Free Software Foundation, Inc.
69
 
70
# This program is free software; you can redistribute it and/or modify
71
# it under the terms of the GNU General Public License as published by
72
# the Free Software Foundation; either version 2, or (at your option)
73
# any later version.
74
 
75
# This program is distributed in the hope that it will be useful,
76
# but WITHOUT ANY WARRANTY; without even the implied warranty of
77
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
78
# GNU General Public License for more details.
79
 
80
# You should have received a copy of the GNU General Public License
81
# along with this program; if not, write to the Free Software
82
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
83
# 02111-1307, USA.
84
 
85
# serial 8
86
 
87
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
88
# written in clear, in which case automake, when reading aclocal.m4,
89
# will think it sees a *use*, and therefore will trigger all it's
90
# C support machinery.  Also note that it means that autoscan, seeing
91
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
92
 
93
 
94
AC_PREREQ([2.52])
95
 
96
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
97
# the ones we care about.
98
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
99
 
100
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
101
# AM_INIT_AUTOMAKE([OPTIONS])
102
# -----------------------------------------------
103
# The call with PACKAGE and VERSION arguments is the old style
104
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
105
# and VERSION should now be passed to AC_INIT and removed from
106
# the call to AM_INIT_AUTOMAKE.
107
# We support both call styles for the transition.  After
108
# the next Automake release, Autoconf can make the AC_INIT
109
# arguments mandatory, and then we can depend on a new Autoconf
110
# release and drop the old call support.
111
AC_DEFUN([AM_INIT_AUTOMAKE],
112
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
113
 AC_REQUIRE([AC_PROG_INSTALL])dnl
114
# test to see if srcdir already configured
115
if test "`cd $srcdir && pwd`" != "`pwd`" &&
116
   test -f $srcdir/config.status; then
117
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
118
fi
119
 
120
# Define the identity of the package.
121
dnl Distinguish between old-style and new-style calls.
122
m4_ifval([$2],
123
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
124
 AC_SUBST([PACKAGE], [$1])dnl
125
 AC_SUBST([VERSION], [$2])],
126
[_AM_SET_OPTIONS([$1])dnl
127
 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
128
 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
129
 
130
_AM_IF_OPTION([no-define],,
131
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
132
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
133
 
134
# Some tools Automake needs.
135
AC_REQUIRE([AM_SANITY_CHECK])dnl
136
AC_REQUIRE([AC_ARG_PROGRAM])dnl
137
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
138
AM_MISSING_PROG(AUTOCONF, autoconf)
139
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
140
AM_MISSING_PROG(AUTOHEADER, autoheader)
141
AM_MISSING_PROG(MAKEINFO, makeinfo)
142
AM_MISSING_PROG(AMTAR, tar)
143
AM_PROG_INSTALL_SH
144
AM_PROG_INSTALL_STRIP
145
# We need awk for the "check" target.  The system "awk" is bad on
146
# some platforms.
147
AC_REQUIRE([AC_PROG_AWK])dnl
148
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
149
 
150
_AM_IF_OPTION([no-dependencies],,
151
[AC_PROVIDE_IFELSE([AC_PROG_][CC],
152
                  [_AM_DEPENDENCIES(CC)],
153
                  [define([AC_PROG_][CC],
154
                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
155
AC_PROVIDE_IFELSE([AC_PROG_][CXX],
156
                  [_AM_DEPENDENCIES(CXX)],
157
                  [define([AC_PROG_][CXX],
158
                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
159
])
160
])
161
 
162
# Copyright 2002  Free Software Foundation, Inc.
163
 
164
# This program is free software; you can redistribute it and/or modify
165
# it under the terms of the GNU General Public License as published by
166
# the Free Software Foundation; either version 2, or (at your option)
167
# any later version.
168
 
169
# This program is distributed in the hope that it will be useful,
170
# but WITHOUT ANY WARRANTY; without even the implied warranty of
171
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
172
# GNU General Public License for more details.
173
 
174
# You should have received a copy of the GNU General Public License
175
# along with this program; if not, write to the Free Software
176
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
177
 
178
# AM_AUTOMAKE_VERSION(VERSION)
179
# ----------------------------
180
# Automake X.Y traces this macro to ensure aclocal.m4 has been
181
# generated from the m4 files accompanying Automake X.Y.
182
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
183
 
184
# AM_SET_CURRENT_AUTOMAKE_VERSION
185
# -------------------------------
186
# Call AM_AUTOMAKE_VERSION so it can be traced.
187
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
188
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
189
         [AM_AUTOMAKE_VERSION([1.6.2])])
190
 
191
# Helper functions for option handling.                    -*- Autoconf -*-
192
 
193
# Copyright 2001, 2002  Free Software Foundation, Inc.
194
 
195
# This program is free software; you can redistribute it and/or modify
196
# it under the terms of the GNU General Public License as published by
197
# the Free Software Foundation; either version 2, or (at your option)
198
# any later version.
199
 
200
# This program is distributed in the hope that it will be useful,
201
# but WITHOUT ANY WARRANTY; without even the implied warranty of
202
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
203
# GNU General Public License for more details.
204
 
205
# You should have received a copy of the GNU General Public License
206
# along with this program; if not, write to the Free Software
207
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
208
# 02111-1307, USA.
209
 
210
# serial 2
211
 
212
# _AM_MANGLE_OPTION(NAME)
213
# -----------------------
214
AC_DEFUN([_AM_MANGLE_OPTION],
215
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
216
 
217
# _AM_SET_OPTION(NAME)
218
# ------------------------------
219
# Set option NAME.  Presently that only means defining a flag for this option.
220
AC_DEFUN([_AM_SET_OPTION],
221
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
222
 
223
# _AM_SET_OPTIONS(OPTIONS)
224
# ----------------------------------
225
# OPTIONS is a space-separated list of Automake options.
226
AC_DEFUN([_AM_SET_OPTIONS],
227
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
228
 
229
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
230
# -------------------------------------------
231
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
232
AC_DEFUN([_AM_IF_OPTION],
233
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
234
 
235
#
236
# Check to make sure that the build environment is sane.
237
#
238
 
239
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
240
 
241
# This program is free software; you can redistribute it and/or modify
242
# it under the terms of the GNU General Public License as published by
243
# the Free Software Foundation; either version 2, or (at your option)
244
# any later version.
245
 
246
# This program is distributed in the hope that it will be useful,
247
# but WITHOUT ANY WARRANTY; without even the implied warranty of
248
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
249
# GNU General Public License for more details.
250
 
251
# You should have received a copy of the GNU General Public License
252
# along with this program; if not, write to the Free Software
253
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
254
# 02111-1307, USA.
255
 
256
# serial 3
257
 
258
# AM_SANITY_CHECK
259
# ---------------
260
AC_DEFUN([AM_SANITY_CHECK],
261
[AC_MSG_CHECKING([whether build environment is sane])
262
# Just in case
263
sleep 1
264
echo timestamp > conftest.file
265
# Do `set' in a subshell so we don't clobber the current shell's
266
# arguments.  Must try -L first in case configure is actually a
267
# symlink; some systems play weird games with the mod time of symlinks
268
# (eg FreeBSD returns the mod time of the symlink's containing
269
# directory).
270
if (
271
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
272
   if test "$[*]" = "X"; then
273
      # -L didn't work.
274
      set X `ls -t $srcdir/configure conftest.file`
275
   fi
276
   rm -f conftest.file
277
   if test "$[*]" != "X $srcdir/configure conftest.file" \
278
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
279
 
280
      # If neither matched, then we have a broken ls.  This can happen
281
      # if, for instance, CONFIG_SHELL is bash and it inherits a
282
      # broken ls alias from the environment.  This has actually
283
      # happened.  Such a system could not be considered "sane".
284
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
285
alias in your environment])
286
   fi
287
 
288
   test "$[2]" = conftest.file
289
   )
290
then
291
   # Ok.
292
   :
293
else
294
   AC_MSG_ERROR([newly created file is older than distributed files!
295
Check your system clock])
296
fi
297
AC_MSG_RESULT(yes)])
298
 
299
#  -*- Autoconf -*-
300
 
301
 
302
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
303
 
304
# This program is free software; you can redistribute it and/or modify
305
# it under the terms of the GNU General Public License as published by
306
# the Free Software Foundation; either version 2, or (at your option)
307
# any later version.
308
 
309
# This program is distributed in the hope that it will be useful,
310
# but WITHOUT ANY WARRANTY; without even the implied warranty of
311
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
312
# GNU General Public License for more details.
313
 
314
# You should have received a copy of the GNU General Public License
315
# along with this program; if not, write to the Free Software
316
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
317
# 02111-1307, USA.
318
 
319
# serial 3
320
 
321
# AM_MISSING_PROG(NAME, PROGRAM)
322
# ------------------------------
323
AC_DEFUN([AM_MISSING_PROG],
324
[AC_REQUIRE([AM_MISSING_HAS_RUN])
325
$1=${$1-"${am_missing_run}$2"}
326
AC_SUBST($1)])
327
 
328
 
329
# AM_MISSING_HAS_RUN
330
# ------------------
331
# Define MISSING if not defined so far and test if it supports --run.
332
# If it does, set am_missing_run to use it, otherwise, to nothing.
333
AC_DEFUN([AM_MISSING_HAS_RUN],
334
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
335
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
336
# Use eval to expand $SHELL
337
if eval "$MISSING --run true"; then
338
  am_missing_run="$MISSING --run "
339
else
340
  am_missing_run=
341
  AC_MSG_WARN([`missing' script is too old or missing])
342
fi
343
])
344
 
345
# AM_AUX_DIR_EXPAND
346
 
347
# Copyright 2001 Free Software Foundation, Inc.
348
 
349
# This program is free software; you can redistribute it and/or modify
350
# it under the terms of the GNU General Public License as published by
351
# the Free Software Foundation; either version 2, or (at your option)
352
# any later version.
353
 
354
# This program is distributed in the hope that it will be useful,
355
# but WITHOUT ANY WARRANTY; without even the implied warranty of
356
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
357
# GNU General Public License for more details.
358
 
359
# You should have received a copy of the GNU General Public License
360
# along with this program; if not, write to the Free Software
361
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
362
# 02111-1307, USA.
363
 
364
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
365
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
366
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
367
#
368
# Of course, Automake must honor this variable whenever it calls a
369
# tool from the auxiliary directory.  The problem is that $srcdir (and
370
# therefore $ac_aux_dir as well) can be either absolute or relative,
371
# depending on how configure is run.  This is pretty annoying, since
372
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
373
# source directory, any form will work fine, but in subdirectories a
374
# relative path needs to be adjusted first.
375
#
376
# $ac_aux_dir/missing
377
#    fails when called from a subdirectory if $ac_aux_dir is relative
378
# $top_srcdir/$ac_aux_dir/missing
379
#    fails if $ac_aux_dir is absolute,
380
#    fails when called from a subdirectory in a VPATH build with
381
#          a relative $ac_aux_dir
382
#
383
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
384
# are both prefixed by $srcdir.  In an in-source build this is usually
385
# harmless because $srcdir is `.', but things will broke when you
386
# start a VPATH build or use an absolute $srcdir.
387
#
388
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
389
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
390
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
391
# and then we would define $MISSING as
392
#   MISSING="\${SHELL} $am_aux_dir/missing"
393
# This will work as long as MISSING is not called from configure, because
394
# unfortunately $(top_srcdir) has no meaning in configure.
395
# However there are other variables, like CC, which are often used in
396
# configure, and could therefore not use this "fixed" $ac_aux_dir.
397
#
398
# Another solution, used here, is to always expand $ac_aux_dir to an
399
# absolute PATH.  The drawback is that using absolute paths prevent a
400
# configured tree to be moved without reconfiguration.
401
 
402
# Rely on autoconf to set up CDPATH properly.
403
AC_PREREQ([2.50])
404
 
405
AC_DEFUN([AM_AUX_DIR_EXPAND], [
406
# expand $ac_aux_dir to an absolute path
407
am_aux_dir=`cd $ac_aux_dir && pwd`
408
])
409
 
410
# AM_PROG_INSTALL_SH
411
# ------------------
412
# Define $install_sh.
413
 
414
# Copyright 2001 Free Software Foundation, Inc.
415
 
416
# This program is free software; you can redistribute it and/or modify
417
# it under the terms of the GNU General Public License as published by
418
# the Free Software Foundation; either version 2, or (at your option)
419
# any later version.
420
 
421
# This program is distributed in the hope that it will be useful,
422
# but WITHOUT ANY WARRANTY; without even the implied warranty of
423
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
424
# GNU General Public License for more details.
425
 
426
# You should have received a copy of the GNU General Public License
427
# along with this program; if not, write to the Free Software
428
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
429
# 02111-1307, USA.
430
 
431
AC_DEFUN([AM_PROG_INSTALL_SH],
432
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
433
install_sh=${install_sh-"$am_aux_dir/install-sh"}
434
AC_SUBST(install_sh)])
435
 
436
# AM_PROG_INSTALL_STRIP
437
 
438
# Copyright 2001 Free Software Foundation, Inc.
439
 
440
# This program is free software; you can redistribute it and/or modify
441
# it under the terms of the GNU General Public License as published by
442
# the Free Software Foundation; either version 2, or (at your option)
443
# any later version.
444
 
445
# This program is distributed in the hope that it will be useful,
446
# but WITHOUT ANY WARRANTY; without even the implied warranty of
447
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
448
# GNU General Public License for more details.
449
 
450
# You should have received a copy of the GNU General Public License
451
# along with this program; if not, write to the Free Software
452
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
453
# 02111-1307, USA.
454
 
455
# One issue with vendor `install' (even GNU) is that you can't
456
# specify the program used to strip binaries.  This is especially
457
# annoying in cross-compiling environments, where the build's strip
458
# is unlikely to handle the host's binaries.
459
# Fortunately install-sh will honor a STRIPPROG variable, so we
460
# always use install-sh in `make install-strip', and initialize
461
# STRIPPROG with the value of the STRIP variable (set by the user).
462
AC_DEFUN([AM_PROG_INSTALL_STRIP],
463
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
464
# Installed binaries are usually stripped using `strip' when the user
465
# run `make install-strip'.  However `strip' might not be the right
466
# tool to use in cross-compilation environments, therefore Automake
467
# will honor the `STRIP' environment variable to overrule this program.
468
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
469
if test "$cross_compiling" != no; then
470
  AC_CHECK_TOOL([STRIP], [strip], :)
471
fi
472
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
473
AC_SUBST([INSTALL_STRIP_PROGRAM])])
474
 
475
# serial 4                                              -*- Autoconf -*-
476
 
477
# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
478
 
479
# This program is free software; you can redistribute it and/or modify
480
# it under the terms of the GNU General Public License as published by
481
# the Free Software Foundation; either version 2, or (at your option)
482
# any later version.
483
 
484
# This program is distributed in the hope that it will be useful,
485
# but WITHOUT ANY WARRANTY; without even the implied warranty of
486
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
487
# GNU General Public License for more details.
488
 
489
# You should have received a copy of the GNU General Public License
490
# along with this program; if not, write to the Free Software
491
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
492
# 02111-1307, USA.
493
 
494
 
495
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
496
# written in clear, in which case automake, when reading aclocal.m4,
497
# will think it sees a *use*, and therefore will trigger all it's
498
# C support machinery.  Also note that it means that autoscan, seeing
499
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
500
 
501
 
502
 
503
# _AM_DEPENDENCIES(NAME)
504
# ----------------------
505
# See how the compiler implements dependency checking.
506
# NAME is "CC", "CXX", "GCJ", or "OBJC".
507
# We try a few techniques and use that to set a single cache variable.
508
#
509
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
510
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
511
# dependency, and given that the user is not expected to run this macro,
512
# just rely on AC_PROG_CC.
513
AC_DEFUN([_AM_DEPENDENCIES],
514
[AC_REQUIRE([AM_SET_DEPDIR])dnl
515
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
516
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
517
AC_REQUIRE([AM_DEP_TRACK])dnl
518
 
519
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
520
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
521
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
522
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
523
                   [depcc="$$1"   am_compiler_list=])
524
 
525
AC_CACHE_CHECK([dependency style of $depcc],
526
               [am_cv_$1_dependencies_compiler_type],
527
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
528
  # We make a subdir and do the tests there.  Otherwise we can end up
529
  # making bogus files that we don't know about and never remove.  For
530
  # instance it was reported that on HP-UX the gcc test will end up
531
  # making a dummy file named `D' -- because `-MD' means `put the output
532
  # in D'.
533
  mkdir conftest.dir
534
  # Copy depcomp to subdir because otherwise we won't find it if we're
535
  # using a relative directory.
536
  cp "$am_depcomp" conftest.dir
537
  cd conftest.dir
538
 
539
  am_cv_$1_dependencies_compiler_type=none
540
  if test "$am_compiler_list" = ""; then
541
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
542
  fi
543
  for depmode in $am_compiler_list; do
544
    # We need to recreate these files for each test, as the compiler may
545
    # overwrite some of them when testing with obscure command lines.
546
    # This happens at least with the AIX C compiler.
547
    echo '#include "conftest.h"' > conftest.c
548
    echo 'int i;' > conftest.h
549
    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
550
 
551
    case $depmode in
552
    nosideeffect)
553
      # after this tag, mechanisms are not by side-effect, so they'll
554
      # only be used when explicitly requested
555
      if test "x$enable_dependency_tracking" = xyes; then
556
        continue
557
      else
558
        break
559
      fi
560
      ;;
561
    none) break ;;
562
    esac
563
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
564
    # mode.  It turns out that the SunPro C++ compiler does not properly
565
    # handle `-M -o', and we need to detect this.
566
    if depmode=$depmode \
567
       source=conftest.c object=conftest.o \
568
       depfile=conftest.Po tmpdepfile=conftest.TPo \
569
       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
570
       grep conftest.h conftest.Po > /dev/null 2>&1 &&
571
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
572
      am_cv_$1_dependencies_compiler_type=$depmode
573
      break
574
    fi
575
  done
576
 
577
  cd ..
578
  rm -rf conftest.dir
579
else
580
  am_cv_$1_dependencies_compiler_type=none
581
fi
582
])
583
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
584
])
585
 
586
 
587
# AM_SET_DEPDIR
588
# -------------
589
# Choose a directory name for dependency files.
590
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
591
AC_DEFUN([AM_SET_DEPDIR],
592
[rm -f .deps 2>/dev/null
593
mkdir .deps 2>/dev/null
594
if test -d .deps; then
595
  DEPDIR=.deps
596
else
597
  # MS-DOS does not allow filenames that begin with a dot.
598
  DEPDIR=_deps
599
fi
600
rmdir .deps 2>/dev/null
601
AC_SUBST([DEPDIR])
602
])
603
 
604
 
605
# AM_DEP_TRACK
606
# ------------
607
AC_DEFUN([AM_DEP_TRACK],
608
[AC_ARG_ENABLE(dependency-tracking,
609
[  --disable-dependency-tracking Speeds up one-time builds
610
  --enable-dependency-tracking  Do not reject slow dependency extractors])
611
if test "x$enable_dependency_tracking" != xno; then
612
  am_depcomp="$ac_aux_dir/depcomp"
613
  AMDEPBACKSLASH='\'
614
fi
615
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
616
AC_SUBST([AMDEPBACKSLASH])
617
])
618
 
619
# Generate code to set up dependency tracking.   -*- Autoconf -*-
620
 
621
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
622
 
623
# This program is free software; you can redistribute it and/or modify
624
# it under the terms of the GNU General Public License as published by
625
# the Free Software Foundation; either version 2, or (at your option)
626
# any later version.
627
 
628
# This program is distributed in the hope that it will be useful,
629
# but WITHOUT ANY WARRANTY; without even the implied warranty of
630
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
631
# GNU General Public License for more details.
632
 
633
# You should have received a copy of the GNU General Public License
634
# along with this program; if not, write to the Free Software
635
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
636
# 02111-1307, USA.
637
 
638
#serial 2
639
 
640
# _AM_OUTPUT_DEPENDENCY_COMMANDS
641
# ------------------------------
642
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
643
[for mf in $CONFIG_FILES; do
644
  # Strip MF so we end up with the name of the file.
645
  mf=`echo "$mf" | sed -e 's/:.*$//'`
646
  # Check whether this is an Automake generated Makefile or not.
647
  # We used to match only the files named `Makefile.in', but
648
  # some people rename them; so instead we look at the file content.
649
  # Grep'ing the first line is not enough: some people post-process
650
  # each Makefile.in and add a new line on top of each file to say so.
651
  # So let's grep whole file.
652
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
653
    dirpart=`AS_DIRNAME("$mf")`
654
  else
655
    continue
656
  fi
657
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
658
  # Extract the definition of DEP_FILES from the Makefile without
659
  # running `make'.
660
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
661
  test -z "$DEPDIR" && continue
662
  # When using ansi2knr, U may be empty or an underscore; expand it
663
  U=`sed -n -e '/^U = / s///p' < "$mf"`
664
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
665
  # We invoke sed twice because it is the simplest approach to
666
  # changing $(DEPDIR) to its actual value in the expansion.
667
  for file in `sed -n -e '
668
    /^DEP_FILES = .*\\\\$/ {
669
      s/^DEP_FILES = //
670
      :loop
671
        s/\\\\$//
672
        p
673
        n
674
        /\\\\$/ b loop
675
      p
676
    }
677
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
678
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
679
    # Make sure the directory exists.
680
    test -f "$dirpart/$file" && continue
681
    fdir=`AS_DIRNAME(["$file"])`
682
    AS_MKDIR_P([$dirpart/$fdir])
683
    # echo "creating $dirpart/$file"
684
    echo '# dummy' > "$dirpart/$file"
685
  done
686
done
687
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
688
 
689
 
690
# AM_OUTPUT_DEPENDENCY_COMMANDS
691
# -----------------------------
692
# This macro should only be invoked once -- use via AC_REQUIRE.
693
#
694
# This code is only required when automatic dependency tracking
695
# is enabled.  FIXME.  This creates each `.P' file that we will
696
# need in order to bootstrap the dependency handling code.
697
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
698
[AC_CONFIG_COMMANDS([depfiles],
699
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
700
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
701
])
702
 
703
# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
704
 
705
# This program is free software; you can redistribute it and/or modify
706
# it under the terms of the GNU General Public License as published by
707
# the Free Software Foundation; either version 2, or (at your option)
708
# any later version.
709
 
710
# This program is distributed in the hope that it will be useful,
711
# but WITHOUT ANY WARRANTY; without even the implied warranty of
712
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
713
# GNU General Public License for more details.
714
 
715
# You should have received a copy of the GNU General Public License
716
# along with this program; if not, write to the Free Software
717
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
718
# 02111-1307, USA.
719
 
720
# serial 2
721
 
722
# AM_MAKE_INCLUDE()
723
# -----------------
724
# Check to see how make treats includes.
725
AC_DEFUN([AM_MAKE_INCLUDE],
726
[am_make=${MAKE-make}
727
cat > confinc << 'END'
728
doit:
729
        @echo done
730
END
731
# If we don't find an include directive, just comment out the code.
732
AC_MSG_CHECKING([for style of include used by $am_make])
733
am__include="#"
734
am__quote=
735
_am_result=none
736
# First try GNU make style include.
737
echo "include confinc" > confmf
738
# We grep out `Entering directory' and `Leaving directory'
739
# messages which can occur if `w' ends up in MAKEFLAGS.
740
# In particular we don't look at `^make:' because GNU make might
741
# be invoked under some other name (usually "gmake"), in which
742
# case it prints its new name instead of `make'.
743
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
744
   am__include=include
745
   am__quote=
746
   _am_result=GNU
747
fi
748
# Now try BSD make style include.
749
if test "$am__include" = "#"; then
750
   echo '.include "confinc"' > confmf
751
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
752
      am__include=.include
753
      am__quote="\""
754
      _am_result=BSD
755
   fi
756
fi
757
AC_SUBST(am__include)
758
AC_SUBST(am__quote)
759
AC_MSG_RESULT($_am_result)
760
rm -f confinc confmf
761
])
762
 
763
# AM_CONDITIONAL                                              -*- Autoconf -*-
764
 
765
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
766
 
767
# This program is free software; you can redistribute it and/or modify
768
# it under the terms of the GNU General Public License as published by
769
# the Free Software Foundation; either version 2, or (at your option)
770
# any later version.
771
 
772
# This program is distributed in the hope that it will be useful,
773
# but WITHOUT ANY WARRANTY; without even the implied warranty of
774
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
775
# GNU General Public License for more details.
776
 
777
# You should have received a copy of the GNU General Public License
778
# along with this program; if not, write to the Free Software
779
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
780
# 02111-1307, USA.
781
 
782
# serial 5
783
 
784
AC_PREREQ(2.52)
785
 
786
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
787
# -------------------------------------
788
# Define a conditional.
789
AC_DEFUN([AM_CONDITIONAL],
790
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
791
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
792
AC_SUBST([$1_TRUE])
793
AC_SUBST([$1_FALSE])
794
if $2; then
795
  $1_TRUE=
796
  $1_FALSE='#'
797
else
798
  $1_TRUE='#'
799
  $1_FALSE=
800
fi
801
AC_CONFIG_COMMANDS_PRE(
802
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
803
  AC_MSG_ERROR([conditional \"$1\" was never defined.
804
Usually this means the macro was only invoked conditionally.])
805
fi])])
806
 
807
dnl
808
dnl canonical-target-name.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
809
dnl
810
 
811
dnl canonicalize target cpu
812
dnl NOTE: Most rtems targets do not fullfil autoconf's
813
dnl target naming conventions "processor-vendor-os"
814
dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
815
dnl and we have to fix it for rtems ourselves
816
 
817
AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
818
[
819
AC_CANONICAL_TARGET
820
AC_MSG_CHECKING(rtems target cpu)
821
case "${target}" in
822
  # hpux unix port should go here
823
  i[[34567]]86-*linux*)         # unix "simulator" port
824
        RTEMS_CPU=unix
825
        ;;
826
  i[[34567]]86-*freebsd*)       # unix "simulator" port
827
        RTEMS_CPU=unix
828
        ;;
829
  i[[34567]]86-pc-cygwin*)      # Cygwin is just enough unix like :)
830
        RTEMS_CPU=unix
831
        ;;
832
  no_cpu-*rtems*)
833
        RTEMS_CPU=no_cpu
834
        ;;
835
  sparc-sun-solaris*)           # unix "simulator" port
836
        RTEMS_CPU=unix
837
        ;;
838
  *)
839
        RTEMS_CPU=`echo $target | sed 's%^\([[^-]]*\)-\(.*\)$%\1%'`
840
        ;;
841
esac
842
AC_SUBST(RTEMS_CPU)
843
AC_MSG_RESULT($RTEMS_CPU)
844
])
845
 
846
dnl canonical-host.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
847
 
848
AC_DEFUN(RTEMS_CANONICAL_HOST,
849
[dnl
850
AC_REQUIRE([AC_CANONICAL_HOST])
851
RTEMS_HOST=$host_os
852
case "${target}" in
853
  # hpux unix port should go here
854
  i[[34567]]86-*linux*)          # unix "simulator" port
855
        RTEMS_HOST=Linux
856
        ;;
857
  i[[34567]]86-*freebsd*)         # unix "simulator" port
858
        RTEMS_HOST=FreeBSD
859
        ;;
860
  i[[34567]]86-pc-cygwin*)      # Cygwin is just enough unix like :)
861
        RTEMS_HOST=Cygwin
862
        ;;
863
  sparc-sun-solaris*)           # unix "simulator" port
864
        RTEMS_HOST=Solaris
865
        ;;
866
  *)
867
        ;;
868
esac
869
AC_SUBST(RTEMS_HOST)
870
])dnl
871
 
872
# Add --enable-maintainer-mode option to configure.
873
# From Jim Meyering
874
 
875
# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
876
 
877
# This program is free software; you can redistribute it and/or modify
878
# it under the terms of the GNU General Public License as published by
879
# the Free Software Foundation; either version 2, or (at your option)
880
# any later version.
881
 
882
# This program is distributed in the hope that it will be useful,
883
# but WITHOUT ANY WARRANTY; without even the implied warranty of
884
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
885
# GNU General Public License for more details.
886
 
887
# You should have received a copy of the GNU General Public License
888
# along with this program; if not, write to the Free Software
889
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
890
# 02111-1307, USA.
891
 
892
# serial 1
893
 
894
AC_DEFUN([AM_MAINTAINER_MODE],
895
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
896
  dnl maintainer-mode is disabled by default
897
  AC_ARG_ENABLE(maintainer-mode,
898
[  --enable-maintainer-mode enable make rules and dependencies not useful
899
                          (and sometimes confusing) to the casual installer],
900
      USE_MAINTAINER_MODE=$enableval,
901
      USE_MAINTAINER_MODE=no)
902
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
903
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
904
  MAINT=$MAINTAINER_MODE_TRUE
905
  AC_SUBST(MAINT)dnl
906
]
907
)
908
 
909
dnl env-rtemscpu.m4,v 1.4 2002/08/06 07:31:26 ralf Exp
910
 
911
AC_DEFUN(RTEMS_ENV_RTEMSCPU,
912
[AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
913
 
914
if test x"$multilib" = x"yes"; then
915
  AS_IF([test -n "$with_multisubdir"],
916
    [MULTIBUILDTOP=`echo "/$with_multisubdir" | sed 's,/[[^\\/]]*,../,g'`])
917
  AC_SUBST(MULTIBUILDTOP)
918
 
919
  AS_IF([test -n "$with_multisubdir"],
920
    [MULTISUBDIR="/$with_multisubdir"])
921
  AC_SUBST(MULTISUBDIR)
922
 
923
  GCC_SPECS="-isystem \$(PROJECT_INCLUDE)"
924
  AC_SUBST(GCC_SPECS)
925
 
926
  PROJECT_INCLUDE="\$(PROJECT_ROOT)/lib/include"
927
  AC_SUBST(PROJECT_INCLUDE)
928
 
929
  project_libdir="\$(PROJECT_ROOT)/lib"
930
  AC_SUBST(project_libdir)
931
 
932
  RTEMS_ROOT="${PROJECT_ROOT}"
933
  AC_SUBST(RTEMS_ROOT)
934
 
935
  includedir="\${exec_prefix}/lib/include"
936
  libdir="${libdir}\$(MULTISUBDIR)"
937
else
938
  RTEMS_ENV_RTEMSBSP
939
  RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
940
fi
941
])
942
 
943
dnl This provides configure definitions used for multilib support
944
 
945
dnl parts of these macros are derived from newlib-1.8.2's multilib support
946
 
947
AC_DEFUN(RTEMS_ENABLE_MULTILIB,
948
[
949
AC_ARG_ENABLE(multilib,
950
AC_HELP_STRING([--enable-multilib],
951
[build many library versions (default=no)]),
952
[case "${enableval}" in
953
  yes) multilib=yes ;;
954
  no)  multilib=no ;;
955
  *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
956
 esac], [multilib=no])dnl
957
 
958
AM_CONDITIONAL(MULTILIB,test x"${multilib}" = x"yes")
959
])
960
 
961
AC_DEFUN([RTEMS_ENABLE_MULTILIB_MASTER],
962
[
963
AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
964
 
965
dnl We may get other options which we don't document:
966
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
967
 
968
if test "[$]{srcdir}" = "."; then
969
  if test "[$]{with_target_subdir}" != "."; then
970
    multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}../ifelse([$2],,,[$2])"
971
  else
972
    multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}ifelse([$2],,,[$2])"
973
  fi
974
else
975
  multilib_basedir="[$]{srcdir}/ifelse([$2],,,[$2])"
976
fi
977
AC_SUBST(multilib_basedir)
978
 
979
if test "${multilib}" = "yes"; then
980
  multilib_arg="--enable-multilib"
981
else
982
  multilib_arg=
983
fi
984
 
985
AC_OUTPUT_COMMANDS(
986
[case " $CONFIG_FILES " in
987
 *" ]m4_if([$1],,Makefile,[$1])[ "*)
988
    ac_file=]m4_if([$1],,Makefile,[$1])[ . ${multilib_basedir}/config-ml.in
989
esac],
990
[
991
  srcdir=${srcdir}
992
  host=${host}
993
  target=${target}
994
  with_multisrctop="${with_multisrctop}"
995
  with_target_subdir="${with_target_subdir}"
996
  with_multisubdir="${with_multisubdir}"
997
  ac_configure_args="${multilib_arg} ${ac_configure_args}"
998
  CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
999
  multilib_basedir=${multilib_basedir}
1000
  CC="${CC}"])
1001
])
1002
 
1003
dnl env-rtemsbsp.m4,v 1.3 2002/08/06 10:09:33 ralf Exp
1004
 
1005
dnl Pass a single BSP via an environment variable
1006
dnl used by per BSP configure scripts
1007
AC_DEFUN(RTEMS_ENV_RTEMSBSP,
1008
[dnl
1009
AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
1010
AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
1011
AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
1012
 
1013
AC_ARG_VAR([RTEMS_BSP],[RTEMS_BSP to build])
1014
AC_MSG_CHECKING([for RTEMS_BSP])
1015
AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
1016
[dnl
1017
  test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
1018
])dnl
1019
if test -z "$rtems_cv_RTEMS_BSP"; then
1020
  AC_MSG_ERROR([Missing RTEMS_BSP])
1021
fi
1022
RTEMS_BSP="$rtems_cv_RTEMS_BSP"
1023
AC_MSG_RESULT(${RTEMS_BSP})
1024
AC_SUBST(RTEMS_BSP)
1025
 
1026
PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
1027
AC_SUBST(PROJECT_INCLUDE)
1028
 
1029
project_libdir="${PROJECT_ROOT}/$RTEMS_BSP/lib"
1030
AC_SUBST(project_libdir)
1031
 
1032
RTEMS_ROOT="$PROJECT_ROOT/c/$RTEMS_BSP"
1033
AC_SUBST(RTEMS_ROOT)
1034
 
1035
GCC_SPECS="-isystem \$(PROJECT_INCLUDE)"
1036
AC_SUBST(GCC_SPECS)
1037
 
1038
RTEMS_ENABLE_BARE
1039
AC_SUBST(BARE_CPU_MODEL)
1040
AC_SUBST(BARE_CPU_CFLAGS)
1041
 
1042
AM_CONDITIONAL([MULTILIB],[false])
1043
 
1044
includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include"
1045
libdir="\${exec_prefix}/${RTEMS_BSP}/lib"
1046
])
1047
 
1048
dnl enable-rtemsbsp.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1049
 
1050
dnl Override the set of BSPs to be built.
1051
dnl used by the toplevel configure script
1052
dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
1053
AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
1054
[
1055
AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
1056
AC_ARG_ENABLE(rtemsbsp,
1057
AC_HELP_STRING([--enable-rtemsbsp="bsp1 bsp2 .."],
1058
[BSPs to include in build]),
1059
[case "${enableval}" in
1060
  yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
1061
  *) $1=$enableval;;
1062
esac],[$1=""])
1063
])
1064
 
1065
dnl check-bsps.m4,v 1.3 2002/07/17 22:28:20 ralf Exp
1066
 
1067
AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
1068
[dnl
1069
AC_REQUIRE([RTEMS_TOP])
1070
 
1071
AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
1072
if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
1073
  AC_MSG_RESULT([yes])
1074
else
1075
  AC_MSG_ERROR([no])
1076
fi
1077
])dnl
1078
 
1079
AC_DEFUN(RTEMS_ENABLE_BARE,
1080
[
1081
AC_ARG_ENABLE(bare-cpu-cflags,
1082
AC_HELP_STRING([--enable-bare-cpu-cflags],[specify a particular cpu cflag (bare bsp specific)]),
1083
[case "${enableval}" in
1084
  no) BARE_CPU_CFLAGS="" ;;
1085
  *)    BARE_CPU_CFLAGS="${enableval}" ;;
1086
esac],
1087
[BARE_CPU_CFLAGS=""])
1088
 
1089
AC_ARG_ENABLE(bare-cpu-model,
1090
AC_HELP_STRING([--enable-bare-cpu-model],[specify a particular cpu model (bare bsp specific)]),
1091
[case "${enableval}" in
1092
  no)   BARE_CPU_MODEL="" ;;
1093
  *)    BARE_CPU_MODEL="${enableval}" ;;
1094
esac],
1095
[BARE_CPU_MODEL=""])
1096
])
1097
 
1098
 
1099
dnl check-cpu.m4,v 1.3 2002/07/17 22:28:20 ralf Exp
1100
 
1101
dnl check if RTEMS support a cpu
1102
AC_DEFUN(RTEMS_CHECK_CPU,
1103
[dnl
1104
AC_REQUIRE([RTEMS_TOP])
1105
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
1106
 
1107
# Is this a supported CPU?
1108
AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
1109
if test -d "$srcdir/$RTEMS_TOPdir/cpukit/score/cpu/$RTEMS_CPU"; then
1110
  AC_MSG_RESULT(yes)
1111
else
1112
  AC_MSG_ERROR(no)
1113
fi
1114
])dnl
1115
 
1116
 
1117
dnl
1118
dnl prog-cc.m4,v 1.2 2002/07/01 09:20:43 ralf Exp
1119
dnl
1120
dnl Check for target gcc
1121
dnl
1122
 
1123
AC_DEFUN(RTEMS_PROG_CC,
1124
[
1125
AC_BEFORE([$0], [AC_PROG_CPP])dnl
1126
AC_BEFORE([$0], [AC_PROG_CC])dnl
1127
AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
1128
 
1129
RTEMS_CHECK_TOOL(CC,gcc)
1130
test -z "$CC" && \
1131
  AC_MSG_ERROR([no acceptable cc found in \$PATH])
1132
AC_PROG_CC
1133
AC_PROG_CPP
1134
 
1135
AM_CONDITIONAL(RTEMS_USE_GCC,test x"$GCC" = x"yes")
1136
])
1137
 
1138
AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
1139
[
1140
dnl check target cc
1141
RTEMS_PROG_CC
1142
dnl check if the compiler supports --specs
1143
RTEMS_GCC_SPECS
1144
dnl check if the target compiler may use --pipe
1145
RTEMS_GCC_PIPE
1146
test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
1147
 
1148
if test "$GCC" = yes; then
1149
]
1150
m4_if([$1],,[],[CPPFLAGS="$CPPFLAGS $1"])
1151
[
1152
CFLAGS="-g -Wall"
1153
fi
1154
 
1155
dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
1156
#case $build_os in
1157
#*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
1158
#*) ;;
1159
#esac
1160
AC_SUBST(GCCSED)
1161
])
1162
 
1163
dnl
1164
dnl canonicalize-tools.m4,v 1.3 2002/07/31 14:57:47 ralf Exp
1165
dnl
1166
dnl Set target tools
1167
dnl
1168
 
1169
AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
1170
[AC_REQUIRE([RTEMS_PROG_CC])dnl
1171
 
1172
dnl FIXME: What shall be done if these tools are not available?
1173
  RTEMS_CHECK_TOOL(AR,ar,no)
1174
 
1175
dnl special treatment of ranlib
1176
  RTEMS_CHECK_TOOL(RANLIB,ranlib,:)
1177
])
1178
 
1179
dnl check-tool.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1180
 
1181
dnl RTEMS_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
1182
AC_DEFUN(RTEMS_CHECK_TOOL,
1183
[
1184
  AS_IF([test "x$build_alias" != "x$host_alias"],
1185
    [rtems_tool_prefix=${ac_tool_prefix}])
1186
  AC_CHECK_PROG($1, ${rtems_tool_prefix}$2, ${rtems_tool_prefix}$2, $3, $4)
1187
])
1188
 
1189
dnl
1190
dnl gcc-specs.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1191
dnl
1192
dnl Check whether the target compiler accepts -specs
1193
dnl
1194
 
1195
AC_DEFUN(RTEMS_GCC_SPECS,
1196
[AC_REQUIRE([RTEMS_PROG_CC])
1197
AC_CACHE_CHECK(whether $CC accepts -specs,rtems_cv_gcc_specs,
1198
[
1199
rtems_cv_gcc_specs=no
1200
if test x"$GCC" = x"yes"; then
1201
  touch confspec
1202
  echo 'void f(){}' >conftest.c
1203
  if test -z "`${CC} -specs confspec -c conftest.c 2>&1`";then
1204
    rtems_cv_gcc_specs=yes
1205
  fi
1206
fi
1207
rm -f confspec conftest*
1208
])])
1209
 
1210
dnl
1211
dnl gcc-pipe.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1212
dnl
1213
dnl Check whether the target compiler accepts -pipe
1214
dnl
1215
 
1216
AC_DEFUN(RTEMS_GCC_PIPE,
1217
[AC_REQUIRE([RTEMS_PROG_CC])
1218
AC_REQUIRE([AC_CANONICAL_HOST])
1219
AC_CACHE_CHECK(whether $CC accepts --pipe,rtems_cv_gcc_pipe,
1220
[
1221
rtems_cv_gcc_pipe=no
1222
if test x"$GCC" = x"yes"; then
1223
    echo 'void f(){}' >conftest.c
1224
    if test -z "`${CC} --pipe -c conftest.c 2>&1`";then
1225
      rtems_cv_gcc_pipe=yes
1226
    fi
1227
    rm -f conftest*
1228
fi
1229
])
1230
])
1231
 

powered by: WebSVN 2.1.0

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