source: rtems/tools/cpu/sh/aclocal.m4 @ 8c92fa3

4.104.114.84.95
Last change on this file since 8c92fa3 was 8c92fa3, checked in by Joel Sherrill <joel.sherrill@…>, on 06/16/99 at 14:55:28

Patcg from Ralf Corsepius <corsepiu@…>:

-- configure now fails to detect the toolchain for linux-posix.

As work-around, I have reverted to the old behavior of RTEMS_TARGET_CPU_NAME,
thus no_cpu/no_bsp will fail badly in configure again.

  • Property mode set to 100644
File size: 5.7 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl $Id$
14
15dnl
16dnl RTEMS_TOP($1)
17dnl
18dnl $1 .. relative path from this configure.in to the toplevel configure.in
19dnl
20AC_DEFUN(RTEMS_TOP,
21[dnl
22AC_ARG_WITH(target-subdir,
23[  --with-target-subdir=DIR],
24TARGET_SUBDIR="$withval",
25TARGET_SUBDIR=".")
26
27RTEMS_TOPdir="$1";
28AC_SUBST(RTEMS_TOPdir)
29
30PROJECT_ROOT=`pwd`/$RTEMS_TOPdir;
31test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.."
32AC_SUBST(PROJECT_ROOT)
33
34dnl Determine RTEMS Version string from the VERSION file
35dnl Hopefully, Joel never changes its format ;-
36AC_MSG_CHECKING([for RTEMS Version])
37if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
38changequote(,)dnl
39RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
40sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
41changequote([,])dnl
42else
43AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
44fi
45if test -z "$RTEMS_VERSION"; then
46AC_MSG_ERROR(Unable to determine version)
47fi
48AC_MSG_RESULT($RTEMS_VERSION)
49
50RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir;
51AC_SUBST(RTEMS_ROOT)
52])dnl
53
54dnl
55dnl $Id$
56dnl
57
58dnl canonicalize target cpu
59dnl NOTE: Most rtems targets do not fullfil autoconf's
60dnl target naming conventions "processor-vendor-os"
61dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
62dnl and we have to fix it for rtems ourselves
63
64AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
65[
66AC_CANONICAL_SYSTEM
67AC_MSG_CHECKING(rtems target cpu)
68changequote(,)dnl
69case "${target}" in
70  # hpux unix port should go here
71  i[3456]86-go32-rtems*)
72        RTEMS_CPU=i386
73        ;;
74  i[3456]86-pc-linux*)          # unix "simulator" port
75        RTEMS_CPU=unix
76        ;;
77  i[3456]86-*freebsd2*)         # unix "simulator" port
78        RTEMS_CPU=unix
79        ;;
80  no_cpu-*rtems*)
81        RTEMS_CPU=no_cpu
82        ;;
83  sparc-sun-solaris*)           # unix "simulator" port
84        RTEMS_CPU=unix
85        ;;
86  *)
87        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
88        ;;
89esac
90changequote([,])dnl
91AC_SUBST(RTEMS_CPU)
92AC_MSG_RESULT($RTEMS_CPU)
93])
94
95# Do all the work for Automake.  This macro actually does too much --
96# some checks are only needed if your package does certain things.
97# But this isn't really a big deal.
98
99# serial 1
100
101dnl Usage:
102dnl AM_INIT_AUTOMAKE(package,version, [no-define])
103
104AC_DEFUN(AM_INIT_AUTOMAKE,
105[AC_REQUIRE([AC_PROG_INSTALL])
106PACKAGE=[$1]
107AC_SUBST(PACKAGE)
108VERSION=[$2]
109AC_SUBST(VERSION)
110dnl test to see if srcdir already configured
111if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
112  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
113fi
114ifelse([$3],,
115AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
116AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
117AC_REQUIRE([AM_SANITY_CHECK])
118AC_REQUIRE([AC_ARG_PROGRAM])
119dnl FIXME This is truly gross.
120missing_dir=`cd $ac_aux_dir && pwd`
121AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
122AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
123AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
124AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
125AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
126AC_REQUIRE([AC_PROG_MAKE_SET])])
127
128#
129# Check to make sure that the build environment is sane.
130#
131
132AC_DEFUN(AM_SANITY_CHECK,
133[AC_MSG_CHECKING([whether build environment is sane])
134# Just in case
135sleep 1
136echo timestamp > conftestfile
137# Do `set' in a subshell so we don't clobber the current shell's
138# arguments.  Must try -L first in case configure is actually a
139# symlink; some systems play weird games with the mod time of symlinks
140# (eg FreeBSD returns the mod time of the symlink's containing
141# directory).
142if (
143   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
144   if test "[$]*" = "X"; then
145      # -L didn't work.
146      set X `ls -t $srcdir/configure conftestfile`
147   fi
148   if test "[$]*" != "X $srcdir/configure conftestfile" \
149      && test "[$]*" != "X conftestfile $srcdir/configure"; then
150
151      # If neither matched, then we have a broken ls.  This can happen
152      # if, for instance, CONFIG_SHELL is bash and it inherits a
153      # broken ls alias from the environment.  This has actually
154      # happened.  Such a system could not be considered "sane".
155      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
156alias in your environment])
157   fi
158
159   test "[$]2" = conftestfile
160   )
161then
162   # Ok.
163   :
164else
165   AC_MSG_ERROR([newly created file is older than distributed files!
166Check your system clock])
167fi
168rm -f conftest*
169AC_MSG_RESULT(yes)])
170
171dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
172dnl The program must properly implement --version.
173AC_DEFUN(AM_MISSING_PROG,
174[AC_MSG_CHECKING(for working $2)
175# Run test in a subshell; some versions of sh will print an error if
176# an executable is not found, even if stderr is redirected.
177# Redirect stdin to placate older versions of autoconf.  Sigh.
178if ($2 --version) < /dev/null > /dev/null 2>&1; then
179   $1=$2
180   AC_MSG_RESULT(found)
181else
182   $1="$3/missing $2"
183   AC_MSG_RESULT(missing)
184fi
185AC_SUBST($1)])
186
187AC_DEFUN(RTEMS_TOOLPATHS,
188[
189# tooldir='$(exec_prefix)/'$target_alias
190# Temporary work-around until building in source tree is supported
191tooldir='$(PROJECT_ROOT)'
192AC_SUBST(tooldir)
193
194project_includedir='$(tooldir)'/include
195AC_SUBST(project_includedir)
196
197project_libdir='$(tooldir)/lib$(MULTISUBDIR)'
198AC_SUBST(project_libdir)
199
200project_bindir='$(tooldir)/bin'
201AC_SUBST(project_bindir)
202])
203
Note: See TracBrowser for help on using the repository browser.