[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Remove LT_INIT language support options
From: |
Scott James Remnant |
Subject: |
[PATCH] Remove LT_INIT language support options |
Date: |
Wed, 14 Apr 2004 18:07:52 +0100 |
The automatic language support detection seems to be working pretty
well, and consensus seems to be that the LT_INIT options are pretty ugly
and unnecessary.
This patch removes them, Libtool will now always automatically detect
support. I've updated the documentation to reflect this.
Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?
diff -ruNp libtool-CVS~/ChangeLog libtool-CVS/ChangeLog
--- libtool-CVS~/ChangeLog 2004-04-14 17:16:26.000000000 +0100
+++ libtool-CVS/ChangeLog 2004-04-14 17:58:01.000000000 +0100
@@ -0,0 +1,11 @@
+2004-04-14 Scott James Remnant <address@hidden>
+
+ * 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.
+
diff -ruNp libtool-CVS~/configure.ac libtool-CVS/configure.ac
--- libtool-CVS~/configure.ac 2004-03-24 14:18:34.000000000 +0000
+++ libtool-CVS/configure.ac 2004-04-14 17:51:42.000000000 +0100
@@ -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 ##
diff -ruNp libtool-CVS~/doc/libtool.texi libtool-CVS/doc/libtool.texi
--- libtool-CVS~/doc/libtool.texi 2004-04-13 00:57:51.000000000 +0100
+++ libtool-CVS/doc/libtool.texi 2004-04-14 18:02:12.000000000 +0100
@@ -1831,23 +1831,6 @@ Change the default behaviour of @command
non-PIC objects. The user may still override this default by
specifying @samp{--without-pic} to @command{configure}.
address@hidden 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}.
-
address@hidden all-lang
-Change the default list of additional languages @command{libtool} supports
-to all that the host system supports.
-
address@hidden auto-lang
-Change the default list of additional languages @command{libtool} supports
-to be determined automatically by detecting macros such as
address@hidden in your @file{configure.ac}. Additional languages can
-be added by adding appropriate @code{LT_LANG} macros to your
address@hidden
-
@end itemize
@end defmac
@@ -1855,13 +1838,28 @@ be added by adding appropriate @code{LT_
@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.
+
address@hidden
+LT_INIT
+LT_LANG(C++)
address@hidden example
+
address@hidden
+LT_INIT
+AC_PROG_CXX
address@hidden 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
diff -ruNp libtool-CVS~/m4/libtool.m4 libtool-CVS/m4/libtool.m4
--- libtool-CVS~/m4/libtool.m4 2004-04-13 00:57:51.000000000 +0100
+++ libtool-CVS/m4/libtool.m4 2004-04-14 17:56:35.000000000 +0100
@@ -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
diff -ruNp libtool-CVS~/m4/ltoptions.m4 libtool-CVS/m4/ltoptions.m4
--- libtool-CVS~/m4/ltoptions.m4 2004-03-23 00:25:14.000000000 +0000
+++ libtool-CVS/m4/ltoptions.m4 2004-04-14 17:54:08.000000000 +0100
@@ -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])])
signature.asc
Description: This is a digitally signed message part
- [PATCH] Remove LT_INIT language support options,
Scott James Remnant <=