1 # statesave.m4 serial 2
3 # Copyright (C) 2000-2017, 2020-2024 Free Software Foundation, Inc.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 # Save the shell variables and directory listing. AT_CHECK_ENV uses these to
21 # confirm that no test modifies variables outside the Autoconf namespace or
22 # leaves temporary files. AT_CONFIG_CMP uses the variable dumps to confirm
23 # that tests have the same side effects regardless of caching.
25 # The sed script duplicates uniq functionality (thanks to 'info sed
26 # uniq' for the recipe), in order to avoid a Mac OS 10.5 bug where
27 # readdir can list a file multiple times in a rapidly changing
28 # directory, while avoiding yet another fork.
29 m4_defun([AC_STATE_SAVE],
30 [(set) 2>&1 | sort >state-env.$1
31 ls | sed '/^at-/d;/^state-/d;/^config\./d