[04c308c] | 1 | dnl aclocal.m4 generated automatically by aclocal 1.4 |
---|
| 2 | |
---|
| 3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. |
---|
| 4 | dnl This file is free software; the Free Software Foundation |
---|
| 5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
| 6 | dnl with or without modifications, as long as this notice is preserved. |
---|
| 7 | |
---|
| 8 | dnl This program is distributed in the hope that it will be useful, |
---|
| 9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
| 10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
| 11 | dnl PARTICULAR PURPOSE. |
---|
| 12 | |
---|
| 13 | dnl $Id$ |
---|
| 14 | |
---|
[9b8baa1] | 15 | dnl |
---|
| 16 | dnl RTEMS_TOP($1) |
---|
| 17 | dnl |
---|
| 18 | dnl $1 .. relative path from this configure.in to the toplevel configure.in |
---|
| 19 | dnl |
---|
[04c308c] | 20 | AC_DEFUN(RTEMS_TOP, |
---|
| 21 | [dnl |
---|
[8cdb582] | 22 | AC_ARG_WITH(target-subdir, |
---|
| 23 | [ --with-target-subdir=DIR], |
---|
| 24 | TARGET_SUBDIR="$withval", |
---|
| 25 | TARGET_SUBDIR=".") |
---|
| 26 | |
---|
[04c308c] | 27 | RTEMS_TOPdir="$1"; |
---|
| 28 | AC_SUBST(RTEMS_TOPdir) |
---|
| 29 | |
---|
| 30 | PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; |
---|
[8cdb582] | 31 | test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.." |
---|
[04c308c] | 32 | AC_SUBST(PROJECT_ROOT) |
---|
| 33 | |
---|
[9b8baa1] | 34 | dnl Determine RTEMS Version string from the VERSION file |
---|
| 35 | dnl Hopefully, Joel never changes its format ;- |
---|
| 36 | AC_MSG_CHECKING([for RTEMS Version]) |
---|
| 37 | if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then |
---|
| 38 | changequote(,)dnl |
---|
| 39 | RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \ |
---|
| 40 | sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` |
---|
| 41 | changequote([,])dnl |
---|
| 42 | else |
---|
| 43 | AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION) |
---|
| 44 | fi |
---|
| 45 | if test -z "$RTEMS_VERSION"; then |
---|
| 46 | AC_MSG_ERROR(Unable to determine version) |
---|
| 47 | fi |
---|
| 48 | AC_MSG_RESULT($RTEMS_VERSION) |
---|
| 49 | |
---|
[8cdb582] | 50 | RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; |
---|
| 51 | AC_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 | |
---|
| 60 | dnl Usage: |
---|
| 61 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
| 62 | |
---|
| 63 | AC_DEFUN(AM_INIT_AUTOMAKE, |
---|
| 64 | [AC_REQUIRE([AC_PROG_INSTALL]) |
---|
| 65 | PACKAGE=[$1] |
---|
| 66 | AC_SUBST(PACKAGE) |
---|
| 67 | VERSION=[$2] |
---|
| 68 | AC_SUBST(VERSION) |
---|
| 69 | dnl test to see if srcdir already configured |
---|
| 70 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
| 71 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
| 72 | fi |
---|
| 73 | ifelse([$3],, |
---|
| 74 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
| 75 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
| 76 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
| 77 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
| 78 | dnl FIXME This is truly gross. |
---|
| 79 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
| 80 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
---|
| 81 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
| 82 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
---|
| 83 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
| 84 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
| 85 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
| 86 | |
---|
| 87 | # |
---|
| 88 | # Check to make sure that the build environment is sane. |
---|
| 89 | # |
---|
| 90 | |
---|
| 91 | AC_DEFUN(AM_SANITY_CHECK, |
---|
| 92 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
| 93 | # Just in case |
---|
| 94 | sleep 1 |
---|
| 95 | echo 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). |
---|
| 101 | if ( |
---|
| 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 |
---|
| 115 | alias in your environment]) |
---|
| 116 | fi |
---|
| 117 | |
---|
| 118 | test "[$]2" = conftestfile |
---|
| 119 | ) |
---|
| 120 | then |
---|
| 121 | # Ok. |
---|
| 122 | : |
---|
| 123 | else |
---|
| 124 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
| 125 | Check your system clock]) |
---|
| 126 | fi |
---|
| 127 | rm -f conftest* |
---|
| 128 | AC_MSG_RESULT(yes)]) |
---|
| 129 | |
---|
| 130 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
| 131 | dnl The program must properly implement --version. |
---|
| 132 | AC_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. |
---|
| 137 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
| 138 | $1=$2 |
---|
| 139 | AC_MSG_RESULT(found) |
---|
| 140 | else |
---|
| 141 | $1="$3/missing $2" |
---|
| 142 | AC_MSG_RESULT(missing) |
---|
| 143 | fi |
---|
| 144 | AC_SUBST($1)]) |
---|
| 145 | |
---|
| 146 | dnl $Id$ |
---|
| 147 | |
---|
| 148 | AC_DEFUN(RTEMS_PATH_KSH, |
---|
| 149 | [ |
---|
| 150 | dnl NOTE: prefer bash over ksh over sh |
---|
| 151 | AC_PATH_PROGS(KSH,bash ksh sh) |
---|
| 152 | if test -z "$KSH"; then |
---|
| 153 | dnl NOTE: This cannot happen -- /bin/sh must always exist |
---|
| 154 | AC_MSG_ERROR( |
---|
| 155 | [***] |
---|
| 156 | [ Cannot determine a usable shell bash/ksh/sh] |
---|
| 157 | [ Please contact your system administrator] ); |
---|
| 158 | fi |
---|
| 159 | ]) |
---|
| 160 | |
---|
| 161 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
---|
| 162 | |
---|
| 163 | AC_DEFUN(AM_CONFIG_HEADER, |
---|
| 164 | [AC_PREREQ([2.12]) |
---|
| 165 | AC_CONFIG_HEADER([$1]) |
---|
| 166 | dnl When config.status generates a header, we must update the stamp-h file. |
---|
| 167 | dnl This file resides in the same directory as the config header |
---|
| 168 | dnl that is generated. We must strip everything past the first ":", |
---|
| 169 | dnl and everything past the last "/". |
---|
| 170 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
---|
| 171 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
---|
| 172 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
---|
| 173 | <<am_indx=1 |
---|
| 174 | for 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` |
---|
| 181 | done<<>>dnl>>) |
---|
| 182 | changequote([,]))]) |
---|
| 183 | |
---|