libtool-patches
[Top][All Lists]
Advanced

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

Remove AC_LIBTOOL_TAGS -> do it as LT_INIT options


From: bonzini
Subject: Remove AC_LIBTOOL_TAGS -> do it as LT_INIT options
Date: Tue, 02 Mar 2004 13:55:08 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031020 Debian/1.5-1

I don't see much point in keeping AC_LIBTOOL_TAGS now that the beautiful LT_INIT patch is in. It would be much better from a user point of view to have C++, Java, F77, RC options and have autoupdate include them all; then it would be immediate for the user to remove them. In addition this gives us small configure script by default, while keeping backwards compatibility.

(At 53 - and 61 + lines, the patch is not very small, but I finally received another copy of my assign.future form and it is for the second time on flight to Boston. Not counting the doc changes it's 34 - and 32 + lines).

Regtested i686-pc-linux-gnu. Ok for mainline? (If so, please apply for me).

Paolo

2004-03-02  Paolo Bonzini  <address@hidden>

       * m4/libtool.m4 (AC_LIBTOOL_TAGS): Remove.
       (_LT_AC_TAG_CONFIG): Remove default invocation
       of AC_LIBTOOL_TAGS.
       * m4/ltoptions.m4 (C, C++, Java, F77, RC): New options.
       (_LT_TAGS): Define as empty.
       * doc/libtool.texi (LT_INIT): Document new options
       C, C++, Java, F77, RC.  Use a @table.
       (Other languages): Rewrite last paragraph to refer to
       the new LT_INIT options for languages.
       (AC_LIBTOOL_TAGS): Remove.
       (LT_PREREQ): Fix typo.
       * configure.ac: Add all language options to LT_INIT.
       * tests/cdemo/configure.ac, tests/demo/configure.ac,
       tests/depdemo/configure.ac, tests/mdemo/configure.ac
       tests/mdemo2/configure.ac, tests/pdemo/configure.ac:
       Remove AC_LIBTOOL_TAGS.
       * tests/f77demo/configure.ac: Remove AC_LIBTOOL_TAGS,
       include F77 option in LT_INIT.
       * tests/tagdemo/configure.ac: Likewise for C++.

Index: configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/configure.ac,v
retrieving revision 1.39
diff -u -r1.39 configure.ac
--- configure.ac        22 Feb 2004 11:13:44 -0000      1.39
+++ configure.ac        2 Mar 2004 11:21:03 -0000
@@ -181,7 +181,7 @@
 ## ----------------------- ##
 AC_CONFIG_FILES([config/ltmain.sh:./ltmain.in])
 AC_CONFIG_FILES([libtoolize], [chmod a+x libtoolize])
-LT_INIT([dlopen win32-dll])
+LT_INIT([dlopen win32-dll C C++ Java F77 RC])
 AC_LIB_LTDL
 
 
Index: doc/libtool.texi
===================================================================
RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.149
diff -u -r1.149 libtool.texi
--- doc/libtool.texi    22 Feb 2004 11:13:44 -0000      1.149
+++ doc/libtool.texi    2 Mar 2004 11:21:04 -0000
@@ -1638,7 +1638,7 @@
 adds many new tests to the @code{configure} script so that the generated
 libtool script will understand the characteristics of the host:
 
address@hidden LT_PREREQ(@var{VERSION})
address@hidden LT_PREREQ (@var{VERSION})
 Ensure that a recent enough version of Libtool is being used.  If the
 version of Libtool used for @code{LT_INIT} is earlier than
 @var{version}, print an error message to the standard
@@ -1724,7 +1724,7 @@
 other options that you can pass to @code{LT_INIT} to modify its
 behaviour.  Here is a full list:
 
address@hidden @bullet
address@hidden @samp
 @item dlopen
 Enable checking for dlopen support. This option should be used if
 the package makes use of the @samp{-dlopen} and @samp{-dlpreopen} flags,
@@ -1753,27 +1753,32 @@
 Change the default behaviour for @code{LT_INIT} to disable
 shared libraries.  The user may still override this default by
 specifying @samp{--enable-shared}.
address@hidden defmac
 
 @item disable-static
 Change the default behaviour for @code{LT_INIT} to disable
 static libraries.  The user may still override this default by
 specifying @samp{--enable-static}.
address@hidden defmac
 
address@hidden itemize
-
address@hidden defmac
address@hidden C
address@hidden C++
address@hidden Java
address@hidden F77
address@hidden RC
+Augment the default behaviour for @code{LT_INIT} to include
+configuration for the specified set of language tags.
+Configuring only those languages that are actually neded
+results in a smaller configure script.  The C option actually
+does nothing, because support for the C language is integral
+to libtool and cannot be disabled.
+
+Note that with libtool 1.5 all tags were automatically configured.
+Hence, running @command{autoupdate} will include all the five
+available language names when upgrading @code{AC_PROG_LIBTOOL}
+to @code{LT_INIT}.  It is suggested to modify the updated
address@hidden file so that it only includes the necessary
+languages.
address@hidden table
 
address@hidden AC_LIBTOOL_TAGS ([tag1 tag2 ...])
-Change the default behaviour for @code{LT_INIT} to limit
-configuration to a specified set of language tags. This is valuable in
-case libtool is embedded in a package which only uses a subset of the
-languages libtool supports. Configuring a subset of the supported
-languages results in a smaller configure script, and faster libtool
-configuration. Tag names accepted are "CXX", "F77", "GCJ", and
-"RC". Support for the C language is integeral to libtool and can not be
-disabled.
 @end defmac
 
 The tests in @code{LT_INIT} also recognize the following
@@ -3689,8 +3694,13 @@
 integrated with other languages, so that programmers are free to reap
 the benefits of shared libraries in their favorite programming language.
 
-This chapter describes how libtool interacts with other languages,
-and what special considerations you need to make if you do not use C.
+In general, it may be sufficient to add the appropriate language name
+to @code{LT_INIT}.  The available language names are @samp{C} (which
+does not do anything), @samp{C++}, @samp{Java} (to be used together
+with @acronym{GCJ}), @samp{F77} and @samp{RC} (for Windows resource
+files).  However, you may need to make special considerations if you
+do not use C: these are described in this chapter, together with other
+peculiar interactions between libtool and other languages.
 
 @menu
 * C++ libraries::
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.48
diff -u -r1.48 libtool.m4
--- m4/libtool.m4       22 Feb 2004 11:13:45 -0000      1.48
+++ m4/libtool.m4       2 Mar 2004 11:21:06 -0000
@@ -72,8 +72,8 @@
 ])# _LT_INIT
 
 # Old names:
-AU_DEFUN([AC_PROG_LIBTOOL],        [LT_INIT])
-AU_DEFUN([AM_PROG_LIBTOOL],        [LT_INIT])
+AU_DEFUN([AC_PROG_LIBTOOL],        [LT_INIT([C C++ Java F77 RC])])
+AU_DEFUN([AM_PROG_LIBTOOL],        [LT_INIT([C C++ Java F77 RC])])
 
 
 # _LT_SETUP
@@ -2041,13 +2041,6 @@
 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
 
-# AC_LIBTOOL_TAGS
-# ---------------
-# tags to enable
-AC_DEFUN([AC_LIBTOOL_TAGS],
-[m4_define([_LT_TAGS],[$1])
-]) # AC_LIBTOOL_TAGS
-
 # _LT_AC_TAG_CHECK
 # ----------------
 m4_define([_LT_AC_TAG_CHECK],
@@ -2060,9 +2053,7 @@
 # _LT_AC_TAG_CONFIG
 # -----------------
 m4_define([_LT_AC_TAG_CONFIG],
-[AC_PROVIDE_IFELSE([AC_LIBTOOL_TAGS], [], [
-  AC_LIBTOOL_TAGS([CXX F77 GCJ RC])])dnl
-  available_tags=""
+[available_tags=""
   AC_FOREACH([_LT_TAG], _LT_TAGS,
       [m4_case(_LT_TAG,
       [CXX], [_LT_AC_TAG_CHECK([CXX])
Index: m4/ltoptions.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/ltoptions.m4,v
retrieving revision 1.3
diff -u -r1.3 ltoptions.m4
--- m4/ltoptions.m4     22 Feb 2004 11:13:45 -0000      1.3
+++ m4/ltoptions.m4     2 Mar 2004 11:21:06 -0000
@@ -356,3 +356,18 @@
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
 put the `pic-only' option into LT_LIBTOOL_INIT's first parameter.])
 ])
+
+# Tags
+# ----
+# Implement the C, C++, Java, F77 and RC option which enable
+# configuring the appropriate tags.
+m4_define([_LT_TAGS], [])
+LT_OPTION_DEFINE([C], [])
+LT_OPTION_DEFINE([C++],
+  [m4_expand_once([m4_append([_LT_TAGS], [ CXX])], [_lt_cxx_tag_added])])
+LT_OPTION_DEFINE([F77],
+  [m4_expand_once([m4_append([_LT_TAGS], [ F77])], [_lt_f77_tag_added])])
+LT_OPTION_DEFINE([Java],
+  [m4_expand_once([m4_append([_LT_TAGS], [ GCJ])], [_lt_java_tag_added])])
+LT_OPTION_DEFINE([RC],
+  [m4_expand_once([m4_append([_LT_TAGS], [ RC])], [_lt_rc_tag_added])])
Index: tests/cdemo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/cdemo/configure.ac,v
retrieving revision 1.11
diff -u -r1.11 configure.ac
--- tests/cdemo/configure.ac    22 Feb 2004 11:13:45 -0000      1.11
+++ tests/cdemo/configure.ac    2 Mar 2004 11:21:06 -0000
@@ -41,7 +41,6 @@
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
-AC_LIBTOOL_TAGS([])
 LT_INIT
 AC_SUBST([LIBTOOL_DEPS])
 
Index: tests/demo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/demo/configure.ac,v
retrieving revision 1.9
diff -u -r1.9 configure.ac
--- tests/demo/configure.ac     22 Feb 2004 11:13:45 -0000      1.9
+++ tests/demo/configure.ac     2 Mar 2004 11:21:06 -0000
@@ -44,7 +44,6 @@
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
-AC_LIBTOOL_TAGS([])
 LT_INIT([dlopen win32-dll])
 AC_SUBST([LIBTOOL_DEPS])
 
Index: tests/depdemo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/depdemo/configure.ac,v
retrieving revision 1.9
diff -u -r1.9 configure.ac
--- tests/depdemo/configure.ac  22 Feb 2004 11:13:45 -0000      1.9
+++ tests/depdemo/configure.ac  2 Mar 2004 11:21:06 -0000
@@ -42,7 +42,6 @@
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
-AC_LIBTOOL_TAGS([])
 LT_INIT([win32-dll])
 AC_SUBST([LIBTOOL_DEPS])
 
Index: tests/f77demo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/f77demo/configure.ac,v
retrieving revision 1.8
diff -u -r1.8 configure.ac
--- tests/f77demo/configure.ac  22 Feb 2004 11:13:45 -0000      1.8
+++ tests/f77demo/configure.ac  2 Mar 2004 11:21:06 -0000
@@ -61,8 +61,7 @@
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
-AC_LIBTOOL_TAGS([F77])
-LT_INIT
+LT_INIT([F77])
 AC_SUBST([LIBTOOL_DEPS])
 
 ## -------- ##
Index: tests/mdemo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/mdemo/configure.ac,v
retrieving revision 1.9
diff -u -r1.9 configure.ac
--- tests/mdemo/configure.ac    22 Feb 2004 11:13:45 -0000      1.9
+++ tests/mdemo/configure.ac    2 Mar 2004 11:21:06 -0000
@@ -47,7 +47,6 @@
 AC_SUBST([INCLTDL])
 AC_SUBST([LIBLTDL])
 
-AC_LIBTOOL_TAGS([])
 LT_INIT([dlopen win32-dll])
 AC_SUBST(LIBTOOL_DEPS)
 
Index: tests/mdemo2/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/mdemo2/configure.ac,v
retrieving revision 1.9
diff -u -r1.9 configure.ac
--- tests/mdemo2/configure.ac   22 Feb 2004 11:13:45 -0000      1.9
+++ tests/mdemo2/configure.ac   2 Mar 2004 11:21:06 -0000
@@ -43,7 +43,6 @@
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
-AC_LIBTOOL_TAGS([])
 LT_INIT([dlopen])
 AC_SUBST(LIBTOOL_DEPS)
 
Index: tests/pdemo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/pdemo/configure.ac,v
retrieving revision 1.9
diff -u -r1.9 configure.ac
--- tests/pdemo/configure.ac    22 Feb 2004 11:13:45 -0000      1.9
+++ tests/pdemo/configure.ac    2 Mar 2004 11:21:06 -0000
@@ -43,7 +43,6 @@
 ## ----------------------- ##
 ## Libtool initialisation. ##
 ## ----------------------- ##
-AC_LIBTOOL_TAGS([])
 LT_INIT([dlopen])
 AC_SUBST([LIBTOOL_DEPS])
 
Index: tests/tagdemo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/tagdemo/configure.ac,v
retrieving revision 1.8
diff -u -r1.8 configure.ac
--- tests/tagdemo/configure.ac  22 Feb 2004 11:13:45 -0000      1.8
+++ tests/tagdemo/configure.ac  2 Mar 2004 11:21:06 -0000
@@ -64,8 +64,7 @@
 
 # Set the test language to C++.
 AC_LANG([C++])
-AC_LIBTOOL_TAGS([CXX])
-LT_INIT
+LT_INIT([C++])
 
 
 ## ---------------------------- ##

reply via email to

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