automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

doing AC_CHECK_TOOL([STRIP], [strip]) in AM_INIT_AUTOMAKE?


From: Alexandre Duret-Lutz
Subject: doing AC_CHECK_TOOL([STRIP], [strip]) in AM_INIT_AUTOMAKE?
Date: 23 Jan 2002 22:42:06 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

This is an old topic which was discussed here:
http://sources.redhat.com/ml/automake/2001-02/msg00583.html

This was not possible to run AC_CHECK_TOOL from AM_INIT_AUTOMAKE
in Automake 1.5, because with Autoconf 2.13 this would require
config.sub and config.guess.

Any reason why we could not do that today?

Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.1749
diff -u -r1.1749 ChangeLog
--- ChangeLog   2002/01/23 20:53:22     1.1749
+++ ChangeLog   2002/01/23 21:41:28
@@ -1,5 +1,14 @@
 2002-01-23  Alexandre Duret-Lutz  <address@hidden>
 
+       * automake.in (scan_one_autoconf_file): Don't treat AC_CHECK_TOOL
+       as AC_CANONICAL_HOST (the former does not require the latter since
+       Autoconf 2.50).
+       * m4/strip.m4 (AM_PROG_INSTALL_STRIP): Check for strip.
+       * automake.texi (Requirements): Do not require STRIP to be
+       defined by the user.
+
+2002-01-23  Alexandre Duret-Lutz  <address@hidden>
+
        * lib/am/depend.am (distclean-depend): Erase %DEPDIRS%, not $(DEPDIRS).
        * automake.in (handle_languages): Compute and substitute %DEPDIRS%.
        * tests/pr224.test: Make sure .deps subdirectories are
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.167
diff -u -r1.167 NEWS
--- NEWS        2002/01/22 00:11:27     1.167
+++ NEWS        2002/01/23 21:41:28
@@ -26,6 +26,8 @@
   first argument to this new form of AM_INIT_AUTOMAKE.
 * Compiler-based assembler is now called `CCAS'; people expected `AS'
   to be a real assembler.
+* AM_INIT_AUTOMAKE will set STRIP itself when it needs it.  Adding
+  AC_CHECK_TOOL([STRIP], [strip]) manually is no longuer a required.
 
 New in 1.5:
 * Support for `configure.ac'.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1274
diff -u -r1.1274 automake.in
--- automake.in 2002/01/23 20:53:23     1.1274
+++ automake.in 2002/01/23 21:41:49
@@ -4857,8 +4857,7 @@
 
         # Handle AC_CANONICAL_*.  Always allow upgrading to
         # AC_CANONICAL_SYSTEM, but never downgrading.
-       if (/AC_CANONICAL_HOST/ || /AC_CHECK_TOOL/
-            || /AC_CYGWIN/ || /AC_EMXOS2/ || /AC_MINGW32/)
+       if (/AC_CANONICAL_HOST/ || /AC_CYGWIN/ || /AC_EMXOS2/ || /AC_MINGW32/)
          {
            if (! $seen_canonical)
              {
Index: automake.texi
===================================================================
RCS file: /cvs/automake/automake/automake.texi,v
retrieving revision 1.261
diff -u -r1.261 automake.texi
--- automake.texi       2002/01/22 00:11:27     1.261
+++ automake.texi       2002/01/23 21:42:03
@@ -1053,25 +1053,6 @@
 @cvindex AC_OUTPUT
 @end table
 
-You may need the following macros in some conditions, even though they
-are not required.
-
address@hidden @code
address@hidden AC_CHECK_TOOL([STRIP],[strip])
address@hidden STRIP, how to setup
address@hidden install-strip and STRIP
address@hidden AC_CHECK_TOOL([STRIP],[strip])
-Installed binaries are usually stripped using @code{strip} when you run
address@hidden install-strip}.  However @code{strip} might not be the
-right tool to use in cross-compilation environments, therefore
-Automake will honor the @code{STRIP} environment variable to overrule
-the program used to perform stripping.  Automake will not set @code{STRIP}
-itself.  If your package is not setup for cross-compilation you do not
-have to care (@code{strip} is ok), otherwise you can set @code{STRIP}
-automatically by calling @code{AC_CHECK_TOOL([STRIP],[strip])} from
-your @file{configure.in}.
address@hidden table
-
 
 @node Optional, Invoking aclocal, Requirements, configure
 @section Other things Automake recognizes
Index: m4/strip.m4
===================================================================
RCS file: /cvs/automake/automake/m4/strip.m4,v
retrieving revision 1.5
diff -u -r1.5 strip.m4
--- strip.m4    2001/09/22 16:05:36     1.5
+++ strip.m4    2002/01/23 21:42:06
@@ -26,5 +26,13 @@
 # STRIPPROG with the value of the STRIP variable (set by the user).
 AC_DEFUN([AM_PROG_INSTALL_STRIP],
 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
-- 
Alexandre Duret-Lutz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]