Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 62277 | Differences between
and this patch

Collapse All | Expand All

(-)ltmain.sh.orig (-211 / +103 lines)
Lines 49-62 Link Here
49
fi
49
fi
50
50
51
# The name of this program.
51
# The name of this program.
52
progname=`$echo "$0" | ${SED} 's%^.*/%%'`
52
progname=`$echo "$0" | sed 's%^.*/%%'`
53
modename="$progname"
53
modename="$progname"
54
54
55
# Constants.
55
# Constants.
56
PROGRAM=ltmain.sh
56
PROGRAM=ltmain.sh
57
PACKAGE=libtool
57
PACKAGE=libtool
58
VERSION=1.4.3
58
VERSION=1.4.2
59
TIMESTAMP=" (1.922.2.111 2002/10/23 02:54:36)"
59
TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
60
60
61
default_mode=
61
default_mode=
62
help="Try \`$progname --help' for more information."
62
help="Try \`$progname --help' for more information."
Lines 67-85 Link Here
67
67
68
# Sed substitution that helps us do robust quoting.  It backslashifies
68
# Sed substitution that helps us do robust quoting.  It backslashifies
69
# metacharacters that are still active within double-quoted strings.
69
# metacharacters that are still active within double-quoted strings.
70
Xsed="${SED}"' -e 1s/^X//'
70
Xsed='sed -e 1s/^X//'
71
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
71
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
72
# test EBCDIC or ASCII                                                         
72
SP2NL='tr \040 \012'
73
case `echo A|od -x` in                                                         
73
NL2SP='tr \015\012 \040\040'
74
 *[Cc]1*) # EBCDIC based system                                                
75
  SP2NL="tr '\100' '\n'"                                                       
76
  NL2SP="tr '\r\n' '\100\100'"                                                 
77
  ;;                                                                           
78
 *) # Assume ASCII based system                                                
79
  SP2NL="tr '\040' '\012'"                                                     
80
  NL2SP="tr '\015\012' '\040\040'"                                             
81
  ;;                                                                           
82
esac                                                                           
83
74
84
# NLS nuisances.
75
# NLS nuisances.
85
# Only set LANG and LC_ALL to C if already set.
76
# Only set LANG and LC_ALL to C if already set.
Lines 153-159 Link Here
153
    ;;
144
    ;;
154
145
155
  --config)
146
  --config)
156
    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
147
    sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
157
    exit 0
148
    exit 0
158
    ;;
149
    ;;
159
150
Lines 186-193 Link Here
186
  --mode) prevopt="--mode" prev=mode ;;
177
  --mode) prevopt="--mode" prev=mode ;;
187
  --mode=*) mode="$optarg" ;;
178
  --mode=*) mode="$optarg" ;;
188
179
189
  --preserve-dup-deps) duplicate_deps="yes" ;;
190
191
  --quiet | --silent)
180
  --quiet | --silent)
192
    show=:
181
    show=:
193
    ;;
182
    ;;
Lines 226-232 Link Here
226
  # Infer the operation mode.
215
  # Infer the operation mode.
227
  if test -z "$mode"; then
216
  if test -z "$mode"; then
228
    case $nonopt in
217
    case $nonopt in
229
    *cc | *++ | gcc* | *-gcc* | g++* | xlc*)
218
    *cc | *++ | gcc* | *-gcc*)
230
      mode=link
219
      mode=link
231
      for arg
220
      for arg
232
      do
221
      do
Lines 478-484 Link Here
478
      pic_mode=default
467
      pic_mode=default
479
      ;;
468
      ;;
480
    esac
469
    esac
481
    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
470
    if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
482
      # non-PIC code in shared libraries is not supported
471
      # non-PIC code in shared libraries is not supported
483
      pic_mode=default
472
      pic_mode=default
484
    fi
473
    fi
Lines 768-774 Link Here
768
    linker_flags=
757
    linker_flags=
769
    dllsearchpath=
758
    dllsearchpath=
770
    lib_search_path=`pwd`
759
    lib_search_path=`pwd`
771
    inst_prefix_dir=
772
760
773
    avoid_version=no
761
    avoid_version=no
774
    dlfiles=
762
    dlfiles=
Lines 899-909 Link Here
899
	  prev=
887
	  prev=
900
	  continue
888
	  continue
901
	  ;;
889
	  ;;
902
	inst_prefix)
903
	  inst_prefix_dir="$arg"
904
	  prev=
905
	  continue
906
	  ;;
907
	release)
890
	release)
908
	  release="-$arg"
891
	  release="-$arg"
909
	  prev=
892
	  prev=
Lines 1005-1020 Link Here
1005
	continue
988
	continue
1006
	;;
989
	;;
1007
990
1008
      -inst-prefix-dir)
1009
       prev=inst_prefix
1010
       continue
1011
       ;;
1012
1013
      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
991
      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1014
      # so, if we see these flags be careful not to treat them like -L
992
      # so, if we see these flags be careful not to treat them like -L
1015
      -L[A-Z][A-Z]*:*)
993
      -L[A-Z][A-Z]*:*)
1016
	case $with_gcc/$host in
994
	case $with_gcc/$host in
1017
	no/*-*-irix* | no/*-*-nonstopux*)
995
	no/*-*-irix*)
1018
	  compile_command="$compile_command $arg"
996
	  compile_command="$compile_command $arg"
1019
	  finalize_command="$finalize_command $arg"
997
	  finalize_command="$finalize_command $arg"
1020
	  ;;
998
	  ;;
Lines 1065-1078 Link Here
1065
	    # These systems don't actually have a C library (as such)
1043
	    # These systems don't actually have a C library (as such)
1066
	    test "X$arg" = "X-lc" && continue
1044
	    test "X$arg" = "X-lc" && continue
1067
	    ;;
1045
	    ;;
1068
	  *-*-openbsd* | *-*-freebsd*)
1046
	  *-*-openbsd*)
1069
	    # Do not include libc due to us having libc/libc_r.
1047
	    # Do not include libc due to us having libc/libc_r.
1070
	    test "X$arg" = "X-lc" && continue
1048
	    test "X$arg" = "X-lc" && continue
1071
	    ;;
1049
	    ;;
1072
	  esac
1050
	  esac
1073
	 elif test "X$arg" = "X-lc_r"; then
1051
	 elif test "X$arg" = "X-lc_r"; then
1074
	  case $host in
1052
	  case $host in
1075
	 *-*-openbsd* | *-*-freebsd*)
1053
	  *-*-openbsd*)
1076
	    # Do not include libc_r directly, use -pthread flag.
1054
	    # Do not include libc_r directly, use -pthread flag.
1077
	    continue
1055
	    continue
1078
	    ;;
1056
	    ;;
Lines 1352-1362 Link Here
1352
    # Find all interdependent deplibs by searching for libraries
1330
    # Find all interdependent deplibs by searching for libraries
1353
    # that are linked more than once (e.g. -la -lb -la)
1331
    # that are linked more than once (e.g. -la -lb -la)
1354
    for deplib in $deplibs; do
1332
    for deplib in $deplibs; do
1355
      if test "X$duplicate_deps" = "Xyes" ; then
1333
      case "$libs " in
1356
	case "$libs " in
1334
      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1357
	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1335
      esac
1358
	esac
1359
      fi
1360
      libs="$libs $deplib"
1336
      libs="$libs $deplib"
1361
    done
1337
    done
1362
    deplibs=
1338
    deplibs=
Lines 1485-1496 Link Here
1485
	  lib)
1461
	  lib)
1486
	    if test "$deplibs_check_method" != pass_all; then
1462
	    if test "$deplibs_check_method" != pass_all; then
1487
	      echo
1463
	      echo
1488
	      echo "*** Warning: Trying to link with static lib archive $deplib."
1464
	      echo "*** Warning: This library needs some functionality provided by $deplib."
1489
	      echo "*** I have the capability to make that library automatically link in when"
1465
	      echo "*** I have the capability to make that library automatically link in when"
1490
	      echo "*** you link to this library.  But I can only do this if you have a"
1466
	      echo "*** you link to this library.  But I can only do this if you have a"
1491
	      echo "*** shared version of the library, which you do not appear to have"
1467
	      echo "*** shared version of the library, which you do not appear to have."
1492
	      echo "*** because the file extensions .$libext of this argument makes me believe"
1493
	      echo "*** that it is just a static archive that I should not used here."
1494
	    else
1468
	    else
1495
	      echo
1469
	      echo
1496
	      echo "*** Warning: Linking the shared library $output against the"
1470
	      echo "*** Warning: Linking the shared library $output against the"
Lines 1534-1540 Link Here
1534
	fi
1508
	fi
1535
1509
1536
	# Check to see that this really is a libtool archive.
1510
	# Check to see that this really is a libtool archive.
1537
	if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1511
	if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1538
	else
1512
	else
1539
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1513
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1540
	  exit 1
1514
	  exit 1
Lines 1581-1591 Link Here
1581
	    tmp_libs=
1555
	    tmp_libs=
1582
	    for deplib in $dependency_libs; do
1556
	    for deplib in $dependency_libs; do
1583
	      deplibs="$deplib $deplibs"
1557
	      deplibs="$deplib $deplibs"
1584
              if test "X$duplicate_deps" = "Xyes" ; then
1558
	      case "$tmp_libs " in
1585
	        case "$tmp_libs " in
1559
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1586
	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1560
	      esac
1587
	        esac
1588
              fi
1589
	      tmp_libs="$tmp_libs $deplib"
1561
	      tmp_libs="$tmp_libs $deplib"
1590
	    done
1562
	    done
1591
	  elif test $linkmode != prog && test $linkmode != lib; then
1563
	  elif test $linkmode != prog && test $linkmode != lib; then
Lines 1708-1718 Link Here
1708
	      # or/and link against static libraries
1680
	      # or/and link against static libraries
1709
	      newdependency_libs="$deplib $newdependency_libs"
1681
	      newdependency_libs="$deplib $newdependency_libs"
1710
	    fi
1682
	    fi
1711
	    if test "X$duplicate_deps" = "Xyes" ; then
1683
	    case "$tmp_libs " in
1712
	      case "$tmp_libs " in
1684
	    *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1713
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1685
	    esac
1714
	      esac
1715
	    fi
1716
	    tmp_libs="$tmp_libs $deplib"
1686
	    tmp_libs="$tmp_libs $deplib"
1717
	  done # for deplib
1687
	  done # for deplib
1718
	  continue
1688
	  continue
Lines 1796-1803 Link Here
1796
1766
1797
	    # Make a new name for the extract_expsyms_cmds to use
1767
	    # Make a new name for the extract_expsyms_cmds to use
1798
	    soroot="$soname"
1768
	    soroot="$soname"
1799
	    soname=`echo $soroot | ${SED} -e 's/^.*\///'`
1769
	    soname=`echo $soroot | sed -e 's/^.*\///'`
1800
	    newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
1770
	    newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
1801
1771
1802
	    # If the library has no export list, then create one now
1772
	    # If the library has no export list, then create one now
1803
	    if test -f "$output_objdir/$soname-def"; then :
1773
	    if test -f "$output_objdir/$soname-def"; then :
Lines 1857-1870 Link Here
1857
		add="$dir/$linklib"
1827
		add="$dir/$linklib"
1858
	      elif test "$hardcode_minus_L" = yes; then
1828
	      elif test "$hardcode_minus_L" = yes; then
1859
		add_dir="-L$dir"
1829
		add_dir="-L$dir"
1860
		# Try looking first in the location we're being installed to.
1861
		if test -n "$inst_prefix_dir"; then
1862
		  case "$libdir" in
1863
		  [\/]*)
1864
		    add_dir="-L$inst_prefix_dir$libdir $add_dir"
1865
		    ;;
1866
		  esac
1867
		fi
1868
		add="-l$name"
1830
		add="-l$name"
1869
	      elif test "$hardcode_shlibpath_var" = yes; then
1831
	      elif test "$hardcode_shlibpath_var" = yes; then
1870
		add_shlibpath="$dir"
1832
		add_shlibpath="$dir"
Lines 1922-1935 Link Here
1922
	      add="-l$name"
1884
	      add="-l$name"
1923
	    else
1885
	    else
1924
	      # We cannot seem to hardcode it, guess we'll fake it.
1886
	      # We cannot seem to hardcode it, guess we'll fake it.
1925
	      add_dir="-L$libdir"
1887
	      if test "X$installed" = Xyes; then
1926
	      # Try looking first in the location we're being installed to.
1888
		add_dir="-L$libdir"
1927
	      if test -n "$inst_prefix_dir"; then
1889
	      else
1928
		case "$libdir" in
1890
		add_dir="-L$DESTDIR$libdir"
1929
		[\/]*)
1930
		  add_dir="-L$inst_prefix_dir$libdir $add_dir"
1931
		  ;;
1932
		esac
1933
	      fi
1891
	      fi
1934
	      add="-l$name"
1892
	      add="-l$name"
1935
	    fi
1893
	    fi
Lines 1972-1985 Link Here
1972
	    # Just print a warning and add the library to dependency_libs so
1930
	    # Just print a warning and add the library to dependency_libs so
1973
	    # that the program can be linked against the static library.
1931
	    # that the program can be linked against the static library.
1974
	    echo
1932
	    echo
1975
	    echo "*** Warning: This system can not link to static lib archive $lib."
1933
	    echo "*** Warning: This library needs some functionality provided by $lib."
1976
	    echo "*** I have the capability to make that library automatically link in when"
1934
	    echo "*** I have the capability to make that library automatically link in when"
1977
	    echo "*** you link to this library.  But I can only do this if you have a"
1935
	    echo "*** you link to this library.  But I can only do this if you have a"
1978
	    echo "*** shared version of the library, which you do not appear to have."
1936
	    echo "*** shared version of the library, which you do not appear to have."
1979
	    if test "$module" = yes; then
1937
	    if test "$module" = yes; then
1980
	      echo "*** But as you try to build a module library, libtool will still create "
1938
	      echo "*** Therefore, libtool will create a static module, that should work "
1981
	      echo "*** a static module, that should work as long as the dlopening application"
1939
	      echo "*** as long as the dlopening application is linked with the -dlopen flag."
1982
	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
1983
	      if test -z "$global_symbol_pipe"; then
1940
	      if test -z "$global_symbol_pipe"; then
1984
		echo
1941
		echo
1985
		echo "*** However, this would only work if libtool was able to extract symbol"
1942
		echo "*** However, this would only work if libtool was able to extract symbol"
Lines 2028-2038 Link Here
2028
	  tmp_libs=
1985
	  tmp_libs=
2029
	  for deplib in $dependency_libs; do
1986
	  for deplib in $dependency_libs; do
2030
	    newdependency_libs="$deplib $newdependency_libs"
1987
	    newdependency_libs="$deplib $newdependency_libs"
2031
	    if test "X$duplicate_deps" = "Xyes" ; then
1988
	    case "$tmp_libs " in
2032
	      case "$tmp_libs " in
1989
	    *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2033
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1990
	    esac
2034
	      esac
2035
	    fi
2036
	    tmp_libs="$tmp_libs $deplib"
1991
	    tmp_libs="$tmp_libs $deplib"
2037
	  done
1992
	  done
2038
1993
Lines 2058-2064 Link Here
2058
		if grep "^installed=no" $deplib > /dev/null; then
2013
		if grep "^installed=no" $deplib > /dev/null; then
2059
		  path="-L$absdir/$objdir"
2014
		  path="-L$absdir/$objdir"
2060
		else
2015
		else
2061
		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2016
		  eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2062
		  if test -z "$libdir"; then
2017
		  if test -z "$libdir"; then
2063
		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2018
		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2064
		    exit 1
2019
		    exit 1
Lines 2322-2342 Link Here
2322
	  versuffix=".$current";
2277
	  versuffix=".$current";
2323
	  ;;
2278
	  ;;
2324
2279
2325
	irix | nonstopux)
2280
	irix)
2326
	  major=`expr $current - $age + 1`
2281
	  major=`expr $current - $age + 1`
2327
2282
	  verstring="sgi$major.$revision"
2328
	  case $version_type in
2329
	    nonstopux) verstring_prefix=nonstopux ;;
2330
	    *)         verstring_prefix=sgi ;;
2331
	  esac
2332
	  verstring="$verstring_prefix$major.$revision"
2333
2283
2334
	  # Add in all the interfaces that we are compatible with.
2284
	  # Add in all the interfaces that we are compatible with.
2335
	  loop=$revision
2285
	  loop=$revision
2336
	  while test $loop != 0; do
2286
	  while test $loop != 0; do
2337
	    iface=`expr $revision - $loop`
2287
	    iface=`expr $revision - $loop`
2338
	    loop=`expr $loop - 1`
2288
	    loop=`expr $loop - 1`
2339
	    verstring="$verstring_prefix$major.$iface:$verstring"
2289
	    verstring="sgi$major.$iface:$verstring"
2340
	  done
2290
	  done
2341
2291
2342
	  # Before this point, $major must not contain `.'.
2292
	  # Before this point, $major must not contain `.'.
Lines 2350-2356 Link Here
2350
	  ;;
2300
	  ;;
2351
2301
2352
	osf)
2302
	osf)
2353
	  major=.`expr $current - $age`
2303
	  major=`expr $current - $age`
2354
	  versuffix=".$current.$age.$revision"
2304
	  versuffix=".$current.$age.$revision"
2355
	  verstring="$current.$age.$revision"
2305
	  verstring="$current.$age.$revision"
2356
2306
Lines 2442-2450 Link Here
2442
2392
2443
      # Eliminate all temporary directories.
2393
      # Eliminate all temporary directories.
2444
      for path in $notinst_path; do
2394
      for path in $notinst_path; do
2445
	lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
2395
	lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2446
	deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
2396
	deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2447
	dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
2397
	dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
2448
      done
2398
      done
2449
2399
2450
      if test -n "$xrpath"; then
2400
      if test -n "$xrpath"; then
Lines 2495-2501 Link Here
2495
	  *-*-netbsd*)
2445
	  *-*-netbsd*)
2496
	    # Don't link with libc until the a.out ld.so is fixed.
2446
	    # Don't link with libc until the a.out ld.so is fixed.
2497
	    ;;
2447
	    ;;
2498
	  *-*-openbsd* | *-*-freebsd*)
2448
	  *-*-openbsd*)
2499
	    # Do not include libc due to us having libc/libc_r.
2449
	    # Do not include libc due to us having libc/libc_r.
2500
	    ;;
2450
	    ;;
2501
	  *)
2451
	  *)
Lines 2556-2575 Link Here
2556
		else
2506
		else
2557
		  droppeddeps=yes
2507
		  droppeddeps=yes
2558
		  echo
2508
		  echo
2559
		  echo "*** Warning: dynamic linker does not accept needed library $i."
2509
		  echo "*** Warning: This library needs some functionality provided by $i."
2560
		  echo "*** I have the capability to make that library automatically link in when"
2510
		  echo "*** I have the capability to make that library automatically link in when"
2561
		  echo "*** you link to this library.  But I can only do this if you have a"
2511
		  echo "*** you link to this library.  But I can only do this if you have a"
2562
		  echo "*** shared version of the library, which I believe you do not have"
2512
		  echo "*** shared version of the library, which you do not appear to have."
2563
		  echo "*** because a test_compile did reveal that the linker did not use it for"
2564
		  echo "*** its dynamic dependency list that programs get resolved with at runtime."
2565
		fi
2513
		fi
2566
	      else
2514
	      else
2567
		newdeplibs="$newdeplibs $i"
2515
		newdeplibs="$newdeplibs $i"
2568
	      fi
2516
	      fi
2569
	    done
2517
	    done
2570
	  else
2518
	  else
2571
	    # Error occured in the first compile.  Let's try to salvage
2519
	    # Error occured in the first compile.  Let's try to salvage the situation:
2572
	    # the situation: Compile a separate program for each library.
2520
	    # Compile a seperate program for each library.
2573
	    for i in $deplibs; do
2521
	    for i in $deplibs; do
2574
	      name="`expr $i : '-l\(.*\)'`"
2522
	      name="`expr $i : '-l\(.*\)'`"
2575
	     # If $name is empty we are operating on a -L argument.
2523
	     # If $name is empty we are operating on a -L argument.
Lines 2588-2599 Link Here
2588
		  else
2536
		  else
2589
		    droppeddeps=yes
2537
		    droppeddeps=yes
2590
		    echo
2538
		    echo
2591
		    echo "*** Warning: dynamic linker does not accept needed library $i."
2539
		    echo "*** Warning: This library needs some functionality provided by $i."
2592
		    echo "*** I have the capability to make that library automatically link in when"
2540
		    echo "*** I have the capability to make that library automatically link in when"
2593
		    echo "*** you link to this library.  But I can only do this if you have a"
2541
		    echo "*** you link to this library.  But I can only do this if you have a"
2594
		    echo "*** shared version of the library, which you do not appear to have"
2542
		    echo "*** shared version of the library, which you do not appear to have."
2595
		    echo "*** because a test_compile did reveal that the linker did not use this one"
2596
		    echo "*** as a dynamic dependency that programs can get resolved with at runtime."
2597
		  fi
2543
		  fi
2598
		else
2544
		else
2599
		  droppeddeps=yes
2545
		  droppeddeps=yes
Lines 2632-2645 Link Here
2632
		      # but so what?
2578
		      # but so what?
2633
		      potlib="$potent_lib"
2579
		      potlib="$potent_lib"
2634
		      while test -h "$potlib" 2>/dev/null; do
2580
		      while test -h "$potlib" 2>/dev/null; do
2635
			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
2581
			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
2636
			case $potliblink in
2582
			case $potliblink in
2637
			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2583
			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2638
			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2584
			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2639
			esac
2585
			esac
2640
		      done
2586
		      done
2641
		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2587
		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2642
			 | ${SED} 10q \
2588
			 | sed 10q \
2643
			 | egrep "$file_magic_regex" > /dev/null; then
2589
			 | egrep "$file_magic_regex" > /dev/null; then
2644
			newdeplibs="$newdeplibs $a_deplib"
2590
			newdeplibs="$newdeplibs $a_deplib"
2645
			a_deplib=""
2591
			a_deplib=""
Lines 2650-2666 Link Here
2650
	      if test -n "$a_deplib" ; then
2596
	      if test -n "$a_deplib" ; then
2651
		droppeddeps=yes
2597
		droppeddeps=yes
2652
		echo
2598
		echo
2653
		echo "*** Warning: linker path does not have real file for library $a_deplib."
2599
		echo "*** Warning: This library needs some functionality provided by $a_deplib."
2654
		echo "*** I have the capability to make that library automatically link in when"
2600
		echo "*** I have the capability to make that library automatically link in when"
2655
		echo "*** you link to this library.  But I can only do this if you have a"
2601
		echo "*** you link to this library.  But I can only do this if you have a"
2656
		echo "*** shared version of the library, which you do not appear to have"
2602
		echo "*** shared version of the library, which you do not appear to have."
2657
		echo "*** because I did check the linker path looking for a file starting"
2658
		if test -z "$potlib" ; then
2659
		  echo "*** with $libname but no candidates were found. (...for file magic test)"
2660
		else
2661
		  echo "*** with $libname and none of the candidates passed a file format test"
2662
		  echo "*** using a file magic. Last file checked: $potlib"
2663
		fi
2664
	      fi
2603
	      fi
2665
	    else
2604
	    else
2666
	      # Add a -L argument.
2605
	      # Add a -L argument.
Lines 2679-2687 Link Here
2679
	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2618
	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2680
		potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2619
		potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2681
		for potent_lib in $potential_libs; do
2620
		for potent_lib in $potential_libs; do
2682
		  potlib="$potent_lib" # see symlink-check below in file_magic test
2683
		  if eval echo \"$potent_lib\" 2>/dev/null \
2621
		  if eval echo \"$potent_lib\" 2>/dev/null \
2684
		      | ${SED} 10q \
2622
		      | sed 10q \
2685
		      | egrep "$match_pattern_regex" > /dev/null; then
2623
		      | egrep "$match_pattern_regex" > /dev/null; then
2686
		    newdeplibs="$newdeplibs $a_deplib"
2624
		    newdeplibs="$newdeplibs $a_deplib"
2687
		    a_deplib=""
2625
		    a_deplib=""
Lines 2692-2708 Link Here
2692
	      if test -n "$a_deplib" ; then
2630
	      if test -n "$a_deplib" ; then
2693
		droppeddeps=yes
2631
		droppeddeps=yes
2694
		echo
2632
		echo
2695
		echo "*** Warning: linker path does not have real file for library $a_deplib."
2633
		echo "*** Warning: This library needs some functionality provided by $a_deplib."
2696
		echo "*** I have the capability to make that library automatically link in when"
2634
		echo "*** I have the capability to make that library automatically link in when"
2697
		echo "*** you link to this library.  But I can only do this if you have a"
2635
		echo "*** you link to this library.  But I can only do this if you have a"
2698
		echo "*** shared version of the library, which you do not appear to have"
2636
		echo "*** shared version of the library, which you do not appear to have."
2699
		echo "*** because I did check the linker path looking for a file starting"
2700
		if test -z "$potlib" ; then
2701
		  echo "*** with $libname but no candidates were found. (...for regex pattern test)"
2702
		else
2703
		  echo "*** with $libname and none of the candidates passed a file format test"
2704
		  echo "*** using a regex pattern. Last file checked: $potlib"
2705
		fi
2706
	      fi
2637
	      fi
2707
	    else
2638
	    else
2708
	      # Add a -L argument.
2639
	      # Add a -L argument.
Lines 2967-2984 Link Here
2967
	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2898
	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2968
	  eval cmds=\"$archive_expsym_cmds\"
2899
	  eval cmds=\"$archive_expsym_cmds\"
2969
	else
2900
	else
2970
	  save_deplibs="$deplibs"
2971
	  for conv in $convenience; do
2972
	    tmp_deplibs=
2973
	    for test_deplib in $deplibs; do
2974
	      if test "$test_deplib" != "$conv"; then
2975
		tmp_deplibs="$tmp_deplibs $test_deplib"
2976
	      fi
2977
	    done
2978
	    deplibs="$tmp_deplibs"
2979
	  done
2980
	  eval cmds=\"$archive_cmds\"
2901
	  eval cmds=\"$archive_cmds\"
2981
	  deplibs="$save_deplibs"
2982
	fi
2902
	fi
2983
	save_ifs="$IFS"; IFS='~'
2903
	save_ifs="$IFS"; IFS='~'
2984
	for cmd in $cmds; do
2904
	for cmd in $cmds; do
Lines 3177-3183 Link Here
3177
3097
3178
    prog)
3098
    prog)
3179
      case $host in
3099
      case $host in
3180
	*cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
3100
	*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
3181
      esac
3101
      esac
3182
      if test -n "$vinfo"; then
3102
      if test -n "$vinfo"; then
3183
	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
3103
	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
Lines 3199-3211 Link Here
3199
	# On Rhapsody replace the C library is the System framework
3119
	# On Rhapsody replace the C library is the System framework
3200
	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3120
	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3201
	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3121
	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3202
	case $host in
3203
	*darwin*)
3204
	  # Don't allow lazy linking, it breaks C++ global constructors
3205
	  compile_command="$compile_command ${wl}-bind_at_load"
3206
	  finalize_command="$finalize_command ${wl}-bind_at_load"
3207
	  ;;
3208
	esac
3209
	;;
3122
	;;
3210
      esac
3123
      esac
3211
3124
Lines 3372-3380 Link Here
3372
	    if test -z "$export_symbols"; then
3285
	    if test -z "$export_symbols"; then
3373
	      export_symbols="$output_objdir/$output.exp"
3286
	      export_symbols="$output_objdir/$output.exp"
3374
	      $run $rm $export_symbols
3287
	      $run $rm $export_symbols
3375
	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3288
	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3376
	    else
3289
	    else
3377
	      $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3290
	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3378
	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3291
	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3379
	      $run eval 'mv "$nlist"T "$nlist"'
3292
	      $run eval 'mv "$nlist"T "$nlist"'
3380
	    fi
3293
	    fi
Lines 3382-3388 Link Here
3382
3295
3383
	  for arg in $dlprefiles; do
3296
	  for arg in $dlprefiles; do
3384
	    $show "extracting global C symbols from \`$arg'"
3297
	    $show "extracting global C symbols from \`$arg'"
3385
	    name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
3298
	    name=`echo "$arg" | sed -e 's%^.*/%%'`
3386
	    $run eval 'echo ": $name " >> "$nlist"'
3299
	    $run eval 'echo ": $name " >> "$nlist"'
3387
	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3300
	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3388
	  done
3301
	  done
Lines 3397-3409 Link Here
3397
	    fi
3310
	    fi
3398
3311
3399
	    # Try sorting and uniquifying the output.
3312
	    # Try sorting and uniquifying the output.
3400
	    if grep -v "^: " < "$nlist" |
3313
	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
3401
		if sort -k 3 </dev/null >/dev/null 2>&1; then
3402
		  sort -k 3
3403
		else
3404
		  sort +2
3405
		fi |
3406
		uniq > "$nlist"S; then
3407
	      :
3314
	      :
3408
	    else
3315
	    else
3409
	      grep -v "^: " < "$nlist" > "$nlist"S
3316
	      grep -v "^: " < "$nlist" > "$nlist"S
Lines 3625-3631 Link Here
3625
	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
3532
	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
3626
	  fi
3533
	  fi
3627
	done
3534
	done
3628
	relink_command="(cd `pwd`; $relink_command)"
3535
	relink_command="cd `pwd`; $relink_command"
3629
	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3536
	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3630
      fi
3537
      fi
3631
3538
Lines 3645-3651 Link Here
3645
	# win32 will think the script is a binary if it has
3552
	# win32 will think the script is a binary if it has
3646
	# a .exe suffix, so we strip it off here.
3553
	# a .exe suffix, so we strip it off here.
3647
	case $output in
3554
	case $output in
3648
	  *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
3555
	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
3649
	esac
3556
	esac
3650
	# test for cygwin because mv fails w/o .exe extensions
3557
	# test for cygwin because mv fails w/o .exe extensions
3651
	case $host in
3558
	case $host in
Lines 3669-3675 Link Here
3669
3576
3670
# Sed substitution that helps us do robust quoting.  It backslashifies
3577
# Sed substitution that helps us do robust quoting.  It backslashifies
3671
# metacharacters that are still active within double-quoted strings.
3578
# metacharacters that are still active within double-quoted strings.
3672
Xsed="${SED}"' -e 1s/^X//'
3579
Xsed='sed -e 1s/^X//'
3673
sed_quote_subst='$sed_quote_subst'
3580
sed_quote_subst='$sed_quote_subst'
3674
3581
3675
# The HP-UX ksh and POSIX shell print the target directory to stdout
3582
# The HP-UX ksh and POSIX shell print the target directory to stdout
Lines 3707-3713 Link Here
3707
  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3614
  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3708
3615
3709
  # Follow symbolic links until we get to the real thisdir.
3616
  # Follow symbolic links until we get to the real thisdir.
3710
  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
3617
  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
3711
  while test -n \"\$file\"; do
3618
  while test -n \"\$file\"; do
3712
    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3619
    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3713
3620
Lines 3720-3726 Link Here
3720
    fi
3627
    fi
3721
3628
3722
    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
3629
    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
3723
    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
3630
    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
3724
  done
3631
  done
3725
3632
3726
  # Try to get the absolute directory name.
3633
  # Try to get the absolute directory name.
Lines 3734-3740 Link Here
3734
  progdir=\"\$thisdir/$objdir\"
3641
  progdir=\"\$thisdir/$objdir\"
3735
3642
3736
  if test ! -f \"\$progdir/\$program\" || \\
3643
  if test ! -f \"\$progdir/\$program\" || \\
3737
     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
3644
     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
3738
       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
3645
       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
3739
3646
3740
    file=\"\$\$-\$program\"
3647
    file=\"\$\$-\$program\"
Lines 3780-3786 Link Here
3780
    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
3687
    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
3781
3688
3782
    # Some systems cannot cope with colon-terminated $shlibpath_var
3689
    # Some systems cannot cope with colon-terminated $shlibpath_var
3783
    # The second colon is a workaround for a bug in BeOS R4 ${SED}
3690
    # The second colon is a workaround for a bug in BeOS R4 sed
3784
    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
3691
    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
3785
3692
3786
    export $shlibpath_var
3693
    export $shlibpath_var
Lines 3955-3961 Link Here
3955
	fi
3862
	fi
3956
      done
3863
      done
3957
      # Quote the link command for shipping.
3864
      # Quote the link command for shipping.
3958
      relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
3865
      relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
3959
      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3866
      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3960
3867
3961
      # Only create the output if not a dry run.
3868
      # Only create the output if not a dry run.
Lines 3972-3978 Link Here
3972
	      case $deplib in
3879
	      case $deplib in
3973
	      *.la)
3880
	      *.la)
3974
		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
3881
		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
3975
		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3882
		eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3976
		if test -z "$libdir"; then
3883
		if test -z "$libdir"; then
3977
		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3884
		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3978
		  exit 1
3885
		  exit 1
Lines 3986-3992 Link Here
3986
	    newdlfiles=
3893
	    newdlfiles=
3987
	    for lib in $dlfiles; do
3894
	    for lib in $dlfiles; do
3988
	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3895
	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3989
	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3896
	      eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3990
	      if test -z "$libdir"; then
3897
	      if test -z "$libdir"; then
3991
		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3898
		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3992
		exit 1
3899
		exit 1
Lines 3997-4003 Link Here
3997
	    newdlprefiles=
3904
	    newdlprefiles=
3998
	    for lib in $dlprefiles; do
3905
	    for lib in $dlprefiles; do
3999
	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3906
	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
4000
	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3907
	      eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
4001
	      if test -z "$libdir"; then
3908
	      if test -z "$libdir"; then
4002
		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3909
		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4003
		exit 1
3910
		exit 1
Lines 4045-4054 Link Here
4045
3952
4046
# Directory that this library needs to be installed in:
3953
# Directory that this library needs to be installed in:
4047
libdir='$install_libdir'"
3954
libdir='$install_libdir'"
4048
	  if test "$installed" = no && test $need_relink = yes; then
3955
#	  if test "$installed" = no && test $need_relink = yes; then
4049
	    $echo >> $output "\
3956
#	    $echo >> $output "\
4050
relink_command=\"$relink_command\""
3957
#relink_command=\"$relink_command\""
4051
	  fi
3958
#	  fi
4052
	done
3959
	done
4053
      fi
3960
      fi
4054
3961
Lines 4221-4227 Link Here
4221
4128
4222
      *.la)
4129
      *.la)
4223
	# Check to see that this really is a libtool archive.
4130
	# Check to see that this really is a libtool archive.
4224
	if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4131
	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4225
	else
4132
	else
4226
	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4133
	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4227
	  $echo "$help" 1>&2
4134
	  $echo "$help" 1>&2
Lines 4238-4249 Link Here
4238
	esac
4145
	esac
4239
4146
4240
	# Add the libdir to current_libdirs if it is the destination.
4147
	# Add the libdir to current_libdirs if it is the destination.
4148
	DESTDIR=
4241
	if test "X$destdir" = "X$libdir"; then
4149
	if test "X$destdir" = "X$libdir"; then
4242
	  case "$current_libdirs " in
4150
	  case "$current_libdirs " in
4243
	  *" $libdir "*) ;;
4151
	  *" $libdir "*) ;;
4244
	  *) current_libdirs="$current_libdirs $libdir" ;;
4152
	  *) current_libdirs="$current_libdirs $libdir" ;;
4245
	  esac
4153
	  esac
4246
	else
4154
	else
4155
	  case "$destdir" in
4156
	    *"$libdir")
4157
	      DESTDIR=`$echo "$destdir" | sed -e 's!'"$libdir"'$!!'`
4158
	      if test "X$destdir" != "X$DESTDIR$libdir"; then
4159
		DESTDIR=
4160
	      fi
4161
	      ;;
4162
	  esac
4247
	  # Note the libdir as a future libdir.
4163
	  # Note the libdir as a future libdir.
4248
	  case "$future_libdirs " in
4164
	  case "$future_libdirs " in
4249
	  *" $libdir "*) ;;
4165
	  *" $libdir "*) ;;
Lines 4256-4287 Link Here
4256
	dir="$dir$objdir"
4172
	dir="$dir$objdir"
4257
4173
4258
	if test -n "$relink_command"; then
4174
	if test -n "$relink_command"; then
4259
          # Determine the prefix the user has applied to our future dir.
4260
          inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
4261
 
4262
          # Don't allow the user to place us outside of our expected
4263
          # location b/c this prevents finding dependent libraries that
4264
          # are installed to the same prefix.
4265
          if test "$inst_prefix_dir" = "$destdir"; then
4266
            $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
4267
            exit 1
4268
          fi
4269
 
4270
          if test -n "$inst_prefix_dir"; then
4271
            # Stick the inst_prefix_dir data into the link command.
4272
            relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
4273
          else
4274
            relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
4275
          fi
4276
4277
	  $echo "$modename: warning: relinking \`$file'" 1>&2
4175
	  $echo "$modename: warning: relinking \`$file'" 1>&2
4176
	  export DESTDIR
4278
	  $show "$relink_command"
4177
	  $show "$relink_command"
4279
	  if $run eval "$relink_command"; then :
4178
	  if $run eval "$relink_command"; then :
4280
	  else
4179
	  else
4281
	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4180
	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4282
	    exit 1
4181
	    continue
4283
	  fi
4182
	  fi
4284
	fi
4183
	fi
4184
	unset DESTDIR
4285
4185
4286
	# See the names of the shared library.
4186
	# See the names of the shared library.
4287
	set dummy $library_names
4187
	set dummy $library_names
Lines 4388-4414 Link Here
4388
	fi
4288
	fi
4389
4289
4390
	# Do a test to see if this is really a libtool program.
4290
	# Do a test to see if this is really a libtool program.
4391
	case $host in
4291
	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4392
	*cygwin*|*mingw*)
4393
	    wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
4394
	    ;;
4395
	*)
4396
	    wrapper=$file
4397
	    ;;
4398
	esac
4399
	if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
4400
	  notinst_deplibs=
4292
	  notinst_deplibs=
4401
	  relink_command=
4293
	  relink_command=
4402
4294
4403
	  # If there is no directory component, then add one.
4295
	  # If there is no directory component, then add one.
4404
	  case $file in
4296
	  case $file in
4405
	  */* | *\\*) . $wrapper ;;
4297
	  */* | *\\*) . $file ;;
4406
	  *) . ./$wrapper ;;
4298
	  *) . ./$file ;;
4407
	  esac
4299
	  esac
4408
4300
4409
	  # Check the variables that should have been set.
4301
	  # Check the variables that should have been set.
4410
	  if test -z "$notinst_deplibs"; then
4302
	  if test -z "$notinst_deplibs"; then
4411
	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
4303
	    $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4412
	    exit 1
4304
	    exit 1
4413
	  fi
4305
	  fi
4414
4306
Lines 4433-4440 Link Here
4433
	  relink_command=
4325
	  relink_command=
4434
	  # If there is no directory component, then add one.
4326
	  # If there is no directory component, then add one.
4435
	  case $file in
4327
	  case $file in
4436
	  */* | *\\*) . $wrapper ;;
4328
	  */* | *\\*) . $file ;;
4437
	  *) . ./$wrapper ;;
4329
	  *) . ./$file ;;
4438
	  esac
4330
	  esac
4439
4331
4440
	  outputname=
4332
	  outputname=
Lines 4482-4488 Link Here
4482
	    destfile=$destfile.exe
4374
	    destfile=$destfile.exe
4483
	    ;;
4375
	    ;;
4484
	  *:*.exe)
4376
	  *:*.exe)
4485
	    destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
4377
	    destfile=`echo $destfile | sed -e 's,.exe$,,'`
4486
	    ;;
4378
	    ;;
4487
	  esac
4379
	  esac
4488
	  ;;
4380
	  ;;
Lines 4630-4636 Link Here
4630
      case $file in
4522
      case $file in
4631
      *.la)
4523
      *.la)
4632
	# Check to see that this really is a libtool archive.
4524
	# Check to see that this really is a libtool archive.
4633
	if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4525
	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4634
	else
4526
	else
4635
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4527
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4636
	  $echo "$help" 1>&2
4528
	  $echo "$help" 1>&2
Lines 4701-4707 Link Here
4701
      -*) ;;
4593
      -*) ;;
4702
      *)
4594
      *)
4703
	# Do a test to see if this is really a libtool program.
4595
	# Do a test to see if this is really a libtool program.
4704
	if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4596
	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4705
	  # If there is no directory component, then add one.
4597
	  # If there is no directory component, then add one.
4706
	  case $file in
4598
	  case $file in
4707
	  */* | *\\*) . $file ;;
4599
	  */* | *\\*) . $file ;;
Lines 4733-4739 Link Here
4733
      fi
4625
      fi
4734
4626
4735
      # Now prepare to actually exec the command.
4627
      # Now prepare to actually exec the command.
4736
      exec_cmd="\$cmd$args"
4628
      exec_cmd='"$cmd"$args'
4737
    else
4629
    else
4738
      # Display what would be done.
4630
      # Display what would be done.
4739
      if test -n "$shlibpath_var"; then
4631
      if test -n "$shlibpath_var"; then
Lines 4810-4816 Link Here
4810
      case $name in
4702
      case $name in
4811
      *.la)
4703
      *.la)
4812
	# Possibly a libtool archive, so verify it.
4704
	# Possibly a libtool archive, so verify it.
4813
	if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4705
	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4814
	  . $dir/$name
4706
	  . $dir/$name
4815
4707
4816
	  # Delete the libtool libraries and symlinks.
4708
	  # Delete the libtool libraries and symlinks.
Lines 4865-4871 Link Here
4865
      *)
4757
      *)
4866
	# Do a test to see if this is a libtool program.
4758
	# Do a test to see if this is a libtool program.
4867
	if test $mode = clean &&
4759
	if test $mode = clean &&
4868
	   (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4760
	   (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4869
	  relink_command=
4761
	  relink_command=
4870
	  . $dir/$file
4762
	  . $dir/$file
4871
4763

Return to bug 62277