Hi, On 2020-10-20, Sergei Trofimovich <sly...@gentoo.org> wrote: > Initial bug is reported as autoconf failure on ghc-8.8.4: > https://bugs.gentoo.org/750191 > There autconf 2.69 works, 2.69c does not.
Note: the change you report is introduced by Zack's fix for related AC_INIT quoting regressions. This patch is not included in 2.69c (or even on git master), but does seem to be applied by the Gentoo package. The 2.69c release version seems to handle the example fine. > Here is the minimal example: > > OK: > > $ cat configure.ac > AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.1.0], > [glasgow-haskell-b...@haskell.org], [ghc-AC_PACKAGE_VERSION]) > > echo "$PACKAGE_VERSION" > > AC_OUTPUT > $ autoconf-2.69 > $ ./configure > 9.1.0 > configure: creating ./config.status > > BAD: > > $ autoconf-2.70_beta2 > configure.ac:1: error: possibly undefined macro: AC_PACKAGE_VERSION > If this token and others are legitimate, please use m4_pattern_allow. > See the Autoconf documentation. Yes I think now Zack's underquotation fixes have added the opposite problem. There is now too much quotation so the tarname (and other arguments) are not fully expanded when used. At least these changes should probably be simply dropped from the patch or at least they perhaps need more consideration... @@ -436,18 +427,12 @@ AC_SUBST([SHELL])dnl AC_SUBST([PATH_SEPARATOR])dnl # Identity of this package. -AC_SUBST([PACKAGE_NAME], - [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl -AC_SUBST([PACKAGE_TARNAME], - [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl -AC_SUBST([PACKAGE_VERSION], - [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl -AC_SUBST([PACKAGE_STRING], - [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl -AC_SUBST([PACKAGE_BUGREPORT], - [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl -AC_SUBST([PACKAGE_URL], - [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])dnl +AC_SUBST([PACKAGE_NAME], ['m4_defn([AC_PACKAGE_NAME])'])dnl +AC_SUBST([PACKAGE_TARNAME], ['m4_defn([AC_PACKAGE_TARNAME])'])dnl +AC_SUBST([PACKAGE_VERSION], ['m4_defn([AC_PACKAGE_VERSION])'])dnl +AC_SUBST([PACKAGE_STRING], ['m4_defn([AC_PACKAGE_STRING])'])dnl +AC_SUBST([PACKAGE_BUGREPORT], ['m4_defn([AC_PACKAGE_BUGREPORT])'])dnl +AC_SUBST([PACKAGE_URL], ['m4_defn([AC_PACKAGE_URL])'])dnl m4_divert_pop([DEFAULTS])dnl m4_wrap_lifo([m4_divert_text([DEFAULTS], @@ -1099,9 +1084,8 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] -]AS_HELP_STRING([--docdir=DIR], - [documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME], - [AC_PACKAGE_TARNAME], [PACKAGE])@:>@)[ + --docdir=DIR documentation root @<:@DATAROOTDIR/doc/]dnl +m4_default_quoted(m4_defn([AC_PACKAGE_TARNAME]), [PACKAGE])[@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] If you drop those two hunks from Zack's patch the example should work again. Cheers, Nick