… | |
… | |
41 | EXIT_SUCCESS=0 |
41 | EXIT_SUCCESS=0 |
42 | EXIT_FAILURE=1 |
42 | EXIT_FAILURE=1 |
43 | |
43 | |
44 | PROGRAM=ltmain.sh |
44 | PROGRAM=ltmain.sh |
45 | PACKAGE=libtool |
45 | PACKAGE=libtool |
46 | VERSION=1.5.18 |
46 | VERSION="1.5.22 Debian 1.5.22-4" |
47 | TIMESTAMP=" (1.1220.2.246 2005/05/16 10:00:18)" |
47 | TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" |
48 | |
48 | |
49 | # See if we are running on zsh, and set the options which allow our |
49 | # See if we are running on zsh, and set the options which allow our |
50 | # commands through without removal of \ escapes. |
50 | # commands through without removal of \ escapes. |
51 | if test -n "${ZSH_VERSION+set}" ; then |
51 | if test -n "${ZSH_VERSION+set}" ; then |
52 | setopt NO_GLOB_SUBST |
52 | setopt NO_GLOB_SUBST |
… | |
… | |
86 | # Sed substitution that helps us do robust quoting. It backslashifies |
86 | # Sed substitution that helps us do robust quoting. It backslashifies |
87 | # metacharacters that are still active within double-quoted strings. |
87 | # metacharacters that are still active within double-quoted strings. |
88 | Xsed="${SED}"' -e 1s/^X//' |
88 | Xsed="${SED}"' -e 1s/^X//' |
89 | sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' |
89 | sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' |
90 | # test EBCDIC or ASCII |
90 | # test EBCDIC or ASCII |
91 | case `echo A|tr A '\301'` in |
91 | case `echo X|tr X '\101'` in |
92 | A) # EBCDIC based system |
92 | A) # ASCII based system |
93 | SP2NL="tr '\100' '\n'" |
93 | # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr |
94 | NL2SP="tr '\r\n' '\100\100'" |
94 | SP2NL='tr \040 \012' |
|
|
95 | NL2SP='tr \015\012 \040\040' |
95 | ;; |
96 | ;; |
96 | *) # Assume ASCII based system |
97 | *) # EBCDIC based system |
97 | SP2NL="tr '\040' '\012'" |
98 | SP2NL='tr \100 \n' |
98 | NL2SP="tr '\015\012' '\040\040'" |
99 | NL2SP='tr \r\n \100\100' |
99 | ;; |
100 | ;; |
100 | esac |
101 | esac |
101 | |
102 | |
102 | # NLS nuisances. |
103 | # NLS nuisances. |
103 | # Only set LANG and LC_ALL to C if already set. |
104 | # Only set LANG and LC_ALL to C if already set. |
… | |
… | |
129 | prevopt= |
130 | prevopt= |
130 | run= |
131 | run= |
131 | show="$echo" |
132 | show="$echo" |
132 | show_help= |
133 | show_help= |
133 | execute_dlfiles= |
134 | execute_dlfiles= |
|
|
135 | duplicate_deps=no |
|
|
136 | preserve_args= |
134 | lo2o="s/\\.lo\$/.${objext}/" |
137 | lo2o="s/\\.lo\$/.${objext}/" |
135 | o2lo="s/\\.${objext}\$/.lo/" |
138 | o2lo="s/\\.${objext}\$/.lo/" |
136 | quote_scanset='[[~#^*{};<>?'"'"' ]' |
|
|
137 | |
139 | |
138 | ##################################### |
140 | ##################################### |
139 | # Shell function definitions: |
141 | # Shell function definitions: |
140 | # This seems to be the best place for them |
142 | # This seems to be the best place for them |
|
|
143 | |
|
|
144 | # func_mktempdir [string] |
|
|
145 | # Make a temporary directory that won't clash with other running |
|
|
146 | # libtool processes, and avoids race conditions if possible. If |
|
|
147 | # given, STRING is the basename for that directory. |
|
|
148 | func_mktempdir () |
|
|
149 | { |
|
|
150 | my_template="${TMPDIR-/tmp}/${1-$progname}" |
|
|
151 | |
|
|
152 | if test "$run" = ":"; then |
|
|
153 | # Return a directory name, but don't create it in dry-run mode |
|
|
154 | my_tmpdir="${my_template}-$$" |
|
|
155 | else |
|
|
156 | |
|
|
157 | # If mktemp works, use that first and foremost |
|
|
158 | my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` |
|
|
159 | |
|
|
160 | if test ! -d "$my_tmpdir"; then |
|
|
161 | # Failing that, at least try and use $RANDOM to avoid a race |
|
|
162 | my_tmpdir="${my_template}-${RANDOM-0}$$" |
|
|
163 | |
|
|
164 | save_mktempdir_umask=`umask` |
|
|
165 | umask 0077 |
|
|
166 | $mkdir "$my_tmpdir" |
|
|
167 | umask $save_mktempdir_umask |
|
|
168 | fi |
|
|
169 | |
|
|
170 | # If we're not in dry-run mode, bomb out on failure |
|
|
171 | test -d "$my_tmpdir" || { |
|
|
172 | $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 |
|
|
173 | exit $EXIT_FAILURE |
|
|
174 | } |
|
|
175 | fi |
|
|
176 | |
|
|
177 | $echo "X$my_tmpdir" | $Xsed |
|
|
178 | } |
|
|
179 | |
141 | |
180 | |
142 | # func_win32_libid arg |
181 | # func_win32_libid arg |
143 | # return the library type of file 'arg' |
182 | # return the library type of file 'arg' |
144 | # |
183 | # |
145 | # Need a lot of goo to handle *both* DLLs and import libs |
184 | # Need a lot of goo to handle *both* DLLs and import libs |
… | |
… | |
155 | ;; |
194 | ;; |
156 | *ar\ archive*) # could be an import, or static |
195 | *ar\ archive*) # could be an import, or static |
157 | if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ |
196 | if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ |
158 | $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then |
197 | $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then |
159 | win32_nmres=`eval $NM -f posix -A $1 | \ |
198 | win32_nmres=`eval $NM -f posix -A $1 | \ |
160 | sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` |
199 | $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` |
161 | if test "X$win32_nmres" = "Ximport" ; then |
200 | case $win32_nmres in |
162 | win32_libid_type="x86 archive import" |
201 | import*) win32_libid_type="x86 archive import";; |
163 | else |
|
|
164 | win32_libid_type="x86 archive static" |
202 | *) win32_libid_type="x86 archive static";; |
165 | fi |
203 | esac |
166 | fi |
204 | fi |
167 | ;; |
205 | ;; |
168 | *DLL*) |
206 | *DLL*) |
169 | win32_libid_type="x86 DLL" |
207 | win32_libid_type="x86 DLL" |
170 | ;; |
208 | ;; |
… | |
… | |
190 | { |
228 | { |
191 | if test -n "$available_tags" && test -z "$tagname"; then |
229 | if test -n "$available_tags" && test -z "$tagname"; then |
192 | CC_quoted= |
230 | CC_quoted= |
193 | for arg in $CC; do |
231 | for arg in $CC; do |
194 | case $arg in |
232 | case $arg in |
195 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
233 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
196 | arg="\"$arg\"" |
234 | arg="\"$arg\"" |
197 | ;; |
235 | ;; |
198 | esac |
236 | esac |
199 | CC_quoted="$CC_quoted $arg" |
237 | CC_quoted="$CC_quoted $arg" |
200 | done |
238 | done |
… | |
… | |
211 | eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" |
249 | eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" |
212 | CC_quoted= |
250 | CC_quoted= |
213 | for arg in $CC; do |
251 | for arg in $CC; do |
214 | # Double-quote args containing other shell metacharacters. |
252 | # Double-quote args containing other shell metacharacters. |
215 | case $arg in |
253 | case $arg in |
216 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
254 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
217 | arg="\"$arg\"" |
255 | arg="\"$arg\"" |
218 | ;; |
256 | ;; |
219 | esac |
257 | esac |
220 | CC_quoted="$CC_quoted $arg" |
258 | CC_quoted="$CC_quoted $arg" |
221 | done |
259 | done |
… | |
… | |
293 | |
331 | |
294 | $show "${rm}r $my_xdir" |
332 | $show "${rm}r $my_xdir" |
295 | $run ${rm}r "$my_xdir" |
333 | $run ${rm}r "$my_xdir" |
296 | $show "$mkdir $my_xdir" |
334 | $show "$mkdir $my_xdir" |
297 | $run $mkdir "$my_xdir" |
335 | $run $mkdir "$my_xdir" |
298 | status=$? |
336 | exit_status=$? |
299 | if test "$status" -ne 0 && test ! -d "$my_xdir"; then |
337 | if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then |
300 | exit $status |
338 | exit $exit_status |
301 | fi |
339 | fi |
302 | case $host in |
340 | case $host in |
303 | *-darwin*) |
341 | *-darwin*) |
304 | $show "Extracting $my_xabs" |
342 | $show "Extracting $my_xabs" |
305 | # Do not bother doing anything if just a dry run |
343 | # Do not bother doing anything if just a dry run |
… | |
… | |
335 | else |
373 | else |
336 | cd "$darwin_orig_dir" |
374 | cd "$darwin_orig_dir" |
337 | func_extract_an_archive "$my_xdir" "$my_xabs" |
375 | func_extract_an_archive "$my_xdir" "$my_xabs" |
338 | fi # $darwin_arches |
376 | fi # $darwin_arches |
339 | fi # $run |
377 | fi # $run |
340 | ;; |
378 | ;; |
341 | *) |
379 | *) |
342 | func_extract_an_archive "$my_xdir" "$my_xabs" |
380 | func_extract_an_archive "$my_xdir" "$my_xabs" |
343 | ;; |
381 | ;; |
344 | esac |
382 | esac |
345 | my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` |
383 | my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` |
… | |
… | |
349 | # End of Shell function definitions |
387 | # End of Shell function definitions |
350 | ##################################### |
388 | ##################################### |
351 | |
389 | |
352 | # Darwin sucks |
390 | # Darwin sucks |
353 | eval std_shrext=\"$shrext_cmds\" |
391 | eval std_shrext=\"$shrext_cmds\" |
|
|
392 | |
|
|
393 | disable_libs=no |
354 | |
394 | |
355 | # Parse our command line options once, thoroughly. |
395 | # Parse our command line options once, thoroughly. |
356 | while test "$#" -gt 0 |
396 | while test "$#" -gt 0 |
357 | do |
397 | do |
358 | arg="$1" |
398 | arg="$1" |
… | |
… | |
466 | --quiet | --silent) |
506 | --quiet | --silent) |
467 | show=: |
507 | show=: |
468 | preserve_args="$preserve_args $arg" |
508 | preserve_args="$preserve_args $arg" |
469 | ;; |
509 | ;; |
470 | |
510 | |
471 | --tag) prevopt="--tag" prev=tag ;; |
511 | --tag) |
|
|
512 | prevopt="--tag" |
|
|
513 | prev=tag |
|
|
514 | preserve_args="$preserve_args --tag" |
|
|
515 | ;; |
472 | --tag=*) |
516 | --tag=*) |
473 | set tag "$optarg" ${1+"$@"} |
517 | set tag "$optarg" ${1+"$@"} |
474 | shift |
518 | shift |
475 | prev=tag |
519 | prev=tag |
476 | preserve_args="$preserve_args --tag" |
520 | preserve_args="$preserve_args --tag" |
… | |
… | |
497 | if test -n "$prevopt"; then |
541 | if test -n "$prevopt"; then |
498 | $echo "$modename: option \`$prevopt' requires an argument" 1>&2 |
542 | $echo "$modename: option \`$prevopt' requires an argument" 1>&2 |
499 | $echo "$help" 1>&2 |
543 | $echo "$help" 1>&2 |
500 | exit $EXIT_FAILURE |
544 | exit $EXIT_FAILURE |
501 | fi |
545 | fi |
|
|
546 | |
|
|
547 | case $disable_libs in |
|
|
548 | no) |
|
|
549 | ;; |
|
|
550 | shared) |
|
|
551 | build_libtool_libs=no |
|
|
552 | build_old_libs=yes |
|
|
553 | ;; |
|
|
554 | static) |
|
|
555 | build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` |
|
|
556 | ;; |
|
|
557 | esac |
502 | |
558 | |
503 | # If this variable is set in any of the actions, the command in it |
559 | # If this variable is set in any of the actions, the command in it |
504 | # will be execed at the end. This prevents here-documents from being |
560 | # will be execed at the end. This prevents here-documents from being |
505 | # left over by shells. |
561 | # left over by shells. |
506 | exec_cmd= |
562 | exec_cmd= |
… | |
… | |
574 | libobj= |
630 | libobj= |
575 | later= |
631 | later= |
576 | |
632 | |
577 | for arg |
633 | for arg |
578 | do |
634 | do |
579 | case "$arg_mode" in |
635 | case $arg_mode in |
580 | arg ) |
636 | arg ) |
581 | # do not "continue". Instead, add this to base_compile |
637 | # do not "continue". Instead, add this to base_compile |
582 | lastarg="$arg" |
638 | lastarg="$arg" |
583 | arg_mode=normal |
639 | arg_mode=normal |
584 | ;; |
640 | ;; |
… | |
… | |
625 | |
681 | |
626 | # Double-quote args containing other shell metacharacters. |
682 | # Double-quote args containing other shell metacharacters. |
627 | # Many Bourne shells cannot handle close brackets correctly |
683 | # Many Bourne shells cannot handle close brackets correctly |
628 | # in scan sets, so we specify it separately. |
684 | # in scan sets, so we specify it separately. |
629 | case $arg in |
685 | case $arg in |
630 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
686 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
631 | arg="\"$arg\"" |
687 | arg="\"$arg\"" |
632 | ;; |
688 | ;; |
633 | esac |
689 | esac |
634 | lastarg="$lastarg $arg" |
690 | lastarg="$lastarg $arg" |
635 | done |
691 | done |
… | |
… | |
660 | # Many Bourne shells cannot handle close brackets correctly |
716 | # Many Bourne shells cannot handle close brackets correctly |
661 | # in scan sets, and some SunOS ksh mistreat backslash-escaping |
717 | # in scan sets, and some SunOS ksh mistreat backslash-escaping |
662 | # in scan sets (worked around with variable expansion), |
718 | # in scan sets (worked around with variable expansion), |
663 | # and furthermore cannot handle '|' '&' '(' ')' in scan sets |
719 | # and furthermore cannot handle '|' '&' '(' ')' in scan sets |
664 | # at all, so we specify them separately. |
720 | # at all, so we specify them separately. |
665 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
721 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
666 | lastarg="\"$lastarg\"" |
722 | lastarg="\"$lastarg\"" |
667 | ;; |
723 | ;; |
668 | esac |
724 | esac |
669 | |
725 | |
670 | base_compile="$base_compile $lastarg" |
726 | base_compile="$base_compile $lastarg" |
… | |
… | |
735 | esac |
791 | esac |
736 | done |
792 | done |
737 | |
793 | |
738 | qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` |
794 | qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` |
739 | case $qlibobj in |
795 | case $qlibobj in |
740 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
796 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
741 | qlibobj="\"$qlibobj\"" ;; |
797 | qlibobj="\"$qlibobj\"" ;; |
742 | esac |
798 | esac |
743 | if test "X$libobj" != "X$qlibobj"; then |
799 | test "X$libobj" != "X$qlibobj" \ |
|
|
800 | && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ |
744 | $echo "$modename: libobj name \`$libobj' may not contain shell special characters." |
801 | && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." |
745 | exit $EXIT_FAILURE |
|
|
746 | fi |
|
|
747 | objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` |
802 | objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` |
748 | xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` |
803 | xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` |
749 | if test "X$xdir" = "X$obj"; then |
804 | if test "X$xdir" = "X$obj"; then |
750 | xdir= |
805 | xdir= |
751 | else |
806 | else |
… | |
… | |
822 | if test -n "$fix_srcfile_path"; then |
877 | if test -n "$fix_srcfile_path"; then |
823 | eval srcfile=\"$fix_srcfile_path\" |
878 | eval srcfile=\"$fix_srcfile_path\" |
824 | fi |
879 | fi |
825 | qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` |
880 | qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` |
826 | case $qsrcfile in |
881 | case $qsrcfile in |
827 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
882 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
828 | qsrcfile="\"$qsrcfile\"" ;; |
883 | qsrcfile="\"$qsrcfile\"" ;; |
829 | esac |
884 | esac |
830 | |
885 | |
831 | $run $rm "$libobj" "${libobj}T" |
886 | $run $rm "$libobj" "${libobj}T" |
832 | |
887 | |
… | |
… | |
855 | fi |
910 | fi |
856 | |
911 | |
857 | if test ! -d "${xdir}$objdir"; then |
912 | if test ! -d "${xdir}$objdir"; then |
858 | $show "$mkdir ${xdir}$objdir" |
913 | $show "$mkdir ${xdir}$objdir" |
859 | $run $mkdir ${xdir}$objdir |
914 | $run $mkdir ${xdir}$objdir |
860 | status=$? |
915 | exit_status=$? |
861 | if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then |
916 | if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then |
862 | exit $status |
917 | exit $exit_status |
863 | fi |
918 | fi |
864 | fi |
919 | fi |
865 | |
920 | |
866 | if test -z "$output_obj"; then |
921 | if test -z "$output_obj"; then |
867 | # Place PIC objects in $objdir |
922 | # Place PIC objects in $objdir |
… | |
… | |
1060 | ltlibs= |
1115 | ltlibs= |
1061 | module=no |
1116 | module=no |
1062 | no_install=no |
1117 | no_install=no |
1063 | objs= |
1118 | objs= |
1064 | non_pic_objects= |
1119 | non_pic_objects= |
|
|
1120 | notinst_path= # paths that contain not-installed libtool libraries |
1065 | precious_files_regex= |
1121 | precious_files_regex= |
1066 | prefer_static_libs=no |
1122 | prefer_static_libs=no |
1067 | preload=no |
1123 | preload=no |
1068 | prev= |
1124 | prev= |
1069 | prevarg= |
1125 | prevarg= |
… | |
… | |
1088 | $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 |
1144 | $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 |
1089 | fi |
1145 | fi |
1090 | if test -n "$link_static_flag"; then |
1146 | if test -n "$link_static_flag"; then |
1091 | dlopen_self=$dlopen_self_static |
1147 | dlopen_self=$dlopen_self_static |
1092 | fi |
1148 | fi |
|
|
1149 | prefer_static_libs=yes |
1093 | else |
1150 | else |
1094 | if test -z "$pic_flag" && test -n "$link_static_flag"; then |
1151 | if test -z "$pic_flag" && test -n "$link_static_flag"; then |
1095 | dlopen_self=$dlopen_self_static |
1152 | dlopen_self=$dlopen_self_static |
1096 | fi |
1153 | fi |
|
|
1154 | prefer_static_libs=built |
1097 | fi |
1155 | fi |
1098 | build_libtool_libs=no |
1156 | build_libtool_libs=no |
1099 | build_old_libs=yes |
1157 | build_old_libs=yes |
1100 | prefer_static_libs=yes |
|
|
1101 | break |
1158 | break |
1102 | ;; |
1159 | ;; |
1103 | esac |
1160 | esac |
1104 | done |
1161 | done |
1105 | |
1162 | |
… | |
… | |
1109 | # Go through the arguments, transforming them on the way. |
1166 | # Go through the arguments, transforming them on the way. |
1110 | while test "$#" -gt 0; do |
1167 | while test "$#" -gt 0; do |
1111 | arg="$1" |
1168 | arg="$1" |
1112 | shift |
1169 | shift |
1113 | case $arg in |
1170 | case $arg in |
1114 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
1171 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
1115 | qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test |
1172 | qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test |
1116 | ;; |
1173 | ;; |
1117 | *) qarg=$arg ;; |
1174 | *) qarg=$arg ;; |
1118 | esac |
1175 | esac |
1119 | libtool_args="$libtool_args $qarg" |
1176 | libtool_args="$libtool_args $qarg" |
… | |
… | |
1270 | # A standard non-PIC object |
1327 | # A standard non-PIC object |
1271 | non_pic_objects="$non_pic_objects $non_pic_object" |
1328 | non_pic_objects="$non_pic_objects $non_pic_object" |
1272 | if test -z "$pic_object" || test "$pic_object" = none ; then |
1329 | if test -z "$pic_object" || test "$pic_object" = none ; then |
1273 | arg="$non_pic_object" |
1330 | arg="$non_pic_object" |
1274 | fi |
1331 | fi |
|
|
1332 | else |
|
|
1333 | # If the PIC object exists, use it instead. |
|
|
1334 | # $xdir was prepended to $pic_object above. |
|
|
1335 | non_pic_object="$pic_object" |
|
|
1336 | non_pic_objects="$non_pic_objects $non_pic_object" |
1275 | fi |
1337 | fi |
1276 | else |
1338 | else |
1277 | # Only an error if not doing a dry-run. |
1339 | # Only an error if not doing a dry-run. |
1278 | if test -z "$run"; then |
1340 | if test -z "$run"; then |
1279 | $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 |
1341 | $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 |
… | |
… | |
1353 | shrext) |
1415 | shrext) |
1354 | shrext_cmds="$arg" |
1416 | shrext_cmds="$arg" |
1355 | prev= |
1417 | prev= |
1356 | continue |
1418 | continue |
1357 | ;; |
1419 | ;; |
1358 | darwin_framework) |
1420 | darwin_framework|darwin_framework_skip) |
1359 | compiler_flags="$compiler_flags $arg" |
1421 | test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" |
1360 | compile_command="$compile_command $arg" |
1422 | compile_command="$compile_command $arg" |
1361 | finalize_command="$finalize_command $arg" |
1423 | finalize_command="$finalize_command $arg" |
1362 | prev= |
1424 | prev= |
1363 | continue |
1425 | continue |
1364 | ;; |
1426 | ;; |
… | |
… | |
1418 | prev=expsyms_regex |
1480 | prev=expsyms_regex |
1419 | fi |
1481 | fi |
1420 | continue |
1482 | continue |
1421 | ;; |
1483 | ;; |
1422 | |
1484 | |
1423 | -framework) |
1485 | -framework|-arch|-isysroot) |
|
|
1486 | case " $CC " in |
|
|
1487 | *" ${arg} ${1} "* | *" ${arg} ${1} "*) |
|
|
1488 | prev=darwin_framework_skip ;; |
|
|
1489 | *) compiler_flags="$compiler_flags $arg" |
1424 | prev=darwin_framework |
1490 | prev=darwin_framework ;; |
1425 | compiler_flags="$compiler_flags $arg" |
1491 | esac |
1426 | compile_command="$compile_command $arg" |
1492 | compile_command="$compile_command $arg" |
1427 | finalize_command="$finalize_command $arg" |
1493 | finalize_command="$finalize_command $arg" |
1428 | continue |
1494 | continue |
1429 | ;; |
1495 | ;; |
1430 | |
1496 | |
1431 | -inst-prefix-dir) |
1497 | -inst-prefix-dir) |
1432 | prev=inst_prefix |
1498 | prev=inst_prefix |
1433 | continue |
1499 | continue |
1434 | ;; |
1500 | ;; |
… | |
… | |
1452 | [\\/]* | [A-Za-z]:[\\/]*) ;; |
1518 | [\\/]* | [A-Za-z]:[\\/]*) ;; |
1453 | *) |
1519 | *) |
1454 | absdir=`cd "$dir" && pwd` |
1520 | absdir=`cd "$dir" && pwd` |
1455 | if test -z "$absdir"; then |
1521 | if test -z "$absdir"; then |
1456 | $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 |
1522 | $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 |
1457 | exit $EXIT_FAILURE |
1523 | absdir="$dir" |
|
|
1524 | notinst_path="$notinst_path $dir" |
1458 | fi |
1525 | fi |
1459 | dir="$absdir" |
1526 | dir="$absdir" |
1460 | ;; |
1527 | ;; |
1461 | esac |
1528 | esac |
1462 | case "$deplibs " in |
1529 | case "$deplibs " in |
… | |
… | |
1466 | lib_search_path="$lib_search_path $dir" |
1533 | lib_search_path="$lib_search_path $dir" |
1467 | ;; |
1534 | ;; |
1468 | esac |
1535 | esac |
1469 | case $host in |
1536 | case $host in |
1470 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
1537 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
|
|
1538 | testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` |
1471 | case :$dllsearchpath: in |
1539 | case :$dllsearchpath: in |
1472 | *":$dir:"*) ;; |
1540 | *":$dir:"*) ;; |
1473 | *) dllsearchpath="$dllsearchpath:$dir";; |
1541 | *) dllsearchpath="$dllsearchpath:$dir";; |
1474 | esac |
1542 | esac |
|
|
1543 | case :$dllsearchpath: in |
|
|
1544 | *":$testbindir:"*) ;; |
|
|
1545 | *) dllsearchpath="$dllsearchpath:$testbindir";; |
|
|
1546 | esac |
1475 | ;; |
1547 | ;; |
1476 | esac |
1548 | esac |
1477 | continue |
1549 | continue |
1478 | ;; |
1550 | ;; |
1479 | |
1551 | |
1480 | -l*) |
1552 | -l*) |
1481 | if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then |
1553 | if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then |
1482 | case $host in |
1554 | case $host in |
1483 | *-*-cygwin* | *-*-pw32* | *-*-beos*) |
1555 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) |
1484 | # These systems don't actually have a C or math library (as such) |
1556 | # These systems don't actually have a C or math library (as such) |
1485 | continue |
1557 | continue |
1486 | ;; |
1558 | ;; |
1487 | *-*-mingw* | *-*-os2*) |
1559 | *-*-os2*) |
1488 | # These systems don't actually have a C library (as such) |
1560 | # These systems don't actually have a C library (as such) |
1489 | test "X$arg" = "X-lc" && continue |
1561 | test "X$arg" = "X-lc" && continue |
1490 | ;; |
1562 | ;; |
1491 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
1563 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
1492 | # Do not include libc due to us having libc/libc_r. |
1564 | # Do not include libc due to us having libc/libc_r. |
… | |
… | |
1494 | ;; |
1566 | ;; |
1495 | *-*-rhapsody* | *-*-darwin1.[012]) |
1567 | *-*-rhapsody* | *-*-darwin1.[012]) |
1496 | # Rhapsody C and math libraries are in the System framework |
1568 | # Rhapsody C and math libraries are in the System framework |
1497 | deplibs="$deplibs -framework System" |
1569 | deplibs="$deplibs -framework System" |
1498 | continue |
1570 | continue |
|
|
1571 | ;; |
|
|
1572 | *-*-sco3.2v5* | *-*-sco5v6*) |
|
|
1573 | # Causes problems with __ctype |
|
|
1574 | test "X$arg" = "X-lc" && continue |
|
|
1575 | ;; |
|
|
1576 | *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) |
|
|
1577 | # Compiler inserts libc in the correct place for threads to work |
|
|
1578 | test "X$arg" = "X-lc" && continue |
|
|
1579 | ;; |
1499 | esac |
1580 | esac |
1500 | elif test "X$arg" = "X-lc_r"; then |
1581 | elif test "X$arg" = "X-lc_r"; then |
1501 | case $host in |
1582 | case $host in |
1502 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
1583 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
1503 | # Do not include libc_r directly, use -pthread flag. |
1584 | # Do not include libc_r directly, use -pthread flag. |
… | |
… | |
1535 | # -r[0-9][0-9]* specifies the processor on the SGI compiler |
1616 | # -r[0-9][0-9]* specifies the processor on the SGI compiler |
1536 | # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler |
1617 | # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler |
1537 | # +DA*, +DD* enable 64-bit mode on the HP compiler |
1618 | # +DA*, +DD* enable 64-bit mode on the HP compiler |
1538 | # -q* pass through compiler args for the IBM compiler |
1619 | # -q* pass through compiler args for the IBM compiler |
1539 | # -m* pass through architecture-specific compiler args for GCC |
1620 | # -m* pass through architecture-specific compiler args for GCC |
|
|
1621 | # -m*, -t[45]*, -txscale* pass through architecture-specific |
|
|
1622 | # compiler args for GCC |
|
|
1623 | # -pg pass through profiling flag for GCC |
|
|
1624 | # @file GCC response files |
1540 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) |
1625 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ |
|
|
1626 | -t[45]*|-txscale*|@*) |
1541 | |
1627 | |
1542 | # Unknown arguments in both finalize_command and compile_command need |
1628 | # Unknown arguments in both finalize_command and compile_command need |
1543 | # to be aesthetically quoted because they are evaled later. |
1629 | # to be aesthetically quoted because they are evaled later. |
1544 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
1630 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
1545 | case $arg in |
1631 | case $arg in |
1546 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
1632 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
1547 | arg="\"$arg\"" |
1633 | arg="\"$arg\"" |
1548 | ;; |
1634 | ;; |
1549 | esac |
1635 | esac |
1550 | compile_command="$compile_command $arg" |
1636 | compile_command="$compile_command $arg" |
1551 | finalize_command="$finalize_command $arg" |
1637 | finalize_command="$finalize_command $arg" |
1552 | if test "$with_gcc" = "yes" ; then |
|
|
1553 | compiler_flags="$compiler_flags $arg" |
1638 | compiler_flags="$compiler_flags $arg" |
1554 | fi |
|
|
1555 | continue |
1639 | continue |
1556 | ;; |
1640 | ;; |
1557 | |
1641 | |
1558 | -shrext) |
1642 | -shrext) |
1559 | prev=shrext |
1643 | prev=shrext |
… | |
… | |
1657 | arg= |
1741 | arg= |
1658 | save_ifs="$IFS"; IFS=',' |
1742 | save_ifs="$IFS"; IFS=',' |
1659 | for flag in $args; do |
1743 | for flag in $args; do |
1660 | IFS="$save_ifs" |
1744 | IFS="$save_ifs" |
1661 | case $flag in |
1745 | case $flag in |
1662 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
1746 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
1663 | flag="\"$flag\"" |
1747 | flag="\"$flag\"" |
1664 | ;; |
1748 | ;; |
1665 | esac |
1749 | esac |
1666 | arg="$arg $wl$flag" |
1750 | arg="$arg $wl$flag" |
1667 | compiler_flags="$compiler_flags $flag" |
1751 | compiler_flags="$compiler_flags $flag" |
… | |
… | |
1675 | arg= |
1759 | arg= |
1676 | save_ifs="$IFS"; IFS=',' |
1760 | save_ifs="$IFS"; IFS=',' |
1677 | for flag in $args; do |
1761 | for flag in $args; do |
1678 | IFS="$save_ifs" |
1762 | IFS="$save_ifs" |
1679 | case $flag in |
1763 | case $flag in |
1680 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
1764 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
1681 | flag="\"$flag\"" |
1765 | flag="\"$flag\"" |
1682 | ;; |
1766 | ;; |
1683 | esac |
1767 | esac |
1684 | arg="$arg $wl$flag" |
1768 | arg="$arg $wl$flag" |
1685 | compiler_flags="$compiler_flags $wl$flag" |
1769 | compiler_flags="$compiler_flags $wl$flag" |
… | |
… | |
1708 | -* | +*) |
1792 | -* | +*) |
1709 | # Unknown arguments in both finalize_command and compile_command need |
1793 | # Unknown arguments in both finalize_command and compile_command need |
1710 | # to be aesthetically quoted because they are evaled later. |
1794 | # to be aesthetically quoted because they are evaled later. |
1711 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
1795 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
1712 | case $arg in |
1796 | case $arg in |
1713 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
1797 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
1714 | arg="\"$arg\"" |
1798 | arg="\"$arg\"" |
1715 | ;; |
1799 | ;; |
1716 | esac |
1800 | esac |
1717 | ;; |
1801 | ;; |
1718 | |
1802 | |
… | |
… | |
1787 | # A standard non-PIC object |
1871 | # A standard non-PIC object |
1788 | non_pic_objects="$non_pic_objects $non_pic_object" |
1872 | non_pic_objects="$non_pic_objects $non_pic_object" |
1789 | if test -z "$pic_object" || test "$pic_object" = none ; then |
1873 | if test -z "$pic_object" || test "$pic_object" = none ; then |
1790 | arg="$non_pic_object" |
1874 | arg="$non_pic_object" |
1791 | fi |
1875 | fi |
|
|
1876 | else |
|
|
1877 | # If the PIC object exists, use it instead. |
|
|
1878 | # $xdir was prepended to $pic_object above. |
|
|
1879 | non_pic_object="$pic_object" |
|
|
1880 | non_pic_objects="$non_pic_objects $non_pic_object" |
1792 | fi |
1881 | fi |
1793 | else |
1882 | else |
1794 | # Only an error if not doing a dry-run. |
1883 | # Only an error if not doing a dry-run. |
1795 | if test -z "$run"; then |
1884 | if test -z "$run"; then |
1796 | $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 |
1885 | $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 |
… | |
… | |
1842 | *) |
1931 | *) |
1843 | # Unknown arguments in both finalize_command and compile_command need |
1932 | # Unknown arguments in both finalize_command and compile_command need |
1844 | # to be aesthetically quoted because they are evaled later. |
1933 | # to be aesthetically quoted because they are evaled later. |
1845 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
1934 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
1846 | case $arg in |
1935 | case $arg in |
1847 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
1936 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
1848 | arg="\"$arg\"" |
1937 | arg="\"$arg\"" |
1849 | ;; |
1938 | ;; |
1850 | esac |
1939 | esac |
1851 | ;; |
1940 | ;; |
1852 | esac # arg |
1941 | esac # arg |
… | |
… | |
1892 | fi |
1981 | fi |
1893 | # Create the object directory. |
1982 | # Create the object directory. |
1894 | if test ! -d "$output_objdir"; then |
1983 | if test ! -d "$output_objdir"; then |
1895 | $show "$mkdir $output_objdir" |
1984 | $show "$mkdir $output_objdir" |
1896 | $run $mkdir $output_objdir |
1985 | $run $mkdir $output_objdir |
1897 | status=$? |
1986 | exit_status=$? |
1898 | if test "$status" -ne 0 && test ! -d "$output_objdir"; then |
1987 | if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then |
1899 | exit $status |
1988 | exit $exit_status |
1900 | fi |
1989 | fi |
1901 | fi |
1990 | fi |
1902 | |
1991 | |
1903 | # Determine the type of output |
1992 | # Determine the type of output |
1904 | case $output in |
1993 | case $output in |
… | |
… | |
1957 | deplibs= |
2046 | deplibs= |
1958 | newdependency_libs= |
2047 | newdependency_libs= |
1959 | newlib_search_path= |
2048 | newlib_search_path= |
1960 | need_relink=no # whether we're linking any uninstalled libtool libraries |
2049 | need_relink=no # whether we're linking any uninstalled libtool libraries |
1961 | notinst_deplibs= # not-installed libtool libraries |
2050 | notinst_deplibs= # not-installed libtool libraries |
1962 | notinst_path= # paths that contain not-installed libtool libraries |
|
|
1963 | case $linkmode in |
2051 | case $linkmode in |
1964 | lib) |
2052 | lib) |
1965 | passes="conv link" |
2053 | passes="conv link" |
1966 | for file in $dlfiles $dlprefiles; do |
2054 | for file in $dlfiles $dlprefiles; do |
1967 | case $file in |
2055 | case $file in |
… | |
… | |
1983 | ;; |
2071 | ;; |
1984 | *) passes="conv" |
2072 | *) passes="conv" |
1985 | ;; |
2073 | ;; |
1986 | esac |
2074 | esac |
1987 | for pass in $passes; do |
2075 | for pass in $passes; do |
1988 | # The preopen pass in lib mode reverses $deplibs; put it back here |
|
|
1989 | # so that -L comes before libs that need it for instance... |
|
|
1990 | if test "$linkmode,$pass" = "lib,link"; then |
|
|
1991 | ## FIXME: Find the place where the list is rebuilt in the wrong |
|
|
1992 | ## order, and fix it there properly |
|
|
1993 | tmp_deplibs= |
|
|
1994 | for deplib in $deplibs; do |
|
|
1995 | tmp_deplibs="$deplib $tmp_deplibs" |
|
|
1996 | done |
|
|
1997 | deplibs="$tmp_deplibs" |
|
|
1998 | fi |
|
|
1999 | if test "$linkmode,$pass" = "lib,link" || |
2076 | if test "$linkmode,$pass" = "lib,link" || |
2000 | test "$linkmode,$pass" = "prog,scan"; then |
2077 | test "$linkmode,$pass" = "prog,scan"; then |
2001 | libs="$deplibs" |
2078 | libs="$deplibs" |
2002 | deplibs= |
2079 | deplibs= |
2003 | fi |
2080 | fi |
2004 | if test "$linkmode" = prog; then |
2081 | if test "$linkmode" = prog; then |
2005 | case $pass in |
2082 | case $pass in |
2006 | dlopen) libs="$dlfiles" ;; |
2083 | dlopen) libs="$dlfiles" ;; |
2007 | dlpreopen) libs="$dlprefiles" ;; |
2084 | dlpreopen) libs="$dlprefiles" ;; |
2008 | link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; |
2085 | link) |
|
|
2086 | libs="$deplibs %DEPLIBS%" |
|
|
2087 | test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" |
|
|
2088 | ;; |
2009 | esac |
2089 | esac |
2010 | fi |
2090 | fi |
2011 | if test "$pass" = dlopen; then |
2091 | if test "$pass" = dlopen; then |
2012 | # Collect dlpreopened libraries |
2092 | # Collect dlpreopened libraries |
2013 | save_deplibs="$deplibs" |
2093 | save_deplibs="$deplibs" |
… | |
… | |
2204 | continue |
2284 | continue |
2205 | ;; |
2285 | ;; |
2206 | esac # case $deplib |
2286 | esac # case $deplib |
2207 | if test "$found" = yes || test -f "$lib"; then : |
2287 | if test "$found" = yes || test -f "$lib"; then : |
2208 | else |
2288 | else |
2209 | $echo "$modename: cannot find the library \`$lib'" 1>&2 |
2289 | $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 |
2210 | exit $EXIT_FAILURE |
2290 | exit $EXIT_FAILURE |
2211 | fi |
2291 | fi |
2212 | |
2292 | |
2213 | # Check to see that this really is a libtool archive. |
2293 | # Check to see that this really is a libtool archive. |
2214 | if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
2294 | if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
… | |
… | |
2255 | exit $EXIT_FAILURE |
2335 | exit $EXIT_FAILURE |
2256 | fi |
2336 | fi |
2257 | # It is a libtool convenience library, so add in its objects. |
2337 | # It is a libtool convenience library, so add in its objects. |
2258 | convenience="$convenience $ladir/$objdir/$old_library" |
2338 | convenience="$convenience $ladir/$objdir/$old_library" |
2259 | old_convenience="$old_convenience $ladir/$objdir/$old_library" |
2339 | old_convenience="$old_convenience $ladir/$objdir/$old_library" |
|
|
2340 | tmp_libs= |
|
|
2341 | for deplib in $dependency_libs; do |
|
|
2342 | deplibs="$deplib $deplibs" |
|
|
2343 | if test "X$duplicate_deps" = "Xyes" ; then |
|
|
2344 | case "$tmp_libs " in |
|
|
2345 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
|
|
2346 | esac |
|
|
2347 | fi |
|
|
2348 | tmp_libs="$tmp_libs $deplib" |
|
|
2349 | done |
2260 | elif test "$linkmode" != prog && test "$linkmode" != lib; then |
2350 | elif test "$linkmode" != prog && test "$linkmode" != lib; then |
2261 | $echo "$modename: \`$lib' is not a convenience library" 1>&2 |
2351 | $echo "$modename: \`$lib' is not a convenience library" 1>&2 |
2262 | exit $EXIT_FAILURE |
2352 | exit $EXIT_FAILURE |
2263 | fi |
2353 | fi |
2264 | tmp_libs= |
|
|
2265 | for deplib in $dependency_libs; do |
|
|
2266 | deplibs="$deplib $deplibs" |
|
|
2267 | if test "X$duplicate_deps" = "Xyes" ; then |
|
|
2268 | case "$tmp_libs " in |
|
|
2269 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; |
|
|
2270 | esac |
|
|
2271 | fi |
|
|
2272 | tmp_libs="$tmp_libs $deplib" |
|
|
2273 | done |
|
|
2274 | continue |
2354 | continue |
2275 | fi # $pass = conv |
2355 | fi # $pass = conv |
2276 | |
2356 | |
2277 | |
2357 | |
2278 | # Get the name of the library we link against. |
2358 | # Get the name of the library we link against. |
… | |
… | |
2455 | continue |
2535 | continue |
2456 | fi |
2536 | fi |
2457 | fi |
2537 | fi |
2458 | |
2538 | |
2459 | link_static=no # Whether the deplib will be linked statically |
2539 | link_static=no # Whether the deplib will be linked statically |
|
|
2540 | use_static_libs=$prefer_static_libs |
|
|
2541 | if test "$use_static_libs" = built && test "$installed" = yes ; then |
|
|
2542 | use_static_libs=no |
|
|
2543 | fi |
2460 | if test -n "$library_names" && |
2544 | if test -n "$library_names" && |
2461 | { test "$prefer_static_libs" = no || test -z "$old_library"; }; then |
2545 | { test "$use_static_libs" = no || test -z "$old_library"; }; then |
2462 | if test "$installed" = no; then |
2546 | if test "$installed" = no; then |
2463 | notinst_deplibs="$notinst_deplibs $lib" |
2547 | notinst_deplibs="$notinst_deplibs $lib" |
2464 | need_relink=yes |
2548 | need_relink=yes |
2465 | fi |
2549 | fi |
2466 | # This is a shared library |
2550 | # This is a shared library |
… | |
… | |
2569 | case $hardcode_action in |
2653 | case $hardcode_action in |
2570 | immediate | unsupported) |
2654 | immediate | unsupported) |
2571 | if test "$hardcode_direct" = no; then |
2655 | if test "$hardcode_direct" = no; then |
2572 | add="$dir/$linklib" |
2656 | add="$dir/$linklib" |
2573 | case $host in |
2657 | case $host in |
2574 | *-*-sco3.2v5* ) add_dir="-L$dir" ;; |
2658 | *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; |
|
|
2659 | *-*-sysv4*uw2*) add_dir="-L$dir" ;; |
|
|
2660 | *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ |
|
|
2661 | *-*-unixware7*) add_dir="-L$dir" ;; |
2575 | *-*-darwin* ) |
2662 | *-*-darwin* ) |
2576 | # if the lib is a module then we can not link against |
2663 | # if the lib is a module then we can not link against |
2577 | # it, someone is ignoring the new warnings I added |
2664 | # it, someone is ignoring the new warnings I added |
2578 | if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then |
2665 | if /usr/bin/file -L $add 2> /dev/null | |
|
|
2666 | $EGREP ": [^:]* bundle" >/dev/null ; then |
2579 | $echo "** Warning, lib $linklib is a module, not a shared library" |
2667 | $echo "** Warning, lib $linklib is a module, not a shared library" |
2580 | if test -z "$old_library" ; then |
2668 | if test -z "$old_library" ; then |
2581 | $echo |
2669 | $echo |
2582 | $echo "** And there doesn't seem to be a static archive available" |
2670 | $echo "** And there doesn't seem to be a static archive available" |
2583 | $echo "** The link will probably fail, sorry" |
2671 | $echo "** The link will probably fail, sorry" |
… | |
… | |
2604 | add="$dir/$linklib" |
2692 | add="$dir/$linklib" |
2605 | elif test "$hardcode_minus_L" = yes; then |
2693 | elif test "$hardcode_minus_L" = yes; then |
2606 | add_dir="-L$dir" |
2694 | add_dir="-L$dir" |
2607 | # Try looking first in the location we're being installed to. |
2695 | # Try looking first in the location we're being installed to. |
2608 | if test -n "$inst_prefix_dir"; then |
2696 | if test -n "$inst_prefix_dir"; then |
2609 | case "$libdir" in |
2697 | case $libdir in |
2610 | [\\/]*) |
2698 | [\\/]*) |
2611 | add_dir="$add_dir -L$inst_prefix_dir$libdir" |
2699 | add_dir="$add_dir -L$inst_prefix_dir$libdir" |
2612 | ;; |
2700 | ;; |
2613 | esac |
2701 | esac |
2614 | fi |
2702 | fi |
… | |
… | |
2654 | if test "$linkmode" = prog || test "$mode" = relink; then |
2742 | if test "$linkmode" = prog || test "$mode" = relink; then |
2655 | add_shlibpath= |
2743 | add_shlibpath= |
2656 | add_dir= |
2744 | add_dir= |
2657 | add= |
2745 | add= |
2658 | # Finalize command for both is simple: just hardcode it. |
2746 | # Finalize command for both is simple: just hardcode it. |
2659 | if test "$hardcode_direct" = yes && test -f $libdir/$linklib; then |
2747 | if test "$hardcode_direct" = yes; then |
2660 | add="$libdir/$linklib" |
2748 | add="$libdir/$linklib" |
2661 | elif test "$hardcode_minus_L" = yes; then |
2749 | elif test "$hardcode_minus_L" = yes; then |
2662 | add_dir="-L$libdir" |
2750 | add_dir="-L$libdir" |
2663 | add="-l$name" |
2751 | add="-l$name" |
2664 | elif test "$hardcode_shlibpath_var" = yes; then |
2752 | elif test "$hardcode_shlibpath_var" = yes; then |
… | |
… | |
2677 | else |
2765 | else |
2678 | # We cannot seem to hardcode it, guess we'll fake it. |
2766 | # We cannot seem to hardcode it, guess we'll fake it. |
2679 | add_dir="-L$libdir" |
2767 | add_dir="-L$libdir" |
2680 | # Try looking first in the location we're being installed to. |
2768 | # Try looking first in the location we're being installed to. |
2681 | if test -n "$inst_prefix_dir"; then |
2769 | if test -n "$inst_prefix_dir"; then |
2682 | case "$libdir" in |
2770 | case $libdir in |
2683 | [\\/]*) |
2771 | [\\/]*) |
2684 | add_dir="$add_dir -L$inst_prefix_dir$libdir" |
2772 | add_dir="$add_dir -L$inst_prefix_dir$libdir" |
2685 | ;; |
2773 | ;; |
2686 | esac |
2774 | esac |
2687 | fi |
2775 | fi |
… | |
… | |
3114 | irix|nonstopux) |
3202 | irix|nonstopux) |
3115 | current=`expr $number_major + $number_minor - 1` |
3203 | current=`expr $number_major + $number_minor - 1` |
3116 | age="$number_minor" |
3204 | age="$number_minor" |
3117 | revision="$number_minor" |
3205 | revision="$number_minor" |
3118 | ;; |
3206 | ;; |
|
|
3207 | *) |
|
|
3208 | $echo "$modename: unknown library version type \`$version_type'" 1>&2 |
|
|
3209 | $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 |
|
|
3210 | exit $EXIT_FAILURE |
|
|
3211 | ;; |
3119 | esac |
3212 | esac |
3120 | ;; |
3213 | ;; |
3121 | no) |
3214 | no) |
3122 | current="$2" |
3215 | current="$2" |
3123 | revision="$3" |
3216 | revision="$3" |
… | |
… | |
3324 | oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` |
3417 | oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` |
3325 | fi |
3418 | fi |
3326 | |
3419 | |
3327 | # Eliminate all temporary directories. |
3420 | # Eliminate all temporary directories. |
3328 | for path in $notinst_path; do |
3421 | for path in $notinst_path; do |
3329 | lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` |
3422 | lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` |
3330 | deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` |
3423 | deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` |
3331 | dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` |
3424 | dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` |
3332 | done |
3425 | done |
3333 | |
3426 | |
3334 | if test -n "$xrpath"; then |
3427 | if test -n "$xrpath"; then |
3335 | # If the user specified any rpath flags, then add them. |
3428 | # If the user specified any rpath flags, then add them. |
3336 | temp_xrpath= |
3429 | temp_xrpath= |
… | |
… | |
3379 | *-*-netbsd*) |
3472 | *-*-netbsd*) |
3380 | # Don't link with libc until the a.out ld.so is fixed. |
3473 | # Don't link with libc until the a.out ld.so is fixed. |
3381 | ;; |
3474 | ;; |
3382 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
3475 | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) |
3383 | # Do not include libc due to us having libc/libc_r. |
3476 | # Do not include libc due to us having libc/libc_r. |
3384 | test "X$arg" = "X-lc" && continue |
3477 | ;; |
|
|
3478 | *-*-sco3.2v5* | *-*-sco5v6*) |
|
|
3479 | # Causes problems with __ctype |
|
|
3480 | ;; |
|
|
3481 | *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) |
|
|
3482 | # Compiler inserts libc in the correct place for threads to work |
3385 | ;; |
3483 | ;; |
3386 | *) |
3484 | *) |
3387 | # Add libc to deplibs on all other systems if necessary. |
3485 | # Add libc to deplibs on all other systems if necessary. |
3388 | if test "$build_libtool_need_lc" = "yes"; then |
3486 | if test "$build_libtool_need_lc" = "yes"; then |
3389 | deplibs="$deplibs -lc" |
3487 | deplibs="$deplibs -lc" |
… | |
… | |
3423 | $rm conftest.c |
3521 | $rm conftest.c |
3424 | cat > conftest.c <<EOF |
3522 | cat > conftest.c <<EOF |
3425 | int main() { return 0; } |
3523 | int main() { return 0; } |
3426 | EOF |
3524 | EOF |
3427 | $rm conftest |
3525 | $rm conftest |
3428 | $LTCC -o conftest conftest.c $deplibs |
3526 | $LTCC $LTCFLAGS -o conftest conftest.c $deplibs |
3429 | if test "$?" -eq 0 ; then |
3527 | if test "$?" -eq 0 ; then |
3430 | ldd_output=`ldd conftest` |
3528 | ldd_output=`ldd conftest` |
3431 | for i in $deplibs; do |
3529 | for i in $deplibs; do |
3432 | name="`expr $i : '-l\(.*\)'`" |
3530 | name=`expr $i : '-l\(.*\)'` |
3433 | # If $name is empty we are operating on a -L argument. |
3531 | # If $name is empty we are operating on a -L argument. |
3434 | if test "$name" != "" && test "$name" -ne "0"; then |
3532 | if test "$name" != "" && test "$name" -ne "0"; then |
3435 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
3533 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
3436 | case " $predeps $postdeps " in |
3534 | case " $predeps $postdeps " in |
3437 | *" $i "*) |
3535 | *" $i "*) |
… | |
… | |
3464 | done |
3562 | done |
3465 | else |
3563 | else |
3466 | # Error occurred in the first compile. Let's try to salvage |
3564 | # Error occurred in the first compile. Let's try to salvage |
3467 | # the situation: Compile a separate program for each library. |
3565 | # the situation: Compile a separate program for each library. |
3468 | for i in $deplibs; do |
3566 | for i in $deplibs; do |
3469 | name="`expr $i : '-l\(.*\)'`" |
3567 | name=`expr $i : '-l\(.*\)'` |
3470 | # If $name is empty we are operating on a -L argument. |
3568 | # If $name is empty we are operating on a -L argument. |
3471 | if test "$name" != "" && test "$name" != "0"; then |
3569 | if test "$name" != "" && test "$name" != "0"; then |
3472 | $rm conftest |
3570 | $rm conftest |
3473 | $LTCC -o conftest conftest.c $i |
3571 | $LTCC $LTCFLAGS -o conftest conftest.c $i |
3474 | # Did it work? |
3572 | # Did it work? |
3475 | if test "$?" -eq 0 ; then |
3573 | if test "$?" -eq 0 ; then |
3476 | ldd_output=`ldd conftest` |
3574 | ldd_output=`ldd conftest` |
3477 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
3575 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
3478 | case " $predeps $postdeps " in |
3576 | case " $predeps $postdeps " in |
… | |
… | |
3516 | ;; |
3614 | ;; |
3517 | file_magic*) |
3615 | file_magic*) |
3518 | set dummy $deplibs_check_method |
3616 | set dummy $deplibs_check_method |
3519 | file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
3617 | file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
3520 | for a_deplib in $deplibs; do |
3618 | for a_deplib in $deplibs; do |
3521 | name="`expr $a_deplib : '-l\(.*\)'`" |
3619 | name=`expr $a_deplib : '-l\(.*\)'` |
3522 | # If $name is empty we are operating on a -L argument. |
3620 | # If $name is empty we are operating on a -L argument. |
3523 | if test "$name" != "" && test "$name" != "0"; then |
3621 | if test "$name" != "" && test "$name" != "0"; then |
3524 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
3622 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
3525 | case " $predeps $postdeps " in |
3623 | case " $predeps $postdeps " in |
3526 | *" $a_deplib "*) |
3624 | *" $a_deplib "*) |
… | |
… | |
3585 | ;; |
3683 | ;; |
3586 | match_pattern*) |
3684 | match_pattern*) |
3587 | set dummy $deplibs_check_method |
3685 | set dummy $deplibs_check_method |
3588 | match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
3686 | match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` |
3589 | for a_deplib in $deplibs; do |
3687 | for a_deplib in $deplibs; do |
3590 | name="`expr $a_deplib : '-l\(.*\)'`" |
3688 | name=`expr $a_deplib : '-l\(.*\)'` |
3591 | # If $name is empty we are operating on a -L argument. |
3689 | # If $name is empty we are operating on a -L argument. |
3592 | if test -n "$name" && test "$name" != "0"; then |
3690 | if test -n "$name" && test "$name" != "0"; then |
3593 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
3691 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
3594 | case " $predeps $postdeps " in |
3692 | case " $predeps $postdeps " in |
3595 | *" $a_deplib "*) |
3693 | *" $a_deplib "*) |
… | |
… | |
3715 | fi |
3813 | fi |
3716 | # Done checking deplibs! |
3814 | # Done checking deplibs! |
3717 | deplibs=$newdeplibs |
3815 | deplibs=$newdeplibs |
3718 | fi |
3816 | fi |
3719 | |
3817 | |
|
|
3818 | |
|
|
3819 | # move library search paths that coincide with paths to not yet |
|
|
3820 | # installed libraries to the beginning of the library search list |
|
|
3821 | new_libs= |
|
|
3822 | for path in $notinst_path; do |
|
|
3823 | case " $new_libs " in |
|
|
3824 | *" -L$path/$objdir "*) ;; |
|
|
3825 | *) |
|
|
3826 | case " $deplibs " in |
|
|
3827 | *" -L$path/$objdir "*) |
|
|
3828 | new_libs="$new_libs -L$path/$objdir" ;; |
|
|
3829 | esac |
|
|
3830 | ;; |
|
|
3831 | esac |
|
|
3832 | done |
|
|
3833 | for deplib in $deplibs; do |
|
|
3834 | case $deplib in |
|
|
3835 | -L*) |
|
|
3836 | case " $new_libs " in |
|
|
3837 | *" $deplib "*) ;; |
|
|
3838 | *) new_libs="$new_libs $deplib" ;; |
|
|
3839 | esac |
|
|
3840 | ;; |
|
|
3841 | *) new_libs="$new_libs $deplib" ;; |
|
|
3842 | esac |
|
|
3843 | done |
|
|
3844 | deplibs="$new_libs" |
|
|
3845 | |
|
|
3846 | |
3720 | # All the library-specific variables (install_libdir is set above). |
3847 | # All the library-specific variables (install_libdir is set above). |
3721 | library_names= |
3848 | library_names= |
3722 | old_library= |
3849 | old_library= |
3723 | dlname= |
3850 | dlname= |
3724 | |
3851 | |
… | |
… | |
3798 | if test -z "$dlname"; then |
3925 | if test -z "$dlname"; then |
3799 | dlname=$soname |
3926 | dlname=$soname |
3800 | fi |
3927 | fi |
3801 | |
3928 | |
3802 | lib="$output_objdir/$realname" |
3929 | lib="$output_objdir/$realname" |
|
|
3930 | linknames= |
3803 | for link |
3931 | for link |
3804 | do |
3932 | do |
3805 | linknames="$linknames $link" |
3933 | linknames="$linknames $link" |
3806 | done |
3934 | done |
3807 | |
3935 | |
… | |
… | |
3826 | skipped_export=false |
3954 | skipped_export=false |
3827 | else |
3955 | else |
3828 | # The command line is too long to execute in one step. |
3956 | # The command line is too long to execute in one step. |
3829 | $show "using reloadable object file for export list..." |
3957 | $show "using reloadable object file for export list..." |
3830 | skipped_export=: |
3958 | skipped_export=: |
|
|
3959 | # Break out early, otherwise skipped_export may be |
|
|
3960 | # set to false by a later but shorter cmd. |
|
|
3961 | break |
3831 | fi |
3962 | fi |
3832 | done |
3963 | done |
3833 | IFS="$save_ifs" |
3964 | IFS="$save_ifs" |
3834 | if test -n "$export_symbols_regex"; then |
3965 | if test -n "$export_symbols_regex"; then |
3835 | $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" |
3966 | $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" |
… | |
… | |
3895 | eval test_cmds=\"$archive_cmds\" |
4026 | eval test_cmds=\"$archive_cmds\" |
3896 | cmds=$archive_cmds |
4027 | cmds=$archive_cmds |
3897 | fi |
4028 | fi |
3898 | fi |
4029 | fi |
3899 | |
4030 | |
3900 | if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && |
4031 | if test "X$skipped_export" != "X:" && |
|
|
4032 | len=`expr "X$test_cmds" : ".*" 2>/dev/null` && |
3901 | test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
4033 | test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
3902 | : |
4034 | : |
3903 | else |
4035 | else |
3904 | # The command line is too long to link in one step, link piecewise. |
4036 | # The command line is too long to link in one step, link piecewise. |
3905 | $echo "creating reloadable object files..." |
4037 | $echo "creating reloadable object files..." |
… | |
… | |
3930 | # Loop over the list of objects to be linked. |
4062 | # Loop over the list of objects to be linked. |
3931 | for obj in $save_libobjs |
4063 | for obj in $save_libobjs |
3932 | do |
4064 | do |
3933 | eval test_cmds=\"$reload_cmds $objlist $last_robj\" |
4065 | eval test_cmds=\"$reload_cmds $objlist $last_robj\" |
3934 | if test "X$objlist" = X || |
4066 | if test "X$objlist" = X || |
3935 | { len=`expr "X$test_cmds" : ".*"` && |
4067 | { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && |
3936 | test "$len" -le "$max_cmd_len"; }; then |
4068 | test "$len" -le "$max_cmd_len"; }; then |
3937 | objlist="$objlist $obj" |
4069 | objlist="$objlist $obj" |
3938 | else |
4070 | else |
3939 | # The command $test_cmds is almost too long, add a |
4071 | # The command $test_cmds is almost too long, add a |
3940 | # command to the queue. |
4072 | # command to the queue. |
… | |
… | |
4020 | save_ifs="$IFS"; IFS='~' |
4152 | save_ifs="$IFS"; IFS='~' |
4021 | for cmd in $cmds; do |
4153 | for cmd in $cmds; do |
4022 | IFS="$save_ifs" |
4154 | IFS="$save_ifs" |
4023 | eval cmd=\"$cmd\" |
4155 | eval cmd=\"$cmd\" |
4024 | $show "$cmd" |
4156 | $show "$cmd" |
4025 | $run eval "$cmd" || exit $? |
4157 | $run eval "$cmd" || { |
|
|
4158 | lt_exit=$? |
|
|
4159 | |
|
|
4160 | # Restore the uninstalled library and exit |
|
|
4161 | if test "$mode" = relink; then |
|
|
4162 | $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' |
|
|
4163 | fi |
|
|
4164 | |
|
|
4165 | exit $lt_exit |
|
|
4166 | } |
4026 | done |
4167 | done |
4027 | IFS="$save_ifs" |
4168 | IFS="$save_ifs" |
4028 | |
4169 | |
4029 | # Restore the uninstalled library and exit |
4170 | # Restore the uninstalled library and exit |
4030 | if test "$mode" = relink; then |
4171 | if test "$mode" = relink; then |
4031 | $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? |
4172 | $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? |
|
|
4173 | |
|
|
4174 | if test -n "$convenience"; then |
|
|
4175 | if test -z "$whole_archive_flag_spec"; then |
|
|
4176 | $show "${rm}r $gentop" |
|
|
4177 | $run ${rm}r "$gentop" |
|
|
4178 | fi |
|
|
4179 | fi |
|
|
4180 | |
4032 | exit $EXIT_SUCCESS |
4181 | exit $EXIT_SUCCESS |
4033 | fi |
4182 | fi |
4034 | |
4183 | |
4035 | # Create links to the real library. |
4184 | # Create links to the real library. |
4036 | for linkname in $linknames; do |
4185 | for linkname in $linknames; do |
… | |
… | |
4207 | compile_command="$compile_command ${wl}-bind_at_load" |
4356 | compile_command="$compile_command ${wl}-bind_at_load" |
4208 | finalize_command="$finalize_command ${wl}-bind_at_load" |
4357 | finalize_command="$finalize_command ${wl}-bind_at_load" |
4209 | fi |
4358 | fi |
4210 | ;; |
4359 | ;; |
4211 | esac |
4360 | esac |
|
|
4361 | |
|
|
4362 | |
|
|
4363 | # move library search paths that coincide with paths to not yet |
|
|
4364 | # installed libraries to the beginning of the library search list |
|
|
4365 | new_libs= |
|
|
4366 | for path in $notinst_path; do |
|
|
4367 | case " $new_libs " in |
|
|
4368 | *" -L$path/$objdir "*) ;; |
|
|
4369 | *) |
|
|
4370 | case " $compile_deplibs " in |
|
|
4371 | *" -L$path/$objdir "*) |
|
|
4372 | new_libs="$new_libs -L$path/$objdir" ;; |
|
|
4373 | esac |
|
|
4374 | ;; |
|
|
4375 | esac |
|
|
4376 | done |
|
|
4377 | for deplib in $compile_deplibs; do |
|
|
4378 | case $deplib in |
|
|
4379 | -L*) |
|
|
4380 | case " $new_libs " in |
|
|
4381 | *" $deplib "*) ;; |
|
|
4382 | *) new_libs="$new_libs $deplib" ;; |
|
|
4383 | esac |
|
|
4384 | ;; |
|
|
4385 | *) new_libs="$new_libs $deplib" ;; |
|
|
4386 | esac |
|
|
4387 | done |
|
|
4388 | compile_deplibs="$new_libs" |
|
|
4389 | |
4212 | |
4390 | |
4213 | compile_command="$compile_command $compile_deplibs" |
4391 | compile_command="$compile_command $compile_deplibs" |
4214 | finalize_command="$finalize_command $finalize_deplibs" |
4392 | finalize_command="$finalize_command $finalize_deplibs" |
4215 | |
4393 | |
4216 | if test -n "$rpath$xrpath"; then |
4394 | if test -n "$rpath$xrpath"; then |
… | |
… | |
4252 | *) perm_rpath="$perm_rpath $libdir" ;; |
4430 | *) perm_rpath="$perm_rpath $libdir" ;; |
4253 | esac |
4431 | esac |
4254 | fi |
4432 | fi |
4255 | case $host in |
4433 | case $host in |
4256 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
4434 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) |
|
|
4435 | testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` |
4257 | case :$dllsearchpath: in |
4436 | case :$dllsearchpath: in |
4258 | *":$libdir:"*) ;; |
4437 | *":$libdir:"*) ;; |
4259 | *) dllsearchpath="$dllsearchpath:$libdir";; |
4438 | *) dllsearchpath="$dllsearchpath:$libdir";; |
|
|
4439 | esac |
|
|
4440 | case :$dllsearchpath: in |
|
|
4441 | *":$testbindir:"*) ;; |
|
|
4442 | *) dllsearchpath="$dllsearchpath:$testbindir";; |
4260 | esac |
4443 | esac |
4261 | ;; |
4444 | ;; |
4262 | esac |
4445 | esac |
4263 | done |
4446 | done |
4264 | # Substitute the hardcoded libdirs into the rpath. |
4447 | # Substitute the hardcoded libdirs into the rpath. |
… | |
… | |
4371 | |
4554 | |
4372 | # Prepare the list of exported symbols |
4555 | # Prepare the list of exported symbols |
4373 | if test -z "$export_symbols"; then |
4556 | if test -z "$export_symbols"; then |
4374 | export_symbols="$output_objdir/$outputname.exp" |
4557 | export_symbols="$output_objdir/$outputname.exp" |
4375 | $run $rm $export_symbols |
4558 | $run $rm $export_symbols |
4376 | $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' |
4559 | $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' |
|
|
4560 | case $host in |
|
|
4561 | *cygwin* | *mingw* ) |
|
|
4562 | $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' |
|
|
4563 | $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' |
|
|
4564 | ;; |
|
|
4565 | esac |
4377 | else |
4566 | else |
4378 | $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' |
4567 | $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' |
4379 | $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' |
4568 | $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' |
4380 | $run eval 'mv "$nlist"T "$nlist"' |
4569 | $run eval 'mv "$nlist"T "$nlist"' |
|
|
4570 | case $host in |
|
|
4571 | *cygwin* | *mingw* ) |
|
|
4572 | $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' |
|
|
4573 | $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' |
|
|
4574 | ;; |
|
|
4575 | esac |
4381 | fi |
4576 | fi |
4382 | fi |
4577 | fi |
4383 | |
4578 | |
4384 | for arg in $dlprefiles; do |
4579 | for arg in $dlprefiles; do |
4385 | $show "extracting global C symbols from \`$arg'" |
4580 | $show "extracting global C symbols from \`$arg'" |
… | |
… | |
4492 | *) pic_flag_for_symtable=" $pic_flag";; |
4687 | *) pic_flag_for_symtable=" $pic_flag";; |
4493 | esac |
4688 | esac |
4494 | esac |
4689 | esac |
4495 | |
4690 | |
4496 | # Now compile the dynamic symbol file. |
4691 | # Now compile the dynamic symbol file. |
4497 | $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" |
4692 | $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" |
4498 | $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? |
4693 | $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? |
4499 | |
4694 | |
4500 | # Clean up the generated files. |
4695 | # Clean up the generated files. |
4501 | $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" |
4696 | $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" |
4502 | $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" |
4697 | $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" |
4503 | |
4698 | |
4504 | # Transform the symbol file into the correct name. |
4699 | # Transform the symbol file into the correct name. |
|
|
4700 | case $host in |
|
|
4701 | *cygwin* | *mingw* ) |
|
|
4702 | if test -f "$output_objdir/${outputname}.def" ; then |
|
|
4703 | compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` |
|
|
4704 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` |
|
|
4705 | else |
|
|
4706 | compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
|
|
4707 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
|
|
4708 | fi |
|
|
4709 | ;; |
|
|
4710 | * ) |
4505 | compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
4711 | compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
4506 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
4712 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` |
|
|
4713 | ;; |
|
|
4714 | esac |
4507 | ;; |
4715 | ;; |
4508 | *) |
4716 | *) |
4509 | $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 |
4717 | $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 |
4510 | exit $EXIT_FAILURE |
4718 | exit $EXIT_FAILURE |
4511 | ;; |
4719 | ;; |
… | |
… | |
4526 | link_command="$compile_command$compile_rpath" |
4734 | link_command="$compile_command$compile_rpath" |
4527 | |
4735 | |
4528 | # We have no uninstalled library dependencies, so finalize right now. |
4736 | # We have no uninstalled library dependencies, so finalize right now. |
4529 | $show "$link_command" |
4737 | $show "$link_command" |
4530 | $run eval "$link_command" |
4738 | $run eval "$link_command" |
4531 | status=$? |
4739 | exit_status=$? |
4532 | |
4740 | |
4533 | # Delete the generated files. |
4741 | # Delete the generated files. |
4534 | if test -n "$dlsyms"; then |
4742 | if test -n "$dlsyms"; then |
4535 | $show "$rm $output_objdir/${outputname}S.${objext}" |
4743 | $show "$rm $output_objdir/${outputname}S.${objext}" |
4536 | $run $rm "$output_objdir/${outputname}S.${objext}" |
4744 | $run $rm "$output_objdir/${outputname}S.${objext}" |
4537 | fi |
4745 | fi |
4538 | |
4746 | |
4539 | exit $status |
4747 | exit $exit_status |
4540 | fi |
4748 | fi |
4541 | |
4749 | |
4542 | if test -n "$shlibpath_var"; then |
4750 | if test -n "$shlibpath_var"; then |
4543 | # We should set the shlibpath_var |
4751 | # We should set the shlibpath_var |
4544 | rpath= |
4752 | rpath= |
… | |
… | |
4674 | outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; |
4882 | outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; |
4675 | *) exeext= ;; |
4883 | *) exeext= ;; |
4676 | esac |
4884 | esac |
4677 | case $host in |
4885 | case $host in |
4678 | *cygwin* | *mingw* ) |
4886 | *cygwin* | *mingw* ) |
4679 | cwrappersource=`$echo ${objdir}/lt-${outputname}.c` |
4887 | output_name=`basename $output` |
4680 | cwrapper=`$echo ${output}.exe` |
4888 | output_path=`dirname $output` |
|
|
4889 | cwrappersource="$output_path/$objdir/lt-$output_name.c" |
|
|
4890 | cwrapper="$output_path/$output_name.exe" |
4681 | $rm $cwrappersource $cwrapper |
4891 | $rm $cwrappersource $cwrapper |
4682 | trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 |
4892 | trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 |
4683 | |
4893 | |
4684 | cat > $cwrappersource <<EOF |
4894 | cat > $cwrappersource <<EOF |
4685 | |
4895 | |
4686 | /* $cwrappersource - temporary wrapper executable for $objdir/$outputname |
4896 | /* $cwrappersource - temporary wrapper executable for $objdir/$outputname |
4687 | Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
4897 | Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
… | |
… | |
4702 | #include <stdlib.h> |
4912 | #include <stdlib.h> |
4703 | #include <unistd.h> |
4913 | #include <unistd.h> |
4704 | #include <malloc.h> |
4914 | #include <malloc.h> |
4705 | #include <stdarg.h> |
4915 | #include <stdarg.h> |
4706 | #include <assert.h> |
4916 | #include <assert.h> |
|
|
4917 | #include <string.h> |
|
|
4918 | #include <ctype.h> |
|
|
4919 | #include <sys/stat.h> |
4707 | |
4920 | |
4708 | #if defined(PATH_MAX) |
4921 | #if defined(PATH_MAX) |
4709 | # define LT_PATHMAX PATH_MAX |
4922 | # define LT_PATHMAX PATH_MAX |
4710 | #elif defined(MAXPATHLEN) |
4923 | #elif defined(MAXPATHLEN) |
4711 | # define LT_PATHMAX MAXPATHLEN |
4924 | # define LT_PATHMAX MAXPATHLEN |
4712 | #else |
4925 | #else |
4713 | # define LT_PATHMAX 1024 |
4926 | # define LT_PATHMAX 1024 |
4714 | #endif |
4927 | #endif |
4715 | |
4928 | |
4716 | #ifndef DIR_SEPARATOR |
4929 | #ifndef DIR_SEPARATOR |
4717 | #define DIR_SEPARATOR '/' |
4930 | # define DIR_SEPARATOR '/' |
|
|
4931 | # define PATH_SEPARATOR ':' |
4718 | #endif |
4932 | #endif |
4719 | |
4933 | |
4720 | #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ |
4934 | #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ |
4721 | defined (__OS2__) |
4935 | defined (__OS2__) |
4722 | #define HAVE_DOS_BASED_FILE_SYSTEM |
4936 | # define HAVE_DOS_BASED_FILE_SYSTEM |
4723 | #ifndef DIR_SEPARATOR_2 |
4937 | # ifndef DIR_SEPARATOR_2 |
4724 | #define DIR_SEPARATOR_2 '\\' |
4938 | # define DIR_SEPARATOR_2 '\\' |
4725 | #endif |
4939 | # endif |
|
|
4940 | # ifndef PATH_SEPARATOR_2 |
|
|
4941 | # define PATH_SEPARATOR_2 ';' |
|
|
4942 | # endif |
4726 | #endif |
4943 | #endif |
4727 | |
4944 | |
4728 | #ifndef DIR_SEPARATOR_2 |
4945 | #ifndef DIR_SEPARATOR_2 |
4729 | # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) |
4946 | # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) |
4730 | #else /* DIR_SEPARATOR_2 */ |
4947 | #else /* DIR_SEPARATOR_2 */ |
4731 | # define IS_DIR_SEPARATOR(ch) \ |
4948 | # define IS_DIR_SEPARATOR(ch) \ |
4732 | (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) |
4949 | (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) |
4733 | #endif /* DIR_SEPARATOR_2 */ |
4950 | #endif /* DIR_SEPARATOR_2 */ |
4734 | |
4951 | |
|
|
4952 | #ifndef PATH_SEPARATOR_2 |
|
|
4953 | # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) |
|
|
4954 | #else /* PATH_SEPARATOR_2 */ |
|
|
4955 | # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) |
|
|
4956 | #endif /* PATH_SEPARATOR_2 */ |
|
|
4957 | |
4735 | #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) |
4958 | #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) |
4736 | #define XFREE(stale) do { \ |
4959 | #define XFREE(stale) do { \ |
4737 | if (stale) { free ((void *) stale); stale = 0; } \ |
4960 | if (stale) { free ((void *) stale); stale = 0; } \ |
4738 | } while (0) |
4961 | } while (0) |
4739 | |
4962 | |
|
|
4963 | /* -DDEBUG is fairly common in CFLAGS. */ |
|
|
4964 | #undef DEBUG |
|
|
4965 | #if defined DEBUGWRAPPER |
|
|
4966 | # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) |
|
|
4967 | #else |
|
|
4968 | # define DEBUG(format, ...) |
|
|
4969 | #endif |
|
|
4970 | |
4740 | const char *program_name = NULL; |
4971 | const char *program_name = NULL; |
4741 | |
4972 | |
4742 | void * xmalloc (size_t num); |
4973 | void * xmalloc (size_t num); |
4743 | char * xstrdup (const char *string); |
4974 | char * xstrdup (const char *string); |
4744 | char * basename (const char *name); |
4975 | const char * base_name (const char *name); |
4745 | char * fnqualify(const char *path); |
4976 | char * find_executable(const char *wrapper); |
|
|
4977 | int check_executable(const char *path); |
4746 | char * strendzap(char *str, const char *pat); |
4978 | char * strendzap(char *str, const char *pat); |
4747 | void lt_fatal (const char *message, ...); |
4979 | void lt_fatal (const char *message, ...); |
4748 | |
4980 | |
4749 | int |
4981 | int |
4750 | main (int argc, char *argv[]) |
4982 | main (int argc, char *argv[]) |
4751 | { |
4983 | { |
4752 | char **newargz; |
4984 | char **newargz; |
4753 | int i; |
4985 | int i; |
4754 | |
4986 | |
4755 | program_name = (char *) xstrdup ((char *) basename (argv[0])); |
4987 | program_name = (char *) xstrdup (base_name (argv[0])); |
|
|
4988 | DEBUG("(main) argv[0] : %s\n",argv[0]); |
|
|
4989 | DEBUG("(main) program_name : %s\n",program_name); |
4756 | newargz = XMALLOC(char *, argc+2); |
4990 | newargz = XMALLOC(char *, argc+2); |
4757 | EOF |
4991 | EOF |
4758 | |
4992 | |
4759 | cat >> $cwrappersource <<EOF |
4993 | cat >> $cwrappersource <<EOF |
4760 | newargz[0] = "$SHELL"; |
4994 | newargz[0] = (char *) xstrdup("$SHELL"); |
4761 | EOF |
4995 | EOF |
4762 | |
4996 | |
4763 | cat >> $cwrappersource <<"EOF" |
4997 | cat >> $cwrappersource <<"EOF" |
4764 | newargz[1] = fnqualify(argv[0]); |
4998 | newargz[1] = find_executable(argv[0]); |
|
|
4999 | if (newargz[1] == NULL) |
|
|
5000 | lt_fatal("Couldn't find %s", argv[0]); |
|
|
5001 | DEBUG("(main) found exe at : %s\n",newargz[1]); |
4765 | /* we know the script has the same name, without the .exe */ |
5002 | /* we know the script has the same name, without the .exe */ |
4766 | /* so make sure newargz[1] doesn't end in .exe */ |
5003 | /* so make sure newargz[1] doesn't end in .exe */ |
4767 | strendzap(newargz[1],".exe"); |
5004 | strendzap(newargz[1],".exe"); |
4768 | for (i = 1; i < argc; i++) |
5005 | for (i = 1; i < argc; i++) |
4769 | newargz[i+1] = xstrdup(argv[i]); |
5006 | newargz[i+1] = xstrdup(argv[i]); |
4770 | newargz[argc+1] = NULL; |
5007 | newargz[argc+1] = NULL; |
|
|
5008 | |
|
|
5009 | for (i=0; i<argc+1; i++) |
|
|
5010 | { |
|
|
5011 | DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]); |
|
|
5012 | ; |
|
|
5013 | } |
|
|
5014 | |
4771 | EOF |
5015 | EOF |
4772 | |
5016 | |
|
|
5017 | case $host_os in |
|
|
5018 | mingw*) |
4773 | cat >> $cwrappersource <<EOF |
5019 | cat >> $cwrappersource <<EOF |
|
|
5020 | execv("$SHELL",(char const **)newargz); |
|
|
5021 | EOF |
|
|
5022 | ;; |
|
|
5023 | *) |
|
|
5024 | cat >> $cwrappersource <<EOF |
4774 | execv("$SHELL",newargz); |
5025 | execv("$SHELL",newargz); |
4775 | EOF |
5026 | EOF |
|
|
5027 | ;; |
|
|
5028 | esac |
4776 | |
5029 | |
4777 | cat >> $cwrappersource <<"EOF" |
5030 | cat >> $cwrappersource <<"EOF" |
|
|
5031 | return 127; |
4778 | } |
5032 | } |
4779 | |
5033 | |
4780 | void * |
5034 | void * |
4781 | xmalloc (size_t num) |
5035 | xmalloc (size_t num) |
4782 | { |
5036 | { |
… | |
… | |
4792 | { |
5046 | { |
4793 | return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL |
5047 | return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL |
4794 | ; |
5048 | ; |
4795 | } |
5049 | } |
4796 | |
5050 | |
4797 | char * |
5051 | const char * |
4798 | basename (const char *name) |
5052 | base_name (const char *name) |
4799 | { |
5053 | { |
4800 | const char *base; |
5054 | const char *base; |
4801 | |
5055 | |
4802 | #if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
5056 | #if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
4803 | /* Skip over the disk name in MSDOS pathnames. */ |
5057 | /* Skip over the disk name in MSDOS pathnames. */ |
4804 | if (isalpha (name[0]) && name[1] == ':') |
5058 | if (isalpha ((unsigned char)name[0]) && name[1] == ':') |
4805 | name += 2; |
5059 | name += 2; |
4806 | #endif |
5060 | #endif |
4807 | |
5061 | |
4808 | for (base = name; *name; name++) |
5062 | for (base = name; *name; name++) |
4809 | if (IS_DIR_SEPARATOR (*name)) |
5063 | if (IS_DIR_SEPARATOR (*name)) |
4810 | base = name + 1; |
5064 | base = name + 1; |
4811 | return (char *) base; |
5065 | return base; |
4812 | } |
5066 | } |
4813 | |
5067 | |
|
|
5068 | int |
|
|
5069 | check_executable(const char * path) |
|
|
5070 | { |
|
|
5071 | struct stat st; |
|
|
5072 | |
|
|
5073 | DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); |
|
|
5074 | if ((!path) || (!*path)) |
|
|
5075 | return 0; |
|
|
5076 | |
|
|
5077 | if ((stat (path, &st) >= 0) && |
|
|
5078 | ( |
|
|
5079 | /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ |
|
|
5080 | #if defined (S_IXOTH) |
|
|
5081 | ((st.st_mode & S_IXOTH) == S_IXOTH) || |
|
|
5082 | #endif |
|
|
5083 | #if defined (S_IXGRP) |
|
|
5084 | ((st.st_mode & S_IXGRP) == S_IXGRP) || |
|
|
5085 | #endif |
|
|
5086 | ((st.st_mode & S_IXUSR) == S_IXUSR)) |
|
|
5087 | ) |
|
|
5088 | return 1; |
|
|
5089 | else |
|
|
5090 | return 0; |
|
|
5091 | } |
|
|
5092 | |
|
|
5093 | /* Searches for the full path of the wrapper. Returns |
|
|
5094 | newly allocated full path name if found, NULL otherwise */ |
4814 | char * |
5095 | char * |
4815 | fnqualify(const char *path) |
5096 | find_executable (const char* wrapper) |
4816 | { |
5097 | { |
4817 | size_t size; |
5098 | int has_slash = 0; |
4818 | char *p; |
5099 | const char* p; |
|
|
5100 | const char* p_next; |
|
|
5101 | /* static buffer for getcwd */ |
4819 | char tmp[LT_PATHMAX + 1]; |
5102 | char tmp[LT_PATHMAX + 1]; |
|
|
5103 | int tmp_len; |
|
|
5104 | char* concat_name; |
4820 | |
5105 | |
4821 | assert(path != NULL); |
5106 | DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); |
4822 | |
5107 | |
4823 | /* Is it qualified already? */ |
5108 | if ((wrapper == NULL) || (*wrapper == '\0')) |
|
|
5109 | return NULL; |
|
|
5110 | |
|
|
5111 | /* Absolute path? */ |
4824 | #if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
5112 | #if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
4825 | if (isalpha (path[0]) && path[1] == ':') |
5113 | if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') |
4826 | return xstrdup (path); |
5114 | { |
|
|
5115 | concat_name = xstrdup (wrapper); |
|
|
5116 | if (check_executable(concat_name)) |
|
|
5117 | return concat_name; |
|
|
5118 | XFREE(concat_name); |
|
|
5119 | } |
|
|
5120 | else |
|
|
5121 | { |
4827 | #endif |
5122 | #endif |
4828 | if (IS_DIR_SEPARATOR (path[0])) |
5123 | if (IS_DIR_SEPARATOR (wrapper[0])) |
4829 | return xstrdup (path); |
5124 | { |
|
|
5125 | concat_name = xstrdup (wrapper); |
|
|
5126 | if (check_executable(concat_name)) |
|
|
5127 | return concat_name; |
|
|
5128 | XFREE(concat_name); |
|
|
5129 | } |
|
|
5130 | #if defined (HAVE_DOS_BASED_FILE_SYSTEM) |
|
|
5131 | } |
|
|
5132 | #endif |
4830 | |
5133 | |
4831 | /* prepend the current directory */ |
5134 | for (p = wrapper; *p; p++) |
4832 | /* doesn't handle '~' */ |
5135 | if (*p == '/') |
|
|
5136 | { |
|
|
5137 | has_slash = 1; |
|
|
5138 | break; |
|
|
5139 | } |
|
|
5140 | if (!has_slash) |
|
|
5141 | { |
|
|
5142 | /* no slashes; search PATH */ |
|
|
5143 | const char* path = getenv ("PATH"); |
|
|
5144 | if (path != NULL) |
|
|
5145 | { |
|
|
5146 | for (p = path; *p; p = p_next) |
|
|
5147 | { |
|
|
5148 | const char* q; |
|
|
5149 | size_t p_len; |
|
|
5150 | for (q = p; *q; q++) |
|
|
5151 | if (IS_PATH_SEPARATOR(*q)) |
|
|
5152 | break; |
|
|
5153 | p_len = q - p; |
|
|
5154 | p_next = (*q == '\0' ? q : q + 1); |
|
|
5155 | if (p_len == 0) |
|
|
5156 | { |
|
|
5157 | /* empty path: current directory */ |
|
|
5158 | if (getcwd (tmp, LT_PATHMAX) == NULL) |
|
|
5159 | lt_fatal ("getcwd failed"); |
|
|
5160 | tmp_len = strlen(tmp); |
|
|
5161 | concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); |
|
|
5162 | memcpy (concat_name, tmp, tmp_len); |
|
|
5163 | concat_name[tmp_len] = '/'; |
|
|
5164 | strcpy (concat_name + tmp_len + 1, wrapper); |
|
|
5165 | } |
|
|
5166 | else |
|
|
5167 | { |
|
|
5168 | concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); |
|
|
5169 | memcpy (concat_name, p, p_len); |
|
|
5170 | concat_name[p_len] = '/'; |
|
|
5171 | strcpy (concat_name + p_len + 1, wrapper); |
|
|
5172 | } |
|
|
5173 | if (check_executable(concat_name)) |
|
|
5174 | return concat_name; |
|
|
5175 | XFREE(concat_name); |
|
|
5176 | } |
|
|
5177 | } |
|
|
5178 | /* not found in PATH; assume curdir */ |
|
|
5179 | } |
|
|
5180 | /* Relative path | not found in path: prepend cwd */ |
4833 | if (getcwd (tmp, LT_PATHMAX) == NULL) |
5181 | if (getcwd (tmp, LT_PATHMAX) == NULL) |
4834 | lt_fatal ("getcwd failed"); |
5182 | lt_fatal ("getcwd failed"); |
4835 | size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ |
5183 | tmp_len = strlen(tmp); |
4836 | p = XMALLOC(char, size); |
5184 | concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); |
4837 | sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); |
5185 | memcpy (concat_name, tmp, tmp_len); |
|
|
5186 | concat_name[tmp_len] = '/'; |
|
|
5187 | strcpy (concat_name + tmp_len + 1, wrapper); |
|
|
5188 | |
|
|
5189 | if (check_executable(concat_name)) |
|
|
5190 | return concat_name; |
|
|
5191 | XFREE(concat_name); |
4838 | return p; |
5192 | return NULL; |
4839 | } |
5193 | } |
4840 | |
5194 | |
4841 | char * |
5195 | char * |
4842 | strendzap(char *str, const char *pat) |
5196 | strendzap(char *str, const char *pat) |
4843 | { |
5197 | { |
… | |
… | |
4877 | va_start (ap, message); |
5231 | va_start (ap, message); |
4878 | lt_error_core (EXIT_FAILURE, "FATAL", message, ap); |
5232 | lt_error_core (EXIT_FAILURE, "FATAL", message, ap); |
4879 | va_end (ap); |
5233 | va_end (ap); |
4880 | } |
5234 | } |
4881 | EOF |
5235 | EOF |
4882 | # we should really use a build-platform specific compiler |
5236 | # we should really use a build-platform specific compiler |
4883 | # here, but OTOH, the wrappers (shell script and this C one) |
5237 | # here, but OTOH, the wrappers (shell script and this C one) |
4884 | # are only useful if you want to execute the "real" binary. |
5238 | # are only useful if you want to execute the "real" binary. |
4885 | # Since the "real" binary is built for $host, then this |
5239 | # Since the "real" binary is built for $host, then this |
4886 | # wrapper might as well be built for $host, too. |
5240 | # wrapper might as well be built for $host, too. |
4887 | $run $LTCC -s -o $cwrapper $cwrappersource |
5241 | $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource |
4888 | ;; |
5242 | ;; |
4889 | esac |
5243 | esac |
4890 | $rm $output |
5244 | $rm $output |
4891 | trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 |
5245 | trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 |
4892 | |
5246 | |
4893 | $echo > $output "\ |
5247 | $echo > $output "\ |
4894 | #! $SHELL |
5248 | #! $SHELL |
4895 | |
5249 | |
4896 | # $output - temporary wrapper script for $objdir/$outputname |
5250 | # $output - temporary wrapper script for $objdir/$outputname |
… | |
… | |
5036 | " |
5390 | " |
5037 | case $host in |
5391 | case $host in |
5038 | # Backslashes separate directories on plain windows |
5392 | # Backslashes separate directories on plain windows |
5039 | *-*-mingw | *-*-os2*) |
5393 | *-*-mingw | *-*-os2*) |
5040 | $echo >> $output "\ |
5394 | $echo >> $output "\ |
5041 | exec \$progdir\\\\\$program \${1+\"\$@\"} |
5395 | exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} |
5042 | " |
5396 | " |
5043 | ;; |
5397 | ;; |
5044 | |
5398 | |
5045 | *) |
5399 | *) |
5046 | $echo >> $output "\ |
5400 | $echo >> $output "\ |
5047 | exec \$progdir/\$program \${1+\"\$@\"} |
5401 | exec \"\$progdir/\$program\" \${1+\"\$@\"} |
5048 | " |
5402 | " |
5049 | ;; |
5403 | ;; |
5050 | esac |
5404 | esac |
5051 | $echo >> $output "\ |
5405 | $echo >> $output "\ |
5052 | \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" |
5406 | \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" |
5053 | exit $EXIT_FAILURE |
5407 | exit $EXIT_FAILURE |
5054 | fi |
5408 | fi |
5055 | else |
5409 | else |
5056 | # The program doesn't exist. |
5410 | # The program doesn't exist. |
5057 | \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 |
5411 | \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 |
5058 | \$echo \"This script is just a wrapper for \$program.\" 1>&2 |
5412 | \$echo \"This script is just a wrapper for \$program.\" 1>&2 |
5059 | $echo \"See the $PACKAGE documentation for more information.\" 1>&2 |
5413 | $echo \"See the $PACKAGE documentation for more information.\" 1>&2 |
5060 | exit $EXIT_FAILURE |
5414 | exit $EXIT_FAILURE |
5061 | fi |
5415 | fi |
5062 | fi\ |
5416 | fi\ |
… | |
… | |
5116 | |
5470 | |
5117 | $show "${rm}r $gentop" |
5471 | $show "${rm}r $gentop" |
5118 | $run ${rm}r "$gentop" |
5472 | $run ${rm}r "$gentop" |
5119 | $show "$mkdir $gentop" |
5473 | $show "$mkdir $gentop" |
5120 | $run $mkdir "$gentop" |
5474 | $run $mkdir "$gentop" |
5121 | status=$? |
5475 | exit_status=$? |
5122 | if test "$status" -ne 0 && test ! -d "$gentop"; then |
5476 | if test "$exit_status" -ne 0 && test ! -d "$gentop"; then |
5123 | exit $status |
5477 | exit $exit_status |
5124 | fi |
5478 | fi |
5125 | fi |
5479 | fi |
5126 | |
5480 | |
5127 | save_oldobjs=$oldobjs |
5481 | save_oldobjs=$oldobjs |
5128 | oldobjs= |
5482 | oldobjs= |
… | |
… | |
5175 | for obj in $save_oldobjs |
5529 | for obj in $save_oldobjs |
5176 | do |
5530 | do |
5177 | oldobjs="$objlist $obj" |
5531 | oldobjs="$objlist $obj" |
5178 | objlist="$objlist $obj" |
5532 | objlist="$objlist $obj" |
5179 | eval test_cmds=\"$old_archive_cmds\" |
5533 | eval test_cmds=\"$old_archive_cmds\" |
5180 | if len=`expr "X$test_cmds" : ".*"` && |
5534 | if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && |
5181 | test "$len" -le "$max_cmd_len"; then |
5535 | test "$len" -le "$max_cmd_len"; then |
5182 | : |
5536 | : |
5183 | else |
5537 | else |
5184 | # the above command should be used before it gets too long |
5538 | # the above command should be used before it gets too long |
5185 | oldobjs=$objlist |
5539 | oldobjs=$objlist |
… | |
… | |
5372 | |
5726 | |
5373 | # There may be an optional sh(1) argument at the beginning of |
5727 | # There may be an optional sh(1) argument at the beginning of |
5374 | # install_prog (especially on Windows NT). |
5728 | # install_prog (especially on Windows NT). |
5375 | if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || |
5729 | if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || |
5376 | # Allow the use of GNU shtool's install command. |
5730 | # Allow the use of GNU shtool's install command. |
5377 | $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then |
5731 | $echo "X$nonopt" | grep shtool > /dev/null; then |
5378 | # Aesthetically quote it. |
5732 | # Aesthetically quote it. |
5379 | arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` |
5733 | arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` |
5380 | case $arg in |
5734 | case $arg in |
5381 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
5735 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5382 | arg="\"$arg\"" |
5736 | arg="\"$arg\"" |
5383 | ;; |
5737 | ;; |
5384 | esac |
5738 | esac |
5385 | install_prog="$arg " |
5739 | install_prog="$arg " |
5386 | arg="$1" |
5740 | arg="$1" |
5387 | shift |
5741 | shift |
5388 | else |
5742 | else |
5389 | install_prog= |
5743 | install_prog= |
5390 | arg="$nonopt" |
5744 | arg=$nonopt |
5391 | fi |
5745 | fi |
5392 | |
5746 | |
5393 | # The real first argument should be the name of the installation program. |
5747 | # The real first argument should be the name of the installation program. |
5394 | # Aesthetically quote it. |
5748 | # Aesthetically quote it. |
5395 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
5749 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
5396 | case $arg in |
5750 | case $arg in |
5397 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
5751 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5398 | arg="\"$arg\"" |
5752 | arg="\"$arg\"" |
5399 | ;; |
5753 | ;; |
5400 | esac |
5754 | esac |
5401 | install_prog="$install_prog$arg" |
5755 | install_prog="$install_prog$arg" |
5402 | |
5756 | |
… | |
… | |
5410 | stripme= |
5764 | stripme= |
5411 | for arg |
5765 | for arg |
5412 | do |
5766 | do |
5413 | if test -n "$dest"; then |
5767 | if test -n "$dest"; then |
5414 | files="$files $dest" |
5768 | files="$files $dest" |
5415 | dest="$arg" |
5769 | dest=$arg |
5416 | continue |
5770 | continue |
5417 | fi |
5771 | fi |
5418 | |
5772 | |
5419 | case $arg in |
5773 | case $arg in |
5420 | -d) isdir=yes ;; |
5774 | -d) isdir=yes ;; |
5421 | -f) prev="-f" ;; |
5775 | -f) |
5422 | -g) prev="-g" ;; |
5776 | case " $install_prog " in |
5423 | -m) prev="-m" ;; |
5777 | *[\\\ /]cp\ *) ;; |
5424 | -o) prev="-o" ;; |
5778 | *) prev=$arg ;; |
|
|
5779 | esac |
|
|
5780 | ;; |
|
|
5781 | -g | -m | -o) prev=$arg ;; |
5425 | -s) |
5782 | -s) |
5426 | stripme=" -s" |
5783 | stripme=" -s" |
5427 | continue |
5784 | continue |
5428 | ;; |
5785 | ;; |
5429 | -*) ;; |
5786 | -*) |
5430 | |
5787 | ;; |
5431 | *) |
5788 | *) |
5432 | # If the previous option needed an argument, then skip it. |
5789 | # If the previous option needed an argument, then skip it. |
5433 | if test -n "$prev"; then |
5790 | if test -n "$prev"; then |
5434 | prev= |
5791 | prev= |
5435 | else |
5792 | else |
5436 | dest="$arg" |
5793 | dest=$arg |
5437 | continue |
5794 | continue |
5438 | fi |
5795 | fi |
5439 | ;; |
5796 | ;; |
5440 | esac |
5797 | esac |
5441 | |
5798 | |
5442 | # Aesthetically quote the argument. |
5799 | # Aesthetically quote the argument. |
5443 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
5800 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` |
5444 | case $arg in |
5801 | case $arg in |
5445 | *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "") |
5802 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") |
5446 | arg="\"$arg\"" |
5803 | arg="\"$arg\"" |
5447 | ;; |
5804 | ;; |
5448 | esac |
5805 | esac |
5449 | install_prog="$install_prog $arg" |
5806 | install_prog="$install_prog $arg" |
5450 | done |
5807 | done |
… | |
… | |
5609 | $run eval "$striplib $destdir/$realname" || exit $? |
5966 | $run eval "$striplib $destdir/$realname" || exit $? |
5610 | fi |
5967 | fi |
5611 | |
5968 | |
5612 | if test "$#" -gt 0; then |
5969 | if test "$#" -gt 0; then |
5613 | # Delete the old symlinks, and create new ones. |
5970 | # Delete the old symlinks, and create new ones. |
|
|
5971 | # Try `ln -sf' first, because the `ln' binary might depend on |
|
|
5972 | # the symlink we replace! Solaris /bin/ln does not understand -f, |
|
|
5973 | # so we also need to try rm && ln -s. |
5614 | for linkname |
5974 | for linkname |
5615 | do |
5975 | do |
5616 | if test "$linkname" != "$realname"; then |
5976 | if test "$linkname" != "$realname"; then |
5617 | $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" |
5977 | $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" |
5618 | $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" |
5978 | $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" |
5619 | fi |
5979 | fi |
5620 | done |
5980 | done |
5621 | fi |
5981 | fi |
5622 | |
5982 | |
5623 | # Do each command in the postinstall commands. |
5983 | # Do each command in the postinstall commands. |
… | |
… | |
5626 | save_ifs="$IFS"; IFS='~' |
5986 | save_ifs="$IFS"; IFS='~' |
5627 | for cmd in $cmds; do |
5987 | for cmd in $cmds; do |
5628 | IFS="$save_ifs" |
5988 | IFS="$save_ifs" |
5629 | eval cmd=\"$cmd\" |
5989 | eval cmd=\"$cmd\" |
5630 | $show "$cmd" |
5990 | $show "$cmd" |
5631 | $run eval "$cmd" || exit $? |
5991 | $run eval "$cmd" || { |
|
|
5992 | lt_exit=$? |
|
|
5993 | |
|
|
5994 | # Restore the uninstalled library and exit |
|
|
5995 | if test "$mode" = relink; then |
|
|
5996 | $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' |
|
|
5997 | fi |
|
|
5998 | |
|
|
5999 | exit $lt_exit |
|
|
6000 | } |
5632 | done |
6001 | done |
5633 | IFS="$save_ifs" |
6002 | IFS="$save_ifs" |
5634 | fi |
6003 | fi |
5635 | |
6004 | |
5636 | # Install the pseudo-library for information purposes. |
6005 | # Install the pseudo-library for information purposes. |
… | |
… | |
5720 | esac |
6089 | esac |
5721 | if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then |
6090 | if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then |
5722 | notinst_deplibs= |
6091 | notinst_deplibs= |
5723 | relink_command= |
6092 | relink_command= |
5724 | |
6093 | |
5725 | # To insure that "foo" is sourced, and not "foo.exe", |
6094 | # Note that it is not necessary on cygwin/mingw to append a dot to |
5726 | # finese the cygwin/MSYS system by explicitly sourcing "foo." |
6095 | # foo even if both foo and FILE.exe exist: automatic-append-.exe |
5727 | # which disallows the automatic-append-.exe behavior. |
6096 | # behavior happens only for exec(3), not for open(2)! Also, sourcing |
5728 | case $build in |
6097 | # `FILE.' does not work on cygwin managed mounts. |
5729 | *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; |
6098 | # |
5730 | *) wrapperdot=${wrapper} ;; |
|
|
5731 | esac |
|
|
5732 | # If there is no directory component, then add one. |
6099 | # If there is no directory component, then add one. |
5733 | case $file in |
6100 | case $wrapper in |
5734 | */* | *\\*) . ${wrapperdot} ;; |
6101 | */* | *\\*) . ${wrapper} ;; |
5735 | *) . ./${wrapperdot} ;; |
6102 | *) . ./${wrapper} ;; |
5736 | esac |
6103 | esac |
5737 | |
6104 | |
5738 | # Check the variables that should have been set. |
6105 | # Check the variables that should have been set. |
5739 | if test -z "$notinst_deplibs"; then |
6106 | if test -z "$notinst_deplibs"; then |
5740 | $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 |
6107 | $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 |
… | |
… | |
5758 | finalize=no |
6125 | finalize=no |
5759 | fi |
6126 | fi |
5760 | done |
6127 | done |
5761 | |
6128 | |
5762 | relink_command= |
6129 | relink_command= |
5763 | # To insure that "foo" is sourced, and not "foo.exe", |
6130 | # Note that it is not necessary on cygwin/mingw to append a dot to |
5764 | # finese the cygwin/MSYS system by explicitly sourcing "foo." |
6131 | # foo even if both foo and FILE.exe exist: automatic-append-.exe |
5765 | # which disallows the automatic-append-.exe behavior. |
6132 | # behavior happens only for exec(3), not for open(2)! Also, sourcing |
5766 | case $build in |
6133 | # `FILE.' does not work on cygwin managed mounts. |
5767 | *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; |
6134 | # |
5768 | *) wrapperdot=${wrapper} ;; |
|
|
5769 | esac |
|
|
5770 | # If there is no directory component, then add one. |
6135 | # If there is no directory component, then add one. |
5771 | case $file in |
6136 | case $wrapper in |
5772 | */* | *\\*) . ${wrapperdot} ;; |
6137 | */* | *\\*) . ${wrapper} ;; |
5773 | *) . ./${wrapperdot} ;; |
6138 | *) . ./${wrapper} ;; |
5774 | esac |
6139 | esac |
5775 | |
6140 | |
5776 | outputname= |
6141 | outputname= |
5777 | if test "$fast_install" = no && test -n "$relink_command"; then |
6142 | if test "$fast_install" = no && test -n "$relink_command"; then |
5778 | if test "$finalize" = yes && test -z "$run"; then |
6143 | if test "$finalize" = yes && test -z "$run"; then |
5779 | tmpdir="/tmp" |
6144 | tmpdir=`func_mktempdir` |
5780 | test -n "$TMPDIR" && tmpdir="$TMPDIR" |
|
|
5781 | tmpdir="$tmpdir/libtool-$$" |
|
|
5782 | save_umask=`umask` |
|
|
5783 | umask 0077 |
|
|
5784 | if $mkdir "$tmpdir"; then |
|
|
5785 | umask $save_umask |
|
|
5786 | else |
|
|
5787 | umask $save_umask |
|
|
5788 | $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 |
|
|
5789 | continue |
|
|
5790 | fi |
|
|
5791 | file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` |
6145 | file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` |
5792 | outputname="$tmpdir/$file" |
6146 | outputname="$tmpdir/$file" |
5793 | # Replace the output file specification. |
6147 | # Replace the output file specification. |
5794 | relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` |
6148 | relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` |
5795 | |
6149 | |
… | |
… | |
5809 | file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` |
6163 | file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` |
5810 | fi |
6164 | fi |
5811 | fi |
6165 | fi |
5812 | |
6166 | |
5813 | # remove .exe since cygwin /usr/bin/install will append another |
6167 | # remove .exe since cygwin /usr/bin/install will append another |
5814 | # one anyways |
6168 | # one anyway |
5815 | case $install_prog,$host in |
6169 | case $install_prog,$host in |
5816 | */usr/bin/install*,*cygwin*) |
6170 | */usr/bin/install*,*cygwin*) |
5817 | case $file:$destfile in |
6171 | case $file:$destfile in |
5818 | *.exe:*.exe) |
6172 | *.exe:*.exe) |
5819 | # this is ok |
6173 | # this is ok |
… | |
… | |
5909 | fi |
6263 | fi |
5910 | |
6264 | |
5911 | # Exit here if they wanted silent mode. |
6265 | # Exit here if they wanted silent mode. |
5912 | test "$show" = : && exit $EXIT_SUCCESS |
6266 | test "$show" = : && exit $EXIT_SUCCESS |
5913 | |
6267 | |
|
|
6268 | $echo "X----------------------------------------------------------------------" | $Xsed |
|
|
6269 | $echo "Libraries have been installed in:" |
|
|
6270 | for libdir in $libdirs; do |
|
|
6271 | $echo " $libdir" |
|
|
6272 | done |
|
|
6273 | $echo |
|
|
6274 | $echo "If you ever happen to want to link against installed libraries" |
|
|
6275 | $echo "in a given directory, LIBDIR, you must either use libtool, and" |
|
|
6276 | $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" |
|
|
6277 | $echo "flag during linking and do at least one of the following:" |
|
|
6278 | if test -n "$shlibpath_var"; then |
|
|
6279 | $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" |
|
|
6280 | $echo " during execution" |
|
|
6281 | fi |
|
|
6282 | if test -n "$runpath_var"; then |
|
|
6283 | $echo " - add LIBDIR to the \`$runpath_var' environment variable" |
|
|
6284 | $echo " during linking" |
|
|
6285 | fi |
|
|
6286 | if test -n "$hardcode_libdir_flag_spec"; then |
|
|
6287 | libdir=LIBDIR |
|
|
6288 | eval flag=\"$hardcode_libdir_flag_spec\" |
|
|
6289 | |
|
|
6290 | $echo " - use the \`$flag' linker flag" |
|
|
6291 | fi |
|
|
6292 | if test -n "$admincmds"; then |
|
|
6293 | $echo " - have your system administrator run these commands:$admincmds" |
|
|
6294 | fi |
|
|
6295 | if test -f /etc/ld.so.conf; then |
|
|
6296 | $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" |
|
|
6297 | fi |
|
|
6298 | $echo |
|
|
6299 | $echo "See any operating system documentation about shared libraries for" |
|
|
6300 | $echo "more information, such as the ld(1) and ld.so(8) manual pages." |
|
|
6301 | $echo "X----------------------------------------------------------------------" | $Xsed |
5914 | exit $EXIT_SUCCESS |
6302 | exit $EXIT_SUCCESS |
5915 | ;; |
6303 | ;; |
5916 | |
6304 | |
5917 | # libtool execute mode |
6305 | # libtool execute mode |
5918 | execute) |
6306 | execute) |
… | |
… | |
6125 | # Delete the libtool libraries and symlinks. |
6513 | # Delete the libtool libraries and symlinks. |
6126 | for n in $library_names; do |
6514 | for n in $library_names; do |
6127 | rmfiles="$rmfiles $objdir/$n" |
6515 | rmfiles="$rmfiles $objdir/$n" |
6128 | done |
6516 | done |
6129 | test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" |
6517 | test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" |
|
|
6518 | |
|
|
6519 | case "$mode" in |
|
|
6520 | clean) |
|
|
6521 | case " $library_names " in |
|
|
6522 | # " " in the beginning catches empty $dlname |
|
|
6523 | *" $dlname "*) ;; |
|
|
6524 | *) rmfiles="$rmfiles $objdir/$dlname" ;; |
|
|
6525 | esac |
6130 | test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" |
6526 | test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" |
6131 | |
6527 | ;; |
6132 | if test "$mode" = uninstall; then |
6528 | uninstall) |
6133 | if test -n "$library_names"; then |
6529 | if test -n "$library_names"; then |
6134 | # Do each command in the postuninstall commands. |
6530 | # Do each command in the postuninstall commands. |
6135 | cmds=$postuninstall_cmds |
6531 | cmds=$postuninstall_cmds |
6136 | save_ifs="$IFS"; IFS='~' |
6532 | save_ifs="$IFS"; IFS='~' |
6137 | for cmd in $cmds; do |
6533 | for cmd in $cmds; do |
… | |
… | |
6160 | fi |
6556 | fi |
6161 | done |
6557 | done |
6162 | IFS="$save_ifs" |
6558 | IFS="$save_ifs" |
6163 | fi |
6559 | fi |
6164 | # FIXME: should reinstall the best remaining shared library. |
6560 | # FIXME: should reinstall the best remaining shared library. |
6165 | fi |
6561 | ;; |
|
|
6562 | esac |
6166 | fi |
6563 | fi |
6167 | ;; |
6564 | ;; |
6168 | |
6565 | |
6169 | *.lo) |
6566 | *.lo) |
6170 | # Possibly a libtool object, so verify it. |
6567 | # Possibly a libtool object, so verify it. |
… | |
… | |
6459 | # time on that platform, so we default to a shared-only configuration. |
6856 | # time on that platform, so we default to a shared-only configuration. |
6460 | # If a disable-shared tag is given, we'll fallback to a static-only |
6857 | # If a disable-shared tag is given, we'll fallback to a static-only |
6461 | # configuration. But we'll never go from static-only to shared-only. |
6858 | # configuration. But we'll never go from static-only to shared-only. |
6462 | |
6859 | |
6463 | # ### BEGIN LIBTOOL TAG CONFIG: disable-shared |
6860 | # ### BEGIN LIBTOOL TAG CONFIG: disable-shared |
6464 | build_libtool_libs=no |
6861 | disable_libs=shared |
6465 | build_old_libs=yes |
|
|
6466 | # ### END LIBTOOL TAG CONFIG: disable-shared |
6862 | # ### END LIBTOOL TAG CONFIG: disable-shared |
6467 | |
6863 | |
6468 | # ### BEGIN LIBTOOL TAG CONFIG: disable-static |
6864 | # ### BEGIN LIBTOOL TAG CONFIG: disable-static |
6469 | build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` |
6865 | disable_libs=static |
6470 | # ### END LIBTOOL TAG CONFIG: disable-static |
6866 | # ### END LIBTOOL TAG CONFIG: disable-static |
6471 | |
6867 | |
6472 | # Local Variables: |
6868 | # Local Variables: |
6473 | # mode:shell-script |
6869 | # mode:shell-script |
6474 | # sh-indentation:2 |
6870 | # sh-indentation:2 |