auxdir="$auxdir/"
fi
+# Check in which directory gettext.m4 etc. belong.
+macrodirs=`cat "$configure_in" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIRS\{,1\}(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/'`
+for arg in $macrodirs; do
+ m4dir="$arg"
+ break
+done
+
# For simplicity we change to the gettext source directory.
cd "$gettext_dir" ||
func_fatal_error "gettext source directory '${gettext_dir}' doesn't exist"
esac
fi
- # Extract the macro directory name from Makefile.am.
- aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' "$srcdir/Makefile.am" | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
- m4dir=m4
- m4dir_defaulted=yes
- m4dir_is_next=
- for arg in $aclocal_amflags; do
- if test -n "$m4dir_is_next"; then
- # Ignore absolute directory pathnames, like /usr/local/share/aclocal.
- case "$arg" in
- /*) ;;
- *)
- m4dir="$arg"
- m4dir_defaulted=
- break
- ;;
- esac
- m4dir_is_next=
- else
- if test "X$arg" = "X-I"; then
- m4dir_is_next=yes
- else
+ if test -z "$m4dir"; then
+ # Extract the macro directory name from Makefile.am.
+ aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' "$srcdir/Makefile.am" | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
+ m4dir_is_next=
+ for arg in $aclocal_amflags; do
+ if test -n "$m4dir_is_next"; then
+ # Ignore absolute directory pathnames, like /usr/local/share/aclocal.
+ case "$arg" in
+ /*) ;;
+ *)
+ test -z "$m4dir" || m4dir="$arg"
+ macrodirs="$macrodirs $arg"
+ ;;
+ esac
m4dir_is_next=
+ else
+ if test "X$arg" = "X-I"; then
+ m4dir_is_next=yes
+ else
+ m4dir_is_next=
+ fi
fi
- fi
- done
+ done
+ fi
+
+ if test -z "$m4dir"; then
+ m4dir=m4
+ m4dir_defaulted=yes
+ fi
# Decide whether to use $m4dir/ChangeLog, or to use ChangeLog instead.
if test -d "$srcdir/$m4dir" && test -f "$srcdir/ChangeLog" && test ! -f "$srcdir/$m4dir/ChangeLog"; then
fi
fi
# Extract the aclocal options name from Makefile.am.
- aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[ ]*=' "$srcdir/Makefile.am" | sed -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/'`
aclocal_options=
- m4dir_is_next=
- for arg in $aclocal_amflags; do
- if test -n "$m4dir_is_next"; then
- aclocal_options="$aclocal_options -I $arg"
- m4dir_is_next=
- else
- if test "X$arg" = "X-I"; then
- m4dir_is_next=yes
- else
- m4dir_is_next=
- fi
- fi
+ for arg in $macrodirs; do
+ aclocal_options="$aclocal_options -I $arg"
done
please="$please
Please run 'aclocal$aclocal_options' to regenerate the aclocal.m4 file.