270
271
# make sure this subshell exits with the exit value if it failed
274
# Adapted from gtkdocize:
275
# If the AC_CONFIG_MACRO_DIR() macro is used, copy gnome-doc-utils.m4
276
# from our prefix to that directory. This makes sure that the M4 macro
277
# used matches the automake fragment.
278
# If AC_CONFIG_MACRO_DIR is not used, the macro won't be copied, and
279
# the correct flags must be passed to aclocal for it to find the macro.
280
m4dir=`cat "$configure" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
282
if test -n "$m4dir"; then
285
if test "$m4dir" != .; then
286
test -z "$automake" && echo "Putting files in AC_CONFIG_MACRO_DIR, '$m4dir'."
290
files='gnome-doc-utils.m4'
292
for file in $files; do
293
if test -f "$file" && test -z "$force"; then
294
test -z "$automake" && echo "$progname: '$file' exists: use '--force' to overwrite" 1>&2
299
if test -n "$ln_s" && $ln_s $datadir/aclocal/$file $file; then :
300
elif $cp $datadir/aclocal/$file $file; then :
302
echo "$progname: cannot copy '$datadir/aclocal/$file' to '$file'" 1>&2
308
# make sure this subshell exits with the exit value if it failed
273
313
# FIXME: This probably does not work w/ builddir != srcdir because it
274
314
# gets at source files relative to the current directory.