diff options
Diffstat (limited to 'aclocal')
-rw-r--r-- | aclocal/canonicalize-tools.m4 | 2 | ||||
-rw-r--r-- | aclocal/gcc-pipe.m4 | 2 | ||||
-rw-r--r-- | aclocal/prog-cc.m4 | 25 | ||||
-rw-r--r-- | aclocal/prog-cxx.m4 | 12 | ||||
-rw-r--r-- | aclocal/rtems-top.m4 | 7 | ||||
-rw-r--r-- | aclocal/sysv-ipc.m4 | 30 | ||||
-rw-r--r-- | aclocal/tool-paths.m4 | 7 | ||||
-rw-r--r-- | aclocal/tool-prefix.m4 | 6 |
8 files changed, 74 insertions, 17 deletions
diff --git a/aclocal/canonicalize-tools.m4 b/aclocal/canonicalize-tools.m4 index 762e98bf74..ef9d241539 100644 --- a/aclocal/canonicalize-tools.m4 +++ b/aclocal/canonicalize-tools.m4 @@ -13,7 +13,7 @@ dnl AC_DEFUN(RTEMS_GCC_PRINT, [ case $host_os in - *cygwin32*) + *cygwin*) dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/' dnl Should be removed once cygwin/egcs reports '/' only $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' ` diff --git a/aclocal/gcc-pipe.m4 b/aclocal/gcc-pipe.m4 index 1e5b52be50..3bee3e5e92 100644 --- a/aclocal/gcc-pipe.m4 +++ b/aclocal/gcc-pipe.m4 @@ -14,7 +14,7 @@ AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe, rtems_cv_gcc_pipe=no if test "$rtems_cv_prog_gcc" = "yes"; then case "$host_os" in - cygwin32*) + cygwin*) ;; *) echo 'void f(){}' >conftest.c diff --git a/aclocal/prog-cc.m4 b/aclocal/prog-cc.m4 index 864a3c3e07..b89161305b 100644 --- a/aclocal/prog-cc.m4 +++ b/aclocal/prog-cc.m4 @@ -63,3 +63,28 @@ unset ac_cv_prog_cc_g unset ac_cv_prog_cc_works unset ac_cv_prog_cc_cross ]) + +AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET, +[ +dnl check target cc +RTEMS_PROG_CC +dnl check if the compiler supports --specs +RTEMS_GCC_SPECS +dnl check if the target compiler may use --pipe +RTEMS_GCC_PIPE +dnl check if the compiler supports --specs if gcc28 is requested +if test "$RTEMS_USE_GCC272" != "yes" ; then + if test "$rtems_cv_gcc_specs" = "no"; then + AC_MSG_WARN([*** disabling --enable-gcc28]) + RTEMS_USE_GCC272=yes + fi +fi +test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe" + +dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-* +case $host_os in +*cygwin*) GCCSED="| sed 's%\\\\%/%g'" ;; +*) ;; +esac +AC_SUBST(GCCSED) +]) diff --git a/aclocal/prog-cxx.m4 b/aclocal/prog-cxx.m4 index 5875692943..426eb6dae0 100644 --- a/aclocal/prog-cxx.m4 +++ b/aclocal/prog-cxx.m4 @@ -63,3 +63,15 @@ unset ac_cv_prog_cc_g unset ac_cv_prog_cxx_works unset ac_cv_prog_cxx_cross ]) + +AC_DEFUN(RTEMS_PROG_CXX_FOR_TARGET, +[ + RTEMS_PROG_CXX + if test "$rtems_cv_prog_cc_cross" != "$rtems_cv_prog_cxx_cross"; then + AC_MSG_ERROR([***] + [Inconsistency in compiler configuration:] + [Target C compiler and Target C++ compiler] + [must both either be cross compilers or native compilers] + [Hint: If building a posix bsp: LD_LIBRARY_PATH?] ) + fi +]) diff --git a/aclocal/rtems-top.m4 b/aclocal/rtems-top.m4 index b58491c3c2..76af32acd6 100644 --- a/aclocal/rtems-top.m4 +++ b/aclocal/rtems-top.m4 @@ -15,10 +15,6 @@ TARGET_SUBDIR=".") RTEMS_TOPdir="$1"; AC_SUBST(RTEMS_TOPdir) -PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; -test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.." -AC_SUBST(PROJECT_ROOT) - dnl Determine RTEMS Version string from the VERSION file dnl Hopefully, Joel never changes its format ;- AC_MSG_CHECKING([for RTEMS Version]) @@ -34,7 +30,4 @@ if test -z "$RTEMS_VERSION"; then AC_MSG_ERROR(Unable to determine version) fi AC_MSG_RESULT($RTEMS_VERSION) - -RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; -AC_SUBST(RTEMS_ROOT) ])dnl diff --git a/aclocal/sysv-ipc.m4 b/aclocal/sysv-ipc.m4 index 396dcffbb7..59a5f5b50c 100644 --- a/aclocal/sysv-ipc.m4 +++ b/aclocal/sysv-ipc.m4 @@ -17,8 +17,8 @@ dnl modify any existing key sets. See the man pages for semget, shmget, dnl msgget, semctl, shmctl and msgctl for details. AC_DEFUN(RTEMS_SYSV_SEM, -[AC_REQUIRE([RTEMS_PROG_CC]) -AC_REQUIRE([AC_CANONICAL_HOST]) +[AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([RTEMS_CANONICAL_HOST]) AC_CACHE_CHECK(whether $RTEMS_HOST supports System V semaphores, rtems_cv_sysv_sem, [ @@ -50,8 +50,8 @@ rtems_cv_sysv_sem="yes", rtems_cv_sysv_sem="no", :) ]) AC_DEFUN(RTEMS_SYSV_SHM, -[AC_REQUIRE([RTEMS_PROG_CC]) -AC_REQUIRE([AC_CANONICAL_HOST]) +[AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([RTEMS_CANONICAL_HOST]) AC_CACHE_CHECK(whether $RTEMS_HOST supports System V shared memory, rtems_cv_sysv_shm, [ @@ -73,8 +73,8 @@ rtems_cv_sysv_shm="yes", rtems_cv_sysv_shm="no", :) ]) AC_DEFUN(RTEMS_SYSV_MSG, -[AC_REQUIRE([RTEMS_PROG_CC]) -AC_REQUIRE([AC_CANONICAL_HOST]) +[AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([RTEMS_CANONICAL_HOST]) AC_CACHE_CHECK(whether $RTEMS_HOST supports System V messages, rtems_cv_sysv_msg, [ @@ -94,3 +94,21 @@ int main () { rtems_cv_sysv_msg="yes", rtems_cv_sysv_msg="no", :) ]) ]) + +AC_DEFUN(RTEMS_CHECK_SYSV_UNIX, +[AC_REQUIRE([RTEMS_CANONICAL_HOST]) +if test "$RTEMS_CPU" = "unix" ; then + RTEMS_SYSV_SEM + if test "$rtems_cv_sysv_sem" != "yes" ; then + AC_MSG_ERROR([System V semaphores don't work, required by simulator]) + fi + RTEMS_SYSV_SHM + if test "$rtems_cv_sysv_shm" != "yes" ; then + AC_MSG_ERROR([System V shared memory doesn't work, required by simulator]) + fi + RTEMS_SYSV_MSG + if test "$rtems_cv_sysv_msg" != "yes" ; then + AC_MSG_ERROR([System V messages don't work, required by simulator]) + fi +fi +]) diff --git a/aclocal/tool-paths.m4 b/aclocal/tool-paths.m4 index b6a7f5500d..cb61747afd 100644 --- a/aclocal/tool-paths.m4 +++ b/aclocal/tool-paths.m4 @@ -2,6 +2,8 @@ AC_DEFUN(RTEMS_TOOLPATHS, [ # tooldir='$(exec_prefix)/'$target_alias # Temporary work-around until building in source tree is supported +AC_REQUIRE([RTEMS_PROJECT_ROOT]) + tooldir='$(PROJECT_ROOT)' AC_SUBST(tooldir) @@ -13,4 +15,9 @@ AC_SUBST(project_libdir) project_bindir='$(tooldir)/bin' AC_SUBST(project_bindir) + +rtems_bspdir='$(prefix)/${RTEMS_BSP}' +AC_SUBST(rtems_bspdir) +rtems_makedir='$(prefix)/make' +AC_SUBST(rtems_makedir) ]) diff --git a/aclocal/tool-prefix.m4 b/aclocal/tool-prefix.m4 index d7fe6a9b38..563cca8e8f 100644 --- a/aclocal/tool-prefix.m4 +++ b/aclocal/tool-prefix.m4 @@ -10,11 +10,13 @@ AC_DEFUN(RTEMS_TOOL_PREFIX, [AC_REQUIRE([AC_CANONICAL_TARGET])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl -if [[ "${program_prefix}" = "NONE" ]] ; then - if [[ "${target}" = "${host}" ]] ; then +changequote(,)dnl +if [ "${program_prefix}" = "NONE" ] ; then + if [ "${target}" = "${host}" ] ; then program_prefix= else program_prefix=${target}- fi fi +changequote([,])dnl ]) |