~ubuntu-branches/ubuntu/precise/xdm/precise

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Stone
  • Date: 2006-01-04 13:30:32 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060104133032-cp57jyn4w0ejnpti
Tags: 1:1.0.1-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# ltmain.sh - Provide generalized library-building support services.
2
2
# NOTE: Changing this file will not affect anything until you rerun configure.
3
3
#
4
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
 
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
5
5
# Free Software Foundation, Inc.
6
6
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
7
#
17
17
#
18
18
# You should have received a copy of the GNU General Public License
19
19
# along with this program; if not, write to the Free Software
20
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
20
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
21
#
22
22
# As a special exception to the GNU General Public License, if you
23
23
# distribute this file as part of a program that contains a
33
33
# function.
34
34
progpath="$0"
35
35
 
 
36
# RH: define SED for historic ltconfig's generated by Libtool 1.3
 
37
[ -z "$SED" ] && SED=sed
 
38
 
36
39
# The name of this program:
37
40
progname=`echo "$progpath" | $SED $basename`
38
41
modename="$progname"
43
46
 
44
47
PROGRAM=ltmain.sh
45
48
PACKAGE=libtool
46
 
VERSION=1.5.18
47
 
TIMESTAMP=" (1.1220.2.245 2005/05/16 08:55:27)"
 
49
VERSION=1.5.6
 
50
TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
48
51
 
49
 
# See if we are running on zsh, and set the options which allow our
50
 
# commands through without removal of \ escapes.
51
 
if test -n "${ZSH_VERSION+set}" ; then
52
 
  setopt NO_GLOB_SUBST
53
 
fi
54
52
 
55
53
# Check that we have a working $echo.
56
54
if test "X$1" = X--no-reexec; then
112
110
fi
113
111
 
114
112
# Make sure IFS has a sensible default
115
 
lt_nl='
116
 
'
117
 
IFS="   $lt_nl"
 
113
: ${IFS="       
 
114
"}
118
115
 
119
116
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
120
117
  $echo "$modename: not configured to build any kind of library" 1>&2
133
130
execute_dlfiles=
134
131
lo2o="s/\\.lo\$/.${objext}/"
135
132
o2lo="s/\\.${objext}\$/.lo/"
136
 
quote_scanset='[[~#^*{};<>?'"'"'        ]'
137
133
 
138
134
#####################################
139
135
# Shell function definitions:
145
141
# Need a lot of goo to handle *both* DLLs and import libs
146
142
# Has to be a shell function in order to 'eat' the argument
147
143
# that is supplied when $file_magic_command is called.
148
 
func_win32_libid ()
149
 
{
 
144
func_win32_libid () {
150
145
  win32_libid_type="unknown"
151
146
  win32_fileres=`file -L $1 2>/dev/null`
152
147
  case $win32_fileres in
186
181
# Only attempt this if the compiler in the base compile
187
182
# command doesn't match the default compiler.
188
183
# arg is usually of the form 'gcc ...'
189
 
func_infer_tag ()
190
 
{
 
184
func_infer_tag () {
191
185
    if test -n "$available_tags" && test -z "$tagname"; then
192
186
      CC_quoted=
193
187
      for arg in $CC; do
194
188
        case $arg in
195
 
          *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
189
          *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
196
190
          arg="\"$arg\""
197
191
          ;;
198
192
        esac
213
207
            for arg in $CC; do
214
208
            # Double-quote args containing other shell metacharacters.
215
209
            case $arg in
216
 
              *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
210
              *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
217
211
              arg="\"$arg\""
218
212
              ;;
219
213
            esac
244
238
      esac
245
239
    fi
246
240
}
247
 
 
248
 
 
249
 
# func_extract_an_archive dir oldlib
250
 
func_extract_an_archive ()
251
 
{
252
 
    f_ex_an_ar_dir="$1"; shift
253
 
    f_ex_an_ar_oldlib="$1"
254
 
 
255
 
    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
256
 
    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
257
 
    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
258
 
     :
259
 
    else
260
 
      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
261
 
      exit $EXIT_FAILURE
262
 
    fi
263
 
}
264
 
 
265
 
# func_extract_archives gentop oldlib ...
266
 
func_extract_archives ()
267
 
{
268
 
    my_gentop="$1"; shift
269
 
    my_oldlibs=${1+"$@"}
270
 
    my_oldobjs=""
271
 
    my_xlib=""
272
 
    my_xabs=""
273
 
    my_xdir=""
274
 
    my_status=""
275
 
 
276
 
    $show "${rm}r $my_gentop"
277
 
    $run ${rm}r "$my_gentop"
278
 
    $show "$mkdir $my_gentop"
279
 
    $run $mkdir "$my_gentop"
280
 
    my_status=$?
281
 
    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
282
 
      exit $my_status
283
 
    fi
284
 
 
285
 
    for my_xlib in $my_oldlibs; do
286
 
      # Extract the objects.
287
 
      case $my_xlib in
288
 
        [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
289
 
        *) my_xabs=`pwd`"/$my_xlib" ;;
290
 
      esac
291
 
      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
292
 
      my_xdir="$my_gentop/$my_xlib"
293
 
 
294
 
      $show "${rm}r $my_xdir"
295
 
      $run ${rm}r "$my_xdir"
296
 
      $show "$mkdir $my_xdir"
297
 
      $run $mkdir "$my_xdir"
298
 
      status=$?
299
 
      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
300
 
        exit $status
301
 
      fi
302
 
      case $host in
303
 
      *-darwin*)
304
 
        $show "Extracting $my_xabs"
305
 
        # Do not bother doing anything if just a dry run
306
 
        if test -z "$run"; then
307
 
          darwin_orig_dir=`pwd`
308
 
          cd $my_xdir || exit $?
309
 
          darwin_archive=$my_xabs
310
 
          darwin_curdir=`pwd`
311
 
          darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
312
 
          darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
313
 
          if test -n "$darwin_arches"; then 
314
 
            darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
315
 
            darwin_arch=
316
 
            $show "$darwin_base_archive has multiple architectures $darwin_arches"
317
 
            for darwin_arch in  $darwin_arches ; do
318
 
              mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
319
 
              lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
320
 
              cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
321
 
              func_extract_an_archive "`pwd`" "${darwin_base_archive}"
322
 
              cd "$darwin_curdir"
323
 
              $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
324
 
            done # $darwin_arches
325
 
      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
326
 
            darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
327
 
            darwin_file=
328
 
            darwin_files=
329
 
            for darwin_file in $darwin_filelist; do
330
 
              darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
331
 
              lipo -create -output "$darwin_file" $darwin_files
332
 
            done # $darwin_filelist
333
 
            ${rm}r unfat-$$
334
 
            cd "$darwin_orig_dir"
335
 
          else
336
 
            cd "$darwin_orig_dir"
337
 
            func_extract_an_archive "$my_xdir" "$my_xabs"
338
 
          fi # $darwin_arches
339
 
        fi # $run
340
 
      ;;
341
 
      *)
342
 
        func_extract_an_archive "$my_xdir" "$my_xabs"
343
 
        ;;
344
 
      esac
345
 
      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
346
 
    done
347
 
    func_extract_archives_result="$my_oldobjs"
348
 
}
349
241
# End of Shell function definitions
350
242
#####################################
351
243
 
416
308
  --version)
417
309
    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
418
310
    $echo
419
 
    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
 
311
    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
420
312
    $echo "This is free software; see the source for copying conditions.  There is NO"
421
313
    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
422
 
    exit $?
 
314
    exit $EXIT_SUCCESS
423
315
    ;;
424
316
 
425
317
  --config)
428
320
    for tagname in $taglist; do
429
321
      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
430
322
    done
431
 
    exit $?
 
323
    exit $EXIT_SUCCESS
432
324
    ;;
433
325
 
434
326
  --debug)
453
345
    else
454
346
      $echo "disable static libraries"
455
347
    fi
456
 
    exit $?
 
348
    exit $EXIT_SUCCESS
457
349
    ;;
458
350
 
459
351
  --finish) mode="finish" ;;
510
402
  # Infer the operation mode.
511
403
  if test -z "$mode"; then
512
404
    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
513
 
    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
 
405
    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
514
406
    case $nonopt in
515
407
    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
516
408
      mode=link
627
519
            # Many Bourne shells cannot handle close brackets correctly
628
520
            # in scan sets, so we specify it separately.
629
521
            case $arg in
630
 
              *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
522
              *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
631
523
              arg="\"$arg\""
632
524
              ;;
633
525
            esac
658
550
      case $lastarg in
659
551
      # Double-quote args containing other shell metacharacters.
660
552
      # Many Bourne shells cannot handle close brackets correctly
661
 
      # in scan sets, and some SunOS ksh mistreat backslash-escaping
662
 
      # in scan sets (worked around with variable expansion),
663
 
      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
664
 
      # at all, so we specify them separately.
665
 
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
553
      # in scan sets, so we specify it separately.
 
554
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
666
555
        lastarg="\"$lastarg\""
667
556
        ;;
668
557
      esac
735
624
      esac
736
625
    done
737
626
 
738
 
    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
739
 
    case $qlibobj in
740
 
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
741
 
        qlibobj="\"$qlibobj\"" ;;
742
 
    esac
743
 
    if test "X$libobj" != "X$qlibobj"; then
744
 
        $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
745
 
        exit $EXIT_FAILURE
746
 
    fi
747
627
    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
748
628
    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
749
629
    if test "X$xdir" = "X$obj"; then
816
696
        $run $rm $removelist
817
697
        exit $EXIT_FAILURE
818
698
      fi
819
 
      $echo "$srcfile" > "$lockfile"
 
699
      $echo $srcfile > "$lockfile"
820
700
    fi
821
701
 
822
702
    if test -n "$fix_srcfile_path"; then
823
703
      eval srcfile=\"$fix_srcfile_path\"
824
704
    fi
825
 
    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
826
 
    case $qsrcfile in
827
 
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
828
 
      qsrcfile="\"$qsrcfile\"" ;;
829
 
    esac
830
705
 
831
706
    $run $rm "$libobj" "${libobj}T"
832
707
 
848
723
      fbsd_hideous_sh_bug=$base_compile
849
724
 
850
725
      if test "$pic_mode" != no; then
851
 
        command="$base_compile $qsrcfile $pic_flag"
 
726
        command="$base_compile $srcfile $pic_flag"
852
727
      else
853
728
        # Don't build PIC code
854
 
        command="$base_compile $qsrcfile"
 
729
        command="$base_compile $srcfile"
855
730
      fi
856
731
 
857
732
      if test ! -d "${xdir}$objdir"; then
931
806
    if test "$build_old_libs" = yes; then
932
807
      if test "$pic_mode" != yes; then
933
808
        # Don't build PIC code
934
 
        command="$base_compile $qsrcfile"
 
809
        command="$base_compile $srcfile"
935
810
      else
936
 
        command="$base_compile $qsrcfile $pic_flag"
 
811
        command="$base_compile $srcfile $pic_flag"
937
812
      fi
938
813
      if test "$compiler_c_o" = yes; then
939
814
        command="$command -o $obj"
1111
986
      arg="$1"
1112
987
      shift
1113
988
      case $arg in
1114
 
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
989
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
1115
990
        qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1116
991
        ;;
1117
992
      *) qarg=$arg ;;
1355
1230
          prev=
1356
1231
          continue
1357
1232
          ;;
1358
 
        darwin_framework)
1359
 
          compiler_flags="$compiler_flags $arg"
1360
 
          compile_command="$compile_command $arg"
1361
 
          finalize_command="$finalize_command $arg"
1362
 
          prev=
1363
 
          continue
1364
 
          ;;
1365
1233
        *)
1366
1234
          eval "$prev=\"\$arg\""
1367
1235
          prev=
1420
1288
        continue
1421
1289
        ;;
1422
1290
 
1423
 
      -framework)
1424
 
        prev=darwin_framework
1425
 
        compiler_flags="$compiler_flags $arg"
1426
 
        compile_command="$compile_command $arg"
1427
 
        finalize_command="$finalize_command $arg"
1428
 
        continue
1429
 
        ;;
1430
 
 
1431
1291
      -inst-prefix-dir)
1432
1292
        prev=inst_prefix
1433
1293
        continue
1488
1348
            # These systems don't actually have a C library (as such)
1489
1349
            test "X$arg" = "X-lc" && continue
1490
1350
            ;;
1491
 
          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 
1351
          *-*-openbsd* | *-*-freebsd*)
1492
1352
            # Do not include libc due to us having libc/libc_r.
1493
1353
            test "X$arg" = "X-lc" && continue
1494
1354
            ;;
1499
1359
          esac
1500
1360
        elif test "X$arg" = "X-lc_r"; then
1501
1361
         case $host in
1502
 
         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 
1362
         *-*-openbsd* | *-*-freebsd*)
1503
1363
           # Do not include libc_r directly, use -pthread flag.
1504
1364
           continue
1505
1365
           ;;
1509
1369
        continue
1510
1370
        ;;
1511
1371
 
1512
 
      # Tru64 UNIX uses -model [arg] to determine the layout of C++
1513
 
      # classes, name mangling, and exception handling.
1514
 
      -model)
1515
 
        compile_command="$compile_command $arg"
1516
 
        compiler_flags="$compiler_flags $arg"
1517
 
        finalize_command="$finalize_command $arg"
1518
 
        prev=xcompiler
1519
 
        continue
1520
 
        ;;
1521
 
 
1522
1372
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1523
 
        compiler_flags="$compiler_flags $arg"
1524
 
        compile_command="$compile_command $arg"
1525
 
        finalize_command="$finalize_command $arg"
 
1373
        deplibs="$deplibs $arg"
1526
1374
        continue
1527
1375
        ;;
1528
1376
 
1531
1379
        continue
1532
1380
        ;;
1533
1381
 
1534
 
      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1535
 
      # -r[0-9][0-9]* specifies the processor on the SGI compiler
1536
 
      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1537
 
      # +DA*, +DD* enable 64-bit mode on the HP compiler
1538
 
      # -q* pass through compiler args for the IBM compiler
1539
 
      # -m* pass through architecture-specific compiler args for GCC
1540
 
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
1541
 
 
 
1382
      # gcc -m* arguments should be passed to the linker via $compiler_flags
 
1383
      # in order to pass architecture information to the linker
 
1384
      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
 
1385
      # but this is not reliable with gcc because gcc may use -mfoo to
 
1386
      # select a different linker, different libraries, etc, while
 
1387
      # -Wl,-mfoo simply passes -mfoo to the linker.
 
1388
      -m*)
1542
1389
        # Unknown arguments in both finalize_command and compile_command need
1543
1390
        # to be aesthetically quoted because they are evaled later.
1544
1391
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1545
1392
        case $arg in
1546
 
        *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
1393
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
1547
1394
          arg="\"$arg\""
1548
1395
          ;;
1549
1396
        esac
1659
1506
        for flag in $args; do
1660
1507
          IFS="$save_ifs"
1661
1508
          case $flag in
1662
 
            *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
1509
            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
1663
1510
            flag="\"$flag\""
1664
1511
            ;;
1665
1512
          esac
1677
1524
        for flag in $args; do
1678
1525
          IFS="$save_ifs"
1679
1526
          case $flag in
1680
 
            *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
1527
            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
1681
1528
            flag="\"$flag\""
1682
1529
            ;;
1683
1530
          esac
1710
1557
        # to be aesthetically quoted because they are evaled later.
1711
1558
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1712
1559
        case $arg in
1713
 
        *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
1560
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
1714
1561
          arg="\"$arg\""
1715
1562
          ;;
1716
1563
        esac
1844
1691
        # to be aesthetically quoted because they are evaled later.
1845
1692
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1846
1693
        case $arg in
1847
 
        *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
1694
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
1848
1695
          arg="\"$arg\""
1849
1696
          ;;
1850
1697
        esac
2011
1858
            compile_deplibs="$deplib $compile_deplibs"
2012
1859
            finalize_deplibs="$deplib $finalize_deplibs"
2013
1860
          else
2014
 
            compiler_flags="$compiler_flags $deplib"
 
1861
            deplibs="$deplib $deplibs"
2015
1862
          fi
2016
1863
          continue
2017
1864
          ;;
2020
1867
            $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2021
1868
            continue
2022
1869
          fi
 
1870
          if test "$pass" = conv; then
 
1871
            deplibs="$deplib $deplibs"
 
1872
            continue
 
1873
          fi
2023
1874
          name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2024
1875
          for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2025
1876
            for search_ext in .la $std_shrext .so .a; do
2130
1981
          fi
2131
1982
          case $linkmode in
2132
1983
          lib)
2133
 
            valid_a_lib=no
2134
 
            case $deplibs_check_method in
2135
 
              match_pattern*)
2136
 
                set dummy $deplibs_check_method
2137
 
                match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2138
 
                if eval $echo \"$deplib\" 2>/dev/null \
2139
 
                    | $SED 10q \
2140
 
                    | $EGREP "$match_pattern_regex" > /dev/null; then
2141
 
                  valid_a_lib=yes
2142
 
                fi
2143
 
                ;;
2144
 
              pass_all)
2145
 
                valid_a_lib=yes
2146
 
                ;;
2147
 
            esac
2148
 
            if test "$valid_a_lib" != yes; then
 
1984
            if test "$deplibs_check_method" != pass_all; then
2149
1985
              $echo
2150
1986
              $echo "*** Warning: Trying to link with static lib archive $deplib."
2151
1987
              $echo "*** I have the capability to make that library automatically link in when"
2219
2055
        # it will not redefine variables installed, or shouldnotlink
2220
2056
        installed=yes
2221
2057
        shouldnotlink=no
2222
 
        avoidtemprpath=
2223
 
 
2224
2058
 
2225
2059
        # Read the .la file
2226
2060
        case $lib in
2319
2153
            dir="$libdir"
2320
2154
            absdir="$libdir"
2321
2155
          fi
2322
 
          test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2323
2156
        else
2324
 
          if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2325
 
            dir="$ladir"
2326
 
            absdir="$abs_ladir"
2327
 
            # Remove this search path later
2328
 
            notinst_path="$notinst_path $abs_ladir"
2329
 
          else
2330
 
            dir="$ladir/$objdir"
2331
 
            absdir="$abs_ladir/$objdir"
2332
 
            # Remove this search path later
2333
 
            notinst_path="$notinst_path $abs_ladir"
2334
 
          fi
 
2157
          dir="$ladir/$objdir"
 
2158
          absdir="$abs_ladir/$objdir"
 
2159
          # Remove this search path later
 
2160
          notinst_path="$notinst_path $abs_ladir"
2335
2161
        fi # $installed = yes
2336
2162
        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2337
2163
 
2404
2230
          if test -n "$library_names" &&
2405
2231
             { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2406
2232
            # We need to hardcode the library path
2407
 
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
 
2233
            if test -n "$shlibpath_var"; then
2408
2234
              # Make sure the rpath contains only unique directories.
2409
2235
              case "$temp_rpath " in
2410
2236
              *" $dir "*) ;;
2848
2674
              *) continue ;;
2849
2675
              esac
2850
2676
              case " $deplibs " in
2851
 
              *" $path "*) ;;
2852
 
              *) deplibs="$path $deplibs" ;;
2853
 
              esac
2854
 
              case " $deplibs " in
2855
2677
              *" $depdepl "*) ;;
2856
2678
              *) deplibs="$depdepl $deplibs" ;;
2857
2679
              esac
 
2680
              case " $deplibs " in
 
2681
              *" $path "*) ;;
 
2682
              *) deplibs="$deplibs $path" ;;
 
2683
              esac
2858
2684
            done
2859
2685
          fi # link_all_deplibs != no
2860
2686
        fi # linkmode = lib
3118
2944
 
3119
2945
        # Check that each of the things are valid numbers.
3120
2946
        case $current in
3121
 
        0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 
2947
        [0-9]*) ;;
3122
2948
        *)
3123
 
          $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
 
2949
          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3124
2950
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3125
2951
          exit $EXIT_FAILURE
3126
2952
          ;;
3127
2953
        esac
3128
2954
 
3129
2955
        case $revision in
3130
 
        0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 
2956
        [0-9]*) ;;
3131
2957
        *)
3132
 
          $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
 
2958
          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3133
2959
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3134
2960
          exit $EXIT_FAILURE
3135
2961
          ;;
3136
2962
        esac
3137
2963
 
3138
2964
        case $age in
3139
 
        0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 
2965
        [0-9]*) ;;
3140
2966
        *)
3141
 
          $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
 
2967
          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3142
2968
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3143
2969
          exit $EXIT_FAILURE
3144
2970
          ;;
3164
2990
          versuffix="$major.$age.$revision"
3165
2991
          # Darwin ld doesn't like 0 for these options...
3166
2992
          minor_current=`expr $current + 1`
3167
 
          verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 
2993
          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3168
2994
          ;;
3169
2995
 
3170
2996
        freebsd-aout)
3370
3196
          *-*-netbsd*)
3371
3197
            # Don't link with libc until the a.out ld.so is fixed.
3372
3198
            ;;
3373
 
          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 
3199
          *-*-openbsd* | *-*-freebsd*)
3374
3200
            # Do not include libc due to us having libc/libc_r.
3375
3201
            test "X$arg" = "X-lc" && continue
3376
3202
            ;;
3852
3678
            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3853
3679
          else
3854
3680
            gentop="$output_objdir/${outputname}x"
 
3681
            $show "${rm}r $gentop"
 
3682
            $run ${rm}r "$gentop"
 
3683
            $show "$mkdir $gentop"
 
3684
            $run $mkdir "$gentop"
 
3685
            status=$?
 
3686
            if test "$status" -ne 0 && test ! -d "$gentop"; then
 
3687
              exit $status
 
3688
            fi
3855
3689
            generated="$generated $gentop"
3856
3690
 
3857
 
            func_extract_archives $gentop $convenience
3858
 
            libobjs="$libobjs $func_extract_archives_result"
 
3691
            for xlib in $convenience; do
 
3692
              # Extract the objects.
 
3693
              case $xlib in
 
3694
              [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
 
3695
              *) xabs=`pwd`"/$xlib" ;;
 
3696
              esac
 
3697
              xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
 
3698
              xdir="$gentop/$xlib"
 
3699
 
 
3700
              $show "${rm}r $xdir"
 
3701
              $run ${rm}r "$xdir"
 
3702
              $show "$mkdir $xdir"
 
3703
              $run $mkdir "$xdir"
 
3704
              status=$?
 
3705
              if test "$status" -ne 0 && test ! -d "$xdir"; then
 
3706
                exit $status
 
3707
              fi
 
3708
              # We will extract separately just the conflicting names and we will no
 
3709
              # longer touch any unique names. It is faster to leave these extract
 
3710
              # automatically by $AR in one run.
 
3711
              $show "(cd $xdir && $AR x $xabs)"
 
3712
              $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
 
3713
              if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
 
3714
                :
 
3715
              else
 
3716
                $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
 
3717
                $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
 
3718
                $AR t "$xabs" | sort | uniq -cd | while read -r count name
 
3719
                do
 
3720
                  i=1
 
3721
                  while test "$i" -le "$count"
 
3722
                  do
 
3723
                   # Put our $i before any first dot (extension)
 
3724
                   # Never overwrite any file
 
3725
                   name_to="$name"
 
3726
                   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
 
3727
                   do
 
3728
                     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
 
3729
                   done
 
3730
                   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
 
3731
                   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
 
3732
                   i=`expr $i + 1`
 
3733
                  done
 
3734
                done
 
3735
              fi
 
3736
 
 
3737
              libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
 
3738
            done
3859
3739
          fi
3860
3740
        fi
3861
 
        
 
3741
 
3862
3742
        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3863
3743
          eval flag=\"$thread_safe_flag_spec\"
3864
3744
          linker_flags="$linker_flags $flag"
3907
3787
            save_libobjs=$libobjs
3908
3788
          fi
3909
3789
          save_output=$output
3910
 
          output_la=`$echo "X$output" | $Xsed -e "$basename"`
3911
3790
 
3912
3791
          # Clear the reloadable object creation command queue and
3913
3792
          # initialize k to one.
3917
3796
          delfiles=
3918
3797
          last_robj=
3919
3798
          k=1
3920
 
          output=$output_objdir/$output_la-${k}.$objext
 
3799
          output=$output_objdir/$save_output-${k}.$objext
3921
3800
          # Loop over the list of objects to be linked.
3922
3801
          for obj in $save_libobjs
3923
3802
          do
3937
3816
                # the last one created.
3938
3817
                eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
3939
3818
              fi
3940
 
              last_robj=$output_objdir/$output_la-${k}.$objext
 
3819
              last_robj=$output_objdir/$save_output-${k}.$objext
3941
3820
              k=`expr $k + 1`
3942
 
              output=$output_objdir/$output_la-${k}.$objext
 
3821
              output=$output_objdir/$save_output-${k}.$objext
3943
3822
              objlist=$obj
3944
3823
              len=1
3945
3824
            fi
3959
3838
            eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
3960
3839
          fi
3961
3840
 
3962
 
          # Set up a command to remove the reloadable object files
 
3841
          # Set up a command to remove the reloadale object files
3963
3842
          # after they are used.
3964
3843
          i=0
3965
3844
          while test "$i" -lt "$k"
3966
3845
          do
3967
3846
            i=`expr $i + 1`
3968
 
            delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
 
3847
            delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
3969
3848
          done
3970
3849
 
3971
3850
          $echo "creating a temporary reloadable object file: $output"
4097
3976
          eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4098
3977
        else
4099
3978
          gentop="$output_objdir/${obj}x"
 
3979
          $show "${rm}r $gentop"
 
3980
          $run ${rm}r "$gentop"
 
3981
          $show "$mkdir $gentop"
 
3982
          $run $mkdir "$gentop"
 
3983
          status=$?
 
3984
          if test "$status" -ne 0 && test ! -d "$gentop"; then
 
3985
            exit $status
 
3986
          fi
4100
3987
          generated="$generated $gentop"
4101
3988
 
4102
 
          func_extract_archives $gentop $convenience
4103
 
          reload_conv_objs="$reload_objs $func_extract_archives_result"
 
3989
          for xlib in $convenience; do
 
3990
            # Extract the objects.
 
3991
            case $xlib in
 
3992
            [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
 
3993
            *) xabs=`pwd`"/$xlib" ;;
 
3994
            esac
 
3995
            xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
 
3996
            xdir="$gentop/$xlib"
 
3997
 
 
3998
            $show "${rm}r $xdir"
 
3999
            $run ${rm}r "$xdir"
 
4000
            $show "$mkdir $xdir"
 
4001
            $run $mkdir "$xdir"
 
4002
            status=$?
 
4003
            if test "$status" -ne 0 && test ! -d "$xdir"; then
 
4004
              exit $status
 
4005
            fi
 
4006
            # We will extract separately just the conflicting names and we will no
 
4007
            # longer touch any unique names. It is faster to leave these extract
 
4008
            # automatically by $AR in one run.
 
4009
            $show "(cd $xdir && $AR x $xabs)"
 
4010
            $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
 
4011
            if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
 
4012
              :
 
4013
            else
 
4014
              $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
 
4015
              $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
 
4016
              $AR t "$xabs" | sort | uniq -cd | while read -r count name
 
4017
              do
 
4018
                i=1
 
4019
                while test "$i" -le "$count"
 
4020
                do
 
4021
                 # Put our $i before any first dot (extension)
 
4022
                 # Never overwrite any file
 
4023
                 name_to="$name"
 
4024
                 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
 
4025
                 do
 
4026
                   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
 
4027
                 done
 
4028
                 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
 
4029
                 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
 
4030
                 i=`expr $i + 1`
 
4031
                done
 
4032
              done
 
4033
            fi
 
4034
 
 
4035
            reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
 
4036
          done
4104
4037
        fi
4105
4038
      fi
4106
4039
 
4362
4295
 
4363
4296
            # Prepare the list of exported symbols
4364
4297
            if test -z "$export_symbols"; then
4365
 
              export_symbols="$output_objdir/$outputname.exp"
 
4298
              export_symbols="$output_objdir/$output.exp"
4366
4299
              $run $rm $export_symbols
4367
4300
              $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4368
4301
            else
4369
 
              $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4370
 
              $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
 
4302
              $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
 
4303
              $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4371
4304
              $run eval 'mv "$nlist"T "$nlist"'
4372
4305
            fi
4373
4306
          fi
4419
4352
#endif
4420
4353
 
4421
4354
/* The mapping between symbol names and symbols. */
4422
 
"
4423
 
 
4424
 
            case $host in
4425
 
            *cygwin* | *mingw* )
4426
 
          $echo >> "$output_objdir/$dlsyms" "\
4427
 
/* DATA imports from DLLs on WIN32 can't be const, because
4428
 
   runtime relocations are performed -- see ld's documentation
4429
 
   on pseudo-relocs */
4430
 
struct {
4431
 
"
4432
 
              ;;
4433
 
            * )
4434
 
          $echo >> "$output_objdir/$dlsyms" "\
4435
4355
const struct {
4436
 
"
4437
 
              ;;
4438
 
            esac
4439
 
 
4440
 
 
4441
 
          $echo >> "$output_objdir/$dlsyms" "\
4442
4356
  const char *name;
4443
4357
  lt_ptr address;
4444
4358
}
4667
4581
        esac
4668
4582
        case $host in
4669
4583
          *cygwin* | *mingw* )
4670
 
            cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
 
4584
            cwrappersource=`$echo ${objdir}/lt-${output}.c`
4671
4585
            cwrapper=`$echo ${output}.exe`
4672
4586
            $rm $cwrappersource $cwrapper
4673
4587
            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4900
4814
 
4901
4815
# The HP-UX ksh and POSIX shell print the target directory to stdout
4902
4816
# if CDPATH is set.
4903
 
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
4817
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
4904
4818
 
4905
4819
relink_command=\"$relink_command\"
4906
4820
 
5077
4991
 
5078
4992
      if test -n "$addlibs"; then
5079
4993
        gentop="$output_objdir/${outputname}x"
 
4994
        $show "${rm}r $gentop"
 
4995
        $run ${rm}r "$gentop"
 
4996
        $show "$mkdir $gentop"
 
4997
        $run $mkdir "$gentop"
 
4998
        status=$?
 
4999
        if test "$status" -ne 0 && test ! -d "$gentop"; then
 
5000
          exit $status
 
5001
        fi
5080
5002
        generated="$generated $gentop"
5081
5003
 
5082
 
        func_extract_archives $gentop $addlibs
5083
 
        oldobjs="$oldobjs $func_extract_archives_result"
 
5004
        # Add in members from convenience archives.
 
5005
        for xlib in $addlibs; do
 
5006
          # Extract the objects.
 
5007
          case $xlib in
 
5008
          [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
 
5009
          *) xabs=`pwd`"/$xlib" ;;
 
5010
          esac
 
5011
          xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
 
5012
          xdir="$gentop/$xlib"
 
5013
 
 
5014
          $show "${rm}r $xdir"
 
5015
          $run ${rm}r "$xdir"
 
5016
          $show "$mkdir $xdir"
 
5017
          $run $mkdir "$xdir"
 
5018
          status=$?
 
5019
          if test "$status" -ne 0 && test ! -d "$xdir"; then
 
5020
            exit $status
 
5021
          fi
 
5022
          # We will extract separately just the conflicting names and we will no
 
5023
          # longer touch any unique names. It is faster to leave these extract
 
5024
          # automatically by $AR in one run.
 
5025
          $show "(cd $xdir && $AR x $xabs)"
 
5026
          $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
 
5027
          if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
 
5028
            :
 
5029
          else
 
5030
            $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
 
5031
            $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
 
5032
            $AR t "$xabs" | sort | uniq -cd | while read -r count name
 
5033
            do
 
5034
              i=1
 
5035
              while test "$i" -le "$count"
 
5036
              do
 
5037
               # Put our $i before any first dot (extension)
 
5038
               # Never overwrite any file
 
5039
               name_to="$name"
 
5040
               while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
 
5041
               do
 
5042
                 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
 
5043
               done
 
5044
               $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
 
5045
               $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
 
5046
               i=`expr $i + 1`
 
5047
              done
 
5048
            done
 
5049
          fi
 
5050
 
 
5051
          oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
 
5052
        done
5084
5053
      fi
5085
5054
 
5086
5055
      # Do each command in the archive commands.
5087
5056
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5088
5057
       cmds=$old_archive_from_new_cmds
5089
5058
      else
5090
 
        # POSIX demands no paths to be encoded in archives.  We have
5091
 
        # to avoid creating archives with duplicate basenames if we
5092
 
        # might have to extract them afterwards, e.g., when creating a
5093
 
        # static archive out of a convenience library, or when linking
5094
 
        # the entirety of a libtool archive into another (currently
5095
 
        # not supported by libtool).
5096
 
        if (for obj in $oldobjs
5097
 
            do
5098
 
              $echo "X$obj" | $Xsed -e 's%^.*/%%'
5099
 
            done | sort | sort -uc >/dev/null 2>&1); then
5100
 
          :
5101
 
        else
5102
 
          $echo "copying selected object files to avoid basename conflicts..."
5103
 
 
5104
 
          if test -z "$gentop"; then
5105
 
            gentop="$output_objdir/${outputname}x"
5106
 
            generated="$generated $gentop"
5107
 
 
5108
 
            $show "${rm}r $gentop"
5109
 
            $run ${rm}r "$gentop"
5110
 
            $show "$mkdir $gentop"
5111
 
            $run $mkdir "$gentop"
5112
 
            status=$?
5113
 
            if test "$status" -ne 0 && test ! -d "$gentop"; then
5114
 
              exit $status
5115
 
            fi
5116
 
          fi
5117
 
 
5118
 
          save_oldobjs=$oldobjs
5119
 
          oldobjs=
5120
 
          counter=1
5121
 
          for obj in $save_oldobjs
5122
 
          do
5123
 
            objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5124
 
            case " $oldobjs " in
5125
 
            " ") oldobjs=$obj ;;
5126
 
            *[\ /]"$objbase "*)
5127
 
              while :; do
5128
 
                # Make sure we don't pick an alternate name that also
5129
 
                # overlaps.
5130
 
                newobj=lt$counter-$objbase
5131
 
                counter=`expr $counter + 1`
5132
 
                case " $oldobjs " in
5133
 
                *[\ /]"$newobj "*) ;;
5134
 
                *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5135
 
                esac
5136
 
              done
5137
 
              $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5138
 
              $run ln "$obj" "$gentop/$newobj" ||
5139
 
              $run cp "$obj" "$gentop/$newobj"
5140
 
              oldobjs="$oldobjs $gentop/$newobj"
5141
 
              ;;
5142
 
            *) oldobjs="$oldobjs $obj" ;;
5143
 
            esac
5144
 
          done
5145
 
        fi
5146
 
 
5147
5059
        eval cmds=\"$old_archive_cmds\"
5148
5060
 
5149
5061
        if len=`expr "X$cmds" : ".*"` &&
5157
5069
          objlist=
5158
5070
          concat_cmds=
5159
5071
          save_oldobjs=$oldobjs
5160
 
 
 
5072
          # GNU ar 2.10+ was changed to match POSIX; thus no paths are
 
5073
          # encoded into archives.  This makes 'ar r' malfunction in
 
5074
          # this piecewise linking case whenever conflicting object
 
5075
          # names appear in distinct ar calls; check, warn and compensate.
 
5076
            if (for obj in $save_oldobjs
 
5077
            do
 
5078
              $echo "X$obj" | $Xsed -e 's%^.*/%%'
 
5079
            done | sort | sort -uc >/dev/null 2>&1); then
 
5080
            :
 
5081
          else
 
5082
            $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
 
5083
            $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
 
5084
            AR_FLAGS=cq
 
5085
          fi
5161
5086
          # Is there a better way of finding the last object in the list?
5162
5087
          for obj in $save_oldobjs
5163
5088
          do
5369
5294
      # Aesthetically quote it.
5370
5295
      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5371
5296
      case $arg in
5372
 
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
5297
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
5373
5298
        arg="\"$arg\""
5374
5299
        ;;
5375
5300
      esac
5385
5310
    # Aesthetically quote it.
5386
5311
    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5387
5312
    case $arg in
5388
 
    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
5313
    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*)
5389
5314
      arg="\"$arg\""
5390
5315
      ;;
5391
5316
    esac
5433
5358
      # Aesthetically quote the argument.
5434
5359
      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5435
5360
      case $arg in
5436
 
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
5361
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
5437
5362
        arg="\"$arg\""
5438
5363
        ;;
5439
5364
      esac
6472
6397
$echo
6473
6398
$echo "Try \`$modename --help' for more information about other modes."
6474
6399
 
6475
 
exit $?
 
6400
exit $EXIT_SUCCESS
6476
6401
 
6477
6402
# The TAGs below are defined such that we never get into a situation
6478
6403
# in which we disable both kinds of libraries.  Given conflicting