]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autoreconf.in (&autoreconf): Run aclocal before tracing, so
authorAkim Demaille <akim@epita.fr>
Thu, 8 Nov 2001 17:21:38 +0000 (17:21 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 8 Nov 2001 17:21:38 +0000 (17:21 +0000)
that we can trace macros from aclocal.m4.
Trace AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL, since the latter is
obsoleted, and redirect to the former anyway.
Reported by Ralf Corsepius.

ChangeLog
bin/autoreconf.in

index abe40cc7d1b272e11474b47f50a469933d89f80e..ac3c1d183afa21169c09f06be92e372f27bef0a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-11-08  Akim Demaille  <akim@epita.fr>
+
+       * bin/autoreconf.in (&autoreconf): Run aclocal before tracing, so
+       that we can trace macros from aclocal.m4.
+       Trace AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL, since the latter is
+       obsoleted, and redirect to the former anyway.
+       Reported by Ralf Corsepius.
+
 2001-11-08  Akim Demaille  <akim@epita.fr>
 
        * bin/autoreconf.in (&autoreconf): AC_CONFIG_SUBIDRS are to be
@@ -10,7 +18,7 @@
 2001-11-08  Kevin Ryde  <user42@zip.com.au>
 
        * autoconf.texi (Limitations of Usual Tools): Note HP-UX cc
-       doesn't accept .S files.        
+       doesn't accept .S files.
 
 2001-11-07  Akim Demaille  <akim@epita.fr>
 
index ba6f1c9501ac755c50af45f4d26f06e3a1cef5f3..709a5e61a5c5fd1ee11198584cf724323b11ecaa 100644 (file)
@@ -215,6 +215,59 @@ sub autoreconf ($)
     }
 
 
+  # ----------------- #
+  # Running aclocal.  #
+  # ----------------- #
+
+  # Run it first: it might discover new macros to add, e.g.,
+  # AC_PROG_LIBTOOL, which we will trace later to see if Libtool is
+  # used.
+  #
+  # Always run it.  Tracking its sources for up-to-dateness is too
+  # complex and too error prone.  The best we can do is avoiding
+  # nuking the time stamp.
+  my $uses_aclocal = 1;
+
+  # Nevertheless, if aclocal.m4 exists and is not made by aclocal,
+  # don't run aclocal.
+
+  if (-f 'aclocal.m4')
+    {
+      my $aclocal_m4 = new Autom4te::XFile 'aclocal.m4';
+      $_ = $aclocal_m4->getline;
+      $uses_aclocal = 0
+       unless /generated.*by aclocal/;
+    }
+
+  # If there are flags for aclocal in Makefile.am, use them.
+  my $aclocal_flags = '';
+  if ($uses_aclocal && -f 'Makefile.am')
+    {
+      my $makefile = new Autom4te::XFile 'Makefile.am';
+      while ($_ = $makefile->getline)
+       {
+         if (/^ACLOCAL_[A-Z_]*FLAGS\s*=\s*(.*)/)
+           {
+             $aclocal_flags = $1;
+             last;
+           }
+       }
+    }
+
+  if (!$uses_aclocal)
+    {
+      verbose "$configure_ac: not using aclocal";
+    }
+  else
+    {
+      xsystem ("$aclocal $aclocal_flags --output=aclocal.m4t");
+      # aclocal may produce no output.
+      update_file ('aclocal.m4t', 'aclocal.m4')
+       if -f 'aclocal.m4t';
+    }
+
+
+
   # ------------------------------- #
   # See what tools will be needed.  #
   # ------------------------------- #
@@ -225,21 +278,20 @@ sub autoreconf ($)
   my $uses_gettext;
   my $uses_libtool;
   my $uses_autoheader;
-  my $uses_aclocal;
   my @subdir;
   my $traces = new Autom4te::XFile
     ("$autoconf"
      . join (' --trace=', '',
-            'AC_INIT', 'AM_GNU_GETTEXT', 'AM_PROG_LIBTOOL',
+            'AC_INIT', 'AM_GNU_GETTEXT', 'AC_PROG_LIBTOOL',
             'AC_CONFIG_HEADERS',
             'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1')
      . ' |');
   while ($_ = $traces->getline)
     {
-      $uses_autoconf = 1          if /AC_INIT/;
-      $uses_gettext = 1           if /AM_GNU_GETTEXT/;
-      $uses_libtool = 1           if /AM_PROG_LIBTOOL/;
-      $uses_autoheader = 1        if /AC_CONFIG_HEADERS/;
+      $uses_autoconf = 1            if /AC_INIT/;
+      $uses_gettext = 1             if /AM_GNU_GETTEXT/;
+      $uses_libtool = 1             if /AC_PROG_LIBTOOL/;
+      $uses_autoheader = 1          if /AC_CONFIG_HEADERS/;
       push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/;
     }
 
@@ -257,6 +309,8 @@ sub autoreconf ($)
        }
     }
 
+
+
   # -------------------- #
   # Running gettexitze.  #
   # -------------------- #
@@ -297,53 +351,6 @@ sub autoreconf ($)
     }
 
 
-  # ----------------- #
-  # Running aclocal.  #
-  # ----------------- #
-
-  # Always run aclocal.  Tracking its sources for up-to-dateness is
-  # too complex and too error prone.  The best we can do is avoiding
-  # nuking the time stamp.
-  $uses_aclocal = 1;
-
-  # Nevertheless, if aclocal.m4 exists and is not made by aclocal,
-  # don't run aclocal.
-
-  if (-f 'aclocal.m4')
-    {
-      my $aclocal_m4 = new Autom4te::XFile 'aclocal.m4';
-      $_ = $aclocal_m4->getline;
-      $uses_aclocal = 0
-       unless /generated.*by aclocal/;
-    }
-
-  # If there are flags for aclocal in Makefile.am, use them.
-  my $aclocal_flags = '';
-  if ($uses_aclocal && -f 'Makefile.am')
-    {
-      my $makefile = new Autom4te::XFile 'Makefile.am';
-      while ($_ = $makefile->getline)
-       {
-         if (/^ACLOCAL_[A-Z_]*FLAGS\s*=\s*(.*)/)
-           {
-             $aclocal_flags = $1;
-             last;
-           }
-       }
-    }
-
-  if (!$uses_aclocal)
-    {
-      verbose "$configure_ac: not using aclocal";
-    }
-  else
-    {
-      xsystem ("$aclocal $aclocal_flags --output=aclocal.m4t");
-      # aclocal may produce no output.
-      update_file ('aclocal.m4t', 'aclocal.m4')
-       if -f 'aclocal.m4t';
-    }
-
   # ------------------ #
   # Running automake.  #
   # ------------------ #