Hi,

When building from the main branch I see the following error:

guile-readline/Makefile.am:47: error: Libtool library used but 'LIBTOOL' is 
undefined
guile-readline/Makefile.am:47:   The usual way to define 'LIBTOOL' is to add 
'LT_INIT'
guile-readline/Makefile.am:47:   to 'configure.ac' and run 'aclocal' and 
'autoconf' again.
guile-readline/Makefile.am:47:   If 'LT_INIT' is in 'configure.ac', make sure
guile-readline/Makefile.am:47:   its definition is in aclocal's search path.

Then autogen.sh fails. This is because libtoolize is not called. The
version is announced so I assume the intent was to actually call it.
I've attached a patch doing so.

Then I see the following warning:

automake: warning: possible forward-incompatibility.
automake: At least one source file is in a subdirectory, but the 
'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding 
output
automake: object file(s) will be placed in the top-level directory.  However, 
this
automake: behavior may change in a future Automake major version, with object
automake: files being placed in the same subdirectory as the corresponding 
sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.

This option has been around for a long time. I have just added it to
AM_INIT_AUTOMAKE to silence the warning.

Collin

>From d3ddbe6aac22d369d5fb3f4cb1aab3d3969b5ccf Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sat, 1 Jun 2024 04:50:45 -0700
Subject: [PATCH] build: Fix undefined 'LIBTOOL' error.

* autogen.sh: Invoke libtoolize before autoreconf.
* configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects to silence
Automake warnings.
---
 autogen.sh   | 3 +++
 configure.ac | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/autogen.sh b/autogen.sh
index 2e39fb5d8..d8897da99 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -20,8 +20,10 @@ echo ""
 # adjust to that.
 if test "`uname -s`" = "Darwin"; then
   glibtoolize --version
+  LIBTOOLIZE=glibtoolize
 else
   libtoolize --version
+  LIBTOOLIZE=libtoolize
 fi
 
 echo ""
@@ -33,6 +35,7 @@ echo ""
 ######################################################################
 ### update infrastructure
 
+"$LIBTOOLIZE" --force --copy
 autoreconf -i --force --verbose
 
 echo "Now run configure and make."
diff --git a/configure.ac b/configure.ac
index c46586e9b..cd57e651e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,7 @@ dnl Use `serial-tests' so the output `check-guile' is not hidden
 dnl (`parallel-tests' is the default in Automake 1.13.)
 dnl `serial-tests' was introduced in Automake 1.12.
 AM_INIT_AUTOMAKE([1.12 gnu no-define -Wall -Wno-override \
-  serial-tests color-tests dist-lzip dist-xz])
+  serial-tests color-tests dist-lzip dist-xz subdir-objects])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY],1)])
 
 AC_COPYRIGHT(GUILE_CONFIGURE_COPYRIGHT)
-- 
2.45.1

Reply via email to