source: rtems/tools/build/aclocal.m4 @ 4075af6f

4.104.114.84.95
Last change on this file since 4075af6f was 4075af6f, checked in by Joel Sherrill <joel.sherrill@…>, on 10/05/99 at 13:49:54

Regenerated.

  • Property mode set to 100644
File size: 6.4 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4a
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_BEFORE([$0], [AC_CONFIG_AUX_DIR])dnl
23AC_BEFORE([$0], [AM_INIT_AUTOMAKE])dnl
24
25AC_ARG_WITH(target-subdir,
26[  --with-target-subdir=DIR],
27TARGET_SUBDIR="$withval",
28TARGET_SUBDIR=".")
29
30RTEMS_TOPdir="$1";
31AC_SUBST(RTEMS_TOPdir)
32
33dnl Determine RTEMS Version string from the VERSION file
34dnl Hopefully, Joel never changes its format ;-
35AC_MSG_CHECKING([for RTEMS Version])
36if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
37changequote(,)dnl
38RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
39sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
40changequote([,])dnl
41else
42AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
43fi
44if test -z "$RTEMS_VERSION"; then
45AC_MSG_ERROR(Unable to determine version)
46fi
47AC_MSG_RESULT($RTEMS_VERSION)
48])dnl
49
50# Do all the work for Automake.  This macro actually does too much --
51# some checks are only needed if your package does certain things.
52# But this isn't really a big deal.
53
54# serial 1
55
56dnl Usage:
57dnl AM_INIT_AUTOMAKE(package,version, [no-define])
58
59AC_DEFUN(AM_INIT_AUTOMAKE,
60[AC_REQUIRE([AC_PROG_INSTALL])
61dnl We require 2.13 because we rely on SHELL being computed by configure.
62AC_PREREQ([2.13])
63PACKAGE=[$1]
64AC_SUBST(PACKAGE)
65VERSION=[$2]
66AC_SUBST(VERSION)
67dnl test to see if srcdir already configured
68if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
69  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
70fi
71ifelse([$3],,
72AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
73AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
74AC_REQUIRE([AM_SANITY_CHECK])
75AC_REQUIRE([AC_ARG_PROGRAM])
76dnl FIXME This is truly gross.
77missing_dir=`cd $ac_aux_dir && pwd`
78AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
79AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
80AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
81AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
82AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
83AC_REQUIRE([AC_PROG_MAKE_SET])])
84
85#
86# Check to make sure that the build environment is sane.
87#
88
89AC_DEFUN(AM_SANITY_CHECK,
90[AC_MSG_CHECKING([whether build environment is sane])
91# Just in case
92sleep 1
93echo timestamp > conftestfile
94# Do `set' in a subshell so we don't clobber the current shell's
95# arguments.  Must try -L first in case configure is actually a
96# symlink; some systems play weird games with the mod time of symlinks
97# (eg FreeBSD returns the mod time of the symlink's containing
98# directory).
99if (
100   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
101   if test "[$]*" = "X"; then
102      # -L didn't work.
103      set X `ls -t $srcdir/configure conftestfile`
104   fi
105   if test "[$]*" != "X $srcdir/configure conftestfile" \
106      && test "[$]*" != "X conftestfile $srcdir/configure"; then
107
108      # If neither matched, then we have a broken ls.  This can happen
109      # if, for instance, CONFIG_SHELL is bash and it inherits a
110      # broken ls alias from the environment.  This has actually
111      # happened.  Such a system could not be considered "sane".
112      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
113alias in your environment])
114   fi
115
116   test "[$]2" = conftestfile
117   )
118then
119   # Ok.
120   :
121else
122   AC_MSG_ERROR([newly created file is older than distributed files!
123Check your system clock])
124fi
125rm -f conftest*
126AC_MSG_RESULT(yes)])
127
128dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
129dnl The program must properly implement --version.
130AC_DEFUN(AM_MISSING_PROG,
131[AC_MSG_CHECKING(for working $2)
132# Run test in a subshell; some versions of sh will print an error if
133# an executable is not found, even if stderr is redirected.
134# Redirect stdin to placate older versions of autoconf.  Sigh.
135if ($2 --version) < /dev/null > /dev/null 2>&1; then
136   $1=$2
137   AC_MSG_RESULT(found)
138else
139   $1="$3/missing $2"
140   AC_MSG_RESULT(missing)
141fi
142AC_SUBST($1)])
143
144# Add --enable-maintainer-mode option to configure.
145# From Jim Meyering
146
147# serial 1
148
149AC_DEFUN(AM_MAINTAINER_MODE,
150[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
151  dnl maintainer-mode is disabled by default
152  AC_ARG_ENABLE(maintainer-mode,
153[  --enable-maintainer-mode enable make rules and dependencies not useful
154                          (and sometimes confusing) to the casual installer],
155      USE_MAINTAINER_MODE=$enableval,
156      USE_MAINTAINER_MODE=no)
157  AC_MSG_RESULT($USE_MAINTAINER_MODE)
158  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
159  MAINT=$MAINTAINER_MODE_TRUE
160  AC_SUBST(MAINT)dnl
161]
162)
163
164# Define a conditional.
165
166AC_DEFUN(AM_CONDITIONAL,
167[AC_SUBST($1_TRUE)
168AC_SUBST($1_FALSE)
169if $2; then
170  $1_TRUE=
171  $1_FALSE='#'
172else
173  $1_TRUE='#'
174  $1_FALSE=
175fi])
176
177dnl $Id$
178
179AC_DEFUN(RTEMS_PATH_KSH,
180[
181dnl NOTE: prefer bash over ksh over sh
182AC_PATH_PROGS(KSH,bash ksh sh)
183if test -z "$KSH"; then
184dnl NOTE: This cannot happen -- /bin/sh must always exist
185AC_MSG_ERROR(
186[***]
187[    Cannot determine a usable shell bash/ksh/sh]
188[    Please contact your system administrator] );
189fi
190])
191
192# Like AC_CONFIG_HEADER, but automatically create stamp file.
193
194AC_DEFUN(AM_CONFIG_HEADER,
195[AC_PREREQ([2.12])
196AC_CONFIG_HEADER([$1])
197dnl When config.status generates a header, we must update the stamp-h file.
198dnl This file resides in the same directory as the config header
199dnl that is generated.  We must strip everything past the first ":",
200dnl and everything past the last "/".
201AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
202ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
203<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
204<<am_indx=1
205for am_file in <<$1>>; do
206  case " <<$>>CONFIG_HEADERS " in
207  *" <<$>>am_file "*<<)>>
208    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
209    ;;
210  esac
211  am_indx=`expr "<<$>>am_indx" + 1`
212done<<>>dnl>>)
213changequote([,]))])
214
Note: See TracBrowser for help on using the repository browser.