Wonder if autoreconf is meant to work where autotools (autoconf,automake,libtool) are installed in different directories or this is an unsupported case ? Here is a simple example that reproduces the case. ~> cat configure.ac AC_INIT(foo,1.0) AC_CONFIG_MACRO_DIR([confdb]) AC_PROG_LIBTOOL AC_OUTPUT ~> cat Makefile.am ACLOCAL_AMFLAGS = -I confdb ~> ( test -d confdb || mkdir confdb ) && autoreconf -ivf autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I confdb autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /homes/chan/autoconf/2.65/bin/autoconf --force configure.ac:3: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /homes/chan/autoconf/2.65/bin/autoconf failed with exit status: 1 To work around the issue, couple ways have been found. 1) libtoolize is invoked before autoreconf 2) ACLOCAL="aclocal -I$LIBTOOL_HOME/share/aclocal" is passed to autoreconf With one of the workarounds, everything works. To check if autoreconf is not meant to work in this environment, I added few lines to force libtoolize in autoreconf: ~> diff autoreconf.old autoreconf 487a488,495 > my $lt_hack = $ENV{'ARC_HACK'} || 0; > if ($lt_hack) { > if (! defined $uses_libtool) { > print "undefined uses_libtool, set it to 1.\n"; $uses_libtool = 1; > } > print "uses_libtool = ", $uses_libtool, "\n"; > } > With above hack, autoreconf runs without error: ~> ( test -d confdb || mkdir confdb ) && env ARC_HACK=1 autoreconf -ivf autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I confdb autoreconf: configure.ac: tracing undefined uses_libtool, set it to 1. uses_libtool = 1 autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `confdb'. libtoolize: copying file `confdb/libtool.m4' libtoolize: copying file `confdb/ltoptions.m4' libtoolize: copying file `confdb/ltsugar.m4' libtoolize: copying file `confdb/ltversion.m4' libtoolize: copying file `confdb/lt~obsolete.m4' autoreconf: running: /homes/chan/autoconf/2.65/bin/autoconf --force autoreconf: configure.ac: not using Autoheader autoreconf: configure.ac: not using Automake autoreconf: Leaving directory `.' Is this a bug in autoreconf or misuse of autoreconf ? Thanks, A.Chan _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf