Mercurial > sdl-ios-xcode
annotate ltmain.sh @ 1144:509295d5a023
Date: Sun, 11 Sep 2005 14:41:07 +0300 (EEST)
From: =?ISO-8859-1?Q?Martin_Storsj=F6?= <martin@martin.st>
To: sdl@libsdl.org
Subject: [SDL] [PATCH] Switching between fullscreen/windowed on OS X
Hi,
When switching from fullscreen to windowed mode for opengl applications,
the current version of SDL sets an harmless error, regarding usage of a
NULL semaphore. This is due to code which tries to shut down a blitting
thread, which is only started for double buffered 2d video modes, not for
opengl. The attached patch fixes this.
// Martin
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 27 Sep 2005 08:36:28 +0000 |
parents | 3bb035750537 |
children |
rev | line source |
---|---|
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1 # Based on libtool-1.5.8 |
0 | 2 # ltmain.sh - Provide generalized library-building support services. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3 # NOTE: Changing this file will not affect anything until you rerun configure. |
0 | 4 # |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6 # Free Software Foundation, Inc. |
0 | 7 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
8 # | |
9 # This program is free software; you can redistribute it and/or modify | |
10 # it under the terms of the GNU General Public License as published by | |
11 # the Free Software Foundation; either version 2 of the License, or | |
12 # (at your option) any later version. | |
13 # | |
14 # This program is distributed in the hope that it will be useful, but | |
15 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 # General Public License for more details. | |
18 # | |
19 # You should have received a copy of the GNU General Public License | |
20 # along with this program; if not, write to the Free Software | |
21 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
22 # | |
23 # As a special exception to the GNU General Public License, if you | |
24 # distribute this file as part of a program that contains a | |
25 # configuration script generated by Autoconf, you may include it under | |
26 # the same distribution terms that you use for the rest of that program. | |
27 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
28 basename="s,^.*/,,g" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
29 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
30 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
31 # is ksh but when the shell is invoked as "sh" and the current value of |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
32 # the _XPG environment variable is not equal to 1 (one), the special |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
33 # positional parameter $0, within a function call, is the name of the |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
34 # function. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
35 progpath="$0" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
36 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
37 # The name of this program: |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
38 progname=`echo "$progpath" | $SED $basename` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
39 modename="$progname" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
40 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
41 # Global variables: |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
42 EXIT_SUCCESS=0 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
43 EXIT_FAILURE=1 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
44 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
45 PROGRAM=ltmain.sh |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
46 PACKAGE=libtool |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
47 VERSION=1.5.8 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
48 TIMESTAMP=" (1.1220.2.117 2004/08/04 14:12:05)" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
49 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
50 # See if we are running on zsh, and set the options which allow our |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
51 # commands through without removal of \ escapes. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
52 if test -n "${ZSH_VERSION+set}" ; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
53 setopt NO_GLOB_SUBST |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
54 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
55 |
0 | 56 # Check that we have a working $echo. |
57 if test "X$1" = X--no-reexec; then | |
58 # Discard the --no-reexec flag, and continue. | |
59 shift | |
60 elif test "X$1" = X--fallback-echo; then | |
61 # Avoid inline document here, it may be left over | |
62 : | |
63 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | |
64 # Yippee, $echo works! | |
65 : | |
66 else | |
67 # Restart under the correct shell, and then maybe $echo will work. | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
68 exec $SHELL "$progpath" --no-reexec ${1+"$@"} |
0 | 69 fi |
70 | |
71 if test "X$1" = X--fallback-echo; then | |
72 # used as fallback echo | |
73 shift | |
74 cat <<EOF | |
75 $* | |
76 EOF | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
77 exit $EXIT_SUCCESS |
0 | 78 fi |
79 | |
80 default_mode= | |
81 help="Try \`$progname --help' for more information." | |
82 magic="%%%MAGIC variable%%%" | |
83 mkdir="mkdir" | |
84 mv="mv -f" | |
85 rm="rm -f" | |
86 | |
87 # Sed substitution that helps us do robust quoting. It backslashifies | |
88 # metacharacters that are still active within double-quoted strings. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
89 Xsed="${SED}"' -e 1s/^X//' |
0 | 90 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
91 # test EBCDIC or ASCII |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
92 case `echo A|tr A '\301'` in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
93 A) # EBCDIC based system |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
94 SP2NL="tr '\100' '\n'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
95 NL2SP="tr '\r\n' '\100\100'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
96 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
97 *) # Assume ASCII based system |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
98 SP2NL="tr '\040' '\012'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
99 NL2SP="tr '\015\012' '\040\040'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
100 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
101 esac |
0 | 102 |
103 # NLS nuisances. | |
104 # Only set LANG and LC_ALL to C if already set. | |
105 # These must not be set unconditionally because not all systems understand | |
106 # e.g. LANG=C (notably SCO). | |
107 # We save the old values to restore during execute mode. | |
108 if test "${LC_ALL+set}" = set; then | |
109 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL | |
110 fi | |
111 if test "${LANG+set}" = set; then | |
112 save_LANG="$LANG"; LANG=C; export LANG | |
113 fi | |
114 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
115 # Make sure IFS has a sensible default |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
116 : ${IFS=" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
117 "} |
0 | 118 |
119 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
120 $echo "$modename: not configured to build any kind of library" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
121 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
122 exit $EXIT_FAILURE |
0 | 123 fi |
124 | |
125 # Global variables. | |
126 mode=$default_mode | |
127 nonopt= | |
128 prev= | |
129 prevopt= | |
130 run= | |
131 show="$echo" | |
132 show_help= | |
133 execute_dlfiles= | |
134 lo2o="s/\\.lo\$/.${objext}/" | |
135 o2lo="s/\\.${objext}\$/.lo/" | |
136 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
137 ##################################### |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
138 # Shell function definitions: |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
139 # This seems to be the best place for them |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
140 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
141 # func_win32_libid arg |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
142 # return the library type of file 'arg' |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
143 # |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
144 # Need a lot of goo to handle *both* DLLs and import libs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
145 # Has to be a shell function in order to 'eat' the argument |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
146 # that is supplied when $file_magic_command is called. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
147 func_win32_libid () { |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
148 win32_libid_type="unknown" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
149 win32_fileres=`file -L $1 2>/dev/null` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
150 case $win32_fileres in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
151 *ar\ archive\ import\ library*) # definitely import |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
152 win32_libid_type="x86 archive import" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
153 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
154 *ar\ archive*) # could be an import, or static |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
155 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
156 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
157 win32_nmres=`eval $NM -f posix -A $1 | \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
158 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
159 if test "X$win32_nmres" = "Ximport" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
160 win32_libid_type="x86 archive import" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
161 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
162 win32_libid_type="x86 archive static" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
163 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
164 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
165 ;; |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
166 *DLL*) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
167 win32_libid_type="x86 DLL" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
168 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
169 *executable*) # but shell scripts are "executable" too... |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
170 case $win32_fileres in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
171 *MS\ Windows\ PE\ Intel*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
172 win32_libid_type="x86 DLL" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
173 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
174 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
175 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
176 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
177 $echo $win32_libid_type |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
178 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
179 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
180 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
181 # func_infer_tag arg |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
182 # Infer tagged configuration to use if any are available and |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
183 # if one wasn't chosen via the "--tag" command line option. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
184 # Only attempt this if the compiler in the base compile |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
185 # command doesn't match the default compiler. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
186 # arg is usually of the form 'gcc ...' |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
187 func_infer_tag () { |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
188 if test -n "$available_tags" && test -z "$tagname"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
189 CC_quoted= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
190 for arg in $CC; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
191 case $arg in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
192 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
193 arg="\"$arg\"" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
194 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
195 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
196 CC_quoted="$CC_quoted $arg" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
197 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
198 case $@ in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
199 # Blanks in the command may have been stripped by the calling shell, |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
200 # but not from the CC environment variable when configure was run. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
201 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
202 # Blanks at the start of $base_compile will cause this to fail |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
203 # if we don't check for them as well. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
204 *) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
205 for z in $available_tags; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
206 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
207 # Evaluate the configuration. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
208 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
209 CC_quoted= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
210 for arg in $CC; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
211 # Double-quote args containing other shell metacharacters. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
212 case $arg in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
213 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
214 arg="\"$arg\"" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
215 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
216 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
217 CC_quoted="$CC_quoted $arg" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
218 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
219 case "$@ " in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
220 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
221 # The compiler in the base compile command matches |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
222 # the one in the tagged configuration. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
223 # Assume this is the tagged configuration we want. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
224 tagname=$z |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
225 break |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
226 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
227 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
228 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
229 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
230 # If $tagname still isn't set, then no tagged configuration |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
231 # was found and let the user know that the "--tag" command |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
232 # line option must be used. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
233 if test -z "$tagname"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
234 $echo "$modename: unable to infer tagged configuration" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
235 $echo "$modename: specify a tag with \`--tag'" 1>&2 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
236 exit $EXIT_FAILURE |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
237 # else |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
238 # $echo "$modename: using $tagname tagged configuration" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
239 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
240 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
241 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
242 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
243 } |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
244 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
245 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
246 # func_extract_archives gentop oldlib ... |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
247 func_extract_archives () { |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
248 my_gentop="$1"; shift |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
249 my_oldlibs=${1+"$@"} |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
250 my_oldobjs="" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
251 my_xlib="" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
252 my_xabs="" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
253 my_xdir="" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
254 my_status="" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
255 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
256 $show "${rm}r $my_gentop" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
257 $run ${rm}r "$my_gentop" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
258 $show "$mkdir $my_gentop" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
259 $run $mkdir "$my_gentop" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
260 my_status=$? |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
261 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
262 exit $my_status |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
263 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
264 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
265 for my_xlib in $my_oldlibs; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
266 # Extract the objects. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
267 case $my_xlib in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
268 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
269 *) my_xabs=`pwd`"/$my_xlib" ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
270 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
271 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
272 my_xdir="$my_gentop/$my_xlib" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
273 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
274 $show "${rm}r $my_xdir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
275 $run ${rm}r "$my_xdir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
276 $show "$mkdir $my_xdir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
277 $run $mkdir "$my_xdir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
278 status=$? |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
279 if test "$status" -ne 0 && test ! -d "$my_xdir"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
280 exit $status |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
281 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
282 case $host in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
283 *-darwin*) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
284 $show "Extracting $my_xabs" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
285 # Do not bother doing anything if just a dry run |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
286 if test -z "$run"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
287 darwin_orig_dir=`pwd` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
288 cd $my_xdir || exit $? |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
289 darwin_archive=$my_xabs |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
290 darwin_curdir=`pwd` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
291 darwin_base_archive=`basename $darwin_archive` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
292 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
293 if test -n "$darwin_arches"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
294 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
295 darwin_arch= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
296 $show "$darwin_base_archive has multiple architectures $darwin_arches" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
297 for darwin_arch in $darwin_arches ; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
298 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
299 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
300 # Remove the table of contents from the thin files. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
301 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
302 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
303 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
304 $AR -xo "${darwin_base_archive}" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
305 rm "${darwin_base_archive}" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
306 cd "$darwin_curdir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
307 done # $darwin_arches |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
308 ## Okay now we have a bunch of thin objects, gotta fatten them up :) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
309 darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
310 darwin_file= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
311 darwin_files= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
312 for darwin_file in $darwin_filelist; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
313 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
314 lipo -create -output "$darwin_file" $darwin_files |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
315 done # $darwin_filelist |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
316 rm -rf unfat-$$ |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
317 cd "$darwin_orig_dir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
318 else |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
319 cd $darwin_orig_dir |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
320 (cd $my_xdir && $AR x $my_xabs) || exit $? |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
321 fi # $darwin_arches |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
322 fi # $run |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
323 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
324 *) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
325 # We will extract separately just the conflicting names and we will |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
326 # no longer touch any unique names. It is faster to leave these |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
327 # extract automatically by $AR in one run. |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
328 $show "(cd $my_xdir && $AR x $my_xabs)" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
329 $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $? |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
330 if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
331 : |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
332 else |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
333 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
334 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
335 $AR t "$my_xabs" | sort | uniq -cd | while read -r count name |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
336 do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
337 i=1 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
338 while test "$i" -le "$count" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
339 do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
340 # Put our $i before any first dot (extension) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
341 # Never overwrite any file |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
342 name_to="$name" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
343 while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
344 do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
345 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
346 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
347 $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
348 $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $? |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
349 i=`expr $i + 1` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
350 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
351 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
352 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
353 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
354 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
355 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
356 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
357 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
358 func_extract_archives_result="$my_oldobjs" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
359 } |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
360 # End of Shell function definitions |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
361 ##################################### |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
362 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
363 # Darwin sucks |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
364 eval std_shrext=\"$shrext_cmds\" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
365 |
0 | 366 # Parse our command line options once, thoroughly. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
367 while test "$#" -gt 0 |
0 | 368 do |
369 arg="$1" | |
370 shift | |
371 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
372 case $arg in |
0 | 373 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; |
374 *) optarg= ;; | |
375 esac | |
376 | |
377 # If the previous option needs an argument, assign it. | |
378 if test -n "$prev"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
379 case $prev in |
0 | 380 execute_dlfiles) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
381 execute_dlfiles="$execute_dlfiles $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
382 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
383 tag) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
384 tagname="$arg" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
385 preserve_args="${preserve_args}=$arg" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
386 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
387 # Check whether tagname contains only valid characters |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
388 case $tagname in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
389 *[!-_A-Za-z0-9,/]*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
390 $echo "$progname: invalid tag name: $tagname" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
391 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
392 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
393 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
394 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
395 case $tagname in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
396 CC) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
397 # Don't test for the "default" C tag, as we know, it's there, but |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
398 # not specially marked. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
399 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
400 *) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
401 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
402 taglist="$taglist $tagname" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
403 # Evaluate the configuration. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
404 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
405 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
406 $echo "$progname: ignoring unknown tag $tagname" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
407 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
408 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
409 esac |
0 | 410 ;; |
411 *) | |
412 eval "$prev=\$arg" | |
413 ;; | |
414 esac | |
415 | |
416 prev= | |
417 prevopt= | |
418 continue | |
419 fi | |
420 | |
421 # Have we seen a non-optional argument yet? | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
422 case $arg in |
0 | 423 --help) |
424 show_help=yes | |
425 ;; | |
426 | |
427 --version) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
428 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
429 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
430 $echo "Copyright (C) 2003 Free Software Foundation, Inc." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
431 $echo "This is free software; see the source for copying conditions. There is NO" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
432 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
433 exit $EXIT_SUCCESS |
0 | 434 ;; |
435 | |
436 --config) | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
437 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
438 # Now print the configurations for the tags. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
439 for tagname in $taglist; do |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
440 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
441 done |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
442 exit $EXIT_SUCCESS |
0 | 443 ;; |
444 | |
445 --debug) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
446 $echo "$progname: enabling shell trace mode" |
0 | 447 set -x |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
448 preserve_args="$preserve_args $arg" |
0 | 449 ;; |
450 | |
451 --dry-run | -n) | |
452 run=: | |
453 ;; | |
454 | |
455 --features) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
456 $echo "host: $host" |
0 | 457 if test "$build_libtool_libs" = yes; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
458 $echo "enable shared libraries" |
0 | 459 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
460 $echo "disable shared libraries" |
0 | 461 fi |
462 if test "$build_old_libs" = yes; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
463 $echo "enable static libraries" |
0 | 464 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
465 $echo "disable static libraries" |
0 | 466 fi |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
467 exit $EXIT_SUCCESS |
0 | 468 ;; |
469 | |
470 --finish) mode="finish" ;; | |
471 | |
472 --mode) prevopt="--mode" prev=mode ;; | |
473 --mode=*) mode="$optarg" ;; | |
474 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
475 --preserve-dup-deps) duplicate_deps="yes" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
476 |
0 | 477 --quiet | --silent) |
478 show=: | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
479 preserve_args="$preserve_args $arg" |
0 | 480 ;; |
481 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
482 --tag) prevopt="--tag" prev=tag ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
483 --tag=*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
484 set tag "$optarg" ${1+"$@"} |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
485 shift |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
486 prev=tag |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
487 preserve_args="$preserve_args --tag" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
488 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
489 |
0 | 490 -dlopen) |
491 prevopt="-dlopen" | |
492 prev=execute_dlfiles | |
493 ;; | |
494 | |
495 -*) | |
496 $echo "$modename: unrecognized option \`$arg'" 1>&2 | |
497 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
498 exit $EXIT_FAILURE |
0 | 499 ;; |
500 | |
501 *) | |
502 nonopt="$arg" | |
503 break | |
504 ;; | |
505 esac | |
506 done | |
507 | |
508 if test -n "$prevopt"; then | |
509 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 | |
510 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
511 exit $EXIT_FAILURE |
0 | 512 fi |
513 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
514 # If this variable is set in any of the actions, the command in it |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
515 # will be execed at the end. This prevents here-documents from being |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
516 # left over by shells. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
517 exec_cmd= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
518 |
0 | 519 if test -z "$show_help"; then |
520 | |
521 # Infer the operation mode. | |
522 if test -z "$mode"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
523 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
524 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
525 case $nonopt in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
526 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) |
0 | 527 mode=link |
528 for arg | |
529 do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
530 case $arg in |
0 | 531 -c) |
532 mode=compile | |
533 break | |
534 ;; | |
535 esac | |
536 done | |
537 ;; | |
538 *db | *dbx | *strace | *truss) | |
539 mode=execute | |
540 ;; | |
541 *install*|cp|mv) | |
542 mode=install | |
543 ;; | |
544 *rm) | |
545 mode=uninstall | |
546 ;; | |
547 *) | |
548 # If we have no mode, but dlfiles were specified, then do execute mode. | |
549 test -n "$execute_dlfiles" && mode=execute | |
550 | |
551 # Just use the default operation mode. | |
552 if test -z "$mode"; then | |
553 if test -n "$nonopt"; then | |
554 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 | |
555 else | |
556 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 | |
557 fi | |
558 fi | |
559 ;; | |
560 esac | |
561 fi | |
562 | |
563 # Only execute mode is allowed to have -dlopen flags. | |
564 if test -n "$execute_dlfiles" && test "$mode" != execute; then | |
565 $echo "$modename: unrecognized option \`-dlopen'" 1>&2 | |
566 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
567 exit $EXIT_FAILURE |
0 | 568 fi |
569 | |
570 # Change the help message to a mode-specific one. | |
571 generic_help="$help" | |
572 help="Try \`$modename --help --mode=$mode' for more information." | |
573 | |
574 # These modes are in order of execution frequency so that they run quickly. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
575 case $mode in |
0 | 576 # libtool compile mode |
577 compile) | |
578 modename="$modename: compile" | |
579 # Get the compilation command and the source file. | |
580 base_compile= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
581 srcfile="$nonopt" # always keep a non-empty value in "srcfile" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
582 suppress_opt=yes |
0 | 583 suppress_output= |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
584 arg_mode=normal |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
585 libobj= |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
586 later= |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
587 |
0 | 588 for arg |
589 do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
590 case "$arg_mode" in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
591 arg ) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
592 # do not "continue". Instead, add this to base_compile |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
593 lastarg="$arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
594 arg_mode=normal |
0 | 595 ;; |
596 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
597 target ) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
598 libobj="$arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
599 arg_mode=normal |
0 | 600 continue |
601 ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
602 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
603 normal ) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
604 # Accept any command-line options. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
605 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
606 -o) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
607 if test -n "$libobj" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
608 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
609 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
610 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
611 arg_mode=target |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
612 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
613 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
614 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
615 -static | -prefer-pic | -prefer-non-pic) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
616 later="$later $arg" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
617 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
618 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
619 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
620 -no-suppress) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
621 suppress_opt=no |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
622 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
623 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
624 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
625 -Xcompiler) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
626 arg_mode=arg # the next one goes into the "base_compile" arg list |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
627 continue # The current "srcfile" will either be retained or |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
628 ;; # replaced later. I would guess that would be a bug. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
629 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
630 -Wc,*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
631 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
632 lastarg= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
633 save_ifs="$IFS"; IFS=',' |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
634 for arg in $args; do |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
635 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
636 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
637 # Double-quote args containing other shell metacharacters. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
638 # Many Bourne shells cannot handle close brackets correctly |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
639 # in scan sets, so we specify it separately. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
640 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
641 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
642 arg="\"$arg\"" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
643 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
644 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
645 lastarg="$lastarg $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
646 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
647 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
648 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
649 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
650 # Add the arguments to base_compile. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
651 base_compile="$base_compile $lastarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
652 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
653 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
654 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
655 * ) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
656 # Accept the current argument as the source file. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
657 # The previous "srcfile" becomes the current argument. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
658 # |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
659 lastarg="$srcfile" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
660 srcfile="$arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
661 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
662 esac # case $arg |
0 | 663 ;; |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
664 esac # case $arg_mode |
0 | 665 |
666 # Aesthetically quote the previous argument. | |
667 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` | |
668 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
669 case $lastarg in |
0 | 670 # Double-quote args containing other shell metacharacters. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
671 # Many Bourne shells cannot handle close brackets correctly |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
672 # in scan sets, so we specify it separately. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
673 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
0 | 674 lastarg="\"$lastarg\"" |
675 ;; | |
676 esac | |
677 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
678 base_compile="$base_compile $lastarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
679 done # for arg |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
680 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
681 case $arg_mode in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
682 arg) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
683 $echo "$modename: you must specify an argument for -Xcompile" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
684 exit $EXIT_FAILURE |
0 | 685 ;; |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
686 target) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
687 $echo "$modename: you must specify a target with \`-o'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
688 exit $EXIT_FAILURE |
0 | 689 ;; |
690 *) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
691 # Get the name of the library object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
692 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` |
0 | 693 ;; |
694 esac | |
695 | |
696 # Recognize several different file suffixes. | |
697 # If the user specifies -o file.o, it is replaced with file.lo | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
698 xform='[cCFSifmso]' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
699 case $libobj in |
0 | 700 *.ada) xform=ada ;; |
701 *.adb) xform=adb ;; | |
702 *.ads) xform=ads ;; | |
703 *.asm) xform=asm ;; | |
704 *.c++) xform=c++ ;; | |
705 *.cc) xform=cc ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
706 *.ii) xform=ii ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
707 *.class) xform=class ;; |
0 | 708 *.cpp) xform=cpp ;; |
709 *.cxx) xform=cxx ;; | |
710 *.f90) xform=f90 ;; | |
711 *.for) xform=for ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
712 *.java) xform=java ;; |
0 | 713 esac |
714 | |
715 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` | |
716 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
717 case $libobj in |
0 | 718 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; |
719 *) | |
720 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
721 exit $EXIT_FAILURE |
0 | 722 ;; |
723 esac | |
724 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
725 func_infer_tag $base_compile |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
726 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
727 for arg in $later; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
728 case $arg in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
729 -static) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
730 build_old_libs=yes |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
731 continue |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
732 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
733 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
734 -prefer-pic) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
735 pic_mode=yes |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
736 continue |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
737 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
738 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
739 -prefer-non-pic) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
740 pic_mode=no |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
741 continue |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
742 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
743 esac |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
744 done |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
745 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
746 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
747 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
748 if test "X$xdir" = "X$obj"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
749 xdir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
750 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
751 xdir=$xdir/ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
752 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
753 lobj=${xdir}$objdir/$objname |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
754 |
0 | 755 if test -z "$base_compile"; then |
756 $echo "$modename: you must specify a compilation command" 1>&2 | |
757 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
758 exit $EXIT_FAILURE |
0 | 759 fi |
760 | |
761 # Delete any leftover library objects. | |
762 if test "$build_old_libs" = yes; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
763 removelist="$obj $lobj $libobj ${libobj}T" |
0 | 764 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
765 removelist="$lobj $libobj ${libobj}T" |
0 | 766 fi |
767 | |
768 $run $rm $removelist | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
769 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 |
0 | 770 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
771 # On Cygwin there's no "real" PIC flag so we must build both object types |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
772 case $host_os in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
773 cygwin* | mingw* | pw32* | os2*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
774 pic_mode=default |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
775 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
776 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
777 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
778 # non-PIC code in shared libraries is not supported |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
779 pic_mode=default |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
780 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
781 |
0 | 782 # Calculate the filename of the output object if compiler does |
783 # not support -o with -c | |
784 if test "$compiler_c_o" = no; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
785 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} |
0 | 786 lockfile="$output_obj.lock" |
787 removelist="$removelist $output_obj $lockfile" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
788 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 |
0 | 789 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
790 output_obj= |
0 | 791 need_locks=no |
792 lockfile= | |
793 fi | |
794 | |
795 # Lock this critical section if it is needed | |
796 # We use this script file to make the link, it avoids creating a new file | |
797 if test "$need_locks" = yes; then | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
798 until $run ln "$progpath" "$lockfile" 2>/dev/null; do |
0 | 799 $show "Waiting for $lockfile to be removed" |
800 sleep 2 | |
801 done | |
802 elif test "$need_locks" = warn; then | |
803 if test -f "$lockfile"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
804 $echo "\ |
0 | 805 *** ERROR, $lockfile exists and contains: |
806 `cat $lockfile 2>/dev/null` | |
807 | |
808 This indicates that another process is trying to use the same | |
809 temporary object file, and libtool could not work around it because | |
810 your compiler does not support \`-c' and \`-o' together. If you | |
811 repeat this compilation, it may succeed, by chance, but you had better | |
812 avoid parallel builds (make -j) in this platform, or get a better | |
813 compiler." | |
814 | |
815 $run $rm $removelist | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
816 exit $EXIT_FAILURE |
0 | 817 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
818 $echo $srcfile > "$lockfile" |
0 | 819 fi |
820 | |
821 if test -n "$fix_srcfile_path"; then | |
822 eval srcfile=\"$fix_srcfile_path\" | |
823 fi | |
824 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
825 $run $rm "$libobj" "${libobj}T" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
826 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
827 # Create a libtool object file (analogous to a ".la" file), |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
828 # but don't create it if we're doing a dry run. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
829 test -z "$run" && cat > ${libobj}T <<EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
830 # $libobj - a libtool object file |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
831 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
832 # |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
833 # Please DO NOT delete this file! |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
834 # It is necessary for linking the library. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
835 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
836 # Name of the PIC object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
837 EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
838 |
0 | 839 # Only build a PIC object if we are building libtool libraries. |
840 if test "$build_libtool_libs" = yes; then | |
841 # Without this assignment, base_compile gets emptied. | |
842 fbsd_hideous_sh_bug=$base_compile | |
843 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
844 if test "$pic_mode" != no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
845 command="$base_compile $srcfile $pic_flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
846 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
847 # Don't build PIC code |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
848 command="$base_compile $srcfile" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
849 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
850 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
851 if test ! -d "${xdir}$objdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
852 $show "$mkdir ${xdir}$objdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
853 $run $mkdir ${xdir}$objdir |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
854 status=$? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
855 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
856 exit $status |
0 | 857 fi |
858 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
859 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
860 if test -z "$output_obj"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
861 # Place PIC objects in $objdir |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
862 command="$command -o $lobj" |
0 | 863 fi |
864 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
865 $run $rm "$lobj" "$output_obj" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
866 |
0 | 867 $show "$command" |
868 if $run eval "$command"; then : | |
869 else | |
870 test -n "$output_obj" && $run $rm $removelist | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
871 exit $EXIT_FAILURE |
0 | 872 fi |
873 | |
874 if test "$need_locks" = warn && | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
875 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
876 $echo "\ |
0 | 877 *** ERROR, $lockfile contains: |
878 `cat $lockfile 2>/dev/null` | |
879 | |
880 but it should contain: | |
881 $srcfile | |
882 | |
883 This indicates that another process is trying to use the same | |
884 temporary object file, and libtool could not work around it because | |
885 your compiler does not support \`-c' and \`-o' together. If you | |
886 repeat this compilation, it may succeed, by chance, but you had better | |
887 avoid parallel builds (make -j) in this platform, or get a better | |
888 compiler." | |
889 | |
890 $run $rm $removelist | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
891 exit $EXIT_FAILURE |
0 | 892 fi |
893 | |
894 # Just move the object if needed, then go on to compile the next one | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
895 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
896 $show "$mv $output_obj $lobj" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
897 if $run $mv $output_obj $lobj; then : |
0 | 898 else |
899 error=$? | |
900 $run $rm $removelist | |
901 exit $error | |
902 fi | |
903 fi | |
904 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
905 # Append the name of the PIC object to the libtool object file. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
906 test -z "$run" && cat >> ${libobj}T <<EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
907 pic_object='$objdir/$objname' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
908 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
909 EOF |
0 | 910 |
911 # Allow error messages only from the first compilation. | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
912 if test "$suppress_opt" = yes; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
913 suppress_output=' >/dev/null 2>&1' |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
914 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
915 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
916 # No PIC object so indicate it doesn't exist in the libtool |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
917 # object file. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
918 test -z "$run" && cat >> ${libobj}T <<EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
919 pic_object=none |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
920 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
921 EOF |
0 | 922 fi |
923 | |
924 # Only build a position-dependent object if we build old libraries. | |
925 if test "$build_old_libs" = yes; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
926 if test "$pic_mode" != yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
927 # Don't build PIC code |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
928 command="$base_compile $srcfile" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
929 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
930 command="$base_compile $srcfile $pic_flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
931 fi |
0 | 932 if test "$compiler_c_o" = yes; then |
933 command="$command -o $obj" | |
934 fi | |
935 | |
936 # Suppress compiler output if we already did a PIC compilation. | |
937 command="$command$suppress_output" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
938 $run $rm "$obj" "$output_obj" |
0 | 939 $show "$command" |
940 if $run eval "$command"; then : | |
941 else | |
942 $run $rm $removelist | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
943 exit $EXIT_FAILURE |
0 | 944 fi |
945 | |
946 if test "$need_locks" = warn && | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
947 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
948 $echo "\ |
0 | 949 *** ERROR, $lockfile contains: |
950 `cat $lockfile 2>/dev/null` | |
951 | |
952 but it should contain: | |
953 $srcfile | |
954 | |
955 This indicates that another process is trying to use the same | |
956 temporary object file, and libtool could not work around it because | |
957 your compiler does not support \`-c' and \`-o' together. If you | |
958 repeat this compilation, it may succeed, by chance, but you had better | |
959 avoid parallel builds (make -j) in this platform, or get a better | |
960 compiler." | |
961 | |
962 $run $rm $removelist | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
963 exit $EXIT_FAILURE |
0 | 964 fi |
965 | |
966 # Just move the object if needed | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
967 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then |
0 | 968 $show "$mv $output_obj $obj" |
969 if $run $mv $output_obj $obj; then : | |
970 else | |
971 error=$? | |
972 $run $rm $removelist | |
973 exit $error | |
974 fi | |
975 fi | |
976 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
977 # Append the name of the non-PIC object the libtool object file. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
978 # Only append if the libtool object file exists. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
979 test -z "$run" && cat >> ${libobj}T <<EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
980 # Name of the non-PIC object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
981 non_pic_object='$objname' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
982 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
983 EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
984 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
985 # Append the name of the non-PIC object the libtool object file. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
986 # Only append if the libtool object file exists. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
987 test -z "$run" && cat >> ${libobj}T <<EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
988 # Name of the non-PIC object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
989 non_pic_object=none |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
990 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
991 EOF |
0 | 992 fi |
993 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
994 $run $mv "${libobj}T" "${libobj}" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
995 |
0 | 996 # Unlock the critical section if it was locked |
997 if test "$need_locks" != no; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
998 $run $rm "$lockfile" |
0 | 999 fi |
1000 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1001 exit $EXIT_SUCCESS |
0 | 1002 ;; |
1003 | |
1004 # libtool link mode | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1005 link | relink) |
0 | 1006 modename="$modename: link" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1007 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1008 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
0 | 1009 # It is impossible to link a dll without this setting, and |
1010 # we shouldn't force the makefile maintainer to figure out | |
1011 # which system we are compiling for in order to pass an extra | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1012 # flag for every libtool invocation. |
0 | 1013 # allow_undefined=no |
1014 | |
1015 # FIXME: Unfortunately, there are problems with the above when trying | |
1016 # to make a dll which has undefined symbols, in which case not | |
1017 # even a static library is built. For now, we need to specify | |
1018 # -no-undefined on the libtool link line when we can be certain | |
1019 # that all symbols are satisfied, otherwise we get a static library. | |
1020 allow_undefined=yes | |
1021 ;; | |
1022 *) | |
1023 allow_undefined=yes | |
1024 ;; | |
1025 esac | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1026 libtool_args="$nonopt" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1027 base_compile="$nonopt $@" |
0 | 1028 compile_command="$nonopt" |
1029 finalize_command="$nonopt" | |
1030 | |
1031 compile_rpath= | |
1032 finalize_rpath= | |
1033 compile_shlibpath= | |
1034 finalize_shlibpath= | |
1035 convenience= | |
1036 old_convenience= | |
1037 deplibs= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1038 old_deplibs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1039 compiler_flags= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1040 linker_flags= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1041 dllsearchpath= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1042 lib_search_path=`pwd` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1043 inst_prefix_dir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1044 |
0 | 1045 avoid_version=no |
1046 dlfiles= | |
1047 dlprefiles= | |
1048 dlself=no | |
1049 export_dynamic=no | |
1050 export_symbols= | |
1051 export_symbols_regex= | |
1052 generated= | |
1053 libobjs= | |
1054 ltlibs= | |
1055 module=no | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1056 no_install=no |
0 | 1057 objs= |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1058 non_pic_objects= |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1059 precious_files_regex= |
0 | 1060 prefer_static_libs=no |
1061 preload=no | |
1062 prev= | |
1063 prevarg= | |
1064 release= | |
1065 rpath= | |
1066 xrpath= | |
1067 perm_rpath= | |
1068 temp_rpath= | |
1069 thread_safe=no | |
1070 vinfo= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1071 vinfo_number=no |
0 | 1072 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1073 func_infer_tag $base_compile |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1074 |
0 | 1075 # We need to know -static, to get the right output filenames. |
1076 for arg | |
1077 do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1078 case $arg in |
0 | 1079 -all-static | -static) |
1080 if test "X$arg" = "X-all-static"; then | |
1081 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then | |
1082 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 | |
1083 fi | |
1084 if test -n "$link_static_flag"; then | |
1085 dlopen_self=$dlopen_self_static | |
1086 fi | |
1087 else | |
1088 if test -z "$pic_flag" && test -n "$link_static_flag"; then | |
1089 dlopen_self=$dlopen_self_static | |
1090 fi | |
1091 fi | |
1092 build_libtool_libs=no | |
1093 build_old_libs=yes | |
1094 prefer_static_libs=yes | |
1095 break | |
1096 ;; | |
1097 esac | |
1098 done | |
1099 | |
1100 # See if our shared archives depend on static archives. | |
1101 test -n "$old_archive_from_new_cmds" && build_old_libs=yes | |
1102 | |
1103 # Go through the arguments, transforming them on the way. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1104 while test "$#" -gt 0; do |
0 | 1105 arg="$1" |
1106 shift | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1107 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1108 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1109 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1110 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1111 *) qarg=$arg ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1112 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1113 libtool_args="$libtool_args $qarg" |
0 | 1114 |
1115 # If the previous option needs an argument, assign it. | |
1116 if test -n "$prev"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1117 case $prev in |
0 | 1118 output) |
1119 compile_command="$compile_command @OUTPUT@" | |
1120 finalize_command="$finalize_command @OUTPUT@" | |
1121 ;; | |
1122 esac | |
1123 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1124 case $prev in |
0 | 1125 dlfiles|dlprefiles) |
1126 if test "$preload" = no; then | |
1127 # Add the symbol object into the linking commands. | |
1128 compile_command="$compile_command @SYMFILE@" | |
1129 finalize_command="$finalize_command @SYMFILE@" | |
1130 preload=yes | |
1131 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1132 case $arg in |
0 | 1133 *.la | *.lo) ;; # We handle these cases below. |
1134 force) | |
1135 if test "$dlself" = no; then | |
1136 dlself=needless | |
1137 export_dynamic=yes | |
1138 fi | |
1139 prev= | |
1140 continue | |
1141 ;; | |
1142 self) | |
1143 if test "$prev" = dlprefiles; then | |
1144 dlself=yes | |
1145 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then | |
1146 dlself=yes | |
1147 else | |
1148 dlself=needless | |
1149 export_dynamic=yes | |
1150 fi | |
1151 prev= | |
1152 continue | |
1153 ;; | |
1154 *) | |
1155 if test "$prev" = dlfiles; then | |
1156 dlfiles="$dlfiles $arg" | |
1157 else | |
1158 dlprefiles="$dlprefiles $arg" | |
1159 fi | |
1160 prev= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1161 continue |
0 | 1162 ;; |
1163 esac | |
1164 ;; | |
1165 expsyms) | |
1166 export_symbols="$arg" | |
1167 if test ! -f "$arg"; then | |
1168 $echo "$modename: symbol file \`$arg' does not exist" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1169 exit $EXIT_FAILURE |
0 | 1170 fi |
1171 prev= | |
1172 continue | |
1173 ;; | |
1174 expsyms_regex) | |
1175 export_symbols_regex="$arg" | |
1176 prev= | |
1177 continue | |
1178 ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1179 inst_prefix) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1180 inst_prefix_dir="$arg" |
387
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
1181 prev= |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
1182 continue |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
1183 ;; |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1184 precious_regex) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1185 precious_files_regex="$arg" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1186 prev= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1187 continue |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1188 ;; |
0 | 1189 release) |
1190 release="-$arg" | |
1191 prev= | |
1192 continue | |
1193 ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1194 objectlist) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1195 if test -f "$arg"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1196 save_arg=$arg |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1197 moreargs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1198 for fil in `cat $save_arg` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1199 do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1200 # moreargs="$moreargs $fil" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1201 arg=$fil |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1202 # A libtool-controlled object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1203 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1204 # Check to see that this really is a libtool object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1205 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1206 pic_object= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1207 non_pic_object= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1208 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1209 # Read the .lo file |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1210 # If there is no directory component, then add one. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1211 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1212 */* | *\\*) . $arg ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1213 *) . ./$arg ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1214 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1215 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1216 if test -z "$pic_object" || \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1217 test -z "$non_pic_object" || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1218 test "$pic_object" = none && \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1219 test "$non_pic_object" = none; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1220 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1221 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1222 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1223 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1224 # Extract subdirectory from the argument. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1225 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1226 if test "X$xdir" = "X$arg"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1227 xdir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1228 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1229 xdir="$xdir/" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1230 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1231 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1232 if test "$pic_object" != none; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1233 # Prepend the subdirectory the object is found in. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1234 pic_object="$xdir$pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1235 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1236 if test "$prev" = dlfiles; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1237 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1238 dlfiles="$dlfiles $pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1239 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1240 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1241 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1242 # If libtool objects are unsupported, then we need to preload. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1243 prev=dlprefiles |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1244 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1245 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1246 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1247 # CHECK ME: I think I busted this. -Ossama |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1248 if test "$prev" = dlprefiles; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1249 # Preload the old-style object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1250 dlprefiles="$dlprefiles $pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1251 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1252 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1253 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1254 # A PIC object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1255 libobjs="$libobjs $pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1256 arg="$pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1257 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1258 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1259 # Non-PIC object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1260 if test "$non_pic_object" != none; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1261 # Prepend the subdirectory the object is found in. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1262 non_pic_object="$xdir$non_pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1263 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1264 # A standard non-PIC object |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1265 non_pic_objects="$non_pic_objects $non_pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1266 if test -z "$pic_object" || test "$pic_object" = none ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1267 arg="$non_pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1268 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1269 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1270 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1271 # Only an error if not doing a dry-run. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1272 if test -z "$run"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1273 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1274 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1275 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1276 # Dry-run case. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1277 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1278 # Extract subdirectory from the argument. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1279 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1280 if test "X$xdir" = "X$arg"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1281 xdir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1282 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1283 xdir="$xdir/" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1284 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1285 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1286 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1287 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1288 libobjs="$libobjs $pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1289 non_pic_objects="$non_pic_objects $non_pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1290 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1291 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1292 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1293 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1294 $echo "$modename: link input file \`$save_arg' does not exist" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1295 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1296 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1297 arg=$save_arg |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1298 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1299 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1300 ;; |
0 | 1301 rpath | xrpath) |
1302 # We need an absolute path. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1303 case $arg in |
0 | 1304 [\\/]* | [A-Za-z]:[\\/]*) ;; |
1305 *) | |
1306 $echo "$modename: only absolute run-paths are allowed" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1307 exit $EXIT_FAILURE |
0 | 1308 ;; |
1309 esac | |
1310 if test "$prev" = rpath; then | |
1311 case "$rpath " in | |
1312 *" $arg "*) ;; | |
1313 *) rpath="$rpath $arg" ;; | |
1314 esac | |
1315 else | |
1316 case "$xrpath " in | |
1317 *" $arg "*) ;; | |
1318 *) xrpath="$xrpath $arg" ;; | |
1319 esac | |
1320 fi | |
1321 prev= | |
1322 continue | |
1323 ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1324 xcompiler) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1325 compiler_flags="$compiler_flags $qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1326 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1327 compile_command="$compile_command $qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1328 finalize_command="$finalize_command $qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1329 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1330 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1331 xlinker) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1332 linker_flags="$linker_flags $qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1333 compiler_flags="$compiler_flags $wl$qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1334 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1335 compile_command="$compile_command $wl$qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1336 finalize_command="$finalize_command $wl$qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1337 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1338 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1339 xcclinker) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1340 linker_flags="$linker_flags $qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1341 compiler_flags="$compiler_flags $qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1342 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1343 compile_command="$compile_command $qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1344 finalize_command="$finalize_command $qarg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1345 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1346 ;; |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1347 framework) |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1348 case $host in |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1349 *-*-darwin*) |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1350 case "$deplibs " in |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1351 *" $qarg.framework "*) ;; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1352 *) deplibs="$deplibs $qarg.framework" # this is fixed later |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1353 ;; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1354 esac |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1355 ;; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1356 esac |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1357 prev= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1358 continue |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1359 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1360 shrext) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1361 shrext_cmds="$arg" |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1362 prev= |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1363 continue |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1364 ;; |
0 | 1365 *) |
1366 eval "$prev=\"\$arg\"" | |
1367 prev= | |
1368 continue | |
1369 ;; | |
1370 esac | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1371 fi # test -n "$prev" |
0 | 1372 |
1373 prevarg="$arg" | |
1374 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1375 case $arg in |
0 | 1376 -all-static) |
1377 if test -n "$link_static_flag"; then | |
1378 compile_command="$compile_command $link_static_flag" | |
1379 finalize_command="$finalize_command $link_static_flag" | |
1380 fi | |
1381 continue | |
1382 ;; | |
1383 | |
1384 -allow-undefined) | |
1385 # FIXME: remove this flag sometime in the future. | |
1386 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 | |
1387 continue | |
1388 ;; | |
1389 | |
1390 -avoid-version) | |
1391 avoid_version=yes | |
1392 continue | |
1393 ;; | |
1394 | |
1395 -dlopen) | |
1396 prev=dlfiles | |
1397 continue | |
1398 ;; | |
1399 | |
1400 -dlpreopen) | |
1401 prev=dlprefiles | |
1402 continue | |
1403 ;; | |
1404 | |
1405 -export-dynamic) | |
1406 export_dynamic=yes | |
1407 continue | |
1408 ;; | |
1409 | |
1410 -export-symbols | -export-symbols-regex) | |
1411 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1412 $echo "$modename: more than one -exported-symbols argument is not allowed" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1413 exit $EXIT_FAILURE |
0 | 1414 fi |
1415 if test "X$arg" = "X-export-symbols"; then | |
1416 prev=expsyms | |
1417 else | |
1418 prev=expsyms_regex | |
1419 fi | |
1420 continue | |
1421 ;; | |
1422 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1423 -inst-prefix-dir) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1424 prev=inst_prefix |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1425 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1426 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1427 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1428 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1429 # so, if we see these flags be careful not to treat them like -L |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1430 -L[A-Z][A-Z]*:*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1431 case $with_gcc/$host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1432 no/*-*-irix* | /*-*-irix*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1433 compile_command="$compile_command $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1434 finalize_command="$finalize_command $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1435 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1436 esac |
387
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
1437 continue |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
1438 ;; |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
1439 |
0 | 1440 -L*) |
1441 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` | |
1442 # We need an absolute path. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1443 case $dir in |
0 | 1444 [\\/]* | [A-Za-z]:[\\/]*) ;; |
1445 *) | |
1446 absdir=`cd "$dir" && pwd` | |
1447 if test -z "$absdir"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1448 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1449 exit $EXIT_FAILURE |
0 | 1450 fi |
1451 dir="$absdir" | |
1452 ;; | |
1453 esac | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1454 case "$deplibs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1455 *" -L$dir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1456 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1457 deplibs="$deplibs -L$dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1458 lib_search_path="$lib_search_path $dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1459 ;; |
0 | 1460 esac |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1461 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1462 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1463 case :$dllsearchpath: in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1464 *":$dir:"*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1465 *) dllsearchpath="$dllsearchpath:$dir";; |
0 | 1466 esac |
1467 ;; | |
1468 esac | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1469 continue |
0 | 1470 ;; |
1471 | |
1472 -l*) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1473 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1474 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1475 *-*-cygwin* | *-*-pw32* | *-*-beos*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1476 # These systems don't actually have a C or math library (as such) |
0 | 1477 continue |
1478 ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1479 *-*-mingw* | *-*-os2*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1480 # These systems don't actually have a C library (as such) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1481 test "X$arg" = "X-lc" && continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1482 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1483 *-*-openbsd* | *-*-freebsd*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1484 # Do not include libc due to us having libc/libc_r. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1485 test "X$arg" = "X-lc" && continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1486 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1487 *-*-rhapsody* | *-*-darwin1.[012]) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1488 # Rhapsody C and math libraries are in the System framework |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1489 deplibs="$deplibs -framework System" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1490 continue |
0 | 1491 esac |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1492 elif test "X$arg" = "X-lc_r"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1493 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1494 *-*-openbsd* | *-*-freebsd*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1495 # Do not include libc_r directly, use -pthread flag. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1496 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1497 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1498 esac |
0 | 1499 fi |
1500 deplibs="$deplibs $arg" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1501 continue |
0 | 1502 ;; |
1503 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1504 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1505 deplibs="$deplibs $arg" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1506 continue |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1507 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1508 |
0 | 1509 -module) |
1510 module=yes | |
1511 continue | |
1512 ;; | |
1513 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1514 # gcc -m* arguments should be passed to the linker via $compiler_flags |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1515 # in order to pass architecture information to the linker |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1516 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1517 # but this is not reliable with gcc because gcc may use -mfoo to |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1518 # select a different linker, different libraries, etc, while |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1519 # -Wl,-mfoo simply passes -mfoo to the linker. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1520 -m*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1521 # Unknown arguments in both finalize_command and compile_command need |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1522 # to be aesthetically quoted because they are evaled later. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1523 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1524 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1525 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1526 arg="\"$arg\"" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1527 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1528 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1529 compile_command="$compile_command $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1530 finalize_command="$finalize_command $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1531 if test "$with_gcc" = "yes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1532 compiler_flags="$compiler_flags $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1533 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1534 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1535 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1536 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1537 -shrext) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1538 prev=shrext |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1539 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1540 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1541 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1542 -no-fast-install) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1543 fast_install=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1544 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1545 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1546 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1547 -no-install) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1548 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1549 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1550 # The PATH hackery in wrapper scripts is required on Windows |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1551 # in order for the loader to find any dlls it needs. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1552 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1553 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1554 fast_install=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1555 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1556 *) no_install=yes ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1557 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1558 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1559 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1560 |
0 | 1561 -no-undefined) |
1562 allow_undefined=no | |
1563 continue | |
1564 ;; | |
1565 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1566 -objectlist) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1567 prev=objectlist |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1568 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1569 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1570 |
0 | 1571 -o) prev=output ;; |
1572 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1573 -precious-files-regex) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1574 prev=precious_regex |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1575 continue |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1576 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1577 |
0 | 1578 -release) |
1579 prev=release | |
1580 continue | |
1581 ;; | |
1582 | |
1583 -rpath) | |
1584 prev=rpath | |
1585 continue | |
1586 ;; | |
1587 | |
1588 -R) | |
1589 prev=xrpath | |
1590 continue | |
1591 ;; | |
1592 | |
1593 -R*) | |
1594 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` | |
1595 # We need an absolute path. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1596 case $dir in |
0 | 1597 [\\/]* | [A-Za-z]:[\\/]*) ;; |
1598 *) | |
1599 $echo "$modename: only absolute run-paths are allowed" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1600 exit $EXIT_FAILURE |
0 | 1601 ;; |
1602 esac | |
1603 case "$xrpath " in | |
1604 *" $dir "*) ;; | |
1605 *) xrpath="$xrpath $dir" ;; | |
1606 esac | |
1607 continue | |
1608 ;; | |
1609 | |
1610 -static) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1611 # The effects of -static are defined in a previous loop. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1612 # We used to do the same as -all-static on platforms that |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1613 # didn't have a PIC flag, but the assumption that the effects |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1614 # would be equivalent was wrong. It would break on at least |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1615 # Digital Unix and AIX. |
0 | 1616 continue |
1617 ;; | |
1618 | |
1619 -thread-safe) | |
1620 thread_safe=yes | |
1621 continue | |
1622 ;; | |
1623 | |
1624 -version-info) | |
1625 prev=vinfo | |
1626 continue | |
1627 ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1628 -version-number) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1629 prev=vinfo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1630 vinfo_number=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1631 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1632 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1633 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1634 -Wc,*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1635 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1636 arg= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1637 save_ifs="$IFS"; IFS=',' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1638 for flag in $args; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1639 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1640 case $flag in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1641 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1642 flag="\"$flag\"" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1643 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1644 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1645 arg="$arg $wl$flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1646 compiler_flags="$compiler_flags $flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1647 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1648 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1649 arg=`$echo "X$arg" | $Xsed -e "s/^ //"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1650 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1651 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1652 -Wl,*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1653 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1654 arg= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1655 save_ifs="$IFS"; IFS=',' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1656 for flag in $args; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1657 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1658 case $flag in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1659 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1660 flag="\"$flag\"" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1661 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1662 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1663 arg="$arg $wl$flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1664 compiler_flags="$compiler_flags $wl$flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1665 linker_flags="$linker_flags $flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1666 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1667 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1668 arg=`$echo "X$arg" | $Xsed -e "s/^ //"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1669 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1670 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1671 -Xcompiler) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1672 prev=xcompiler |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1673 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1674 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1675 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1676 -Xlinker) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1677 prev=xlinker |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1678 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1679 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1680 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1681 -XCClinker) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1682 prev=xcclinker |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1683 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1684 ;; |
0 | 1685 |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1686 -framework) |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1687 prev=framework |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1688 continue |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1689 ;; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
1690 |
0 | 1691 # Some other compiler flag. |
1692 -* | +*) | |
1693 # Unknown arguments in both finalize_command and compile_command need | |
1694 # to be aesthetically quoted because they are evaled later. | |
1695 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1696 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1697 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
0 | 1698 arg="\"$arg\"" |
1699 ;; | |
1700 esac | |
1701 ;; | |
1702 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1703 *.$objext) |
0 | 1704 # A standard object. |
1705 objs="$objs $arg" | |
1706 ;; | |
1707 | |
1708 *.lo) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1709 # A libtool-controlled object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1710 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1711 # Check to see that this really is a libtool object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1712 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1713 pic_object= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1714 non_pic_object= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1715 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1716 # Read the .lo file |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1717 # If there is no directory component, then add one. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1718 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1719 */* | *\\*) . $arg ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1720 *) . ./$arg ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1721 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1722 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1723 if test -z "$pic_object" || \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1724 test -z "$non_pic_object" || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1725 test "$pic_object" = none && \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1726 test "$non_pic_object" = none; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1727 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1728 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1729 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1730 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1731 # Extract subdirectory from the argument. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1732 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1733 if test "X$xdir" = "X$arg"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1734 xdir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1735 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1736 xdir="$xdir/" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1737 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1738 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1739 if test "$pic_object" != none; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1740 # Prepend the subdirectory the object is found in. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1741 pic_object="$xdir$pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1742 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1743 if test "$prev" = dlfiles; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1744 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1745 dlfiles="$dlfiles $pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1746 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1747 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1748 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1749 # If libtool objects are unsupported, then we need to preload. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1750 prev=dlprefiles |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1751 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1752 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1753 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1754 # CHECK ME: I think I busted this. -Ossama |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1755 if test "$prev" = dlprefiles; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1756 # Preload the old-style object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1757 dlprefiles="$dlprefiles $pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1758 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1759 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1760 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1761 # A PIC object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1762 libobjs="$libobjs $pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1763 arg="$pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1764 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1765 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1766 # Non-PIC object. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1767 if test "$non_pic_object" != none; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1768 # Prepend the subdirectory the object is found in. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1769 non_pic_object="$xdir$non_pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1770 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1771 # A standard non-PIC object |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1772 non_pic_objects="$non_pic_objects $non_pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1773 if test -z "$pic_object" || test "$pic_object" = none ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1774 arg="$non_pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1775 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1776 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1777 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1778 # Only an error if not doing a dry-run. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1779 if test -z "$run"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1780 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1781 exit $EXIT_FAILURE |
0 | 1782 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1783 # Dry-run case. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1784 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1785 # Extract subdirectory from the argument. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1786 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1787 if test "X$xdir" = "X$arg"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1788 xdir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1789 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1790 xdir="$xdir/" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1791 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1792 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1793 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1794 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1795 libobjs="$libobjs $pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1796 non_pic_objects="$non_pic_objects $non_pic_object" |
0 | 1797 fi |
1798 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1799 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1800 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1801 *.$libext) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1802 # An archive. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1803 deplibs="$deplibs $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1804 old_deplibs="$old_deplibs $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1805 continue |
0 | 1806 ;; |
1807 | |
1808 *.la) | |
1809 # A libtool-controlled library. | |
1810 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1811 if test "$prev" = dlfiles; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1812 # This library was specified with -dlopen. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1813 dlfiles="$dlfiles $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1814 prev= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1815 elif test "$prev" = dlprefiles; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1816 # The library was specified with -dlpreopen. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1817 dlprefiles="$dlprefiles $arg" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1818 prev= |
0 | 1819 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1820 deplibs="$deplibs $arg" |
0 | 1821 fi |
1822 continue | |
1823 ;; | |
1824 | |
1825 # Some other compiler argument. | |
1826 *) | |
1827 # Unknown arguments in both finalize_command and compile_command need | |
1828 # to be aesthetically quoted because they are evaled later. | |
1829 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1830 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1831 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
0 | 1832 arg="\"$arg\"" |
1833 ;; | |
1834 esac | |
1835 ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1836 esac # arg |
0 | 1837 |
1838 # Now actually substitute the argument into the commands. | |
1839 if test -n "$arg"; then | |
1840 compile_command="$compile_command $arg" | |
1841 finalize_command="$finalize_command $arg" | |
1842 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1843 done # argument parsing loop |
0 | 1844 |
1845 if test -n "$prev"; then | |
1846 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 | |
1847 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1848 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1849 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1850 |
0 | 1851 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then |
1852 eval arg=\"$export_dynamic_flag_spec\" | |
1853 compile_command="$compile_command $arg" | |
1854 finalize_command="$finalize_command $arg" | |
1855 fi | |
1856 | |
1857 oldlibs= | |
1858 # calculate the name of the file, without its directory | |
1859 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` | |
1860 libobjs_save="$libobjs" | |
1861 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1862 if test -n "$shlibpath_var"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1863 # get the directories listed in $shlibpath_var |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1864 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1865 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1866 shlib_search_path= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1867 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1868 eval sys_lib_search_path=\"$sys_lib_search_path_spec\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1869 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1870 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1871 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1872 if test "X$output_objdir" = "X$output"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1873 output_objdir="$objdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1874 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1875 output_objdir="$output_objdir/$objdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1876 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1877 # Create the object directory. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1878 if test ! -d "$output_objdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1879 $show "$mkdir $output_objdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1880 $run $mkdir $output_objdir |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1881 status=$? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1882 if test "$status" -ne 0 && test ! -d "$output_objdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1883 exit $status |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1884 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1885 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1886 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1887 # Determine the type of output |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1888 case $output in |
0 | 1889 "") |
1890 $echo "$modename: you must specify an output file" 1>&2 | |
1891 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1892 exit $EXIT_FAILURE |
0 | 1893 ;; |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1894 *.$libext) linkmode=oldlib ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1895 *.lo | *.$objext) linkmode=obj ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1896 *.la) linkmode=lib ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1897 *) linkmode=prog ;; # Anything else should be a program. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1898 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1899 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1900 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1901 *cygwin* | *mingw* | *pw32*) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1902 # don't eliminate duplications in $postdeps and $predeps |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1903 duplicate_compiler_generated_deps=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1904 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1905 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1906 duplicate_compiler_generated_deps=$duplicate_deps |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1907 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1908 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1909 specialdeplibs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1910 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1911 libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1912 # Find all interdependent deplibs by searching for libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1913 # that are linked more than once (e.g. -la -lb -la) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1914 for deplib in $deplibs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1915 if test "X$duplicate_deps" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1916 case "$libs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1917 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1918 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1919 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1920 libs="$libs $deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1921 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1922 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1923 if test "$linkmode" = lib; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1924 libs="$predeps $libs $compiler_lib_search_path $postdeps" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1925 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1926 # Compute libraries that are listed more than once in $predeps |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1927 # $postdeps and mark them as special (i.e., whose duplicates are |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1928 # not to be eliminated). |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1929 pre_post_deps= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1930 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1931 for pre_post_dep in $predeps $postdeps; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1932 case "$pre_post_deps " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1933 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1934 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1935 pre_post_deps="$pre_post_deps $pre_post_dep" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1936 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1937 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1938 pre_post_deps= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1939 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1940 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1941 deplibs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1942 newdependency_libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1943 newlib_search_path= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1944 need_relink=no # whether we're linking any uninstalled libtool libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1945 notinst_deplibs= # not-installed libtool libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1946 notinst_path= # paths that contain not-installed libtool libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1947 case $linkmode in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1948 lib) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1949 passes="conv link" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1950 for file in $dlfiles $dlprefiles; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1951 case $file in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1952 *.la) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1953 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1954 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1955 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1956 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1957 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1958 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1959 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1960 prog) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1961 compile_deplibs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1962 finalize_deplibs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1963 alldeplibs=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1964 newdlfiles= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1965 newdlprefiles= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1966 passes="conv scan dlopen dlpreopen link" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1967 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1968 *) passes="conv" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1969 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1970 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1971 for pass in $passes; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1972 if test "$linkmode,$pass" = "lib,link" || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1973 test "$linkmode,$pass" = "prog,scan"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1974 libs="$deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1975 deplibs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1976 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1977 if test "$linkmode" = prog; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1978 case $pass in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1979 dlopen) libs="$dlfiles" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1980 dlpreopen) libs="$dlprefiles" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1981 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1982 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1983 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1984 if test "$pass" = dlopen; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1985 # Collect dlpreopened libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1986 save_deplibs="$deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1987 deplibs= |
0 | 1988 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1989 for deplib in $libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1990 lib= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1991 found=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
1992 case $deplib in |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1993 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1994 if test "$linkmode,$pass" = "prog,link"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1995 compile_deplibs="$deplib $compile_deplibs" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1996 finalize_deplibs="$deplib $finalize_deplibs" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1997 else |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1998 deplibs="$deplib $deplibs" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
1999 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2000 continue |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2001 ;; |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2002 -l*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2003 if test "$linkmode" != lib && test "$linkmode" != prog; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2004 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2005 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2006 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2007 if test "$pass" = conv; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2008 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2009 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2010 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2011 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2012 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2013 for search_ext in .la $std_shrext .so .a; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2014 # Search the libtool library |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2015 lib="$searchdir/lib${name}${search_ext}" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2016 if test -f "$lib"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2017 if test "$search_ext" = ".la"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2018 found=yes |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2019 else |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2020 found=no |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2021 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2022 break 2 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2023 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2024 done |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2025 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2026 if test "$found" != yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2027 # deplib doesn't seem to be a libtool library |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2028 if test "$linkmode,$pass" = "prog,link"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2029 compile_deplibs="$deplib $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2030 finalize_deplibs="$deplib $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2031 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2032 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2033 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2034 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2035 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2036 else # deplib is a libtool library |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2037 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2038 # We need to do some special things here, and not later. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2039 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2040 case " $predeps $postdeps " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2041 *" $deplib "*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2042 if (${SED} -e '2q' $lib | |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2043 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2044 library_names= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2045 old_library= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2046 case $lib in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2047 */* | *\\*) . $lib ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2048 *) . ./$lib ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2049 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2050 for l in $old_library $library_names; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2051 ll="$l" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2052 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2053 if test "X$ll" = "X$old_library" ; then # only static version available |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2054 found=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2055 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2056 test "X$ladir" = "X$lib" && ladir="." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2057 lib=$ladir/$old_library |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2058 if test "$linkmode,$pass" = "prog,link"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2059 compile_deplibs="$deplib $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2060 finalize_deplibs="$deplib $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2061 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2062 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2063 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2064 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2065 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2066 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2067 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2068 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2069 *) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2070 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2071 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2072 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2073 ;; # -l |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2074 *.framework) |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2075 if test "$linkmode,$pass" = "prog,link"; then |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2076 compile_deplibs="$deplib $compile_deplibs" |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2077 finalize_deplibs="$deplib $finalize_deplibs" |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2078 else |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2079 deplibs="$deplib $deplibs" |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2080 if test "$linkmode" = lib ; then |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2081 newdependency_libs="$deplib $newdependency_libs" |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2082 fi |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2083 fi |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2084 continue |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2085 ;; |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2086 -L*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2087 case $linkmode in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2088 lib) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2089 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2090 test "$pass" = conv && continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2091 newdependency_libs="$deplib $newdependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2092 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2093 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2094 prog) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2095 if test "$pass" = conv; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2096 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2097 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2098 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2099 if test "$pass" = scan; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2100 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2101 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2102 compile_deplibs="$deplib $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2103 finalize_deplibs="$deplib $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2104 fi |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2105 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2106 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2107 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2108 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2109 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2110 esac # linkmode |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2111 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2112 ;; # -L |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2113 -R*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2114 if test "$pass" = link; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2115 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2116 # Make sure the xrpath contains only unique directories. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2117 case "$xrpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2118 *" $dir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2119 *) xrpath="$xrpath $dir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2120 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2121 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2122 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2123 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2124 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2125 *.la) lib="$deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2126 *.$libext) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2127 if test "$pass" = conv; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2128 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2129 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2130 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2131 case $linkmode in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2132 lib) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2133 valid_a_lib=no |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2134 case $deplibs_check_method in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2135 match_pattern*) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2136 set dummy $deplibs_check_method |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2137 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2138 if eval $echo \"$deplib\" 2>/dev/null \ |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2139 | $SED 10q \ |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2140 | $EGREP "$match_pattern_regex" > /dev/null; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2141 valid_a_lib=yes |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2142 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2143 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2144 pass_all) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2145 valid_a_lib=yes |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2146 ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2147 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2148 if test "$valid_a_lib" != yes; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2149 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2150 $echo "*** Warning: Trying to link with static lib archive $deplib." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2151 $echo "*** I have the capability to make that library automatically link in when" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2152 $echo "*** you link to this library. But I can only do this if you have a" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2153 $echo "*** shared version of the library, which you do not appear to have" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2154 $echo "*** because the file extensions .$libext of this argument makes me believe" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2155 $echo "*** that it is just a static archive that I should not used here." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2156 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2157 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2158 $echo "*** Warning: Linking the shared library $output against the" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2159 $echo "*** static library $deplib is not portable!" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2160 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2161 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2162 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2163 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2164 prog) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2165 if test "$pass" != link; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2166 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2167 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2168 compile_deplibs="$deplib $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2169 finalize_deplibs="$deplib $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2170 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2171 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2172 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2173 esac # linkmode |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2174 ;; # *.$libext |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2175 *.lo | *.$objext) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2176 if test "$pass" = conv; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2177 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2178 elif test "$linkmode" = prog; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2179 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2180 # If there is no dlopen support or we're linking statically, |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2181 # we need to preload. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2182 newdlprefiles="$newdlprefiles $deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2183 compile_deplibs="$deplib $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2184 finalize_deplibs="$deplib $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2185 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2186 newdlfiles="$newdlfiles $deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2187 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2188 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2189 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2190 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2191 %DEPLIBS%) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2192 alldeplibs=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2193 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2194 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2195 esac # case $deplib |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2196 if test "$found" = yes || test -f "$lib"; then : |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2197 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2198 $echo "$modename: cannot find the library \`$lib'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2199 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2200 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2201 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2202 # Check to see that this really is a libtool archive. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2203 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2204 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2205 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2206 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2207 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2208 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2209 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2210 test "X$ladir" = "X$lib" && ladir="." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2211 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2212 dlname= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2213 dlopen= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2214 dlpreopen= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2215 libdir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2216 library_names= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2217 old_library= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2218 # If the library was installed with an old release of libtool, |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2219 # it will not redefine variables installed, or shouldnotlink |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2220 installed=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2221 shouldnotlink=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2222 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2223 # Read the .la file |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2224 case $lib in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2225 */* | *\\*) . $lib ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2226 *) . ./$lib ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2227 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2228 |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2229 case $host in |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2230 *-*-darwin*) |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2231 # Convert "-framework foo" to "foo.framework" in dependency_libs |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2232 test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.framework/g'` |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2233 ;; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2234 esac |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2235 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2236 if test "$linkmode,$pass" = "lib,link" || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2237 test "$linkmode,$pass" = "prog,scan" || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2238 { test "$linkmode" != prog && test "$linkmode" != lib; }; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2239 test -n "$dlopen" && dlfiles="$dlfiles $dlopen" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2240 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2241 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2242 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2243 if test "$pass" = conv; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2244 # Only check for convenience libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2245 deplibs="$lib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2246 if test -z "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2247 if test -z "$old_library"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2248 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2249 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2250 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2251 # It is a libtool convenience library, so add in its objects. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2252 convenience="$convenience $ladir/$objdir/$old_library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2253 old_convenience="$old_convenience $ladir/$objdir/$old_library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2254 tmp_libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2255 for deplib in $dependency_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2256 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2257 if test "X$duplicate_deps" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2258 case "$tmp_libs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2259 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2260 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2261 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2262 tmp_libs="$tmp_libs $deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2263 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2264 elif test "$linkmode" != prog && test "$linkmode" != lib; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2265 $echo "$modename: \`$lib' is not a convenience library" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2266 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2267 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2268 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2269 fi # $pass = conv |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2270 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2271 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2272 # Get the name of the library we link against. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2273 linklib= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2274 for l in $old_library $library_names; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2275 linklib="$l" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2276 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2277 if test -z "$linklib"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2278 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2279 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2280 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2281 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2282 # This library was specified with -dlopen. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2283 if test "$pass" = dlopen; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2284 if test -z "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2285 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2286 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2287 fi |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2288 if test -z "$dlname" || |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2289 test "$dlopen_support" != yes || |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2290 test "$build_libtool_libs" = no; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2291 # If there is no dlname, no dlopen support or we're linking |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2292 # statically, we need to preload. We also need to preload any |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2293 # dependent libraries so libltdl's deplib preloader doesn't |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2294 # bomb out in the load deplibs phase. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2295 dlprefiles="$dlprefiles $lib $dependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2296 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2297 newdlfiles="$newdlfiles $lib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2298 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2299 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2300 fi # $pass = dlopen |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2301 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2302 # We need an absolute path. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2303 case $ladir in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2304 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2305 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2306 abs_ladir=`cd "$ladir" && pwd` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2307 if test -z "$abs_ladir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2308 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2309 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2310 abs_ladir="$ladir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2311 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2312 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2313 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2314 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2315 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2316 # Find the relevant object directory and library name. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2317 if test "X$installed" = Xyes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2318 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2319 $echo "$modename: warning: library \`$lib' was moved." 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2320 dir="$ladir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2321 absdir="$abs_ladir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2322 libdir="$abs_ladir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2323 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2324 dir="$libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2325 absdir="$libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2326 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2327 else |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2328 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2329 dir="$ladir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2330 absdir="$abs_ladir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2331 # Remove this search path later |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2332 notinst_path="$notinst_path $abs_ladir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2333 else |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2334 dir="$ladir/$objdir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2335 absdir="$abs_ladir/$objdir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2336 # Remove this search path later |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2337 notinst_path="$notinst_path $abs_ladir" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2338 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2339 fi # $installed = yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2340 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2341 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2342 # This library was specified with -dlpreopen. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2343 if test "$pass" = dlpreopen; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2344 if test -z "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2345 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2346 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2347 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2348 # Prefer using a static library (so that no silly _DYNAMIC symbols |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2349 # are required to link). |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2350 if test -n "$old_library"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2351 newdlprefiles="$newdlprefiles $dir/$old_library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2352 # Otherwise, use the dlname, so that lt_dlopen finds it. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2353 elif test -n "$dlname"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2354 newdlprefiles="$newdlprefiles $dir/$dlname" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2355 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2356 newdlprefiles="$newdlprefiles $dir/$linklib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2357 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2358 fi # $pass = dlpreopen |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2359 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2360 if test -z "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2361 # Link the convenience library |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2362 if test "$linkmode" = lib; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2363 deplibs="$dir/$old_library $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2364 elif test "$linkmode,$pass" = "prog,link"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2365 compile_deplibs="$dir/$old_library $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2366 finalize_deplibs="$dir/$old_library $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2367 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2368 deplibs="$lib $deplibs" # used for prog,scan pass |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2369 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2370 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2371 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2372 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2373 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2374 if test "$linkmode" = prog && test "$pass" != link; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2375 newlib_search_path="$newlib_search_path $ladir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2376 deplibs="$lib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2377 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2378 linkalldeplibs=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2379 if test "$link_all_deplibs" != no || test -z "$library_names" || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2380 test "$build_libtool_libs" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2381 linkalldeplibs=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2382 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2383 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2384 tmp_libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2385 for deplib in $dependency_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2386 case $deplib in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2387 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2388 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2389 # Need to link against all dependency_libs? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2390 if test "$linkalldeplibs" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2391 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2392 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2393 # Need to hardcode shared library paths |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2394 # or/and link against static libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2395 newdependency_libs="$deplib $newdependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2396 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2397 if test "X$duplicate_deps" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2398 case "$tmp_libs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2399 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2400 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2401 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2402 tmp_libs="$tmp_libs $deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2403 done # for deplib |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2404 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2405 fi # $linkmode = prog... |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2406 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2407 if test "$linkmode,$pass" = "prog,link"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2408 if test -n "$library_names" && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2409 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2410 # We need to hardcode the library path |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2411 if test -n "$shlibpath_var"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2412 # Make sure the rpath contains only unique directories. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2413 case "$temp_rpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2414 *" $dir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2415 *" $absdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2416 *) temp_rpath="$temp_rpath $dir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2417 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2418 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2419 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2420 # Hardcode the library path. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2421 # Skip directories that are in the system default run-time |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2422 # search path. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2423 case " $sys_lib_dlsearch_path " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2424 *" $absdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2425 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2426 case "$compile_rpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2427 *" $absdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2428 *) compile_rpath="$compile_rpath $absdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2429 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2430 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2431 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2432 case " $sys_lib_dlsearch_path " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2433 *" $libdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2434 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2435 case "$finalize_rpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2436 *" $libdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2437 *) finalize_rpath="$finalize_rpath $libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2438 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2439 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2440 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2441 fi # $linkmode,$pass = prog,link... |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2442 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2443 if test "$alldeplibs" = yes && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2444 { test "$deplibs_check_method" = pass_all || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2445 { test "$build_libtool_libs" = yes && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2446 test -n "$library_names"; }; }; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2447 # We only need to search for static libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2448 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2449 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2450 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2451 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2452 link_static=no # Whether the deplib will be linked statically |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2453 if test -n "$library_names" && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2454 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2455 if test "$installed" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2456 notinst_deplibs="$notinst_deplibs $lib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2457 need_relink=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2458 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2459 # This is a shared library |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2460 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2461 # Warn about portability, can't link against -module's on |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2462 # some systems (darwin) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2463 if test "$shouldnotlink" = yes && test "$pass" = link ; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2464 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2465 if test "$linkmode" = prog; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2466 $echo "*** Warning: Linking the executable $output against the loadable module" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2467 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2468 $echo "*** Warning: Linking the shared library $output against the loadable module" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2469 fi |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2470 $echo "*** $linklib is not portable!" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2471 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2472 if test "$linkmode" = lib && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2473 test "$hardcode_into_libs" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2474 # Hardcode the library path. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2475 # Skip directories that are in the system default run-time |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2476 # search path. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2477 case " $sys_lib_dlsearch_path " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2478 *" $absdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2479 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2480 case "$compile_rpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2481 *" $absdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2482 *) compile_rpath="$compile_rpath $absdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2483 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2484 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2485 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2486 case " $sys_lib_dlsearch_path " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2487 *" $libdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2488 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2489 case "$finalize_rpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2490 *" $libdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2491 *) finalize_rpath="$finalize_rpath $libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2492 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2493 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2494 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2495 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2496 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2497 if test -n "$old_archive_from_expsyms_cmds"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2498 # figure out the soname |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2499 set dummy $library_names |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2500 realname="$2" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2501 shift; shift |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2502 libname=`eval \\$echo \"$libname_spec\"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2503 # use dlname if we got it. it's perfectly good, no? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2504 if test -n "$dlname"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2505 soname="$dlname" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2506 elif test -n "$soname_spec"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2507 # bleh windows |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2508 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2509 *cygwin* | mingw*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2510 major=`expr $current - $age` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2511 versuffix="-$major" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2512 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2513 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2514 eval soname=\"$soname_spec\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2515 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2516 soname="$realname" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2517 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2518 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2519 # Make a new name for the extract_expsyms_cmds to use |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2520 soroot="$soname" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2521 soname=`$echo $soroot | ${SED} -e 's/^.*\///'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2522 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2523 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2524 # If the library has no export list, then create one now |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2525 if test -f "$output_objdir/$soname-def"; then : |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2526 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2527 $show "extracting exported symbol list from \`$soname'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2528 save_ifs="$IFS"; IFS='~' |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2529 cmds=$extract_expsyms_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2530 for cmd in $cmds; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2531 IFS="$save_ifs" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2532 eval cmd=\"$cmd\" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2533 $show "$cmd" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2534 $run eval "$cmd" || exit $? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2535 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2536 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2537 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2538 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2539 # Create $newlib |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2540 if test -f "$output_objdir/$newlib"; then :; else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2541 $show "generating import library for \`$soname'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2542 save_ifs="$IFS"; IFS='~' |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2543 cmds=$old_archive_from_expsyms_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2544 for cmd in $cmds; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2545 IFS="$save_ifs" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2546 eval cmd=\"$cmd\" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2547 $show "$cmd" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2548 $run eval "$cmd" || exit $? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2549 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2550 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2551 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2552 # make sure the library variables are pointing to the new library |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2553 dir=$output_objdir |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2554 linklib=$newlib |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2555 fi # test -n "$old_archive_from_expsyms_cmds" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2556 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2557 if test "$linkmode" = prog || test "$mode" != relink; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2558 add_shlibpath= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2559 add_dir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2560 add= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2561 lib_linked=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2562 case $hardcode_action in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2563 immediate | unsupported) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2564 if test "$hardcode_direct" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2565 add="$dir/$linklib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2566 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2567 *-*-sco3.2v5* ) add_dir="-L$dir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2568 *-*-darwin* ) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2569 # if the lib is a module then we can not link against |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2570 # it, someone is ignoring the new warnings I added |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2571 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2572 $echo "** Warning, lib $linklib is a module, not a shared library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2573 if test -z "$old_library" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2574 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2575 $echo "** And there doesn't seem to be a static archive available" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2576 $echo "** The link will probably fail, sorry" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2577 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2578 add="$dir/$old_library" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2579 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2580 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2581 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2582 elif test "$hardcode_minus_L" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2583 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2584 *-*-sunos*) add_shlibpath="$dir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2585 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2586 add_dir="-L$dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2587 add="-l$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2588 elif test "$hardcode_shlibpath_var" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2589 add_shlibpath="$dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2590 add="-l$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2591 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2592 lib_linked=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2593 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2594 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2595 relink) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2596 if test "$hardcode_direct" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2597 add="$dir/$linklib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2598 elif test "$hardcode_minus_L" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2599 add_dir="-L$dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2600 # Try looking first in the location we're being installed to. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2601 if test -n "$inst_prefix_dir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2602 case "$libdir" in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2603 [\\/]*) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2604 add_dir="$add_dir -L$inst_prefix_dir$libdir" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2605 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2606 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2607 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2608 add="-l$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2609 elif test "$hardcode_shlibpath_var" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2610 add_shlibpath="$dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2611 add="-l$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2612 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2613 lib_linked=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2614 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2615 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2616 *) lib_linked=no ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2617 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2618 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2619 if test "$lib_linked" != yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2620 $echo "$modename: configuration error: unsupported hardcode properties" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2621 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2622 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2623 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2624 if test -n "$add_shlibpath"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2625 case :$compile_shlibpath: in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2626 *":$add_shlibpath:"*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2627 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2628 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2629 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2630 if test "$linkmode" = prog; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2631 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2632 test -n "$add" && compile_deplibs="$add $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2633 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2634 test -n "$add_dir" && deplibs="$add_dir $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2635 test -n "$add" && deplibs="$add $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2636 if test "$hardcode_direct" != yes && \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2637 test "$hardcode_minus_L" != yes && \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2638 test "$hardcode_shlibpath_var" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2639 case :$finalize_shlibpath: in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2640 *":$libdir:"*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2641 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2642 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2643 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2644 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2645 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2646 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2647 if test "$linkmode" = prog || test "$mode" = relink; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2648 add_shlibpath= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2649 add_dir= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2650 add= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2651 # Finalize command for both is simple: just hardcode it. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2652 if test "$hardcode_direct" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2653 add="$libdir/$linklib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2654 elif test "$hardcode_minus_L" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2655 add_dir="-L$libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2656 add="-l$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2657 elif test "$hardcode_shlibpath_var" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2658 case :$finalize_shlibpath: in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2659 *":$libdir:"*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2660 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2661 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2662 add="-l$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2663 elif test "$hardcode_automatic" = yes; then |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2664 if test -n "$inst_prefix_dir" && |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2665 test -f "$inst_prefix_dir$libdir/$linklib" ; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2666 add="$inst_prefix_dir$libdir/$linklib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2667 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2668 add="$libdir/$linklib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2669 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2670 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2671 # We cannot seem to hardcode it, guess we'll fake it. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2672 add_dir="-L$libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2673 # Try looking first in the location we're being installed to. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2674 if test -n "$inst_prefix_dir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2675 case "$libdir" in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2676 [\\/]*) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2677 add_dir="$add_dir -L$inst_prefix_dir$libdir" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2678 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2679 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2680 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2681 add="-l$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2682 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2683 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2684 if test "$linkmode" = prog; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2685 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2686 test -n "$add" && finalize_deplibs="$add $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2687 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2688 test -n "$add_dir" && deplibs="$add_dir $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2689 test -n "$add" && deplibs="$add $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2690 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2691 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2692 elif test "$linkmode" = prog; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2693 # Here we assume that one of hardcode_direct or hardcode_minus_L |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2694 # is not unsupported. This is valid on all known static and |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2695 # shared platforms. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2696 if test "$hardcode_direct" != unsupported; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2697 test -n "$old_library" && linklib="$old_library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2698 compile_deplibs="$dir/$linklib $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2699 finalize_deplibs="$dir/$linklib $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2700 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2701 compile_deplibs="-l$name -L$dir $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2702 finalize_deplibs="-l$name -L$dir $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2703 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2704 elif test "$build_libtool_libs" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2705 # Not a shared library |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2706 if test "$deplibs_check_method" != pass_all; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2707 # We're trying link a shared library against a static one |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2708 # but the system doesn't support it. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2709 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2710 # Just print a warning and add the library to dependency_libs so |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2711 # that the program can be linked against the static library. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2712 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2713 $echo "*** Warning: This system can not link to static lib archive $lib." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2714 $echo "*** I have the capability to make that library automatically link in when" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2715 $echo "*** you link to this library. But I can only do this if you have a" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2716 $echo "*** shared version of the library, which you do not appear to have." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2717 if test "$module" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2718 $echo "*** But as you try to build a module library, libtool will still create " |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2719 $echo "*** a static module, that should work as long as the dlopening application" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2720 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2721 if test -z "$global_symbol_pipe"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2722 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2723 $echo "*** However, this would only work if libtool was able to extract symbol" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2724 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2725 $echo "*** not find such a program. So, this module is probably useless." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2726 $echo "*** \`nm' from GNU binutils and a full rebuild may help." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2727 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2728 if test "$build_old_libs" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2729 build_libtool_libs=module |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2730 build_old_libs=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2731 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2732 build_libtool_libs=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2733 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2734 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2735 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2736 convenience="$convenience $dir/$old_library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2737 old_convenience="$old_convenience $dir/$old_library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2738 deplibs="$dir/$old_library $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2739 link_static=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2740 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2741 fi # link shared/static library? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2742 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2743 if test "$linkmode" = lib; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2744 if test -n "$dependency_libs" && |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2745 { test "$hardcode_into_libs" != yes || |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2746 test "$build_old_libs" = yes || |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2747 test "$link_static" = yes; }; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2748 # Extract -R from dependency_libs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2749 temp_deplibs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2750 for libdir in $dependency_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2751 case $libdir in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2752 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2753 case " $xrpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2754 *" $temp_xrpath "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2755 *) xrpath="$xrpath $temp_xrpath";; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2756 esac;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2757 *) temp_deplibs="$temp_deplibs $libdir";; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2758 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2759 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2760 dependency_libs="$temp_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2761 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2762 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2763 newlib_search_path="$newlib_search_path $absdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2764 # Link against this library |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2765 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2766 # ... and its dependency_libs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2767 tmp_libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2768 for deplib in $dependency_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2769 newdependency_libs="$deplib $newdependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2770 if test "X$duplicate_deps" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2771 case "$tmp_libs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2772 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2773 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2774 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2775 tmp_libs="$tmp_libs $deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2776 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2777 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2778 if test "$link_all_deplibs" != no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2779 # Add the search paths of all dependency libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2780 for deplib in $dependency_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2781 case $deplib in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2782 -L*) path="$deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2783 *.la) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2784 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2785 test "X$dir" = "X$deplib" && dir="." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2786 # We need an absolute path. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2787 case $dir in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2788 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2789 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2790 absdir=`cd "$dir" && pwd` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2791 if test -z "$absdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2792 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2793 absdir="$dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2794 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2795 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2796 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2797 if grep "^installed=no" $deplib > /dev/null; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2798 path="$absdir/$objdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2799 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2800 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2801 if test -z "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2802 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2803 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2804 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2805 if test "$absdir" != "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2806 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2807 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2808 path="$absdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2809 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2810 depdepl= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2811 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2812 *-*-darwin*) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2813 # we do not want to link against static libs, |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2814 # but need to link against shared |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2815 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2816 if test -n "$deplibrary_names" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2817 for tmp in $deplibrary_names ; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2818 depdepl=$tmp |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2819 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2820 if test -f "$path/$depdepl" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2821 depdepl="$path/$depdepl" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2822 fi |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2823 # do not add paths which are already there |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2824 case " $newlib_search_path " in |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2825 *" $path "*) ;; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2826 *) newlib_search_path="$newlib_search_path $path";; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2827 esac |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2828 fi |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2829 path="" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2830 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2831 *) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2832 path="-L$path" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2833 ;; |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2834 esac |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2835 ;; |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2836 -l*) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2837 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2838 *-*-darwin*) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2839 # Again, we only want to link against shared libraries |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2840 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2841 for tmp in $newlib_search_path ; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2842 if test -f "$tmp/lib$tmp_libs.dylib" ; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2843 eval depdepl="$tmp/lib$tmp_libs.dylib" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2844 break |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2845 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2846 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2847 path="" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2848 ;; |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2849 *.framework) |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2850 case $host in |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2851 *-*-darwin*) |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2852 depdepl="$deplib" |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2853 ;; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2854 esac |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
2855 ;; |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2856 *) continue ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2857 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2858 ;; |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2859 *) continue ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2860 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2861 case " $deplibs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2862 *" $depdepl "*) ;; |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2863 *) deplibs="$depdepl $deplibs" ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2864 esac |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2865 case " $deplibs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2866 *" $path "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2867 *) deplibs="$deplibs $path" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2868 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2869 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2870 fi # link_all_deplibs != no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2871 fi # linkmode = lib |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2872 done # for deplib in $libs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2873 dependency_libs="$newdependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2874 if test "$pass" = dlpreopen; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2875 # Link the dlpreopened libraries before other libraries |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2876 for deplib in $save_deplibs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2877 deplibs="$deplib $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2878 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2879 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2880 if test "$pass" != dlopen; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2881 if test "$pass" != conv; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2882 # Make sure lib_search_path contains only unique directories. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2883 lib_search_path= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2884 for dir in $newlib_search_path; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2885 case "$lib_search_path " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2886 *" $dir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2887 *) lib_search_path="$lib_search_path $dir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2888 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2889 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2890 newlib_search_path= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2891 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2892 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2893 if test "$linkmode,$pass" != "prog,link"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2894 vars="deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2895 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2896 vars="compile_deplibs finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2897 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2898 for var in $vars dependency_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2899 # Add libraries to $var in reverse order |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2900 eval tmp_libs=\"\$$var\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2901 new_libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2902 for deplib in $tmp_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2903 # FIXME: Pedantically, this is the right thing to do, so |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2904 # that some nasty dependency loop isn't accidentally |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2905 # broken: |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2906 #new_libs="$deplib $new_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2907 # Pragmatically, this seems to cause very few problems in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2908 # practice: |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2909 case $deplib in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2910 -L*) new_libs="$deplib $new_libs" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2911 -R*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2912 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2913 # And here is the reason: when a library appears more |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2914 # than once as an explicit dependence of a library, or |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2915 # is implicitly linked in more than once by the |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2916 # compiler, it is considered special, and multiple |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2917 # occurrences thereof are not removed. Compare this |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2918 # with having the same library being listed as a |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2919 # dependency of multiple other libraries: in this case, |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2920 # we know (pedantically, we assume) the library does not |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2921 # need to be listed more than once, so we keep only the |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2922 # last copy. This is not always right, but it is rare |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2923 # enough that we require users that really mean to play |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2924 # such unportable linking tricks to link the library |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2925 # using -Wl,-lname, so that libtool does not consider it |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2926 # for duplicate removal. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2927 case " $specialdeplibs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2928 *" $deplib "*) new_libs="$deplib $new_libs" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2929 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2930 case " $new_libs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2931 *" $deplib "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2932 *) new_libs="$deplib $new_libs" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2933 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2934 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2935 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2936 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2937 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2938 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2939 tmp_libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2940 for deplib in $new_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2941 case $deplib in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2942 -L*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2943 case " $tmp_libs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2944 *" $deplib "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2945 *) tmp_libs="$tmp_libs $deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2946 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2947 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2948 *) tmp_libs="$tmp_libs $deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2949 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2950 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2951 eval $var=\"$tmp_libs\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2952 done # for var |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2953 fi |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2954 # Last step: remove runtime libs from dependency_libs |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
2955 # (they stay in deplibs) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2956 tmp_libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2957 for i in $dependency_libs ; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2958 case " $predeps $postdeps $compiler_lib_search_path " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2959 *" $i "*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2960 i="" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2961 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2962 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2963 if test -n "$i" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2964 tmp_libs="$tmp_libs $i" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2965 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2966 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2967 dependency_libs=$tmp_libs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2968 done # for pass |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2969 if test "$linkmode" = prog; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2970 dlfiles="$newdlfiles" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2971 dlprefiles="$newdlprefiles" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2972 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2973 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2974 case $linkmode in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2975 oldlib) |
0 | 2976 if test -n "$deplibs"; then |
2977 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 | |
2978 fi | |
2979 | |
2980 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
2981 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 | |
2982 fi | |
2983 | |
2984 if test -n "$rpath"; then | |
2985 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 | |
2986 fi | |
2987 | |
2988 if test -n "$xrpath"; then | |
2989 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 | |
2990 fi | |
2991 | |
2992 if test -n "$vinfo"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
2993 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 |
0 | 2994 fi |
2995 | |
2996 if test -n "$release"; then | |
2997 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 | |
2998 fi | |
2999 | |
3000 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then | |
3001 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 | |
3002 fi | |
3003 | |
3004 # Now set the variables for building old libraries. | |
3005 build_libtool_libs=no | |
3006 oldlibs="$output" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3007 objs="$objs$old_deplibs" |
0 | 3008 ;; |
3009 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3010 lib) |
0 | 3011 # Make sure we only generate libraries of the form `libNAME.la'. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3012 case $outputname in |
0 | 3013 lib*) |
3014 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3015 eval shared_ext=\"$shrext_cmds\" |
0 | 3016 eval libname=\"$libname_spec\" |
3017 ;; | |
3018 *) | |
3019 if test "$module" = no; then | |
3020 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 | |
3021 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3022 exit $EXIT_FAILURE |
0 | 3023 fi |
3024 if test "$need_lib_prefix" != no; then | |
3025 # Add the "lib" prefix for modules if required | |
3026 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3027 eval shared_ext=\"$shrext_cmds\" |
0 | 3028 eval libname=\"$libname_spec\" |
3029 else | |
3030 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` | |
3031 fi | |
3032 ;; | |
3033 esac | |
3034 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3035 if test -n "$objs"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3036 if test "$deplibs_check_method" != pass_all; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3037 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3038 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3039 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3040 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3041 $echo "*** Warning: Linking the shared library $output against the non-libtool" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3042 $echo "*** objects $objs is not portable!" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3043 libobjs="$libobjs $objs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3044 fi |
0 | 3045 fi |
3046 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3047 if test "$dlself" != no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3048 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 |
0 | 3049 fi |
3050 | |
3051 set dummy $rpath | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3052 if test "$#" -gt 2; then |
0 | 3053 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 |
3054 fi | |
3055 install_libdir="$2" | |
3056 | |
3057 oldlibs= | |
3058 if test -z "$rpath"; then | |
3059 if test "$build_libtool_libs" = yes; then | |
3060 # Building a libtool convenience library. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3061 # Some compilers have problems with a `.al' extension so |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3062 # convenience libraries should have the same extension an |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3063 # archive normally would. |
0 | 3064 oldlibs="$output_objdir/$libname.$libext $oldlibs" |
3065 build_libtool_libs=convenience | |
3066 build_old_libs=yes | |
3067 fi | |
3068 | |
3069 if test -n "$vinfo"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3070 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 |
0 | 3071 fi |
3072 | |
3073 if test -n "$release"; then | |
3074 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 | |
3075 fi | |
3076 else | |
3077 | |
3078 # Parse the version information argument. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3079 save_ifs="$IFS"; IFS=':' |
0 | 3080 set dummy $vinfo 0 0 0 |
3081 IFS="$save_ifs" | |
3082 | |
3083 if test -n "$8"; then | |
3084 $echo "$modename: too many parameters to \`-version-info'" 1>&2 | |
3085 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3086 exit $EXIT_FAILURE |
0 | 3087 fi |
3088 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3089 # convert absolute version numbers to libtool ages |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3090 # this retains compatibility with .la files and attempts |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3091 # to make the code below a bit more comprehensible |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3092 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3093 case $vinfo_number in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3094 yes) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3095 number_major="$2" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3096 number_minor="$3" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3097 number_revision="$4" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3098 # |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3099 # There are really only two kinds -- those that |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3100 # use the current revision as the major version |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3101 # and those that subtract age and use age as |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3102 # a minor version. But, then there is irix |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3103 # which has an extra 1 added just for fun |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3104 # |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3105 case $version_type in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3106 darwin|linux|osf|windows) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3107 current=`expr $number_major + $number_minor` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3108 age="$number_minor" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3109 revision="$number_revision" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3110 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3111 freebsd-aout|freebsd-elf|sunos) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3112 current="$number_major" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3113 revision="$number_minor" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3114 age="0" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3115 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3116 irix|nonstopux) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3117 current=`expr $number_major + $number_minor - 1` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3118 age="$number_minor" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3119 revision="$number_minor" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3120 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3121 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3122 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3123 no) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3124 current="$2" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3125 revision="$3" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3126 age="$4" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3127 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3128 esac |
0 | 3129 |
3130 # Check that each of the things are valid numbers. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3131 case $current in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3132 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; |
0 | 3133 *) |
3134 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 | |
3135 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3136 exit $EXIT_FAILURE |
0 | 3137 ;; |
3138 esac | |
3139 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3140 case $revision in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3141 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; |
0 | 3142 *) |
3143 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 | |
3144 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3145 exit $EXIT_FAILURE |
0 | 3146 ;; |
3147 esac | |
3148 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3149 case $age in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3150 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; |
0 | 3151 *) |
3152 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 | |
3153 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3154 exit $EXIT_FAILURE |
0 | 3155 ;; |
3156 esac | |
3157 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3158 if test "$age" -gt "$current"; then |
0 | 3159 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 |
3160 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3161 exit $EXIT_FAILURE |
0 | 3162 fi |
3163 | |
3164 # Calculate the version variables. | |
3165 major= | |
3166 versuffix= | |
3167 verstring= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3168 case $version_type in |
0 | 3169 none) ;; |
3170 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3171 darwin) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3172 # Like Linux, but with the current version available in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3173 # verstring for coding it into the library header |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3174 major=.`expr $current - $age` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3175 versuffix="$major.$age.$revision" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3176 # Darwin ld doesn't like 0 for these options... |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3177 minor_current=`expr $current + 1` |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3178 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3179 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3180 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3181 freebsd-aout) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3182 major=".$current" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3183 versuffix=".$current.$revision"; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3184 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3185 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3186 freebsd-elf) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3187 major=".$current" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3188 versuffix=".$current"; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3189 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3190 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3191 irix | nonstopux) |
0 | 3192 major=`expr $current - $age + 1` |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3193 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3194 case $version_type in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3195 nonstopux) verstring_prefix=nonstopux ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3196 *) verstring_prefix=sgi ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3197 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3198 verstring="$verstring_prefix$major.$revision" |
0 | 3199 |
3200 # Add in all the interfaces that we are compatible with. | |
3201 loop=$revision | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3202 while test "$loop" -ne 0; do |
0 | 3203 iface=`expr $revision - $loop` |
3204 loop=`expr $loop - 1` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3205 verstring="$verstring_prefix$major.$iface:$verstring" |
0 | 3206 done |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3207 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3208 # Before this point, $major must not contain `.'. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3209 major=.$major |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3210 versuffix="$major.$revision" |
0 | 3211 ;; |
3212 | |
3213 linux) | |
3214 major=.`expr $current - $age` | |
3215 versuffix="$major.$age.$revision" | |
3216 ;; | |
3217 | |
3218 osf) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3219 major=.`expr $current - $age` |
0 | 3220 versuffix=".$current.$age.$revision" |
3221 verstring="$current.$age.$revision" | |
3222 | |
3223 # Add in all the interfaces that we are compatible with. | |
3224 loop=$age | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3225 while test "$loop" -ne 0; do |
0 | 3226 iface=`expr $current - $loop` |
3227 loop=`expr $loop - 1` | |
3228 verstring="$verstring:${iface}.0" | |
3229 done | |
3230 | |
3231 # Make executables depend on our current version. | |
3232 verstring="$verstring:${current}.0" | |
3233 ;; | |
3234 | |
3235 sunos) | |
3236 major=".$current" | |
3237 versuffix=".$current.$revision" | |
3238 ;; | |
3239 | |
3240 windows) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3241 # Use '-' rather than '.', since we only want one |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3242 # extension on DOS 8.3 filesystems. |
0 | 3243 major=`expr $current - $age` |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3244 versuffix="-$major" |
387
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3245 ;; |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3246 |
0 | 3247 *) |
3248 $echo "$modename: unknown library version type \`$version_type'" 1>&2 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3249 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3250 exit $EXIT_FAILURE |
0 | 3251 ;; |
3252 esac | |
3253 | |
3254 # Clear the version info if we defaulted, and they specified a release. | |
3255 if test -z "$vinfo" && test -n "$release"; then | |
3256 major= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3257 case $version_type in |
387
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3258 darwin) |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3259 # we can't check for "0.0" in archive_cmds due to quoting |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3260 # problems, so we reset it completely |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3261 verstring= |
387
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3262 ;; |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3263 *) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3264 verstring="0.0" |
387
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3265 ;; |
469d5c0da01d
Fixed shared library building on MacOS X (thanks Max!)
Sam Lantinga <slouken@libsdl.org>
parents:
1
diff
changeset
|
3266 esac |
0 | 3267 if test "$need_version" = no; then |
3268 versuffix= | |
3269 else | |
3270 versuffix=".0.0" | |
3271 fi | |
3272 fi | |
3273 | |
3274 # Remove version info from name if versioning should be avoided | |
3275 if test "$avoid_version" = yes && test "$need_version" = no; then | |
3276 major= | |
3277 versuffix= | |
3278 verstring="" | |
3279 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3280 |
0 | 3281 # Check to see if the archive will have undefined symbols. |
3282 if test "$allow_undefined" = yes; then | |
3283 if test "$allow_undefined_flag" = unsupported; then | |
3284 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 | |
3285 build_libtool_libs=no | |
3286 build_old_libs=yes | |
3287 fi | |
3288 else | |
3289 # Don't allow undefined symbols. | |
3290 allow_undefined_flag="$no_undefined_flag" | |
3291 fi | |
3292 fi | |
3293 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3294 if test "$mode" != relink; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3295 # Remove our outputs, but don't remove object files since they |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3296 # may have been created when compiling PIC objects. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3297 removelist= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3298 tempremovelist=`$echo "$output_objdir/*"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3299 for p in $tempremovelist; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3300 case $p in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3301 *.$objext) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3302 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3303 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3304 if test "X$precious_files_regex" != "X"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3305 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3306 then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3307 continue |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3308 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3309 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3310 removelist="$removelist $p" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3311 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3312 *) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3313 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3314 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3315 if test -n "$removelist"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3316 $show "${rm}r $removelist" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3317 $run ${rm}r $removelist |
0 | 3318 fi |
3319 fi | |
3320 | |
3321 # Now set the variables for building old libraries. | |
3322 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then | |
3323 oldlibs="$oldlibs $output_objdir/$libname.$libext" | |
3324 | |
3325 # Transform .lo files to .o files. | |
3326 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` | |
3327 fi | |
3328 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3329 # Eliminate all temporary directories. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3330 for path in $notinst_path; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3331 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3332 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3333 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3334 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3335 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3336 if test -n "$xrpath"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3337 # If the user specified any rpath flags, then add them. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3338 temp_xrpath= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3339 for libdir in $xrpath; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3340 temp_xrpath="$temp_xrpath -R$libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3341 case "$finalize_rpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3342 *" $libdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3343 *) finalize_rpath="$finalize_rpath $libdir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3344 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3345 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3346 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3347 dependency_libs="$temp_xrpath $dependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3348 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3349 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3350 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3351 # Make sure dlfiles contains only unique files that won't be dlpreopened |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3352 old_dlfiles="$dlfiles" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3353 dlfiles= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3354 for lib in $old_dlfiles; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3355 case " $dlprefiles $dlfiles " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3356 *" $lib "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3357 *) dlfiles="$dlfiles $lib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3358 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3359 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3360 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3361 # Make sure dlprefiles contains only unique files |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3362 old_dlprefiles="$dlprefiles" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3363 dlprefiles= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3364 for lib in $old_dlprefiles; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3365 case "$dlprefiles " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3366 *" $lib "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3367 *) dlprefiles="$dlprefiles $lib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3368 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3369 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3370 |
0 | 3371 if test "$build_libtool_libs" = yes; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3372 if test -n "$rpath"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3373 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3374 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3375 # these systems don't actually have a c library (as such)! |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3376 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3377 *-*-rhapsody* | *-*-darwin1.[012]) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3378 # Rhapsody C library is in the System framework |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3379 deplibs="$deplibs -framework System" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3380 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3381 *-*-netbsd*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3382 # Don't link with libc until the a.out ld.so is fixed. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3383 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3384 *-*-openbsd* | *-*-freebsd*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3385 # Do not include libc due to us having libc/libc_r. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3386 test "X$arg" = "X-lc" && continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3387 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3388 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3389 # Add libc to deplibs on all other systems if necessary. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3390 if test "$build_libtool_need_lc" = "yes"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3391 deplibs="$deplibs -lc" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3392 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3393 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3394 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3395 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3396 |
0 | 3397 # Transform deplibs into only deplibs that can be linked in shared. |
3398 name_save=$name | |
3399 libname_save=$libname | |
3400 release_save=$release | |
3401 versuffix_save=$versuffix | |
3402 major_save=$major | |
3403 # I'm not sure if I'm treating the release correctly. I think | |
3404 # release should show up in the -l (ie -lgmp5) so we don't want to | |
3405 # add it in twice. Is that correct? | |
3406 release="" | |
3407 versuffix="" | |
3408 major="" | |
3409 newdeplibs= | |
3410 droppeddeps=no | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3411 case $deplibs_check_method in |
0 | 3412 pass_all) |
3413 # Don't check for shared/static. Everything works. | |
3414 # This might be a little naive. We might want to check | |
3415 # whether the library exists or not. But this is on | |
3416 # osf3 & osf4 and I'm not really sure... Just | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3417 # implementing what was already the behavior. |
0 | 3418 newdeplibs=$deplibs |
3419 ;; | |
3420 test_compile) | |
3421 # This code stresses the "libraries are programs" paradigm to its | |
3422 # limits. Maybe even breaks it. We compile a program, linking it | |
3423 # against the deplibs as a proxy for the library. Then we can check | |
3424 # whether they linked in statically or dynamically with ldd. | |
3425 $rm conftest.c | |
3426 cat > conftest.c <<EOF | |
3427 int main() { return 0; } | |
3428 EOF | |
3429 $rm conftest | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3430 $LTCC -o conftest conftest.c $deplibs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3431 if test "$?" -eq 0 ; then |
0 | 3432 ldd_output=`ldd conftest` |
3433 for i in $deplibs; do | |
3434 name="`expr $i : '-l\(.*\)'`" | |
3435 # If $name is empty we are operating on a -L argument. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3436 if test "$name" != "" && test "$name" -ne "0"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3437 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3438 case " $predeps $postdeps " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3439 *" $i "*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3440 newdeplibs="$newdeplibs $i" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3441 i="" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3442 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3443 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3444 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3445 if test -n "$i" ; then |
0 | 3446 libname=`eval \\$echo \"$libname_spec\"` |
3447 deplib_matches=`eval \\$echo \"$library_names_spec\"` | |
3448 set dummy $deplib_matches | |
3449 deplib_match=$2 | |
3450 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | |
3451 newdeplibs="$newdeplibs $i" | |
3452 else | |
3453 droppeddeps=yes | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3454 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3455 $echo "*** Warning: dynamic linker does not accept needed library $i." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3456 $echo "*** I have the capability to make that library automatically link in when" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3457 $echo "*** you link to this library. But I can only do this if you have a" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3458 $echo "*** shared version of the library, which I believe you do not have" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3459 $echo "*** because a test_compile did reveal that the linker did not use it for" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3460 $echo "*** its dynamic dependency list that programs get resolved with at runtime." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3461 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3462 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3463 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3464 newdeplibs="$newdeplibs $i" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3465 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3466 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3467 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3468 # Error occurred in the first compile. Let's try to salvage |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3469 # the situation: Compile a separate program for each library. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3470 for i in $deplibs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3471 name="`expr $i : '-l\(.*\)'`" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3472 # If $name is empty we are operating on a -L argument. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3473 if test "$name" != "" && test "$name" != "0"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3474 $rm conftest |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3475 $LTCC -o conftest conftest.c $i |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3476 # Did it work? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3477 if test "$?" -eq 0 ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3478 ldd_output=`ldd conftest` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3479 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3480 case " $predeps $postdeps " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3481 *" $i "*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3482 newdeplibs="$newdeplibs $i" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3483 i="" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3484 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3485 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3486 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3487 if test -n "$i" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3488 libname=`eval \\$echo \"$libname_spec\"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3489 deplib_matches=`eval \\$echo \"$library_names_spec\"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3490 set dummy $deplib_matches |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3491 deplib_match=$2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3492 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3493 newdeplibs="$newdeplibs $i" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3494 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3495 droppeddeps=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3496 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3497 $echo "*** Warning: dynamic linker does not accept needed library $i." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3498 $echo "*** I have the capability to make that library automatically link in when" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3499 $echo "*** you link to this library. But I can only do this if you have a" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3500 $echo "*** shared version of the library, which you do not appear to have" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3501 $echo "*** because a test_compile did reveal that the linker did not use this one" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3502 $echo "*** as a dynamic dependency that programs can get resolved with at runtime." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3503 fi |
0 | 3504 fi |
3505 else | |
3506 droppeddeps=yes | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3507 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3508 $echo "*** Warning! Library $i is needed by this library but I was not able to" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3509 $echo "*** make it link in! You will probably need to install it or some" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3510 $echo "*** library that it depends on before this library will be fully" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3511 $echo "*** functional. Installing it before continuing would be even better." |
0 | 3512 fi |
3513 else | |
3514 newdeplibs="$newdeplibs $i" | |
3515 fi | |
3516 done | |
3517 fi | |
3518 ;; | |
3519 file_magic*) | |
3520 set dummy $deplibs_check_method | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3521 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
0 | 3522 for a_deplib in $deplibs; do |
3523 name="`expr $a_deplib : '-l\(.*\)'`" | |
3524 # If $name is empty we are operating on a -L argument. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3525 if test "$name" != "" && test "$name" != "0"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3526 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3527 case " $predeps $postdeps " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3528 *" $a_deplib "*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3529 newdeplibs="$newdeplibs $a_deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3530 a_deplib="" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3531 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3532 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3533 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3534 if test -n "$a_deplib" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3535 libname=`eval \\$echo \"$libname_spec\"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3536 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3537 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3538 for potent_lib in $potential_libs; do |
0 | 3539 # Follow soft links. |
3540 if ls -lLd "$potent_lib" 2>/dev/null \ | |
3541 | grep " -> " >/dev/null; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3542 continue |
0 | 3543 fi |
3544 # The statement above tries to avoid entering an | |
3545 # endless loop below, in case of cyclic links. | |
3546 # We might still enter an endless loop, since a link | |
3547 # loop can be closed while we follow links, | |
3548 # but so what? | |
3549 potlib="$potent_lib" | |
3550 while test -h "$potlib" 2>/dev/null; do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3551 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3552 case $potliblink in |
0 | 3553 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; |
3554 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; | |
3555 esac | |
3556 done | |
3557 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3558 | ${SED} 10q \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3559 | $EGREP "$file_magic_regex" > /dev/null; then |
0 | 3560 newdeplibs="$newdeplibs $a_deplib" |
3561 a_deplib="" | |
3562 break 2 | |
3563 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3564 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3565 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3566 fi |
0 | 3567 if test -n "$a_deplib" ; then |
3568 droppeddeps=yes | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3569 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3570 $echo "*** Warning: linker path does not have real file for library $a_deplib." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3571 $echo "*** I have the capability to make that library automatically link in when" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3572 $echo "*** you link to this library. But I can only do this if you have a" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3573 $echo "*** shared version of the library, which you do not appear to have" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3574 $echo "*** because I did check the linker path looking for a file starting" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3575 if test -z "$potlib" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3576 $echo "*** with $libname but no candidates were found. (...for file magic test)" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3577 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3578 $echo "*** with $libname and none of the candidates passed a file format test" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3579 $echo "*** using a file magic. Last file checked: $potlib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3580 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3581 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3582 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3583 # Add a -L argument. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3584 newdeplibs="$newdeplibs $a_deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3585 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3586 done # Gone through all deplibs. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3587 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3588 match_pattern*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3589 set dummy $deplibs_check_method |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3590 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3591 for a_deplib in $deplibs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3592 name="`expr $a_deplib : '-l\(.*\)'`" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3593 # If $name is empty we are operating on a -L argument. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3594 if test -n "$name" && test "$name" != "0"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3595 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3596 case " $predeps $postdeps " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3597 *" $a_deplib "*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3598 newdeplibs="$newdeplibs $a_deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3599 a_deplib="" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3600 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3601 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3602 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3603 if test -n "$a_deplib" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3604 libname=`eval \\$echo \"$libname_spec\"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3605 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3606 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3607 for potent_lib in $potential_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3608 potlib="$potent_lib" # see symlink-check above in file_magic test |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3609 if eval $echo \"$potent_lib\" 2>/dev/null \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3610 | ${SED} 10q \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3611 | $EGREP "$match_pattern_regex" > /dev/null; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3612 newdeplibs="$newdeplibs $a_deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3613 a_deplib="" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3614 break 2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3615 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3616 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3617 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3618 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3619 if test -n "$a_deplib" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3620 droppeddeps=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3621 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3622 $echo "*** Warning: linker path does not have real file for library $a_deplib." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3623 $echo "*** I have the capability to make that library automatically link in when" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3624 $echo "*** you link to this library. But I can only do this if you have a" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3625 $echo "*** shared version of the library, which you do not appear to have" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3626 $echo "*** because I did check the linker path looking for a file starting" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3627 if test -z "$potlib" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3628 $echo "*** with $libname but no candidates were found. (...for regex pattern test)" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3629 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3630 $echo "*** with $libname and none of the candidates passed a file format test" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3631 $echo "*** using a regex pattern. Last file checked: $potlib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3632 fi |
0 | 3633 fi |
3634 else | |
3635 # Add a -L argument. | |
3636 newdeplibs="$newdeplibs $a_deplib" | |
3637 fi | |
3638 done # Gone through all deplibs. | |
3639 ;; | |
3640 none | unknown | *) | |
3641 newdeplibs="" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3642 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3643 -e 's/ -[LR][^ ]*//g'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3644 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3645 for i in $predeps $postdeps ; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3646 # can't use Xsed below, because $i might contain '/' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3647 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3648 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3649 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3650 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3651 | grep . >/dev/null; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3652 $echo |
0 | 3653 if test "X$deplibs_check_method" = "Xnone"; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3654 $echo "*** Warning: inter-library dependencies are not supported in this platform." |
0 | 3655 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3656 $echo "*** Warning: inter-library dependencies are not known to be supported." |
0 | 3657 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3658 $echo "*** All declared inter-library dependencies are being dropped." |
0 | 3659 droppeddeps=yes |
3660 fi | |
3661 ;; | |
3662 esac | |
3663 versuffix=$versuffix_save | |
3664 major=$major_save | |
3665 release=$release_save | |
3666 libname=$libname_save | |
3667 name=$name_save | |
3668 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3669 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3670 *-*-rhapsody* | *-*-darwin1.[012]) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3671 # On Rhapsody replace the C library is the System framework |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3672 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3673 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3674 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3675 |
0 | 3676 if test "$droppeddeps" = yes; then |
3677 if test "$module" = yes; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3678 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3679 $echo "*** Warning: libtool could not satisfy all declared inter-library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3680 $echo "*** dependencies of module $libname. Therefore, libtool will create" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3681 $echo "*** a static module, that should work as long as the dlopening" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3682 $echo "*** application is linked with the -dlopen flag." |
0 | 3683 if test -z "$global_symbol_pipe"; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3684 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3685 $echo "*** However, this would only work if libtool was able to extract symbol" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3686 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3687 $echo "*** not find such a program. So, this module is probably useless." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3688 $echo "*** \`nm' from GNU binutils and a full rebuild may help." |
0 | 3689 fi |
3690 if test "$build_old_libs" = no; then | |
3691 oldlibs="$output_objdir/$libname.$libext" | |
3692 build_libtool_libs=module | |
3693 build_old_libs=yes | |
3694 else | |
3695 build_libtool_libs=no | |
3696 fi | |
3697 else | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3698 $echo "*** The inter-library dependencies that have been dropped here will be" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3699 $echo "*** automatically added whenever a program is linked with this library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3700 $echo "*** or is declared to -dlopen it." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3701 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3702 if test "$allow_undefined" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3703 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3704 $echo "*** Since this library must not contain undefined symbols," |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3705 $echo "*** because either the platform does not support them or" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3706 $echo "*** it was explicitly requested with -no-undefined," |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3707 $echo "*** libtool will only create a static version of it." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3708 if test "$build_old_libs" = no; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3709 oldlibs="$output_objdir/$libname.$libext" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3710 build_libtool_libs=module |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3711 build_old_libs=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3712 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3713 build_libtool_libs=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3714 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3715 fi |
0 | 3716 fi |
3717 fi | |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
3718 # Time to change all our "foo.framework" stuff back to "-framework foo" |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
3719 case $host in |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
3720 *-*-darwin*) |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
3721 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'` |
789
f9d0e03fc2ff
Date: Wed, 28 Jan 2004 02:37:04 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
741
diff
changeset
|
3722 dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).framework%%g'` |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
3723 ;; |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
3724 esac |
0 | 3725 # Done checking deplibs! |
3726 deplibs=$newdeplibs | |
3727 fi | |
3728 | |
3729 # All the library-specific variables (install_libdir is set above). | |
3730 library_names= | |
3731 old_library= | |
3732 dlname= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3733 |
0 | 3734 # Test again, we may have decided not to build it any more |
3735 if test "$build_libtool_libs" = yes; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3736 if test "$hardcode_into_libs" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3737 # Hardcode the library paths |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3738 hardcode_libdirs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3739 dep_rpath= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3740 rpath="$finalize_rpath" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3741 test "$mode" != relink && rpath="$compile_rpath$rpath" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3742 for libdir in $rpath; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3743 if test -n "$hardcode_libdir_flag_spec"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3744 if test -n "$hardcode_libdir_separator"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3745 if test -z "$hardcode_libdirs"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3746 hardcode_libdirs="$libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3747 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3748 # Just accumulate the unique libdirs. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3749 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3750 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3751 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3752 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3753 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3754 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3755 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3756 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3757 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3758 eval flag=\"$hardcode_libdir_flag_spec\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3759 dep_rpath="$dep_rpath $flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3760 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3761 elif test -n "$runpath_var"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3762 case "$perm_rpath " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3763 *" $libdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3764 *) perm_rpath="$perm_rpath $libdir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3765 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3766 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3767 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3768 # Substitute the hardcoded libdirs into the rpath. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3769 if test -n "$hardcode_libdir_separator" && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3770 test -n "$hardcode_libdirs"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3771 libdir="$hardcode_libdirs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3772 if test -n "$hardcode_libdir_flag_spec_ld"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3773 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3774 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3775 eval dep_rpath=\"$hardcode_libdir_flag_spec\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3776 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3777 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3778 if test -n "$runpath_var" && test -n "$perm_rpath"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3779 # We should set the runpath_var. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3780 rpath= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3781 for dir in $perm_rpath; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3782 rpath="$rpath$dir:" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3783 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3784 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3785 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3786 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3787 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3788 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3789 shlibpath="$finalize_shlibpath" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3790 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3791 if test -n "$shlibpath"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3792 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3793 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3794 |
0 | 3795 # Get the real and link names of the library. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3796 eval shared_ext=\"$shrext_cmds\" |
0 | 3797 eval library_names=\"$library_names_spec\" |
3798 set dummy $library_names | |
3799 realname="$2" | |
3800 shift; shift | |
3801 | |
3802 if test -n "$soname_spec"; then | |
3803 eval soname=\"$soname_spec\" | |
3804 else | |
3805 soname="$realname" | |
3806 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3807 if test -z "$dlname"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3808 dlname=$soname |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3809 fi |
0 | 3810 |
3811 lib="$output_objdir/$realname" | |
3812 for link | |
3813 do | |
3814 linknames="$linknames $link" | |
3815 done | |
3816 | |
3817 # Use standard objects if they are pic | |
3818 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | |
3819 | |
3820 # Prepare the list of exported symbols | |
3821 if test -z "$export_symbols"; then | |
3822 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then | |
3823 $show "generating symbol list for \`$libname.la'" | |
3824 export_symbols="$output_objdir/$libname.exp" | |
3825 $run $rm $export_symbols | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3826 cmds=$export_symbols_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3827 save_ifs="$IFS"; IFS='~' |
0 | 3828 for cmd in $cmds; do |
3829 IFS="$save_ifs" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3830 eval cmd=\"$cmd\" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3831 if len=`expr "X$cmd" : ".*"` && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3832 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3833 $show "$cmd" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3834 $run eval "$cmd" || exit $? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3835 skipped_export=false |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3836 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3837 # The command line is too long to execute in one step. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3838 $show "using reloadable object file for export list..." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3839 skipped_export=: |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3840 fi |
0 | 3841 done |
3842 IFS="$save_ifs" | |
3843 if test -n "$export_symbols_regex"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3844 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3845 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' |
0 | 3846 $show "$mv \"${export_symbols}T\" \"$export_symbols\"" |
3847 $run eval '$mv "${export_symbols}T" "$export_symbols"' | |
3848 fi | |
3849 fi | |
3850 fi | |
3851 | |
3852 if test -n "$export_symbols" && test -n "$include_expsyms"; then | |
3853 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' | |
3854 fi | |
3855 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3856 tmp_deplibs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3857 for test_deplib in $deplibs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3858 case " $convenience " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3859 *" $test_deplib "*) ;; |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3860 *) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3861 tmp_deplibs="$tmp_deplibs $test_deplib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3862 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3863 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3864 done |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3865 deplibs="$tmp_deplibs" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3866 |
0 | 3867 if test -n "$convenience"; then |
3868 if test -n "$whole_archive_flag_spec"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3869 save_libobjs=$libobjs |
0 | 3870 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" |
3871 else | |
3872 gentop="$output_objdir/${outputname}x" | |
3873 generated="$generated $gentop" | |
3874 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3875 func_extract_archives $gentop $convenience |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3876 libobjs="$libobjs $func_extract_archives_result" |
0 | 3877 fi |
3878 fi | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3879 |
0 | 3880 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then |
3881 eval flag=\"$thread_safe_flag_spec\" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3882 linker_flags="$linker_flags $flag" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3883 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3884 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3885 # Make a backup of the uninstalled library when relinking |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3886 if test "$mode" = relink; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3887 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? |
0 | 3888 fi |
3889 | |
3890 # Do each of the archive commands. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3891 if test "$module" = yes && test -n "$module_cmds" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3892 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3893 eval test_cmds=\"$module_expsym_cmds\" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3894 cmds=$module_expsym_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3895 else |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3896 eval test_cmds=\"$module_cmds\" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3897 cmds=$module_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3898 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3899 else |
0 | 3900 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3901 eval test_cmds=\"$archive_expsym_cmds\" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3902 cmds=$archive_expsym_cmds |
0 | 3903 else |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3904 eval test_cmds=\"$archive_cmds\" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3905 cmds=$archive_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3906 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3907 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3908 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
3909 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3910 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3911 : |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3912 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3913 # The command line is too long to link in one step, link piecewise. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3914 $echo "creating reloadable object files..." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3915 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3916 # Save the value of $output and $libobjs because we want to |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3917 # use them later. If we have whole_archive_flag_spec, we |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3918 # want to use save_libobjs as it was before |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3919 # whole_archive_flag_spec was expanded, because we can't |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3920 # assume the linker understands whole_archive_flag_spec. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3921 # This may have to be revisited, in case too many |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3922 # convenience libraries get linked in and end up exceeding |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3923 # the spec. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3924 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3925 save_libobjs=$libobjs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3926 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3927 save_output=$output |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3928 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3929 # Clear the reloadable object creation command queue and |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3930 # initialize k to one. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3931 test_cmds= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3932 concat_cmds= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3933 objlist= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3934 delfiles= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3935 last_robj= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3936 k=1 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3937 output=$output_objdir/$save_output-${k}.$objext |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3938 # Loop over the list of objects to be linked. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3939 for obj in $save_libobjs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3940 do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3941 eval test_cmds=\"$reload_cmds $objlist $last_robj\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3942 if test "X$objlist" = X || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3943 { len=`expr "X$test_cmds" : ".*"` && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3944 test "$len" -le "$max_cmd_len"; }; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3945 objlist="$objlist $obj" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3946 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3947 # The command $test_cmds is almost too long, add a |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3948 # command to the queue. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3949 if test "$k" -eq 1 ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3950 # The first file doesn't have a previous command to add. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3951 eval concat_cmds=\"$reload_cmds $objlist $last_robj\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3952 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3953 # All subsequent reloadable object files will link in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3954 # the last one created. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3955 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" |
608
d0fecf67cd93
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
581
diff
changeset
|
3956 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3957 last_robj=$output_objdir/$save_output-${k}.$objext |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3958 k=`expr $k + 1` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3959 output=$output_objdir/$save_output-${k}.$objext |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3960 objlist=$obj |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3961 len=1 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3962 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3963 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3964 # Handle the remaining objects by creating one last |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3965 # reloadable object file. All subsequent reloadable object |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3966 # files will link in the last one created. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3967 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3968 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3969 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3970 if ${skipped_export-false}; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3971 $show "generating symbol list for \`$libname.la'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3972 export_symbols="$output_objdir/$libname.exp" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3973 $run $rm $export_symbols |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3974 libobjs=$output |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3975 # Append the command to create the export file. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3976 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3977 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3978 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3979 # Set up a command to remove the reloadale object files |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3980 # after they are used. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3981 i=0 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3982 while test "$i" -lt "$k" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3983 do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3984 i=`expr $i + 1` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3985 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" |
608
d0fecf67cd93
*** empty log message ***
Sam Lantinga <slouken@libsdl.org>
parents:
581
diff
changeset
|
3986 done |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3987 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3988 $echo "creating a temporary reloadable object file: $output" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3989 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3990 # Loop through the commands generated above and execute them. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3991 save_ifs="$IFS"; IFS='~' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3992 for cmd in $concat_cmds; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3993 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3994 $show "$cmd" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3995 $run eval "$cmd" || exit $? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3996 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3997 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3998 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
3999 libobjs=$output |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4000 # Restore the value of output. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4001 output=$save_output |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4002 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4003 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4004 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4005 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4006 # Expand the library linking commands again to reset the |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4007 # value of $libobjs for piecewise linking. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4008 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4009 # Do each of the archive commands. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4010 if test "$module" = yes && test -n "$module_cmds" ; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4011 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4012 cmds=$module_expsym_cmds |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4013 else |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4014 cmds=$module_cmds |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4015 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4016 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4017 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4018 cmds=$archive_expsym_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4019 else |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4020 cmds=$archive_cmds |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4021 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4022 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4023 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4024 # Append the command to remove the reloadable object files |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4025 # to the just-reset $cmds. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4026 eval cmds=\"\$cmds~\$rm $delfiles\" |
0 | 4027 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4028 save_ifs="$IFS"; IFS='~' |
0 | 4029 for cmd in $cmds; do |
4030 IFS="$save_ifs" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4031 eval cmd=\"$cmd\" |
0 | 4032 $show "$cmd" |
4033 $run eval "$cmd" || exit $? | |
4034 done | |
4035 IFS="$save_ifs" | |
4036 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4037 # Restore the uninstalled library and exit |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4038 if test "$mode" = relink; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4039 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4040 exit $EXIT_SUCCESS |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4041 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4042 |
0 | 4043 # Create links to the real library. |
4044 for linkname in $linknames; do | |
4045 if test "$realname" != "$linkname"; then | |
4046 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" | |
4047 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? | |
4048 fi | |
4049 done | |
4050 | |
4051 # If -module or -export-dynamic was specified, set the dlname. | |
4052 if test "$module" = yes || test "$export_dynamic" = yes; then | |
4053 # On all known operating systems, these are identical. | |
4054 dlname="$soname" | |
4055 fi | |
4056 fi | |
4057 ;; | |
4058 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4059 obj) |
0 | 4060 if test -n "$deplibs"; then |
4061 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 | |
4062 fi | |
4063 | |
4064 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
4065 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 | |
4066 fi | |
4067 | |
4068 if test -n "$rpath"; then | |
4069 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 | |
4070 fi | |
4071 | |
4072 if test -n "$xrpath"; then | |
4073 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 | |
4074 fi | |
4075 | |
4076 if test -n "$vinfo"; then | |
4077 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 | |
4078 fi | |
4079 | |
4080 if test -n "$release"; then | |
4081 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 | |
4082 fi | |
4083 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4084 case $output in |
0 | 4085 *.lo) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4086 if test -n "$objs$old_deplibs"; then |
0 | 4087 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4088 exit $EXIT_FAILURE |
0 | 4089 fi |
4090 libobj="$output" | |
4091 obj=`$echo "X$output" | $Xsed -e "$lo2o"` | |
4092 ;; | |
4093 *) | |
4094 libobj= | |
4095 obj="$output" | |
4096 ;; | |
4097 esac | |
4098 | |
4099 # Delete the old objects. | |
4100 $run $rm $obj $libobj | |
4101 | |
4102 # Objects from convenience libraries. This assumes | |
4103 # single-version convenience libraries. Whenever we create | |
4104 # different ones for PIC/non-PIC, this we'll have to duplicate | |
4105 # the extraction. | |
4106 reload_conv_objs= | |
4107 gentop= | |
4108 # reload_cmds runs $LD directly, so let us get rid of | |
4109 # -Wl from whole_archive_flag_spec | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4110 wl= |
0 | 4111 |
4112 if test -n "$convenience"; then | |
4113 if test -n "$whole_archive_flag_spec"; then | |
4114 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" | |
4115 else | |
4116 gentop="$output_objdir/${obj}x" | |
4117 generated="$generated $gentop" | |
4118 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4119 func_extract_archives $gentop $convenience |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4120 reload_conv_objs="$reload_objs $func_extract_archives_result" |
0 | 4121 fi |
4122 fi | |
4123 | |
4124 # Create the old-style object. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4125 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test |
0 | 4126 |
4127 output="$obj" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4128 cmds=$reload_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4129 save_ifs="$IFS"; IFS='~' |
0 | 4130 for cmd in $cmds; do |
4131 IFS="$save_ifs" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4132 eval cmd=\"$cmd\" |
0 | 4133 $show "$cmd" |
4134 $run eval "$cmd" || exit $? | |
4135 done | |
4136 IFS="$save_ifs" | |
4137 | |
4138 # Exit if we aren't doing a library object file. | |
4139 if test -z "$libobj"; then | |
4140 if test -n "$gentop"; then | |
4141 $show "${rm}r $gentop" | |
4142 $run ${rm}r $gentop | |
4143 fi | |
4144 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4145 exit $EXIT_SUCCESS |
0 | 4146 fi |
4147 | |
4148 if test "$build_libtool_libs" != yes; then | |
4149 if test -n "$gentop"; then | |
4150 $show "${rm}r $gentop" | |
4151 $run ${rm}r $gentop | |
4152 fi | |
4153 | |
4154 # Create an invalid libtool object if no PIC, so that we don't | |
4155 # accidentally link it into a program. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4156 # $show "echo timestamp > $libobj" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4157 # $run eval "echo timestamp > $libobj" || exit $? |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4158 exit $EXIT_SUCCESS |
0 | 4159 fi |
4160 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4161 if test -n "$pic_flag" || test "$pic_mode" != default; then |
0 | 4162 # Only do commands if we really have different PIC objects. |
4163 reload_objs="$libobjs $reload_conv_objs" | |
4164 output="$libobj" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4165 cmds=$reload_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4166 save_ifs="$IFS"; IFS='~' |
0 | 4167 for cmd in $cmds; do |
4168 IFS="$save_ifs" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4169 eval cmd=\"$cmd\" |
0 | 4170 $show "$cmd" |
4171 $run eval "$cmd" || exit $? | |
4172 done | |
4173 IFS="$save_ifs" | |
4174 fi | |
4175 | |
4176 if test -n "$gentop"; then | |
4177 $show "${rm}r $gentop" | |
4178 $run ${rm}r $gentop | |
4179 fi | |
4180 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4181 exit $EXIT_SUCCESS |
0 | 4182 ;; |
4183 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4184 prog) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4185 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4186 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4187 esac |
0 | 4188 if test -n "$vinfo"; then |
4189 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 | |
4190 fi | |
4191 | |
4192 if test -n "$release"; then | |
4193 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 | |
4194 fi | |
4195 | |
4196 if test "$preload" = yes; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4197 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && |
0 | 4198 test "$dlopen_self_static" = unknown; then |
4199 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4200 fi |
0 | 4201 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4202 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4203 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4204 *-*-rhapsody* | *-*-darwin1.[012]) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4205 # On Rhapsody replace the C library is the System framework |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4206 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4207 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4208 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4209 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4210 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4211 case $host in |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
4212 *-*-darwin*) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4213 # Don't allow lazy linking, it breaks C++ global constructors |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4214 if test "$tagname" = CXX ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4215 compile_command="$compile_command ${wl}-bind_at_load" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4216 finalize_command="$finalize_command ${wl}-bind_at_load" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4217 fi |
741
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
4218 # Time to change all our "foo.framework" stuff back to "-framework foo" |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
4219 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'` |
97b9c301df94
Date: Mon, 17 Nov 2003 23:12:59 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
730
diff
changeset
|
4220 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'` |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4221 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4222 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4223 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4224 compile_command="$compile_command $compile_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4225 finalize_command="$finalize_command $finalize_deplibs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4226 |
0 | 4227 if test -n "$rpath$xrpath"; then |
4228 # If the user specified any rpath flags, then add them. | |
4229 for libdir in $rpath $xrpath; do | |
4230 # This is the magic to use -rpath. | |
4231 case "$finalize_rpath " in | |
4232 *" $libdir "*) ;; | |
4233 *) finalize_rpath="$finalize_rpath $libdir" ;; | |
4234 esac | |
4235 done | |
4236 fi | |
4237 | |
4238 # Now hardcode the library paths | |
4239 rpath= | |
4240 hardcode_libdirs= | |
4241 for libdir in $compile_rpath $finalize_rpath; do | |
4242 if test -n "$hardcode_libdir_flag_spec"; then | |
4243 if test -n "$hardcode_libdir_separator"; then | |
4244 if test -z "$hardcode_libdirs"; then | |
4245 hardcode_libdirs="$libdir" | |
4246 else | |
4247 # Just accumulate the unique libdirs. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4248 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in |
0 | 4249 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
4250 ;; | |
4251 *) | |
4252 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" | |
4253 ;; | |
4254 esac | |
4255 fi | |
4256 else | |
4257 eval flag=\"$hardcode_libdir_flag_spec\" | |
4258 rpath="$rpath $flag" | |
4259 fi | |
4260 elif test -n "$runpath_var"; then | |
4261 case "$perm_rpath " in | |
4262 *" $libdir "*) ;; | |
4263 *) perm_rpath="$perm_rpath $libdir" ;; | |
4264 esac | |
4265 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4266 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4267 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4268 case :$dllsearchpath: in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4269 *":$libdir:"*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4270 *) dllsearchpath="$dllsearchpath:$libdir";; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4271 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4272 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4273 esac |
0 | 4274 done |
4275 # Substitute the hardcoded libdirs into the rpath. | |
4276 if test -n "$hardcode_libdir_separator" && | |
4277 test -n "$hardcode_libdirs"; then | |
4278 libdir="$hardcode_libdirs" | |
4279 eval rpath=\" $hardcode_libdir_flag_spec\" | |
4280 fi | |
4281 compile_rpath="$rpath" | |
4282 | |
4283 rpath= | |
4284 hardcode_libdirs= | |
4285 for libdir in $finalize_rpath; do | |
4286 if test -n "$hardcode_libdir_flag_spec"; then | |
4287 if test -n "$hardcode_libdir_separator"; then | |
4288 if test -z "$hardcode_libdirs"; then | |
4289 hardcode_libdirs="$libdir" | |
4290 else | |
4291 # Just accumulate the unique libdirs. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4292 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in |
0 | 4293 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) |
4294 ;; | |
4295 *) | |
4296 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" | |
4297 ;; | |
4298 esac | |
4299 fi | |
4300 else | |
4301 eval flag=\"$hardcode_libdir_flag_spec\" | |
4302 rpath="$rpath $flag" | |
4303 fi | |
4304 elif test -n "$runpath_var"; then | |
4305 case "$finalize_perm_rpath " in | |
4306 *" $libdir "*) ;; | |
4307 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; | |
4308 esac | |
4309 fi | |
4310 done | |
4311 # Substitute the hardcoded libdirs into the rpath. | |
4312 if test -n "$hardcode_libdir_separator" && | |
4313 test -n "$hardcode_libdirs"; then | |
4314 libdir="$hardcode_libdirs" | |
4315 eval rpath=\" $hardcode_libdir_flag_spec\" | |
4316 fi | |
4317 finalize_rpath="$rpath" | |
4318 | |
4319 if test -n "$libobjs" && test "$build_old_libs" = yes; then | |
4320 # Transform all the library objects into standard objects. | |
4321 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | |
4322 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | |
4323 fi | |
4324 | |
4325 dlsyms= | |
4326 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
4327 if test -n "$NM" && test -n "$global_symbol_pipe"; then | |
4328 dlsyms="${outputname}S.c" | |
4329 else | |
4330 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 | |
4331 fi | |
4332 fi | |
4333 | |
4334 if test -n "$dlsyms"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4335 case $dlsyms in |
0 | 4336 "") ;; |
4337 *.c) | |
4338 # Discover the nlist of each of the dlfiles. | |
4339 nlist="$output_objdir/${outputname}.nm" | |
4340 | |
4341 $show "$rm $nlist ${nlist}S ${nlist}T" | |
4342 $run $rm "$nlist" "${nlist}S" "${nlist}T" | |
4343 | |
4344 # Parse the name list into a source file. | |
4345 $show "creating $output_objdir/$dlsyms" | |
4346 | |
4347 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ | |
4348 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ | |
4349 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ | |
4350 | |
4351 #ifdef __cplusplus | |
4352 extern \"C\" { | |
4353 #endif | |
4354 | |
4355 /* Prevent the only kind of declaration conflicts we can make. */ | |
4356 #define lt_preloaded_symbols some_other_symbol | |
4357 | |
4358 /* External symbol declarations for the compiler. */\ | |
4359 " | |
4360 | |
4361 if test "$dlself" = yes; then | |
4362 $show "generating symbol list for \`$output'" | |
4363 | |
4364 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" | |
4365 | |
4366 # Add our own program objects to the symbol list. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4367 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` |
0 | 4368 for arg in $progfiles; do |
4369 $show "extracting global C symbols from \`$arg'" | |
4370 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" | |
4371 done | |
4372 | |
4373 if test -n "$exclude_expsyms"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4374 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' |
0 | 4375 $run eval '$mv "$nlist"T "$nlist"' |
4376 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4377 |
0 | 4378 if test -n "$export_symbols_regex"; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4379 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' |
0 | 4380 $run eval '$mv "$nlist"T "$nlist"' |
4381 fi | |
4382 | |
4383 # Prepare the list of exported symbols | |
4384 if test -z "$export_symbols"; then | |
4385 export_symbols="$output_objdir/$output.exp" | |
4386 $run $rm $export_symbols | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4387 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' |
0 | 4388 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4389 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' |
0 | 4390 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' |
4391 $run eval 'mv "$nlist"T "$nlist"' | |
4392 fi | |
4393 fi | |
4394 | |
4395 for arg in $dlprefiles; do | |
4396 $show "extracting global C symbols from \`$arg'" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4397 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4398 $run eval '$echo ": $name " >> "$nlist"' |
0 | 4399 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" |
4400 done | |
4401 | |
4402 if test -z "$run"; then | |
4403 # Make sure we have at least an empty file. | |
4404 test -f "$nlist" || : > "$nlist" | |
4405 | |
4406 if test -n "$exclude_expsyms"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4407 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T |
0 | 4408 $mv "$nlist"T "$nlist" |
4409 fi | |
4410 | |
4411 # Try sorting and uniquifying the output. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4412 if grep -v "^: " < "$nlist" | |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4413 if sort -k 3 </dev/null >/dev/null 2>&1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4414 sort -k 3 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4415 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4416 sort +2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4417 fi | |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4418 uniq > "$nlist"S; then |
0 | 4419 : |
4420 else | |
4421 grep -v "^: " < "$nlist" > "$nlist"S | |
4422 fi | |
4423 | |
4424 if test -f "$nlist"S; then | |
4425 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' | |
4426 else | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4427 $echo '/* NONE */' >> "$output_objdir/$dlsyms" |
0 | 4428 fi |
4429 | |
4430 $echo >> "$output_objdir/$dlsyms" "\ | |
4431 | |
4432 #undef lt_preloaded_symbols | |
4433 | |
4434 #if defined (__STDC__) && __STDC__ | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4435 # define lt_ptr void * |
0 | 4436 #else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4437 # define lt_ptr char * |
0 | 4438 # define const |
4439 #endif | |
4440 | |
4441 /* The mapping between symbol names and symbols. */ | |
4442 const struct { | |
4443 const char *name; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4444 lt_ptr address; |
0 | 4445 } |
4446 lt_preloaded_symbols[] = | |
4447 {\ | |
4448 " | |
4449 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4450 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" |
0 | 4451 |
4452 $echo >> "$output_objdir/$dlsyms" "\ | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4453 {0, (lt_ptr) 0} |
0 | 4454 }; |
4455 | |
4456 /* This works around a problem in FreeBSD linker */ | |
4457 #ifdef FREEBSD_WORKAROUND | |
4458 static const void *lt_preloaded_setup() { | |
4459 return lt_preloaded_symbols; | |
4460 } | |
4461 #endif | |
4462 | |
4463 #ifdef __cplusplus | |
4464 } | |
4465 #endif\ | |
4466 " | |
4467 fi | |
4468 | |
4469 pic_flag_for_symtable= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4470 case $host in |
0 | 4471 # compiling the symbol table file with pic_flag works around |
4472 # a FreeBSD bug that causes programs to crash when -lm is | |
4473 # linked before any other PIC object. But we must not use | |
4474 # pic_flag when linking with -static. The problem exists in | |
4475 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. | |
4476 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) | |
4477 case "$compile_command " in | |
4478 *" -static "*) ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4479 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; |
0 | 4480 esac;; |
4481 *-*-hpux*) | |
4482 case "$compile_command " in | |
4483 *" -static "*) ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4484 *) pic_flag_for_symtable=" $pic_flag";; |
0 | 4485 esac |
4486 esac | |
4487 | |
4488 # Now compile the dynamic symbol file. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4489 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4490 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? |
0 | 4491 |
4492 # Clean up the generated files. | |
4493 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" | |
4494 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" | |
4495 | |
4496 # Transform the symbol file into the correct name. | |
4497 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` | |
4498 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` | |
4499 ;; | |
4500 *) | |
4501 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4502 exit $EXIT_FAILURE |
0 | 4503 ;; |
4504 esac | |
4505 else | |
4506 # We keep going just in case the user didn't refer to | |
4507 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe | |
4508 # really was required. | |
4509 | |
4510 # Nullify the symbol file. | |
4511 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` | |
4512 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` | |
4513 fi | |
4514 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4515 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then |
0 | 4516 # Replace the output file specification. |
4517 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` | |
4518 link_command="$compile_command$compile_rpath" | |
4519 | |
4520 # We have no uninstalled library dependencies, so finalize right now. | |
4521 $show "$link_command" | |
4522 $run eval "$link_command" | |
4523 status=$? | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4524 |
0 | 4525 # Delete the generated files. |
4526 if test -n "$dlsyms"; then | |
4527 $show "$rm $output_objdir/${outputname}S.${objext}" | |
4528 $run $rm "$output_objdir/${outputname}S.${objext}" | |
4529 fi | |
4530 | |
4531 exit $status | |
4532 fi | |
4533 | |
4534 if test -n "$shlibpath_var"; then | |
4535 # We should set the shlibpath_var | |
4536 rpath= | |
4537 for dir in $temp_rpath; do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4538 case $dir in |
0 | 4539 [\\/]* | [A-Za-z]:[\\/]*) |
4540 # Absolute path. | |
4541 rpath="$rpath$dir:" | |
4542 ;; | |
4543 *) | |
4544 # Relative path: add a thisdir entry. | |
4545 rpath="$rpath\$thisdir/$dir:" | |
4546 ;; | |
4547 esac | |
4548 done | |
4549 temp_rpath="$rpath" | |
4550 fi | |
4551 | |
4552 if test -n "$compile_shlibpath$finalize_shlibpath"; then | |
4553 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" | |
4554 fi | |
4555 if test -n "$finalize_shlibpath"; then | |
4556 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" | |
4557 fi | |
4558 | |
4559 compile_var= | |
4560 finalize_var= | |
4561 if test -n "$runpath_var"; then | |
4562 if test -n "$perm_rpath"; then | |
4563 # We should set the runpath_var. | |
4564 rpath= | |
4565 for dir in $perm_rpath; do | |
4566 rpath="$rpath$dir:" | |
4567 done | |
4568 compile_var="$runpath_var=\"$rpath\$$runpath_var\" " | |
4569 fi | |
4570 if test -n "$finalize_perm_rpath"; then | |
4571 # We should set the runpath_var. | |
4572 rpath= | |
4573 for dir in $finalize_perm_rpath; do | |
4574 rpath="$rpath$dir:" | |
4575 done | |
4576 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " | |
4577 fi | |
4578 fi | |
4579 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4580 if test "$no_install" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4581 # We don't need to create a wrapper script. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4582 link_command="$compile_var$compile_command$compile_rpath" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4583 # Replace the output file specification. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4584 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4585 # Delete the old output file. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4586 $run $rm $output |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4587 # Link the executable and exit |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4588 $show "$link_command" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4589 $run eval "$link_command" || exit $? |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4590 exit $EXIT_SUCCESS |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4591 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4592 |
0 | 4593 if test "$hardcode_action" = relink; then |
4594 # Fast installation is not supported | |
4595 link_command="$compile_var$compile_command$compile_rpath" | |
4596 relink_command="$finalize_var$finalize_command$finalize_rpath" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4597 |
0 | 4598 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 |
4599 $echo "$modename: \`$output' will be relinked during installation" 1>&2 | |
4600 else | |
4601 if test "$fast_install" != no; then | |
4602 link_command="$finalize_var$compile_command$finalize_rpath" | |
4603 if test "$fast_install" = yes; then | |
4604 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` | |
4605 else | |
4606 # fast_install is set to needless | |
4607 relink_command= | |
4608 fi | |
4609 else | |
4610 link_command="$compile_var$compile_command$compile_rpath" | |
4611 relink_command="$finalize_var$finalize_command$finalize_rpath" | |
4612 fi | |
4613 fi | |
4614 | |
4615 # Replace the output file specification. | |
4616 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4617 |
0 | 4618 # Delete the old output files. |
4619 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname | |
4620 | |
4621 $show "$link_command" | |
4622 $run eval "$link_command" || exit $? | |
4623 | |
4624 # Now create the wrapper script. | |
4625 $show "creating $output" | |
4626 | |
4627 # Quote the relink command for shipping. | |
4628 if test -n "$relink_command"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4629 # Preserve any variables that may affect compiler behavior |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4630 for var in $variables_saved_for_relink; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4631 if eval test -z \"\${$var+set}\"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4632 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4633 elif eval var_value=\$$var; test -z "$var_value"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4634 relink_command="$var=; export $var; $relink_command" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4635 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4636 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4637 relink_command="$var=\"$var_value\"; export $var; $relink_command" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4638 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4639 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4640 relink_command="(cd `pwd`; $relink_command)" |
0 | 4641 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
4642 fi | |
4643 | |
4644 # Quote $echo for shipping. | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4645 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4646 case $progpath in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4647 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4648 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; |
0 | 4649 esac |
4650 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` | |
4651 else | |
4652 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` | |
4653 fi | |
4654 | |
4655 # Only actually do things if our run command is non-null. | |
4656 if test -z "$run"; then | |
4657 # win32 will think the script is a binary if it has | |
4658 # a .exe suffix, so we strip it off here. | |
4659 case $output in | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4660 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4661 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4662 # test for cygwin because mv fails w/o .exe extensions |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4663 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4664 *cygwin*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4665 exeext=.exe |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4666 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4667 *) exeext= ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4668 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4669 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4670 *cygwin* | *mingw* ) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4671 cwrappersource=`$echo ${objdir}/lt-${output}.c` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4672 cwrapper=`$echo ${output}.exe` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4673 $rm $cwrappersource $cwrapper |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4674 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4675 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4676 cat > $cwrappersource <<EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4677 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4678 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4679 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4680 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4681 The $output program cannot be directly executed until all the libtool |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4682 libraries that it depends on are installed. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4683 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4684 This wrapper executable should never be moved out of the build directory. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4685 If it is, it will not operate correctly. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4686 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4687 Currently, it simply execs the wrapper *script* "/bin/sh $output", |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4688 but could eventually absorb all of the scripts functionality and |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4689 exec $objdir/$outputname directly. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4690 */ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4691 EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4692 cat >> $cwrappersource<<"EOF" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4693 #include <stdio.h> |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4694 #include <stdlib.h> |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4695 #include <unistd.h> |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4696 #include <malloc.h> |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4697 #include <stdarg.h> |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4698 #include <assert.h> |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4699 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4700 #if defined(PATH_MAX) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4701 # define LT_PATHMAX PATH_MAX |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4702 #elif defined(MAXPATHLEN) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4703 # define LT_PATHMAX MAXPATHLEN |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4704 #else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4705 # define LT_PATHMAX 1024 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4706 #endif |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4707 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4708 #ifndef DIR_SEPARATOR |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4709 #define DIR_SEPARATOR '/' |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4710 #endif |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4711 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4712 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4713 defined (__OS2__) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4714 #define HAVE_DOS_BASED_FILE_SYSTEM |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4715 #ifndef DIR_SEPARATOR_2 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4716 #define DIR_SEPARATOR_2 '\\' |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4717 #endif |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4718 #endif |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4719 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4720 #ifndef DIR_SEPARATOR_2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4721 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4722 #else /* DIR_SEPARATOR_2 */ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4723 # define IS_DIR_SEPARATOR(ch) \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4724 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4725 #endif /* DIR_SEPARATOR_2 */ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4726 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4727 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4728 #define XFREE(stale) do { \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4729 if (stale) { free ((void *) stale); stale = 0; } \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4730 } while (0) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4731 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4732 const char *program_name = NULL; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4733 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4734 void * xmalloc (size_t num); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4735 char * xstrdup (const char *string); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4736 char * basename (const char *name); |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4737 char * fnqualify(const char *path); |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4738 char * strendzap(char *str, const char *pat); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4739 void lt_fatal (const char *message, ...); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4740 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4741 int |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4742 main (int argc, char *argv[]) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4743 { |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4744 char **newargz; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4745 int i; |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4746 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4747 program_name = (char *) xstrdup ((char *) basename (argv[0])); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4748 newargz = XMALLOC(char *, argc+2); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4749 EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4750 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4751 cat >> $cwrappersource <<EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4752 newargz[0] = "$SHELL"; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4753 EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4754 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4755 cat >> $cwrappersource <<"EOF" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4756 newargz[1] = fnqualify(argv[0]); |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4757 /* we know the script has the same name, without the .exe */ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4758 /* so make sure newargz[1] doesn't end in .exe */ |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4759 strendzap(newargz[1],".exe"); |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4760 for (i = 1; i < argc; i++) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4761 newargz[i+1] = xstrdup(argv[i]); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4762 newargz[argc+1] = NULL; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4763 EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4764 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4765 cat >> $cwrappersource <<EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4766 execv("$SHELL",newargz); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4767 EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4768 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4769 cat >> $cwrappersource <<"EOF" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4770 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4771 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4772 void * |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4773 xmalloc (size_t num) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4774 { |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4775 void * p = (void *) malloc (num); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4776 if (!p) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4777 lt_fatal ("Memory exhausted"); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4778 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4779 return p; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4780 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4781 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4782 char * |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4783 xstrdup (const char *string) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4784 { |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4785 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4786 ; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4787 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4788 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4789 char * |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4790 basename (const char *name) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4791 { |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4792 const char *base; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4793 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4794 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4795 /* Skip over the disk name in MSDOS pathnames. */ |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4796 if (isalpha (name[0]) && name[1] == ':') |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4797 name += 2; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4798 #endif |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4799 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4800 for (base = name; *name; name++) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4801 if (IS_DIR_SEPARATOR (*name)) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4802 base = name + 1; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4803 return (char *) base; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4804 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4805 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4806 char * |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4807 fnqualify(const char *path) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4808 { |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4809 size_t size; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4810 char *p; |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4811 char tmp[LT_PATHMAX + 1]; |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4812 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4813 assert(path != NULL); |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4814 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4815 /* Is it qualified already? */ |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4816 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4817 if (isalpha (path[0]) && path[1] == ':') |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4818 return xstrdup (path); |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4819 #endif |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4820 if (IS_DIR_SEPARATOR (path[0])) |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4821 return xstrdup (path); |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4822 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4823 /* prepend the current directory */ |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4824 /* doesn't handle '~' */ |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4825 if (getcwd (tmp, LT_PATHMAX) == NULL) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4826 lt_fatal ("getcwd failed"); |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4827 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4828 p = XMALLOC(char, size); |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4829 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4830 return p; |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4831 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4832 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4833 char * |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4834 strendzap(char *str, const char *pat) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4835 { |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4836 size_t len, patlen; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4837 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4838 assert(str != NULL); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4839 assert(pat != NULL); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4840 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4841 len = strlen(str); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4842 patlen = strlen(pat); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4843 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4844 if (patlen <= len) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4845 { |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4846 str += len - patlen; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4847 if (strcmp(str, pat) == 0) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4848 *str = '\0'; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4849 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4850 return str; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4851 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4852 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4853 static void |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4854 lt_error_core (int exit_status, const char * mode, |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4855 const char * message, va_list ap) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4856 { |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4857 fprintf (stderr, "%s: %s: ", program_name, mode); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4858 vfprintf (stderr, message, ap); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4859 fprintf (stderr, ".\n"); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4860 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4861 if (exit_status >= 0) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4862 exit (exit_status); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4863 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4864 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4865 void |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4866 lt_fatal (const char *message, ...) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4867 { |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4868 va_list ap; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4869 va_start (ap, message); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4870 lt_error_core (EXIT_FAILURE, "FATAL", message, ap); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4871 va_end (ap); |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4872 } |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4873 EOF |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4874 # we should really use a build-platform specific compiler |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4875 # here, but OTOH, the wrappers (shell script and this C one) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4876 # are only useful if you want to execute the "real" binary. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4877 # Since the "real" binary is built for $host, then this |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4878 # wrapper might as well be built for $host, too. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4879 $run $LTCC -s -o $cwrapper $cwrappersource |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4880 ;; |
0 | 4881 esac |
4882 $rm $output | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4883 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 |
0 | 4884 |
4885 $echo > $output "\ | |
4886 #! $SHELL | |
4887 | |
4888 # $output - temporary wrapper script for $objdir/$outputname | |
4889 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | |
4890 # | |
4891 # The $output program cannot be directly executed until all the libtool | |
4892 # libraries that it depends on are installed. | |
4893 # | |
4894 # This wrapper script should never be moved out of the build directory. | |
4895 # If it is, it will not operate correctly. | |
4896 | |
4897 # Sed substitution that helps us do robust quoting. It backslashifies | |
4898 # metacharacters that are still active within double-quoted strings. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4899 Xsed='${SED} -e 1s/^X//' |
0 | 4900 sed_quote_subst='$sed_quote_subst' |
4901 | |
4902 # The HP-UX ksh and POSIX shell print the target directory to stdout | |
4903 # if CDPATH is set. | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4904 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
0 | 4905 |
4906 relink_command=\"$relink_command\" | |
4907 | |
4908 # This environment variable determines our operation mode. | |
4909 if test \"\$libtool_install_magic\" = \"$magic\"; then | |
4910 # install mode needs the following variable: | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4911 notinst_deplibs='$notinst_deplibs' |
0 | 4912 else |
4913 # When we are sourced in execute mode, \$file and \$echo are already set. | |
4914 if test \"\$libtool_execute_magic\" != \"$magic\"; then | |
4915 echo=\"$qecho\" | |
4916 file=\"\$0\" | |
4917 # Make sure echo works. | |
4918 if test \"X\$1\" = X--no-reexec; then | |
4919 # Discard the --no-reexec flag, and continue. | |
4920 shift | |
4921 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then | |
4922 # Yippee, \$echo works! | |
4923 : | |
4924 else | |
4925 # Restart under the correct shell, and then maybe \$echo will work. | |
4926 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} | |
4927 fi | |
4928 fi\ | |
4929 " | |
4930 $echo >> $output "\ | |
4931 | |
4932 # Find the directory that this script lives in. | |
4933 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` | |
4934 test \"x\$thisdir\" = \"x\$file\" && thisdir=. | |
4935 | |
4936 # Follow symbolic links until we get to the real thisdir. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4937 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` |
0 | 4938 while test -n \"\$file\"; do |
4939 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` | |
4940 | |
4941 # If there was a directory component, then change thisdir. | |
4942 if test \"x\$destdir\" != \"x\$file\"; then | |
4943 case \"\$destdir\" in | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4944 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; |
0 | 4945 *) thisdir=\"\$thisdir/\$destdir\" ;; |
4946 esac | |
4947 fi | |
4948 | |
4949 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4950 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` |
0 | 4951 done |
4952 | |
4953 # Try to get the absolute directory name. | |
4954 absdir=\`cd \"\$thisdir\" && pwd\` | |
4955 test -n \"\$absdir\" && thisdir=\"\$absdir\" | |
4956 " | |
4957 | |
4958 if test "$fast_install" = yes; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4959 $echo >> $output "\ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4960 program=lt-'$outputname'$exeext |
0 | 4961 progdir=\"\$thisdir/$objdir\" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4962 |
0 | 4963 if test ! -f \"\$progdir/\$program\" || \\ |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4964 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ |
0 | 4965 test \"X\$file\" != \"X\$progdir/\$program\"; }; then |
4966 | |
4967 file=\"\$\$-\$program\" | |
4968 | |
4969 if test ! -d \"\$progdir\"; then | |
4970 $mkdir \"\$progdir\" | |
4971 else | |
4972 $rm \"\$progdir/\$file\" | |
4973 fi" | |
4974 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4975 $echo >> $output "\ |
0 | 4976 |
4977 # relink executable if necessary | |
4978 if test -n \"\$relink_command\"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4979 if relink_command_output=\`eval \$relink_command 2>&1\`; then : |
0 | 4980 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4981 $echo \"\$relink_command_output\" >&2 |
0 | 4982 $rm \"\$progdir/\$file\" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
4983 exit $EXIT_FAILURE |
0 | 4984 fi |
4985 fi | |
4986 | |
4987 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || | |
4988 { $rm \"\$progdir/\$program\"; | |
4989 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } | |
4990 $rm \"\$progdir/\$file\" | |
4991 fi" | |
4992 else | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4993 $echo >> $output "\ |
0 | 4994 program='$outputname' |
4995 progdir=\"\$thisdir/$objdir\" | |
4996 " | |
4997 fi | |
4998 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
4999 $echo >> $output "\ |
0 | 5000 |
5001 if test -f \"\$progdir/\$program\"; then" | |
5002 | |
5003 # Export our shlibpath_var if we have one. | |
5004 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then | |
5005 $echo >> $output "\ | |
5006 # Add our own library path to $shlibpath_var | |
5007 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" | |
5008 | |
5009 # Some systems cannot cope with colon-terminated $shlibpath_var | |
5010 # The second colon is a workaround for a bug in BeOS R4 sed | |
5011 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` | |
5012 | |
5013 export $shlibpath_var | |
5014 " | |
5015 fi | |
5016 | |
5017 # fixup the dll searchpath if we need to. | |
5018 if test -n "$dllsearchpath"; then | |
5019 $echo >> $output "\ | |
5020 # Add the dll search path components to the executable PATH | |
5021 PATH=$dllsearchpath:\$PATH | |
5022 " | |
5023 fi | |
5024 | |
5025 $echo >> $output "\ | |
5026 if test \"\$libtool_execute_magic\" != \"$magic\"; then | |
5027 # Run the actual program with our arguments. | |
5028 " | |
5029 case $host in | |
5030 # Backslashes separate directories on plain windows | |
5031 *-*-mingw | *-*-os2*) | |
5032 $echo >> $output "\ | |
5033 exec \$progdir\\\\\$program \${1+\"\$@\"} | |
5034 " | |
5035 ;; | |
5036 | |
5037 *) | |
5038 $echo >> $output "\ | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5039 exec \$progdir/\$program \${1+\"\$@\"} |
0 | 5040 " |
5041 ;; | |
5042 esac | |
5043 $echo >> $output "\ | |
5044 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5045 exit $EXIT_FAILURE |
0 | 5046 fi |
5047 else | |
5048 # The program doesn't exist. | |
5049 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 | |
5050 \$echo \"This script is just a wrapper for \$program.\" 1>&2 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5051 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5052 exit $EXIT_FAILURE |
0 | 5053 fi |
5054 fi\ | |
5055 " | |
5056 chmod +x $output | |
5057 fi | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5058 exit $EXIT_SUCCESS |
0 | 5059 ;; |
5060 esac | |
5061 | |
5062 # See if we need to build an old-fashioned archive. | |
5063 for oldlib in $oldlibs; do | |
5064 | |
5065 if test "$build_libtool_libs" = convenience; then | |
5066 oldobjs="$libobjs_save" | |
5067 addlibs="$convenience" | |
5068 build_libtool_libs=no | |
5069 else | |
5070 if test "$build_libtool_libs" = module; then | |
5071 oldobjs="$libobjs_save" | |
5072 build_libtool_libs=no | |
5073 else | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5074 oldobjs="$old_deplibs $non_pic_objects" |
0 | 5075 fi |
5076 addlibs="$old_convenience" | |
5077 fi | |
5078 | |
5079 if test -n "$addlibs"; then | |
5080 gentop="$output_objdir/${outputname}x" | |
5081 generated="$generated $gentop" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5082 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5083 func_extract_archives $gentop $addlibs |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5084 oldobjs="$oldobjs $func_extract_archives_result" |
0 | 5085 fi |
5086 | |
5087 # Do each command in the archive commands. | |
5088 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5089 cmds=$old_archive_from_new_cmds |
0 | 5090 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5091 eval cmds=\"$old_archive_cmds\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5092 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5093 if len=`expr "X$cmds" : ".*"` && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5094 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5095 cmds=$old_archive_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5096 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5097 # the command line is too long to link in one step, link in parts |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5098 $echo "using piecewise archive linking..." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5099 save_RANLIB=$RANLIB |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5100 RANLIB=: |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5101 objlist= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5102 concat_cmds= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5103 save_oldobjs=$oldobjs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5104 # GNU ar 2.10+ was changed to match POSIX; thus no paths are |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5105 # encoded into archives. This makes 'ar r' malfunction in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5106 # this piecewise linking case whenever conflicting object |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5107 # names appear in distinct ar calls; check, warn and compensate. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5108 if (for obj in $save_oldobjs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5109 do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5110 $echo "X$obj" | $Xsed -e 's%^.*/%%' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5111 done | sort | sort -uc >/dev/null 2>&1); then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5112 : |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5113 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5114 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5115 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5116 AR_FLAGS=cq |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5117 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5118 # Is there a better way of finding the last object in the list? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5119 for obj in $save_oldobjs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5120 do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5121 last_oldobj=$obj |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5122 done |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5123 for obj in $save_oldobjs |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5124 do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5125 oldobjs="$objlist $obj" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5126 objlist="$objlist $obj" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5127 eval test_cmds=\"$old_archive_cmds\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5128 if len=`expr "X$test_cmds" : ".*"` && |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5129 test "$len" -le "$max_cmd_len"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5130 : |
0 | 5131 else |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5132 # the above command should be used before it gets too long |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5133 oldobjs=$objlist |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5134 if test "$obj" = "$last_oldobj" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5135 RANLIB=$save_RANLIB |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5136 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5137 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5138 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5139 objlist= |
0 | 5140 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5141 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5142 RANLIB=$save_RANLIB |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5143 oldobjs=$objlist |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5144 if test "X$oldobjs" = "X" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5145 eval cmds=\"\$concat_cmds\" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5146 else |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5147 eval cmds=\"\$concat_cmds~\$old_archive_cmds\" |
0 | 5148 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5149 fi |
0 | 5150 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5151 save_ifs="$IFS"; IFS='~' |
0 | 5152 for cmd in $cmds; do |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5153 eval cmd=\"$cmd\" |
0 | 5154 IFS="$save_ifs" |
5155 $show "$cmd" | |
5156 $run eval "$cmd" || exit $? | |
5157 done | |
5158 IFS="$save_ifs" | |
5159 done | |
5160 | |
5161 if test -n "$generated"; then | |
5162 $show "${rm}r$generated" | |
5163 $run ${rm}r$generated | |
5164 fi | |
5165 | |
5166 # Now create the libtool archive. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5167 case $output in |
0 | 5168 *.la) |
5169 old_library= | |
5170 test "$build_old_libs" = yes && old_library="$libname.$libext" | |
5171 $show "creating $output" | |
5172 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5173 # Preserve any variables that may affect compiler behavior |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5174 for var in $variables_saved_for_relink; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5175 if eval test -z \"\${$var+set}\"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5176 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5177 elif eval var_value=\$$var; test -z "$var_value"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5178 relink_command="$var=; export $var; $relink_command" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5179 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5180 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5181 relink_command="$var=\"$var_value\"; export $var; $relink_command" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5182 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5183 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5184 # Quote the link command for shipping. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5185 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5186 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5187 if test "$hardcode_automatic" = yes ; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5188 relink_command= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5189 fi |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5190 |
0 | 5191 |
5192 # Only create the output if not a dry run. | |
5193 if test -z "$run"; then | |
5194 for installed in no yes; do | |
5195 if test "$installed" = yes; then | |
5196 if test -z "$install_libdir"; then | |
5197 break | |
5198 fi | |
5199 output="$output_objdir/$outputname"i | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5200 # Replace all uninstalled libtool libraries with the installed ones |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5201 newdependency_libs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5202 for deplib in $dependency_libs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5203 case $deplib in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5204 *.la) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5205 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5206 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5207 if test -z "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5208 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5209 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5210 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5211 newdependency_libs="$newdependency_libs $libdir/$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5212 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5213 *) newdependency_libs="$newdependency_libs $deplib" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5214 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5215 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5216 dependency_libs="$newdependency_libs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5217 newdlfiles= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5218 for lib in $dlfiles; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5219 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5220 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5221 if test -z "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5222 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5223 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5224 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5225 newdlfiles="$newdlfiles $libdir/$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5226 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5227 dlfiles="$newdlfiles" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5228 newdlprefiles= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5229 for lib in $dlprefiles; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5230 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5231 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5232 if test -z "$libdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5233 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5234 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5235 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5236 newdlprefiles="$newdlprefiles $libdir/$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5237 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5238 dlprefiles="$newdlprefiles" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5239 else |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5240 newdlfiles= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5241 for lib in $dlfiles; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5242 case $lib in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5243 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5244 *) abs=`pwd`"/$lib" ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5245 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5246 newdlfiles="$newdlfiles $abs" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5247 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5248 dlfiles="$newdlfiles" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5249 newdlprefiles= |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5250 for lib in $dlprefiles; do |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5251 case $lib in |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5252 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5253 *) abs=`pwd`"/$lib" ;; |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5254 esac |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5255 newdlprefiles="$newdlprefiles $abs" |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5256 done |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5257 dlprefiles="$newdlprefiles" |
0 | 5258 fi |
5259 $rm $output | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5260 # place dlname in correct position for cygwin |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5261 tdlname=$dlname |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5262 case $host,$output,$installed,$module,$dlname in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5263 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5264 esac |
0 | 5265 $echo > $output "\ |
5266 # $outputname - a libtool library file | |
5267 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | |
5268 # | |
5269 # Please DO NOT delete this file! | |
5270 # It is necessary for linking the library. | |
5271 | |
5272 # The name that we can dlopen(3). | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5273 dlname='$tdlname' |
0 | 5274 |
5275 # Names of this library. | |
5276 library_names='$library_names' | |
5277 | |
5278 # The name of the static archive. | |
5279 old_library='$old_library' | |
5280 | |
5281 # Libraries that this one depends upon. | |
5282 dependency_libs='$dependency_libs' | |
5283 | |
5284 # Version information for $libname. | |
5285 current=$current | |
5286 age=$age | |
5287 revision=$revision | |
5288 | |
5289 # Is this an already installed library? | |
5290 installed=$installed | |
5291 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5292 # Should we warn about portability when linking against -modules? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5293 shouldnotlink=$module |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5294 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5295 # Files to dlopen/dlpreopen |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5296 dlopen='$dlfiles' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5297 dlpreopen='$dlprefiles' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5298 |
0 | 5299 # Directory that this library needs to be installed in: |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5300 libdir='$install_libdir'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5301 if test "$installed" = no && test "$need_relink" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5302 $echo >> $output "\ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5303 relink_command=\"$relink_command\"" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5304 fi |
0 | 5305 done |
5306 fi | |
5307 | |
5308 # Do a symbolic link so that the libtool archive can be found in | |
5309 # LD_LIBRARY_PATH before the program is installed. | |
5310 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5311 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? |
0 | 5312 ;; |
5313 esac | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5314 exit $EXIT_SUCCESS |
0 | 5315 ;; |
5316 | |
5317 # libtool install mode | |
5318 install) | |
5319 modename="$modename: install" | |
5320 | |
5321 # There may be an optional sh(1) argument at the beginning of | |
5322 # install_prog (especially on Windows NT). | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5323 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5324 # Allow the use of GNU shtool's install command. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5325 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then |
0 | 5326 # Aesthetically quote it. |
5327 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5328 case $arg in |
0 | 5329 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) |
5330 arg="\"$arg\"" | |
5331 ;; | |
5332 esac | |
5333 install_prog="$arg " | |
5334 arg="$1" | |
5335 shift | |
5336 else | |
5337 install_prog= | |
5338 arg="$nonopt" | |
5339 fi | |
5340 | |
5341 # The real first argument should be the name of the installation program. | |
5342 # Aesthetically quote it. | |
5343 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5344 case $arg in |
0 | 5345 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) |
5346 arg="\"$arg\"" | |
5347 ;; | |
5348 esac | |
5349 install_prog="$install_prog$arg" | |
5350 | |
5351 # We need to accept at least all the BSD install flags. | |
5352 dest= | |
5353 files= | |
5354 opts= | |
5355 prev= | |
5356 install_type= | |
5357 isdir=no | |
5358 stripme= | |
5359 for arg | |
5360 do | |
5361 if test -n "$dest"; then | |
5362 files="$files $dest" | |
5363 dest="$arg" | |
5364 continue | |
5365 fi | |
5366 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5367 case $arg in |
0 | 5368 -d) isdir=yes ;; |
5369 -f) prev="-f" ;; | |
5370 -g) prev="-g" ;; | |
5371 -m) prev="-m" ;; | |
5372 -o) prev="-o" ;; | |
5373 -s) | |
5374 stripme=" -s" | |
5375 continue | |
5376 ;; | |
5377 -*) ;; | |
5378 | |
5379 *) | |
5380 # If the previous option needed an argument, then skip it. | |
5381 if test -n "$prev"; then | |
5382 prev= | |
5383 else | |
5384 dest="$arg" | |
5385 continue | |
5386 fi | |
5387 ;; | |
5388 esac | |
5389 | |
5390 # Aesthetically quote the argument. | |
5391 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5392 case $arg in |
0 | 5393 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) |
5394 arg="\"$arg\"" | |
5395 ;; | |
5396 esac | |
5397 install_prog="$install_prog $arg" | |
5398 done | |
5399 | |
5400 if test -z "$install_prog"; then | |
5401 $echo "$modename: you must specify an install program" 1>&2 | |
5402 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5403 exit $EXIT_FAILURE |
0 | 5404 fi |
5405 | |
5406 if test -n "$prev"; then | |
5407 $echo "$modename: the \`$prev' option requires an argument" 1>&2 | |
5408 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5409 exit $EXIT_FAILURE |
0 | 5410 fi |
5411 | |
5412 if test -z "$files"; then | |
5413 if test -z "$dest"; then | |
5414 $echo "$modename: no file or destination specified" 1>&2 | |
5415 else | |
5416 $echo "$modename: you must specify a destination" 1>&2 | |
5417 fi | |
5418 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5419 exit $EXIT_FAILURE |
0 | 5420 fi |
5421 | |
5422 # Strip any trailing slash from the destination. | |
5423 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` | |
5424 | |
5425 # Check to see that the destination is a directory. | |
5426 test -d "$dest" && isdir=yes | |
5427 if test "$isdir" = yes; then | |
5428 destdir="$dest" | |
5429 destname= | |
5430 else | |
5431 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` | |
5432 test "X$destdir" = "X$dest" && destdir=. | |
5433 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` | |
5434 | |
5435 # Not a directory, so check to see that there is only one file specified. | |
5436 set dummy $files | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5437 if test "$#" -gt 2; then |
0 | 5438 $echo "$modename: \`$dest' is not a directory" 1>&2 |
5439 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5440 exit $EXIT_FAILURE |
0 | 5441 fi |
5442 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5443 case $destdir in |
0 | 5444 [\\/]* | [A-Za-z]:[\\/]*) ;; |
5445 *) | |
5446 for file in $files; do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5447 case $file in |
0 | 5448 *.lo) ;; |
5449 *) | |
5450 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 | |
5451 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5452 exit $EXIT_FAILURE |
0 | 5453 ;; |
5454 esac | |
5455 done | |
5456 ;; | |
5457 esac | |
5458 | |
5459 # This variable tells wrapper scripts just to set variables rather | |
5460 # than running their programs. | |
5461 libtool_install_magic="$magic" | |
5462 | |
5463 staticlibs= | |
5464 future_libdirs= | |
5465 current_libdirs= | |
5466 for file in $files; do | |
5467 | |
5468 # Do each installation. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5469 case $file in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5470 *.$libext) |
0 | 5471 # Do the static libraries later. |
5472 staticlibs="$staticlibs $file" | |
5473 ;; | |
5474 | |
5475 *.la) | |
5476 # Check to see that this really is a libtool archive. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5477 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
0 | 5478 else |
5479 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 | |
5480 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5481 exit $EXIT_FAILURE |
0 | 5482 fi |
5483 | |
5484 library_names= | |
5485 old_library= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5486 relink_command= |
0 | 5487 # If there is no directory component, then add one. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5488 case $file in |
0 | 5489 */* | *\\*) . $file ;; |
5490 *) . ./$file ;; | |
5491 esac | |
5492 | |
5493 # Add the libdir to current_libdirs if it is the destination. | |
5494 if test "X$destdir" = "X$libdir"; then | |
5495 case "$current_libdirs " in | |
5496 *" $libdir "*) ;; | |
5497 *) current_libdirs="$current_libdirs $libdir" ;; | |
5498 esac | |
5499 else | |
5500 # Note the libdir as a future libdir. | |
5501 case "$future_libdirs " in | |
5502 *" $libdir "*) ;; | |
5503 *) future_libdirs="$future_libdirs $libdir" ;; | |
5504 esac | |
5505 fi | |
5506 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5507 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ |
0 | 5508 test "X$dir" = "X$file/" && dir= |
5509 dir="$dir$objdir" | |
5510 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5511 if test -n "$relink_command"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5512 # Determine the prefix the user has applied to our future dir. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5513 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5514 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5515 # Don't allow the user to place us outside of our expected |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5516 # location b/c this prevents finding dependent libraries that |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5517 # are installed to the same prefix. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5518 # At present, this check doesn't affect windows .dll's that |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5519 # are installed into $libdir/../bin (currently, that works fine) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5520 # but it's something to keep an eye on. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5521 if test "$inst_prefix_dir" = "$destdir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5522 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5523 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5524 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5525 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5526 if test -n "$inst_prefix_dir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5527 # Stick the inst_prefix_dir data into the link command. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5528 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5529 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5530 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5531 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5532 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5533 $echo "$modename: warning: relinking \`$file'" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5534 $show "$relink_command" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5535 if $run eval "$relink_command"; then : |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5536 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5537 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5538 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5539 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5540 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5541 |
0 | 5542 # See the names of the shared library. |
5543 set dummy $library_names | |
5544 if test -n "$2"; then | |
5545 realname="$2" | |
5546 shift | |
5547 shift | |
5548 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5549 srcname="$realname" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5550 test -n "$relink_command" && srcname="$realname"T |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5551 |
0 | 5552 # Install the shared library and build the symlinks. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5553 $show "$install_prog $dir/$srcname $destdir/$realname" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5554 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5555 if test -n "$stripme" && test -n "$striplib"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5556 $show "$striplib $destdir/$realname" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5557 $run eval "$striplib $destdir/$realname" || exit $? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5558 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5559 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5560 if test "$#" -gt 0; then |
0 | 5561 # Delete the old symlinks, and create new ones. |
5562 for linkname | |
5563 do | |
5564 if test "$linkname" != "$realname"; then | |
5565 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" | |
5566 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" | |
5567 fi | |
5568 done | |
5569 fi | |
5570 | |
5571 # Do each command in the postinstall commands. | |
5572 lib="$destdir/$realname" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5573 cmds=$postinstall_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5574 save_ifs="$IFS"; IFS='~' |
0 | 5575 for cmd in $cmds; do |
5576 IFS="$save_ifs" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5577 eval cmd=\"$cmd\" |
0 | 5578 $show "$cmd" |
5579 $run eval "$cmd" || exit $? | |
5580 done | |
5581 IFS="$save_ifs" | |
5582 fi | |
5583 | |
5584 # Install the pseudo-library for information purposes. | |
5585 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
5586 instname="$dir/$name"i | |
5587 $show "$install_prog $instname $destdir/$name" | |
5588 $run eval "$install_prog $instname $destdir/$name" || exit $? | |
5589 | |
5590 # Maybe install the static library, too. | |
5591 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" | |
5592 ;; | |
5593 | |
5594 *.lo) | |
5595 # Install (i.e. copy) a libtool object. | |
5596 | |
5597 # Figure out destination file name, if it wasn't already specified. | |
5598 if test -n "$destname"; then | |
5599 destfile="$destdir/$destname" | |
5600 else | |
5601 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
5602 destfile="$destdir/$destfile" | |
5603 fi | |
5604 | |
5605 # Deduce the name of the destination old-style object file. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5606 case $destfile in |
0 | 5607 *.lo) |
5608 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` | |
5609 ;; | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5610 *.$objext) |
0 | 5611 staticdest="$destfile" |
5612 destfile= | |
5613 ;; | |
5614 *) | |
5615 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 | |
5616 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5617 exit $EXIT_FAILURE |
0 | 5618 ;; |
5619 esac | |
5620 | |
5621 # Install the libtool object if requested. | |
5622 if test -n "$destfile"; then | |
5623 $show "$install_prog $file $destfile" | |
5624 $run eval "$install_prog $file $destfile" || exit $? | |
5625 fi | |
5626 | |
5627 # Install the old object if enabled. | |
5628 if test "$build_old_libs" = yes; then | |
5629 # Deduce the name of the old-style object file. | |
5630 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` | |
5631 | |
5632 $show "$install_prog $staticobj $staticdest" | |
5633 $run eval "$install_prog \$staticobj \$staticdest" || exit $? | |
5634 fi | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5635 exit $EXIT_SUCCESS |
0 | 5636 ;; |
5637 | |
5638 *) | |
5639 # Figure out destination file name, if it wasn't already specified. | |
5640 if test -n "$destname"; then | |
5641 destfile="$destdir/$destname" | |
5642 else | |
5643 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
5644 destfile="$destdir/$destfile" | |
5645 fi | |
5646 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5647 # If the file is missing, and there is a .exe on the end, strip it |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5648 # because it is most likely a libtool script we actually want to |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5649 # install |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5650 stripped_ext="" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5651 case $file in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5652 *.exe) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5653 if test ! -f "$file"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5654 file=`$echo $file|${SED} 's,.exe$,,'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5655 stripped_ext=".exe" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5656 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5657 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5658 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5659 |
0 | 5660 # Do a test to see if this is really a libtool program. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5661 case $host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5662 *cygwin*|*mingw*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5663 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5664 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5665 *) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5666 wrapper=$file |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5667 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5668 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5669 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5670 notinst_deplibs= |
0 | 5671 relink_command= |
5672 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5673 # To insure that "foo" is sourced, and not "foo.exe", |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5674 # finese the cygwin/MSYS system by explicitly sourcing "foo." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5675 # which disallows the automatic-append-.exe behavior. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5676 case $build in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5677 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5678 *) wrapperdot=${wrapper} ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5679 esac |
0 | 5680 # If there is no directory component, then add one. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5681 case $file in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5682 */* | *\\*) . ${wrapperdot} ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5683 *) . ./${wrapperdot} ;; |
0 | 5684 esac |
5685 | |
5686 # Check the variables that should have been set. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5687 if test -z "$notinst_deplibs"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5688 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5689 exit $EXIT_FAILURE |
0 | 5690 fi |
5691 | |
5692 finalize=yes | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5693 for lib in $notinst_deplibs; do |
0 | 5694 # Check to see that each library is installed. |
5695 libdir= | |
5696 if test -f "$lib"; then | |
5697 # If there is no directory component, then add one. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5698 case $lib in |
0 | 5699 */* | *\\*) . $lib ;; |
5700 *) . ./$lib ;; | |
5701 esac | |
5702 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5703 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test |
0 | 5704 if test -n "$libdir" && test ! -f "$libfile"; then |
5705 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 | |
5706 finalize=no | |
5707 fi | |
5708 done | |
5709 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5710 relink_command= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5711 # To insure that "foo" is sourced, and not "foo.exe", |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5712 # finese the cygwin/MSYS system by explicitly sourcing "foo." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5713 # which disallows the automatic-append-.exe behavior. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5714 case $build in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5715 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5716 *) wrapperdot=${wrapper} ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5717 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5718 # If there is no directory component, then add one. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5719 case $file in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5720 */* | *\\*) . ${wrapperdot} ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5721 *) . ./${wrapperdot} ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5722 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5723 |
0 | 5724 outputname= |
5725 if test "$fast_install" = no && test -n "$relink_command"; then | |
5726 if test "$finalize" = yes && test -z "$run"; then | |
5727 tmpdir="/tmp" | |
5728 test -n "$TMPDIR" && tmpdir="$TMPDIR" | |
5729 tmpdir="$tmpdir/libtool-$$" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5730 save_umask=`umask` |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5731 umask 0077 |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5732 if $mkdir "$tmpdir"; then |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5733 umask $save_umask |
0 | 5734 else |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5735 umask $save_umask |
0 | 5736 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 |
5737 continue | |
5738 fi | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5739 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` |
0 | 5740 outputname="$tmpdir/$file" |
5741 # Replace the output file specification. | |
5742 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` | |
5743 | |
5744 $show "$relink_command" | |
5745 if $run eval "$relink_command"; then : | |
5746 else | |
5747 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 | |
5748 ${rm}r "$tmpdir" | |
5749 continue | |
5750 fi | |
5751 file="$outputname" | |
5752 else | |
5753 $echo "$modename: warning: cannot relink \`$file'" 1>&2 | |
5754 fi | |
5755 else | |
5756 # Install the binary that we compiled earlier. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5757 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` |
0 | 5758 fi |
5759 fi | |
5760 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5761 # remove .exe since cygwin /usr/bin/install will append another |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5762 # one anyways |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5763 case $install_prog,$host in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5764 */usr/bin/install*,*cygwin*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5765 case $file:$destfile in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5766 *.exe:*.exe) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5767 # this is ok |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5768 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5769 *.exe:*) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5770 destfile=$destfile.exe |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5771 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5772 *:*.exe) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5773 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5774 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5775 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5776 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5777 esac |
0 | 5778 $show "$install_prog$stripme $file $destfile" |
5779 $run eval "$install_prog\$stripme \$file \$destfile" || exit $? | |
5780 test -n "$outputname" && ${rm}r "$tmpdir" | |
5781 ;; | |
5782 esac | |
5783 done | |
5784 | |
5785 for file in $staticlibs; do | |
5786 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | |
5787 | |
5788 # Set up the ranlib parameters. | |
5789 oldlib="$destdir/$name" | |
5790 | |
5791 $show "$install_prog $file $oldlib" | |
5792 $run eval "$install_prog \$file \$oldlib" || exit $? | |
5793 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5794 if test -n "$stripme" && test -n "$old_striplib"; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5795 $show "$old_striplib $oldlib" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5796 $run eval "$old_striplib $oldlib" || exit $? |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5797 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5798 |
0 | 5799 # Do each command in the postinstall commands. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5800 cmds=$old_postinstall_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5801 save_ifs="$IFS"; IFS='~' |
0 | 5802 for cmd in $cmds; do |
5803 IFS="$save_ifs" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5804 eval cmd=\"$cmd\" |
0 | 5805 $show "$cmd" |
5806 $run eval "$cmd" || exit $? | |
5807 done | |
5808 IFS="$save_ifs" | |
5809 done | |
5810 | |
5811 if test -n "$future_libdirs"; then | |
5812 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 | |
5813 fi | |
5814 | |
5815 if test -n "$current_libdirs"; then | |
5816 # Maybe just do a dry run. | |
5817 test -n "$run" && current_libdirs=" -n$current_libdirs" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5818 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5819 else |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5820 exit $EXIT_SUCCESS |
0 | 5821 fi |
5822 ;; | |
5823 | |
5824 # libtool finish mode | |
5825 finish) | |
5826 modename="$modename: finish" | |
5827 libdirs="$nonopt" | |
5828 admincmds= | |
5829 | |
5830 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then | |
5831 for dir | |
5832 do | |
5833 libdirs="$libdirs $dir" | |
5834 done | |
5835 | |
5836 for libdir in $libdirs; do | |
5837 if test -n "$finish_cmds"; then | |
5838 # Do each command in the finish commands. | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5839 cmds=$finish_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5840 save_ifs="$IFS"; IFS='~' |
0 | 5841 for cmd in $cmds; do |
5842 IFS="$save_ifs" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5843 eval cmd=\"$cmd\" |
0 | 5844 $show "$cmd" |
5845 $run eval "$cmd" || admincmds="$admincmds | |
5846 $cmd" | |
5847 done | |
5848 IFS="$save_ifs" | |
5849 fi | |
5850 if test -n "$finish_eval"; then | |
5851 # Do the single finish_eval. | |
5852 eval cmds=\"$finish_eval\" | |
5853 $run eval "$cmds" || admincmds="$admincmds | |
5854 $cmds" | |
5855 fi | |
5856 done | |
5857 fi | |
5858 | |
5859 # Exit here if they wanted silent mode. | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5860 test "$show" = : && exit $EXIT_SUCCESS |
0 | 5861 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5862 $echo "----------------------------------------------------------------------" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5863 $echo "Libraries have been installed in:" |
0 | 5864 for libdir in $libdirs; do |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5865 $echo " $libdir" |
0 | 5866 done |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5867 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5868 $echo "If you ever happen to want to link against installed libraries" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5869 $echo "in a given directory, LIBDIR, you must either use libtool, and" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5870 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5871 $echo "flag during linking and do at least one of the following:" |
0 | 5872 if test -n "$shlibpath_var"; then |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5873 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5874 $echo " during execution" |
0 | 5875 fi |
5876 if test -n "$runpath_var"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5877 $echo " - add LIBDIR to the \`$runpath_var' environment variable" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5878 $echo " during linking" |
0 | 5879 fi |
5880 if test -n "$hardcode_libdir_flag_spec"; then | |
5881 libdir=LIBDIR | |
5882 eval flag=\"$hardcode_libdir_flag_spec\" | |
5883 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5884 $echo " - use the \`$flag' linker flag" |
0 | 5885 fi |
5886 if test -n "$admincmds"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5887 $echo " - have your system administrator run these commands:$admincmds" |
0 | 5888 fi |
5889 if test -f /etc/ld.so.conf; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5890 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" |
0 | 5891 fi |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5892 $echo |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5893 $echo "See any operating system documentation about shared libraries for" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5894 $echo "more information, such as the ld(1) and ld.so(8) manual pages." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5895 $echo "----------------------------------------------------------------------" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5896 exit $EXIT_SUCCESS |
0 | 5897 ;; |
5898 | |
5899 # libtool execute mode | |
5900 execute) | |
5901 modename="$modename: execute" | |
5902 | |
5903 # The first argument is the command name. | |
5904 cmd="$nonopt" | |
5905 if test -z "$cmd"; then | |
5906 $echo "$modename: you must specify a COMMAND" 1>&2 | |
5907 $echo "$help" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5908 exit $EXIT_FAILURE |
0 | 5909 fi |
5910 | |
5911 # Handle -dlopen flags immediately. | |
5912 for file in $execute_dlfiles; do | |
5913 if test ! -f "$file"; then | |
5914 $echo "$modename: \`$file' is not a file" 1>&2 | |
5915 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5916 exit $EXIT_FAILURE |
0 | 5917 fi |
5918 | |
5919 dir= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5920 case $file in |
0 | 5921 *.la) |
5922 # Check to see that this really is a libtool archive. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5923 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
0 | 5924 else |
5925 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | |
5926 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5927 exit $EXIT_FAILURE |
0 | 5928 fi |
5929 | |
5930 # Read the libtool library. | |
5931 dlname= | |
5932 library_names= | |
5933 | |
5934 # If there is no directory component, then add one. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5935 case $file in |
0 | 5936 */* | *\\*) . $file ;; |
5937 *) . ./$file ;; | |
5938 esac | |
5939 | |
5940 # Skip this library if it cannot be dlopened. | |
5941 if test -z "$dlname"; then | |
5942 # Warn if it was a shared library. | |
5943 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" | |
5944 continue | |
5945 fi | |
5946 | |
5947 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | |
5948 test "X$dir" = "X$file" && dir=. | |
5949 | |
5950 if test -f "$dir/$objdir/$dlname"; then | |
5951 dir="$dir/$objdir" | |
5952 else | |
5953 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
5954 exit $EXIT_FAILURE |
0 | 5955 fi |
5956 ;; | |
5957 | |
5958 *.lo) | |
5959 # Just add the directory containing the .lo file. | |
5960 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | |
5961 test "X$dir" = "X$file" && dir=. | |
5962 ;; | |
5963 | |
5964 *) | |
5965 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 | |
5966 continue | |
5967 ;; | |
5968 esac | |
5969 | |
5970 # Get the absolute pathname. | |
5971 absdir=`cd "$dir" && pwd` | |
5972 test -n "$absdir" && dir="$absdir" | |
5973 | |
5974 # Now add the directory to shlibpath_var. | |
5975 if eval "test -z \"\$$shlibpath_var\""; then | |
5976 eval "$shlibpath_var=\"\$dir\"" | |
5977 else | |
5978 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" | |
5979 fi | |
5980 done | |
5981 | |
5982 # This variable tells wrapper scripts just to set shlibpath_var | |
5983 # rather than running their programs. | |
5984 libtool_execute_magic="$magic" | |
5985 | |
5986 # Check if any of the arguments is a wrapper script. | |
5987 args= | |
5988 for file | |
5989 do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5990 case $file in |
0 | 5991 -*) ;; |
5992 *) | |
5993 # Do a test to see if this is really a libtool program. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5994 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
0 | 5995 # If there is no directory component, then add one. |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
5996 case $file in |
0 | 5997 */* | *\\*) . $file ;; |
5998 *) . ./$file ;; | |
5999 esac | |
6000 | |
6001 # Transform arg to wrapped name. | |
6002 file="$progdir/$program" | |
6003 fi | |
6004 ;; | |
6005 esac | |
6006 # Quote arguments (to preserve shell metacharacters). | |
6007 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` | |
6008 args="$args \"$file\"" | |
6009 done | |
6010 | |
6011 if test -z "$run"; then | |
6012 if test -n "$shlibpath_var"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6013 # Export the shlibpath_var. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6014 eval "export $shlibpath_var" |
0 | 6015 fi |
6016 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6017 # Restore saved environment variables |
0 | 6018 if test "${save_LC_ALL+set}" = set; then |
6019 LC_ALL="$save_LC_ALL"; export LC_ALL | |
6020 fi | |
6021 if test "${save_LANG+set}" = set; then | |
6022 LANG="$save_LANG"; export LANG | |
6023 fi | |
6024 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6025 # Now prepare to actually exec the command. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6026 exec_cmd="\$cmd$args" |
0 | 6027 else |
6028 # Display what would be done. | |
6029 if test -n "$shlibpath_var"; then | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6030 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6031 $echo "export $shlibpath_var" |
0 | 6032 fi |
6033 $echo "$cmd$args" | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6034 exit $EXIT_SUCCESS |
0 | 6035 fi |
6036 ;; | |
6037 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6038 # libtool clean and uninstall mode |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6039 clean | uninstall) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6040 modename="$modename: $mode" |
0 | 6041 rm="$nonopt" |
6042 files= | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6043 rmforce= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6044 exit_status=0 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6045 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6046 # This variable tells wrapper scripts just to set variables rather |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6047 # than running their programs. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6048 libtool_install_magic="$magic" |
0 | 6049 |
6050 for arg | |
6051 do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6052 case $arg in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6053 -f) rm="$rm $arg"; rmforce=yes ;; |
0 | 6054 -*) rm="$rm $arg" ;; |
6055 *) files="$files $arg" ;; | |
6056 esac | |
6057 done | |
6058 | |
6059 if test -z "$rm"; then | |
6060 $echo "$modename: you must specify an RM program" 1>&2 | |
6061 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6062 exit $EXIT_FAILURE |
0 | 6063 fi |
6064 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6065 rmdirs= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6066 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6067 origobjdir="$objdir" |
0 | 6068 for file in $files; do |
6069 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6070 if test "X$dir" = "X$file"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6071 dir=. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6072 objdir="$origobjdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6073 else |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6074 objdir="$dir/$origobjdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6075 fi |
0 | 6076 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6077 test "$mode" = uninstall && objdir="$dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6078 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6079 # Remember objdir for removal later, being careful to avoid duplicates |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6080 if test "$mode" = clean; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6081 case " $rmdirs " in |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6082 *" $objdir "*) ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6083 *) rmdirs="$rmdirs $objdir" ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6084 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6085 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6086 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6087 # Don't error if the file doesn't exist and rm -f was used. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6088 if (test -L "$file") >/dev/null 2>&1 \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6089 || (test -h "$file") >/dev/null 2>&1 \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6090 || test -f "$file"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6091 : |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6092 elif test -d "$file"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6093 exit_status=1 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6094 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6095 elif test "$rmforce" = yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6096 continue |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6097 fi |
0 | 6098 |
6099 rmfiles="$file" | |
6100 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6101 case $name in |
0 | 6102 *.la) |
6103 # Possibly a libtool archive, so verify it. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6104 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
0 | 6105 . $dir/$name |
6106 | |
6107 # Delete the libtool libraries and symlinks. | |
6108 for n in $library_names; do | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6109 rmfiles="$rmfiles $objdir/$n" |
0 | 6110 done |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6111 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6112 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6113 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6114 if test "$mode" = uninstall; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6115 if test -n "$library_names"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6116 # Do each command in the postuninstall commands. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6117 cmds=$postuninstall_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6118 save_ifs="$IFS"; IFS='~' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6119 for cmd in $cmds; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6120 IFS="$save_ifs" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6121 eval cmd=\"$cmd\" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6122 $show "$cmd" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6123 $run eval "$cmd" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6124 if test "$?" -ne 0 && test "$rmforce" != yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6125 exit_status=1 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6126 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6127 done |
0 | 6128 IFS="$save_ifs" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6129 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6130 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6131 if test -n "$old_library"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6132 # Do each command in the old_postuninstall commands. |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6133 cmds=$old_postuninstall_cmds |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6134 save_ifs="$IFS"; IFS='~' |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6135 for cmd in $cmds; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6136 IFS="$save_ifs" |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6137 eval cmd=\"$cmd\" |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6138 $show "$cmd" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6139 $run eval "$cmd" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6140 if test "$?" -ne 0 && test "$rmforce" != yes; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6141 exit_status=1 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6142 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6143 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6144 IFS="$save_ifs" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6145 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6146 # FIXME: should reinstall the best remaining shared library. |
0 | 6147 fi |
6148 fi | |
6149 ;; | |
6150 | |
6151 *.lo) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6152 # Possibly a libtool object, so verify it. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6153 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6154 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6155 # Read the .lo file |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6156 . $dir/$name |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6157 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6158 # Add PIC object to the list of files to remove. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6159 if test -n "$pic_object" \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6160 && test "$pic_object" != none; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6161 rmfiles="$rmfiles $dir/$pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6162 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6163 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6164 # Add non-PIC object to the list of files to remove. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6165 if test -n "$non_pic_object" \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6166 && test "$non_pic_object" != none; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6167 rmfiles="$rmfiles $dir/$non_pic_object" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6168 fi |
0 | 6169 fi |
6170 ;; | |
6171 | |
6172 *) | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6173 if test "$mode" = clean ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6174 noexename=$name |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6175 case $file in |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6176 *.exe) |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6177 file=`$echo $file|${SED} 's,.exe$,,'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6178 noexename=`$echo $name|${SED} 's,.exe$,,'` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6179 # $file with .exe has already been added to rmfiles, |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6180 # add $file without .exe |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6181 rmfiles="$rmfiles $file" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6182 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6183 esac |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6184 # Do a test to see if this is a libtool program. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6185 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6186 relink_command= |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6187 . $dir/$noexename |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6188 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6189 # note $name still contains .exe if it was in $file originally |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6190 # as does the version of $file that was added into $rmfiles |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6191 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6192 if test "$fast_install" = yes && test -n "$relink_command"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6193 rmfiles="$rmfiles $objdir/lt-$name" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6194 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6195 if test "X$noexename" != "X$name" ; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6196 rmfiles="$rmfiles $objdir/lt-${noexename}.c" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6197 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6198 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6199 fi |
0 | 6200 ;; |
6201 esac | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6202 $show "$rm $rmfiles" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6203 $run $rm $rmfiles || exit_status=1 |
0 | 6204 done |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6205 objdir="$origobjdir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6206 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6207 # Try to remove the ${objdir}s in the directories where we deleted files |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6208 for dir in $rmdirs; do |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6209 if test -d "$dir"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6210 $show "rmdir $dir" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6211 $run rmdir $dir >/dev/null 2>&1 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6212 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6213 done |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6214 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6215 exit $exit_status |
0 | 6216 ;; |
6217 | |
6218 "") | |
6219 $echo "$modename: you must specify a MODE" 1>&2 | |
6220 $echo "$generic_help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6221 exit $EXIT_FAILURE |
0 | 6222 ;; |
6223 esac | |
6224 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6225 if test -z "$exec_cmd"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6226 $echo "$modename: invalid operation mode \`$mode'" 1>&2 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6227 $echo "$generic_help" 1>&2 |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6228 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6229 fi |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6230 fi # test -z "$show_help" |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6231 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6232 if test -n "$exec_cmd"; then |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6233 eval exec $exec_cmd |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6234 exit $EXIT_FAILURE |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6235 fi |
0 | 6236 |
6237 # We need to display help for each of the modes. | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6238 case $mode in |
0 | 6239 "") $echo \ |
6240 "Usage: $modename [OPTION]... [MODE-ARG]... | |
6241 | |
6242 Provide generalized library-building support services. | |
6243 | |
6244 --config show all configuration variables | |
6245 --debug enable verbose shell tracing | |
6246 -n, --dry-run display commands without modifying any files | |
6247 --features display basic configuration information and exit | |
6248 --finish same as \`--mode=finish' | |
6249 --help display this help message and exit | |
6250 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] | |
6251 --quiet same as \`--silent' | |
6252 --silent don't print informational messages | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6253 --tag=TAG use configuration variables from tag TAG |
0 | 6254 --version print version information |
6255 | |
6256 MODE must be one of the following: | |
6257 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6258 clean remove files from the build directory |
0 | 6259 compile compile a source file into a libtool object |
6260 execute automatically set library path, then run a program | |
6261 finish complete the installation of libtool libraries | |
6262 install install libraries or executables | |
6263 link create a library or an executable | |
6264 uninstall remove libraries from an installed directory | |
6265 | |
6266 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6267 a more detailed description of MODE. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6268 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6269 Report bugs to <bug-libtool@gnu.org>." |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6270 exit $EXIT_SUCCESS |
0 | 6271 ;; |
6272 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6273 clean) |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6274 $echo \ |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6275 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6276 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6277 Remove files from the build directory. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6278 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6279 RM is the name of the program to use to delete files associated with each FILE |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6280 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6281 to RM. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6282 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6283 If FILE is a libtool library, object or program, all the files associated |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6284 with it are deleted. Otherwise, only FILE itself is deleted using RM." |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6285 ;; |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6286 |
0 | 6287 compile) |
6288 $echo \ | |
6289 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE | |
6290 | |
6291 Compile a source file into a libtool library object. | |
6292 | |
6293 This mode accepts the following additional options: | |
6294 | |
6295 -o OUTPUT-FILE set the output file name to OUTPUT-FILE | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6296 -prefer-pic try to building PIC objects only |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6297 -prefer-non-pic try to building non-PIC objects only |
0 | 6298 -static always build a \`.o' file suitable for static linking |
6299 | |
6300 COMPILE-COMMAND is a command to be used in creating a \`standard' object file | |
6301 from the given SOURCEFILE. | |
6302 | |
6303 The output file name is determined by removing the directory component from | |
6304 SOURCEFILE, then substituting the C source code suffix \`.c' with the | |
6305 library object suffix, \`.lo'." | |
6306 ;; | |
6307 | |
6308 execute) | |
6309 $echo \ | |
6310 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... | |
6311 | |
6312 Automatically set library path, then run a program. | |
6313 | |
6314 This mode accepts the following additional options: | |
6315 | |
6316 -dlopen FILE add the directory containing FILE to the library path | |
6317 | |
6318 This mode sets the library path environment variable according to \`-dlopen' | |
6319 flags. | |
6320 | |
6321 If any of the ARGS are libtool executable wrappers, then they are translated | |
6322 into their corresponding uninstalled binary, and any of their required library | |
6323 directories are added to the library path. | |
6324 | |
6325 Then, COMMAND is executed, with ARGS as arguments." | |
6326 ;; | |
6327 | |
6328 finish) | |
6329 $echo \ | |
6330 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... | |
6331 | |
6332 Complete the installation of libtool libraries. | |
6333 | |
6334 Each LIBDIR is a directory that contains libtool libraries. | |
6335 | |
6336 The commands that this mode executes may require superuser privileges. Use | |
6337 the \`--dry-run' option if you just want to see what would be executed." | |
6338 ;; | |
6339 | |
6340 install) | |
6341 $echo \ | |
6342 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... | |
6343 | |
6344 Install executables or libraries. | |
6345 | |
6346 INSTALL-COMMAND is the installation command. The first component should be | |
6347 either the \`install' or \`cp' program. | |
6348 | |
6349 The rest of the components are interpreted as arguments to that command (only | |
6350 BSD-compatible install options are recognized)." | |
6351 ;; | |
6352 | |
6353 link) | |
6354 $echo \ | |
6355 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... | |
6356 | |
6357 Link object files or libraries together to form another library, or to | |
6358 create an executable program. | |
6359 | |
6360 LINK-COMMAND is a command using the C compiler that you would use to create | |
6361 a program from several object files. | |
6362 | |
6363 The following components of LINK-COMMAND are treated specially: | |
6364 | |
6365 -all-static do not do any dynamic linking at all | |
6366 -avoid-version do not add a version suffix if possible | |
6367 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime | |
6368 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols | |
6369 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) | |
6370 -export-symbols SYMFILE | |
6371 try to export only the symbols listed in SYMFILE | |
6372 -export-symbols-regex REGEX | |
6373 try to export only the symbols matching REGEX | |
6374 -LLIBDIR search LIBDIR for required installed libraries | |
6375 -lNAME OUTPUT-FILE requires the installed library libNAME | |
6376 -module build a library that can dlopened | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6377 -no-fast-install disable the fast-install mode |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6378 -no-install link a not-installable executable |
0 | 6379 -no-undefined declare that a library does not refer to external symbols |
6380 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6381 -objectlist FILE Use a list of object files found in FILE to specify objects |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6382 -precious-files-regex REGEX |
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6383 don't remove output files matching REGEX |
0 | 6384 -release RELEASE specify package release information |
6385 -rpath LIBDIR the created library will eventually be installed in LIBDIR | |
6386 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries | |
6387 -static do not do any dynamic linking of libtool libraries | |
6388 -version-info CURRENT[:REVISION[:AGE]] | |
6389 specify library version info [each variable defaults to 0] | |
6390 | |
6391 All other options (arguments beginning with \`-') are ignored. | |
6392 | |
6393 Every other argument is treated as a filename. Files ending in \`.la' are | |
6394 treated as uninstalled libtool libraries, other files are standard or library | |
6395 object files. | |
6396 | |
6397 If the OUTPUT-FILE ends in \`.la', then a libtool library is created, | |
6398 only library objects (\`.lo' files) may be specified, and \`-rpath' is | |
6399 required, except when creating a convenience library. | |
6400 | |
6401 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created | |
6402 using \`ar' and \`ranlib', or on Windows using \`lib'. | |
6403 | |
6404 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file | |
6405 is created, otherwise an executable program is created." | |
6406 ;; | |
6407 | |
6408 uninstall) | |
6409 $echo \ | |
6410 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... | |
6411 | |
6412 Remove libraries from an installation directory. | |
6413 | |
6414 RM is the name of the program to use to delete files associated with each FILE | |
6415 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed | |
6416 to RM. | |
6417 | |
6418 If FILE is a libtool library, all the files associated with it are deleted. | |
6419 Otherwise, only FILE itself is deleted using RM." | |
6420 ;; | |
6421 | |
6422 *) | |
6423 $echo "$modename: invalid operation mode \`$mode'" 1>&2 | |
6424 $echo "$help" 1>&2 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6425 exit $EXIT_FAILURE |
0 | 6426 ;; |
6427 esac | |
6428 | |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6429 $echo |
0 | 6430 $echo "Try \`$modename --help' for more information about other modes." |
6431 | |
947
3bb035750537
Updated libtool support for libtool 1.5.8
Sam Lantinga <slouken@libsdl.org>
parents:
886
diff
changeset
|
6432 exit $EXIT_SUCCESS |
0 | 6433 |
729
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6434 # The TAGs below are defined such that we never get into a situation |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6435 # in which we disable both kinds of libraries. Given conflicting |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6436 # choices, we go for a static library, that is the most portable, |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6437 # since we can't tell whether shared libraries were disabled because |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6438 # the user asked for that or because the platform doesn't support |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6439 # them. This is particularly important on AIX, because we don't |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6440 # support having both static and shared libraries enabled at the same |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6441 # time on that platform, so we default to a shared-only configuration. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6442 # If a disable-shared tag is given, we'll fallback to a static-only |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6443 # configuration. But we'll never go from static-only to shared-only. |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6444 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6445 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6446 build_libtool_libs=no |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6447 build_old_libs=yes |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6448 # ### END LIBTOOL TAG CONFIG: disable-shared |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6449 |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6450 # ### BEGIN LIBTOOL TAG CONFIG: disable-static |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6451 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6452 # ### END LIBTOOL TAG CONFIG: disable-static |
dac996d69abb
Updated libtool support so Mingw32 builds work.
Sam Lantinga <slouken@libsdl.org>
parents:
608
diff
changeset
|
6453 |
0 | 6454 # Local Variables: |
6455 # mode:shell-script | |
6456 # sh-indentation:2 | |
6457 # End: |