Skip to content

Update configure.ac with autoupdate - #112

Merged
mhvk merged 1 commit into
liberfa:masterfrom
eerovaher:update-configure.ac
Jul 24, 2026
Merged

Update configure.ac with autoupdate#112
mhvk merged 1 commit into
liberfa:masterfrom
eerovaher:update-configure.ac

Conversation

@eerovaher

Copy link
Copy Markdown
Contributor

pyerfa requires ERFA's config.h to be present. I tried to manually run the commands that the pyerfa setup.py file tries to run: https://github.com/liberfa/pyerfa/blob/88c25e6a125c4df2dadf0f969b8d626483722f62/setup.py#L126-L127
On current master I get

$ ./bootstrap.sh 
configure.ac:7: warning: The macro `AC_CONFIG_HEADER' is obsolete.
configure.ac:7: You should run autoupdate.
./lib/autoconf/status.m4:719: AC_CONFIG_HEADER is expanded from...
configure.ac:7: the top level
configure.ac:12: installing 'build-aux/compile'
configure.ac:10: installing 'build-aux/install-sh'
configure.ac:10: installing 'build-aux/missing'
src/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/Makefile.am:1:   its definition is in aclocal's search path.
src/Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
autoreconf: error: automake failed with exit status: 1

Following the instructions about running autoupdate produces

$ autoupdate
$ git diff
diff --git a/configure.ac b/configure.ac
index a3dc59b..70bbda8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,10 @@
 # Process this file with autoconf to produce a configure script.
 
-AC_PREREQ([2.68])
+AC_PREREQ([2.71])
 ## Follow the instructions in RELEASE.rst to change package version
 AC_INIT([erfa],[2.0.1])
 AC_CONFIG_SRCDIR([src/erfa.h])
-AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
 AM_INIT_AUTOMAKE([foreign])

I did not see a need to update the requires version of autoconf, but I did check that AC_CONFIG_HEADERS is present in autoconf==2.68.
With this patch I no longer get the warning, but I still get

$ ./bootstrap.sh 
configure.ac:12: installing 'build-aux/compile'
configure.ac:10: installing 'build-aux/install-sh'
configure.ac:10: installing 'build-aux/missing'
src/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/Makefile.am:1:   its definition is in aclocal's search path.
src/Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
autoreconf: error: automake failed with exit status: 1
$ aclocal
$ autoconf
$ ./bootstrap.sh 
src/Makefile.am:1: error: Libtool library used but 'LIBTOOL' is undefined
src/Makefile.am:1:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
src/Makefile.am:1:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
src/Makefile.am:1:   If 'LT_INIT' is in 'configure.ac', make sure
src/Makefile.am:1:   its definition is in aclocal's search path.
autoreconf: error: automake failed with exit status: 1

I don't know how to solve that.

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I indeed get the warning on master and not with this PR.

On my Debian/linux machine, I do not get the other problem you mentioned, about LIBTOOL. Maybe that is mac-specific?

Anyway, let's get this change in!

@mhvk
mhvk merged commit c942f7a into liberfa:master Jul 24, 2026
7 checks passed
@eerovaher

Copy link
Copy Markdown
Contributor Author

Installing libtool got rid of the error.

@eerovaher
eerovaher deleted the update-configure.ac branch July 24, 2026 19:51
@mhvk

mhvk commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Installing libtool got rid of the error.

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants