~ubuntu-branches/ubuntu/natty/libxxf86vm/natty

« back to all changes in this revision

Viewing changes to ltmain.sh

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Stone
  • Date: 2005-12-12 16:20:05 UTC
  • mto: (2.1.1 dapper) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051212162005-5sge1a9fty2zykrt
Tags: upstream-0.99.2
ImportĀ upstreamĀ versionĀ 0.99.2

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
 
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
20
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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
43
43
 
44
44
PROGRAM=ltmain.sh
45
45
PACKAGE=libtool
46
 
VERSION=1.5.6
47
 
TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 224 $"
 
46
VERSION=1.5.18
 
47
TIMESTAMP=" (1.1220.2.245 2005/05/16 08:55:27)"
48
48
 
 
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
49
54
 
50
55
# Check that we have a working $echo.
51
56
if test "X$1" = X--no-reexec; then
107
112
fi
108
113
 
109
114
# Make sure IFS has a sensible default
110
 
: ${IFS="       
111
 
"}
 
115
lt_nl='
 
116
'
 
117
IFS="   $lt_nl"
112
118
 
113
119
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
114
120
  $echo "$modename: not configured to build any kind of library" 1>&2
127
133
execute_dlfiles=
128
134
lo2o="s/\\.lo\$/.${objext}/"
129
135
o2lo="s/\\.${objext}\$/.lo/"
 
136
quote_scanset='[[~#^*{};<>?'"'"'        ]'
130
137
 
131
138
#####################################
132
139
# Shell function definitions:
138
145
# Need a lot of goo to handle *both* DLLs and import libs
139
146
# Has to be a shell function in order to 'eat' the argument
140
147
# that is supplied when $file_magic_command is called.
141
 
func_win32_libid () {
 
148
func_win32_libid ()
 
149
{
142
150
  win32_libid_type="unknown"
143
151
  win32_fileres=`file -L $1 2>/dev/null`
144
152
  case $win32_fileres in
178
186
# Only attempt this if the compiler in the base compile
179
187
# command doesn't match the default compiler.
180
188
# arg is usually of the form 'gcc ...'
181
 
func_infer_tag () {
 
189
func_infer_tag ()
 
190
{
182
191
    if test -n "$available_tags" && test -z "$tagname"; then
183
192
      CC_quoted=
184
193
      for arg in $CC; do
185
194
        case $arg in
186
 
          *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
 
195
          *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
187
196
          arg="\"$arg\""
188
197
          ;;
189
198
        esac
204
213
            for arg in $CC; do
205
214
            # Double-quote args containing other shell metacharacters.
206
215
            case $arg in
207
 
              *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
 
216
              *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
208
217
              arg="\"$arg\""
209
218
              ;;
210
219
            esac
235
244
      esac
236
245
    fi
237
246
}
 
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
}
238
349
# End of Shell function definitions
239
350
#####################################
240
351
 
305
416
  --version)
306
417
    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
307
418
    $echo
308
 
    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
 
419
    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
309
420
    $echo "This is free software; see the source for copying conditions.  There is NO"
310
421
    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
311
 
    exit $EXIT_SUCCESS
 
422
    exit $?
312
423
    ;;
313
424
 
314
425
  --config)
317
428
    for tagname in $taglist; do
318
429
      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
319
430
    done
320
 
    exit $EXIT_SUCCESS
 
431
    exit $?
321
432
    ;;
322
433
 
323
434
  --debug)
342
453
    else
343
454
      $echo "disable static libraries"
344
455
    fi
345
 
    exit $EXIT_SUCCESS
 
456
    exit $?
346
457
    ;;
347
458
 
348
459
  --finish) mode="finish" ;;
399
510
  # Infer the operation mode.
400
511
  if test -z "$mode"; then
401
512
    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
402
 
    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
 
513
    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
403
514
    case $nonopt in
404
515
    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
405
516
      mode=link
516
627
            # Many Bourne shells cannot handle close brackets correctly
517
628
            # in scan sets, so we specify it separately.
518
629
            case $arg in
519
 
              *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
 
630
              *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
520
631
              arg="\"$arg\""
521
632
              ;;
522
633
            esac
547
658
      case $lastarg in
548
659
      # Double-quote args containing other shell metacharacters.
549
660
      # Many Bourne shells cannot handle close brackets correctly
550
 
      # in scan sets, so we specify it separately.
551
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
 
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* | *]* | *\|* | *\&* | *\(* | *\)* | "")
552
666
        lastarg="\"$lastarg\""
553
667
        ;;
554
668
      esac
621
735
      esac
622
736
    done
623
737
 
 
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
624
747
    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
625
748
    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
626
749
    if test "X$xdir" = "X$obj"; then
693
816
        $run $rm $removelist
694
817
        exit $EXIT_FAILURE
695
818
      fi
696
 
      $echo $srcfile > "$lockfile"
 
819
      $echo "$srcfile" > "$lockfile"
697
820
    fi
698
821
 
699
822
    if test -n "$fix_srcfile_path"; then
700
823
      eval srcfile=\"$fix_srcfile_path\"
701
824
    fi
 
825
    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
 
826
    case $qsrcfile in
 
827
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 
828
      qsrcfile="\"$qsrcfile\"" ;;
 
829
    esac
702
830
 
703
831
    $run $rm "$libobj" "${libobj}T"
704
832
 
720
848
      fbsd_hideous_sh_bug=$base_compile
721
849
 
722
850
      if test "$pic_mode" != no; then
723
 
        command="$base_compile $srcfile $pic_flag"
 
851
        command="$base_compile $qsrcfile $pic_flag"
724
852
      else
725
853
        # Don't build PIC code
726
 
        command="$base_compile $srcfile"
 
854
        command="$base_compile $qsrcfile"
727
855
      fi
728
856
 
729
857
      if test ! -d "${xdir}$objdir"; then
803
931
    if test "$build_old_libs" = yes; then
804
932
      if test "$pic_mode" != yes; then
805
933
        # Don't build PIC code
806
 
        command="$base_compile $srcfile"
 
934
        command="$base_compile $qsrcfile"
807
935
      else
808
 
        command="$base_compile $srcfile $pic_flag"
 
936
        command="$base_compile $qsrcfile $pic_flag"
809
937
      fi
810
938
      if test "$compiler_c_o" = yes; then
811
939
        command="$command -o $obj"
983
1111
      arg="$1"
984
1112
      shift
985
1113
      case $arg in
986
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
 
1114
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
987
1115
        qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
988
1116
        ;;
989
1117
      *) qarg=$arg ;;
1227
1355
          prev=
1228
1356
          continue
1229
1357
          ;;
 
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
          ;;
1230
1365
        *)
1231
1366
          eval "$prev=\"\$arg\""
1232
1367
          prev=
1285
1420
        continue
1286
1421
        ;;
1287
1422
 
 
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
 
1288
1431
      -inst-prefix-dir)
1289
1432
        prev=inst_prefix
1290
1433
        continue
1345
1488
            # These systems don't actually have a C library (as such)
1346
1489
            test "X$arg" = "X-lc" && continue
1347
1490
            ;;
1348
 
          *-*-openbsd* | *-*-freebsd*)
 
1491
          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1349
1492
            # Do not include libc due to us having libc/libc_r.
1350
1493
            test "X$arg" = "X-lc" && continue
1351
1494
            ;;
1356
1499
          esac
1357
1500
        elif test "X$arg" = "X-lc_r"; then
1358
1501
         case $host in
1359
 
         *-*-openbsd* | *-*-freebsd*)
 
1502
         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1360
1503
           # Do not include libc_r directly, use -pthread flag.
1361
1504
           continue
1362
1505
           ;;
1366
1509
        continue
1367
1510
        ;;
1368
1511
 
 
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
 
1369
1522
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1370
 
        deplibs="$deplibs $arg"
 
1523
        compiler_flags="$compiler_flags $arg"
 
1524
        compile_command="$compile_command $arg"
 
1525
        finalize_command="$finalize_command $arg"
1371
1526
        continue
1372
1527
        ;;
1373
1528
 
1376
1531
        continue
1377
1532
        ;;
1378
1533
 
1379
 
      # gcc -m* arguments should be passed to the linker via $compiler_flags
1380
 
      # in order to pass architecture information to the linker
1381
 
      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
1382
 
      # but this is not reliable with gcc because gcc may use -mfoo to
1383
 
      # select a different linker, different libraries, etc, while
1384
 
      # -Wl,-mfoo simply passes -mfoo to the linker.
1385
 
      -m*)
 
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
 
1386
1542
        # Unknown arguments in both finalize_command and compile_command need
1387
1543
        # to be aesthetically quoted because they are evaled later.
1388
1544
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1389
1545
        case $arg in
1390
 
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
 
1546
        *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1391
1547
          arg="\"$arg\""
1392
1548
          ;;
1393
1549
        esac
1503
1659
        for flag in $args; do
1504
1660
          IFS="$save_ifs"
1505
1661
          case $flag in
1506
 
            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
 
1662
            *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1507
1663
            flag="\"$flag\""
1508
1664
            ;;
1509
1665
          esac
1521
1677
        for flag in $args; do
1522
1678
          IFS="$save_ifs"
1523
1679
          case $flag in
1524
 
            *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
 
1680
            *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1525
1681
            flag="\"$flag\""
1526
1682
            ;;
1527
1683
          esac
1554
1710
        # to be aesthetically quoted because they are evaled later.
1555
1711
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1556
1712
        case $arg in
1557
 
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
 
1713
        *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1558
1714
          arg="\"$arg\""
1559
1715
          ;;
1560
1716
        esac
1688
1844
        # to be aesthetically quoted because they are evaled later.
1689
1845
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1690
1846
        case $arg in
1691
 
        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
 
1847
        *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
1692
1848
          arg="\"$arg\""
1693
1849
          ;;
1694
1850
        esac
1838
1994
        case $pass in
1839
1995
        dlopen) libs="$dlfiles" ;;
1840
1996
        dlpreopen) libs="$dlprefiles" ;;
1841
 
        link)
1842
 
          libs="$deplibs %DEPLIBS%"
1843
 
          test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
1844
 
          ;;
 
1997
        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
1845
1998
        esac
1846
1999
      fi
1847
2000
      if test "$pass" = dlopen; then
1858
2011
            compile_deplibs="$deplib $compile_deplibs"
1859
2012
            finalize_deplibs="$deplib $finalize_deplibs"
1860
2013
          else
1861
 
            deplibs="$deplib $deplibs"
 
2014
            compiler_flags="$compiler_flags $deplib"
1862
2015
          fi
1863
2016
          continue
1864
2017
          ;;
1977
2130
          fi
1978
2131
          case $linkmode in
1979
2132
          lib)
1980
 
            if test "$deplibs_check_method" != pass_all; then
 
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
1981
2149
              $echo
1982
2150
              $echo "*** Warning: Trying to link with static lib archive $deplib."
1983
2151
              $echo "*** I have the capability to make that library automatically link in when"
2051
2219
        # it will not redefine variables installed, or shouldnotlink
2052
2220
        installed=yes
2053
2221
        shouldnotlink=no
 
2222
        avoidtemprpath=
 
2223
 
2054
2224
 
2055
2225
        # Read the .la file
2056
2226
        case $lib in
2149
2319
            dir="$libdir"
2150
2320
            absdir="$libdir"
2151
2321
          fi
 
2322
          test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2152
2323
        else
2153
 
          dir="$ladir/$objdir"
2154
 
          absdir="$abs_ladir/$objdir"
2155
 
          # Remove this search path later
2156
 
          notinst_path="$notinst_path $abs_ladir"
 
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
2335
        fi # $installed = yes
2158
2336
        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2159
2337
 
2226
2404
          if test -n "$library_names" &&
2227
2405
             { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2228
2406
            # We need to hardcode the library path
2229
 
            if test -n "$shlibpath_var"; then
 
2407
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2230
2408
              # Make sure the rpath contains only unique directories.
2231
2409
              case "$temp_rpath " in
2232
2410
              *" $dir "*) ;;
2670
2848
              *) continue ;;
2671
2849
              esac
2672
2850
              case " $deplibs " in
 
2851
              *" $path "*) ;;
 
2852
              *) deplibs="$path $deplibs" ;;
 
2853
              esac
 
2854
              case " $deplibs " in
2673
2855
              *" $depdepl "*) ;;
2674
2856
              *) deplibs="$depdepl $deplibs" ;;
2675
2857
              esac
2676
 
              case " $deplibs " in
2677
 
              *" $path "*) ;;
2678
 
              *) deplibs="$deplibs $path" ;;
2679
 
              esac
2680
2858
            done
2681
2859
          fi # link_all_deplibs != no
2682
2860
        fi # linkmode = lib
2929
3107
            age="$number_minor"
2930
3108
            revision="$number_minor"
2931
3109
            ;;
2932
 
          *)
2933
 
            $echo "$modename: unknown library version type \`$version_type'" 1>&2
2934
 
            $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
2935
 
            exit $EXIT_FAILURE
2936
 
            ;;
2937
3110
          esac
2938
3111
          ;;
2939
3112
        no)
2947
3120
        case $current in
2948
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]) ;;
2949
3122
        *)
2950
 
          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
 
3123
          $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
2951
3124
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2952
3125
          exit $EXIT_FAILURE
2953
3126
          ;;
2956
3129
        case $revision in
2957
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]) ;;
2958
3131
        *)
2959
 
          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
 
3132
          $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
2960
3133
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2961
3134
          exit $EXIT_FAILURE
2962
3135
          ;;
2965
3138
        case $age in
2966
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]) ;;
2967
3140
        *)
2968
 
          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
 
3141
          $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
2969
3142
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2970
3143
          exit $EXIT_FAILURE
2971
3144
          ;;
2991
3164
          versuffix="$major.$age.$revision"
2992
3165
          # Darwin ld doesn't like 0 for these options...
2993
3166
          minor_current=`expr $current + 1`
2994
 
          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
 
3167
          verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
2995
3168
          ;;
2996
3169
 
2997
3170
        freebsd-aout)
3197
3370
          *-*-netbsd*)
3198
3371
            # Don't link with libc until the a.out ld.so is fixed.
3199
3372
            ;;
3200
 
          *-*-openbsd* | *-*-freebsd*)
 
3373
          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3201
3374
            # Do not include libc due to us having libc/libc_r.
3202
3375
            test "X$arg" = "X-lc" && continue
3203
3376
            ;;
3679
3852
            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3680
3853
          else
3681
3854
            gentop="$output_objdir/${outputname}x"
3682
 
            $show "${rm}r $gentop"
3683
 
            $run ${rm}r "$gentop"
3684
 
            $show "$mkdir $gentop"
3685
 
            $run $mkdir "$gentop"
3686
 
            status=$?
3687
 
            if test "$status" -ne 0 && test ! -d "$gentop"; then
3688
 
              exit $status
3689
 
            fi
3690
3855
            generated="$generated $gentop"
3691
3856
 
3692
 
            for xlib in $convenience; do
3693
 
              # Extract the objects.
3694
 
              case $xlib in
3695
 
              [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3696
 
              *) xabs=`pwd`"/$xlib" ;;
3697
 
              esac
3698
 
              xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3699
 
              xdir="$gentop/$xlib"
3700
 
 
3701
 
              $show "${rm}r $xdir"
3702
 
              $run ${rm}r "$xdir"
3703
 
              $show "$mkdir $xdir"
3704
 
              $run $mkdir "$xdir"
3705
 
              status=$?
3706
 
              if test "$status" -ne 0 && test ! -d "$xdir"; then
3707
 
                exit $status
3708
 
              fi
3709
 
              # We will extract separately just the conflicting names and we will no
3710
 
              # longer touch any unique names. It is faster to leave these extract
3711
 
              # automatically by $AR in one run.
3712
 
              $show "(cd $xdir && $AR x $xabs)"
3713
 
              $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3714
 
              if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
3715
 
                :
3716
 
              else
3717
 
                $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
3718
 
                $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
3719
 
                $AR t "$xabs" | sort | uniq -cd | while read -r count name
3720
 
                do
3721
 
                  i=1
3722
 
                  while test "$i" -le "$count"
3723
 
                  do
3724
 
                   # Put our $i before any first dot (extension)
3725
 
                   # Never overwrite any file
3726
 
                   name_to="$name"
3727
 
                   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
3728
 
                   do
3729
 
                     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
3730
 
                   done
3731
 
                   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
3732
 
                   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
3733
 
                   i=`expr $i + 1`
3734
 
                  done
3735
 
                done
3736
 
              fi
3737
 
 
3738
 
              libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3739
 
            done
 
3857
            func_extract_archives $gentop $convenience
 
3858
            libobjs="$libobjs $func_extract_archives_result"
3740
3859
          fi
3741
3860
        fi
3742
 
 
 
3861
        
3743
3862
        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3744
3863
          eval flag=\"$thread_safe_flag_spec\"
3745
3864
          linker_flags="$linker_flags $flag"
3788
3907
            save_libobjs=$libobjs
3789
3908
          fi
3790
3909
          save_output=$output
 
3910
          output_la=`$echo "X$output" | $Xsed -e "$basename"`
3791
3911
 
3792
3912
          # Clear the reloadable object creation command queue and
3793
3913
          # initialize k to one.
3797
3917
          delfiles=
3798
3918
          last_robj=
3799
3919
          k=1
3800
 
          output=$output_objdir/$save_output-${k}.$objext
 
3920
          output=$output_objdir/$output_la-${k}.$objext
3801
3921
          # Loop over the list of objects to be linked.
3802
3922
          for obj in $save_libobjs
3803
3923
          do
3817
3937
                # the last one created.
3818
3938
                eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
3819
3939
              fi
3820
 
              last_robj=$output_objdir/$save_output-${k}.$objext
 
3940
              last_robj=$output_objdir/$output_la-${k}.$objext
3821
3941
              k=`expr $k + 1`
3822
 
              output=$output_objdir/$save_output-${k}.$objext
 
3942
              output=$output_objdir/$output_la-${k}.$objext
3823
3943
              objlist=$obj
3824
3944
              len=1
3825
3945
            fi
3839
3959
            eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
3840
3960
          fi
3841
3961
 
3842
 
          # Set up a command to remove the reloadale object files
 
3962
          # Set up a command to remove the reloadable object files
3843
3963
          # after they are used.
3844
3964
          i=0
3845
3965
          while test "$i" -lt "$k"
3846
3966
          do
3847
3967
            i=`expr $i + 1`
3848
 
            delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
 
3968
            delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
3849
3969
          done
3850
3970
 
3851
3971
          $echo "creating a temporary reloadable object file: $output"
3977
4097
          eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3978
4098
        else
3979
4099
          gentop="$output_objdir/${obj}x"
3980
 
          $show "${rm}r $gentop"
3981
 
          $run ${rm}r "$gentop"
3982
 
          $show "$mkdir $gentop"
3983
 
          $run $mkdir "$gentop"
3984
 
          status=$?
3985
 
          if test "$status" -ne 0 && test ! -d "$gentop"; then
3986
 
            exit $status
3987
 
          fi
3988
4100
          generated="$generated $gentop"
3989
4101
 
3990
 
          for xlib in $convenience; do
3991
 
            # Extract the objects.
3992
 
            case $xlib in
3993
 
            [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3994
 
            *) xabs=`pwd`"/$xlib" ;;
3995
 
            esac
3996
 
            xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3997
 
            xdir="$gentop/$xlib"
3998
 
 
3999
 
            $show "${rm}r $xdir"
4000
 
            $run ${rm}r "$xdir"
4001
 
            $show "$mkdir $xdir"
4002
 
            $run $mkdir "$xdir"
4003
 
            status=$?
4004
 
            if test "$status" -ne 0 && test ! -d "$xdir"; then
4005
 
              exit $status
4006
 
            fi
4007
 
            # We will extract separately just the conflicting names and we will no
4008
 
            # longer touch any unique names. It is faster to leave these extract
4009
 
            # automatically by $AR in one run.
4010
 
            $show "(cd $xdir && $AR x $xabs)"
4011
 
            $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4012
 
            if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4013
 
              :
4014
 
            else
4015
 
              $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4016
 
              $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4017
 
              $AR t "$xabs" | sort | uniq -cd | while read -r count name
4018
 
              do
4019
 
                i=1
4020
 
                while test "$i" -le "$count"
4021
 
                do
4022
 
                 # Put our $i before any first dot (extension)
4023
 
                 # Never overwrite any file
4024
 
                 name_to="$name"
4025
 
                 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4026
 
                 do
4027
 
                   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4028
 
                 done
4029
 
                 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4030
 
                 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4031
 
                 i=`expr $i + 1`
4032
 
                done
4033
 
              done
4034
 
            fi
4035
 
 
4036
 
            reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4037
 
          done
 
4102
          func_extract_archives $gentop $convenience
 
4103
          reload_conv_objs="$reload_objs $func_extract_archives_result"
4038
4104
        fi
4039
4105
      fi
4040
4106
 
4296
4362
 
4297
4363
            # Prepare the list of exported symbols
4298
4364
            if test -z "$export_symbols"; then
4299
 
              export_symbols="$output_objdir/$output.exp"
 
4365
              export_symbols="$output_objdir/$outputname.exp"
4300
4366
              $run $rm $export_symbols
4301
4367
              $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4302
4368
            else
4303
 
              $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4304
 
              $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
 
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'
4305
4371
              $run eval 'mv "$nlist"T "$nlist"'
4306
4372
            fi
4307
4373
          fi
4353
4419
#endif
4354
4420
 
4355
4421
/* 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" "\
4356
4435
const struct {
 
4436
"
 
4437
              ;;
 
4438
            esac
 
4439
 
 
4440
 
 
4441
          $echo >> "$output_objdir/$dlsyms" "\
4357
4442
  const char *name;
4358
4443
  lt_ptr address;
4359
4444
}
4582
4667
        esac
4583
4668
        case $host in
4584
4669
          *cygwin* | *mingw* )
4585
 
            cwrappersource=`$echo ${objdir}/lt-${output}.c`
 
4670
            cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
4586
4671
            cwrapper=`$echo ${output}.exe`
4587
4672
            $rm $cwrappersource $cwrapper
4588
4673
            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4815
4900
 
4816
4901
# The HP-UX ksh and POSIX shell print the target directory to stdout
4817
4902
# if CDPATH is set.
4818
 
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
 
4903
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4819
4904
 
4820
4905
relink_command=\"$relink_command\"
4821
4906
 
4992
5077
 
4993
5078
      if test -n "$addlibs"; then
4994
5079
        gentop="$output_objdir/${outputname}x"
4995
 
        $show "${rm}r $gentop"
4996
 
        $run ${rm}r "$gentop"
4997
 
        $show "$mkdir $gentop"
4998
 
        $run $mkdir "$gentop"
4999
 
        status=$?
5000
 
        if test "$status" -ne 0 && test ! -d "$gentop"; then
5001
 
          exit $status
5002
 
        fi
5003
5080
        generated="$generated $gentop"
5004
5081
 
5005
 
        # Add in members from convenience archives.
5006
 
        for xlib in $addlibs; do
5007
 
          # Extract the objects.
5008
 
          case $xlib in
5009
 
          [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5010
 
          *) xabs=`pwd`"/$xlib" ;;
5011
 
          esac
5012
 
          xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5013
 
          xdir="$gentop/$xlib"
5014
 
 
5015
 
          $show "${rm}r $xdir"
5016
 
          $run ${rm}r "$xdir"
5017
 
          $show "$mkdir $xdir"
5018
 
          $run $mkdir "$xdir"
5019
 
          status=$?
5020
 
          if test "$status" -ne 0 && test ! -d "$xdir"; then
5021
 
            exit $status
5022
 
          fi
5023
 
          # We will extract separately just the conflicting names and we will no
5024
 
          # longer touch any unique names. It is faster to leave these extract
5025
 
          # automatically by $AR in one run.
5026
 
          $show "(cd $xdir && $AR x $xabs)"
5027
 
          $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5028
 
          if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5029
 
            :
5030
 
          else
5031
 
            $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5032
 
            $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5033
 
            $AR t "$xabs" | sort | uniq -cd | while read -r count name
5034
 
            do
5035
 
              i=1
5036
 
              while test "$i" -le "$count"
5037
 
              do
5038
 
               # Put our $i before any first dot (extension)
5039
 
               # Never overwrite any file
5040
 
               name_to="$name"
5041
 
               while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5042
 
               do
5043
 
                 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5044
 
               done
5045
 
               $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5046
 
               $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5047
 
               i=`expr $i + 1`
5048
 
              done
5049
 
            done
5050
 
          fi
5051
 
 
5052
 
          oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5053
 
        done
 
5082
        func_extract_archives $gentop $addlibs
 
5083
        oldobjs="$oldobjs $func_extract_archives_result"
5054
5084
      fi
5055
5085
 
5056
5086
      # Do each command in the archive commands.
5057
5087
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5058
5088
       cmds=$old_archive_from_new_cmds
5059
5089
      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
 
5060
5147
        eval cmds=\"$old_archive_cmds\"
5061
5148
 
5062
5149
        if len=`expr "X$cmds" : ".*"` &&
5070
5157
          objlist=
5071
5158
          concat_cmds=
5072
5159
          save_oldobjs=$oldobjs
5073
 
          # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5074
 
          # encoded into archives.  This makes 'ar r' malfunction in
5075
 
          # this piecewise linking case whenever conflicting object
5076
 
          # names appear in distinct ar calls; check, warn and compensate.
5077
 
            if (for obj in $save_oldobjs
5078
 
            do
5079
 
              $echo "X$obj" | $Xsed -e 's%^.*/%%'
5080
 
            done | sort | sort -uc >/dev/null 2>&1); then
5081
 
            :
5082
 
          else
5083
 
            $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5084
 
            $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5085
 
            AR_FLAGS=cq
5086
 
          fi
 
5160
 
5087
5161
          # Is there a better way of finding the last object in the list?
5088
5162
          for obj in $save_oldobjs
5089
5163
          do
5295
5369
      # Aesthetically quote it.
5296
5370
      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5297
5371
      case $arg in
5298
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
 
5372
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5299
5373
        arg="\"$arg\""
5300
5374
        ;;
5301
5375
      esac
5311
5385
    # Aesthetically quote it.
5312
5386
    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5313
5387
    case $arg in
5314
 
    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*)
 
5388
    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5315
5389
      arg="\"$arg\""
5316
5390
      ;;
5317
5391
    esac
5359
5433
      # Aesthetically quote the argument.
5360
5434
      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5361
5435
      case $arg in
5362
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
 
5436
      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
5363
5437
        arg="\"$arg\""
5364
5438
        ;;
5365
5439
      esac
6398
6472
$echo
6399
6473
$echo "Try \`$modename --help' for more information about other modes."
6400
6474
 
6401
 
exit $EXIT_SUCCESS
 
6475
exit $?
6402
6476
 
6403
6477
# The TAGs below are defined such that we never get into a situation
6404
6478
# in which we disable both kinds of libraries.  Given conflicting