~ubuntu-branches/ubuntu/natty/ecasound2.2/natty

« back to all changes in this revision

Viewing changes to libtool

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2007-02-04 11:32:59 UTC
  • mfrom: (2.1.7 feisty)
  • Revision ID: james.westby@ubuntu.com-20070204113259-uthtjkh4t90fyukk
Tags: 2.4.4-6
Bug fix: "libecasound2.2-dev: missing dependency on libasound2-dev",
thanks to Steve Langasek (Closes: #409438).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
 
3
3
# libtoolT - Provide generalized library-building support services.
4
 
# Generated automatically by  (GNU ecasound 2.4.1)
 
4
# Generated automatically by  (GNU ecasound 2.4.4)
5
5
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
6
6
#
7
7
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
22
22
#
23
23
# You should have received a copy of the GNU General Public License
24
24
# along with this program; if not, write to the Free Software
25
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
25
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26
26
#
27
27
# As a special exception to the GNU General Public License, if you
28
28
# distribute this file as part of a program that contains a
33
33
SED="/bin/sed"
34
34
 
35
35
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
36
 
Xsed="/bin/sed -e s/^X//"
 
36
Xsed="/bin/sed -e 1s/^X//"
37
37
 
38
38
# The HP-UX ksh and POSIX shell print the target directory to stdout
39
39
# if CDPATH is set.
40
 
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
40
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
41
41
 
42
42
# The names of the tagged configurations supported by this script.
43
 
available_tags=" CXX"
 
43
available_tags=" CXX F77"
44
44
 
45
45
# ### BEGIN LIBTOOL CONFIG
46
46
 
47
 
# Libtool was configured on host atoron:
 
47
# Libtool was configured on host dancer64:
48
48
 
49
49
# Shell to use when invoking shell scripts.
50
50
SHELL="/bin/sh"
66
66
 
67
67
# The host system.
68
68
host_alias=
69
 
host=i686-pc-linux-gnu
 
69
host=x86_64-unknown-linux-gnu
 
70
host_os=linux-gnu
 
71
 
 
72
# The build system.
 
73
build_alias=
 
74
build=x86_64-unknown-linux-gnu
 
75
build_os=linux-gnu
70
76
 
71
77
# An echo program that does not interpret backslashes.
72
78
echo="echo"
78
84
# A C compiler.
79
85
LTCC="gcc"
80
86
 
 
87
# LTCC compiler flags.
 
88
LTCFLAGS="-g -O2 -D_REENTRANT -DNDEBUG -ffast-math -fstrict-aliasing -funroll-loops"
 
89
 
81
90
# A language-specific compiler.
82
91
CC="gcc"
83
92
 
85
94
with_gcc=yes
86
95
 
87
96
# An ERE matcher.
88
 
EGREP="grep -E"
 
97
EGREP="/bin/grep -E"
89
98
 
90
99
# The linker used to build libraries.
91
 
LD="/usr/bin/ld"
 
100
LD="/usr/bin/ld -m elf_x86_64"
92
101
 
93
102
# Whether we need hard or soft links.
94
103
LN_S="ln -s"
143
152
# Does compiler simultaneously support -c and -o options?
144
153
compiler_c_o="yes"
145
154
 
146
 
# Must we lock files when doing compilation ?
 
155
# Must we lock files when doing compilation?
147
156
need_locks="no"
148
157
 
149
158
# Do we need the lib prefix for modules?
192
201
# Commands used to build and install an old-style archive.
193
202
RANLIB="ranlib"
194
203
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
195
 
old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
 
204
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
196
205
old_postuninstall_cmds=""
197
206
 
198
207
# Create an old-style archive from a shared archive.
204
213
# Commands used to build and install a shared archive.
205
214
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
206
215
archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
207
 
cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
208
 
\$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
209
 
        \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
 
216
  cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
 
217
  \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
 
218
          \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
210
219
postinstall_cmds=""
211
220
postuninstall_cmds=""
212
221
 
257
266
finish_eval=""
258
267
 
259
268
# Take the output of nm and produce a listing of raw symbols and C names.
260
 
global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][      ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
 
269
global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][      ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
261
270
 
262
271
# Transform the output of nm in a proper C declaration
263
272
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
310
319
 
311
320
# Variables whose values should be saved in libtool wrapper scripts and
312
321
# restored at relink time.
313
 
variables_saved_for_relink="PATH  LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
322
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
314
323
 
315
324
# Whether libtool must link a program against all its dependency libraries.
316
325
link_all_deplibs=no
317
326
 
318
327
# Compile-time system search path for libraries
319
 
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.5/ /usr/lib/gcc/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../ /lib/i486-linux/3.3.5/ /lib/ /usr/lib/i486-linux/3.3.5/ /usr/lib/"
 
328
sys_lib_search_path_spec=" /usr/lib/gcc/x86_64-linux-gnu/4.1.2/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/4.1.2/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/lib/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../x86_64-linux-gnu/4.1.2/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../ /lib/x86_64-linux-gnu/4.1.2/ /lib/ /usr/lib/x86_64-linux-gnu/4.1.2/ /usr/lib/"
320
329
 
321
330
# Run-time system search path for libraries
322
 
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib "
 
331
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/ /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu "
323
332
 
324
333
# Fix the shell variable $srcfile for the compiler.
325
334
fix_srcfile_path=""
344
353
# ltmain.sh - Provide generalized library-building support services.
345
354
# NOTE: Changing this file will not affect anything until you rerun configure.
346
355
#
347
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
 
356
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
348
357
# Free Software Foundation, Inc.
349
358
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
350
359
#
360
369
#
361
370
# You should have received a copy of the GNU General Public License
362
371
# along with this program; if not, write to the Free Software
363
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
372
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
364
373
#
365
374
# As a special exception to the GNU General Public License, if you
366
375
# distribute this file as part of a program that contains a
386
395
 
387
396
PROGRAM=ltmain.sh
388
397
PACKAGE=libtool
389
 
VERSION=1.5.6
390
 
TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 224 $"
 
398
VERSION="1.5.22 Debian 1.5.22-4"
 
399
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
391
400
 
 
401
# See if we are running on zsh, and set the options which allow our
 
402
# commands through without removal of \ escapes.
 
403
if test -n "${ZSH_VERSION+set}" ; then
 
404
  setopt NO_GLOB_SUBST
 
405
fi
392
406
 
393
407
# Check that we have a working $echo.
394
408
if test "X$1" = X--no-reexec; then
426
440
Xsed="${SED}"' -e 1s/^X//'
427
441
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
428
442
# test EBCDIC or ASCII
429
 
case `echo A|tr A '\301'` in
430
 
 A) # EBCDIC based system
431
 
  SP2NL="tr '\100' '\n'"
432
 
  NL2SP="tr '\r\n' '\100\100'"
 
443
case `echo X|tr X '\101'` in
 
444
 A) # ASCII based system
 
445
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
 
446
  SP2NL='tr \040 \012'
 
447
  NL2SP='tr \015\012 \040\040'
433
448
  ;;
434
 
 *) # Assume ASCII based system
435
 
  SP2NL="tr '\040' '\012'"
436
 
  NL2SP="tr '\015\012' '\040\040'"
 
449
 *) # EBCDIC based system
 
450
  SP2NL='tr \100 \n'
 
451
  NL2SP='tr \r\n \100\100'
437
452
  ;;
438
453
esac
439
454
 
450
465
fi
451
466
 
452
467
# Make sure IFS has a sensible default
453
 
: ${IFS="       
454
 
"}
 
468
lt_nl='
 
469
'
 
470
IFS="   $lt_nl"
455
471
 
456
472
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
457
473
  $echo "$modename: not configured to build any kind of library" 1>&2
468
484
show="$echo"
469
485
show_help=
470
486
execute_dlfiles=
 
487
duplicate_deps=no
 
488
preserve_args=
471
489
lo2o="s/\\.lo\$/.${objext}/"
472
490
o2lo="s/\\.${objext}\$/.lo/"
473
491
 
475
493
# Shell function definitions:
476
494
# This seems to be the best place for them
477
495
 
 
496
# func_mktempdir [string]
 
497
# Make a temporary directory that won't clash with other running
 
498
# libtool processes, and avoids race conditions if possible.  If
 
499
# given, STRING is the basename for that directory.
 
500
func_mktempdir ()
 
501
{
 
502
    my_template="${TMPDIR-/tmp}/${1-$progname}"
 
503
 
 
504
    if test "$run" = ":"; then
 
505
      # Return a directory name, but don't create it in dry-run mode
 
506
      my_tmpdir="${my_template}-$$"
 
507
    else
 
508
 
 
509
      # If mktemp works, use that first and foremost
 
510
      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
 
511
 
 
512
      if test ! -d "$my_tmpdir"; then
 
513
        # Failing that, at least try and use $RANDOM to avoid a race
 
514
        my_tmpdir="${my_template}-${RANDOM-0}$$"
 
515
 
 
516
        save_mktempdir_umask=`umask`
 
517
        umask 0077
 
518
        $mkdir "$my_tmpdir"
 
519
        umask $save_mktempdir_umask
 
520
      fi
 
521
 
 
522
      # If we're not in dry-run mode, bomb out on failure
 
523
      test -d "$my_tmpdir" || {
 
524
        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
 
525
        exit $EXIT_FAILURE
 
526
      }
 
527
    fi
 
528
 
 
529
    $echo "X$my_tmpdir" | $Xsed
 
530
}
 
531
 
 
532
 
478
533
# func_win32_libid arg
479
534
# return the library type of file 'arg'
480
535
#
481
536
# Need a lot of goo to handle *both* DLLs and import libs
482
537
# Has to be a shell function in order to 'eat' the argument
483
538
# that is supplied when $file_magic_command is called.
484
 
func_win32_libid () {
 
539
func_win32_libid ()
 
540
{
485
541
  win32_libid_type="unknown"
486
542
  win32_fileres=`file -L $1 2>/dev/null`
487
543
  case $win32_fileres in
492
548
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
493
549
      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
494
550
      win32_nmres=`eval $NM -f posix -A $1 | \
495
 
        sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
496
 
      if test "X$win32_nmres" = "Ximport" ; then
497
 
        win32_libid_type="x86 archive import"
498
 
      else
499
 
        win32_libid_type="x86 archive static"
500
 
      fi
 
551
        $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
 
552
      case $win32_nmres in
 
553
      import*)  win32_libid_type="x86 archive import";;
 
554
      *)        win32_libid_type="x86 archive static";;
 
555
      esac
501
556
    fi
502
557
    ;;
503
558
  *DLL*)
521
576
# Only attempt this if the compiler in the base compile
522
577
# command doesn't match the default compiler.
523
578
# arg is usually of the form 'gcc ...'
524
 
func_infer_tag () {
 
579
func_infer_tag ()
 
580
{
525
581
    if test -n "$available_tags" && test -z "$tagname"; then
526
582
      CC_quoted=
527
583
      for arg in $CC; do
578
634
      esac
579
635
    fi
580
636
}
 
637
 
 
638
 
 
639
# func_extract_an_archive dir oldlib
 
640
func_extract_an_archive ()
 
641
{
 
642
    f_ex_an_ar_dir="$1"; shift
 
643
    f_ex_an_ar_oldlib="$1"
 
644
 
 
645
    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
 
646
    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
 
647
    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
 
648
     :
 
649
    else
 
650
      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
 
651
      exit $EXIT_FAILURE
 
652
    fi
 
653
}
 
654
 
 
655
# func_extract_archives gentop oldlib ...
 
656
func_extract_archives ()
 
657
{
 
658
    my_gentop="$1"; shift
 
659
    my_oldlibs=${1+"$@"}
 
660
    my_oldobjs=""
 
661
    my_xlib=""
 
662
    my_xabs=""
 
663
    my_xdir=""
 
664
    my_status=""
 
665
 
 
666
    $show "${rm}r $my_gentop"
 
667
    $run ${rm}r "$my_gentop"
 
668
    $show "$mkdir $my_gentop"
 
669
    $run $mkdir "$my_gentop"
 
670
    my_status=$?
 
671
    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
 
672
      exit $my_status
 
673
    fi
 
674
 
 
675
    for my_xlib in $my_oldlibs; do
 
676
      # Extract the objects.
 
677
      case $my_xlib in
 
678
        [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
 
679
        *) my_xabs=`pwd`"/$my_xlib" ;;
 
680
      esac
 
681
      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
 
682
      my_xdir="$my_gentop/$my_xlib"
 
683
 
 
684
      $show "${rm}r $my_xdir"
 
685
      $run ${rm}r "$my_xdir"
 
686
      $show "$mkdir $my_xdir"
 
687
      $run $mkdir "$my_xdir"
 
688
      exit_status=$?
 
689
      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
 
690
        exit $exit_status
 
691
      fi
 
692
      case $host in
 
693
      *-darwin*)
 
694
        $show "Extracting $my_xabs"
 
695
        # Do not bother doing anything if just a dry run
 
696
        if test -z "$run"; then
 
697
          darwin_orig_dir=`pwd`
 
698
          cd $my_xdir || exit $?
 
699
          darwin_archive=$my_xabs
 
700
          darwin_curdir=`pwd`
 
701
          darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
 
702
          darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
 
703
          if test -n "$darwin_arches"; then 
 
704
            darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
 
705
            darwin_arch=
 
706
            $show "$darwin_base_archive has multiple architectures $darwin_arches"
 
707
            for darwin_arch in  $darwin_arches ; do
 
708
              mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
 
709
              lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
 
710
              cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
 
711
              func_extract_an_archive "`pwd`" "${darwin_base_archive}"
 
712
              cd "$darwin_curdir"
 
713
              $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
 
714
            done # $darwin_arches
 
715
      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
 
716
            darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
 
717
            darwin_file=
 
718
            darwin_files=
 
719
            for darwin_file in $darwin_filelist; do
 
720
              darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
 
721
              lipo -create -output "$darwin_file" $darwin_files
 
722
            done # $darwin_filelist
 
723
            ${rm}r unfat-$$
 
724
            cd "$darwin_orig_dir"
 
725
          else
 
726
            cd "$darwin_orig_dir"
 
727
            func_extract_an_archive "$my_xdir" "$my_xabs"
 
728
          fi # $darwin_arches
 
729
        fi # $run
 
730
        ;;
 
731
      *)
 
732
        func_extract_an_archive "$my_xdir" "$my_xabs"
 
733
        ;;
 
734
      esac
 
735
      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
 
736
    done
 
737
    func_extract_archives_result="$my_oldobjs"
 
738
}
581
739
# End of Shell function definitions
582
740
#####################################
583
741
 
584
742
# Darwin sucks
585
743
eval std_shrext=\"$shrext_cmds\"
586
744
 
 
745
disable_libs=no
 
746
 
587
747
# Parse our command line options once, thoroughly.
588
748
while test "$#" -gt 0
589
749
do
648
808
  --version)
649
809
    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
650
810
    $echo
651
 
    $echo "Copyright (C) 2003  Free Software Foundation, Inc."
 
811
    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
652
812
    $echo "This is free software; see the source for copying conditions.  There is NO"
653
813
    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
654
 
    exit $EXIT_SUCCESS
 
814
    exit $?
655
815
    ;;
656
816
 
657
817
  --config)
660
820
    for tagname in $taglist; do
661
821
      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
662
822
    done
663
 
    exit $EXIT_SUCCESS
 
823
    exit $?
664
824
    ;;
665
825
 
666
826
  --debug)
685
845
    else
686
846
      $echo "disable static libraries"
687
847
    fi
688
 
    exit $EXIT_SUCCESS
 
848
    exit $?
689
849
    ;;
690
850
 
691
851
  --finish) mode="finish" ;;
700
860
    preserve_args="$preserve_args $arg"
701
861
    ;;
702
862
 
703
 
  --tag) prevopt="--tag" prev=tag ;;
 
863
  --tag)
 
864
    prevopt="--tag"
 
865
    prev=tag
 
866
    preserve_args="$preserve_args --tag"
 
867
    ;;
704
868
  --tag=*)
705
869
    set tag "$optarg" ${1+"$@"}
706
870
    shift
732
896
  exit $EXIT_FAILURE
733
897
fi
734
898
 
 
899
case $disable_libs in
 
900
no) 
 
901
  ;;
 
902
shared)
 
903
  build_libtool_libs=no
 
904
  build_old_libs=yes
 
905
  ;;
 
906
static)
 
907
  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
 
908
  ;;
 
909
esac
 
910
 
735
911
# If this variable is set in any of the actions, the command in it
736
912
# will be execed at the end.  This prevents here-documents from being
737
913
# left over by shells.
742
918
  # Infer the operation mode.
743
919
  if test -z "$mode"; then
744
920
    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
745
 
    $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
 
921
    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
746
922
    case $nonopt in
747
923
    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
748
924
      mode=link
808
984
 
809
985
    for arg
810
986
    do
811
 
      case "$arg_mode" in
 
987
      case $arg_mode in
812
988
      arg  )
813
989
        # do not "continue".  Instead, add this to base_compile
814
990
        lastarg="$arg"
890
1066
      case $lastarg in
891
1067
      # Double-quote args containing other shell metacharacters.
892
1068
      # Many Bourne shells cannot handle close brackets correctly
893
 
      # in scan sets, so we specify it separately.
 
1069
      # in scan sets, and some SunOS ksh mistreat backslash-escaping
 
1070
      # in scan sets (worked around with variable expansion),
 
1071
      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
 
1072
      # at all, so we specify them separately.
894
1073
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
895
1074
        lastarg="\"$lastarg\""
896
1075
        ;;
964
1143
      esac
965
1144
    done
966
1145
 
 
1146
    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
 
1147
    case $qlibobj in
 
1148
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
 
1149
        qlibobj="\"$qlibobj\"" ;;
 
1150
    esac
 
1151
    test "X$libobj" != "X$qlibobj" \
 
1152
        && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"'  &()|`$[]' \
 
1153
        && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
967
1154
    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
968
1155
    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
969
1156
    if test "X$xdir" = "X$obj"; then
1036
1223
        $run $rm $removelist
1037
1224
        exit $EXIT_FAILURE
1038
1225
      fi
1039
 
      $echo $srcfile > "$lockfile"
 
1226
      $echo "$srcfile" > "$lockfile"
1040
1227
    fi
1041
1228
 
1042
1229
    if test -n "$fix_srcfile_path"; then
1043
1230
      eval srcfile=\"$fix_srcfile_path\"
1044
1231
    fi
 
1232
    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
 
1233
    case $qsrcfile in
 
1234
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
 
1235
      qsrcfile="\"$qsrcfile\"" ;;
 
1236
    esac
1045
1237
 
1046
1238
    $run $rm "$libobj" "${libobj}T"
1047
1239
 
1063
1255
      fbsd_hideous_sh_bug=$base_compile
1064
1256
 
1065
1257
      if test "$pic_mode" != no; then
1066
 
        command="$base_compile $srcfile $pic_flag"
 
1258
        command="$base_compile $qsrcfile $pic_flag"
1067
1259
      else
1068
1260
        # Don't build PIC code
1069
 
        command="$base_compile $srcfile"
 
1261
        command="$base_compile $qsrcfile"
1070
1262
      fi
1071
1263
 
1072
1264
      if test ! -d "${xdir}$objdir"; then
1073
1265
        $show "$mkdir ${xdir}$objdir"
1074
1266
        $run $mkdir ${xdir}$objdir
1075
 
        status=$?
1076
 
        if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1077
 
          exit $status
 
1267
        exit_status=$?
 
1268
        if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
 
1269
          exit $exit_status
1078
1270
        fi
1079
1271
      fi
1080
1272
 
1146
1338
    if test "$build_old_libs" = yes; then
1147
1339
      if test "$pic_mode" != yes; then
1148
1340
        # Don't build PIC code
1149
 
        command="$base_compile $srcfile"
 
1341
        command="$base_compile $qsrcfile"
1150
1342
      else
1151
 
        command="$base_compile $srcfile $pic_flag"
 
1343
        command="$base_compile $qsrcfile $pic_flag"
1152
1344
      fi
1153
1345
      if test "$compiler_c_o" = yes; then
1154
1346
        command="$command -o $obj"
1277
1469
    no_install=no
1278
1470
    objs=
1279
1471
    non_pic_objects=
 
1472
    notinst_path= # paths that contain not-installed libtool libraries
1280
1473
    precious_files_regex=
1281
1474
    prefer_static_libs=no
1282
1475
    preload=no
1305
1498
          if test -n "$link_static_flag"; then
1306
1499
            dlopen_self=$dlopen_self_static
1307
1500
          fi
 
1501
          prefer_static_libs=yes
1308
1502
        else
1309
1503
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
1310
1504
            dlopen_self=$dlopen_self_static
1311
1505
          fi
 
1506
          prefer_static_libs=built
1312
1507
        fi
1313
1508
        build_libtool_libs=no
1314
1509
        build_old_libs=yes
1315
 
        prefer_static_libs=yes
1316
1510
        break
1317
1511
        ;;
1318
1512
      esac
1487
1681
                  if test -z "$pic_object" || test "$pic_object" = none ; then
1488
1682
                    arg="$non_pic_object"
1489
1683
                  fi
 
1684
                else
 
1685
                  # If the PIC object exists, use it instead.
 
1686
                  # $xdir was prepended to $pic_object above.
 
1687
                  non_pic_object="$pic_object"
 
1688
                  non_pic_objects="$non_pic_objects $non_pic_object"
1490
1689
                fi
1491
1690
              else
1492
1691
                # Only an error if not doing a dry-run.
1570
1769
          prev=
1571
1770
          continue
1572
1771
          ;;
 
1772
        darwin_framework|darwin_framework_skip)
 
1773
          test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
 
1774
          compile_command="$compile_command $arg"
 
1775
          finalize_command="$finalize_command $arg"
 
1776
          prev=
 
1777
          continue
 
1778
          ;;
1573
1779
        *)
1574
1780
          eval "$prev=\"\$arg\""
1575
1781
          prev=
1628
1834
        continue
1629
1835
        ;;
1630
1836
 
 
1837
      -framework|-arch|-isysroot)
 
1838
        case " $CC " in
 
1839
          *" ${arg} ${1} "* | *" ${arg} ${1} "*) 
 
1840
                prev=darwin_framework_skip ;;
 
1841
          *) compiler_flags="$compiler_flags $arg"
 
1842
             prev=darwin_framework ;;
 
1843
        esac
 
1844
        compile_command="$compile_command $arg"
 
1845
        finalize_command="$finalize_command $arg"
 
1846
        continue
 
1847
        ;;
 
1848
 
1631
1849
      -inst-prefix-dir)
1632
1850
        prev=inst_prefix
1633
1851
        continue
1654
1872
          absdir=`cd "$dir" && pwd`
1655
1873
          if test -z "$absdir"; then
1656
1874
            $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1657
 
            exit $EXIT_FAILURE
 
1875
            absdir="$dir"
 
1876
            notinst_path="$notinst_path $dir"
1658
1877
          fi
1659
1878
          dir="$absdir"
1660
1879
          ;;
1668
1887
        esac
1669
1888
        case $host in
1670
1889
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
 
1890
          testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1671
1891
          case :$dllsearchpath: in
1672
1892
          *":$dir:"*) ;;
1673
1893
          *) dllsearchpath="$dllsearchpath:$dir";;
1674
1894
          esac
 
1895
          case :$dllsearchpath: in
 
1896
          *":$testbindir:"*) ;;
 
1897
          *) dllsearchpath="$dllsearchpath:$testbindir";;
 
1898
          esac
1675
1899
          ;;
1676
1900
        esac
1677
1901
        continue
1680
1904
      -l*)
1681
1905
        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1682
1906
          case $host in
1683
 
          *-*-cygwin* | *-*-pw32* | *-*-beos*)
 
1907
          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1684
1908
            # These systems don't actually have a C or math library (as such)
1685
1909
            continue
1686
1910
            ;;
1687
 
          *-*-mingw* | *-*-os2*)
 
1911
          *-*-os2*)
1688
1912
            # These systems don't actually have a C library (as such)
1689
1913
            test "X$arg" = "X-lc" && continue
1690
1914
            ;;
1691
 
          *-*-openbsd* | *-*-freebsd*)
 
1915
          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1692
1916
            # Do not include libc due to us having libc/libc_r.
1693
1917
            test "X$arg" = "X-lc" && continue
1694
1918
            ;;
1696
1920
            # Rhapsody C and math libraries are in the System framework
1697
1921
            deplibs="$deplibs -framework System"
1698
1922
            continue
 
1923
            ;;
 
1924
          *-*-sco3.2v5* | *-*-sco5v6*)
 
1925
            # Causes problems with __ctype
 
1926
            test "X$arg" = "X-lc" && continue
 
1927
            ;;
 
1928
          *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
 
1929
            # Compiler inserts libc in the correct place for threads to work
 
1930
            test "X$arg" = "X-lc" && continue
 
1931
            ;;
1699
1932
          esac
1700
1933
        elif test "X$arg" = "X-lc_r"; then
1701
1934
         case $host in
1702
 
         *-*-openbsd* | *-*-freebsd*)
 
1935
         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1703
1936
           # Do not include libc_r directly, use -pthread flag.
1704
1937
           continue
1705
1938
           ;;
1709
1942
        continue
1710
1943
        ;;
1711
1944
 
 
1945
      # Tru64 UNIX uses -model [arg] to determine the layout of C++
 
1946
      # classes, name mangling, and exception handling.
 
1947
      -model)
 
1948
        compile_command="$compile_command $arg"
 
1949
        compiler_flags="$compiler_flags $arg"
 
1950
        finalize_command="$finalize_command $arg"
 
1951
        prev=xcompiler
 
1952
        continue
 
1953
        ;;
 
1954
 
1712
1955
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1713
 
        deplibs="$deplibs $arg"
 
1956
        compiler_flags="$compiler_flags $arg"
 
1957
        compile_command="$compile_command $arg"
 
1958
        finalize_command="$finalize_command $arg"
1714
1959
        continue
1715
1960
        ;;
1716
1961
 
1719
1964
        continue
1720
1965
        ;;
1721
1966
 
1722
 
      # gcc -m* arguments should be passed to the linker via $compiler_flags
1723
 
      # in order to pass architecture information to the linker
1724
 
      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
1725
 
      # but this is not reliable with gcc because gcc may use -mfoo to
1726
 
      # select a different linker, different libraries, etc, while
1727
 
      # -Wl,-mfoo simply passes -mfoo to the linker.
1728
 
      -m*)
 
1967
      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
 
1968
      # -r[0-9][0-9]* specifies the processor on the SGI compiler
 
1969
      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
 
1970
      # +DA*, +DD* enable 64-bit mode on the HP compiler
 
1971
      # -q* pass through compiler args for the IBM compiler
 
1972
      # -m* pass through architecture-specific compiler args for GCC
 
1973
      # -m*, -t[45]*, -txscale* pass through architecture-specific
 
1974
      # compiler args for GCC
 
1975
      # -pg pass through profiling flag for GCC
 
1976
      # @file GCC response files
 
1977
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
 
1978
      -t[45]*|-txscale*|@*)
 
1979
 
1729
1980
        # Unknown arguments in both finalize_command and compile_command need
1730
1981
        # to be aesthetically quoted because they are evaled later.
1731
1982
        arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1736
1987
        esac
1737
1988
        compile_command="$compile_command $arg"
1738
1989
        finalize_command="$finalize_command $arg"
1739
 
        if test "$with_gcc" = "yes" ; then
1740
 
          compiler_flags="$compiler_flags $arg"
1741
 
        fi
 
1990
        compiler_flags="$compiler_flags $arg"
1742
1991
        continue
1743
1992
        ;;
1744
1993
 
1976
2225
            if test -z "$pic_object" || test "$pic_object" = none ; then
1977
2226
              arg="$non_pic_object"
1978
2227
            fi
 
2228
          else
 
2229
            # If the PIC object exists, use it instead.
 
2230
            # $xdir was prepended to $pic_object above.
 
2231
            non_pic_object="$pic_object"
 
2232
            non_pic_objects="$non_pic_objects $non_pic_object"
1979
2233
          fi
1980
2234
        else
1981
2235
          # Only an error if not doing a dry-run.
2081
2335
    if test ! -d "$output_objdir"; then
2082
2336
      $show "$mkdir $output_objdir"
2083
2337
      $run $mkdir $output_objdir
2084
 
      status=$?
2085
 
      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2086
 
        exit $status
 
2338
      exit_status=$?
 
2339
      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
 
2340
        exit $exit_status
2087
2341
      fi
2088
2342
    fi
2089
2343
 
2146
2400
    newlib_search_path=
2147
2401
    need_relink=no # whether we're linking any uninstalled libtool libraries
2148
2402
    notinst_deplibs= # not-installed libtool libraries
2149
 
    notinst_path= # paths that contain not-installed libtool libraries
2150
2403
    case $linkmode in
2151
2404
    lib)
2152
2405
        passes="conv link"
2201
2454
            compile_deplibs="$deplib $compile_deplibs"
2202
2455
            finalize_deplibs="$deplib $finalize_deplibs"
2203
2456
          else
2204
 
            deplibs="$deplib $deplibs"
 
2457
            compiler_flags="$compiler_flags $deplib"
2205
2458
          fi
2206
2459
          continue
2207
2460
          ;;
2320
2573
          fi
2321
2574
          case $linkmode in
2322
2575
          lib)
2323
 
            if test "$deplibs_check_method" != pass_all; then
 
2576
            valid_a_lib=no
 
2577
            case $deplibs_check_method in
 
2578
              match_pattern*)
 
2579
                set dummy $deplibs_check_method
 
2580
                match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
 
2581
                if eval $echo \"$deplib\" 2>/dev/null \
 
2582
                    | $SED 10q \
 
2583
                    | $EGREP "$match_pattern_regex" > /dev/null; then
 
2584
                  valid_a_lib=yes
 
2585
                fi
 
2586
                ;;
 
2587
              pass_all)
 
2588
                valid_a_lib=yes
 
2589
                ;;
 
2590
            esac
 
2591
            if test "$valid_a_lib" != yes; then
2324
2592
              $echo
2325
2593
              $echo "*** Warning: Trying to link with static lib archive $deplib."
2326
2594
              $echo "*** I have the capability to make that library automatically link in when"
2370
2638
        esac # case $deplib
2371
2639
        if test "$found" = yes || test -f "$lib"; then :
2372
2640
        else
2373
 
          $echo "$modename: cannot find the library \`$lib'" 1>&2
 
2641
          $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2374
2642
          exit $EXIT_FAILURE
2375
2643
        fi
2376
2644
 
2394
2662
        # it will not redefine variables installed, or shouldnotlink
2395
2663
        installed=yes
2396
2664
        shouldnotlink=no
 
2665
        avoidtemprpath=
 
2666
 
2397
2667
 
2398
2668
        # Read the .la file
2399
2669
        case $lib in
2492
2762
            dir="$libdir"
2493
2763
            absdir="$libdir"
2494
2764
          fi
 
2765
          test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2495
2766
        else
2496
 
          dir="$ladir/$objdir"
2497
 
          absdir="$abs_ladir/$objdir"
2498
 
          # Remove this search path later
2499
 
          notinst_path="$notinst_path $abs_ladir"
 
2767
          if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
 
2768
            dir="$ladir"
 
2769
            absdir="$abs_ladir"
 
2770
            # Remove this search path later
 
2771
            notinst_path="$notinst_path $abs_ladir"
 
2772
          else
 
2773
            dir="$ladir/$objdir"
 
2774
            absdir="$abs_ladir/$objdir"
 
2775
            # Remove this search path later
 
2776
            notinst_path="$notinst_path $abs_ladir"
 
2777
          fi
2500
2778
        fi # $installed = yes
2501
2779
        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2502
2780
 
2569
2847
          if test -n "$library_names" &&
2570
2848
             { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2571
2849
            # We need to hardcode the library path
2572
 
            if test -n "$shlibpath_var"; then
 
2850
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2573
2851
              # Make sure the rpath contains only unique directories.
2574
2852
              case "$temp_rpath " in
2575
2853
              *" $dir "*) ;;
2576
2854
              *" $absdir "*) ;;
2577
 
              *) temp_rpath="$temp_rpath $dir" ;;
 
2855
              *) temp_rpath="$temp_rpath $absdir" ;;
2578
2856
              esac
2579
2857
            fi
2580
2858
 
2611
2889
        fi
2612
2890
 
2613
2891
        link_static=no # Whether the deplib will be linked statically
 
2892
        use_static_libs=$prefer_static_libs
 
2893
        if test "$use_static_libs" = built && test "$installed" = yes ; then
 
2894
          use_static_libs=no
 
2895
        fi
2614
2896
        if test -n "$library_names" &&
2615
 
           { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
 
2897
           { test "$use_static_libs" = no || test -z "$old_library"; }; then
2616
2898
          if test "$installed" = no; then
2617
2899
            notinst_deplibs="$notinst_deplibs $lib"
2618
2900
            need_relink=yes
2725
3007
              if test "$hardcode_direct" = no; then
2726
3008
                add="$dir/$linklib"
2727
3009
                case $host in
2728
 
                  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
 
3010
                  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
 
3011
                  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
 
3012
                  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
 
3013
                    *-*-unixware7*) add_dir="-L$dir" ;;
2729
3014
                  *-*-darwin* )
2730
3015
                    # if the lib is a module then we can not link against
2731
3016
                    # it, someone is ignoring the new warnings I added
2732
 
                    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
 
3017
                    if /usr/bin/file -L $add 2> /dev/null |
 
3018
                      $EGREP ": [^:]* bundle" >/dev/null ; then
2733
3019
                      $echo "** Warning, lib $linklib is a module, not a shared library"
2734
3020
                      if test -z "$old_library" ; then
2735
3021
                        $echo
2760
3046
                add_dir="-L$dir"
2761
3047
                # Try looking first in the location we're being installed to.
2762
3048
                if test -n "$inst_prefix_dir"; then
2763
 
                  case "$libdir" in
 
3049
                  case $libdir in
2764
3050
                    [\\/]*)
2765
3051
                      add_dir="$add_dir -L$inst_prefix_dir$libdir"
2766
3052
                      ;;
2833
3119
              add_dir="-L$libdir"
2834
3120
              # Try looking first in the location we're being installed to.
2835
3121
              if test -n "$inst_prefix_dir"; then
2836
 
                case "$libdir" in
 
3122
                case $libdir in
2837
3123
                  [\\/]*)
2838
3124
                    add_dir="$add_dir -L$inst_prefix_dir$libdir"
2839
3125
                    ;;
2894
3180
              fi
2895
3181
            fi
2896
3182
          else
2897
 
            convenience="$convenience $dir/$old_library"
2898
 
            old_convenience="$old_convenience $dir/$old_library"
2899
3183
            deplibs="$dir/$old_library $deplibs"
2900
3184
            link_static=yes
2901
3185
          fi
3013
3297
              *) continue ;;
3014
3298
              esac
3015
3299
              case " $deplibs " in
 
3300
              *" $path "*) ;;
 
3301
              *) deplibs="$path $deplibs" ;;
 
3302
              esac
 
3303
              case " $deplibs " in
3016
3304
              *" $depdepl "*) ;;
3017
3305
              *) deplibs="$depdepl $deplibs" ;;
3018
3306
              esac
3019
 
              case " $deplibs " in
3020
 
              *" $path "*) ;;
3021
 
              *) deplibs="$deplibs $path" ;;
3022
 
              esac
3023
3307
            done
3024
3308
          fi # link_all_deplibs != no
3025
3309
        fi # linkmode = lib
3290
3574
        case $current in
3291
3575
        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]) ;;
3292
3576
        *)
3293
 
          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
 
3577
          $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3294
3578
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3295
3579
          exit $EXIT_FAILURE
3296
3580
          ;;
3299
3583
        case $revision in
3300
3584
        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]) ;;
3301
3585
        *)
3302
 
          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
 
3586
          $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3303
3587
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3304
3588
          exit $EXIT_FAILURE
3305
3589
          ;;
3308
3592
        case $age in
3309
3593
        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]) ;;
3310
3594
        *)
3311
 
          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
 
3595
          $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3312
3596
          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3313
3597
          exit $EXIT_FAILURE
3314
3598
          ;;
3334
3618
          versuffix="$major.$age.$revision"
3335
3619
          # Darwin ld doesn't like 0 for these options...
3336
3620
          minor_current=`expr $current + 1`
3337
 
          verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
 
3621
          verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3338
3622
          ;;
3339
3623
 
3340
3624
        freebsd-aout)
3487
3771
 
3488
3772
      # Eliminate all temporary directories.
3489
3773
      for path in $notinst_path; do
3490
 
        lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3491
 
        deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3492
 
        dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
 
3774
        lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
 
3775
        deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
 
3776
        dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3493
3777
      done
3494
3778
 
3495
3779
      if test -n "$xrpath"; then
3540
3824
          *-*-netbsd*)
3541
3825
            # Don't link with libc until the a.out ld.so is fixed.
3542
3826
            ;;
3543
 
          *-*-openbsd* | *-*-freebsd*)
 
3827
          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3544
3828
            # Do not include libc due to us having libc/libc_r.
3545
 
            test "X$arg" = "X-lc" && continue
 
3829
            ;;
 
3830
          *-*-sco3.2v5* | *-*-sco5v6*)
 
3831
            # Causes problems with __ctype
 
3832
            ;;
 
3833
          *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
 
3834
            # Compiler inserts libc in the correct place for threads to work
3546
3835
            ;;
3547
3836
          *)
3548
3837
            # Add libc to deplibs on all other systems if necessary.
3586
3875
          int main() { return 0; }
3587
3876
EOF
3588
3877
          $rm conftest
3589
 
          $LTCC -o conftest conftest.c $deplibs
 
3878
          $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
3590
3879
          if test "$?" -eq 0 ; then
3591
3880
            ldd_output=`ldd conftest`
3592
3881
            for i in $deplibs; do
3593
 
              name="`expr $i : '-l\(.*\)'`"
 
3882
              name=`expr $i : '-l\(.*\)'`
3594
3883
              # If $name is empty we are operating on a -L argument.
3595
3884
              if test "$name" != "" && test "$name" -ne "0"; then
3596
3885
                if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3627
3916
            # Error occurred in the first compile.  Let's try to salvage
3628
3917
            # the situation: Compile a separate program for each library.
3629
3918
            for i in $deplibs; do
3630
 
              name="`expr $i : '-l\(.*\)'`"
 
3919
              name=`expr $i : '-l\(.*\)'`
3631
3920
              # If $name is empty we are operating on a -L argument.
3632
3921
              if test "$name" != "" && test "$name" != "0"; then
3633
3922
                $rm conftest
3634
 
                $LTCC -o conftest conftest.c $i
 
3923
                $LTCC $LTCFLAGS -o conftest conftest.c $i
3635
3924
                # Did it work?
3636
3925
                if test "$?" -eq 0 ; then
3637
3926
                  ldd_output=`ldd conftest`
3679
3968
          set dummy $deplibs_check_method
3680
3969
          file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3681
3970
          for a_deplib in $deplibs; do
3682
 
            name="`expr $a_deplib : '-l\(.*\)'`"
 
3971
            name=`expr $a_deplib : '-l\(.*\)'`
3683
3972
            # If $name is empty we are operating on a -L argument.
3684
3973
            if test "$name" != "" && test  "$name" != "0"; then
3685
3974
              if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3748
4037
          set dummy $deplibs_check_method
3749
4038
          match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3750
4039
          for a_deplib in $deplibs; do
3751
 
            name="`expr $a_deplib : '-l\(.*\)'`"
 
4040
            name=`expr $a_deplib : '-l\(.*\)'`
3752
4041
            # If $name is empty we are operating on a -L argument.
3753
4042
            if test -n "$name" && test "$name" != "0"; then
3754
4043
              if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3878
4167
        deplibs=$newdeplibs
3879
4168
      fi
3880
4169
 
 
4170
 
 
4171
      # move library search paths that coincide with paths to not yet
 
4172
      # installed libraries to the beginning of the library search list
 
4173
      new_libs=
 
4174
      for path in $notinst_path; do
 
4175
        case " $new_libs " in
 
4176
        *" -L$path/$objdir "*) ;;
 
4177
        *)
 
4178
          case " $deplibs " in
 
4179
          *" -L$path/$objdir "*)
 
4180
            new_libs="$new_libs -L$path/$objdir" ;;
 
4181
          esac
 
4182
          ;;
 
4183
        esac
 
4184
      done
 
4185
      for deplib in $deplibs; do
 
4186
        case $deplib in
 
4187
        -L*)
 
4188
          case " $new_libs " in
 
4189
          *" $deplib "*) ;;
 
4190
          *) new_libs="$new_libs $deplib" ;;
 
4191
          esac
 
4192
          ;;
 
4193
        *) new_libs="$new_libs $deplib" ;;
 
4194
        esac
 
4195
      done
 
4196
      deplibs="$new_libs"
 
4197
 
 
4198
 
3881
4199
      # All the library-specific variables (install_libdir is set above).
3882
4200
      library_names=
3883
4201
      old_library=
3961
4279
        fi
3962
4280
 
3963
4281
        lib="$output_objdir/$realname"
 
4282
        linknames=
3964
4283
        for link
3965
4284
        do
3966
4285
          linknames="$linknames $link"
3989
4308
                # The command line is too long to execute in one step.
3990
4309
                $show "using reloadable object file for export list..."
3991
4310
                skipped_export=:
 
4311
                # Break out early, otherwise skipped_export may be
 
4312
                # set to false by a later but shorter cmd.
 
4313
                break
3992
4314
              fi
3993
4315
            done
3994
4316
            IFS="$save_ifs"
4022
4344
            eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4023
4345
          else
4024
4346
            gentop="$output_objdir/${outputname}x"
4025
 
            $show "${rm}r $gentop"
4026
 
            $run ${rm}r "$gentop"
4027
 
            $show "$mkdir $gentop"
4028
 
            $run $mkdir "$gentop"
4029
 
            status=$?
4030
 
            if test "$status" -ne 0 && test ! -d "$gentop"; then
4031
 
              exit $status
4032
 
            fi
4033
4347
            generated="$generated $gentop"
4034
4348
 
4035
 
            for xlib in $convenience; do
4036
 
              # Extract the objects.
4037
 
              case $xlib in
4038
 
              [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4039
 
              *) xabs=`pwd`"/$xlib" ;;
4040
 
              esac
4041
 
              xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4042
 
              xdir="$gentop/$xlib"
4043
 
 
4044
 
              $show "${rm}r $xdir"
4045
 
              $run ${rm}r "$xdir"
4046
 
              $show "$mkdir $xdir"
4047
 
              $run $mkdir "$xdir"
4048
 
              status=$?
4049
 
              if test "$status" -ne 0 && test ! -d "$xdir"; then
4050
 
                exit $status
4051
 
              fi
4052
 
              # We will extract separately just the conflicting names and we will no
4053
 
              # longer touch any unique names. It is faster to leave these extract
4054
 
              # automatically by $AR in one run.
4055
 
              $show "(cd $xdir && $AR x $xabs)"
4056
 
              $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4057
 
              if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4058
 
                :
4059
 
              else
4060
 
                $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4061
 
                $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4062
 
                $AR t "$xabs" | sort | uniq -cd | while read -r count name
4063
 
                do
4064
 
                  i=1
4065
 
                  while test "$i" -le "$count"
4066
 
                  do
4067
 
                   # Put our $i before any first dot (extension)
4068
 
                   # Never overwrite any file
4069
 
                   name_to="$name"
4070
 
                   while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4071
 
                   do
4072
 
                     name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4073
 
                   done
4074
 
                   $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4075
 
                   $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4076
 
                   i=`expr $i + 1`
4077
 
                  done
4078
 
                done
4079
 
              fi
4080
 
 
4081
 
              libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4082
 
            done
 
4349
            func_extract_archives $gentop $convenience
 
4350
            libobjs="$libobjs $func_extract_archives_result"
4083
4351
          fi
4084
4352
        fi
4085
 
 
 
4353
        
4086
4354
        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4087
4355
          eval flag=\"$thread_safe_flag_spec\"
4088
4356
          linker_flags="$linker_flags $flag"
4112
4380
          fi
4113
4381
        fi
4114
4382
 
4115
 
        if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
 
4383
        if test "X$skipped_export" != "X:" &&
 
4384
           len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4116
4385
           test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4117
4386
          :
4118
4387
        else
4131
4400
            save_libobjs=$libobjs
4132
4401
          fi
4133
4402
          save_output=$output
 
4403
          output_la=`$echo "X$output" | $Xsed -e "$basename"`
4134
4404
 
4135
4405
          # Clear the reloadable object creation command queue and
4136
4406
          # initialize k to one.
4140
4410
          delfiles=
4141
4411
          last_robj=
4142
4412
          k=1
4143
 
          output=$output_objdir/$save_output-${k}.$objext
 
4413
          output=$output_objdir/$output_la-${k}.$objext
4144
4414
          # Loop over the list of objects to be linked.
4145
4415
          for obj in $save_libobjs
4146
4416
          do
4147
4417
            eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4148
4418
            if test "X$objlist" = X ||
4149
 
               { len=`expr "X$test_cmds" : ".*"` &&
 
4419
               { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4150
4420
                 test "$len" -le "$max_cmd_len"; }; then
4151
4421
              objlist="$objlist $obj"
4152
4422
            else
4160
4430
                # the last one created.
4161
4431
                eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4162
4432
              fi
4163
 
              last_robj=$output_objdir/$save_output-${k}.$objext
 
4433
              last_robj=$output_objdir/$output_la-${k}.$objext
4164
4434
              k=`expr $k + 1`
4165
 
              output=$output_objdir/$save_output-${k}.$objext
 
4435
              output=$output_objdir/$output_la-${k}.$objext
4166
4436
              objlist=$obj
4167
4437
              len=1
4168
4438
            fi
4182
4452
            eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4183
4453
          fi
4184
4454
 
4185
 
          # Set up a command to remove the reloadale object files
 
4455
          # Set up a command to remove the reloadable object files
4186
4456
          # after they are used.
4187
4457
          i=0
4188
4458
          while test "$i" -lt "$k"
4189
4459
          do
4190
4460
            i=`expr $i + 1`
4191
 
            delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
 
4461
            delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4192
4462
          done
4193
4463
 
4194
4464
          $echo "creating a temporary reloadable object file: $output"
4236
4506
          IFS="$save_ifs"
4237
4507
          eval cmd=\"$cmd\"
4238
4508
          $show "$cmd"
4239
 
          $run eval "$cmd" || exit $?
 
4509
          $run eval "$cmd" || {
 
4510
            lt_exit=$?
 
4511
 
 
4512
            # Restore the uninstalled library and exit
 
4513
            if test "$mode" = relink; then
 
4514
              $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
 
4515
            fi
 
4516
 
 
4517
            exit $lt_exit
 
4518
          }
4240
4519
        done
4241
4520
        IFS="$save_ifs"
4242
4521
 
4243
4522
        # Restore the uninstalled library and exit
4244
4523
        if test "$mode" = relink; then
4245
4524
          $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
 
4525
 
 
4526
          if test -n "$convenience"; then
 
4527
            if test -z "$whole_archive_flag_spec"; then
 
4528
              $show "${rm}r $gentop"
 
4529
              $run ${rm}r "$gentop"
 
4530
            fi
 
4531
          fi
 
4532
 
4246
4533
          exit $EXIT_SUCCESS
4247
4534
        fi
4248
4535
 
4320
4607
          eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4321
4608
        else
4322
4609
          gentop="$output_objdir/${obj}x"
4323
 
          $show "${rm}r $gentop"
4324
 
          $run ${rm}r "$gentop"
4325
 
          $show "$mkdir $gentop"
4326
 
          $run $mkdir "$gentop"
4327
 
          status=$?
4328
 
          if test "$status" -ne 0 && test ! -d "$gentop"; then
4329
 
            exit $status
4330
 
          fi
4331
4610
          generated="$generated $gentop"
4332
4611
 
4333
 
          for xlib in $convenience; do
4334
 
            # Extract the objects.
4335
 
            case $xlib in
4336
 
            [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4337
 
            *) xabs=`pwd`"/$xlib" ;;
4338
 
            esac
4339
 
            xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4340
 
            xdir="$gentop/$xlib"
4341
 
 
4342
 
            $show "${rm}r $xdir"
4343
 
            $run ${rm}r "$xdir"
4344
 
            $show "$mkdir $xdir"
4345
 
            $run $mkdir "$xdir"
4346
 
            status=$?
4347
 
            if test "$status" -ne 0 && test ! -d "$xdir"; then
4348
 
              exit $status
4349
 
            fi
4350
 
            # We will extract separately just the conflicting names and we will no
4351
 
            # longer touch any unique names. It is faster to leave these extract
4352
 
            # automatically by $AR in one run.
4353
 
            $show "(cd $xdir && $AR x $xabs)"
4354
 
            $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4355
 
            if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4356
 
              :
4357
 
            else
4358
 
              $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4359
 
              $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4360
 
              $AR t "$xabs" | sort | uniq -cd | while read -r count name
4361
 
              do
4362
 
                i=1
4363
 
                while test "$i" -le "$count"
4364
 
                do
4365
 
                 # Put our $i before any first dot (extension)
4366
 
                 # Never overwrite any file
4367
 
                 name_to="$name"
4368
 
                 while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4369
 
                 do
4370
 
                   name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4371
 
                 done
4372
 
                 $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4373
 
                 $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4374
 
                 i=`expr $i + 1`
4375
 
                done
4376
 
              done
4377
 
            fi
4378
 
 
4379
 
            reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4380
 
          done
 
4612
          func_extract_archives $gentop $convenience
 
4613
          reload_conv_objs="$reload_objs $func_extract_archives_result"
4381
4614
        fi
4382
4615
      fi
4383
4616
 
4478
4711
        ;;
4479
4712
      esac
4480
4713
 
 
4714
 
 
4715
      # move library search paths that coincide with paths to not yet
 
4716
      # installed libraries to the beginning of the library search list
 
4717
      new_libs=
 
4718
      for path in $notinst_path; do
 
4719
        case " $new_libs " in
 
4720
        *" -L$path/$objdir "*) ;;
 
4721
        *)
 
4722
          case " $compile_deplibs " in
 
4723
          *" -L$path/$objdir "*)
 
4724
            new_libs="$new_libs -L$path/$objdir" ;;
 
4725
          esac
 
4726
          ;;
 
4727
        esac
 
4728
      done
 
4729
      for deplib in $compile_deplibs; do
 
4730
        case $deplib in
 
4731
        -L*)
 
4732
          case " $new_libs " in
 
4733
          *" $deplib "*) ;;
 
4734
          *) new_libs="$new_libs $deplib" ;;
 
4735
          esac
 
4736
          ;;
 
4737
        *) new_libs="$new_libs $deplib" ;;
 
4738
        esac
 
4739
      done
 
4740
      compile_deplibs="$new_libs"
 
4741
 
 
4742
 
4481
4743
      compile_command="$compile_command $compile_deplibs"
4482
4744
      finalize_command="$finalize_command $finalize_deplibs"
4483
4745
 
4522
4784
        fi
4523
4785
        case $host in
4524
4786
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
 
4787
          testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4525
4788
          case :$dllsearchpath: in
4526
4789
          *":$libdir:"*) ;;
4527
4790
          *) dllsearchpath="$dllsearchpath:$libdir";;
4528
4791
          esac
 
4792
          case :$dllsearchpath: in
 
4793
          *":$testbindir:"*) ;;
 
4794
          *) dllsearchpath="$dllsearchpath:$testbindir";;
 
4795
          esac
4529
4796
          ;;
4530
4797
        esac
4531
4798
      done
4639
4906
 
4640
4907
            # Prepare the list of exported symbols
4641
4908
            if test -z "$export_symbols"; then
4642
 
              export_symbols="$output_objdir/$output.exp"
 
4909
              export_symbols="$output_objdir/$outputname.exp"
4643
4910
              $run $rm $export_symbols
4644
 
              $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
 
4911
              $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
 
4912
              case $host in
 
4913
              *cygwin* | *mingw* )
 
4914
                $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
 
4915
                $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
 
4916
                ;;
 
4917
              esac
4645
4918
            else
4646
 
              $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4647
 
              $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
 
4919
              $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
 
4920
              $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4648
4921
              $run eval 'mv "$nlist"T "$nlist"'
 
4922
              case $host in
 
4923
              *cygwin* | *mingw* )
 
4924
                $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
 
4925
                $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
 
4926
                ;;
 
4927
              esac
4649
4928
            fi
4650
4929
          fi
4651
4930
 
4696
4975
#endif
4697
4976
 
4698
4977
/* The mapping between symbol names and symbols. */
 
4978
"
 
4979
 
 
4980
            case $host in
 
4981
            *cygwin* | *mingw* )
 
4982
          $echo >> "$output_objdir/$dlsyms" "\
 
4983
/* DATA imports from DLLs on WIN32 can't be const, because
 
4984
   runtime relocations are performed -- see ld's documentation
 
4985
   on pseudo-relocs */
 
4986
struct {
 
4987
"
 
4988
              ;;
 
4989
            * )
 
4990
          $echo >> "$output_objdir/$dlsyms" "\
4699
4991
const struct {
 
4992
"
 
4993
              ;;
 
4994
            esac
 
4995
 
 
4996
 
 
4997
          $echo >> "$output_objdir/$dlsyms" "\
4700
4998
  const char *name;
4701
4999
  lt_ptr address;
4702
5000
}
4743
5041
          esac
4744
5042
 
4745
5043
          # Now compile the dynamic symbol file.
4746
 
          $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4747
 
          $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
 
5044
          $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
 
5045
          $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4748
5046
 
4749
5047
          # Clean up the generated files.
4750
5048
          $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4751
5049
          $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4752
5050
 
4753
5051
          # Transform the symbol file into the correct name.
4754
 
          compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4755
 
          finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
5052
          case $host in
 
5053
          *cygwin* | *mingw* )
 
5054
            if test -f "$output_objdir/${outputname}.def" ; then
 
5055
              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
 
5056
              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
 
5057
            else
 
5058
              compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
5059
              finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
5060
             fi
 
5061
            ;;
 
5062
          * )
 
5063
            compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
5064
            finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
 
5065
            ;;
 
5066
          esac
4756
5067
          ;;
4757
5068
        *)
4758
5069
          $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4777
5088
        # We have no uninstalled library dependencies, so finalize right now.
4778
5089
        $show "$link_command"
4779
5090
        $run eval "$link_command"
4780
 
        status=$?
 
5091
        exit_status=$?
4781
5092
 
4782
5093
        # Delete the generated files.
4783
5094
        if test -n "$dlsyms"; then
4785
5096
          $run $rm "$output_objdir/${outputname}S.${objext}"
4786
5097
        fi
4787
5098
 
4788
 
        exit $status
 
5099
        exit $exit_status
4789
5100
      fi
4790
5101
 
4791
5102
      if test -n "$shlibpath_var"; then
4925
5236
        esac
4926
5237
        case $host in
4927
5238
          *cygwin* | *mingw* )
4928
 
            cwrappersource=`$echo ${objdir}/lt-${output}.c`
4929
 
            cwrapper=`$echo ${output}.exe`
4930
 
            $rm $cwrappersource $cwrapper
4931
 
            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
 
5239
            output_name=`basename $output`
 
5240
            output_path=`dirname $output`
 
5241
            cwrappersource="$output_path/$objdir/lt-$output_name.c"
 
5242
            cwrapper="$output_path/$output_name.exe"
 
5243
            $rm $cwrappersource $cwrapper
 
5244
            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4932
5245
 
4933
5246
            cat > $cwrappersource <<EOF
4934
5247
 
4953
5266
#include <malloc.h>
4954
5267
#include <stdarg.h>
4955
5268
#include <assert.h>
 
5269
#include <string.h>
 
5270
#include <ctype.h>
 
5271
#include <sys/stat.h>
4956
5272
 
4957
5273
#if defined(PATH_MAX)
4958
5274
# define LT_PATHMAX PATH_MAX
4963
5279
#endif
4964
5280
 
4965
5281
#ifndef DIR_SEPARATOR
4966
 
#define DIR_SEPARATOR '/'
 
5282
# define DIR_SEPARATOR '/'
 
5283
# define PATH_SEPARATOR ':'
4967
5284
#endif
4968
5285
 
4969
5286
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4970
5287
  defined (__OS2__)
4971
 
#define HAVE_DOS_BASED_FILE_SYSTEM
4972
 
#ifndef DIR_SEPARATOR_2
4973
 
#define DIR_SEPARATOR_2 '\\'
4974
 
#endif
 
5288
# define HAVE_DOS_BASED_FILE_SYSTEM
 
5289
# ifndef DIR_SEPARATOR_2
 
5290
#  define DIR_SEPARATOR_2 '\\'
 
5291
# endif
 
5292
# ifndef PATH_SEPARATOR_2
 
5293
#  define PATH_SEPARATOR_2 ';'
 
5294
# endif
4975
5295
#endif
4976
5296
 
4977
5297
#ifndef DIR_SEPARATOR_2
4981
5301
        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4982
5302
#endif /* DIR_SEPARATOR_2 */
4983
5303
 
 
5304
#ifndef PATH_SEPARATOR_2
 
5305
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
 
5306
#else /* PATH_SEPARATOR_2 */
 
5307
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
 
5308
#endif /* PATH_SEPARATOR_2 */
 
5309
 
4984
5310
#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
4985
5311
#define XFREE(stale) do { \
4986
5312
  if (stale) { free ((void *) stale); stale = 0; } \
4987
5313
} while (0)
4988
5314
 
 
5315
/* -DDEBUG is fairly common in CFLAGS.  */
 
5316
#undef DEBUG
 
5317
#if defined DEBUGWRAPPER
 
5318
# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
 
5319
#else
 
5320
# define DEBUG(format, ...)
 
5321
#endif
 
5322
 
4989
5323
const char *program_name = NULL;
4990
5324
 
4991
5325
void * xmalloc (size_t num);
4992
5326
char * xstrdup (const char *string);
4993
 
char * basename (const char *name);
4994
 
char * fnqualify(const char *path);
 
5327
const char * base_name (const char *name);
 
5328
char * find_executable(const char *wrapper);
 
5329
int    check_executable(const char *path);
4995
5330
char * strendzap(char *str, const char *pat);
4996
5331
void lt_fatal (const char *message, ...);
4997
5332
 
5001
5336
  char **newargz;
5002
5337
  int i;
5003
5338
 
5004
 
  program_name = (char *) xstrdup ((char *) basename (argv[0]));
 
5339
  program_name = (char *) xstrdup (base_name (argv[0]));
 
5340
  DEBUG("(main) argv[0]      : %s\n",argv[0]);
 
5341
  DEBUG("(main) program_name : %s\n",program_name);
5005
5342
  newargz = XMALLOC(char *, argc+2);
5006
5343
EOF
5007
5344
 
5008
 
            cat >> $cwrappersource <<EOF
5009
 
  newargz[0] = "$SHELL";
 
5345
            cat >> $cwrappersource <<EOF
 
5346
  newargz[0] = (char *) xstrdup("$SHELL");
5010
5347
EOF
5011
5348
 
5012
 
            cat >> $cwrappersource <<"EOF"
5013
 
  newargz[1] = fnqualify(argv[0]);
 
5349
            cat >> $cwrappersource <<"EOF"
 
5350
  newargz[1] = find_executable(argv[0]);
 
5351
  if (newargz[1] == NULL)
 
5352
    lt_fatal("Couldn't find %s", argv[0]);
 
5353
  DEBUG("(main) found exe at : %s\n",newargz[1]);
5014
5354
  /* we know the script has the same name, without the .exe */
5015
5355
  /* so make sure newargz[1] doesn't end in .exe */
5016
5356
  strendzap(newargz[1],".exe");
5017
5357
  for (i = 1; i < argc; i++)
5018
5358
    newargz[i+1] = xstrdup(argv[i]);
5019
5359
  newargz[argc+1] = NULL;
5020
 
EOF
5021
 
 
5022
 
            cat >> $cwrappersource <<EOF
 
5360
 
 
5361
  for (i=0; i<argc+1; i++)
 
5362
  {
 
5363
    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
 
5364
    ;
 
5365
  }
 
5366
 
 
5367
EOF
 
5368
 
 
5369
            case $host_os in
 
5370
              mingw*)
 
5371
                cat >> $cwrappersource <<EOF
 
5372
  execv("$SHELL",(char const **)newargz);
 
5373
EOF
 
5374
              ;;
 
5375
              *)
 
5376
                cat >> $cwrappersource <<EOF
5023
5377
  execv("$SHELL",newargz);
5024
5378
EOF
 
5379
              ;;
 
5380
            esac
5025
5381
 
5026
 
            cat >> $cwrappersource <<"EOF"
 
5382
            cat >> $cwrappersource <<"EOF"
 
5383
  return 127;
5027
5384
}
5028
5385
 
5029
5386
void *
5043
5400
;
5044
5401
}
5045
5402
 
5046
 
char *
5047
 
basename (const char *name)
 
5403
const char *
 
5404
base_name (const char *name)
5048
5405
{
5049
5406
  const char *base;
5050
5407
 
5051
5408
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5052
5409
  /* Skip over the disk name in MSDOS pathnames. */
5053
 
  if (isalpha (name[0]) && name[1] == ':')
 
5410
  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5054
5411
    name += 2;
5055
5412
#endif
5056
5413
 
5057
5414
  for (base = name; *name; name++)
5058
5415
    if (IS_DIR_SEPARATOR (*name))
5059
5416
      base = name + 1;
5060
 
  return (char *) base;
5061
 
}
5062
 
 
 
5417
  return base;
 
5418
}
 
5419
 
 
5420
int
 
5421
check_executable(const char * path)
 
5422
{
 
5423
  struct stat st;
 
5424
 
 
5425
  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
 
5426
  if ((!path) || (!*path))
 
5427
    return 0;
 
5428
 
 
5429
  if ((stat (path, &st) >= 0) &&
 
5430
      (
 
5431
        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
 
5432
#if defined (S_IXOTH)
 
5433
       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
 
5434
#endif
 
5435
#if defined (S_IXGRP)
 
5436
       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
 
5437
#endif
 
5438
       ((st.st_mode & S_IXUSR) == S_IXUSR))
 
5439
      )
 
5440
    return 1;
 
5441
  else
 
5442
    return 0;
 
5443
}
 
5444
 
 
5445
/* Searches for the full path of the wrapper.  Returns
 
5446
   newly allocated full path name if found, NULL otherwise */
5063
5447
char *
5064
 
fnqualify(const char *path)
 
5448
find_executable (const char* wrapper)
5065
5449
{
5066
 
  size_t size;
5067
 
  char *p;
 
5450
  int has_slash = 0;
 
5451
  const char* p;
 
5452
  const char* p_next;
 
5453
  /* static buffer for getcwd */
5068
5454
  char tmp[LT_PATHMAX + 1];
5069
 
 
5070
 
  assert(path != NULL);
5071
 
 
5072
 
  /* Is it qualified already? */
5073
 
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5074
 
  if (isalpha (path[0]) && path[1] == ':')
5075
 
    return xstrdup (path);
5076
 
#endif
5077
 
  if (IS_DIR_SEPARATOR (path[0]))
5078
 
    return xstrdup (path);
5079
 
 
5080
 
  /* prepend the current directory */
5081
 
  /* doesn't handle '~' */
 
5455
  int tmp_len;
 
5456
  char* concat_name;
 
5457
 
 
5458
  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
 
5459
 
 
5460
  if ((wrapper == NULL) || (*wrapper == '\0'))
 
5461
    return NULL;
 
5462
 
 
5463
  /* Absolute path? */
 
5464
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
 
5465
  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
 
5466
  {
 
5467
    concat_name = xstrdup (wrapper);
 
5468
    if (check_executable(concat_name))
 
5469
      return concat_name;
 
5470
    XFREE(concat_name);
 
5471
  }
 
5472
  else
 
5473
  {
 
5474
#endif
 
5475
    if (IS_DIR_SEPARATOR (wrapper[0]))
 
5476
    {
 
5477
      concat_name = xstrdup (wrapper);
 
5478
      if (check_executable(concat_name))
 
5479
        return concat_name;
 
5480
      XFREE(concat_name);
 
5481
    }
 
5482
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
 
5483
  }
 
5484
#endif
 
5485
 
 
5486
  for (p = wrapper; *p; p++)
 
5487
    if (*p == '/')
 
5488
    {
 
5489
      has_slash = 1;
 
5490
      break;
 
5491
    }
 
5492
  if (!has_slash)
 
5493
  {
 
5494
    /* no slashes; search PATH */
 
5495
    const char* path = getenv ("PATH");
 
5496
    if (path != NULL)
 
5497
    {
 
5498
      for (p = path; *p; p = p_next)
 
5499
      {
 
5500
        const char* q;
 
5501
        size_t p_len;
 
5502
        for (q = p; *q; q++)
 
5503
          if (IS_PATH_SEPARATOR(*q))
 
5504
            break;
 
5505
        p_len = q - p;
 
5506
        p_next = (*q == '\0' ? q : q + 1);
 
5507
        if (p_len == 0)
 
5508
        {
 
5509
          /* empty path: current directory */
 
5510
          if (getcwd (tmp, LT_PATHMAX) == NULL)
 
5511
            lt_fatal ("getcwd failed");
 
5512
          tmp_len = strlen(tmp);
 
5513
          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
 
5514
          memcpy (concat_name, tmp, tmp_len);
 
5515
          concat_name[tmp_len] = '/';
 
5516
          strcpy (concat_name + tmp_len + 1, wrapper);
 
5517
        }
 
5518
        else
 
5519
        {
 
5520
          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
 
5521
          memcpy (concat_name, p, p_len);
 
5522
          concat_name[p_len] = '/';
 
5523
          strcpy (concat_name + p_len + 1, wrapper);
 
5524
        }
 
5525
        if (check_executable(concat_name))
 
5526
          return concat_name;
 
5527
        XFREE(concat_name);
 
5528
      }
 
5529
    }
 
5530
    /* not found in PATH; assume curdir */
 
5531
  }
 
5532
  /* Relative path | not found in path: prepend cwd */
5082
5533
  if (getcwd (tmp, LT_PATHMAX) == NULL)
5083
5534
    lt_fatal ("getcwd failed");
5084
 
  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
5085
 
  p = XMALLOC(char, size);
5086
 
  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
5087
 
  return p;
 
5535
  tmp_len = strlen(tmp);
 
5536
  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
 
5537
  memcpy (concat_name, tmp, tmp_len);
 
5538
  concat_name[tmp_len] = '/';
 
5539
  strcpy (concat_name + tmp_len + 1, wrapper);
 
5540
 
 
5541
  if (check_executable(concat_name))
 
5542
    return concat_name;
 
5543
  XFREE(concat_name);
 
5544
  return NULL;
5088
5545
}
5089
5546
 
5090
5547
char *
5128
5585
  va_end (ap);
5129
5586
}
5130
5587
EOF
5131
 
          # we should really use a build-platform specific compiler
5132
 
          # here, but OTOH, the wrappers (shell script and this C one)
5133
 
          # are only useful if you want to execute the "real" binary.
5134
 
          # Since the "real" binary is built for $host, then this
5135
 
          # wrapper might as well be built for $host, too.
5136
 
          $run $LTCC -s -o $cwrapper $cwrappersource
5137
 
          ;;
5138
 
        esac
5139
 
        $rm $output
5140
 
        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
 
5588
          # we should really use a build-platform specific compiler
 
5589
          # here, but OTOH, the wrappers (shell script and this C one)
 
5590
          # are only useful if you want to execute the "real" binary.
 
5591
          # Since the "real" binary is built for $host, then this
 
5592
          # wrapper might as well be built for $host, too.
 
5593
          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
 
5594
          ;;
 
5595
        esac
 
5596
        $rm $output
 
5597
        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5141
5598
 
5142
5599
        $echo > $output "\
5143
5600
#! $SHELL
5158
5615
 
5159
5616
# The HP-UX ksh and POSIX shell print the target directory to stdout
5160
5617
# if CDPATH is set.
5161
 
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
 
5618
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5162
5619
 
5163
5620
relink_command=\"$relink_command\"
5164
5621
 
5287
5744
        # Backslashes separate directories on plain windows
5288
5745
        *-*-mingw | *-*-os2*)
5289
5746
          $echo >> $output "\
5290
 
      exec \$progdir\\\\\$program \${1+\"\$@\"}
 
5747
      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5291
5748
"
5292
5749
          ;;
5293
5750
 
5294
5751
        *)
5295
5752
          $echo >> $output "\
5296
 
      exec \$progdir/\$program \${1+\"\$@\"}
 
5753
      exec \"\$progdir/\$program\" \${1+\"\$@\"}
5297
5754
"
5298
5755
          ;;
5299
5756
        esac
5303
5760
    fi
5304
5761
  else
5305
5762
    # The program doesn't exist.
5306
 
    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
 
5763
    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5307
5764
    \$echo \"This script is just a wrapper for \$program.\" 1>&2
5308
5765
    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5309
5766
    exit $EXIT_FAILURE
5335
5792
 
5336
5793
      if test -n "$addlibs"; then
5337
5794
        gentop="$output_objdir/${outputname}x"
5338
 
        $show "${rm}r $gentop"
5339
 
        $run ${rm}r "$gentop"
5340
 
        $show "$mkdir $gentop"
5341
 
        $run $mkdir "$gentop"
5342
 
        status=$?
5343
 
        if test "$status" -ne 0 && test ! -d "$gentop"; then
5344
 
          exit $status
5345
 
        fi
5346
5795
        generated="$generated $gentop"
5347
5796
 
5348
 
        # Add in members from convenience archives.
5349
 
        for xlib in $addlibs; do
5350
 
          # Extract the objects.
5351
 
          case $xlib in
5352
 
          [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5353
 
          *) xabs=`pwd`"/$xlib" ;;
5354
 
          esac
5355
 
          xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5356
 
          xdir="$gentop/$xlib"
5357
 
 
5358
 
          $show "${rm}r $xdir"
5359
 
          $run ${rm}r "$xdir"
5360
 
          $show "$mkdir $xdir"
5361
 
          $run $mkdir "$xdir"
5362
 
          status=$?
5363
 
          if test "$status" -ne 0 && test ! -d "$xdir"; then
5364
 
            exit $status
5365
 
          fi
5366
 
          # We will extract separately just the conflicting names and we will no
5367
 
          # longer touch any unique names. It is faster to leave these extract
5368
 
          # automatically by $AR in one run.
5369
 
          $show "(cd $xdir && $AR x $xabs)"
5370
 
          $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5371
 
          if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5372
 
            :
5373
 
          else
5374
 
            $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5375
 
            $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5376
 
            $AR t "$xabs" | sort | uniq -cd | while read -r count name
5377
 
            do
5378
 
              i=1
5379
 
              while test "$i" -le "$count"
5380
 
              do
5381
 
               # Put our $i before any first dot (extension)
5382
 
               # Never overwrite any file
5383
 
               name_to="$name"
5384
 
               while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5385
 
               do
5386
 
                 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5387
 
               done
5388
 
               $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5389
 
               $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5390
 
               i=`expr $i + 1`
5391
 
              done
5392
 
            done
5393
 
          fi
5394
 
 
5395
 
          oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5396
 
        done
 
5797
        func_extract_archives $gentop $addlibs
 
5798
        oldobjs="$oldobjs $func_extract_archives_result"
5397
5799
      fi
5398
5800
 
5399
5801
      # Do each command in the archive commands.
5400
5802
      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5401
5803
       cmds=$old_archive_from_new_cmds
5402
5804
      else
 
5805
        # POSIX demands no paths to be encoded in archives.  We have
 
5806
        # to avoid creating archives with duplicate basenames if we
 
5807
        # might have to extract them afterwards, e.g., when creating a
 
5808
        # static archive out of a convenience library, or when linking
 
5809
        # the entirety of a libtool archive into another (currently
 
5810
        # not supported by libtool).
 
5811
        if (for obj in $oldobjs
 
5812
            do
 
5813
              $echo "X$obj" | $Xsed -e 's%^.*/%%'
 
5814
            done | sort | sort -uc >/dev/null 2>&1); then
 
5815
          :
 
5816
        else
 
5817
          $echo "copying selected object files to avoid basename conflicts..."
 
5818
 
 
5819
          if test -z "$gentop"; then
 
5820
            gentop="$output_objdir/${outputname}x"
 
5821
            generated="$generated $gentop"
 
5822
 
 
5823
            $show "${rm}r $gentop"
 
5824
            $run ${rm}r "$gentop"
 
5825
            $show "$mkdir $gentop"
 
5826
            $run $mkdir "$gentop"
 
5827
            exit_status=$?
 
5828
            if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
 
5829
              exit $exit_status
 
5830
            fi
 
5831
          fi
 
5832
 
 
5833
          save_oldobjs=$oldobjs
 
5834
          oldobjs=
 
5835
          counter=1
 
5836
          for obj in $save_oldobjs
 
5837
          do
 
5838
            objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
 
5839
            case " $oldobjs " in
 
5840
            " ") oldobjs=$obj ;;
 
5841
            *[\ /]"$objbase "*)
 
5842
              while :; do
 
5843
                # Make sure we don't pick an alternate name that also
 
5844
                # overlaps.
 
5845
                newobj=lt$counter-$objbase
 
5846
                counter=`expr $counter + 1`
 
5847
                case " $oldobjs " in
 
5848
                *[\ /]"$newobj "*) ;;
 
5849
                *) if test ! -f "$gentop/$newobj"; then break; fi ;;
 
5850
                esac
 
5851
              done
 
5852
              $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
 
5853
              $run ln "$obj" "$gentop/$newobj" ||
 
5854
              $run cp "$obj" "$gentop/$newobj"
 
5855
              oldobjs="$oldobjs $gentop/$newobj"
 
5856
              ;;
 
5857
            *) oldobjs="$oldobjs $obj" ;;
 
5858
            esac
 
5859
          done
 
5860
        fi
 
5861
 
5403
5862
        eval cmds=\"$old_archive_cmds\"
5404
5863
 
5405
5864
        if len=`expr "X$cmds" : ".*"` &&
5413
5872
          objlist=
5414
5873
          concat_cmds=
5415
5874
          save_oldobjs=$oldobjs
5416
 
          # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5417
 
          # encoded into archives.  This makes 'ar r' malfunction in
5418
 
          # this piecewise linking case whenever conflicting object
5419
 
          # names appear in distinct ar calls; check, warn and compensate.
5420
 
            if (for obj in $save_oldobjs
5421
 
            do
5422
 
              $echo "X$obj" | $Xsed -e 's%^.*/%%'
5423
 
            done | sort | sort -uc >/dev/null 2>&1); then
5424
 
            :
5425
 
          else
5426
 
            $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5427
 
            $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5428
 
            AR_FLAGS=cq
5429
 
          fi
 
5875
 
5430
5876
          # Is there a better way of finding the last object in the list?
5431
5877
          for obj in $save_oldobjs
5432
5878
          do
5437
5883
            oldobjs="$objlist $obj"
5438
5884
            objlist="$objlist $obj"
5439
5885
            eval test_cmds=\"$old_archive_cmds\"
5440
 
            if len=`expr "X$test_cmds" : ".*"` &&
 
5886
            if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5441
5887
               test "$len" -le "$max_cmd_len"; then
5442
5888
              :
5443
5889
            else
5634
6080
    # install_prog (especially on Windows NT).
5635
6081
    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5636
6082
       # Allow the use of GNU shtool's install command.
5637
 
       $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
 
6083
       $echo "X$nonopt" | grep shtool > /dev/null; then
5638
6084
      # Aesthetically quote it.
5639
6085
      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5640
6086
      case $arg in
5641
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
 
6087
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
5642
6088
        arg="\"$arg\""
5643
6089
        ;;
5644
6090
      esac
5647
6093
      shift
5648
6094
    else
5649
6095
      install_prog=
5650
 
      arg="$nonopt"
 
6096
      arg=$nonopt
5651
6097
    fi
5652
6098
 
5653
6099
    # The real first argument should be the name of the installation program.
5654
6100
    # Aesthetically quote it.
5655
6101
    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5656
6102
    case $arg in
5657
 
    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*)
 
6103
    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
5658
6104
      arg="\"$arg\""
5659
6105
      ;;
5660
6106
    esac
5672
6118
    do
5673
6119
      if test -n "$dest"; then
5674
6120
        files="$files $dest"
5675
 
        dest="$arg"
 
6121
        dest=$arg
5676
6122
        continue
5677
6123
      fi
5678
6124
 
5679
6125
      case $arg in
5680
6126
      -d) isdir=yes ;;
5681
 
      -f) prev="-f" ;;
5682
 
      -g) prev="-g" ;;
5683
 
      -m) prev="-m" ;;
5684
 
      -o) prev="-o" ;;
 
6127
      -f) 
 
6128
        case " $install_prog " in
 
6129
        *[\\\ /]cp\ *) ;;
 
6130
        *) prev=$arg ;;
 
6131
        esac
 
6132
        ;;
 
6133
      -g | -m | -o) prev=$arg ;;
5685
6134
      -s)
5686
6135
        stripme=" -s"
5687
6136
        continue
5688
6137
        ;;
5689
 
      -*) ;;
5690
 
 
 
6138
      -*)
 
6139
        ;;
5691
6140
      *)
5692
6141
        # If the previous option needed an argument, then skip it.
5693
6142
        if test -n "$prev"; then
5694
6143
          prev=
5695
6144
        else
5696
 
          dest="$arg"
 
6145
          dest=$arg
5697
6146
          continue
5698
6147
        fi
5699
6148
        ;;
5702
6151
      # Aesthetically quote the argument.
5703
6152
      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5704
6153
      case $arg in
5705
 
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*)
 
6154
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
5706
6155
        arg="\"$arg\""
5707
6156
        ;;
5708
6157
      esac
5871
6320
 
5872
6321
          if test "$#" -gt 0; then
5873
6322
            # Delete the old symlinks, and create new ones.
 
6323
            # Try `ln -sf' first, because the `ln' binary might depend on
 
6324
            # the symlink we replace!  Solaris /bin/ln does not understand -f,
 
6325
            # so we also need to try rm && ln -s.
5874
6326
            for linkname
5875
6327
            do
5876
6328
              if test "$linkname" != "$realname"; then
5877
 
                $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5878
 
                $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
 
6329
                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
 
6330
                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5879
6331
              fi
5880
6332
            done
5881
6333
          fi
5888
6340
            IFS="$save_ifs"
5889
6341
            eval cmd=\"$cmd\"
5890
6342
            $show "$cmd"
5891
 
            $run eval "$cmd" || exit $?
 
6343
            $run eval "$cmd" || {
 
6344
              lt_exit=$?
 
6345
 
 
6346
              # Restore the uninstalled library and exit
 
6347
              if test "$mode" = relink; then
 
6348
                $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
 
6349
              fi
 
6350
 
 
6351
              exit $lt_exit
 
6352
            }
5892
6353
          done
5893
6354
          IFS="$save_ifs"
5894
6355
        fi
5982
6443
          notinst_deplibs=
5983
6444
          relink_command=
5984
6445
 
5985
 
          # To insure that "foo" is sourced, and not "foo.exe",
5986
 
          # finese the cygwin/MSYS system by explicitly sourcing "foo."
5987
 
          # which disallows the automatic-append-.exe behavior.
5988
 
          case $build in
5989
 
          *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5990
 
          *) wrapperdot=${wrapper} ;;
5991
 
          esac
 
6446
          # Note that it is not necessary on cygwin/mingw to append a dot to
 
6447
          # foo even if both foo and FILE.exe exist: automatic-append-.exe
 
6448
          # behavior happens only for exec(3), not for open(2)!  Also, sourcing
 
6449
          # `FILE.' does not work on cygwin managed mounts.
 
6450
          #
5992
6451
          # If there is no directory component, then add one.
5993
 
          case $file in
5994
 
          */* | *\\*) . ${wrapperdot} ;;
5995
 
          *) . ./${wrapperdot} ;;
 
6452
          case $wrapper in
 
6453
          */* | *\\*) . ${wrapper} ;;
 
6454
          *) . ./${wrapper} ;;
5996
6455
          esac
5997
6456
 
5998
6457
          # Check the variables that should have been set.
6020
6479
          done
6021
6480
 
6022
6481
          relink_command=
6023
 
          # To insure that "foo" is sourced, and not "foo.exe",
6024
 
          # finese the cygwin/MSYS system by explicitly sourcing "foo."
6025
 
          # which disallows the automatic-append-.exe behavior.
6026
 
          case $build in
6027
 
          *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
6028
 
          *) wrapperdot=${wrapper} ;;
6029
 
          esac
 
6482
          # Note that it is not necessary on cygwin/mingw to append a dot to
 
6483
          # foo even if both foo and FILE.exe exist: automatic-append-.exe
 
6484
          # behavior happens only for exec(3), not for open(2)!  Also, sourcing
 
6485
          # `FILE.' does not work on cygwin managed mounts.
 
6486
          #
6030
6487
          # If there is no directory component, then add one.
6031
 
          case $file in
6032
 
          */* | *\\*) . ${wrapperdot} ;;
6033
 
          *) . ./${wrapperdot} ;;
 
6488
          case $wrapper in
 
6489
          */* | *\\*) . ${wrapper} ;;
 
6490
          *) . ./${wrapper} ;;
6034
6491
          esac
6035
6492
 
6036
6493
          outputname=
6037
6494
          if test "$fast_install" = no && test -n "$relink_command"; then
6038
6495
            if test "$finalize" = yes && test -z "$run"; then
6039
 
              tmpdir="/tmp"
6040
 
              test -n "$TMPDIR" && tmpdir="$TMPDIR"
6041
 
              tmpdir="$tmpdir/libtool-$$"
6042
 
              save_umask=`umask`
6043
 
              umask 0077
6044
 
              if $mkdir "$tmpdir"; then
6045
 
                umask $save_umask
6046
 
              else
6047
 
                umask $save_umask
6048
 
                $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6049
 
                continue
6050
 
              fi
 
6496
              tmpdir=`func_mktempdir`
6051
6497
              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6052
6498
              outputname="$tmpdir/$file"
6053
6499
              # Replace the output file specification.
6071
6517
        fi
6072
6518
 
6073
6519
        # remove .exe since cygwin /usr/bin/install will append another
6074
 
        # one anyways
 
6520
        # one anyway 
6075
6521
        case $install_prog,$host in
6076
6522
        */usr/bin/install*,*cygwin*)
6077
6523
          case $file:$destfile in
6171
6617
    # Exit here if they wanted silent mode.
6172
6618
    test "$show" = : && exit $EXIT_SUCCESS
6173
6619
 
6174
 
    $echo "----------------------------------------------------------------------"
 
6620
    $echo "X----------------------------------------------------------------------" | $Xsed
6175
6621
    $echo "Libraries have been installed in:"
6176
6622
    for libdir in $libdirs; do
6177
6623
      $echo "   $libdir"
6204
6650
    $echo
6205
6651
    $echo "See any operating system documentation about shared libraries for"
6206
6652
    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6207
 
    $echo "----------------------------------------------------------------------"
 
6653
    $echo "X----------------------------------------------------------------------" | $Xsed
6208
6654
    exit $EXIT_SUCCESS
6209
6655
    ;;
6210
6656
 
6421
6867
            rmfiles="$rmfiles $objdir/$n"
6422
6868
          done
6423
6869
          test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6424
 
          test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6425
6870
 
6426
 
          if test "$mode" = uninstall; then
 
6871
          case "$mode" in
 
6872
          clean)
 
6873
            case "  $library_names " in
 
6874
            # "  " in the beginning catches empty $dlname
 
6875
            *" $dlname "*) ;;
 
6876
            *) rmfiles="$rmfiles $objdir/$dlname" ;;
 
6877
            esac
 
6878
             test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
 
6879
            ;;
 
6880
          uninstall)
6427
6881
            if test -n "$library_names"; then
6428
6882
              # Do each command in the postuninstall commands.
6429
6883
              cmds=$postuninstall_cmds
6456
6910
              IFS="$save_ifs"
6457
6911
            fi
6458
6912
            # FIXME: should reinstall the best remaining shared library.
6459
 
          fi
 
6913
            ;;
 
6914
          esac
6460
6915
        fi
6461
6916
        ;;
6462
6917
 
6741
7196
$echo
6742
7197
$echo "Try \`$modename --help' for more information about other modes."
6743
7198
 
6744
 
exit $EXIT_SUCCESS
 
7199
exit $?
6745
7200
 
6746
7201
# The TAGs below are defined such that we never get into a situation
6747
7202
# in which we disable both kinds of libraries.  Given conflicting
6755
7210
# configuration.  But we'll never go from static-only to shared-only.
6756
7211
 
6757
7212
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6758
 
build_libtool_libs=no
6759
 
build_old_libs=yes
 
7213
disable_libs=shared
6760
7214
# ### END LIBTOOL TAG CONFIG: disable-shared
6761
7215
 
6762
7216
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
6763
 
build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
 
7217
disable_libs=static
6764
7218
# ### END LIBTOOL TAG CONFIG: disable-static
6765
7219
 
6766
7220
# Local Variables:
6769
7223
# End:
6770
7224
# ### BEGIN LIBTOOL TAG CONFIG: CXX
6771
7225
 
6772
 
# Libtool was configured on host atoron:
 
7226
# Libtool was configured on host dancer64:
6773
7227
 
6774
7228
# Shell to use when invoking shell scripts.
6775
7229
SHELL="/bin/sh"
6791
7245
 
6792
7246
# The host system.
6793
7247
host_alias=
6794
 
host=i686-pc-linux-gnu
 
7248
host=x86_64-unknown-linux-gnu
 
7249
host_os=linux-gnu
 
7250
 
 
7251
# The build system.
 
7252
build_alias=
 
7253
build=x86_64-unknown-linux-gnu
 
7254
build_os=linux-gnu
6795
7255
 
6796
7256
# An echo program that does not interpret backslashes.
6797
7257
echo="echo"
6803
7263
# A C compiler.
6804
7264
LTCC="gcc"
6805
7265
 
 
7266
# LTCC compiler flags.
 
7267
LTCFLAGS="-g -O2 -D_REENTRANT -DNDEBUG -ffast-math -fstrict-aliasing -funroll-loops"
 
7268
 
6806
7269
# A language-specific compiler.
6807
7270
CC="g++"
6808
7271
 
6810
7273
with_gcc=yes
6811
7274
 
6812
7275
# An ERE matcher.
6813
 
EGREP="grep -E"
 
7276
EGREP="/bin/grep -E"
6814
7277
 
6815
7278
# The linker used to build libraries.
6816
 
LD="/usr/bin/ld"
 
7279
LD="/usr/bin/ld -m elf_x86_64"
6817
7280
 
6818
7281
# Whether we need hard or soft links.
6819
7282
LN_S="ln -s"
6868
7331
# Does compiler simultaneously support -c and -o options?
6869
7332
compiler_c_o="yes"
6870
7333
 
6871
 
# Must we lock files when doing compilation ?
 
7334
# Must we lock files when doing compilation?
6872
7335
need_locks="no"
6873
7336
 
6874
7337
# Do we need the lib prefix for modules?
6917
7380
# Commands used to build and install an old-style archive.
6918
7381
RANLIB="ranlib"
6919
7382
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
6920
 
old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
 
7383
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
6921
7384
old_postuninstall_cmds=""
6922
7385
 
6923
7386
# Create an old-style archive from a shared archive.
6942
7405
 
6943
7406
# Dependencies to place before the objects being linked to create a
6944
7407
# shared library.
6945
 
predep_objects="/usr/lib/gcc-lib/i486-linux/3.3.5/../../../crti.o /usr/lib/gcc-lib/i486-linux/3.3.5/crtbeginS.o"
 
7408
predep_objects="/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtbeginS.o"
6946
7409
 
6947
7410
# Dependencies to place after the objects being linked to create a
6948
7411
# shared library.
6949
 
postdep_objects="/usr/lib/gcc-lib/i486-linux/3.3.5/crtendS.o /usr/lib/gcc-lib/i486-linux/3.3.5/../../../crtn.o"
 
7412
postdep_objects="/usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtfastmath.o /usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/crtn.o"
6950
7413
 
6951
7414
# Dependencies to place before the objects being linked to create a
6952
7415
# shared library.
6958
7421
 
6959
7422
# The library search path used internally by the compiler when linking
6960
7423
# a shared library.
6961
 
compiler_lib_search_path="-L/usr/lib/gcc-lib/i486-linux/3.3.5 -L/usr/lib/gcc-lib/i486-linux/3.3.5/../../.."
 
7424
compiler_lib_search_path="-L/usr/lib/gcc/x86_64-linux-gnu/4.1.2 -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2 -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64"
6962
7425
 
6963
7426
# Method to check whether dependent libraries are shared objects.
6964
7427
deplibs_check_method="pass_all"
6979
7442
finish_eval=""
6980
7443
 
6981
7444
# Take the output of nm and produce a listing of raw symbols and C names.
6982
 
global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][      ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
 
7445
global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][      ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
6983
7446
 
6984
7447
# Transform the output of nm in a proper C declaration
6985
7448
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7024
7487
 
7025
7488
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7026
7489
# the resulting binary.
7027
 
hardcode_shlibpath_var=
 
7490
hardcode_shlibpath_var=unsupported
7028
7491
 
7029
7492
# Set to yes if building a shared library automatically hardcodes DIR into the library
7030
7493
# and all subsequent libraries and executables linked against it.
7038
7501
link_all_deplibs=no
7039
7502
 
7040
7503
# Compile-time system search path for libraries
7041
 
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.5/ /usr/lib/gcc/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../i486-linux/3.3.5/ /usr/lib/gcc-lib/i486-linux/3.3.5/../../../ /lib/i486-linux/3.3.5/ /lib/ /usr/lib/i486-linux/3.3.5/ /usr/lib/"
 
7504
sys_lib_search_path_spec=" /usr/lib/gcc/x86_64-linux-gnu/4.1.2/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/4.1.2/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../x86_64-linux-gnu/lib/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../x86_64-linux-gnu/4.1.2/ /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../ /lib/x86_64-linux-gnu/4.1.2/ /lib/ /usr/lib/x86_64-linux-gnu/4.1.2/ /usr/lib/"
7042
7505
 
7043
7506
# Run-time system search path for libraries
7044
 
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib "
 
7507
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/ /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu "
7045
7508
 
7046
7509
# Fix the shell variable $srcfile for the compiler.
7047
7510
fix_srcfile_path=""
7063
7526
 
7064
7527
# ### END LIBTOOL TAG CONFIG: CXX
7065
7528
 
 
7529
# ### BEGIN LIBTOOL TAG CONFIG: F77
 
7530
 
 
7531
# Libtool was configured on host dancer64:
 
7532
 
 
7533
# Shell to use when invoking shell scripts.
 
7534
SHELL="/bin/sh"
 
7535
 
 
7536
# Whether or not to build shared libraries.
 
7537
build_libtool_libs=no
 
7538
 
 
7539
# Whether or not to build static libraries.
 
7540
build_old_libs=yes
 
7541
 
 
7542
# Whether or not to add -lc for building shared libraries.
 
7543
build_libtool_need_lc=no
 
7544
 
 
7545
# Whether or not to disallow shared libs when runtime libs are static
 
7546
allow_libtool_libs_with_static_runtimes=no
 
7547
 
 
7548
# Whether or not to optimize for fast installation.
 
7549
fast_install=needless
 
7550
 
 
7551
# The host system.
 
7552
host_alias=
 
7553
host=x86_64-unknown-linux-gnu
 
7554
host_os=linux-gnu
 
7555
 
 
7556
# The build system.
 
7557
build_alias=
 
7558
build=x86_64-unknown-linux-gnu
 
7559
build_os=linux-gnu
 
7560
 
 
7561
# An echo program that does not interpret backslashes.
 
7562
echo="echo"
 
7563
 
 
7564
# The archiver.
 
7565
AR="ar"
 
7566
AR_FLAGS="cru"
 
7567
 
 
7568
# A C compiler.
 
7569
LTCC="gcc"
 
7570
 
 
7571
# LTCC compiler flags.
 
7572
LTCFLAGS="-g -O2 -D_REENTRANT -DNDEBUG -ffast-math -fstrict-aliasing -funroll-loops"
 
7573
 
 
7574
# A language-specific compiler.
 
7575
CC="g77"
 
7576
 
 
7577
# Is the compiler the GNU C compiler?
 
7578
with_gcc=yes
 
7579
 
 
7580
# An ERE matcher.
 
7581
EGREP="/bin/grep -E"
 
7582
 
 
7583
# The linker used to build libraries.
 
7584
LD="/usr/bin/ld -m elf_x86_64"
 
7585
 
 
7586
# Whether we need hard or soft links.
 
7587
LN_S="ln -s"
 
7588
 
 
7589
# A BSD-compatible nm program.
 
7590
NM="/usr/bin/nm -B"
 
7591
 
 
7592
# A symbol stripping program
 
7593
STRIP="strip"
 
7594
 
 
7595
# Used to examine libraries when file_magic_cmd begins "file"
 
7596
MAGIC_CMD=file
 
7597
 
 
7598
# Used on cygwin: DLL creation program.
 
7599
DLLTOOL="dlltool"
 
7600
 
 
7601
# Used on cygwin: object dumper.
 
7602
OBJDUMP="objdump"
 
7603
 
 
7604
# Used on cygwin: assembler.
 
7605
AS="as"
 
7606
 
 
7607
# The name of the directory that contains temporary libtool files.
 
7608
objdir=.libs
 
7609
 
 
7610
# How to create reloadable object files.
 
7611
reload_flag=" -r"
 
7612
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
 
7613
 
 
7614
# How to pass a linker flag through the compiler.
 
7615
wl="-Wl,"
 
7616
 
 
7617
# Object file suffix (normally "o").
 
7618
objext="o"
 
7619
 
 
7620
# Old archive suffix (normally "a").
 
7621
libext="a"
 
7622
 
 
7623
# Shared library suffix (normally ".so").
 
7624
shrext_cmds='.so'
 
7625
 
 
7626
# Executable file suffix (normally "").
 
7627
exeext=""
 
7628
 
 
7629
# Additional compiler flags for building library objects.
 
7630
pic_flag=" -fPIC"
 
7631
pic_mode=default
 
7632
 
 
7633
# What is the maximum length of a command?
 
7634
max_cmd_len=32768
 
7635
 
 
7636
# Does compiler simultaneously support -c and -o options?
 
7637
compiler_c_o="yes"
 
7638
 
 
7639
# Must we lock files when doing compilation?
 
7640
need_locks="no"
 
7641
 
 
7642
# Do we need the lib prefix for modules?
 
7643
need_lib_prefix=no
 
7644
 
 
7645
# Do we need a version for libraries?
 
7646
need_version=no
 
7647
 
 
7648
# Whether dlopen is supported.
 
7649
dlopen_support=unknown
 
7650
 
 
7651
# Whether dlopen of programs is supported.
 
7652
dlopen_self=unknown
 
7653
 
 
7654
# Whether dlopen of statically linked programs is supported.
 
7655
dlopen_self_static=unknown
 
7656
 
 
7657
# Compiler flag to prevent dynamic linking.
 
7658
link_static_flag="-static"
 
7659
 
 
7660
# Compiler flag to turn off builtin functions.
 
7661
no_builtin_flag=""
 
7662
 
 
7663
# Compiler flag to allow reflexive dlopens.
 
7664
export_dynamic_flag_spec="\${wl}--export-dynamic"
 
7665
 
 
7666
# Compiler flag to generate shared objects directly from archives.
 
7667
whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
 
7668
 
 
7669
# Compiler flag to generate thread-safe objects.
 
7670
thread_safe_flag_spec=""
 
7671
 
 
7672
# Library versioning type.
 
7673
version_type=linux
 
7674
 
 
7675
# Format of library name prefix.
 
7676
libname_spec="lib\$name"
 
7677
 
 
7678
# List of archive names.  First name is the real one, the rest are links.
 
7679
# The last name is the one that the linker finds with -lNAME.
 
7680
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
 
7681
 
 
7682
# The coded name of the library, if different from the real name.
 
7683
soname_spec="\${libname}\${release}\${shared_ext}\$major"
 
7684
 
 
7685
# Commands used to build and install an old-style archive.
 
7686
RANLIB="ranlib"
 
7687
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
 
7688
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
 
7689
old_postuninstall_cmds=""
 
7690
 
 
7691
# Create an old-style archive from a shared archive.
 
7692
old_archive_from_new_cmds=""
 
7693
 
 
7694
# Create a temporary old-style archive to link instead of a shared archive.
 
7695
old_archive_from_expsyms_cmds=""
 
7696
 
 
7697
# Commands used to build and install a shared archive.
 
7698
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
 
7699
archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
 
7700
  cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
 
7701
  \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
 
7702
          \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
 
7703
postinstall_cmds=""
 
7704
postuninstall_cmds=""
 
7705
 
 
7706
# Commands used to build a loadable module (assumed same as above if empty)
 
7707
module_cmds=""
 
7708
module_expsym_cmds=""
 
7709
 
 
7710
# Commands to strip libraries.
 
7711
old_striplib="strip --strip-debug"
 
7712
striplib="strip --strip-unneeded"
 
7713
 
 
7714
# Dependencies to place before the objects being linked to create a
 
7715
# shared library.
 
7716
predep_objects=""
 
7717
 
 
7718
# Dependencies to place after the objects being linked to create a
 
7719
# shared library.
 
7720
postdep_objects=""
 
7721
 
 
7722
# Dependencies to place before the objects being linked to create a
 
7723
# shared library.
 
7724
predeps=""
 
7725
 
 
7726
# Dependencies to place after the objects being linked to create a
 
7727
# shared library.
 
7728
postdeps=""
 
7729
 
 
7730
# The library search path used internally by the compiler when linking
 
7731
# a shared library.
 
7732
compiler_lib_search_path=""
 
7733
 
 
7734
# Method to check whether dependent libraries are shared objects.
 
7735
deplibs_check_method="pass_all"
 
7736
 
 
7737
# Command to use when deplibs_check_method == file_magic.
 
7738
file_magic_cmd="\$MAGIC_CMD"
 
7739
 
 
7740
# Flag that allows shared libraries with undefined symbols to be built.
 
7741
allow_undefined_flag=""
 
7742
 
 
7743
# Flag that forces no undefined symbols.
 
7744
no_undefined_flag=""
 
7745
 
 
7746
# Commands used to finish a libtool library installation in a directory.
 
7747
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
 
7748
 
 
7749
# Same as above, but a single script fragment to be evaled but not shown.
 
7750
finish_eval=""
 
7751
 
 
7752
# Take the output of nm and produce a listing of raw symbols and C names.
 
7753
global_symbol_pipe="sed -n -e 's/^.*[   ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[       ][      ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
 
7754
 
 
7755
# Transform the output of nm in a proper C declaration
 
7756
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
 
7757
 
 
7758
# Transform the output of nm in a C name address pair
 
7759
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
 
7760
 
 
7761
# This is the shared library runtime path variable.
 
7762
runpath_var=LD_RUN_PATH
 
7763
 
 
7764
# This is the shared library path variable.
 
7765
shlibpath_var=LD_LIBRARY_PATH
 
7766
 
 
7767
# Is shlibpath searched before the hard-coded library search path?
 
7768
shlibpath_overrides_runpath=no
 
7769
 
 
7770
# How to hardcode a shared library path into an executable.
 
7771
hardcode_action=immediate
 
7772
 
 
7773
# Whether we should hardcode library paths into libraries.
 
7774
hardcode_into_libs=yes
 
7775
 
 
7776
# Flag to hardcode $libdir into a binary during linking.
 
7777
# This must work even if $libdir does not exist.
 
7778
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
 
7779
 
 
7780
# If ld is used when linking, flag to hardcode $libdir into
 
7781
# a binary during linking. This must work even if $libdir does
 
7782
# not exist.
 
7783
hardcode_libdir_flag_spec_ld=""
 
7784
 
 
7785
# Whether we need a single -rpath flag with a separated argument.
 
7786
hardcode_libdir_separator=""
 
7787
 
 
7788
# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
 
7789
# resulting binary.
 
7790
hardcode_direct=no
 
7791
 
 
7792
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 
7793
# resulting binary.
 
7794
hardcode_minus_L=no
 
7795
 
 
7796
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 
7797
# the resulting binary.
 
7798
hardcode_shlibpath_var=unsupported
 
7799
 
 
7800
# Set to yes if building a shared library automatically hardcodes DIR into the library
 
7801
# and all subsequent libraries and executables linked against it.
 
7802
hardcode_automatic=no
 
7803
 
 
7804
# Variables whose values should be saved in libtool wrapper scripts and
 
7805
# restored at relink time.
 
7806
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
7807
 
 
7808
# Whether libtool must link a program against all its dependency libraries.
 
7809
link_all_deplibs=no
 
7810
 
 
7811
# Compile-time system search path for libraries
 
7812
sys_lib_search_path_spec=" /usr/lib/gcc/x86_64-linux-gnu/3.4.6/ /usr/lib/gcc/x86_64-linux-gnu/3.4.6/ /usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/3.4.6/ /usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../../../x86_64-linux-gnu/lib/ /usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../../x86_64-linux-gnu/3.4.6/ /usr/lib/gcc/x86_64-linux-gnu/3.4.6/../../../ /lib/x86_64-linux-gnu/3.4.6/ /lib/ /usr/lib/x86_64-linux-gnu/3.4.6/ /usr/lib/"
 
7813
 
 
7814
# Run-time system search path for libraries
 
7815
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/ /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu "
 
7816
 
 
7817
# Fix the shell variable $srcfile for the compiler.
 
7818
fix_srcfile_path=""
 
7819
 
 
7820
# Set to yes if exported symbols are required.
 
7821
always_export_symbols=no
 
7822
 
 
7823
# The commands to list exported symbols.
 
7824
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
 
7825
 
 
7826
# The commands to extract the exported symbol list from a shared archive.
 
7827
extract_expsyms_cmds=""
 
7828
 
 
7829
# Symbols that should not be listed in the preloaded symbols.
 
7830
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
 
7831
 
 
7832
# Symbols that must always be exported.
 
7833
include_expsyms=""
 
7834
 
 
7835
# ### END LIBTOOL TAG CONFIG: F77
 
7836