--- autotools.eclass.orig 2008-01-13 14:49:51.000000000 +0100 +++ autotools.eclass.orig 2008-01-13 15:03:58.000000000 +0100 @@ -140,7 +140,7 @@ lttest="$(autotools_check_macro "AC_PROG_LIBTOOL")$(autotools_check_macro "AM_PROG_LIBTOOL")" [[ -n $lttest ]] || return 0 - [[ -f Makefile.am ]] && opts="--automake" + [[ -f GNUmakefile.am || -f Makefile.am ]] && opts="--automake" [[ "${USERLAND}" == "Darwin" ]] && LIBTOOLIZE="glibtoolize" autotools_run_tool ${LIBTOOLIZE:-libtoolize} "$@" ${opts} @@ -168,16 +168,23 @@ eautomake() { local extra_opts + local makefile_name - [[ -f Makefile.am ]] || return 0 + if [[ -f GNUmakefile.am ]]; then + makefile_name="GNUmakefile" + elif [[ -f Makefile.am ]]; then + makefile_name="Makefile" + else + return 0 + fi - if [[ -z ${FROM_EAUTORECONF} && -f Makefile.in ]]; then + if [[ -z ${FROM_EAUTORECONF} && -f ${makefile_name}.in ]]; then local used_automake local installed_automake installed_automake=$(automake --version | head -n 1 | \ sed -e 's:.*(GNU automake) ::') - used_automake=$(head -n 1 < Makefile.in | \ + used_automake=$(head -n 1 < ${makefile_name}.in | \ sed -e 's:.*by automake \(.*\) from .*:\1:') if [[ ${installed_automake} != ${used_automake} ]]; then