]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/libtool.m4 (_LT_LANG_DEFAULT_CONFIG): Remove code to handle 'none'
authorScott James Remnant <scott@netsplit.com>
Thu, 15 Apr 2004 17:05:26 +0000 (17:05 +0000)
committerScott James Remnant <scott@netsplit.com>
Thu, 15 Apr 2004 17:05:26 +0000 (17:05 +0000)
and 'all' options, this now always assumes automatic mode as that
works so well.
(_LT_LANG_DEFAULT): Remove definition
* m4/ltoptions.m4: Remove 'no-lang', 'auto-lang' and 'all-lang' options.
* configure.ac: Invoke LT_LANG for each desired supported language.
* doc/libtool.texi: Remove documentation for the LT_INIT options,
rewrite LT_LANG documentation.

ChangeLog
configure.ac
doc/libtool.texi
m4/libtool.m4
m4/ltoptions.m4

index 42d8e8e803bb3a47ffc306fef34663138092c8da..7532c5ed9144638b0188d796dcf6daa69731500b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-04-15  Scott James Remnant  <scott@netsplit.com>
+
+       * m4/libtool.m4 (_LT_LANG_DEFAULT_CONFIG): Remove code to handle 'none'
+       and 'all' options, this now always assumes automatic mode as that
+       works so well.
+       (_LT_LANG_DEFAULT): Remove definition
+       * m4/ltoptions.m4: Remove 'no-lang', 'auto-lang' and 'all-lang' options.
+       * configure.ac: Invoke LT_LANG for each desired supported language.
+       * doc/libtool.texi: Remove documentation for the LT_INIT options,
+       rewrite LT_LANG documentation.
+       
 2004-04-14  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * bootstrap: Delete acinclude.m4.
index 7cd5beec0ef5fe492adb2ef636e7f86a06592195..35930f30a912448d1f180043a1a1599ba55a6183 100644 (file)
@@ -155,11 +155,10 @@ AC_PROG_LD
 AC_PROG_NM
 AC_PROG_LN_S
 
-# Other languages get automatically inferred by the all-lang option passed
-# to LT_INIT below, however the Autoconf tests for C++ and Fortran 77
-# sometimes call AC_MSG_ERROR and we don't want that to be an error while
-# creating the libtool script, as these macros are AC_REQUIREd we can simply
-# call them here and catch the errors.
+# The Autoconf tests for C++ and Fortran 77 sometimes call AC_MSG_ERROR
+# and we don't want that to be an error whilst creating the libtool script.
+# As these are AC_REQUIREd inside libtool.m4 we can simply call them here
+# and catch the errors now.
 pushdef([AC_MSG_ERROR], [caught_CXX_error=yes])
 AC_PROG_CXX
 AC_PROG_CXXCPP
@@ -175,9 +174,15 @@ popdef([AC_MSG_ERROR])
 ## ----------------------- ##
 AC_CONFIG_FILES([config/ltmain.sh:./ltmain.in])
 AC_CONFIG_FILES([libtoolize], [chmod a+x libtoolize])
-LT_INIT([dlopen win32-dll all-lang])
+LT_INIT([dlopen win32-dll])
 AC_LIB_LTDL
 
+# Enable all the language support we can
+LT_LANG(C++)
+LT_LANG(Fortran 77)
+LT_LANG(Java)
+LT_LANG(Windows Resource)
+
 
 ## --------------------------- ##
 ## Work out which tests to run ##
index 30db4ebaf77d0cedd6cb05f6af44d7f6c31e827e..8d80d3af345cf0ed4e199287614bbde7e97b0423 100644 (file)
@@ -1831,23 +1831,6 @@ Change the default behaviour of @command{libtool} to try to use only
 non-PIC objects.  The user may still override this default by
 specifying @samp{--without-pic} to @command{configure}.
 
-@item no-lang
-Change the default list of additional languages @command{libtool} supports
-to none, only the built-in C language support will be enabled.  Additional
-languages such as C++ will only be enabled if appropriate @code{LT_LANG}
-macros are added to your @file{configure.ac}.
-
-@item all-lang
-Change the default list of additional languages @command{libtool} supports
-to all that the host system supports.
-
-@item auto-lang
-Change the default list of additional languages @command{libtool} supports
-to be determined automatically by detecting macros such as
-@code{AC_PROG_CXX} in your @file{configure.ac}.  Additional languages can
-be added by adding appropriate @code{LT_LANG} macros to your
-@file{configure.ac}.
-
 @end itemize
 
 @end defmac
@@ -1855,13 +1838,28 @@ be added by adding appropriate @code{LT_LANG} macros to your
 @defmac LT_LANG (@var{LANGUAGE})
 Enable @command{libtool} support for the language given if it
 has not yet already been enabled.  Languages accepted are "C++",
-"Fortran 77", "Java" and "Windows Resource"@footnote{These may also be
-referred to by their generated tag names, "CXX", "F77", "GCJ" and "RC".}.
+"Fortran 77", "Java" and "Windows Resource".
+
+If Autoconf language support macros such as @code{AC_PROG_CXX} are
+used in your @file{configure.ac}, Libtool language support will automatically
+be enabled.
+
+Conversely using @code{LT_LANG} to enable language support for Libtool
+will automatically enable Autoconf language support as well.
+
+Both of the following examples are therefore valid ways of adding C++
+languge support to Libtool.
+
+@example
+LT_INIT
+LT_LANG(C++)
+@end example
+
+@example
+LT_INIT
+AC_PROG_CXX
+@end example
 
-By default, the set of languages @command{libtool} will support is
-determined automatically by detected macros such as @code{AC_PROG_CXX}
-in your @file{configure.ac}.  This behaviour may be changed by passing
-either the "no-lang" or "all-lang" options to @code{LT_INIT}.
 @end defmac
 
 The tests in @code{LT_INIT} also recognize the following
index acc4e35f81c38d65a82c23dbd29c8ead6bb08188..1ceda32823b67238729b148918ceff99f7cc38ab 100644 (file)
@@ -557,7 +557,6 @@ _LT_EOF
 # C support is built-in for now
 m4_define([_LT_LANG_C_enabled], [])
 m4_define([_LT_TAGS], [])
-m4_define([_LT_LANG_DEFAULT], [AUTO])
 
 # LT_LANG(LANG)
 # -------------
@@ -586,38 +585,32 @@ m4_define([_LT_LANG],
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_define([_LT_LANG_DEFAULT_CONFIG],
-[m4_case(m4_defn([_LT_LANG_DEFAULT]),
-  [NONE], [m4_define([_LT_TAGS], [])],
-  [ALL],  [m4_foreach(LT_Lang, [CXX, GCJ, F77, RC], [LT_LANG(LT_Lang)])],
-  [AUTO], [
-    AC_PROVIDE_IFELSE([AC_PROG_CXX],
-      [LT_LANG(CXX)],
-      [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-    AC_PROVIDE_IFELSE([AC_PROG_F77],
-      [LT_LANG(F77)],
-      [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-    dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-    dnl pulling things in needlessly.
-    AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
       [LT_LANG(GCJ)],
-      [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-       [LT_LANG(GCJ)],
-       [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
-         [LT_LANG(GCJ)],
-         [m4_ifdef([AC_PROG_GCJ],
-           [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
-          m4_ifdef([A][M_PROG_GCJ],
-           [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
-          m4_ifdef([LT_PROG_GCJ],
-           [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-    AC_PROVIDE_IFELSE([LT_PROG_RC],
-      [LT_LANG(RC)],
-      [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-  ],
-  [])dnl
+      [m4_ifdef([AC_PROG_GCJ],
+       [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+       [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+       [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
 ])# _LT_LANG_DEFAULT_CONFIG
 
 # Obsolete macros
index acc543d94bee7f7168417da914c98f96b344f3fc..ea3089d330387f58b23082efe0e8f30992743bba 100644 (file)
@@ -356,11 +356,3 @@ AC_DIAGNOSE([obsolete],
 [$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.])
 ])
-
-
-# _LT_LANG_DEFAULT is predefined in libtool.m4 and used by
-# _LT_LANG_DEFAULT_CONFIG()
-
-LT_OPTION_DEFINE([no-lang],   [m4_define([_LT_LANG_DEFAULT], [NONE])])
-LT_OPTION_DEFINE([auto-lang], [m4_define([_LT_LANG_DEFAULT], [AUTO])])
-LT_OPTION_DEFINE([all-lang],  [m4_define([_LT_LANG_DEFAULT], [ALL])])