Changeset 4075af6f in rtems


Ignore:
Timestamp:
10/05/99 13:49:54 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
133dcd92
Parents:
d83c39dc
Message:

Regenerated.

Files:
90 edited

Legend:

Unmodified
Added
Removed
  • aclocal.m4

    rd83c39dc r4075af6f  
    2020AC_DEFUN(RTEMS_TOP,
    2121[dnl
     22AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
     23AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
     24
    2225AC_ARG_WITH(target-subdir,
    2326[  --with-target-subdir=DIR],
     
    4447AC_MSG_RESULT($RTEMS_VERSION)
    4548])dnl
    46 
    47 dnl
    48 dnl $Id$
    49 dnl
    50 
    51 dnl canonicalize target cpu
    52 dnl NOTE: Most rtems targets do not fullfil autoconf's
    53 dnl target naming conventions "processor-vendor-os"
    54 dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
    55 dnl and we have to fix it for rtems ourselves
    56 
    57 AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
    58 [
    59 AC_CANONICAL_SYSTEM
    60 AC_MSG_CHECKING(rtems target cpu)
    61 changequote(,)dnl
    62 case "${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         ;;
    82 esac
    83 changequote([,])dnl
    84 AC_SUBST(RTEMS_CPU)
    85 AC_MSG_RESULT($RTEMS_CPU)
    86 ])
    8749
    8850# Do all the work for Automake.  This macro actually does too much --
     
    180142AC_SUBST($1)])
    181143
     144dnl
     145dnl $Id$
     146dnl
     147
     148dnl canonicalize target cpu
     149dnl NOTE: Most rtems targets do not fullfil autoconf's
     150dnl target naming conventions "processor-vendor-os"
     151dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
     152dnl and we have to fix it for rtems ourselves
     153
     154AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
     155[
     156AC_CANONICAL_SYSTEM
     157AC_MSG_CHECKING(rtems target cpu)
     158changequote(,)dnl
     159case "${target}" in
     160  # hpux unix port should go here
     161  i[3456]86-go32-rtems*)
     162        RTEMS_CPU=i386
     163        ;;
     164  i[3456]86-pc-linux*)          # unix "simulator" port
     165        RTEMS_CPU=unix
     166        ;;
     167  i[3456]86-*freebsd2*)         # unix "simulator" port
     168        RTEMS_CPU=unix
     169        ;;
     170  no_cpu-*rtems*)
     171        RTEMS_CPU=no_cpu
     172        ;;
     173  sparc-sun-solaris*)           # unix "simulator" port
     174        RTEMS_CPU=unix
     175        ;;
     176  *)
     177        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
     178        ;;
     179esac
     180changequote([,])dnl
     181AC_SUBST(RTEMS_CPU)
     182AC_MSG_RESULT($RTEMS_CPU)
     183])
     184
    182185# Add --enable-maintainer-mode option to configure.
    183186# From Jim Meyering
     
    231234AC_DEFUN(RTEMS_ENABLE_POSIX,
    232235[
     236AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     237
    233238AC_ARG_ENABLE(posix,
    234239[  --enable-posix                       enable posix interface],
     
    266271
    267272dnl $Id$
     273dnl
     274AC_DEFUN(RTEMS_CHECK_POSIX_API,
     275[dnl
     276AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     277AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
     278
     279AC_CACHE_CHECK([whether BSP supports libposix],
     280  rtems_cv_HAS_POSIX_API,
     281  [dnl
     282    case "$RTEMS_CPU" in
     283    unix*)
     284      rtems_cv_HAS_POSIX_API="no"
     285      ;;
     286    *)
     287      if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
     288        rtems_cv_HAS_POSIX_API="yes";
     289      else
     290        rtems_cv_HAS_POSIX_API="disabled";
     291      fi
     292      ;;
     293    esac])
     294if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
     295  HAS_POSIX_API="yes";
     296else
     297  HAS_POSIX_API="no";
     298fi
     299AC_SUBST(HAS_POSIX_API)dnl
     300])
     301
     302dnl $Id$
     303
     304dnl check if RTEMS support a cpu
     305AC_DEFUN(RTEMS_CHECK_CPU,
     306[dnl
     307AC_REQUIRE([RTEMS_TOP])
     308AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
     309AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     310
     311# Is this a supported CPU?
     312AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
     313if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
     314  AC_MSG_RESULT(yes)
     315else
     316  AC_MSG_ERROR(no)
     317fi
     318])dnl
     319
     320
     321dnl $Id$
    268322
    269323AC_DEFUN(RTEMS_ENABLE_NETWORKING,
    270324[
     325AC_BEFORE([$0], [RTEMS_CHECK_NETWORKING])dnl
     326
    271327AC_ARG_ENABLE(networking,
    272328[  --enable-networking                  enable TCP/IP stack],
     
    280336
    281337dnl $Id$
     338dnl
     339AC_DEFUN(RTEMS_CHECK_NETWORKING,
     340[dnl
     341AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     342AC_REQUIRE([RTEMS_ENABLE_NETWORKING])dnl
     343AC_BEFORE([$0], [RTEMS_CHECK_RDBG])dnl
     344
     345AC_CACHE_CHECK([whether BSP supports networking],
     346  rtems_cv_HAS_NETWORKING,
     347  [dnl
     348    case "$RTEMS_CPU" in
     349    unix*)
     350      rtems_cv_HAS_NETWORKING="no"
     351      ;;
     352    *)
     353      if test "${RTEMS_HAS_NETWORKING}" = "yes"; then
     354        rtems_cv_HAS_NETWORKING="yes";
     355      else
     356        rtems_cv_HAS_NETWORKING="disabled";
     357      fi
     358      ;;
     359    esac])
     360if test "$rtems_cv_HAS_NETWORKING" = "yes"; then
     361  HAS_NETWORKING="yes";
     362else
     363  HAS_NETWORKING="no";
     364fi
     365AC_SUBST(HAS_NETWORKING)dnl
     366])
     367
     368dnl $Id$
     369dnl
     370AC_DEFUN(RTEMS_CHECK_RDBG,
     371[dnl
     372AC_REQUIRE([RTEMS_TOP])dnl
     373AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     374AC_REQUIRE([RTEMS_CHECK_NETWORKING])dnl
     375AC_REQUIRE([RTEMS_ENABLE_RDBG])dnl
     376AC_CACHE_CHECK([whether BSP supports librdbg],
     377  rtems_cv_HAS_RDBG,
     378  [
     379    if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/librdbg/${RTEMS_CPU}/${$1}"; then
     380      rtems_cv_HAS_RDBG="yes" ;
     381    else
     382      rtems_cv_HAS_RDBG="no";
     383    fi
     384  ])
     385HAS_RDBG="$rtems_cv_HAS_RDBG"
     386AC_SUBST(HAS_RDBG)
     387])
     388
     389dnl $Id$
    282390
    283391AC_DEFUN(RTEMS_ENABLE_RDBG,
    284392[
     393AC_BEFORE([$0], [RTEMS_CHECK_RDBG])dnl
     394
    285395AC_ARG_ENABLE(rdbg,
    286396[  --enable-rdbg                        enable remote debugger],
     
    376486AC_SUBST(RTEMS_HAS_HWAPI)dnl
    377487])dnl
    378 
    379 dnl $Id$
    380 
    381 dnl check if RTEMS support a cpu
    382 AC_DEFUN(RTEMS_CHECK_CPU,
    383 [dnl
    384 AC_REQUIRE([RTEMS_TOP])
    385 AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
    386 # Is this a supported CPU?
    387 AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
    388 if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    389   AC_MSG_RESULT(yes)
    390 else
    391   AC_MSG_ERROR(no)
    392 fi
    393 ])dnl
    394 
    395488
    396489dnl $Id$
  • c/aclocal.m4

    rd83c39dc r4075af6f  
    2020AC_DEFUN(RTEMS_TOP,
    2121[dnl
     22AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
     23AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
     24
    2225AC_ARG_WITH(target-subdir,
    2326[  --with-target-subdir=DIR],
     
    4447AC_MSG_RESULT($RTEMS_VERSION)
    4548])dnl
    46 
    47 dnl
    48 dnl $Id$
    49 dnl
    50 
    51 dnl canonicalize target cpu
    52 dnl NOTE: Most rtems targets do not fullfil autoconf's
    53 dnl target naming conventions "processor-vendor-os"
    54 dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
    55 dnl and we have to fix it for rtems ourselves
    56 
    57 AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
    58 [
    59 AC_CANONICAL_SYSTEM
    60 AC_MSG_CHECKING(rtems target cpu)
    61 changequote(,)dnl
    62 case "${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         ;;
    82 esac
    83 changequote([,])dnl
    84 AC_SUBST(RTEMS_CPU)
    85 AC_MSG_RESULT($RTEMS_CPU)
    86 ])
    8749
    8850# Do all the work for Automake.  This macro actually does too much --
     
    180142AC_SUBST($1)])
    181143
     144dnl
     145dnl $Id$
     146dnl
     147
     148dnl canonicalize target cpu
     149dnl NOTE: Most rtems targets do not fullfil autoconf's
     150dnl target naming conventions "processor-vendor-os"
     151dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
     152dnl and we have to fix it for rtems ourselves
     153
     154AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
     155[
     156AC_CANONICAL_SYSTEM
     157AC_MSG_CHECKING(rtems target cpu)
     158changequote(,)dnl
     159case "${target}" in
     160  # hpux unix port should go here
     161  i[3456]86-go32-rtems*)
     162        RTEMS_CPU=i386
     163        ;;
     164  i[3456]86-pc-linux*)          # unix "simulator" port
     165        RTEMS_CPU=unix
     166        ;;
     167  i[3456]86-*freebsd2*)         # unix "simulator" port
     168        RTEMS_CPU=unix
     169        ;;
     170  no_cpu-*rtems*)
     171        RTEMS_CPU=no_cpu
     172        ;;
     173  sparc-sun-solaris*)           # unix "simulator" port
     174        RTEMS_CPU=unix
     175        ;;
     176  *)
     177        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
     178        ;;
     179esac
     180changequote([,])dnl
     181AC_SUBST(RTEMS_CPU)
     182AC_MSG_RESULT($RTEMS_CPU)
     183])
     184
    182185# Add --enable-maintainer-mode option to configure.
    183186# From Jim Meyering
     
    242245AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
    243246[
     247AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
    244248AC_ARG_ENABLE(rtemsbsp,
    245249[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
     
    254258AC_DEFUN(RTEMS_ENV_RTEMSBSP,
    255259[dnl
     260AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
     261AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
     262AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
     263AC_BEFORE([$0], [RTEMS_CHECK_MULTIPROCESSING])dnl
     264AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     265
    256266AC_MSG_CHECKING([for RTEMS_BSP])
    257267AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
     
    267277])
    268278
    269 dnl $Id$
    270 
    271 dnl check if RTEMS support a cpu
    272 AC_DEFUN(RTEMS_CHECK_CPU,
     279dnl
     280dnl $Id$
     281dnl
     282
     283AC_DEFUN(RTEMS_PROJECT_ROOT,
    273284[dnl
    274285AC_REQUIRE([RTEMS_TOP])
    275 AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
    276 # Is this a supported CPU?
    277 AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
    278 if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    279   AC_MSG_RESULT(yes)
    280 else
    281   AC_MSG_ERROR(no)
    282 fi
    283 ])dnl
    284 
    285 
    286 dnl $Id$
    287 
    288 AC_DEFUN(RTEMS_CANONICAL_HOST,
    289 [dnl
    290 AC_REQUIRE([AC_CANONICAL_HOST])
    291 RTEMS_HOST=$host_os
    292 changequote(,)dnl
    293 case "${target}" in
    294   # hpux unix port should go here
    295   i[3456]86-pc-linux*)         # unix "simulator" port
    296         RTEMS_HOST=Linux
    297         ;;
    298   i[3456]86-*freebsd2*) # unix "simulator" port
    299         RTEMS_HOST=FreeBSD
    300         ;;
    301   sparc-sun-solaris*)             # unix "simulator" port
    302         RTEMS_HOST=Solaris
    303         ;;
    304   *)
    305         ;;
    306 esac
    307 changequote([,])dnl
    308 AC_SUBST(RTEMS_HOST)
    309 ])dnl
     286if test "$TARGET_SUBDIR" = "." ; then
     287PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)';
     288else
     289PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)'
     290fi
     291AC_SUBST(PROJECT_ROOT)
     292
     293RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP
     294AC_SUBST(RTEMS_ROOT)
     295
     296INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change"
     297AC_SUBST(INSTALL_CHANGE)
     298
     299PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
     300AC_SUBST(PACKHEX)
     301])
     302
    310303
    311304dnl $Id$
     
    350343AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
    351344[dnl
     345AC_REQUIRE([RTEMS_TOP])
     346
    352347AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
    353348if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
     
    356351  AC_MSG_ERROR([no])
    357352fi
     353])dnl
     354
     355dnl $Id$
     356
     357dnl check if RTEMS support a cpu
     358AC_DEFUN(RTEMS_CHECK_CPU,
     359[dnl
     360AC_REQUIRE([RTEMS_TOP])
     361AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
     362AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     363
     364# Is this a supported CPU?
     365AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
     366if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
     367  AC_MSG_RESULT(yes)
     368else
     369  AC_MSG_ERROR(no)
     370fi
     371])dnl
     372
     373
     374dnl $Id$
     375dnl
     376AC_DEFUN(RTEMS_CHECK_POSIX_API,
     377[dnl
     378AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     379AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
     380
     381AC_CACHE_CHECK([whether BSP supports libposix],
     382  rtems_cv_HAS_POSIX_API,
     383  [dnl
     384    case "$RTEMS_CPU" in
     385    unix*)
     386      rtems_cv_HAS_POSIX_API="no"
     387      ;;
     388    *)
     389      if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
     390        rtems_cv_HAS_POSIX_API="yes";
     391      else
     392        rtems_cv_HAS_POSIX_API="disabled";
     393      fi
     394      ;;
     395    esac])
     396if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
     397  HAS_POSIX_API="yes";
     398else
     399  HAS_POSIX_API="no";
     400fi
     401AC_SUBST(HAS_POSIX_API)dnl
     402])
     403
     404dnl $Id$
     405
     406AC_DEFUN(RTEMS_ENABLE_POSIX,
     407[
     408AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     409
     410AC_ARG_ENABLE(posix,
     411[  --enable-posix                       enable posix interface],
     412[case "${enableval}" in
     413  yes) RTEMS_HAS_POSIX_API=yes ;;
     414  no) RTEMS_HAS_POSIX_API=no ;;
     415  *)  AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
     416esac],[RTEMS_HAS_POSIX_API=yes])
     417AC_SUBST(RTEMS_HAS_POSIX_API)
     418
     419changequote(,)dnl
     420case "${target}" in
     421  # hpux unix port should go here
     422  i[3456]86-go32-rtems*)
     423        RTEMS_HAS_POSIX_API=no
     424        ;;
     425  i[3456]86-pc-linux*)         # unix "simulator" port
     426        RTEMS_HAS_POSIX_API=no
     427        ;;
     428  i[3456]86-*freebsd2*) # unix "simulator" port
     429        RTEMS_HAS_POSIX_API=no
     430        ;;
     431  no_cpu-*rtems*)
     432        RTEMS_HAS_POSIX_API=no
     433        ;;
     434  sparc-sun-solaris*)             # unix "simulator" port
     435        RTEMS_HAS_POSIX_API=no
     436        ;;
     437  *)
     438        ;;
     439esac
     440changequote([,])dnl
     441AC_SUBST(RTEMS_HAS_POSIX_API)
     442])
     443
     444dnl
     445dnl $Id$
     446dnl
     447
     448AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING,
     449[dnl
     450AC_REQUIRE([RTEMS_TOP])dnl
     451AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     452AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl
     453
     454AC_CACHE_CHECK([whether BSP supports multiprocessing],
     455  rtems_cv_HAS_MP,
     456  [dnl
     457    if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${$1}/shmsupp"; then
     458      if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
     459        rtems_cv_HAS_MP="yes" ;
     460      else
     461        rtems_cv_HAS_MP="disabled";
     462      fi
     463    else
     464      rtems_cv_HAS_MP="no";
     465    fi])
     466if test "$rtems_cv_HAS_MP" = "yes"; then
     467HAS_MP="yes"
     468else
     469HAS_MP="no"
     470fi
     471AC_SUBST(HAS_MP)
     472])
     473
     474dnl $Id$
     475
     476AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING,
     477[
     478AC_ARG_ENABLE(multiprocessing,
     479[  --enable-multiprocessing             enable multiprocessing interface],
     480[case "${enableval}" in
     481  yes) RTEMS_HAS_MULTIPROCESSING=yes ;;
     482  no) RTEMS_HAS_MULTIPROCESSING=no ;;
     483  *)  AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
     484esac],[RTEMS_HAS_MULTIPROCESSING=no])
     485AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl
     486])
     487
     488dnl $Id$
     489
     490AC_DEFUN(RTEMS_CANONICAL_HOST,
     491[dnl
     492AC_REQUIRE([AC_CANONICAL_HOST])
     493RTEMS_HOST=$host_os
     494changequote(,)dnl
     495case "${target}" in
     496  # hpux unix port should go here
     497  i[3456]86-pc-linux*)         # unix "simulator" port
     498        RTEMS_HOST=Linux
     499        ;;
     500  i[3456]86-*freebsd2*) # unix "simulator" port
     501        RTEMS_HOST=FreeBSD
     502        ;;
     503  sparc-sun-solaris*)             # unix "simulator" port
     504        RTEMS_HOST=Solaris
     505        ;;
     506  *)
     507        ;;
     508esac
     509changequote([,])dnl
     510AC_SUBST(RTEMS_HOST)
    358511])dnl
    359512
  • c/configure

    rd83c39dc r4075af6f  
    535535
    536536
     537
    537538# Check whether --with-target-subdir or --without-target-subdir was given.
    538539if test "${with_target_subdir+set}" = set; then
     
    548549
    549550echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6
    550 echo "configure:551: checking for RTEMS Version" >&5
     551echo "configure:552: checking for RTEMS Version" >&5
    551552if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
    552553RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
     
    609610
    610611echo $ac_n "checking host system type""... $ac_c" 1>&6
    611 echo "configure:612: checking host system type" >&5
     612echo "configure:613: checking host system type" >&5
    612613
    613614host_alias=$host
     
    630631
    631632echo $ac_n "checking target system type""... $ac_c" 1>&6
    632 echo "configure:633: checking target system type" >&5
     633echo "configure:634: checking target system type" >&5
    633634
    634635target_alias=$target
     
    648649
    649650echo $ac_n "checking build system type""... $ac_c" 1>&6
    650 echo "configure:651: checking build system type" >&5
     651echo "configure:652: checking build system type" >&5
    651652
    652653build_alias=$build
     
    671672
    672673echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
    673 echo "configure:674: checking rtems target cpu" >&5
     674echo "configure:675: checking rtems target cpu" >&5
    674675case "${target}" in
    675676  # hpux unix port should go here
     
    709710# ./install, which can be erroneously created by make from ./install.sh.
    710711echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    711 echo "configure:712: checking for a BSD compatible install" >&5
     712echo "configure:713: checking for a BSD compatible install" >&5
    712713if test -z "$INSTALL"; then
    713714if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    762763
    763764echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
    764 echo "configure:765: checking whether build environment is sane" >&5
     765echo "configure:766: checking whether build environment is sane" >&5
    765766# Just in case
    766767sleep 1
     
    819820
    820821echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    821 echo "configure:822: checking whether ${MAKE-make} sets \${MAKE}" >&5
     822echo "configure:823: checking whether ${MAKE-make} sets \${MAKE}" >&5
    822823set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    823824if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    859860missing_dir=`cd $ac_aux_dir && pwd`
    860861echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
    861 echo "configure:862: checking for working aclocal" >&5
     862echo "configure:863: checking for working aclocal" >&5
    862863# Run test in a subshell; some versions of sh will print an error if
    863864# an executable is not found, even if stderr is redirected.
     
    872873
    873874echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
    874 echo "configure:875: checking for working autoconf" >&5
     875echo "configure:876: checking for working autoconf" >&5
    875876# Run test in a subshell; some versions of sh will print an error if
    876877# an executable is not found, even if stderr is redirected.
     
    885886
    886887echo $ac_n "checking for working automake""... $ac_c" 1>&6
    887 echo "configure:888: checking for working automake" >&5
     888echo "configure:889: checking for working automake" >&5
    888889# Run test in a subshell; some versions of sh will print an error if
    889890# an executable is not found, even if stderr is redirected.
     
    898899
    899900echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
    900 echo "configure:901: checking for working autoheader" >&5
     901echo "configure:902: checking for working autoheader" >&5
    901902# Run test in a subshell; some versions of sh will print an error if
    902903# an executable is not found, even if stderr is redirected.
     
    911912
    912913echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
    913 echo "configure:914: checking for working makeinfo" >&5
     914echo "configure:915: checking for working makeinfo" >&5
    914915# Run test in a subshell; some versions of sh will print an error if
    915916# an executable is not found, even if stderr is redirected.
     
    925926
    926927echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
    927 echo "configure:928: checking whether to enable maintainer-specific portions of Makefiles" >&5
     928echo "configure:929: checking whether to enable maintainer-specific portions of Makefiles" >&5
    928929    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
    929930if test "${enable_maintainer_mode+set}" = set; then
     
    989990
    990991
     992
    991993# Is this a supported CPU?
    992994echo $ac_n "checking if cpu $RTEMS_CPU is supported""... $ac_c" 1>&6
    993 echo "configure:994: checking if cpu $RTEMS_CPU is supported" >&5
     995echo "configure:996: checking if cpu $RTEMS_CPU is supported" >&5
    994996if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    995997  echo "$ac_t""yes" 1>&6
     
    10201022 
    10211023echo $ac_n "checking for bsps""... $ac_c" 1>&6
    1022 echo "configure:1023: checking for bsps" >&5
     1024echo "configure:1025: checking for bsps" >&5
    10231025case "${target}" in
    10241026  i[3456]86-go32-rtems*)
     
    10511053
    10521054    # make sure there is a make/custom file for the bsp
    1053     echo $ac_n "checking for make/custom/$i.cfg""... $ac_c" 1>&6
    1054 echo "configure:1055: checking for make/custom/$i.cfg" >&5
     1055   
     1056
     1057echo $ac_n "checking for make/custom/$i.cfg""... $ac_c" 1>&6
     1058echo "configure:1059: checking for make/custom/$i.cfg" >&5
    10551059if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$i.cfg"; then
    10561060  echo "$ac_t""yes" 1>&6
     
    10741078    # Is there code where there should be for this BSP?
    10751079    # The bare bsp is a special case as it is not under the RTEMS_CPU path
    1076     case $i in
     1080    case $bspdir in
    10771081      bare)
    10781082        bspcpudir=
  • c/src/aclocal.m4

    rd83c39dc r4075af6f  
    2020AC_DEFUN(RTEMS_TOP,
    2121[dnl
     22AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
     23AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
     24
    2225AC_ARG_WITH(target-subdir,
    2326[  --with-target-subdir=DIR],
     
    4447AC_MSG_RESULT($RTEMS_VERSION)
    4548])dnl
    46 
    47 dnl $Id$
    48 
    49 AC_DEFUN(RTEMS_ENABLE_CXX,
    50 [
    51 AC_ARG_ENABLE(cxx,
    52 [  --enable-cxx                         enable C++ support,]
    53 [                                       and build the rtems++ library],
    54 [case "${enableval}" in
    55   yes) RTEMS_HAS_CPLUSPLUS=yes ;;
    56   no) RTEMS_HAS_CPLUSPLUS=no   ;;
    57   *)  AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
    58 esac], [RTEMS_HAS_CPLUSPLUS=no])
    59 ])
    60 
    61 dnl
    62 dnl $Id$
    63 dnl
    64 
    65 dnl canonicalize target cpu
    66 dnl NOTE: Most rtems targets do not fullfil autoconf's
    67 dnl target naming conventions "processor-vendor-os"
    68 dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
    69 dnl and we have to fix it for rtems ourselves
    70 
    71 AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
    72 [
    73 AC_CANONICAL_SYSTEM
    74 AC_MSG_CHECKING(rtems target cpu)
    75 changequote(,)dnl
    76 case "${target}" in
    77   # hpux unix port should go here
    78   i[3456]86-go32-rtems*)
    79         RTEMS_CPU=i386
    80         ;;
    81   i[3456]86-pc-linux*)          # unix "simulator" port
    82         RTEMS_CPU=unix
    83         ;;
    84   i[3456]86-*freebsd2*)         # unix "simulator" port
    85         RTEMS_CPU=unix
    86         ;;
    87   no_cpu-*rtems*)
    88         RTEMS_CPU=no_cpu
    89         ;;
    90   sparc-sun-solaris*)           # unix "simulator" port
    91         RTEMS_CPU=unix
    92         ;;
    93   *)
    94         RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
    95         ;;
    96 esac
    97 changequote([,])dnl
    98 AC_SUBST(RTEMS_CPU)
    99 AC_MSG_RESULT($RTEMS_CPU)
    100 ])
    10149
    10250# Do all the work for Automake.  This macro actually does too much --
     
    194142AC_SUBST($1)])
    195143
     144dnl $Id$
     145
     146AC_DEFUN(RTEMS_ENABLE_CXX,
     147[
     148AC_ARG_ENABLE(cxx,
     149[  --enable-cxx                         enable C++ support,]
     150[                                       and build the rtems++ library],
     151[case "${enableval}" in
     152  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
     153  no) RTEMS_HAS_CPLUSPLUS=no   ;;
     154  *)  AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
     155esac], [RTEMS_HAS_CPLUSPLUS=no])
     156])
     157
     158dnl $Id$
     159
     160AC_DEFUN(RTEMS_ENABLE_NETWORKING,
     161[
     162AC_BEFORE([$0], [RTEMS_CHECK_NETWORKING])dnl
     163
     164AC_ARG_ENABLE(networking,
     165[  --enable-networking                  enable TCP/IP stack],
     166[case "${enableval}" in
     167  yes) RTEMS_HAS_NETWORKING=yes ;;
     168  no) RTEMS_HAS_NETWORKING=no ;;
     169  *)  AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;;
     170esac],[RTEMS_HAS_NETWORKING=yes])
     171AC_SUBST(RTEMS_HAS_NETWORKING)dnl
     172])
     173
     174dnl $Id$
     175dnl
     176AC_DEFUN(RTEMS_CHECK_NETWORKING,
     177[dnl
     178AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     179AC_REQUIRE([RTEMS_ENABLE_NETWORKING])dnl
     180AC_BEFORE([$0], [RTEMS_CHECK_RDBG])dnl
     181
     182AC_CACHE_CHECK([whether BSP supports networking],
     183  rtems_cv_HAS_NETWORKING,
     184  [dnl
     185    case "$RTEMS_CPU" in
     186    unix*)
     187      rtems_cv_HAS_NETWORKING="no"
     188      ;;
     189    *)
     190      if test "${RTEMS_HAS_NETWORKING}" = "yes"; then
     191        rtems_cv_HAS_NETWORKING="yes";
     192      else
     193        rtems_cv_HAS_NETWORKING="disabled";
     194      fi
     195      ;;
     196    esac])
     197if test "$rtems_cv_HAS_NETWORKING" = "yes"; then
     198  HAS_NETWORKING="yes";
     199else
     200  HAS_NETWORKING="no";
     201fi
     202AC_SUBST(HAS_NETWORKING)dnl
     203])
     204
     205dnl $Id$
     206
     207dnl check if RTEMS support a cpu
     208AC_DEFUN(RTEMS_CHECK_CPU,
     209[dnl
     210AC_REQUIRE([RTEMS_TOP])
     211AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
     212AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     213
     214# Is this a supported CPU?
     215AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
     216if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
     217  AC_MSG_RESULT(yes)
     218else
     219  AC_MSG_ERROR(no)
     220fi
     221])dnl
     222
     223
     224dnl
     225dnl $Id$
     226dnl
     227
     228dnl canonicalize target cpu
     229dnl NOTE: Most rtems targets do not fullfil autoconf's
     230dnl target naming conventions "processor-vendor-os"
     231dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
     232dnl and we have to fix it for rtems ourselves
     233
     234AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
     235[
     236AC_CANONICAL_SYSTEM
     237AC_MSG_CHECKING(rtems target cpu)
     238changequote(,)dnl
     239case "${target}" in
     240  # hpux unix port should go here
     241  i[3456]86-go32-rtems*)
     242        RTEMS_CPU=i386
     243        ;;
     244  i[3456]86-pc-linux*)          # unix "simulator" port
     245        RTEMS_CPU=unix
     246        ;;
     247  i[3456]86-*freebsd2*)         # unix "simulator" port
     248        RTEMS_CPU=unix
     249        ;;
     250  no_cpu-*rtems*)
     251        RTEMS_CPU=no_cpu
     252        ;;
     253  sparc-sun-solaris*)           # unix "simulator" port
     254        RTEMS_CPU=unix
     255        ;;
     256  *)
     257        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
     258        ;;
     259esac
     260changequote([,])dnl
     261AC_SUBST(RTEMS_CPU)
     262AC_MSG_RESULT($RTEMS_CPU)
     263])
     264
     265dnl $Id$
     266dnl
     267AC_DEFUN(RTEMS_CHECK_POSIX_API,
     268[dnl
     269AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     270AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
     271
     272AC_CACHE_CHECK([whether BSP supports libposix],
     273  rtems_cv_HAS_POSIX_API,
     274  [dnl
     275    case "$RTEMS_CPU" in
     276    unix*)
     277      rtems_cv_HAS_POSIX_API="no"
     278      ;;
     279    *)
     280      if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
     281        rtems_cv_HAS_POSIX_API="yes";
     282      else
     283        rtems_cv_HAS_POSIX_API="disabled";
     284      fi
     285      ;;
     286    esac])
     287if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
     288  HAS_POSIX_API="yes";
     289else
     290  HAS_POSIX_API="no";
     291fi
     292AC_SUBST(HAS_POSIX_API)dnl
     293])
     294
     295dnl $Id$
     296
     297AC_DEFUN(RTEMS_ENABLE_POSIX,
     298[
     299AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     300
     301AC_ARG_ENABLE(posix,
     302[  --enable-posix                       enable posix interface],
     303[case "${enableval}" in
     304  yes) RTEMS_HAS_POSIX_API=yes ;;
     305  no) RTEMS_HAS_POSIX_API=no ;;
     306  *)  AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
     307esac],[RTEMS_HAS_POSIX_API=yes])
     308AC_SUBST(RTEMS_HAS_POSIX_API)
     309
     310changequote(,)dnl
     311case "${target}" in
     312  # hpux unix port should go here
     313  i[3456]86-go32-rtems*)
     314        RTEMS_HAS_POSIX_API=no
     315        ;;
     316  i[3456]86-pc-linux*)         # unix "simulator" port
     317        RTEMS_HAS_POSIX_API=no
     318        ;;
     319  i[3456]86-*freebsd2*) # unix "simulator" port
     320        RTEMS_HAS_POSIX_API=no
     321        ;;
     322  no_cpu-*rtems*)
     323        RTEMS_HAS_POSIX_API=no
     324        ;;
     325  sparc-sun-solaris*)             # unix "simulator" port
     326        RTEMS_HAS_POSIX_API=no
     327        ;;
     328  *)
     329        ;;
     330esac
     331changequote([,])dnl
     332AC_SUBST(RTEMS_HAS_POSIX_API)
     333])
     334
     335dnl $Id$
     336dnl
     337AC_DEFUN(RTEMS_CHECK_RDBG,
     338[dnl
     339AC_REQUIRE([RTEMS_TOP])dnl
     340AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     341AC_REQUIRE([RTEMS_CHECK_NETWORKING])dnl
     342AC_REQUIRE([RTEMS_ENABLE_RDBG])dnl
     343AC_CACHE_CHECK([whether BSP supports librdbg],
     344  rtems_cv_HAS_RDBG,
     345  [
     346    if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/librdbg/${RTEMS_CPU}/${$1}"; then
     347      rtems_cv_HAS_RDBG="yes" ;
     348    else
     349      rtems_cv_HAS_RDBG="no";
     350    fi
     351  ])
     352HAS_RDBG="$rtems_cv_HAS_RDBG"
     353AC_SUBST(HAS_RDBG)
     354])
     355
     356dnl $Id$
     357
     358AC_DEFUN(RTEMS_ENABLE_RDBG,
     359[
     360AC_BEFORE([$0], [RTEMS_CHECK_RDBG])dnl
     361
     362AC_ARG_ENABLE(rdbg,
     363[  --enable-rdbg                        enable remote debugger],
     364[case "${enableval}" in
     365  yes) RTEMS_HAS_RDBG=yes ;;
     366  no) RTEMS_HAS_RDBG=no ;;
     367  *)  AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;;
     368esac],[RTEMS_HAS_RDBG=no])
     369AC_SUBST(RTEMS_HAS_RDBG)dnl
     370])
     371
     372dnl $Id$
     373
     374AC_DEFUN(RTEMS_CANONICAL_HOST,
     375[dnl
     376AC_REQUIRE([AC_CANONICAL_HOST])
     377RTEMS_HOST=$host_os
     378changequote(,)dnl
     379case "${target}" in
     380  # hpux unix port should go here
     381  i[3456]86-pc-linux*)         # unix "simulator" port
     382        RTEMS_HOST=Linux
     383        ;;
     384  i[3456]86-*freebsd2*) # unix "simulator" port
     385        RTEMS_HOST=FreeBSD
     386        ;;
     387  sparc-sun-solaris*)             # unix "simulator" port
     388        RTEMS_HOST=Solaris
     389        ;;
     390  *)
     391        ;;
     392esac
     393changequote([,])dnl
     394AC_SUBST(RTEMS_HOST)
     395])dnl
     396
    196397# Add --enable-maintainer-mode option to configure.
    197398# From Jim Meyering
     
    234435AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
    235436[
     437AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
    236438AC_ARG_ENABLE(rtemsbsp,
    237439[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
     
    246448AC_DEFUN(RTEMS_ENV_RTEMSBSP,
    247449[dnl
     450AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
     451AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
     452AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
     453AC_BEFORE([$0], [RTEMS_CHECK_MULTIPROCESSING])dnl
     454AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     455
    248456AC_MSG_CHECKING([for RTEMS_BSP])
    249457AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
     
    258466AC_SUBST(RTEMS_BSP)
    259467])
    260 
    261 dnl $Id$
    262 
    263 dnl check if RTEMS support a cpu
    264 AC_DEFUN(RTEMS_CHECK_CPU,
    265 [dnl
    266 AC_REQUIRE([RTEMS_TOP])
    267 AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
    268 # Is this a supported CPU?
    269 AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
    270 if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    271   AC_MSG_RESULT(yes)
    272 else
    273   AC_MSG_ERROR(no)
    274 fi
    275 ])dnl
    276 
    277 
    278 dnl $Id$
    279 
    280 AC_DEFUN(RTEMS_CANONICAL_HOST,
    281 [dnl
    282 AC_REQUIRE([AC_CANONICAL_HOST])
    283 RTEMS_HOST=$host_os
    284 changequote(,)dnl
    285 case "${target}" in
    286   # hpux unix port should go here
    287   i[3456]86-pc-linux*)         # unix "simulator" port
    288         RTEMS_HOST=Linux
    289         ;;
    290   i[3456]86-*freebsd2*) # unix "simulator" port
    291         RTEMS_HOST=FreeBSD
    292         ;;
    293   sparc-sun-solaris*)             # unix "simulator" port
    294         RTEMS_HOST=Solaris
    295         ;;
    296   *)
    297         ;;
    298 esac
    299 changequote([,])dnl
    300 AC_SUBST(RTEMS_HOST)
    301 ])dnl
    302468
    303469dnl
     
    367533AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
    368534[dnl
     535AC_REQUIRE([RTEMS_TOP])
     536
    369537AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
    370538if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
     
    375543])dnl
    376544
     545dnl
     546dnl $Id$
     547dnl
     548
     549AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING,
     550[dnl
     551AC_REQUIRE([RTEMS_TOP])dnl
     552AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     553AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl
     554
     555AC_CACHE_CHECK([whether BSP supports multiprocessing],
     556  rtems_cv_HAS_MP,
     557  [dnl
     558    if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${$1}/shmsupp"; then
     559      if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
     560        rtems_cv_HAS_MP="yes" ;
     561      else
     562        rtems_cv_HAS_MP="disabled";
     563      fi
     564    else
     565      rtems_cv_HAS_MP="no";
     566    fi])
     567if test "$rtems_cv_HAS_MP" = "yes"; then
     568HAS_MP="yes"
     569else
     570HAS_MP="no"
     571fi
     572AC_SUBST(HAS_MP)
     573])
     574
     575dnl $Id$
     576
     577AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING,
     578[
     579AC_ARG_ENABLE(multiprocessing,
     580[  --enable-multiprocessing             enable multiprocessing interface],
     581[case "${enableval}" in
     582  yes) RTEMS_HAS_MULTIPROCESSING=yes ;;
     583  no) RTEMS_HAS_MULTIPROCESSING=no ;;
     584  *)  AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
     585esac],[RTEMS_HAS_MULTIPROCESSING=no])
     586AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl
     587])
     588
  • c/src/configure

    rd83c39dc r4075af6f  
    1717  --enable-cxx                         enable C++ support,
    1818                                       and build the rtems++ library"
     19ac_help="$ac_help
     20  --enable-networking                  enable TCP/IP stack"
    1921ac_help="$ac_help
    2022  --enable-maintainer-mode enable make rules and dependencies not useful
     
    530532
    531533
     534
    532535# Check whether --with-target-subdir or --without-target-subdir was given.
    533536if test "${with_target_subdir+set}" = set; then
     
    543546
    544547echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6
    545 echo "configure:546: checking for RTEMS Version" >&5
     548echo "configure:549: checking for RTEMS Version" >&5
    546549if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
    547550RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
     
    591594
    592595
     596# Check whether --enable-networking or --disable-networking was given.
     597if test "${enable_networking+set}" = set; then
     598  enableval="$enable_networking"
     599  case "${enableval}" in
     600  yes) RTEMS_HAS_NETWORKING=yes ;;
     601  no) RTEMS_HAS_NETWORKING=no ;;
     602  *)  { echo "configure: error: bad value ${enableval} for enable-networking option" 1>&2; exit 1; } ;;
     603esac
     604else
     605  RTEMS_HAS_NETWORKING=yes
     606fi
     607
     608
     609
     610
    593611
    594612# Do some error checking and defaulting for the host and target type.
     
    619637
    620638echo $ac_n "checking host system type""... $ac_c" 1>&6
    621 echo "configure:622: checking host system type" >&5
     639echo "configure:640: checking host system type" >&5
    622640
    623641host_alias=$host
     
    640658
    641659echo $ac_n "checking target system type""... $ac_c" 1>&6
    642 echo "configure:643: checking target system type" >&5
     660echo "configure:661: checking target system type" >&5
    643661
    644662target_alias=$target
     
    658676
    659677echo $ac_n "checking build system type""... $ac_c" 1>&6
    660 echo "configure:661: checking build system type" >&5
     678echo "configure:679: checking build system type" >&5
    661679
    662680build_alias=$build
     
    681699
    682700echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
    683 echo "configure:684: checking rtems target cpu" >&5
     701echo "configure:702: checking rtems target cpu" >&5
    684702case "${target}" in
    685703  # hpux unix port should go here
     
    707725
    708726
     727RTEMS_HOST=$host_os
     728case "${target}" in
     729  # hpux unix port should go here
     730  i[3456]86-pc-linux*)         # unix "simulator" port
     731        RTEMS_HOST=Linux
     732        ;;
     733  i[3456]86-*freebsd2*) # unix "simulator" port
     734        RTEMS_HOST=FreeBSD
     735        ;;
     736  sparc-sun-solaris*)             # unix "simulator" port
     737        RTEMS_HOST=Solaris
     738        ;;
     739  *)
     740        ;;
     741esac
     742
     743
     744
    709745# Find a good install program.  We prefer a C program (faster),
    710746# so one script is as good as another.  But avoid the broken or
     
    719755# ./install, which can be erroneously created by make from ./install.sh.
    720756echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    721 echo "configure:722: checking for a BSD compatible install" >&5
     757echo "configure:758: checking for a BSD compatible install" >&5
    722758if test -z "$INSTALL"; then
    723759if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    772808
    773809echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
    774 echo "configure:775: checking whether build environment is sane" >&5
     810echo "configure:811: checking whether build environment is sane" >&5
    775811# Just in case
    776812sleep 1
     
    829865
    830866echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    831 echo "configure:832: checking whether ${MAKE-make} sets \${MAKE}" >&5
     867echo "configure:868: checking whether ${MAKE-make} sets \${MAKE}" >&5
    832868set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    833869if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    869905missing_dir=`cd $ac_aux_dir && pwd`
    870906echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
    871 echo "configure:872: checking for working aclocal" >&5
     907echo "configure:908: checking for working aclocal" >&5
    872908# Run test in a subshell; some versions of sh will print an error if
    873909# an executable is not found, even if stderr is redirected.
     
    882918
    883919echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
    884 echo "configure:885: checking for working autoconf" >&5
     920echo "configure:921: checking for working autoconf" >&5
    885921# Run test in a subshell; some versions of sh will print an error if
    886922# an executable is not found, even if stderr is redirected.
     
    895931
    896932echo $ac_n "checking for working automake""... $ac_c" 1>&6
    897 echo "configure:898: checking for working automake" >&5
     933echo "configure:934: checking for working automake" >&5
    898934# Run test in a subshell; some versions of sh will print an error if
    899935# an executable is not found, even if stderr is redirected.
     
    908944
    909945echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
    910 echo "configure:911: checking for working autoheader" >&5
     946echo "configure:947: checking for working autoheader" >&5
    911947# Run test in a subshell; some versions of sh will print an error if
    912948# an executable is not found, even if stderr is redirected.
     
    921957
    922958echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
    923 echo "configure:924: checking for working makeinfo" >&5
     959echo "configure:960: checking for working makeinfo" >&5
    924960# Run test in a subshell; some versions of sh will print an error if
    925961# an executable is not found, even if stderr is redirected.
     
    935971
    936972echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
    937 echo "configure:938: checking whether to enable maintainer-specific portions of Makefiles" >&5
     973echo "configure:974: checking whether to enable maintainer-specific portions of Makefiles" >&5
    938974    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
    939975if test "${enable_maintainer_mode+set}" = set; then
     
    958994
    959995
     996
    960997echo $ac_n "checking for RTEMS_BSP""... $ac_c" 1>&6
    961 echo "configure:962: checking for RTEMS_BSP" >&5
     998echo "configure:999: checking for RTEMS_BSP" >&5
    962999if eval "test \"`echo '$''{'rtems_cv_RTEMS_BSP'+set}'`\" = set"; then
    9631000  echo $ac_n "(cached) $ac_c" 1>&6
     
    9751012
    9761013
     1014
    9771015# Is this a supported CPU?
    9781016echo $ac_n "checking if cpu $RTEMS_CPU is supported""... $ac_c" 1>&6
    979 echo "configure:980: checking if cpu $RTEMS_CPU is supported" >&5
     1017echo "configure:1018: checking if cpu $RTEMS_CPU is supported" >&5
    9801018if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    9811019  echo "$ac_t""yes" 1>&6
     
    9851023
    9861024
    987 RTEMS_HOST=$host_os
    988 case "${target}" in
    989   # hpux unix port should go here
    990   i[3456]86-pc-linux*)         # unix "simulator" port
    991         RTEMS_HOST=Linux
    992         ;;
    993   i[3456]86-*freebsd2*) # unix "simulator" port
    994         RTEMS_HOST=FreeBSD
    995         ;;
    996   sparc-sun-solaris*)             # unix "simulator" port
    997         RTEMS_HOST=Solaris
    998         ;;
    999   *)
    1000         ;;
    1001 esac
    1002 
     1025
     1026echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
     1027echo "configure:1028: checking for make/custom/$RTEMS_BSP.cfg" >&5
     1028if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
     1029  echo "$ac_t""yes" 1>&6
     1030else
     1031  { echo "configure: error: no" 1>&2; exit 1; }
     1032fi
     1033
     1034
     1035
     1036echo $ac_n "checking whether BSP supports networking""... $ac_c" 1>&6
     1037echo "configure:1038: checking whether BSP supports networking" >&5
     1038if eval "test \"`echo '$''{'rtems_cv_HAS_NETWORKING'+set}'`\" = set"; then
     1039  echo $ac_n "(cached) $ac_c" 1>&6
     1040else
     1041      case "$RTEMS_CPU" in
     1042    unix*)
     1043      rtems_cv_HAS_NETWORKING="no"
     1044      ;;
     1045    *)
     1046      if test "${RTEMS_HAS_NETWORKING}" = "yes"; then
     1047        rtems_cv_HAS_NETWORKING="yes";
     1048      else
     1049        rtems_cv_HAS_NETWORKING="disabled";
     1050      fi
     1051      ;;
     1052    esac
     1053fi
     1054
     1055echo "$ac_t""$rtems_cv_HAS_NETWORKING" 1>&6
     1056if test "$rtems_cv_HAS_NETWORKING" = "yes"; then
     1057  HAS_NETWORKING="yes";
     1058else
     1059  HAS_NETWORKING="no";
     1060fi
     1061
     1062
     1063## Note: the order of the directories below is essential
     1064subdirs="make"
     1065
     1066subdirs="make exec"
     1067
     1068subdirs="make exec lib"
     1069
     1070if test "$HAS_NETWORKING" = "yes"; then
     1071cfg_subdirs="libnetworking librpc"
     1072fi
     1073if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
     1074cfg_subdirs="$cfg_subdirs librtems++";
     1075fi
     1076subdirs="make exec lib $cfg_subdirs"
     1077
     1078subdirs="make exec lib $cfg_subdirs wrapup"
     1079
     1080
     1081subdirs="make exec lib $cfg_subdirs wrapup tests"
    10031082
    10041083
     
    10191098PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
    10201099
    1021 
    1022 
    1023 echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
    1024 echo "configure:1025: checking for make/custom/$RTEMS_BSP.cfg" >&5
    1025 if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
    1026   echo "$ac_t""yes" 1>&6
    1027 else
    1028   { echo "configure: error: no" 1>&2; exit 1; }
    1029 fi
    1030 
    1031 
    1032 ## Note: the order of the directories below is essential
    1033 subdirs="make"
    1034 
    1035 subdirs="make exec"
    1036 
    1037 subdirs="make exec lib"
    1038 
    1039 if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
    1040 cfg_subdirs="librtems++";
    1041 fi
    1042 subdirs="make exec lib $cfg_subdirs"
    1043 
    1044 subdirs="make exec lib $cfg_subdirs tests"
    10451100
    10461101
     
    11591214
    11601215trap 'rm -fr `echo "Makefile
     1216wrapup/Makefile
    11611217" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
    11621218EOF
     
    11921248s%@mandir@%$mandir%g
    11931249s%@RTEMS_TOPdir@%$RTEMS_TOPdir%g
     1250s%@RTEMS_HAS_NETWORKING@%$RTEMS_HAS_NETWORKING%g
    11941251s%@host@%$host%g
    11951252s%@host_alias@%$host_alias%g
     
    12081265s%@build_os@%$build_os%g
    12091266s%@RTEMS_CPU@%$RTEMS_CPU%g
     1267s%@RTEMS_HOST@%$RTEMS_HOST%g
    12101268s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
    12111269s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
     
    12231281s%@MAINT@%$MAINT%g
    12241282s%@RTEMS_BSP@%$RTEMS_BSP%g
    1225 s%@RTEMS_HOST@%$RTEMS_HOST%g
     1283s%@HAS_NETWORKING@%$HAS_NETWORKING%g
     1284s%@subdirs@%$subdirs%g
     1285s%@cfg_subdirs@%$cfg_subdirs%g
    12261286s%@PROJECT_ROOT@%$PROJECT_ROOT%g
    12271287s%@RTEMS_ROOT@%$RTEMS_ROOT%g
    12281288s%@INSTALL_CHANGE@%$INSTALL_CHANGE%g
    12291289s%@PACKHEX@%$PACKHEX%g
    1230 s%@subdirs@%$subdirs%g
    12311290
    12321291CEOF
     
    12711330
    12721331CONFIG_FILES=\${CONFIG_FILES-"Makefile
     1332wrapup/Makefile
    12731333"}
    12741334EOF
     
    13671427  done
    13681428
    1369   for ac_config_dir in make exec lib $cfg_subdirs tests; do
     1429  for ac_config_dir in make exec lib $cfg_subdirs wrapup tests; do
    13701430
    13711431    # Do not complain, so a configure script can configure whichever
  • c/src/exec/aclocal.m4

    rd83c39dc r4075af6f  
    2020AC_DEFUN(RTEMS_TOP,
    2121[dnl
     22AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
     23AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
     24
    2225AC_ARG_WITH(target-subdir,
    2326[  --with-target-subdir=DIR],
     
    4447AC_MSG_RESULT($RTEMS_VERSION)
    4548])dnl
    46 
    47 dnl
    48 dnl $Id$
    49 dnl
    50 
    51 dnl canonicalize target cpu
    52 dnl NOTE: Most rtems targets do not fullfil autoconf's
    53 dnl target naming conventions "processor-vendor-os"
    54 dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
    55 dnl and we have to fix it for rtems ourselves
    56 
    57 AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
    58 [
    59 AC_CANONICAL_SYSTEM
    60 AC_MSG_CHECKING(rtems target cpu)
    61 changequote(,)dnl
    62 case "${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         ;;
    82 esac
    83 changequote([,])dnl
    84 AC_SUBST(RTEMS_CPU)
    85 AC_MSG_RESULT($RTEMS_CPU)
    86 ])
    8749
    8850# Do all the work for Automake.  This macro actually does too much --
     
    180142AC_SUBST($1)])
    181143
     144dnl
     145dnl $Id$
     146dnl
     147
     148dnl canonicalize target cpu
     149dnl NOTE: Most rtems targets do not fullfil autoconf's
     150dnl target naming conventions "processor-vendor-os"
     151dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
     152dnl and we have to fix it for rtems ourselves
     153
     154AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
     155[
     156AC_CANONICAL_SYSTEM
     157AC_MSG_CHECKING(rtems target cpu)
     158changequote(,)dnl
     159case "${target}" in
     160  # hpux unix port should go here
     161  i[3456]86-go32-rtems*)
     162        RTEMS_CPU=i386
     163        ;;
     164  i[3456]86-pc-linux*)          # unix "simulator" port
     165        RTEMS_CPU=unix
     166        ;;
     167  i[3456]86-*freebsd2*)         # unix "simulator" port
     168        RTEMS_CPU=unix
     169        ;;
     170  no_cpu-*rtems*)
     171        RTEMS_CPU=no_cpu
     172        ;;
     173  sparc-sun-solaris*)           # unix "simulator" port
     174        RTEMS_CPU=unix
     175        ;;
     176  *)
     177        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
     178        ;;
     179esac
     180changequote([,])dnl
     181AC_SUBST(RTEMS_CPU)
     182AC_MSG_RESULT($RTEMS_CPU)
     183])
     184
    182185# Add --enable-maintainer-mode option to configure.
    183186# From Jim Meyering
     
    231234AC_DEFUN(RTEMS_ENABLE_POSIX,
    232235[
     236AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     237
    233238AC_ARG_ENABLE(posix,
    234239[  --enable-posix                       enable posix interface],
     
    264269AC_SUBST(RTEMS_HAS_POSIX_API)
    265270])
     271
     272dnl $Id$
     273dnl
     274AC_DEFUN(RTEMS_CHECK_POSIX_API,
     275[dnl
     276AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     277AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
     278
     279AC_CACHE_CHECK([whether BSP supports libposix],
     280  rtems_cv_HAS_POSIX_API,
     281  [dnl
     282    case "$RTEMS_CPU" in
     283    unix*)
     284      rtems_cv_HAS_POSIX_API="no"
     285      ;;
     286    *)
     287      if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
     288        rtems_cv_HAS_POSIX_API="yes";
     289      else
     290        rtems_cv_HAS_POSIX_API="disabled";
     291      fi
     292      ;;
     293    esac])
     294if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
     295  HAS_POSIX_API="yes";
     296else
     297  HAS_POSIX_API="no";
     298fi
     299AC_SUBST(HAS_POSIX_API)dnl
     300])
     301
     302dnl $Id$
     303
     304dnl check if RTEMS support a cpu
     305AC_DEFUN(RTEMS_CHECK_CPU,
     306[dnl
     307AC_REQUIRE([RTEMS_TOP])
     308AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
     309AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     310
     311# Is this a supported CPU?
     312AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
     313if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
     314  AC_MSG_RESULT(yes)
     315else
     316  AC_MSG_ERROR(no)
     317fi
     318])dnl
     319
    266320
    267321dnl $Id$
     
    310364AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
    311365[
     366AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
    312367AC_ARG_ENABLE(rtemsbsp,
    313368[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
     
    322377AC_DEFUN(RTEMS_ENV_RTEMSBSP,
    323378[dnl
     379AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
     380AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
     381AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
     382AC_BEFORE([$0], [RTEMS_CHECK_MULTIPROCESSING])dnl
     383AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     384
    324385AC_MSG_CHECKING([for RTEMS_BSP])
    325386AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
     
    335396])
    336397
    337 dnl $Id$
    338 
    339 dnl check if RTEMS support a cpu
    340 AC_DEFUN(RTEMS_CHECK_CPU,
    341 [dnl
    342 AC_REQUIRE([RTEMS_TOP])
    343 AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
    344 # Is this a supported CPU?
    345 AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
    346 if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    347   AC_MSG_RESULT(yes)
    348 else
    349   AC_MSG_ERROR(no)
    350 fi
    351 ])dnl
    352 
    353 
    354 dnl $Id$
    355 
    356 AC_DEFUN(RTEMS_CANONICAL_HOST,
    357 [dnl
    358 AC_REQUIRE([AC_CANONICAL_HOST])
    359 RTEMS_HOST=$host_os
    360 changequote(,)dnl
    361 case "${target}" in
    362   # hpux unix port should go here
    363   i[3456]86-pc-linux*)         # unix "simulator" port
    364         RTEMS_HOST=Linux
    365         ;;
    366   i[3456]86-*freebsd2*) # unix "simulator" port
    367         RTEMS_HOST=FreeBSD
    368         ;;
    369   sparc-sun-solaris*)             # unix "simulator" port
    370         RTEMS_HOST=Solaris
    371         ;;
    372   *)
    373         ;;
    374 esac
    375 changequote([,])dnl
    376 AC_SUBST(RTEMS_HOST)
    377 ])dnl
    378 
    379398dnl
    380399dnl $Id$
     
    399418PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
    400419AC_SUBST(PACKHEX)
    401 ])
    402 
    403 
    404 dnl
    405 dnl $Id$
    406 dnl
    407 dnl Check for target gcc
    408 dnl
    409 dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    410 dnl                             Completely reworked
    411 
    412 AC_DEFUN(RTEMS_PROG_CC,
    413 [
    414 AC_BEFORE([$0], [AC_PROG_CPP])dnl
    415 AC_BEFORE([$0], [AC_PROG_CC])dnl
    416 AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
    417 
    418 dnl Only accept gcc and cc
    419 dnl NOTE: This might be too restrictive for native compilation
    420 AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
    421 test -z "$CC_FOR_TARGET" \
    422   && AC_MSG_ERROR([no acceptable cc found in \$PATH])
    423 
    424 dnl backup
    425 rtems_save_CC=$CC
    426 rtems_save_CFLAGS=$CFLAGS
    427 
    428 dnl temporarily set CC
    429 CC=$CC_FOR_TARGET
    430 
    431 AC_PROG_CC_WORKS
    432 AC_PROG_CC_GNU
    433 
    434 if test $ac_cv_prog_gcc = yes; then
    435   GCC=yes
    436 dnl Check whether -g works, even if CFLAGS is set, in case the package
    437 dnl plays around with CFLAGS (such as to build both debugging and
    438 dnl normal versions of a library), tasteless as that idea is.
    439   ac_test_CFLAGS="${CFLAGS+set}"
    440   ac_save_CFLAGS="$CFLAGS"
    441   CFLAGS=
    442   AC_PROG_CC_G
    443   if test "$ac_test_CFLAGS" = set; then
    444     CFLAGS="$ac_save_CFLAGS"
    445   elif test $ac_cv_prog_cc_g = yes; then
    446     CFLAGS="-g -O2"
    447   else
    448     CFLAGS="-O2"
    449   fi
    450 else
    451   GCC=
    452   test "${CFLAGS+set}" = set || CFLAGS="-g"
    453 fi
    454 
    455 rtems_cv_prog_gcc=$ac_cv_prog_gcc
    456 rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
    457 rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
    458 rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
    459 
    460 dnl restore initial values
    461 CC=$rtems_save_CC
    462 CFLAGS=$rtems_save_CFLAGS
    463 
    464 unset ac_cv_prog_gcc
    465 unset ac_cv_prog_cc_g
    466 unset ac_cv_prog_cc_works
    467 unset ac_cv_prog_cc_cross
    468 ])
    469 
    470 AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
    471 [
    472 dnl check target cc
    473 RTEMS_PROG_CC
    474 dnl check if the compiler supports --specs
    475 RTEMS_GCC_SPECS
    476 dnl check if the target compiler may use --pipe
    477 RTEMS_GCC_PIPE
    478 dnl check if the compiler supports --specs if gcc28 is requested
    479 if test "$RTEMS_USE_GCC272" != "yes" ; then
    480   if test "$rtems_cv_gcc_specs" = "no"; then
    481     AC_MSG_WARN([*** disabling --enable-gcc28])
    482       RTEMS_USE_GCC272=yes
    483   fi
    484 fi
    485 test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
    486 
    487 dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
    488 case $host_os in
    489 *cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
    490 *) ;;
    491 esac
    492 AC_SUBST(GCCSED)
    493 ])
    494 
    495 dnl
    496 dnl  $Id$
    497 dnl
    498 dnl Set program_prefix
    499 dnl
    500 dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    501 dnl                             Extracted from configure
    502 
    503 AC_DEFUN(RTEMS_TOOL_PREFIX,
    504 [AC_REQUIRE([AC_CANONICAL_TARGET])dnl
    505 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
    506 
    507 changequote(,)dnl
    508 if [ "${program_prefix}" = "NONE" ] ; then
    509   if [ "${target}" = "${host}" ] ; then
    510     program_prefix=
    511   else
    512     program_prefix=${target}-
    513   fi
    514 fi
    515 changequote([,])dnl
    516 ])
    517 
    518 dnl
    519 dnl $Id$
    520 dnl
    521 dnl Check whether the target compiler accepts -specs
    522 dnl
    523 dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
    524 dnl
    525 
    526 AC_DEFUN(RTEMS_GCC_SPECS,
    527 [AC_REQUIRE([RTEMS_PROG_CC])
    528 AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
    529 [
    530 rtems_cv_gcc_specs=no
    531 if test "$rtems_cv_prog_gcc" = "yes"; then
    532   touch confspec
    533   echo 'void f(){}' >conftest.c
    534   if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
    535     rtems_cv_gcc_specs=yes
    536   fi
    537 fi
    538 rm -f confspec conftest*
    539 ])])
    540 
    541 dnl
    542 dnl $Id$
    543 dnl
    544 dnl Check whether the target compiler accepts -pipe
    545 dnl
    546 dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
    547 dnl
    548 
    549 AC_DEFUN(RTEMS_GCC_PIPE,
    550 [AC_REQUIRE([RTEMS_PROG_CC])
    551 AC_REQUIRE([AC_CANONICAL_HOST])
    552 AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
    553 [
    554 rtems_cv_gcc_pipe=no
    555 if test "$rtems_cv_prog_gcc" = "yes"; then
    556 case "$host_os" in
    557   cygwin*)
    558     ;;
    559   *)
    560     echo 'void f(){}' >conftest.c
    561     if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
    562       rtems_cv_gcc_pipe=yes
    563     fi
    564     rm -f conftest*
    565     ;;
    566 esac
    567 fi
    568 ])
    569 ])
    570 
    571 dnl
    572 dnl $Id$
    573 dnl
    574 dnl Set target tools
    575 dnl
    576 dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    577 dnl             fixing cache/environment variable handling
    578 dnl             adding checks for cygwin/egcs '\\'-bug
    579 dnl             adding checks for ranlib/ar -s problem
    580 dnl
    581 dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    582 dnl
    583 
    584 AC_DEFUN(RTEMS_GCC_PRINT,
    585 [ case $host_os in
    586   *cygwin*)
    587     dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
    588     dnl        Should be removed once cygwin/egcs reports '/' only
    589     $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
    590     ;;
    591   *)
    592     $1=`$CC_FOR_TARGET --print-prog-name=$2`
    593     ;;
    594   esac
    595 ])
    596 
    597 AC_DEFUN(RTEMS_PATH_TOOL,
    598 [
    599 AC_MSG_CHECKING([target's $2])
    600 AC_CACHE_VAL(ac_cv_path_$1,:)
    601 AC_MSG_RESULT([$ac_cv_path_$1])
    602 
    603 if test -n "$ac_cv_path_$1"; then
    604   dnl retrieve the value from the cache
    605   $1=$ac_cv_path_$1
    606 else
    607   dnl the cache was not set
    608   if test -z "[$]$1" ; then
    609     if test "$rtems_cv_prog_gcc" = "yes"; then
    610       # We are using gcc, ask it about its tool
    611       # NOTE: Necessary if gcc was configured to use the target's
    612       # native tools or uses prefixes for gnutools (e.g. gas instead of as)
    613       RTEMS_GCC_PRINT($1,$2)
    614     fi
    615   else
    616     # The user set an environment variable.
    617     # Check whether it is an absolute path, otherwise AC_PATH_PROG
    618     # will override the environment variable, which isn't what the user
    619     # intends
    620     AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
    621     case "[$]$1" in
    622     /*) # valid
    623       AC_MSG_RESULT("yes")
    624     ;;
    625     *)  # invalid for AC_PATH_PROG
    626       AC_MSG_RESULT("no")
    627       AC_MSG_ERROR([***]
    628         [Environment variable $1 should either]
    629         [be unset (preferred) or contain an absolute path])
    630     ;;
    631     esac
    632   fi
    633 
    634   AC_PATH_PROG($1,"$program_prefix"$2,$3)
    635 fi
    636 ])
    637 
    638 AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
    639 [AC_REQUIRE([RTEMS_PROG_CC])dnl
    640 
    641 dnl FIXME: What shall be done if these tools are not available?
    642   RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
    643   RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
    644   RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
    645   RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
    646 
    647 dnl special treatment of ranlib
    648   RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
    649   if test "$RANLIB_FOR_TARGET" = "no"; then
    650     # ranlib wasn't found; check if ar -s is available
    651     RTEMS_AR_FOR_TARGET_S
    652     if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
    653       dnl override RANLIB_FOR_TARGET's cache
    654       ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
    655       RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
    656     else
    657       AC_MSG_ERROR([***]
    658         [Can't figure out how to build a library index]
    659         [Neither ranlib nor ar -s seem to be available] )
    660     fi
    661   fi
    662 
    663 dnl NOTE: These may not be available if not using gnutools
    664   RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
    665   RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
    666   RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
    667 ])
    668 
    669 dnl
    670 dnl $Id$
    671 dnl
    672 
    673 AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
    674 [
    675 AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
    676 rtems_cv_AR_FOR_TARGET_S,
    677 [
    678 cat > conftest.$ac_ext <<EOF
    679 int foo( int b )
    680 { return b; }
    681 EOF
    682 if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
    683   && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
    684   && test -s conftest.a ; \
    685 then
    686   rtems_cv_AR_FOR_TARGET_S="yes"
    687 else
    688   rtems_cv_AR_FOR_TARGET_S="no"
    689 fi
    690   rm -f conftest*
    691 ])
    692 ])
    693 
    694 
    695 dnl $Id$
    696 
    697 AC_DEFUN(RTEMS_CHECK_NEWLIB,
    698 [dnl
    699 AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
    700 AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl
    701 AC_CACHE_CHECK([for newlib],
    702   rtems_cv_use_newlib,
    703   [
    704     rtems_save_CC=$CC
    705     CC=$CC_FOR_TARGET
    706 
    707 dnl some versions of newlib provide not_required_by_rtems
    708     AC_TRY_LINK(
    709       [extern int not_required_by_rtems() ;],
    710       [not_required_by_rtems()],
    711       rtems_cv_use_newlib="yes")
    712 
    713 dnl older versions of newlib provided rtems_provides_crt0
    714     if test -z "$rtems_cv_use_newlib"; then
    715       AC_TRY_LINK(
    716         [extern int rtems_provides_crt0 ;],
    717         [rtems_provides_crt0 = 0],
    718         rtems_cv_use_newlib="yes",
    719         rtems_cv_use_newlib="no")
    720     fi
    721   CC=$rtems_save_CC])
    722 RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
    723 AC_SUBST(RTEMS_USE_NEWLIB)
    724420])
    725421
     
    766462AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
    767463[dnl
     464AC_REQUIRE([RTEMS_TOP])
     465
    768466AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
    769467if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
     
    782480AC_REQUIRE([RTEMS_TOP])dnl
    783481AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     482AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl
     483
    784484AC_CACHE_CHECK([whether BSP supports multiprocessing],
    785485  rtems_cv_HAS_MP,
     
    803503
    804504dnl $Id$
    805 dnl
    806 AC_DEFUN(RTEMS_CHECK_POSIX_API,
    807 [dnl
    808 AC_REQUIRE([RTEMS_CHECK_CPU])dnl
    809 AC_CACHE_CHECK([whether BSP supports libposix],
    810   rtems_cv_HAS_POSIX_API,
    811   [dnl
    812     case "$RTEMS_CPU" in
    813     unix*)
    814       rtems_cv_HAS_POSIX_API="no"
    815       ;;
    816     *)
    817       if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
    818         rtems_cv_HAS_POSIX_API="yes";
    819       else
    820         rtems_cv_HAS_POSIX_API="disabled";
    821       fi
    822       ;;
    823     esac])
    824 if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
    825   HAS_POSIX_API="yes";
    826 else
    827   HAS_POSIX_API="no";
    828 fi
    829 AC_SUBST(HAS_POSIX_API)dnl
    830 ])
    831 
     505
     506AC_DEFUN(RTEMS_CANONICAL_HOST,
     507[dnl
     508AC_REQUIRE([AC_CANONICAL_HOST])
     509RTEMS_HOST=$host_os
     510changequote(,)dnl
     511case "${target}" in
     512  # hpux unix port should go here
     513  i[3456]86-pc-linux*)         # unix "simulator" port
     514        RTEMS_HOST=Linux
     515        ;;
     516  i[3456]86-*freebsd2*) # unix "simulator" port
     517        RTEMS_HOST=FreeBSD
     518        ;;
     519  sparc-sun-solaris*)             # unix "simulator" port
     520        RTEMS_HOST=Solaris
     521        ;;
     522  *)
     523        ;;
     524esac
     525changequote([,])dnl
     526AC_SUBST(RTEMS_HOST)
     527])dnl
     528
     529dnl
     530dnl $Id$
     531dnl
     532dnl Check for target gcc
     533dnl
     534dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     535dnl                             Completely reworked
     536
     537AC_DEFUN(RTEMS_PROG_CC,
     538[
     539AC_BEFORE([$0], [AC_PROG_CPP])dnl
     540AC_BEFORE([$0], [AC_PROG_CC])dnl
     541AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
     542AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
     543
     544dnl Only accept gcc and cc
     545dnl NOTE: This might be too restrictive for native compilation
     546AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
     547test -z "$CC_FOR_TARGET" \
     548  && AC_MSG_ERROR([no acceptable cc found in \$PATH])
     549
     550dnl backup
     551rtems_save_CC=$CC
     552rtems_save_CFLAGS=$CFLAGS
     553
     554dnl temporarily set CC
     555CC=$CC_FOR_TARGET
     556
     557AC_PROG_CC_WORKS
     558AC_PROG_CC_GNU
     559
     560if test $ac_cv_prog_gcc = yes; then
     561  GCC=yes
     562dnl Check whether -g works, even if CFLAGS is set, in case the package
     563dnl plays around with CFLAGS (such as to build both debugging and
     564dnl normal versions of a library), tasteless as that idea is.
     565  ac_test_CFLAGS="${CFLAGS+set}"
     566  ac_save_CFLAGS="$CFLAGS"
     567  CFLAGS=
     568  AC_PROG_CC_G
     569  if test "$ac_test_CFLAGS" = set; then
     570    CFLAGS="$ac_save_CFLAGS"
     571  elif test $ac_cv_prog_cc_g = yes; then
     572    CFLAGS="-g -O2"
     573  else
     574    CFLAGS="-O2"
     575  fi
     576else
     577  GCC=
     578  test "${CFLAGS+set}" = set || CFLAGS="-g"
     579fi
     580
     581rtems_cv_prog_gcc=$ac_cv_prog_gcc
     582rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
     583rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
     584rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
     585
     586dnl restore initial values
     587CC=$rtems_save_CC
     588CFLAGS=$rtems_save_CFLAGS
     589
     590unset ac_cv_prog_gcc
     591unset ac_cv_prog_cc_g
     592unset ac_cv_prog_cc_works
     593unset ac_cv_prog_cc_cross
     594])
     595
     596AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
     597[
     598dnl check target cc
     599RTEMS_PROG_CC
     600dnl check if the compiler supports --specs
     601RTEMS_GCC_SPECS
     602dnl check if the target compiler may use --pipe
     603RTEMS_GCC_PIPE
     604dnl check if the compiler supports --specs if gcc28 is requested
     605if test "$RTEMS_USE_GCC272" != "yes" ; then
     606  if test "$rtems_cv_gcc_specs" = "no"; then
     607    AC_MSG_WARN([*** disabling --enable-gcc28])
     608      RTEMS_USE_GCC272=yes
     609  fi
     610fi
     611test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
     612
     613dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
     614case $host_os in
     615*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
     616*) ;;
     617esac
     618AC_SUBST(GCCSED)
     619])
     620
     621dnl
     622dnl $Id$
     623dnl
     624dnl Set target tools
     625dnl
     626dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     627dnl             fixing cache/environment variable handling
     628dnl             adding checks for cygwin/egcs '\\'-bug
     629dnl             adding checks for ranlib/ar -s problem
     630dnl
     631dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     632dnl
     633
     634AC_DEFUN(RTEMS_GCC_PRINT,
     635[ case $host_os in
     636  *cygwin*)
     637    dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
     638    dnl        Should be removed once cygwin/egcs reports '/' only
     639    $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
     640    ;;
     641  *)
     642    $1=`$CC_FOR_TARGET --print-prog-name=$2`
     643    ;;
     644  esac
     645])
     646
     647AC_DEFUN(RTEMS_PATH_TOOL,
     648[
     649AC_MSG_CHECKING([target's $2])
     650AC_CACHE_VAL(ac_cv_path_$1,:)
     651AC_MSG_RESULT([$ac_cv_path_$1])
     652
     653if test -n "$ac_cv_path_$1"; then
     654  dnl retrieve the value from the cache
     655  $1=$ac_cv_path_$1
     656else
     657  dnl the cache was not set
     658  if test -z "[$]$1" ; then
     659    if test "$rtems_cv_prog_gcc" = "yes"; then
     660      # We are using gcc, ask it about its tool
     661      # NOTE: Necessary if gcc was configured to use the target's
     662      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     663      RTEMS_GCC_PRINT($1,$2)
     664    fi
     665  else
     666    # The user set an environment variable.
     667    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     668    # will override the environment variable, which isn't what the user
     669    # intends
     670    AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
     671    case "[$]$1" in
     672    /*) # valid
     673      AC_MSG_RESULT("yes")
     674    ;;
     675    *)  # invalid for AC_PATH_PROG
     676      AC_MSG_RESULT("no")
     677      AC_MSG_ERROR([***]
     678        [Environment variable $1 should either]
     679        [be unset (preferred) or contain an absolute path])
     680    ;;
     681    esac
     682  fi
     683
     684  AC_PATH_PROG($1,"$program_prefix"$2,$3)
     685fi
     686])
     687
     688AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
     689[AC_REQUIRE([RTEMS_PROG_CC])dnl
     690
     691dnl FIXME: What shall be done if these tools are not available?
     692  RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
     693  RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
     694  RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
     695  RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
     696
     697dnl special treatment of ranlib
     698  RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
     699  if test "$RANLIB_FOR_TARGET" = "no"; then
     700    # ranlib wasn't found; check if ar -s is available
     701    RTEMS_AR_FOR_TARGET_S
     702    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
     703      dnl override RANLIB_FOR_TARGET's cache
     704      ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
     705      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
     706    else
     707      AC_MSG_ERROR([***]
     708        [Can't figure out how to build a library index]
     709        [Neither ranlib nor ar -s seem to be available] )
     710    fi
     711  fi
     712
     713dnl NOTE: These may not be available if not using gnutools
     714  RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
     715  RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
     716  RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
     717])
     718
     719dnl
     720dnl $Id$
     721dnl
     722
     723AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
     724[
     725AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
     726rtems_cv_AR_FOR_TARGET_S,
     727[
     728cat > conftest.$ac_ext <<EOF
     729int foo( int b )
     730{ return b; }
     731EOF
     732if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
     733  && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
     734  && test -s conftest.a ; \
     735then
     736  rtems_cv_AR_FOR_TARGET_S="yes"
     737else
     738  rtems_cv_AR_FOR_TARGET_S="no"
     739fi
     740  rm -f conftest*
     741])
     742])
     743
     744
     745dnl
     746dnl  $Id$
     747dnl
     748dnl Set program_prefix
     749dnl
     750dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     751dnl                             Extracted from configure
     752
     753AC_DEFUN(RTEMS_TOOL_PREFIX,
     754[AC_REQUIRE([AC_CANONICAL_TARGET])dnl
     755AC_REQUIRE([AC_CANONICAL_BUILD])dnl
     756
     757changequote(,)dnl
     758if [ "${program_prefix}" = "NONE" ] ; then
     759  if [ "${target}" = "${host}" ] ; then
     760    program_prefix=
     761  else
     762    program_prefix=${target}-
     763  fi
     764fi
     765changequote([,])dnl
     766])
     767
     768dnl
     769dnl $Id$
     770dnl
     771dnl Check whether the target compiler accepts -specs
     772dnl
     773
     774AC_DEFUN(RTEMS_GCC_SPECS,
     775[AC_REQUIRE([RTEMS_PROG_CC])
     776AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
     777[
     778rtems_cv_gcc_specs=no
     779if test "$rtems_cv_prog_gcc" = "yes"; then
     780  touch confspec
     781  echo 'void f(){}' >conftest.c
     782  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
     783    rtems_cv_gcc_specs=yes
     784  fi
     785fi
     786rm -f confspec conftest*
     787])])
     788
     789dnl
     790dnl $Id$
     791dnl
     792dnl Check whether the target compiler accepts -pipe
     793dnl
     794dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
     795dnl
     796
     797AC_DEFUN(RTEMS_GCC_PIPE,
     798[AC_REQUIRE([RTEMS_PROG_CC])
     799AC_REQUIRE([AC_CANONICAL_HOST])
     800AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
     801[
     802rtems_cv_gcc_pipe=no
     803if test "$rtems_cv_prog_gcc" = "yes"; then
     804case "$host_os" in
     805  cygwin*)
     806    ;;
     807  *)
     808    echo 'void f(){}' >conftest.c
     809    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
     810      rtems_cv_gcc_pipe=yes
     811    fi
     812    rm -f conftest*
     813    ;;
     814esac
     815fi
     816])
     817])
     818
     819dnl $Id$
     820
     821AC_DEFUN(RTEMS_CHECK_NEWLIB,
     822[dnl
     823AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
     824AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl
     825AC_CACHE_CHECK([for newlib],
     826  rtems_cv_use_newlib,
     827  [
     828    rtems_save_CC=$CC
     829    CC=$CC_FOR_TARGET
     830
     831dnl some versions of newlib provide not_required_by_rtems
     832    AC_TRY_LINK(
     833      [extern int not_required_by_rtems() ;],
     834      [not_required_by_rtems()],
     835      rtems_cv_use_newlib="yes")
     836
     837dnl older versions of newlib provided rtems_provides_crt0
     838    if test -z "$rtems_cv_use_newlib"; then
     839      AC_TRY_LINK(
     840        [extern int rtems_provides_crt0 ;],
     841        [rtems_provides_crt0 = 0],
     842        rtems_cv_use_newlib="yes",
     843        rtems_cv_use_newlib="no")
     844    fi
     845  CC=$rtems_save_CC])
     846RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
     847AC_SUBST(RTEMS_USE_NEWLIB)
     848])
     849
     850
  • c/src/exec/configure

    rd83c39dc r4075af6f  
    538538
    539539
     540
    540541# Check whether --with-target-subdir or --without-target-subdir was given.
    541542if test "${with_target_subdir+set}" = set; then
     
    551552
    552553echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6
    553 echo "configure:554: checking for RTEMS Version" >&5
     554echo "configure:555: checking for RTEMS Version" >&5
    554555if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
    555556RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
     
    612613
    613614echo $ac_n "checking host system type""... $ac_c" 1>&6
    614 echo "configure:615: checking host system type" >&5
     615echo "configure:616: checking host system type" >&5
    615616
    616617host_alias=$host
     
    633634
    634635echo $ac_n "checking target system type""... $ac_c" 1>&6
    635 echo "configure:636: checking target system type" >&5
     636echo "configure:637: checking target system type" >&5
    636637
    637638target_alias=$target
     
    651652
    652653echo $ac_n "checking build system type""... $ac_c" 1>&6
    653 echo "configure:654: checking build system type" >&5
     654echo "configure:655: checking build system type" >&5
    654655
    655656build_alias=$build
     
    674675
    675676echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
    676 echo "configure:677: checking rtems target cpu" >&5
     677echo "configure:678: checking rtems target cpu" >&5
    677678case "${target}" in
    678679  # hpux unix port should go here
     
    712713# ./install, which can be erroneously created by make from ./install.sh.
    713714echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    714 echo "configure:715: checking for a BSD compatible install" >&5
     715echo "configure:716: checking for a BSD compatible install" >&5
    715716if test -z "$INSTALL"; then
    716717if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    765766
    766767echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
    767 echo "configure:768: checking whether build environment is sane" >&5
     768echo "configure:769: checking whether build environment is sane" >&5
    768769# Just in case
    769770sleep 1
     
    822823
    823824echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    824 echo "configure:825: checking whether ${MAKE-make} sets \${MAKE}" >&5
     825echo "configure:826: checking whether ${MAKE-make} sets \${MAKE}" >&5
    825826set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    826827if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    862863missing_dir=`cd $ac_aux_dir && pwd`
    863864echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
    864 echo "configure:865: checking for working aclocal" >&5
     865echo "configure:866: checking for working aclocal" >&5
    865866# Run test in a subshell; some versions of sh will print an error if
    866867# an executable is not found, even if stderr is redirected.
     
    875876
    876877echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
    877 echo "configure:878: checking for working autoconf" >&5
     878echo "configure:879: checking for working autoconf" >&5
    878879# Run test in a subshell; some versions of sh will print an error if
    879880# an executable is not found, even if stderr is redirected.
     
    888889
    889890echo $ac_n "checking for working automake""... $ac_c" 1>&6
    890 echo "configure:891: checking for working automake" >&5
     891echo "configure:892: checking for working automake" >&5
    891892# Run test in a subshell; some versions of sh will print an error if
    892893# an executable is not found, even if stderr is redirected.
     
    901902
    902903echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
    903 echo "configure:904: checking for working autoheader" >&5
     904echo "configure:905: checking for working autoheader" >&5
    904905# Run test in a subshell; some versions of sh will print an error if
    905906# an executable is not found, even if stderr is redirected.
     
    914915
    915916echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
    916 echo "configure:917: checking for working makeinfo" >&5
     917echo "configure:918: checking for working makeinfo" >&5
    917918# Run test in a subshell; some versions of sh will print an error if
    918919# an executable is not found, even if stderr is redirected.
     
    928929
    929930echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
    930 echo "configure:931: checking whether to enable maintainer-specific portions of Makefiles" >&5
     931echo "configure:932: checking whether to enable maintainer-specific portions of Makefiles" >&5
    931932    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
    932933if test "${enable_maintainer_mode+set}" = set; then
     
    962963  RTEMS_HAS_MULTIPROCESSING=no
    963964fi
     965
    964966
    965967
     
    10381040
    10391041
     1042
    10401043echo $ac_n "checking for RTEMS_BSP""... $ac_c" 1>&6
    1041 echo "configure:1042: checking for RTEMS_BSP" >&5
     1044echo "configure:1045: checking for RTEMS_BSP" >&5
    10421045if eval "test \"`echo '$''{'rtems_cv_RTEMS_BSP'+set}'`\" = set"; then
    10431046  echo $ac_n "(cached) $ac_c" 1>&6
     
    10561059
    10571060
     1061
    10581062# Is this a supported CPU?
    10591063echo $ac_n "checking if cpu $RTEMS_CPU is supported""... $ac_c" 1>&6
    1060 echo "configure:1061: checking if cpu $RTEMS_CPU is supported" >&5
     1064echo "configure:1065: checking if cpu $RTEMS_CPU is supported" >&5
    10611065if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    10621066  echo "$ac_t""yes" 1>&6
     
    11191123set dummy $ac_prog; ac_word=$2
    11201124echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1121 echo "configure:1122: checking for $ac_word" >&5
     1125echo "configure:1126: checking for $ac_word" >&5
    11221126if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
    11231127  echo $ac_n "(cached) $ac_c" 1>&6
     
    11631167
    11641168echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    1165 echo "configure:1166: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     1169echo "configure:1170: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    11661170
    11671171ac_ext=c
     
    11741178cat > conftest.$ac_ext << EOF
    11751179
    1176 #line 1177 "configure"
     1180#line 1181 "configure"
    11771181#include "confdefs.h"
    11781182
    11791183main(){return(0);}
    11801184EOF
    1181 if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1185if { (eval echo configure:1186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    11821186  ac_cv_prog_cc_works=yes
    11831187  # If we can't run a trivial program, we are probably using a cross compiler.
     
    12051209fi
    12061210echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    1207 echo "configure:1208: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     1211echo "configure:1212: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    12081212echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    12091213cross_compiling=$ac_cv_prog_cc_cross
    12101214
    12111215echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    1212 echo "configure:1213: checking whether we are using GNU C" >&5
     1216echo "configure:1217: checking whether we are using GNU C" >&5
    12131217if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    12141218  echo $ac_n "(cached) $ac_c" 1>&6
     
    12191223#endif
    12201224EOF
    1221 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     1225if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    12221226  ac_cv_prog_gcc=yes
    12231227else
     
    12341238  CFLAGS=
    12351239  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    1236 echo "configure:1237: checking whether ${CC-cc} accepts -g" >&5
     1240echo "configure:1241: checking whether ${CC-cc} accepts -g" >&5
    12371241if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    12381242  echo $ac_n "(cached) $ac_c" 1>&6
     
    12761280
    12771281echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
    1278 echo "configure:1279: checking whether $CC_FOR_TARGET accepts -specs" >&5
     1282echo "configure:1283: checking whether $CC_FOR_TARGET accepts -specs" >&5
    12791283if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
    12801284  echo $ac_n "(cached) $ac_c" 1>&6
     
    12971301
    12981302echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
    1299 echo "configure:1300: checking whether $CC_FOR_TARGET accepts --pipe" >&5
     1303echo "configure:1304: checking whether $CC_FOR_TARGET accepts --pipe" >&5
    13001304if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
    13011305  echo $ac_n "(cached) $ac_c" 1>&6
     
    13381342 
    13391343echo $ac_n "checking target's ar""... $ac_c" 1>&6
    1340 echo "configure:1341: checking target's ar" >&5
     1344echo "configure:1345: checking target's ar" >&5
    13411345if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
    13421346  echo $ac_n "(cached) $ac_c" 1>&6
     
    13711375    # intends
    13721376    echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1373 echo "configure:1374: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
     1377echo "configure:1378: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
    13741378    case "$AR_FOR_TARGET" in
    13751379    /*) # valid
     
    13881392set dummy "$program_prefix"ar; ac_word=$2
    13891393echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1390 echo "configure:1391: checking for $ac_word" >&5
     1394echo "configure:1395: checking for $ac_word" >&5
    13911395if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
    13921396  echo $ac_n "(cached) $ac_c" 1>&6
     
    14251429 
    14261430echo $ac_n "checking target's as""... $ac_c" 1>&6
    1427 echo "configure:1428: checking target's as" >&5
     1431echo "configure:1432: checking target's as" >&5
    14281432if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
    14291433  echo $ac_n "(cached) $ac_c" 1>&6
     
    14581462    # intends
    14591463    echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1460 echo "configure:1461: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
     1464echo "configure:1465: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
    14611465    case "$AS_FOR_TARGET" in
    14621466    /*) # valid
     
    14751479set dummy "$program_prefix"as; ac_word=$2
    14761480echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1477 echo "configure:1478: checking for $ac_word" >&5
     1481echo "configure:1482: checking for $ac_word" >&5
    14781482if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
    14791483  echo $ac_n "(cached) $ac_c" 1>&6
     
    15121516 
    15131517echo $ac_n "checking target's ld""... $ac_c" 1>&6
    1514 echo "configure:1515: checking target's ld" >&5
     1518echo "configure:1519: checking target's ld" >&5
    15151519if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
    15161520  echo $ac_n "(cached) $ac_c" 1>&6
     
    15451549    # intends
    15461550    echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1547 echo "configure:1548: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
     1551echo "configure:1552: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
    15481552    case "$LD_FOR_TARGET" in
    15491553    /*) # valid
     
    15621566set dummy "$program_prefix"ld; ac_word=$2
    15631567echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1564 echo "configure:1565: checking for $ac_word" >&5
     1568echo "configure:1569: checking for $ac_word" >&5
    15651569if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
    15661570  echo $ac_n "(cached) $ac_c" 1>&6
     
    15991603 
    16001604echo $ac_n "checking target's nm""... $ac_c" 1>&6
    1601 echo "configure:1602: checking target's nm" >&5
     1605echo "configure:1606: checking target's nm" >&5
    16021606if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
    16031607  echo $ac_n "(cached) $ac_c" 1>&6
     
    16321636    # intends
    16331637    echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1634 echo "configure:1635: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
     1638echo "configure:1639: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
    16351639    case "$NM_FOR_TARGET" in
    16361640    /*) # valid
     
    16491653set dummy "$program_prefix"nm; ac_word=$2
    16501654echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1651 echo "configure:1652: checking for $ac_word" >&5
     1655echo "configure:1656: checking for $ac_word" >&5
    16521656if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
    16531657  echo $ac_n "(cached) $ac_c" 1>&6
     
    16871691 
    16881692echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
    1689 echo "configure:1690: checking target's ranlib" >&5
     1693echo "configure:1694: checking target's ranlib" >&5
    16901694if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
    16911695  echo $ac_n "(cached) $ac_c" 1>&6
     
    17201724    # intends
    17211725    echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1722 echo "configure:1723: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
     1726echo "configure:1727: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
    17231727    case "$RANLIB_FOR_TARGET" in
    17241728    /*) # valid
     
    17371741set dummy "$program_prefix"ranlib; ac_word=$2
    17381742echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1739 echo "configure:1740: checking for $ac_word" >&5
     1743echo "configure:1744: checking for $ac_word" >&5
    17401744if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
    17411745  echo $ac_n "(cached) $ac_c" 1>&6
     
    17761780   
    17771781echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
    1778 echo "configure:1779: checking whether $AR_FOR_TARGET -s works" >&5
     1782echo "configure:1783: checking whether $AR_FOR_TARGET -s works" >&5
    17791783if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
    17801784  echo $ac_n "(cached) $ac_c" 1>&6
     
    17851789{ return b; }
    17861790EOF
    1787 if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
    1788   && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
     1791if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
     1792  && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
    17891793  && test -s conftest.a ; \
    17901794then
     
    18111815 
    18121816echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
    1813 echo "configure:1814: checking target's objcopy" >&5
     1817echo "configure:1818: checking target's objcopy" >&5
    18141818if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
    18151819  echo $ac_n "(cached) $ac_c" 1>&6
     
    18441848    # intends
    18451849    echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1846 echo "configure:1847: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
     1850echo "configure:1851: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
    18471851    case "$OBJCOPY_FOR_TARGET" in
    18481852    /*) # valid
     
    18611865set dummy "$program_prefix"objcopy; ac_word=$2
    18621866echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1863 echo "configure:1864: checking for $ac_word" >&5
     1867echo "configure:1868: checking for $ac_word" >&5
    18641868if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
    18651869  echo $ac_n "(cached) $ac_c" 1>&6
     
    18981902 
    18991903echo $ac_n "checking target's size""... $ac_c" 1>&6
    1900 echo "configure:1901: checking target's size" >&5
     1904echo "configure:1905: checking target's size" >&5
    19011905if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
    19021906  echo $ac_n "(cached) $ac_c" 1>&6
     
    19311935    # intends
    19321936    echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1933 echo "configure:1934: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
     1937echo "configure:1938: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
    19341938    case "$SIZE_FOR_TARGET" in
    19351939    /*) # valid
     
    19481952set dummy "$program_prefix"size; ac_word=$2
    19491953echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1950 echo "configure:1951: checking for $ac_word" >&5
     1954echo "configure:1955: checking for $ac_word" >&5
    19511955if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
    19521956  echo $ac_n "(cached) $ac_c" 1>&6
     
    19851989 
    19861990echo $ac_n "checking target's strip""... $ac_c" 1>&6
    1987 echo "configure:1988: checking target's strip" >&5
     1991echo "configure:1992: checking target's strip" >&5
    19881992if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
    19891993  echo $ac_n "(cached) $ac_c" 1>&6
     
    20182022    # intends
    20192023    echo $ac_n "checking whether environment variable STRIP_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    2020 echo "configure:2021: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
     2024echo "configure:2025: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
    20212025    case "$STRIP_FOR_TARGET" in
    20222026    /*) # valid
     
    20352039set dummy "$program_prefix"strip; ac_word=$2
    20362040echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2037 echo "configure:2038: checking for $ac_word" >&5
     2041echo "configure:2042: checking for $ac_word" >&5
    20382042if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
    20392043  echo $ac_n "(cached) $ac_c" 1>&6
     
    20732077
    20742078echo $ac_n "checking for newlib""... $ac_c" 1>&6
    2075 echo "configure:2076: checking for newlib" >&5
     2079echo "configure:2080: checking for newlib" >&5
    20762080if eval "test \"`echo '$''{'rtems_cv_use_newlib'+set}'`\" = set"; then
    20772081  echo $ac_n "(cached) $ac_c" 1>&6
     
    20822086
    20832087    cat > conftest.$ac_ext <<EOF
    2084 #line 2085 "configure"
     2088#line 2089 "configure"
    20852089#include "confdefs.h"
    20862090extern int not_required_by_rtems() ;
     
    20892093; return 0; }
    20902094EOF
    2091 if { (eval echo configure:2092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2095if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    20922096  rm -rf conftest*
    20932097  rtems_cv_use_newlib="yes"
     
    21002104    if test -z "$rtems_cv_use_newlib"; then
    21012105      cat > conftest.$ac_ext <<EOF
    2102 #line 2103 "configure"
     2106#line 2107 "configure"
    21032107#include "confdefs.h"
    21042108extern int rtems_provides_crt0 ;
     
    21072111; return 0; }
    21082112EOF
    2109 if { (eval echo configure:2110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2113if { (eval echo configure:2114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    21102114  rm -rf conftest*
    21112115  rtems_cv_use_newlib="yes"
     
    21272131
    21282132# Check if there is custom/*.cfg for this BSP
     2133
     2134
    21292135echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
    2130 echo "configure:2131: checking for make/custom/$RTEMS_BSP.cfg" >&5
     2136echo "configure:2137: checking for make/custom/$RTEMS_BSP.cfg" >&5
    21312137if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
    21322138  echo "$ac_t""yes" 1>&6
     
    21352141fi
    21362142
     2143
    21372144echo $ac_n "checking whether BSP supports multiprocessing""... $ac_c" 1>&6
    2138 echo "configure:2139: checking whether BSP supports multiprocessing" >&5
     2145echo "configure:2146: checking whether BSP supports multiprocessing" >&5
    21392146if eval "test \"`echo '$''{'rtems_cv_HAS_MP'+set}'`\" = set"; then
    21402147  echo $ac_n "(cached) $ac_c" 1>&6
     
    21592166
    21602167
     2168
    21612169echo $ac_n "checking whether BSP supports libposix""... $ac_c" 1>&6
    2162 echo "configure:2163: checking whether BSP supports libposix" >&5
     2170echo "configure:2171: checking whether BSP supports libposix" >&5
    21632171if eval "test \"`echo '$''{'rtems_cv_HAS_POSIX_API'+set}'`\" = set"; then
    21642172  echo $ac_n "(cached) $ac_c" 1>&6
  • c/src/exec/posix/aclocal.m4

    rd83c39dc r4075af6f  
    2020AC_DEFUN(RTEMS_TOP,
    2121[dnl
     22AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
     23AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
     24
    2225AC_ARG_WITH(target-subdir,
    2326[  --with-target-subdir=DIR],
     
    4447AC_MSG_RESULT($RTEMS_VERSION)
    4548])dnl
    46 
    47 dnl
    48 dnl $Id$
    49 dnl
    50 
    51 dnl canonicalize target cpu
    52 dnl NOTE: Most rtems targets do not fullfil autoconf's
    53 dnl target naming conventions "processor-vendor-os"
    54 dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
    55 dnl and we have to fix it for rtems ourselves
    56 
    57 AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
    58 [
    59 AC_CANONICAL_SYSTEM
    60 AC_MSG_CHECKING(rtems target cpu)
    61 changequote(,)dnl
    62 case "${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         ;;
    82 esac
    83 changequote([,])dnl
    84 AC_SUBST(RTEMS_CPU)
    85 AC_MSG_RESULT($RTEMS_CPU)
    86 ])
    8749
    8850# Do all the work for Automake.  This macro actually does too much --
     
    180142AC_SUBST($1)])
    181143
     144dnl
     145dnl $Id$
     146dnl
     147
     148dnl canonicalize target cpu
     149dnl NOTE: Most rtems targets do not fullfil autoconf's
     150dnl target naming conventions "processor-vendor-os"
     151dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
     152dnl and we have to fix it for rtems ourselves
     153
     154AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
     155[
     156AC_CANONICAL_SYSTEM
     157AC_MSG_CHECKING(rtems target cpu)
     158changequote(,)dnl
     159case "${target}" in
     160  # hpux unix port should go here
     161  i[3456]86-go32-rtems*)
     162        RTEMS_CPU=i386
     163        ;;
     164  i[3456]86-pc-linux*)          # unix "simulator" port
     165        RTEMS_CPU=unix
     166        ;;
     167  i[3456]86-*freebsd2*)         # unix "simulator" port
     168        RTEMS_CPU=unix
     169        ;;
     170  no_cpu-*rtems*)
     171        RTEMS_CPU=no_cpu
     172        ;;
     173  sparc-sun-solaris*)           # unix "simulator" port
     174        RTEMS_CPU=unix
     175        ;;
     176  *)
     177        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
     178        ;;
     179esac
     180changequote([,])dnl
     181AC_SUBST(RTEMS_CPU)
     182AC_MSG_RESULT($RTEMS_CPU)
     183])
     184
    182185# Add --enable-maintainer-mode option to configure.
    183186# From Jim Meyering
     
    231234AC_DEFUN(RTEMS_ENABLE_POSIX,
    232235[
     236AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     237
    233238AC_ARG_ENABLE(posix,
    234239[  --enable-posix                       enable posix interface],
     
    264269AC_SUBST(RTEMS_HAS_POSIX_API)
    265270])
     271
     272dnl $Id$
     273dnl
     274AC_DEFUN(RTEMS_CHECK_POSIX_API,
     275[dnl
     276AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     277AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
     278
     279AC_CACHE_CHECK([whether BSP supports libposix],
     280  rtems_cv_HAS_POSIX_API,
     281  [dnl
     282    case "$RTEMS_CPU" in
     283    unix*)
     284      rtems_cv_HAS_POSIX_API="no"
     285      ;;
     286    *)
     287      if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
     288        rtems_cv_HAS_POSIX_API="yes";
     289      else
     290        rtems_cv_HAS_POSIX_API="disabled";
     291      fi
     292      ;;
     293    esac])
     294if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
     295  HAS_POSIX_API="yes";
     296else
     297  HAS_POSIX_API="no";
     298fi
     299AC_SUBST(HAS_POSIX_API)dnl
     300])
     301
     302dnl $Id$
     303
     304dnl check if RTEMS support a cpu
     305AC_DEFUN(RTEMS_CHECK_CPU,
     306[dnl
     307AC_REQUIRE([RTEMS_TOP])
     308AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
     309AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     310
     311# Is this a supported CPU?
     312AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
     313if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
     314  AC_MSG_RESULT(yes)
     315else
     316  AC_MSG_ERROR(no)
     317fi
     318])dnl
     319
    266320
    267321dnl $Id$
     
    286340AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
    287341[
     342AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
    288343AC_ARG_ENABLE(rtemsbsp,
    289344[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
     
    298353AC_DEFUN(RTEMS_ENV_RTEMSBSP,
    299354[dnl
     355AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
     356AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
     357AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
     358AC_BEFORE([$0], [RTEMS_CHECK_MULTIPROCESSING])dnl
     359AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     360
    300361AC_MSG_CHECKING([for RTEMS_BSP])
    301362AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
     
    311372])
    312373
    313 dnl $Id$
    314 
    315 dnl check if RTEMS support a cpu
    316 AC_DEFUN(RTEMS_CHECK_CPU,
    317 [dnl
    318 AC_REQUIRE([RTEMS_TOP])
    319 AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
    320 # Is this a supported CPU?
    321 AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
    322 if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    323   AC_MSG_RESULT(yes)
    324 else
    325   AC_MSG_ERROR(no)
    326 fi
    327 ])dnl
    328 
    329 
    330 dnl $Id$
    331 
    332 AC_DEFUN(RTEMS_CANONICAL_HOST,
    333 [dnl
    334 AC_REQUIRE([AC_CANONICAL_HOST])
    335 RTEMS_HOST=$host_os
    336 changequote(,)dnl
    337 case "${target}" in
    338   # hpux unix port should go here
    339   i[3456]86-pc-linux*)         # unix "simulator" port
    340         RTEMS_HOST=Linux
    341         ;;
    342   i[3456]86-*freebsd2*) # unix "simulator" port
    343         RTEMS_HOST=FreeBSD
    344         ;;
    345   sparc-sun-solaris*)             # unix "simulator" port
    346         RTEMS_HOST=Solaris
    347         ;;
    348   *)
    349         ;;
    350 esac
    351 changequote([,])dnl
    352 AC_SUBST(RTEMS_HOST)
    353 ])dnl
    354 
    355374dnl
    356375dnl $Id$
     
    375394PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
    376395AC_SUBST(PACKHEX)
    377 ])
    378 
    379 
    380 dnl $Id$
    381 
    382 AC_DEFUN(RTEMS_PATH_KSH,
    383 [
    384 dnl NOTE: prefer bash over ksh over sh
    385 AC_PATH_PROGS(KSH,bash ksh sh)
    386 if test -z "$KSH"; then
    387 dnl NOTE: This cannot happen -- /bin/sh must always exist
    388 AC_MSG_ERROR(
    389 [***]
    390 [    Cannot determine a usable shell bash/ksh/sh]
    391 [    Please contact your system administrator] );
    392 fi
    393 ])
    394 
    395 dnl
    396 dnl $Id$
    397 dnl
    398 dnl Check for target gcc
    399 dnl
    400 dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    401 dnl                             Completely reworked
    402 
    403 AC_DEFUN(RTEMS_PROG_CC,
    404 [
    405 AC_BEFORE([$0], [AC_PROG_CPP])dnl
    406 AC_BEFORE([$0], [AC_PROG_CC])dnl
    407 AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
    408 
    409 dnl Only accept gcc and cc
    410 dnl NOTE: This might be too restrictive for native compilation
    411 AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
    412 test -z "$CC_FOR_TARGET" \
    413   && AC_MSG_ERROR([no acceptable cc found in \$PATH])
    414 
    415 dnl backup
    416 rtems_save_CC=$CC
    417 rtems_save_CFLAGS=$CFLAGS
    418 
    419 dnl temporarily set CC
    420 CC=$CC_FOR_TARGET
    421 
    422 AC_PROG_CC_WORKS
    423 AC_PROG_CC_GNU
    424 
    425 if test $ac_cv_prog_gcc = yes; then
    426   GCC=yes
    427 dnl Check whether -g works, even if CFLAGS is set, in case the package
    428 dnl plays around with CFLAGS (such as to build both debugging and
    429 dnl normal versions of a library), tasteless as that idea is.
    430   ac_test_CFLAGS="${CFLAGS+set}"
    431   ac_save_CFLAGS="$CFLAGS"
    432   CFLAGS=
    433   AC_PROG_CC_G
    434   if test "$ac_test_CFLAGS" = set; then
    435     CFLAGS="$ac_save_CFLAGS"
    436   elif test $ac_cv_prog_cc_g = yes; then
    437     CFLAGS="-g -O2"
    438   else
    439     CFLAGS="-O2"
    440   fi
    441 else
    442   GCC=
    443   test "${CFLAGS+set}" = set || CFLAGS="-g"
    444 fi
    445 
    446 rtems_cv_prog_gcc=$ac_cv_prog_gcc
    447 rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
    448 rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
    449 rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
    450 
    451 dnl restore initial values
    452 CC=$rtems_save_CC
    453 CFLAGS=$rtems_save_CFLAGS
    454 
    455 unset ac_cv_prog_gcc
    456 unset ac_cv_prog_cc_g
    457 unset ac_cv_prog_cc_works
    458 unset ac_cv_prog_cc_cross
    459 ])
    460 
    461 AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
    462 [
    463 dnl check target cc
    464 RTEMS_PROG_CC
    465 dnl check if the compiler supports --specs
    466 RTEMS_GCC_SPECS
    467 dnl check if the target compiler may use --pipe
    468 RTEMS_GCC_PIPE
    469 dnl check if the compiler supports --specs if gcc28 is requested
    470 if test "$RTEMS_USE_GCC272" != "yes" ; then
    471   if test "$rtems_cv_gcc_specs" = "no"; then
    472     AC_MSG_WARN([*** disabling --enable-gcc28])
    473       RTEMS_USE_GCC272=yes
    474   fi
    475 fi
    476 test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
    477 
    478 dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
    479 case $host_os in
    480 *cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
    481 *) ;;
    482 esac
    483 AC_SUBST(GCCSED)
    484 ])
    485 
    486 dnl
    487 dnl  $Id$
    488 dnl
    489 dnl Set program_prefix
    490 dnl
    491 dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    492 dnl                             Extracted from configure
    493 
    494 AC_DEFUN(RTEMS_TOOL_PREFIX,
    495 [AC_REQUIRE([AC_CANONICAL_TARGET])dnl
    496 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
    497 
    498 changequote(,)dnl
    499 if [ "${program_prefix}" = "NONE" ] ; then
    500   if [ "${target}" = "${host}" ] ; then
    501     program_prefix=
    502   else
    503     program_prefix=${target}-
    504   fi
    505 fi
    506 changequote([,])dnl
    507 ])
    508 
    509 dnl
    510 dnl $Id$
    511 dnl
    512 dnl Check whether the target compiler accepts -specs
    513 dnl
    514 dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
    515 dnl
    516 
    517 AC_DEFUN(RTEMS_GCC_SPECS,
    518 [AC_REQUIRE([RTEMS_PROG_CC])
    519 AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
    520 [
    521 rtems_cv_gcc_specs=no
    522 if test "$rtems_cv_prog_gcc" = "yes"; then
    523   touch confspec
    524   echo 'void f(){}' >conftest.c
    525   if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
    526     rtems_cv_gcc_specs=yes
    527   fi
    528 fi
    529 rm -f confspec conftest*
    530 ])])
    531 
    532 dnl
    533 dnl $Id$
    534 dnl
    535 dnl Check whether the target compiler accepts -pipe
    536 dnl
    537 dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
    538 dnl
    539 
    540 AC_DEFUN(RTEMS_GCC_PIPE,
    541 [AC_REQUIRE([RTEMS_PROG_CC])
    542 AC_REQUIRE([AC_CANONICAL_HOST])
    543 AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
    544 [
    545 rtems_cv_gcc_pipe=no
    546 if test "$rtems_cv_prog_gcc" = "yes"; then
    547 case "$host_os" in
    548   cygwin*)
    549     ;;
    550   *)
    551     echo 'void f(){}' >conftest.c
    552     if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
    553       rtems_cv_gcc_pipe=yes
    554     fi
    555     rm -f conftest*
    556     ;;
    557 esac
    558 fi
    559 ])
    560 ])
    561 
    562 dnl
    563 dnl $Id$
    564 dnl
    565 dnl Set target tools
    566 dnl
    567 dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    568 dnl             fixing cache/environment variable handling
    569 dnl             adding checks for cygwin/egcs '\\'-bug
    570 dnl             adding checks for ranlib/ar -s problem
    571 dnl
    572 dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    573 dnl
    574 
    575 AC_DEFUN(RTEMS_GCC_PRINT,
    576 [ case $host_os in
    577   *cygwin*)
    578     dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
    579     dnl        Should be removed once cygwin/egcs reports '/' only
    580     $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
    581     ;;
    582   *)
    583     $1=`$CC_FOR_TARGET --print-prog-name=$2`
    584     ;;
    585   esac
    586 ])
    587 
    588 AC_DEFUN(RTEMS_PATH_TOOL,
    589 [
    590 AC_MSG_CHECKING([target's $2])
    591 AC_CACHE_VAL(ac_cv_path_$1,:)
    592 AC_MSG_RESULT([$ac_cv_path_$1])
    593 
    594 if test -n "$ac_cv_path_$1"; then
    595   dnl retrieve the value from the cache
    596   $1=$ac_cv_path_$1
    597 else
    598   dnl the cache was not set
    599   if test -z "[$]$1" ; then
    600     if test "$rtems_cv_prog_gcc" = "yes"; then
    601       # We are using gcc, ask it about its tool
    602       # NOTE: Necessary if gcc was configured to use the target's
    603       # native tools or uses prefixes for gnutools (e.g. gas instead of as)
    604       RTEMS_GCC_PRINT($1,$2)
    605     fi
    606   else
    607     # The user set an environment variable.
    608     # Check whether it is an absolute path, otherwise AC_PATH_PROG
    609     # will override the environment variable, which isn't what the user
    610     # intends
    611     AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
    612     case "[$]$1" in
    613     /*) # valid
    614       AC_MSG_RESULT("yes")
    615     ;;
    616     *)  # invalid for AC_PATH_PROG
    617       AC_MSG_RESULT("no")
    618       AC_MSG_ERROR([***]
    619         [Environment variable $1 should either]
    620         [be unset (preferred) or contain an absolute path])
    621     ;;
    622     esac
    623   fi
    624 
    625   AC_PATH_PROG($1,"$program_prefix"$2,$3)
    626 fi
    627 ])
    628 
    629 AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
    630 [AC_REQUIRE([RTEMS_PROG_CC])dnl
    631 
    632 dnl FIXME: What shall be done if these tools are not available?
    633   RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
    634   RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
    635   RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
    636   RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
    637 
    638 dnl special treatment of ranlib
    639   RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
    640   if test "$RANLIB_FOR_TARGET" = "no"; then
    641     # ranlib wasn't found; check if ar -s is available
    642     RTEMS_AR_FOR_TARGET_S
    643     if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
    644       dnl override RANLIB_FOR_TARGET's cache
    645       ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
    646       RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
    647     else
    648       AC_MSG_ERROR([***]
    649         [Can't figure out how to build a library index]
    650         [Neither ranlib nor ar -s seem to be available] )
    651     fi
    652   fi
    653 
    654 dnl NOTE: These may not be available if not using gnutools
    655   RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
    656   RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
    657   RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
    658 ])
    659 
    660 dnl
    661 dnl $Id$
    662 dnl
    663 
    664 AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
    665 [
    666 AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
    667 rtems_cv_AR_FOR_TARGET_S,
    668 [
    669 cat > conftest.$ac_ext <<EOF
    670 int foo( int b )
    671 { return b; }
    672 EOF
    673 if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
    674   && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
    675   && test -s conftest.a ; \
    676 then
    677   rtems_cv_AR_FOR_TARGET_S="yes"
    678 else
    679   rtems_cv_AR_FOR_TARGET_S="no"
    680 fi
    681   rm -f conftest*
    682 ])
    683396])
    684397
     
    725438AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
    726439[dnl
     440AC_REQUIRE([RTEMS_TOP])
     441
    727442AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
    728443if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
     
    741456AC_REQUIRE([RTEMS_TOP])dnl
    742457AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     458AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl
     459
    743460AC_CACHE_CHECK([whether BSP supports multiprocessing],
    744461  rtems_cv_HAS_MP,
     
    762479
    763480dnl $Id$
    764 dnl
    765 AC_DEFUN(RTEMS_CHECK_POSIX_API,
    766 [dnl
    767 AC_REQUIRE([RTEMS_CHECK_CPU])dnl
    768 AC_CACHE_CHECK([whether BSP supports libposix],
    769   rtems_cv_HAS_POSIX_API,
    770   [dnl
    771     case "$RTEMS_CPU" in
    772     unix*)
    773       rtems_cv_HAS_POSIX_API="no"
    774       ;;
    775     *)
    776       if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
    777         rtems_cv_HAS_POSIX_API="yes";
    778       else
    779         rtems_cv_HAS_POSIX_API="disabled";
    780       fi
    781       ;;
    782     esac])
    783 if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
    784   HAS_POSIX_API="yes";
    785 else
    786   HAS_POSIX_API="no";
    787 fi
    788 AC_SUBST(HAS_POSIX_API)dnl
     481
     482AC_DEFUN(RTEMS_CANONICAL_HOST,
     483[dnl
     484AC_REQUIRE([AC_CANONICAL_HOST])
     485RTEMS_HOST=$host_os
     486changequote(,)dnl
     487case "${target}" in
     488  # hpux unix port should go here
     489  i[3456]86-pc-linux*)         # unix "simulator" port
     490        RTEMS_HOST=Linux
     491        ;;
     492  i[3456]86-*freebsd2*) # unix "simulator" port
     493        RTEMS_HOST=FreeBSD
     494        ;;
     495  sparc-sun-solaris*)             # unix "simulator" port
     496        RTEMS_HOST=Solaris
     497        ;;
     498  *)
     499        ;;
     500esac
     501changequote([,])dnl
     502AC_SUBST(RTEMS_HOST)
     503])dnl
     504
     505dnl $Id$
     506
     507AC_DEFUN(RTEMS_PATH_KSH,
     508[
     509dnl NOTE: prefer bash over ksh over sh
     510AC_PATH_PROGS(KSH,bash ksh sh)
     511if test -z "$KSH"; then
     512dnl NOTE: This cannot happen -- /bin/sh must always exist
     513AC_MSG_ERROR(
     514[***]
     515[    Cannot determine a usable shell bash/ksh/sh]
     516[    Please contact your system administrator] );
     517fi
     518])
     519
     520dnl
     521dnl $Id$
     522dnl
     523dnl Check for target gcc
     524dnl
     525dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     526dnl                             Completely reworked
     527
     528AC_DEFUN(RTEMS_PROG_CC,
     529[
     530AC_BEFORE([$0], [AC_PROG_CPP])dnl
     531AC_BEFORE([$0], [AC_PROG_CC])dnl
     532AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
     533AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
     534
     535dnl Only accept gcc and cc
     536dnl NOTE: This might be too restrictive for native compilation
     537AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
     538test -z "$CC_FOR_TARGET" \
     539  && AC_MSG_ERROR([no acceptable cc found in \$PATH])
     540
     541dnl backup
     542rtems_save_CC=$CC
     543rtems_save_CFLAGS=$CFLAGS
     544
     545dnl temporarily set CC
     546CC=$CC_FOR_TARGET
     547
     548AC_PROG_CC_WORKS
     549AC_PROG_CC_GNU
     550
     551if test $ac_cv_prog_gcc = yes; then
     552  GCC=yes
     553dnl Check whether -g works, even if CFLAGS is set, in case the package
     554dnl plays around with CFLAGS (such as to build both debugging and
     555dnl normal versions of a library), tasteless as that idea is.
     556  ac_test_CFLAGS="${CFLAGS+set}"
     557  ac_save_CFLAGS="$CFLAGS"
     558  CFLAGS=
     559  AC_PROG_CC_G
     560  if test "$ac_test_CFLAGS" = set; then
     561    CFLAGS="$ac_save_CFLAGS"
     562  elif test $ac_cv_prog_cc_g = yes; then
     563    CFLAGS="-g -O2"
     564  else
     565    CFLAGS="-O2"
     566  fi
     567else
     568  GCC=
     569  test "${CFLAGS+set}" = set || CFLAGS="-g"
     570fi
     571
     572rtems_cv_prog_gcc=$ac_cv_prog_gcc
     573rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
     574rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
     575rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
     576
     577dnl restore initial values
     578CC=$rtems_save_CC
     579CFLAGS=$rtems_save_CFLAGS
     580
     581unset ac_cv_prog_gcc
     582unset ac_cv_prog_cc_g
     583unset ac_cv_prog_cc_works
     584unset ac_cv_prog_cc_cross
     585])
     586
     587AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
     588[
     589dnl check target cc
     590RTEMS_PROG_CC
     591dnl check if the compiler supports --specs
     592RTEMS_GCC_SPECS
     593dnl check if the target compiler may use --pipe
     594RTEMS_GCC_PIPE
     595dnl check if the compiler supports --specs if gcc28 is requested
     596if test "$RTEMS_USE_GCC272" != "yes" ; then
     597  if test "$rtems_cv_gcc_specs" = "no"; then
     598    AC_MSG_WARN([*** disabling --enable-gcc28])
     599      RTEMS_USE_GCC272=yes
     600  fi
     601fi
     602test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
     603
     604dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
     605case $host_os in
     606*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
     607*) ;;
     608esac
     609AC_SUBST(GCCSED)
     610])
     611
     612dnl
     613dnl $Id$
     614dnl
     615dnl Set target tools
     616dnl
     617dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     618dnl             fixing cache/environment variable handling
     619dnl             adding checks for cygwin/egcs '\\'-bug
     620dnl             adding checks for ranlib/ar -s problem
     621dnl
     622dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     623dnl
     624
     625AC_DEFUN(RTEMS_GCC_PRINT,
     626[ case $host_os in
     627  *cygwin*)
     628    dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
     629    dnl        Should be removed once cygwin/egcs reports '/' only
     630    $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
     631    ;;
     632  *)
     633    $1=`$CC_FOR_TARGET --print-prog-name=$2`
     634    ;;
     635  esac
     636])
     637
     638AC_DEFUN(RTEMS_PATH_TOOL,
     639[
     640AC_MSG_CHECKING([target's $2])
     641AC_CACHE_VAL(ac_cv_path_$1,:)
     642AC_MSG_RESULT([$ac_cv_path_$1])
     643
     644if test -n "$ac_cv_path_$1"; then
     645  dnl retrieve the value from the cache
     646  $1=$ac_cv_path_$1
     647else
     648  dnl the cache was not set
     649  if test -z "[$]$1" ; then
     650    if test "$rtems_cv_prog_gcc" = "yes"; then
     651      # We are using gcc, ask it about its tool
     652      # NOTE: Necessary if gcc was configured to use the target's
     653      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     654      RTEMS_GCC_PRINT($1,$2)
     655    fi
     656  else
     657    # The user set an environment variable.
     658    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     659    # will override the environment variable, which isn't what the user
     660    # intends
     661    AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
     662    case "[$]$1" in
     663    /*) # valid
     664      AC_MSG_RESULT("yes")
     665    ;;
     666    *)  # invalid for AC_PATH_PROG
     667      AC_MSG_RESULT("no")
     668      AC_MSG_ERROR([***]
     669        [Environment variable $1 should either]
     670        [be unset (preferred) or contain an absolute path])
     671    ;;
     672    esac
     673  fi
     674
     675  AC_PATH_PROG($1,"$program_prefix"$2,$3)
     676fi
     677])
     678
     679AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
     680[AC_REQUIRE([RTEMS_PROG_CC])dnl
     681
     682dnl FIXME: What shall be done if these tools are not available?
     683  RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
     684  RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
     685  RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
     686  RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
     687
     688dnl special treatment of ranlib
     689  RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
     690  if test "$RANLIB_FOR_TARGET" = "no"; then
     691    # ranlib wasn't found; check if ar -s is available
     692    RTEMS_AR_FOR_TARGET_S
     693    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
     694      dnl override RANLIB_FOR_TARGET's cache
     695      ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
     696      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
     697    else
     698      AC_MSG_ERROR([***]
     699        [Can't figure out how to build a library index]
     700        [Neither ranlib nor ar -s seem to be available] )
     701    fi
     702  fi
     703
     704dnl NOTE: These may not be available if not using gnutools
     705  RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
     706  RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
     707  RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
     708])
     709
     710dnl
     711dnl $Id$
     712dnl
     713
     714AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
     715[
     716AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
     717rtems_cv_AR_FOR_TARGET_S,
     718[
     719cat > conftest.$ac_ext <<EOF
     720int foo( int b )
     721{ return b; }
     722EOF
     723if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
     724  && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
     725  && test -s conftest.a ; \
     726then
     727  rtems_cv_AR_FOR_TARGET_S="yes"
     728else
     729  rtems_cv_AR_FOR_TARGET_S="no"
     730fi
     731  rm -f conftest*
     732])
     733])
     734
     735
     736dnl
     737dnl  $Id$
     738dnl
     739dnl Set program_prefix
     740dnl
     741dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     742dnl                             Extracted from configure
     743
     744AC_DEFUN(RTEMS_TOOL_PREFIX,
     745[AC_REQUIRE([AC_CANONICAL_TARGET])dnl
     746AC_REQUIRE([AC_CANONICAL_BUILD])dnl
     747
     748changequote(,)dnl
     749if [ "${program_prefix}" = "NONE" ] ; then
     750  if [ "${target}" = "${host}" ] ; then
     751    program_prefix=
     752  else
     753    program_prefix=${target}-
     754  fi
     755fi
     756changequote([,])dnl
     757])
     758
     759dnl
     760dnl $Id$
     761dnl
     762dnl Check whether the target compiler accepts -specs
     763dnl
     764
     765AC_DEFUN(RTEMS_GCC_SPECS,
     766[AC_REQUIRE([RTEMS_PROG_CC])
     767AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
     768[
     769rtems_cv_gcc_specs=no
     770if test "$rtems_cv_prog_gcc" = "yes"; then
     771  touch confspec
     772  echo 'void f(){}' >conftest.c
     773  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
     774    rtems_cv_gcc_specs=yes
     775  fi
     776fi
     777rm -f confspec conftest*
     778])])
     779
     780dnl
     781dnl $Id$
     782dnl
     783dnl Check whether the target compiler accepts -pipe
     784dnl
     785dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
     786dnl
     787
     788AC_DEFUN(RTEMS_GCC_PIPE,
     789[AC_REQUIRE([RTEMS_PROG_CC])
     790AC_REQUIRE([AC_CANONICAL_HOST])
     791AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
     792[
     793rtems_cv_gcc_pipe=no
     794if test "$rtems_cv_prog_gcc" = "yes"; then
     795case "$host_os" in
     796  cygwin*)
     797    ;;
     798  *)
     799    echo 'void f(){}' >conftest.c
     800    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
     801      rtems_cv_gcc_pipe=yes
     802    fi
     803    rm -f conftest*
     804    ;;
     805esac
     806fi
     807])
    789808])
    790809
  • c/src/exec/posix/configure

    rd83c39dc r4075af6f  
    534534
    535535
     536
    536537# Check whether --with-target-subdir or --without-target-subdir was given.
    537538if test "${with_target_subdir+set}" = set; then
     
    547548
    548549echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6
    549 echo "configure:550: checking for RTEMS Version" >&5
     550echo "configure:551: checking for RTEMS Version" >&5
    550551if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
    551552RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
     
    608609
    609610echo $ac_n "checking host system type""... $ac_c" 1>&6
    610 echo "configure:611: checking host system type" >&5
     611echo "configure:612: checking host system type" >&5
    611612
    612613host_alias=$host
     
    629630
    630631echo $ac_n "checking target system type""... $ac_c" 1>&6
    631 echo "configure:632: checking target system type" >&5
     632echo "configure:633: checking target system type" >&5
    632633
    633634target_alias=$target
     
    647648
    648649echo $ac_n "checking build system type""... $ac_c" 1>&6
    649 echo "configure:650: checking build system type" >&5
     650echo "configure:651: checking build system type" >&5
    650651
    651652build_alias=$build
     
    670671
    671672echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
    672 echo "configure:673: checking rtems target cpu" >&5
     673echo "configure:674: checking rtems target cpu" >&5
    673674case "${target}" in
    674675  # hpux unix port should go here
     
    708709# ./install, which can be erroneously created by make from ./install.sh.
    709710echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    710 echo "configure:711: checking for a BSD compatible install" >&5
     711echo "configure:712: checking for a BSD compatible install" >&5
    711712if test -z "$INSTALL"; then
    712713if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    761762
    762763echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
    763 echo "configure:764: checking whether build environment is sane" >&5
     764echo "configure:765: checking whether build environment is sane" >&5
    764765# Just in case
    765766sleep 1
     
    818819
    819820echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    820 echo "configure:821: checking whether ${MAKE-make} sets \${MAKE}" >&5
     821echo "configure:822: checking whether ${MAKE-make} sets \${MAKE}" >&5
    821822set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    822823if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    858859missing_dir=`cd $ac_aux_dir && pwd`
    859860echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
    860 echo "configure:861: checking for working aclocal" >&5
     861echo "configure:862: checking for working aclocal" >&5
    861862# Run test in a subshell; some versions of sh will print an error if
    862863# an executable is not found, even if stderr is redirected.
     
    871872
    872873echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
    873 echo "configure:874: checking for working autoconf" >&5
     874echo "configure:875: checking for working autoconf" >&5
    874875# Run test in a subshell; some versions of sh will print an error if
    875876# an executable is not found, even if stderr is redirected.
     
    884885
    885886echo $ac_n "checking for working automake""... $ac_c" 1>&6
    886 echo "configure:887: checking for working automake" >&5
     887echo "configure:888: checking for working automake" >&5
    887888# Run test in a subshell; some versions of sh will print an error if
    888889# an executable is not found, even if stderr is redirected.
     
    897898
    898899echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
    899 echo "configure:900: checking for working autoheader" >&5
     900echo "configure:901: checking for working autoheader" >&5
    900901# Run test in a subshell; some versions of sh will print an error if
    901902# an executable is not found, even if stderr is redirected.
     
    910911
    911912echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
    912 echo "configure:913: checking for working makeinfo" >&5
     913echo "configure:914: checking for working makeinfo" >&5
    913914# Run test in a subshell; some versions of sh will print an error if
    914915# an executable is not found, even if stderr is redirected.
     
    924925
    925926echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
    926 echo "configure:927: checking whether to enable maintainer-specific portions of Makefiles" >&5
     927echo "configure:928: checking whether to enable maintainer-specific portions of Makefiles" >&5
    927928    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
    928929if test "${enable_maintainer_mode+set}" = set; then
     
    959960  RTEMS_HAS_MULTIPROCESSING=no
    960961fi
     962
    961963
    962964
     
    10121014
    10131015
     1016
    10141017echo $ac_n "checking for RTEMS_BSP""... $ac_c" 1>&6
    1015 echo "configure:1016: checking for RTEMS_BSP" >&5
     1018echo "configure:1019: checking for RTEMS_BSP" >&5
    10161019if eval "test \"`echo '$''{'rtems_cv_RTEMS_BSP'+set}'`\" = set"; then
    10171020  echo $ac_n "(cached) $ac_c" 1>&6
     
    10301033
    10311034
     1035
    10321036# Is this a supported CPU?
    10331037echo $ac_n "checking if cpu $RTEMS_CPU is supported""... $ac_c" 1>&6
    1034 echo "configure:1035: checking if cpu $RTEMS_CPU is supported" >&5
     1038echo "configure:1039: checking if cpu $RTEMS_CPU is supported" >&5
    10351039if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    10361040  echo "$ac_t""yes" 1>&6
     
    10831087set dummy $ac_prog; ac_word=$2
    10841088echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1085 echo "configure:1086: checking for $ac_word" >&5
     1089echo "configure:1090: checking for $ac_word" >&5
    10861090if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
    10871091  echo $ac_n "(cached) $ac_c" 1>&6
     
    11421146set dummy $ac_prog; ac_word=$2
    11431147echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1144 echo "configure:1145: checking for $ac_word" >&5
     1148echo "configure:1149: checking for $ac_word" >&5
    11451149if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
    11461150  echo $ac_n "(cached) $ac_c" 1>&6
     
    11861190
    11871191echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    1188 echo "configure:1189: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     1192echo "configure:1193: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    11891193
    11901194ac_ext=c
     
    11971201cat > conftest.$ac_ext << EOF
    11981202
    1199 #line 1200 "configure"
     1203#line 1204 "configure"
    12001204#include "confdefs.h"
    12011205
    12021206main(){return(0);}
    12031207EOF
    1204 if { (eval echo configure:1205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1208if { (eval echo configure:1209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    12051209  ac_cv_prog_cc_works=yes
    12061210  # If we can't run a trivial program, we are probably using a cross compiler.
     
    12281232fi
    12291233echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    1230 echo "configure:1231: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     1234echo "configure:1235: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    12311235echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    12321236cross_compiling=$ac_cv_prog_cc_cross
    12331237
    12341238echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    1235 echo "configure:1236: checking whether we are using GNU C" >&5
     1239echo "configure:1240: checking whether we are using GNU C" >&5
    12361240if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    12371241  echo $ac_n "(cached) $ac_c" 1>&6
     
    12421246#endif
    12431247EOF
    1244 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     1248if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    12451249  ac_cv_prog_gcc=yes
    12461250else
     
    12571261  CFLAGS=
    12581262  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    1259 echo "configure:1260: checking whether ${CC-cc} accepts -g" >&5
     1263echo "configure:1264: checking whether ${CC-cc} accepts -g" >&5
    12601264if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    12611265  echo $ac_n "(cached) $ac_c" 1>&6
     
    12991303
    13001304echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
    1301 echo "configure:1302: checking whether $CC_FOR_TARGET accepts -specs" >&5
     1305echo "configure:1306: checking whether $CC_FOR_TARGET accepts -specs" >&5
    13021306if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
    13031307  echo $ac_n "(cached) $ac_c" 1>&6
     
    13201324
    13211325echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
    1322 echo "configure:1323: checking whether $CC_FOR_TARGET accepts --pipe" >&5
     1326echo "configure:1327: checking whether $CC_FOR_TARGET accepts --pipe" >&5
    13231327if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
    13241328  echo $ac_n "(cached) $ac_c" 1>&6
     
    13611365 
    13621366echo $ac_n "checking target's ar""... $ac_c" 1>&6
    1363 echo "configure:1364: checking target's ar" >&5
     1367echo "configure:1368: checking target's ar" >&5
    13641368if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
    13651369  echo $ac_n "(cached) $ac_c" 1>&6
     
    13941398    # intends
    13951399    echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1396 echo "configure:1397: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
     1400echo "configure:1401: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
    13971401    case "$AR_FOR_TARGET" in
    13981402    /*) # valid
     
    14111415set dummy "$program_prefix"ar; ac_word=$2
    14121416echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1413 echo "configure:1414: checking for $ac_word" >&5
     1417echo "configure:1418: checking for $ac_word" >&5
    14141418if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
    14151419  echo $ac_n "(cached) $ac_c" 1>&6
     
    14481452 
    14491453echo $ac_n "checking target's as""... $ac_c" 1>&6
    1450 echo "configure:1451: checking target's as" >&5
     1454echo "configure:1455: checking target's as" >&5
    14511455if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
    14521456  echo $ac_n "(cached) $ac_c" 1>&6
     
    14811485    # intends
    14821486    echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1483 echo "configure:1484: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
     1487echo "configure:1488: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
    14841488    case "$AS_FOR_TARGET" in
    14851489    /*) # valid
     
    14981502set dummy "$program_prefix"as; ac_word=$2
    14991503echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1500 echo "configure:1501: checking for $ac_word" >&5
     1504echo "configure:1505: checking for $ac_word" >&5
    15011505if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
    15021506  echo $ac_n "(cached) $ac_c" 1>&6
     
    15351539 
    15361540echo $ac_n "checking target's ld""... $ac_c" 1>&6
    1537 echo "configure:1538: checking target's ld" >&5
     1541echo "configure:1542: checking target's ld" >&5
    15381542if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
    15391543  echo $ac_n "(cached) $ac_c" 1>&6
     
    15681572    # intends
    15691573    echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1570 echo "configure:1571: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
     1574echo "configure:1575: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
    15711575    case "$LD_FOR_TARGET" in
    15721576    /*) # valid
     
    15851589set dummy "$program_prefix"ld; ac_word=$2
    15861590echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1587 echo "configure:1588: checking for $ac_word" >&5
     1591echo "configure:1592: checking for $ac_word" >&5
    15881592if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
    15891593  echo $ac_n "(cached) $ac_c" 1>&6
     
    16221626 
    16231627echo $ac_n "checking target's nm""... $ac_c" 1>&6
    1624 echo "configure:1625: checking target's nm" >&5
     1628echo "configure:1629: checking target's nm" >&5
    16251629if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
    16261630  echo $ac_n "(cached) $ac_c" 1>&6
     
    16551659    # intends
    16561660    echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1657 echo "configure:1658: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
     1661echo "configure:1662: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
    16581662    case "$NM_FOR_TARGET" in
    16591663    /*) # valid
     
    16721676set dummy "$program_prefix"nm; ac_word=$2
    16731677echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1674 echo "configure:1675: checking for $ac_word" >&5
     1678echo "configure:1679: checking for $ac_word" >&5
    16751679if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
    16761680  echo $ac_n "(cached) $ac_c" 1>&6
     
    17101714 
    17111715echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
    1712 echo "configure:1713: checking target's ranlib" >&5
     1716echo "configure:1717: checking target's ranlib" >&5
    17131717if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
    17141718  echo $ac_n "(cached) $ac_c" 1>&6
     
    17431747    # intends
    17441748    echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1745 echo "configure:1746: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
     1749echo "configure:1750: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
    17461750    case "$RANLIB_FOR_TARGET" in
    17471751    /*) # valid
     
    17601764set dummy "$program_prefix"ranlib; ac_word=$2
    17611765echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1762 echo "configure:1763: checking for $ac_word" >&5
     1766echo "configure:1767: checking for $ac_word" >&5
    17631767if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
    17641768  echo $ac_n "(cached) $ac_c" 1>&6
     
    17991803   
    18001804echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
    1801 echo "configure:1802: checking whether $AR_FOR_TARGET -s works" >&5
     1805echo "configure:1806: checking whether $AR_FOR_TARGET -s works" >&5
    18021806if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
    18031807  echo $ac_n "(cached) $ac_c" 1>&6
     
    18081812{ return b; }
    18091813EOF
    1810 if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
    1811   && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
     1814if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
     1815  && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
    18121816  && test -s conftest.a ; \
    18131817then
     
    18341838 
    18351839echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
    1836 echo "configure:1837: checking target's objcopy" >&5
     1840echo "configure:1841: checking target's objcopy" >&5
    18371841if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
    18381842  echo $ac_n "(cached) $ac_c" 1>&6
     
    18671871    # intends
    18681872    echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1869 echo "configure:1870: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
     1873echo "configure:1874: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
    18701874    case "$OBJCOPY_FOR_TARGET" in
    18711875    /*) # valid
     
    18841888set dummy "$program_prefix"objcopy; ac_word=$2
    18851889echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1886 echo "configure:1887: checking for $ac_word" >&5
     1890echo "configure:1891: checking for $ac_word" >&5
    18871891if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
    18881892  echo $ac_n "(cached) $ac_c" 1>&6
     
    19211925 
    19221926echo $ac_n "checking target's size""... $ac_c" 1>&6
    1923 echo "configure:1924: checking target's size" >&5
     1927echo "configure:1928: checking target's size" >&5
    19241928if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
    19251929  echo $ac_n "(cached) $ac_c" 1>&6
     
    19541958    # intends
    19551959    echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1956 echo "configure:1957: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
     1960echo "configure:1961: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
    19571961    case "$SIZE_FOR_TARGET" in
    19581962    /*) # valid
     
    19711975set dummy "$program_prefix"size; ac_word=$2
    19721976echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1973 echo "configure:1974: checking for $ac_word" >&5
     1977echo "configure:1978: checking for $ac_word" >&5
    19741978if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
    19751979  echo $ac_n "(cached) $ac_c" 1>&6
     
    20082012 
    20092013echo $ac_n "checking target's strip""... $ac_c" 1>&6
    2010 echo "configure:2011: checking target's strip" >&5
     2014echo "configure:2015: checking target's strip" >&5
    20112015if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
    20122016  echo $ac_n "(cached) $ac_c" 1>&6
     
    20412045    # intends
    20422046    echo $ac_n "checking whether environment variable STRIP_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    2043 echo "configure:2044: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
     2047echo "configure:2048: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
    20442048    case "$STRIP_FOR_TARGET" in
    20452049    /*) # valid
     
    20582062set dummy "$program_prefix"strip; ac_word=$2
    20592063echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2060 echo "configure:2061: checking for $ac_word" >&5
     2064echo "configure:2065: checking for $ac_word" >&5
    20612065if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
    20622066  echo $ac_n "(cached) $ac_c" 1>&6
     
    20962100
    20972101# Check if there is custom/*.cfg for this BSP
     2102
     2103
    20982104echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
    2099 echo "configure:2100: checking for make/custom/$RTEMS_BSP.cfg" >&5
     2105echo "configure:2106: checking for make/custom/$RTEMS_BSP.cfg" >&5
    21002106if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
    21012107  echo "$ac_t""yes" 1>&6
     
    21042110fi
    21052111
     2112
    21062113echo $ac_n "checking whether BSP supports multiprocessing""... $ac_c" 1>&6
    2107 echo "configure:2108: checking whether BSP supports multiprocessing" >&5
     2114echo "configure:2115: checking whether BSP supports multiprocessing" >&5
    21082115if eval "test \"`echo '$''{'rtems_cv_HAS_MP'+set}'`\" = set"; then
    21092116  echo $ac_n "(cached) $ac_c" 1>&6
     
    21282135
    21292136
     2137
    21302138echo $ac_n "checking whether BSP supports libposix""... $ac_c" 1>&6
    2131 echo "configure:2132: checking whether BSP supports libposix" >&5
     2139echo "configure:2140: checking whether BSP supports libposix" >&5
    21322140if eval "test \"`echo '$''{'rtems_cv_HAS_POSIX_API'+set}'`\" = set"; then
    21332141  echo $ac_n "(cached) $ac_c" 1>&6
     
    21862194## Needed when using automake for libs/rels
    21872195echo $ac_n "checking for newlib""... $ac_c" 1>&6
    2188 echo "configure:2189: checking for newlib" >&5
     2196echo "configure:2197: checking for newlib" >&5
    21892197if eval "test \"`echo '$''{'rtems_cv_use_newlib'+set}'`\" = set"; then
    21902198  echo $ac_n "(cached) $ac_c" 1>&6
     
    21952203
    21962204    cat > conftest.$ac_ext <<EOF
    2197 #line 2198 "configure"
     2205#line 2206 "configure"
    21982206#include "confdefs.h"
    21992207extern int not_required_by_rtems() ;
     
    22022210; return 0; }
    22032211EOF
    2204 if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2212if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    22052213  rm -rf conftest*
    22062214  rtems_cv_use_newlib="yes"
     
    22132221    if test -z "$rtems_cv_use_newlib"; then
    22142222      cat > conftest.$ac_ext <<EOF
    2215 #line 2216 "configure"
     2223#line 2224 "configure"
    22162224#include "confdefs.h"
    22172225extern int rtems_provides_crt0 ;
     
    22202228; return 0; }
    22212229EOF
    2222 if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2230if { (eval echo configure:2231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    22232231  rm -rf conftest*
    22242232  rtems_cv_use_newlib="yes"
  • c/src/exec/score/cpu/aclocal.m4

    rd83c39dc r4075af6f  
    2020AC_DEFUN(RTEMS_TOP,
    2121[dnl
     22AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
     23AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
     24
    2225AC_ARG_WITH(target-subdir,
    2326[  --with-target-subdir=DIR],
     
    4447AC_MSG_RESULT($RTEMS_VERSION)
    4548])dnl
     49
     50# Do all the work for Automake.  This macro actually does too much --
     51# some checks are only needed if your package does certain things.
     52# But this isn't really a big deal.
     53
     54# serial 1
     55
     56dnl Usage:
     57dnl AM_INIT_AUTOMAKE(package,version, [no-define])
     58
     59AC_DEFUN(AM_INIT_AUTOMAKE,
     60[AC_REQUIRE([AC_PROG_INSTALL])
     61dnl We require 2.13 because we rely on SHELL being computed by configure.
     62AC_PREREQ([2.13])
     63PACKAGE=[$1]
     64AC_SUBST(PACKAGE)
     65VERSION=[$2]
     66AC_SUBST(VERSION)
     67dnl test to see if srcdir already configured
     68if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
     69  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
     70fi
     71ifelse([$3],,
     72AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
     73AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
     74AC_REQUIRE([AM_SANITY_CHECK])
     75AC_REQUIRE([AC_ARG_PROGRAM])
     76dnl FIXME This is truly gross.
     77missing_dir=`cd $ac_aux_dir && pwd`
     78AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
     79AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
     80AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
     81AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
     82AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
     83AC_REQUIRE([AC_PROG_MAKE_SET])])
     84
     85#
     86# Check to make sure that the build environment is sane.
     87#
     88
     89AC_DEFUN(AM_SANITY_CHECK,
     90[AC_MSG_CHECKING([whether build environment is sane])
     91# Just in case
     92sleep 1
     93echo timestamp > conftestfile
     94# Do `set' in a subshell so we don't clobber the current shell's
     95# arguments.  Must try -L first in case configure is actually a
     96# symlink; some systems play weird games with the mod time of symlinks
     97# (eg FreeBSD returns the mod time of the symlink's containing
     98# directory).
     99if (
     100   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
     101   if test "[$]*" = "X"; then
     102      # -L didn't work.
     103      set X `ls -t $srcdir/configure conftestfile`
     104   fi
     105   if test "[$]*" != "X $srcdir/configure conftestfile" \
     106      && test "[$]*" != "X conftestfile $srcdir/configure"; then
     107
     108      # If neither matched, then we have a broken ls.  This can happen
     109      # if, for instance, CONFIG_SHELL is bash and it inherits a
     110      # broken ls alias from the environment.  This has actually
     111      # happened.  Such a system could not be considered "sane".
     112      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
     113alias in your environment])
     114   fi
     115
     116   test "[$]2" = conftestfile
     117   )
     118then
     119   # Ok.
     120   :
     121else
     122   AC_MSG_ERROR([newly created file is older than distributed files!
     123Check your system clock])
     124fi
     125rm -f conftest*
     126AC_MSG_RESULT(yes)])
     127
     128dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
     129dnl The program must properly implement --version.
     130AC_DEFUN(AM_MISSING_PROG,
     131[AC_MSG_CHECKING(for working $2)
     132# Run test in a subshell; some versions of sh will print an error if
     133# an executable is not found, even if stderr is redirected.
     134# Redirect stdin to placate older versions of autoconf.  Sigh.
     135if ($2 --version) < /dev/null > /dev/null 2>&1; then
     136   $1=$2
     137   AC_MSG_RESULT(found)
     138else
     139   $1="$3/missing $2"
     140   AC_MSG_RESULT(missing)
     141fi
     142AC_SUBST($1)])
    46143
    47144dnl
     
    137234AC_DEFUN(RTEMS_ENABLE_POSIX,
    138235[
     236AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     237
    139238AC_ARG_ENABLE(posix,
    140239[  --enable-posix                       enable posix interface],
     
    170269AC_SUBST(RTEMS_HAS_POSIX_API)
    171270])
     271
     272dnl $Id$
     273dnl
     274AC_DEFUN(RTEMS_CHECK_POSIX_API,
     275[dnl
     276AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     277AC_REQUIRE([RTEMS_ENABLE_POSIX])dnl
     278
     279AC_CACHE_CHECK([whether BSP supports libposix],
     280  rtems_cv_HAS_POSIX_API,
     281  [dnl
     282    case "$RTEMS_CPU" in
     283    unix*)
     284      rtems_cv_HAS_POSIX_API="no"
     285      ;;
     286    *)
     287      if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
     288        rtems_cv_HAS_POSIX_API="yes";
     289      else
     290        rtems_cv_HAS_POSIX_API="disabled";
     291      fi
     292      ;;
     293    esac])
     294if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
     295  HAS_POSIX_API="yes";
     296else
     297  HAS_POSIX_API="no";
     298fi
     299AC_SUBST(HAS_POSIX_API)dnl
     300])
     301
     302dnl $Id$
     303
     304dnl check if RTEMS support a cpu
     305AC_DEFUN(RTEMS_CHECK_CPU,
     306[dnl
     307AC_REQUIRE([RTEMS_TOP])
     308AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
     309AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     310
     311# Is this a supported CPU?
     312AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
     313if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
     314  AC_MSG_RESULT(yes)
     315else
     316  AC_MSG_ERROR(no)
     317fi
     318])dnl
     319
    172320
    173321dnl $Id$
     
    203351AC_DEFUN(RTEMS_ENABLE_RTEMSBSP,
    204352[
     353AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])dnl
    205354AC_ARG_ENABLE(rtemsbsp,
    206355[  --enable-rtemsbsp=bsp1 bsp2 ..      BSPs to include in build],
     
    215364AC_DEFUN(RTEMS_ENV_RTEMSBSP,
    216365[dnl
     366AC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnl
     367AC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnl
     368AC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnl
     369AC_BEFORE([$0], [RTEMS_CHECK_MULTIPROCESSING])dnl
     370AC_BEFORE([$0], [RTEMS_CHECK_POSIX_API])dnl
     371
    217372AC_MSG_CHECKING([for RTEMS_BSP])
    218373AC_CACHE_VAL(rtems_cv_RTEMS_BSP,
     
    228383])
    229384
    230 dnl $Id$
    231 
    232 dnl check if RTEMS support a cpu
    233 AC_DEFUN(RTEMS_CHECK_CPU,
    234 [dnl
    235 AC_REQUIRE([RTEMS_TOP])
    236 AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
    237 # Is this a supported CPU?
    238 AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
    239 if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    240   AC_MSG_RESULT(yes)
    241 else
    242   AC_MSG_ERROR(no)
    243 fi
    244 ])dnl
    245 
    246 
    247 dnl $Id$
    248 
    249 AC_DEFUN(RTEMS_CANONICAL_HOST,
    250 [dnl
    251 AC_REQUIRE([AC_CANONICAL_HOST])
    252 RTEMS_HOST=$host_os
    253 changequote(,)dnl
    254 case "${target}" in
    255   # hpux unix port should go here
    256   i[3456]86-pc-linux*)         # unix "simulator" port
    257         RTEMS_HOST=Linux
    258         ;;
    259   i[3456]86-*freebsd2*) # unix "simulator" port
    260         RTEMS_HOST=FreeBSD
    261         ;;
    262   sparc-sun-solaris*)             # unix "simulator" port
    263         RTEMS_HOST=Solaris
    264         ;;
    265   *)
    266         ;;
    267 esac
    268 changequote([,])dnl
    269 AC_SUBST(RTEMS_HOST)
    270 ])dnl
    271 
    272385dnl
    273386dnl $Id$
     
    292405PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex"
    293406AC_SUBST(PACKHEX)
    294 ])
    295 
    296 
    297 dnl
    298 dnl $Id$
    299 dnl
    300 dnl Check for target gcc
    301 dnl
    302 dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    303 dnl                             Completely reworked
    304 
    305 AC_DEFUN(RTEMS_PROG_CC,
    306 [
    307 AC_BEFORE([$0], [AC_PROG_CPP])dnl
    308 AC_BEFORE([$0], [AC_PROG_CC])dnl
    309 AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
    310 
    311 dnl Only accept gcc and cc
    312 dnl NOTE: This might be too restrictive for native compilation
    313 AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
    314 test -z "$CC_FOR_TARGET" \
    315   && AC_MSG_ERROR([no acceptable cc found in \$PATH])
    316 
    317 dnl backup
    318 rtems_save_CC=$CC
    319 rtems_save_CFLAGS=$CFLAGS
    320 
    321 dnl temporarily set CC
    322 CC=$CC_FOR_TARGET
    323 
    324 AC_PROG_CC_WORKS
    325 AC_PROG_CC_GNU
    326 
    327 if test $ac_cv_prog_gcc = yes; then
    328   GCC=yes
    329 dnl Check whether -g works, even if CFLAGS is set, in case the package
    330 dnl plays around with CFLAGS (such as to build both debugging and
    331 dnl normal versions of a library), tasteless as that idea is.
    332   ac_test_CFLAGS="${CFLAGS+set}"
    333   ac_save_CFLAGS="$CFLAGS"
    334   CFLAGS=
    335   AC_PROG_CC_G
    336   if test "$ac_test_CFLAGS" = set; then
    337     CFLAGS="$ac_save_CFLAGS"
    338   elif test $ac_cv_prog_cc_g = yes; then
    339     CFLAGS="-g -O2"
    340   else
    341     CFLAGS="-O2"
    342   fi
    343 else
    344   GCC=
    345   test "${CFLAGS+set}" = set || CFLAGS="-g"
    346 fi
    347 
    348 rtems_cv_prog_gcc=$ac_cv_prog_gcc
    349 rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
    350 rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
    351 rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
    352 
    353 dnl restore initial values
    354 CC=$rtems_save_CC
    355 CFLAGS=$rtems_save_CFLAGS
    356 
    357 unset ac_cv_prog_gcc
    358 unset ac_cv_prog_cc_g
    359 unset ac_cv_prog_cc_works
    360 unset ac_cv_prog_cc_cross
    361 ])
    362 
    363 AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
    364 [
    365 dnl check target cc
    366 RTEMS_PROG_CC
    367 dnl check if the compiler supports --specs
    368 RTEMS_GCC_SPECS
    369 dnl check if the target compiler may use --pipe
    370 RTEMS_GCC_PIPE
    371 dnl check if the compiler supports --specs if gcc28 is requested
    372 if test "$RTEMS_USE_GCC272" != "yes" ; then
    373   if test "$rtems_cv_gcc_specs" = "no"; then
    374     AC_MSG_WARN([*** disabling --enable-gcc28])
    375       RTEMS_USE_GCC272=yes
    376   fi
    377 fi
    378 test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
    379 
    380 dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
    381 case $host_os in
    382 *cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
    383 *) ;;
    384 esac
    385 AC_SUBST(GCCSED)
    386 ])
    387 
    388 dnl
    389 dnl  $Id$
    390 dnl
    391 dnl Set program_prefix
    392 dnl
    393 dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    394 dnl                             Extracted from configure
    395 
    396 AC_DEFUN(RTEMS_TOOL_PREFIX,
    397 [AC_REQUIRE([AC_CANONICAL_TARGET])dnl
    398 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
    399 
    400 changequote(,)dnl
    401 if [ "${program_prefix}" = "NONE" ] ; then
    402   if [ "${target}" = "${host}" ] ; then
    403     program_prefix=
    404   else
    405     program_prefix=${target}-
    406   fi
    407 fi
    408 changequote([,])dnl
    409 ])
    410 
    411 dnl
    412 dnl $Id$
    413 dnl
    414 dnl Check whether the target compiler accepts -specs
    415 dnl
    416 dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
    417 dnl
    418 
    419 AC_DEFUN(RTEMS_GCC_SPECS,
    420 [AC_REQUIRE([RTEMS_PROG_CC])
    421 AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
    422 [
    423 rtems_cv_gcc_specs=no
    424 if test "$rtems_cv_prog_gcc" = "yes"; then
    425   touch confspec
    426   echo 'void f(){}' >conftest.c
    427   if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
    428     rtems_cv_gcc_specs=yes
    429   fi
    430 fi
    431 rm -f confspec conftest*
    432 ])])
    433 
    434 dnl
    435 dnl $Id$
    436 dnl
    437 dnl Check whether the target compiler accepts -pipe
    438 dnl
    439 dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
    440 dnl
    441 
    442 AC_DEFUN(RTEMS_GCC_PIPE,
    443 [AC_REQUIRE([RTEMS_PROG_CC])
    444 AC_REQUIRE([AC_CANONICAL_HOST])
    445 AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
    446 [
    447 rtems_cv_gcc_pipe=no
    448 if test "$rtems_cv_prog_gcc" = "yes"; then
    449 case "$host_os" in
    450   cygwin*)
    451     ;;
    452   *)
    453     echo 'void f(){}' >conftest.c
    454     if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
    455       rtems_cv_gcc_pipe=yes
    456     fi
    457     rm -f conftest*
    458     ;;
    459 esac
    460 fi
    461 ])
    462 ])
    463 
    464 dnl
    465 dnl $Id$
    466 dnl
    467 dnl Set target tools
    468 dnl
    469 dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    470 dnl             fixing cache/environment variable handling
    471 dnl             adding checks for cygwin/egcs '\\'-bug
    472 dnl             adding checks for ranlib/ar -s problem
    473 dnl
    474 dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
    475 dnl
    476 
    477 AC_DEFUN(RTEMS_GCC_PRINT,
    478 [ case $host_os in
    479   *cygwin*)
    480     dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
    481     dnl        Should be removed once cygwin/egcs reports '/' only
    482     $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
    483     ;;
    484   *)
    485     $1=`$CC_FOR_TARGET --print-prog-name=$2`
    486     ;;
    487   esac
    488 ])
    489 
    490 AC_DEFUN(RTEMS_PATH_TOOL,
    491 [
    492 AC_MSG_CHECKING([target's $2])
    493 AC_CACHE_VAL(ac_cv_path_$1,:)
    494 AC_MSG_RESULT([$ac_cv_path_$1])
    495 
    496 if test -n "$ac_cv_path_$1"; then
    497   dnl retrieve the value from the cache
    498   $1=$ac_cv_path_$1
    499 else
    500   dnl the cache was not set
    501   if test -z "[$]$1" ; then
    502     if test "$rtems_cv_prog_gcc" = "yes"; then
    503       # We are using gcc, ask it about its tool
    504       # NOTE: Necessary if gcc was configured to use the target's
    505       # native tools or uses prefixes for gnutools (e.g. gas instead of as)
    506       RTEMS_GCC_PRINT($1,$2)
    507     fi
    508   else
    509     # The user set an environment variable.
    510     # Check whether it is an absolute path, otherwise AC_PATH_PROG
    511     # will override the environment variable, which isn't what the user
    512     # intends
    513     AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
    514     case "[$]$1" in
    515     /*) # valid
    516       AC_MSG_RESULT("yes")
    517     ;;
    518     *)  # invalid for AC_PATH_PROG
    519       AC_MSG_RESULT("no")
    520       AC_MSG_ERROR([***]
    521         [Environment variable $1 should either]
    522         [be unset (preferred) or contain an absolute path])
    523     ;;
    524     esac
    525   fi
    526 
    527   AC_PATH_PROG($1,"$program_prefix"$2,$3)
    528 fi
    529 ])
    530 
    531 AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
    532 [AC_REQUIRE([RTEMS_PROG_CC])dnl
    533 
    534 dnl FIXME: What shall be done if these tools are not available?
    535   RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
    536   RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
    537   RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
    538   RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
    539 
    540 dnl special treatment of ranlib
    541   RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
    542   if test "$RANLIB_FOR_TARGET" = "no"; then
    543     # ranlib wasn't found; check if ar -s is available
    544     RTEMS_AR_FOR_TARGET_S
    545     if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
    546       dnl override RANLIB_FOR_TARGET's cache
    547       ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
    548       RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
    549     else
    550       AC_MSG_ERROR([***]
    551         [Can't figure out how to build a library index]
    552         [Neither ranlib nor ar -s seem to be available] )
    553     fi
    554   fi
    555 
    556 dnl NOTE: These may not be available if not using gnutools
    557   RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
    558   RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
    559   RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
    560 ])
    561 
    562 dnl
    563 dnl $Id$
    564 dnl
    565 
    566 AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
    567 [
    568 AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
    569 rtems_cv_AR_FOR_TARGET_S,
    570 [
    571 cat > conftest.$ac_ext <<EOF
    572 int foo( int b )
    573 { return b; }
    574 EOF
    575 if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
    576   && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
    577   && test -s conftest.a ; \
    578 then
    579   rtems_cv_AR_FOR_TARGET_S="yes"
    580 else
    581   rtems_cv_AR_FOR_TARGET_S="no"
    582 fi
    583   rm -f conftest*
    584 ])
    585 ])
    586 
    587 
    588 dnl $Id$
    589 
    590 AC_DEFUN(RTEMS_CHECK_NEWLIB,
    591 [dnl
    592 AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
    593 AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl
    594 AC_CACHE_CHECK([for newlib],
    595   rtems_cv_use_newlib,
    596   [
    597     rtems_save_CC=$CC
    598     CC=$CC_FOR_TARGET
    599 
    600 dnl some versions of newlib provide not_required_by_rtems
    601     AC_TRY_LINK(
    602       [extern int not_required_by_rtems() ;],
    603       [not_required_by_rtems()],
    604       rtems_cv_use_newlib="yes")
    605 
    606 dnl older versions of newlib provided rtems_provides_crt0
    607     if test -z "$rtems_cv_use_newlib"; then
    608       AC_TRY_LINK(
    609         [extern int rtems_provides_crt0 ;],
    610         [rtems_provides_crt0 = 0],
    611         rtems_cv_use_newlib="yes",
    612         rtems_cv_use_newlib="no")
    613     fi
    614   CC=$rtems_save_CC])
    615 RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
    616 AC_SUBST(RTEMS_USE_NEWLIB)
    617407])
    618408
     
    659449AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP,
    660450[dnl
     451AC_REQUIRE([RTEMS_TOP])
     452
    661453AC_MSG_CHECKING([for make/custom/[$]$1.cfg])
    662454if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then
     
    675467AC_REQUIRE([RTEMS_TOP])dnl
    676468AC_REQUIRE([RTEMS_CHECK_CPU])dnl
     469AC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnl
     470
    677471AC_CACHE_CHECK([whether BSP supports multiprocessing],
    678472  rtems_cv_HAS_MP,
     
    696490
    697491dnl $Id$
    698 dnl
    699 AC_DEFUN(RTEMS_CHECK_POSIX_API,
     492
     493AC_DEFUN(RTEMS_CANONICAL_HOST,
    700494[dnl
    701 AC_REQUIRE([RTEMS_CHECK_CPU])dnl
    702 AC_CACHE_CHECK([whether BSP supports libposix],
    703   rtems_cv_HAS_POSIX_API,
    704   [dnl
    705     case "$RTEMS_CPU" in
    706     unix*)
    707       rtems_cv_HAS_POSIX_API="no"
    708       ;;
    709     *)
    710       if test "${RTEMS_HAS_POSIX_API}" = "yes"; then
    711         rtems_cv_HAS_POSIX_API="yes";
    712       else
    713         rtems_cv_HAS_POSIX_API="disabled";
    714       fi
    715       ;;
    716     esac])
    717 if test "$rtems_cv_HAS_POSIX_API" = "yes"; then
    718   HAS_POSIX_API="yes";
    719 else
    720   HAS_POSIX_API="no";
    721 fi
    722 AC_SUBST(HAS_POSIX_API)dnl
    723 ])
     495AC_REQUIRE([AC_CANONICAL_HOST])
     496RTEMS_HOST=$host_os
     497changequote(,)dnl
     498case "${target}" in
     499  # hpux unix port should go here
     500  i[3456]86-pc-linux*)         # unix "simulator" port
     501        RTEMS_HOST=Linux
     502        ;;
     503  i[3456]86-*freebsd2*) # unix "simulator" port
     504        RTEMS_HOST=FreeBSD
     505        ;;
     506  sparc-sun-solaris*)             # unix "simulator" port
     507        RTEMS_HOST=Solaris
     508        ;;
     509  *)
     510        ;;
     511esac
     512changequote([,])dnl
     513AC_SUBST(RTEMS_HOST)
     514])dnl
     515
     516dnl
     517dnl $Id$
     518dnl
     519dnl Check for target gcc
     520dnl
     521dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     522dnl                             Completely reworked
     523
     524AC_DEFUN(RTEMS_PROG_CC,
     525[
     526AC_BEFORE([$0], [AC_PROG_CPP])dnl
     527AC_BEFORE([$0], [AC_PROG_CC])dnl
     528AC_BEFORE([$0], [RTEMS_CANONICALIZE_TOOLS])dnl
     529AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
     530
     531dnl Only accept gcc and cc
     532dnl NOTE: This might be too restrictive for native compilation
     533AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
     534test -z "$CC_FOR_TARGET" \
     535  && AC_MSG_ERROR([no acceptable cc found in \$PATH])
     536
     537dnl backup
     538rtems_save_CC=$CC
     539rtems_save_CFLAGS=$CFLAGS
     540
     541dnl temporarily set CC
     542CC=$CC_FOR_TARGET
     543
     544AC_PROG_CC_WORKS
     545AC_PROG_CC_GNU
     546
     547if test $ac_cv_prog_gcc = yes; then
     548  GCC=yes
     549dnl Check whether -g works, even if CFLAGS is set, in case the package
     550dnl plays around with CFLAGS (such as to build both debugging and
     551dnl normal versions of a library), tasteless as that idea is.
     552  ac_test_CFLAGS="${CFLAGS+set}"
     553  ac_save_CFLAGS="$CFLAGS"
     554  CFLAGS=
     555  AC_PROG_CC_G
     556  if test "$ac_test_CFLAGS" = set; then
     557    CFLAGS="$ac_save_CFLAGS"
     558  elif test $ac_cv_prog_cc_g = yes; then
     559    CFLAGS="-g -O2"
     560  else
     561    CFLAGS="-O2"
     562  fi
     563else
     564  GCC=
     565  test "${CFLAGS+set}" = set || CFLAGS="-g"
     566fi
     567
     568rtems_cv_prog_gcc=$ac_cv_prog_gcc
     569rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
     570rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
     571rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
     572
     573dnl restore initial values
     574CC=$rtems_save_CC
     575CFLAGS=$rtems_save_CFLAGS
     576
     577unset ac_cv_prog_gcc
     578unset ac_cv_prog_cc_g
     579unset ac_cv_prog_cc_works
     580unset ac_cv_prog_cc_cross
     581])
     582
     583AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET,
     584[
     585dnl check target cc
     586RTEMS_PROG_CC
     587dnl check if the compiler supports --specs
     588RTEMS_GCC_SPECS
     589dnl check if the target compiler may use --pipe
     590RTEMS_GCC_PIPE
     591dnl check if the compiler supports --specs if gcc28 is requested
     592if test "$RTEMS_USE_GCC272" != "yes" ; then
     593  if test "$rtems_cv_gcc_specs" = "no"; then
     594    AC_MSG_WARN([*** disabling --enable-gcc28])
     595      RTEMS_USE_GCC272=yes
     596  fi
     597fi
     598test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
     599
     600dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-*
     601case $host_os in
     602*cygwin*)     GCCSED="| sed 's%\\\\%/%g'" ;;
     603*) ;;
     604esac
     605AC_SUBST(GCCSED)
     606])
     607
     608dnl
     609dnl $Id$
     610dnl
     611dnl Set target tools
     612dnl
     613dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     614dnl             fixing cache/environment variable handling
     615dnl             adding checks for cygwin/egcs '\\'-bug
     616dnl             adding checks for ranlib/ar -s problem
     617dnl
     618dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     619dnl
     620
     621AC_DEFUN(RTEMS_GCC_PRINT,
     622[ case $host_os in
     623  *cygwin*)
     624    dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
     625    dnl        Should be removed once cygwin/egcs reports '/' only
     626    $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
     627    ;;
     628  *)
     629    $1=`$CC_FOR_TARGET --print-prog-name=$2`
     630    ;;
     631  esac
     632])
     633
     634AC_DEFUN(RTEMS_PATH_TOOL,
     635[
     636AC_MSG_CHECKING([target's $2])
     637AC_CACHE_VAL(ac_cv_path_$1,:)
     638AC_MSG_RESULT([$ac_cv_path_$1])
     639
     640if test -n "$ac_cv_path_$1"; then
     641  dnl retrieve the value from the cache
     642  $1=$ac_cv_path_$1
     643else
     644  dnl the cache was not set
     645  if test -z "[$]$1" ; then
     646    if test "$rtems_cv_prog_gcc" = "yes"; then
     647      # We are using gcc, ask it about its tool
     648      # NOTE: Necessary if gcc was configured to use the target's
     649      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
     650      RTEMS_GCC_PRINT($1,$2)
     651    fi
     652  else
     653    # The user set an environment variable.
     654    # Check whether it is an absolute path, otherwise AC_PATH_PROG
     655    # will override the environment variable, which isn't what the user
     656    # intends
     657    AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
     658    case "[$]$1" in
     659    /*) # valid
     660      AC_MSG_RESULT("yes")
     661    ;;
     662    *)  # invalid for AC_PATH_PROG
     663      AC_MSG_RESULT("no")
     664      AC_MSG_ERROR([***]
     665        [Environment variable $1 should either]
     666        [be unset (preferred) or contain an absolute path])
     667    ;;
     668    esac
     669  fi
     670
     671  AC_PATH_PROG($1,"$program_prefix"$2,$3)
     672fi
     673])
     674
     675AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
     676[AC_REQUIRE([RTEMS_PROG_CC])dnl
     677
     678dnl FIXME: What shall be done if these tools are not available?
     679  RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
     680  RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
     681  RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
     682  RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
     683
     684dnl special treatment of ranlib
     685  RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
     686  if test "$RANLIB_FOR_TARGET" = "no"; then
     687    # ranlib wasn't found; check if ar -s is available
     688    RTEMS_AR_FOR_TARGET_S
     689    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
     690      dnl override RANLIB_FOR_TARGET's cache
     691      ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
     692      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
     693    else
     694      AC_MSG_ERROR([***]
     695        [Can't figure out how to build a library index]
     696        [Neither ranlib nor ar -s seem to be available] )
     697    fi
     698  fi
     699
     700dnl NOTE: These may not be available if not using gnutools
     701  RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
     702  RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
     703  RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
     704])
     705
     706dnl
     707dnl $Id$
     708dnl
     709
     710AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
     711[
     712AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
     713rtems_cv_AR_FOR_TARGET_S,
     714[
     715cat > conftest.$ac_ext <<EOF
     716int foo( int b )
     717{ return b; }
     718EOF
     719if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
     720  && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
     721  && test -s conftest.a ; \
     722then
     723  rtems_cv_AR_FOR_TARGET_S="yes"
     724else
     725  rtems_cv_AR_FOR_TARGET_S="no"
     726fi
     727  rm -f conftest*
     728])
     729])
     730
     731
     732dnl
     733dnl  $Id$
     734dnl
     735dnl Set program_prefix
     736dnl
     737dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
     738dnl                             Extracted from configure
     739
     740AC_DEFUN(RTEMS_TOOL_PREFIX,
     741[AC_REQUIRE([AC_CANONICAL_TARGET])dnl
     742AC_REQUIRE([AC_CANONICAL_BUILD])dnl
     743
     744changequote(,)dnl
     745if [ "${program_prefix}" = "NONE" ] ; then
     746  if [ "${target}" = "${host}" ] ; then
     747    program_prefix=
     748  else
     749    program_prefix=${target}-
     750  fi
     751fi
     752changequote([,])dnl
     753])
     754
     755dnl
     756dnl $Id$
     757dnl
     758dnl Check whether the target compiler accepts -specs
     759dnl
     760
     761AC_DEFUN(RTEMS_GCC_SPECS,
     762[AC_REQUIRE([RTEMS_PROG_CC])
     763AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
     764[
     765rtems_cv_gcc_specs=no
     766if test "$rtems_cv_prog_gcc" = "yes"; then
     767  touch confspec
     768  echo 'void f(){}' >conftest.c
     769  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
     770    rtems_cv_gcc_specs=yes
     771  fi
     772fi
     773rm -f confspec conftest*
     774])])
     775
     776dnl
     777dnl $Id$
     778dnl
     779dnl Check whether the target compiler accepts -pipe
     780dnl
     781dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
     782dnl
     783
     784AC_DEFUN(RTEMS_GCC_PIPE,
     785[AC_REQUIRE([RTEMS_PROG_CC])
     786AC_REQUIRE([AC_CANONICAL_HOST])
     787AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
     788[
     789rtems_cv_gcc_pipe=no
     790if test "$rtems_cv_prog_gcc" = "yes"; then
     791case "$host_os" in
     792  cygwin*)
     793    ;;
     794  *)
     795    echo 'void f(){}' >conftest.c
     796    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
     797      rtems_cv_gcc_pipe=yes
     798    fi
     799    rm -f conftest*
     800    ;;
     801esac
     802fi
     803])
     804])
     805
     806dnl $Id$
     807
     808AC_DEFUN(RTEMS_CHECK_NEWLIB,
     809[dnl
     810AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
     811AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl
     812AC_CACHE_CHECK([for newlib],
     813  rtems_cv_use_newlib,
     814  [
     815    rtems_save_CC=$CC
     816    CC=$CC_FOR_TARGET
     817
     818dnl some versions of newlib provide not_required_by_rtems
     819    AC_TRY_LINK(
     820      [extern int not_required_by_rtems() ;],
     821      [not_required_by_rtems()],
     822      rtems_cv_use_newlib="yes")
     823
     824dnl older versions of newlib provided rtems_provides_crt0
     825    if test -z "$rtems_cv_use_newlib"; then
     826      AC_TRY_LINK(
     827        [extern int rtems_provides_crt0 ;],
     828        [rtems_provides_crt0 = 0],
     829        rtems_cv_use_newlib="yes",
     830        rtems_cv_use_newlib="no")
     831    fi
     832  CC=$rtems_save_CC])
     833RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
     834AC_SUBST(RTEMS_USE_NEWLIB)
     835])
     836
    724837
    725838dnl
  • c/src/exec/score/cpu/configure

    rd83c39dc r4075af6f  
    536536
    537537
     538
    538539# Check whether --with-target-subdir or --without-target-subdir was given.
    539540if test "${with_target_subdir+set}" = set; then
     
    549550
    550551echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6
    551 echo "configure:552: checking for RTEMS Version" >&5
     552echo "configure:553: checking for RTEMS Version" >&5
    552553if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
    553554RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
     
    582583
    583584echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    584 echo "configure:585: checking whether ${MAKE-make} sets \${MAKE}" >&5
     585echo "configure:586: checking whether ${MAKE-make} sets \${MAKE}" >&5
    585586set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    586587if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    637638
    638639echo $ac_n "checking host system type""... $ac_c" 1>&6
    639 echo "configure:640: checking host system type" >&5
     640echo "configure:641: checking host system type" >&5
    640641
    641642host_alias=$host
     
    658659
    659660echo $ac_n "checking target system type""... $ac_c" 1>&6
    660 echo "configure:661: checking target system type" >&5
     661echo "configure:662: checking target system type" >&5
    661662
    662663target_alias=$target
     
    676677
    677678echo $ac_n "checking build system type""... $ac_c" 1>&6
    678 echo "configure:679: checking build system type" >&5
     679echo "configure:680: checking build system type" >&5
    679680
    680681build_alias=$build
     
    699700
    700701echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
    701 echo "configure:702: checking rtems target cpu" >&5
     702echo "configure:703: checking rtems target cpu" >&5
    702703case "${target}" in
    703704  # hpux unix port should go here
     
    726727
    727728echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
    728 echo "configure:729: checking whether to enable maintainer-specific portions of Makefiles" >&5
     729echo "configure:730: checking whether to enable maintainer-specific portions of Makefiles" >&5
    729730    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
    730731if test "${enable_maintainer_mode+set}" = set; then
     
    760761  RTEMS_HAS_MULTIPROCESSING=no
    761762fi
     763
    762764
    763765
     
    822824
    823825
     826
    824827echo $ac_n "checking for RTEMS_BSP""... $ac_c" 1>&6
    825 echo "configure:826: checking for RTEMS_BSP" >&5
     828echo "configure:829: checking for RTEMS_BSP" >&5
    826829if eval "test \"`echo '$''{'rtems_cv_RTEMS_BSP'+set}'`\" = set"; then
    827830  echo $ac_n "(cached) $ac_c" 1>&6
     
    850853# ./install, which can be erroneously created by make from ./install.sh.
    851854echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
    852 echo "configure:853: checking for a BSD compatible install" >&5
     855echo "configure:856: checking for a BSD compatible install" >&5
    853856if test -z "$INSTALL"; then
    854857if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
     
    905908
    906909
     910
    907911# Is this a supported CPU?
    908912echo $ac_n "checking if cpu $RTEMS_CPU is supported""... $ac_c" 1>&6
    909 echo "configure:910: checking if cpu $RTEMS_CPU is supported" >&5
     913echo "configure:914: checking if cpu $RTEMS_CPU is supported" >&5
    910914if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
    911915  echo "$ac_t""yes" 1>&6
     
    968972set dummy $ac_prog; ac_word=$2
    969973echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    970 echo "configure:971: checking for $ac_word" >&5
     974echo "configure:975: checking for $ac_word" >&5
    971975if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
    972976  echo $ac_n "(cached) $ac_c" 1>&6
     
    10121016
    10131017echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    1014 echo "configure:1015: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     1018echo "configure:1019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    10151019
    10161020ac_ext=c
     
    10231027cat > conftest.$ac_ext << EOF
    10241028
    1025 #line 1026 "configure"
     1029#line 1030 "configure"
    10261030#include "confdefs.h"
    10271031
    10281032main(){return(0);}
    10291033EOF
    1030 if { (eval echo configure:1031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1034if { (eval echo configure:1035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    10311035  ac_cv_prog_cc_works=yes
    10321036  # If we can't run a trivial program, we are probably using a cross compiler.
     
    10541058fi
    10551059echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    1056 echo "configure:1057: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     1060echo "configure:1061: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    10571061echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    10581062cross_compiling=$ac_cv_prog_cc_cross
    10591063
    10601064echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    1061 echo "configure:1062: checking whether we are using GNU C" >&5
     1065echo "configure:1066: checking whether we are using GNU C" >&5
    10621066if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    10631067  echo $ac_n "(cached) $ac_c" 1>&6
     
    10681072#endif
    10691073EOF
    1070 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     1074if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    10711075  ac_cv_prog_gcc=yes
    10721076else
     
    10831087  CFLAGS=
    10841088  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    1085 echo "configure:1086: checking whether ${CC-cc} accepts -g" >&5
     1089echo "configure:1090: checking whether ${CC-cc} accepts -g" >&5
    10861090if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    10871091  echo $ac_n "(cached) $ac_c" 1>&6
     
    11251129
    11261130echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
    1127 echo "configure:1128: checking whether $CC_FOR_TARGET accepts -specs" >&5
     1131echo "configure:1132: checking whether $CC_FOR_TARGET accepts -specs" >&5
    11281132if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
    11291133  echo $ac_n "(cached) $ac_c" 1>&6
     
    11461150
    11471151echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
    1148 echo "configure:1149: checking whether $CC_FOR_TARGET accepts --pipe" >&5
     1152echo "configure:1153: checking whether $CC_FOR_TARGET accepts --pipe" >&5
    11491153if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
    11501154  echo $ac_n "(cached) $ac_c" 1>&6
     
    11871191 
    11881192echo $ac_n "checking target's ar""... $ac_c" 1>&6
    1189 echo "configure:1190: checking target's ar" >&5
     1193echo "configure:1194: checking target's ar" >&5
    11901194if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
    11911195  echo $ac_n "(cached) $ac_c" 1>&6
     
    12201224    # intends
    12211225    echo $ac_n "checking whether environment variable AR_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1222 echo "configure:1223: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
     1226echo "configure:1227: checking whether environment variable AR_FOR_TARGET is an absolute path" >&5
    12231227    case "$AR_FOR_TARGET" in
    12241228    /*) # valid
     
    12371241set dummy "$program_prefix"ar; ac_word=$2
    12381242echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1239 echo "configure:1240: checking for $ac_word" >&5
     1243echo "configure:1244: checking for $ac_word" >&5
    12401244if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
    12411245  echo $ac_n "(cached) $ac_c" 1>&6
     
    12741278 
    12751279echo $ac_n "checking target's as""... $ac_c" 1>&6
    1276 echo "configure:1277: checking target's as" >&5
     1280echo "configure:1281: checking target's as" >&5
    12771281if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
    12781282  echo $ac_n "(cached) $ac_c" 1>&6
     
    13071311    # intends
    13081312    echo $ac_n "checking whether environment variable AS_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1309 echo "configure:1310: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
     1313echo "configure:1314: checking whether environment variable AS_FOR_TARGET is an absolute path" >&5
    13101314    case "$AS_FOR_TARGET" in
    13111315    /*) # valid
     
    13241328set dummy "$program_prefix"as; ac_word=$2
    13251329echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1326 echo "configure:1327: checking for $ac_word" >&5
     1330echo "configure:1331: checking for $ac_word" >&5
    13271331if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
    13281332  echo $ac_n "(cached) $ac_c" 1>&6
     
    13611365 
    13621366echo $ac_n "checking target's ld""... $ac_c" 1>&6
    1363 echo "configure:1364: checking target's ld" >&5
     1367echo "configure:1368: checking target's ld" >&5
    13641368if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
    13651369  echo $ac_n "(cached) $ac_c" 1>&6
     
    13941398    # intends
    13951399    echo $ac_n "checking whether environment variable LD_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1396 echo "configure:1397: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
     1400echo "configure:1401: checking whether environment variable LD_FOR_TARGET is an absolute path" >&5
    13971401    case "$LD_FOR_TARGET" in
    13981402    /*) # valid
     
    14111415set dummy "$program_prefix"ld; ac_word=$2
    14121416echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1413 echo "configure:1414: checking for $ac_word" >&5
     1417echo "configure:1418: checking for $ac_word" >&5
    14141418if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
    14151419  echo $ac_n "(cached) $ac_c" 1>&6
     
    14481452 
    14491453echo $ac_n "checking target's nm""... $ac_c" 1>&6
    1450 echo "configure:1451: checking target's nm" >&5
     1454echo "configure:1455: checking target's nm" >&5
    14511455if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
    14521456  echo $ac_n "(cached) $ac_c" 1>&6
     
    14811485    # intends
    14821486    echo $ac_n "checking whether environment variable NM_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1483 echo "configure:1484: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
     1487echo "configure:1488: checking whether environment variable NM_FOR_TARGET is an absolute path" >&5
    14841488    case "$NM_FOR_TARGET" in
    14851489    /*) # valid
     
    14981502set dummy "$program_prefix"nm; ac_word=$2
    14991503echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1500 echo "configure:1501: checking for $ac_word" >&5
     1504echo "configure:1505: checking for $ac_word" >&5
    15011505if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
    15021506  echo $ac_n "(cached) $ac_c" 1>&6
     
    15361540 
    15371541echo $ac_n "checking target's ranlib""... $ac_c" 1>&6
    1538 echo "configure:1539: checking target's ranlib" >&5
     1542echo "configure:1543: checking target's ranlib" >&5
    15391543if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
    15401544  echo $ac_n "(cached) $ac_c" 1>&6
     
    15691573    # intends
    15701574    echo $ac_n "checking whether environment variable RANLIB_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1571 echo "configure:1572: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
     1575echo "configure:1576: checking whether environment variable RANLIB_FOR_TARGET is an absolute path" >&5
    15721576    case "$RANLIB_FOR_TARGET" in
    15731577    /*) # valid
     
    15861590set dummy "$program_prefix"ranlib; ac_word=$2
    15871591echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1588 echo "configure:1589: checking for $ac_word" >&5
     1592echo "configure:1593: checking for $ac_word" >&5
    15891593if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
    15901594  echo $ac_n "(cached) $ac_c" 1>&6
     
    16251629   
    16261630echo $ac_n "checking whether $AR_FOR_TARGET -s works""... $ac_c" 1>&6
    1627 echo "configure:1628: checking whether $AR_FOR_TARGET -s works" >&5
     1631echo "configure:1632: checking whether $AR_FOR_TARGET -s works" >&5
    16281632if eval "test \"`echo '$''{'rtems_cv_AR_FOR_TARGET_S'+set}'`\" = set"; then
    16291633  echo $ac_n "(cached) $ac_c" 1>&6
     
    16341638{ return b; }
    16351639EOF
    1636 if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
    1637   && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
     1640if { ac_try='$CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext'; { (eval echo configure:1641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
     1641  && { ac_try='$AR_FOR_TARGET -sr conftest.a conftest.o'; { (eval echo configure:1642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
    16381642  && test -s conftest.a ; \
    16391643then
     
    16601664 
    16611665echo $ac_n "checking target's objcopy""... $ac_c" 1>&6
    1662 echo "configure:1663: checking target's objcopy" >&5
     1666echo "configure:1667: checking target's objcopy" >&5
    16631667if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
    16641668  echo $ac_n "(cached) $ac_c" 1>&6
     
    16931697    # intends
    16941698    echo $ac_n "checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1695 echo "configure:1696: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
     1699echo "configure:1700: checking whether environment variable OBJCOPY_FOR_TARGET is an absolute path" >&5
    16961700    case "$OBJCOPY_FOR_TARGET" in
    16971701    /*) # valid
     
    17101714set dummy "$program_prefix"objcopy; ac_word=$2
    17111715echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1712 echo "configure:1713: checking for $ac_word" >&5
     1716echo "configure:1717: checking for $ac_word" >&5
    17131717if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
    17141718  echo $ac_n "(cached) $ac_c" 1>&6
     
    17471751 
    17481752echo $ac_n "checking target's size""... $ac_c" 1>&6
    1749 echo "configure:1750: checking target's size" >&5
     1753echo "configure:1754: checking target's size" >&5
    17501754if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
    17511755  echo $ac_n "(cached) $ac_c" 1>&6
     
    17801784    # intends
    17811785    echo $ac_n "checking whether environment variable SIZE_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1782 echo "configure:1783: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
     1786echo "configure:1787: checking whether environment variable SIZE_FOR_TARGET is an absolute path" >&5
    17831787    case "$SIZE_FOR_TARGET" in
    17841788    /*) # valid
     
    17971801set dummy "$program_prefix"size; ac_word=$2
    17981802echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1799 echo "configure:1800: checking for $ac_word" >&5
     1803echo "configure:1804: checking for $ac_word" >&5
    18001804if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
    18011805  echo $ac_n "(cached) $ac_c" 1>&6
     
    18341838 
    18351839echo $ac_n "checking target's strip""... $ac_c" 1>&6
    1836 echo "configure:1837: checking target's strip" >&5
     1840echo "configure:1841: checking target's strip" >&5
    18371841if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
    18381842  echo $ac_n "(cached) $ac_c" 1>&6
     
    18671871    # intends
    18681872    echo $ac_n "checking whether environment variable STRIP_FOR_TARGET is an absolute path""... $ac_c" 1>&6
    1869 echo "configure:1870: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
     1873echo "configure:1874: checking whether environment variable STRIP_FOR_TARGET is an absolute path" >&5
    18701874    case "$STRIP_FOR_TARGET" in
    18711875    /*) # valid
     
    18841888set dummy "$program_prefix"strip; ac_word=$2
    18851889echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    1886 echo "configure:1887: checking for $ac_word" >&5
     1890echo "configure:1891: checking for $ac_word" >&5
    18871891if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
    18881892  echo $ac_n "(cached) $ac_c" 1>&6
     
    19221926
    19231927echo $ac_n "checking for newlib""... $ac_c" 1>&6
    1924 echo "configure:1925: checking for newlib" >&5
     1928echo "configure:1929: checking for newlib" >&5
    19251929if eval "test \"`echo '$''{'rtems_cv_use_newlib'+set}'`\" = set"; then
    19261930  echo $ac_n "(cached) $ac_c" 1>&6
     
    19311935
    19321936    cat > conftest.$ac_ext <<EOF
    1933 #line 1934 "configure"
     1937#line 1938 "configure"
    19341938#include "confdefs.h"
    19351939extern int not_required_by_rtems() ;
     
    19381942; return 0; }
    19391943EOF
    1940 if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1944if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    19411945  rm -rf conftest*
    19421946  rtems_cv_use_newlib="yes"
     
    19491953    if test -z "$rtems_cv_use_newlib"; then
    19501954      cat > conftest.$ac_ext <<EOF
    1951 #line 1952 "configure"
     1955#line 1956 "configure"
    19521956#include "confdefs.h"
    19531957extern int rtems_provides_crt0 ;
     
    19561960; return 0; }
    19571961EOF
    1958 if { (eval echo configure:1959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1962if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    19591963  rm -rf conftest*
    19601964  rtems_cv_use_newlib="yes"
     
    19761980
    19771981# Check if there is custom/*.cfg for this BSP
     1982
     1983
    19781984echo $ac_n "checking for make/custom/$RTEMS_BSP.cfg""... $ac_c" 1>&6
    1979 echo "configure:1980: checking for make/custom/$RTEMS_BSP.cfg" >&5
     1985echo "configure:1986: checking for make/custom/$RTEMS_BSP.cfg" >&5
    19801986if test -r "$srcdir/$RTEMS_TOPdir/make/custom/$RTEMS_BSP.cfg"; then
    19811987  echo "$ac_t""yes" 1>&6
     
    19841990fi
    19851991
     1992
    19861993echo $ac_n "checking whether BSP supports multiprocessing""... $ac_c" 1>&6
    1987 echo "configure:1988: checking whether BSP supports multiprocessing" >&5
     1994echo "configure:1995: checking whether BSP supports multiprocessing" >&5
    19881995if eval "test \"`echo '$''{'rtems_cv_HAS_MP'+set}'`\" = set"; then
    19891996  echo $ac_n "(cached) $ac_c" 1>&6
     
    20082015
    20092016
     2017
    20102018echo $ac_n "checking whether BSP supports libposix""... $ac_c" 1>&6
    2011 echo "configure:2012: checking whether BSP supports libposix" >&5
     2019echo "configure:2020: checking whether BSP supports libposix" >&5
    20122020if eval "test \"`echo '$''{'rtems_cv_HAS_POSIX_API'+set}'`\" = set"; then
    20132021  echo $ac_n "(cached) $ac_c" 1>&6
     
    20382046set dummy gcc; ac_word=$2
    20392047echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2040 echo "configure:2041: checking for $ac_word" >&5
     2048echo "configure:2049: checking for $ac_word" >&5
    20412049if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    20422050  echo $ac_n "(cached) $ac_c" 1>&6
     
    20682076set dummy cc; ac_word=$2
    20692077echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2070 echo "configure:2071: checking for $ac_word" >&5
     2078echo "configure:2079: checking for $ac_word" >&5
    20712079if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    20722080  echo $ac_n "(cached) $ac_c" 1>&6
     
    21192127set dummy cl; ac_word=$2
    21202128echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    2121 echo "configure:2122: checking for $ac_word" >&5
     2129echo "configure:2130: checking for $ac_word" >&5
    21222130if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    21232131  echo $ac_n "(cached) $ac_c" 1>&6
     
    21512159
    21522160echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
    2153 echo "configure:2154: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     2161echo "configure:2162: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
    21542162
    21552163ac_ext=c
     
    21622170cat > conftest.$ac_ext << EOF
    21632171
    2164 #line 2165 "configure"
     2172#line 2173 "configure"
    21652173#include "confdefs.h"
    21662174
    21672175main(){return(0);}
    21682176EOF
    2169 if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     2177if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    21702178  ac_cv_prog_cc_works=yes
    21712179  # If we can't run a trivial program, we are probably using a cross compiler.
     
    21932201fi
    21942202echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
    2195 echo "configure:2196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     2203echo "configure:2204: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
    21962204echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
    21972205cross_compiling=$ac_cv_prog_cc_cross
    21982206
    21992207echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    2200 echo "configure:2201: checking whether we are using GNU C" >&5
     2208echo "configure:2209: checking whether we are using GNU C" >&5
    22012209if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    22022210  echo $ac_n "(cached) $ac_c" 1>&6
     
    22072215#endif
    22082216EOF
    2209 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     2217if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
    22102218  ac_cv_prog_gcc=yes
    22112219else
     
    22262234CFLAGS=
    22272235echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    2228 echo "configure:2229: checking whether ${CC-cc} accepts -g" >&5
     2236echo "configure:2237: checking whether ${CC-cc} accepts -g" >&5
    22292237if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    22302238  echo $ac_n "(cached) $ac_c" 1>&6
     
    22612269 
    22622270echo $ac_n "checking whether $RTEMS_HOST defines union semun""... $ac_c" 1>&6
    2263 echo "configure:2264: checking whether $RTEMS_HOST defines union semun" >&5
     2271echo "configure:2272: checking whether $RTEMS_HOST defines union semun" >&5
    22642272if eval "test \"`echo '$''{'rtems_cv_HAS_UNION_SEMUN'+set}'`\" = set"; then
    22652273  echo $ac_n "(cached) $ac_c" 1>&6
    22662274else
    22672275  cat > conftest.$ac_ext <<EOF
    2268 #line 2269 "configure"
     2276#line 2277 "configure"
    22692277#include "confdefs.h"
    22702278
     
    22762284; return 0; }
    22772285EOF
    2278 if { (eval echo configure:2279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     2286if { (eval echo configure:2287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    22792287  rm -rf conftest*
    22802288  rtems_cv_HAS_UNION_SEMUN="yes"
     
    23002308
    23012309echo $ac_n "checking whether $RTEMS_HOST supports System V semaphores""... $ac_c" 1>&6
    2302 echo "configure:2303: checking whether $RTEMS_HOST supports System V semaphores" >&5
     2310echo "configure:2311: checking whether $RTEMS_HOST supports System V semaphores" >&5
    23032311if eval "test \"`echo '$''{'rtems_cv_sysv_sem'+set}'`\" = set"; then
    23042312  echo $ac_n "(cached) $ac_c" 1>&6
     
    23092317else
    23102318  cat > conftest.$ac_ext <<EOF
    2311 #line 2312 "configure"
     2319#line 2320 "configure"
    23122320#include "confdefs.h"
    23132321
     
    23352343
    23362344EOF
    2337 if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2345if { (eval echo configure:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    23382346then
    23392347  rtems_cv_sysv_sem="yes"
     
    23582366
    23592367echo $ac_n "checking whether $RTEMS_HOST supports System V shared memory""... $ac_c" 1>&6
    2360 echo "configure:2361: checking whether $RTEMS_HOST supports System V shared memory" >&5
     2368echo "configure:2369: checking whether $RTEMS_HOST supports System V shared memory" >&5
    23612369if eval "test \"`echo '$''{'rtems_cv_sysv_shm'+set}'`\" = set"; then
    23622370  echo $ac_n "(cached) $ac_c" 1>&6
     
    23672375else
    23682376  cat > conftest.$ac_ext <<EOF
    2369 #line 2370 "configure"
     2377#line 2378 "configure"
    23702378#include "confdefs.h"
    23712379
     
    23832391
    23842392EOF
    2385 if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2393if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    23862394then
    23872395  rtems_cv_sysv_shm="yes"
     
    24062414
    24072415echo $ac_n "checking whether $RTEMS_HOST supports System V messages""... $ac_c" 1>&6
    2408 echo "configure:2409: checking whether $RTEMS_HOST supports System V messages" >&5
     2416echo "configure:2417: checking whether $RTEMS_HOST supports System V messages" >&5
    24092417if eval "test \"`echo '$''{'rtems_cv_sysv_msg'+set}'`\" = set"; then
    24102418  echo $ac_n "(cached) $ac_c" 1>&6
     
    24152423else
    24162424  cat > conftest.$ac_ext <<EOF
    2417 #line 2418 "configure"
     2425#line 2426 "configure"
    24182426#include "confdefs.h"
    24192427
     
    24312439
    24322440EOF
    2433 if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     2441if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    24342442then
    24352443  rtems_cv_sysv_msg="yes"
     
    24572465
    24582466echo $ac_n "checking for Makefile.in in $RTEMS_CPU""... $ac_c" 1>&6
    2459 echo "configure:2460: checking for Makefile.in in $RTEMS_CPU" >&5
     2467echo "configure:2468: checking for Makefile.in in $RTEMS_CPU" >&5
    24602468if test -d $srcdir/$RTEMS_CPU; then
    24612469  rtems_av_save_dir=`pwd`;
  • c/src/lib/aclocal.m4

    <
    rd83c39dc r4075af6f  
    2020AC_DEFUN(RTEMS_TOP,
    2121[dnl
     22AC_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl