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

Subversion Repositories or1k

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

powered by: WebSVN 2.1.0

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