1 # statesave.m4 serial 2
3 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4 # 2009, 2010 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 # Save the shell variables and directory listing. AT_CHECK_ENV uses these to
24 # confirm that no test modifies variables outside the Autoconf namespace or
25 # leaves temporary files. AT_CONFIG_CMP uses the variable dumps to confirm
26 # that tests have the same side effects regardless of caching.
28 # The sed script duplicates uniq functionality (thanks to 'info sed
29 # uniq' for the recipe), in order to avoid a MacOS 10.5 bug where
30 # readdir can list a file multiple times in a rapidly changing
31 # directory, while avoiding yet another fork.
32 m4_defun([AC_STATE_SAVE],
33 [(set) 2>&1 | sort >state-env.$1
34 ls | sed '/^at-/d;/^state-/d;/^config\./d