1 |
|
# -*- buffer-read-only: t -*- vi: set ro: |
2 |
|
# |
3 |
|
# DO NOT EDIT THIS FILE (ltmain.in) |
4 |
|
# |
5 |
|
# It has been AutoGen-ed Sunday May 13, 2001 at 08:35:45 AM PDT |
6 |
|
# From the definitions ltstr.def |
7 |
|
# and the template file ltmain.tpl |
8 |
|
# |
9 |
# ltmain.sh - Provide generalized library-building support services. |
# ltmain.sh - Provide generalized library-building support services. |
10 |
# NOTE: Changing this file will not affect anything until you rerun ltconfig. |
# NOTE: Changing this file will not affect anything until you rerun ltconfig. |
11 |
# |
# |
12 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 |
13 |
# Free Software Foundation, Inc. |
# Free Software Foundation, Inc. |
14 |
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
15 |
|
# Massively rewritten by Bruce Korb <bkorb@gnu.org> |
16 |
# |
# |
17 |
# This program is free software; you can redistribute it and/or modify |
# This program is free software; you can redistribute it and/or modify |
18 |
# it under the terms of the GNU General Public License as published by |
# it under the terms of the GNU General Public License as published by |
69 |
|
|
70 |
default_mode= |
default_mode= |
71 |
help="Try \`$progname --help' for more information." |
help="Try \`$progname --help' for more information." |
72 |
|
|
73 |
|
# Global variables. |
74 |
|
lo2o="s/\\.lo\$/.${objext}/" |
75 |
|
o2lo="s/\\.${objext}\$/.lo/" |
76 |
magic="%%%MAGIC variable%%%" |
magic="%%%MAGIC variable%%%" |
77 |
mkdir="mkdir" |
mkdir="mkdir" |
78 |
mv="mv -f" |
mv="mv -f" |
118 |
show="$echo" |
show="$echo" |
119 |
show_help= |
show_help= |
120 |
execute_dlfiles= |
execute_dlfiles= |
|
lo2o="s/\\.lo\$/.${objext}/" |
|
|
o2lo="s/\\.${objext}\$/.lo/" |
|
121 |
|
|
122 |
# Parse our command line options once, thoroughly. |
# Parse our command line options once, thoroughly. |
123 |
while test $# -gt 0 |
while test $# -gt 0 |
1772 |
case $linkmode in |
case $linkmode in |
1773 |
lib) |
lib) |
1774 |
if test "$deplibs_check_method" != pass_all; then |
if test "$deplibs_check_method" != pass_all; then |
1775 |
echo |
cat 1>&2 <<_EOF_ |
1776 |
echo "*** Warning: This library needs some functionality provided by $deplib." |
*** Warning: This library needs some functionality provided by $deplib. |
1777 |
echo "*** I have the capability to make that library automatically link in when" |
*** I can automatically link to that library when you link |
1778 |
echo "*** you link to this library. But I can only do this if you have a" |
*** to this library, but I can only do this if you have a shared |
1779 |
echo "*** shared version of the library, which you do not appear to have." |
*** version of $deplib. You do not appear to have one. |
1780 |
|
_EOF_ |
1781 |
else |
else |
1782 |
echo |
echo |
1783 |
echo "*** Warning: Linking the shared library $output against the" |
echo "*** Warning: Linking the shared library $output against the" |
2238 |
|
|
2239 |
# Just print a warning and add the library to dependency_libs so |
# Just print a warning and add the library to dependency_libs so |
2240 |
# that the program can be linked against the static library. |
# that the program can be linked against the static library. |
2241 |
echo |
cat 1>&2 <<_EOF_ |
2242 |
echo "*** Warning: This library needs some functionality provided by $lib." |
*** Warning: This library needs some functionality provided by $lib. |
2243 |
echo "*** I have the capability to make that library automatically link in when" |
*** I can automatically link to that library when you link |
2244 |
echo "*** you link to this library. But I can only do this if you have a" |
*** to this library, but I can only do this if you have a shared |
2245 |
echo "*** shared version of the library, which you do not appear to have." |
*** version of $lib. You do not appear to have one. |
2246 |
|
_EOF_ |
2247 |
if test "$module" = yes; then |
if test "$module" = yes; then |
2248 |
echo "*** Therefore, libtool will create a static module, that should work " |
echo "*** Therefore, libtool will create a static module, that should work " |
2249 |
echo "*** as long as the dlopening application is linked with the -dlopen flag." |
echo "*** as long as the dlopening application is linked with the -dlopen flag." |
2819 |
newdeplibs="$newdeplibs $i" |
newdeplibs="$newdeplibs $i" |
2820 |
else |
else |
2821 |
droppeddeps=yes |
droppeddeps=yes |
2822 |
echo |
cat 1>&2 <<_EOF_ |
2823 |
echo "*** Warning: This library needs some functionality provided by $i." |
*** Warning: This library needs some functionality provided by $i. |
2824 |
echo "*** I have the capability to make that library automatically link in when" |
*** I can automatically link to that library when you link |
2825 |
echo "*** you link to this library. But I can only do this if you have a" |
*** to this library, but I can only do this if you have a shared |
2826 |
echo "*** shared version of the library, which you do not appear to have." |
*** version of $i. You do not appear to have one. |
2827 |
|
_EOF_ |
2828 |
fi |
fi |
2829 |
else |
else |
2830 |
newdeplibs="$newdeplibs $i" |
newdeplibs="$newdeplibs $i" |
2850 |
newdeplibs="$newdeplibs $i" |
newdeplibs="$newdeplibs $i" |
2851 |
else |
else |
2852 |
droppeddeps=yes |
droppeddeps=yes |
2853 |
echo |
cat 1>&2 <<_EOF_ |
2854 |
echo "*** Warning: This library needs some functionality provided by $i." |
*** Warning: This library needs some functionality provided by $i. |
2855 |
echo "*** I have the capability to make that library automatically link in when" |
*** I can automatically link to that library when you link |
2856 |
echo "*** you link to this library. But I can only do this if you have a" |
*** to this library, but I can only do this if you have a shared |
2857 |
echo "*** shared version of the library, which you do not appear to have." |
*** version of $i. You do not appear to have one. |
2858 |
|
_EOF_ |
2859 |
fi |
fi |
2860 |
else |
else |
2861 |
droppeddeps=yes |
droppeddeps=yes |
2911 |
done |
done |
2912 |
if test -n "$a_deplib" ; then |
if test -n "$a_deplib" ; then |
2913 |
droppeddeps=yes |
droppeddeps=yes |
2914 |
echo |
cat 1>&2 <<_EOF_ |
2915 |
echo "*** Warning: This library needs some functionality provided by $a_deplib." |
*** Warning: This library needs some functionality provided by $a_deplib. |
2916 |
echo "*** I have the capability to make that library automatically link in when" |
*** I can automatically link to that library when you link |
2917 |
echo "*** you link to this library. But I can only do this if you have a" |
*** to this library, but I can only do this if you have a shared |
2918 |
echo "*** shared version of the library, which you do not appear to have." |
*** version of $a_deplib. You do not appear to have one. |
2919 |
|
_EOF_ |
2920 |
fi |
fi |
2921 |
else |
else |
2922 |
# Add a -L argument. |
# Add a -L argument. |
2946 |
done |
done |
2947 |
if test -n "$a_deplib" ; then |
if test -n "$a_deplib" ; then |
2948 |
droppeddeps=yes |
droppeddeps=yes |
2949 |
echo |
cat 1>&2 <<_EOF_ |
2950 |
echo "*** Warning: This library needs some functionality provided by $a_deplib." |
*** Warning: This library needs some functionality provided by $a_deplib. |
2951 |
echo "*** I have the capability to make that library automatically link in when" |
*** I can automatically link to that library when you link |
2952 |
echo "*** you link to this library. But I can only do this if you have a" |
*** to this library, but I can only do this if you have a shared |
2953 |
echo "*** shared version of the library, which you do not appear to have." |
*** version of $a_deplib. You do not appear to have one. |
2954 |
|
_EOF_ |
2955 |
fi |
fi |
2956 |
else |
else |
2957 |
# Add a -L argument. |
# Add a -L argument. |
4945 |
|
|
4946 |
# The first argument is the command name. |
# The first argument is the command name. |
4947 |
cmd="$nonopt" |
cmd="$nonopt" |
4948 |
if test -z "$cmd"; then |
if (test -z "$cmd") > /dev/null 2>&1 ; then |
4949 |
$echo "$modename: you must specify a COMMAND" 1>&2 |
$echo "$modename: you must specify a COMMAND" 1>&2 |
4950 |
$echo "$help" |
$echo "$help" 1>&2 |
4951 |
exit 1 |
exit 1 |
4952 |
fi |
fi |
|
|
|
4953 |
# Handle -dlopen flags immediately. |
# Handle -dlopen flags immediately. |
4954 |
for file in $execute_dlfiles; do |
for file in $execute_dlfiles; do |
4955 |
if test ! -f "$file"; then |
if (test ! -f "$file") > /dev/null 2>&1 ; then |
4956 |
$echo "$modename: \`$file' is not a file" 1>&2 |
$echo "$modename: \`$file' is not a file" 1>&2 |
4957 |
$echo "$help" 1>&2 |
$echo "$help" 1>&2 |
4958 |
exit 1 |
exit 1 |
4959 |
fi |
fi |
4960 |
|
|
4961 |
dir= |
dir= |
4962 |
case $file in |
case $file in |
4963 |
*.la) |
*.la) |
4964 |
# Check to see that this really is a libtool archive. |
# Check to see that this really is a libtool archive. |
4965 |
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : |
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") > /dev/null 2>&1 ; then : |
4966 |
else |
else |
4967 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 |
4968 |
$echo "$help" 1>&2 |
$echo "$help" 1>&2 |
4969 |
exit 1 |
exit 1 |
4970 |
fi |
fi |
4971 |
|
|
4972 |
# Read the libtool library. |
# Read the libtool library. |
4973 |
dlname= |
dlname= |
4989 |
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` |
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` |
4990 |
test "X$dir" = "X$file" && dir=. |
test "X$dir" = "X$file" && dir=. |
4991 |
|
|
4992 |
if test -f "$dir/$objdir/$dlname"; then |
if (test -f "$dir/$objdir/$dlname") > /dev/null 2>&1 ; then : |
4993 |
dir="$dir/$objdir" |
else |
4994 |
else |
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 |
4995 |
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 |
$echo "$help" 1>&2 |
4996 |
exit 1 |
exit 1 |
4997 |
fi |
fi |
4998 |
|
dir="$dir/$objdir" |
4999 |
;; |
;; |
5000 |
|
|
5001 |
*.lo) |
*.lo) |
5237 |
$run rmdir $dir >/dev/null 2>&1 |
$run rmdir $dir >/dev/null 2>&1 |
5238 |
fi |
fi |
5239 |
done |
done |
|
|
|
5240 |
exit $exit_status |
exit $exit_status |
5241 |
;; |
;; |
5242 |
|
|