[e1d8abb] | 1 | dnl Process this file with autoconf to produce a configure script. |
---|
| 2 | dnl |
---|
| 3 | dnl $Id$ |
---|
| 4 | |
---|
| 5 | AC_PREREQ(2.13) |
---|
| 6 | AC_INIT(README) |
---|
| 7 | RTEMS_TOP(../../../..) |
---|
| 8 | AC_CONFIG_AUX_DIR(../../../..) |
---|
| 9 | |
---|
| 10 | RTEMS_CANONICAL_TARGET_CPU |
---|
| 11 | AC_PROG_MAKE_SET |
---|
| 12 | AC_PROG_INSTALL |
---|
| 13 | AM_MAINTAINER_MODE |
---|
| 14 | |
---|
| 15 | RTEMS_ENABLE_MULTIPROCESSING |
---|
| 16 | RTEMS_ENABLE_NETWORKING |
---|
| 17 | RTEMS_ENABLE_LIBCDIR |
---|
| 18 | RTEMS_ENABLE_BARE |
---|
| 19 | |
---|
| 20 | RTEMS_ENV_RTEMSBSP |
---|
| 21 | |
---|
| 22 | RTEMS_CHECK_CPU |
---|
| 23 | RTEMS_CANONICAL_HOST |
---|
| 24 | |
---|
| 25 | RTEMS_PROJECT_ROOT |
---|
| 26 | |
---|
| 27 | dnl check target cc |
---|
| 28 | RTEMS_PROG_CC_FOR_TARGET |
---|
| 29 | RTEMS_CANONICALIZE_TOOLS |
---|
| 30 | |
---|
| 31 | dnl if this is an i386, does gas have good code16 support? |
---|
| 32 | RTEMS_I386_GAS_CODE16 |
---|
| 33 | AM_CONDITIONAL(RTEMS_GAS_CODE16,test "$RTEMS_GAS_CODE16" = "yes"); |
---|
| 34 | |
---|
| 35 | # find all the Makefiles for the BSPs |
---|
| 36 | makefiles="$makefiles $RTEMS_CPU/Makefile" |
---|
| 37 | |
---|
| 38 | if test "${RTEMS_BSP}" = "bare"; then |
---|
| 39 | makefiles="$makefiles bare/Makefile" |
---|
| 40 | fi |
---|
| 41 | |
---|
| 42 | RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP) |
---|
| 43 | RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP) |
---|
| 44 | RTEMS_CHECK_NETWORKING(RTEMS_BSP) |
---|
| 45 | |
---|
| 46 | RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir) |
---|
| 47 | |
---|
| 48 | # Is there code where there should be for this BSP? |
---|
| 49 | # The bare bsp is a special case as it is not under the RTEMS_CPU path |
---|
| 50 | case ${RTEMS_BSP} in |
---|
| 51 | bare) |
---|
| 52 | bspcpudir= |
---|
| 53 | if test "X${BARE_CPU_CFLAGS}" = "X" ; then |
---|
| 54 | AC_MSG_ERROR([--enable-bare-cpu-cflags not specified for bare bsp]) |
---|
| 55 | fi |
---|
| 56 | if test "X${BARE_CPU_MODEL}" = "X" ; then |
---|
| 57 | AC_MSG_ERROR([--enable-bare-cpu-model not specified for bare bsp]) |
---|
| 58 | fi |
---|
| 59 | ;; |
---|
| 60 | *) |
---|
| 61 | bspcpudir=$RTEMS_CPU/ |
---|
| 62 | ;; |
---|
| 63 | esac |
---|
| 64 | |
---|
| 65 | if test "$RTEMS_BSP" = "bare" ; then |
---|
| 66 | RTEMS_LIBBSP_CPU_SUBDIR="bare" |
---|
| 67 | else |
---|
| 68 | RTEMS_LIBBSP_CPU_SUBDIR='$(RTEMS_CPU)' |
---|
| 69 | fi |
---|
| 70 | AC_SUBST(RTEMS_LIBBSP_CPU_SUBDIR) |
---|
| 71 | |
---|
| 72 | if test -d "$srcdir/$bspcpudir$bspdir"; then |
---|
| 73 | RTEMS_CHECK_MAKEFILE(${bspcpudir}$bspdir) |
---|
| 74 | RTEMS_CHECK_MAKEFILE(${bspcpudir}shared) |
---|
| 75 | |
---|
| 76 | # HACK: sed out bsp-tools from makefiles |
---|
| 77 | t="$bspcpudir$bspdir/tools" |
---|
| 78 | if test -d "$srcdir/$t"; then |
---|
| 79 | bsptools_cfgdirs="$bsptools_cfgdirs $t" |
---|
| 80 | makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"` |
---|
| 81 | fi |
---|
| 82 | else |
---|
| 83 | AC_MSG_ERROR([unable to find libbsp subdirectory ($bspdir) for ${RTEMS_BSP}]) |
---|
| 84 | fi |
---|
| 85 | |
---|
| 86 | if test "$HAS_MP" = "yes"; then |
---|
| 87 | makefiles="$makefiles shmdr/Makefile" |
---|
| 88 | else |
---|
| 89 | # HACK: sed out shmsupp/Makefile from makefiles |
---|
| 90 | t="$bspcpudir$bspdir/shmsupp" |
---|
| 91 | makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"` |
---|
| 92 | fi |
---|
| 93 | AM_CONDITIONAL(HAS_MP,test "$HAS_MP" = "yes") |
---|
| 94 | |
---|
| 95 | AC_CONFIG_SUBDIRS($bsptools_cfgdirs) |
---|
| 96 | |
---|
| 97 | # try to explicitly list a Makefile here |
---|
| 98 | AC_OUTPUT( |
---|
| 99 | Makefile |
---|
| 100 | $makefiles) |
---|