source: rtems/tools/cpu/hppa1.1/aclocal.m4 @ 244ecd9

4.104.114.84.95
Last change on this file since 244ecd9 was 244ecd9, checked in by Joel Sherrill <joel.sherrill@…>, on 03/24/99 at 23:14:36

These files were not added as part of a recent patch from
Ralf Corsepius <corsepiu@…>.

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