+2002-05-30 Gary V. Vaughan <gary@gnu.org>
+
+ Finally fix the annoying bug which always adds all tags to the
+ libtool script built by your project configure. Now we set the
+ default tags depending on whether AC_PROG_CXX et. al. are actually
+ called from configure.ac.
+
+ * libtool.m4 (_LT_AC_TAGCONFIG): Don't default the tagnames when
+ no --with-tags argument is given.
+ (_LT_AC_SHELL_INIT): Factored out from the AC_DIVERT_PUSH code
+ in...
+ (_LT_AC_PROG_ECHO_BACKSLASH): ...which now calls the macro
+ instead.
+ (AC_LIBTOOL_CXX): Use _LT_AC_SHELL_INIT to add CXX to the
+ initialisation sequence for tagnames.
+ (AC_LIBTOOL_GCJ): Similarly for GCJ tag.
+ (AC_LIBTOOL_RC): Likewise for RC tag.
+
2002-05-21 Jon Meredith <jonm@alchemetrics.co.uk>
* ltmain.in: Fix a problem on SCO OpenServer5 that caused a
# serial 47 AC_PROG_LIBTOOL
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [m4_define([AC_PROVIDE_IFELSE],
+ [m4_ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
+
+
# AC_PROG_LIBTOOL
# ---------------
AC_DEFUN([AC_PROG_LIBTOOL],
])# _LT_AC_SYS_LIBPATH_AIX
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
# _LT_AC_PROG_ECHO_BACKSLASH
# --------------------------
# Add some code to the start of the generated configure script which
# will find an echo command which doesn't interpret backslashes.
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-
+[_LT_AC_SHELL_INIT([
# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
fi
AC_SUBST(ECHO)
-AC_DIVERT_POP
-])# _LT_AC_PROG_ECHO_BACKSLASH
+])])# _LT_AC_PROG_ECHO_BACKSLASH
# _LT_AC_LOCK
# ----------------
AC_DEFUN([_LT_AC_TAGCONFIG],
[AC_ARG_WITH([tags],
- [AC_HELP_STRING([--with-tags=TAGS],
- [include additional configurations @<:@CXX,GCJ@:>@])],
- [tagnames="$withval"],
- [tagnames="CXX,GCJ"
- case $host_os in
- mingw*|cygwin*) tagnames="$tagnames,RC" ;;
- esac])
+ [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+ [include additional configurations @<:@automatic@:>@])],
+ [tagnames="$withval"])
if test -f "$ltmain" && test -n "$tagnames"; then
if test ! -f "${ofile}"; then
])# AC_LIBLTDL_INSTALLABLE
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
-
-
# AC_LIBTOOL_CXX
# --------------
# enable support for C++ libraries
AC_DEFUN([_LT_AC_LANG_CXX],
[AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
])# _LT_AC_LANG_CXX
[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=`echo "$tagnames,GCJ" | sed 's/^,//'`])
])# _LT_AC_LANG_GCJ
# enable support for Windows resource files
AC_DEFUN([AC_LIBTOOL_RC],
[AC_REQUIRE([AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
])# AC_LIBTOOL_RC