Deleted Added
full compact
ltmain.sh (173144) ltmain.sh (191273)
1# ltmain.sh - Provide generalized library-building support services.
2# NOTE: Changing this file will not affect anything until you rerun configure.
3#
4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
1# ltmain.sh - Provide generalized library-building support services.
2# NOTE: Changing this file will not affect anything until you rerun configure.
3#
4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5# 2007 Free Software Foundation, Inc.
5# 2007, 2008 Free Software Foundation, Inc.
6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful, but

--- 24 unchanged lines hidden (view full) ---

38modename="$progname"
39
40# Global variables:
41EXIT_SUCCESS=0
42EXIT_FAILURE=1
43
44PROGRAM=ltmain.sh
45PACKAGE=libtool
6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful, but

--- 24 unchanged lines hidden (view full) ---

38modename="$progname"
39
40# Global variables:
41EXIT_SUCCESS=0
42EXIT_FAILURE=1
43
44PROGRAM=ltmain.sh
45PACKAGE=libtool
46VERSION=1.5.24
47TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)"
46VERSION=1.5.26
47TIMESTAMP=" (1.1220.2.492 2008/01/30 06:40:56)"
48
49# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
50if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
51 emulate sh
52 NULLCMD=:
53 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
54 # is contrary to our usage. Disable this feature.
55 alias -g '${1+"$@"}'='"$@"'

--- 52 unchanged lines hidden (view full) ---

108 ;;
109esac
110
111# NLS nuisances.
112# Only set LANG and LC_ALL to C if already set.
113# These must not be set unconditionally because not all systems understand
114# e.g. LANG=C (notably SCO).
115# We save the old values to restore during execute mode.
48
49# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
50if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
51 emulate sh
52 NULLCMD=:
53 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
54 # is contrary to our usage. Disable this feature.
55 alias -g '${1+"$@"}'='"$@"'

--- 52 unchanged lines hidden (view full) ---

108 ;;
109esac
110
111# NLS nuisances.
112# Only set LANG and LC_ALL to C if already set.
113# These must not be set unconditionally because not all systems understand
114# e.g. LANG=C (notably SCO).
115# We save the old values to restore during execute mode.
116for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
116lt_env=
117for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
117do
118 eval "if test \"\${$lt_var+set}\" = set; then
119 save_$lt_var=\$$lt_var
118do
119 eval "if test \"\${$lt_var+set}\" = set; then
120 save_$lt_var=\$$lt_var
121 lt_env=\"$lt_var=\$$lt_var \$lt_env\"
120 $lt_var=C
121 export $lt_var
122 fi"
123done
124
122 $lt_var=C
123 export $lt_var
124 fi"
125done
126
127if test -n "$lt_env"; then
128 lt_env="env $lt_env"
129fi
130
125# Make sure IFS has a sensible default
126lt_nl='
127'
128IFS=" $lt_nl"
129
130if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
131 $echo "$modename: not configured to build any kind of library" 1>&2
132 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2

--- 376 unchanged lines hidden (view full) ---

509 --help)
510 show_help=yes
511 ;;
512
513 --version)
514 echo "\
515$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
516
131# Make sure IFS has a sensible default
132lt_nl='
133'
134IFS=" $lt_nl"
135
136if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
137 $echo "$modename: not configured to build any kind of library" 1>&2
138 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2

--- 376 unchanged lines hidden (view full) ---

515 --help)
516 show_help=yes
517 ;;
518
519 --version)
520 echo "\
521$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
522
517Copyright (C) 2007 Free Software Foundation, Inc.
523Copyright (C) 2008 Free Software Foundation, Inc.
518This is free software; see the source for copying conditions. There is NO
519warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
520 exit $?
521 ;;
522
523 --config)
524 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
525 # Now print the configurations for the tags.

--- 286 unchanged lines hidden (view full) ---

812 *.ii) xform=ii ;;
813 *.class) xform=class ;;
814 *.cpp) xform=cpp ;;
815 *.cxx) xform=cxx ;;
816 *.[fF][09]?) xform=[fF][09]. ;;
817 *.for) xform=for ;;
818 *.java) xform=java ;;
819 *.obj) xform=obj ;;
524This is free software; see the source for copying conditions. There is NO
525warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
526 exit $?
527 ;;
528
529 --config)
530 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
531 # Now print the configurations for the tags.

--- 286 unchanged lines hidden (view full) ---

818 *.ii) xform=ii ;;
819 *.class) xform=class ;;
820 *.cpp) xform=cpp ;;
821 *.cxx) xform=cxx ;;
822 *.[fF][09]?) xform=[fF][09]. ;;
823 *.for) xform=for ;;
824 *.java) xform=java ;;
825 *.obj) xform=obj ;;
826 *.sx) xform=sx ;;
820 esac
821
822 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
823
824 case $libobj in
825 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
826 *)
827 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2

--- 152 unchanged lines hidden (view full) ---

980 if test -z "$output_obj"; then
981 # Place PIC objects in $objdir
982 command="$command -o $lobj"
983 fi
984
985 $run $rm "$lobj" "$output_obj"
986
987 $show "$command"
827 esac
828
829 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
830
831 case $libobj in
832 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
833 *)
834 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2

--- 152 unchanged lines hidden (view full) ---

987 if test -z "$output_obj"; then
988 # Place PIC objects in $objdir
989 command="$command -o $lobj"
990 fi
991
992 $run $rm "$lobj" "$output_obj"
993
994 $show "$command"
988 if $run eval "$command"; then :
995 if $run eval $lt_env "$command"; then :
989 else
990 test -n "$output_obj" && $run $rm $removelist
991 exit $EXIT_FAILURE
992 fi
993
994 if test "$need_locks" = warn &&
995 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
996 $echo "\

--- 55 unchanged lines hidden (view full) ---

1052 if test "$compiler_c_o" = yes; then
1053 command="$command -o $obj"
1054 fi
1055
1056 # Suppress compiler output if we already did a PIC compilation.
1057 command="$command$suppress_output"
1058 $run $rm "$obj" "$output_obj"
1059 $show "$command"
996 else
997 test -n "$output_obj" && $run $rm $removelist
998 exit $EXIT_FAILURE
999 fi
1000
1001 if test "$need_locks" = warn &&
1002 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1003 $echo "\

--- 55 unchanged lines hidden (view full) ---

1059 if test "$compiler_c_o" = yes; then
1060 command="$command -o $obj"
1061 fi
1062
1063 # Suppress compiler output if we already did a PIC compilation.
1064 command="$command$suppress_output"
1065 $run $rm "$obj" "$output_obj"
1066 $show "$command"
1060 if $run eval "$command"; then :
1067 if $run eval $lt_env "$command"; then :
1061 else
1062 $run $rm $removelist
1063 exit $EXIT_FAILURE
1064 fi
1065
1066 if test "$need_locks" = warn &&
1067 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1068 $echo "\

--- 116 unchanged lines hidden (view full) ---

1185 release=
1186 rpath=
1187 xrpath=
1188 perm_rpath=
1189 temp_rpath=
1190 thread_safe=no
1191 vinfo=
1192 vinfo_number=no
1068 else
1069 $run $rm $removelist
1070 exit $EXIT_FAILURE
1071 fi
1072
1073 if test "$need_locks" = warn &&
1074 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1075 $echo "\

--- 116 unchanged lines hidden (view full) ---

1192 release=
1193 rpath=
1194 xrpath=
1195 perm_rpath=
1196 temp_rpath=
1197 thread_safe=no
1198 vinfo=
1199 vinfo_number=no
1200 single_module="${wl}-single_module"
1193
1194 func_infer_tag $base_compile
1195
1196 # We need to know -static, to get the right output filenames.
1197 for arg
1198 do
1199 case $arg in
1200 -all-static | -static | -static-libtool-libs)

--- 470 unchanged lines hidden (view full) ---

1671 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1672 compiler_flags="$compiler_flags $arg"
1673 compile_command="$compile_command $arg"
1674 finalize_command="$finalize_command $arg"
1675 deplibs="$deplibs $arg"
1676 continue
1677 ;;
1678
1201
1202 func_infer_tag $base_compile
1203
1204 # We need to know -static, to get the right output filenames.
1205 for arg
1206 do
1207 case $arg in
1208 -all-static | -static | -static-libtool-libs)

--- 470 unchanged lines hidden (view full) ---

1679 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1680 compiler_flags="$compiler_flags $arg"
1681 compile_command="$compile_command $arg"
1682 finalize_command="$finalize_command $arg"
1683 deplibs="$deplibs $arg"
1684 continue
1685 ;;
1686
1687 -multi_module)
1688 single_module="${wl}-multi_module"
1689 continue
1690 ;;
1691
1679 -module)
1680 module=yes
1681 continue
1682 ;;
1683
1684 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1685 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1686 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler

--- 510 unchanged lines hidden (view full) ---

2197 continue
2198 ;;
2199 -l*)
2200 if test "$linkmode" != lib && test "$linkmode" != prog; then
2201 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2202 continue
2203 fi
2204 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1692 -module)
1693 module=yes
1694 continue
1695 ;;
1696
1697 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1698 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1699 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler

--- 510 unchanged lines hidden (view full) ---

2210 continue
2211 ;;
2212 -l*)
2213 if test "$linkmode" != lib && test "$linkmode" != prog; then
2214 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2215 continue
2216 fi
2217 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2205 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2218 if test "$linkmode" = lib; then
2219 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
2220 else
2221 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
2222 fi
2223 for searchdir in $searchdirs; do
2206 for search_ext in .la $std_shrext .so .a; do
2207 # Search the libtool library
2208 lib="$searchdir/lib${name}${search_ext}"
2209 if test -f "$lib"; then
2210 if test "$search_ext" = ".la"; then
2211 found=yes
2212 else
2213 found=no

--- 779 unchanged lines hidden (view full) ---

2993 path="$absdir"
2994 fi
2995 depdepl=
2996 case $host in
2997 *-*-darwin*)
2998 # we do not want to link against static libs,
2999 # but need to link against shared
3000 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2224 for search_ext in .la $std_shrext .so .a; do
2225 # Search the libtool library
2226 lib="$searchdir/lib${name}${search_ext}"
2227 if test -f "$lib"; then
2228 if test "$search_ext" = ".la"; then
2229 found=yes
2230 else
2231 found=no

--- 779 unchanged lines hidden (view full) ---

3011 path="$absdir"
3012 fi
3013 depdepl=
3014 case $host in
3015 *-*-darwin*)
3016 # we do not want to link against static libs,
3017 # but need to link against shared
3018 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3019 eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3001 if test -n "$deplibrary_names" ; then
3002 for tmp in $deplibrary_names ; do
3003 depdepl=$tmp
3004 done
3020 if test -n "$deplibrary_names" ; then
3021 for tmp in $deplibrary_names ; do
3022 depdepl=$tmp
3023 done
3005 if test -f "$path/$depdepl" ; then
3024 if test -f "$deplibdir/$depdepl" ; then
3025 depdepl="$deplibdir/$depdepl"
3026 elif test -f "$path/$depdepl" ; then
3006 depdepl="$path/$depdepl"
3027 depdepl="$path/$depdepl"
3028 else
3029 # Can't find it, oh well...
3030 depdepl=
3007 fi
3008 # do not add paths which are already there
3009 case " $newlib_search_path " in
3010 *" $path "*) ;;
3011 *) newlib_search_path="$newlib_search_path $path";;
3012 esac
3013 fi
3014 path=""

--- 131 unchanged lines hidden (view full) ---

3146 done # for pass
3147 if test "$linkmode" = prog; then
3148 dlfiles="$newdlfiles"
3149 dlprefiles="$newdlprefiles"
3150 fi
3151
3152 case $linkmode in
3153 oldlib)
3031 fi
3032 # do not add paths which are already there
3033 case " $newlib_search_path " in
3034 *" $path "*) ;;
3035 *) newlib_search_path="$newlib_search_path $path";;
3036 esac
3037 fi
3038 path=""

--- 131 unchanged lines hidden (view full) ---

3170 done # for pass
3171 if test "$linkmode" = prog; then
3172 dlfiles="$newdlfiles"
3173 dlprefiles="$newdlprefiles"
3174 fi
3175
3176 case $linkmode in
3177 oldlib)
3154 if test -n "$deplibs"; then
3155 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3156 fi
3178 case " $deplibs" in
3179 *\ -l* | *\ -L*)
3180 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
3181 esac
3157
3158 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3159 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3160 fi
3161
3162 if test -n "$rpath"; then
3163 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3164 fi

--- 1120 unchanged lines hidden (view full) ---

4285 if test "$module" = yes || test "$export_dynamic" = yes; then
4286 # On all known operating systems, these are identical.
4287 dlname="$soname"
4288 fi
4289 fi
4290 ;;
4291
4292 obj)
3182
3183 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3184 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3185 fi
3186
3187 if test -n "$rpath"; then
3188 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3189 fi

--- 1120 unchanged lines hidden (view full) ---

4310 if test "$module" = yes || test "$export_dynamic" = yes; then
4311 # On all known operating systems, these are identical.
4312 dlname="$soname"
4313 fi
4314 fi
4315 ;;
4316
4317 obj)
4293 if test -n "$deplibs"; then
4294 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4295 fi
4318 case " $deplibs" in
4319 *\ -l* | *\ -L*)
4320 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
4321 esac
4296
4297 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4298 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4299 fi
4300
4301 if test -n "$rpath"; then
4302 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4303 fi

--- 2225 unchanged lines hidden (view full) ---

6529
6530 if test -z "$run"; then
6531 if test -n "$shlibpath_var"; then
6532 # Export the shlibpath_var.
6533 eval "export $shlibpath_var"
6534 fi
6535
6536 # Restore saved environment variables
4322
4323 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4324 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4325 fi
4326
4327 if test -n "$rpath"; then
4328 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4329 fi

--- 2225 unchanged lines hidden (view full) ---

6555
6556 if test -z "$run"; then
6557 if test -n "$shlibpath_var"; then
6558 # Export the shlibpath_var.
6559 eval "export $shlibpath_var"
6560 fi
6561
6562 # Restore saved environment variables
6537 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6563 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6538 do
6539 eval "if test \"\${save_$lt_var+set}\" = set; then
6540 $lt_var=\$save_$lt_var; export $lt_var
6541 fi"
6542 done
6543
6544 # Now prepare to actually exec the command.
6545 exec_cmd="\$cmd$args"

--- 441 unchanged lines hidden ---
6564 do
6565 eval "if test \"\${save_$lt_var+set}\" = set; then
6566 $lt_var=\$save_$lt_var; export $lt_var
6567 fi"
6568 done
6569
6570 # Now prepare to actually exec the command.
6571 exec_cmd="\$cmd$args"

--- 441 unchanged lines hidden ---