annotate ltmain.sh @ 161:d384df37491f stable-6-02

allow manual updates to auto whitelist files
author carl
date Tue, 10 Jul 2007 14:09:23 -0700
parents 9978e29c4d71
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1 # ltmain.sh - Provide generalized library-building support services.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2 # NOTE: Changing this file will not affect anything until you rerun configure.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5 # Free Software Foundation, Inc.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
7 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
8 # This program is free software; you can redistribute it and/or modify
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
9 # it under the terms of the GNU General Public License as published by
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
10 # the Free Software Foundation; either version 2 of the License, or
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
11 # (at your option) any later version.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
12 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful, but
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
16 # General Public License for more details.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
17 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
19 # along with this program; if not, write to the Free Software
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
21 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
22 # As a special exception to the GNU General Public License, if you
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
23 # distribute this file as part of a program that contains a
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
24 # configuration script generated by Autoconf, you may include it under
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
25 # the same distribution terms that you use for the rest of that program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
26
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
27 basename="s,^.*/,,g"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
28
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
29 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
30 # is ksh but when the shell is invoked as "sh" and the current value of
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
31 # the _XPG environment variable is not equal to 1 (one), the special
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
32 # positional parameter $0, within a function call, is the name of the
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
33 # function.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
34 progpath="$0"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
35
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
36 # RH: define SED for historic ltconfig's generated by Libtool 1.3
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
37 [ -z "$SED" ] && SED=sed
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
38
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
39 # The name of this program:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
40 progname=`echo "$progpath" | $SED $basename`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
41 modename="$progname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
42
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
43 # Global variables:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
44 EXIT_SUCCESS=0
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
45 EXIT_FAILURE=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
46
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
47 PROGRAM=ltmain.sh
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
48 PACKAGE=libtool
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
49 VERSION=1.5.6
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
50 TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
51
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
52
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
53 # Check that we have a working $echo.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
54 if test "X$1" = X--no-reexec; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
55 # Discard the --no-reexec flag, and continue.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
56 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
57 elif test "X$1" = X--fallback-echo; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
58 # Avoid inline document here, it may be left over
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
59 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
60 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
61 # Yippee, $echo works!
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
62 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
63 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
64 # Restart under the correct shell, and then maybe $echo will work.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
65 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
66 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
67
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
68 if test "X$1" = X--fallback-echo; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
69 # used as fallback echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
70 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
71 cat <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
72 $*
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
73 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
74 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
75 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
76
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
77 default_mode=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
78 help="Try \`$progname --help' for more information."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
79 magic="%%%MAGIC variable%%%"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
80 mkdir="mkdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
81 mv="mv -f"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
82 rm="rm -f"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
83
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
84 # Sed substitution that helps us do robust quoting. It backslashifies
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
85 # metacharacters that are still active within double-quoted strings.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
86 Xsed="${SED}"' -e 1s/^X//'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
87 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
88 # test EBCDIC or ASCII
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
89 case `echo A|tr A '\301'` in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
90 A) # EBCDIC based system
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
91 SP2NL="tr '\100' '\n'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
92 NL2SP="tr '\r\n' '\100\100'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
93 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
94 *) # Assume ASCII based system
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
95 SP2NL="tr '\040' '\012'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
96 NL2SP="tr '\015\012' '\040\040'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
97 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
98 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
99
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
100 # NLS nuisances.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
101 # Only set LANG and LC_ALL to C if already set.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
102 # These must not be set unconditionally because not all systems understand
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
103 # e.g. LANG=C (notably SCO).
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
104 # We save the old values to restore during execute mode.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
105 if test "${LC_ALL+set}" = set; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
106 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
107 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
108 if test "${LANG+set}" = set; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
109 save_LANG="$LANG"; LANG=C; export LANG
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
110 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
111
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
112 # Make sure IFS has a sensible default
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
113 : ${IFS="
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
114 "}
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
115
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
116 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
117 $echo "$modename: not configured to build any kind of library" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
118 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
119 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
120 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
121
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
122 # Global variables.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
123 mode=$default_mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
124 nonopt=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
125 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
126 prevopt=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
127 run=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
128 show="$echo"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
129 show_help=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
130 execute_dlfiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
131 lo2o="s/\\.lo\$/.${objext}/"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
132 o2lo="s/\\.${objext}\$/.lo/"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
133
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
134 #####################################
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
135 # Shell function definitions:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
136 # This seems to be the best place for them
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
137
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
138 # func_win32_libid arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
139 # return the library type of file 'arg'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
140 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
141 # Need a lot of goo to handle *both* DLLs and import libs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
142 # Has to be a shell function in order to 'eat' the argument
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
143 # that is supplied when $file_magic_command is called.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
144 func_win32_libid () {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
145 win32_libid_type="unknown"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
146 win32_fileres=`file -L $1 2>/dev/null`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
147 case $win32_fileres in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
148 *ar\ archive\ import\ library*) # definitely import
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
149 win32_libid_type="x86 archive import"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
150 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
151 *ar\ archive*) # could be an import, or static
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
152 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
153 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
154 win32_nmres=`eval $NM -f posix -A $1 | \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
155 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
156 if test "X$win32_nmres" = "Ximport" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
157 win32_libid_type="x86 archive import"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
158 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
159 win32_libid_type="x86 archive static"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
160 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
161 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
162 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
163 *DLL*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
164 win32_libid_type="x86 DLL"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
165 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
166 *executable*) # but shell scripts are "executable" too...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
167 case $win32_fileres in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
168 *MS\ Windows\ PE\ Intel*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
169 win32_libid_type="x86 DLL"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
170 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
171 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
172 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
173 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
174 $echo $win32_libid_type
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
175 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
176
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
177
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
178 # func_infer_tag arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
179 # Infer tagged configuration to use if any are available and
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
180 # if one wasn't chosen via the "--tag" command line option.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
181 # Only attempt this if the compiler in the base compile
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
182 # command doesn't match the default compiler.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
183 # arg is usually of the form 'gcc ...'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
184 func_infer_tag () {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
185 if test -n "$available_tags" && test -z "$tagname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
186 CC_quoted=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
187 for arg in $CC; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
188 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
189 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
190 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
191 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
192 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
193 CC_quoted="$CC_quoted $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
194 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
195 case $@ in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
196 # Blanks in the command may have been stripped by the calling shell,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
197 # but not from the CC environment variable when configure was run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
198 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
199 # Blanks at the start of $base_compile will cause this to fail
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
200 # if we don't check for them as well.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
201 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
202 for z in $available_tags; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
203 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
204 # Evaluate the configuration.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
205 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
206 CC_quoted=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
207 for arg in $CC; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
208 # Double-quote args containing other shell metacharacters.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
209 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
210 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
211 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
212 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
213 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
214 CC_quoted="$CC_quoted $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
215 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
216 case "$@ " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
217 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
218 # The compiler in the base compile command matches
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
219 # the one in the tagged configuration.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
220 # Assume this is the tagged configuration we want.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
221 tagname=$z
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
222 break
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
223 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
224 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
225 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
226 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
227 # If $tagname still isn't set, then no tagged configuration
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
228 # was found and let the user know that the "--tag" command
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
229 # line option must be used.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
230 if test -z "$tagname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
231 $echo "$modename: unable to infer tagged configuration"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
232 $echo "$modename: specify a tag with \`--tag'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
233 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
234 # else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
235 # $echo "$modename: using $tagname tagged configuration"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
236 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
237 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
238 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
239 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
240 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
241 # End of Shell function definitions
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
242 #####################################
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
243
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
244 # Darwin sucks
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
245 eval std_shrext=\"$shrext_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
246
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
247 # Parse our command line options once, thoroughly.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
248 while test "$#" -gt 0
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
249 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
250 arg="$1"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
251 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
252
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
253 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
254 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
255 *) optarg= ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
256 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
257
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
258 # If the previous option needs an argument, assign it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
259 if test -n "$prev"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
260 case $prev in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
261 execute_dlfiles)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
262 execute_dlfiles="$execute_dlfiles $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
263 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
264 tag)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
265 tagname="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
266 preserve_args="${preserve_args}=$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
267
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
268 # Check whether tagname contains only valid characters
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
269 case $tagname in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
270 *[!-_A-Za-z0-9,/]*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
271 $echo "$progname: invalid tag name: $tagname" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
272 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
273 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
274 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
275
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
276 case $tagname in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
277 CC)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
278 # Don't test for the "default" C tag, as we know, it's there, but
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
279 # not specially marked.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
280 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
281 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
282 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
283 taglist="$taglist $tagname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
284 # Evaluate the configuration.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
285 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
286 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
287 $echo "$progname: ignoring unknown tag $tagname" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
288 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
289 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
290 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
291 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
292 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
293 eval "$prev=\$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
294 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
295 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
296
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
297 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
298 prevopt=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
299 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
300 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
301
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
302 # Have we seen a non-optional argument yet?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
303 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
304 --help)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
305 show_help=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
306 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
307
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
308 --version)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
309 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
310 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
311 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
312 $echo "This is free software; see the source for copying conditions. There is NO"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
313 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
314 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
315 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
316
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
317 --config)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
318 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
319 # Now print the configurations for the tags.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
320 for tagname in $taglist; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
321 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
322 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
323 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
324 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
325
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
326 --debug)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
327 $echo "$progname: enabling shell trace mode"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
328 set -x
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
329 preserve_args="$preserve_args $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
330 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
331
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
332 --dry-run | -n)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
333 run=:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
334 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
335
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
336 --features)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
337 $echo "host: $host"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
338 if test "$build_libtool_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
339 $echo "enable shared libraries"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
340 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
341 $echo "disable shared libraries"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
342 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
343 if test "$build_old_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
344 $echo "enable static libraries"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
345 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
346 $echo "disable static libraries"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
347 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
348 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
349 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
350
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
351 --finish) mode="finish" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
352
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
353 --mode) prevopt="--mode" prev=mode ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
354 --mode=*) mode="$optarg" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
355
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
356 --preserve-dup-deps) duplicate_deps="yes" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
357
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
358 --quiet | --silent)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
359 show=:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
360 preserve_args="$preserve_args $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
361 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
362
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
363 --tag) prevopt="--tag" prev=tag ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
364 --tag=*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
365 set tag "$optarg" ${1+"$@"}
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
366 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
367 prev=tag
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
368 preserve_args="$preserve_args --tag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
369 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
370
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
371 -dlopen)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
372 prevopt="-dlopen"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
373 prev=execute_dlfiles
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
374 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
375
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
376 -*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
377 $echo "$modename: unrecognized option \`$arg'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
378 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
379 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
380 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
381
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
382 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
383 nonopt="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
384 break
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
385 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
386 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
387 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
388
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
389 if test -n "$prevopt"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
390 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
391 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
392 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
393 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
394
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
395 # If this variable is set in any of the actions, the command in it
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
396 # will be execed at the end. This prevents here-documents from being
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
397 # left over by shells.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
398 exec_cmd=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
399
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
400 if test -z "$show_help"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
401
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
402 # Infer the operation mode.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
403 if test -z "$mode"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
404 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
405 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
406 case $nonopt in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
407 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
408 mode=link
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
409 for arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
410 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
411 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
412 -c)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
413 mode=compile
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
414 break
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
415 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
416 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
417 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
418 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
419 *db | *dbx | *strace | *truss)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
420 mode=execute
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
421 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
422 *install*|cp|mv)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
423 mode=install
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
424 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
425 *rm)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
426 mode=uninstall
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
427 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
428 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
429 # If we have no mode, but dlfiles were specified, then do execute mode.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
430 test -n "$execute_dlfiles" && mode=execute
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
431
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
432 # Just use the default operation mode.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
433 if test -z "$mode"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
434 if test -n "$nonopt"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
435 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
436 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
437 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
438 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
439 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
440 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
441 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
442 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
443
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
444 # Only execute mode is allowed to have -dlopen flags.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
445 if test -n "$execute_dlfiles" && test "$mode" != execute; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
446 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
447 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
448 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
449 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
450
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
451 # Change the help message to a mode-specific one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
452 generic_help="$help"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
453 help="Try \`$modename --help --mode=$mode' for more information."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
454
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
455 # These modes are in order of execution frequency so that they run quickly.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
456 case $mode in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
457 # libtool compile mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
458 compile)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
459 modename="$modename: compile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
460 # Get the compilation command and the source file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
461 base_compile=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
462 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
463 suppress_opt=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
464 suppress_output=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
465 arg_mode=normal
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
466 libobj=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
467 later=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
468
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
469 for arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
470 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
471 case "$arg_mode" in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
472 arg )
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
473 # do not "continue". Instead, add this to base_compile
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
474 lastarg="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
475 arg_mode=normal
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
476 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
477
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
478 target )
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
479 libobj="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
480 arg_mode=normal
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
481 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
482 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
483
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
484 normal )
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
485 # Accept any command-line options.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
486 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
487 -o)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
488 if test -n "$libobj" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
489 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
490 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
491 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
492 arg_mode=target
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
493 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
494 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
495
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
496 -static | -prefer-pic | -prefer-non-pic)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
497 later="$later $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
498 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
499 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
500
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
501 -no-suppress)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
502 suppress_opt=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
503 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
504 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
505
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
506 -Xcompiler)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
507 arg_mode=arg # the next one goes into the "base_compile" arg list
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
508 continue # The current "srcfile" will either be retained or
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
509 ;; # replaced later. I would guess that would be a bug.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
510
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
511 -Wc,*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
512 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
513 lastarg=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
514 save_ifs="$IFS"; IFS=','
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
515 for arg in $args; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
516 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
517
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
518 # Double-quote args containing other shell metacharacters.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
519 # Many Bourne shells cannot handle close brackets correctly
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
520 # in scan sets, so we specify it separately.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
521 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
522 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
523 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
524 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
525 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
526 lastarg="$lastarg $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
527 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
528 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
529 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
530
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
531 # Add the arguments to base_compile.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
532 base_compile="$base_compile $lastarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
533 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
534 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
535
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
536 * )
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
537 # Accept the current argument as the source file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
538 # The previous "srcfile" becomes the current argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
539 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
540 lastarg="$srcfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
541 srcfile="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
542 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
543 esac # case $arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
544 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
545 esac # case $arg_mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
546
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
547 # Aesthetically quote the previous argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
548 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
549
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
550 case $lastarg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
551 # Double-quote args containing other shell metacharacters.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
552 # Many Bourne shells cannot handle close brackets correctly
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
553 # in scan sets, so we specify it separately.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
554 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
555 lastarg="\"$lastarg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
556 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
557 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
558
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
559 base_compile="$base_compile $lastarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
560 done # for arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
561
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
562 case $arg_mode in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
563 arg)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
564 $echo "$modename: you must specify an argument for -Xcompile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
565 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
566 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
567 target)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
568 $echo "$modename: you must specify a target with \`-o'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
569 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
570 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
571 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
572 # Get the name of the library object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
573 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
574 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
575 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
576
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
577 # Recognize several different file suffixes.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
578 # If the user specifies -o file.o, it is replaced with file.lo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
579 xform='[cCFSifmso]'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
580 case $libobj in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
581 *.ada) xform=ada ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
582 *.adb) xform=adb ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
583 *.ads) xform=ads ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
584 *.asm) xform=asm ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
585 *.c++) xform=c++ ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
586 *.cc) xform=cc ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
587 *.ii) xform=ii ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
588 *.class) xform=class ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
589 *.cpp) xform=cpp ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
590 *.cxx) xform=cxx ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
591 *.f90) xform=f90 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
592 *.for) xform=for ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
593 *.java) xform=java ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
594 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
595
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
596 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
597
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
598 case $libobj in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
599 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
600 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
601 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
602 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
603 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
604 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
605
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
606 func_infer_tag $base_compile
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
607
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
608 for arg in $later; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
609 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
610 -static)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
611 build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
612 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
613 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
614
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
615 -prefer-pic)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
616 pic_mode=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
617 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
618 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
619
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
620 -prefer-non-pic)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
621 pic_mode=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
622 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
623 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
624 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
625 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
626
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
627 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
628 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
629 if test "X$xdir" = "X$obj"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
630 xdir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
631 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
632 xdir=$xdir/
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
633 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
634 lobj=${xdir}$objdir/$objname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
635
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
636 if test -z "$base_compile"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
637 $echo "$modename: you must specify a compilation command" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
638 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
639 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
640 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
641
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
642 # Delete any leftover library objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
643 if test "$build_old_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
644 removelist="$obj $lobj $libobj ${libobj}T"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
645 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
646 removelist="$lobj $libobj ${libobj}T"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
647 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
648
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
649 $run $rm $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
650 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
651
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
652 # On Cygwin there's no "real" PIC flag so we must build both object types
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
653 case $host_os in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
654 cygwin* | mingw* | pw32* | os2*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
655 pic_mode=default
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
656 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
657 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
658 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
659 # non-PIC code in shared libraries is not supported
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
660 pic_mode=default
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
661 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
662
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
663 # Calculate the filename of the output object if compiler does
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
664 # not support -o with -c
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
665 if test "$compiler_c_o" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
666 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
667 lockfile="$output_obj.lock"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
668 removelist="$removelist $output_obj $lockfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
669 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
670 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
671 output_obj=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
672 need_locks=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
673 lockfile=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
674 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
675
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
676 # Lock this critical section if it is needed
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
677 # We use this script file to make the link, it avoids creating a new file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
678 if test "$need_locks" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
679 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
680 $show "Waiting for $lockfile to be removed"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
681 sleep 2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
682 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
683 elif test "$need_locks" = warn; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
684 if test -f "$lockfile"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
685 $echo "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
686 *** ERROR, $lockfile exists and contains:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
687 `cat $lockfile 2>/dev/null`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
688
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
689 This indicates that another process is trying to use the same
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
690 temporary object file, and libtool could not work around it because
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
691 your compiler does not support \`-c' and \`-o' together. If you
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
692 repeat this compilation, it may succeed, by chance, but you had better
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
693 avoid parallel builds (make -j) in this platform, or get a better
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
694 compiler."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
695
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
696 $run $rm $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
697 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
698 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
699 $echo $srcfile > "$lockfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
700 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
701
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
702 if test -n "$fix_srcfile_path"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
703 eval srcfile=\"$fix_srcfile_path\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
704 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
705
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
706 $run $rm "$libobj" "${libobj}T"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
707
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
708 # Create a libtool object file (analogous to a ".la" file),
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
709 # but don't create it if we're doing a dry run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
710 test -z "$run" && cat > ${libobj}T <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
711 # $libobj - a libtool object file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
712 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
713 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
714 # Please DO NOT delete this file!
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
715 # It is necessary for linking the library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
716
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
717 # Name of the PIC object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
718 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
719
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
720 # Only build a PIC object if we are building libtool libraries.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
721 if test "$build_libtool_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
722 # Without this assignment, base_compile gets emptied.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
723 fbsd_hideous_sh_bug=$base_compile
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
724
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
725 if test "$pic_mode" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
726 command="$base_compile $srcfile $pic_flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
727 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
728 # Don't build PIC code
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
729 command="$base_compile $srcfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
730 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
731
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
732 if test ! -d "${xdir}$objdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
733 $show "$mkdir ${xdir}$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
734 $run $mkdir ${xdir}$objdir
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
735 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
736 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
737 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
738 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
739 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
740
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
741 if test -z "$output_obj"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
742 # Place PIC objects in $objdir
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
743 command="$command -o $lobj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
744 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
745
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
746 $run $rm "$lobj" "$output_obj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
747
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
748 $show "$command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
749 if $run eval "$command"; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
750 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
751 test -n "$output_obj" && $run $rm $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
752 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
753 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
754
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
755 if test "$need_locks" = warn &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
756 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
757 $echo "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
758 *** ERROR, $lockfile contains:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
759 `cat $lockfile 2>/dev/null`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
760
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
761 but it should contain:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
762 $srcfile
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
763
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
764 This indicates that another process is trying to use the same
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
765 temporary object file, and libtool could not work around it because
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
766 your compiler does not support \`-c' and \`-o' together. If you
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
767 repeat this compilation, it may succeed, by chance, but you had better
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
768 avoid parallel builds (make -j) in this platform, or get a better
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
769 compiler."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
770
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
771 $run $rm $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
772 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
773 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
774
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
775 # Just move the object if needed, then go on to compile the next one
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
776 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
777 $show "$mv $output_obj $lobj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
778 if $run $mv $output_obj $lobj; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
779 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
780 error=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
781 $run $rm $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
782 exit $error
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
783 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
784 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
785
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
786 # Append the name of the PIC object to the libtool object file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
787 test -z "$run" && cat >> ${libobj}T <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
788 pic_object='$objdir/$objname'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
789
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
790 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
791
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
792 # Allow error messages only from the first compilation.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
793 if test "$suppress_opt" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
794 suppress_output=' >/dev/null 2>&1'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
795 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
796 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
797 # No PIC object so indicate it doesn't exist in the libtool
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
798 # object file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
799 test -z "$run" && cat >> ${libobj}T <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
800 pic_object=none
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
801
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
802 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
803 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
804
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
805 # Only build a position-dependent object if we build old libraries.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
806 if test "$build_old_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
807 if test "$pic_mode" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
808 # Don't build PIC code
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
809 command="$base_compile $srcfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
810 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
811 command="$base_compile $srcfile $pic_flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
812 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
813 if test "$compiler_c_o" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
814 command="$command -o $obj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
815 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
816
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
817 # Suppress compiler output if we already did a PIC compilation.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
818 command="$command$suppress_output"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
819 $run $rm "$obj" "$output_obj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
820 $show "$command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
821 if $run eval "$command"; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
822 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
823 $run $rm $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
824 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
825 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
826
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
827 if test "$need_locks" = warn &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
828 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
829 $echo "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
830 *** ERROR, $lockfile contains:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
831 `cat $lockfile 2>/dev/null`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
832
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
833 but it should contain:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
834 $srcfile
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
835
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
836 This indicates that another process is trying to use the same
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
837 temporary object file, and libtool could not work around it because
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
838 your compiler does not support \`-c' and \`-o' together. If you
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
839 repeat this compilation, it may succeed, by chance, but you had better
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
840 avoid parallel builds (make -j) in this platform, or get a better
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
841 compiler."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
842
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
843 $run $rm $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
844 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
845 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
846
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
847 # Just move the object if needed
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
848 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
849 $show "$mv $output_obj $obj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
850 if $run $mv $output_obj $obj; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
851 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
852 error=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
853 $run $rm $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
854 exit $error
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
855 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
856 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
857
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
858 # Append the name of the non-PIC object the libtool object file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
859 # Only append if the libtool object file exists.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
860 test -z "$run" && cat >> ${libobj}T <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
861 # Name of the non-PIC object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
862 non_pic_object='$objname'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
863
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
864 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
865 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
866 # Append the name of the non-PIC object the libtool object file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
867 # Only append if the libtool object file exists.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
868 test -z "$run" && cat >> ${libobj}T <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
869 # Name of the non-PIC object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
870 non_pic_object=none
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
871
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
872 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
873 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
874
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
875 $run $mv "${libobj}T" "${libobj}"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
876
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
877 # Unlock the critical section if it was locked
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
878 if test "$need_locks" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
879 $run $rm "$lockfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
880 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
881
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
882 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
883 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
884
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
885 # libtool link mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
886 link | relink)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
887 modename="$modename: link"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
888 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
889 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
890 # It is impossible to link a dll without this setting, and
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
891 # we shouldn't force the makefile maintainer to figure out
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
892 # which system we are compiling for in order to pass an extra
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
893 # flag for every libtool invocation.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
894 # allow_undefined=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
895
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
896 # FIXME: Unfortunately, there are problems with the above when trying
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
897 # to make a dll which has undefined symbols, in which case not
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
898 # even a static library is built. For now, we need to specify
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
899 # -no-undefined on the libtool link line when we can be certain
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
900 # that all symbols are satisfied, otherwise we get a static library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
901 allow_undefined=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
902 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
903 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
904 allow_undefined=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
905 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
906 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
907 libtool_args="$nonopt"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
908 base_compile="$nonopt $@"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
909 compile_command="$nonopt"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
910 finalize_command="$nonopt"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
911
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
912 compile_rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
913 finalize_rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
914 compile_shlibpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
915 finalize_shlibpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
916 convenience=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
917 old_convenience=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
918 deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
919 old_deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
920 compiler_flags=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
921 linker_flags=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
922 dllsearchpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
923 lib_search_path=`pwd`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
924 inst_prefix_dir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
925
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
926 avoid_version=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
927 dlfiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
928 dlprefiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
929 dlself=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
930 export_dynamic=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
931 export_symbols=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
932 export_symbols_regex=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
933 generated=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
934 libobjs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
935 ltlibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
936 module=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
937 no_install=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
938 objs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
939 non_pic_objects=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
940 precious_files_regex=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
941 prefer_static_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
942 preload=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
943 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
944 prevarg=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
945 release=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
946 rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
947 xrpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
948 perm_rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
949 temp_rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
950 thread_safe=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
951 vinfo=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
952 vinfo_number=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
953
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
954 func_infer_tag $base_compile
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
955
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
956 # We need to know -static, to get the right output filenames.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
957 for arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
958 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
959 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
960 -all-static | -static)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
961 if test "X$arg" = "X-all-static"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
962 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
963 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
964 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
965 if test -n "$link_static_flag"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
966 dlopen_self=$dlopen_self_static
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
967 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
968 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
969 if test -z "$pic_flag" && test -n "$link_static_flag"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
970 dlopen_self=$dlopen_self_static
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
971 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
972 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
973 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
974 build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
975 prefer_static_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
976 break
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
977 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
978 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
979 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
980
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
981 # See if our shared archives depend on static archives.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
982 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
983
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
984 # Go through the arguments, transforming them on the way.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
985 while test "$#" -gt 0; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
986 arg="$1"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
987 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
988 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
989 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
990 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
991 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
992 *) qarg=$arg ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
993 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
994 libtool_args="$libtool_args $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
995
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
996 # If the previous option needs an argument, assign it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
997 if test -n "$prev"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
998 case $prev in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
999 output)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1000 compile_command="$compile_command @OUTPUT@"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1001 finalize_command="$finalize_command @OUTPUT@"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1002 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1003 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1004
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1005 case $prev in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1006 dlfiles|dlprefiles)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1007 if test "$preload" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1008 # Add the symbol object into the linking commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1009 compile_command="$compile_command @SYMFILE@"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1010 finalize_command="$finalize_command @SYMFILE@"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1011 preload=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1012 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1013 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1014 *.la | *.lo) ;; # We handle these cases below.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1015 force)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1016 if test "$dlself" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1017 dlself=needless
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1018 export_dynamic=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1019 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1020 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1021 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1022 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1023 self)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1024 if test "$prev" = dlprefiles; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1025 dlself=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1026 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1027 dlself=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1028 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1029 dlself=needless
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1030 export_dynamic=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1031 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1032 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1033 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1034 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1035 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1036 if test "$prev" = dlfiles; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1037 dlfiles="$dlfiles $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1038 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1039 dlprefiles="$dlprefiles $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1040 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1041 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1042 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1043 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1044 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1045 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1046 expsyms)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1047 export_symbols="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1048 if test ! -f "$arg"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1049 $echo "$modename: symbol file \`$arg' does not exist"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1050 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1051 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1052 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1053 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1054 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1055 expsyms_regex)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1056 export_symbols_regex="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1057 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1058 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1059 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1060 inst_prefix)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1061 inst_prefix_dir="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1062 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1063 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1064 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1065 precious_regex)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1066 precious_files_regex="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1067 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1068 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1069 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1070 release)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1071 release="-$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1072 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1073 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1074 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1075 objectlist)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1076 if test -f "$arg"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1077 save_arg=$arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1078 moreargs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1079 for fil in `cat $save_arg`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1080 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1081 # moreargs="$moreargs $fil"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1082 arg=$fil
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1083 # A libtool-controlled object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1084
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1085 # Check to see that this really is a libtool object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1086 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1087 pic_object=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1088 non_pic_object=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1089
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1090 # Read the .lo file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1091 # If there is no directory component, then add one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1092 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1093 */* | *\\*) . $arg ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1094 *) . ./$arg ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1095 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1096
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1097 if test -z "$pic_object" || \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1098 test -z "$non_pic_object" ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1099 test "$pic_object" = none && \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1100 test "$non_pic_object" = none; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1101 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1102 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1103 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1104
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1105 # Extract subdirectory from the argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1106 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1107 if test "X$xdir" = "X$arg"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1108 xdir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1109 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1110 xdir="$xdir/"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1111 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1112
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1113 if test "$pic_object" != none; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1114 # Prepend the subdirectory the object is found in.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1115 pic_object="$xdir$pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1116
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1117 if test "$prev" = dlfiles; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1118 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1119 dlfiles="$dlfiles $pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1120 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1121 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1122 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1123 # If libtool objects are unsupported, then we need to preload.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1124 prev=dlprefiles
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1125 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1126 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1127
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1128 # CHECK ME: I think I busted this. -Ossama
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1129 if test "$prev" = dlprefiles; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1130 # Preload the old-style object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1131 dlprefiles="$dlprefiles $pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1132 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1133 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1134
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1135 # A PIC object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1136 libobjs="$libobjs $pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1137 arg="$pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1138 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1139
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1140 # Non-PIC object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1141 if test "$non_pic_object" != none; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1142 # Prepend the subdirectory the object is found in.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1143 non_pic_object="$xdir$non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1144
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1145 # A standard non-PIC object
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1146 non_pic_objects="$non_pic_objects $non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1147 if test -z "$pic_object" || test "$pic_object" = none ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1148 arg="$non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1149 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1150 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1151 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1152 # Only an error if not doing a dry-run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1153 if test -z "$run"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1154 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1155 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1156 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1157 # Dry-run case.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1158
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1159 # Extract subdirectory from the argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1160 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1161 if test "X$xdir" = "X$arg"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1162 xdir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1163 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1164 xdir="$xdir/"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1165 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1166
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1167 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1168 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1169 libobjs="$libobjs $pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1170 non_pic_objects="$non_pic_objects $non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1171 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1172 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1173 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1174 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1175 $echo "$modename: link input file \`$save_arg' does not exist"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1176 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1177 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1178 arg=$save_arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1179 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1180 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1181 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1182 rpath | xrpath)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1183 # We need an absolute path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1184 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1185 [\\/]* | [A-Za-z]:[\\/]*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1186 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1187 $echo "$modename: only absolute run-paths are allowed" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1188 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1189 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1190 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1191 if test "$prev" = rpath; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1192 case "$rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1193 *" $arg "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1194 *) rpath="$rpath $arg" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1195 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1196 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1197 case "$xrpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1198 *" $arg "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1199 *) xrpath="$xrpath $arg" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1200 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1201 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1202 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1203 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1204 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1205 xcompiler)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1206 compiler_flags="$compiler_flags $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1207 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1208 compile_command="$compile_command $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1209 finalize_command="$finalize_command $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1210 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1211 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1212 xlinker)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1213 linker_flags="$linker_flags $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1214 compiler_flags="$compiler_flags $wl$qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1215 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1216 compile_command="$compile_command $wl$qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1217 finalize_command="$finalize_command $wl$qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1218 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1219 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1220 xcclinker)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1221 linker_flags="$linker_flags $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1222 compiler_flags="$compiler_flags $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1223 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1224 compile_command="$compile_command $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1225 finalize_command="$finalize_command $qarg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1226 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1227 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1228 shrext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1229 shrext_cmds="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1230 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1231 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1232 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1233 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1234 eval "$prev=\"\$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1235 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1236 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1237 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1238 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1239 fi # test -n "$prev"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1240
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1241 prevarg="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1242
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1243 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1244 -all-static)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1245 if test -n "$link_static_flag"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1246 compile_command="$compile_command $link_static_flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1247 finalize_command="$finalize_command $link_static_flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1248 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1249 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1250 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1251
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1252 -allow-undefined)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1253 # FIXME: remove this flag sometime in the future.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1254 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1255 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1256 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1257
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1258 -avoid-version)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1259 avoid_version=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1260 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1261 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1262
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1263 -dlopen)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1264 prev=dlfiles
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1265 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1266 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1267
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1268 -dlpreopen)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1269 prev=dlprefiles
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1270 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1271 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1272
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1273 -export-dynamic)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1274 export_dynamic=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1275 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1276 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1277
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1278 -export-symbols | -export-symbols-regex)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1279 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1280 $echo "$modename: more than one -exported-symbols argument is not allowed"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1281 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1282 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1283 if test "X$arg" = "X-export-symbols"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1284 prev=expsyms
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1285 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1286 prev=expsyms_regex
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1287 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1288 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1289 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1290
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1291 -inst-prefix-dir)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1292 prev=inst_prefix
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1293 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1294 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1295
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1296 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1297 # so, if we see these flags be careful not to treat them like -L
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1298 -L[A-Z][A-Z]*:*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1299 case $with_gcc/$host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1300 no/*-*-irix* | /*-*-irix*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1301 compile_command="$compile_command $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1302 finalize_command="$finalize_command $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1303 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1304 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1305 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1306 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1307
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1308 -L*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1309 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1310 # We need an absolute path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1311 case $dir in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1312 [\\/]* | [A-Za-z]:[\\/]*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1313 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1314 absdir=`cd "$dir" && pwd`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1315 if test -z "$absdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1316 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1317 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1318 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1319 dir="$absdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1320 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1321 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1322 case "$deplibs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1323 *" -L$dir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1324 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1325 deplibs="$deplibs -L$dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1326 lib_search_path="$lib_search_path $dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1327 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1328 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1329 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1330 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1331 case :$dllsearchpath: in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1332 *":$dir:"*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1333 *) dllsearchpath="$dllsearchpath:$dir";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1334 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1335 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1336 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1337 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1338 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1339
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1340 -l*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1341 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1342 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1343 *-*-cygwin* | *-*-pw32* | *-*-beos*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1344 # These systems don't actually have a C or math library (as such)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1345 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1346 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1347 *-*-mingw* | *-*-os2*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1348 # These systems don't actually have a C library (as such)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1349 test "X$arg" = "X-lc" && continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1350 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1351 *-*-openbsd* | *-*-freebsd*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1352 # Do not include libc due to us having libc/libc_r.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1353 test "X$arg" = "X-lc" && continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1354 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1355 *-*-rhapsody* | *-*-darwin1.[012])
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1356 # Rhapsody C and math libraries are in the System framework
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1357 deplibs="$deplibs -framework System"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1358 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1359 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1360 elif test "X$arg" = "X-lc_r"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1361 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1362 *-*-openbsd* | *-*-freebsd*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1363 # Do not include libc_r directly, use -pthread flag.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1364 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1365 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1366 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1367 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1368 deplibs="$deplibs $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1369 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1370 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1371
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1372 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1373 deplibs="$deplibs $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1374 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1375 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1376
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1377 -module)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1378 module=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1379 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1380 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1381
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1382 # gcc -m* arguments should be passed to the linker via $compiler_flags
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1383 # in order to pass architecture information to the linker
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1384 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1385 # but this is not reliable with gcc because gcc may use -mfoo to
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1386 # select a different linker, different libraries, etc, while
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1387 # -Wl,-mfoo simply passes -mfoo to the linker.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1388 -m*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1389 # Unknown arguments in both finalize_command and compile_command need
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1390 # to be aesthetically quoted because they are evaled later.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1391 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1392 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1393 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1394 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1395 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1396 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1397 compile_command="$compile_command $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1398 finalize_command="$finalize_command $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1399 if test "$with_gcc" = "yes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1400 compiler_flags="$compiler_flags $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1401 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1402 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1403 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1404
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1405 -shrext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1406 prev=shrext
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1407 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1408 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1409
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1410 -no-fast-install)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1411 fast_install=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1412 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1413 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1414
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1415 -no-install)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1416 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1417 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1418 # The PATH hackery in wrapper scripts is required on Windows
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1419 # in order for the loader to find any dlls it needs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1420 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1421 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1422 fast_install=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1423 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1424 *) no_install=yes ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1425 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1426 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1427 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1428
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1429 -no-undefined)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1430 allow_undefined=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1431 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1432 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1433
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1434 -objectlist)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1435 prev=objectlist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1436 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1437 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1438
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1439 -o) prev=output ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1440
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1441 -precious-files-regex)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1442 prev=precious_regex
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1443 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1444 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1445
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1446 -release)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1447 prev=release
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1448 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1449 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1450
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1451 -rpath)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1452 prev=rpath
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1453 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1454 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1455
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1456 -R)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1457 prev=xrpath
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1458 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1459 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1460
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1461 -R*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1462 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1463 # We need an absolute path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1464 case $dir in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1465 [\\/]* | [A-Za-z]:[\\/]*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1466 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1467 $echo "$modename: only absolute run-paths are allowed" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1468 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1469 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1470 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1471 case "$xrpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1472 *" $dir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1473 *) xrpath="$xrpath $dir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1474 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1475 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1476 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1477
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1478 -static)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1479 # The effects of -static are defined in a previous loop.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1480 # We used to do the same as -all-static on platforms that
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1481 # didn't have a PIC flag, but the assumption that the effects
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1482 # would be equivalent was wrong. It would break on at least
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1483 # Digital Unix and AIX.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1484 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1485 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1486
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1487 -thread-safe)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1488 thread_safe=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1489 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1490 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1491
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1492 -version-info)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1493 prev=vinfo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1494 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1495 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1496 -version-number)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1497 prev=vinfo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1498 vinfo_number=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1499 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1500 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1501
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1502 -Wc,*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1503 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1504 arg=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1505 save_ifs="$IFS"; IFS=','
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1506 for flag in $args; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1507 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1508 case $flag in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1509 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1510 flag="\"$flag\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1511 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1512 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1513 arg="$arg $wl$flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1514 compiler_flags="$compiler_flags $flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1515 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1516 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1517 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1518 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1519
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1520 -Wl,*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1521 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1522 arg=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1523 save_ifs="$IFS"; IFS=','
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1524 for flag in $args; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1525 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1526 case $flag in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1527 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1528 flag="\"$flag\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1529 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1530 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1531 arg="$arg $wl$flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1532 compiler_flags="$compiler_flags $wl$flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1533 linker_flags="$linker_flags $flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1534 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1535 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1536 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1537 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1538
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1539 -Xcompiler)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1540 prev=xcompiler
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1541 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1542 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1543
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1544 -Xlinker)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1545 prev=xlinker
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1546 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1547 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1548
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1549 -XCClinker)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1550 prev=xcclinker
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1551 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1552 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1553
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1554 # Some other compiler flag.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1555 -* | +*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1556 # Unknown arguments in both finalize_command and compile_command need
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1557 # to be aesthetically quoted because they are evaled later.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1558 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1559 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1560 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1561 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1562 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1563 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1564 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1565
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1566 *.$objext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1567 # A standard object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1568 objs="$objs $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1569 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1570
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1571 *.lo)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1572 # A libtool-controlled object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1573
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1574 # Check to see that this really is a libtool object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1575 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1576 pic_object=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1577 non_pic_object=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1578
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1579 # Read the .lo file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1580 # If there is no directory component, then add one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1581 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1582 */* | *\\*) . $arg ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1583 *) . ./$arg ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1584 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1585
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1586 if test -z "$pic_object" || \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1587 test -z "$non_pic_object" ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1588 test "$pic_object" = none && \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1589 test "$non_pic_object" = none; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1590 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1591 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1592 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1593
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1594 # Extract subdirectory from the argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1595 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1596 if test "X$xdir" = "X$arg"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1597 xdir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1598 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1599 xdir="$xdir/"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1600 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1601
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1602 if test "$pic_object" != none; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1603 # Prepend the subdirectory the object is found in.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1604 pic_object="$xdir$pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1605
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1606 if test "$prev" = dlfiles; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1607 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1608 dlfiles="$dlfiles $pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1609 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1610 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1611 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1612 # If libtool objects are unsupported, then we need to preload.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1613 prev=dlprefiles
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1614 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1615 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1616
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1617 # CHECK ME: I think I busted this. -Ossama
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1618 if test "$prev" = dlprefiles; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1619 # Preload the old-style object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1620 dlprefiles="$dlprefiles $pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1621 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1622 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1623
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1624 # A PIC object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1625 libobjs="$libobjs $pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1626 arg="$pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1627 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1628
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1629 # Non-PIC object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1630 if test "$non_pic_object" != none; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1631 # Prepend the subdirectory the object is found in.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1632 non_pic_object="$xdir$non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1633
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1634 # A standard non-PIC object
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1635 non_pic_objects="$non_pic_objects $non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1636 if test -z "$pic_object" || test "$pic_object" = none ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1637 arg="$non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1638 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1639 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1640 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1641 # Only an error if not doing a dry-run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1642 if test -z "$run"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1643 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1644 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1645 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1646 # Dry-run case.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1647
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1648 # Extract subdirectory from the argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1649 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1650 if test "X$xdir" = "X$arg"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1651 xdir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1652 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1653 xdir="$xdir/"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1654 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1655
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1656 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1657 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1658 libobjs="$libobjs $pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1659 non_pic_objects="$non_pic_objects $non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1660 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1661 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1662 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1663
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1664 *.$libext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1665 # An archive.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1666 deplibs="$deplibs $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1667 old_deplibs="$old_deplibs $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1668 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1669 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1670
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1671 *.la)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1672 # A libtool-controlled library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1673
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1674 if test "$prev" = dlfiles; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1675 # This library was specified with -dlopen.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1676 dlfiles="$dlfiles $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1677 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1678 elif test "$prev" = dlprefiles; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1679 # The library was specified with -dlpreopen.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1680 dlprefiles="$dlprefiles $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1681 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1682 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1683 deplibs="$deplibs $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1684 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1685 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1686 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1687
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1688 # Some other compiler argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1689 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1690 # Unknown arguments in both finalize_command and compile_command need
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1691 # to be aesthetically quoted because they are evaled later.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1692 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1693 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1694 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1695 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1696 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1697 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1698 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1699 esac # arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1700
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1701 # Now actually substitute the argument into the commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1702 if test -n "$arg"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1703 compile_command="$compile_command $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1704 finalize_command="$finalize_command $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1705 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1706 done # argument parsing loop
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1707
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1708 if test -n "$prev"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1709 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1710 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1711 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1712 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1713
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1714 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1715 eval arg=\"$export_dynamic_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1716 compile_command="$compile_command $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1717 finalize_command="$finalize_command $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1718 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1719
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1720 oldlibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1721 # calculate the name of the file, without its directory
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1722 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1723 libobjs_save="$libobjs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1724
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1725 if test -n "$shlibpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1726 # get the directories listed in $shlibpath_var
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1727 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1728 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1729 shlib_search_path=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1730 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1731 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1732 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1733
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1734 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1735 if test "X$output_objdir" = "X$output"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1736 output_objdir="$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1737 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1738 output_objdir="$output_objdir/$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1739 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1740 # Create the object directory.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1741 if test ! -d "$output_objdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1742 $show "$mkdir $output_objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1743 $run $mkdir $output_objdir
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1744 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1745 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1746 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1747 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1748 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1749
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1750 # Determine the type of output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1751 case $output in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1752 "")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1753 $echo "$modename: you must specify an output file" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1754 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1755 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1756 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1757 *.$libext) linkmode=oldlib ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1758 *.lo | *.$objext) linkmode=obj ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1759 *.la) linkmode=lib ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1760 *) linkmode=prog ;; # Anything else should be a program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1761 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1762
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1763 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1764 *cygwin* | *mingw* | *pw32*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1765 # don't eliminate duplications in $postdeps and $predeps
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1766 duplicate_compiler_generated_deps=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1767 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1768 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1769 duplicate_compiler_generated_deps=$duplicate_deps
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1770 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1771 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1772 specialdeplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1773
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1774 libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1775 # Find all interdependent deplibs by searching for libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1776 # that are linked more than once (e.g. -la -lb -la)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1777 for deplib in $deplibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1778 if test "X$duplicate_deps" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1779 case "$libs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1780 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1781 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1782 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1783 libs="$libs $deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1784 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1785
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1786 if test "$linkmode" = lib; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1787 libs="$predeps $libs $compiler_lib_search_path $postdeps"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1788
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1789 # Compute libraries that are listed more than once in $predeps
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1790 # $postdeps and mark them as special (i.e., whose duplicates are
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1791 # not to be eliminated).
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1792 pre_post_deps=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1793 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1794 for pre_post_dep in $predeps $postdeps; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1795 case "$pre_post_deps " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1796 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1797 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1798 pre_post_deps="$pre_post_deps $pre_post_dep"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1799 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1800 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1801 pre_post_deps=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1802 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1803
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1804 deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1805 newdependency_libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1806 newlib_search_path=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1807 need_relink=no # whether we're linking any uninstalled libtool libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1808 notinst_deplibs= # not-installed libtool libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1809 notinst_path= # paths that contain not-installed libtool libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1810 case $linkmode in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1811 lib)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1812 passes="conv link"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1813 for file in $dlfiles $dlprefiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1814 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1815 *.la) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1816 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1817 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1818 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1819 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1820 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1821 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1822 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1823 prog)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1824 compile_deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1825 finalize_deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1826 alldeplibs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1827 newdlfiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1828 newdlprefiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1829 passes="conv scan dlopen dlpreopen link"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1830 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1831 *) passes="conv"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1832 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1833 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1834 for pass in $passes; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1835 if test "$linkmode,$pass" = "lib,link" ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1836 test "$linkmode,$pass" = "prog,scan"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1837 libs="$deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1838 deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1839 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1840 if test "$linkmode" = prog; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1841 case $pass in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1842 dlopen) libs="$dlfiles" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1843 dlpreopen) libs="$dlprefiles" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1844 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1845 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1846 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1847 if test "$pass" = dlopen; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1848 # Collect dlpreopened libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1849 save_deplibs="$deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1850 deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1851 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1852 for deplib in $libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1853 lib=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1854 found=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1855 case $deplib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1856 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1857 if test "$linkmode,$pass" = "prog,link"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1858 compile_deplibs="$deplib $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1859 finalize_deplibs="$deplib $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1860 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1861 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1862 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1863 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1864 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1865 -l*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1866 if test "$linkmode" != lib && test "$linkmode" != prog; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1867 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1868 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1869 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1870 if test "$pass" = conv; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1871 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1872 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1873 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1874 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1875 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1876 for search_ext in .la $std_shrext .so .a; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1877 # Search the libtool library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1878 lib="$searchdir/lib${name}${search_ext}"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1879 if test -f "$lib"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1880 if test "$search_ext" = ".la"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1881 found=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1882 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1883 found=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1884 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1885 break 2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1886 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1887 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1888 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1889 if test "$found" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1890 # deplib doesn't seem to be a libtool library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1891 if test "$linkmode,$pass" = "prog,link"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1892 compile_deplibs="$deplib $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1893 finalize_deplibs="$deplib $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1894 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1895 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1896 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1897 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1898 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1899 else # deplib is a libtool library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1900 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1901 # We need to do some special things here, and not later.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1902 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1903 case " $predeps $postdeps " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1904 *" $deplib "*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1905 if (${SED} -e '2q' $lib |
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1906 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1907 library_names=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1908 old_library=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1909 case $lib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1910 */* | *\\*) . $lib ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1911 *) . ./$lib ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1912 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1913 for l in $old_library $library_names; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1914 ll="$l"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1915 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1916 if test "X$ll" = "X$old_library" ; then # only static version available
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1917 found=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1918 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1919 test "X$ladir" = "X$lib" && ladir="."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1920 lib=$ladir/$old_library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1921 if test "$linkmode,$pass" = "prog,link"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1922 compile_deplibs="$deplib $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1923 finalize_deplibs="$deplib $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1924 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1925 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1926 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1927 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1928 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1929 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1930 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1931 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1932 *) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1933 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1934 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1935 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1936 ;; # -l
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1937 -L*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1938 case $linkmode in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1939 lib)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1940 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1941 test "$pass" = conv && continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1942 newdependency_libs="$deplib $newdependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1943 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1944 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1945 prog)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1946 if test "$pass" = conv; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1947 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1948 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1949 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1950 if test "$pass" = scan; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1951 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1952 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1953 compile_deplibs="$deplib $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1954 finalize_deplibs="$deplib $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1955 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1956 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1957 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1958 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1959 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1960 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1961 esac # linkmode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1962 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1963 ;; # -L
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1964 -R*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1965 if test "$pass" = link; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1966 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1967 # Make sure the xrpath contains only unique directories.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1968 case "$xrpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1969 *" $dir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1970 *) xrpath="$xrpath $dir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1971 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1972 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1973 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1974 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1975 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1976 *.la) lib="$deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1977 *.$libext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1978 if test "$pass" = conv; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1979 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1980 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1981 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1982 case $linkmode in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1983 lib)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1984 if test "$deplibs_check_method" != pass_all; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1985 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1986 $echo "*** Warning: Trying to link with static lib archive $deplib."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1987 $echo "*** I have the capability to make that library automatically link in when"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1988 $echo "*** you link to this library. But I can only do this if you have a"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1989 $echo "*** shared version of the library, which you do not appear to have"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1990 $echo "*** because the file extensions .$libext of this argument makes me believe"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1991 $echo "*** that it is just a static archive that I should not used here."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1992 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1993 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1994 $echo "*** Warning: Linking the shared library $output against the"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1995 $echo "*** static library $deplib is not portable!"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1996 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1997 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1998 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
1999 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2000 prog)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2001 if test "$pass" != link; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2002 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2003 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2004 compile_deplibs="$deplib $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2005 finalize_deplibs="$deplib $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2006 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2007 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2008 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2009 esac # linkmode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2010 ;; # *.$libext
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2011 *.lo | *.$objext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2012 if test "$pass" = conv; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2013 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2014 elif test "$linkmode" = prog; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2015 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2016 # If there is no dlopen support or we're linking statically,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2017 # we need to preload.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2018 newdlprefiles="$newdlprefiles $deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2019 compile_deplibs="$deplib $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2020 finalize_deplibs="$deplib $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2021 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2022 newdlfiles="$newdlfiles $deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2023 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2024 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2025 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2026 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2027 %DEPLIBS%)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2028 alldeplibs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2029 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2030 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2031 esac # case $deplib
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2032 if test "$found" = yes || test -f "$lib"; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2033 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2034 $echo "$modename: cannot find the library \`$lib'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2035 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2036 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2037
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2038 # Check to see that this really is a libtool archive.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2039 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2040 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2041 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2042 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2043 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2044
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2045 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2046 test "X$ladir" = "X$lib" && ladir="."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2047
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2048 dlname=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2049 dlopen=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2050 dlpreopen=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2051 libdir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2052 library_names=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2053 old_library=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2054 # If the library was installed with an old release of libtool,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2055 # it will not redefine variables installed, or shouldnotlink
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2056 installed=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2057 shouldnotlink=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2058
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2059 # Read the .la file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2060 case $lib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2061 */* | *\\*) . $lib ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2062 *) . ./$lib ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2063 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2064
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2065 if test "$linkmode,$pass" = "lib,link" ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2066 test "$linkmode,$pass" = "prog,scan" ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2067 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2068 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2069 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2070 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2071
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2072 if test "$pass" = conv; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2073 # Only check for convenience libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2074 deplibs="$lib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2075 if test -z "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2076 if test -z "$old_library"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2077 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2078 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2079 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2080 # It is a libtool convenience library, so add in its objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2081 convenience="$convenience $ladir/$objdir/$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2082 old_convenience="$old_convenience $ladir/$objdir/$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2083 tmp_libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2084 for deplib in $dependency_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2085 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2086 if test "X$duplicate_deps" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2087 case "$tmp_libs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2088 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2089 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2090 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2091 tmp_libs="$tmp_libs $deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2092 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2093 elif test "$linkmode" != prog && test "$linkmode" != lib; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2094 $echo "$modename: \`$lib' is not a convenience library" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2095 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2096 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2097 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2098 fi # $pass = conv
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2099
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2100
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2101 # Get the name of the library we link against.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2102 linklib=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2103 for l in $old_library $library_names; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2104 linklib="$l"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2105 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2106 if test -z "$linklib"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2107 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2108 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2109 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2110
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2111 # This library was specified with -dlopen.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2112 if test "$pass" = dlopen; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2113 if test -z "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2114 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2115 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2116 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2117 if test -z "$dlname" ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2118 test "$dlopen_support" != yes ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2119 test "$build_libtool_libs" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2120 # If there is no dlname, no dlopen support or we're linking
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2121 # statically, we need to preload. We also need to preload any
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2122 # dependent libraries so libltdl's deplib preloader doesn't
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2123 # bomb out in the load deplibs phase.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2124 dlprefiles="$dlprefiles $lib $dependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2125 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2126 newdlfiles="$newdlfiles $lib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2127 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2128 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2129 fi # $pass = dlopen
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2130
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2131 # We need an absolute path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2132 case $ladir in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2133 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2134 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2135 abs_ladir=`cd "$ladir" && pwd`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2136 if test -z "$abs_ladir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2137 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2138 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2139 abs_ladir="$ladir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2140 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2141 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2142 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2143 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2144
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2145 # Find the relevant object directory and library name.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2146 if test "X$installed" = Xyes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2147 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2148 $echo "$modename: warning: library \`$lib' was moved." 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2149 dir="$ladir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2150 absdir="$abs_ladir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2151 libdir="$abs_ladir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2152 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2153 dir="$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2154 absdir="$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2155 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2156 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2157 dir="$ladir/$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2158 absdir="$abs_ladir/$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2159 # Remove this search path later
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2160 notinst_path="$notinst_path $abs_ladir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2161 fi # $installed = yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2162 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2163
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2164 # This library was specified with -dlpreopen.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2165 if test "$pass" = dlpreopen; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2166 if test -z "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2167 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2168 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2169 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2170 # Prefer using a static library (so that no silly _DYNAMIC symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2171 # are required to link).
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2172 if test -n "$old_library"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2173 newdlprefiles="$newdlprefiles $dir/$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2174 # Otherwise, use the dlname, so that lt_dlopen finds it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2175 elif test -n "$dlname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2176 newdlprefiles="$newdlprefiles $dir/$dlname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2177 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2178 newdlprefiles="$newdlprefiles $dir/$linklib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2179 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2180 fi # $pass = dlpreopen
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2181
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2182 if test -z "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2183 # Link the convenience library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2184 if test "$linkmode" = lib; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2185 deplibs="$dir/$old_library $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2186 elif test "$linkmode,$pass" = "prog,link"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2187 compile_deplibs="$dir/$old_library $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2188 finalize_deplibs="$dir/$old_library $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2189 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2190 deplibs="$lib $deplibs" # used for prog,scan pass
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2191 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2192 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2193 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2194
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2195
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2196 if test "$linkmode" = prog && test "$pass" != link; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2197 newlib_search_path="$newlib_search_path $ladir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2198 deplibs="$lib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2199
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2200 linkalldeplibs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2201 if test "$link_all_deplibs" != no || test -z "$library_names" ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2202 test "$build_libtool_libs" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2203 linkalldeplibs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2204 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2205
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2206 tmp_libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2207 for deplib in $dependency_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2208 case $deplib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2209 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2210 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2211 # Need to link against all dependency_libs?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2212 if test "$linkalldeplibs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2213 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2214 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2215 # Need to hardcode shared library paths
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2216 # or/and link against static libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2217 newdependency_libs="$deplib $newdependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2218 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2219 if test "X$duplicate_deps" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2220 case "$tmp_libs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2221 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2222 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2223 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2224 tmp_libs="$tmp_libs $deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2225 done # for deplib
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2226 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2227 fi # $linkmode = prog...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2228
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2229 if test "$linkmode,$pass" = "prog,link"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2230 if test -n "$library_names" &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2231 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2232 # We need to hardcode the library path
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2233 if test -n "$shlibpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2234 # Make sure the rpath contains only unique directories.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2235 case "$temp_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2236 *" $dir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2237 *" $absdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2238 *) temp_rpath="$temp_rpath $dir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2239 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2240 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2241
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2242 # Hardcode the library path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2243 # Skip directories that are in the system default run-time
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2244 # search path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2245 case " $sys_lib_dlsearch_path " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2246 *" $absdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2247 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2248 case "$compile_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2249 *" $absdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2250 *) compile_rpath="$compile_rpath $absdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2251 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2252 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2253 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2254 case " $sys_lib_dlsearch_path " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2255 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2256 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2257 case "$finalize_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2258 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2259 *) finalize_rpath="$finalize_rpath $libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2260 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2261 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2262 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2263 fi # $linkmode,$pass = prog,link...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2264
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2265 if test "$alldeplibs" = yes &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2266 { test "$deplibs_check_method" = pass_all ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2267 { test "$build_libtool_libs" = yes &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2268 test -n "$library_names"; }; }; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2269 # We only need to search for static libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2270 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2271 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2272 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2273
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2274 link_static=no # Whether the deplib will be linked statically
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2275 if test -n "$library_names" &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2276 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2277 if test "$installed" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2278 notinst_deplibs="$notinst_deplibs $lib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2279 need_relink=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2280 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2281 # This is a shared library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2282
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2283 # Warn about portability, can't link against -module's on
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2284 # some systems (darwin)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2285 if test "$shouldnotlink" = yes && test "$pass" = link ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2286 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2287 if test "$linkmode" = prog; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2288 $echo "*** Warning: Linking the executable $output against the loadable module"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2289 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2290 $echo "*** Warning: Linking the shared library $output against the loadable module"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2291 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2292 $echo "*** $linklib is not portable!"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2293 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2294 if test "$linkmode" = lib &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2295 test "$hardcode_into_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2296 # Hardcode the library path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2297 # Skip directories that are in the system default run-time
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2298 # search path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2299 case " $sys_lib_dlsearch_path " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2300 *" $absdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2301 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2302 case "$compile_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2303 *" $absdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2304 *) compile_rpath="$compile_rpath $absdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2305 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2306 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2307 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2308 case " $sys_lib_dlsearch_path " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2309 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2310 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2311 case "$finalize_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2312 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2313 *) finalize_rpath="$finalize_rpath $libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2314 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2315 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2316 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2317 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2318
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2319 if test -n "$old_archive_from_expsyms_cmds"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2320 # figure out the soname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2321 set dummy $library_names
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2322 realname="$2"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2323 shift; shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2324 libname=`eval \\$echo \"$libname_spec\"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2325 # use dlname if we got it. it's perfectly good, no?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2326 if test -n "$dlname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2327 soname="$dlname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2328 elif test -n "$soname_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2329 # bleh windows
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2330 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2331 *cygwin* | mingw*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2332 major=`expr $current - $age`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2333 versuffix="-$major"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2334 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2335 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2336 eval soname=\"$soname_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2337 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2338 soname="$realname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2339 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2340
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2341 # Make a new name for the extract_expsyms_cmds to use
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2342 soroot="$soname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2343 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2344 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2345
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2346 # If the library has no export list, then create one now
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2347 if test -f "$output_objdir/$soname-def"; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2348 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2349 $show "extracting exported symbol list from \`$soname'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2350 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2351 cmds=$extract_expsyms_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2352 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2353 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2354 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2355 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2356 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2357 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2358 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2359 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2360
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2361 # Create $newlib
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2362 if test -f "$output_objdir/$newlib"; then :; else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2363 $show "generating import library for \`$soname'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2364 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2365 cmds=$old_archive_from_expsyms_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2366 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2367 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2368 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2369 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2370 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2371 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2372 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2373 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2374 # make sure the library variables are pointing to the new library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2375 dir=$output_objdir
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2376 linklib=$newlib
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2377 fi # test -n "$old_archive_from_expsyms_cmds"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2378
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2379 if test "$linkmode" = prog || test "$mode" != relink; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2380 add_shlibpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2381 add_dir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2382 add=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2383 lib_linked=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2384 case $hardcode_action in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2385 immediate | unsupported)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2386 if test "$hardcode_direct" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2387 add="$dir/$linklib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2388 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2389 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2390 *-*-darwin* )
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2391 # if the lib is a module then we can not link against
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2392 # it, someone is ignoring the new warnings I added
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2393 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2394 $echo "** Warning, lib $linklib is a module, not a shared library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2395 if test -z "$old_library" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2396 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2397 $echo "** And there doesn't seem to be a static archive available"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2398 $echo "** The link will probably fail, sorry"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2399 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2400 add="$dir/$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2401 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2402 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2403 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2404 elif test "$hardcode_minus_L" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2405 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2406 *-*-sunos*) add_shlibpath="$dir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2407 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2408 add_dir="-L$dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2409 add="-l$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2410 elif test "$hardcode_shlibpath_var" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2411 add_shlibpath="$dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2412 add="-l$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2413 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2414 lib_linked=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2415 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2416 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2417 relink)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2418 if test "$hardcode_direct" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2419 add="$dir/$linklib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2420 elif test "$hardcode_minus_L" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2421 add_dir="-L$dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2422 # Try looking first in the location we're being installed to.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2423 if test -n "$inst_prefix_dir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2424 case "$libdir" in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2425 [\\/]*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2426 add_dir="$add_dir -L$inst_prefix_dir$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2427 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2428 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2429 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2430 add="-l$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2431 elif test "$hardcode_shlibpath_var" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2432 add_shlibpath="$dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2433 add="-l$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2434 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2435 lib_linked=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2436 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2437 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2438 *) lib_linked=no ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2439 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2440
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2441 if test "$lib_linked" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2442 $echo "$modename: configuration error: unsupported hardcode properties"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2443 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2444 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2445
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2446 if test -n "$add_shlibpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2447 case :$compile_shlibpath: in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2448 *":$add_shlibpath:"*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2449 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2450 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2451 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2452 if test "$linkmode" = prog; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2453 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2454 test -n "$add" && compile_deplibs="$add $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2455 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2456 test -n "$add_dir" && deplibs="$add_dir $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2457 test -n "$add" && deplibs="$add $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2458 if test "$hardcode_direct" != yes && \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2459 test "$hardcode_minus_L" != yes && \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2460 test "$hardcode_shlibpath_var" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2461 case :$finalize_shlibpath: in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2462 *":$libdir:"*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2463 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2464 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2465 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2466 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2467 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2468
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2469 if test "$linkmode" = prog || test "$mode" = relink; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2470 add_shlibpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2471 add_dir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2472 add=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2473 # Finalize command for both is simple: just hardcode it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2474 if test "$hardcode_direct" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2475 add="$libdir/$linklib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2476 elif test "$hardcode_minus_L" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2477 add_dir="-L$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2478 add="-l$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2479 elif test "$hardcode_shlibpath_var" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2480 case :$finalize_shlibpath: in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2481 *":$libdir:"*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2482 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2483 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2484 add="-l$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2485 elif test "$hardcode_automatic" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2486 if test -n "$inst_prefix_dir" &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2487 test -f "$inst_prefix_dir$libdir/$linklib" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2488 add="$inst_prefix_dir$libdir/$linklib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2489 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2490 add="$libdir/$linklib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2491 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2492 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2493 # We cannot seem to hardcode it, guess we'll fake it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2494 add_dir="-L$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2495 # Try looking first in the location we're being installed to.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2496 if test -n "$inst_prefix_dir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2497 case "$libdir" in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2498 [\\/]*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2499 add_dir="$add_dir -L$inst_prefix_dir$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2500 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2501 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2502 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2503 add="-l$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2504 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2505
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2506 if test "$linkmode" = prog; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2507 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2508 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2509 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2510 test -n "$add_dir" && deplibs="$add_dir $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2511 test -n "$add" && deplibs="$add $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2512 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2513 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2514 elif test "$linkmode" = prog; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2515 # Here we assume that one of hardcode_direct or hardcode_minus_L
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2516 # is not unsupported. This is valid on all known static and
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2517 # shared platforms.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2518 if test "$hardcode_direct" != unsupported; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2519 test -n "$old_library" && linklib="$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2520 compile_deplibs="$dir/$linklib $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2521 finalize_deplibs="$dir/$linklib $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2522 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2523 compile_deplibs="-l$name -L$dir $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2524 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2525 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2526 elif test "$build_libtool_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2527 # Not a shared library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2528 if test "$deplibs_check_method" != pass_all; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2529 # We're trying link a shared library against a static one
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2530 # but the system doesn't support it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2531
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2532 # Just print a warning and add the library to dependency_libs so
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2533 # that the program can be linked against the static library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2534 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2535 $echo "*** Warning: This system can not link to static lib archive $lib."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2536 $echo "*** I have the capability to make that library automatically link in when"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2537 $echo "*** you link to this library. But I can only do this if you have a"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2538 $echo "*** shared version of the library, which you do not appear to have."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2539 if test "$module" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2540 $echo "*** But as you try to build a module library, libtool will still create "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2541 $echo "*** a static module, that should work as long as the dlopening application"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2542 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2543 if test -z "$global_symbol_pipe"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2544 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2545 $echo "*** However, this would only work if libtool was able to extract symbol"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2546 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2547 $echo "*** not find such a program. So, this module is probably useless."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2548 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2549 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2550 if test "$build_old_libs" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2551 build_libtool_libs=module
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2552 build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2553 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2554 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2555 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2556 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2557 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2558 convenience="$convenience $dir/$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2559 old_convenience="$old_convenience $dir/$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2560 deplibs="$dir/$old_library $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2561 link_static=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2562 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2563 fi # link shared/static library?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2564
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2565 if test "$linkmode" = lib; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2566 if test -n "$dependency_libs" &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2567 { test "$hardcode_into_libs" != yes ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2568 test "$build_old_libs" = yes ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2569 test "$link_static" = yes; }; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2570 # Extract -R from dependency_libs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2571 temp_deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2572 for libdir in $dependency_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2573 case $libdir in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2574 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2575 case " $xrpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2576 *" $temp_xrpath "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2577 *) xrpath="$xrpath $temp_xrpath";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2578 esac;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2579 *) temp_deplibs="$temp_deplibs $libdir";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2580 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2581 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2582 dependency_libs="$temp_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2583 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2584
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2585 newlib_search_path="$newlib_search_path $absdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2586 # Link against this library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2587 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2588 # ... and its dependency_libs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2589 tmp_libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2590 for deplib in $dependency_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2591 newdependency_libs="$deplib $newdependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2592 if test "X$duplicate_deps" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2593 case "$tmp_libs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2594 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2595 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2596 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2597 tmp_libs="$tmp_libs $deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2598 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2599
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2600 if test "$link_all_deplibs" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2601 # Add the search paths of all dependency libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2602 for deplib in $dependency_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2603 case $deplib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2604 -L*) path="$deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2605 *.la)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2606 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2607 test "X$dir" = "X$deplib" && dir="."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2608 # We need an absolute path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2609 case $dir in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2610 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2611 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2612 absdir=`cd "$dir" && pwd`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2613 if test -z "$absdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2614 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2615 absdir="$dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2616 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2617 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2618 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2619 if grep "^installed=no" $deplib > /dev/null; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2620 path="$absdir/$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2621 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2622 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2623 if test -z "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2624 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2625 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2626 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2627 if test "$absdir" != "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2628 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2629 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2630 path="$absdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2631 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2632 depdepl=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2633 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2634 *-*-darwin*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2635 # we do not want to link against static libs,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2636 # but need to link against shared
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2637 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2638 if test -n "$deplibrary_names" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2639 for tmp in $deplibrary_names ; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2640 depdepl=$tmp
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2641 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2642 if test -f "$path/$depdepl" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2643 depdepl="$path/$depdepl"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2644 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2645 # do not add paths which are already there
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2646 case " $newlib_search_path " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2647 *" $path "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2648 *) newlib_search_path="$newlib_search_path $path";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2649 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2650 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2651 path=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2652 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2653 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2654 path="-L$path"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2655 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2656 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2657 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2658 -l*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2659 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2660 *-*-darwin*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2661 # Again, we only want to link against shared libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2662 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2663 for tmp in $newlib_search_path ; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2664 if test -f "$tmp/lib$tmp_libs.dylib" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2665 eval depdepl="$tmp/lib$tmp_libs.dylib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2666 break
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2667 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2668 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2669 path=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2670 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2671 *) continue ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2672 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2673 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2674 *) continue ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2675 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2676 case " $deplibs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2677 *" $depdepl "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2678 *) deplibs="$depdepl $deplibs" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2679 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2680 case " $deplibs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2681 *" $path "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2682 *) deplibs="$deplibs $path" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2683 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2684 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2685 fi # link_all_deplibs != no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2686 fi # linkmode = lib
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2687 done # for deplib in $libs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2688 dependency_libs="$newdependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2689 if test "$pass" = dlpreopen; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2690 # Link the dlpreopened libraries before other libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2691 for deplib in $save_deplibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2692 deplibs="$deplib $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2693 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2694 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2695 if test "$pass" != dlopen; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2696 if test "$pass" != conv; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2697 # Make sure lib_search_path contains only unique directories.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2698 lib_search_path=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2699 for dir in $newlib_search_path; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2700 case "$lib_search_path " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2701 *" $dir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2702 *) lib_search_path="$lib_search_path $dir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2703 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2704 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2705 newlib_search_path=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2706 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2707
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2708 if test "$linkmode,$pass" != "prog,link"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2709 vars="deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2710 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2711 vars="compile_deplibs finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2712 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2713 for var in $vars dependency_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2714 # Add libraries to $var in reverse order
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2715 eval tmp_libs=\"\$$var\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2716 new_libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2717 for deplib in $tmp_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2718 # FIXME: Pedantically, this is the right thing to do, so
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2719 # that some nasty dependency loop isn't accidentally
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2720 # broken:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2721 #new_libs="$deplib $new_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2722 # Pragmatically, this seems to cause very few problems in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2723 # practice:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2724 case $deplib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2725 -L*) new_libs="$deplib $new_libs" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2726 -R*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2727 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2728 # And here is the reason: when a library appears more
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2729 # than once as an explicit dependence of a library, or
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2730 # is implicitly linked in more than once by the
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2731 # compiler, it is considered special, and multiple
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2732 # occurrences thereof are not removed. Compare this
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2733 # with having the same library being listed as a
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2734 # dependency of multiple other libraries: in this case,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2735 # we know (pedantically, we assume) the library does not
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2736 # need to be listed more than once, so we keep only the
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2737 # last copy. This is not always right, but it is rare
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2738 # enough that we require users that really mean to play
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2739 # such unportable linking tricks to link the library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2740 # using -Wl,-lname, so that libtool does not consider it
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2741 # for duplicate removal.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2742 case " $specialdeplibs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2743 *" $deplib "*) new_libs="$deplib $new_libs" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2744 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2745 case " $new_libs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2746 *" $deplib "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2747 *) new_libs="$deplib $new_libs" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2748 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2749 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2750 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2751 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2752 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2753 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2754 tmp_libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2755 for deplib in $new_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2756 case $deplib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2757 -L*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2758 case " $tmp_libs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2759 *" $deplib "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2760 *) tmp_libs="$tmp_libs $deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2761 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2762 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2763 *) tmp_libs="$tmp_libs $deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2764 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2765 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2766 eval $var=\"$tmp_libs\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2767 done # for var
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2768 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2769 # Last step: remove runtime libs from dependency_libs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2770 # (they stay in deplibs)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2771 tmp_libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2772 for i in $dependency_libs ; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2773 case " $predeps $postdeps $compiler_lib_search_path " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2774 *" $i "*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2775 i=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2776 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2777 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2778 if test -n "$i" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2779 tmp_libs="$tmp_libs $i"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2780 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2781 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2782 dependency_libs=$tmp_libs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2783 done # for pass
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2784 if test "$linkmode" = prog; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2785 dlfiles="$newdlfiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2786 dlprefiles="$newdlprefiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2787 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2788
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2789 case $linkmode in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2790 oldlib)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2791 if test -n "$deplibs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2792 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2793 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2794
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2795 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2796 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2797 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2798
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2799 if test -n "$rpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2800 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2801 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2802
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2803 if test -n "$xrpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2804 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2805 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2806
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2807 if test -n "$vinfo"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2808 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2809 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2810
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2811 if test -n "$release"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2812 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2813 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2814
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2815 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2816 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2817 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2818
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2819 # Now set the variables for building old libraries.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2820 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2821 oldlibs="$output"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2822 objs="$objs$old_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2823 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2824
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2825 lib)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2826 # Make sure we only generate libraries of the form `libNAME.la'.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2827 case $outputname in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2828 lib*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2829 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2830 eval shared_ext=\"$shrext_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2831 eval libname=\"$libname_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2832 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2833 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2834 if test "$module" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2835 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2836 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2837 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2838 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2839 if test "$need_lib_prefix" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2840 # Add the "lib" prefix for modules if required
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2841 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2842 eval shared_ext=\"$shrext_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2843 eval libname=\"$libname_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2844 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2845 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2846 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2847 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2848 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2849
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2850 if test -n "$objs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2851 if test "$deplibs_check_method" != pass_all; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2852 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2853 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2854 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2855 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2856 $echo "*** Warning: Linking the shared library $output against the non-libtool"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2857 $echo "*** objects $objs is not portable!"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2858 libobjs="$libobjs $objs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2859 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2860 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2861
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2862 if test "$dlself" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2863 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2864 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2865
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2866 set dummy $rpath
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2867 if test "$#" -gt 2; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2868 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2869 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2870 install_libdir="$2"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2871
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2872 oldlibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2873 if test -z "$rpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2874 if test "$build_libtool_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2875 # Building a libtool convenience library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2876 # Some compilers have problems with a `.al' extension so
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2877 # convenience libraries should have the same extension an
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2878 # archive normally would.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2879 oldlibs="$output_objdir/$libname.$libext $oldlibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2880 build_libtool_libs=convenience
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2881 build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2882 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2883
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2884 if test -n "$vinfo"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2885 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2886 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2887
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2888 if test -n "$release"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2889 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2890 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2891 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2892
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2893 # Parse the version information argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2894 save_ifs="$IFS"; IFS=':'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2895 set dummy $vinfo 0 0 0
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2896 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2897
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2898 if test -n "$8"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2899 $echo "$modename: too many parameters to \`-version-info'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2900 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2901 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2902 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2903
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2904 # convert absolute version numbers to libtool ages
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2905 # this retains compatibility with .la files and attempts
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2906 # to make the code below a bit more comprehensible
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2907
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2908 case $vinfo_number in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2909 yes)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2910 number_major="$2"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2911 number_minor="$3"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2912 number_revision="$4"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2913 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2914 # There are really only two kinds -- those that
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2915 # use the current revision as the major version
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2916 # and those that subtract age and use age as
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2917 # a minor version. But, then there is irix
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2918 # which has an extra 1 added just for fun
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2919 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2920 case $version_type in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2921 darwin|linux|osf|windows)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2922 current=`expr $number_major + $number_minor`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2923 age="$number_minor"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2924 revision="$number_revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2925 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2926 freebsd-aout|freebsd-elf|sunos)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2927 current="$number_major"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2928 revision="$number_minor"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2929 age="0"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2930 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2931 irix|nonstopux)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2932 current=`expr $number_major + $number_minor - 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2933 age="$number_minor"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2934 revision="$number_minor"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2935 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2936 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2937 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2938 no)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2939 current="$2"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2940 revision="$3"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2941 age="$4"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2942 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2943 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2944
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2945 # Check that each of the things are valid numbers.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2946 case $current in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2947 [0-9]*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2948 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2949 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2950 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2951 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2952 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2953 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2954
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2955 case $revision in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2956 [0-9]*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2957 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2958 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2959 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2960 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2961 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2962 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2963
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2964 case $age in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2965 [0-9]*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2966 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2967 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2968 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2969 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2970 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2971 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2972
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2973 if test "$age" -gt "$current"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2974 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2975 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2976 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2977 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2978
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2979 # Calculate the version variables.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2980 major=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2981 versuffix=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2982 verstring=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2983 case $version_type in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2984 none) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2985
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2986 darwin)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2987 # Like Linux, but with the current version available in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2988 # verstring for coding it into the library header
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2989 major=.`expr $current - $age`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2990 versuffix="$major.$age.$revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2991 # Darwin ld doesn't like 0 for these options...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2992 minor_current=`expr $current + 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2993 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2994 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2995
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2996 freebsd-aout)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2997 major=".$current"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2998 versuffix=".$current.$revision";
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
2999 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3000
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3001 freebsd-elf)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3002 major=".$current"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3003 versuffix=".$current";
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3004 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3005
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3006 irix | nonstopux)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3007 major=`expr $current - $age + 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3008
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3009 case $version_type in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3010 nonstopux) verstring_prefix=nonstopux ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3011 *) verstring_prefix=sgi ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3012 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3013 verstring="$verstring_prefix$major.$revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3014
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3015 # Add in all the interfaces that we are compatible with.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3016 loop=$revision
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3017 while test "$loop" -ne 0; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3018 iface=`expr $revision - $loop`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3019 loop=`expr $loop - 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3020 verstring="$verstring_prefix$major.$iface:$verstring"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3021 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3022
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3023 # Before this point, $major must not contain `.'.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3024 major=.$major
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3025 versuffix="$major.$revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3026 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3027
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3028 linux)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3029 major=.`expr $current - $age`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3030 versuffix="$major.$age.$revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3031 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3032
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3033 osf)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3034 major=.`expr $current - $age`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3035 versuffix=".$current.$age.$revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3036 verstring="$current.$age.$revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3037
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3038 # Add in all the interfaces that we are compatible with.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3039 loop=$age
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3040 while test "$loop" -ne 0; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3041 iface=`expr $current - $loop`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3042 loop=`expr $loop - 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3043 verstring="$verstring:${iface}.0"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3044 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3045
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3046 # Make executables depend on our current version.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3047 verstring="$verstring:${current}.0"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3048 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3049
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3050 sunos)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3051 major=".$current"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3052 versuffix=".$current.$revision"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3053 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3054
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3055 windows)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3056 # Use '-' rather than '.', since we only want one
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3057 # extension on DOS 8.3 filesystems.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3058 major=`expr $current - $age`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3059 versuffix="-$major"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3060 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3061
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3062 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3063 $echo "$modename: unknown library version type \`$version_type'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3064 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3065 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3066 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3067 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3068
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3069 # Clear the version info if we defaulted, and they specified a release.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3070 if test -z "$vinfo" && test -n "$release"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3071 major=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3072 case $version_type in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3073 darwin)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3074 # we can't check for "0.0" in archive_cmds due to quoting
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3075 # problems, so we reset it completely
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3076 verstring=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3077 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3078 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3079 verstring="0.0"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3080 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3081 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3082 if test "$need_version" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3083 versuffix=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3084 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3085 versuffix=".0.0"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3086 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3087 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3088
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3089 # Remove version info from name if versioning should be avoided
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3090 if test "$avoid_version" = yes && test "$need_version" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3091 major=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3092 versuffix=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3093 verstring=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3094 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3095
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3096 # Check to see if the archive will have undefined symbols.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3097 if test "$allow_undefined" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3098 if test "$allow_undefined_flag" = unsupported; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3099 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3100 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3101 build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3102 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3103 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3104 # Don't allow undefined symbols.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3105 allow_undefined_flag="$no_undefined_flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3106 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3107 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3108
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3109 if test "$mode" != relink; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3110 # Remove our outputs, but don't remove object files since they
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3111 # may have been created when compiling PIC objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3112 removelist=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3113 tempremovelist=`$echo "$output_objdir/*"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3114 for p in $tempremovelist; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3115 case $p in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3116 *.$objext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3117 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3118 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3119 if test "X$precious_files_regex" != "X"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3120 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3121 then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3122 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3123 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3124 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3125 removelist="$removelist $p"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3126 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3127 *) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3128 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3129 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3130 if test -n "$removelist"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3131 $show "${rm}r $removelist"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3132 $run ${rm}r $removelist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3133 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3134 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3135
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3136 # Now set the variables for building old libraries.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3137 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3138 oldlibs="$oldlibs $output_objdir/$libname.$libext"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3139
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3140 # Transform .lo files to .o files.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3141 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3142 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3143
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3144 # Eliminate all temporary directories.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3145 for path in $notinst_path; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3146 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3147 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3148 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3149 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3150
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3151 if test -n "$xrpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3152 # If the user specified any rpath flags, then add them.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3153 temp_xrpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3154 for libdir in $xrpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3155 temp_xrpath="$temp_xrpath -R$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3156 case "$finalize_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3157 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3158 *) finalize_rpath="$finalize_rpath $libdir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3159 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3160 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3161 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3162 dependency_libs="$temp_xrpath $dependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3163 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3164 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3165
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3166 # Make sure dlfiles contains only unique files that won't be dlpreopened
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3167 old_dlfiles="$dlfiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3168 dlfiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3169 for lib in $old_dlfiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3170 case " $dlprefiles $dlfiles " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3171 *" $lib "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3172 *) dlfiles="$dlfiles $lib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3173 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3174 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3175
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3176 # Make sure dlprefiles contains only unique files
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3177 old_dlprefiles="$dlprefiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3178 dlprefiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3179 for lib in $old_dlprefiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3180 case "$dlprefiles " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3181 *" $lib "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3182 *) dlprefiles="$dlprefiles $lib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3183 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3184 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3185
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3186 if test "$build_libtool_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3187 if test -n "$rpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3188 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3189 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3190 # these systems don't actually have a c library (as such)!
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3191 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3192 *-*-rhapsody* | *-*-darwin1.[012])
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3193 # Rhapsody C library is in the System framework
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3194 deplibs="$deplibs -framework System"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3195 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3196 *-*-netbsd*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3197 # Don't link with libc until the a.out ld.so is fixed.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3198 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3199 *-*-openbsd* | *-*-freebsd*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3200 # Do not include libc due to us having libc/libc_r.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3201 test "X$arg" = "X-lc" && continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3202 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3203 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3204 # Add libc to deplibs on all other systems if necessary.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3205 if test "$build_libtool_need_lc" = "yes"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3206 deplibs="$deplibs -lc"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3207 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3208 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3209 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3210 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3211
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3212 # Transform deplibs into only deplibs that can be linked in shared.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3213 name_save=$name
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3214 libname_save=$libname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3215 release_save=$release
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3216 versuffix_save=$versuffix
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3217 major_save=$major
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3218 # I'm not sure if I'm treating the release correctly. I think
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3219 # release should show up in the -l (ie -lgmp5) so we don't want to
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3220 # add it in twice. Is that correct?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3221 release=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3222 versuffix=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3223 major=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3224 newdeplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3225 droppeddeps=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3226 case $deplibs_check_method in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3227 pass_all)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3228 # Don't check for shared/static. Everything works.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3229 # This might be a little naive. We might want to check
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3230 # whether the library exists or not. But this is on
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3231 # osf3 & osf4 and I'm not really sure... Just
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3232 # implementing what was already the behavior.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3233 newdeplibs=$deplibs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3234 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3235 test_compile)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3236 # This code stresses the "libraries are programs" paradigm to its
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3237 # limits. Maybe even breaks it. We compile a program, linking it
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3238 # against the deplibs as a proxy for the library. Then we can check
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3239 # whether they linked in statically or dynamically with ldd.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3240 $rm conftest.c
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3241 cat > conftest.c <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3242 int main() { return 0; }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3243 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3244 $rm conftest
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3245 $LTCC -o conftest conftest.c $deplibs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3246 if test "$?" -eq 0 ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3247 ldd_output=`ldd conftest`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3248 for i in $deplibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3249 name="`expr $i : '-l\(.*\)'`"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3250 # If $name is empty we are operating on a -L argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3251 if test "$name" != "" && test "$name" -ne "0"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3252 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3253 case " $predeps $postdeps " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3254 *" $i "*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3255 newdeplibs="$newdeplibs $i"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3256 i=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3257 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3258 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3259 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3260 if test -n "$i" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3261 libname=`eval \\$echo \"$libname_spec\"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3262 deplib_matches=`eval \\$echo \"$library_names_spec\"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3263 set dummy $deplib_matches
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3264 deplib_match=$2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3265 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3266 newdeplibs="$newdeplibs $i"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3267 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3268 droppeddeps=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3269 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3270 $echo "*** Warning: dynamic linker does not accept needed library $i."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3271 $echo "*** I have the capability to make that library automatically link in when"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3272 $echo "*** you link to this library. But I can only do this if you have a"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3273 $echo "*** shared version of the library, which I believe you do not have"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3274 $echo "*** because a test_compile did reveal that the linker did not use it for"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3275 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3276 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3277 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3278 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3279 newdeplibs="$newdeplibs $i"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3280 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3281 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3282 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3283 # Error occurred in the first compile. Let's try to salvage
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3284 # the situation: Compile a separate program for each library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3285 for i in $deplibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3286 name="`expr $i : '-l\(.*\)'`"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3287 # If $name is empty we are operating on a -L argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3288 if test "$name" != "" && test "$name" != "0"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3289 $rm conftest
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3290 $LTCC -o conftest conftest.c $i
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3291 # Did it work?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3292 if test "$?" -eq 0 ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3293 ldd_output=`ldd conftest`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3294 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3295 case " $predeps $postdeps " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3296 *" $i "*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3297 newdeplibs="$newdeplibs $i"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3298 i=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3299 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3300 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3301 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3302 if test -n "$i" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3303 libname=`eval \\$echo \"$libname_spec\"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3304 deplib_matches=`eval \\$echo \"$library_names_spec\"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3305 set dummy $deplib_matches
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3306 deplib_match=$2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3307 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3308 newdeplibs="$newdeplibs $i"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3309 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3310 droppeddeps=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3311 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3312 $echo "*** Warning: dynamic linker does not accept needed library $i."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3313 $echo "*** I have the capability to make that library automatically link in when"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3314 $echo "*** you link to this library. But I can only do this if you have a"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3315 $echo "*** shared version of the library, which you do not appear to have"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3316 $echo "*** because a test_compile did reveal that the linker did not use this one"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3317 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3318 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3319 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3320 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3321 droppeddeps=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3322 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3323 $echo "*** Warning! Library $i is needed by this library but I was not able to"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3324 $echo "*** make it link in! You will probably need to install it or some"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3325 $echo "*** library that it depends on before this library will be fully"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3326 $echo "*** functional. Installing it before continuing would be even better."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3327 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3328 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3329 newdeplibs="$newdeplibs $i"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3330 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3331 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3332 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3333 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3334 file_magic*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3335 set dummy $deplibs_check_method
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3336 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3337 for a_deplib in $deplibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3338 name="`expr $a_deplib : '-l\(.*\)'`"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3339 # If $name is empty we are operating on a -L argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3340 if test "$name" != "" && test "$name" != "0"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3341 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3342 case " $predeps $postdeps " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3343 *" $a_deplib "*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3344 newdeplibs="$newdeplibs $a_deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3345 a_deplib=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3346 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3347 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3348 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3349 if test -n "$a_deplib" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3350 libname=`eval \\$echo \"$libname_spec\"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3351 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3352 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3353 for potent_lib in $potential_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3354 # Follow soft links.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3355 if ls -lLd "$potent_lib" 2>/dev/null \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3356 | grep " -> " >/dev/null; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3357 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3358 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3359 # The statement above tries to avoid entering an
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3360 # endless loop below, in case of cyclic links.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3361 # We might still enter an endless loop, since a link
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3362 # loop can be closed while we follow links,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3363 # but so what?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3364 potlib="$potent_lib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3365 while test -h "$potlib" 2>/dev/null; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3366 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3367 case $potliblink in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3368 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3369 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3370 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3371 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3372 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3373 | ${SED} 10q \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3374 | $EGREP "$file_magic_regex" > /dev/null; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3375 newdeplibs="$newdeplibs $a_deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3376 a_deplib=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3377 break 2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3378 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3379 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3380 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3381 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3382 if test -n "$a_deplib" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3383 droppeddeps=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3384 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3385 $echo "*** Warning: linker path does not have real file for library $a_deplib."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3386 $echo "*** I have the capability to make that library automatically link in when"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3387 $echo "*** you link to this library. But I can only do this if you have a"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3388 $echo "*** shared version of the library, which you do not appear to have"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3389 $echo "*** because I did check the linker path looking for a file starting"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3390 if test -z "$potlib" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3391 $echo "*** with $libname but no candidates were found. (...for file magic test)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3392 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3393 $echo "*** with $libname and none of the candidates passed a file format test"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3394 $echo "*** using a file magic. Last file checked: $potlib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3395 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3396 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3397 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3398 # Add a -L argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3399 newdeplibs="$newdeplibs $a_deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3400 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3401 done # Gone through all deplibs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3402 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3403 match_pattern*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3404 set dummy $deplibs_check_method
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3405 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3406 for a_deplib in $deplibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3407 name="`expr $a_deplib : '-l\(.*\)'`"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3408 # If $name is empty we are operating on a -L argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3409 if test -n "$name" && test "$name" != "0"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3410 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3411 case " $predeps $postdeps " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3412 *" $a_deplib "*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3413 newdeplibs="$newdeplibs $a_deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3414 a_deplib=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3415 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3416 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3417 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3418 if test -n "$a_deplib" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3419 libname=`eval \\$echo \"$libname_spec\"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3420 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3421 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3422 for potent_lib in $potential_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3423 potlib="$potent_lib" # see symlink-check above in file_magic test
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3424 if eval $echo \"$potent_lib\" 2>/dev/null \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3425 | ${SED} 10q \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3426 | $EGREP "$match_pattern_regex" > /dev/null; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3427 newdeplibs="$newdeplibs $a_deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3428 a_deplib=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3429 break 2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3430 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3431 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3432 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3433 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3434 if test -n "$a_deplib" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3435 droppeddeps=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3436 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3437 $echo "*** Warning: linker path does not have real file for library $a_deplib."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3438 $echo "*** I have the capability to make that library automatically link in when"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3439 $echo "*** you link to this library. But I can only do this if you have a"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3440 $echo "*** shared version of the library, which you do not appear to have"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3441 $echo "*** because I did check the linker path looking for a file starting"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3442 if test -z "$potlib" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3443 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3444 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3445 $echo "*** with $libname and none of the candidates passed a file format test"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3446 $echo "*** using a regex pattern. Last file checked: $potlib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3447 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3448 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3449 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3450 # Add a -L argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3451 newdeplibs="$newdeplibs $a_deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3452 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3453 done # Gone through all deplibs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3454 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3455 none | unknown | *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3456 newdeplibs=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3457 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3458 -e 's/ -[LR][^ ]*//g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3459 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3460 for i in $predeps $postdeps ; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3461 # can't use Xsed below, because $i might contain '/'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3462 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3463 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3464 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3465 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3466 | grep . >/dev/null; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3467 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3468 if test "X$deplibs_check_method" = "Xnone"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3469 $echo "*** Warning: inter-library dependencies are not supported in this platform."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3470 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3471 $echo "*** Warning: inter-library dependencies are not known to be supported."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3472 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3473 $echo "*** All declared inter-library dependencies are being dropped."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3474 droppeddeps=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3475 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3476 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3477 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3478 versuffix=$versuffix_save
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3479 major=$major_save
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3480 release=$release_save
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3481 libname=$libname_save
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3482 name=$name_save
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3483
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3484 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3485 *-*-rhapsody* | *-*-darwin1.[012])
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3486 # On Rhapsody replace the C library is the System framework
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3487 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3488 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3489 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3490
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3491 if test "$droppeddeps" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3492 if test "$module" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3493 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3494 $echo "*** Warning: libtool could not satisfy all declared inter-library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3495 $echo "*** dependencies of module $libname. Therefore, libtool will create"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3496 $echo "*** a static module, that should work as long as the dlopening"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3497 $echo "*** application is linked with the -dlopen flag."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3498 if test -z "$global_symbol_pipe"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3499 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3500 $echo "*** However, this would only work if libtool was able to extract symbol"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3501 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3502 $echo "*** not find such a program. So, this module is probably useless."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3503 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3504 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3505 if test "$build_old_libs" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3506 oldlibs="$output_objdir/$libname.$libext"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3507 build_libtool_libs=module
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3508 build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3509 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3510 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3511 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3512 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3513 $echo "*** The inter-library dependencies that have been dropped here will be"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3514 $echo "*** automatically added whenever a program is linked with this library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3515 $echo "*** or is declared to -dlopen it."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3516
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3517 if test "$allow_undefined" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3518 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3519 $echo "*** Since this library must not contain undefined symbols,"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3520 $echo "*** because either the platform does not support them or"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3521 $echo "*** it was explicitly requested with -no-undefined,"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3522 $echo "*** libtool will only create a static version of it."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3523 if test "$build_old_libs" = no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3524 oldlibs="$output_objdir/$libname.$libext"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3525 build_libtool_libs=module
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3526 build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3527 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3528 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3529 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3530 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3531 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3532 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3533 # Done checking deplibs!
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3534 deplibs=$newdeplibs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3535 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3536
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3537 # All the library-specific variables (install_libdir is set above).
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3538 library_names=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3539 old_library=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3540 dlname=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3541
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3542 # Test again, we may have decided not to build it any more
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3543 if test "$build_libtool_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3544 if test "$hardcode_into_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3545 # Hardcode the library paths
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3546 hardcode_libdirs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3547 dep_rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3548 rpath="$finalize_rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3549 test "$mode" != relink && rpath="$compile_rpath$rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3550 for libdir in $rpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3551 if test -n "$hardcode_libdir_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3552 if test -n "$hardcode_libdir_separator"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3553 if test -z "$hardcode_libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3554 hardcode_libdirs="$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3555 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3556 # Just accumulate the unique libdirs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3557 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3558 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3559 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3560 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3561 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3562 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3563 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3564 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3565 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3566 eval flag=\"$hardcode_libdir_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3567 dep_rpath="$dep_rpath $flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3568 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3569 elif test -n "$runpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3570 case "$perm_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3571 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3572 *) perm_rpath="$perm_rpath $libdir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3573 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3574 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3575 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3576 # Substitute the hardcoded libdirs into the rpath.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3577 if test -n "$hardcode_libdir_separator" &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3578 test -n "$hardcode_libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3579 libdir="$hardcode_libdirs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3580 if test -n "$hardcode_libdir_flag_spec_ld"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3581 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3582 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3583 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3584 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3585 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3586 if test -n "$runpath_var" && test -n "$perm_rpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3587 # We should set the runpath_var.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3588 rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3589 for dir in $perm_rpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3590 rpath="$rpath$dir:"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3591 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3592 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3593 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3594 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3595 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3596
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3597 shlibpath="$finalize_shlibpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3598 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3599 if test -n "$shlibpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3600 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3601 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3602
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3603 # Get the real and link names of the library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3604 eval shared_ext=\"$shrext_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3605 eval library_names=\"$library_names_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3606 set dummy $library_names
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3607 realname="$2"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3608 shift; shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3609
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3610 if test -n "$soname_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3611 eval soname=\"$soname_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3612 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3613 soname="$realname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3614 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3615 if test -z "$dlname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3616 dlname=$soname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3617 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3618
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3619 lib="$output_objdir/$realname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3620 for link
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3621 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3622 linknames="$linknames $link"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3623 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3624
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3625 # Use standard objects if they are pic
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3626 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3627
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3628 # Prepare the list of exported symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3629 if test -z "$export_symbols"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3630 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3631 $show "generating symbol list for \`$libname.la'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3632 export_symbols="$output_objdir/$libname.exp"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3633 $run $rm $export_symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3634 cmds=$export_symbols_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3635 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3636 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3637 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3638 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3639 if len=`expr "X$cmd" : ".*"` &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3640 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3641 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3642 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3643 skipped_export=false
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3644 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3645 # The command line is too long to execute in one step.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3646 $show "using reloadable object file for export list..."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3647 skipped_export=:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3648 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3649 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3650 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3651 if test -n "$export_symbols_regex"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3652 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3653 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3654 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3655 $run eval '$mv "${export_symbols}T" "$export_symbols"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3656 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3657 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3658 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3659
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3660 if test -n "$export_symbols" && test -n "$include_expsyms"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3661 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3662 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3663
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3664 tmp_deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3665 for test_deplib in $deplibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3666 case " $convenience " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3667 *" $test_deplib "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3668 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3669 tmp_deplibs="$tmp_deplibs $test_deplib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3670 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3671 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3672 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3673 deplibs="$tmp_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3674
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3675 if test -n "$convenience"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3676 if test -n "$whole_archive_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3677 save_libobjs=$libobjs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3678 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3679 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3680 gentop="$output_objdir/${outputname}x"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3681 $show "${rm}r $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3682 $run ${rm}r "$gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3683 $show "$mkdir $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3684 $run $mkdir "$gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3685 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3686 if test "$status" -ne 0 && test ! -d "$gentop"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3687 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3688 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3689 generated="$generated $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3690
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3691 for xlib in $convenience; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3692 # Extract the objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3693 case $xlib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3694 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3695 *) xabs=`pwd`"/$xlib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3696 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3697 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3698 xdir="$gentop/$xlib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3699
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3700 $show "${rm}r $xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3701 $run ${rm}r "$xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3702 $show "$mkdir $xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3703 $run $mkdir "$xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3704 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3705 if test "$status" -ne 0 && test ! -d "$xdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3706 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3707 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3708 # We will extract separately just the conflicting names and we will no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3709 # longer touch any unique names. It is faster to leave these extract
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3710 # automatically by $AR in one run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3711 $show "(cd $xdir && $AR x $xabs)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3712 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3713 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3714 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3715 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3716 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3717 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3718 $AR t "$xabs" | sort | uniq -cd | while read -r count name
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3719 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3720 i=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3721 while test "$i" -le "$count"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3722 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3723 # Put our $i before any first dot (extension)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3724 # Never overwrite any file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3725 name_to="$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3726 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3727 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3728 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3729 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3730 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3731 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3732 i=`expr $i + 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3733 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3734 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3735 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3736
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3737 libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3738 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3739 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3740 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3741
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3742 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3743 eval flag=\"$thread_safe_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3744 linker_flags="$linker_flags $flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3745 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3746
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3747 # Make a backup of the uninstalled library when relinking
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3748 if test "$mode" = relink; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3749 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3750 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3751
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3752 # Do each of the archive commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3753 if test "$module" = yes && test -n "$module_cmds" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3754 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3755 eval test_cmds=\"$module_expsym_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3756 cmds=$module_expsym_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3757 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3758 eval test_cmds=\"$module_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3759 cmds=$module_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3760 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3761 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3762 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3763 eval test_cmds=\"$archive_expsym_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3764 cmds=$archive_expsym_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3765 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3766 eval test_cmds=\"$archive_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3767 cmds=$archive_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3768 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3769 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3770
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3771 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3772 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3773 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3774 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3775 # The command line is too long to link in one step, link piecewise.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3776 $echo "creating reloadable object files..."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3777
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3778 # Save the value of $output and $libobjs because we want to
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3779 # use them later. If we have whole_archive_flag_spec, we
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3780 # want to use save_libobjs as it was before
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3781 # whole_archive_flag_spec was expanded, because we can't
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3782 # assume the linker understands whole_archive_flag_spec.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3783 # This may have to be revisited, in case too many
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3784 # convenience libraries get linked in and end up exceeding
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3785 # the spec.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3786 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3787 save_libobjs=$libobjs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3788 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3789 save_output=$output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3790
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3791 # Clear the reloadable object creation command queue and
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3792 # initialize k to one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3793 test_cmds=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3794 concat_cmds=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3795 objlist=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3796 delfiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3797 last_robj=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3798 k=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3799 output=$output_objdir/$save_output-${k}.$objext
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3800 # Loop over the list of objects to be linked.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3801 for obj in $save_libobjs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3802 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3803 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3804 if test "X$objlist" = X ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3805 { len=`expr "X$test_cmds" : ".*"` &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3806 test "$len" -le "$max_cmd_len"; }; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3807 objlist="$objlist $obj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3808 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3809 # The command $test_cmds is almost too long, add a
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3810 # command to the queue.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3811 if test "$k" -eq 1 ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3812 # The first file doesn't have a previous command to add.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3813 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3814 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3815 # All subsequent reloadable object files will link in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3816 # the last one created.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3817 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3818 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3819 last_robj=$output_objdir/$save_output-${k}.$objext
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3820 k=`expr $k + 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3821 output=$output_objdir/$save_output-${k}.$objext
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3822 objlist=$obj
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3823 len=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3824 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3825 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3826 # Handle the remaining objects by creating one last
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3827 # reloadable object file. All subsequent reloadable object
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3828 # files will link in the last one created.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3829 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3830 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3831
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3832 if ${skipped_export-false}; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3833 $show "generating symbol list for \`$libname.la'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3834 export_symbols="$output_objdir/$libname.exp"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3835 $run $rm $export_symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3836 libobjs=$output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3837 # Append the command to create the export file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3838 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3839 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3840
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3841 # Set up a command to remove the reloadale object files
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3842 # after they are used.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3843 i=0
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3844 while test "$i" -lt "$k"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3845 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3846 i=`expr $i + 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3847 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3848 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3849
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3850 $echo "creating a temporary reloadable object file: $output"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3851
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3852 # Loop through the commands generated above and execute them.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3853 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3854 for cmd in $concat_cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3855 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3856 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3857 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3858 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3859 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3860
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3861 libobjs=$output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3862 # Restore the value of output.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3863 output=$save_output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3864
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3865 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3866 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3867 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3868 # Expand the library linking commands again to reset the
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3869 # value of $libobjs for piecewise linking.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3870
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3871 # Do each of the archive commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3872 if test "$module" = yes && test -n "$module_cmds" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3873 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3874 cmds=$module_expsym_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3875 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3876 cmds=$module_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3877 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3878 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3879 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3880 cmds=$archive_expsym_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3881 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3882 cmds=$archive_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3883 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3884 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3885
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3886 # Append the command to remove the reloadable object files
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3887 # to the just-reset $cmds.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3888 eval cmds=\"\$cmds~\$rm $delfiles\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3889 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3890 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3891 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3892 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3893 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3894 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3895 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3896 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3897 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3898
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3899 # Restore the uninstalled library and exit
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3900 if test "$mode" = relink; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3901 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3902 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3903 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3904
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3905 # Create links to the real library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3906 for linkname in $linknames; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3907 if test "$realname" != "$linkname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3908 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3909 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3910 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3911 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3912
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3913 # If -module or -export-dynamic was specified, set the dlname.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3914 if test "$module" = yes || test "$export_dynamic" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3915 # On all known operating systems, these are identical.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3916 dlname="$soname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3917 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3918 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3919 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3920
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3921 obj)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3922 if test -n "$deplibs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3923 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3924 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3925
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3926 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3927 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3928 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3929
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3930 if test -n "$rpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3931 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3932 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3933
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3934 if test -n "$xrpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3935 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3936 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3937
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3938 if test -n "$vinfo"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3939 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3940 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3941
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3942 if test -n "$release"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3943 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3944 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3945
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3946 case $output in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3947 *.lo)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3948 if test -n "$objs$old_deplibs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3949 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3950 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3951 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3952 libobj="$output"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3953 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3954 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3955 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3956 libobj=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3957 obj="$output"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3958 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3959 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3960
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3961 # Delete the old objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3962 $run $rm $obj $libobj
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3963
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3964 # Objects from convenience libraries. This assumes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3965 # single-version convenience libraries. Whenever we create
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3966 # different ones for PIC/non-PIC, this we'll have to duplicate
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3967 # the extraction.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3968 reload_conv_objs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3969 gentop=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3970 # reload_cmds runs $LD directly, so let us get rid of
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3971 # -Wl from whole_archive_flag_spec
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3972 wl=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3973
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3974 if test -n "$convenience"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3975 if test -n "$whole_archive_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3976 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3977 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3978 gentop="$output_objdir/${obj}x"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3979 $show "${rm}r $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3980 $run ${rm}r "$gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3981 $show "$mkdir $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3982 $run $mkdir "$gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3983 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3984 if test "$status" -ne 0 && test ! -d "$gentop"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3985 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3986 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3987 generated="$generated $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3988
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3989 for xlib in $convenience; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3990 # Extract the objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3991 case $xlib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3992 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3993 *) xabs=`pwd`"/$xlib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3994 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3995 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3996 xdir="$gentop/$xlib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3997
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3998 $show "${rm}r $xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
3999 $run ${rm}r "$xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4000 $show "$mkdir $xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4001 $run $mkdir "$xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4002 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4003 if test "$status" -ne 0 && test ! -d "$xdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4004 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4005 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4006 # We will extract separately just the conflicting names and we will no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4007 # longer touch any unique names. It is faster to leave these extract
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4008 # automatically by $AR in one run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4009 $show "(cd $xdir && $AR x $xabs)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4010 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4011 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4012 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4013 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4014 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4015 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4016 $AR t "$xabs" | sort | uniq -cd | while read -r count name
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4017 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4018 i=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4019 while test "$i" -le "$count"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4020 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4021 # Put our $i before any first dot (extension)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4022 # Never overwrite any file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4023 name_to="$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4024 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4025 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4026 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4027 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4028 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4029 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4030 i=`expr $i + 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4031 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4032 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4033 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4034
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4035 reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4036 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4037 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4038 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4039
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4040 # Create the old-style object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4041 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4042
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4043 output="$obj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4044 cmds=$reload_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4045 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4046 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4047 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4048 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4049 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4050 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4051 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4052 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4053
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4054 # Exit if we aren't doing a library object file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4055 if test -z "$libobj"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4056 if test -n "$gentop"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4057 $show "${rm}r $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4058 $run ${rm}r $gentop
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4059 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4060
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4061 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4062 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4063
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4064 if test "$build_libtool_libs" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4065 if test -n "$gentop"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4066 $show "${rm}r $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4067 $run ${rm}r $gentop
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4068 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4069
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4070 # Create an invalid libtool object if no PIC, so that we don't
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4071 # accidentally link it into a program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4072 # $show "echo timestamp > $libobj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4073 # $run eval "echo timestamp > $libobj" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4074 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4075 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4076
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4077 if test -n "$pic_flag" || test "$pic_mode" != default; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4078 # Only do commands if we really have different PIC objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4079 reload_objs="$libobjs $reload_conv_objs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4080 output="$libobj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4081 cmds=$reload_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4082 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4083 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4084 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4085 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4086 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4087 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4088 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4089 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4090 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4091
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4092 if test -n "$gentop"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4093 $show "${rm}r $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4094 $run ${rm}r $gentop
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4095 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4096
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4097 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4098 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4099
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4100 prog)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4101 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4102 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4103 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4104 if test -n "$vinfo"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4105 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4106 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4107
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4108 if test -n "$release"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4109 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4110 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4111
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4112 if test "$preload" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4113 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4114 test "$dlopen_self_static" = unknown; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4115 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4116 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4117 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4118
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4119 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4120 *-*-rhapsody* | *-*-darwin1.[012])
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4121 # On Rhapsody replace the C library is the System framework
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4122 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4123 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4124 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4125 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4126
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4127 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4128 *darwin*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4129 # Don't allow lazy linking, it breaks C++ global constructors
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4130 if test "$tagname" = CXX ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4131 compile_command="$compile_command ${wl}-bind_at_load"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4132 finalize_command="$finalize_command ${wl}-bind_at_load"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4133 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4134 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4135 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4136
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4137 compile_command="$compile_command $compile_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4138 finalize_command="$finalize_command $finalize_deplibs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4139
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4140 if test -n "$rpath$xrpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4141 # If the user specified any rpath flags, then add them.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4142 for libdir in $rpath $xrpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4143 # This is the magic to use -rpath.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4144 case "$finalize_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4145 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4146 *) finalize_rpath="$finalize_rpath $libdir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4147 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4148 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4149 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4150
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4151 # Now hardcode the library paths
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4152 rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4153 hardcode_libdirs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4154 for libdir in $compile_rpath $finalize_rpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4155 if test -n "$hardcode_libdir_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4156 if test -n "$hardcode_libdir_separator"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4157 if test -z "$hardcode_libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4158 hardcode_libdirs="$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4159 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4160 # Just accumulate the unique libdirs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4161 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4162 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4163 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4164 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4165 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4166 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4167 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4168 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4169 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4170 eval flag=\"$hardcode_libdir_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4171 rpath="$rpath $flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4172 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4173 elif test -n "$runpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4174 case "$perm_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4175 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4176 *) perm_rpath="$perm_rpath $libdir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4177 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4178 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4179 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4180 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4181 case :$dllsearchpath: in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4182 *":$libdir:"*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4183 *) dllsearchpath="$dllsearchpath:$libdir";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4184 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4185 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4186 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4187 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4188 # Substitute the hardcoded libdirs into the rpath.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4189 if test -n "$hardcode_libdir_separator" &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4190 test -n "$hardcode_libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4191 libdir="$hardcode_libdirs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4192 eval rpath=\" $hardcode_libdir_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4193 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4194 compile_rpath="$rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4195
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4196 rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4197 hardcode_libdirs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4198 for libdir in $finalize_rpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4199 if test -n "$hardcode_libdir_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4200 if test -n "$hardcode_libdir_separator"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4201 if test -z "$hardcode_libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4202 hardcode_libdirs="$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4203 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4204 # Just accumulate the unique libdirs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4205 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4206 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4207 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4208 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4209 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4210 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4211 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4212 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4213 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4214 eval flag=\"$hardcode_libdir_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4215 rpath="$rpath $flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4216 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4217 elif test -n "$runpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4218 case "$finalize_perm_rpath " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4219 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4220 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4221 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4222 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4223 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4224 # Substitute the hardcoded libdirs into the rpath.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4225 if test -n "$hardcode_libdir_separator" &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4226 test -n "$hardcode_libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4227 libdir="$hardcode_libdirs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4228 eval rpath=\" $hardcode_libdir_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4229 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4230 finalize_rpath="$rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4231
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4232 if test -n "$libobjs" && test "$build_old_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4233 # Transform all the library objects into standard objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4234 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4235 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4236 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4237
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4238 dlsyms=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4239 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4240 if test -n "$NM" && test -n "$global_symbol_pipe"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4241 dlsyms="${outputname}S.c"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4242 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4243 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4244 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4245 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4246
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4247 if test -n "$dlsyms"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4248 case $dlsyms in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4249 "") ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4250 *.c)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4251 # Discover the nlist of each of the dlfiles.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4252 nlist="$output_objdir/${outputname}.nm"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4253
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4254 $show "$rm $nlist ${nlist}S ${nlist}T"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4255 $run $rm "$nlist" "${nlist}S" "${nlist}T"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4256
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4257 # Parse the name list into a source file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4258 $show "creating $output_objdir/$dlsyms"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4259
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4260 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4261 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4262 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4263
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4264 #ifdef __cplusplus
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4265 extern \"C\" {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4266 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4267
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4268 /* Prevent the only kind of declaration conflicts we can make. */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4269 #define lt_preloaded_symbols some_other_symbol
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4270
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4271 /* External symbol declarations for the compiler. */\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4272 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4273
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4274 if test "$dlself" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4275 $show "generating symbol list for \`$output'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4276
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4277 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4278
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4279 # Add our own program objects to the symbol list.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4280 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4281 for arg in $progfiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4282 $show "extracting global C symbols from \`$arg'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4283 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4284 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4285
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4286 if test -n "$exclude_expsyms"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4287 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4288 $run eval '$mv "$nlist"T "$nlist"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4289 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4290
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4291 if test -n "$export_symbols_regex"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4292 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4293 $run eval '$mv "$nlist"T "$nlist"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4294 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4295
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4296 # Prepare the list of exported symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4297 if test -z "$export_symbols"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4298 export_symbols="$output_objdir/$output.exp"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4299 $run $rm $export_symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4300 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4301 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4302 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4303 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4304 $run eval 'mv "$nlist"T "$nlist"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4305 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4306 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4307
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4308 for arg in $dlprefiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4309 $show "extracting global C symbols from \`$arg'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4310 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4311 $run eval '$echo ": $name " >> "$nlist"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4312 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4313 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4314
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4315 if test -z "$run"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4316 # Make sure we have at least an empty file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4317 test -f "$nlist" || : > "$nlist"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4318
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4319 if test -n "$exclude_expsyms"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4320 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4321 $mv "$nlist"T "$nlist"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4322 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4323
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4324 # Try sorting and uniquifying the output.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4325 if grep -v "^: " < "$nlist" |
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4326 if sort -k 3 </dev/null >/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4327 sort -k 3
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4328 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4329 sort +2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4330 fi |
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4331 uniq > "$nlist"S; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4332 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4333 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4334 grep -v "^: " < "$nlist" > "$nlist"S
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4335 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4336
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4337 if test -f "$nlist"S; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4338 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4339 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4340 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4341 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4342
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4343 $echo >> "$output_objdir/$dlsyms" "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4344
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4345 #undef lt_preloaded_symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4346
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4347 #if defined (__STDC__) && __STDC__
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4348 # define lt_ptr void *
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4349 #else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4350 # define lt_ptr char *
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4351 # define const
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4352 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4353
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4354 /* The mapping between symbol names and symbols. */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4355 const struct {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4356 const char *name;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4357 lt_ptr address;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4358 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4359 lt_preloaded_symbols[] =
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4360 {\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4361 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4362
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4363 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4364
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4365 $echo >> "$output_objdir/$dlsyms" "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4366 {0, (lt_ptr) 0}
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4367 };
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4368
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4369 /* This works around a problem in FreeBSD linker */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4370 #ifdef FREEBSD_WORKAROUND
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4371 static const void *lt_preloaded_setup() {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4372 return lt_preloaded_symbols;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4373 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4374 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4375
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4376 #ifdef __cplusplus
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4377 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4378 #endif\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4379 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4380 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4381
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4382 pic_flag_for_symtable=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4383 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4384 # compiling the symbol table file with pic_flag works around
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4385 # a FreeBSD bug that causes programs to crash when -lm is
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4386 # linked before any other PIC object. But we must not use
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4387 # pic_flag when linking with -static. The problem exists in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4388 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4389 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4390 case "$compile_command " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4391 *" -static "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4392 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4393 esac;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4394 *-*-hpux*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4395 case "$compile_command " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4396 *" -static "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4397 *) pic_flag_for_symtable=" $pic_flag";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4398 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4399 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4400
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4401 # Now compile the dynamic symbol file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4402 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4403 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4404
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4405 # Clean up the generated files.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4406 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4407 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4408
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4409 # Transform the symbol file into the correct name.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4410 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4411 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4412 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4413 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4414 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4415 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4416 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4417 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4418 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4419 # We keep going just in case the user didn't refer to
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4420 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4421 # really was required.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4422
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4423 # Nullify the symbol file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4424 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4425 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4426 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4427
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4428 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4429 # Replace the output file specification.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4430 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4431 link_command="$compile_command$compile_rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4432
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4433 # We have no uninstalled library dependencies, so finalize right now.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4434 $show "$link_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4435 $run eval "$link_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4436 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4437
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4438 # Delete the generated files.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4439 if test -n "$dlsyms"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4440 $show "$rm $output_objdir/${outputname}S.${objext}"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4441 $run $rm "$output_objdir/${outputname}S.${objext}"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4442 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4443
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4444 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4445 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4446
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4447 if test -n "$shlibpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4448 # We should set the shlibpath_var
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4449 rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4450 for dir in $temp_rpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4451 case $dir in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4452 [\\/]* | [A-Za-z]:[\\/]*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4453 # Absolute path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4454 rpath="$rpath$dir:"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4455 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4456 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4457 # Relative path: add a thisdir entry.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4458 rpath="$rpath\$thisdir/$dir:"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4459 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4460 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4461 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4462 temp_rpath="$rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4463 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4464
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4465 if test -n "$compile_shlibpath$finalize_shlibpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4466 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4467 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4468 if test -n "$finalize_shlibpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4469 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4470 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4471
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4472 compile_var=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4473 finalize_var=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4474 if test -n "$runpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4475 if test -n "$perm_rpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4476 # We should set the runpath_var.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4477 rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4478 for dir in $perm_rpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4479 rpath="$rpath$dir:"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4480 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4481 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4482 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4483 if test -n "$finalize_perm_rpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4484 # We should set the runpath_var.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4485 rpath=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4486 for dir in $finalize_perm_rpath; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4487 rpath="$rpath$dir:"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4488 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4489 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4490 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4491 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4492
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4493 if test "$no_install" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4494 # We don't need to create a wrapper script.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4495 link_command="$compile_var$compile_command$compile_rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4496 # Replace the output file specification.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4497 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4498 # Delete the old output file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4499 $run $rm $output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4500 # Link the executable and exit
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4501 $show "$link_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4502 $run eval "$link_command" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4503 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4504 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4505
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4506 if test "$hardcode_action" = relink; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4507 # Fast installation is not supported
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4508 link_command="$compile_var$compile_command$compile_rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4509 relink_command="$finalize_var$finalize_command$finalize_rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4510
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4511 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4512 $echo "$modename: \`$output' will be relinked during installation" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4513 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4514 if test "$fast_install" != no; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4515 link_command="$finalize_var$compile_command$finalize_rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4516 if test "$fast_install" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4517 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4518 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4519 # fast_install is set to needless
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4520 relink_command=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4521 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4522 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4523 link_command="$compile_var$compile_command$compile_rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4524 relink_command="$finalize_var$finalize_command$finalize_rpath"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4525 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4526 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4527
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4528 # Replace the output file specification.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4529 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4530
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4531 # Delete the old output files.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4532 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4533
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4534 $show "$link_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4535 $run eval "$link_command" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4536
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4537 # Now create the wrapper script.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4538 $show "creating $output"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4539
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4540 # Quote the relink command for shipping.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4541 if test -n "$relink_command"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4542 # Preserve any variables that may affect compiler behavior
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4543 for var in $variables_saved_for_relink; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4544 if eval test -z \"\${$var+set}\"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4545 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4546 elif eval var_value=\$$var; test -z "$var_value"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4547 relink_command="$var=; export $var; $relink_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4548 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4549 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4550 relink_command="$var=\"$var_value\"; export $var; $relink_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4551 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4552 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4553 relink_command="(cd `pwd`; $relink_command)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4554 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4555 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4556
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4557 # Quote $echo for shipping.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4558 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4559 case $progpath in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4560 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4561 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4562 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4563 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4564 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4565 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4566 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4567
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4568 # Only actually do things if our run command is non-null.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4569 if test -z "$run"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4570 # win32 will think the script is a binary if it has
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4571 # a .exe suffix, so we strip it off here.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4572 case $output in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4573 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4574 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4575 # test for cygwin because mv fails w/o .exe extensions
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4576 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4577 *cygwin*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4578 exeext=.exe
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4579 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4580 *) exeext= ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4581 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4582 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4583 *cygwin* | *mingw* )
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4584 cwrappersource=`$echo ${objdir}/lt-${output}.c`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4585 cwrapper=`$echo ${output}.exe`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4586 $rm $cwrappersource $cwrapper
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4587 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4588
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4589 cat > $cwrappersource <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4590
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4591 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4592 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4593
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4594 The $output program cannot be directly executed until all the libtool
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4595 libraries that it depends on are installed.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4596
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4597 This wrapper executable should never be moved out of the build directory.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4598 If it is, it will not operate correctly.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4599
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4600 Currently, it simply execs the wrapper *script* "/bin/sh $output",
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4601 but could eventually absorb all of the scripts functionality and
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4602 exec $objdir/$outputname directly.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4603 */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4604 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4605 cat >> $cwrappersource<<"EOF"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4606 #include <stdio.h>
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4607 #include <stdlib.h>
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4608 #include <unistd.h>
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4609 #include <malloc.h>
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4610 #include <stdarg.h>
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4611 #include <assert.h>
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4612
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4613 #if defined(PATH_MAX)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4614 # define LT_PATHMAX PATH_MAX
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4615 #elif defined(MAXPATHLEN)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4616 # define LT_PATHMAX MAXPATHLEN
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4617 #else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4618 # define LT_PATHMAX 1024
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4619 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4620
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4621 #ifndef DIR_SEPARATOR
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4622 #define DIR_SEPARATOR '/'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4623 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4624
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4625 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4626 defined (__OS2__)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4627 #define HAVE_DOS_BASED_FILE_SYSTEM
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4628 #ifndef DIR_SEPARATOR_2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4629 #define DIR_SEPARATOR_2 '\\'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4630 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4631 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4632
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4633 #ifndef DIR_SEPARATOR_2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4634 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4635 #else /* DIR_SEPARATOR_2 */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4636 # define IS_DIR_SEPARATOR(ch) \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4637 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4638 #endif /* DIR_SEPARATOR_2 */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4639
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4640 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4641 #define XFREE(stale) do { \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4642 if (stale) { free ((void *) stale); stale = 0; } \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4643 } while (0)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4644
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4645 const char *program_name = NULL;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4646
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4647 void * xmalloc (size_t num);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4648 char * xstrdup (const char *string);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4649 char * basename (const char *name);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4650 char * fnqualify(const char *path);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4651 char * strendzap(char *str, const char *pat);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4652 void lt_fatal (const char *message, ...);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4653
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4654 int
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4655 main (int argc, char *argv[])
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4656 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4657 char **newargz;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4658 int i;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4659
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4660 program_name = (char *) xstrdup ((char *) basename (argv[0]));
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4661 newargz = XMALLOC(char *, argc+2);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4662 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4663
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4664 cat >> $cwrappersource <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4665 newargz[0] = "$SHELL";
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4666 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4667
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4668 cat >> $cwrappersource <<"EOF"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4669 newargz[1] = fnqualify(argv[0]);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4670 /* we know the script has the same name, without the .exe */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4671 /* so make sure newargz[1] doesn't end in .exe */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4672 strendzap(newargz[1],".exe");
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4673 for (i = 1; i < argc; i++)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4674 newargz[i+1] = xstrdup(argv[i]);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4675 newargz[argc+1] = NULL;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4676 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4677
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4678 cat >> $cwrappersource <<EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4679 execv("$SHELL",newargz);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4680 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4681
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4682 cat >> $cwrappersource <<"EOF"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4683 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4684
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4685 void *
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4686 xmalloc (size_t num)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4687 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4688 void * p = (void *) malloc (num);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4689 if (!p)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4690 lt_fatal ("Memory exhausted");
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4691
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4692 return p;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4693 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4694
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4695 char *
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4696 xstrdup (const char *string)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4697 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4698 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4699 ;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4700 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4701
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4702 char *
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4703 basename (const char *name)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4704 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4705 const char *base;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4706
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4707 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4708 /* Skip over the disk name in MSDOS pathnames. */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4709 if (isalpha (name[0]) && name[1] == ':')
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4710 name += 2;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4711 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4712
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4713 for (base = name; *name; name++)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4714 if (IS_DIR_SEPARATOR (*name))
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4715 base = name + 1;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4716 return (char *) base;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4717 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4718
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4719 char *
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4720 fnqualify(const char *path)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4721 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4722 size_t size;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4723 char *p;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4724 char tmp[LT_PATHMAX + 1];
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4725
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4726 assert(path != NULL);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4727
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4728 /* Is it qualified already? */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4729 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4730 if (isalpha (path[0]) && path[1] == ':')
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4731 return xstrdup (path);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4732 #endif
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4733 if (IS_DIR_SEPARATOR (path[0]))
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4734 return xstrdup (path);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4735
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4736 /* prepend the current directory */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4737 /* doesn't handle '~' */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4738 if (getcwd (tmp, LT_PATHMAX) == NULL)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4739 lt_fatal ("getcwd failed");
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4740 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4741 p = XMALLOC(char, size);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4742 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4743 return p;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4744 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4745
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4746 char *
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4747 strendzap(char *str, const char *pat)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4748 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4749 size_t len, patlen;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4750
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4751 assert(str != NULL);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4752 assert(pat != NULL);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4753
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4754 len = strlen(str);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4755 patlen = strlen(pat);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4756
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4757 if (patlen <= len)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4758 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4759 str += len - patlen;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4760 if (strcmp(str, pat) == 0)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4761 *str = '\0';
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4762 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4763 return str;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4764 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4765
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4766 static void
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4767 lt_error_core (int exit_status, const char * mode,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4768 const char * message, va_list ap)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4769 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4770 fprintf (stderr, "%s: %s: ", program_name, mode);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4771 vfprintf (stderr, message, ap);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4772 fprintf (stderr, ".\n");
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4773
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4774 if (exit_status >= 0)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4775 exit (exit_status);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4776 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4777
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4778 void
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4779 lt_fatal (const char *message, ...)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4780 {
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4781 va_list ap;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4782 va_start (ap, message);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4783 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4784 va_end (ap);
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4785 }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4786 EOF
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4787 # we should really use a build-platform specific compiler
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4788 # here, but OTOH, the wrappers (shell script and this C one)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4789 # are only useful if you want to execute the "real" binary.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4790 # Since the "real" binary is built for $host, then this
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4791 # wrapper might as well be built for $host, too.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4792 $run $LTCC -s -o $cwrapper $cwrappersource
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4793 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4794 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4795 $rm $output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4796 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4797
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4798 $echo > $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4799 #! $SHELL
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4800
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4801 # $output - temporary wrapper script for $objdir/$outputname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4802 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4803 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4804 # The $output program cannot be directly executed until all the libtool
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4805 # libraries that it depends on are installed.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4806 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4807 # This wrapper script should never be moved out of the build directory.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4808 # If it is, it will not operate correctly.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4809
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4810 # Sed substitution that helps us do robust quoting. It backslashifies
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4811 # metacharacters that are still active within double-quoted strings.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4812 Xsed='${SED} -e 1s/^X//'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4813 sed_quote_subst='$sed_quote_subst'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4814
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4815 # The HP-UX ksh and POSIX shell print the target directory to stdout
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4816 # if CDPATH is set.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4817 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4818
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4819 relink_command=\"$relink_command\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4820
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4821 # This environment variable determines our operation mode.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4822 if test \"\$libtool_install_magic\" = \"$magic\"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4823 # install mode needs the following variable:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4824 notinst_deplibs='$notinst_deplibs'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4825 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4826 # When we are sourced in execute mode, \$file and \$echo are already set.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4827 if test \"\$libtool_execute_magic\" != \"$magic\"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4828 echo=\"$qecho\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4829 file=\"\$0\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4830 # Make sure echo works.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4831 if test \"X\$1\" = X--no-reexec; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4832 # Discard the --no-reexec flag, and continue.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4833 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4834 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4835 # Yippee, \$echo works!
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4836 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4837 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4838 # Restart under the correct shell, and then maybe \$echo will work.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4839 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4840 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4841 fi\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4842 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4843 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4844
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4845 # Find the directory that this script lives in.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4846 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4847 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4848
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4849 # Follow symbolic links until we get to the real thisdir.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4850 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4851 while test -n \"\$file\"; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4852 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4853
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4854 # If there was a directory component, then change thisdir.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4855 if test \"x\$destdir\" != \"x\$file\"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4856 case \"\$destdir\" in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4857 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4858 *) thisdir=\"\$thisdir/\$destdir\" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4859 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4860 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4861
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4862 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4863 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4864 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4865
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4866 # Try to get the absolute directory name.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4867 absdir=\`cd \"\$thisdir\" && pwd\`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4868 test -n \"\$absdir\" && thisdir=\"\$absdir\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4869 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4870
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4871 if test "$fast_install" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4872 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4873 program=lt-'$outputname'$exeext
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4874 progdir=\"\$thisdir/$objdir\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4875
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4876 if test ! -f \"\$progdir/\$program\" || \\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4877 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4878 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4879
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4880 file=\"\$\$-\$program\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4881
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4882 if test ! -d \"\$progdir\"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4883 $mkdir \"\$progdir\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4884 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4885 $rm \"\$progdir/\$file\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4886 fi"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4887
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4888 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4889
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4890 # relink executable if necessary
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4891 if test -n \"\$relink_command\"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4892 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4893 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4894 $echo \"\$relink_command_output\" >&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4895 $rm \"\$progdir/\$file\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4896 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4897 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4898 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4899
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4900 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4901 { $rm \"\$progdir/\$program\";
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4902 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4903 $rm \"\$progdir/\$file\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4904 fi"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4905 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4906 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4907 program='$outputname'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4908 progdir=\"\$thisdir/$objdir\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4909 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4910 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4911
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4912 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4913
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4914 if test -f \"\$progdir/\$program\"; then"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4915
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4916 # Export our shlibpath_var if we have one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4917 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4918 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4919 # Add our own library path to $shlibpath_var
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4920 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4921
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4922 # Some systems cannot cope with colon-terminated $shlibpath_var
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4923 # The second colon is a workaround for a bug in BeOS R4 sed
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4924 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4925
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4926 export $shlibpath_var
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4927 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4928 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4929
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4930 # fixup the dll searchpath if we need to.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4931 if test -n "$dllsearchpath"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4932 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4933 # Add the dll search path components to the executable PATH
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4934 PATH=$dllsearchpath:\$PATH
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4935 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4936 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4937
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4938 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4939 if test \"\$libtool_execute_magic\" != \"$magic\"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4940 # Run the actual program with our arguments.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4941 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4942 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4943 # Backslashes separate directories on plain windows
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4944 *-*-mingw | *-*-os2*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4945 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4946 exec \$progdir\\\\\$program \${1+\"\$@\"}
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4947 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4948 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4949
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4950 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4951 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4952 exec \$progdir/\$program \${1+\"\$@\"}
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4953 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4954 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4955 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4956 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4957 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4958 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4959 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4960 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4961 # The program doesn't exist.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4962 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4963 \$echo \"This script is just a wrapper for \$program.\" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4964 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4965 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4966 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4967 fi\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4968 "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4969 chmod +x $output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4970 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4971 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4972 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4973 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4974
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4975 # See if we need to build an old-fashioned archive.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4976 for oldlib in $oldlibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4977
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4978 if test "$build_libtool_libs" = convenience; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4979 oldobjs="$libobjs_save"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4980 addlibs="$convenience"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4981 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4982 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4983 if test "$build_libtool_libs" = module; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4984 oldobjs="$libobjs_save"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4985 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4986 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4987 oldobjs="$old_deplibs $non_pic_objects"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4988 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4989 addlibs="$old_convenience"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4990 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4991
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4992 if test -n "$addlibs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4993 gentop="$output_objdir/${outputname}x"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4994 $show "${rm}r $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4995 $run ${rm}r "$gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4996 $show "$mkdir $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4997 $run $mkdir "$gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4998 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
4999 if test "$status" -ne 0 && test ! -d "$gentop"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5000 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5001 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5002 generated="$generated $gentop"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5003
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5004 # Add in members from convenience archives.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5005 for xlib in $addlibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5006 # Extract the objects.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5007 case $xlib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5008 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5009 *) xabs=`pwd`"/$xlib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5010 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5011 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5012 xdir="$gentop/$xlib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5013
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5014 $show "${rm}r $xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5015 $run ${rm}r "$xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5016 $show "$mkdir $xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5017 $run $mkdir "$xdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5018 status=$?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5019 if test "$status" -ne 0 && test ! -d "$xdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5020 exit $status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5021 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5022 # We will extract separately just the conflicting names and we will no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5023 # longer touch any unique names. It is faster to leave these extract
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5024 # automatically by $AR in one run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5025 $show "(cd $xdir && $AR x $xabs)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5026 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5027 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5028 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5029 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5030 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5031 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5032 $AR t "$xabs" | sort | uniq -cd | while read -r count name
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5033 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5034 i=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5035 while test "$i" -le "$count"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5036 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5037 # Put our $i before any first dot (extension)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5038 # Never overwrite any file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5039 name_to="$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5040 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5041 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5042 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5043 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5044 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5045 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5046 i=`expr $i + 1`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5047 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5048 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5049 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5050
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5051 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5052 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5053 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5054
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5055 # Do each command in the archive commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5056 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5057 cmds=$old_archive_from_new_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5058 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5059 eval cmds=\"$old_archive_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5060
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5061 if len=`expr "X$cmds" : ".*"` &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5062 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5063 cmds=$old_archive_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5064 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5065 # the command line is too long to link in one step, link in parts
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5066 $echo "using piecewise archive linking..."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5067 save_RANLIB=$RANLIB
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5068 RANLIB=:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5069 objlist=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5070 concat_cmds=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5071 save_oldobjs=$oldobjs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5072 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5073 # encoded into archives. This makes 'ar r' malfunction in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5074 # this piecewise linking case whenever conflicting object
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5075 # names appear in distinct ar calls; check, warn and compensate.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5076 if (for obj in $save_oldobjs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5077 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5078 $echo "X$obj" | $Xsed -e 's%^.*/%%'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5079 done | sort | sort -uc >/dev/null 2>&1); then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5080 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5081 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5082 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5083 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5084 AR_FLAGS=cq
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5085 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5086 # Is there a better way of finding the last object in the list?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5087 for obj in $save_oldobjs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5088 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5089 last_oldobj=$obj
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5090 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5091 for obj in $save_oldobjs
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5092 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5093 oldobjs="$objlist $obj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5094 objlist="$objlist $obj"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5095 eval test_cmds=\"$old_archive_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5096 if len=`expr "X$test_cmds" : ".*"` &&
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5097 test "$len" -le "$max_cmd_len"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5098 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5099 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5100 # the above command should be used before it gets too long
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5101 oldobjs=$objlist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5102 if test "$obj" = "$last_oldobj" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5103 RANLIB=$save_RANLIB
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5104 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5105 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5106 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5107 objlist=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5108 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5109 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5110 RANLIB=$save_RANLIB
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5111 oldobjs=$objlist
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5112 if test "X$oldobjs" = "X" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5113 eval cmds=\"\$concat_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5114 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5115 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5116 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5117 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5118 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5119 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5120 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5121 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5122 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5123 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5124 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5125 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5126 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5127 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5128
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5129 if test -n "$generated"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5130 $show "${rm}r$generated"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5131 $run ${rm}r$generated
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5132 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5133
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5134 # Now create the libtool archive.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5135 case $output in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5136 *.la)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5137 old_library=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5138 test "$build_old_libs" = yes && old_library="$libname.$libext"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5139 $show "creating $output"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5140
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5141 # Preserve any variables that may affect compiler behavior
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5142 for var in $variables_saved_for_relink; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5143 if eval test -z \"\${$var+set}\"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5144 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5145 elif eval var_value=\$$var; test -z "$var_value"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5146 relink_command="$var=; export $var; $relink_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5147 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5148 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5149 relink_command="$var=\"$var_value\"; export $var; $relink_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5150 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5151 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5152 # Quote the link command for shipping.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5153 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5154 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5155 if test "$hardcode_automatic" = yes ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5156 relink_command=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5157 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5158
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5159
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5160 # Only create the output if not a dry run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5161 if test -z "$run"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5162 for installed in no yes; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5163 if test "$installed" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5164 if test -z "$install_libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5165 break
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5166 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5167 output="$output_objdir/$outputname"i
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5168 # Replace all uninstalled libtool libraries with the installed ones
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5169 newdependency_libs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5170 for deplib in $dependency_libs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5171 case $deplib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5172 *.la)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5173 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5174 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5175 if test -z "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5176 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5177 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5178 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5179 newdependency_libs="$newdependency_libs $libdir/$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5180 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5181 *) newdependency_libs="$newdependency_libs $deplib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5182 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5183 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5184 dependency_libs="$newdependency_libs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5185 newdlfiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5186 for lib in $dlfiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5187 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5188 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5189 if test -z "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5190 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5191 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5192 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5193 newdlfiles="$newdlfiles $libdir/$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5194 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5195 dlfiles="$newdlfiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5196 newdlprefiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5197 for lib in $dlprefiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5198 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5199 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5200 if test -z "$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5201 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5202 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5203 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5204 newdlprefiles="$newdlprefiles $libdir/$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5205 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5206 dlprefiles="$newdlprefiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5207 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5208 newdlfiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5209 for lib in $dlfiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5210 case $lib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5211 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5212 *) abs=`pwd`"/$lib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5213 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5214 newdlfiles="$newdlfiles $abs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5215 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5216 dlfiles="$newdlfiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5217 newdlprefiles=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5218 for lib in $dlprefiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5219 case $lib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5220 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5221 *) abs=`pwd`"/$lib" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5222 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5223 newdlprefiles="$newdlprefiles $abs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5224 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5225 dlprefiles="$newdlprefiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5226 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5227 $rm $output
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5228 # place dlname in correct position for cygwin
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5229 tdlname=$dlname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5230 case $host,$output,$installed,$module,$dlname in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5231 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5232 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5233 $echo > $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5234 # $outputname - a libtool library file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5235 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5236 #
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5237 # Please DO NOT delete this file!
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5238 # It is necessary for linking the library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5239
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5240 # The name that we can dlopen(3).
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5241 dlname='$tdlname'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5242
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5243 # Names of this library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5244 library_names='$library_names'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5245
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5246 # The name of the static archive.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5247 old_library='$old_library'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5248
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5249 # Libraries that this one depends upon.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5250 dependency_libs='$dependency_libs'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5251
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5252 # Version information for $libname.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5253 current=$current
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5254 age=$age
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5255 revision=$revision
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5256
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5257 # Is this an already installed library?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5258 installed=$installed
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5259
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5260 # Should we warn about portability when linking against -modules?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5261 shouldnotlink=$module
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5262
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5263 # Files to dlopen/dlpreopen
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5264 dlopen='$dlfiles'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5265 dlpreopen='$dlprefiles'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5266
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5267 # Directory that this library needs to be installed in:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5268 libdir='$install_libdir'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5269 if test "$installed" = no && test "$need_relink" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5270 $echo >> $output "\
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5271 relink_command=\"$relink_command\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5272 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5273 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5274 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5275
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5276 # Do a symbolic link so that the libtool archive can be found in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5277 # LD_LIBRARY_PATH before the program is installed.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5278 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5279 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5280 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5281 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5282 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5283 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5284
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5285 # libtool install mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5286 install)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5287 modename="$modename: install"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5288
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5289 # There may be an optional sh(1) argument at the beginning of
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5290 # install_prog (especially on Windows NT).
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5291 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5292 # Allow the use of GNU shtool's install command.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5293 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5294 # Aesthetically quote it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5295 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5296 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5297 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5298 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5299 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5300 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5301 install_prog="$arg "
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5302 arg="$1"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5303 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5304 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5305 install_prog=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5306 arg="$nonopt"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5307 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5308
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5309 # The real first argument should be the name of the installation program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5310 # Aesthetically quote it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5311 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5312 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5313 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5314 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5315 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5316 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5317 install_prog="$install_prog$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5318
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5319 # We need to accept at least all the BSD install flags.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5320 dest=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5321 files=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5322 opts=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5323 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5324 install_type=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5325 isdir=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5326 stripme=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5327 for arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5328 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5329 if test -n "$dest"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5330 files="$files $dest"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5331 dest="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5332 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5333 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5334
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5335 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5336 -d) isdir=yes ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5337 -f) prev="-f" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5338 -g) prev="-g" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5339 -m) prev="-m" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5340 -o) prev="-o" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5341 -s)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5342 stripme=" -s"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5343 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5344 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5345 -*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5346
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5347 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5348 # If the previous option needed an argument, then skip it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5349 if test -n "$prev"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5350 prev=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5351 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5352 dest="$arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5353 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5354 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5355 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5356 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5357
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5358 # Aesthetically quote the argument.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5359 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5360 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5361 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5362 arg="\"$arg\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5363 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5364 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5365 install_prog="$install_prog $arg"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5366 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5367
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5368 if test -z "$install_prog"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5369 $echo "$modename: you must specify an install program" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5370 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5371 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5372 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5373
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5374 if test -n "$prev"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5375 $echo "$modename: the \`$prev' option requires an argument" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5376 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5377 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5378 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5379
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5380 if test -z "$files"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5381 if test -z "$dest"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5382 $echo "$modename: no file or destination specified" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5383 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5384 $echo "$modename: you must specify a destination" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5385 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5386 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5387 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5388 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5389
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5390 # Strip any trailing slash from the destination.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5391 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5392
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5393 # Check to see that the destination is a directory.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5394 test -d "$dest" && isdir=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5395 if test "$isdir" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5396 destdir="$dest"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5397 destname=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5398 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5399 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5400 test "X$destdir" = "X$dest" && destdir=.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5401 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5402
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5403 # Not a directory, so check to see that there is only one file specified.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5404 set dummy $files
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5405 if test "$#" -gt 2; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5406 $echo "$modename: \`$dest' is not a directory" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5407 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5408 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5409 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5410 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5411 case $destdir in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5412 [\\/]* | [A-Za-z]:[\\/]*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5413 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5414 for file in $files; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5415 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5416 *.lo) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5417 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5418 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5419 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5420 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5421 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5422 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5423 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5424 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5425 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5426
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5427 # This variable tells wrapper scripts just to set variables rather
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5428 # than running their programs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5429 libtool_install_magic="$magic"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5430
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5431 staticlibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5432 future_libdirs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5433 current_libdirs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5434 for file in $files; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5435
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5436 # Do each installation.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5437 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5438 *.$libext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5439 # Do the static libraries later.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5440 staticlibs="$staticlibs $file"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5441 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5442
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5443 *.la)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5444 # Check to see that this really is a libtool archive.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5445 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5446 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5447 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5448 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5449 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5450 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5451
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5452 library_names=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5453 old_library=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5454 relink_command=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5455 # If there is no directory component, then add one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5456 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5457 */* | *\\*) . $file ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5458 *) . ./$file ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5459 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5460
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5461 # Add the libdir to current_libdirs if it is the destination.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5462 if test "X$destdir" = "X$libdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5463 case "$current_libdirs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5464 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5465 *) current_libdirs="$current_libdirs $libdir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5466 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5467 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5468 # Note the libdir as a future libdir.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5469 case "$future_libdirs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5470 *" $libdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5471 *) future_libdirs="$future_libdirs $libdir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5472 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5473 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5474
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5475 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5476 test "X$dir" = "X$file/" && dir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5477 dir="$dir$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5478
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5479 if test -n "$relink_command"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5480 # Determine the prefix the user has applied to our future dir.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5481 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5482
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5483 # Don't allow the user to place us outside of our expected
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5484 # location b/c this prevents finding dependent libraries that
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5485 # are installed to the same prefix.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5486 # At present, this check doesn't affect windows .dll's that
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5487 # are installed into $libdir/../bin (currently, that works fine)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5488 # but it's something to keep an eye on.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5489 if test "$inst_prefix_dir" = "$destdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5490 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5491 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5492 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5493
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5494 if test -n "$inst_prefix_dir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5495 # Stick the inst_prefix_dir data into the link command.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5496 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5497 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5498 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5499 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5500
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5501 $echo "$modename: warning: relinking \`$file'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5502 $show "$relink_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5503 if $run eval "$relink_command"; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5504 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5505 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5506 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5507 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5508 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5509
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5510 # See the names of the shared library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5511 set dummy $library_names
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5512 if test -n "$2"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5513 realname="$2"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5514 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5515 shift
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5516
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5517 srcname="$realname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5518 test -n "$relink_command" && srcname="$realname"T
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5519
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5520 # Install the shared library and build the symlinks.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5521 $show "$install_prog $dir/$srcname $destdir/$realname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5522 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5523 if test -n "$stripme" && test -n "$striplib"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5524 $show "$striplib $destdir/$realname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5525 $run eval "$striplib $destdir/$realname" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5526 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5527
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5528 if test "$#" -gt 0; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5529 # Delete the old symlinks, and create new ones.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5530 for linkname
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5531 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5532 if test "$linkname" != "$realname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5533 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5534 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5535 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5536 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5537 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5538
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5539 # Do each command in the postinstall commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5540 lib="$destdir/$realname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5541 cmds=$postinstall_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5542 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5543 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5544 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5545 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5546 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5547 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5548 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5549 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5550 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5551
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5552 # Install the pseudo-library for information purposes.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5553 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5554 instname="$dir/$name"i
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5555 $show "$install_prog $instname $destdir/$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5556 $run eval "$install_prog $instname $destdir/$name" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5557
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5558 # Maybe install the static library, too.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5559 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5560 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5561
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5562 *.lo)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5563 # Install (i.e. copy) a libtool object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5564
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5565 # Figure out destination file name, if it wasn't already specified.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5566 if test -n "$destname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5567 destfile="$destdir/$destname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5568 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5569 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5570 destfile="$destdir/$destfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5571 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5572
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5573 # Deduce the name of the destination old-style object file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5574 case $destfile in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5575 *.lo)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5576 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5577 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5578 *.$objext)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5579 staticdest="$destfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5580 destfile=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5581 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5582 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5583 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5584 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5585 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5586 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5587 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5588
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5589 # Install the libtool object if requested.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5590 if test -n "$destfile"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5591 $show "$install_prog $file $destfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5592 $run eval "$install_prog $file $destfile" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5593 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5594
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5595 # Install the old object if enabled.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5596 if test "$build_old_libs" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5597 # Deduce the name of the old-style object file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5598 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5599
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5600 $show "$install_prog $staticobj $staticdest"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5601 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5602 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5603 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5604 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5605
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5606 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5607 # Figure out destination file name, if it wasn't already specified.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5608 if test -n "$destname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5609 destfile="$destdir/$destname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5610 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5611 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5612 destfile="$destdir/$destfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5613 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5614
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5615 # If the file is missing, and there is a .exe on the end, strip it
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5616 # because it is most likely a libtool script we actually want to
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5617 # install
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5618 stripped_ext=""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5619 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5620 *.exe)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5621 if test ! -f "$file"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5622 file=`$echo $file|${SED} 's,.exe$,,'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5623 stripped_ext=".exe"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5624 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5625 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5626 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5627
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5628 # Do a test to see if this is really a libtool program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5629 case $host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5630 *cygwin*|*mingw*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5631 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5632 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5633 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5634 wrapper=$file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5635 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5636 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5637 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5638 notinst_deplibs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5639 relink_command=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5640
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5641 # To insure that "foo" is sourced, and not "foo.exe",
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5642 # finese the cygwin/MSYS system by explicitly sourcing "foo."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5643 # which disallows the automatic-append-.exe behavior.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5644 case $build in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5645 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5646 *) wrapperdot=${wrapper} ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5647 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5648 # If there is no directory component, then add one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5649 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5650 */* | *\\*) . ${wrapperdot} ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5651 *) . ./${wrapperdot} ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5652 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5653
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5654 # Check the variables that should have been set.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5655 if test -z "$notinst_deplibs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5656 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5657 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5658 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5659
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5660 finalize=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5661 for lib in $notinst_deplibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5662 # Check to see that each library is installed.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5663 libdir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5664 if test -f "$lib"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5665 # If there is no directory component, then add one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5666 case $lib in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5667 */* | *\\*) . $lib ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5668 *) . ./$lib ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5669 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5670 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5671 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5672 if test -n "$libdir" && test ! -f "$libfile"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5673 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5674 finalize=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5675 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5676 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5677
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5678 relink_command=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5679 # To insure that "foo" is sourced, and not "foo.exe",
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5680 # finese the cygwin/MSYS system by explicitly sourcing "foo."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5681 # which disallows the automatic-append-.exe behavior.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5682 case $build in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5683 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5684 *) wrapperdot=${wrapper} ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5685 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5686 # If there is no directory component, then add one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5687 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5688 */* | *\\*) . ${wrapperdot} ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5689 *) . ./${wrapperdot} ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5690 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5691
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5692 outputname=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5693 if test "$fast_install" = no && test -n "$relink_command"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5694 if test "$finalize" = yes && test -z "$run"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5695 tmpdir="/tmp"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5696 test -n "$TMPDIR" && tmpdir="$TMPDIR"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5697 tmpdir="$tmpdir/libtool-$$"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5698 save_umask=`umask`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5699 umask 0077
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5700 if $mkdir "$tmpdir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5701 umask $save_umask
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5702 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5703 umask $save_umask
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5704 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5705 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5706 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5707 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5708 outputname="$tmpdir/$file"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5709 # Replace the output file specification.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5710 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5711
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5712 $show "$relink_command"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5713 if $run eval "$relink_command"; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5714 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5715 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5716 ${rm}r "$tmpdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5717 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5718 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5719 file="$outputname"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5720 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5721 $echo "$modename: warning: cannot relink \`$file'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5722 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5723 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5724 # Install the binary that we compiled earlier.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5725 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5726 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5727 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5728
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5729 # remove .exe since cygwin /usr/bin/install will append another
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5730 # one anyways
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5731 case $install_prog,$host in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5732 */usr/bin/install*,*cygwin*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5733 case $file:$destfile in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5734 *.exe:*.exe)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5735 # this is ok
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5736 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5737 *.exe:*)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5738 destfile=$destfile.exe
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5739 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5740 *:*.exe)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5741 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5742 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5743 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5744 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5745 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5746 $show "$install_prog$stripme $file $destfile"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5747 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5748 test -n "$outputname" && ${rm}r "$tmpdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5749 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5750 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5751 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5752
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5753 for file in $staticlibs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5754 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5755
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5756 # Set up the ranlib parameters.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5757 oldlib="$destdir/$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5758
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5759 $show "$install_prog $file $oldlib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5760 $run eval "$install_prog \$file \$oldlib" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5761
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5762 if test -n "$stripme" && test -n "$old_striplib"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5763 $show "$old_striplib $oldlib"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5764 $run eval "$old_striplib $oldlib" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5765 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5766
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5767 # Do each command in the postinstall commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5768 cmds=$old_postinstall_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5769 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5770 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5771 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5772 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5773 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5774 $run eval "$cmd" || exit $?
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5775 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5776 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5777 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5778
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5779 if test -n "$future_libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5780 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5781 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5782
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5783 if test -n "$current_libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5784 # Maybe just do a dry run.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5785 test -n "$run" && current_libdirs=" -n$current_libdirs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5786 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5787 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5788 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5789 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5790 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5791
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5792 # libtool finish mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5793 finish)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5794 modename="$modename: finish"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5795 libdirs="$nonopt"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5796 admincmds=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5797
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5798 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5799 for dir
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5800 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5801 libdirs="$libdirs $dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5802 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5803
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5804 for libdir in $libdirs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5805 if test -n "$finish_cmds"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5806 # Do each command in the finish commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5807 cmds=$finish_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5808 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5809 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5810 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5811 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5812 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5813 $run eval "$cmd" || admincmds="$admincmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5814 $cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5815 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5816 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5817 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5818 if test -n "$finish_eval"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5819 # Do the single finish_eval.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5820 eval cmds=\"$finish_eval\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5821 $run eval "$cmds" || admincmds="$admincmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5822 $cmds"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5823 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5824 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5825 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5826
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5827 # Exit here if they wanted silent mode.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5828 test "$show" = : && exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5829
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5830 $echo "----------------------------------------------------------------------"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5831 $echo "Libraries have been installed in:"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5832 for libdir in $libdirs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5833 $echo " $libdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5834 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5835 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5836 $echo "If you ever happen to want to link against installed libraries"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5837 $echo "in a given directory, LIBDIR, you must either use libtool, and"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5838 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5839 $echo "flag during linking and do at least one of the following:"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5840 if test -n "$shlibpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5841 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5842 $echo " during execution"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5843 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5844 if test -n "$runpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5845 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5846 $echo " during linking"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5847 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5848 if test -n "$hardcode_libdir_flag_spec"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5849 libdir=LIBDIR
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5850 eval flag=\"$hardcode_libdir_flag_spec\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5851
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5852 $echo " - use the \`$flag' linker flag"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5853 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5854 if test -n "$admincmds"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5855 $echo " - have your system administrator run these commands:$admincmds"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5856 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5857 if test -f /etc/ld.so.conf; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5858 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5859 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5860 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5861 $echo "See any operating system documentation about shared libraries for"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5862 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5863 $echo "----------------------------------------------------------------------"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5864 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5865 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5866
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5867 # libtool execute mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5868 execute)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5869 modename="$modename: execute"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5870
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5871 # The first argument is the command name.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5872 cmd="$nonopt"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5873 if test -z "$cmd"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5874 $echo "$modename: you must specify a COMMAND" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5875 $echo "$help"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5876 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5877 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5878
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5879 # Handle -dlopen flags immediately.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5880 for file in $execute_dlfiles; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5881 if test ! -f "$file"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5882 $echo "$modename: \`$file' is not a file" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5883 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5884 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5885 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5886
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5887 dir=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5888 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5889 *.la)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5890 # Check to see that this really is a libtool archive.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5891 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5892 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5893 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5894 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5895 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5896 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5897
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5898 # Read the libtool library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5899 dlname=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5900 library_names=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5901
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5902 # If there is no directory component, then add one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5903 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5904 */* | *\\*) . $file ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5905 *) . ./$file ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5906 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5907
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5908 # Skip this library if it cannot be dlopened.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5909 if test -z "$dlname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5910 # Warn if it was a shared library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5911 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5912 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5913 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5914
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5915 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5916 test "X$dir" = "X$file" && dir=.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5917
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5918 if test -f "$dir/$objdir/$dlname"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5919 dir="$dir/$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5920 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5921 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5922 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5923 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5924 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5925
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5926 *.lo)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5927 # Just add the directory containing the .lo file.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5928 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5929 test "X$dir" = "X$file" && dir=.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5930 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5931
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5932 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5933 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5934 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5935 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5936 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5937
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5938 # Get the absolute pathname.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5939 absdir=`cd "$dir" && pwd`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5940 test -n "$absdir" && dir="$absdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5941
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5942 # Now add the directory to shlibpath_var.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5943 if eval "test -z \"\$$shlibpath_var\""; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5944 eval "$shlibpath_var=\"\$dir\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5945 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5946 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5947 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5948 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5949
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5950 # This variable tells wrapper scripts just to set shlibpath_var
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5951 # rather than running their programs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5952 libtool_execute_magic="$magic"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5953
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5954 # Check if any of the arguments is a wrapper script.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5955 args=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5956 for file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5957 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5958 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5959 -*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5960 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5961 # Do a test to see if this is really a libtool program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5962 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5963 # If there is no directory component, then add one.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5964 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5965 */* | *\\*) . $file ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5966 *) . ./$file ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5967 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5968
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5969 # Transform arg to wrapped name.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5970 file="$progdir/$program"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5971 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5972 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5973 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5974 # Quote arguments (to preserve shell metacharacters).
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5975 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5976 args="$args \"$file\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5977 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5978
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5979 if test -z "$run"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5980 if test -n "$shlibpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5981 # Export the shlibpath_var.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5982 eval "export $shlibpath_var"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5983 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5984
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5985 # Restore saved environment variables
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5986 if test "${save_LC_ALL+set}" = set; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5987 LC_ALL="$save_LC_ALL"; export LC_ALL
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5988 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5989 if test "${save_LANG+set}" = set; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5990 LANG="$save_LANG"; export LANG
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5991 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5992
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5993 # Now prepare to actually exec the command.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5994 exec_cmd="\$cmd$args"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5995 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5996 # Display what would be done.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5997 if test -n "$shlibpath_var"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5998 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
5999 $echo "export $shlibpath_var"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6000 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6001 $echo "$cmd$args"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6002 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6003 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6004 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6005
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6006 # libtool clean and uninstall mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6007 clean | uninstall)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6008 modename="$modename: $mode"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6009 rm="$nonopt"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6010 files=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6011 rmforce=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6012 exit_status=0
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6013
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6014 # This variable tells wrapper scripts just to set variables rather
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6015 # than running their programs.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6016 libtool_install_magic="$magic"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6017
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6018 for arg
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6019 do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6020 case $arg in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6021 -f) rm="$rm $arg"; rmforce=yes ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6022 -*) rm="$rm $arg" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6023 *) files="$files $arg" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6024 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6025 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6026
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6027 if test -z "$rm"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6028 $echo "$modename: you must specify an RM program" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6029 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6030 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6031 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6032
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6033 rmdirs=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6034
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6035 origobjdir="$objdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6036 for file in $files; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6037 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6038 if test "X$dir" = "X$file"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6039 dir=.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6040 objdir="$origobjdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6041 else
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6042 objdir="$dir/$origobjdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6043 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6044 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6045 test "$mode" = uninstall && objdir="$dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6046
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6047 # Remember objdir for removal later, being careful to avoid duplicates
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6048 if test "$mode" = clean; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6049 case " $rmdirs " in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6050 *" $objdir "*) ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6051 *) rmdirs="$rmdirs $objdir" ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6052 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6053 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6054
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6055 # Don't error if the file doesn't exist and rm -f was used.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6056 if (test -L "$file") >/dev/null 2>&1 \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6057 || (test -h "$file") >/dev/null 2>&1 \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6058 || test -f "$file"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6059 :
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6060 elif test -d "$file"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6061 exit_status=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6062 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6063 elif test "$rmforce" = yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6064 continue
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6065 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6066
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6067 rmfiles="$file"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6068
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6069 case $name in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6070 *.la)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6071 # Possibly a libtool archive, so verify it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6072 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6073 . $dir/$name
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6074
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6075 # Delete the libtool libraries and symlinks.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6076 for n in $library_names; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6077 rmfiles="$rmfiles $objdir/$n"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6078 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6079 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6080 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6081
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6082 if test "$mode" = uninstall; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6083 if test -n "$library_names"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6084 # Do each command in the postuninstall commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6085 cmds=$postuninstall_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6086 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6087 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6088 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6089 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6090 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6091 $run eval "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6092 if test "$?" -ne 0 && test "$rmforce" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6093 exit_status=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6094 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6095 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6096 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6097 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6098
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6099 if test -n "$old_library"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6100 # Do each command in the old_postuninstall commands.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6101 cmds=$old_postuninstall_cmds
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6102 save_ifs="$IFS"; IFS='~'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6103 for cmd in $cmds; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6104 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6105 eval cmd=\"$cmd\"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6106 $show "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6107 $run eval "$cmd"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6108 if test "$?" -ne 0 && test "$rmforce" != yes; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6109 exit_status=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6110 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6111 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6112 IFS="$save_ifs"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6113 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6114 # FIXME: should reinstall the best remaining shared library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6115 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6116 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6117 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6118
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6119 *.lo)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6120 # Possibly a libtool object, so verify it.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6121 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6122
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6123 # Read the .lo file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6124 . $dir/$name
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6125
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6126 # Add PIC object to the list of files to remove.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6127 if test -n "$pic_object" \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6128 && test "$pic_object" != none; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6129 rmfiles="$rmfiles $dir/$pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6130 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6131
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6132 # Add non-PIC object to the list of files to remove.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6133 if test -n "$non_pic_object" \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6134 && test "$non_pic_object" != none; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6135 rmfiles="$rmfiles $dir/$non_pic_object"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6136 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6137 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6138 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6139
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6140 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6141 if test "$mode" = clean ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6142 noexename=$name
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6143 case $file in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6144 *.exe)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6145 file=`$echo $file|${SED} 's,.exe$,,'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6146 noexename=`$echo $name|${SED} 's,.exe$,,'`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6147 # $file with .exe has already been added to rmfiles,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6148 # add $file without .exe
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6149 rmfiles="$rmfiles $file"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6150 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6151 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6152 # Do a test to see if this is a libtool program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6153 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6154 relink_command=
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6155 . $dir/$noexename
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6156
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6157 # note $name still contains .exe if it was in $file originally
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6158 # as does the version of $file that was added into $rmfiles
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6159 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6160 if test "$fast_install" = yes && test -n "$relink_command"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6161 rmfiles="$rmfiles $objdir/lt-$name"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6162 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6163 if test "X$noexename" != "X$name" ; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6164 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6165 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6166 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6167 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6168 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6169 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6170 $show "$rm $rmfiles"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6171 $run $rm $rmfiles || exit_status=1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6172 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6173 objdir="$origobjdir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6174
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6175 # Try to remove the ${objdir}s in the directories where we deleted files
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6176 for dir in $rmdirs; do
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6177 if test -d "$dir"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6178 $show "rmdir $dir"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6179 $run rmdir $dir >/dev/null 2>&1
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6180 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6181 done
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6182
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6183 exit $exit_status
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6184 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6185
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6186 "")
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6187 $echo "$modename: you must specify a MODE" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6188 $echo "$generic_help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6189 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6190 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6191 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6192
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6193 if test -z "$exec_cmd"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6194 $echo "$modename: invalid operation mode \`$mode'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6195 $echo "$generic_help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6196 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6197 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6198 fi # test -z "$show_help"
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6199
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6200 if test -n "$exec_cmd"; then
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6201 eval exec $exec_cmd
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6202 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6203 fi
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6204
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6205 # We need to display help for each of the modes.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6206 case $mode in
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6207 "") $echo \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6208 "Usage: $modename [OPTION]... [MODE-ARG]...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6209
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6210 Provide generalized library-building support services.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6211
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6212 --config show all configuration variables
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6213 --debug enable verbose shell tracing
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6214 -n, --dry-run display commands without modifying any files
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6215 --features display basic configuration information and exit
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6216 --finish same as \`--mode=finish'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6217 --help display this help message and exit
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6218 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6219 --quiet same as \`--silent'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6220 --silent don't print informational messages
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6221 --tag=TAG use configuration variables from tag TAG
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6222 --version print version information
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6223
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6224 MODE must be one of the following:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6225
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6226 clean remove files from the build directory
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6227 compile compile a source file into a libtool object
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6228 execute automatically set library path, then run a program
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6229 finish complete the installation of libtool libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6230 install install libraries or executables
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6231 link create a library or an executable
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6232 uninstall remove libraries from an installed directory
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6233
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6234 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6235 a more detailed description of MODE.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6236
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6237 Report bugs to <bug-libtool@gnu.org>."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6238 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6239 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6240
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6241 clean)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6242 $echo \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6243 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6244
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6245 Remove files from the build directory.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6246
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6247 RM is the name of the program to use to delete files associated with each FILE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6248 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6249 to RM.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6250
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6251 If FILE is a libtool library, object or program, all the files associated
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6252 with it are deleted. Otherwise, only FILE itself is deleted using RM."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6253 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6254
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6255 compile)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6256 $echo \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6257 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6258
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6259 Compile a source file into a libtool library object.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6260
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6261 This mode accepts the following additional options:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6262
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6263 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6264 -prefer-pic try to building PIC objects only
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6265 -prefer-non-pic try to building non-PIC objects only
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6266 -static always build a \`.o' file suitable for static linking
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6267
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6268 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6269 from the given SOURCEFILE.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6270
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6271 The output file name is determined by removing the directory component from
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6272 SOURCEFILE, then substituting the C source code suffix \`.c' with the
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6273 library object suffix, \`.lo'."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6274 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6275
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6276 execute)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6277 $echo \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6278 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6279
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6280 Automatically set library path, then run a program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6281
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6282 This mode accepts the following additional options:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6283
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6284 -dlopen FILE add the directory containing FILE to the library path
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6285
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6286 This mode sets the library path environment variable according to \`-dlopen'
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6287 flags.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6288
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6289 If any of the ARGS are libtool executable wrappers, then they are translated
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6290 into their corresponding uninstalled binary, and any of their required library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6291 directories are added to the library path.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6292
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6293 Then, COMMAND is executed, with ARGS as arguments."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6294 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6295
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6296 finish)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6297 $echo \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6298 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6299
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6300 Complete the installation of libtool libraries.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6301
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6302 Each LIBDIR is a directory that contains libtool libraries.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6303
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6304 The commands that this mode executes may require superuser privileges. Use
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6305 the \`--dry-run' option if you just want to see what would be executed."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6306 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6307
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6308 install)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6309 $echo \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6310 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6311
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6312 Install executables or libraries.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6313
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6314 INSTALL-COMMAND is the installation command. The first component should be
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6315 either the \`install' or \`cp' program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6316
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6317 The rest of the components are interpreted as arguments to that command (only
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6318 BSD-compatible install options are recognized)."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6319 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6320
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6321 link)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6322 $echo \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6323 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6324
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6325 Link object files or libraries together to form another library, or to
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6326 create an executable program.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6327
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6328 LINK-COMMAND is a command using the C compiler that you would use to create
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6329 a program from several object files.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6330
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6331 The following components of LINK-COMMAND are treated specially:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6332
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6333 -all-static do not do any dynamic linking at all
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6334 -avoid-version do not add a version suffix if possible
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6335 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6336 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6337 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6338 -export-symbols SYMFILE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6339 try to export only the symbols listed in SYMFILE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6340 -export-symbols-regex REGEX
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6341 try to export only the symbols matching REGEX
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6342 -LLIBDIR search LIBDIR for required installed libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6343 -lNAME OUTPUT-FILE requires the installed library libNAME
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6344 -module build a library that can dlopened
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6345 -no-fast-install disable the fast-install mode
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6346 -no-install link a not-installable executable
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6347 -no-undefined declare that a library does not refer to external symbols
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6348 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6349 -objectlist FILE Use a list of object files found in FILE to specify objects
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6350 -precious-files-regex REGEX
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6351 don't remove output files matching REGEX
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6352 -release RELEASE specify package release information
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6353 -rpath LIBDIR the created library will eventually be installed in LIBDIR
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6354 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6355 -static do not do any dynamic linking of libtool libraries
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6356 -version-info CURRENT[:REVISION[:AGE]]
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6357 specify library version info [each variable defaults to 0]
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6358
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6359 All other options (arguments beginning with \`-') are ignored.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6360
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6361 Every other argument is treated as a filename. Files ending in \`.la' are
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6362 treated as uninstalled libtool libraries, other files are standard or library
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6363 object files.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6364
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6365 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6366 only library objects (\`.lo' files) may be specified, and \`-rpath' is
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6367 required, except when creating a convenience library.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6368
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6369 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6370 using \`ar' and \`ranlib', or on Windows using \`lib'.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6371
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6372 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6373 is created, otherwise an executable program is created."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6374 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6375
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6376 uninstall)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6377 $echo \
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6378 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6379
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6380 Remove libraries from an installation directory.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6381
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6382 RM is the name of the program to use to delete files associated with each FILE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6383 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6384 to RM.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6385
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6386 If FILE is a libtool library, all the files associated with it are deleted.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6387 Otherwise, only FILE itself is deleted using RM."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6388 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6389
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6390 *)
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6391 $echo "$modename: invalid operation mode \`$mode'" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6392 $echo "$help" 1>&2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6393 exit $EXIT_FAILURE
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6394 ;;
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6395 esac
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6396
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6397 $echo
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6398 $echo "Try \`$modename --help' for more information about other modes."
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6399
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6400 exit $EXIT_SUCCESS
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6401
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6402 # The TAGs below are defined such that we never get into a situation
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6403 # in which we disable both kinds of libraries. Given conflicting
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6404 # choices, we go for a static library, that is the most portable,
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6405 # since we can't tell whether shared libraries were disabled because
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6406 # the user asked for that or because the platform doesn't support
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6407 # them. This is particularly important on AIX, because we don't
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6408 # support having both static and shared libraries enabled at the same
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6409 # time on that platform, so we default to a shared-only configuration.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6410 # If a disable-shared tag is given, we'll fallback to a static-only
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6411 # configuration. But we'll never go from static-only to shared-only.
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6412
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6413 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6414 build_libtool_libs=no
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6415 build_old_libs=yes
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6416 # ### END LIBTOOL TAG CONFIG: disable-shared
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6417
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6418 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6419 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6420 # ### END LIBTOOL TAG CONFIG: disable-static
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6421
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6422 # Local Variables:
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6423 # mode:shell-script
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6424 # sh-indentation:2
9978e29c4d71 move to autoconf/automake/docbook
carl
parents:
diff changeset
6425 # End: