source: rtems/c/src/lib/libbsp/aclocal.m4 @ a24c280

4.104.114.84.95
Last change on this file since a24c280 was a24c280, checked in by Joel Sherrill <joel.sherrill@…>, on 09/09/99 at 21:22:36

Applied patch rtems-rc-19990820-6.diff.gz from
Ralf Corsepius <corsepiu@…> which converted many
Makefile.in's to Makefile.am's. This added a lot of files.

  • Property mode set to 100644
File size: 17.9 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4
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# Add --enable-maintainer-mode option to configure.
89# From Jim Meyering
90
91# serial 1
92
93AC_DEFUN(AM_MAINTAINER_MODE,
94[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
95  dnl maintainer-mode is disabled by default
96  AC_ARG_ENABLE(maintainer-mode,
97[  --enable-maintainer-mode enable make rules and dependencies not useful
98                          (and sometimes confusing) to the casual installer],
99      USE_MAINTAINER_MODE=$enableval,
100      USE_MAINTAINER_MODE=no)
101  AC_MSG_RESULT($USE_MAINTAINER_MODE)
102  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
103  MAINT=$MAINTAINER_MODE_TRUE
104  AC_SUBST(MAINT)dnl
105]
106)
107
108# Define a conditional.
109
110AC_DEFUN(AM_CONDITIONAL,
111[AC_SUBST($1_TRUE)
112AC_SUBST($1_FALSE)
113if $2; then
114  $1_TRUE=
115  $1_FALSE='#'
116else
117  $1_TRUE='#'
118  $1_FALSE=
119fi])
120
121dnl $Id$
122
123AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING,
124[
125AC_ARG_ENABLE(multiprocessing,
126[  --enable-multiprocessing             enable multiprocessing interface],
127[case "${enableval}" in
128  yes) RTEMS_HAS_MULTIPROCESSING=yes ;;
129  no) RTEMS_HAS_MULTIPROCESSING=no ;;
130  *)  AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
131esac],[RTEMS_HAS_MULTIPROCESSING=no])
132AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl
133])
134
135dnl $Id$
136
137AC_DEFUN(RTEMS_ENABLE_NETWORKING,
138[
139AC_ARG_ENABLE(networking,
140[  --enable-networking                  enable TCP/IP stack],
141[case "${enableval}" in
142  yes) RTEMS_HAS_NETWORKING=yes ;;
143  no) RTEMS_HAS_NETWORKING=no ;;
144  *)  AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;;
145esac],[RTEMS_HAS_NETWORKING=yes])
146AC_SUBST(RTEMS_HAS_NETWORKING)dnl
147])
148
149dnl $Id$
150
151AC_DEFUN(RTEMS_ENABLE_LIBCDIR,
152[
153AC_ARG_ENABLE(libcdir,
154[  --enable-libcdir=directory           set the directory for the C library],
155[ RTEMS_LIBC_DIR="${enableval}" ; \
156test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] )
157AC_SUBST(RTEMS_LIBC_DIR)dnl
158])
159
160AC_DEFUN(RTEMS_ENABLE_BARE,
161[
162AC_ARG_ENABLE(bare-cpu-cflags,
163[  --enable-bare-cpu-cflags             specify a particular cpu cflag]
164[                                       (bare bsp specific)],
165[case "${enableval}" in
166  no) BARE_CPU_CFLAGS="" ;;
167  *)    BARE_CPU_CFLAGS="${enableval}" ;;
168esac],
169[BARE_CPU_CFLAGS=""])
170
171AC_ARG_ENABLE(bare-cpu-model,
172[  --enable-bare-cpu-model              specify a particular cpu model]
173[                                       (bare bsp specific)],
174[case "${enableval}" in
175  no)   BARE_CPU_MODEL="" ;;
176  *)    BARE_CPU_MODEL="${enableval}" ;;
177esac],
178[BARE_CPU_MODEL=""])
179])
180
181
182dnl $Id$
183
184dnl Override the set of BSPs to be built.
185dnl used by the toplevel configure script
186dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)
187AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
188[
189AC_ARG_ENABLE(rtemsbsp,
190[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
191[case "${enableval}" in
192  yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);;
193  *) $1=$enableval;;
194esac],[$1=""])
195])
196
197dnl Pass a single BSP via an environment variable
198dnl used by per BSP configure scripts
199AC_DEFUN(RTEMS_ENV_RTEMSBSP,
200[dnl
201AC_MSG_CHECKING([for RTEMS_BSP])
202AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
203[dnl
204  test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";
205])dnl
206if test -z "$rtems_cv_RTEMS_BSP"; then
207  AC_MSG_ERROR([Missing RTEMS_BSP])
208fi
209RTEMS_BSP="$rtems_cv_RTEMS_BSP"
210AC_MSG_RESULT(${RTEMS_BSP})
211AC_SUBST(RTEMS_BSP)
212])
213
214dnl $Id$
215
216dnl check if RTEMS support a cpu
217AC_DEFUN(RTEMS_CHECK_CPU,
218[dnl
219AC_REQUIRE([RTEMS_TOP])
220AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
221# Is this a supported CPU?
222AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
223if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
224  AC_MSG_RESULT(yes)
225else
226  AC_MSG_ERROR(no)
227fi
228])dnl
229
230
231dnl $Id$
232
233AC_DEFUN(RTEMS_CANONICAL_HOST,
234[dnl
235AC_REQUIRE([AC_CANONICAL_HOST])
236RTEMS_HOST=$host_os
237changequote(,)dnl
238case "${target}" in
239  # hpux unix port should go here
240  i[3456]86-pc-linux*)         # unix "simulator" port
241        RTEMS_HOST=Linux
242        ;;
243  i[3456]86-*freebsd2*) # unix "simulator" port
244        RTEMS_HOST=FreeBSD
245        ;;
246  sparc-sun-solaris*)             # unix "simulator" port
247        RTEMS_HOST=Solaris
248        ;;
249  *)
250        ;;
251esac
252changequote([,])dnl
253AC_SUBST(RTEMS_HOST)
254])dnl
255
256dnl
257dnl $Id$
258dnl
259
260AC_DEFUN(RTEMS_PROJECT_ROOT,
261[dnl
262AC_REQUIRE([RTEMS_TOP])
263if test "$TARGET_SUBDIR" = "." ; then
264PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
265else
266PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
267fi
268AC_SUBST(PROJECT_ROOT)
269
270RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
271AC_SUBST(RTEMS_ROOT)
272
273INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
274AC_SUBST(INSTALL_CHANGE)
275
276PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
277AC_SUBST(PACKHEX)
278])
279
280
281dnl
282dnl $Id$
283dnl
284dnl Check for target gcc
285dnl
286dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
287dnl                             Completely reworked
288
289AC_DEFUN(RTEMS_PROG_CC,
290[
291AC_BEFORE([$0], [AC_PROG_CPP])dnl
292AC_BEFORE([$0], [AC_PROG_CC])dnl
293AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
294
295dnl Only accept gcc and cc
296dnl NOTE: This might be too restrictive for native compilation
297AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
298test -z "$CC_FOR_TARGET" \
299  && AC_MSG_ERROR([no acceptable cc found in \$PATH])
300
301dnl backup
302rtems_save_CC=$CC
303rtems_save_CFLAGS=$CFLAGS
304
305dnl temporarily set CC
306CC=$CC_FOR_TARGET
307
308AC_PROG_CC_WORKS
309AC_PROG_CC_GNU
310
311if test $ac_cv_prog_gcc = yes; then
312  GCC=yes
313dnl Check whether -g works, even if CFLAGS is set, in case the package
314dnl plays around with CFLAGS (such as to build both debugging and
315dnl normal versions of a library), tasteless as that idea is.
316  ac_test_CFLAGS="${CFLAGS+set}"
317  ac_save_CFLAGS="$CFLAGS"
318  CFLAGS=
319  AC_PROG_CC_G
320  if test "$ac_test_CFLAGS" = set; then
321    CFLAGS="$ac_save_CFLAGS"
322  elif test $ac_cv_prog_cc_g = yes; then
323    CFLAGS="-g -O2"
324  else
325    CFLAGS="-O2"
326  fi
327else
328  GCC=
329  test "${CFLAGS+set}" = set || CFLAGS="-g"
330fi
331
332rtems_cv_prog_gcc=$ac_cv_prog_gcc
333rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
334rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
335rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
336
337dnl restore initial values
338CC=$rtems_save_CC
339CFLAGS=$rtems_save_CFLAGS
340
341unset ac_cv_prog_gcc
342unset ac_cv_prog_cc_g
343unset ac_cv_prog_cc_works
344unset ac_cv_prog_cc_cross
345])
346
347AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
348[
349dnl check target cc
350RTEMS_PROG_CC
351dnl check if the compiler supports --specs
352RTEMS_GCC_SPECS
353dnl check if the target compiler may use --pipe
354RTEMS_GCC_PIPE
355dnl check if the compiler supports --specs if gcc28 is requested
356if test "$RTEMS_USE_GCC272" != "yes" ; then
357  if test "$rtems_cv_gcc_specs" = "no"; then
358    AC_MSG_WARN([*** disabling --enable-gcc28])
359      RTEMS_USE_GCC272=yes
360  fi
361fi
362test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
363
364dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
365case $host_os in
366*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
367*) ;;
368esac
369AC_SUBST(GCCSED)
370])
371
372dnl
373dnl  $Id$
374dnl
375dnl Set program_prefix
376dnl
377dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
378dnl                             Extracted from configure
379
380AC_DEFUN(RTEMS_TOOL_PREFIX,
381[AC_REQUIRE([AC_CANONICAL_TARGET])dnl
382AC_REQUIRE([AC_CANONICAL_BUILD])dnl
383
384changequote(,)dnl
385if [ "${program_prefix}" = "NONE" ] ; then
386  if [ "${target}" = "${host}" ] ; then
387    program_prefix=
388  else
389    program_prefix=${target}-
390  fi
391fi
392changequote([,])dnl
393])
394
395dnl
396dnl $Id$
397dnl
398dnl Check whether the target compiler accepts -specs
399dnl
400dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
401dnl
402
403AC_DEFUN(RTEMS_GCC_SPECS,
404[AC_REQUIRE([RTEMS_PROG_CC])
405AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
406[
407rtems_cv_gcc_specs=no
408if test "$rtems_cv_prog_gcc" = "yes"; then
409  touch confspec
410  echo 'void f(){}' >conftest.c
411  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
412    rtems_cv_gcc_specs=yes
413  fi
414fi
415rm -f confspec conftest*
416])])
417
418dnl
419dnl $Id$
420dnl
421dnl Check whether the target compiler accepts -pipe
422dnl
423dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
424dnl
425
426AC_DEFUN(RTEMS_GCC_PIPE,
427[AC_REQUIRE([RTEMS_PROG_CC])
428AC_REQUIRE([AC_CANONICAL_HOST])
429AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
430[
431rtems_cv_gcc_pipe=no
432if test "$rtems_cv_prog_gcc" = "yes"; then
433case "$host_os" in
434  cygwin*)
435    ;;
436  *)
437    echo 'void f(){}' >conftest.c
438    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
439      rtems_cv_gcc_pipe=yes
440    fi
441    rm -f conftest*
442    ;;
443esac
444fi
445])
446])
447
448dnl
449dnl $Id$
450dnl
451dnl Set target tools
452dnl
453dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
454dnl             fixing cache/environment variable handling
455dnl             adding checks for cygwin/egcs '\\'-bug
456dnl             adding checks for ranlib/ar -s problem
457dnl
458dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
459dnl
460
461AC_DEFUN(RTEMS_GCC_PRINT,
462[ case $host_os in
463  *cygwin*)
464    dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
465    dnl        Should be removed once cygwin/egcs reports '/' only
466    $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
467    ;;
468  *)
469    $1=`$CC_FOR_TARGET --print-prog-name=$2`
470    ;;
471  esac
472])
473
474AC_DEFUN(RTEMS_PATH_TOOL,
475[
476AC_MSG_CHECKING([target's $2])
477AC_CACHE_VAL(ac_cv_path_$1,:)
478AC_MSG_RESULT([$ac_cv_path_$1])
479
480if test -n "$ac_cv_path_$1"; then
481  dnl retrieve the value from the cache
482  $1=$ac_cv_path_$1
483else
484  dnl the cache was not set
485  if test -z "[$]$1" ; then
486    if test "$rtems_cv_prog_gcc" = "yes"; then
487      # We are using gcc, ask it about its tool
488      # NOTE: Necessary if gcc was configured to use the target's
489      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
490      RTEMS_GCC_PRINT($1,$2)
491    fi
492  else
493    # The user set an environment variable.
494    # Check whether it is an absolute path, otherwise AC_PATH_PROG
495    # will override the environment variable, which isn't what the user
496    # intends
497    AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
498    case "[$]$1" in
499    /*) # valid
500      AC_MSG_RESULT("yes")
501    ;;
502    *)  # invalid for AC_PATH_PROG
503      AC_MSG_RESULT("no")
504      AC_MSG_ERROR([***]
505        [Environment variable $1 should either]
506        [be unset (preferred) or contain an absolute path])
507    ;;
508    esac
509  fi
510
511  AC_PATH_PROG($1,"$program_prefix"$2,$3)
512fi
513])
514
515AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
516[AC_REQUIRE([RTEMS_PROG_CC])dnl
517
518dnl FIXME: What shall be done if these tools are not available?
519  RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
520  RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
521  RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
522  RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
523
524dnl special treatment of ranlib
525  RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
526  if test "$RANLIB_FOR_TARGET" = "no"; then
527    # ranlib wasn't found; check if ar -s is available
528    RTEMS_AR_FOR_TARGET_S
529    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
530      dnl override RANLIB_FOR_TARGET's cache
531      ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
532      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
533    else
534      AC_MSG_ERROR([***]
535        [Can't figure out how to build a library index]
536        [Neither ranlib nor ar -s seem to be available] )
537    fi
538  fi
539
540dnl NOTE: These may not be available if not using gnutools
541  RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
542  RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
543  RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
544])
545
546dnl
547dnl $Id$
548dnl
549
550AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
551[
552AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
553rtems_cv_AR_FOR_TARGET_S,
554[
555cat > conftest.$ac_ext <<EOF
556int foo( int b )
557{ return b; }
558EOF
559if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
560  && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
561  && test -s conftest.a ; \
562then
563  rtems_cv_AR_FOR_TARGET_S="yes"
564else
565  rtems_cv_AR_FOR_TARGET_S="no"
566fi
567  rm -f conftest*
568])
569])
570
571
572dnl
573dnl  $Id$
574dnl
575
576dnl check for i386 gas supporting 16 bit mode
577dnl     - binutils 2.9.1.0.7 and higher
578
579AC_DEFUN(RTEMS_I386_GAS_CODE16,
580[ if test "${target_cpu}" = "i386"; then
581    AC_CACHE_CHECK([for 16 bit mode assembler support],
582      rtems_cv_prog_gas_code16,
583      [cat > conftest.s << EOF
584         .code16
585         data32
586         addr32
587         lgdt 0
588EOF
589      if AC_TRY_COMMAND($AS_FOR_TARGET -o conftest.o conftest.s); then
590        rtems_cv_prog_gas_code16=yes
591      else
592        rtems_cv_prog_gas_code16=no
593      fi])
594    RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
595  fi
596  AC_SUBST(RTEMS_GAS_CODE16)
597])
598
599
600dnl $Id$
601
602dnl Report all available bsps for a target,
603dnl check if a bsp-subdirectory is present for all bsps found
604dnl
605dnl RTEMS_CHECK_BSPS(bsp_list)
606AC_DEFUN(RTEMS_CHECK_BSPS,
607[
608AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target
609AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir
610AC_MSG_CHECKING([for bsps])
611case "${target}" in
612changequote(,)dnl
613  i[3456]86-go32-rtems*)
614changequote([,])dnl
615    $1="go32 go32_p5"
616    ;;
617  *)
618    files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU`
619    for file in $files; do
620      case $file in
621        shared*);;
622        Makefile*);;
623        READ*);;
624        CVS*);;
625        pxfl*);;
626        go32*);;       # so the i386 port can pick up the other Makefiles
627        # Now account for BSPs with build variants
628        gen68360)      rtems_bsp="$rtems_bsp gen68360 gen68360_040";;
629        p4000)         rtems_bsp="$rtems_bsp p4600 p4650";;
630        mvme162)       rtems_bsp="$rtems_bsp mvme162 mvme162lx";;
631        *) $1="[$]$1 $file";;
632      esac;
633    done
634    ;;
635esac
636AC_MSG_RESULT([[$]$1 .. done])
637])dnl
638
639AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
640[dnl
641AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
642if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
643  AC_MSG_RESULT([yes])
644else
645  AC_MSG_ERROR([no])
646fi
647])dnl
648
649dnl
650dnl $Id$
651dnl
652
653AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING,
654[dnl
655AC_REQUIRE([RTEMS_TOP])dnl
656AC_REQUIRE([RTEMS_CHECK_CPU])dnl
657AC_CACHE_CHECK([whether BSP supports multiprocessing],
658  rtems_cv_HAS_MP,
659  [dnl
660    if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${$1}/shmsupp"; then
661      if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
662        rtems_cv_HAS_MP="yes" ;
663      else
664        rtems_cv_HAS_MP="disabled";
665      fi
666    else
667      rtems_cv_HAS_MP="no";
668    fi])
669if test "$rtems_cv_HAS_MP" = "yes"; then
670HAS_MP="yes"
671else
672HAS_MP="no"
673fi
674AC_SUBST(HAS_MP)
675])
676
677dnl $Id$
678dnl
679AC_DEFUN(RTEMS_CHECK_NETWORKING,
680[dnl
681AC_REQUIRE([RTEMS_CHECK_CPU])dnl
682AC_CACHE_CHECK([whether BSP supports networking],
683  rtems_cv_HAS_NETWORKING,
684  [dnl
685    case "$RTEMS_CPU" in
686    unix*)
687      rtems_cv_HAS_NETWORKING="no"
688      ;;
689    *)
690      if test "${RTEMS_HAS_NETWORKING}" = "yes"; then
691        rtems_cv_HAS_NETWORKING="yes";
692      else
693        rtems_cv_HAS_NETWORKING="disabled";
694      fi
695      ;;
696    esac])
697if test "$rtems_cv_HAS_NETWORKING" = "yes"; then
698  HAS_NETWORKING="yes";
699else
700  HAS_NETWORKING="no";
701fi
702AC_SUBST(HAS_NETWORKING)dnl
703])
704
705dnl
706dnl  $Id$
707dnl
708
709dnl RTEMS_BSP_ALIAS(BSP_ALIAS,BSP_RETURNED)
710dnl convert a bsp alias $1 into its bsp directory $2
711AC_DEFUN(RTEMS_BSP_ALIAS,
712[
713    # account for "aliased" bsps which share source code
714    case $1 in
715      mvme162lx)    $2=mvme162  ;;  # mvme162 board variant
716      gen68360_040) $2=gen68360 ;;  # 68360 in companion mode
717      go32_p5)      $2=go32     ;;  # go32 on Pentium class CPU
718      p4600)        $2=p4000    ;;  # p4000 board with IDT 4600
719      p4650)        $2=p4000    ;;  # p4000 board with IDT 4650
720      *)            $2=$1;;
721    esac
722])
723
724dnl
725dnl $Id$
726dnl
727
728dnl RTEMS_CHECK_MAKEFILE(path)
729dnl Search for Makefile.in's within the directory starting
730dnl at path and append an entry for Makefile to global variable
731dnl "makefiles" (from configure.in) for each Makefile.in found
732dnl
733AC_DEFUN(RTEMS_CHECK_MAKEFILE,
734[RTEMS_CHECK_FILES_IN($1,Makefile,makefiles)
735])
736
737dnl
738dnl $Id$
739dnl
740
741dnl RTEMS_CHECK_FILES_IN(path,file,var)
742dnl path .. path relative to srcdir, where to start searching for files
743dnl file .. name of the files to search for
744dnl var  .. shell variable to append files found
745
746AC_DEFUN(RTEMS_CHECK_FILES_IN,
747[
748AC_MSG_CHECKING(for $2.in in $1)
749if test -d $srcdir/$1; then
750  rtems_av_save_dir=`pwd`;
751  cd $srcdir;
752  rtems_av_tmp=`find $1 -name "$2.in" -print | sed "s/$2\.in/%/" | sort | sed "s/%/$2/"`
753  $3="$$3 $rtems_av_tmp";
754  cd $rtems_av_save_dir;
755  AC_MSG_RESULT(done)
756else
757  AC_MSG_RESULT(no)
758fi
759])
760
761
Note: See TracBrowser for help on using the repository browser.