diff options
Diffstat (limited to 'aclocal')
-rw-r--r-- | aclocal/check-newlib.m4 | 20 | ||||
-rw-r--r-- | aclocal/config-subdirs.m4 | 54 | ||||
-rw-r--r-- | aclocal/subdirs.m4 | 63 | ||||
-rw-r--r-- | aclocal/sysv-ipc.m4 | 16 | ||||
-rw-r--r-- | aclocal/target.m4 | 63 |
5 files changed, 109 insertions, 107 deletions
diff --git a/aclocal/check-newlib.m4 b/aclocal/check-newlib.m4 index 852ae4f2d5..a26624702e 100644 --- a/aclocal/check-newlib.m4 +++ b/aclocal/check-newlib.m4 @@ -14,20 +14,18 @@ dnl some versions of newlib provide not_required_by_rtems rtems_cv_use_newlib="yes") dnl some versions of newlib provide rtems_provides_crt0() - if test -z "$rtems_cv_use_newlib"; then - AC_TRY_LINK( + AS_IF([test -z "$rtems_cv_use_newlib"], + [AC_TRY_LINK( [extern void rtems_provides_crt0() ;], [rtems_provides_crt0()], rtems_cv_use_newlib="yes", - rtems_cv_use_newlib="no") - fi + rtems_cv_use_newlib="no")] + ) ]) -RTEMS_USE_NEWLIB="$rtems_cv_use_newlib" -AC_SUBST(RTEMS_USE_NEWLIB) + RTEMS_USE_NEWLIB="$rtems_cv_use_newlib" + AC_SUBST(RTEMS_USE_NEWLIB) -if test x"${RTEMS_USE_NEWLIB}" = x"yes"; -then - AC_DEFINE_UNQUOTED(RTEMS_NEWLIB,1,[if using newlib]) - AC_DEFINE_UNQUOTED(MALLOC_PROVIDED,1,[if malloc is provided]) -fi + AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"], + [ AC_DEFINE_UNQUOTED(RTEMS_NEWLIB,1,[if using newlib])] + ) ]) diff --git a/aclocal/config-subdirs.m4 b/aclocal/config-subdirs.m4 index 7711645014..6f9360bc80 100644 --- a/aclocal/config-subdirs.m4 +++ b/aclocal/config-subdirs.m4 @@ -9,44 +9,6 @@ dnl configure.in. dnl dnl -dnl _RTEMS_PUSH_BUILDDIR(SUBDIR) -dnl -AC_DEFUN(_RTEMS_PUSH_BUILDDIR, -[ -# _RTEMS_PUSH_BUILDDIR - echo configuring in $1 - case "$srcdir" in - .) ;; - *) AS_MKDIR_P([$1]) - ;; - esac - - ac_popdir=`pwd` - cd $1 -]) - -dnl -dnl _RTEMS_POP_BUILDDIR -dnl -AC_DEFUN(_RTEMS_POP_BUILDDIR, -[ - cd $ac_popdir -]) - -dnl -dnl _RTEMS_GIVEN_INSTALL -dnl -AC_DEFUN(_RTEMS_GIVEN_INSTALL, -[ -ifdef([AC_PROVIDE_AC_PROG_INSTALL],[ - case "$ac_given_INSTALL" in - [[\\/]]* | ?:[[\\/]]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac -])dnl -]) - -dnl dnl _AC_DOTS(PATH) dnl AC_DEFUN(_AC_DOTS,[ @@ -70,19 +32,3 @@ AC_DEFUN(_RTEMS_ADJUST_SRCDIR,[ $1=$ac_dots$srcdir/$2 ;; esac ]) - -dnl -dnl _RTEMS_SUB_SRCDIR(AC_CONFIG_DIR[,TARGET_SUBDIR]) -dnl -AC_DEFUN(_RTEMS_SUB_SRCDIR,[ -# _RTEMS_SUB_SRCDIR - _RTEMS_ADJUST_SRCDIR(ac_sub_srcdir,$1,$2) - - # Check for configure - if test -f $ac_sub_srcdir/configure; then - ac_sub_configure=$ac_sub_srcdir/configure - else - AC_MSG_WARN([no configuration information is in $1]) - ac_sub_configure= - fi -]) diff --git a/aclocal/subdirs.m4 b/aclocal/subdirs.m4 index 491811b019..fd51d1f231 100644 --- a/aclocal/subdirs.m4 +++ b/aclocal/subdirs.m4 @@ -1,4 +1,4 @@ -## All tools belong in one of the 3 categories, and are assigned above. +## All directories belong in one of 3 categories. ## ${HOST_CONFIGDIRS_LIST} is directories we build using the host tools. ## ${TARGET_CONFIGDIRS_LIST} is directories we build using the target tools. ## ${BUILD_CONFIGDIRS_LIST} is directories we build using the build tools @@ -30,19 +30,17 @@ _RTEMS_BUILD_CONFIG_PREPARE _RTEMS_HOST_CONFIG_PREPARE _RTEMS_TARGET_CONFIG_PREPARE -if test $build = $host; -then - if test $host = $target; - then - dnl b=h, h=t, t=b +AS_IF([test $build = $host], +[ + AS_IF([test $host = $target], + [dnl b=h, h=t, t=b BUILD_SUBDIRS="${build_configdirs}" build_configdirs="${build_configdirs}" HOST_SUBDIRS="" host_configdirs="" TARGET_SUBDIRS="" - target_configdirs="" - else - dnl b=h, h!=t, t!=b + target_configdirs=""], + [dnl b=h, h!=t, t!=b BUILD_SUBDIRS="${build_configdirs}" build_configdirs="${build_configdirs}" HOST_SUBDIRS="" @@ -50,31 +48,28 @@ then TARGET_SUBDIRS=`echo "${target_configdirs}" | \ sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"` target_configdirs="${target_configdirs}" - fi -else - if test $host = $target; - then - dnl b!=h, h=t, b!=t + ]) +],[ + AS_IF([test $host = $target], + [ dnl b!=h, h=t, b!=t BUILD_SUBDIRS="${build_configdirs}" build_configdirs="${build_configdirs}" HOST_SUBDIRS=`echo "${host_configdirs}" | \ sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"` host_configdirs="${host_configdirs}" TARGET_SUBDIRS="" - target_configdirs="" - else - if test $build = $target; - then - dnl b!=h, h!=t, b=t + target_configdirs=""], + [ + AS_IF([test $build = $target], + [dnl b!=h, h!=t, b=t BUILD_SUBDIRS="${build_configdirs}" build_configdirs="${build_configdirs}" HOST_SUBDIRS=`echo "${host_configdirs}" | \ sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"` host_configdirs="${host_configdirs}" TARGET_SUBDIRS="" - target_configdirs="" - else - dnl b!=h, h!=t, b!=t + target_configdirs=""], + [dnl b!=h, h!=t, b!=t BUILD_SUBDIRS="${build_configdirs}" build_configdirs="${build_configdirs}" HOST_SUBDIRS=`echo "${host_configdirs}" | \ @@ -83,9 +78,9 @@ else TARGET_SUBDIRS=`echo "${target_configdirs}" | \ sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"` target_configdirs="${target_configdirs}" - fi - fi -fi + ]) + ]) +]) AC_SUBST(HOST_SUBDIRS) AC_SUBST(TARGET_SUBDIRS) @@ -125,15 +120,15 @@ m4_if([$2],, esac]) ac_builddir=. -if test $dstdir != .; then - # Strip off leading ./ +AS_IF([test $dstdir != .], +[ # Strip off leading ./ ac_builddir_suffix=/`echo $dstdir | sed 's,^\.[[\\/]],,'` ac_srcdir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_builddir_suffix" | sed 's,/[[^\\/]]*,../,g'` -else +],[ ac_dir_suffix= ac_top_builddir= -fi +]) case $srcdir in .) # No --srcdir option. We are building in place. @@ -260,7 +255,7 @@ fi ]) ## PUBLIC: RTEMS_BUILD_CONFIG_SUBDIRS(build_subdir) -# tools to be built for the build environment +# subdirs to be built for the build environment AC_DEFUN([RTEMS_BUILD_CONFIG_SUBDIRS],[ m4_append([_RTEMS_BUILD_CONFIGDIRS_LIST],[ $1]) dnl Always append to build_configdirs @@ -290,8 +285,8 @@ build_subdir="." ],[]) ]) -## PUBLIC: RTEMS_HOST_CONFIG_SUBDIR(host_subdir) -# libraries to be build for the host environment +## PUBLIC: RTEMS_HOST_CONFIG_SUBDIRS(host_subdir) +# subdirs to be build for the host environment AC_DEFUN([RTEMS_HOST_CONFIG_SUBDIRS],[ m4_append([_RTEMS_HOST_CONFIGDIRS_LIST],[ $1])dnl @@ -341,8 +336,8 @@ host_subdir="${host_alias}" ],[]) ]) -## PUBLIC: RTEMS_TARGET(target_subdir) -# tools to be build for the target environment +## PUBLIC: RTEMS_TARGET_CONFIG_SUBDIRS(target_subdir) +# subdirs to be build for the target environment AC_DEFUN([RTEMS_TARGET_CONFIG_SUBDIRS],[ m4_append([_RTEMS_TARGET_CONFIGDIRS_LIST],[ $1]) diff --git a/aclocal/sysv-ipc.m4 b/aclocal/sysv-ipc.m4 index 00aa1bf32e..a22e8822c9 100644 --- a/aclocal/sysv-ipc.m4 +++ b/aclocal/sysv-ipc.m4 @@ -18,7 +18,7 @@ dnl msgget, semctl, shmctl and msgctl for details. AC_DEFUN(RTEMS_UNION_SEMUN, [ -AC_CACHE_CHECK([whether $RTEMS_HOST defines union semun], +AC_CACHE_CHECK([whether $host defines union semun], rtems_cv_HAS_UNION_SEMUN, [AC_TRY_COMPILE([ #include <sys/types.h> @@ -35,8 +35,8 @@ fi AC_DEFUN(RTEMS_SYSV_SEM, [AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([RTEMS_CANONICAL_HOST]) -AC_CACHE_CHECK(whether $RTEMS_HOST supports System V semaphores, +# AC_REQUIRE([RTEMS_CANONICAL_HOST]) +AC_CACHE_CHECK(whether $host supports System V semaphores, rtems_cv_sysv_sem, [ AC_TRY_RUN( @@ -69,8 +69,8 @@ rtems_cv_sysv_sem="yes", rtems_cv_sysv_sem="no", :) AC_DEFUN(RTEMS_SYSV_SHM, [AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([RTEMS_CANONICAL_HOST]) -AC_CACHE_CHECK(whether $RTEMS_HOST supports System V shared memory, +# AC_REQUIRE([RTEMS_CANONICAL_HOST]) +AC_CACHE_CHECK(whether $host supports System V shared memory, rtems_cv_sysv_shm, [ AC_TRY_RUN([ @@ -92,8 +92,8 @@ rtems_cv_sysv_shm="yes", rtems_cv_sysv_shm="no", :) AC_DEFUN(RTEMS_SYSV_MSG, [AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([RTEMS_CANONICAL_HOST]) -AC_CACHE_CHECK(whether $RTEMS_HOST supports System V messages, +# AC_REQUIRE([RTEMS_CANONICAL_HOST]) +AC_CACHE_CHECK(whether $host supports System V messages, rtems_cv_sysv_msg, [ AC_TRY_RUN([ @@ -114,7 +114,7 @@ rtems_cv_sysv_msg="yes", rtems_cv_sysv_msg="no", :) ]) AC_DEFUN(RTEMS_CHECK_SYSV_UNIX, -[AC_REQUIRE([RTEMS_CANONICAL_HOST]) +[# AC_REQUIRE([RTEMS_CANONICAL_HOST]) if test "$RTEMS_CPU" = "unix" ; then RTEMS_UNION_SEMUN RTEMS_SYSV_SEM diff --git a/aclocal/target.m4 b/aclocal/target.m4 index 5c0d67d0ea..6a23ea82c1 100644 --- a/aclocal/target.m4 +++ b/aclocal/target.m4 @@ -88,3 +88,66 @@ rtems_configure_args="$ac_configure_args" ## FIXME: This is obsolete. Only kept for backward compatibility AU_DEFUN([RTEMS_OUTPUT_BUILD_SUBDIRS],[]) + + +dnl +dnl Misc utility macros for subdir handling to work around missing abilities +dnl in autoconf, automake and structural issues with RTEMS +dnl +dnl Contains parts derived from autoconf-2.13 AC_OUTPUT_SUBDIRS and Cygnus' +dnl configure.in. +dnl + +dnl +dnl _RTEMS_PUSH_BUILDDIR(SUBDIR) +dnl +AC_DEFUN(_RTEMS_PUSH_BUILDDIR, +[ +# _RTEMS_PUSH_BUILDDIR + echo configuring in $1 + case "$srcdir" in + .) ;; + *) AS_MKDIR_P([$1]) + ;; + esac + + ac_popdir=`pwd` + cd $1 +]) + +dnl +dnl _RTEMS_POP_BUILDDIR +dnl +AC_DEFUN(_RTEMS_POP_BUILDDIR, +[ + cd $ac_popdir +]) + +dnl +dnl _RTEMS_GIVEN_INSTALL +dnl +AC_DEFUN(_RTEMS_GIVEN_INSTALL, +[ +ifdef([AC_PROVIDE_AC_PROG_INSTALL],[ + case "$ac_given_INSTALL" in + [[\\/]]* | ?:[[\\/]]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac +])dnl +]) + +dnl +dnl _RTEMS_SUB_SRCDIR(AC_CONFIG_DIR[,TARGET_SUBDIR]) +dnl +AC_DEFUN(_RTEMS_SUB_SRCDIR,[ +# _RTEMS_SUB_SRCDIR + _RTEMS_ADJUST_SRCDIR(ac_sub_srcdir,$1,$2) + + # Check for configure + if test -f $ac_sub_srcdir/configure; then + ac_sub_configure=$ac_sub_srcdir/configure + else + AC_MSG_WARN([no configuration information is in $1]) + ac_sub_configure= + fi +]) |