'./configure' script is run a second time after 'make'

Recently, after doing ./configure, then invoking make, the configure script is run yet another time. @tamas do you have any idea why this started to happen?

Here’s a snippet from the output of my script that basically does ./configure then make with some extra ./configure options (which you can ignore). Notice that as the first configure finishes, a second will start right away.

igraph successfully configured.
  GraphML format support -- no
  GMP library support    -- yes
  GLPK library support   -- yes
  Thread-local storage   -- no
  Use internal ARPACK    -- yes
  Use internal LAPACK    -- yes
  Use internal BLAS      -- yes
  Use internal F2C       -- yes
  Use internal GLPK      -- no
  Debug build            -- no
  Clang AddressSanitizer -- no
  Profiling              -- no
  Link time optimization -- no
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /Users/szhorvat/Repos/igraph-c/igraph/missing aclocal-1.16 -I m4
 cd . && /bin/sh /Users/szhorvat/Repos/igraph-c/igraph/missing automake-1.16 --foreign
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /Users/szhorvat/Repos/igraph-c/igraph/missing autoconf
/bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --prefix=/Users/szhorvat/local --disable-graphml --with-external-glpk --with-pic CFLAGS=-mmacosx-version-min=10.9 -O3 -flto=thin LDFLAGS=-L/Users/szhorvat/local/lib -flto=thin CPPFLAGS=-I/Users/szhorvat/local/include CXXFLAGS=-O3 -flto=thin -mmacosx-version-min=10.9 -std=c++11 --no-create --no-recursion
checking for a BSD-compatible install... /opt/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk

Same for me; nice catch! I have no idea what causes this. For some reason, make seems to re-run aclocal-1.16, then automake-1.16, then autoconf. These invocations probably change the timestamps in some of the files that trigger make to re-run ./configure “just to be on the safe side”.

Here is some debug output from Make:

GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
Reading makefiles...
Reading makefile `Makefile'...
Updating makefiles....
 Considering target file `Makefile'.
   Considering target file `../Makefile.in'.
     Considering target file `../Makefile.am'.
      Looking for an implicit rule for `../Makefile.am'.
      Trying pattern rule with stem `Makefile.am'.
      Trying implicit prerequisite `../Makefile.am,v'.
      Trying pattern rule with stem `Makefile.am'.
      Trying implicit prerequisite `../RCS/Makefile.am,v'.
      Trying pattern rule with stem `Makefile.am'.
      Trying implicit prerequisite `../RCS/Makefile.am'.
      Trying pattern rule with stem `Makefile.am'.
      Trying implicit prerequisite `../s.Makefile.am'.
      Trying pattern rule with stem `Makefile.am'.
      Trying implicit prerequisite `../SCCS/s.Makefile.am'.
      No implicit rule found for `../Makefile.am'.
      Finished prerequisites of target file `../Makefile.am'.
     No need to remake target `../Makefile.am'.
     Considering target file `../m4/ax_check_compile_flag.m4'.
      Looking for an implicit rule for `../m4/ax_check_compile_flag.m4'.
      Trying pattern rule with stem `ax_check_compile_flag.m4'.
      Trying implicit prerequisite `../m4/ax_check_compile_flag.m4,v'.
      Trying pattern rule with stem `ax_check_compile_flag.m4'.
      Trying implicit prerequisite `../m4/RCS/ax_check_compile_flag.m4,v'.
      Trying pattern rule with stem `ax_check_compile_flag.m4'.
      Trying implicit prerequisite `../m4/RCS/ax_check_compile_flag.m4'.
      Trying pattern rule with stem `ax_check_compile_flag.m4'.
      Trying implicit prerequisite `../m4/s.ax_check_compile_flag.m4'.
      Trying pattern rule with stem `ax_check_compile_flag.m4'.
      Trying implicit prerequisite `../m4/SCCS/s.ax_check_compile_flag.m4'.
      No implicit rule found for `../m4/ax_check_compile_flag.m4'.
      Finished prerequisites of target file `../m4/ax_check_compile_flag.m4'.
     No commands for `../m4/ax_check_compile_flag.m4' and no prerequisites actually changed.
     No need to remake target `../m4/ax_check_compile_flag.m4'.
     Considering target file `../m4/libtool.m4'.
      Looking for an implicit rule for `../m4/libtool.m4'.
      Trying pattern rule with stem `libtool.m4'.
      Trying implicit prerequisite `../m4/libtool.m4,v'.
      Trying pattern rule with stem `libtool.m4'.
      Trying implicit prerequisite `../m4/RCS/libtool.m4,v'.
      Trying pattern rule with stem `libtool.m4'.
      Trying implicit prerequisite `../m4/RCS/libtool.m4'.
      Trying pattern rule with stem `libtool.m4'.
      Trying implicit prerequisite `../m4/s.libtool.m4'.
      Trying pattern rule with stem `libtool.m4'.
      Trying implicit prerequisite `../m4/SCCS/s.libtool.m4'.
      No implicit rule found for `../m4/libtool.m4'.
      Finished prerequisites of target file `../m4/libtool.m4'.
     No commands for `../m4/libtool.m4' and no prerequisites actually changed.
     No need to remake target `../m4/libtool.m4'.
     Considering target file `../m4/ltoptions.m4'.
      Looking for an implicit rule for `../m4/ltoptions.m4'.
      Trying pattern rule with stem `ltoptions.m4'.
      Trying implicit prerequisite `../m4/ltoptions.m4,v'.
      Trying pattern rule with stem `ltoptions.m4'.
      Trying implicit prerequisite `../m4/RCS/ltoptions.m4,v'.
      Trying pattern rule with stem `ltoptions.m4'.
      Trying implicit prerequisite `../m4/RCS/ltoptions.m4'.
      Trying pattern rule with stem `ltoptions.m4'.
      Trying implicit prerequisite `../m4/s.ltoptions.m4'.
      Trying pattern rule with stem `ltoptions.m4'.
      Trying implicit prerequisite `../m4/SCCS/s.ltoptions.m4'.
      No implicit rule found for `../m4/ltoptions.m4'.
      Finished prerequisites of target file `../m4/ltoptions.m4'.
     No commands for `../m4/ltoptions.m4' and no prerequisites actually changed.
     No need to remake target `../m4/ltoptions.m4'.
     Considering target file `../m4/ltsugar.m4'.
      Looking for an implicit rule for `../m4/ltsugar.m4'.
      Trying pattern rule with stem `ltsugar.m4'.
      Trying implicit prerequisite `../m4/ltsugar.m4,v'.
      Trying pattern rule with stem `ltsugar.m4'.
      Trying implicit prerequisite `../m4/RCS/ltsugar.m4,v'.
      Trying pattern rule with stem `ltsugar.m4'.
      Trying implicit prerequisite `../m4/RCS/ltsugar.m4'.
      Trying pattern rule with stem `ltsugar.m4'.
      Trying implicit prerequisite `../m4/s.ltsugar.m4'.
      Trying pattern rule with stem `ltsugar.m4'.
      Trying implicit prerequisite `../m4/SCCS/s.ltsugar.m4'.
      No implicit rule found for `../m4/ltsugar.m4'.
      Finished prerequisites of target file `../m4/ltsugar.m4'.
     No commands for `../m4/ltsugar.m4' and no prerequisites actually changed.
     No need to remake target `../m4/ltsugar.m4'.
     Considering target file `../m4/ltversion.m4'.
      Looking for an implicit rule for `../m4/ltversion.m4'.
      Trying pattern rule with stem `ltversion.m4'.
      Trying implicit prerequisite `../m4/ltversion.m4,v'.
      Trying pattern rule with stem `ltversion.m4'.
      Trying implicit prerequisite `../m4/RCS/ltversion.m4,v'.
      Trying pattern rule with stem `ltversion.m4'.
      Trying implicit prerequisite `../m4/RCS/ltversion.m4'.
      Trying pattern rule with stem `ltversion.m4'.
      Trying implicit prerequisite `../m4/s.ltversion.m4'.
      Trying pattern rule with stem `ltversion.m4'.
      Trying implicit prerequisite `../m4/SCCS/s.ltversion.m4'.
      No implicit rule found for `../m4/ltversion.m4'.
      Finished prerequisites of target file `../m4/ltversion.m4'.
     No commands for `../m4/ltversion.m4' and no prerequisites actually changed.
     No need to remake target `../m4/ltversion.m4'.
     Considering target file `../m4/lt~obsolete.m4'.
      Looking for an implicit rule for `../m4/lt~obsolete.m4'.
      Trying pattern rule with stem `lt~obsolete.m4'.
      Trying implicit prerequisite `../m4/lt~obsolete.m4,v'.
      Trying pattern rule with stem `lt~obsolete.m4'.
      Trying implicit prerequisite `../m4/RCS/lt~obsolete.m4,v'.
      Trying pattern rule with stem `lt~obsolete.m4'.
      Trying implicit prerequisite `../m4/RCS/lt~obsolete.m4'.
      Trying pattern rule with stem `lt~obsolete.m4'.
      Trying implicit prerequisite `../m4/s.lt~obsolete.m4'.
      Trying pattern rule with stem `lt~obsolete.m4'.
      Trying implicit prerequisite `../m4/SCCS/s.lt~obsolete.m4'.
      No implicit rule found for `../m4/lt~obsolete.m4'.
      Finished prerequisites of target file `../m4/lt~obsolete.m4'.
     No commands for `../m4/lt~obsolete.m4' and no prerequisites actually changed.
     No need to remake target `../m4/lt~obsolete.m4'.
     Considering target file `../tools/autoconf/ax_tls.m4'.
      Looking for an implicit rule for `../tools/autoconf/ax_tls.m4'.
      Trying pattern rule with stem `ax_tls.m4'.
      Trying implicit prerequisite `../tools/autoconf/ax_tls.m4,v'.
      Trying pattern rule with stem `ax_tls.m4'.
      Trying implicit prerequisite `../tools/autoconf/RCS/ax_tls.m4,v'.
      Trying pattern rule with stem `ax_tls.m4'.
      Trying implicit prerequisite `../tools/autoconf/RCS/ax_tls.m4'.
      Trying pattern rule with stem `ax_tls.m4'.
      Trying implicit prerequisite `../tools/autoconf/s.ax_tls.m4'.
      Trying pattern rule with stem `ax_tls.m4'.
      Trying implicit prerequisite `../tools/autoconf/SCCS/s.ax_tls.m4'.
      No implicit rule found for `../tools/autoconf/ax_tls.m4'.
      Finished prerequisites of target file `../tools/autoconf/ax_tls.m4'.
     No commands for `../tools/autoconf/ax_tls.m4' and no prerequisites actually changed.
     No need to remake target `../tools/autoconf/ax_tls.m4'.
     Considering target file `../tools/autoconf/as-version.m4'.
      Looking for an implicit rule for `../tools/autoconf/as-version.m4'.
      Trying pattern rule with stem `as-version.m4'.
      Trying implicit prerequisite `../tools/autoconf/as-version.m4,v'.
      Trying pattern rule with stem `as-version.m4'.
      Trying implicit prerequisite `../tools/autoconf/RCS/as-version.m4,v'.
      Trying pattern rule with stem `as-version.m4'.
      Trying implicit prerequisite `../tools/autoconf/RCS/as-version.m4'.
      Trying pattern rule with stem `as-version.m4'.
      Trying implicit prerequisite `../tools/autoconf/s.as-version.m4'.
      Trying pattern rule with stem `as-version.m4'.
      Trying implicit prerequisite `../tools/autoconf/SCCS/s.as-version.m4'.
      No implicit rule found for `../tools/autoconf/as-version.m4'.
      Finished prerequisites of target file `../tools/autoconf/as-version.m4'.
     No commands for `../tools/autoconf/as-version.m4' and no prerequisites actually changed.
     No need to remake target `../tools/autoconf/as-version.m4'.
     Considering target file `../configure.ac'.
      Looking for an implicit rule for `../configure.ac'.
      Trying pattern rule with stem `configure.ac'.
      Trying implicit prerequisite `../configure.ac,v'.
      Trying pattern rule with stem `configure.ac'.
      Trying implicit prerequisite `../RCS/configure.ac,v'.
      Trying pattern rule with stem `configure.ac'.
      Trying implicit prerequisite `../RCS/configure.ac'.
      Trying pattern rule with stem `configure.ac'.
      Trying implicit prerequisite `../s.configure.ac'.
      Trying pattern rule with stem `configure.ac'.
      Trying implicit prerequisite `../SCCS/s.configure.ac'.
      No implicit rule found for `../configure.ac'.
      Finished prerequisites of target file `../configure.ac'.
     No commands for `../configure.ac' and no prerequisites actually changed.
     No need to remake target `../configure.ac'.
     Considering target file `../aclocal.m4'.
       Pruning file `../m4/ax_check_compile_flag.m4'.
       Pruning file `../m4/libtool.m4'.
       Pruning file `../m4/ltoptions.m4'.
       Pruning file `../m4/ltsugar.m4'.
       Pruning file `../m4/ltversion.m4'.
       Pruning file `../m4/lt~obsolete.m4'.
       Pruning file `../tools/autoconf/ax_tls.m4'.
       Pruning file `../tools/autoconf/as-version.m4'.
       Pruning file `../configure.ac'.
      Finished prerequisites of target file `../aclocal.m4'.
      Prerequisite `../m4/ax_check_compile_flag.m4' is older than target `../aclocal.m4'.
      Prerequisite `../m4/libtool.m4' is newer than target `../aclocal.m4'.
      Prerequisite `../m4/ltoptions.m4' is newer than target `../aclocal.m4'.
      Prerequisite `../m4/ltsugar.m4' is newer than target `../aclocal.m4'.
      Prerequisite `../m4/ltversion.m4' is newer than target `../aclocal.m4'.
      Prerequisite `../m4/lt~obsolete.m4' is newer than target `../aclocal.m4'.
      Prerequisite `../tools/autoconf/ax_tls.m4' is older than target `../aclocal.m4'.
      Prerequisite `../tools/autoconf/as-version.m4' is older than target `../aclocal.m4'.
      Prerequisite `../configure.ac' is older than target `../aclocal.m4'.
     Must remake target `../aclocal.m4'.
CDPATH="${ZSH_VERSION+.}:" && cd .. && /bin/sh /Users/tamas/dev/igraph/igraph/missing aclocal-1.16 -I m4
Putting child 0x7fdd00e013d0 (../aclocal.m4) PID 29606 on the chain.
Live child 0x7fdd00e013d0 (../aclocal.m4) PID 29606
Reaping winning child 0x7fdd00e013d0 PID 29606
Removing child 0x7fdd00e013d0 PID 29606 from chain.
     Successfully remade target file `../aclocal.m4'.
    Finished prerequisites of target file `../Makefile.in'.
    Prerequisite `../Makefile.am' is older than target `../Makefile.in'.
    Prerequisite `../m4/ax_check_compile_flag.m4' is older than target `../Makefile.in'.
    Prerequisite `../m4/libtool.m4' is older than target `../Makefile.in'.
    Prerequisite `../m4/ltoptions.m4' is older than target `../Makefile.in'.
    Prerequisite `../m4/ltsugar.m4' is older than target `../Makefile.in'.
    Prerequisite `../m4/ltversion.m4' is older than target `../Makefile.in'.
    Prerequisite `../m4/lt~obsolete.m4' is older than target `../Makefile.in'.
    Prerequisite `../tools/autoconf/ax_tls.m4' is older than target `../Makefile.in'.
    Prerequisite `../tools/autoconf/as-version.m4' is older than target `../Makefile.in'.
    Prerequisite `../configure.ac' is older than target `../Makefile.in'.
    Prerequisite `../aclocal.m4' is newer than target `../Makefile.in'.
   Must remake target `../Makefile.in'.

It must have happened fairly recently. Could it have anything to do with when you added LTO support to th build system?

The released 0.8.0 C core sources (zip file on GitHub) builds fine without autotools / libtool (I tested this for MacPorts). It must have happened after release.

I don’t think so. One thing is for sure: after running ./bootstrap.sh, the files in the m4/ folder become newer than aclocal.m4 in the root folder of the source tree, and that’s why make thinks that aclocal.m4 has to be regenerated. Touching all files in m4/ at the end of the bootstrap process makes the problem disappear, although I think this is treating just the symptoms and not the underlying cause.

I’ll keep on investigating.

Okay, I have changed the ordering of various GNU autotools-related commands in ./bootstrap.sh according to this answer on SO and it seemed to do the trick. A bit of cargo cult programming wouldn’t hurt, would it? :slight_smile: