Subject: Re: bug#9459: 24.0.50; Condigure aborts, complains about missing install.sh in build-aux.

From: Paul Eggert <[email-masked]>
Date: Wed, 07 Sep 2011 11:39:16 -0700

On 09/07/11 11:24, Lars Magne Ingebrigtsen wrote:
> would it be possible to have "make" spit out "Compilation failed;
> have you tried running ./autogen.sh before reporting this as a bug?" if
> building fails?

Sure.  Or "make" could simply fall back on autogen.sh
if the current approach fails.  That would be just as fast as
now, in the normal case where the build works, and it would have
addressed Jan's problem I expect.  How about something like this?

=== modified file 'Makefile.in'
--- Makefile.in	2011-07-24 22:15:47 +0000
+++ Makefile.in	2011-09-07 18:35:28 +0000
@@ -409,15 +409,15 @@ config.status: ${srcdir}/configure ${src
 AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4
 
 $(srcdir)/configure: $(AUTOCONF_INPUTS)
-	cd ${srcdir} && autoconf
+	cd ${srcdir} && autoconf || ./autogen.sh
 
 ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/$(DOS_gnulib_comp.m4)
 $(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
-	cd $(srcdir) && aclocal -I m4
+	cd $(srcdir) && aclocal -I m4 || ./autogen.sh
 
 AUTOMAKE_INPUTS = @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am $(srcdir)/lib/gnulib.mk
 $(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS)
-	cd $(srcdir) && automake --gnu -a -c lib/Makefile
+	cd $(srcdir) && automake --gnu -a -c lib/Makefile || ./autogen.sh
 am--refresh: $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/src/config.in
 .PHONY: am--refresh
 
@@ -428,7 +428,7 @@ $(srcdir)/src/config.in: $(srcdir)/src/s
 	@ # then we really need to do something more.
 	[ -r "$@" ] || ( cd ${srcdir} && autoheader )
 $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
-	cd ${srcdir} && autoheader
+	cd ${srcdir} && autoheader || ./autogen.sh
 	rm -f $(srcdir)/src/stamp-h.in
 	echo timestamp > $(srcdir)/src/stamp-h.in