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

Subversion Repositories or1k

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

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 enable-posix.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
884
 
885
AC_DEFUN(RTEMS_ENABLE_POSIX,
886
[
887
 
888
AC_ARG_ENABLE(posix,
889
AC_HELP_STRING([--enable-posix],[enable posix interface]),
890
[case "${enableval}" in
891
  yes) RTEMS_HAS_POSIX_API=yes ;;
892
  no) RTEMS_HAS_POSIX_API=no ;;
893
  *)  AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
894
esac],[RTEMS_HAS_POSIX_API=yes])
895
 
896
case "${host}" in
897
  # hpux unix port should go here
898
  i[[34567]]86-pc-linux*)         # unix "simulator" port
899
        RTEMS_HAS_POSIX_API=no
900
        ;;
901
  i[[34567]]86-*freebsd*) # unix "simulator" port
902
        RTEMS_HAS_POSIX_API=no
903
        ;;
904
  no_cpu-*rtems*)
905
        RTEMS_HAS_POSIX_API=no
906
        ;;
907
  sparc-sun-solaris*)             # unix "simulator" port
908
        RTEMS_HAS_POSIX_API=no
909
        ;;
910
  *)
911
        ;;
912
esac
913
AC_SUBST(RTEMS_HAS_POSIX_API)
914
])
915
 
916
dnl enable-inlines.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
917
 
918
AC_DEFUN(RTEMS_ENABLE_INLINES,
919
[AC_ARG_ENABLE(rtems-inlines,
920
AC_HELP_STRING([--enable-rtems-inlines],[enable RTEMS inline functions (default:enabled, disable to use macros)]),
921
[case "${enableval}" in
922
  yes) RTEMS_USE_MACROS=no ;;
923
  no) RTEMS_USE_MACROS=yes ;;
924
  *)  AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
925
esac],[RTEMS_USE_MACROS=no])
926
AC_SUBST(RTEMS_USE_MACROS)dnl
927
 
928
if test x"${RTEMS_USE_MACROS}" = x"yes";
929
then
930
  AC_DEFINE_UNQUOTED(USE_MACROS,1,[if using macros])
931
else
932
  AC_DEFINE_UNQUOTED(USE_INLINES,1,[if using inlines])
933
fi
934
 
935
 
936
])
937
 
938
dnl env-rtemscpu.m4,v 1.4 2002/08/06 07:31:26 ralf Exp
939
 
940
AC_DEFUN(RTEMS_ENV_RTEMSCPU,
941
[AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
942
 
943
if test x"$multilib" = x"yes"; then
944
  AS_IF([test -n "$with_multisubdir"],
945
    [MULTIBUILDTOP=`echo "/$with_multisubdir" | sed 's,/[[^\\/]]*,../,g'`])
946
  AC_SUBST(MULTIBUILDTOP)
947
 
948
  AS_IF([test -n "$with_multisubdir"],
949
    [MULTISUBDIR="/$with_multisubdir"])
950
  AC_SUBST(MULTISUBDIR)
951
 
952
  GCC_SPECS="-isystem \$(PROJECT_INCLUDE)"
953
  AC_SUBST(GCC_SPECS)
954
 
955
  PROJECT_INCLUDE="\$(PROJECT_ROOT)/lib/include"
956
  AC_SUBST(PROJECT_INCLUDE)
957
 
958
  project_libdir="\$(PROJECT_ROOT)/lib"
959
  AC_SUBST(project_libdir)
960
 
961
  RTEMS_ROOT="${PROJECT_ROOT}"
962
  AC_SUBST(RTEMS_ROOT)
963
 
964
  includedir="\${exec_prefix}/lib/include"
965
  libdir="${libdir}\$(MULTISUBDIR)"
966
else
967
  RTEMS_ENV_RTEMSBSP
968
  RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
969
fi
970
])
971
 
972
dnl This provides configure definitions used for multilib support
973
 
974
dnl parts of these macros are derived from newlib-1.8.2's multilib support
975
 
976
AC_DEFUN(RTEMS_ENABLE_MULTILIB,
977
[
978
AC_ARG_ENABLE(multilib,
979
AC_HELP_STRING([--enable-multilib],
980
[build many library versions (default=no)]),
981
[case "${enableval}" in
982
  yes) multilib=yes ;;
983
  no)  multilib=no ;;
984
  *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
985
 esac], [multilib=no])dnl
986
 
987
AM_CONDITIONAL(MULTILIB,test x"${multilib}" = x"yes")
988
])
989
 
990
AC_DEFUN([RTEMS_ENABLE_MULTILIB_MASTER],
991
[
992
AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
993
 
994
dnl We may get other options which we don't document:
995
dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
996
 
997
if test "[$]{srcdir}" = "."; then
998
  if test "[$]{with_target_subdir}" != "."; then
999
    multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}../ifelse([$2],,,[$2])"
1000
  else
1001
    multilib_basedir="[$]{srcdir}/[$]{with_multisrctop}ifelse([$2],,,[$2])"
1002
  fi
1003
else
1004
  multilib_basedir="[$]{srcdir}/ifelse([$2],,,[$2])"
1005
fi
1006
AC_SUBST(multilib_basedir)
1007
 
1008
if test "${multilib}" = "yes"; then
1009
  multilib_arg="--enable-multilib"
1010
else
1011
  multilib_arg=
1012
fi
1013
 
1014
AC_OUTPUT_COMMANDS(
1015
[case " $CONFIG_FILES " in
1016
 *" ]m4_if([$1],,Makefile,[$1])[ "*)
1017
    ac_file=]m4_if([$1],,Makefile,[$1])[ . ${multilib_basedir}/config-ml.in
1018
esac],
1019
[
1020
  srcdir=${srcdir}
1021
  host=${host}
1022
  target=${target}
1023
  with_multisrctop="${with_multisrctop}"
1024
  with_target_subdir="${with_target_subdir}"
1025
  with_multisubdir="${with_multisubdir}"
1026
  ac_configure_args="${multilib_arg} ${ac_configure_args}"
1027
  CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1028
  multilib_basedir=${multilib_basedir}
1029
  CC="${CC}"])
1030
])
1031
 
1032
dnl env-rtemsbsp.m4,v 1.3 2002/08/06 10:09:33 ralf Exp
1033
 
1034
dnl Pass a single BSP via an environment variable
1035
dnl used by per BSP configure scripts
1036
AC_DEFUN(RTEMS_ENV_RTEMSBSP,
1037
[dnl
1038
AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
1039
AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
1040
AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
1041
 
1042
AC_ARG_VAR([RTEMS_BSP],[RTEMS_BSP to build])
1043
AC_MSG_CHECKING([for RTEMS_BSP])
1044
AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
1045
[dnl
1046
  test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
1047
])dnl
1048
if test -z "$rtems_cv_RTEMS_BSP"; then
1049
  AC_MSG_ERROR([Missing RTEMS_BSP])
1050
fi
1051
RTEMS_BSP="$rtems_cv_RTEMS_BSP"
1052
AC_MSG_RESULT(${RTEMS_BSP})
1053
AC_SUBST(RTEMS_BSP)
1054
 
1055
PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
1056
AC_SUBST(PROJECT_INCLUDE)
1057
 
1058
project_libdir="${PROJECT_ROOT}/$RTEMS_BSP/lib"
1059
AC_SUBST(project_libdir)
1060
 
1061
RTEMS_ROOT="$PROJECT_ROOT/c/$RTEMS_BSP"
1062
AC_SUBST(RTEMS_ROOT)
1063
 
1064
GCC_SPECS="-isystem \$(PROJECT_INCLUDE)"
1065
AC_SUBST(GCC_SPECS)
1066
 
1067
RTEMS_ENABLE_BARE
1068
AC_SUBST(BARE_CPU_MODEL)
1069
AC_SUBST(BARE_CPU_CFLAGS)
1070
 
1071
AM_CONDITIONAL([MULTILIB],[false])
1072
 
1073
includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include"
1074
libdir="\${exec_prefix}/${RTEMS_BSP}/lib"
1075
])
1076
 
1077
dnl enable-rtemsbsp.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1078
 
1079
dnl Override the set of BSPs to be built.
1080
dnl used by the toplevel configure script
1081
dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
1082
AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
1083
[
1084
AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
1085
AC_ARG_ENABLE(rtemsbsp,
1086
AC_HELP_STRING([--enable-rtemsbsp="bsp1 bsp2 .."],
1087
[BSPs to include in build]),
1088
[case "${enableval}" in
1089
  yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
1090
  *) $1=$enableval;;
1091
esac],[$1=""])
1092
])
1093
 
1094
dnl check-bsps.m4,v 1.3 2002/07/17 22:28:20 ralf Exp
1095
 
1096
AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
1097
[dnl
1098
AC_REQUIRE([RTEMS_TOP])
1099
 
1100
AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
1101
if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
1102
  AC_MSG_RESULT([yes])
1103
else
1104
  AC_MSG_ERROR([no])
1105
fi
1106
])dnl
1107
 
1108
AC_DEFUN(RTEMS_ENABLE_BARE,
1109
[
1110
AC_ARG_ENABLE(bare-cpu-cflags,
1111
AC_HELP_STRING([--enable-bare-cpu-cflags],[specify a particular cpu cflag (bare bsp specific)]),
1112
[case "${enableval}" in
1113
  no) BARE_CPU_CFLAGS="" ;;
1114
  *)    BARE_CPU_CFLAGS="${enableval}" ;;
1115
esac],
1116
[BARE_CPU_CFLAGS=""])
1117
 
1118
AC_ARG_ENABLE(bare-cpu-model,
1119
AC_HELP_STRING([--enable-bare-cpu-model],[specify a particular cpu model (bare bsp specific)]),
1120
[case "${enableval}" in
1121
  no)   BARE_CPU_MODEL="" ;;
1122
  *)    BARE_CPU_MODEL="${enableval}" ;;
1123
esac],
1124
[BARE_CPU_MODEL=""])
1125
])
1126
 
1127
 
1128
dnl check-cpu.m4,v 1.3 2002/07/17 22:28:20 ralf Exp
1129
 
1130
dnl check if RTEMS support a cpu
1131
AC_DEFUN(RTEMS_CHECK_CPU,
1132
[dnl
1133
AC_REQUIRE([RTEMS_TOP])
1134
AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
1135
 
1136
# Is this a supported CPU?
1137
AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
1138
if test -d "$srcdir/$RTEMS_TOPdir/cpukit/score/cpu/$RTEMS_CPU"; then
1139
  AC_MSG_RESULT(yes)
1140
else
1141
  AC_MSG_ERROR(no)
1142
fi
1143
])dnl
1144
 
1145
 
1146
dnl canonical-host.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1147
 
1148
AC_DEFUN(RTEMS_CANONICAL_HOST,
1149
[dnl
1150
AC_REQUIRE([AC_CANONICAL_HOST])
1151
RTEMS_HOST=$host_os
1152
case "${target}" in
1153
  # hpux unix port should go here
1154
  i[[34567]]86-*linux*)          # unix "simulator" port
1155
        RTEMS_HOST=Linux
1156
        ;;
1157
  i[[34567]]86-*freebsd*)         # unix "simulator" port
1158
        RTEMS_HOST=FreeBSD
1159
        ;;
1160
  i[[34567]]86-pc-cygwin*)      # Cygwin is just enough unix like :)
1161
        RTEMS_HOST=Cygwin
1162
        ;;
1163
  sparc-sun-solaris*)           # unix "simulator" port
1164
        RTEMS_HOST=Solaris
1165
        ;;
1166
  *)
1167
        ;;
1168
esac
1169
AC_SUBST(RTEMS_HOST)
1170
])dnl
1171
 
1172
dnl
1173
dnl prog-cc.m4,v 1.2 2002/07/01 09:20:43 ralf Exp
1174
dnl
1175
dnl Check for target gcc
1176
dnl
1177
 
1178
AC_DEFUN(RTEMS_PROG_CC,
1179
[
1180
AC_BEFORE([$0], [AC_PROG_CPP])dnl
1181
AC_BEFORE([$0], [AC_PROG_CC])dnl
1182
AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
1183
 
1184
RTEMS_CHECK_TOOL(CC,gcc)
1185
test -z "$CC" && \
1186
  AC_MSG_ERROR([no acceptable cc found in \$PATH])
1187
AC_PROG_CC
1188
AC_PROG_CPP
1189
 
1190
AM_CONDITIONAL(RTEMS_USE_GCC,test x"$GCC" = x"yes")
1191
])
1192
 
1193
AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
1194
[
1195
dnl check target cc
1196
RTEMS_PROG_CC
1197
dnl check if the compiler supports --specs
1198
RTEMS_GCC_SPECS
1199
dnl check if the target compiler may use --pipe
1200
RTEMS_GCC_PIPE
1201
test "$rtems_cv_gcc_pipe" = "yes" && CC="$CC --pipe"
1202
 
1203
if test "$GCC" = yes; then
1204
]
1205
m4_if([$1],,[],[CPPFLAGS="$CPPFLAGS $1"])
1206
[
1207
CFLAGS="-g -Wall"
1208
fi
1209
 
1210
dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
1211
#case $build_os in
1212
#*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
1213
#*) ;;
1214
#esac
1215
AC_SUBST(GCCSED)
1216
])
1217
 
1218
dnl
1219
dnl canonicalize-tools.m4,v 1.3 2002/07/31 14:57:47 ralf Exp
1220
dnl
1221
dnl Set target tools
1222
dnl
1223
 
1224
AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
1225
[AC_REQUIRE([RTEMS_PROG_CC])dnl
1226
 
1227
dnl FIXME: What shall be done if these tools are not available?
1228
  RTEMS_CHECK_TOOL(AR,ar,no)
1229
 
1230
dnl special treatment of ranlib
1231
  RTEMS_CHECK_TOOL(RANLIB,ranlib,:)
1232
])
1233
 
1234
dnl check-tool.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1235
 
1236
dnl RTEMS_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
1237
AC_DEFUN(RTEMS_CHECK_TOOL,
1238
[
1239
  AS_IF([test "x$build_alias" != "x$host_alias"],
1240
    [rtems_tool_prefix=${ac_tool_prefix}])
1241
  AC_CHECK_PROG($1, ${rtems_tool_prefix}$2, ${rtems_tool_prefix}$2, $3, $4)
1242
])
1243
 
1244
dnl
1245
dnl gcc-specs.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1246
dnl
1247
dnl Check whether the target compiler accepts -specs
1248
dnl
1249
 
1250
AC_DEFUN(RTEMS_GCC_SPECS,
1251
[AC_REQUIRE([RTEMS_PROG_CC])
1252
AC_CACHE_CHECK(whether $CC accepts -specs,rtems_cv_gcc_specs,
1253
[
1254
rtems_cv_gcc_specs=no
1255
if test x"$GCC" = x"yes"; then
1256
  touch confspec
1257
  echo 'void f(){}' >conftest.c
1258
  if test -z "`${CC} -specs confspec -c conftest.c 2>&1`";then
1259
    rtems_cv_gcc_specs=yes
1260
  fi
1261
fi
1262
rm -f confspec conftest*
1263
])])
1264
 
1265
dnl
1266
dnl gcc-pipe.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1267
dnl
1268
dnl Check whether the target compiler accepts -pipe
1269
dnl
1270
 
1271
AC_DEFUN(RTEMS_GCC_PIPE,
1272
[AC_REQUIRE([RTEMS_PROG_CC])
1273
AC_REQUIRE([AC_CANONICAL_HOST])
1274
AC_CACHE_CHECK(whether $CC accepts --pipe,rtems_cv_gcc_pipe,
1275
[
1276
rtems_cv_gcc_pipe=no
1277
if test x"$GCC" = x"yes"; then
1278
    echo 'void f(){}' >conftest.c
1279
    if test -z "`${CC} --pipe -c conftest.c 2>&1`";then
1280
      rtems_cv_gcc_pipe=yes
1281
    fi
1282
    rm -f conftest*
1283
fi
1284
])
1285
])
1286
 
1287
dnl
1288
dnl check-multiprocessing.m4,v 1.2 2002/06/26 10:56:11 ralf Exp
1289
dnl
1290
 
1291
AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING,
1292
[dnl
1293
AC_REQUIRE([RTEMS_ENV_RTEMSCPU])dnl
1294
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
1295
AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl
1296
 
1297
AS_IF([test "$enable_multiprocessing" = "yes"],
1298
  [HAS_MP="yes"],
1299
  [HAS_MP="no"])
1300
])
1301
 
1302
AC_DEFUN(RTEMS_DEFINE_MULTIPROCESSING,
1303
[AC_REQUIRE([RTEMS_CHECK_MULTIPROCESSING])dnl
1304
if test x"${HAS_MP}" = x"yes";
1305
then
1306
  AC_DEFINE_UNQUOTED(RTEMS_MULTIPROCESSING,1,[if multiprocessing is enabled])
1307
fi
1308
])
1309
 
1310
dnl enable-multiprocessing.m4,v 1.3 2002/07/01 09:20:43 ralf Exp
1311
 
1312
AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING,
1313
[
1314
AC_ARG_ENABLE(multiprocessing,
1315
AC_HELP_STRING([--enable-multiprocessing],[enable multiprocessing interface]),
1316
[case "${enable_multiprocessing}" in
1317
  yes) ;;
1318
  no) ;;
1319
  *)  AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
1320
esac],[enable_multiprocessing=no])
1321
])
1322
 
1323
dnl check-posix.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1324
dnl
1325
AC_DEFUN(RTEMS_CHECK_POSIX_API,
1326
[dnl
1327
AC_REQUIRE([RTEMS_CHECK_CPU])dnl
1328
AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
1329
 
1330
AC_CACHE_CHECK([whether CPU supports libposix],
1331
  rtems_cv_HAS_POSIX_API,
1332
  [dnl
1333
    case "$RTEMS_CPU" in
1334
    unix*)
1335
      rtems_cv_HAS_POSIX_API="no"
1336
      ;;
1337
    *)
1338
      if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
1339
        rtems_cv_HAS_POSIX_API="yes";
1340
      else
1341
        rtems_cv_HAS_POSIX_API="disabled";
1342
      fi
1343
      ;;
1344
    esac])
1345
if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
1346
  HAS_POSIX_API="yes";
1347
else
1348
  HAS_POSIX_API="no";
1349
fi
1350
AC_SUBST(HAS_POSIX_API)dnl
1351
])
1352
 
1353
AC_DEFUN(RTEMS_DEFINE_POSIX_API,
1354
[AC_REQUIRE([RTEMS_CHECK_POSIX_API])dnl
1355
AS_IF(
1356
  [test x"${HAS_POSIX_API}" = x"yes"],
1357
  [AC_DEFINE_UNQUOTED(RTEMS_POSIX_API,1,[if posix api is supported])])
1358
])
1359
 
1360
dnl check-newlib.m4,v 1.1 2002/06/17 08:52:47 ralf Exp
1361
 
1362
AC_DEFUN(RTEMS_CHECK_NEWLIB,
1363
[dnl
1364
AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
1365
AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl
1366
AC_CACHE_CHECK([for RTEMS newlib],
1367
  rtems_cv_use_newlib,
1368
  [
1369
dnl some versions of newlib provide not_required_by_rtems
1370
    AC_TRY_LINK(
1371
      [extern void not_required_by_rtems() ;],
1372
      [not_required_by_rtems()],
1373
      rtems_cv_use_newlib="yes")
1374
 
1375
dnl some versions of newlib provide rtems_provides_crt0()
1376
    AS_IF([test -z "$rtems_cv_use_newlib"],
1377
      [AC_TRY_LINK(
1378
        [extern void rtems_provides_crt0() ;],
1379
        [rtems_provides_crt0()],
1380
        rtems_cv_use_newlib="yes",
1381
        rtems_cv_use_newlib="no")]
1382
    )
1383
  ])
1384
  RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
1385
  AC_SUBST(RTEMS_USE_NEWLIB)
1386
 
1387
  AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],
1388
    [ AC_DEFINE_UNQUOTED(RTEMS_NEWLIB,1,[if using newlib])]
1389
  )
1390
])
1391
 
1392
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
1393
 
1394
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1395
 
1396
# This program is free software; you can redistribute it and/or modify
1397
# it under the terms of the GNU General Public License as published by
1398
# the Free Software Foundation; either version 2, or (at your option)
1399
# any later version.
1400
 
1401
# This program is distributed in the hope that it will be useful,
1402
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1403
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1404
# GNU General Public License for more details.
1405
 
1406
# You should have received a copy of the GNU General Public License
1407
# along with this program; if not, write to the Free Software
1408
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1409
# 02111-1307, USA.
1410
 
1411
AC_PREREQ([2.52])
1412
 
1413
# serial 6
1414
 
1415
# When config.status generates a header, we must update the stamp-h file.
1416
# This file resides in the same directory as the config header
1417
# that is generated.  We must strip everything past the first ":",
1418
# and everything past the last "/".
1419
 
1420
# _AM_DIRNAME(PATH)
1421
# -----------------
1422
# Like AS_DIRNAME, only do it during macro expansion
1423
AC_DEFUN([_AM_DIRNAME],
1424
       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
1425
              m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
1426
                    m4_if(regexp([$1], [^/.*]), -1,
1427
                          [.],
1428
                          patsubst([$1], [^\(/\).*], [\1])),
1429
                    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
1430
              patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
1431
])# _AM_DIRNAME
1432
 
1433
 
1434
# The stamp files are numbered to have different names.
1435
# We could number them on a directory basis, but that's additional
1436
# complications, let's have a unique counter.
1437
m4_define([_AM_STAMP_Count], [0])
1438
 
1439
 
1440
# _AM_STAMP(HEADER)
1441
# -----------------
1442
# The name of the stamp file for HEADER.
1443
AC_DEFUN([_AM_STAMP],
1444
[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
1445
AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
1446
                               [:.*])))/stamp-h[]_AM_STAMP_Count])
1447
 
1448
 
1449
# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
1450
# ------------------------------------------------------------
1451
# We used to try to get a real timestamp in stamp-h.  But the fear is that
1452
# that will cause unnecessary cvs conflicts.
1453
AC_DEFUN([_AM_CONFIG_HEADER],
1454
[# Add the stamp file to the list of files AC keeps track of,
1455
# along with our hook.
1456
AC_CONFIG_HEADERS([$1],
1457
                  [# update the timestamp
1458
echo 'timestamp for $1' >"_AM_STAMP([$1])"
1459
$2],
1460
                  [$3])
1461
])# _AM_CONFIG_HEADER
1462
 
1463
 
1464
# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
1465
# --------------------------------------------------------------
1466
AC_DEFUN([AM_CONFIG_HEADER],
1467
[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
1468
])# AM_CONFIG_HEADER
1469
 

powered by: WebSVN 2.1.0

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