[configure.in] Create temp file in current dir

Such that we can use the CAIRO_CONFIG_COMMANDS macro to regenerate
files in $srcdir and still be readonly-source-tree happy if nothing
changed in the target file.
This commit is contained in:
Behdad Esfahbod 2008-09-02 15:32:54 -04:00
parent e977f32346
commit 5cb3e66305

View file

@ -216,7 +216,7 @@ AC_DEFUN([CAIRO_CONFIG_COMMANDS], [
AC_CONFIG_COMMANDS($1,
[
_config_file=$1
_tmp_file=$1.tmp
_tmp_file=cairoconf.tmp
AC_MSG_NOTICE([creating $_config_file])
{
$2
@ -225,7 +225,8 @@ AC_DEFUN([CAIRO_CONFIG_COMMANDS], [
AC_MSG_NOTICE([$_config_file is unchanged])
rm -f "$_tmp_file"
else
mv "$_tmp_file" "$_config_file"
mv "$_tmp_file" "$_config_file" ||
AC_MSG_ERROR([failed to update $_config_file])
fi
], $3)
])