From: Scott James Remnant Date: Sun, 21 Mar 2004 16:05:28 +0000 (+0000) Subject: Further sweeping changes to the user interface to libtool from X-Git-Tag: release-1-9b~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05501155897e0c4bcb8579d9aaf6de560dac90dd;p=thirdparty%2Flibtool.git Further sweeping changes to the user interface to libtool from `configure.ac' to allow users to better control the list of supported languages. Three LT_INIT options 'no-lang', 'all-lang' and 'auto-lang' (the default) control the initial list and others may be added with LT_LANG. * m4/libtool.m4 (_LT_CONFIG): Renamed AC_LIBTOOL_CONFIG to _LT_CONFIG which is more consistent with our own namespace and gets us further out of Autoconf's. (_LT_LIBTOOL_TAGS): Output available_tags variable based entirely on the value of _LT_TAGS. (_LT_COPYING): Call _LT_LIBTOOL_TAGS to output available tags, always append tag configuration if the tag is available. (LT_LANG): New macro to enable support for a language that accepts tag names (eg. "CXX") or human language names (eg. "C++"). (_LT_LANG): Internal support macro for above that appends the tag to _LT_TAGS and calls the appropriate config macro. (LT_INIT): Ensure that LT_LANG is not called before LT_INIT. (AC_LIBTOOL_TAGS): Removed, call LT_LANG for each language now. (_LT_AC_TAG_CHECK): Removed, _LT_LANG handles duplicate calls. (_LT_LANG_DEFAULT_CONFIG): Macro to set initial language support based on options passed to LT_INIT. (_LT_SETUP): Call _LT_LANG_DEFAULT_CONFIG. (_LT_AC_TAG_CONFIG): Removed, handled by _LT_LANG_DEFAULT_CONFIG. (_LT_AC_LANG_CXX, _LT_AC_LANG_F77, _LT_AC_LANG_GCJ): Removed, automatic language support inclusion now handled by _LT_LANG_DEFAULT_CONFIG. (AC_LIBTOOL_CXX): Obsolete macro, update to LT_LANG(C++). (AC_LIBTOOL_F77): Obsolete macro, update to LT_LANG(Fortran 77). (AC_LIBTOOL_GCJ): Obsolete macro, update to LT_LANG(Java). (AC_LIBTOOL_LANG_C_CONFIG_: Removed. (_LT_AC_LANG_C_CONFIG): Renamed to _LT_LANG_C_CONFIG, call _LT_CONFIG instead of AC_LIBTOOL_CONFIG. (_LT_SETUP): Replace call to AC_LIBTOOL_LANG_C_CONFIG with call to new _LT_LANG_C_CONFIG macro. (AC_LIBTOOL_LANG_CXX_CONFIG): Removed. (_LT_AC_LANG_CXX_CONFIG): Renamed to _LT_LANG_CXX_CONFIG, call _LT_CONFIG instead of AC_LIBTOOL_CONFIG. (AC_LIBTOOL_LANG_F77_CONFIG): Removed. (_LT_AC_LANG_F77_CONFIG): Renamed to _LT_LANG_F77_CONFIG, call _LT_CONFIG instead of AC_LIBTOOL_CONFIG. (AC_LIBTOOL_LANG_GCJ_CONFIG): Removed. (_LT_AC_LANG_GCJ_CONFIG): Renamed to _LT_LANG_GCJ_CONFIG, call _LT_CONFIG instead of AC_LIBTOOL_CONFIG. (AC_LIBTOOL_LANG_RC_CONFIG): Removed. (_LT_AC_LANG_RC_CONFIG): Renamed to _LT_LANG_RC_CONFIG, call _LT_CONFIG instead of AC_LIBTOOL_CONFIG. (LT_AC_PROG_GCJ): Renamed to LT_PROG_GCJ. (LT_AC_PROG_RC): Renamed to LT_PROG_RC. * m4/ltoptions.m4: Define new 'no-lang', 'auto-lang' and 'all-lang' options which set the default for _LT_LANG_DEFAULT_CONFIG. * m4/lt~obsolete.m4: Removed AC_LIBTOOL_CONFIG, _LT_AC_LANG_C_CONFIG, _LT_AC_LANG_GCJ_CONFIG, _LT_AC_LANG_RC_CONFIG; all of which are no long referenced in any way. * configure.ac: Enable all languages. * tests/cdemo/configure.ac, tests/demo/configure,ac, tests/depdemo/configure.ac, tests/f77demo/configure.ac, tests/mdemo/configure.ac, tests/pdemo/configure,ac, tests/tagdemo/configure.ac: Remove calls to AC_LIBTOOL_TAGS, the default 'auto-lang' mode now does the right thing. * doc/libtool.texi (The LT_INIT macro): Add documentation for new LT_INIT options and the LT_LANG macro, replacing the old documentation of AC_LIBTOOL_TAGS which is no more. * NEWS: Updated. --- diff --git a/ChangeLog b/ChangeLog index bf45f138d..1a54dd14c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,70 @@ +2004-03-21 Scott James Remnant + + Further sweeping changes to the user interface to libtool from + `configure.ac' to allow users to better control the list of + supported languages. Three LT_INIT options 'no-lang', 'all-lang' + and 'auto-lang' (the default) control the initial list and others + may be added with LT_LANG. + + * m4/libtool.m4 (_LT_CONFIG): Renamed AC_LIBTOOL_CONFIG to _LT_CONFIG + which is more consistent with our own namespace and gets us further out + of Autoconf's. + (_LT_LIBTOOL_TAGS): Output available_tags variable based entirely + on the value of _LT_TAGS. + (_LT_COPYING): Call _LT_LIBTOOL_TAGS to output available tags, + always append tag configuration if the tag is available. + (LT_LANG): New macro to enable support for a language that accepts + tag names (eg. "CXX") or human language names (eg. "C++"). + (_LT_LANG): Internal support macro for above that appends the + tag to _LT_TAGS and calls the appropriate config macro. + (LT_INIT): Ensure that LT_LANG is not called before LT_INIT. + (AC_LIBTOOL_TAGS): Removed, call LT_LANG for each language now. + (_LT_AC_TAG_CHECK): Removed, _LT_LANG handles duplicate calls. + (_LT_LANG_DEFAULT_CONFIG): Macro to set initial language support + based on options passed to LT_INIT. + (_LT_SETUP): Call _LT_LANG_DEFAULT_CONFIG. + (_LT_AC_TAG_CONFIG): Removed, handled by _LT_LANG_DEFAULT_CONFIG. + (_LT_AC_LANG_CXX, _LT_AC_LANG_F77, _LT_AC_LANG_GCJ): Removed, + automatic language support inclusion now handled by + _LT_LANG_DEFAULT_CONFIG. + (AC_LIBTOOL_CXX): Obsolete macro, update to LT_LANG(C++). + (AC_LIBTOOL_F77): Obsolete macro, update to LT_LANG(Fortran 77). + (AC_LIBTOOL_GCJ): Obsolete macro, update to LT_LANG(Java). + (AC_LIBTOOL_LANG_C_CONFIG_: Removed. + (_LT_AC_LANG_C_CONFIG): Renamed to _LT_LANG_C_CONFIG, call + _LT_CONFIG instead of AC_LIBTOOL_CONFIG. + (_LT_SETUP): Replace call to AC_LIBTOOL_LANG_C_CONFIG with call to + new _LT_LANG_C_CONFIG macro. + (AC_LIBTOOL_LANG_CXX_CONFIG): Removed. + (_LT_AC_LANG_CXX_CONFIG): Renamed to _LT_LANG_CXX_CONFIG, call + _LT_CONFIG instead of AC_LIBTOOL_CONFIG. + (AC_LIBTOOL_LANG_F77_CONFIG): Removed. + (_LT_AC_LANG_F77_CONFIG): Renamed to _LT_LANG_F77_CONFIG, call + _LT_CONFIG instead of AC_LIBTOOL_CONFIG. + (AC_LIBTOOL_LANG_GCJ_CONFIG): Removed. + (_LT_AC_LANG_GCJ_CONFIG): Renamed to _LT_LANG_GCJ_CONFIG, call + _LT_CONFIG instead of AC_LIBTOOL_CONFIG. + (AC_LIBTOOL_LANG_RC_CONFIG): Removed. + (_LT_AC_LANG_RC_CONFIG): Renamed to _LT_LANG_RC_CONFIG, call + _LT_CONFIG instead of AC_LIBTOOL_CONFIG. + (LT_AC_PROG_GCJ): Renamed to LT_PROG_GCJ. + (LT_AC_PROG_RC): Renamed to LT_PROG_RC. + * m4/ltoptions.m4: Define new 'no-lang', 'auto-lang' and 'all-lang' + options which set the default for _LT_LANG_DEFAULT_CONFIG. + * m4/lt~obsolete.m4: Removed AC_LIBTOOL_CONFIG, _LT_AC_LANG_C_CONFIG, + _LT_AC_LANG_GCJ_CONFIG, _LT_AC_LANG_RC_CONFIG; all of which are no + long referenced in any way. + * configure.ac: Enable all languages. + * tests/cdemo/configure.ac, tests/demo/configure,ac, + tests/depdemo/configure.ac, tests/f77demo/configure.ac, + tests/mdemo/configure.ac, tests/pdemo/configure,ac, + tests/tagdemo/configure.ac: Remove calls to AC_LIBTOOL_TAGS, + the default 'auto-lang' mode now does the right thing. + * doc/libtool.texi (The LT_INIT macro): Add documentation for + new LT_INIT options and the LT_LANG macro, replacing the old + documentation of AC_LIBTOOL_TAGS which is no more. + * NEWS: Updated. + 2004-03-17 Scott James Remnant * m4/libtool.m4: Removed AC_BEFORE references to AC_LIBTOOL_SETUP diff --git a/NEWS b/NEWS index d86949c05..3b2287c6d 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,9 @@ New in 1.5b: 2004-??-??; CVS version 1.5a, Libtool team: AC_ENABLE_FAST_INSTALL, AC_DISABLE_FAST_INSTALL, AC_LIBTOOL_DLOPEN, AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_PIC_MODE. Use autoupdate to modernise your configure.ac files after installing this release. +* New LT_LANG interface to enable libtool support for a specific language. +* Language support is now only included if your configure.ac enables it, + either through a call to AC_PROG_CXX etc. or LT_LANG. * The libtool script will complain if it was built from mismatched ltmain.sh and libtool m4 macro versions. * Like automake, libtoolize no longer installs config.guess and config.sub by @@ -28,7 +31,6 @@ New in 1.5b: 2004-??-??; CVS version 1.5a, Libtool team: * If you configure libtool with --disable-shared (or if libtool does not support shared libraries on your platform) trying to build a library using `-shared' is a fatal error. -* New AC_LIBTOOL_TAGS macro to limit configure checks to only the listed tags. * libtoolize installs libtool.m4 (and ltdl.m4 if used) to AC_CONFIG_MACRO_DIR. * Mode inferrence removed, shorthand for choosing modes added. * Specifying -allow-undefined is now an error. diff --git a/configure.ac b/configure.ac index af781bb92..9fa69bca7 100644 --- a/configure.ac +++ b/configure.ac @@ -181,7 +181,7 @@ AM_CONDITIONAL(HAVE_RC, [test "x$RC" != xno]) ## ----------------------- ## 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 all-lang]) AC_LIB_LTDL diff --git a/doc/libtool.texi b/doc/libtool.texi index f145c60da..6ea909b0a 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -1831,19 +1831,37 @@ 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 -@defmac 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 integral to libtool and can not be -disabled. +@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".}. + +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 --git a/m4/libtool.m4 b/m4/libtool.m4 index 6b8eca630..ac8033b5a 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -54,9 +54,7 @@ AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([_LT_PROG_LTMAIN])dnl -AC_BEFORE([$0], [AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0], [AC_LIBTOOL_F77])dnl -AC_BEFORE([$0], [AC_LIBTOOL_GCJ])dnl +AC_BEFORE([$0], [LT_LANG])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" @@ -188,8 +186,8 @@ AC_ARG_ENABLE([libtool-lock], test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Use C for the default configuration in the libtool script -AC_LIBTOOL_LANG_C_CONFIG -_LT_AC_TAG_CONFIG +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP @@ -367,6 +365,14 @@ m4_define([_LT_CONFIG_STATUS_DECLARATIONS], [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_define([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="[]_LT_TAGS[]"dnl +]) + # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and @@ -454,13 +460,13 @@ _LT_OUTPUT_LIBTOOL_INIT ])#_LT_CONFIG_COMMANDS -# AC_LIBTOOL_CONFIG([TAGNAME]) +# _LT_CONFIG(TAG) # ---------------------------- -# If TAGNAME is not passed, then create an initial libtool script -# with a default configuration from the untagged config vars. Otherwise -# add code to config.status for appending the configuration named by -# TAGNAME from the matching tagged config vars. -m4_define([AC_LIBTOOL_CONFIG], +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_define([_LT_CONFIG], [_LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ @@ -484,8 +490,7 @@ m4_define([AC_LIBTOOL_CONFIG], # _LT_COPYING -# The names of the tagged configurations supported by this script. -available_tags= +_LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS @@ -524,8 +529,7 @@ _LT_EOF (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], -[if test -n "[$]_LT_TAG" && test "X[$]_LT_TAG" != "Xno"; then - cat <<_LT_EOF >> "$ofile" +[cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). @@ -533,7 +537,6 @@ dnl in a comment (ie after a #). _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF -fi ])dnl /m4_if ], [m4_if([$1], [], [ @@ -543,7 +546,79 @@ fi rm='$rm' ofile='$ofile'], [$1='[$]$1']) ])dnl /_LT_CONFIG_SAVE_COMMANDS -])# AC_LIBTOOL_CONFIG +])# _LT_CONFIG + + +# 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) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + +# _LT_LANG(LANGNAME, TAG) +# ------------------------ +m4_define([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _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], + [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 +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java])]) # _LT_AC_SYS_COMPILER @@ -2041,85 +2116,6 @@ _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], ])# 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], -[m4_ifdef([_LT_TAG_]$1, - [m4_errprintn(m4_location[: error: duplicate tag: ]"$1") - m4_exit(1)], - [m4_define([_LT_TAG_]$1, [])]) -]) # _LT_AC_TAG_CHECK - -# _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="" - AC_FOREACH([_LT_TAG], _LT_TAGS, - [m4_case(_LT_TAG, - [CXX], [_LT_AC_TAG_CHECK([CXX]) - if test -n "$CXX" && test "X$CXX" != "Xno"; then - AC_LIBTOOL_LANG_CXX_CONFIG - available_tags="$available_tags _LT_TAG" - fi], - [F77], [_LT_AC_TAG_CHECK(_LT_TAG) - if test -n "$F77" && test "X$F77" != "Xno"; then - AC_LIBTOOL_LANG_F77_CONFIG - available_tags="$available_tags _LT_TAG" - fi], - [GCJ], [_LT_AC_TAG_CHECK(_LT_TAG) - if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - AC_LIBTOOL_LANG_GCJ_CONFIG - available_tags="$available_tags _LT_TAG" - fi], - [RC], [_LT_AC_TAG_CHECK(_LT_TAG) - if test -n "$RC" && test "X$RC" != "Xno"; then - AC_LIBTOOL_LANG_RC_CONFIG - available_tags="$available_tags _LT_TAG" - fi], - [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG") - m4_exit(1)]) - ]) - - _LT_CONFIG_SAVE_COMMANDS([ - _LT_PROG_LTMAIN - if test -f "$ltmain"; then - if test ! -f "${ofile}"; then - AC_MSG_ERROR([output file `$ofile' does not exist]) - fi - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | $GREP '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_ERROR([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi - fi - ], [ - libtool='$ofile' - available_tags='$available_tags' - ])dnl -])# _LT_AC_TAG_CONFIG - - # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library @@ -4260,76 +4256,12 @@ dnl [Compiler flag to generate thread safe objects]) ])# AC_LIBTOOL_PROG_LD_SHLIBS -# AC_LIBTOOL_CXX -# -------------- -# enable support for C++ libraries -AC_DEFUN([AC_LIBTOOL_CXX], -[AC_REQUIRE([_LT_AC_LANG_CXX]) -])# AC_LIBTOOL_CXX - - -# _LT_AC_LANG_CXX -# --------------- -AC_DEFUN([_LT_AC_LANG_CXX], -[AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - - -# AC_LIBTOOL_F77 -# -------------- -# enable support for Fortran 77 libraries -AC_DEFUN([AC_LIBTOOL_F77], -[AC_REQUIRE([_LT_AC_LANG_F77]) -])# AC_LIBTOOL_F77 - - -# _LT_AC_LANG_F77 -# --------------- -AC_DEFUN([_LT_AC_LANG_F77], -[AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) -])# _LT_AC_LANG_F77 - - -# AC_LIBTOOL_GCJ -# -------------- -# enable support for GCJ libraries -AC_DEFUN([AC_LIBTOOL_GCJ], -[AC_REQUIRE([_LT_AC_LANG_GCJ]) -])# AC_LIBTOOL_GCJ - - -# _LT_AC_LANG_GCJ -# --------------- -AC_DEFUN([_LT_AC_LANG_GCJ], -[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], - [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], - [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], - [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) -])# _LT_AC_LANG_GCJ - - -# AC_LIBTOOL_RC -# -------------- -# enable support for Windows resource files -AC_DEFUN([AC_LIBTOOL_RC], -[AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) -])# AC_LIBTOOL_RC - - -# AC_LIBTOOL_LANG_C_CONFIG +# _LT_LANG_C_CONFIG([TAG]) # ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) -m4_define([_LT_AC_LANG_C_CONFIG], +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_define([_LT_LANG_C_CONFIG], [AC_REQUIRE([LT_AC_PROG_EGREP]) lt_save_CC="$CC" AC_LANG_PUSH(C) @@ -4418,20 +4350,19 @@ AC_MSG_CHECKING([whether to build static libraries]) test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) -AC_LIBTOOL_CONFIG($1) +_LT_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_C_CONFIG +])# _LT_LANG_C_CONFIG -# AC_LIBTOOL_LANG_CXX_CONFIG +# _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) -AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_define([_LT_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([LT_AC_PROG_EGREP]) AC_REQUIRE([AC_PROG_CXX]) @@ -5298,7 +5229,7 @@ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) -AC_LIBTOOL_CONFIG($1) +_LT_CONFIG($1) AC_LANG_POP CC=$lt_save_CC @@ -5311,7 +5242,7 @@ lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -])# AC_LIBTOOL_LANG_CXX_CONFIG +])# _LT_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) @@ -5466,13 +5397,12 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1], a shared library]) ])# AC_LIBTOOL_POSTDEP_PREDEP -# AC_LIBTOOL_LANG_F77_CONFIG -# ------------------------ -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) -AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_define([_LT_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) @@ -5559,20 +5489,19 @@ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP -AC_LIBTOOL_CONFIG($1) +_LT_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_F77_CONFIG +])# _LT_LANG_F77_CONFIG -# AC_LIBTOOL_LANG_GCJ_CONFIG +# _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- -# Ensure that the configuration vars for the C compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) -m4_define([_LT_AC_LANG_GCJ_CONFIG], +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_define([_LT_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. @@ -5614,20 +5543,19 @@ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) -AC_LIBTOOL_CONFIG($1) +_LT_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_GCJ_CONFIG +])# _LT_LANG_GCJ_CONFIG -# AC_LIBTOOL_LANG_RC_CONFIG +# _LT_LANG_RC_CONFIG([TAG]) # -------------------------- -# Ensure that the configuration vars for the Windows resource compiler are -# suitably defined. Those variables are subsequently used by -# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. -AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) -m4_define([_LT_AC_LANG_RC_CONFIG], +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_define([_LT_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. @@ -5653,22 +5581,24 @@ compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes -AC_LIBTOOL_CONFIG($1) +_LT_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" -])# AC_LIBTOOL_LANG_RC_CONFIG +])# _LT_LANG_RC_CONFIG -AC_DEFUN([LT_AC_PROG_GCJ], +AC_DEFUN([LT_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) +AU_DEFUN([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -AC_DEFUN([LT_AC_PROG_RC], +AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) +AU_DEFUN([LT_AC_PROG_RC], [LT_PROG_RC]) # LT_AC_PROG_EGREP diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index ea3089d33..acc543d94 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -356,3 +356,11 @@ 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])]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 index d753ba7ae..356013812 100644 --- a/m4/lt~obsolete.m4 +++ b/m4/lt~obsolete.m4 @@ -44,12 +44,8 @@ # Anytime we withdraw an AC_DEFUN or AU_DEFUN, but still refer to it, # remember to add it here. -m4_ifdef([AC_LIBTOOL_CONFIG],, [AU_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifdef([AC_LIBTOOL_LINKER_OPTION],, [AU_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifdef([AC_PROG_EGREP],, [AU_DEFUN([AC_PROG_EGREP])]) -m4_ifdef([_LT_AC_LANG_C_CONFIG],, [AU_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifdef([_LT_AC_LANG_GCJ_CONFIG],, [AU_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifdef([_LT_AC_LANG_RC_CONFIG],, [AU_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifdef([_LT_AC_PROG_ECHO_BACKSLASH],, [AU_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifdef([_LT_AC_SHELL_INIT],, [AU_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifdef([_LT_AC_SYS_LIBPATH_AIX],, [AU_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) diff --git a/tests/cdemo/configure.ac b/tests/cdemo/configure.ac index f85b2fda3..b3b2babeb 100644 --- a/tests/cdemo/configure.ac +++ b/tests/cdemo/configure.ac @@ -41,7 +41,6 @@ AC_PROG_CC ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## -AC_LIBTOOL_TAGS([]) LT_INIT AC_SUBST([LIBTOOL_DEPS]) diff --git a/tests/demo/configure.ac b/tests/demo/configure.ac index e4ab33a69..8a6cc931b 100644 --- a/tests/demo/configure.ac +++ b/tests/demo/configure.ac @@ -44,7 +44,6 @@ AC_EXEEXT ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## -AC_LIBTOOL_TAGS([]) LT_INIT([dlopen win32-dll]) AC_SUBST([LIBTOOL_DEPS]) diff --git a/tests/depdemo/configure.ac b/tests/depdemo/configure.ac index 821a2c7a7..5208e6d4c 100644 --- a/tests/depdemo/configure.ac +++ b/tests/depdemo/configure.ac @@ -42,7 +42,6 @@ AC_EXEEXT ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## -AC_LIBTOOL_TAGS([]) LT_INIT([win32-dll]) AC_SUBST([LIBTOOL_DEPS]) diff --git a/tests/f77demo/configure.ac b/tests/f77demo/configure.ac index 3d2ca799a..43a9e49e2 100644 --- a/tests/f77demo/configure.ac +++ b/tests/f77demo/configure.ac @@ -61,7 +61,6 @@ AC_LANG_POP ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## -AC_LIBTOOL_TAGS([F77]) LT_INIT AC_SUBST([LIBTOOL_DEPS]) diff --git a/tests/mdemo/configure.ac b/tests/mdemo/configure.ac index 96eb4d8c0..a10f234a7 100644 --- a/tests/mdemo/configure.ac +++ b/tests/mdemo/configure.ac @@ -47,7 +47,6 @@ AC_LIBLTDL_CONVENIENCE([../../libltdl]) AC_SUBST([INCLTDL]) AC_SUBST([LIBLTDL]) -AC_LIBTOOL_TAGS([]) LT_INIT([dlopen win32-dll]) AC_SUBST(LIBTOOL_DEPS) diff --git a/tests/mdemo2/configure.ac b/tests/mdemo2/configure.ac index 4b2c5553f..664431b46 100644 --- a/tests/mdemo2/configure.ac +++ b/tests/mdemo2/configure.ac @@ -43,7 +43,6 @@ AC_C_CONST ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## -AC_LIBTOOL_TAGS([]) LT_INIT([dlopen]) AC_SUBST(LIBTOOL_DEPS) diff --git a/tests/pdemo/configure.ac b/tests/pdemo/configure.ac index 5a6d045f1..73566cd07 100644 --- a/tests/pdemo/configure.ac +++ b/tests/pdemo/configure.ac @@ -43,7 +43,6 @@ AC_C_CONST ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## -AC_LIBTOOL_TAGS([]) LT_INIT([dlopen]) AC_SUBST([LIBTOOL_DEPS]) diff --git a/tests/tagdemo/configure.ac b/tests/tagdemo/configure.ac index 79f5eb92c..ab270e73d 100644 --- a/tests/tagdemo/configure.ac +++ b/tests/tagdemo/configure.ac @@ -64,7 +64,6 @@ AC_LANG_POP # Set the test language to C++. AC_LANG([C++]) -AC_LIBTOOL_TAGS([CXX]) LT_INIT