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

Subversion Repositories or1k

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

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

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

powered by: WebSVN 2.1.0

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