Skip to contentSkip to conversation

INSTALL: Document new dependency for configure

PATCH In review Andrew Hamilton 3 participants 8 messages Dec 21, 2025 – Jan 13

lore
Share & tools
lore
#0 lore raw

cover INSTALL: Document new dependency for configure

Since commit 1a5417f39, configure.ac uses a macro called AX_CHECK_LINK_FLAG which is defined in a macro provided by the GNU Autoconf Archive package (autoconf-archive). Without this package installed, the following error is observed when running configure:

configure.ac:1800: error: possibly undefined macro: AC_LANG_SOURCE
If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation.
autoreconf: error: /usr/bin/autoconf failed with exit status: 1 ./bootstrap: autoreconf failed

Add the autoconf-archive dependency to the INSTALL instructions.

Andrew Hamilton (1):
INSTALL: Add new requirement for configure

 INSTALL | 1 +
 1 file changed, 1 insertion(+)
Signature · 7 lines
2.43.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw

PATCH 1/1 INSTALL: Add new requirement for configure

Since commit 1a5417f39, configure.ac uses a macro called AX_CHECK_LINK_FLAG which is defined in a macro provided by the GNU Autoconf Archive package (autoconf-archive).

Add the new dependency to the INSTALL instructions to avoid errors when running configure.

---
 INSTALL | 1 +
 1 file changed, 1 insertion(+)
INSTALL +1 -0
index 7e5397f58..bcfa9513f 100644
@@ -56,6 +56,7 @@ need the following.
 * Python 3 (NOTE: python 2.6 should still work, but it's not tested)
 * Autoconf 2.64 or later
 * Automake 1.14 or later
+* Autoconf Archive macros (autoconf-archive)
 
 Your distro may package cross-compiling toolchains such as the following
 incomplete list on Debian: gcc-aarch64-linux-gnu, gcc-arm-linux-gnueabihf,
Signature · 7 lines
2.43.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#2 lore raw

Re: [PATCH 1/1] INSTALL: Add new requirement for configure

Quoted 17 lines · Andrew Hamilton

Since commit 1a5417f39, configure.ac uses a macro called AX_CHECK_LINK_FLAG which is defined in a macro provided by the GNU Autoconf Archive package (autoconf-archive).

Add the new dependency to the INSTALL instructions to avoid errors when running configure.

---
 INSTALL | 1 +
 1 file changed, 1 insertion(+)
INSTALL +0 -0
index 7e5397f58..bcfa9513f 100644

INSTALL need the following. · line 59

Quoted 4 lines
INSTALL +1 -0
@@ -56,6 +56,7 @@ need the following.
 * Python 3 (NOTE: python 2.6 should still work, but it's not tested)
 * Autoconf 2.64 or later
 * Automake 1.14 or later
+* Autoconf Archive macros (autoconf-archive)

Similar patch from Gleen is in now. Though thank you for taking a stab at the issue.

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw

Re: [PATCH 1/1] INSTALL: Add new requirement for configure

Oh wonderful, thank you!

- Andrew

Quoted 27 lines · Daniel Kiper
Quoted 17 lines · Andrew Hamilton

Since commit 1a5417f39, configure.ac uses a macro called AX_CHECK_LINK_FLAG which is defined in a macro provided by the GNU Autoconf Archive package (autoconf-archive).

Add the new dependency to the INSTALL instructions to avoid errors when running configure.

---
 INSTALL | 1 +
 1 file changed, 1 insertion(+)
INSTALL +0 -0
index 7e5397f58..bcfa9513f 100644

INSTALL need the following. · line 59

Quoted 4 lines
INSTALL +1 -0
@@ -56,6 +56,7 @@ need the following.
 * Python 3 (NOTE: python 2.6 should still work, but it's not tested)
 * Autoconf 2.64 or later
 * Automake 1.14 or later
+* Autoconf Archive macros (autoconf-archive)

Similar patch from Gleen is in now. Though thank you for taking a stab at the issue.

Quoted 1 line

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#4 lore raw

Re: [PATCH 1/1] INSTALL: Add new requirement for configure

In reply to Daniel Kiper via Grub-devel
Quoted 2 lines · Daniel Kiper via Grub-devel

Similar patch from Gleen is in now. Though thank you for taking a stab at the issue.

I run into the same issue and I was thinking of proposing adding something like this to configure.ac:

m4_ifndef([AX_CHECK_LINK_FLAG], [m4_fatal([autoconf-archive is missing. please install it via your distro's package manager.])])

While in an ideal world everyone keeps up to date with the documentation that might save a bit of time for some peopIe. If you think it's a good idea let me know and I'll prepare a patch.

Best regards,
Radoslav

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#5 lore raw

Re: [PATCH 1/1] INSTALL: Add new requirement for configure

Quoted 8 lines · Radoslav Kolev via Grub-devel
Quoted 2 lines · Daniel Kiper via Grub-devel

Similar patch from Gleen is in now. Though thank you for taking a stab at the issue.

I run into the same issue and I was thinking of proposing adding something like this to configure.ac:

Quoted 6 lines

m4_ifndef([AX_CHECK_LINK_FLAG], [m4_fatal([autoconf-archive is missing. please install it via your distro's package manager.])])

While in an ideal world everyone keeps up to date with the documentation that might save a bit of time for some peopIe. If you think it's a good idea let me know and I'll prepare a patch.

I think it is good idea. Please go ahead and send a patch.

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#6 lore raw

PATCH 1/1 configure: print a more helpful error if autoconf-archive is not installed

Because an undefined macro receives another macro as parameter autoconf is not smart enough to produce a useful error message.

---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)
configure.ac +3 -0
index a282bf7bf..6c66a8ea9 100644
@@ -1792,6 +1792,9 @@ LIBS=""
 # Defined in acinclude.m4.
 grub_ASM_USCORE
 grub_PROG_TARGET_CC
+#the error message produced by autoconf if autoconf-archive is not installed is
+#quite misleading and not very helpful, so try point people in the right direction
+m4_ifndef([AX_CHECK_LINK_FLAG], [m4_fatal([autoconf-archive is missing. You must install it to generate the configure script.])])
 if test "x$TARGET_APPLE_LINKER" != x1 ; then
 AX_CHECK_LINK_FLAG([-Wl,--image-base,0x400000],
     [TARGET_IMG_BASE_LDOPT="-Wl,--image-base"],
Signature · 7 lines
2.51.1


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
Reviewed-by on v1 1/1
#7 lore raw

Re: [PATCH] configure: print a more helpful error if autoconf-archive is not installed

Quoted 4 lines · Radoslav Kolev

Because an undefined macro receives another macro as parameter autoconf is not smart enough to produce a useful error message.

Daniel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel