source: rtems/c/src/tests/psxtests/aclocal.m4 @ 473b4e5

4.104.114.84.95
Last change on this file since 473b4e5 was 473b4e5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/04/99 at 13:30:15

Regenerated.

  • Property mode set to 100644
File size: 17.8 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4a
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl $Id$
14
15dnl
16dnl RTEMS_TOP($1)
17dnl
18dnl $1 .. relative path from this configure.in to the toplevel configure.in
19dnl
20AC_DEFUN(RTEMS_TOP,
21[dnl
22AC_ARG_WITH(target-subdir,
23[  --with-target-subdir=DIR],
24TARGET_SUBDIR="$withval",
25TARGET_SUBDIR=".")
26
27RTEMS_TOPdir="$1";
28AC_SUBST(RTEMS_TOPdir)
29
30dnl Determine RTEMS Version string from the VERSION file
31dnl Hopefully, Joel never changes its format ;-
32AC_MSG_CHECKING([for RTEMS Version])
33if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
34changequote(,)dnl
35RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
36sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
37changequote([,])dnl
38else
39AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
40fi
41if test -z "$RTEMS_VERSION"; then
42AC_MSG_ERROR(Unable to determine version)
43fi
44AC_MSG_RESULT($RTEMS_VERSION)
45])dnl
46
47dnl
48dnl $Id$
49dnl
50
51dnl canonicalize target cpu
52dnl NOTE: Most rtems targets do not fullfil autoconf's
53dnl target naming conventions "processor-vendor-os"
54dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
55dnl and we have to fix it for rtems ourselves
56
57AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
58[
59AC_CANONICAL_SYSTEM
60AC_MSG_CHECKING(rtems target cpu)
61changequote(,)dnl
62case "${target}" in
63  # hpux unix port should go here
64  i[3456]86-go32-rtems*)
65        RTEMS_CPU=i386
66        ;;
67  i[3456]86-pc-linux*)          # unix "simulator" port
68        RTEMS_CPU=unix
69        ;;
70  i[3456]86-*freebsd2*)         # unix "simulator" port
71        RTEMS_CPU=unix
72        ;;
73  no_cpu-*rtems*)
74        RTEMS_CPU=no_cpu
75        ;;
76  sparc-sun-solaris*)           # unix "simulator" port
77        RTEMS_CPU=unix
78        ;;
79  *)
80        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
81        ;;
82esac
83changequote([,])dnl
84AC_SUBST(RTEMS_CPU)
85AC_MSG_RESULT($RTEMS_CPU)
86])
87
88# Do all the work for Automake.  This macro actually does too much --
89# some checks are only needed if your package does certain things.
90# But this isn't really a big deal.
91
92# serial 1
93
94dnl Usage:
95dnl AM_INIT_AUTOMAKE(package,version, [no-define])
96
97AC_DEFUN(AM_INIT_AUTOMAKE,
98[AC_REQUIRE([AC_PROG_INSTALL])
99dnl We require 2.13 because we rely on SHELL being computed by configure.
100AC_PREREQ([2.13])
101PACKAGE=[$1]
102AC_SUBST(PACKAGE)
103VERSION=[$2]
104AC_SUBST(VERSION)
105dnl test to see if srcdir already configured
106if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
107  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
108fi
109ifelse([$3],,
110AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
111AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
112AC_REQUIRE([AM_SANITY_CHECK])
113AC_REQUIRE([AC_ARG_PROGRAM])
114dnl FIXME This is truly gross.
115missing_dir=`cd $ac_aux_dir && pwd`
116AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
117AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
118AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
119AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
120AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
121AC_REQUIRE([AC_PROG_MAKE_SET])])
122
123#
124# Check to make sure that the build environment is sane.
125#
126
127AC_DEFUN(AM_SANITY_CHECK,
128[AC_MSG_CHECKING([whether build environment is sane])
129# Just in case
130sleep 1
131echo timestamp > conftestfile
132# Do `set' in a subshell so we don't clobber the current shell's
133# arguments.  Must try -L first in case configure is actually a
134# symlink; some systems play weird games with the mod time of symlinks
135# (eg FreeBSD returns the mod time of the symlink's containing
136# directory).
137if (
138   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
139   if test "[$]*" = "X"; then
140      # -L didn't work.
141      set X `ls -t $srcdir/configure conftestfile`
142   fi
143   if test "[$]*" != "X $srcdir/configure conftestfile" \
144      && test "[$]*" != "X conftestfile $srcdir/configure"; then
145
146      # If neither matched, then we have a broken ls.  This can happen
147      # if, for instance, CONFIG_SHELL is bash and it inherits a
148      # broken ls alias from the environment.  This has actually
149      # happened.  Such a system could not be considered "sane".
150      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
151alias in your environment])
152   fi
153
154   test "[$]2" = conftestfile
155   )
156then
157   # Ok.
158   :
159else
160   AC_MSG_ERROR([newly created file is older than distributed files!
161Check your system clock])
162fi
163rm -f conftest*
164AC_MSG_RESULT(yes)])
165
166dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
167dnl The program must properly implement --version.
168AC_DEFUN(AM_MISSING_PROG,
169[AC_MSG_CHECKING(for working $2)
170# Run test in a subshell; some versions of sh will print an error if
171# an executable is not found, even if stderr is redirected.
172# Redirect stdin to placate older versions of autoconf.  Sigh.
173if ($2 --version) < /dev/null > /dev/null 2>&1; then
174   $1=$2
175   AC_MSG_RESULT(found)
176else
177   $1="$3/missing $2"
178   AC_MSG_RESULT(missing)
179fi
180AC_SUBST($1)])
181
182# Add --enable-maintainer-mode option to configure.
183# From Jim Meyering
184
185# serial 1
186
187AC_DEFUN(AM_MAINTAINER_MODE,
188[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
189  dnl maintainer-mode is disabled by default
190  AC_ARG_ENABLE(maintainer-mode,
191[  --enable-maintainer-mode enable make rules and dependencies not useful
192                          (and sometimes confusing) to the casual installer],
193      USE_MAINTAINER_MODE=$enableval,
194      USE_MAINTAINER_MODE=no)
195  AC_MSG_RESULT($USE_MAINTAINER_MODE)
196  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
197  MAINT=$MAINTAINER_MODE_TRUE
198  AC_SUBST(MAINT)dnl
199]
200)
201
202# Define a conditional.
203
204AC_DEFUN(AM_CONDITIONAL,
205[AC_SUBST($1_TRUE)
206AC_SUBST($1_FALSE)
207if $2; then
208  $1_TRUE=
209  $1_FALSE='#'
210else
211  $1_TRUE='#'
212  $1_FALSE=
213fi])
214
215dnl $Id$
216
217AC_DEFUN(RTEMS_ENABLE_INLINES,
218[AC_ARG_ENABLE(rtems-inlines,
219[  --enable-rtems-inlines               enable RTEMS inline functions]
220[                                       (default:enabled, disable to use macros)],
221[case "${enableval}" in
222  yes) RTEMS_USE_MACROS=no ;;
223  no) RTEMS_USE_MACROS=yes ;;
224  *)  AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
225esac],[RTEMS_USE_MACROS=no])
226AC_SUBST(RTEMS_USE_MACROS)dnl
227])
228
229dnl $Id$
230
231AC_DEFUN(RTEMS_ENABLE_GCC28,
232[
233AC_ARG_ENABLE(gcc28,
234[  --enable-gcc28                       enable use of gcc 2.8.x features],
235[case "${enableval}" in
236  yes) RTEMS_USE_GCC272=no ;;
237  no) RTEMS_USE_GCC272=yes ;;
238  *)  AC_MSG_ERROR(bad value ${enableval} for gcc-28 option) ;;
239esac],[RTEMS_USE_GCC272=no])
240])
241
242dnl $Id$
243
244AC_DEFUN(RTEMS_ENABLE_LIBCDIR,
245[
246AC_ARG_ENABLE(libcdir,
247[  --enable-libcdir=directory           set the directory for the C library],
248[ RTEMS_LIBC_DIR="${enableval}" ; \
249test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] )
250AC_SUBST(RTEMS_LIBC_DIR)dnl
251])
252
253AC_DEFUN(RTEMS_ENABLE_BARE,
254[
255AC_ARG_ENABLE(bare-cpu-cflags,
256[  --enable-bare-cpu-cflags             specify a particular cpu cflag]
257[                                       (bare bsp specific)],
258[case "${enableval}" in
259  no) BARE_CPU_CFLAGS="" ;;
260  *)    BARE_CPU_CFLAGS="${enableval}" ;;
261esac],
262[BARE_CPU_CFLAGS=""])
263
264AC_ARG_ENABLE(bare-cpu-model,
265[  --enable-bare-cpu-model              specify a particular cpu model]
266[                                       (bare bsp specific)],
267[case "${enableval}" in
268  no)   BARE_CPU_MODEL="" ;;
269  *)    BARE_CPU_MODEL="${enableval}" ;;
270esac],
271[BARE_CPU_MODEL=""])
272])
273
274
275dnl $Id$
276
277dnl Override the set of BSPs to be built.
278dnl used by the toplevel configure script
279dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
280AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
281[
282AC_ARG_ENABLE(rtemsbsp,
283[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
284[case "${enableval}" in
285  yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
286  *) $1=$enableval;;
287esac],[$1=""])
288])
289
290dnl Pass a single BSP via an environment variable
291dnl used by per BSP configure scripts
292AC_DEFUN(RTEMS_ENV_RTEMSBSP,
293[dnl
294AC_MSG_CHECKING([for RTEMS_BSP])
295AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
296[dnl
297  test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
298])dnl
299if test -z "$rtems_cv_RTEMS_BSP"; then
300  AC_MSG_ERROR([Missing RTEMS_BSP])
301fi
302RTEMS_BSP="$rtems_cv_RTEMS_BSP"
303AC_MSG_RESULT(${RTEMS_BSP})
304AC_SUBST(RTEMS_BSP)
305])
306
307dnl $Id$
308
309dnl check if RTEMS support a cpu
310AC_DEFUN(RTEMS_CHECK_CPU,
311[dnl
312AC_REQUIRE([RTEMS_TOP])
313AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
314# Is this a supported CPU?
315AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
316if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
317  AC_MSG_RESULT(yes)
318else
319  AC_MSG_ERROR(no)
320fi
321])dnl
322
323
324dnl $Id$
325
326AC_DEFUN(RTEMS_CANONICAL_HOST,
327[dnl
328AC_REQUIRE([AC_CANONICAL_HOST])
329RTEMS_HOST=$host_os
330changequote(,)dnl
331case "${target}" in
332  # hpux unix port should go here
333  i[3456]86-pc-linux*)         # unix "simulator" port
334        RTEMS_HOST=Linux
335        ;;
336  i[3456]86-*freebsd2*) # unix "simulator" port
337        RTEMS_HOST=FreeBSD
338        ;;
339  sparc-sun-solaris*)             # unix "simulator" port
340        RTEMS_HOST=Solaris
341        ;;
342  *)
343        ;;
344esac
345changequote([,])dnl
346AC_SUBST(RTEMS_HOST)
347])dnl
348
349dnl
350dnl $Id$
351dnl
352
353AC_DEFUN(RTEMS_PROJECT_ROOT,
354[dnl
355AC_REQUIRE([RTEMS_TOP])
356if test "$TARGET_SUBDIR" = "." ; then
357PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
358else
359PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
360fi
361AC_SUBST(PROJECT_ROOT)
362
363RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
364AC_SUBST(RTEMS_ROOT)
365
366INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
367AC_SUBST(INSTALL_CHANGE)
368
369PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
370AC_SUBST(PACKHEX)
371])
372
373
374dnl
375dnl $Id$
376dnl
377dnl Check for target gcc
378dnl
379dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
380dnl                             Completely reworked
381
382AC_DEFUN(RTEMS_PROG_CC,
383[
384AC_BEFORE([$0], [AC_PROG_CPP])dnl
385AC_BEFORE([$0], [AC_PROG_CC])dnl
386AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
387
388dnl Only accept gcc and cc
389dnl NOTE: This might be too restrictive for native compilation
390AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
391test -z "$CC_FOR_TARGET" \
392  && AC_MSG_ERROR([no acceptable cc found in \$PATH])
393
394dnl backup
395rtems_save_CC=$CC
396rtems_save_CFLAGS=$CFLAGS
397
398dnl temporarily set CC
399CC=$CC_FOR_TARGET
400
401AC_PROG_CC_WORKS
402AC_PROG_CC_GNU
403
404if test $ac_cv_prog_gcc = yes; then
405  GCC=yes
406dnl Check whether -g works, even if CFLAGS is set, in case the package
407dnl plays around with CFLAGS (such as to build both debugging and
408dnl normal versions of a library), tasteless as that idea is.
409  ac_test_CFLAGS="${CFLAGS+set}"
410  ac_save_CFLAGS="$CFLAGS"
411  CFLAGS=
412  AC_PROG_CC_G
413  if test "$ac_test_CFLAGS" = set; then
414    CFLAGS="$ac_save_CFLAGS"
415  elif test $ac_cv_prog_cc_g = yes; then
416    CFLAGS="-g -O2"
417  else
418    CFLAGS="-O2"
419  fi
420else
421  GCC=
422  test "${CFLAGS+set}" = set || CFLAGS="-g"
423fi
424
425rtems_cv_prog_gcc=$ac_cv_prog_gcc
426rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
427rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
428rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
429
430dnl restore initial values
431CC=$rtems_save_CC
432CFLAGS=$rtems_save_CFLAGS
433
434unset ac_cv_prog_gcc
435unset ac_cv_prog_cc_g
436unset ac_cv_prog_cc_works
437unset ac_cv_prog_cc_cross
438])
439
440AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
441[
442dnl check target cc
443RTEMS_PROG_CC
444dnl check if the compiler supports --specs
445RTEMS_GCC_SPECS
446dnl check if the target compiler may use --pipe
447RTEMS_GCC_PIPE
448dnl check if the compiler supports --specs if gcc28 is requested
449if test "$RTEMS_USE_GCC272" != "yes" ; then
450  if test "$rtems_cv_gcc_specs" = "no"; then
451    AC_MSG_WARN([*** disabling --enable-gcc28])
452      RTEMS_USE_GCC272=yes
453  fi
454fi
455test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
456
457dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
458case $host_os in
459*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
460*) ;;
461esac
462AC_SUBST(GCCSED)
463])
464
465dnl
466dnl  $Id$
467dnl
468dnl Set program_prefix
469dnl
470dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
471dnl                             Extracted from configure
472
473AC_DEFUN(RTEMS_TOOL_PREFIX,
474[AC_REQUIRE([AC_CANONICAL_TARGET])dnl
475AC_REQUIRE([AC_CANONICAL_BUILD])dnl
476
477changequote(,)dnl
478if [ "${program_prefix}" = "NONE" ] ; then
479  if [ "${target}" = "${host}" ] ; then
480    program_prefix=
481  else
482    program_prefix=${target}-
483  fi
484fi
485changequote([,])dnl
486])
487
488dnl
489dnl $Id$
490dnl
491dnl Check whether the target compiler accepts -specs
492dnl
493dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
494dnl
495
496AC_DEFUN(RTEMS_GCC_SPECS,
497[AC_REQUIRE([RTEMS_PROG_CC])
498AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
499[
500rtems_cv_gcc_specs=no
501if test "$rtems_cv_prog_gcc" = "yes"; then
502  touch confspec
503  echo 'void f(){}' >conftest.c
504  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
505    rtems_cv_gcc_specs=yes
506  fi
507fi
508rm -f confspec conftest*
509])])
510
511dnl
512dnl $Id$
513dnl
514dnl Check whether the target compiler accepts -pipe
515dnl
516dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
517dnl
518
519AC_DEFUN(RTEMS_GCC_PIPE,
520[AC_REQUIRE([RTEMS_PROG_CC])
521AC_REQUIRE([AC_CANONICAL_HOST])
522AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
523[
524rtems_cv_gcc_pipe=no
525if test "$rtems_cv_prog_gcc" = "yes"; then
526case "$host_os" in
527  cygwin*)
528    ;;
529  *)
530    echo 'void f(){}' >conftest.c
531    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
532      rtems_cv_gcc_pipe=yes
533    fi
534    rm -f conftest*
535    ;;
536esac
537fi
538])
539])
540
541dnl
542dnl $Id$
543dnl
544dnl Set target tools
545dnl
546dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
547dnl             fixing cache/environment variable handling
548dnl             adding checks for cygwin/egcs '\\'-bug
549dnl             adding checks for ranlib/ar -s problem
550dnl
551dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
552dnl
553
554AC_DEFUN(RTEMS_GCC_PRINT,
555[ case $host_os in
556  *cygwin*)
557    dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
558    dnl        Should be removed once cygwin/egcs reports '/' only
559    $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
560    ;;
561  *)
562    $1=`$CC_FOR_TARGET --print-prog-name=$2`
563    ;;
564  esac
565])
566
567AC_DEFUN(RTEMS_PATH_TOOL,
568[
569AC_MSG_CHECKING([target's $2])
570AC_CACHE_VAL(ac_cv_path_$1,:)
571AC_MSG_RESULT([$ac_cv_path_$1])
572
573if test -n "$ac_cv_path_$1"; then
574  dnl retrieve the value from the cache
575  $1=$ac_cv_path_$1
576else
577  dnl the cache was not set
578  if test -z "[$]$1" ; then
579    if test "$rtems_cv_prog_gcc" = "yes"; then
580      # We are using gcc, ask it about its tool
581      # NOTE: Necessary if gcc was configured to use the target's
582      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
583      RTEMS_GCC_PRINT($1,$2)
584    fi
585  else
586    # The user set an environment variable.
587    # Check whether it is an absolute path, otherwise AC_PATH_PROG
588    # will override the environment variable, which isn't what the user
589    # intends
590    AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
591    case "[$]$1" in
592    /*) # valid
593      AC_MSG_RESULT("yes")
594    ;;
595    *)  # invalid for AC_PATH_PROG
596      AC_MSG_RESULT("no")
597      AC_MSG_ERROR([***]
598        [Environment variable $1 should either]
599        [be unset (preferred) or contain an absolute path])
600    ;;
601    esac
602  fi
603
604  AC_PATH_PROG($1,"$program_prefix"$2,$3)
605fi
606])
607
608AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
609[AC_REQUIRE([RTEMS_PROG_CC])dnl
610
611dnl FIXME: What shall be done if these tools are not available?
612  RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
613  RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
614  RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
615  RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
616
617dnl special treatment of ranlib
618  RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
619  if test "$RANLIB_FOR_TARGET" = "no"; then
620    # ranlib wasn't found; check if ar -s is available
621    RTEMS_AR_FOR_TARGET_S
622    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
623      dnl override RANLIB_FOR_TARGET's cache
624      ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
625      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
626    else
627      AC_MSG_ERROR([***]
628        [Can't figure out how to build a library index]
629        [Neither ranlib nor ar -s seem to be available] )
630    fi
631  fi
632
633dnl NOTE: These may not be available if not using gnutools
634  RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
635  RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
636  RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
637])
638
639dnl
640dnl $Id$
641dnl
642
643AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
644[
645AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
646rtems_cv_AR_FOR_TARGET_S,
647[
648cat > conftest.$ac_ext <<EOF
649int foo( int b )
650{ return b; }
651EOF
652if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
653  && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
654  && test -s conftest.a ; \
655then
656  rtems_cv_AR_FOR_TARGET_S="yes"
657else
658  rtems_cv_AR_FOR_TARGET_S="no"
659fi
660  rm -f conftest*
661])
662])
663
664
665dnl $Id$
666
667dnl Report all available bsps for a target,
668dnl check if a bsp-subdirectory is present for all bsps found
669dnl
670dnl RTEMS_CHECK_BSPS(bsp_list)
671AC_DEFUN(RTEMS_CHECK_BSPS,
672[
673AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target
674AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
675AC_MSG_CHECKING([for bsps])
676case "${target}" in
677changequote(,)dnl
678  i[3456]86-go32-rtems*)
679changequote([,])dnl
680    $1="go32 go32_p5"
681    ;;
682  *)
683    files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU`
684    for file in $files; do
685      case $file in
686        shared*);;
687        Makefile*);;
688        READ*);;
689        CVS*);;
690        pxfl*);;
691        go32*);;       # so the i386 port can pick up the other Makefiles
692        # Now account for BSPs with build variants
693        gen68360)      rtems_bsp="$rtems_bsp gen68360 gen68360_040";;
694        p4000)         rtems_bsp="$rtems_bsp p4600 p4650";;
695        mvme162)       rtems_bsp="$rtems_bsp mvme162 mvme162lx";;
696        *) $1="[$]$1 $file";;
697      esac;
698    done
699    ;;
700esac
701AC_MSG_RESULT([[$]$1 .. done])
702])dnl
703
704AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
705[dnl
706AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
707if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
708  AC_MSG_RESULT([yes])
709else
710  AC_MSG_ERROR([no])
711fi
712])dnl
713
Note: See TracBrowser for help on using the repository browser.