📄 aclocal.m4
字号:
])dnl $Id: env-rtemsbsp.m4,v 1.10.2.1 2004/08/18 07:23:00 ralf Exp $dnl Pass a single BSP via an environment variablednl used by per BSP configure scriptsAC_DEFUN([RTEMS_ENV_RTEMSBSP],[dnlAC_BEFORE([$0], [RTEMS_ENABLE_RTEMSBSP])dnlAC_BEFORE([$0], [RTEMS_PROJECT_ROOT])dnlAC_BEFORE([$0], [RTEMS_CHECK_CUSTOM_BSP])dnlAC_ARG_VAR([CPU_CFLAGS],[CFLAGS specifying CPU-dependent features])AC_ARG_VAR([CFLAGS_OPTIMIZE_V],[CFLAGS for building the OPTIMIZE variant])AC_ARG_VAR([CFLAGS_DEBUG_V],[CFLAGS for building the DEBUG variant])AC_ARG_VAR([CFLAGS_PROFILE_V],[CFLAGS for building the PROFILE variant])AC_ARG_VAR([RTEMS_BSP_FAMILY],[RTEMS's BSP directory])AC_ARG_VAR([RTEMS_CPU_MODEL],[RTEMS's cpu model])AC_ARG_VAR([RTEMS_BSP],[RTEMS_BSP to build])AC_MSG_CHECKING([for RTEMS_BSP])AC_CACHE_VAL(rtems_cv_RTEMS_BSP,[dnl test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP";])dnlif test -z "$rtems_cv_RTEMS_BSP"; then AC_MSG_ERROR([Missing RTEMS_BSP])fiRTEMS_BSP="$rtems_cv_RTEMS_BSP"AC_MSG_RESULT(${RTEMS_BSP})AC_SUBST(RTEMS_BSP)RTEMS_BSP_SPECS="-specs bsp_specs -qrtems"AC_SUBST(RTEMS_BSP_SPECS)GCC_SPECS="-B\$(PROJECT_ROOT)/lib/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/"AC_SUBST(GCC_SPECS)PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"AC_SUBST(PROJECT_INCLUDE)PROJECT_RELEASE="\$(PROJECT_ROOT)/$RTEMS_BSP" AC_SUBST(PROJECT_RELEASE)RTEMS_ROOT="\$(PROJECT_ROOT)/c/$RTEMS_BSP"AC_SUBST(RTEMS_ROOT)RTEMS_ENABLE_BAREAC_SUBST(BARE_CPU_MODEL)AC_SUBST(BARE_CPU_CFLAGS)AM_CONDITIONAL([MULTILIB],[false])includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include"libdir="\${exec_prefix}/${RTEMS_BSP}/lib"bsplibdir="\${exec_prefix}/${RTEMS_BSP}/lib"AC_SUBST(bsplibdir)])dnl $Id: enable-rtemsbsp.m4,v 1.12.2.1 2004/08/18 07:23:00 ralf Exp $dnl Override the set of BSPs to be built.dnl used by the toplevel configure scriptdnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list)AC_DEFUN([RTEMS_ENABLE_RTEMSBSP],[AC_BEFORE([$0], [RTEMS_ENV_RTEMSBSP])AC_ARG_ENABLE(rtemsbsp,[AC_HELP_STRING([--enable-rtemsbsp="bsp1 bsp2 .."],[BSPs to include in build])],[case "${enableval}" in yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp="bsp1 bsp2"]);; *) $1=$enableval;;esac],[$1=""])])dnldnl $Id: project-root.m4,v 1.6.4.1 2004/08/18 07:23:00 ralf Exp $dnl dnldnl PROJECT_TOPdir .. relative path to the top of the build-treednl PROJECT_ROOT .. relative path to the top of the temporarydnl installation directory inside the build-treednl RTEMS_TOPdir .. relative path of a subpackage's configure.in to thednl toplevel configure.in of the source-treednl RTEMS_ROOT .. path to the top of a bsp's build directorydnl [Applied by custom/*.cfg, depredicated otherwise]dnlAC_DEFUN([RTEMS_PROJECT_ROOT],[dnlAC_REQUIRE([RTEMS_TOP])PACKHEX="\$(PROJECT_TOPdir)/tools/build/packhex"AC_SUBST(PACKHEX)])dnl $Id: check-custom-bsp.m4,v 1.1.2.1 2004/08/18 07:23:00 ralf Exp $AC_DEFUN([RTEMS_CHECK_CUSTOM_BSP],[AC_REQUIRE([RTEMS_TOP])AC_MSG_CHECKING([for make/custom/[$]$1.cfg])AS_IF([test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no])])])dnl $Id: check-cpu.m4,v 1.6.2.1 2004/08/18 07:23:00 ralf Exp $dnl check if RTEMS support a cpuAC_DEFUN([RTEMS_CHECK_CPU],[dnlAC_REQUIRE([RTEMS_TOP])AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])# Is this a supported CPU?AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])# FIXME: Temporary hackif test -d "$srcdir/$RTEMS_TOPdir/cpukit/score/cpu/$RTEMS_CPU"; then AC_MSG_RESULT(yes)else AC_MSG_ERROR(no)fi])dnldnl $Id: canonical-host.m4,v 1.6.6.1 2004/08/18 07:23:00 ralf Exp $AC_DEFUN([RTEMS_CANONICAL_HOST],[dnlAC_REQUIRE([AC_CANONICAL_HOST])RTEMS_HOST=$host_oscase "${target}" in # hpux unix port should go here i[[34567]]86-*linux*) # unix "simulator" port RTEMS_HOST=Linux ;; i[[34567]]86-*freebsd*) # unix "simulator" port RTEMS_HOST=FreeBSD ;; i[[34567]]86-pc-cygwin*) # Cygwin is just enough unix like :) RTEMS_HOST=Cygwin ;; sparc-sun-solaris*) # unix "simulator" port RTEMS_HOST=Solaris ;; *) ;;esacAC_SUBST(RTEMS_HOST)])dnldnldnl $Id: check-multiprocessing.m4,v 1.11.4.1 2004/08/18 07:23:00 ralf Exp $dnlAC_DEFUN([RTEMS_CHECK_MULTIPROCESSING],[dnlAC_REQUIRE([RTEMS_ENABLE_MULTILIB])dnlAC_REQUIRE([RTEMS_ENV_RTEMSBSP])dnlAC_REQUIRE([RTEMS_TOP])dnlAC_REQUIRE([RTEMS_CHECK_CPU])dnlAC_REQUIRE([RTEMS_ENABLE_MULTIPROCESSING])dnlAC_REQUIRE([RTEMS_BSP_ALIAS])dnlAC_CACHE_CHECK([if wanting multiprocessing], [rtems_cv_want_multiprocessing], [ AS_IF([test x"$multilib" = x"no"], [# no cpukit rtems_cv_want_multiprocessing="$enable_multiprocessing" ],[#HACK: Should check for RTEMS_MULTIPROCESSING in cpuopts.h, instead rtems_cv_want_multiprocessing="$enable_multiprocessing" ]) ])AS_IF([test "$rtems_cv_want_multiprocessing" = "yes"],[ AC_CACHE_CHECK([whether BSP supports multiprocessing], [rtems_cv_HAS_MP],[ if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${RTEMS_BSP_FAMILY}/shmsupp"; then rtems_cv_HAS_MP="yes" ; else rtems_cv_HAS_MP="no"; fi ])if test $rtems_cv_HAS_MP = "no"; thenAC_MSG_ERROR([multiprocessing requested but not supported])fi],[rtems_cv_HAS_MP="no";])AC_SUBST(HAS_MP,[$rtems_cv_HAS_MP])])dnl This provides configure definitions used for multilib supportdnl parts of these macros are derived from newlib-1.8.2's multilib supportAC_DEFUN([RTEMS_ENABLE_MULTILIB],[AC_ARG_ENABLE(multilib,AC_HELP_STRING([--enable-multilib],[build many library versions (default=no)]),[case "${enableval}" in yes) multilib=yes ;; no) multilib=no ;; *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; esac], [multilib=no])dnlAM_CONDITIONAL(MULTILIB,test x"${multilib}" = x"yes")])dnl $Id: enable-multiprocessing.m4,v 1.6.2.1 2004/08/18 07:23:00 ralf Exp $AC_DEFUN([RTEMS_ENABLE_MULTIPROCESSING],[AC_ARG_ENABLE(multiprocessing,[AC_HELP_STRING([--enable-multiprocessing],[enable multiprocessing interface])],[case "${enable_multiprocessing}" in yes) ;; no) ;; *) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;esac],[enable_multiprocessing=no])])dnldnl $Id: bsp-alias.m4,v 1.16.2.3 2005/10/05 19:31:20 joel Exp $dnl dnl _RTEMS_BSP_ALIAS(BSP_ALIAS,RTEMS_BSP_FAMILY)dnl Internal subroutine to RTEMS_BSP_ALIASAC_DEFUN([_RTEMS_BSP_ALIAS],[# account for "aliased" bsps which share source code case $1 in simcpu32) $2=sim68000 ;; # BSVC CPU32 variant c3xsim) $2=c4xsim ;; # TI C3x Simulator in gdb mcp750) $2=motorola_powerpc ;; # Motorola PPC board variant mvme2100) $2=motorola_powerpc ;; # Motorola PPC board variant mvme2307) $2=motorola_powerpc ;; # Motorola PPC board variant mtx603e) $2=motorola_powerpc ;; # Motorola PPC board variant mvme162lx) $2=mvme162 ;; # m68k - mvme162 board variant gen68360_040) $2=gen68360 ;; # m68k - 68360 in companion mode p4600) $2=p4000 ;; # mips64orion - p4000 board w/IDT 4600 p4650) $2=p4000 ;; # mips64orion - p4000 board w/IDT 4650 mbx8*) $2=mbx8xx ;; # MBX821/MBX860 board pc386dx) $2=pc386 ;; # i386 - PC w/o FPU pc486) $2=pc386 ;; # i386 - PC with i486DX pc586) $2=pc386 ;; # i386 - PC with Pentium pc686) $2=pc386 ;; # i386 - PC with PentiumPro pck6) $2=pc386 ;; # i386 - PC with K6 bare*) $2=bare ;; # EXP: bare-aliases sis) $2=erc32 ;; # ERC32 SIS simulator leon2) $2=leon2 ;; # leon with fpu leon3) $2=leon3 ;; # another leon variant simsh7032) $2=shsim ;; # SH7032 simulator simsh7045) $2=shsim ;; # SH7045 simulator *) $2=$1;; esac])dnl RTEMS_BSP_ALIAS(BSP_ALIAS,RTEMS_BSP_FAMILY)dnl convert a bsp alias $1 into its bsp directory RTEMS_BSP_FAMILYAC_DEFUN([RTEMS_BSP_ALIAS],[_RTEMS_BSP_ALIAS(m4_if([$1],,[$RTEMS_BSP],[$1]), m4_if([$2],,[RTEMS_BSP_FAMILY],[$2]))])dnl $Id: check-posix.m4,v 1.8.4.1 2004/08/18 07:23:00 ralf Exp $dnlAC_DEFUN([RTEMS_CHECK_POSIX_API],[dnlAC_REQUIRE([RTEMS_CHECK_CPU])dnlAC_REQUIRE([RTEMS_ENABLE_POSIX])dnlAC_CACHE_CHECK([whether CPU supports libposix], rtems_cv_HAS_POSIX_API, [dnl case "$RTEMS_CPU" in unix*) rtems_cv_HAS_POSIX_API="no" ;; *) if test "${RTEMS_HAS_POSIX_API}" = "yes"; then rtems_cv_HAS_POSIX_API="yes"; else rtems_cv_HAS_POSIX_API="disabled"; fi ;; esac])if test "$rtems_cv_HAS_POSIX_API" = "yes"; then HAS_POSIX_API="yes";else HAS_POSIX_API="no";fiAC_SUBST(HAS_POSIX_API)dnl])AC_DEFUN([RTEMS_DEFINE_POSIX_API],[AC_REQUIRE([RTEMS_CHECK_POSIX_API])dnlAS_IF( [test x"${HAS_POSIX_API}" = x"yes"], [AC_DEFINE_UNQUOTED(RTEMS_POSIX_API,1,[if posix api is supported])])])dnl $Id: check-itron.m4,v 1.4.6.1 2004/08/18 07:23:00 ralf Exp $dnlAC_DEFUN([RTEMS_CHECK_ITRON_API],[dnlAC_REQUIRE([RTEMS_CHECK_CPU])dnlAC_REQUIRE([RTEMS_ENABLE_ITRON])dnlAC_CACHE_CHECK([whether CPU supports libitron], rtems_cv_HAS_ITRON_API, [dnl case "$RTEMS_CPU" in unix*) rtems_cv_HAS_ITRON_API="no" ;; *) if test "${RTEMS_HAS_ITRON_API}" = "yes"; then rtems_cv_HAS_ITRON_API="yes"; else rtems_cv_HAS_ITRON_API="disabled"; fi ;; esac])if test "$rtems_cv_HAS_ITRON_API" = "yes"; then HAS_ITRON_API="yes";else HAS_ITRON_API="no";fiAC_SUBST(HAS_ITRON_API)dnl])AC_DEFUN([RTEMS_DEFINE_ITRON_API],[AC_REQUIRE([RTEMS_CHECK_ITRON_API])dnlif test x"${HAS_ITRON_API}" = x"yes";then AC_DEFINE_UNQUOTED(RTEMS_ITRON_API,1,[if itron api is supported])fi])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -