source: rtems/c/build-tools/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
RevLine 
[04c308c]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
[9b8baa1]15dnl
16dnl RTEMS_TOP($1)
17dnl
18dnl $1 .. relative path from this configure.in to the toplevel configure.in
19dnl
[04c308c]20AC_DEFUN(RTEMS_TOP,
21[dnl
[8cdb582]22AC_ARG_WITH(target-subdir,
23[  --with-target-subdir=DIR],
24TARGET_SUBDIR="$withval",
25TARGET_SUBDIR=".")
26
[04c308c]27RTEMS_TOPdir="$1";
28AC_SUBST(RTEMS_TOPdir)
29
30PROJECT_ROOT=`pwd`/$RTEMS_TOPdir;
[8cdb582]31test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.."
[04c308c]32AC_SUBST(PROJECT_ROOT)
33
[9b8baa1]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
[8cdb582]50RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir;
51AC_SUBST(RTEMS_ROOT)
[04c308c]52])dnl
53
54# Do all the work for Automake.  This macro actually does too much --
55# some checks are only needed if your package does certain things.
56# But this isn't really a big deal.
57
58# serial 1
59
60dnl Usage:
61dnl AM_INIT_AUTOMAKE(package,version, [no-define])
62
63AC_DEFUN(AM_INIT_AUTOMAKE,
64[AC_REQUIRE([AC_PROG_INSTALL])
65PACKAGE=[$1]
66AC_SUBST(PACKAGE)
67VERSION=[$2]
68AC_SUBST(VERSION)
69dnl test to see if srcdir already configured
70if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
71  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
72fi
73ifelse([$3],,
74AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
75AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
76AC_REQUIRE([AM_SANITY_CHECK])
77AC_REQUIRE([AC_ARG_PROGRAM])
78dnl FIXME This is truly gross.
79missing_dir=`cd $ac_aux_dir && pwd`
80AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
81AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
82AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
83AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
84AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
85AC_REQUIRE([AC_PROG_MAKE_SET])])
86
87#
88# Check to make sure that the build environment is sane.
89#
90
91AC_DEFUN(AM_SANITY_CHECK,
92[AC_MSG_CHECKING([whether build environment is sane])
93# Just in case
94sleep 1
95echo timestamp > conftestfile
96# Do `set' in a subshell so we don't clobber the current shell's
97# arguments.  Must try -L first in case configure is actually a
98# symlink; some systems play weird games with the mod time of symlinks
99# (eg FreeBSD returns the mod time of the symlink's containing
100# directory).
101if (
102   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
103   if test "[$]*" = "X"; then
104      # -L didn't work.
105      set X `ls -t $srcdir/configure conftestfile`
106   fi
107   if test "[$]*" != "X $srcdir/configure conftestfile" \
108      && test "[$]*" != "X conftestfile $srcdir/configure"; then
109
110      # If neither matched, then we have a broken ls.  This can happen
111      # if, for instance, CONFIG_SHELL is bash and it inherits a
112      # broken ls alias from the environment.  This has actually
113      # happened.  Such a system could not be considered "sane".
114      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
115alias in your environment])
116   fi
117
118   test "[$]2" = conftestfile
119   )
120then
121   # Ok.
122   :
123else
124   AC_MSG_ERROR([newly created file is older than distributed files!
125Check your system clock])
126fi
127rm -f conftest*
128AC_MSG_RESULT(yes)])
129
130dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
131dnl The program must properly implement --version.
132AC_DEFUN(AM_MISSING_PROG,
133[AC_MSG_CHECKING(for working $2)
134# Run test in a subshell; some versions of sh will print an error if
135# an executable is not found, even if stderr is redirected.
136# Redirect stdin to placate older versions of autoconf.  Sigh.
137if ($2 --version) < /dev/null > /dev/null 2>&1; then
138   $1=$2
139   AC_MSG_RESULT(found)
140else
141   $1="$3/missing $2"
142   AC_MSG_RESULT(missing)
143fi
144AC_SUBST($1)])
145
146dnl $Id$
147
148AC_DEFUN(RTEMS_PATH_KSH,
149[
150dnl NOTE: prefer bash over ksh over sh
151AC_PATH_PROGS(KSH,bash ksh sh)
152if test -z "$KSH"; then
153dnl NOTE: This cannot happen -- /bin/sh must always exist
154AC_MSG_ERROR(
155[***]
156[    Cannot determine a usable shell bash/ksh/sh]
157[    Please contact your system administrator] );
158fi
159])
160
161# Like AC_CONFIG_HEADER, but automatically create stamp file.
162
163AC_DEFUN(AM_CONFIG_HEADER,
164[AC_PREREQ([2.12])
165AC_CONFIG_HEADER([$1])
166dnl When config.status generates a header, we must update the stamp-h file.
167dnl This file resides in the same directory as the config header
168dnl that is generated.  We must strip everything past the first ":",
169dnl and everything past the last "/".
170AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
171ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
172<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
173<<am_indx=1
174for am_file in <<$1>>; do
175  case " <<$>>CONFIG_HEADERS " in
176  *" <<$>>am_file "*<<)>>
177    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
178    ;;
179  esac
180  am_indx=`expr "<<$>>am_indx" + 1`
181done<<>>dnl>>)
182changequote([,]))])
183
Note: See TracBrowser for help on using the repository browser.