diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-10-18 13:14:49 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-10-18 13:14:49 +0000 |
commit | aac7fdd28cf1ffbce75e88a1174e75bf5dfa0f30 (patch) | |
tree | c738bfae54c1916b7637adb784317dc20e3d32b7 /macros/canonicalize-tools.m4 | |
parent | 2000-10-18 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-aac7fdd28cf1ffbce75e88a1174e75bf5dfa0f30.tar.bz2 |
2000-09-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* macros: New directory.
* macros/bsp-alias.m4: new file.
* macros/canonical-host.m4: new file.
* macros/canonical-target-name.m4: new file.
* macros/canonicalize-tools.m4: new file.
* macros/check-bsp-cache.m4: new file.
* macros/check-bsps.m4: new file.
* macros/check-cpu.m4: new file.
* macros/rtems-debug.m4: new file.
* macros/check-cxx.m4: new file.
* macros/check-itron.m4: new file.
* macros/check-multiprocessing.m4: new file.
* macros/check-networking.m4: new file.
* macros/check-newlib.m4: new file.
* macros/check-posix.m4: new file.
* macros/check-rdbg.m4: new file.
* macros/enable-bare.m4: new file.
* macros/enable-cxx.m4: new file.
* macros/enable-gcc28.m4: new file.
* macros/enable-inlines.m4: new file.
* macros/enable-itron.m4: new file.
* macros/enable-libcdir.m4: new file.
* macros/enable-multiprocessing.m4: new file.
* macros/enable-networking.m4: new file.
* macros/enable-posix.m4: new file.
* macros/enable-rdbg.m4: new file.
* macros/enable-rtemsbsp.m4: new file.
* macros/enable-tests.m4: new file.
* macros/gcc-pipe.m4: new file.
* macros/gcc-specs.m4: new file.
* macros/i386-gas-code16.m4: new file.
* macros/path-ksh.m4: new file.
* macros/path-perl.m4: new file.
* macros/prog-cc.m4: new file.
* macros/prog-cxx.m4: new file.
* macros/project-root.m4: new file.
* macros/rtems-top.m4: new file.
* macros/sysv-ipc.m4: new file.
* macros/target.m4: new file.
* macros/rtems-test-no-pause.m4: new file.
* macros/multilib.m4: new file.
* macros/tool-paths.m4: new file.
* macros/tool-prefix.m4: new file.
Diffstat (limited to 'macros/canonicalize-tools.m4')
-rw-r--r-- | macros/canonicalize-tools.m4 | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/macros/canonicalize-tools.m4 b/macros/canonicalize-tools.m4 new file mode 100644 index 0000000000..811825b538 --- /dev/null +++ b/macros/canonicalize-tools.m4 @@ -0,0 +1,75 @@ +dnl +dnl $Id$ +dnl +dnl Set target tools +dnl + +AC_DEFUN(RTEMS_HOST_AR, +[AC_CHECK_TOOL(AR,ar,no)]) + +AC_DEFUN(RTEMS_HOST_RANLIB, +[AC_CHECK_TOOL(RANLIB,ranlib,:)]) + +AC_DEFUN(RTEMS_GCC_PRINT, +[ + $1=`$CC --print-prog-name=$2` +]) + +AC_DEFUN(RTEMS_PATH_TOOL, +[ +AC_MSG_CHECKING([target's $2]) +AC_CACHE_VAL(ac_cv_path_$1,:) +AC_MSG_RESULT([$ac_cv_path_$1]) + +if test -n "$ac_cv_path_$1"; then + dnl retrieve the value from the cache + $1=$ac_cv_path_$1 +else + dnl the cache was not set + if test -z "[$]$1" ; then + if test "$ac_cv_prog_gcc" = "yes"; then + # We are using gcc, ask it about its tool + # NOTE: Necessary if gcc was configured to use the target's + # native tools or uses prefixes for gnutools (e.g. gas instead of as) + RTEMS_GCC_PRINT($1,$2) + fi + else + # The user set an environment variable. + # Check whether it is an absolute path, otherwise AC_PATH_PROG + # will override the environment variable, which isn't what the user + # intends + AC_MSG_CHECKING([whether environment variable $1 is an absolute path]) + case "[$]$1" in + /*) # valid + AC_MSG_RESULT("yes") + ;; + *) # invalid for AC_PATH_PROG + AC_MSG_RESULT("no") + AC_MSG_ERROR([***] + [Environment variable $1 should either] + [be unset (preferred) or contain an absolute path]) + ;; + esac + fi + + AC_PATH_PROG($1,"$program_prefix"$2,$3) +fi +]) + +AC_DEFUN(RTEMS_CANONICALIZE_TOOLS, +[AC_REQUIRE([RTEMS_PROG_CC])dnl + +dnl FIXME: What shall be done if these tools are not available? + RTEMS_HOST_AR(AR,ar,no) + RTEMS_PATH_TOOL(AS,as,no) + RTEMS_PATH_TOOL(LD,ld,no) + RTEMS_PATH_TOOL(NM,nm,no) + +dnl special treatment of ranlib + RTEMS_HOST_RANLIB + +dnl NOTE: These may not be available if not using gnutools + AC_CHECK_TOOL(OBJCOPY,objcopy,no) + AC_CHECK_TOOL(SIZE,size,no) + AC_CHECK_TOOL(STRIP,strip,:) +]) |