From: Gary V. Vaughan Date: Thu, 15 Jan 2004 08:36:48 +0000 (+0000) Subject: (AC_LIBTOOL_CONFIG): Refactor to be more readable. Only add X-Git-Tag: release-1-9b~201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3588ab4b0ea41b711b04c70c1ba38d693813dbb;p=thirdparty%2Flibtool.git (AC_LIBTOOL_CONFIG): Refactor to be more readable. Only add tags if a compiler was found; ie if you have no gcj compiler, don't tack the GCJ tag onto the generated libtool script. --- diff --git a/ChangeLog b/ChangeLog index 50eb91045..5116cecf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-01-12 Gary V. Vaughan + + * m4/libtool.m4 (_LT_COPYING): Factor out copyright message so it + only needs to be updated in one place. + (AC_LIBTOOL_CONFIG): Refactor to be more readable. Only add + tags if a compiler was found; ie if you have no gcj compiler, + don't tack the GCJ tag onto the generated libtool script. + 2004-01-13 Peter O'Gorman * m4/libtool.m4: Quote shrext as it is evaled in ltmain. @@ -11,7 +19,7 @@ * doc/libtool.texi: document the new option. * NEWS: announce the new option. -2004-01-08 Gary V. Vaughan +2004-01-11 Gary V. Vaughan * libtoolize.in (func_copy_all_files): s/xfunc_copy/Xfunc_copy. Now the test can actually succeed sometimes. diff --git a/m4/libtool.m4 b/m4/libtool.m4 index d619d6e6f..d89dae819 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,26 +1,31 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -## Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 -## Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -## As a special exception to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. +]) # serial 49 AC_PROG_LIBTOOL @@ -34,7 +39,6 @@ m4_ifdef([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) - # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], @@ -472,79 +476,45 @@ _LT_OUTPUT_LIBTOOL_INIT # TAGNAME from the matching tagged config vars. m4_define([AC_LIBTOOL_CONFIG], [_LT_CONFIG_SAVE_COMMANDS([ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi - m4_if([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile"], - [cfgfile="$ofile"] - ) + cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" - cat <<_LT_EOF >> "$cfgfile" -m4_if([$1], [], -[#! $SHELL + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by config.status (GNU $PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 -# Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi +_LT_COPYING # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS], -[# ### BEGIN LIBTOOL TAG CONFIG: $1 -])[]dnl -_LT_LIBTOOL_TAG_VARS([$1]) +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG -# A language-specific compiler. -CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi -m4_if([$1],[], - [# ### END LIBTOOL CONFIG], - [# ### END LIBTOOL TAG CONFIG: $1]) _LT_EOF -m4_if([$1],[], [ case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" - # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. @@ -557,6 +527,7 @@ _LT_EOF esac _LT_PROG_LTMAIN + # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem @@ -566,15 +537,26 @@ _LT_EOF mv -f "$cfgfile" "$ofile" || \ (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" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +fi +])dnl /m4_if ], [m4_if([$1], [], [ - rm='$rm' - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - ofile='$ofile']) -]) + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + rm='$rm' + ofile='$ofile'], [$1='[$]$1']) +])dnl /_LT_CONFIG_SAVE_COMMANDS ])# AC_LIBTOOL_CONFIG