# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.23 2005/10/08 16:02:13 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.24 2005/10/09 12:00:34 flameeyes Exp $
#
# Author: Diego Pettenò <flameeyes@gentoo.org>
# Enhancements: Martin Schlemmer <azarah@gentoo.org>
}
eautomake() {
+ local extra_opts
+
[[ -f Makefile.am ]] || return 0
+
+ [[ -f INSTALL && -f AUTHORS && -f ChangeLog ]] \
+ || extra_opts="${extra_opts} --foreign"
+
# --force-missing seems not to be recognized by some flavours of automake
- autotools_run_tool automake --add-missing --copy "$@"
+ autotools_run_tool automake --add-missing --copy ${extra_opts} "$@"
}