GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / share / aclocal-1.11 / sanity.m4
blob3d2f304326b5a1c4860d623b37b6382e064985e1
1 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
4 # Free Software Foundation, Inc.
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
10 # serial 5
12 # AM_SANITY_CHECK
13 # ---------------
14 AC_DEFUN([AM_SANITY_CHECK],
15 [AC_MSG_CHECKING([whether build environment is sane])
16 # Just in case
17 sleep 1
18 echo timestamp > conftest.file
19 # Reject unsafe characters in $srcdir or the absolute working directory
20 # name.  Accept space and tab only in the latter.
21 am_lf='
23 case `pwd` in
24   *[[\\\"\#\$\&\'\`$am_lf]]*)
25     AC_MSG_ERROR([unsafe absolute working directory name]);;
26 esac
27 case $srcdir in
28   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
29     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
30 esac
32 # Do `set' in a subshell so we don't clobber the current shell's
33 # arguments.  Must try -L first in case configure is actually a
34 # symlink; some systems play weird games with the mod time of symlinks
35 # (eg FreeBSD returns the mod time of the symlink's containing
36 # directory).
37 if (
38    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
39    if test "$[*]" = "X"; then
40       # -L didn't work.
41       set X `ls -t "$srcdir/configure" conftest.file`
42    fi
43    rm -f conftest.file
44    if test "$[*]" != "X $srcdir/configure conftest.file" \
45       && test "$[*]" != "X conftest.file $srcdir/configure"; then
47       # If neither matched, then we have a broken ls.  This can happen
48       # if, for instance, CONFIG_SHELL is bash and it inherits a
49       # broken ls alias from the environment.  This has actually
50       # happened.  Such a system could not be considered "sane".
51       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
52 alias in your environment])
53    fi
55    test "$[2]" = conftest.file
56    )
57 then
58    # Ok.
59    :
60 else
61    AC_MSG_ERROR([newly created file is older than distributed files!
62 Check your system clock])
64 AC_MSG_RESULT(yes)])