grosjo / fts-xapian

Dovecot FTS plugin based on Xapian
GNU Lesser General Public License v2.1
97 stars 21 forks source link

Warnings with latest Autotools #95

Closed basil-conto closed 3 years ago

basil-conto commented 3 years ago

I am able to configure and build fts-xapian cleanly with the Autotools versions currently present in Debian Testing.

However, today I installed locally the latest release tarballs of Autoconf 2.71, Automake 1.16.4, and Libtool 2.4.6, and with these I see some warnings when running autoreconf -vi.

Here is the output of autoreconf -vi, diffed from Autoconf version 2.69 to 2.71:

diff --show-c-function -u /tmp/autoreconf-old.txt /tmp/autoreconf-new.txt
--- /tmp/autoreconf-old.txt 2021-08-14 15:04:59.308215161 +0100
+++ /tmp/autoreconf-new.txt 2021-08-14 15:05:23.862630972 +0100
@@ -1,4 +1,5 @@
-autoreconf: Entering directory `.'
+autoreconf: export WARNINGS=
+autoreconf: Entering directory '.'
 autoreconf: configure.ac: not using Gettext
 autoreconf: running: aclocal -I m4
 autoreconf: configure.ac: tracing
@@ -11,8 +12,36 @@ libtoolize: copying file 'm4/ltoptions.m
 libtoolize: copying file 'm4/ltsugar.m4'
 libtoolize: copying file 'm4/ltversion.m4'
 libtoolize: copying file 'm4/lt~obsolete.m4'
-autoreconf: running: /usr/bin/autoconf
-autoreconf: running: /usr/bin/autoheader
+autoreconf: configure.ac: not using Intltool
+autoreconf: configure.ac: not using Gtkdoc
+autoreconf: running: aclocal -I m4
+autoreconf: running: /home/blc/.local/bin/autoconf
+configure.ac:22: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
+configure.ac:22: You should run autoupdate.
+m4/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
+configure.ac:22: the top level
+configure.ac:26: warning: The macro `AC_HELP_STRING' is obsolete.
+configure.ac:26: You should run autoupdate.
+./lib/autoconf/general.m4:204: AC_HELP_STRING is expanded from...
+./lib/autoconf/general.m4:1553: AC_ARG_WITH is expanded from...
+m4/dovecot.m4:324: DC_DOVECOT is expanded from...
+configure.ac:26: the top level
+configure.ac:26: warning: The macro `AC_TRY_COMPILE' is obsolete.
+configure.ac:26: You should run autoupdate.
+./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
+lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
+lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
+m4/dovecot.m4:31: DC_DOVECOT_CFLAGS is expanded from...
+m4/dovecot.m4:324: DC_DOVECOT is expanded from...
+configure.ac:26: the top level
+configure.ac:26: warning: The macro `AC_TRY_COMPILE' is obsolete.
+configure.ac:26: You should run autoupdate.
+./lib/autoconf/general.m4:2847: AC_TRY_COMPILE is expanded from...
+lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
+m4/dovecot.m4:31: DC_DOVECOT_CFLAGS is expanded from...
+m4/dovecot.m4:324: DC_DOVECOT is expanded from...
+configure.ac:26: the top level
+autoreconf: running: /home/blc/.local/bin/autoheader
 autoreconf: running: automake --add-missing --copy --no-force
 configure.ac:19: installing './compile'
 configure.ac:22: installing './config.guess'
@@ -20,4 +49,4 @@ configure.ac:22: installing './config.su
 configure.ac:17: installing './install-sh'
 configure.ac:17: installing './missing'
 src/Makefile.am: installing './depcomp'
-autoreconf: Leaving directory `.'
+autoreconf: Leaving directory '.'

Running autoupdate after autoreconf replaces AC_PROG_LIBTOOL with LT_INIT, but the other warnings remain.

I am only just learning how to use Autotools, so (a) it's possible that some of the warnings are due to a misinstallation on my part; and (b) and I can't yet offer concrete help. Nevertheless, let me know if you'd like me to test anything locally. HTH, and thanks.

grosjo commented 3 years ago

Please kindly try with latest git

basil-conto commented 3 years ago

Please kindly try with latest git

Thanks! All the warnings are gone now.

BTW, I suggest the following minor tweak:

diff --git a/configure.ac b/configure.ac
index 5d7b1ed..454a107 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@ AM_MAINTAINER_MODE
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_CXX
-# AC_PROG_LIBTOOL
+dnl AC_PROG_LIBTOOL
 LT_INIT

 PKG_PROG_PKG_CONFIG

This way, autoupdate won't change # AC_PROG_LIBTOOL to # LT_INIT (it seems to be too dumb to recognise comment syntax, but the dnl macro seems to work around that).