source: rtems/c/src/libnetworking/aclocal.m4 @ b62a92c

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