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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [score/] [cpu/] [mips64orion/] [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
# Add --enable-maintainer-mode option to configure.
847
# From Jim Meyering
848
 
849
# Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
850
 
851
# This program is free software; you can redistribute it and/or modify
852
# it under the terms of the GNU General Public License as published by
853
# the Free Software Foundation; either version 2, or (at your option)
854
# any later version.
855
 
856
# This program is distributed in the hope that it will be useful,
857
# but WITHOUT ANY WARRANTY; without even the implied warranty of
858
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
859
# GNU General Public License for more details.
860
 
861
# You should have received a copy of the GNU General Public License
862
# along with this program; if not, write to the Free Software
863
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
864
# 02111-1307, USA.
865
 
866
# serial 1
867
 
868
AC_DEFUN([AM_MAINTAINER_MODE],
869
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
870
  dnl maintainer-mode is disabled by default
871
  AC_ARG_ENABLE(maintainer-mode,
872
[  --enable-maintainer-mode enable make rules and dependencies not useful
873
                          (and sometimes confusing) to the casual installer],
874
      USE_MAINTAINER_MODE=$enableval,
875
      USE_MAINTAINER_MODE=no)
876
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
877
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
878
  MAINT=$MAINTAINER_MODE_TRUE
879
  AC_SUBST(MAINT)dnl
880
]
881
)
882
 
883
dnl env-rtemscpu.m4,v 1.4 2002/08/06 07:31:26 ralf Exp
884
 
885
AC_DEFUN(RTEMS_ENV_RTEMSCPU,
886
[AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
887
 
888
if test x"$multilib" = x"yes"; then
889
  AS_IF([test -n "$with_multisubdir"],
890
    [MULTIBUILDTOP=`echo "/$with_multisubdir" | sed 's,/[[^\\/]]*,../,g'`])
891
  AC_SUBST(MULTIBUILDTOP)
892
 
893
  AS_IF([test -n "$with_multisubdir"],
894
    [MULTISUBDIR="/$with_multisubdir"])
895
  AC_SUBST(MULTISUBDIR)
896
 
897
  GCC_SPECS="-isystem \$(PROJECT_INCLUDE)"
898
  AC_SUBST(GCC_SPECS)
899
 
900
  PROJECT_INCLUDE="\$(PROJECT_ROOT)/lib/include"
901
  AC_SUBST(PROJECT_INCLUDE)
902
 
903
  project_libdir="\$(PROJECT_ROOT)/lib"
904
  AC_SUBST(project_libdir)
905
 
906
  RTEMS_ROOT="${PROJECT_ROOT}"
907
  AC_SUBST(RTEMS_ROOT)
908
 
909
  includedir="\${exec_prefix}/lib/include"
910
  libdir="${libdir}\$(MULTISUBDIR)"
911
else
912
  RTEMS_ENV_RTEMSBSP
913
  RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
914
fi
915
])
916
 
917
dnl This provides configure definitions used for multilib support
918
 
919
dnl parts of these macros are derived from newlib-1.8.2's multilib support
920
 
921
AC_DEFUN(RTEMS_ENABLE_MULTILIB,
922
[
923
AC_ARG_ENABLE(multilib,
924
AC_HELP_STRING([--enable-multilib],
925
[build many library versions (default=no)]),
926
[case "${enableval}" in
927
  yes) multilib=yes ;;
928
  no)  multilib=no ;;
929
  *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
930
 esac], [multilib=no])dnl
931
 
932
AM_CONDITIONAL(MULTILIB,test x"${multilib}" = x"yes")
933
])
934
 
935
AC_DEFUN([RTEMS_ENABLE_MULTILIB_MASTER],
936
[
937
AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
938
 
939
dnl We may get other options which we don't document:
940
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
941
 
942
if test "[$]{srcdir}" = "."; then
943
  if test "[$]{with_target_subdir}" != "."; then
944
    multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}../ifelse([$2],,,[$2])"
945
  else
946
    multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}ifelse([$2],,,[$2])"
947
  fi
948
else
949
  multilib_basedir="[$]{srcdir}/ifelse([$2],,,[$2])"
950
fi
951
AC_SUBST(multilib_basedir)
952
 
953
if test "${multilib}" = "yes"; then
954
  multilib_arg="--enable-multilib"
955
else
956
  multilib_arg=
957
fi
958
 
959
AC_OUTPUT_COMMANDS(
960
[case " $CONFIG_FILES " in
961
 *" ]m4_if([$1],,Makefile,[$1])[ "*)
962
    ac_file=]m4_if([$1],,Makefile,[$1])[ . ${multilib_basedir}/config-ml.in
963
esac],
964
[
965
  srcdir=${srcdir}
966
  host=${host}
967
  target=${target}
968
  with_multisrctop="${with_multisrctop}"
969
  with_target_subdir="${with_target_subdir}"
970
  with_multisubdir="${with_multisubdir}"
971
  ac_configure_args="${multilib_arg} ${ac_configure_args}"
972
  CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
973
  multilib_basedir=${multilib_basedir}
974
  CC="${CC}"])
975
])
976
 
977
dnl env-rtemsbsp.m4,v 1.3 2002/08/06 10:09:33 ralf Exp
978
 
979
dnl Pass a single BSP via an environment variable
980
dnl used by per BSP configure scripts
981
AC_DEFUN(RTEMS_ENV_RTEMSBSP,
982
[dnl
983
AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
984
AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
985
AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
986
 
987
AC_ARG_VAR([RTEMS_BSP],[RTEMS_BSP to build])
988
AC_MSG_CHECKING([for RTEMS_BSP])
989
AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
990
[dnl
991
  test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
992
])dnl
993
if test -z "$rtems_cv_RTEMS_BSP"; then
994
  AC_MSG_ERROR([Missing RTEMS_BSP])
995
fi
996
RTEMS_BSP="$rtems_cv_RTEMS_BSP"
997
AC_MSG_RESULT(${RTEMS_BSP})
998
AC_SUBST(RTEMS_BSP)
999
 
1000
PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
1001
AC_SUBST(PROJECT_INCLUDE)
1002
 
1003
project_libdir="${PROJECT_ROOT}/$RTEMS_BSP/lib"
1004
AC_SUBST(project_libdir)
1005
 
1006
RTEMS_ROOT="$PROJECT_ROOT/c/$RTEMS_BSP"
1007
AC_SUBST(RTEMS_ROOT)
1008
 
1009
GCC_SPECS="-isystem \$(PROJECT_INCLUDE)"
1010
AC_SUBST(GCC_SPECS)
1011
 
1012
RTEMS_ENABLE_BARE
1013
AC_SUBST(BARE_CPU_MODEL)
1014
AC_SUBST(BARE_CPU_CFLAGS)
1015
 
1016
AM_CONDITIONAL([MULTILIB],[false])
1017
 
1018
includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include"
1019
libdir="\${exec_prefix}/${RTEMS_BSP}/lib"
1020
])
1021
 
1022
dnl enable-rtemsbsp.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1023
 
1024
dnl Override the set of BSPs to be built.
1025
dnl used by the toplevel configure script
1026
dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
1027
AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
1028
[
1029
AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
1030
AC_ARG_ENABLE(rtemsbsp,
1031
AC_HELP_STRING([--enable-rtemsbsp="bsp1 bsp2 .."],
1032
[BSPs to include in build]),
1033
[case "${enableval}" in
1034
  yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
1035
  *) $1=$enableval;;
1036
esac],[$1=""])
1037
])
1038
 
1039
dnl check-bsps.m4,v 1.3 2002/07/17 22:28:20 ralf Exp
1040
 
1041
AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
1042
[dnl
1043
AC_REQUIRE([RTEMS_TOP])
1044
 
1045
AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
1046
if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
1047
  AC_MSG_RESULT([yes])
1048
else
1049
  AC_MSG_ERROR([no])
1050
fi
1051
])dnl
1052
 
1053
AC_DEFUN(RTEMS_ENABLE_BARE,
1054
[
1055
AC_ARG_ENABLE(bare-cpu-cflags,
1056
AC_HELP_STRING([--enable-bare-cpu-cflags],[specify a particular cpu cflag (bare bsp specific)]),
1057
[case "${enableval}" in
1058
  no) BARE_CPU_CFLAGS="" ;;
1059
  *)    BARE_CPU_CFLAGS="${enableval}" ;;
1060
esac],
1061
[BARE_CPU_CFLAGS=""])
1062
 
1063
AC_ARG_ENABLE(bare-cpu-model,
1064
AC_HELP_STRING([--enable-bare-cpu-model],[specify a particular cpu model (bare bsp specific)]),
1065
[case "${enableval}" in
1066
  no)   BARE_CPU_MODEL="" ;;
1067
  *)    BARE_CPU_MODEL="${enableval}" ;;
1068
esac],
1069
[BARE_CPU_MODEL=""])
1070
])
1071
 
1072
 
1073
dnl check-cpu.m4,v 1.3 2002/07/17 22:28:20 ralf Exp
1074
 
1075
dnl check if RTEMS support a cpu
1076
AC_DEFUN(RTEMS_CHECK_CPU,
1077
[dnl
1078
AC_REQUIRE([RTEMS_TOP])
1079
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
1080
 
1081
# Is this a supported CPU?
1082
AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
1083
if test -d "$srcdir/$RTEMS_TOPdir/cpukit/score/cpu/$RTEMS_CPU"; then
1084
  AC_MSG_RESULT(yes)
1085
else
1086
  AC_MSG_ERROR(no)
1087
fi
1088
])dnl
1089
 
1090
 
1091
dnl canonical-host.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1092
 
1093
AC_DEFUN(RTEMS_CANONICAL_HOST,
1094
[dnl
1095
AC_REQUIRE([AC_CANONICAL_HOST])
1096
RTEMS_HOST=$host_os
1097
case "${target}" in
1098
  # hpux unix port should go here
1099
  i[[34567]]86-*linux*)          # unix "simulator" port
1100
        RTEMS_HOST=Linux
1101
        ;;
1102
  i[[34567]]86-*freebsd*)         # unix "simulator" port
1103
        RTEMS_HOST=FreeBSD
1104
        ;;
1105
  i[[34567]]86-pc-cygwin*)      # Cygwin is just enough unix like :)
1106
        RTEMS_HOST=Cygwin
1107
        ;;
1108
  sparc-sun-solaris*)           # unix "simulator" port
1109
        RTEMS_HOST=Solaris
1110
        ;;
1111
  *)
1112
        ;;
1113
esac
1114
AC_SUBST(RTEMS_HOST)
1115
])dnl
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
 
1232
 
1233
AC_DEFUN([RTEMS_PROG_CCAS],
1234
[
1235
AC_REQUIRE([RTEMS_PROG_CC])
1236
AC_SUBST(CCAS,["$CC \$(GCCSPECS)"])
1237
AC_SUBST(CCASFLAGS,["-DASM \$(CFLAGS) \$(INCLUDES)"])
1238
])
1239
 
1240
dnl check-newlib.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1241
 
1242
AC_DEFUN(RTEMS_CHECK_NEWLIB,
1243
[dnl
1244
AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
1245
AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl
1246
AC_CACHE_CHECK([for RTEMS newlib],
1247
  rtems_cv_use_newlib,
1248
  [
1249
dnl some versions of newlib provide not_required_by_rtems
1250
    AC_TRY_LINK(
1251
      [extern void not_required_by_rtems() ;],
1252
      [not_required_by_rtems()],
1253
      rtems_cv_use_newlib="yes")
1254
 
1255
dnl some versions of newlib provide rtems_provides_crt0()
1256
    AS_IF([test -z "$rtems_cv_use_newlib"],
1257
      [AC_TRY_LINK(
1258
        [extern void rtems_provides_crt0() ;],
1259
        [rtems_provides_crt0()],
1260
        rtems_cv_use_newlib="yes",
1261
        rtems_cv_use_newlib="no")]
1262
    )
1263
  ])
1264
  RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
1265
  AC_SUBST(RTEMS_USE_NEWLIB)
1266
 
1267
  AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],
1268
    [ AC_DEFINE_UNQUOTED(RTEMS_NEWLIB,1,[if using newlib])]
1269
  )
1270
])
1271
 

powered by: WebSVN 2.1.0

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