source: rtems/c/src/tests/tools/generic/aclocal.m4 @ 8cdb582

4.104.114.84.95
Last change on this file since 8cdb582 was 8cdb582, checked in by Joel Sherrill <joel.sherrill@…>, on 04/12/99 at 15:41:33

Patch from Ralf Corsepius <corsepiu@…>:

This patch addresses a few minor issues and contains a few (minor)
preparations for automake.

  • configure.in: Fix for handing c/src/tests subdirectory handling (FIX)
  • aclocal/rtems-top.m4: + Add TARGET_SUBDIR and --with-target-subdir (preparation of future

enhancements for cross-compiling)

+ Activate RTEMS_ROOT handling (automake preparation)

  • automake/*.am: replace comments "#" with "##" so that comments won't get included into Makefile.in's anymore
  • c/update-tools/* automake support (NEW)
  • ./autogen update/enhancement (cf. ./autogen for details)

After applying this patch please run:

./autogen
cvs add c/update-tools/configure.in
cvs add c/update-tools/Makefile.am
cvs add c/update-tools/aclocal.m4

  • 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
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_REQUIRE([AC_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        target_cpu=i386
73        ;;
74  i[3456]86-pc-linux*)          # unix "simulator" port
75        target_cpu=unix
76        ;;
77  i[3456]86-*freebsd2*)         # unix "simulator" port
78        target_cpu=unix
79        ;;
80  no_cpu-*rtems*)
81        target_cpu=no_cpu
82        ;;
83  ppc*-*rtems*)
84        target_cpu=powerpc
85        ;;
86  sparc-sun-solaris*)           # unix "simulator" port
87        target_cpu=unix
88        ;;
89  *)
90        target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
91        ;;
92esac
93changequote([,])dnl
94AC_MSG_RESULT($target_cpu)
95])
96
97# Do all the work for Automake.  This macro actually does too much --
98# some checks are only needed if your package does certain things.
99# But this isn't really a big deal.
100
101# serial 1
102
103dnl Usage:
104dnl AM_INIT_AUTOMAKE(package,version, [no-define])
105
106AC_DEFUN(AM_INIT_AUTOMAKE,
107[AC_REQUIRE([AC_PROG_INSTALL])
108PACKAGE=[$1]
109AC_SUBST(PACKAGE)
110VERSION=[$2]
111AC_SUBST(VERSION)
112dnl test to see if srcdir already configured
113if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
114  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
115fi
116ifelse([$3],,
117AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
118AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
119AC_REQUIRE([AM_SANITY_CHECK])
120AC_REQUIRE([AC_ARG_PROGRAM])
121dnl FIXME This is truly gross.
122missing_dir=`cd $ac_aux_dir && pwd`
123AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
124AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
125AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
126AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
127AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
128AC_REQUIRE([AC_PROG_MAKE_SET])])
129
130#
131# Check to make sure that the build environment is sane.
132#
133
134AC_DEFUN(AM_SANITY_CHECK,
135[AC_MSG_CHECKING([whether build environment is sane])
136# Just in case
137sleep 1
138echo timestamp > conftestfile
139# Do `set' in a subshell so we don't clobber the current shell's
140# arguments.  Must try -L first in case configure is actually a
141# symlink; some systems play weird games with the mod time of symlinks
142# (eg FreeBSD returns the mod time of the symlink's containing
143# directory).
144if (
145   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
146   if test "[$]*" = "X"; then
147      # -L didn't work.
148      set X `ls -t $srcdir/configure conftestfile`
149   fi
150   if test "[$]*" != "X $srcdir/configure conftestfile" \
151      && test "[$]*" != "X conftestfile $srcdir/configure"; then
152
153      # If neither matched, then we have a broken ls.  This can happen
154      # if, for instance, CONFIG_SHELL is bash and it inherits a
155      # broken ls alias from the environment.  This has actually
156      # happened.  Such a system could not be considered "sane".
157      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
158alias in your environment])
159   fi
160
161   test "[$]2" = conftestfile
162   )
163then
164   # Ok.
165   :
166else
167   AC_MSG_ERROR([newly created file is older than distributed files!
168Check your system clock])
169fi
170rm -f conftest*
171AC_MSG_RESULT(yes)])
172
173dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
174dnl The program must properly implement --version.
175AC_DEFUN(AM_MISSING_PROG,
176[AC_MSG_CHECKING(for working $2)
177# Run test in a subshell; some versions of sh will print an error if
178# an executable is not found, even if stderr is redirected.
179# Redirect stdin to placate older versions of autoconf.  Sigh.
180if ($2 --version) < /dev/null > /dev/null 2>&1; then
181   $1=$2
182   AC_MSG_RESULT(found)
183else
184   $1="$3/missing $2"
185   AC_MSG_RESULT(missing)
186fi
187AC_SUBST($1)])
188
189dnl $Id$
190
191AC_DEFUN(RTEMS_PATH_KSH,
192[
193dnl NOTE: prefer bash over ksh over sh
194AC_PATH_PROGS(KSH,bash ksh sh)
195if test -z "$KSH"; then
196dnl NOTE: This cannot happen -- /bin/sh must always exist
197AC_MSG_ERROR(
198[***]
199[    Cannot determine a usable shell bash/ksh/sh]
200[    Please contact your system administrator] );
201fi
202])
203
Note: See TracBrowser for help on using the repository browser.