source: rtems/c/src/lib/aclocal.m4 @ e1d8abb

4.104.114.84.95
Last change on this file since e1d8abb was e1d8abb, checked in by Joel Sherrill <joel.sherrill@…>, on 09/07/99 at 13:45:03

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