source: rtems/c/update-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 Apr 12, 1999 at 3:41:33 PM

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.5 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
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
161dnl $Id$
162
163AC_DEFUN(RTEMS_PATH_PERL,
164[
165AC_PATH_PROG(PERL,perl)
166if test -z "$PERL" ; then
167AC_MSG_WARN(
168[***]
169[   perl was not found]
170[   Note: Some tools will not be built.])
171fi
172])
173
174# Define a conditional.
175
176AC_DEFUN(AM_CONDITIONAL,
177[AC_SUBST($1_TRUE)
178AC_SUBST($1_FALSE)
179if $2; then
180  $1_TRUE=
181  $1_FALSE='#'
182else
183  $1_TRUE='#'
184  $1_FALSE=
185fi])
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.