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

Subversion Repositories or1k

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

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

powered by: WebSVN 2.1.0

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