strace/m4/st_save_restore_var.m4
Dmitry V. Levin c26d031c1f m4: introduce st_SAVE_VAR and st_RESTORE_VAR macros
These new macros are going to be needed for the upcoming
AX_PROG_CC_FOR_BUILD change.

* m4/st_save_restore_var.m4: New file.
2016-12-07 10:58:24 +00:00

8 lines
210 B
Plaintext

AC_DEFUN([st_SAVE_VAR], [dnl
AS_IF([test -n "${$1+set}"], [st_saved_$1="${$1}"; unset $1])
])
AC_DEFUN([st_RESTORE_VAR], [dnl
AS_IF([test -n "${st_saved_$1+set}"], [$1="${st_saved_$1}"; unset st_saved_$1])
])