annotate acsupport/ltmain.sh @ 292:918b1f4e9403

CDL for SG list size used by all drivers.
author gthomas
date Wed, 14 Aug 2002 13:20:13 +0000
parents f58bc1b2c2bc
children a2fb80f5315f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1 # ltmain.sh - Provide generalized library-building support services.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
4 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
5 # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
6 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
7 # This program is free software; you can redistribute it and/or modify
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
8 # it under the terms of the GNU General Public License as published by
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
9 # the Free Software Foundation; either version 2 of the License, or
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
10 # (at your option) any later version.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
11 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
12 # This program is distributed in the hope that it will be useful, but
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
15 # General Public License for more details.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
16 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
17 # You should have received a copy of the GNU General Public License
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
18 # along with this program; if not, write to the Free Software
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
20 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
21 # As a special exception to the GNU General Public License, if you
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
22 # distribute this file as part of a program that contains a
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
23 # configuration script generated by Autoconf, you may include it under
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
24 # the same distribution terms that you use for the rest of that program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
25
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
26 # Check that we have a working $echo.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
27 if test "X$1" = X--no-reexec; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
28 # Discard the --no-reexec flag, and continue.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
29 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
30 elif test "X$1" = X--fallback-echo; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
31 # used as fallback echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
32 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
33 cat <<EOF
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
34 $*
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
35 EOF
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
36 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
37 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
38 # Yippee, $echo works!
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
39 :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
40 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
41 # Restart under the correct shell, and then maybe $echo will work.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
42 exec $SHELL "$0" --no-reexec ${1+"$@"}
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
43 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
44
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
45 # The name of this program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
46 progname=`$echo "$0" | sed 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
47 modename="$progname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
48
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
49 # Constants.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
50 PROGRAM=ltmain.sh
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
51 PACKAGE=libtool
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
52 VERSION=1.2f
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
53 TIMESTAMP=" (1.385 1999/03/15 17:24:54)"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
54
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
55 default_mode=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
56 help="Try \`$progname --help' for more information."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
57 magic="%%%MAGIC variable%%%"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
58 mkdir="mkdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
59 mv="mv -f"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
60 rm="rm -f"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
61
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
62 # Sed substitution that helps us do robust quoting. It backslashifies
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
63 # metacharacters that are still active within double-quoted strings.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
64 Xsed='sed -e 1s/^X//'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
65 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
66 SP2NL='tr \040 \012'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
67 NL2SP='tr \012 \040'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
68
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
69 # NLS nuisances.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
70 # Only set LANG and LC_ALL to C if already set.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
71 # These must not be set unconditionally because not all systems understand
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
72 # e.g. LANG=C (notably SCO).
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
73 # We save the old values to restore during execute mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
74 if test "${LC_ALL+set}" = set; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
75 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
76 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
77 if test "${LANG+set}" = set; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
78 save_LANG="$LANG"; LANG=C; export LANG
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
79 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
80
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
81 if test "$LTCONFIG_VERSION" != "$VERSION"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
82 echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
83 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
84 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
85 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
86
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
87 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
88 echo "$modename: not configured to build any kind of library" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
89 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
90 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
91 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
92
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
93 # Global variables.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
94 mode=$default_mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
95 nonopt=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
96 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
97 prevopt=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
98 run=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
99 show="$echo"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
100 show_help=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
101 execute_dlfiles=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
102 lo2o="s/\\.lo\$/.${objext}/"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
103
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
104 # Parse our command line options once, thoroughly.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
105 while test $# -gt 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
106 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
107 arg="$1"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
108 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
109
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
110 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
111 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
112 *) optarg= ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
113 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
114
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
115 # If the previous option needs an argument, assign it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
116 if test -n "$prev"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
117 case "$prev" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
118 execute_dlfiles)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
119 eval "$prev=\"\$$prev \$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
120 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
121 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
122 eval "$prev=\$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
123 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
124 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
125
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
126 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
127 prevopt=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
128 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
129 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
130
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
131 # Have we seen a non-optional argument yet?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
132 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
133 --help)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
134 show_help=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
135 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
136
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
137 --version)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
138 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
139 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
140 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
141
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
142 --config)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
143 sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
144 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
145 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
146
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
147 --debug)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
148 echo "$progname: enabling shell trace mode"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
149 set -x
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
150 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
151
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
152 --dry-run | -n)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
153 run=:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
154 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
155
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
156 --features)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
157 echo "host: $host"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
158 if test "$build_libtool_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
159 echo "enable shared libraries"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
160 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
161 echo "disable shared libraries"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
162 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
163 if test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
164 echo "enable static libraries"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
165 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
166 echo "disable static libraries"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
167 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
168 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
169 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
170
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
171 --finish) mode="finish" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
172
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
173 --mode) prevopt="--mode" prev=mode ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
174 --mode=*) mode="$optarg" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
175
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
176 --quiet | --silent)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
177 show=:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
178 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
179
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
180 -dlopen)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
181 prevopt="-dlopen"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
182 prev=execute_dlfiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
183 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
184
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
185 -*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
186 $echo "$modename: unrecognized option \`$arg'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
187 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
188 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
189 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
190
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
191 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
192 nonopt="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
193 break
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
194 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
195 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
196 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
197
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
198 if test -n "$prevopt"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
199 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
200 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
201 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
202 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
203
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
204 if test -z "$show_help"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
205
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
206 # Infer the operation mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
207 if test -z "$mode"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
208 case "$nonopt" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
209 *cc | *++ | gcc* | *-gcc*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
210 mode=link
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
211 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
212 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
213 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
214 -c)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
215 mode=compile
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
216 break
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
217 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
218 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
219 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
220 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
221 *db | *dbx | *strace | *truss)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
222 mode=execute
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
223 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
224 *install*|cp|mv)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
225 mode=install
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
226 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
227 *rm)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
228 mode=uninstall
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
229 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
230 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
231 # If we have no mode, but dlfiles were specified, then do execute mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
232 test -n "$execute_dlfiles" && mode=execute
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
233
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
234 # Just use the default operation mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
235 if test -z "$mode"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
236 if test -n "$nonopt"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
237 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
238 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
239 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
240 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
241 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
242 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
243 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
244 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
245
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
246 # Only execute mode is allowed to have -dlopen flags.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
247 if test -n "$execute_dlfiles" && test "$mode" != execute; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
248 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
249 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
250 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
251 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
252
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
253 # Change the help message to a mode-specific one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
254 generic_help="$help"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
255 help="Try \`$modename --help --mode=$mode' for more information."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
256
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
257 # These modes are in order of execution frequency so that they run quickly.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
258 case "$mode" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
259 # libtool compile mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
260 compile)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
261 modename="$modename: compile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
262 # Get the compilation command and the source file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
263 base_compile=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
264 lastarg=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
265 srcfile="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
266 suppress_output=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
267
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
268 user_target=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
269 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
270 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
271 # Accept any command-line options.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
272 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
273 -o)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
274 if test "$user_target" != "no"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
275 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
276 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
277 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
278 user_target=next
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
279 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
280
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
281 -static)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
282 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
283 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
284 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
285 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
286
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
287 case "$user_target" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
288 next)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
289 # The next one is the -o target name
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
290 user_target=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
291 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
292 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
293 yes)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
294 # We got the output file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
295 user_target=set
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
296 libobj="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
297 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
298 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
299 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
300
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
301 # Accept the current argument as the source file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
302 lastarg="$srcfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
303 srcfile="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
304
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
305 # Aesthetically quote the previous argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
306
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
307 # Backslashify any backslashes, double quotes, and dollar signs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
308 # These are the only characters that are still specially
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
309 # interpreted inside of double-quoted scrings.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
310 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
311
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
312 # Double-quote args containing other shell metacharacters.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
313 # Many Bourne shells cannot handle close brackets correctly in scan
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
314 # sets, so we specify it separately.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
315 case "$lastarg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
316 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
317 lastarg="\"$lastarg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
318 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
319 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
320
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
321 # Add the previous argument to base_compile.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
322 if test -z "$base_compile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
323 base_compile="$lastarg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
324 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
325 base_compile="$base_compile $lastarg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
326 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
327 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
328
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
329 case "$user_target" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
330 set)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
331 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
332 no)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
333 # Get the name of the library object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
334 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
335 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
336 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
337 $echo "$modename: you must specify a target with \`-o'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
338 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
339 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
340 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
341
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
342 # Recognize several different file suffixes.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
343 # If the user specifies -o file.o, it is replaced with file.lo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
344 xform='[cCFSfmso]'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
345 case "$libobj" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
346 *.ada) xform=ada ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
347 *.adb) xform=adb ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
348 *.ads) xform=ads ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
349 *.asm) xform=asm ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
350 *.c++) xform=c++ ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
351 *.cc) xform=cc ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
352 *.cpp) xform=cpp ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
353 *.cxx) xform=cxx ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
354 *.f90) xform=f90 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
355 *.for) xform=for ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
356 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
357
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
358 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
359
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
360 case "$libobj" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
361 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
362 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
363 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
364 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
365 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
366 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
367
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
368 if test -z "$base_compile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
369 $echo "$modename: you must specify a compilation command" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
370 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
371 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
372 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
373
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
374 # Delete any leftover library objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
375 if test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
376 removelist="$obj $libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
377 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
378 removelist="$libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
379 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
380
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
381 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
382 trap "$run $rm $removelist; exit 1" 1 2 15
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
383
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
384 # Calculate the filename of the output object if compiler does
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
385 # not support -o with -c
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
386 if test "$compiler_c_o" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
387 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
388 lockfile="$output_obj.lock"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
389 removelist="$removelist $output_obj $lockfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
390 trap "$run $rm $removelist; exit 1" 1 2 15
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
391 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
392 need_locks=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
393 lockfile=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
394 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
395
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
396 # Lock this critical section if it is needed
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
397 # We use this script file to make the link, it avoids creating a new file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
398 if test "$need_locks" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
399 until ln "$0" "$lockfile" 2>/dev/null; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
400 $show "Waiting for $lockfile to be removed"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
401 sleep 2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
402 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
403 elif test "$need_locks" = warn; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
404 if test -f "$lockfile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
405 echo "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
406 *** ERROR, $lockfile exists and contains:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
407 `cat $lockfile 2>/dev/null`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
408
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
409 This indicates that another process is trying to use the same
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
410 temporary object file, and libtool could not work around it because
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
411 your compiler does not support \`-c' and \`-o' together. If you
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
412 repeat this compilation, it may succeed, by chance, but you had better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
413 avoid parallel builds (make -j) in this platform, or get a better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
414 compiler."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
415
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
416 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
417 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
418 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
419 echo $srcfile > "$lockfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
420 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
421
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
422 if test -n "$fix_srcfile_path"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
423 eval srcfile=\"$fix_srcfile_path\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
424 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
425
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
426 # Only build a PIC object if we are building libtool libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
427 if test "$build_libtool_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
428 # Without this assignment, base_compile gets emptied.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
429 fbsd_hideous_sh_bug=$base_compile
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
430
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
431 # All platforms use -DPIC, to notify preprocessed assembler code.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
432 command="$base_compile $pic_flag -DPIC $srcfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
433 if test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
434 lo_libobj="$libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
435 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
436 if test "X$dir" = "X$libobj"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
437 dir="$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
438 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
439 dir="$dir/$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
440 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
441 libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
442
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
443 if test -d "$dir"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
444 $show "$rm $libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
445 $run $rm $libobj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
446 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
447 $show "$mkdir $dir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
448 $run $mkdir $dir
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
449 status=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
450 if test $status -ne 0 && test ! -d $dir; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
451 exit $status
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
452 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
453 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
454 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
455 if test "$compiler_o_lo" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
456 output_obj="$libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
457 command="$command -o $output_obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
458 elif test "$compiler_c_o" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
459 output_obj="$obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
460 command="$command -o $output_obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
461 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
462
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
463 $show "$command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
464 if $run eval "$command"; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
465 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
466 test -n "$output_obj" && $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
467 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
468 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
469
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
470 if test "$need_locks" = warn &&
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
471 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
472 echo "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
473 *** ERROR, $lockfile contains:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
474 `cat $lockfile 2>/dev/null`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
475
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
476 but it should contain:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
477 $srcfile
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
478
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
479 This indicates that another process is trying to use the same
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
480 temporary object file, and libtool could not work around it because
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
481 your compiler does not support \`-c' and \`-o' together. If you
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
482 repeat this compilation, it may succeed, by chance, but you had better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
483 avoid parallel builds (make -j) in this platform, or get a better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
484 compiler."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
485
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
486 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
487 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
488 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
489
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
490 # Just move the object if needed, then go on to compile the next one
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
491 if test x"$output_obj" != x"$libobj"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
492 $show "$mv $output_obj $libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
493 if $run $mv $output_obj $libobj; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
494 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
495 error=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
496 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
497 exit $error
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
498 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
499 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
500
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
501 # If we have no pic_flag, then copy the object into place and finish.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
502 if test -z "$pic_flag" && test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
503 # Rename the .lo from within objdir to obj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
504 if test -f $obj; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
505 $show $rm $obj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
506 $run $rm $obj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
507 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
508
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
509 $show "$mv $libobj $obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
510 if $run $mv $libobj $obj; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
511 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
512 error=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
513 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
514 exit $error
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
515 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
516
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
517 # Now arrange that obj and lo_libobj become the same file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
518 $show "$LN_S $obj $lo_libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
519 if $run $LN_S $obj $lo_libobj; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
520 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
521 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
522 error=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
523 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
524 exit $error
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
525 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
526 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
527
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
528 # Allow error messages only from the first compilation.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
529 suppress_output=' >/dev/null 2>&1'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
530 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
531
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
532 # Only build a position-dependent object if we build old libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
533 if test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
534 command="$base_compile $srcfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
535 if test "$compiler_c_o" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
536 command="$command -o $obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
537 output_obj="$obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
538 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
539
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
540 # Suppress compiler output if we already did a PIC compilation.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
541 command="$command$suppress_output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
542 $show "$command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
543 if $run eval "$command"; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
544 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
545 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
546 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
547 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
548
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
549 if test "$need_locks" = warn &&
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
550 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
551 echo "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
552 *** ERROR, $lockfile contains:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
553 `cat $lockfile 2>/dev/null`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
554
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
555 but it should contain:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
556 $srcfile
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
557
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
558 This indicates that another process is trying to use the same
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
559 temporary object file, and libtool could not work around it because
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
560 your compiler does not support \`-c' and \`-o' together. If you
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
561 repeat this compilation, it may succeed, by chance, but you had better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
562 avoid parallel builds (make -j) in this platform, or get a better
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
563 compiler."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
564
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
565 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
566 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
567 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
568
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
569 # Just move the object if needed
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
570 if test x"$output_obj" != x"$obj"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
571 $show "$mv $output_obj $obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
572 if $run $mv $output_obj $obj; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
573 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
574 error=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
575 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
576 exit $error
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
577 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
578 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
579
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
580 # Create an invalid libtool object if no PIC, so that we do not
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
581 # accidentally link it into a program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
582 if test "$build_libtool_libs" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
583 $show "echo timestamp > $libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
584 $run eval "echo timestamp > \$libobj" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
585 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
586 # Move the .lo from within objdir
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
587 $show "$mv $libobj $lo_libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
588 if $run $mv $libobj $lo_libobj; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
589 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
590 error=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
591 $run $rm $removelist
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
592 exit $error
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
593 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
594 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
595 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
596
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
597 # Unlock the critical section if it was locked
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
598 if test "$need_locks" != no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
599 $rm "$lockfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
600 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
601
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
602 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
603 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
604
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
605 # libtool link mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
606 link)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
607 modename="$modename: link"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
608 C_compiler="$CC" # save it, to compile generated C sources
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
609 CC="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
610 case "$host" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
611 *-*-cygwin* | *-*-mingw* | *-*-os2*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
612 # It is impossible to link a dll without this setting, and
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
613 # we shouldn't force the makefile maintainer to figure out
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
614 # which system we are compiling for in order to pass an extra
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
615 # flag for every libtool invokation.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
616 # allow_undefined=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
617
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
618 # FIXME: Unfortunately, there are problems with the above when trying
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
619 # to make a dll which has undefined symbols, in which case not
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
620 # even a static library is built. For now, we need to specify
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
621 # -no-undefined on the libtool link line when we can be certain
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
622 # that all symbols are satisfied, otherwise we get a static library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
623 allow_undefined=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
624
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
625 # This is a source program that is used to create dlls on Windows
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
626 # Don't remove nor modify the starting and closing comments
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
627 # /* ltdll.c starts here */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
628 # #define WIN32_LEAN_AND_MEAN
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
629 # #include <windows.h>
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
630 # #undef WIN32_LEAN_AND_MEAN
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
631 # #include <stdio.h>
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
632 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
633 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
634 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
635 # #include <cygwin/cygwin_dll.h>
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
636 # DECLARE_CYGWIN_DLL( DllMain );
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
637 # HINSTANCE __hDllInstance_base;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
638 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
639 # BOOL APIENTRY
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
640 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
641 # {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
642 # __hDllInstance_base = hInst;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
643 # return TRUE;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
644 # }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
645 # /* ltdll.c ends here */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
646 # This is a source program that is used to create import libraries
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
647 # on Windows for dlls which lack them. Don't remove nor modify the
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
648 # starting and closing comments
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
649 # /* impgen.c starts here */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
650 # /* Copyright (C) 1999 Free Software Foundation, Inc.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
651 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
652 # This file is part of GNU libtool.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
653 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
654 # This program is free software; you can redistribute it and/or modify
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
655 # it under the terms of the GNU General Public License as published by
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
656 # the Free Software Foundation; either version 2 of the License, or
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
657 # (at your option) any later version.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
658 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
659 # This program is distributed in the hope that it will be useful,
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
660 # but WITHOUT ANY WARRANTY; without even the implied warranty of
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
661 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
662 # GNU General Public License for more details.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
663 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
664 # You should have received a copy of the GNU General Public License
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
665 # along with this program; if not, write to the Free Software
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
666 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
667 # */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
668 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
669 # #include <stdio.h> /* for printf() */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
670 # #include <unistd.h> /* for open(), lseek(), read() */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
671 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
672 # #include <string.h> /* for strdup() */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
673 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
674 # static unsigned int
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
675 # pe_get16 (fd, offset)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
676 # int fd;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
677 # int offset;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
678 # {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
679 # unsigned char b[2];
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
680 # lseek (fd, offset, SEEK_SET);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
681 # read (fd, b, 2);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
682 # return b[0] + (b[1]<<8);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
683 # }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
684 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
685 # static unsigned int
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
686 # pe_get32 (fd, offset)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
687 # int fd;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
688 # int offset;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
689 # {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
690 # unsigned char b[4];
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
691 # lseek (fd, offset, SEEK_SET);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
692 # read (fd, b, 4);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
693 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
694 # }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
695 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
696 # static unsigned int
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
697 # pe_as32 (ptr)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
698 # void *ptr;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
699 # {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
700 # unsigned char *b = ptr;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
701 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
702 # }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
703 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
704 # int
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
705 # main (argc, argv)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
706 # int argc;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
707 # char *argv[];
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
708 # {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
709 # int dll;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
710 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
711 # unsigned long export_rva, export_size, nsections, secptr, expptr;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
712 # unsigned long name_rvas, nexp;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
713 # unsigned char *expdata, *erva;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
714 # char *filename, *dll_name;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
715 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
716 # filename = argv[1];
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
717 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
718 # dll = open(filename, O_RDONLY|O_BINARY);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
719 # if (!dll)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
720 # return 1;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
721 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
722 # dll_name = filename;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
723 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
724 # for (i=0; filename[i]; i++)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
725 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
726 # dll_name = filename + i +1;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
727 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
728 # pe_header_offset = pe_get32 (dll, 0x3c);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
729 # opthdr_ofs = pe_header_offset + 4 + 20;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
730 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
731 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
732 # if (num_entries < 1) /* no exports */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
733 # return 1;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
734 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
735 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
736 # export_size = pe_get32 (dll, opthdr_ofs + 100);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
737 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
738 # secptr = (pe_header_offset + 4 + 20 +
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
739 # pe_get16 (dll, pe_header_offset + 4 + 16));
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
740 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
741 # expptr = 0;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
742 # for (i = 0; i < nsections; i++)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
743 # {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
744 # char sname[8];
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
745 # unsigned long secptr1 = secptr + 40 * i;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
746 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
747 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
748 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
749 # lseek(dll, secptr1, SEEK_SET);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
750 # read(dll, sname, 8);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
751 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
752 # {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
753 # expptr = fptr + (export_rva - vaddr);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
754 # if (export_rva + export_size > vaddr + vsize)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
755 # export_size = vsize - (export_rva - vaddr);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
756 # break;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
757 # }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
758 # }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
759 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
760 # expdata = (unsigned char*)malloc(export_size);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
761 # lseek (dll, expptr, SEEK_SET);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
762 # read (dll, expdata, export_size);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
763 # erva = expdata - export_rva;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
764 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
765 # nexp = pe_as32 (expdata+24);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
766 # name_rvas = pe_as32 (expdata+32);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
767 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
768 # printf ("EXPORTS\n");
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
769 # for (i = 0; i<nexp; i++)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
770 # {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
771 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
772 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
773 # }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
774 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
775 # return 0;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
776 # }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
777 # /* impgen.c ends here */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
778 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
779 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
780 allow_undefined=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
781 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
782 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
783 compile_command="$CC"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
784 finalize_command="$CC"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
785
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
786 compile_rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
787 finalize_rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
788 compile_shlibpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
789 finalize_shlibpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
790 convenience=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
791 old_convenience=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
792 deplibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
793 linkopts=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
794
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
795 if test -n "$shlibpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
796 # get the directories listed in $shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
797 eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
798 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
799 lib_search_path=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
800 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
801 # now prepend the system-specific ones
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
802 eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
803 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
804
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
805 avoid_version=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
806 dlfiles=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
807 dlprefiles=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
808 dlself=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
809 export_dynamic=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
810 export_symbols=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
811 export_symbols_regex=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
812 generated=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
813 libobjs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
814 link_against_libtool_libs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
815 ltlibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
816 module=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
817 objs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
818 preload=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
819 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
820 prevarg=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
821 release=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
822 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
823 xrpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
824 perm_rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
825 temp_rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
826 thread_safe=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
827 vinfo=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
828
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
829 # We need to know -static, to get the right output filenames.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
830 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
831 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
832 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
833 -all-static | -static)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
834 if test "X$arg" = "X-all-static" && test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
835 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
836 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
837 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
838 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
839 break
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
840 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
841 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
842 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
843
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
844 # See if our shared archives depend on static archives.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
845 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
846
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
847 # Go through the arguments, transforming them on the way.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
848 while test $# -gt 0; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
849 arg="$1"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
850 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
851
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
852 # If the previous option needs an argument, assign it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
853 if test -n "$prev"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
854 case "$prev" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
855 output)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
856 compile_command="$compile_command @OUTPUT@"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
857 finalize_command="$finalize_command @OUTPUT@"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
858 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
859 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
860
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
861 case "$prev" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
862 dlfiles|dlprefiles)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
863 if test "$preload" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
864 # Add the symbol object into the linking commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
865 compile_command="$compile_command @SYMFILE@"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
866 finalize_command="$finalize_command @SYMFILE@"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
867 preload=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
868 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
869 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
870 *.la | *.lo) ;; # We handle these cases below.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
871 self)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
872 if test "$prev" = dlprefiles; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
873 dlself=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
874 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
875 dlself=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
876 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
877 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
878 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
879 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
880 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
881 dlprefiles="$dlprefiles $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
882 test "$prev" = dlfiles && dlfiles="$dlfiles $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
883 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
884 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
885 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
886 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
887 expsyms)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
888 export_symbols="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
889 if test ! -f "$arg"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
890 $echo "$modename: symbol file \`$arg' does not exist"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
891 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
892 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
893 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
894 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
895 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
896 expsyms_regex)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
897 export_symbols_regex="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
898 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
899 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
900 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
901 release)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
902 release="-$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
903 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
904 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
905 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
906 rpath)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
907 rpath="$rpath $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
908 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
909 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
910 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
911 xrpath)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
912 xrpath="$xrpath $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
913 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
914 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
915 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
916 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
917 eval "$prev=\"\$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
918 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
919 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
920 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
921 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
922 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
923
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
924 prevarg="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
925
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
926 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
927 -all-static)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
928 if test -n "$link_static_flag"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
929 compile_command="$compile_command $link_static_flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
930 finalize_command="$finalize_command $link_static_flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
931 dlopen_self=$dlopen_self_static
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
932 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
933 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
934 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
935
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
936 -allow-undefined)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
937 # FIXME: remove this flag sometime in the future.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
938 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
939 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
940 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
941
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
942 -avoid-version)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
943 avoid_version=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
944 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
945 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
946
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
947 -dlopen)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
948 prev=dlfiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
949 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
950 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
951
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
952 -dlpreopen)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
953 prev=dlprefiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
954 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
955 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
956
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
957 -export-dynamic)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
958 if test "$export_dynamic" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
959 export_dynamic=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
960 if test -n "$export_dynamic_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
961 eval arg=\"$export_dynamic_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
962 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
963 arg=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
964 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
965 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
966 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
967
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
968 -export-symbols | -export-symbols-regex)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
969 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
970 $echo "$modename: cannot have more than one -exported-symbols"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
971 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
972 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
973 if test "$arg" = "-export-symbols"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
974 prev=expsyms
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
975 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
976 prev=expsyms_regex
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
977 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
978 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
979 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
980
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
981 -L*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
982 dir=`$echo "X$arg" | $Xsed -e 's%^-L\(.*\)$%\1%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
983 case "$dir" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
984 /* | [A-Za-z]:[/\\]*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
985 # Add the corresponding hardcode_libdir_flag, if it is not identical.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
986 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
987 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
988 $echo "$modename: \`-L$dir' cannot specify a relative directory" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
989 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
990 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
991 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
992 case " $deplibs " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
993 *" $arg "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
994 *) deplibs="$deplibs $arg";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
995 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
996 case " $lib_search_path " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
997 *" $dir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
998 *) lib_search_path="$lib_search_path $dir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
999 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1000 case "$host" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1001 *-*-cygwin* | *-*-mingw* | *-*-os2*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1002 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1003 case ":$dllsearchpath:" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1004 ::) dllsearchpath="$dllsearchdir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1005 *":$dllsearchdir:"*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1006 *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1007 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1008 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1009 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1010 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1011
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1012 -l*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1013 deplibs="$deplibs $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1014 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1015
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1016 -module)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1017 if test "$module" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1018 module=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1019 if test -n "$export_dynamic_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1020 eval arg=\"$export_dynamic_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1021 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1022 arg=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1023 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1024 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1025 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1026
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1027 -no-undefined)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1028 allow_undefined=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1029 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1030 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1031
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1032 -o) prev=output ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1033
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1034 -release)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1035 prev=release
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1036 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1037 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1038
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1039 -rpath)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1040 prev=rpath
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1041 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1042 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1043
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1044 -R)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1045 prev=xrpath
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1046 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1047 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1048
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1049 -R*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1050 xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1051 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1052 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1053
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1054 -static)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1055 # If we have no pic_flag, then this is the same as -all-static.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1056 if test -z "$pic_flag" && test -n "$link_static_flag"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1057 compile_command="$compile_command $link_static_flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1058 finalize_command="$finalize_command $link_static_flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1059 dlopen_self=$dlopen_self_static
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1060 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1061 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1062 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1063
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1064 -thread-safe)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1065 thread_safe=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1066 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1067 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1068
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1069 -version-info)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1070 prev=vinfo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1071 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1072 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1073
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1074 # Some other compiler flag.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1075 -* | +*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1076 # Unknown arguments in both finalize_command and compile_command need
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1077 # to be aesthetically quoted because they are evaled later.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1078 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1079 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1080 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1081 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1082 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1083 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1084 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1085
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1086 *.o | *.obj | *.a | *.lib)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1087 # A standard object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1088 objs="$objs $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1089 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1090
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1091 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1092 # A library object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1093 if test "$prev" = dlfiles; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1094 dlfiles="$dlfiles $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1095 if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1096 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1097 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1098 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1099 # If libtool objects are unsupported, then we need to preload.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1100 prev=dlprefiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1101 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1102 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1103
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1104 if test "$prev" = dlprefiles; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1105 # Preload the old-style object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1106 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1107 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1108 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1109 libobjs="$libobjs $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1110 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1111
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1112 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1113 # A libtool-controlled library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1114
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1115 dlname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1116 libdir=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1117 library_names=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1118 old_library=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1119
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1120 # Check to see that this really is a libtool archive.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1121 if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1122 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1123 $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1124 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1125 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1126
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1127 # If the library was installed with an old release of libtool,
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1128 # it will not redefine variable installed.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1129 installed=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1130
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1131 # If there is no directory component, then add one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1132 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1133 */* | *\\*) . $arg ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1134 *) . ./$arg ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1135 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1136
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1137 # Get the name of the library we link against.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1138 linklib=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1139 for l in $old_library $library_names; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1140 linklib="$l"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1141 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1142
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1143 if test -z "$linklib"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1144 $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1145 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1146 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1147
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1148 # Find the relevant object directory and library name.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1149 name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1150
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1151 if test "X$installed" = Xyes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1152 dir="$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1153 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1154 dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1155 if test "X$dir" = "X$arg"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1156 dir="$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1157 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1158 dir="$dir/$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1159 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1160 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1161
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1162 if test -n "$dependency_libs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1163 # Extract -R from dependency_libs
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1164 temp_deplibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1165 for deplib in $dependency_libs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1166 case "$deplib" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1167 -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1168 case " $rpath $xrpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1169 *" $temp_xrpath "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1170 *) xrpath="$xrpath $temp_xrpath";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1171 esac;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1172 -L*) case "$compile_command $temp_deplibs " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1173 *" $deplib "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1174 *) temp_deplibs="$temp_deplibs $deplib";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1175 esac;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1176 *) temp_deplibs="$temp_deplibs $deplib";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1177 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1178 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1179 dependency_libs="$temp_deplibs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1180 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1181
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1182 if test -z "$libdir"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1183 # It is a libtool convenience library, so add in its objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1184 convenience="$convenience $dir/$old_library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1185 old_convenience="$old_convenience $dir/$old_library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1186 deplibs="$deplibs$dependency_libs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1187 compile_command="$compile_command $dir/$old_library$dependency_libs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1188 finalize_command="$finalize_command $dir/$old_library$dependency_libs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1189 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1190 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1191
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1192 # This library was specified with -dlopen.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1193 if test "$prev" = dlfiles; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1194 dlfiles="$dlfiles $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1195 if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1196 # If there is no dlname, no dlopen support or we're linking statically,
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1197 # we need to preload.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1198 prev=dlprefiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1199 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1200 # We should not create a dependency on this library, but we
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1201 # may need any libraries it requires.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1202 compile_command="$compile_command$dependency_libs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1203 finalize_command="$finalize_command$dependency_libs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1204 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1205 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1206 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1207 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1208
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1209 # The library was specified with -dlpreopen.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1210 if test "$prev" = dlprefiles; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1211 # Prefer using a static library (so that no silly _DYNAMIC symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1212 # are required to link).
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1213 if test -n "$old_library"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1214 dlprefiles="$dlprefiles $dir/$old_library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1215 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1216 dlprefiles="$dlprefiles $dir/$linklib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1217 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1218 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1219 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1220
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1221 if test "$build_libtool_libs" = yes && test -n "$library_names"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1222 link_against_libtool_libs="$link_against_libtool_libs $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1223 if test -n "$shlibpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1224 # Make sure the rpath contains only unique directories.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1225 case "$temp_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1226 *" $dir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1227 *) temp_rpath="$temp_rpath $dir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1228 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1229 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1230
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1231 # We need an absolute path.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1232 case "$dir" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1233 /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1234 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1235 absdir=`cd "$dir" && pwd`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1236 if test -z "$absdir"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1237 $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1238 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1239 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1240 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1241 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1242
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1243 # This is the magic to use -rpath.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1244 # Skip directories that are in the system default run-time
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1245 # search path, unless they have been requested with -R.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1246 case " $sys_lib_dlsearch_path " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1247 *" $absdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1248 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1249 case "$compile_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1250 *" $absdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1251 *) compile_rpath="$compile_rpath $absdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1252 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1253 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1254 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1255
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1256 case " $sys_lib_dlsearch_path " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1257 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1258 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1259 case "$finalize_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1260 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1261 *) finalize_rpath="$finalize_rpath $libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1262 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1263 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1264 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1265
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1266 lib_linked=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1267 case "$hardcode_action" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1268 immediate | unsupported)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1269 if test "$hardcode_direct" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1270 compile_command="$compile_command $dir/$linklib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1271 deplibs="$deplibs $dir/$linklib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1272 case "$host" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1273 *-*-cygwin* | *-*-mingw* | *-*-os2*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1274 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1275 if test -n "$dllsearchpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1276 dllsearchpath="$dllsearchpath:$dllsearchdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1277 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1278 dllsearchpath="$dllsearchdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1279 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1280 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1281 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1282 elif test "$hardcode_minus_L" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1283 case "$host" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1284 *-*-sunos*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1285 compile_shlibpath="$compile_shlibpath$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1286 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1287 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1288 case "$compile_command " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1289 *" -L$dir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1290 *) compile_command="$compile_command -L$dir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1291 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1292 compile_command="$compile_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1293 deplibs="$deplibs -L$dir -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1294 elif test "$hardcode_shlibpath_var" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1295 case ":$compile_shlibpath:" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1296 *":$dir:"*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1297 *) compile_shlibpath="$compile_shlibpath$dir:";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1298 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1299 compile_command="$compile_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1300 deplibs="$deplibs -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1301 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1302 lib_linked=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1303 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1304 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1305
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1306 relink)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1307 if test "$hardcode_direct" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1308 compile_command="$compile_command $absdir/$linklib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1309 deplibs="$deplibs $absdir/$linklib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1310 elif test "$hardcode_minus_L" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1311 case "$compile_command " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1312 *" -L$absdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1313 *) compile_command="$compile_command -L$absdir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1314 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1315 compile_command="$compile_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1316 deplibs="$deplibs -L$absdir -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1317 elif test "$hardcode_shlibpath_var" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1318 case ":$compile_shlibpath:" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1319 *":$absdir:"*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1320 *) compile_shlibpath="$compile_shlibpath$absdir:";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1321 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1322 compile_command="$compile_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1323 deplibs="$deplibs -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1324 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1325 lib_linked=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1326 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1327 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1328
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1329 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1330 lib_linked=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1331 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1332 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1333
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1334 if test "$lib_linked" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1335 $echo "$modename: configuration error: unsupported hardcode properties"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1336 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1337 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1338
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1339 # Finalize command for both is simple: just hardcode it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1340 if test "$hardcode_direct" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1341 finalize_command="$finalize_command $libdir/$linklib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1342 elif test "$hardcode_minus_L" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1343 case "$finalize_command " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1344 *" -L$libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1345 *) finalize_command="$finalize_command -L$libdir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1346 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1347 finalize_command="$finalize_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1348 elif test "$hardcode_shlibpath_var" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1349 case ":$finalize_shlibpath:" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1350 *":$libdir:"*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1351 *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1352 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1353 finalize_command="$finalize_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1354 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1355 # We cannot seem to hardcode it, guess we'll fake it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1356 case "$finalize_command " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1357 *" -L$dir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1358 *) finalize_command="$finalize_command -L$libdir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1359 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1360 finalize_command="$finalize_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1361 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1362 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1363 # Transform directly to old archives if we don't build new libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1364 if test -n "$pic_flag" && test -z "$old_library"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1365 $echo "$modename: cannot find static library for \`$arg'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1366 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1367 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1368
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1369 # Here we assume that one of hardcode_direct or hardcode_minus_L
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1370 # is not unsupported. This is valid on all known static and
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1371 # shared platforms.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1372 if test "$hardcode_direct" != unsupported; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1373 test -n "$old_library" && linklib="$old_library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1374 compile_command="$compile_command $dir/$linklib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1375 finalize_command="$finalize_command $dir/$linklib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1376 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1377 case "$compile_command " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1378 *" -L$dir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1379 *) compile_command="$compile_command -L$dir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1380 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1381 compile_command="$compile_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1382 case "$finalize_command " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1383 *" -L$dir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1384 *) finalize_command="$finalize_command -L$dir";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1385 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1386 finalize_command="$finalize_command -l$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1387 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1388 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1389
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1390 # Add in any libraries that this one depends upon.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1391 compile_command="$compile_command$dependency_libs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1392 finalize_command="$finalize_command$dependency_libs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1393 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1394 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1395
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1396 # Some other compiler argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1397 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1398 # Unknown arguments in both finalize_command and compile_command need
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1399 # to be aesthetically quoted because they are evaled later.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1400 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1401 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1402 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1403 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1404 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1405 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1406 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1407 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1408
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1409 # Now actually substitute the argument into the commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1410 if test -n "$arg"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1411 compile_command="$compile_command $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1412 finalize_command="$finalize_command $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1413 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1414 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1415
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1416 if test -n "$prev"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1417 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1418 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1419 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1420 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1421
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1422 oldlibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1423 # calculate the name of the file, without its directory
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1424 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1425 libobjs_save="$libobjs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1426
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1427 case "$output" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1428 "")
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1429 $echo "$modename: you must specify an output file" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1430 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1431 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1432 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1433
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1434 *.a | *.lib)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1435 if test -n "$link_against_libtool_libs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1436 $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1437 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1438 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1439
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1440 if test -n "$deplibs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1441 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1442 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1443
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1444 if test -n "$dlfiles$dlprefiles"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1445 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1446 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1447
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1448 if test -n "$rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1449 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1450 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1451
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1452 if test -n "$xrpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1453 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1454 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1455
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1456 if test -n "$vinfo"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1457 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1458 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1459
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1460 if test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1461 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1462 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1463
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1464 if test -n "$export_symbols"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1465 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1466 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1467
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1468 # Now set the variables for building old libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1469 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1470 oldlibs="$output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1471 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1472
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1473 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1474 # Make sure we only generate libraries of the form `libNAME.la'.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1475 case "$outputname" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1476 lib*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1477 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1478 eval libname=\"$libname_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1479 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1480 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1481 if test "$module" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1482 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1483 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1484 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1485 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1486 if test "$need_lib_prefix" != no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1487 # Add the "lib" prefix for modules if required
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1488 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1489 eval libname=\"$libname_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1490 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1491 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1492 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1493 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1494 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1495
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1496 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1497 if test "X$output_objdir" = "X$output"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1498 output_objdir="$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1499 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1500 output_objdir="$output_objdir/$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1501 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1502
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1503 # All the library-specific variables (install_libdir is set above).
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1504 library_names=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1505 old_library=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1506 dlname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1507
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1508 if test -n "$objs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1509 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1510 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1511 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1512
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1513 # How the heck are we supposed to write a wrapper for a shared library?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1514 if test -n "$link_against_libtool_libs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1515 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1516 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1517 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1518
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1519 if test -n "$dlfiles$dlprefiles"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1520 $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1521 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1522
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1523 set dummy $rpath
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1524 if test $# -gt 2; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1525 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1526 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1527 install_libdir="$2"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1528
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1529 oldlibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1530 if test -z "$rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1531 if test "$build_libtool_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1532 # Building a libtool convenience library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1533 libext=al
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1534 oldlibs="$output_objdir/$libname.$libext $oldlibs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1535 build_libtool_libs=convenience
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1536 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1537 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1538 dependency_libs="$deplibs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1539
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1540 if test -n "$vinfo"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1541 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1542 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1543
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1544 if test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1545 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1546 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1547 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1548
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1549 # Parse the version information argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1550 IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1551 set dummy $vinfo 0 0 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1552 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1553
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1554 if test -n "$8"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1555 $echo "$modename: too many parameters to \`-version-info'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1556 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1557 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1558 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1559
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1560 current="$2"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1561 revision="$3"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1562 age="$4"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1563
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1564 # Check that each of the things are valid numbers.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1565 case "$current" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1566 0 | [1-9] | [1-9][0-9]*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1567 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1568 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1569 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1570 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1571 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1572 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1573
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1574 case "$revision" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1575 0 | [1-9] | [1-9][0-9]*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1576 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1577 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1578 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1579 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1580 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1581 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1582
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1583 case "$age" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1584 0 | [1-9] | [1-9][0-9]*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1585 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1586 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1587 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1588 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1589 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1590 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1591
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1592 if test $age -gt $current; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1593 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1594 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1595 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1596 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1597
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1598 # Calculate the version variables.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1599 major=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1600 versuffix=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1601 verstring=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1602 case "$version_type" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1603 none) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1604
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1605 irix)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1606 major=`expr $current - $age + 1`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1607 versuffix="$major.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1608 verstring="sgi$major.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1609
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1610 # Add in all the interfaces that we are compatible with.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1611 loop=$revision
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1612 while test $loop != 0; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1613 iface=`expr $revision - $loop`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1614 loop=`expr $loop - 1`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1615 verstring="sgi$major.$iface:$verstring"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1616 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1617 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1618
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1619 linux)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1620 major=.`expr $current - $age`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1621 versuffix="$major.$age.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1622 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1623
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1624 osf)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1625 major=`expr $current - $age`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1626 versuffix=".$current.$age.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1627 verstring="$current.$age.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1628
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1629 # Add in all the interfaces that we are compatible with.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1630 loop=$age
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1631 while test $loop != 0; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1632 iface=`expr $current - $loop`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1633 loop=`expr $loop - 1`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1634 verstring="$verstring:${iface}.0"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1635 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1636
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1637 # Make executables depend on our current version.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1638 verstring="$verstring:${current}.0"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1639 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1640
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1641 sunos)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1642 major=".$current"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1643 versuffix=".$current.$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1644 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1645
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1646 freebsd-aout)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1647 major=".$current"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1648 versuffix=".$current.$revision";
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1649 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1650
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1651 freebsd-elf)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1652 major=".$current"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1653 versuffix=".$current";
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1654 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1655
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1656 windows)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1657 # Like Linux, but with '-' rather than '.', since we only
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1658 # want one extension on Windows 95.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1659 major=`expr $current - $age`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1660 versuffix="-$major-$age-$revision"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1661 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1662
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1663 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1664 $echo "$modename: unknown library version type \`$version_type'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1665 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1666 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1667 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1668 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1669
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1670 # Clear the version info if we defaulted, and they specified a release.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1671 if test -z "$vinfo" && test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1672 major=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1673 verstring="0.0"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1674 if test "$need_version" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1675 versuffix=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1676 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1677 versuffix=".0.0"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1678 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1679 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1680
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1681 # Remove version info from name if versioning should be avoided
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1682 if test "$avoid_version" = yes && test "$need_version" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1683 major=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1684 versuffix=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1685 verstring=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1686 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1687
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1688 # Check to see if the archive will have undefined symbols.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1689 if test "$allow_undefined" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1690 if test "$allow_undefined_flag" = unsupported; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1691 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1692 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1693 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1694 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1695 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1696 # Don't allow undefined symbols.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1697 allow_undefined_flag="$no_undefined_flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1698 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1699
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1700 dependency_libs="$deplibs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1701 case "$host" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1702 *-*-cygwin* | *-*-mingw* | *-*-os2*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1703 # these systems don't actually have a c library (as such)!
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1704 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1705 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1706 # Add libc to deplibs on all other systems.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1707 deplibs="$deplibs -lc"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1708 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1709 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1710 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1711
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1712 # Create the output directory, or remove our outputs if we need to.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1713 if test -d $output_objdir; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1714 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1715 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1716 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1717 $show "$mkdir $output_objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1718 $run $mkdir $output_objdir
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1719 status=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1720 if test $status -ne 0 && test ! -d $output_objdir; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1721 exit $status
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1722 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1723 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1724
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1725 # Now set the variables for building old libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1726 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1727 oldlibs="$oldlibs $output_objdir/$libname.$libext"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1728
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1729 # Transform .lo files to .o files.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1730 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1731 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1732
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1733 if test "$build_libtool_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1734 # Transform deplibs into only deplibs that can be linked in shared.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1735 name_save=$name
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1736 libname_save=$libname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1737 release_save=$release
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1738 versuffix_save=$versuffix
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1739 major_save=$major
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1740 # I'm not sure if I'm treating the release correctly. I think
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1741 # release should show up in the -l (ie -lgmp5) so we don't want to
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1742 # add it in twice. Is that correct?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1743 release=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1744 versuffix=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1745 major=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1746 newdeplibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1747 droppeddeps=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1748 case "$deplibs_check_method" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1749 pass_all)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1750 newdeplibs=$deplibs
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1751 ;; # Don't check for shared/static. Everything works.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1752 # This might be a little naive. We might want to check
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1753 # whether the library exists or not. But this is on
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1754 # osf3 & osf4 and I'm not really sure... Just
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1755 # implementing what was already the behaviour.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1756 test_compile)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1757 # This code stresses the "libraries are programs" paradigm to its
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1758 # limits. Maybe even breaks it. We compile a program, linking it
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1759 # against the deplibs as a proxy for the library. Then we can check
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1760 # whether they linked in statically or dynamically with ldd.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1761 $rm conftest.c
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1762 cat > conftest.c <<EOF
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1763 int main() { return 0; }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1764 EOF
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1765 $rm conftest
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1766 $C_compiler -o conftest conftest.c $deplibs
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1767 if test $? -eq 0 ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1768 ldd_output=`ldd conftest`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1769 for i in $deplibs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1770 name="`expr $i : '-l\(.*\)'`"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1771 # If $name is empty we are operating on a -L argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1772 if test "$name" != "" ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1773 libname=`eval \\$echo \"$libname_spec\"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1774 deplib_matches=`eval \\$echo \"$library_names_spec\"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1775 set dummy $deplib_matches
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1776 deplib_match=$2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1777 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1778 newdeplibs="$newdeplibs $i"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1779 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1780 droppeddeps=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1781 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1782 echo "*** Warning: This library needs some functionality provided by $i."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1783 echo "*** I have the capability to make that library automatically link in when"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1784 echo "*** you link to this library. But I can only do this if you have a"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1785 echo "*** shared version of the library, which you do not appear to have."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1786 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1787 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1788 newdeplibs="$newdeplibs $i"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1789 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1790 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1791 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1792 # Error occured in the first compile. Let's try to salvage the situation:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1793 # Compile a seperate program for each library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1794 for i in $deplibs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1795 name="`expr $i : '-l\(.*\)'`"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1796 # If $name is empty we are operating on a -L argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1797 if test "$name" != "" ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1798 $rm conftest
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1799 $C_compiler -o conftest conftest.c $i
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1800 # Did it work?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1801 if test $? -eq 0 ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1802 ldd_output=`ldd conftest`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1803 libname=`eval \\$echo \"$libname_spec\"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1804 deplib_matches=`eval \\$echo \"$library_names_spec\"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1805 set dummy $deplib_matches
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1806 deplib_match=$2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1807 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1808 newdeplibs="$newdeplibs $i"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1809 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1810 droppeddeps=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1811 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1812 echo "*** Warning: This library needs some functionality provided by $i."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1813 echo "*** I have the capability to make that library automatically link in when"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1814 echo "*** you link to this library. But I can only do this if you have a"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1815 echo "*** shared version of the library, which you do not appear to have."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1816 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1817 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1818 droppeddeps=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1819 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1820 echo "*** Warning! Library $i is needed by this library but I was not able to"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1821 echo "*** make it link in! You will probably need to install it or some"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1822 echo "*** library that it depends on before this library will be fully"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1823 echo "*** functional. Installing it before continuing would be even better."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1824 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1825 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1826 newdeplibs="$newdeplibs $i"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1827 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1828 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1829 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1830 deplibs=$newdeplibs
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1831 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1832 file_magic*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1833 set dummy $deplibs_check_method
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1834 file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1835 for a_deplib in $deplibs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1836 name="`expr $a_deplib : '-l\(.*\)'`"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1837 # If $name is empty we are operating on a -L argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1838 if test "$name" != "" ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1839 libname=`eval \\$echo \"$libname_spec\"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1840 for i in $lib_search_path; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1841 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1842 for potent_lib in $potential_libs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1843 # Follow soft links.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1844 if ls -lLd "$potlib" 2>/dev/null \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1845 | grep " -> " >/dev/null; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1846 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1847 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1848 # The statement above tries to avoid entering an
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1849 # endless loop below, in case of cyclic links.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1850 # We might still enter an endless loop, since a link
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1851 # loop can be closed while we follow links,
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1852 # but so what?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1853 potlib="$potent_lib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1854 while test -h "$potlib" 2>/dev/null; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1855 potliblink=`ls -ld $potlib | sed 's/.* -> //'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1856 case "$potliblink" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1857 /*) potlib="$potliblink";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1858 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1859 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1860 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1861 if eval $file_magic_cmd \"\$potlib\" \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1862 | sed 10q \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1863 | egrep "$file_magic_regex" > /dev/null; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1864 newdeplibs="$newdeplibs $a_deplib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1865 a_deplib=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1866 break 2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1867 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1868 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1869 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1870 if test -n "$a_deplib" ; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1871 droppeddeps=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1872 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1873 echo "*** Warning: This library needs some functionality provided by $a_deplib."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1874 echo "*** I have the capability to make that library automatically link in when"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1875 echo "*** you link to this library. But I can only do this if you have a"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1876 echo "*** shared version of the library, which you do not appear to have."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1877 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1878 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1879 # Add a -L argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1880 newdeplibs="$newdeplibs $a_deplib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1881 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1882 done # Gone through all deplibs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1883 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1884 none | unknown | *) newdeplibs=""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1885 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1886 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1887 grep . >/dev/null; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1888 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1889 if test "X$deplibs_check_method" = "Xnone"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1890 echo "*** Warning: inter-library dependencies are not supported in this platform."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1891 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1892 echo "*** Warning: inter-library dependencies are not known to be supported."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1893 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1894 echo "*** All declared inter-library dependencies are being dropped."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1895 droppeddeps=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1896 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1897 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1898 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1899 versuffix=$versuffix_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1900 major=$major_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1901 release=$release_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1902 libname=$libname_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1903 name=$name_save
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1904
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1905 if test "$droppeddeps" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1906 if test "$module" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1907 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1908 echo "*** Warning: libtool could not satisfy all declared inter-library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1909 echo "*** dependencies of module $libname. Therefore, libtool will create"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1910 echo "*** a static module, that should work as long as the dlopening"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1911 echo "*** application is linked with the -dlopen flag."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1912 if test -z "$global_symbol_pipe"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1913 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1914 echo "*** However, this would only work if libtool was able to extract symbol"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1915 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1916 echo "*** not find such a program. So, this module is probably useless."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1917 echo "*** \`nm' from GNU binutils and a full rebuild may help."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1918 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1919 if test "$build_old_libs" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1920 oldlibs="$output_objdir/$libname.$libext"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1921 build_libtool_libs=module
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1922 build_old_libs=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1923 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1924 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1925 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1926 dlname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1927 library_names=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1928 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1929 echo "*** The inter-library dependencies that have been dropped here will be"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1930 echo "*** automatically added whenever a program is linked with this library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1931 echo "*** or is declared to -dlopen it."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1932 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1933 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1934 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1935
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1936 # test again, we may have decided not to build it any more
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1937 if test "$build_libtool_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1938 deplibs=$newdeplibs
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1939 # Done checking deplibs!
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1940
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1941 # Get the real and link names of the library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1942 eval library_names=\"$library_names_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1943 set dummy $library_names
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1944 realname="$2"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1945 shift; shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1946
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1947 if test -n "$soname_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1948 eval soname=\"$soname_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1949 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1950 soname="$realname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1951 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1952
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1953 lib="$output_objdir/$realname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1954 for link
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1955 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1956 linknames="$linknames $link"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1957 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1958
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1959 # Ensure that we have .o objects for linkers which dislike .lo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1960 # (e.g. aix) incase we are running --disable-static
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1961 for obj in $libobjs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1962 oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1963 test -f $oldobj || ${LN_S} $obj $oldobj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1964 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1965
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1966 # Use standard objects if they are pic
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1967 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1968
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1969 if test -n "$whole_archive_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1970 if test -n "$convenience"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1971 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1972 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1973 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1974 for xlib in $convenience; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1975 # Extract the objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1976 xdir="$xlib"x
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1977 generated="$generated $xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1978 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1979
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1980 $show "${rm}r $xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1981 $run ${rm}r "$xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1982 $show "mkdir $xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1983 $run mkdir "$xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1984 status=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1985 if test $status -ne 0 && test ! -d "$xdir"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1986 exit $status
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1987 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1988 $show "(cd $xdir && $AR x ../$xlib)"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1989 $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1990
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1991 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1992 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1993 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1994
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1995 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1996 eval flag=\"$thread_safe_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1997
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1998 linkopts="$linkopts $flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
1999 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2000
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2001 # Prepare the list of exported symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2002 if test -z "$export_symbols"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2003 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2004 $show "generating symbol list for \`$libname.la'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2005 export_symbols="$objdir/$libname.exp"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2006 $run $rm $export_symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2007 eval cmds=\"$export_symbols_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2008 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2009 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2010 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2011 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2012 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2013 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2014 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2015 if test -n "$export_symbols_regex"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2016 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2017 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2018 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2019 $run eval '$mv "${export_symbols}T" "$export_symbols"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2020 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2021 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2022 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2023
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2024 if test -n "$export_symbols" && test -n "$include_expsyms"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2025 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2026 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2027
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2028 # Do each of the archive commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2029 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2030 eval cmds=\"$archive_expsym_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2031 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2032 eval cmds=\"$archive_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2033 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2034 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2035 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2036 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2037 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2038 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2039 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2040 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2041
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2042 # Create links to the real library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2043 for linkname in $linknames; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2044 if test "$realname" != "$linkname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2045 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2046 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2047 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2048 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2049
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2050 # If -module or -export-dynamic was specified, set the dlname.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2051 if test "$module" = yes || test "$export_dynamic" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2052 # On all known operating systems, these are identical.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2053 dlname="$soname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2054 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2055 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2056 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2057
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2058 *.lo | *.o | *.obj)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2059 if test -n "$link_against_libtool_libs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2060 $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2061 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2062 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2063
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2064 if test -n "$deplibs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2065 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2066 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2067
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2068 if test -n "$dlfiles$dlprefiles"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2069 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2070 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2071
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2072 if test -n "$rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2073 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2074 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2075
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2076 if test -n "$xrpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2077 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2078 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2079
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2080 if test -n "$vinfo"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2081 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2082 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2083
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2084 if test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2085 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2086 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2087
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2088 case "$output" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2089 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2090 if test -n "$objs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2091 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2092 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2093 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2094 libobj="$output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2095 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2096 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2097 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2098 libobj=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2099 obj="$output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2100 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2101 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2102
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2103 # Delete the old objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2104 $run $rm $obj $libobj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2105
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2106 # Create the old-style object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2107 reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2108
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2109 output="$obj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2110 eval cmds=\"$reload_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2111 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2112 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2113 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2114 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2115 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2116 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2117 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2118
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2119 # Exit if we aren't doing a library object file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2120 test -z "$libobj" && exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2121
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2122 if test "$build_libtool_libs" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2123 # Create an invalid libtool object if no PIC, so that we don't
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2124 # accidentally link it into a program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2125 $show "echo timestamp > $libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2126 $run eval "echo timestamp > $libobj" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2127 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2128 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2129
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2130 if test -n "$pic_flag"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2131 # Only do commands if we really have different PIC objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2132 reload_objs="$libobjs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2133 output="$libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2134 eval cmds=\"$reload_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2135 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2136 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2137 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2138 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2139 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2140 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2141 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2142 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2143 # Just create a symlink.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2144 $show $rm $libobj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2145 $run $rm $libobj
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2146 $show "$LN_S $obj $libobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2147 $run $LN_S $obj $libobj || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2148 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2149
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2150 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2151 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2152
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2153 # Anything else should be a program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2154 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2155 if test -n "$vinfo"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2156 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2157 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2158
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2159 if test -n "$release"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2160 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2161 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2162
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2163 if test "$preload" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2164 if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2165 test "$dlopen_self_static" = unknown; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2166 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2167 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2168 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2169
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2170 if test "$dlself" = yes && test "$export_dynamic" = no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2171 $echo "$modename: error: \`-dlopen self' requires \`-export-dynamic'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2172 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2173 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2174
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2175 if test -n "$rpath$xrpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2176 # If the user specified any rpath flags, then add them.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2177 for libdir in $rpath $xrpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2178 # This is the magic to use -rpath.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2179 case "$compile_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2180 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2181 *) compile_rpath="$compile_rpath $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2182 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2183 case "$finalize_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2184 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2185 *) finalize_rpath="$finalize_rpath $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2186 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2187 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2188 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2189
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2190 # Now hardcode the library paths
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2191 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2192 hardcode_libdirs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2193 for libdir in $compile_rpath $finalize_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2194 if test -n "$hardcode_libdir_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2195 if test -n "$hardcode_libdir_separator"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2196 if test -z "$hardcode_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2197 hardcode_libdirs="$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2198 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2199 # Just accumulate the unique libdirs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2200 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2201 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2202 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2203 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2204 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2205 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2206 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2207 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2208 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2209 eval flag=\"$hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2210
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2211 rpath="$rpath $flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2212 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2213 elif test -n "$runpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2214 case "$perm_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2215 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2216 *) perm_rpath="$perm_rpath $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2217 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2218 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2219 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2220 # Substitute the hardcoded libdirs into the rpath.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2221 if test -n "$hardcode_libdir_separator" &&
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2222 test -n "$hardcode_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2223 libdir="$hardcode_libdirs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2224 eval rpath=\" $hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2225 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2226 compile_rpath="$rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2227
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2228 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2229 hardcode_libdirs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2230 for libdir in $finalize_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2231 if test -n "$hardcode_libdir_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2232 if test -n "$hardcode_libdir_separator"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2233 if test -z "$hardcode_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2234 hardcode_libdirs="$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2235 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2236 # Just accumulate the unique libdirs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2237 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2238 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2239 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2240 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2241 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2242 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2243 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2244 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2245 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2246 eval flag=\"$hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2247
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2248 rpath="$rpath $flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2249 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2250 elif test -n "$runpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2251 case "$finalize_perm_rpath " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2252 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2253 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2254 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2255 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2256 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2257 # Substitute the hardcoded libdirs into the rpath.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2258 if test -n "$hardcode_libdir_separator" &&
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2259 test -n "$hardcode_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2260 libdir="$hardcode_libdirs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2261 eval rpath=\" $hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2262 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2263 finalize_rpath="$rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2264
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2265 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2266 if test "X$output_objdir" = "X$output"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2267 output_objdir="$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2268 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2269 output_objdir="$output_objdir/$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2270 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2271
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2272 if test -n "$libobjs" && test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2273 # Transform all the library objects into standard objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2274 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2275 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2276 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2277
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2278 dlsyms=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2279 if test -n "$dlfiles$dlprefiles" || test "$dlself" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2280 if test -n "$NM" && test -n "$global_symbol_pipe"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2281 dlsyms="${outputname}S.c"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2282 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2283 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2284 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2285 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2286
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2287 if test -n "$dlsyms"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2288 case "$dlsyms" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2289 "") ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2290 *.c)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2291 # Discover the nlist of each of the dlfiles.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2292 nlist="$objdir/${output}.nm"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2293
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2294 if test -d $objdir; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2295 $show "$rm $nlist ${nlist}S ${nlist}T"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2296 $run $rm "$nlist" "${nlist}S" "${nlist}T"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2297 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2298 $show "$mkdir $objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2299 $run $mkdir $objdir
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2300 status=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2301 if test $status -ne 0 && test ! -d $objdir; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2302 exit $status
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2303 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2304 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2305
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2306 # Parse the name list into a source file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2307 $show "creating $objdir/$dlsyms"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2308
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2309 $echo > "$objdir/$dlsyms" "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2310 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2311 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2312
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2313 #ifdef __cplusplus
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2314 extern \"C\" {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2315 #endif
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2316
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2317 /* Prevent the only kind of declaration conflicts we can make. */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2318 #define lt_preloaded_symbols some_other_symbol
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2319
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2320 /* External symbol declarations for the compiler. */\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2321 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2322
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2323 if test "$dlself" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2324 $show "generating symbol list for \`$output'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2325
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2326 echo ': @PROGRAM@ ' > "$nlist"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2327
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2328 # Add our own program objects to the symbol list.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2329 progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2330 for arg in $progfiles; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2331 $show "extracting global C symbols from \`$arg'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2332 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2333 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2334
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2335 if test -n "$exclude_expsyms"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2336 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2337 $run eval '$mv "$nlist"T "$nlist"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2338 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2339
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2340 if test -n "$export_symbols_regex"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2341 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2342 $run eval '$mv "$nlist"T "$nlist"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2343 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2344
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2345 # Prepare the list of exported symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2346 if test -z "$export_symbols"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2347 export_symbols="$objdir/$output.exp"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2348 $run $rm $export_symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2349 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2350 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2351 $run $rm $export_symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2352 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$objdir/$output.exp"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2353 $run eval 'grep -f "$objdir/$output.exp" < "$nlist" > "$nlist"T'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2354 $run eval 'mv "$nlist"T "$nlist"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2355 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2356 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2357
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2358 for arg in $dlprefiles; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2359 $show "extracting global C symbols from \`$arg'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2360 name=`echo "$arg" | sed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2361 $run eval 'echo ": $name " >> "$nlist"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2362 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2363 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2364
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2365 if test -z "$run"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2366 # Make sure we have at least an empty file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2367 test -f "$nlist" || : > "$nlist"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2368
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2369 if test -n "$exclude_expsyms"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2370 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2371 $mv "$nlist"T "$nlist"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2372 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2373
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2374 # Try sorting and uniquifying the output.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2375 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2376 :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2377 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2378 grep -v "^: " < "$nlist" > "$nlist"S
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2379 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2380
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2381 if test -f "$nlist"S; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2382 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2383 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2384 echo '/* NONE */' >> "$output_objdir/$dlsyms"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2385 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2386
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2387 $echo >> "$output_objdir/$dlsyms" "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2388
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2389 #undef lt_preloaded_symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2390
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2391 #if defined (__STDC__) && __STDC__
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2392 # define lt_ptr_t void *
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2393 #else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2394 # define lt_ptr_t char *
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2395 # define const
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2396 #endif
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2397
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2398 /* The mapping between symbol names and symbols. */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2399 const struct {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2400 const char *name;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2401 lt_ptr_t address;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2402 }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2403 lt_preloaded_symbols[] =
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2404 {\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2405 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2406
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2407 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2408 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2409 < "$nlist" >> "$output_objdir/$dlsyms"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2410
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2411 $echo >> "$output_objdir/$dlsyms" "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2412 {0, (lt_ptr_t) 0}
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2413 };
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2414
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2415 /* This works around a problem in FreeBSD linker */
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2416 #ifdef FREEBSD_WORKAROUND
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2417 static const void *lt_preloaded_setup() {
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2418 return lt_preloaded_symbols;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2419 }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2420 #endif
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2421
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2422 #ifdef __cplusplus
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2423 }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2424 #endif\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2425 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2426 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2427
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2428 pic_flag_for_symtable=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2429 case "$host" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2430 # compiling the symbol table file with pic_flag works around
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2431 # a FreeBSD bug that causes programs to crash when -lm is
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2432 # linked before any other PIC object. But we must not use
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2433 # pic_flag when linking with -static. The problem exists in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2434 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2435 *-*-freebsd2*|*-*-freebsd3.0*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2436 case "$compile_command " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2437 *" -static "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2438 *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2439 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2440 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2441
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2442 # Now compile the dynamic symbol file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2443 $show "(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2444 $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2445
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2446 # Transform the symbol file into the correct name.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2447 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2448 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2449 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2450 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2451 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2452 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2453 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2454 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2455 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2456 # We keep going just in case the user didn't refer to
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2457 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2458 # really was required.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2459
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2460 # Nullify the symbol file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2461 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2462 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2463 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2464
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2465 if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2466 # Replace the output file specification.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2467 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2468 link_command="$compile_command$compile_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2469
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2470 # We have no uninstalled library dependencies, so finalize right now.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2471 $show "$link_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2472 $run eval "$link_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2473 exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2474 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2475
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2476 if test -n "$shlibpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2477 # We should set the shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2478 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2479 for dir in $temp_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2480 case "$dir" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2481 /* | [A-Za-z]:[/\\]*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2482 # Absolute path.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2483 rpath="$rpath$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2484 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2485 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2486 # Relative path: add a thisdir entry.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2487 rpath="$rpath\$thisdir/$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2488 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2489 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2490 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2491 temp_rpath="$rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2492 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2493
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2494 if test -n "$compile_shlibpath$finalize_shlibpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2495 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2496 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2497 if test -n "$finalize_shlibpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2498 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2499 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2500
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2501 compile_var=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2502 finalize_var=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2503 if test -n "$runpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2504 if test -n "$perm_rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2505 # We should set the runpath_var.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2506 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2507 for dir in $perm_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2508 rpath="$rpath$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2509 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2510 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2511 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2512 if test -n "$finalize_perm_rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2513 # We should set the runpath_var.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2514 rpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2515 for dir in $finalize_perm_rpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2516 rpath="$rpath$dir:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2517 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2518 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2519 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2520 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2521
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2522 if test "$hardcode_action" = relink; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2523 # Fast installation is not supported
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2524 link_command="$compile_var$compile_command$compile_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2525 relink_command="$finalize_var$finalize_command$finalize_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2526
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2527 # AGH! Flame the AIX and HP-UX people for me, will ya?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2528 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2529 $echo "$modename: \`$output' will be relinked during installation" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2530 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2531 if test "$fast_install" != no; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2532 link_command="$finalize_var$compile_command$finalize_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2533 if test "$fast_install" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2534 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2535 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2536 # fast_install is set to needless
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2537 relink_command=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2538 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2539 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2540 link_command="$compile_var$compile_command$compile_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2541 relink_command="$finalize_var$finalize_command$finalize_rpath"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2542 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2543 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2544
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2545 # Replace the output file specification.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2546 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2547
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2548 # Create the binary in the object directory, then wrap it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2549 if test ! -d $output_objdir; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2550 $show "$mkdir $output_objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2551 $run $mkdir $output_objdir
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2552 status=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2553 if test $status -ne 0 && test ! -d $objdir; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2554 exit $status
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2555 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2556 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2557
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2558 # Delete the old output file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2559 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2560
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2561 $show "$link_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2562 $run eval "$link_command" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2563
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2564 # Now create the wrapper script.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2565 $show "creating $output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2566
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2567 # Quote the relink command for shipping.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2568 if test -n "$relink_command"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2569 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2570 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2571
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2572 # Quote $echo for shipping.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2573 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2574 case "$0" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2575 /* | [A-Za-z]:[/\\]*) qecho="$SHELL $0 --fallback-echo";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2576 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2577 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2578 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2579 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2580 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2581 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2582
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2583 # Only actually do things if our run command is non-null.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2584 if test -z "$run"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2585 # win32 will think the script is a binary if it has
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2586 # a .exe suffix, so we strip it off here.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2587 case $output in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2588 *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2589 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2590 $rm $output
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2591 trap "$rm $output; exit 1" 1 2 15
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2592
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2593 $echo > $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2594 #! $SHELL
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2595
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2596 # $output - temporary wrapper script for $objdir/$outputname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2597 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2598 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2599 # The $output program cannot be directly executed until all the libtool
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2600 # libraries that it depends on are installed.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2601 #
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2602 # This wrapper script should never be moved out of the build directory.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2603 # If it is, it will not operate correctly.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2604
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2605 # Sed substitution that helps us do robust quoting. It backslashifies
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2606 # metacharacters that are still active within double-quoted strings.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2607 Xsed='sed -e 1s/^X//'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2608 sed_quote_subst='$sed_quote_subst'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2609
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2610 # The HP-UX ksh and POSIX shell print the target directory to stdout
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2611 # if CDPATH is set.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2612 if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2613
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2614 relink_command=\"$relink_command\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2615
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2616 # This environment variable determines our operation mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2617 if test \"\$libtool_install_magic\" = \"$magic\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2618 # install mode needs the following variable:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2619 link_against_libtool_libs='$link_against_libtool_libs'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2620 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2621 # When we are sourced in execute mode, \$file and \$echo are already set.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2622 if test \"\$libtool_execute_magic\" != \"$magic\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2623 echo=\"$qecho\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2624 file=\"\$0\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2625 # Make sure echo works.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2626 if test \"X\$1\" = X--no-reexec; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2627 # Discard the --no-reexec flag, and continue.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2628 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2629 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2630 # Yippee, \$echo works!
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2631 :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2632 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2633 # Restart under the correct shell, and then maybe \$echo will work.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2634 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2635 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2636 fi\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2637 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2638 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2639
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2640 # Find the directory that this script lives in.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2641 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2642 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2643
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2644 # Follow symbolic links until we get to the real thisdir.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2645 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2646 while test -n \"\$file\"; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2647 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2648
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2649 # If there was a directory component, then change thisdir.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2650 if test \"x\$destdir\" != \"x\$file\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2651 case \"\$destdir\" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2652 /* | [A-Za-z]:[/\\]*) thisdir=\"\$destdir\" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2653 *) thisdir=\"\$thisdir/\$destdir\" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2654 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2655 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2656
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2657 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2658 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2659 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2660
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2661 # Try to get the absolute directory name.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2662 absdir=\`cd \"\$thisdir\" && pwd\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2663 test -n \"\$absdir\" && thisdir=\"\$absdir\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2664 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2665
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2666 if test "$fast_install" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2667 echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2668 program=lt-'$outputname'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2669 progdir=\"\$thisdir/$objdir\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2670
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2671 if test ! -f \"\$progdir/\$program\" || \\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2672 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2673 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2674
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2675 file=\"\$\$-\$program\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2676
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2677 if test ! -d \"\$progdir\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2678 $mkdir \"\$progdir\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2679 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2680 $rm \"\$progdir/\$file\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2681 fi"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2682
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2683 echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2684
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2685 # relink executable if necessary
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2686 if test -n \"\$relink_command\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2687 if (cd \"\$thisdir\" && eval \$relink_command); then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2688 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2689 $rm \"\$progdir/\$file\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2690 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2691 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2692 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2693
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2694 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2695 { $rm \"\$progdir/\$program\";
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2696 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2697 $rm \"\$progdir/\$file\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2698 fi"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2699 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2700 echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2701 program='$outputname'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2702 progdir=\"\$thisdir/$objdir\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2703 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2704 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2705
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2706 echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2707
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2708 if test -f \"\$progdir/\$program\"; then"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2709
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2710 # Export our shlibpath_var if we have one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2711 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2712 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2713 # Add our own library path to $shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2714 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2715
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2716 # Some systems cannot cope with colon-terminated $shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2717 # The second colon is a workaround for a bug in BeOS R4 sed
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2718 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2719
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2720 export $shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2721 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2722 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2723
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2724 # fixup the dll searchpath if we need to.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2725 if test -n "$dllsearchpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2726 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2727 # Add the dll search path components to the executable PATH
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2728 PATH=$dllsearchpath:\$PATH
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2729 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2730 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2731
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2732 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2733 if test \"\$libtool_execute_magic\" != \"$magic\"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2734 # Run the actual program with our arguments.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2735 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2736 case $host in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2737 *-*-cygwin* | *-*-mingw | *-*-os2*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2738 # win32 systems need to use the prog path for dll
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2739 # lookup to work
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2740 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2741 exec \$progdir\\\\\$program \${1+\"\$@\"}
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2742 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2743 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2744 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2745 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2746 # Export the path to the program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2747 PATH=\"\$progdir:\$PATH\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2748 export PATH
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2749
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2750 exec \$program \${1+\"\$@\"}
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2751 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2752 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2753 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2754 $echo >> $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2755 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2756 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2757 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2758 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2759 # The program doesn't exist.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2760 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2761 \$echo \"This script is just a wrapper for \$program.\" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2762 echo \"See the $PACKAGE documentation for more information.\" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2763 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2764 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2765 fi\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2766 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2767 chmod +x $output
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2768 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2769 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2770 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2771 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2772
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2773 # See if we need to build an old-fashioned archive.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2774 for oldlib in $oldlibs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2775
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2776 if test "$build_libtool_libs" = convenience; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2777 oldobjs="$libobjs_save"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2778 addlibs="$convenience"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2779 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2780 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2781 if test "$build_libtool_libs" = module; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2782 oldobjs="$libobjs_save"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2783 build_libtool_libs=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2784 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2785 oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2786 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2787 addlibs="$old_convenience"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2788 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2789
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2790 # Add in members from convenience archives.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2791 for xlib in $addlibs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2792 # Extract the objects.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2793 xdir="$xlib"x
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2794 generated="$generated $xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2795 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2796
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2797 $show "${rm}r $xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2798 $run ${rm}r "$xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2799 $show "mkdir $xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2800 $run mkdir "$xdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2801 status=$?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2802 if test $status -ne 0 && test ! -d "$xdir"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2803 exit $status
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2804 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2805 $show "(cd $xdir && $AR x ../$xlib)"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2806 $run eval "(cd \$xdir && $AR x ../\$xlib)" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2807
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2808 oldobjs="$oldobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2809 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2810
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2811 # Do each command in the archive commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2812 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2813 eval cmds=\"$old_archive_from_new_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2814 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2815 eval cmds=\"$old_archive_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2816 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2817 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2818 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2819 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2820 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2821 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2822 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2823 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2824 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2825
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2826 if test -n "$generated"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2827 $show "${rm}r$generated"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2828 $run ${rm}r$generated
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2829 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2830
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2831 # Now create the libtool archive.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2832 case "$output" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2833 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2834 old_library=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2835 test "$build_old_libs" = yes && old_library="$libname.$libext"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2836 $show "creating $output"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2837
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2838 if test -n "$xrpath"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2839 temp_xrpath=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2840 for libdir in $xrpath; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2841 temp_xrpath="$temp_xrpath -R$libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2842 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2843 dependency_libs="$temp_xrpath $dependency_libs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2844 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2845
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2846 # Only create the output if not a dry run.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2847 if test -z "$run"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2848 $echo > $output "\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2849 # $output - a libtool library file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2850 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2851
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2852 # The name that we can dlopen(3).
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2853 dlname='$dlname'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2854
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2855 # Names of this library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2856 library_names='$library_names'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2857
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2858 # The name of the static archive.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2859 old_library='$old_library'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2860
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2861 # Libraries that this one depends upon.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2862 dependency_libs='$dependency_libs'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2863
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2864 # Version information for $libname.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2865 current=$current
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2866 age=$age
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2867 revision=$revision
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2868
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2869 # Is this an already installed library?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2870 installed=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2871
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2872 # Directory that this library needs to be installed in:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2873 libdir='$install_libdir'\
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2874 "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2875
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2876 $rm "$output_objdir/$outputname"i
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2877 sed 's/^installed=no$/installed=yes/' \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2878 < "$output" > "$output_objdir/$outputname"i || exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2879 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2880
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2881 # Do a symbolic link so that the libtool archive can be found in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2882 # LD_LIBRARY_PATH before the program is installed.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2883 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2884 $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2885 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2886 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2887 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2888 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2889
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2890 # libtool install mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2891 install)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2892 modename="$modename: install"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2893
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2894 # There may be an optional sh(1) argument at the beginning of
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2895 # install_prog (especially on Windows NT).
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2896 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2897 # Aesthetically quote it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2898 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2899 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2900 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2901 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2902 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2903 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2904 install_prog="$arg "
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2905 arg="$1"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2906 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2907 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2908 install_prog=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2909 arg="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2910 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2911
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2912 # The real first argument should be the name of the installation program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2913 # Aesthetically quote it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2914 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2915 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2916 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2917 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2918 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2919 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2920 install_prog="$install_prog$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2921
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2922 # We need to accept at least all the BSD install flags.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2923 dest=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2924 files=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2925 opts=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2926 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2927 install_type=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2928 isdir=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2929 stripme=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2930 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2931 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2932 if test -n "$dest"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2933 files="$files $dest"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2934 dest="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2935 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2936 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2937
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2938 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2939 -d) isdir=yes ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2940 -f) prev="-f" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2941 -g) prev="-g" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2942 -m) prev="-m" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2943 -o) prev="-o" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2944 -s)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2945 stripme=" -s"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2946 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2947 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2948 -*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2949
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2950 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2951 # If the previous option needed an argument, then skip it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2952 if test -n "$prev"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2953 prev=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2954 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2955 dest="$arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2956 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2957 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2958 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2959 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2960
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2961 # Aesthetically quote the argument.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2962 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2963 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2964 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2965 arg="\"$arg\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2966 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2967 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2968 install_prog="$install_prog $arg"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2969 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2970
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2971 if test -z "$install_prog"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2972 $echo "$modename: you must specify an install program" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2973 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2974 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2975 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2976
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2977 if test -n "$prev"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2978 $echo "$modename: the \`$prev' option requires an argument" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2979 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2980 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2981 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2982
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2983 if test -z "$files"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2984 if test -z "$dest"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2985 $echo "$modename: no file or destination specified" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2986 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2987 $echo "$modename: you must specify a destination" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2988 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2989 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2990 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2991 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2992
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2993 # Strip any trailing slash from the destination.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2994 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2995
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2996 # Check to see that the destination is a directory.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2997 test -d "$dest" && isdir=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2998 if test "$isdir" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
2999 destdir="$dest"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3000 destname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3001 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3002 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3003 test "X$destdir" = "X$dest" && destdir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3004 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3005
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3006 # Not a directory, so check to see that there is only one file specified.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3007 set dummy $files
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3008 if test $# -gt 2; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3009 $echo "$modename: \`$dest' is not a directory" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3010 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3011 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3012 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3013 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3014 case "$destdir" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3015 /* | [A-Za-z]:[/\\]*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3016 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3017 for file in $files; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3018 case "$file" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3019 *.lo) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3020 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3021 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3022 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3023 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3024 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3025 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3026 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3027 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3028 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3029
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3030 # This variable tells wrapper scripts just to set variables rather
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3031 # than running their programs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3032 libtool_install_magic="$magic"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3033
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3034 staticlibs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3035 future_libdirs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3036 current_libdirs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3037 for file in $files; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3038
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3039 # Do each installation.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3040 case "$file" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3041 *.a | *.lib)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3042 # Do the static libraries later.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3043 staticlibs="$staticlibs $file"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3044 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3045
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3046 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3047 # Check to see that this really is a libtool archive.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3048 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3049 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3050 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3051 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3052 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3053 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3054
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3055 library_names=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3056 old_library=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3057 # If there is no directory component, then add one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3058 case "$file" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3059 */* | *\\*) . $file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3060 *) . ./$file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3061 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3062
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3063 # Add the libdir to current_libdirs if it is the destination.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3064 if test "X$destdir" = "X$libdir"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3065 case "$current_libdirs " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3066 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3067 *) current_libdirs="$current_libdirs $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3068 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3069 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3070 # Note the libdir as a future libdir.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3071 case "$future_libdirs " in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3072 *" $libdir "*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3073 *) future_libdirs="$future_libdirs $libdir" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3074 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3075 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3076
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3077 dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3078 test "X$dir" = "X$file/" && dir=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3079 dir="$dir$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3080
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3081 # See the names of the shared library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3082 set dummy $library_names
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3083 if test -n "$2"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3084 realname="$2"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3085 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3086 shift
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3087
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3088 # Install the shared library and build the symlinks.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3089 $show "$install_prog $dir/$realname $destdir/$realname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3090 $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3091 test "X$dlname" = "X$realname" && dlname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3092
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3093 if test $# -gt 0; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3094 # Delete the old symlinks, and create new ones.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3095 for linkname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3096 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3097 test "X$dlname" = "X$linkname" && dlname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3098 if test "$linkname" != "$realname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3099 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3100 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3101 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3102 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3103 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3104
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3105 if test -n "$dlname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3106 # Install the dynamically-loadable library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3107 $show "$install_prog $dir/$dlname $destdir/$dlname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3108 $run eval "$install_prog $dir/$dlname $destdir/$dlname" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3109 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3110
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3111 # Do each command in the postinstall commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3112 lib="$destdir/$realname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3113 eval cmds=\"$postinstall_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3114 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3115 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3116 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3117 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3118 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3119 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3120 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3121 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3122
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3123 # Install the pseudo-library for information purposes.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3124 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3125 instname="$dir/$name"i
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3126 if test ! -f "$instname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3127 # Just in case it was removed...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3128 $show "Creating $instname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3129 $rm "$instname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3130 sed 's/^installed=no$/installed=yes/' "$file" > "$instname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3131 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3132 $show "$install_prog $instname $destdir/$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3133 $run eval "$install_prog $instname $destdir/$name" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3134
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3135 # Maybe install the static library, too.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3136 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3137 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3138
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3139 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3140 # Install (i.e. copy) a libtool object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3141
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3142 # Figure out destination file name, if it wasn't already specified.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3143 if test -n "$destname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3144 destfile="$destdir/$destname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3145 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3146 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3147 destfile="$destdir/$destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3148 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3149
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3150 # Deduce the name of the destination old-style object file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3151 case "$destfile" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3152 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3153 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3154 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3155 *.o | *.obj)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3156 staticdest="$destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3157 destfile=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3158 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3159 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3160 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3161 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3162 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3163 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3164 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3165
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3166 # Install the libtool object if requested.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3167 if test -n "$destfile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3168 $show "$install_prog $file $destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3169 $run eval "$install_prog $file $destfile" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3170 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3171
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3172 # Install the old object if enabled.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3173 if test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3174 # Deduce the name of the old-style object file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3175 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3176
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3177 $show "$install_prog $staticobj $staticdest"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3178 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3179 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3180 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3181 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3182
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3183 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3184 # Figure out destination file name, if it wasn't already specified.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3185 if test -n "$destname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3186 destfile="$destdir/$destname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3187 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3188 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3189 destfile="$destdir/$destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3190 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3191
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3192 # Do a test to see if this is really a libtool program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3193 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3194 link_against_libtool_libs=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3195 relink_command=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3196
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3197 # If there is no directory component, then add one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3198 case "$file" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3199 */* | *\\*) . $file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3200 *) . ./$file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3201 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3202
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3203 # Check the variables that should have been set.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3204 if test -z "$link_against_libtool_libs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3205 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3206 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3207 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3208
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3209 finalize=yes
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3210 for lib in $link_against_libtool_libs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3211 # Check to see that each library is installed.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3212 libdir=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3213 if test -f "$lib"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3214 # If there is no directory component, then add one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3215 case "$lib" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3216 */* | *\\*) . $lib ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3217 *) . ./$lib ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3218 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3219 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3220 libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3221 if test -n "$libdir" && test ! -f "$libfile"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3222 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3223 finalize=no
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3224 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3225 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3226
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3227 outputname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3228 if test "$fast_install" = no && test -n "$relink_command"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3229 if test "$finalize" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3230 outputname="/tmp/$$-$file"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3231 # Replace the output file specification.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3232 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3233
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3234 $echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3235 $show "$relink_command"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3236 if $run eval "$relink_command"; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3237 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3238 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3239 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3240 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3241 file="$outputname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3242 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3243 $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3244 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3245 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3246 # Install the binary that we compiled earlier.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3247 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3248 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3249 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3250
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3251 $show "$install_prog$stripme $file $destfile"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3252 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3253 test -n "$outputname" && $rm $outputname
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3254 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3255 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3256 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3257
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3258 for file in $staticlibs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3259 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3260
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3261 # Set up the ranlib parameters.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3262 oldlib="$destdir/$name"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3263
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3264 $show "$install_prog $file $oldlib"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3265 $run eval "$install_prog \$file \$oldlib" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3266
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3267 # Do each command in the postinstall commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3268 eval cmds=\"$old_postinstall_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3269 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3270 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3271 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3272 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3273 $run eval "$cmd" || exit $?
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3274 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3275 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3276 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3277
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3278 if test -n "$future_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3279 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3280 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3281
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3282 if test -n "$current_libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3283 # Maybe just do a dry run.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3284 test -n "$run" && current_libdirs=" -n$current_libdirs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3285 exec $SHELL $0 --finish$current_libdirs
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3286 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3287 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3288
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3289 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3290 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3291
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3292 # libtool finish mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3293 finish)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3294 modename="$modename: finish"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3295 libdirs="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3296 admincmds=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3297
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3298 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3299 for dir
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3300 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3301 libdirs="$libdirs $dir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3302 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3303
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3304 for libdir in $libdirs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3305 if test -n "$finish_cmds"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3306 # Do each command in the finish commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3307 eval cmds=\"$finish_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3308 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3309 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3310 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3311 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3312 $run eval "$cmd" || admincmds="$admincmds
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3313 $cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3314 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3315 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3316 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3317 if test -n "$finish_eval"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3318 # Do the single finish_eval.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3319 eval cmds=\"$finish_eval\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3320 $run eval "$cmds" || admincmds="$admincmds
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3321 $cmds"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3322 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3323 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3324 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3325
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3326 # Exit here if they wanted silent mode.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3327 test "$show" = : && exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3328
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3329 echo "----------------------------------------------------------------------"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3330 echo "Libraries have been installed in:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3331 for libdir in $libdirs; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3332 echo " $libdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3333 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3334 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3335 echo "If you ever happen to want to link against installed libraries"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3336 echo "in a given directory, LIBDIR, you must either use libtool, and"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3337 echo "specify the full pathname of the library, or use \`-LLIBDIR'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3338 echo "flag during linking and do at least one of the following:"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3339 if test -n "$shlibpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3340 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3341 echo " during execution"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3342 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3343 if test -n "$runpath_var"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3344 echo " - add LIBDIR to the \`$runpath_var' environment variable"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3345 echo " during linking"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3346 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3347 if test -n "$hardcode_libdir_flag_spec"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3348 libdir=LIBDIR
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3349 eval flag=\"$hardcode_libdir_flag_spec\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3350
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3351 echo " - use the \`$flag' linker flag"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3352 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3353 if test -n "$admincmds"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3354 echo " - have your system administrator run these commands:$admincmds"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3355 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3356 if test -f /etc/ld.so.conf; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3357 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3358 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3359 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3360 echo "See any operating system documentation about shared libraries for"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3361 echo "more information, such as the ld(1) and ld.so(8) manual pages."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3362 echo "----------------------------------------------------------------------"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3363 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3364 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3365
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3366 # libtool execute mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3367 execute)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3368 modename="$modename: execute"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3369
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3370 # The first argument is the command name.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3371 cmd="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3372 if test -z "$cmd"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3373 $echo "$modename: you must specify a COMMAND" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3374 $echo "$help"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3375 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3376 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3377
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3378 # Handle -dlopen flags immediately.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3379 for file in $execute_dlfiles; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3380 if test ! -f "$file"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3381 $echo "$modename: \`$file' is not a file" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3382 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3383 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3384 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3385
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3386 dir=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3387 case "$file" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3388 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3389 # Check to see that this really is a libtool archive.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3390 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3391 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3392 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3393 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3394 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3395 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3396
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3397 # Read the libtool library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3398 dlname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3399 library_names=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3400
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3401 # If there is no directory component, then add one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3402 case "$file" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3403 */* | *\\*) . $file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3404 *) . ./$file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3405 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3406
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3407 # Skip this library if it cannot be dlopened.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3408 if test -z "$dlname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3409 # Warn if it was a shared library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3410 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3411 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3412 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3413
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3414 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3415 test "X$dir" = "X$file" && dir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3416
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3417 if test -f "$dir/$objdir/$dlname"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3418 dir="$dir/$objdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3419 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3420 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3421 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3422 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3423 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3424
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3425 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3426 # Just add the directory containing the .lo file.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3427 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3428 test "X$dir" = "X$file" && dir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3429 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3430
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3431 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3432 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3433 continue
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3434 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3435 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3436
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3437 # Get the absolute pathname.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3438 absdir=`cd "$dir" && pwd`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3439 test -n "$absdir" && dir="$absdir"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3440
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3441 # Now add the directory to shlibpath_var.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3442 if eval "test -z \"\$$shlibpath_var\""; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3443 eval "$shlibpath_var=\"\$dir\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3444 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3445 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3446 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3447 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3448
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3449 # This variable tells wrapper scripts just to set shlibpath_var
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3450 # rather than running their programs.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3451 libtool_execute_magic="$magic"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3452
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3453 # Check if any of the arguments is a wrapper script.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3454 args=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3455 for file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3456 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3457 case "$file" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3458 -*) ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3459 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3460 # Do a test to see if this is really a libtool program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3461 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3462 # If there is no directory component, then add one.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3463 case "$file" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3464 */* | *\\*) . $file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3465 *) . ./$file ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3466 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3467
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3468 # Transform arg to wrapped name.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3469 file="$progdir/$program"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3470 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3471 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3472 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3473 # Quote arguments (to preserve shell metacharacters).
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3474 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3475 args="$args \"$file\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3476 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3477
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3478 if test -z "$run"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3479 # Export the shlibpath_var.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3480 eval "export $shlibpath_var"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3481
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3482 # Restore saved enviroment variables
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3483 if test "${save_LC_ALL+set}" = set; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3484 LC_ALL="$save_LC_ALL"; export LC_ALL
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3485 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3486 if test "${save_LANG+set}" = set; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3487 LANG="$save_LANG"; export LANG
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3488 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3489
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3490 # Now actually exec the command.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3491 eval "exec \$cmd$args"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3492
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3493 $echo "$modename: cannot exec \$cmd$args"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3494 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3495 else
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3496 # Display what would be done.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3497 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3498 $echo "export $shlibpath_var"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3499 $echo "$cmd$args"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3500 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3501 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3502 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3503
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3504 # libtool uninstall mode
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3505 uninstall)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3506 modename="$modename: uninstall"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3507 rm="$nonopt"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3508 files=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3509
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3510 for arg
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3511 do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3512 case "$arg" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3513 -*) rm="$rm $arg" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3514 *) files="$files $arg" ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3515 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3516 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3517
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3518 if test -z "$rm"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3519 $echo "$modename: you must specify an RM program" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3520 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3521 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3522 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3523
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3524 for file in $files; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3525 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3526 test "X$dir" = "X$file" && dir=.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3527 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3528
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3529 rmfiles="$file"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3530
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3531 case "$name" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3532 *.la)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3533 # Possibly a libtool archive, so verify it.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3534 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3535 . $dir/$name
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3536
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3537 # Delete the libtool libraries and symlinks.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3538 for n in $library_names; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3539 rmfiles="$rmfiles $dir/$n"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3540 test "X$n" = "X$dlname" && dlname=
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3541 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3542 test -n "$dlname" && rmfiles="$rmfiles $dir/$dlname"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3543 test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3544
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3545 $show "$rm $rmfiles"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3546 $run $rm $rmfiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3547
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3548 if test -n "$library_names"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3549 # Do each command in the postuninstall commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3550 eval cmds=\"$postuninstall_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3551 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3552 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3553 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3554 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3555 $run eval "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3556 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3557 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3558 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3559
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3560 if test -n "$old_library"; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3561 # Do each command in the old_postuninstall commands.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3562 eval cmds=\"$old_postuninstall_cmds\"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3563 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3564 for cmd in $cmds; do
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3565 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3566 $show "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3567 $run eval "$cmd"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3568 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3569 IFS="$save_ifs"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3570 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3571
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3572 # FIXME: should reinstall the best remaining shared library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3573 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3574 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3575
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3576 *.lo)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3577 if test "$build_old_libs" = yes; then
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3578 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3579 rmfiles="$rmfiles $dir/$oldobj"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3580 fi
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3581 $show "$rm $rmfiles"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3582 $run $rm $rmfiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3583 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3584
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3585 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3586 $show "$rm $rmfiles"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3587 $run $rm $rmfiles
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3588 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3589 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3590 done
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3591 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3592 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3593
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3594 "")
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3595 $echo "$modename: you must specify a MODE" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3596 $echo "$generic_help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3597 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3598 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3599 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3600
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3601 $echo "$modename: invalid operation mode \`$mode'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3602 $echo "$generic_help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3603 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3604 fi # test -z "$show_help"
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3605
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3606 # We need to display help for each of the modes.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3607 case "$mode" in
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3608 "") $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3609 "Usage: $modename [OPTION]... [MODE-ARG]...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3610
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3611 Provide generalized library-building support services.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3612
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3613 --config show all configuration variables
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3614 --debug enable verbose shell tracing
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3615 -n, --dry-run display commands without modifying any files
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3616 --features display basic configuration information and exit
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3617 --finish same as \`--mode=finish'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3618 --help display this help message and exit
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3619 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3620 --quiet same as \`--silent'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3621 --silent don't print informational messages
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3622 --version print version information
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3623
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3624 MODE must be one of the following:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3625
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3626 compile compile a source file into a libtool object
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3627 execute automatically set library path, then run a program
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3628 finish complete the installation of libtool libraries
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3629 install install libraries or executables
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3630 link create a library or an executable
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3631 uninstall remove libraries from an installed directory
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3632
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3633 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3634 a more detailed description of MODE."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3635 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3636 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3637
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3638 compile)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3639 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3640 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3641
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3642 Compile a source file into a libtool library object.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3643
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3644 This mode accepts the following additional options:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3645
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3646 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3647 -static always build a \`.o' file suitable for static linking
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3648
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3649 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3650 from the given SOURCEFILE.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3651
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3652 The output file name is determined by removing the directory component from
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3653 SOURCEFILE, then substituting the C source code suffix \`.c' with the
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3654 library object suffix, \`.lo'."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3655 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3656
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3657 execute)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3658 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3659 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3660
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3661 Automatically set library path, then run a program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3662
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3663 This mode accepts the following additional options:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3664
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3665 -dlopen FILE add the directory containing FILE to the library path
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3666
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3667 This mode sets the library path environment variable according to \`-dlopen'
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3668 flags.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3669
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3670 If any of the ARGS are libtool executable wrappers, then they are translated
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3671 into their corresponding uninstalled binary, and any of their required library
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3672 directories are added to the library path.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3673
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3674 Then, COMMAND is executed, with ARGS as arguments."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3675 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3676
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3677 finish)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3678 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3679 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3680
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3681 Complete the installation of libtool libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3682
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3683 Each LIBDIR is a directory that contains libtool libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3684
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3685 The commands that this mode executes may require superuser privileges. Use
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3686 the \`--dry-run' option if you just want to see what would be executed."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3687 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3688
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3689 install)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3690 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3691 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3692
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3693 Install executables or libraries.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3694
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3695 INSTALL-COMMAND is the installation command. The first component should be
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3696 either the \`install' or \`cp' program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3697
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3698 The rest of the components are interpreted as arguments to that command (only
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3699 BSD-compatible install options are recognized)."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3700 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3701
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3702 link)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3703 $echo \
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3704 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3705
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3706 Link object files or libraries together to form another library, or to
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3707 create an executable program.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3708
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3709 LINK-COMMAND is a command using the C compiler that you would use to create
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3710 a program from several object files.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3711
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3712 The following components of LINK-COMMAND are treated specially:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3713
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3714 -all-static do not do any dynamic linking at all
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3715 -avoid-version do not add a version suffix if possible
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3716 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3717 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3718 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3719 -export-symbols SYMFILE
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3720 try to export only the symbols listed in SYMFILE
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3721 -LLIBDIR search LIBDIR for required installed libraries
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3722 -lNAME OUTPUT-FILE requires the installed library libNAME
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3723 -module build a library that can dlopened
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3724 -no-undefined declare that a library does not refer to external symbols
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3725 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3726 -release RELEASE specify package release information
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3727 -rpath LIBDIR the created library will eventually be installed in LIBDIR
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3728 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3729 -static do not do any dynamic linking of libtool libraries
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3730 -version-info CURRENT[:REVISION[:AGE]]
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3731 specify library version info [each variable defaults to 0]
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3732
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3733 All other options (arguments beginning with \`-') are ignored.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3734
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3735 Every other argument is treated as a filename. Files ending in \`.la' are
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3736 treated as uninstalled libtool libraries, other files are standard or library
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3737 object files.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3738
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3739 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3740 only library objects (\`.lo' files) may be specified, and \`-rpath' is
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3741 required, except when creating a convenience library.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3742
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3743 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3744 using \`ar' and \`ranlib', or on Windows using \`lib'.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3745
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3746 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3747 is created, otherwise an executable program is created."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3748 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3749
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3750 uninstall)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3751 $echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3752 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3753
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3754 Remove libraries from an installation directory.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3755
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3756 RM is the name of the program to use to delete files associated with each FILE
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3757 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3758 to RM.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3759
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3760 If FILE is a libtool library, all the files associated with it are deleted.
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3761 Otherwise, only FILE itself is deleted using RM."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3762 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3763
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3764 *)
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3765 $echo "$modename: invalid operation mode \`$mode'" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3766 $echo "$help" 1>&2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3767 exit 1
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3768 ;;
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3769 esac
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3770
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3771 echo
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3772 $echo "Try \`$modename --help' for more information about other modes."
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3773
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3774 exit 0
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3775
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3776 # Local Variables:
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3777 # mode:shell-script
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3778 # sh-indentation:2
f58bc1b2c2bc Reorganization of the host-side autoconfiscation support, and a couple
bartv
parents:
diff changeset
3779 # End: